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

/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
scalar_t__ feof(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fputs(char *, int /*<<< orphan*/ *);
unsigned char getc(int /*<<< orphan*/ *);
scalar_t__ getenv(char *);
int /*<<< orphan*/ memset(char *, int /*<<< orphan*/, int);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ sprintf(char *, char *, unsigned char);
int /*<<< orphan*/ strcat(char *, char *);
int strlen(char *);
scalar_t__ strncmp(char *, char *, int);
int main(int argc, char *argv[]) {
  FILE *infile, *outfile;
  char infname[1024];
  char outfname[1024];
  char *rt28xxdir;
  char *chipset;
  int i = 0;
  unsigned char c;
  memset(infname, 0, 1024);
  memset(outfname, 0, 1024);
  rt28xxdir = (char *)getenv("RT28xx_DIR");
  chipset = (char *)getenv("CHIPSET");
  if (!rt28xxdir) {
    printf("Environment value \"RT28xx_DIR\" not export \n");
    return -1;
  }
  if (!chipset) {
    printf("Environment value \"CHIPSET\" not export \n");
    return -1;
  }
  if (strlen(rt28xxdir) > (sizeof(infname) - 100)) {
    printf("Environment value \"RT28xx_DIR\" is too long!\n");
    return -1;
  }
  strcat(infname, rt28xxdir);
  if (strncmp(chipset, "2860", 4) == 0)
    strcat(infname, "/common/rt2860.bin");
  else if (strncmp(chipset, "2870", 4) == 0)
    strcat(infname, "/common/rt2870.bin");
  else if (strncmp(chipset, "3090", 4) == 0)
    strcat(infname, "/common/rt2860.bin");
  else if (strncmp(chipset, "2070", 4) == 0)
    strcat(infname, "/common/rt2870.bin");
  else if (strncmp(chipset, "3070", 4) == 0)
    strcat(infname, "/common/rt2870.bin");
  else if (strncmp(chipset, "3572", 4) == 0)
    strcat(infname, "/common/rt2870.bin");
  else if (strncmp(chipset, "3370", 4) == 0)
    strcat(infname, "/common/rt2870.bin");
  else if (strncmp(chipset, "5370", 4) == 0)
    strcat(infname, "/common/rt2870.bin");
  else if (strncmp(chipset, "USB", 3) == 0)
    strcat(infname, "/common/rt2870.bin");
  else if (strncmp(chipset, "PCI", 3) == 0)
    strcat(infname, "/common/rt2860.bin");
  else
    strcat(infname, "/common/rt2860.bin");
  strcat(outfname, rt28xxdir);
  strcat(outfname, "/include/firmware.h");
  infile = fopen(infname, "r");
  if (infile == (FILE *)NULL) {
    printf("Can't read file %s \n", infname);
    return -1;
  }
  outfile = fopen(outfname, "w");
  if (outfile == (FILE *)NULL) {
    printf("Can't open write file %s \n", outfname);
    return -1;
  }
  fputs("/* AUTO GEN PLEASE DO NOT MODIFY IT */ \n", outfile);
  fputs("/* AUTO GEN PLEASE DO NOT MODIFY IT */ \n", outfile);
  fputs("\n", outfile);
  fputs("\n", outfile);
  fputs("UCHAR FirmwareImage [] = { \n", outfile);
  while (1) {
    char cc[3];
    c = getc(infile);
    if (feof(infile))
      break;
    memset(cc, 0, 2);
    if (i >= 16) {
      fputs("\n", outfile);
      i = 0;
    }
    fputs("0x", outfile);
    sprintf(cc, "%02x", c);
    fputs(cc, outfile);
    fputs(", ", outfile);
    i++;
  }
  fputs("} ;\n", outfile);
  fclose(infile);
  fclose(outfile);
  exit(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x840,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x834(%rbp)
lea    -0x420(%rbp),%rdi
xor    %esi,%esi
mov    $0x400,%edx
call   1090 <memset@plt>
lea    -0x820(%rbp),%rdi
xor    %esi,%esi
mov    $0x400,%edx
call   1090 <memset@plt>
lea    0xde0(%rip),%rdi
call   1030 <getenv@plt>
mov    %rax,-0x828(%rbp)
lea    0xdd8(%rip),%rdi
call   1030 <getenv@plt>
mov    %rax,-0x830(%rbp)
cmpq   $0x0,-0x828(%rbp)
jne    1267 <main+0x97>
lea    0xdbf(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    173e <main+0x56e>
cmpq   $0x0,-0x830(%rbp)
jne    128f <main+0xbf>
lea    0xdc3(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    173e <main+0x56e>
mov    -0x828(%rbp),%rdi
call   1060 <strlen@plt>
cltq
cmp    $0x39c,%rax
jbe    12c3 <main+0xf3>
lea    0xdb8(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    173e <main+0x56e>
lea    -0x420(%rbp),%rdi
mov    -0x828(%rbp),%rsi
call   10c0 <strcat@plt>
mov    -0x830(%rbp),%rdi
lea    0xdb1(%rip),%rsi
mov    $0x4,%edx
call   1040 <strncmp@plt>
cmp    $0x0,%rax
jne    1310 <main+0x140>
lea    -0x420(%rbp),%rdi
lea    0xd94(%rip),%rsi
call   10c0 <strcat@plt>
jmp    155a <main+0x38a>
mov    -0x830(%rbp),%rdi
lea    0xd8f(%rip),%rsi
mov    $0x4,%edx
call   1040 <strncmp@plt>
cmp    $0x0,%rax
jne    134a <main+0x17a>
lea    -0x420(%rbp),%rdi
lea    0xd72(%rip),%rsi
call   10c0 <strcat@plt>
jmp    1555 <main+0x385>
mov    -0x830(%rbp),%rdi
lea    0xd6d(%rip),%rsi
mov    $0x4,%edx
call   1040 <strncmp@plt>
cmp    $0x0,%rax
jne    1384 <main+0x1b4>
lea    -0x420(%rbp),%rdi
lea    0xd20(%rip),%rsi
call   10c0 <strcat@plt>
jmp    1550 <main+0x380>
mov    -0x830(%rbp),%rdi
lea    0xd38(%rip),%rsi
mov    $0x4,%edx
call   1040 <strncmp@plt>
cmp    $0x0,%rax
jne    13be <main+0x1ee>
lea    -0x420(%rbp),%rdi
lea    0xcfe(%rip),%rsi
call   10c0 <strcat@plt>
jmp    154b <main+0x37b>
mov    -0x830(%rbp),%rdi
lea    0xd03(%rip),%rsi
mov    $0x4,%edx
call   1040 <strncmp@plt>
cmp    $0x0,%rax
jne    13f8 <main+0x228>
lea    -0x420(%rbp),%rdi
lea    0xcc4(%rip),%rsi
call   10c0 <strcat@plt>
jmp    1546 <main+0x376>
mov    -0x830(%rbp),%rdi
lea    0xcce(%rip),%rsi
mov    $0x4,%edx
call   1040 <strncmp@plt>
cmp    $0x0,%rax
jne    1432 <main+0x262>
lea    -0x420(%rbp),%rdi
lea    0xc8a(%rip),%rsi
call   10c0 <strcat@plt>
jmp    1541 <main+0x371>
mov    -0x830(%rbp),%rdi
lea    0xc99(%rip),%rsi
mov    $0x4,%edx
call   1040 <strncmp@plt>
cmp    $0x0,%rax
jne    146c <main+0x29c>
lea    -0x420(%rbp),%rdi
lea    0xc50(%rip),%rsi
call   10c0 <strcat@plt>
jmp    153c <main+0x36c>
mov    -0x830(%rbp),%rdi
lea    0xc64(%rip),%rsi
mov    $0x4,%edx
call   1040 <strncmp@plt>
cmp    $0x0,%rax
jne    14a6 <main+0x2d6>
lea    -0x420(%rbp),%rdi
lea    0xc16(%rip),%rsi
call   10c0 <strcat@plt>
jmp    1537 <main+0x367>
mov    -0x830(%rbp),%rdi
lea    0xc2f(%rip),%rsi
mov    $0x3,%edx
call   1040 <strncmp@plt>
cmp    $0x0,%rax
jne    14e0 <main+0x310>
lea    -0x420(%rbp),%rdi
lea    0xbdc(%rip),%rsi
call   10c0 <strcat@plt>
jmp    1532 <main+0x362>
mov    -0x830(%rbp),%rdi
lea    0xbf9(%rip),%rsi
mov    $0x3,%edx
call   1040 <strncmp@plt>
cmp    $0x0,%rax
jne    151a <main+0x34a>
lea    -0x420(%rbp),%rdi
lea    0xb8a(%rip),%rsi
call   10c0 <strcat@plt>
jmp    152d <main+0x35d>
lea    -0x420(%rbp),%rdi
lea    0xb72(%rip),%rsi
call   10c0 <strcat@plt>
jmp    1532 <main+0x362>
jmp    1537 <main+0x367>
jmp    153c <main+0x36c>
jmp    1541 <main+0x371>
jmp    1546 <main+0x376>
jmp    154b <main+0x37b>
jmp    1550 <main+0x380>
jmp    1555 <main+0x385>
jmp    155a <main+0x38a>
lea    -0x820(%rbp),%rdi
mov    -0x828(%rbp),%rsi
call   10c0 <strcat@plt>
lea    -0x820(%rbp),%rdi
lea    0xb70(%rip),%rsi
call   10c0 <strcat@plt>
lea    -0x420(%rbp),%rdi
lea    0xb71(%rip),%rsi
call   10b0 <fopen@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    15c3 <main+0x3f3>
lea    -0x420(%rbp),%rsi
lea    0xb51(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    173e <main+0x56e>
lea    -0x820(%rbp),%rdi
lea    0xb45(%rip),%rsi
call   10b0 <fopen@plt>
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
jne    1606 <main+0x436>
lea    -0x820(%rbp),%rsi
lea    0xb25(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    173e <main+0x56e>
mov    -0x20(%rbp),%rsi
lea    0xb22(%rip),%rdi
call   1080 <fputs@plt>
mov    -0x20(%rbp),%rsi
lea    0xb12(%rip),%rdi
call   1080 <fputs@plt>
mov    -0x20(%rbp),%rsi
lea    0xb29(%rip),%rdi
call   1080 <fputs@plt>
mov    -0x20(%rbp),%rsi
lea    0xb19(%rip),%rdi
call   1080 <fputs@plt>
mov    -0x20(%rbp),%rsi
lea    0xb0b(%rip),%rdi
call   1080 <fputs@plt>
mov    -0x18(%rbp),%rdi
call   10f0 <getc@plt>
mov    %al,-0x835(%rbp)
mov    -0x18(%rbp),%rdi
call   10a0 <feof@plt>
cmp    $0x0,%rax
je     167d <main+0x4ad>
jmp    1715 <main+0x545>
lea    -0x838(%rbp),%rdi
xor    %esi,%esi
mov    $0x2,%edx
call   1090 <memset@plt>
cmpl   $0x10,-0x834(%rbp)
jl     16b7 <main+0x4e7>
mov    -0x20(%rbp),%rsi
lea    0xab2(%rip),%rdi
call   1080 <fputs@plt>
movl   $0x0,-0x834(%rbp)
mov    -0x20(%rbp),%rsi
lea    0xab7(%rip),%rdi
call   1080 <fputs@plt>
lea    -0x838(%rbp),%rdi
lea    0xaa7(%rip),%rsi
movzbl -0x835(%rbp),%edx
call   10d0 <sprintf@plt>
lea    -0x838(%rbp),%rdi
mov    -0x20(%rbp),%rsi
call   1080 <fputs@plt>
mov    -0x20(%rbp),%rsi
lea    0xa85(%rip),%rdi
call   1080 <fputs@plt>
mov    -0x834(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x834(%rbp)
jmp    1656 <main+0x486>
mov    -0x20(%rbp),%rsi
lea    0xa64(%rip),%rdi
call   1080 <fputs@plt>
mov    -0x18(%rbp),%rdi
call   1050 <fclose@plt>
mov    -0x20(%rbp),%rdi
call   1050 <fclose@plt>
xor    %edi,%edi
call   10e0 <exit@plt>
mov    -0x4(%rbp),%eax
add    $0x840,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x818,%rsp
lea    0x410(%rsp),%rdi
xor    %esi,%esi
mov    $0x400,%edx
call   10a0 <memset@plt>
lea    0x10(%rsp),%rdi
xor    %esi,%esi
mov    $0x400,%edx
call   10a0 <memset@plt>
lea    0xdc3(%rip),%rdi
call   1030 <getenv@plt>
mov    %rax,%rbx
lea    0xdbf(%rip),%rdi
call   1030 <getenv@plt>
test   %rbx,%rbx
je     1276 <main+0x76>
mov    %rax,%r14
test   %rax,%rax
je     127f <main+0x7f>
mov    %rbx,%rdi
call   1070 <strlen@plt>
cmp    $0x39d,%eax
jb     12a2 <main+0xa2>
lea    0xee6(%rip),%rdi
jmp    1286 <main+0x86>
lea    0xe8a(%rip),%rdi
jmp    1286 <main+0x86>
lea    0xeac(%rip),%rdi
call   1050 <puts@plt>
mov    $0xffffffff,%eax
add    $0x818,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
lea    0x410(%rsp),%rdi
mov    %rbx,%rsi
call   10e0 <strcat@plt>
lea    0xd5a(%rip),%rsi
mov    %r14,%rdi
mov    $0x4,%edx
call   1040 <strncmp@plt>
lea    0xd4b(%rip),%rbp
test   %rax,%rax
je     13c5 <main+0x1c5>
lea    0xd4e(%rip),%rsi
mov    %r14,%rdi
mov    $0x4,%edx
call   1040 <strncmp@plt>
lea    0xd3f(%rip),%r15
test   %rax,%rax
je     13c8 <main+0x1c8>
lea    0xd42(%rip),%rsi
mov    %r14,%rdi
mov    $0x4,%edx
call   1040 <strncmp@plt>
test   %rax,%rax
je     13c5 <main+0x1c5>
lea    0xd2a(%rip),%rsi
mov    %r14,%rdi
mov    $0x4,%edx
call   1040 <strncmp@plt>
test   %rax,%rax
je     13c8 <main+0x1c8>
lea    0xd12(%rip),%rsi
mov    %r14,%rdi
mov    $0x4,%edx
call   1040 <strncmp@plt>
test   %rax,%rax
je     13c8 <main+0x1c8>
lea    0xcfe(%rip),%rsi
mov    %r14,%rdi
mov    $0x4,%edx
call   1040 <strncmp@plt>
test   %rax,%rax
je     13c8 <main+0x1c8>
lea    0xcea(%rip),%rsi
mov    %r14,%rdi
mov    $0x4,%edx
call   1040 <strncmp@plt>
test   %rax,%rax
je     13c8 <main+0x1c8>
lea    0xcd6(%rip),%rsi
mov    %r14,%rdi
mov    $0x4,%edx
call   1040 <strncmp@plt>
test   %rax,%rax
je     13c8 <main+0x1c8>
lea    0xcc2(%rip),%rsi
mov    %r14,%rdi
mov    $0x3,%edx
call   1040 <strncmp@plt>
test   %rax,%rax
je     13c8 <main+0x1c8>
lea    0xcad(%rip),%rsi
mov    %r14,%rdi
mov    $0x3,%edx
call   1040 <strncmp@plt>
mov    %rbp,%r15
lea    0x410(%rsp),%r14
mov    %r14,%rdi
mov    %r15,%rsi
call   10e0 <strcat@plt>
lea    0x10(%rsp),%rbp
mov    %rbp,%rdi
mov    %rbx,%rsi
call   10e0 <strcat@plt>
lea    0xc77(%rip),%rsi
mov    %rbp,%rdi
call   10e0 <strcat@plt>
lea    0xc7c(%rip),%rsi
mov    %r14,%rdi
call   10d0 <fopen@plt>
test   %rax,%rax
je     1435 <main+0x235>
mov    %rax,%rbx
lea    0xc7c(%rip),%rsi
lea    0x10(%rsp),%rdi
call   10d0 <fopen@plt>
test   %rax,%rax
jne    1450 <main+0x250>
lea    0xc68(%rip),%rdi
lea    0x10(%rsp),%rsi
jmp    1444 <main+0x244>
lea    0xc43(%rip),%rdi
lea    0x410(%rsp),%rsi
xor    %eax,%eax
call   1080 <printf@plt>
jmp    128b <main+0x8b>
mov    %rax,%r14
lea    0xc57(%rip),%rbp
mov    $0x28,%esi
mov    $0x1,%edx
mov    %rbp,%rdi
mov    %rax,%rcx
call   1110 <fwrite@plt>
mov    $0x28,%esi
mov    $0x1,%edx
mov    %rbp,%rdi
mov    %r14,%rcx
call   1110 <fwrite@plt>
mov    $0xa,%edi
mov    %r14,%rsi
call   10b0 <fputc@plt>
mov    $0xa,%edi
mov    %r14,%rsi
call   10b0 <fputc@plt>
lea    0xc35(%rip),%rdi
mov    $0x1c,%esi
mov    $0x1,%edx
mov    %r14,%rcx
call   1110 <fwrite@plt>
mov    %rbx,%rdi
call   1120 <getc@plt>
mov    %eax,%r12d
mov    %rbx,%rdi
call   10c0 <feof@plt>
test   %rax,%rax
jne    1576 <main+0x376>
xor    %r13d,%r13d
lea    0xd(%rsp),%r15
lea    0xc1d(%rip),%rbp
jmp    154c <main+0x34c>
mov    $0x2,%esi
mov    $0x1,%edx
lea    0xc02(%rip),%rdi
mov    %r14,%rcx
call   1110 <fwrite@plt>
movzbl %r12b,%edx
mov    %r15,%rdi
lea    0xbef(%rip),%rsi
call   10f0 <sprintf@plt>
mov    %r15,%rdi
mov    %r14,%rsi
call   1090 <fputs@plt>
mov    $0x2,%esi
mov    $0x1,%edx
mov    %rbp,%rdi
mov    %r14,%rcx
call   1110 <fwrite@plt>
add    $0x1,%r13d
mov    %rbx,%rdi
call   1120 <getc@plt>
mov    %eax,%r12d
mov    %rbx,%rdi
call   10c0 <feof@plt>
test   %rax,%rax
jne    1576 <main+0x376>
mov    %r15,%rdi
xor    %esi,%esi
mov    $0x2,%edx
call   10a0 <memset@plt>
cmp    $0x10,%r13d
jl     14e4 <main+0x2e4>
mov    $0xa,%edi
mov    %r14,%rsi
call   10b0 <fputc@plt>
xor    %r13d,%r13d
jmp    14e4 <main+0x2e4>
lea    0xb85(%rip),%rdi
mov    $0x4,%esi
mov    $0x1,%edx
mov    %r14,%rcx
call   1110 <fwrite@plt>
mov    %rbx,%rdi
call   1060 <fclose@plt>
mov    %r14,%rdi
call   1060 <fclose@plt>
xor    %edi,%edi
call   1100 <exit@plt>

LLVM IR (-O0):
@.str = [11 x i8] c"RT28xx_DIR\00"
@.str.1 = [8 x i8] c"CHIPSET\00"
@.str.2 = [44 x i8] c"Environment value \22RT28xx_DIR\22 not export \0A\00"
@.str.3 = [41 x i8] c"Environment value \22CHIPSET\22 not export \0A\00"
@.str.4 = [45 x i8] c"Environment value \22RT28xx_DIR\22 is too long!\0A\00"
@.str.5 = [5 x i8] c"2860\00"
@.str.6 = [19 x i8] c"/common/rt2860.bin\00"
@.str.7 = [5 x i8] c"2870\00"
@.str.8 = [19 x i8] c"/common/rt2870.bin\00"
@.str.9 = [5 x i8] c"3090\00"
@.str.10 = [5 x i8] c"2070\00"
@.str.11 = [5 x i8] c"3070\00"
@.str.12 = [5 x i8] c"3572\00"
@.str.13 = [5 x i8] c"3370\00"
@.str.14 = [5 x i8] c"5370\00"
@.str.15 = [4 x i8] c"USB\00"
@.str.16 = [4 x i8] c"PCI\00"
@.str.17 = [20 x i8] c"/include/firmware.h\00"
@.str.18 = [2 x i8] c"r\00"
@.str.19 = [21 x i8] c"Can't read file %s \0A\00"
@.str.20 = [2 x i8] c"w\00"
@.str.21 = [27 x i8] c"Can't open write file %s \0A\00"
@.str.22 = [41 x i8] c"/* AUTO GEN PLEASE DO NOT MODIFY IT */ \0A\00"
@.str.23 = [2 x i8] c"\0A\00"
@.str.24 = [29 x i8] c"UCHAR FirmwareImage [] = { \0A\00"
@.str.25 = [3 x i8] c"0x\00"
@.str.26 = [5 x i8] c"%02x\00"
@.str.27 = [3 x i8] c", \00"
@.str.28 = [5 x i8] c"} ;\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32*
%7 = alloca i32*
%8 = alloca [1024 x i8]
%9 = alloca [1024 x i8]
%10 = alloca i8*
%11 = alloca i8*
%12 = alloca i32
%13 = alloca i8
%14 = alloca [3 x i8]
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 0, i32* %12
%15 = getelementptr inbounds [1024 x i8], [1024 x i8]* %8, i64 0, i64 0
%16 = call i32 @memset(i8* %15, i32 0, i32 1024)
%17 = getelementptr inbounds [1024 x i8], [1024 x i8]* %9, i64 0, i64 0
%18 = call i32 @memset(i8* %17, i32 0, i32 1024)
%19 = call i64 @getenv(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
%20 = inttoptr i64 %19 to i8*
store i8* %20, i8** %10
%21 = call i64 @getenv(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
%22 = inttoptr i64 %21 to i8*
store i8* %22, i8** %11
%23 = load i8*, i8** %10
%24 = icmp ne i8* %23, null
br i1 %24, label %27, label %25
25: ; preds = %2
%26 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.2, i64 0, i64 0))
store i32 -1, i32* %3
br label %192
27: ; preds = %2
%28 = load i8*, i8** %11
%29 = icmp ne i8* %28, null
br i1 %29, label %32, label %30
30: ; preds = %27
%31 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.3, i64 0, i64 0))
store i32 -1, i32* %3
br label %192
32: ; preds = %27
%33 = load i8*, i8** %10
%34 = call i32 @strlen(i8* %33)
%35 = sext i32 %34 to i64
%36 = icmp ugt i64 %35, 924
br i1 %36, label %37, label %39
37: ; preds = %32
%38 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.4, i64 0, i64 0))
store i32 -1, i32* %3
br label %192
39: ; preds = %32
%40 = getelementptr inbounds [1024 x i8], [1024 x i8]* %8, i64 0, i64 0
%41 = load i8*, i8** %10
%42 = call i32 @strcat(i8* %40, i8* %41)
%43 = load i8*, i8** %11
%44 = call i64 @strncmp(i8* %43, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.5, i64 0, i64 0), i32 4)
%45 = icmp eq i64 %44, 0
br i1 %45, label %46, label %49
46: ; preds = %39
%47 = getelementptr inbounds [1024 x i8], [1024 x i8]* %8, i64 0, i64 0
%48 = call i32 @strcat(i8* %47, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.6, i64 0, i64 0))
br label %124
49: ; preds = %39
%50 = load i8*, i8** %11
%51 = call i64 @strncmp(i8* %50, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.7, i64 0, i64 0), i32 4)
%52 = icmp eq i64 %51, 0
br i1 %52, label %53, label %56
53: ; preds = %49
%54 = getelementptr inbounds [1024 x i8], [1024 x i8]* %8, i64 0, i64 0
%55 = call i32 @strcat(i8* %54, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.8, i64 0, i64 0))
br label %123
56: ; preds = %49
%57 = load i8*, i8** %11
%58 = call i64 @strncmp(i8* %57, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.9, i64 0, i64 0), i32 4)
%59 = icmp eq i64 %58, 0
br i1 %59, label %60, label %63
60: ; preds = %56
%61 = getelementptr inbounds [1024 x i8], [1024 x i8]* %8, i64 0, i64 0
%62 = call i32 @strcat(i8* %61, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.6, i64 0, i64 0))
br label %122
63: ; preds = %56
%64 = load i8*, i8** %11
%65 = call i64 @strncmp(i8* %64, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.10, i64 0, i64 0), i32 4)
%66 = icmp eq i64 %65, 0
br i1 %66, label %67, label %70
67: ; preds = %63
%68 = getelementptr inbounds [1024 x i8], [1024 x i8]* %8, i64 0, i64 0
%69 = call i32 @strcat(i8* %68, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.8, i64 0, i64 0))
br label %121
70: ; preds = %63
%71 = load i8*, i8** %11
%72 = call i64 @strncmp(i8* %71, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.11, i64 0, i64 0), i32 4)
%73 = icmp eq i64 %72, 0
br i1 %73, label %74, label %77
74: ; preds = %70
%75 = getelementptr inbounds [1024 x i8], [1024 x i8]* %8, i64 0, i64 0
%76 = call i32 @strcat(i8* %75, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.8, i64 0, i64 0))
br label %120
77: ; preds = %70
%78 = load i8*, i8** %11
%79 = call i64 @strncmp(i8* %78, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.12, i64 0, i64 0), i32 4)
%80 = icmp eq i64 %79, 0
br i1 %80, label %81, label %84
81: ; preds = %77
%82 = getelementptr inbounds [1024 x i8], [1024 x i8]* %8, i64 0, i64 0
%83 = call i32 @strcat(i8* %82, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.8, i64 0, i64 0))
br label %119
84: ; preds = %77
%85 = load i8*, i8** %11
%86 = call i64 @strncmp(i8* %85, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.13, i64 0, i64 0), i32 4)
%87 = icmp eq i64 %86, 0
br i1 %87, label %88, label %91
88: ; preds = %84
%89 = getelementptr inbounds [1024 x i8], [1024 x i8]* %8, i64 0, i64 0
%90 = call i32 @strcat(i8* %89, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.8, i64 0, i64 0))
br label %118
91: ; preds = %84
%92 = load i8*, i8** %11
%93 = call i64 @strncmp(i8* %92, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.14, i64 0, i64 0), i32 4)
%94 = icmp eq i64 %93, 0
br i1 %94, label %95, label %98
95: ; preds = %91
%96 = getelementptr inbounds [1024 x i8], [1024 x i8]* %8, i64 0, i64 0
%97 = call i32 @strcat(i8* %96, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.8, i64 0, i64 0))
br label %117
98: ; preds = %91
%99 = load i8*, i8** %11
%100 = call i64 @strncmp(i8* %99, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.15, i64 0, i64 0), i32 3)
%101 = icmp eq i64 %100, 0
br i1 %101, label %102, label %105
102: ; preds = %98
%103 = getelementptr inbounds [1024 x i8], [1024 x i8]* %8, i64 0, i64 0
%104 = call i32 @strcat(i8* %103, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.8, i64 0, i64 0))
br label %116
105: ; preds = %98
%106 = load i8*, i8** %11
%107 = call i64 @strncmp(i8* %106, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.16, i64 0, i64 0), i32 3)
%108 = icmp eq i64 %107, 0
br i1 %108, label %109, label %112
109: ; preds = %105
%110 = getelementptr inbounds [1024 x i8], [1024 x i8]* %8, i64 0, i64 0
%111 = call i32 @strcat(i8* %110, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.6, i64 0, i64 0))
br label %115
112: ; preds = %105
%113 = getelementptr inbounds [1024 x i8], [1024 x i8]* %8, i64 0, i64 0
%114 = call i32 @strcat(i8* %113, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.6, i64 0, i64 0))
br label %115
115: ; preds = %112, %109
br label %116
116: ; preds = %115, %102
br label %117
117: ; preds = %116, %95
br label %118
118: ; preds = %117, %88
br label %119
119: ; preds = %118, %81
br label %120
120: ; preds = %119, %74
br label %121
121: ; preds = %120, %67
br label %122
122: ; preds = %121, %60
br label %123
123: ; preds = %122, %53
br label %124
124: ; preds = %123, %46
%125 = getelementptr inbounds [1024 x i8], [1024 x i8]* %9, i64 0, i64 0
%126 = load i8*, i8** %10
%127 = call i32 @strcat(i8* %125, i8* %126)
%128 = getelementptr inbounds [1024 x i8], [1024 x i8]* %9, i64 0, i64 0
%129 = call i32 @strcat(i8* %128, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.17, i64 0, i64 0))
%130 = getelementptr inbounds [1024 x i8], [1024 x i8]* %8, i64 0, i64 0
%131 = call i32* @fopen(i8* %130, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.18, i64 0, i64 0))
store i32* %131, i32** %6
%132 = load i32*, i32** %6
%133 = icmp eq i32* %132, null
br i1 %133, label %134, label %137
134: ; preds = %124
%135 = getelementptr inbounds [1024 x i8], [1024 x i8]* %8, i64 0, i64 0
%136 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.19, i64 0, i64 0), i8* %135)
store i32 -1, i32* %3
br label %192
137: ; preds = %124
%138 = getelementptr inbounds [1024 x i8], [1024 x i8]* %9, i64 0, i64 0
%139 = call i32* @fopen(i8* %138, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.20, i64 0, i64 0))
store i32* %139, i32** %7
%140 = load i32*, i32** %7
%141 = icmp eq i32* %140, null
br i1 %141, label %142, label %145
142: ; preds = %137
%143 = getelementptr inbounds [1024 x i8], [1024 x i8]* %9, i64 0, i64 0
%144 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.21, i64 0, i64 0), i8* %143)
store i32 -1, i32* %3
br label %192
145: ; preds = %137
%146 = load i32*, i32** %7
%147 = call i32 @fputs(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.22, i64 0, i64 0), i32* %146)
%148 = load i32*, i32** %7
%149 = call i32 @fputs(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.22, i64 0, i64 0), i32* %148)
%150 = load i32*, i32** %7
%151 = call i32 @fputs(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.23, i64 0, i64 0), i32* %150)
%152 = load i32*, i32** %7
%153 = call i32 @fputs(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.23, i64 0, i64 0), i32* %152)
%154 = load i32*, i32** %7
%155 = call i32 @fputs(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.24, i64 0, i64 0), i32* %154)
br label %156
156: ; preds = %145, %171
%157 = load i32*, i32** %6
%158 = call zeroext i8 @getc(i32* %157)
store i8 %158, i8* %13
%159 = load i32*, i32** %6
%160 = call i64 @feof(i32* %159)
%161 = icmp ne i64 %160, 0
br i1 %161, label %162, label %163
162: ; preds = %156
br label %184
163: ; preds = %156
%164 = getelementptr inbounds [3 x i8], [3 x i8]* %14, i64 0, i64 0
%165 = call i32 @memset(i8* %164, i32 0, i32 2)
%166 = load i32, i32* %12
%167 = icmp sge i32 %166, 16
br i1 %167, label %168, label %171
168: ; preds = %163
%169 = load i32*, i32** %7
%170 = call i32 @fputs(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.23, i64 0, i64 0), i32* %169)
store i32 0, i32* %12
br label %171
171: ; preds = %168, %163
%172 = load i32*, i32** %7
%173 = call i32 @fputs(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.25, i64 0, i64 0), i32* %172)
%174 = getelementptr inbounds [3 x i8], [3 x i8]* %14, i64 0, i64 0
%175 = load i8, i8* %13
%176 = call i32 @sprintf(i8* %174, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.26, i64 0, i64 0), i8 zeroext %175)
%177 = getelementptr inbounds [3 x i8], [3 x i8]* %14, i64 0, i64 0
%178 = load i32*, i32** %7
%179 = call i32 @fputs(i8* %177, i32* %178)
%180 = load i32*, i32** %7
%181 = call i32 @fputs(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.27, i64 0, i64 0), i32* %180)
%182 = load i32, i32* %12
%183 = add nsw i32 %182, 1
store i32 %183, i32* %12
br label %156
184: ; preds = %162
%185 = load i32*, i32** %7
%186 = call i32 @fputs(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.28, i64 0, i64 0), i32* %185)
%187 = load i32*, i32** %6
%188 = call i32 @fclose(i32* %187)
%189 = load i32*, i32** %7
%190 = call i32 @fclose(i32* %189)
%191 = call i32 @exit(i32 0)
unreachable
192: ; preds = %142, %134, %37, %30, %25
%193 = load i32, i32* %3
ret i32 %193
}

