#include <perms.h>

                                                                //      1  %begin
#line 1 "regression-bugs-tmp/readwrite.imp"
int main(int argc, char **argv) {
  __label__ _imp_endofblock;
  _imp_initialise(argc, argv);
                                                                //      2    %constinteger TAB = 9
_imp_current_line = 2; _imp_current_file = "regression-bugs-tmp/readwrite.imp";
                                                                //      3    %integer a, b, c
_imp_current_line = 3; _imp_current_file = "regression-bugs-tmp/readwrite.imp";
#line 3 "regression-bugs-tmp/readwrite.imp"
int A;
#line 3 "regression-bugs-tmp/readwrite.imp"
int B;
#line 3 "regression-bugs-tmp/readwrite.imp"
int C;
                                                                //      4    ! create a tab-delimited data file:
                                                                //      5    open output(2, "temp.txt")
_imp_current_line = 5; _imp_current_file = "regression-bugs-tmp/readwrite.imp";
#line 5 "regression-bugs-tmp/readwrite.imp"
_imp_OPENOUTPUT(2, _imp_str_literal("temp.txt"));
                                                                //      6    select output(2)
_imp_current_line = 6; _imp_current_file = "regression-bugs-tmp/readwrite.imp";
#line 6 "regression-bugs-tmp/readwrite.imp"
_imp_SELECTOUTPUT(2);
                                                                //      7    {by the way PRINT CH is missing from the perms}
                                                                //      8    write(123, -1); print symbol(TAB); write (42, -1); print symbol(TAB); write(17, -1); newline
_imp_current_line = 8; _imp_current_file = "regression-bugs-tmp/readwrite.imp";
#line 8 "regression-bugs-tmp/readwrite.imp"
_imp_WRITE(123, (-1));
_imp_current_line = 8; _imp_current_file = "regression-bugs-tmp/readwrite.imp";
#line 8 "regression-bugs-tmp/readwrite.imp"
_imp_PRINTSYMBOL(9);
_imp_current_line = 8; _imp_current_file = "regression-bugs-tmp/readwrite.imp";
#line 8 "regression-bugs-tmp/readwrite.imp"
_imp_WRITE(42, (-1));
_imp_current_line = 8; _imp_current_file = "regression-bugs-tmp/readwrite.imp";
#line 8 "regression-bugs-tmp/readwrite.imp"
_imp_PRINTSYMBOL(9);
_imp_current_line = 8; _imp_current_file = "regression-bugs-tmp/readwrite.imp";
#line 8 "regression-bugs-tmp/readwrite.imp"
_imp_WRITE(17, (-1));
_imp_current_line = 8; _imp_current_file = "regression-bugs-tmp/readwrite.imp";
#line 8 "regression-bugs-tmp/readwrite.imp"
_imp_NEWLINE();
                                                                //      9    close output
_imp_current_line = 9; _imp_current_file = "regression-bugs-tmp/readwrite.imp";
#line 9 "regression-bugs-tmp/readwrite.imp"
_imp_CLOSEOUTPUT();
                                                                //     10    select output(0)
_imp_current_line = 10; _imp_current_file = "regression-bugs-tmp/readwrite.imp";
#line 10 "regression-bugs-tmp/readwrite.imp"
_imp_SELECTOUTPUT(0);
                                                                //     11    open input(2, "temp.txt")
_imp_current_line = 11; _imp_current_file = "regression-bugs-tmp/readwrite.imp";
#line 11 "regression-bugs-tmp/readwrite.imp"
_imp_OPENINPUT(2, _imp_str_literal("temp.txt"));
                                                                //     12    select input(2)
_imp_current_line = 12; _imp_current_file = "regression-bugs-tmp/readwrite.imp";
#line 12 "regression-bugs-tmp/readwrite.imp"
_imp_SELECTINPUT(2);
                                                                //     13    read(a)
_imp_current_line = 13; _imp_current_file = "regression-bugs-tmp/readwrite.imp";
#line 13 "regression-bugs-tmp/readwrite.imp"
_imp_READ(&A);
                                                                //     14    read(b)
_imp_current_line = 14; _imp_current_file = "regression-bugs-tmp/readwrite.imp";
#line 14 "regression-bugs-tmp/readwrite.imp"
_imp_READ(&B);
                                                                //     15    read(c)
_imp_current_line = 15; _imp_current_file = "regression-bugs-tmp/readwrite.imp";
#line 15 "regression-bugs-tmp/readwrite.imp"
_imp_READ(&C);
                                                                //     16    print string("Total = "); write(a+b+c, -1); newline
_imp_current_line = 16; _imp_current_file = "regression-bugs-tmp/readwrite.imp";
#line 16 "regression-bugs-tmp/readwrite.imp"
_imp_PRINTSTRING(_imp_str_literal("Total = "));
_imp_current_line = 16; _imp_current_file = "regression-bugs-tmp/readwrite.imp";
#line 16 "regression-bugs-tmp/readwrite.imp"
_imp_WRITE((((int)((((int)(A)) + (B)))) + (C)), (-1));
_imp_current_line = 16; _imp_current_file = "regression-bugs-tmp/readwrite.imp";
#line 16 "regression-bugs-tmp/readwrite.imp"
_imp_NEWLINE();
                                                                //     17  %endofprogram
_imp_current_line = 17; _imp_current_file = "regression-bugs-tmp/readwrite.imp";
#line 17 "regression-bugs-tmp/readwrite.imp"
return 0;
_imp_endofblock: ;
} // End of block _imp_main at level 1
#line 17 "regression-bugs-tmp/readwrite.imp"
// End of file
