#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 */
char EOF;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
char fgetc(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ putc(char, int /*<<< orphan*/ *);
int /*<<< orphan*/ putchar(char);
int main() {
  FILE *fp;
  int i, j, n, i1;
  char c[20], t, ch;
  if ((fp = fopen("mergeA", "r")) == NULL) {
    printf("error!\n");
    exit(0);
  }
  printf("file A :\n");
  for (i = 0; (ch = fgetc(fp)) != EOF; i++) {
    c[i] = ch;
    putchar(c[i]);
  }
  fclose(fp);
  if ((fp = fopen("mergeB", "r")) == NULL) {
    printf("error!\n");
    exit(0);
  }
  printf("B:\n");
  for (i = 0; (ch = fgetc(fp)) != EOF; i++) {
    c[i] = ch;
    putchar(c[i]);
  }
  fclose(fp);
  n = i;
  for (i = 0; i < n; i++)
    for (j = i + 1; j < n; j++)
      if (c[i] > c[j]) {
        t = c[i];
        c[i] = c[j];
        c[j] = t;
      }
  printf("\nfile C :\n");
  fp = fopen("MergeC", "w");
  for (i = 0; i < n; i++) {
    putc(c[i], fp);
    putchar(c[i]);
  }
  printf("\n");
  fclose(fp);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xe7a(%rip),%rdi
lea    0xe7a(%rip),%rsi
call   1080 <fopen@plt>
mov    %rax,-0x10(%rbp)
cmp    $0x0,%rax
jne    11b3 <main+0x43>
lea    0xe62(%rip),%rdi
call   1050 <printf@plt>
xor    %edi,%edi
call   1090 <exit@plt>
lea    0xe57(%rip),%rdi
call   1050 <printf@plt>
movl   $0x0,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
call   1060 <fgetc@plt>
mov    %al,-0x42(%rbp)
movsbl %al,%eax
mov    0x2e0c(%rip),%rcx
movsbl (%rcx),%ecx
cmp    %ecx,%eax
je     120e <main+0x9e>
mov    -0x42(%rbp),%cl
movslq -0x14(%rbp),%rax
mov    %cl,-0x40(%rbp,%rax,1)
movslq -0x14(%rbp),%rax
movsbl -0x40(%rbp,%rax,1),%edi
call   1030 <putchar@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    11c6 <main+0x56>
mov    -0x10(%rbp),%rdi
call   1040 <fclose@plt>
lea    0xdfd(%rip),%rdi
lea    0xde2(%rip),%rsi
call   1080 <fopen@plt>
mov    %rax,-0x10(%rbp)
cmp    $0x0,%rax
jne    124b <main+0xdb>
lea    0xdca(%rip),%rdi
call   1050 <printf@plt>
xor    %edi,%edi
call   1090 <exit@plt>
lea    0xdd0(%rip),%rdi
call   1050 <printf@plt>
movl   $0x0,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
call   1060 <fgetc@plt>
mov    %al,-0x42(%rbp)
movsbl %al,%eax
mov    0x2d74(%rip),%rcx
movsbl (%rcx),%ecx
cmp    %ecx,%eax
je     12a6 <main+0x136>
mov    -0x42(%rbp),%cl
movslq -0x14(%rbp),%rax
mov    %cl,-0x40(%rbp,%rax,1)
movslq -0x14(%rbp),%rax
movsbl -0x40(%rbp,%rax,1),%edi
call   1030 <putchar@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    125e <main+0xee>
mov    -0x10(%rbp),%rdi
call   1040 <fclose@plt>
mov    -0x14(%rbp),%eax
mov    %eax,-0x1c(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jge    1343 <main+0x1d3>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jge    1330 <main+0x1c0>
movslq -0x14(%rbp),%rax
movsbl -0x40(%rbp,%rax,1),%eax
movslq -0x18(%rbp),%rcx
movsbl -0x40(%rbp,%rcx,1),%ecx
cmp    %ecx,%eax
jle    131d <main+0x1ad>
movslq -0x14(%rbp),%rax
mov    -0x40(%rbp,%rax,1),%al
mov    %al,-0x41(%rbp)
movslq -0x18(%rbp),%rax
mov    -0x40(%rbp,%rax,1),%cl
movslq -0x14(%rbp),%rax
mov    %cl,-0x40(%rbp,%rax,1)
mov    -0x41(%rbp),%cl
movslq -0x18(%rbp),%rax
mov    %cl,-0x40(%rbp,%rax,1)
jmp    1322 <main+0x1b2>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    12d1 <main+0x161>
jmp    1335 <main+0x1c5>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    12bc <main+0x14c>
lea    0xcdc(%rip),%rdi
call   1050 <printf@plt>
lea    0xcdb(%rip),%rdi
lea    0xcdb(%rip),%rsi
call   1080 <fopen@plt>
mov    %rax,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jge    13a9 <main+0x239>
movslq -0x14(%rbp),%rax
mov    -0x40(%rbp,%rax,1),%al
mov    -0x10(%rbp),%rsi
movsbl %al,%edi
call   1070 <putc@plt>
movslq -0x14(%rbp),%rax
movsbl -0x40(%rbp,%rax,1),%edi
call   1030 <putchar@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    136d <main+0x1fd>
lea    0xc5f(%rip),%rdi
call   1050 <printf@plt>
mov    -0x10(%rbp),%rdi
call   1040 <fclose@plt>
xor    %eax,%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x20,%rsp
lea    0xe7d(%rip),%rdi
lea    0xe7d(%rip),%rsi
call   1080 <fopen@plt>
test   %rax,%rax
je     133f <main+0x1cf>
mov    %rax,%rbx
lea    0xe77(%rip),%rdi
call   1040 <puts@plt>
mov    %rbx,%rdi
call   1060 <fgetc@plt>
mov    0x2e32(%rip),%r14
cmp    (%r14),%al
je     11dc <main+0x6c>
mov    %rsp,%rbp
xchg   %ax,%ax
mov    %al,0x0(%rbp)
movsbl %al,%edi
call   1030 <putchar@plt>
mov    %rbx,%rdi
call   1060 <fgetc@plt>
add    $0x1,%rbp
cmp    (%r14),%al
jne    11c0 <main+0x50>
mov    %rbx,%rdi
call   1050 <fclose@plt>
lea    0xe1e(%rip),%rdi
lea    0xe15(%rip),%rsi
call   1080 <fopen@plt>
test   %rax,%rax
je     133f <main+0x1cf>
mov    %rax,%rbx
lea    0xe18(%rip),%rdi
call   1040 <puts@plt>
mov    %rbx,%rdi
call   1060 <fgetc@plt>
cmp    (%r14),%al
jne    122f <main+0xbf>
mov    %rbx,%rdi
call   1050 <fclose@plt>
mov    $0x1,%r14b
xor    %r15d,%r15d
jmp    12c8 <main+0x158>
xor    %ebp,%ebp
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    %al,(%rsp,%rbp,1)
movsbl %al,%edi
call   1030 <putchar@plt>
add    $0x1,%rbp
mov    %rbx,%rdi
call   1060 <fgetc@plt>
cmp    (%r14),%al
jne    1240 <main+0xd0>
mov    %rbx,%rdi
call   1050 <fclose@plt>
test   %ebp,%ebp
sete   %r14b
je     12c2 <main+0x152>
mov    %ebp,%r8d
lea    0x1(%rsp),%rcx
lea    -0x1(%r8),%rsi
xor    %r9d,%r9d
jmp    128d <main+0x11d>
nopl   (%rax)
add    $0x1,%rcx
add    $0xffffffffffffffff,%rsi
cmp    %r8,%r9
je     12bd <main+0x14d>
mov    %r9,%rdi
add    $0x1,%r9
cmp    %r8,%r9
jae    1280 <main+0x110>
xor    %ebx,%ebx
jmp    12a9 <main+0x139>
nopl   (%rax)
add    $0x1,%rbx
cmp    %rbx,%rsi
je     1280 <main+0x110>
movzbl (%rsp,%rdi,1),%eax
movzbl (%rcx,%rbx,1),%edx
cmp    %dl,%al
jle    12a0 <main+0x130>
mov    %dl,(%rsp,%rdi,1)
mov    %al,(%rcx,%rbx,1)
jmp    12a0 <main+0x130>
mov    %ebp,%r15d
jmp    12c8 <main+0x158>
xor    %r15d,%r15d
mov    $0x1,%r14b
lea    0xd56(%rip),%rdi
call   1040 <puts@plt>
lea    0xd35(%rip),%rdi
lea    0xd35(%rip),%rsi
call   1080 <fopen@plt>
mov    %rax,%r12
test   %r14b,%r14b
jne    131e <main+0x1ae>
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
movsbl (%rsp,%rbx,1),%ebp
mov    %ebp,%edi
mov    %r12,%rsi
call   1070 <putc@plt>
mov    %ebp,%edi
call   1030 <putchar@plt>
add    $0x1,%rbx
cmp    %rbx,%r15
jne    1300 <main+0x190>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    %r12,%rdi
call   1050 <fclose@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret
lea    0xce9(%rip),%rdi
call   1040 <puts@plt>
xor    %edi,%edi
call   1090 <exit@plt>

LLVM IR (-O0):
@.str = [7 x i8] c"mergeA\00"
@.str.1 = [2 x i8] c"r\00"
@.str.2 = [8 x i8] c"error!\0A\00"
@.str.3 = [10 x i8] c"file A :\0A\00"
@EOF = global i8 0
@.str.4 = [7 x i8] c"mergeB\00"
@.str.5 = [4 x i8] c"B:\0A\00"
@.str.6 = [11 x i8] c"\0Afile C :\0A\00"
@.str.7 = [7 x i8] c"MergeC\00"
@.str.8 = [2 x i8] c"w\00"
@.str.9 = [2 x i8] c"\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32*
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca [20 x i8]
%8 = alloca i8
%9 = alloca i8
store i32 0, i32* %1
%10 = call i32* @fopen(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
store i32* %10, i32** %2
%11 = icmp eq i32* %10, null
br i1 %11, label %12, label %15
12: ; preds = %0
%13 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0))
%14 = call i32 @exit(i32 0)
unreachable
15: ; preds = %0
%16 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.3, i64 0, i64 0))
store i32 0, i32* %3
br label %17
17: ; preds = %34, %15
%18 = load i32*, i32** %2
%19 = call signext i8 @fgetc(i32* %18)
store i8 %19, i8* %9
%20 = sext i8 %19 to i32
%21 = load i8, i8* @EOF
%22 = sext i8 %21 to i32
%23 = icmp ne i32 %20, %22
br i1 %23, label %24, label %37
24: ; preds = %17
%25 = load i8, i8* %9
%26 = load i32, i32* %3
%27 = sext i32 %26 to i64
%28 = getelementptr inbounds [20 x i8], [20 x i8]* %7, i64 0, i64 %27
store i8 %25, i8* %28
%29 = load i32, i32* %3
%30 = sext i32 %29 to i64
%31 = getelementptr inbounds [20 x i8], [20 x i8]* %7, i64 0, i64 %30
%32 = load i8, i8* %31
%33 = call i32 @putchar(i8 signext %32)
br label %34
34: ; preds = %24
%35 = load i32, i32* %3
%36 = add nsw i32 %35, 1
store i32 %36, i32* %3
br label %17
37: ; preds = %17
%38 = load i32*, i32** %2
%39 = call i32 @fclose(i32* %38)
%40 = call i32* @fopen(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
store i32* %40, i32** %2
%41 = icmp eq i32* %40, null
br i1 %41, label %42, label %45
42: ; preds = %37
%43 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0))
%44 = call i32 @exit(i32 0)
unreachable
45: ; preds = %37
%46 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0))
store i32 0, i32* %3
br label %47
47: ; preds = %64, %45
%48 = load i32*, i32** %2
%49 = call signext i8 @fgetc(i32* %48)
store i8 %49, i8* %9
%50 = sext i8 %49 to i32
%51 = load i8, i8* @EOF
%52 = sext i8 %51 to i32
%53 = icmp ne i32 %50, %52
br i1 %53, label %54, label %67
54: ; preds = %47
%55 = load i8, i8* %9
%56 = load i32, i32* %3
%57 = sext i32 %56 to i64
%58 = getelementptr inbounds [20 x i8], [20 x i8]* %7, i64 0, i64 %57
store i8 %55, i8* %58
%59 = load i32, i32* %3
%60 = sext i32 %59 to i64
%61 = getelementptr inbounds [20 x i8], [20 x i8]* %7, i64 0, i64 %60
%62 = load i8, i8* %61
%63 = call i32 @putchar(i8 signext %62)
br label %64
64: ; preds = %54
%65 = load i32, i32* %3
%66 = add nsw i32 %65, 1
store i32 %66, i32* %3
br label %47
67: ; preds = %47
%68 = load i32*, i32** %2
%69 = call i32 @fclose(i32* %68)
%70 = load i32, i32* %3
store i32 %70, i32* %5
store i32 0, i32* %3
br label %71
71: ; preds = %115, %67
%72 = load i32, i32* %3
%73 = load i32, i32* %5
%74 = icmp slt i32 %72, %73
br i1 %74, label %75, label %118
75: ; preds = %71
%76 = load i32, i32* %3
%77 = add nsw i32 %76, 1
store i32 %77, i32* %4
br label %78
78: ; preds = %111, %75
%79 = load i32, i32* %4
%80 = load i32, i32* %5
%81 = icmp slt i32 %79, %80
br i1 %81, label %82, label %114
82: ; preds = %78
%83 = load i32, i32* %3
%84 = sext i32 %83 to i64
%85 = getelementptr inbounds [20 x i8], [20 x i8]* %7, i64 0, i64 %84
%86 = load i8, i8* %85
%87 = sext i8 %86 to i32
%88 = load i32, i32* %4
%89 = sext i32 %88 to i64
%90 = getelementptr inbounds [20 x i8], [20 x i8]* %7, i64 0, i64 %89
%91 = load i8, i8* %90
%92 = sext i8 %91 to i32
%93 = icmp sgt i32 %87, %92
br i1 %93, label %94, label %110
94: ; preds = %82
%95 = load i32, i32* %3
%96 = sext i32 %95 to i64
%97 = getelementptr inbounds [20 x i8], [20 x i8]* %7, i64 0, i64 %96
%98 = load i8, i8* %97
store i8 %98, i8* %8
%99 = load i32, i32* %4
%100 = sext i32 %99 to i64
%101 = getelementptr inbounds [20 x i8], [20 x i8]* %7, i64 0, i64 %100
%102 = load i8, i8* %101
%103 = load i32, i32* %3
%104 = sext i32 %103 to i64
%105 = getelementptr inbounds [20 x i8], [20 x i8]* %7, i64 0, i64 %104
store i8 %102, i8* %105
%106 = load i8, i8* %8
%107 = load i32, i32* %4
%108 = sext i32 %107 to i64
%109 = getelementptr inbounds [20 x i8], [20 x i8]* %7, i64 0, i64 %108
store i8 %106, i8* %109
br label %110
110: ; preds = %94, %82
br label %111
111: ; preds = %110
%112 = load i32, i32* %4
%113 = add nsw i32 %112, 1
store i32 %113, i32* %4
br label %78
114: ; preds = %78
br label %115
115: ; preds = %114
%116 = load i32, i32* %3
%117 = add nsw i32 %116, 1
store i32 %117, i32* %3
br label %71
118: ; preds = %71
%119 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.6, i64 0, i64 0))
%120 = call i32* @fopen(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.7, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.8, i64 0, i64 0))
store i32* %120, i32** %2
store i32 0, i32* %3
br label %121
121: ; preds = %137, %118
%122 = load i32, i32* %3
%123 = load i32, i32* %5
%124 = icmp slt i32 %122, %123
br i1 %124, label %125, label %140
125: ; preds = %121
%126 = load i32, i32* %3
%127 = sext i32 %126 to i64
%128 = getelementptr inbounds [20 x i8], [20 x i8]* %7, i64 0, i64 %127
%129 = load i8, i8* %128
%130 = load i32*, i32** %2
%131 = call i32 @putc(i8 signext %129, i32* %130)
%132 = load i32, i32* %3
%133 = sext i32 %132 to i64
%134 = getelementptr inbounds [20 x i8], [20 x i8]* %7, i64 0, i64 %133
%135 = load i8, i8* %134
%136 = call i32 @putchar(i8 signext %135)
br label %137
137: ; preds = %125
%138 = load i32, i32* %3
%139 = add nsw i32 %138, 1
store i32 %139, i32* %3
br label %121
140: ; preds = %121
%141 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.9, i64 0, i64 0))
%142 = load i32*, i32** %2
%143 = call i32 @fclose(i32* %142)
ret i32 0
}