LLVM IR (-O2):
@.str = [11 x i8] c"RT28xx_DIR\00"
@.str.1 = [8 x i8] c"CHIPSET\00"
@.str.5 = [5 x i8] c"2860\00"
@.str.6 = [19 x i8] c"/common/rt2860.bin\00"
@.str.7 = [5 x i8] c"2870\00"
@.str.8 = [19 x i8] c"/common/rt2870.bin\00"
@.str.9 = [5 x i8] c"3090\00"
@.str.10 = [5 x i8] c"2070\00"
@.str.11 = [5 x i8] c"3070\00"
@.str.12 = [5 x i8] c"3572\00"
@.str.13 = [5 x i8] c"3370\00"
@.str.14 = [5 x i8] c"5370\00"
@.str.15 = [4 x i8] c"USB\00"
@.str.16 = [4 x i8] c"PCI\00"
@.str.17 = [20 x i8] c"/include/firmware.h\00"
@.str.18 = [2 x i8] c"r\00"
@.str.19 = [21 x i8] c"Can't read file %s \0A\00"
@.str.20 = [2 x i8] c"w\00"
@.str.21 = [27 x i8] c"Can't open write file %s \0A\00"
@.str.22 = [41 x i8] c"/* AUTO GEN PLEASE DO NOT MODIFY IT */ \0A\00"
@.str.24 = [29 x i8] c"UCHAR FirmwareImage [] = { \0A\00"
@.str.25 = [3 x i8] c"0x\00"
@.str.26 = [5 x i8] c"%02x\00"
@.str.27 = [3 x i8] c", \00"
@.str.28 = [5 x i8] c"} ;\0A\00"
@str = [43 x i8] c"Environment value \22RT28xx_DIR\22 not export \00"
@str.29 = [40 x i8] c"Environment value \22CHIPSET\22 not export \00"
@str.30 = [44 x i8] c"Environment value \22RT28xx_DIR\22 is too long!\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [1024 x i8]
%4 = alloca [1024 x i8]
%5 = alloca [3 x i8]
%6 = getelementptr inbounds [1024 x i8], [1024 x i8]* %3, i64 0, i64 0
%7 = getelementptr inbounds [1024 x i8], [1024 x i8]* %4, i64 0, i64 0
%8 = call i32 @memset(i8* %6, i32 0, i32 1024)
%9 = call i32 @memset(i8* %7, i32 0, i32 1024)
%10 = call i64 @getenv(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
%11 = inttoptr i64 %10 to i8*
%12 = call i64 @getenv(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
%13 = inttoptr i64 %12 to i8*
%14 = icmp eq i64 %10, 0
br i1 %14, label %15, label %17
15: ; preds = %2
%16 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([43 x i8], [43 x i8]* @str, i64 0, i64 0))
br label %102
17: ; preds = %2
%18 = icmp eq i64 %12, 0
br i1 %18, label %19, label %21
19: ; preds = %17
%20 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([40 x i8], [40 x i8]* @str.29, i64 0, i64 0))
br label %102
21: ; preds = %17
%22 = call i32 @strlen(i8* %11)
%23 = icmp ugt i32 %22, 924
br i1 %23, label %24, label %26
24: ; preds = %21
%25 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([44 x i8], [44 x i8]* @str.30, i64 0, i64 0))
br label %102
26: ; preds = %21
%27 = call i32 @strcat(i8* %6, i8* %11)
%28 = call i64 @strncmp(i8* %13, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.5, i64 0, i64 0), i32 4)
%29 = icmp eq i64 %28, 0
br i1 %29, label %56, label %30
30: ; preds = %26
%31 = call i64 @strncmp(i8* %13, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.7, i64 0, i64 0), i32 4)
%32 = icmp eq i64 %31, 0
br i1 %32, label %56, label %33
33: ; preds = %30
%34 = call i64 @strncmp(i8* %13, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.9, i64 0, i64 0), i32 4)
%35 = icmp eq i64 %34, 0
br i1 %35, label %56, label %36
36: ; preds = %33
%37 = call i64 @strncmp(i8* %13, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.10, i64 0, i64 0), i32 4)
%38 = icmp eq i64 %37, 0
br i1 %38, label %56, label %39
39: ; preds = %36
%40 = call i64 @strncmp(i8* %13, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.11, i64 0, i64 0), i32 4)
%41 = icmp eq i64 %40, 0
br i1 %41, label %56, label %42
42: ; preds = %39
%43 = call i64 @strncmp(i8* %13, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.12, i64 0, i64 0), i32 4)
%44 = icmp eq i64 %43, 0
br i1 %44, label %56, label %45
45: ; preds = %42
%46 = call i64 @strncmp(i8* %13, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.13, i64 0, i64 0), i32 4)
%47 = icmp eq i64 %46, 0
br i1 %47, label %56, label %48
48: ; preds = %45
%49 = call i64 @strncmp(i8* %13, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.14, i64 0, i64 0), i32 4)
%50 = icmp eq i64 %49, 0
br i1 %50, label %56, label %51
51: ; preds = %48
%52 = call i64 @strncmp(i8* %13, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.15, i64 0, i64 0), i32 3)
%53 = icmp eq i64 %52, 0
br i1 %53, label %56, label %54
54: ; preds = %51
%55 = call i64 @strncmp(i8* %13, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.16, i64 0, i64 0), i32 3)
br label %56
56: ; preds = %51, %48, %45, %42, %39, %36, %33, %30, %26, %54
%57 = phi i8* [ getelementptr inbounds ([19 x i8], [19 x i8]* @.str.6, i64 0, i64 0), %54 ], [ getelementptr inbounds ([19 x i8], [19 x i8]* @.str.6, i64 0, i64 0), %26 ], [ getelementptr inbounds ([19 x i8], [19 x i8]* @.str.8, i64 0, i64 0), %30 ], [ getelementptr inbounds ([19 x i8], [19 x i8]* @.str.6, i64 0, i64 0), %33 ], [ getelementptr inbounds ([19 x i8], [19 x i8]* @.str.8, i64 0, i64 0), %36 ], [ getelementptr inbounds ([19 x i8], [19 x i8]* @.str.8, i64 0, i64 0), %39 ], [ getelementptr inbounds ([19 x i8], [19 x i8]* @.str.8, i64 0, i64 0), %42 ], [ getelementptr inbounds ([19 x i8], [19 x i8]* @.str.8, i64 0, i64 0), %45 ], [ getelementptr inbounds ([19 x i8], [19 x i8]* @.str.8, i64 0, i64 0), %48 ], [ getelementptr inbounds ([19 x i8], [19 x i8]* @.str.8, i64 0, i64 0), %51 ]
%58 = call i32 @strcat(i8* %6, i8* %57)
%59 = call i32 @strcat(i8* %7, i8* %11)
%60 = call i32 @strcat(i8* %7, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.17, i64 0, i64 0))
%61 = call i32* @fopen(i8* %6, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.18, i64 0, i64 0))
%62 = icmp eq i32* %61, null
br i1 %62, label %63, label %65
63: ; preds = %56
%64 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @.str.19, i64 0, i64 0), i8* %6)
br label %102
65: ; preds = %56
%66 = call i32* @fopen(i8* %7, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.20, i64 0, i64 0))
%67 = icmp eq i32* %66, null
br i1 %67, label %68, label %70
68: ; preds = %65
%69 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @.str.21, i64 0, i64 0), i8* %7)
br label %102
70: ; preds = %65
%71 = call i64 @fwrite(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.22, i64 0, i64 0), i64 40, i64 1, i32* %66)
%72 = call i64 @fwrite(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.22, i64 0, i64 0), i64 40, i64 1, i32* %66)
%73 = call i32 @fputc(i32 10, i32* %66)
%74 = call i32 @fputc(i32 10, i32* %66)
%75 = call i64 @fwrite(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.24, i64 0, i64 0), i64 28, i64 1, i32* %66)
%76 = getelementptr inbounds [3 x i8], [3 x i8]* %5, i64 0, i64 0
%77 = call zeroext i8 @getc(i32* %61)
%78 = call i64 @feof(i32* %61)
%79 = icmp eq i64 %78, 0
br i1 %79, label %80, label %97
80: ; preds = %70, %87
%81 = phi i8 [ %94, %87 ], [ %77, %70 ]
%82 = phi i32 [ %93, %87 ], [ 0, %70 ]
%83 = call i32 @memset(i8* %76, i32 0, i32 2)
%84 = icmp sgt i32 %82, 15
br i1 %84, label %85, label %87
85: ; preds = %80
%86 = call i32 @fputc(i32 10, i32* %66)
br label %87
87: ; preds = %80, %85
%88 = phi i32 [ 0, %85 ], [ %82, %80 ]
%89 = call i64 @fwrite(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.25, i64 0, i64 0), i64 2, i64 1, i32* %66)
%90 = call i32 @sprintf(i8* %76, i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.26, i64 0, i64 0), i8 zeroext %81)
%91 = call i32 @fputs(i8* %76, i32* %66)
%92 = call i64 @fwrite(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.27, i64 0, i64 0), i64 2, i64 1, i32* %66)
%93 = add nsw i32 %88, 1
%94 = call zeroext i8 @getc(i32* %61)
%95 = call i64 @feof(i32* %61)
%96 = icmp eq i64 %95, 0
br i1 %96, label %80, label %97
97: ; preds = %87, %70
%98 = call i64 @fwrite(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.28, i64 0, i64 0), i64 4, i64 1, i32* %66)
%99 = call i32 @fclose(i32* %61)
%100 = call i32 @fclose(i32* %66)
%101 = call i32 @exit(i32 0)
unreachable
102: ; preds = %68, %63, %24, %19, %15
ret i32 -1
}