#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ fflush(int /*<<< orphan*/ *);
int /*<<< orphan*/ fileno(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, int);
int /*<<< orphan*/ printf(char *, char, ...);
int /*<<< orphan*/ read(int /*<<< orphan*/, char *, int);
int main() {
  FILE *fp;
  char c;
  fp = fopen("/dev/com1", " ");
  for (int i = 0; i < 10; i++) {
    printf("consloe out:%d\n", i);
    fprintf(fp, "test puts %d\r\n", i);
    fflush(fp);
  }
  for (int i = 0; i < 10; i++) {
    read(fileno(fp), &c, 1);
    printf("read_com:%c,%d\n", c, c);
  }
  fclose(fp);
  fp = fopen("/dev/com2", " ");
  for (int i = 0; i < 10; i++) {
    printf("consloe out:%d\n", i);
    fprintf(fp, "test puts %d\r\n", i);
    fflush(fp);
  }
  for (int i = 0; i < 10; i++) {
    read(fileno(fp), &c, 1);
    printf("read_com:%c,%d\n", c, c);
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xe7a(%rip),%rdi
lea    0xe7d(%rip),%rsi
call   1090 <fopen@plt>
mov    %rax,-0x10(%rbp)
movl   $0x0,-0x18(%rbp)
cmpl   $0xa,-0x18(%rbp)
jge    11e5 <main+0x75>
mov    -0x18(%rbp),%eax
lea    0xe5b(%rip),%rdi
movsbl %al,%esi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%edx
lea    0xe53(%rip),%rsi
call   1060 <fprintf@plt>
mov    -0x10(%rbp),%rdi
call   1080 <fflush@plt>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    119d <main+0x2d>
movl   $0x0,-0x1c(%rbp)
cmpl   $0xa,-0x1c(%rbp)
jge    1235 <main+0xc5>
mov    -0x10(%rbp),%rdi
call   1070 <fileno@plt>
mov    %eax,%edi
lea    -0x11(%rbp),%rsi
mov    $0x1,%edx
call   1050 <read@plt>
mov    -0x11(%rbp),%al
movsbl -0x11(%rbp),%edx
lea    0xe0e(%rip),%rdi
movsbl %al,%esi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    11ec <main+0x7c>
mov    -0x10(%rbp),%rdi
call   1030 <fclose@plt>
lea    0xdf6(%rip),%rdi
lea    0xdbe(%rip),%rsi
call   1090 <fopen@plt>
mov    %rax,-0x10(%rbp)
movl   $0x0,-0x20(%rbp)
cmpl   $0xa,-0x20(%rbp)
jge    12a4 <main+0x134>
mov    -0x20(%rbp),%eax
lea    0xd9c(%rip),%rdi
movsbl %al,%esi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x10(%rbp),%rdi
mov    -0x20(%rbp),%edx
lea    0xd94(%rip),%rsi
call   1060 <fprintf@plt>
mov    -0x10(%rbp),%rdi
call   1080 <fflush@plt>
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
jmp    125c <main+0xec>
movl   $0x0,-0x24(%rbp)
cmpl   $0xa,-0x24(%rbp)
jge    12f4 <main+0x184>
mov    -0x10(%rbp),%rdi
call   1070 <fileno@plt>
mov    %eax,%edi
lea    -0x11(%rbp),%rsi
mov    $0x1,%edx
call   1050 <read@plt>
mov    -0x11(%rbp),%al
movsbl -0x11(%rbp),%edx
lea    0xd4f(%rip),%rdi
movsbl %al,%esi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    12ab <main+0x13b>
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
lea    0xe7e(%rip),%rdi
lea    0xe81(%rip),%r13
mov    %r13,%rsi
call   1090 <fopen@plt>
mov    %rax,%rbp
lea    0xe71(%rip),%r12
mov    %r12,%rdi
xor    %esi,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xe6e(%rip),%rbx
mov    %rbp,%rdi
mov    %rbx,%rsi
xor    %edx,%edx
call   1060 <fprintf@plt>
mov    %rbp,%rdi
call   1080 <fflush@plt>
mov    %r12,%rdi
mov    $0x1,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbp,%rdi
mov    %rbx,%rsi
mov    $0x1,%edx
call   1060 <fprintf@plt>
mov    %rbp,%rdi
call   1080 <fflush@plt>
mov    %r12,%rdi
mov    $0x2,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbp,%rdi
mov    %rbx,%rsi
mov    $0x2,%edx
call   1060 <fprintf@plt>
mov    %rbp,%rdi
call   1080 <fflush@plt>
mov    %r12,%rdi
mov    $0x3,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbp,%rdi
mov    %rbx,%rsi
mov    $0x3,%edx
call   1060 <fprintf@plt>
mov    %rbp,%rdi
call   1080 <fflush@plt>
mov    %r12,%rdi
mov    $0x4,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbp,%rdi
mov    %rbx,%rsi
mov    $0x4,%edx
call   1060 <fprintf@plt>
mov    %rbp,%rdi
call   1080 <fflush@plt>
mov    %r12,%rdi
mov    $0x5,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbp,%rdi
mov    %rbx,%rsi
mov    $0x5,%edx
call   1060 <fprintf@plt>
mov    %rbp,%rdi
call   1080 <fflush@plt>
mov    %r12,%rdi
mov    $0x6,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbp,%rdi
mov    %rbx,%rsi
mov    $0x6,%edx
call   1060 <fprintf@plt>
mov    %rbp,%rdi
call   1080 <fflush@plt>
mov    %r12,%rdi
mov    $0x7,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbp,%rdi
mov    %rbx,%rsi
mov    $0x7,%edx
call   1060 <fprintf@plt>
mov    %rbp,%rdi
call   1080 <fflush@plt>
mov    %r12,%rdi
mov    $0x8,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbp,%rdi
mov    %rbx,%rsi
mov    $0x8,%edx
call   1060 <fprintf@plt>
mov    %rbp,%rdi
call   1080 <fflush@plt>
mov    %r12,%rdi
mov    $0x9,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbp,%rdi
mov    %rbx,%rsi
mov    $0x9,%edx
call   1060 <fprintf@plt>
mov    %rbp,%rdi
call   1080 <fflush@plt>
mov    %rbp,%rdi
call   1070 <fileno@plt>
lea    0x7(%rsp),%r14
mov    %eax,%edi
mov    %r14,%rsi
mov    $0x1,%edx
call   1050 <read@plt>
movsbl 0x7(%rsp),%edx
lea    0xce1(%rip),%r15
mov    %r15,%rdi
mov    %edx,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbp,%rdi
call   1070 <fileno@plt>
mov    %eax,%edi
mov    %r14,%rsi
mov    $0x1,%edx
call   1050 <read@plt>
movsbl 0x7(%rsp),%edx
mov    %r15,%rdi
mov    %edx,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbp,%rdi
call   1070 <fileno@plt>
mov    %eax,%edi
mov    %r14,%rsi
mov    $0x1,%edx
call   1050 <read@plt>
movsbl 0x7(%rsp),%edx
mov    %r15,%rdi
mov    %edx,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbp,%rdi
call   1070 <fileno@plt>
mov    %eax,%edi
mov    %r14,%rsi
mov    $0x1,%edx
call   1050 <read@plt>
movsbl 0x7(%rsp),%edx
mov    %r15,%rdi
mov    %edx,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbp,%rdi
call   1070 <fileno@plt>
mov    %eax,%edi
mov    %r14,%rsi
mov    $0x1,%edx
call   1050 <read@plt>
movsbl 0x7(%rsp),%edx
mov    %r15,%rdi
mov    %edx,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbp,%rdi
call   1070 <fileno@plt>
mov    %eax,%edi
mov    %r14,%rsi
mov    $0x1,%edx
call   1050 <read@plt>
movsbl 0x7(%rsp),%edx
mov    %r15,%rdi
mov    %edx,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbp,%rdi
call   1070 <fileno@plt>
mov    %eax,%edi
mov    %r14,%rsi
mov    $0x1,%edx
call   1050 <read@plt>
movsbl 0x7(%rsp),%edx
mov    %r15,%rdi
mov    %edx,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbp,%rdi
call   1070 <fileno@plt>
mov    %eax,%edi
mov    %r14,%rsi
mov    $0x1,%edx
call   1050 <read@plt>
movsbl 0x7(%rsp),%edx
mov    %r15,%rdi
mov    %edx,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbp,%rdi
call   1070 <fileno@plt>
mov    %eax,%edi
mov    %r14,%rsi
mov    $0x1,%edx
call   1050 <read@plt>
movsbl 0x7(%rsp),%edx
mov    %r15,%rdi
mov    %edx,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbp,%rdi
call   1070 <fileno@plt>
mov    %eax,%edi
mov    %r14,%rsi
mov    $0x1,%edx
call   1050 <read@plt>
movsbl 0x7(%rsp),%edx
mov    %r15,%rdi
mov    %edx,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbp,%rdi
call   1030 <fclose@plt>
lea    0xb6e(%rip),%rdi
mov    %r13,%rsi
call   1090 <fopen@plt>
mov    %rax,%rbp
mov    %r12,%rdi
xor    %esi,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbp,%rdi
mov    %rbx,%rsi
xor    %edx,%edx
call   1060 <fprintf@plt>
mov    %rbp,%rdi
call   1080 <fflush@plt>
mov    %r12,%rdi
mov    $0x1,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbp,%rdi
mov    %rbx,%rsi
mov    $0x1,%edx
call   1060 <fprintf@plt>
mov    %rbp,%rdi
call   1080 <fflush@plt>
mov    %r12,%rdi
mov    $0x2,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbp,%rdi
mov    %rbx,%rsi
mov    $0x2,%edx
call   1060 <fprintf@plt>
mov    %rbp,%rdi
call   1080 <fflush@plt>
mov    %r12,%rdi
mov    $0x3,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbp,%rdi
mov    %rbx,%rsi
mov    $0x3,%edx
call   1060 <fprintf@plt>
mov    %rbp,%rdi
call   1080 <fflush@plt>
mov    %r12,%rdi
mov    $0x4,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbp,%rdi
mov    %rbx,%rsi
mov    $0x4,%edx
call   1060 <fprintf@plt>
mov    %rbp,%rdi
call   1080 <fflush@plt>
mov    %r12,%rdi
mov    $0x5,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbp,%rdi
mov    %rbx,%rsi
mov    $0x5,%edx
call   1060 <fprintf@plt>
mov    %rbp,%rdi
call   1080 <fflush@plt>
mov    %r12,%rdi
mov    $0x6,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbp,%rdi
mov    %rbx,%rsi
mov    $0x6,%edx
call   1060 <fprintf@plt>
mov    %rbp,%rdi
call   1080 <fflush@plt>
mov    %r12,%rdi
mov    $0x7,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbp,%rdi
mov    %rbx,%rsi
mov    $0x7,%edx
call   1060 <fprintf@plt>
mov    %rbp,%rdi
call   1080 <fflush@plt>
mov    %r12,%rdi
mov    $0x8,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbp,%rdi
mov    %rbx,%rsi
mov    $0x8,%edx
call   1060 <fprintf@plt>
mov    %rbp,%rdi
call   1080 <fflush@plt>
mov    %r12,%rdi
mov    $0x9,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbp,%rdi
mov    %rbx,%rsi
mov    $0x9,%edx
call   1060 <fprintf@plt>
mov    %rbp,%rdi
call   1080 <fflush@plt>
mov    %rbp,%rdi
call   1070 <fileno@plt>
mov    %eax,%edi
mov    %r14,%rsi
mov    $0x1,%edx
call   1050 <read@plt>
movsbl 0x7(%rsp),%edx
mov    %r15,%rdi
mov    %edx,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbp,%rdi
call   1070 <fileno@plt>
mov    %eax,%edi
mov    %r14,%rsi
mov    $0x1,%edx
call   1050 <read@plt>
movsbl 0x7(%rsp),%edx
mov    %r15,%rdi
mov    %edx,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbp,%rdi
call   1070 <fileno@plt>
mov    %eax,%edi
mov    %r14,%rsi
mov    $0x1,%edx
call   1050 <read@plt>
movsbl 0x7(%rsp),%edx
mov    %r15,%rdi
mov    %edx,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbp,%rdi
call   1070 <fileno@plt>
mov    %eax,%edi
mov    %r14,%rsi
mov    $0x1,%edx
call   1050 <read@plt>
movsbl 0x7(%rsp),%edx
mov    %r15,%rdi
mov    %edx,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbp,%rdi
call   1070 <fileno@plt>
mov    %eax,%edi
mov    %r14,%rsi
mov    $0x1,%edx
call   1050 <read@plt>
movsbl 0x7(%rsp),%edx
mov    %r15,%rdi
mov    %edx,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbp,%rdi
call   1070 <fileno@plt>
mov    %eax,%edi
mov    %r14,%rsi
mov    $0x1,%edx
call   1050 <read@plt>
movsbl 0x7(%rsp),%edx
mov    %r15,%rdi
mov    %edx,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbp,%rdi
call   1070 <fileno@plt>
mov    %eax,%edi
mov    %r14,%rsi
mov    $0x1,%edx
call   1050 <read@plt>
movsbl 0x7(%rsp),%edx
mov    %r15,%rdi
mov    %edx,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbp,%rdi
call   1070 <fileno@plt>
mov    %eax,%edi
mov    %r14,%rsi
mov    $0x1,%edx
call   1050 <read@plt>
movsbl 0x7(%rsp),%edx
mov    %r15,%rdi
mov    %edx,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbp,%rdi
call   1070 <fileno@plt>
mov    %eax,%edi
mov    %r14,%rsi
mov    $0x1,%edx
call   1050 <read@plt>
movsbl 0x7(%rsp),%edx
mov    %r15,%rdi
mov    %edx,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbp,%rdi
call   1070 <fileno@plt>
mov    %eax,%edi
mov    %r14,%rsi
mov    $0x1,%edx
call   1050 <read@plt>
movsbl 0x7(%rsp),%edx
mov    %r15,%rdi
mov    %edx,%esi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [10 x i8] c"/dev/com1\00"
@.str.1 = [2 x i8] c" \00"
@.str.2 = [16 x i8] c"consloe out:%d\0A\00"
@.str.3 = [15 x i8] c"test puts %d\0D\0A\00"
@.str.4 = [16 x i8] c"read_com:%c,%d\0A\00"
@.str.5 = [10 x i8] c"/dev/com2\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32*
%3 = alloca i8
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i32 0, i32* %1
%8 = call i32* @fopen(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
store i32* %8, i32** %2
store i32 0, i32* %4
br label %9
9: ; preds = %21, %0
%10 = load i32, i32* %4
%11 = icmp slt i32 %10, 10
br i1 %11, label %12, label %24
12: ; preds = %9
%13 = load i32, i32* %4
%14 = trunc i32 %13 to i8
%15 = call i32 (i8*, i8, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.2, i64 0, i64 0), i8 signext %14)
%16 = load i32*, i32** %2
%17 = load i32, i32* %4
%18 = call i32 @fprintf(i32* %16, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.3, i64 0, i64 0), i32 %17)
%19 = load i32*, i32** %2
%20 = call i32 @fflush(i32* %19)
br label %21
21: ; preds = %12
%22 = load i32, i32* %4
%23 = add nsw i32 %22, 1
store i32 %23, i32* %4
br label %9
24: ; preds = %9
store i32 0, i32* %5
br label %25
25: ; preds = %36, %24
%26 = load i32, i32* %5
%27 = icmp slt i32 %26, 10
br i1 %27, label %28, label %39
28: ; preds = %25
%29 = load i32*, i32** %2
%30 = call i32 @fileno(i32* %29)
%31 = call i32 @read(i32 %30, i8* %3, i32 1)
%32 = load i8, i8* %3
%33 = load i8, i8* %3
%34 = sext i8 %33 to i32
%35 = call i32 (i8*, i8, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.4, i64 0, i64 0), i8 signext %32, i32 %34)
br label %36
36: ; preds = %28
%37 = load i32, i32* %5
%38 = add nsw i32 %37, 1
store i32 %38, i32* %5
br label %25
39: ; preds = %25
%40 = load i32*, i32** %2
%41 = call i32 @fclose(i32* %40)
%42 = call i32* @fopen(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
store i32* %42, i32** %2
store i32 0, i32* %6
br label %43
43: ; preds = %55, %39
%44 = load i32, i32* %6
%45 = icmp slt i32 %44, 10
br i1 %45, label %46, label %58
46: ; preds = %43
%47 = load i32, i32* %6
%48 = trunc i32 %47 to i8
%49 = call i32 (i8*, i8, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.2, i64 0, i64 0), i8 signext %48)
%50 = load i32*, i32** %2
%51 = load i32, i32* %6
%52 = call i32 @fprintf(i32* %50, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.3, i64 0, i64 0), i32 %51)
%53 = load i32*, i32** %2
%54 = call i32 @fflush(i32* %53)
br label %55
55: ; preds = %46
%56 = load i32, i32* %6
%57 = add nsw i32 %56, 1
store i32 %57, i32* %6
br label %43
58: ; preds = %43
store i32 0, i32* %7
br label %59
59: ; preds = %70, %58
%60 = load i32, i32* %7
%61 = icmp slt i32 %60, 10
br i1 %61, label %62, label %73
62: ; preds = %59
%63 = load i32*, i32** %2
%64 = call i32 @fileno(i32* %63)
%65 = call i32 @read(i32 %64, i8* %3, i32 1)
%66 = load i8, i8* %3
%67 = load i8, i8* %3
%68 = sext i8 %67 to i32
%69 = call i32 (i8*, i8, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.4, i64 0, i64 0), i8 signext %66, i32 %68)
br label %70
70: ; preds = %62
%71 = load i32, i32* %7
%72 = add nsw i32 %71, 1
store i32 %72, i32* %7
br label %59
73: ; preds = %59
%74 = load i32, i32* %1
ret i32 %74
}