LLVM IR (-O2):
@.str = [7 x i8] c"mergeA\00"
@.str.1 = [2 x i8] c"r\00"
@EOF = global i8 0
@.str.4 = [7 x i8] c"mergeB\00"
@.str.7 = [7 x i8] c"MergeC\00"
@.str.8 = [2 x i8] c"w\00"
@str = [9 x i8] c"file A :\00"
@str.10 = [3 x i8] c"B:\00"
@str.11 = [10 x i8] c"\0Afile C :\00"
@str.13 = [7 x i8] c"error!\00"
define i32 @main() {
%1 = alloca [20 x i8]
%2 = getelementptr inbounds [20 x i8], [20 x i8]* %1, i64 0, i64 0
%3 = tail call i32* @fopen(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%4 = icmp eq i32* %3, null
br i1 %4, label %5, label %8
5: ; preds = %0
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @str.13, i64 0, i64 0))
%7 = tail call i32 @exit(i32 0)
unreachable
8: ; preds = %0
%9 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @str, i64 0, i64 0))
%10 = tail call signext i8 @fgetc(i32* %3)
%11 = load i8, i8* @EOF
%12 = icmp eq i8 %10, %11
br i1 %12, label %22, label %13
13: ; preds = %8, %13
%14 = phi i64 [ %18, %13 ], [ 0, %8 ]
%15 = phi i8 [ %19, %13 ], [ %10, %8 ]
%16 = getelementptr inbounds [20 x i8], [20 x i8]* %1, i64 0, i64 %14
store i8 %15, i8* %16
%17 = tail call i32 @putchar(i8 signext %15)
%18 = add nuw i64 %14, 1
%19 = tail call signext i8 @fgetc(i32* %3)
%20 = load i8, i8* @EOF
%21 = icmp eq i8 %19, %20
br i1 %21, label %22, label %13
22: ; preds = %13, %8
%23 = tail call i32 @fclose(i32* %3)
%24 = tail call i32* @fopen(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%25 = icmp eq i32* %24, null
br i1 %25, label %26, label %29
26: ; preds = %22
%27 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @str.13, i64 0, i64 0))
%28 = tail call i32 @exit(i32 0)
unreachable
29: ; preds = %22
%30 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @str.10, i64 0, i64 0))
%31 = tail call signext i8 @fgetc(i32* %24)
%32 = load i8, i8* @EOF
%33 = icmp eq i8 %31, %32
br i1 %33, label %34, label %36
34: ; preds = %29
%35 = tail call i32 @fclose(i32* %24)
br label %73
36: ; preds = %29, %36
%37 = phi i64 [ %41, %36 ], [ 0, %29 ]
%38 = phi i8 [ %42, %36 ], [ %31, %29 ]
%39 = getelementptr inbounds [20 x i8], [20 x i8]* %1, i64 0, i64 %37
store i8 %38, i8* %39
%40 = tail call i32 @putchar(i8 signext %38)
%41 = add nuw i64 %37, 1
%42 = tail call signext i8 @fgetc(i32* %24)
%43 = load i8, i8* @EOF
%44 = icmp eq i8 %42, %43
br i1 %44, label %45, label %36
45: ; preds = %36
%46 = trunc i64 %41 to i32
%47 = tail call i32 @fclose(i32* %24)
%48 = icmp eq i32 %46, 0
br i1 %48, label %73, label %49
49: ; preds = %45
%50 = and i64 %41, 4294967295
br label %54
51: ; preds = %68, %54
%52 = add nuw nsw i64 %56, 1
%53 = icmp eq i64 %57, %50
br i1 %53, label %71, label %54
54: ; preds = %49, %51
%55 = phi i64 [ 0, %49 ], [ %57, %51 ]
%56 = phi i64 [ 1, %49 ], [ %52, %51 ]
%57 = add nuw nsw i64 %55, 1
%58 = icmp ult i64 %57, %50
br i1 %58, label %59, label %51
59: ; preds = %54
%60 = getelementptr inbounds [20 x i8], [20 x i8]* %1, i64 0, i64 %55
br label %61
61: ; preds = %59, %68
%62 = phi i64 [ %56, %59 ], [ %69, %68 ]
%63 = load i8, i8* %60
%64 = getelementptr inbounds [20 x i8], [20 x i8]* %1, i64 0, i64 %62
%65 = load i8, i8* %64
%66 = icmp sgt i8 %63, %65
br i1 %66, label %67, label %68
67: ; preds = %61
store i8 %65, i8* %60
store i8 %63, i8* %64
br label %68
68: ; preds = %61, %67
%69 = add nuw nsw i64 %62, 1
%70 = icmp eq i64 %69, %50
br i1 %70, label %51, label %61
71: ; preds = %51
%72 = and i64 %41, 4294967295
br label %73
73: ; preds = %71, %34, %45
%74 = phi i1 [ true, %34 ], [ true, %45 ], [ %48, %71 ]
%75 = phi i64 [ 0, %34 ], [ 0, %45 ], [ %72, %71 ]
%76 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @str.11, i64 0, i64 0))
%77 = tail call i32* @fopen(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.7, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.8, i64 0, i64 0))
br i1 %74, label %86, label %78
78: ; preds = %73, %78
%79 = phi i64 [ %84, %78 ], [ 0, %73 ]
%80 = getelementptr inbounds [20 x i8], [20 x i8]* %1, i64 0, i64 %79
%81 = load i8, i8* %80
%82 = tail call i32 @putc(i8 signext %81, i32* %77)
%83 = tail call i32 @putchar(i8 signext %81)
%84 = add nuw nsw i64 %79, 1
%85 = icmp eq i64 %84, %75
br i1 %85, label %86, label %78
86: ; preds = %78, %73
%87 = tail call i32 bitcast (i32 (i8)* @putchar to i32 (i32)*)(i32 10)
%88 = tail call i32 @fclose(i32* %77)
ret i32 0
}