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

/* Variables and functions */
int /*<<< orphan*/ RepFclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *RepFwriteTmp(char *, char *, char *);
char *RepMkPath(char *, char *);
int /*<<< orphan*/ RepRemove(char *, char *);
int /*<<< orphan*/ RepRenameTmp(char *, char *, char *);
int /*<<< orphan*/ _IOFBF;
scalar_t__ _RepMkDirs(char *);
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *, ...);
int fread(char *, int, int, int /*<<< orphan*/ *);
int /*<<< orphan*/ free(char *);
int fwrite(char *, int, int, int /*<<< orphan*/ *);
scalar_t__ link(char *, char *);
int /*<<< orphan*/ setvbuf(int /*<<< orphan*/ *, char *, int /*<<< orphan*/,
                           int);
int /*<<< orphan*/ stderr;
int RepImport(char *Source, char *Type, char *Filename, int Link) {
  int LenIn, LenOut;
  int i;
  char Buf[0x80000];
  char vBuf[0x80000];
  FILE *Fin;
  FILE *Fout;
  char *FoutPath;
  if (Link) {
    FoutPath = RepMkPath(Type, Filename);
    if (!FoutPath)
      return (0);
    if (_RepMkDirs(FoutPath)) {
      free(FoutPath);
      return (1);
    }
    if (link(Source, FoutPath) == 0) {
      free(FoutPath);
      return (0);
    }
    free(FoutPath);
  }
  Fin = fopen(Source, "rb");
  if (!Fin) {
    fprintf(stderr, "ERROR: Unable to open source file '%s'\n", Source);
    return (1);
  }
  setvbuf(Fin, vBuf, _IOFBF, sizeof(vBuf));
  Fout = RepFwriteTmp(Type, Filename, "I");
  if (!Fout) {
    fprintf(stderr, "ERROR: Invalid -- type='%s' filename='%s'\n", Type,
            Filename);
    fclose(Fin);
    return (2);
  }
  LenIn = 1;
  while (LenIn > 0) {
    LenIn = fread(Buf, 1, sizeof(Buf), Fin);
    if (LenIn > 0) {
      LenOut = 0;
      while (LenOut < LenIn) {
        i = fwrite(Buf + LenOut, 1, LenIn - LenOut, Fout);
        LenOut += i;
        if (i == 0) {
          fclose(Fout);
          RepFclose(Fout);
          RepRemove(Type, Filename);
          fprintf(stderr, "ERROR: Write failed -- type='%s' filename='%s'\n",
                  Type, Filename);
          return (3);
        }
      }
    }
  }
  RepFclose(Fout);
  fclose(Fin);
  RepRenameTmp(Type, Filename, "I");
  return (0);
}


