#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*/ buf;
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int BUFSIZ;
int /*<<< orphan*/ clear_buf(char *);
int /*<<< orphan*/ clear_buf_t(char *, int);
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
scalar_t__ fgets(char *, int, int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, char *);
int /*<<< orphan*/ strcat(char *, char *);
int /*<<< orphan*/ strcpy(char *, char *);
int strlen(char *);
int concat_with_numbers(char input_file[], char output_file[]) {
  char buf[100];
  char combined[BUFSIZ];
  char words[BUFSIZ][100];
  FILE *fp_in;
  FILE *fp_out;
  int i = 0;
  int j = 0;
  int k = 0;
  int last = 0;
  int index = 0;
  clear_buf_t(buf, 100);
  for (i = 0; i < BUFSIZ; i++)
    words[i][0] = 0;
  fp_in = fopen(input_file, "r");
  fp_out = fopen(output_file, "w+");
  while (fgets(buf, sizeof(buf), fp_in)) {
    strcpy(words[index], buf);
    index++;
    clear_buf_t(buf, 100);
  }
  for (i = 0; words[i][0] != 0 && i < BUFSIZ; i++) {
    for (j = 0; words[j][0] != 0 && j < BUFSIZ; j++) {
      for (k = 0; k < 10; k++) {
        strcpy(combined, words[i]);
        last = strlen(combined);
        combined[last - 1] = k + 48;
        strcat(combined, words[j]);
        fprintf(fp_out, "%s", combined);
      }
      clear_buf(combined);
    }
    clear_buf(combined);
  }
  fclose(fp_in);
  fclose(fp_out);
  return 0;
}