LLVM IR (-O2):
@.str = [10 x i8] c"/dev/com1\00"
@.str.1 = [2 x i8] c" \00"
@.str.2 = [16 x i8] c"consloe out:%d\0A\00"
@.str.3 = [15 x i8] c"test puts %d\0D\0A\00"
@.str.4 = [16 x i8] c"read_com:%c,%d\0A\00"
@.str.5 = [10 x i8] c"/dev/com2\00"
define i32 @main() {
%1 = alloca i8
%2 = tail call i32* @fopen(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%3 = tail call i32 (i8*, i8, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.2, i64 0, i64 0), i8 signext 0)
%4 = tail call i32 @fprintf(i32* %2, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.3, i64 0, i64 0), i32 0)
%5 = tail call i32 @fflush(i32* %2)
%6 = tail call i32 (i8*, i8, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.2, i64 0, i64 0), i8 signext 1)
%7 = tail call i32 @fprintf(i32* %2, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.3, i64 0, i64 0), i32 1)
%8 = tail call i32 @fflush(i32* %2)
%9 = tail call i32 (i8*, i8, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.2, i64 0, i64 0), i8 signext 2)
%10 = tail call i32 @fprintf(i32* %2, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.3, i64 0, i64 0), i32 2)
%11 = tail call i32 @fflush(i32* %2)
%12 = tail call i32 (i8*, i8, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.2, i64 0, i64 0), i8 signext 3)
%13 = tail call i32 @fprintf(i32* %2, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.3, i64 0, i64 0), i32 3)
%14 = tail call i32 @fflush(i32* %2)
%15 = tail call i32 (i8*, i8, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.2, i64 0, i64 0), i8 signext 4)
%16 = tail call i32 @fprintf(i32* %2, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.3, i64 0, i64 0), i32 4)
%17 = tail call i32 @fflush(i32* %2)
%18 = tail call i32 (i8*, i8, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.2, i64 0, i64 0), i8 signext 5)
%19 = tail call i32 @fprintf(i32* %2, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.3, i64 0, i64 0), i32 5)
%20 = tail call i32 @fflush(i32* %2)
%21 = tail call i32 (i8*, i8, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.2, i64 0, i64 0), i8 signext 6)
%22 = tail call i32 @fprintf(i32* %2, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.3, i64 0, i64 0), i32 6)
%23 = tail call i32 @fflush(i32* %2)
%24 = tail call i32 (i8*, i8, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.2, i64 0, i64 0), i8 signext 7)
%25 = tail call i32 @fprintf(i32* %2, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.3, i64 0, i64 0), i32 7)
%26 = tail call i32 @fflush(i32* %2)
%27 = tail call i32 (i8*, i8, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.2, i64 0, i64 0), i8 signext 8)
%28 = tail call i32 @fprintf(i32* %2, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.3, i64 0, i64 0), i32 8)
%29 = tail call i32 @fflush(i32* %2)
%30 = tail call i32 (i8*, i8, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.2, i64 0, i64 0), i8 signext 9)
%31 = tail call i32 @fprintf(i32* %2, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.3, i64 0, i64 0), i32 9)
%32 = tail call i32 @fflush(i32* %2)
%33 = tail call i32 @fileno(i32* %2)
%34 = call i32 @read(i32 %33, i8* %1, i32 1)
%35 = load i8, i8* %1
%36 = sext i8 %35 to i32
%37 = tail call i32 (i8*, i8, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.4, i64 0, i64 0), i8 signext %35, i32 %36)
%38 = tail call i32 @fileno(i32* %2)
%39 = call i32 @read(i32 %38, i8* %1, i32 1)
%40 = load i8, i8* %1
%41 = sext i8 %40 to i32
%42 = tail call i32 (i8*, i8, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.4, i64 0, i64 0), i8 signext %40, i32 %41)
%43 = tail call i32 @fileno(i32* %2)
%44 = call i32 @read(i32 %43, i8* %1, i32 1)
%45 = load i8, i8* %1
%46 = sext i8 %45 to i32
%47 = tail call i32 (i8*, i8, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.4, i64 0, i64 0), i8 signext %45, i32 %46)
%48 = tail call i32 @fileno(i32* %2)
%49 = call i32 @read(i32 %48, i8* %1, i32 1)
%50 = load i8, i8* %1
%51 = sext i8 %50 to i32
%52 = tail call i32 (i8*, i8, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.4, i64 0, i64 0), i8 signext %50, i32 %51)
%53 = tail call i32 @fileno(i32* %2)
%54 = call i32 @read(i32 %53, i8* %1, i32 1)
%55 = load i8, i8* %1
%56 = sext i8 %55 to i32
%57 = tail call i32 (i8*, i8, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.4, i64 0, i64 0), i8 signext %55, i32 %56)
%58 = tail call i32 @fileno(i32* %2)
%59 = call i32 @read(i32 %58, i8* %1, i32 1)
%60 = load i8, i8* %1
%61 = sext i8 %60 to i32
%62 = tail call i32 (i8*, i8, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.4, i64 0, i64 0), i8 signext %60, i32 %61)
%63 = tail call i32 @fileno(i32* %2)
%64 = call i32 @read(i32 %63, i8* %1, i32 1)
%65 = load i8, i8* %1
%66 = sext i8 %65 to i32
%67 = tail call i32 (i8*, i8, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.4, i64 0, i64 0), i8 signext %65, i32 %66)
%68 = tail call i32 @fileno(i32* %2)
%69 = call i32 @read(i32 %68, i8* %1, i32 1)
%70 = load i8, i8* %1
%71 = sext i8 %70 to i32
%72 = tail call i32 (i8*, i8, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.4, i64 0, i64 0), i8 signext %70, i32 %71)
%73 = tail call i32 @fileno(i32* %2)
%74 = call i32 @read(i32 %73, i8* %1, i32 1)
%75 = load i8, i8* %1
%76 = sext i8 %75 to i32
%77 = tail call i32 (i8*, i8, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.4, i64 0, i64 0), i8 signext %75, i32 %76)
%78 = tail call i32 @fileno(i32* %2)
%79 = call i32 @read(i32 %78, i8* %1, i32 1)
%80 = load i8, i8* %1
%81 = sext i8 %80 to i32
%82 = tail call i32 (i8*, i8, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.4, i64 0, i64 0), i8 signext %80, i32 %81)
%83 = tail call i32 @fclose(i32* %2)
%84 = tail call i32* @fopen(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%85 = tail call i32 (i8*, i8, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.2, i64 0, i64 0), i8 signext 0)
%86 = tail call i32 @fprintf(i32* %84, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.3, i64 0, i64 0), i32 0)
%87 = tail call i32 @fflush(i32* %84)
%88 = tail call i32 (i8*, i8, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.2, i64 0, i64 0), i8 signext 1)
%89 = tail call i32 @fprintf(i32* %84, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.3, i64 0, i64 0), i32 1)
%90 = tail call i32 @fflush(i32* %84)
%91 = tail call i32 (i8*, i8, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.2, i64 0, i64 0), i8 signext 2)
%92 = tail call i32 @fprintf(i32* %84, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.3, i64 0, i64 0), i32 2)
%93 = tail call i32 @fflush(i32* %84)
%94 = tail call i32 (i8*, i8, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.2, i64 0, i64 0), i8 signext 3)
%95 = tail call i32 @fprintf(i32* %84, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.3, i64 0, i64 0), i32 3)
%96 = tail call i32 @fflush(i32* %84)
%97 = tail call i32 (i8*, i8, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.2, i64 0, i64 0), i8 signext 4)
%98 = tail call i32 @fprintf(i32* %84, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.3, i64 0, i64 0), i32 4)
%99 = tail call i32 @fflush(i32* %84)
%100 = tail call i32 (i8*, i8, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.2, i64 0, i64 0), i8 signext 5)
%101 = tail call i32 @fprintf(i32* %84, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.3, i64 0, i64 0), i32 5)
%102 = tail call i32 @fflush(i32* %84)
%103 = tail call i32 (i8*, i8, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.2, i64 0, i64 0), i8 signext 6)
%104 = tail call i32 @fprintf(i32* %84, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.3, i64 0, i64 0), i32 6)
%105 = tail call i32 @fflush(i32* %84)
%106 = tail call i32 (i8*, i8, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.2, i64 0, i64 0), i8 signext 7)
%107 = tail call i32 @fprintf(i32* %84, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.3, i64 0, i64 0), i32 7)
%108 = tail call i32 @fflush(i32* %84)
%109 = tail call i32 (i8*, i8, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.2, i64 0, i64 0), i8 signext 8)
%110 = tail call i32 @fprintf(i32* %84, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.3, i64 0, i64 0), i32 8)
%111 = tail call i32 @fflush(i32* %84)
%112 = tail call i32 (i8*, i8, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.2, i64 0, i64 0), i8 signext 9)
%113 = tail call i32 @fprintf(i32* %84, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.3, i64 0, i64 0), i32 9)
%114 = tail call i32 @fflush(i32* %84)
%115 = tail call i32 @fileno(i32* %84)
%116 = call i32 @read(i32 %115, i8* %1, i32 1)
%117 = load i8, i8* %1
%118 = sext i8 %117 to i32
%119 = tail call i32 (i8*, i8, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.4, i64 0, i64 0), i8 signext %117, i32 %118)
%120 = tail call i32 @fileno(i32* %84)
%121 = call i32 @read(i32 %120, i8* %1, i32 1)
%122 = load i8, i8* %1
%123 = sext i8 %122 to i32
%124 = tail call i32 (i8*, i8, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.4, i64 0, i64 0), i8 signext %122, i32 %123)
%125 = tail call i32 @fileno(i32* %84)
%126 = call i32 @read(i32 %125, i8* %1, i32 1)
%127 = load i8, i8* %1
%128 = sext i8 %127 to i32
%129 = tail call i32 (i8*, i8, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.4, i64 0, i64 0), i8 signext %127, i32 %128)
%130 = tail call i32 @fileno(i32* %84)
%131 = call i32 @read(i32 %130, i8* %1, i32 1)
%132 = load i8, i8* %1
%133 = sext i8 %132 to i32
%134 = tail call i32 (i8*, i8, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.4, i64 0, i64 0), i8 signext %132, i32 %133)
%135 = tail call i32 @fileno(i32* %84)
%136 = call i32 @read(i32 %135, i8* %1, i32 1)
%137 = load i8, i8* %1
%138 = sext i8 %137 to i32
%139 = tail call i32 (i8*, i8, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.4, i64 0, i64 0), i8 signext %137, i32 %138)
%140 = tail call i32 @fileno(i32* %84)
%141 = call i32 @read(i32 %140, i8* %1, i32 1)
%142 = load i8, i8* %1
%143 = sext i8 %142 to i32
%144 = tail call i32 (i8*, i8, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.4, i64 0, i64 0), i8 signext %142, i32 %143)
%145 = tail call i32 @fileno(i32* %84)
%146 = call i32 @read(i32 %145, i8* %1, i32 1)
%147 = load i8, i8* %1
%148 = sext i8 %147 to i32
%149 = tail call i32 (i8*, i8, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.4, i64 0, i64 0), i8 signext %147, i32 %148)
%150 = tail call i32 @fileno(i32* %84)
%151 = call i32 @read(i32 %150, i8* %1, i32 1)
%152 = load i8, i8* %1
%153 = sext i8 %152 to i32
%154 = tail call i32 (i8*, i8, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.4, i64 0, i64 0), i8 signext %152, i32 %153)
%155 = tail call i32 @fileno(i32* %84)
%156 = call i32 @read(i32 %155, i8* %1, i32 1)
%157 = load i8, i8* %1
%158 = sext i8 %157 to i32
%159 = tail call i32 (i8*, i8, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.4, i64 0, i64 0), i8 signext %157, i32 %158)
%160 = tail call i32 @fileno(i32* %84)
%161 = call i32 @read(i32 %160, i8* %1, i32 1)
%162 = load i8, i8* %1
%163 = sext i8 %162 to i32
%164 = tail call i32 (i8*, i8, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.4, i64 0, i64 0), i8 signext %162, i32 %163)
ret i32 0
}