x86 assembly (clang, -O0):
<RepImport>:
push   %rbp
mov    %rsp,%rbp
sub    $0x100050,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    %ecx,-0x24(%rbp)
cmpl   $0x0,-0x24(%rbp)
je     129e <RepImport+0xbe>
mov    -0x18(%rbp),%rdi
mov    -0x20(%rbp),%rsi
call   10b0 <RepMkPath@plt>
mov    %rax,-0x100048(%rbp)
cmpq   $0x0,-0x100048(%rbp)
jne    1232 <RepImport+0x52>
movl   $0x0,-0x4(%rbp)
jmp    1486 <RepImport+0x2a6>
mov    -0x100048(%rbp),%rdi
call   10e0 <_RepMkDirs@plt>
cmp    $0x0,%rax
je     1260 <RepImport+0x80>
mov    -0x100048(%rbp),%rdi
call   1030 <free@plt>
movl   $0x1,-0x4(%rbp)
jmp    1486 <RepImport+0x2a6>
mov    -0x10(%rbp),%rdi
mov    -0x100048(%rbp),%rsi
call   10d0 <link@plt>
cmp    $0x0,%rax
jne    1292 <RepImport+0xb2>
mov    -0x100048(%rbp),%rdi
call   1030 <free@plt>
movl   $0x0,-0x4(%rbp)
jmp    1486 <RepImport+0x2a6>
mov    -0x100048(%rbp),%rdi
call   1030 <free@plt>
mov    -0x10(%rbp),%rdi
lea    0xd57(%rip),%rsi
call   10c0 <fopen@plt>
mov    %rax,-0x100038(%rbp)
cmpq   $0x0,-0x100038(%rbp)
jne    12ea <RepImport+0x10a>
mov    0x2d16(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rdx
lea    0xd2c(%rip),%rsi
mov    $0x0,%al
call   1080 <fprintf@plt>
movl   $0x1,-0x4(%rbp)
jmp    1486 <RepImport+0x2a6>
mov    -0x100038(%rbp),%rdi
lea    -0x100030(%rbp),%rsi
mov    0x2cd9(%rip),%rax
mov    (%rax),%edx
mov    $0x80000,%ecx
call   10a0 <setvbuf@plt>
mov    -0x18(%rbp),%rdi
mov    -0x20(%rbp),%rsi
lea    0xd11(%rip),%rdx
call   1090 <RepFwriteTmp@plt>
mov    %rax,-0x100040(%rbp)
cmpq   $0x0,-0x100040(%rbp)
jne    136b <RepImport+0x18b>
mov    0x2ca5(%rip),%rax
mov    (%rax),%edi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
lea    0xce1(%rip),%rsi
mov    $0x0,%al
call   1080 <fprintf@plt>
mov    -0x100038(%rbp),%rdi
call   1060 <fclose@plt>
movl   $0x2,-0x4(%rbp)
jmp    1486 <RepImport+0x2a6>
movl   $0x1,-0x28(%rbp)
cmpl   $0x0,-0x28(%rbp)
jle    1453 <RepImport+0x273>
lea    -0x80030(%rbp),%rdi
mov    -0x100038(%rbp),%rcx
mov    $0x1,%esi
mov    $0x80000,%edx
call   1050 <fread@plt>
mov    %eax,-0x28(%rbp)
cmpl   $0x0,-0x28(%rbp)
jle    144e <RepImport+0x26e>
movl   $0x0,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
cmp    -0x28(%rbp),%eax
jge    1449 <RepImport+0x269>
lea    -0x80030(%rbp),%rdi
movslq -0x2c(%rbp),%rax
add    %rax,%rdi
mov    -0x28(%rbp),%edx
sub    -0x2c(%rbp),%edx
mov    -0x100040(%rbp),%rcx
mov    $0x1,%esi
call   10f0 <fwrite@plt>
mov    %eax,-0x30(%rbp)
mov    -0x30(%rbp),%eax
add    -0x2c(%rbp),%eax
mov    %eax,-0x2c(%rbp)
cmpl   $0x0,-0x30(%rbp)
jne    1444 <RepImport+0x264>
mov    -0x100040(%rbp),%rdi
call   1060 <fclose@plt>
mov    -0x100040(%rbp),%rdi
call   1070 <RepFclose@plt>
mov    -0x18(%rbp),%rdi
mov    -0x20(%rbp),%rsi
call   1040 <RepRemove@plt>
mov    0x2bc0(%rip),%rax
mov    (%rax),%edi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
lea    0xc27(%rip),%rsi
mov    $0x0,%al
call   1080 <fprintf@plt>
movl   $0x3,-0x4(%rbp)
jmp    1486 <RepImport+0x2a6>
jmp    13ad <RepImport+0x1cd>
jmp    144e <RepImport+0x26e>
jmp    1372 <RepImport+0x192>
mov    -0x100040(%rbp),%rdi
call   1070 <RepFclose@plt>
mov    -0x100038(%rbp),%rdi
call   1060 <fclose@plt>
mov    -0x18(%rbp),%rdi
mov    -0x20(%rbp),%rsi
lea    0xbb1(%rip),%rdx
call   1100 <RepRenameTmp@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x100050,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<RepImport>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x100008,%rsp
mov    %rdx,%r14
mov    %rsi,%r15
mov    %rdi,%r13
test   %ecx,%ecx
je     1255 <RepImport+0x75>
mov    %r15,%rdi
mov    %r14,%rsi
call   10b0 <RepMkPath@plt>
xor    %ebp,%ebp
test   %rax,%rax
je     13ae <RepImport+0x1ce>
mov    %rax,%rbx
mov    %rax,%rdi
call   10e0 <_RepMkDirs@plt>
test   %rax,%rax
je     1236 <RepImport+0x56>
mov    %rbx,%rdi
call   1030 <free@plt>
mov    $0x1,%ebp
jmp    13ae <RepImport+0x1ce>
mov    %r13,%rdi
mov    %rbx,%rsi
call   10d0 <link@plt>
mov    %rax,%r12
mov    %rbx,%rdi
call   1030 <free@plt>
test   %r12,%r12
je     13ae <RepImport+0x1ce>
lea    0xda4(%rip),%rsi
mov    %r13,%rdi
call   10c0 <fopen@plt>
test   %rax,%rax
je     1324 <RepImport+0x144>
mov    %rax,%r12
mov    0x2d61(%rip),%rax
mov    (%rax),%edx
lea    0x80000(%rsp),%rsi
mov    %r12,%rdi
mov    $0x80000,%ecx
call   10a0 <setvbuf@plt>
lea    0xd96(%rip),%rdx
mov    %r15,%rdi
mov    %r14,%rsi
call   1090 <RepFwriteTmp@plt>
test   %rax,%rax
je     1384 <RepImport+0x1a4>
mov    %rax,%rbx
mov    %rsp,%rdi
mov    $0x1,%esi
mov    $0x80000,%edx
mov    %r12,%rcx
call   1050 <fread@plt>
test   %eax,%eax
jle    12fb <RepImport+0x11b>
mov    %eax,%ebp
xor    %r13d,%r13d
nopw   0x0(%rax,%rax,1)
mov    %ebp,%edx
sub    %r13d,%edx
jle    12f4 <RepImport+0x114>
movslq %r13d,%rax
lea    (%rsp,%rax,1),%rdi
mov    $0x1,%esi
mov    %rbx,%rcx
call   10f0 <fwrite@plt>
add    %eax,%r13d
test   %eax,%eax
jne    12d0 <RepImport+0xf0>
jmp    1345 <RepImport+0x165>
test   %ebp,%ebp
mov    %rsp,%rdi
jg     12af <RepImport+0xcf>
mov    %rbx,%rdi
call   1070 <RepFclose@plt>
mov    %r12,%rdi
call   1060 <fclose@plt>
lea    0xd19(%rip),%rdx
mov    %r15,%rdi
mov    %r14,%rsi
call   1100 <RepRenameTmp@plt>
xor    %ebp,%ebp
jmp    13ae <RepImport+0x1ce>
mov    0x2cb5(%rip),%rax
mov    (%rax),%edi
lea    0xccf(%rip),%rsi
mov    %r13,%rdx
xor    %eax,%eax
call   1080 <fprintf@plt>
mov    $0x1,%ebp
jmp    13ae <RepImport+0x1ce>
mov    %rbx,%rdi
call   1060 <fclose@plt>
mov    %rbx,%rdi
call   1070 <RepFclose@plt>
mov    %r15,%rdi
mov    %r14,%rsi
call   1040 <RepRemove@plt>
mov    0x2c79(%rip),%rax
mov    (%rax),%edi
lea    0xce8(%rip),%rsi
mov    %r15,%rdx
mov    %r14,%rcx
xor    %eax,%eax
call   1080 <fprintf@plt>
mov    $0x3,%ebp
jmp    13ae <RepImport+0x1ce>
mov    0x2c55(%rip),%rax
mov    (%rax),%edi
lea    0xc99(%rip),%rsi
mov    %r15,%rdx
mov    %r14,%rcx
xor    %eax,%eax
call   1080 <fprintf@plt>
mov    %r12,%rdi
call   1060 <fclose@plt>
mov    $0x2,%ebp
mov    %ebp,%eax
add    $0x100008,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [3 x i8] c"rb\00"
@stderr = global i32 0
@.str.1 = [40 x i8] c"ERROR: Unable to open source file '%s'\0A\00"
@_IOFBF = global i32 0
@.str.2 = [2 x i8] c"I\00"
@.str.3 = [43 x i8] c"ERROR: Invalid -- type='%s' filename='%s'\0A\00"
@.str.4 = [48 x i8] c"ERROR: Write failed -- type='%s' filename='%s'\0A\00"
define i32 @RepImport(i8* %0, i8* %1, i8* %2, i32 %3) {
%5 = alloca i32
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i8*
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca [524288 x i8]
%14 = alloca [524288 x i8]
%15 = alloca i32*
%16 = alloca i32*
%17 = alloca i8*
store i8* %0, i8** %6
store i8* %1, i8** %7
store i8* %2, i8** %8
store i32 %3, i32* %9
%18 = load i32, i32* %9
%19 = icmp ne i32 %18, 0
br i1 %19, label %20, label %45
20: ; preds = %4
%21 = load i8*, i8** %7
%22 = load i8*, i8** %8
%23 = call i8* @RepMkPath(i8* %21, i8* %22)
store i8* %23, i8** %17
%24 = load i8*, i8** %17
%25 = icmp ne i8* %24, null
br i1 %25, label %27, label %26
26: ; preds = %20
store i32 0, i32* %5
br label %124
27: ; preds = %20
%28 = load i8*, i8** %17
%29 = call i64 @_RepMkDirs(i8* %28)
%30 = icmp ne i64 %29, 0
br i1 %30, label %31, label %34
31: ; preds = %27
%32 = load i8*, i8** %17
%33 = call i32 @free(i8* %32)
store i32 1, i32* %5
br label %124
34: ; preds = %27
%35 = load i8*, i8** %6
%36 = load i8*, i8** %17
%37 = call i64 @link(i8* %35, i8* %36)
%38 = icmp eq i64 %37, 0
br i1 %38, label %39, label %42
39: ; preds = %34
%40 = load i8*, i8** %17
%41 = call i32 @free(i8* %40)
store i32 0, i32* %5
br label %124
42: ; preds = %34
%43 = load i8*, i8** %17
%44 = call i32 @free(i8* %43)
br label %45
45: ; preds = %42, %4
%46 = load i8*, i8** %6
%47 = call i32* @fopen(i8* %46, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
store i32* %47, i32** %15
%48 = load i32*, i32** %15
%49 = icmp ne i32* %48, null
br i1 %49, label %54, label %50
50: ; preds = %45
%51 = load i32, i32* @stderr
%52 = load i8*, i8** %6
%53 = call i32 (i32, i8*, i8*, ...) @fprintf(i32 %51, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.1, i64 0, i64 0), i8* %52)
store i32 1, i32* %5
br label %124
54: ; preds = %45
%55 = load i32*, i32** %15
%56 = getelementptr inbounds [524288 x i8], [524288 x i8]* %14, i64 0, i64 0
%57 = load i32, i32* @_IOFBF
%58 = call i32 @setvbuf(i32* %55, i8* %56, i32 %57, i32 524288)
%59 = load i8*, i8** %7
%60 = load i8*, i8** %8
%61 = call i32* @RepFwriteTmp(i8* %59, i8* %60, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
store i32* %61, i32** %16
%62 = load i32*, i32** %16
%63 = icmp ne i32* %62, null
br i1 %63, label %71, label %64
64: ; preds = %54
%65 = load i32, i32* @stderr
%66 = load i8*, i8** %7
%67 = load i8*, i8** %8
%68 = call i32 (i32, i8*, i8*, ...) @fprintf(i32 %65, i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.3, i64 0, i64 0), i8* %66, i8* %67)
%69 = load i32*, i32** %15
%70 = call i32 @fclose(i32* %69)
store i32 2, i32* %5
br label %124
71: ; preds = %54
store i32 1, i32* %10
br label %72
72: ; preds = %115, %71
%73 = load i32, i32* %10
%74 = icmp sgt i32 %73, 0
br i1 %74, label %75, label %116
75: ; preds = %72
%76 = getelementptr inbounds [524288 x i8], [524288 x i8]* %13, i64 0, i64 0
%77 = load i32*, i32** %15
%78 = call i32 @fread(i8* %76, i32 1, i32 524288, i32* %77)
store i32 %78, i32* %10
%79 = load i32, i32* %10
%80 = icmp sgt i32 %79, 0
br i1 %80, label %81, label %115
81: ; preds = %75
store i32 0, i32* %11
br label %82
82: ; preds = %113, %81
%83 = load i32, i32* %11
%84 = load i32, i32* %10
%85 = icmp slt i32 %83, %84
br i1 %85, label %86, label %114
86: ; preds = %82
%87 = getelementptr inbounds [524288 x i8], [524288 x i8]* %13, i64 0, i64 0
%88 = load i32, i32* %11
%89 = sext i32 %88 to i64
%90 = getelementptr inbounds i8, i8* %87, i64 %89
%91 = load i32, i32* %10
%92 = load i32, i32* %11
%93 = sub nsw i32 %91, %92
%94 = load i32*, i32** %16
%95 = call i32 @fwrite(i8* %90, i32 1, i32 %93, i32* %94)
store i32 %95, i32* %12
%96 = load i32, i32* %12
%97 = load i32, i32* %11
%98 = add nsw i32 %97, %96
store i32 %98, i32* %11
%99 = load i32, i32* %12
%100 = icmp eq i32 %99, 0
br i1 %100, label %101, label %113
101: ; preds = %86
%102 = load i32*, i32** %16
%103 = call i32 @fclose(i32* %102)
%104 = load i32*, i32** %16
%105 = call i32 @RepFclose(i32* %104)
%106 = load i8*, i8** %7
%107 = load i8*, i8** %8
%108 = call i32 @RepRemove(i8* %106, i8* %107)
%109 = load i32, i32* @stderr
%110 = load i8*, i8** %7
%111 = load i8*, i8** %8
%112 = call i32 (i32, i8*, i8*, ...) @fprintf(i32 %109, i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.4, i64 0, i64 0), i8* %110, i8* %111)
store i32 3, i32* %5
br label %124
113: ; preds = %86
br label %82
114: ; preds = %82
br label %115
115: ; preds = %114, %75
br label %72
116: ; preds = %72
%117 = load i32*, i32** %16
%118 = call i32 @RepFclose(i32* %117)
%119 = load i32*, i32** %15
%120 = call i32 @fclose(i32* %119)
%121 = load i8*, i8** %7
%122 = load i8*, i8** %8
%123 = call i32 @RepRenameTmp(i8* %121, i8* %122, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
store i32 0, i32* %5
br label %124
124: ; preds = %116, %101, %64, %50, %39, %31, %26
%125 = load i32, i32* %5
ret i32 %125
}

LLVM IR (-O2):
@.str = [3 x i8] c"rb\00"
@stderr = global i32 0
@.str.1 = [40 x i8] c"ERROR: Unable to open source file '%s'\0A\00"
@_IOFBF = global i32 0
@.str.2 = [2 x i8] c"I\00"
@.str.3 = [43 x i8] c"ERROR: Invalid -- type='%s' filename='%s'\0A\00"
@.str.4 = [48 x i8] c"ERROR: Write failed -- type='%s' filename='%s'\0A\00"
define i32 @RepImport(i8* %0, i8* %1, i8* %2, i32 %3) {
%5 = alloca [524288 x i8]
%6 = alloca [524288 x i8]
%7 = getelementptr inbounds [524288 x i8], [524288 x i8]* %5, i64 0, i64 0
%8 = getelementptr inbounds [524288 x i8], [524288 x i8]* %6, i64 0, i64 0
%9 = icmp eq i32 %3, 0
br i1 %9, label %22, label %10
10: ; preds = %4
%11 = tail call i8* @RepMkPath(i8* %1, i8* %2)
%12 = icmp eq i8* %11, null
br i1 %12, label %61, label %13
13: ; preds = %10
%14 = tail call i64 @_RepMkDirs(i8* %11)
%15 = icmp eq i64 %14, 0
br i1 %15, label %18, label %16
16: ; preds = %13
%17 = tail call i32 @free(i8* %11)
br label %61
18: ; preds = %13
%19 = tail call i64 @link(i8* %0, i8* %11)
%20 = icmp eq i64 %19, 0
%21 = tail call i32 @free(i8* %11)
br i1 %20, label %61, label %22
22: ; preds = %18, %4
%23 = tail call i32* @fopen(i8* %0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%24 = icmp eq i32* %23, null
br i1 %24, label %25, label %28
25: ; preds = %22
%26 = load i32, i32* @stderr
%27 = tail call i32 (i32, i8*, i8*, ...) @fprintf(i32 %26, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.1, i64 0, i64 0), i8* %0)
br label %61
28: ; preds = %22
%29 = load i32, i32* @_IOFBF
%30 = call i32 @setvbuf(i32* %23, i8* %8, i32 %29, i32 524288)
%31 = call i32* @RepFwriteTmp(i8* %1, i8* %2, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%32 = icmp eq i32* %31, null
br i1 %32, label %33, label %37
33: ; preds = %28
%34 = load i32, i32* @stderr
%35 = call i32 (i32, i8*, i8*, ...) @fprintf(i32 %34, i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.3, i64 0, i64 0), i8* %1, i8* %2)
%36 = call i32 @fclose(i32* %23)
br label %61
37: ; preds = %28, %56
%38 = call i32 @fread(i8* %7, i32 1, i32 524288, i32* %23)
%39 = icmp sgt i32 %38, 0
br i1 %39, label %40, label %57
40: ; preds = %37, %43
%41 = phi i32 [ %48, %43 ], [ 0, %37 ]
%42 = icmp sgt i32 %38, %41
br i1 %42, label %43, label %56
43: ; preds = %40
%44 = sext i32 %41 to i64
%45 = getelementptr inbounds [524288 x i8], [524288 x i8]* %5, i64 0, i64 %44
%46 = sub nsw i32 %38, %41
%47 = call i32 @fwrite(i8* %45, i32 1, i32 %46, i32* %31)
%48 = add nsw i32 %47, %41
%49 = icmp eq i32 %47, 0
br i1 %49, label %50, label %40
50: ; preds = %43
%51 = call i32 @fclose(i32* %31)
%52 = call i32 @RepFclose(i32* %31)
%53 = call i32 @RepRemove(i8* %1, i8* %2)
%54 = load i32, i32* @stderr
%55 = call i32 (i32, i8*, i8*, ...) @fprintf(i32 %54, i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.4, i64 0, i64 0), i8* %1, i8* %2)
br label %61
56: ; preds = %40
br i1 %39, label %37, label %57
57: ; preds = %37, %56
%58 = call i32 @RepFclose(i32* %31)
%59 = call i32 @fclose(i32* %23)
%60 = call i32 @RepRenameTmp(i8* %1, i8* %2, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
br label %61
61: ; preds = %18, %10, %57, %50, %33, %25, %16
%62 = phi i32 [ 1, %16 ], [ 3, %50 ], [ 0, %57 ], [ 2, %33 ], [ 1, %25 ], [ 0, %10 ], [ 0, %18 ]
ret i32 %62
}