x86 assembly (clang, -O0):
<concat_with_numbers>:
push   %rbp
mov    %rsp,%rbp
sub    $0xe0,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2e36(%rip),%rax
mov    (%rax),%ecx
mov    %rsp,%rdx
mov    %rdx,-0x88(%rbp)
mov    %rcx,%rsi
add    $0xf,%rsi
and    $0xfffffffffffffff0,%rsi
mov    %rsp,%rdx
sub    %rsi,%rdx
mov    %rdx,-0xd0(%rbp)
mov    %rdx,%rsp
mov    %rcx,-0x90(%rbp)
mov    (%rax),%eax
imul   $0x64,%rax,%rdx
add    $0xf,%rdx
and    $0xfffffffffffffff0,%rdx
mov    %rsp,%rcx
sub    %rdx,%rcx
mov    %rcx,-0xc8(%rbp)
mov    %rcx,%rsp
mov    %rax,-0x98(%rbp)
movl   $0x0,-0xac(%rbp)
movl   $0x0,-0xb0(%rbp)
movl   $0x0,-0xb4(%rbp)
movl   $0x0,-0xb8(%rbp)
movl   $0x0,-0xbc(%rbp)
lea    -0x80(%rbp),%rdi
mov    $0x64,%esi
call   1030 <clear_buf_t@plt>
movl   $0x0,-0xac(%rbp)
mov    -0xac(%rbp),%eax
mov    0x2d8c(%rip),%rcx
cmp    (%rcx),%eax
jge    1288 <concat_with_numbers+0xf8>
mov    -0xc8(%rbp),%rax
movslq -0xac(%rbp),%rcx
imul   $0x64,%rcx,%rcx
add    %rcx,%rax
movb   $0x0,(%rax)
mov    -0xac(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xac(%rbp)
jmp    1247 <concat_with_numbers+0xb7>
mov    -0x8(%rbp),%rdi
lea    0xd6d(%rip),%rsi
call   1090 <fopen@plt>
mov    %rax,-0xa0(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xd58(%rip),%rsi
call   1090 <fopen@plt>
mov    %rax,-0xa8(%rbp)
lea    -0x80(%rbp),%rdi
mov    -0xa0(%rbp),%rdx
mov    $0x64,%esi
call   1070 <fgets@plt>
cmp    $0x0,%rax
je     1315 <concat_with_numbers+0x185>
mov    -0xc8(%rbp),%rdi
movslq -0xbc(%rbp),%rax
imul   $0x64,%rax,%rax
add    %rax,%rdi
lea    -0x80(%rbp),%rsi
call   1040 <strcpy@plt>
mov    -0xbc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xbc(%rbp)
lea    -0x80(%rbp),%rdi
mov    $0x64,%esi
call   1030 <clear_buf_t@plt>
jmp    12b6 <concat_with_numbers+0x126>
movl   $0x0,-0xac(%rbp)
mov    -0xc8(%rbp),%rax
movslq -0xac(%rbp),%rcx
imul   $0x64,%rcx,%rcx
add    %rcx,%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0xd1(%rbp)
je     1360 <concat_with_numbers+0x1d0>
mov    -0xac(%rbp),%eax
mov    0x2c8b(%rip),%rcx
cmp    (%rcx),%eax
setl   %al
mov    %al,-0xd1(%rbp)
mov    -0xd1(%rbp),%al
test   $0x1,%al
jne    1373 <concat_with_numbers+0x1e3>
jmp    14c3 <concat_with_numbers+0x333>
movl   $0x0,-0xb0(%rbp)
mov    -0xc8(%rbp),%rax
movslq -0xb0(%rbp),%rcx
imul   $0x64,%rcx,%rcx
add    %rcx,%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0xd2(%rbp)
je     13be <concat_with_numbers+0x22e>
mov    -0xb0(%rbp),%eax
mov    0x2c2d(%rip),%rcx
cmp    (%rcx),%eax
setl   %al
mov    %al,-0xd2(%rbp)
mov    -0xd2(%rbp),%al
test   $0x1,%al
jne    13d1 <concat_with_numbers+0x241>
jmp    14a3 <concat_with_numbers+0x313>
movl   $0x0,-0xb4(%rbp)
cmpl   $0xa,-0xb4(%rbp)
jge    1483 <concat_with_numbers+0x2f3>
mov    -0xd0(%rbp),%rdi
mov    -0xc8(%rbp),%rsi
movslq -0xac(%rbp),%rax
imul   $0x64,%rax,%rax
add    %rax,%rsi
call   1040 <strcpy@plt>
mov    -0xd0(%rbp),%rdi
call   1060 <strlen@plt>
mov    -0xc8(%rbp),%rsi
mov    -0xd0(%rbp),%rdi
mov    %eax,-0xb8(%rbp)
mov    -0xb4(%rbp),%eax
add    $0x30,%eax
mov    %al,%cl
mov    -0xb8(%rbp),%eax
sub    $0x1,%eax
cltq
mov    %cl,(%rdi,%rax,1)
movslq -0xb0(%rbp),%rax
imul   $0x64,%rax,%rax
add    %rax,%rsi
call   10a0 <strcat@plt>
mov    -0xd0(%rbp),%rdx
mov    -0xa8(%rbp),%rdi
lea    0xb9b(%rip),%rsi
call   1080 <fprintf@plt>
mov    -0xb4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xb4(%rbp)
jmp    13db <concat_with_numbers+0x24b>
mov    -0xd0(%rbp),%rdi
call   10b0 <clear_buf@plt>
mov    -0xb0(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xb0(%rbp)
jmp    137d <concat_with_numbers+0x1ed>
mov    -0xd0(%rbp),%rdi
call   10b0 <clear_buf@plt>
mov    -0xac(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xac(%rbp)
jmp    131f <concat_with_numbers+0x18f>
mov    -0xa0(%rbp),%rdi
call   1050 <fclose@plt>
mov    -0xa8(%rbp),%rdi
call   1050 <fclose@plt>
mov    -0x88(%rbp),%rax
mov    %rax,%rsp
xor    %eax,%eax
mov    %rbp,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<concat_with_numbers>:
push   %rbp
mov    %rsp,%rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x98,%rsp
mov    %rsi,%r15
mov    %rdi,%r12
mov    %rsp,-0x48(%rbp)
mov    0x2e2b(%rip),%r14
mov    (%r14),%eax
mov    %rsp,%rbx
add    $0xf,%rax
and    $0xfffffffffffffff0,%rax
sub    %rax,%rbx
mov    %rbx,%rsp
mov    (%r14),%eax
mov    %rsp,%rcx
imul   $0x64,%rax,%rax
add    $0xf,%rax
and    $0xfffffffffffffff0,%rax
sub    %rax,%rcx
mov    %rcx,-0x30(%rbp)
mov    %rcx,%rsp
lea    -0xc0(%rbp),%rdi
mov    $0x64,%esi
call   1030 <clear_buf_t@plt>
mov    (%r14),%ecx
test   %ecx,%ecx
jle    126d <concat_with_numbers+0xdd>
lea    -0x1(%rcx),%rdx
mov    %ecx,%eax
and    $0x3,%eax
cmp    $0x3,%rdx
jae    1210 <concat_with_numbers+0x80>
xor    %edx,%edx
jmp    1245 <concat_with_numbers+0xb5>
and    $0xfffffffc,%ecx
xor    %edx,%edx
mov    -0x30(%rbp),%rsi
nopl   0x0(%rax)
movb   $0x0,(%rsi)
movb   $0x0,0x64(%rsi)
movb   $0x0,0xc8(%rsi)
movb   $0x0,0x12c(%rsi)
add    $0x4,%rdx
add    $0x190,%rsi
cmp    %rdx,%rcx
jne    1220 <concat_with_numbers+0x90>
test   %rax,%rax
je     126d <concat_with_numbers+0xdd>
imul   $0x64,%rdx,%rcx
add    -0x30(%rbp),%rcx
imul   $0x64,%rax,%rax
xor    %edx,%edx
nopl   0x0(%rax,%rax,1)
movb   $0x0,(%rcx,%rdx,1)
add    $0x64,%rdx
cmp    %rdx,%rax
jne    1260 <concat_with_numbers+0xd0>
lea    0xd8c(%rip),%rsi
mov    %r12,%rdi
call   1090 <fopen@plt>
mov    %rax,%r14
lea    0xd7c(%rip),%rsi
mov    %r15,%rdi
call   1090 <fopen@plt>
mov    %rax,%r15
lea    -0xc0(%rbp),%rdi
mov    $0x64,%esi
mov    %r14,-0x38(%rbp)
mov    %r14,%rdx
call   1080 <fgets@plt>
test   %rax,%rax
mov    -0x30(%rbp),%r14
je     12f2 <concat_with_numbers+0x162>
lea    -0xc0(%rbp),%r12
mov    %r14,%r13
nopl   0x0(%rax)
mov    %r13,%rdi
mov    %r12,%rsi
call   1040 <strcpy@plt>
mov    %r12,%rdi
mov    $0x64,%esi
call   1030 <clear_buf_t@plt>
mov    %r12,%rdi
mov    $0x64,%esi
mov    -0x38(%rbp),%rdx
call   1080 <fgets@plt>
add    $0x64,%r13
test   %rax,%rax
jne    12c0 <concat_with_numbers+0x130>
cmpb   $0x0,(%r14)
je     13ea <concat_with_numbers+0x25a>
mov    0x2cdd(%rip),%rax
mov    (%rax),%eax
test   %eax,%eax
jle    13ea <concat_with_numbers+0x25a>
mov    $0x1,%cl
xor    %edx,%edx
mov    %rdx,-0x40(%rbp)
mov    %r14,%r12
test   %cl,%cl
je     13a9 <concat_with_numbers+0x219>
test   %eax,%eax
jle    13a9 <concat_with_numbers+0x219>
xor    %ecx,%ecx
mov    %r14,%r13
nopl   (%rax)
mov    %rcx,-0x50(%rbp)
mov    $0xfffffff6,%r14d
nopw   0x0(%rax,%rax,1)
mov    %rbx,%rdi
mov    %r12,%rsi
call   1040 <strcpy@plt>
mov    %rbx,%rdi
call   1060 <strlen@plt>
cltq
lea    0x3a(%r14),%ecx
mov    %cl,-0x1(%rax,%rbx,1)
mov    %rbx,%rdi
mov    %r13,%rsi
call   10a0 <strcat@plt>
mov    %rbx,%rdi
mov    %r15,%rsi
call   1070 <fputs@plt>
inc    %r14d
jne    1340 <concat_with_numbers+0x1b0>
mov    %rbx,%rdi
call   10b0 <clear_buf@plt>
mov    -0x50(%rbp),%rcx
add    $0x1,%rcx
imul   $0x64,%rcx,%r13
mov    -0x30(%rbp),%r14
cmpb   $0x0,(%r14,%r13,1)
je     13a9 <concat_with_numbers+0x219>
add    %r14,%r13
mov    0x2c3f(%rip),%rax
movslq (%rax),%rax
cmp    %rax,%rcx
jl     1330 <concat_with_numbers+0x1a0>
mov    %rbx,%rdi
call   10b0 <clear_buf@plt>
mov    -0x40(%rbp),%rdx
add    $0x1,%rdx
imul   $0x64,%rdx,%r12
cmpb   $0x0,(%r14,%r12,1)
je     13ea <concat_with_numbers+0x25a>
mov    0x2c15(%rip),%rax
mov    (%rax),%eax
movslq %eax,%rcx
cmp    %rcx,%rdx
jge    13ea <concat_with_numbers+0x25a>
mov    %rdx,-0x40(%rbp)
add    %r14,%r12
movzbl (%r14),%ecx
test   %cl,%cl
jne    1320 <concat_with_numbers+0x190>
jmp    13a9 <concat_with_numbers+0x219>
mov    -0x38(%rbp),%rdi
call   1050 <fclose@plt>
mov    %r15,%rdi
call   1050 <fclose@plt>
mov    -0x48(%rbp),%rsp
xor    %eax,%eax
lea    -0x28(%rbp),%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@BUFSIZ = global i32 0
@.str = [2 x i8] c"r\00"
@.str.1 = [3 x i8] c"w+\00"
@.str.2 = [3 x i8] c"%s\00"
define i32 @concat_with_numbers(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca [100 x i8]
%6 = alloca i8*
%7 = alloca i64
%8 = alloca i64
%9 = alloca i32*
%10 = alloca i32*
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
%15 = alloca i32
store i8* %0, i8** %3
store i8* %1, i8** %4
%16 = load i32, i32* @BUFSIZ
%17 = zext i32 %16 to i64
%18 = call i8* @llvm.stacksave()
store i8* %18, i8** %6
%19 = alloca i8, i64 %17
store i64 %17, i64* %7
%20 = load i32, i32* @BUFSIZ
%21 = zext i32 %20 to i64
%22 = alloca [100 x i8], i64 %21
store i64 %21, i64* %8
store i32 0, i32* %11
store i32 0, i32* %12
store i32 0, i32* %13
store i32 0, i32* %14
store i32 0, i32* %15
%23 = getelementptr inbounds [100 x i8], [100 x i8]* %5, i64 0, i64 0
%24 = call i32 @clear_buf_t(i8* %23, i32 100)
store i32 0, i32* %11
br label %25
25: ; preds = %34, %2
%26 = load i32, i32* %11
%27 = load i32, i32* @BUFSIZ
%28 = icmp slt i32 %26, %27
br i1 %28, label %29, label %37
29: ; preds = %25
%30 = load i32, i32* %11
%31 = sext i32 %30 to i64
%32 = getelementptr inbounds [100 x i8], [100 x i8]* %22, i64 %31
%33 = getelementptr inbounds [100 x i8], [100 x i8]* %32, i64 0, i64 0
store i8 0, i8* %33
br label %34
34: ; preds = %29
%35 = load i32, i32* %11
%36 = add nsw i32 %35, 1
store i32 %36, i32* %11
br label %25
37: ; preds = %25
%38 = load i8*, i8** %3
%39 = call i32* @fopen(i8* %38, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
store i32* %39, i32** %9
%40 = load i8*, i8** %4
%41 = call i32* @fopen(i8* %40, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
store i32* %41, i32** %10
br label %42
42: ; preds = %47, %37
%43 = getelementptr inbounds [100 x i8], [100 x i8]* %5, i64 0, i64 0
%44 = load i32*, i32** %9
%45 = call i64 @fgets(i8* %43, i32 100, i32* %44)
%46 = icmp ne i64 %45, 0
br i1 %46, label %47, label %58
47: ; preds = %42
%48 = load i32, i32* %15
%49 = sext i32 %48 to i64
%50 = getelementptr inbounds [100 x i8], [100 x i8]* %22, i64 %49
%51 = getelementptr inbounds [100 x i8], [100 x i8]* %50, i64 0, i64 0
%52 = getelementptr inbounds [100 x i8], [100 x i8]* %5, i64 0, i64 0
%53 = call i32 @strcpy(i8* %51, i8* %52)
%54 = load i32, i32* %15
%55 = add nsw i32 %54, 1
store i32 %55, i32* %15
%56 = getelementptr inbounds [100 x i8], [100 x i8]* %5, i64 0, i64 0
%57 = call i32 @clear_buf_t(i8* %56, i32 100)
br label %42
58: ; preds = %42
store i32 0, i32* %11
br label %59
59: ; preds = %123, %58
%60 = load i32, i32* %11
%61 = sext i32 %60 to i64
%62 = getelementptr inbounds [100 x i8], [100 x i8]* %22, i64 %61
%63 = getelementptr inbounds [100 x i8], [100 x i8]* %62, i64 0, i64 0
%64 = load i8, i8* %63
%65 = sext i8 %64 to i32
%66 = icmp ne i32 %65, 0
br i1 %66, label %67, label %71
67: ; preds = %59
%68 = load i32, i32* %11
%69 = load i32, i32* @BUFSIZ
%70 = icmp slt i32 %68, %69
br label %71
71: ; preds = %67, %59
%72 = phi i1 [ false, %59 ], [ %70, %67 ]
br i1 %72, label %73, label %126
73: ; preds = %71
store i32 0, i32* %12
br label %74
74: ; preds = %118, %73
%75 = load i32, i32* %12
%76 = sext i32 %75 to i64
%77 = getelementptr inbounds [100 x i8], [100 x i8]* %22, i64 %76
%78 = getelementptr inbounds [100 x i8], [100 x i8]* %77, i64 0, i64 0
%79 = load i8, i8* %78
%80 = sext i8 %79 to i32
%81 = icmp ne i32 %80, 0
br i1 %81, label %82, label %86
82: ; preds = %74
%83 = load i32, i32* %12
%84 = load i32, i32* @BUFSIZ
%85 = icmp slt i32 %83, %84
br label %86
86: ; preds = %82, %74
%87 = phi i1 [ false, %74 ], [ %85, %82 ]
br i1 %87, label %88, label %121
88: ; preds = %86
store i32 0, i32* %13
br label %89
89: ; preds = %113, %88
%90 = load i32, i32* %13
%91 = icmp slt i32 %90, 10
br i1 %91, label %92, label %116
92: ; preds = %89
%93 = load i32, i32* %11
%94 = sext i32 %93 to i64
%95 = getelementptr inbounds [100 x i8], [100 x i8]* %22, i64 %94
%96 = getelementptr inbounds [100 x i8], [100 x i8]* %95, i64 0, i64 0
%97 = call i32 @strcpy(i8* %19, i8* %96)
%98 = call i32 @strlen(i8* %19)
store i32 %98, i32* %14
%99 = load i32, i32* %13
%100 = add nsw i32 %99, 48
%101 = trunc i32 %100 to i8
%102 = load i32, i32* %14
%103 = sub nsw i32 %102, 1
%104 = sext i32 %103 to i64
%105 = getelementptr inbounds i8, i8* %19, i64 %104
store i8 %101, i8* %105
%106 = load i32, i32* %12
%107 = sext i32 %106 to i64
%108 = getelementptr inbounds [100 x i8], [100 x i8]* %22, i64 %107
%109 = getelementptr inbounds [100 x i8], [100 x i8]* %108, i64 0, i64 0
%110 = call i32 @strcat(i8* %19, i8* %109)
%111 = load i32*, i32** %10
%112 = call i32 @fprintf(i32* %111, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i8* %19)
br label %113
113: ; preds = %92
%114 = load i32, i32* %13
%115 = add nsw i32 %114, 1
store i32 %115, i32* %13
br label %89
116: ; preds = %89
%117 = call i32 @clear_buf(i8* %19)
br label %118
118: ; preds = %116
%119 = load i32, i32* %12
%120 = add nsw i32 %119, 1
store i32 %120, i32* %12
br label %74
121: ; preds = %86
%122 = call i32 @clear_buf(i8* %19)
br label %123
123: ; preds = %121
%124 = load i32, i32* %11
%125 = add nsw i32 %124, 1
store i32 %125, i32* %11
br label %59
126: ; preds = %71
%127 = load i32*, i32** %9
%128 = call i32 @fclose(i32* %127)
%129 = load i32*, i32** %10
%130 = call i32 @fclose(i32* %129)
%131 = load i8*, i8** %6
ret i32 0
}

LLVM IR (-O2):
@BUFSIZ = global i32 0
@.str = [2 x i8] c"r\00"
@.str.1 = [3 x i8] c"w+\00"
define i32 @concat_with_numbers(i8* nocapture %0, i8* nocapture %1) {
%3 = alloca [100 x i8]
%4 = getelementptr inbounds [100 x i8], [100 x i8]* %3, i64 0, i64 0
%5 = load i32, i32* @BUFSIZ
%6 = zext i32 %5 to i64
%7 = tail call i8* @llvm.stacksave()
%8 = alloca i8, i64 %6
%9 = load i32, i32* @BUFSIZ
%10 = zext i32 %9 to i64
%11 = alloca [100 x i8], i64 %10
%12 = call i32 @clear_buf_t(i8* %4, i32 100)
%13 = load i32, i32* @BUFSIZ
%14 = icmp sgt i32 %13, 0
br i1 %14, label %15, label %45
15: ; preds = %2
%16 = zext i32 %13 to i64
%17 = add nsw i64 %16, -1
%18 = and i64 %16, 3
%19 = icmp ult i64 %17, 3
br i1 %19, label %35, label %20
20: ; preds = %15
%21 = and i64 %16, 4294967292
br label %22
22: ; preds = %22, %20
%23 = phi i64 [ 0, %20 ], [ %32, %22 ]
%24 = phi i64 [ 0, %20 ], [ %33, %22 ]
%25 = getelementptr inbounds [100 x i8], [100 x i8]* %11, i64 %23, i64 0
store i8 0, i8* %25
%26 = or i64 %23, 1
%27 = getelementptr inbounds [100 x i8], [100 x i8]* %11, i64 %26, i64 0
store i8 0, i8* %27
%28 = or i64 %23, 2
%29 = getelementptr inbounds [100 x i8], [100 x i8]* %11, i64 %28, i64 0
store i8 0, i8* %29
%30 = or i64 %23, 3
%31 = getelementptr inbounds [100 x i8], [100 x i8]* %11, i64 %30, i64 0
store i8 0, i8* %31
%32 = add nuw nsw i64 %23, 4
%33 = add i64 %24, 4
%34 = icmp eq i64 %33, %21
br i1 %34, label %35, label %22
35: ; preds = %22, %15
%36 = phi i64 [ 0, %15 ], [ %32, %22 ]
%37 = icmp eq i64 %18, 0
br i1 %37, label %45, label %38
38: ; preds = %35, %38
%39 = phi i64 [ %42, %38 ], [ %36, %35 ]
%40 = phi i64 [ %43, %38 ], [ 0, %35 ]
%41 = getelementptr inbounds [100 x i8], [100 x i8]* %11, i64 %39, i64 0
store i8 0, i8* %41
%42 = add nuw nsw i64 %39, 1
%43 = add i64 %40, 1
%44 = icmp eq i64 %43, %18
br i1 %44, label %45, label %38
45: ; preds = %35, %38, %2
%46 = call i32* @fopen(i8* %0, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%47 = call i32* @fopen(i8* %1, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%48 = call i64 @fgets(i8* %4, i32 100, i32* %46)
%49 = icmp eq i64 %48, 0
br i1 %49, label %50, label %57
50: ; preds = %57, %45
%51 = getelementptr inbounds [100 x i8], [100 x i8]* %11, i64 0, i64 0
%52 = load i8, i8* %51
%53 = icmp ne i8 %52, 0
%54 = load i32, i32* @BUFSIZ
%55 = icmp sgt i32 %54, 0
%56 = select i1 %53, i1 %55, i1 false
br i1 %56, label %65, label %111
57: ; preds = %45, %57
%58 = phi i64 [ %61, %57 ], [ 0, %45 ]
%59 = getelementptr inbounds [100 x i8], [100 x i8]* %11, i64 %58, i64 0
%60 = call i32 @strcpy(i8* %59, i8* %4)
%61 = add nuw i64 %58, 1
%62 = call i32 @clear_buf_t(i8* %4, i32 100)
%63 = call i64 @fgets(i8* %4, i32 100, i32* %46)
%64 = icmp eq i64 %63, 0
br i1 %64, label %50, label %57
65: ; preds = %50, %109
%66 = phi i32 [ %105, %109 ], [ %54, %50 ]
%67 = phi i8 [ %110, %109 ], [ 1, %50 ]
%68 = phi i64 [ %101, %109 ], [ 0, %50 ]
%69 = phi i8* [ %102, %109 ], [ %51, %50 ]
%70 = icmp ne i8 %67, 0
%71 = icmp sgt i32 %66, 0
%72 = select i1 %70, i1 %71, i1 false
br i1 %72, label %73, label %99
73: ; preds = %65, %89
%74 = phi i64 [ %91, %89 ], [ 0, %65 ]
%75 = phi i8* [ %92, %89 ], [ %51, %65 ]
br label %76
76: ; preds = %73, %76
%77 = phi i32 [ 0, %73 ], [ %87, %76 ]
%78 = call i32 @strcpy(i8* %8, i8* %69)
%79 = call i32 @strlen(i8* %8)
%80 = trunc i32 %77 to i8
%81 = add nuw nsw i8 %80, 48
%82 = add nsw i32 %79, -1
%83 = sext i32 %82 to i64
%84 = getelementptr inbounds i8, i8* %8, i64 %83
store i8 %81, i8* %84
%85 = call i32 @strcat(i8* %8, i8* %75)
%86 = call i32 @fputs(i8* %8, i32* %47)
%87 = add nuw nsw i32 %77, 1
%88 = icmp eq i32 %87, 10
br i1 %88, label %89, label %76
89: ; preds = %76
%90 = call i32 @clear_buf(i8* %8)
%91 = add nuw nsw i64 %74, 1
%92 = getelementptr inbounds [100 x i8], [100 x i8]* %11, i64 %91, i64 0
%93 = load i8, i8* %92
%94 = icmp ne i8 %93, 0
%95 = load i32, i32* @BUFSIZ
%96 = sext i32 %95 to i64
%97 = icmp slt i64 %91, %96
%98 = select i1 %94, i1 %97, i1 false
br i1 %98, label %73, label %99
99: ; preds = %89, %65
%100 = call i32 @clear_buf(i8* %8)
%101 = add nuw nsw i64 %68, 1
%102 = getelementptr inbounds [100 x i8], [100 x i8]* %11, i64 %101, i64 0
%103 = load i8, i8* %102
%104 = icmp ne i8 %103, 0
%105 = load i32, i32* @BUFSIZ
%106 = sext i32 %105 to i64
%107 = icmp slt i64 %101, %106
%108 = select i1 %104, i1 %107, i1 false
br i1 %108, label %109, label %111
109: ; preds = %99
%110 = load i8, i8* %51
br label %65
111: ; preds = %99, %50
%112 = call i32 @fclose(i32* %46)
%113 = call i32 @fclose(i32* %47)
ret i32 0
}