#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*/ fprintf(int /*<<< orphan*/ *, char *, char *);
int /*<<< orphan*/ fputs(char *, int /*<<< orphan*/ *);
unsigned char getc(int /*<<< orphan*/ *);
scalar_t__ getenv(char *);
int /*<<< orphan*/ memcpy(char *, char *, int);
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);
char *strtok(char *, char *);
int main(int argc, char *argv[]) {
  FILE *infile, *outfile;
  char infname[1024];
  char outfname[1024];
  char chipsets[1024];
  char fw_name[128];
  char *rt28xxdir = NULL;
  char *chipset = NULL, *token;
  char *wow, *rt28xx_mode = NULL;
  int i = 0;
  unsigned char c;
  rt28xxdir = (char *)getenv("RT28xx_DIR");
  chipset = (char *)getenv("CHIPSET");
  memcpy(chipsets, chipset, strlen(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;
  }
  chipset = strtok(chipsets, " ");
  while (chipset != NULL) {
    printf("chipset = %s\n", chipset);
    memset(infname, 0, 1024);
    memset(outfname, 0, 1024);
    memset(fw_name, 0, 128);
    strcat(infname, rt28xxdir);
    strcat(outfname, rt28xxdir);
    if (strncmp(chipset, "2860", 4) == 0) {
      strcat(infname, "/mcu/bin/rt2860.bin");
      strcat(outfname, "/include/mcu/firmware.h");
      strcat(fw_name, "FirmwareImage");
    } else if (strncmp(chipset, "2870", 4) == 0) {
      strcat(infname, "/mcu/bin/rt2870.bin");
      strcat(outfname, "/include/mcu/firmware.h");
      strcat(fw_name, "FirmwareImage");
    } else if (strncmp(chipset, "3090", 4) == 0) {
      strcat(infname, "/mcu/bin/rt2860.bin");
      strcat(outfname, "/include/mcu/firmware.h");
      strcat(fw_name, "FirmwareImage");
    } else if (strncmp(chipset, "2070", 4) == 0) {
      strcat(infname, "/mcu/bin/rt2870.bin");
      strcat(outfname, "/include/mcu/firmware.h");
      strcat(fw_name, "FirmwareImage");
    } else if (strncmp(chipset, "3070", 4) == 0) {
      strcat(infname, "/mcu/bin/rt2870.bin");
      strcat(outfname, "/include/mcu/firmware.h");
      strcat(fw_name, "FirmwareImage");
    } else if (strncmp(chipset, "3572", 4) == 0) {
      strcat(infname, "/mcu/bin/rt2870.bin");
      strcat(outfname, "/include/mcu/firmware.h");
      strcat(fw_name, "FirmwareImage");
    } else if (strncmp(chipset, "3573", 4) == 0) {
      strcat(infname, "/mcu/bin/rt2870.bin");
      strcat(outfname, "/include/mcu/firmware.h");
      strcat(fw_name, "FirmwareImage");
    } else if (strncmp(chipset, "3370", 4) == 0) {
      strcat(infname, "/mcu/bin/rt2870.bin");
      strcat(outfname, "/include/mcu/firmware.h");
      strcat(fw_name, "FirmwareImage");
    } else if (strncmp(chipset, "5370", 4) == 0) {
      strcat(infname, "/mcu/bin/rt2870.bin");
      strcat(outfname, "/include/mcu/firmware.h");
      strcat(fw_name, "FirmwareImage");
    } else if (strncmp(chipset, "5572", 4) == 0) {
      strcat(infname, "/mcu/bin/rt2870.bin");
      strcat(outfname, "/include/mcu/firmware.h");
      strcat(fw_name, "FirmwareImage");
    } else if (strncmp(chipset, "5592", 4) == 0) {
      strcat(infname, "/mcu/bin/rt2860.bin");
      strcat(outfname, "/include/mcu/firmware.h");
      strcat(fw_name, "FirmwareImage");
    } else if (strncmp(chipset, "USB", 3) == 0) {
      strcat(infname, "/mcu/bin/rt2870.bin");
      strcat(outfname, "/include/mcu/firmware.h");
      strcat(fw_name, "FirmwareImage");
    } else if (strncmp(chipset, "PCI", 3) == 0) {
      strcat(infname, "/mcu/bin/rt2860.bin");
      strcat(outfname, "/include/mcu/firmware.h");
      strcat(fw_name, "FirmwareImage");
    } else if ((strncmp(chipset, "mt7650e", 7) == 0) ||
               (strncmp(chipset, "mt7650u", 7) == 0) ||
               (strncmp(chipset, "mt7630e", 7) == 0) ||
               (strncmp(chipset, "mt7630u", 7) == 0)) {
      strcat(infname, "/mcu/bin/MT7650.bin");
      strcat(outfname, "/include/mcu/MT7650_firmware.h");
      strcat(fw_name, "MT7650_FirmwareImage");
    } else if ((strncmp(chipset, "mt7610e", 7) == 0) ||
               (strncmp(chipset, "mt7610u", 7) == 0)) {
      strcat(infname, "/mcu/bin/MT7650.bin");
      strcat(outfname, "/include/mcu/MT7610_firmware.h");
      strcat(fw_name, "MT7610_FirmwareImage");
    } else if ((strncmp(chipset, "mt7662e", 7) == 0) ||
               (strncmp(chipset, "mt7662u", 7) == 0)) {
      strcat(infname, "/mcu/bin/MT7662.bin");
      strcat(outfname, "/include/mcu/MT7662_firmware.h");
      strcat(fw_name, "MT7662_FirmwareImage");
    } else if ((strncmp(chipset, "mt7612e", 7) == 0) ||
               (strncmp(chipset, "mt7612u", 7) == 0)) {
      strcat(infname, "/mcu/bin/MT7612.bin");
      strcat(outfname, "/include/mcu/MT7612_firmware.h");
      strcat(fw_name, "MT7612_FirmwareImage");
    } else {
      strcat(infname, "/mcu/bin/rt2860.bin");
      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);
    fprintf(outfile, "UCHAR %s[] = {\n", fw_name);
    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);
    chipset = strtok(NULL, " ");
  }
  exit(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xce0,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movq   $0x0,-0xca8(%rbp)
movq   $0x0,-0xcb0(%rbp)
movq   $0x0,-0xcc8(%rbp)
movl   $0x0,-0xccc(%rbp)
lea    0xdb5(%rip),%rdi
call   1030 <getenv@plt>
mov    %rax,-0xca8(%rbp)
lea    0xdad(%rip),%rdi
call   1030 <getenv@plt>
mov    %rax,-0xcb0(%rbp)
lea    -0xc20(%rbp),%rax
mov    %rax,-0xce0(%rbp)
mov    -0xcb0(%rbp),%rax
mov    %rax,-0xcd8(%rbp)
mov    -0xcb0(%rbp),%rdi
call   1060 <strlen@plt>
mov    -0xce0(%rbp),%rdi
mov    -0xcd8(%rbp),%rsi
mov    %eax,%edx
call   10c0 <memcpy@plt>
cmpq   $0x0,-0xca8(%rbp)
jne    12cf <main+0xcf>
lea    0xd57(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    1d4a <main+0xb4a>
cmpq   $0x0,-0xcb0(%rbp)
jne    12f7 <main+0xf7>
lea    0xd5b(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    1d4a <main+0xb4a>
mov    -0xca8(%rbp),%rdi
call   1060 <strlen@plt>
cltq
cmp    $0x39c,%rax
jbe    132b <main+0x12b>
lea    0xd50(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    1d4a <main+0xb4a>
lea    -0xc20(%rbp),%rdi
lea    0xfcf(%rip),%rsi
call   10e0 <strtok@plt>
mov    %rax,-0xcb0(%rbp)
cmpq   $0x0,-0xcb0(%rbp)
je     1d43 <main+0xb43>
mov    -0xcb0(%rbp),%rsi
lea    0xd34(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
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    -0xca0(%rbp),%rdi
xor    %esi,%esi
mov    $0x80,%edx
call   1090 <memset@plt>
lea    -0x420(%rbp),%rdi
mov    -0xca8(%rbp),%rsi
call   10f0 <strcat@plt>
lea    -0x820(%rbp),%rdi
mov    -0xca8(%rbp),%rsi
call   10f0 <strcat@plt>
mov    -0xcb0(%rbp),%rdi
lea    0xcce(%rip),%rsi
mov    $0x4,%edx
call   1040 <strncmp@plt>
cmp    $0x0,%rax
jne    1427 <main+0x227>
lea    -0x420(%rbp),%rdi
lea    0xcb1(%rip),%rsi
call   10f0 <strcat@plt>
lea    -0x820(%rbp),%rdi
lea    0xcb2(%rip),%rsi
call   10f0 <strcat@plt>
lea    -0xca0(%rbp),%rdi
lea    0xda3(%rip),%rsi
call   10f0 <strcat@plt>
jmp    1b69 <main+0x969>
mov    -0xcb0(%rbp),%rdi
lea    0xc9f(%rip),%rsi
mov    $0x4,%edx
call   1040 <strncmp@plt>
cmp    $0x0,%rax
jne    1487 <main+0x287>
lea    -0x420(%rbp),%rdi
lea    0xc82(%rip),%rsi
call   10f0 <strcat@plt>
lea    -0x820(%rbp),%rdi
lea    0xc52(%rip),%rsi
call   10f0 <strcat@plt>
lea    -0xca0(%rbp),%rdi
lea    0xd43(%rip),%rsi
call   10f0 <strcat@plt>
jmp    1b64 <main+0x964>
mov    -0xcb0(%rbp),%rdi
lea    0xc58(%rip),%rsi
mov    $0x4,%edx
call   1040 <strncmp@plt>
cmp    $0x0,%rax
jne    14e7 <main+0x2e7>
lea    -0x420(%rbp),%rdi
lea    0xbf1(%rip),%rsi
call   10f0 <strcat@plt>
lea    -0x820(%rbp),%rdi
lea    0xbf2(%rip),%rsi
call   10f0 <strcat@plt>
lea    -0xca0(%rbp),%rdi
lea    0xce3(%rip),%rsi
call   10f0 <strcat@plt>
jmp    1b5f <main+0x95f>
mov    -0xcb0(%rbp),%rdi
lea    0xbfd(%rip),%rsi
mov    $0x4,%edx
call   1040 <strncmp@plt>
cmp    $0x0,%rax
jne    1547 <main+0x347>
lea    -0x420(%rbp),%rdi
lea    0xbc2(%rip),%rsi
call   10f0 <strcat@plt>
lea    -0x820(%rbp),%rdi
lea    0xb92(%rip),%rsi
call   10f0 <strcat@plt>
lea    -0xca0(%rbp),%rdi
lea    0xc83(%rip),%rsi
call   10f0 <strcat@plt>
jmp    1b5a <main+0x95a>
mov    -0xcb0(%rbp),%rdi
lea    0xba2(%rip),%rsi
mov    $0x4,%edx
call   1040 <strncmp@plt>
cmp    $0x0,%rax
jne    15a7 <main+0x3a7>
lea    -0x420(%rbp),%rdi
lea    0xb62(%rip),%rsi
call   10f0 <strcat@plt>
lea    -0x820(%rbp),%rdi
lea    0xb32(%rip),%rsi
call   10f0 <strcat@plt>
lea    -0xca0(%rbp),%rdi
lea    0xc23(%rip),%rsi
call   10f0 <strcat@plt>
jmp    1b55 <main+0x955>
mov    -0xcb0(%rbp),%rdi
lea    0xb47(%rip),%rsi
mov    $0x4,%edx
call   1040 <strncmp@plt>
cmp    $0x0,%rax
jne    1607 <main+0x407>
lea    -0x420(%rbp),%rdi
lea    0xb02(%rip),%rsi
call   10f0 <strcat@plt>
lea    -0x820(%rbp),%rdi
lea    0xad2(%rip),%rsi
call   10f0 <strcat@plt>
lea    -0xca0(%rbp),%rdi
lea    0xbc3(%rip),%rsi
call   10f0 <strcat@plt>
jmp    1b50 <main+0x950>
mov    -0xcb0(%rbp),%rdi
lea    0xaec(%rip),%rsi
mov    $0x4,%edx
call   1040 <strncmp@plt>
cmp    $0x0,%rax
jne    1667 <main+0x467>
lea    -0x420(%rbp),%rdi
lea    0xaa2(%rip),%rsi
call   10f0 <strcat@plt>
lea    -0x820(%rbp),%rdi
lea    0xa72(%rip),%rsi
call   10f0 <strcat@plt>
lea    -0xca0(%rbp),%rdi
lea    0xb63(%rip),%rsi
call   10f0 <strcat@plt>
jmp    1b4b <main+0x94b>
mov    -0xcb0(%rbp),%rdi
lea    0xa91(%rip),%rsi
mov    $0x4,%edx
call   1040 <strncmp@plt>
cmp    $0x0,%rax
jne    16c7 <main+0x4c7>
lea    -0x420(%rbp),%rdi
lea    0xa42(%rip),%rsi
call   10f0 <strcat@plt>
lea    -0x820(%rbp),%rdi
lea    0xa12(%rip),%rsi
call   10f0 <strcat@plt>
lea    -0xca0(%rbp),%rdi
lea    0xb03(%rip),%rsi
call   10f0 <strcat@plt>
jmp    1b46 <main+0x946>
mov    -0xcb0(%rbp),%rdi
lea    0xa36(%rip),%rsi
mov    $0x4,%edx
call   1040 <strncmp@plt>
cmp    $0x0,%rax
jne    1727 <main+0x527>
lea    -0x420(%rbp),%rdi
lea    0x9e2(%rip),%rsi
call   10f0 <strcat@plt>
lea    -0x820(%rbp),%rdi
lea    0x9b2(%rip),%rsi
call   10f0 <strcat@plt>
lea    -0xca0(%rbp),%rdi
lea    0xaa3(%rip),%rsi
call   10f0 <strcat@plt>
jmp    1b41 <main+0x941>
mov    -0xcb0(%rbp),%rdi
lea    0x9db(%rip),%rsi
mov    $0x4,%edx
call   1040 <strncmp@plt>
cmp    $0x0,%rax
jne    1787 <main+0x587>
lea    -0x420(%rbp),%rdi
lea    0x982(%rip),%rsi
call   10f0 <strcat@plt>
lea    -0x820(%rbp),%rdi
lea    0x952(%rip),%rsi
call   10f0 <strcat@plt>
lea    -0xca0(%rbp),%rdi
lea    0xa43(%rip),%rsi
call   10f0 <strcat@plt>
jmp    1b3c <main+0x93c>
mov    -0xcb0(%rbp),%rdi
lea    0x980(%rip),%rsi
mov    $0x4,%edx
call   1040 <strncmp@plt>
cmp    $0x0,%rax
jne    17e7 <main+0x5e7>
lea    -0x420(%rbp),%rdi
lea    0x8f1(%rip),%rsi
call   10f0 <strcat@plt>
lea    -0x820(%rbp),%rdi
lea    0x8f2(%rip),%rsi
call   10f0 <strcat@plt>
lea    -0xca0(%rbp),%rdi
lea    0x9e3(%rip),%rsi
call   10f0 <strcat@plt>
jmp    1b37 <main+0x937>
mov    -0xcb0(%rbp),%rdi
lea    0x925(%rip),%rsi
mov    $0x3,%edx
call   1040 <strncmp@plt>
cmp    $0x0,%rax
jne    1847 <main+0x647>
lea    -0x420(%rbp),%rdi
lea    0x8c2(%rip),%rsi
call   10f0 <strcat@plt>
lea    -0x820(%rbp),%rdi
lea    0x892(%rip),%rsi
call   10f0 <strcat@plt>
lea    -0xca0(%rbp),%rdi
lea    0x983(%rip),%rsi
call   10f0 <strcat@plt>
jmp    1b32 <main+0x932>
mov    -0xcb0(%rbp),%rdi
lea    0x8c9(%rip),%rsi
mov    $0x3,%edx
call   1040 <strncmp@plt>
cmp    $0x0,%rax
jne    18a7 <main+0x6a7>
lea    -0x420(%rbp),%rdi
lea    0x831(%rip),%rsi
call   10f0 <strcat@plt>
lea    -0x820(%rbp),%rdi
lea    0x832(%rip),%rsi
call   10f0 <strcat@plt>
lea    -0xca0(%rbp),%rdi
lea    0x923(%rip),%rsi
call   10f0 <strcat@plt>
jmp    1b2d <main+0x92d>
mov    -0xcb0(%rbp),%rdi
lea    0x86d(%rip),%rsi
mov    $0x7,%edx
call   1040 <strncmp@plt>
cmp    $0x0,%rax
je     192f <main+0x72f>
mov    -0xcb0(%rbp),%rdi
lea    0x853(%rip),%rsi
mov    $0x7,%edx
call   1040 <strncmp@plt>
cmp    $0x0,%rax
je     192f <main+0x72f>
mov    -0xcb0(%rbp),%rdi
lea    0x839(%rip),%rsi
mov    $0x7,%edx
call   1040 <strncmp@plt>
cmp    $0x0,%rax
je     192f <main+0x72f>
mov    -0xcb0(%rbp),%rdi
lea    0x81f(%rip),%rsi
mov    $0x7,%edx
call   1040 <strncmp@plt>
cmp    $0x0,%rax
jne    196d <main+0x76d>
lea    -0x420(%rbp),%rdi
lea    0x805(%rip),%rsi
call   10f0 <strcat@plt>
lea    -0x820(%rbp),%rdi
lea    0x806(%rip),%rsi
call   10f0 <strcat@plt>
lea    -0xca0(%rbp),%rdi
lea    0x812(%rip),%rsi
call   10f0 <strcat@plt>
jmp    1b28 <main+0x928>
mov    -0xcb0(%rbp),%rdi
lea    0x80f(%rip),%rsi
mov    $0x7,%edx
call   1040 <strncmp@plt>
cmp    $0x0,%rax
je     19b1 <main+0x7b1>
mov    -0xcb0(%rbp),%rdi
lea    0x7f5(%rip),%rsi
mov    $0x7,%edx
call   1040 <strncmp@plt>
cmp    $0x0,%rax
jne    19ef <main+0x7ef>
lea    -0x420(%rbp),%rdi
lea    0x783(%rip),%rsi
call   10f0 <strcat@plt>
lea    -0x820(%rbp),%rdi
lea    0x7c8(%rip),%rsi
call   10f0 <strcat@plt>
lea    -0xca0(%rbp),%rdi
lea    0x7d4(%rip),%rsi
call   10f0 <strcat@plt>
jmp    1b23 <main+0x923>
mov    -0xcb0(%rbp),%rdi
lea    0x7d1(%rip),%rsi
mov    $0x7,%edx
call   1040 <strncmp@plt>
cmp    $0x0,%rax
je     1a33 <main+0x833>
mov    -0xcb0(%rbp),%rdi
lea    0x7b7(%rip),%rsi
mov    $0x7,%edx
call   1040 <strncmp@plt>
cmp    $0x0,%rax
jne    1a71 <main+0x871>
lea    -0x420(%rbp),%rdi
lea    0x79d(%rip),%rsi
call   10f0 <strcat@plt>
lea    -0x820(%rbp),%rdi
lea    0x79e(%rip),%rsi
call   10f0 <strcat@plt>
lea    -0xca0(%rbp),%rdi
lea    0x7aa(%rip),%rsi
call   10f0 <strcat@plt>
jmp    1b1e <main+0x91e>
mov    -0xcb0(%rbp),%rdi
lea    0x7a7(%rip),%rsi
mov    $0x7,%edx
call   1040 <strncmp@plt>
cmp    $0x0,%rax
je     1ab5 <main+0x8b5>
mov    -0xcb0(%rbp),%rdi
lea    0x78d(%rip),%rsi
mov    $0x7,%edx
call   1040 <strncmp@plt>
cmp    $0x0,%rax
jne    1af3 <main+0x8f3>
lea    -0x420(%rbp),%rdi
lea    0x773(%rip),%rsi
call   10f0 <strcat@plt>
lea    -0x820(%rbp),%rdi
lea    0x774(%rip),%rsi
call   10f0 <strcat@plt>
lea    -0xca0(%rbp),%rdi
lea    0x780(%rip),%rsi
call   10f0 <strcat@plt>
jmp    1b19 <main+0x919>
lea    -0x420(%rbp),%rdi
lea    0x5a7(%rip),%rsi
call   10f0 <strcat@plt>
lea    -0x820(%rbp),%rdi
lea    0x76a(%rip),%rsi
call   10f0 <strcat@plt>
jmp    1b1e <main+0x91e>
jmp    1b23 <main+0x923>
jmp    1b28 <main+0x928>
jmp    1b2d <main+0x92d>
jmp    1b32 <main+0x932>
jmp    1b37 <main+0x937>
jmp    1b3c <main+0x93c>
jmp    1b41 <main+0x941>
jmp    1b46 <main+0x946>
jmp    1b4b <main+0x94b>
jmp    1b50 <main+0x950>
jmp    1b55 <main+0x955>
jmp    1b5a <main+0x95a>
jmp    1b5f <main+0x95f>
jmp    1b64 <main+0x964>
jmp    1b69 <main+0x969>
lea    -0x420(%rbp),%rdi
lea    0x71b(%rip),%rsi
call   10d0 <fopen@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    1bac <main+0x9ac>
lea    -0x420(%rbp),%rsi
lea    0x6fb(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    1d4a <main+0xb4a>
lea    -0x820(%rbp),%rdi
lea    0x6ef(%rip),%rsi
call   10d0 <fopen@plt>
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
jne    1bef <main+0x9ef>
lea    -0x820(%rbp),%rsi
lea    0x6cf(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    1d4a <main+0xb4a>
mov    -0x20(%rbp),%rsi
lea    0x6cc(%rip),%rdi
call   1080 <fputs@plt>
mov    -0x20(%rbp),%rsi
lea    0x6bc(%rip),%rdi
call   1080 <fputs@plt>
mov    -0x20(%rbp),%rsi
lea    0x6d3(%rip),%rdi
call   1080 <fputs@plt>
mov    -0x20(%rbp),%rsi
lea    0x6c3(%rip),%rdi
call   1080 <fputs@plt>
mov    -0x20(%rbp),%rdi
lea    -0xca0(%rbp),%rdx
lea    0x6ae(%rip),%rsi
call   10a0 <fprintf@plt>
mov    -0x18(%rbp),%rdi
call   1120 <getc@plt>
mov    %al,-0xccd(%rbp)
mov    -0x18(%rbp),%rdi
call   10b0 <feof@plt>
cmp    $0x0,%rax
je     1c6d <main+0xa6d>
jmp    1d05 <main+0xb05>
lea    -0xcd0(%rbp),%rdi
xor    %esi,%esi
mov    $0x2,%edx
call   1090 <memset@plt>
cmpl   $0x10,-0xccc(%rbp)
jl     1ca7 <main+0xaa7>
mov    -0x20(%rbp),%rsi
lea    0x655(%rip),%rdi
call   1080 <fputs@plt>
movl   $0x0,-0xccc(%rbp)
mov    -0x20(%rbp),%rsi
lea    0x64d(%rip),%rdi
call   1080 <fputs@plt>
lea    -0xcd0(%rbp),%rdi
lea    0x63d(%rip),%rsi
movzbl -0xccd(%rbp),%edx
call   1100 <sprintf@plt>
lea    -0xcd0(%rbp),%rdi
mov    -0x20(%rbp),%rsi
call   1080 <fputs@plt>
mov    -0x20(%rbp),%rsi
lea    0x61b(%rip),%rdi
call   1080 <fputs@plt>
mov    -0xccc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xccc(%rbp)
jmp    1c46 <main+0xa46>
mov    -0x20(%rbp),%rsi
lea    0x5fa(%rip),%rdi
call   1080 <fputs@plt>
mov    -0x18(%rbp),%rdi
call   1050 <fclose@plt>
mov    -0x20(%rbp),%rdi
call   1050 <fclose@plt>
xor    %eax,%eax
mov    %eax,%edi
lea    0x5d6(%rip),%rsi
call   10e0 <strtok@plt>
mov    %rax,-0xcb0(%rbp)
jmp    1345 <main+0x145>
xor    %edi,%edi
call   1110 <exit@plt>
mov    -0x4(%rbp),%eax
add    $0xce0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0xc98,%rsp
lea    0xdb8(%rip),%rdi
call   1030 <getenv@plt>
mov    %rax,%rbp
lea    0xdb4(%rip),%rdi
call   1030 <getenv@plt>
mov    %rax,%rbx
mov    %rax,%rdi
call   1070 <strlen@plt>
lea    0x890(%rsp),%rdi
mov    %rbx,%rsi
mov    %eax,%edx
call   10e0 <memcpy@plt>
mov    %rbp,0x8(%rsp)
test   %rbp,%rbp
je     12a2 <main+0x72>
test   %rbx,%rbx
je     12ab <main+0x7b>
mov    0x8(%rsp),%rdi
call   1070 <strlen@plt>
cmp    $0x39d,%eax
jb     12ce <main+0x9e>
lea    0x1040(%rip),%rdi
jmp    12b2 <main+0x82>
lea    0xfe4(%rip),%rdi
jmp    12b2 <main+0x82>
lea    0x1006(%rip),%rdi
call   1050 <puts@plt>
mov    $0xffffffff,%eax
add    $0xc98,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
lea    0xfb1(%rip),%rsi
lea    0x890(%rsp),%rdi
call   1100 <strtok@plt>
test   %rax,%rax
je     1901 <main+0x6d1>
mov    %rax,%r15
lea    0x490(%rsp),%rbp
lea    0x90(%rsp),%r12
lea    0x10(%rsp),%r14
xor    %r13d,%r13d
jmp    1363 <main+0x133>
nopl   0x0(%rax,%rax,1)
mov    $0x4,%esi
mov    $0x1,%edx
lea    0xf67(%rip),%rdi
mov    %rbp,%rcx
call   1140 <fwrite@plt>
mov    %r15,%rdi
call   1060 <fclose@plt>
mov    %rbp,%rdi
call   1060 <fclose@plt>
xor    %edi,%edi
lea    0xf44(%rip),%rsi
call   1100 <strtok@plt>
mov    %rax,%r15
test   %rax,%rax
lea    0x490(%rsp),%rbp
lea    0x90(%rsp),%r12
je     1901 <main+0x6d1>
lea    0xca9(%rip),%rdi
mov    %r15,%rsi
xor    %eax,%eax
call   1080 <printf@plt>
mov    %rbp,%rdi
xor    %esi,%esi
mov    $0x400,%edx
call   10a0 <memset@plt>
mov    %r12,%rdi
xor    %esi,%esi
mov    $0x400,%edx
call   10a0 <memset@plt>
mov    %r14,%rdi
xor    %esi,%esi
mov    $0x80,%edx
call   10a0 <memset@plt>
mov    %rbp,%rdi
mov    0x8(%rsp),%rbx
mov    %rbx,%rsi
call   1110 <strcat@plt>
mov    %r12,%rdi
mov    %rbx,%rsi
call   1110 <strcat@plt>
mov    %r15,%rdi
lea    0xc5b(%rip),%rsi
mov    $0x4,%edx
call   1040 <strncmp@plt>
test   %rax,%rax
je     1680 <main+0x450>
mov    %r15,%rdi
lea    0xc6f(%rip),%rsi
mov    $0x4,%edx
call   1040 <strncmp@plt>
test   %rax,%rax
je     1690 <main+0x460>
mov    %r15,%rdi
lea    0xc6b(%rip),%rsi
mov    $0x4,%edx
call   1040 <strncmp@plt>
test   %rax,%rax
je     1680 <main+0x450>
mov    %r15,%rdi
lea    0xc53(%rip),%rsi
mov    $0x4,%edx
call   1040 <strncmp@plt>
test   %rax,%rax
je     1690 <main+0x460>
mov    %r15,%rdi
lea    0xc3b(%rip),%rsi
mov    $0x4,%edx
call   1040 <strncmp@plt>
test   %rax,%rax
je     1690 <main+0x460>
mov    %r15,%rdi
lea    0xc23(%rip),%rsi
mov    $0x4,%edx
call   1040 <strncmp@plt>
test   %rax,%rax
je     1690 <main+0x460>
mov    %r15,%rdi
lea    0xc0b(%rip),%rsi
mov    $0x4,%edx
call   1040 <strncmp@plt>
test   %rax,%rax
je     1690 <main+0x460>
mov    %r15,%rdi
lea    0xbf3(%rip),%rsi
mov    $0x4,%edx
call   1040 <strncmp@plt>
test   %rax,%rax
je     1690 <main+0x460>
mov    %r15,%rdi
lea    0xbdb(%rip),%rsi
mov    $0x4,%edx
call   1040 <strncmp@plt>
test   %rax,%rax
je     1690 <main+0x460>
mov    %r15,%rdi
lea    0xbc3(%rip),%rsi
mov    $0x4,%edx
call   1040 <strncmp@plt>
test   %rax,%rax
je     1690 <main+0x460>
mov    %r15,%rdi
lea    0xbab(%rip),%rsi
mov    $0x4,%edx
call   1040 <strncmp@plt>
test   %rax,%rax
je     1680 <main+0x450>
mov    %r15,%rdi
lea    0xb93(%rip),%rsi
mov    $0x3,%edx
call   1040 <strncmp@plt>
test   %rax,%rax
je     1690 <main+0x460>
mov    %r15,%rdi
lea    0xb7a(%rip),%rsi
mov    $0x3,%edx
call   1040 <strncmp@plt>
test   %rax,%rax
je     1680 <main+0x450>
mov    %r15,%rdi
lea    0xb61(%rip),%rsi
mov    $0x7,%edx
call   1040 <strncmp@plt>
test   %rax,%rax
je     1821 <main+0x5f1>
mov    %r15,%rdi
lea    0xb4c(%rip),%rsi
mov    $0x7,%edx
call   1040 <strncmp@plt>
test   %rax,%rax
je     1821 <main+0x5f1>
mov    %r15,%rdi
lea    0xb37(%rip),%rsi
mov    $0x7,%edx
call   1040 <strncmp@plt>
test   %rax,%rax
je     1821 <main+0x5f1>
mov    %r15,%rdi
lea    0xb22(%rip),%rsi
mov    $0x7,%edx
call   1040 <strncmp@plt>
test   %rax,%rax
je     1821 <main+0x5f1>
mov    %r15,%rdi
lea    0xb55(%rip),%rsi
mov    $0x7,%edx
call   1040 <strncmp@plt>
test   %rax,%rax
je     184e <main+0x61e>
mov    %r15,%rdi
lea    0xb40(%rip),%rsi
mov    $0x7,%edx
call   1040 <strncmp@plt>
test   %rax,%rax
je     184e <main+0x61e>
mov    %r15,%rdi
lea    0xb5f(%rip),%rsi
mov    $0x7,%edx
call   1040 <strncmp@plt>
test   %rax,%rax
je     187b <main+0x64b>
mov    %r15,%rdi
lea    0xb4a(%rip),%rsi
mov    $0x7,%edx
call   1040 <strncmp@plt>
test   %rax,%rax
je     187b <main+0x64b>
mov    %r15,%rdi
lea    0xb7d(%rip),%rsi
mov    $0x7,%edx
call   1040 <strncmp@plt>
test   %rax,%rax
je     18a8 <main+0x678>
mov    %r15,%rdi
lea    0xb68(%rip),%rsi
mov    $0x7,%edx
call   1040 <strncmp@plt>
test   %rax,%rax
je     18a8 <main+0x678>
mov    %rbp,%rdi
lea    0x9c5(%rip),%rsi
call   1110 <strcat@plt>
mov    %r12,%rdi
lea    0xb8c(%rip),%rsi
jmp    16b8 <main+0x488>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %rbp,%rdi
lea    0x99c(%rip),%rsi
jmp    169a <main+0x46a>
nopl   0x0(%rax)
mov    %rbp,%rdi
lea    0x9bd(%rip),%rsi
call   1110 <strcat@plt>
mov    %r12,%rdi
lea    0x991(%rip),%rsi
call   1110 <strcat@plt>
mov    %r14,%rdi
lea    0xa86(%rip),%rsi
call   1110 <strcat@plt>
mov    %rbp,%rdi
lea    0xb49(%rip),%rsi
call   10f0 <fopen@plt>
test   %rax,%rax
je     18d5 <main+0x6a5>
mov    %rax,%r15
mov    %r12,%rdi
lea    0xb45(%rip),%rsi
call   10f0 <fopen@plt>
test   %rax,%rax
je     18e6 <main+0x6b6>
mov    %rax,%rbp
mov    $0x28,%esi
mov    $0x1,%edx
lea    0xb40(%rip),%rbx
mov    %rbx,%rdi
mov    %rax,%rcx
call   1140 <fwrite@plt>
mov    $0x28,%esi
mov    $0x1,%edx
mov    %rbx,%rdi
mov    %rbp,%rcx
call   1140 <fwrite@plt>
mov    $0xa,%edi
mov    %rbp,%rsi
call   10b0 <fputc@plt>
mov    $0xa,%edi
mov    %rbp,%rsi
call   10b0 <fputc@plt>
mov    %rbp,%rdi
lea    0xb25(%rip),%rsi
mov    %r14,%rdx
call   10c0 <fprintf@plt>
mov    %r15,%rdi
call   1150 <getc@plt>
mov    %eax,%ebx
mov    %r15,%rdi
call   10d0 <feof@plt>
test   %rax,%rax
jne    1310 <main+0xe0>
lea    0x5(%rsp),%r12
jmp    17f3 <main+0x5c3>
cs nopw 0x0(%rax,%rax,1)
nop
mov    $0x2,%esi
mov    $0x1,%edx
lea    0xaec(%rip),%rdi
mov    %rbp,%rcx
call   1140 <fwrite@plt>
movzbl %bl,%edx
lea    0x5(%rsp),%r12
mov    %r12,%rdi
lea    0xad5(%rip),%rsi
call   1120 <sprintf@plt>
mov    %r12,%rdi
mov    %rbp,%rsi
call   1090 <fputs@plt>
mov    $0x2,%esi
mov    $0x1,%edx
lea    0xab9(%rip),%rdi
mov    %rbp,%rcx
call   1140 <fwrite@plt>
add    $0x1,%r13d
mov    %r15,%rdi
call   1150 <getc@plt>
mov    %eax,%ebx
mov    %r15,%rdi
call   10d0 <feof@plt>
test   %rax,%rax
jne    1310 <main+0xe0>
mov    %r12,%rdi
xor    %esi,%esi
mov    $0x2,%edx
call   10a0 <memset@plt>
cmp    $0x10,%r13d
jl     1780 <main+0x550>
mov    $0xa,%edi
mov    %rbp,%rsi
call   10b0 <fputc@plt>
xor    %r13d,%r13d
jmp    1780 <main+0x550>
mov    %rbp,%rdi
lea    0x895(%rip),%rsi
call   1110 <strcat@plt>
mov    %r12,%rdi
lea    0x89a(%rip),%rsi
call   1110 <strcat@plt>
mov    %r14,%rdi
lea    0x8aa(%rip),%rsi
jmp    16b8 <main+0x488>
mov    %rbp,%rdi
lea    0x868(%rip),%rsi
call   1110 <strcat@plt>
mov    %r12,%rdi
lea    0x8b1(%rip),%rsi
call   1110 <strcat@plt>
mov    %r14,%rdi
lea    0x8c1(%rip),%rsi
jmp    16b8 <main+0x488>
mov    %rbp,%rdi
lea    0x8d7(%rip),%rsi
call   1110 <strcat@plt>
mov    %r12,%rdi
lea    0x8dc(%rip),%rsi
call   1110 <strcat@plt>
mov    %r14,%rdi
lea    0x8ec(%rip),%rsi
jmp    16b8 <main+0x488>
mov    %rbp,%rdi
lea    0x902(%rip),%rsi
call   1110 <strcat@plt>
mov    %r12,%rdi
lea    0x907(%rip),%rsi
call   1110 <strcat@plt>
mov    %r14,%rdi
lea    0x917(%rip),%rsi
jmp    16b8 <main+0x488>
lea    0x936(%rip),%rdi
lea    0x490(%rsp),%rsi
jmp    18f5 <main+0x6c5>
lea    0x93c(%rip),%rdi
lea    0x90(%rsp),%rsi
xor    %eax,%eax
call   1080 <printf@plt>
jmp    12b7 <main+0x87>
xor    %edi,%edi
call   1130 <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 = [2 x i8] c" \00"
@.str.6 = [14 x i8] c"chipset = %s\0A\00"
@.str.7 = [5 x i8] c"2860\00"
@.str.8 = [20 x i8] c"/mcu/bin/rt2860.bin\00"
@.str.9 = [24 x i8] c"/include/mcu/firmware.h\00"
@.str.10 = [14 x i8] c"FirmwareImage\00"
@.str.11 = [5 x i8] c"2870\00"
@.str.12 = [20 x i8] c"/mcu/bin/rt2870.bin\00"
@.str.13 = [5 x i8] c"3090\00"
@.str.14 = [5 x i8] c"2070\00"
@.str.15 = [5 x i8] c"3070\00"
@.str.16 = [5 x i8] c"3572\00"
@.str.17 = [5 x i8] c"3573\00"
@.str.18 = [5 x i8] c"3370\00"
@.str.19 = [5 x i8] c"5370\00"
@.str.20 = [5 x i8] c"5572\00"
@.str.21 = [5 x i8] c"5592\00"
@.str.22 = [4 x i8] c"USB\00"
@.str.23 = [4 x i8] c"PCI\00"
@.str.24 = [8 x i8] c"mt7650e\00"
@.str.25 = [8 x i8] c"mt7650u\00"
@.str.26 = [8 x i8] c"mt7630e\00"
@.str.27 = [8 x i8] c"mt7630u\00"
@.str.28 = [20 x i8] c"/mcu/bin/MT7650.bin\00"
@.str.29 = [31 x i8] c"/include/mcu/MT7650_firmware.h\00"
@.str.30 = [21 x i8] c"MT7650_FirmwareImage\00"
@.str.31 = [8 x i8] c"mt7610e\00"
@.str.32 = [8 x i8] c"mt7610u\00"
@.str.33 = [31 x i8] c"/include/mcu/MT7610_firmware.h\00"
@.str.34 = [21 x i8] c"MT7610_FirmwareImage\00"
@.str.35 = [8 x i8] c"mt7662e\00"
@.str.36 = [8 x i8] c"mt7662u\00"
@.str.37 = [20 x i8] c"/mcu/bin/MT7662.bin\00"
@.str.38 = [31 x i8] c"/include/mcu/MT7662_firmware.h\00"
@.str.39 = [21 x i8] c"MT7662_FirmwareImage\00"
@.str.40 = [8 x i8] c"mt7612e\00"
@.str.41 = [8 x i8] c"mt7612u\00"
@.str.42 = [20 x i8] c"/mcu/bin/MT7612.bin\00"
@.str.43 = [31 x i8] c"/include/mcu/MT7612_firmware.h\00"
@.str.44 = [21 x i8] c"MT7612_FirmwareImage\00"
@.str.45 = [20 x i8] c"/include/firmware.h\00"
@.str.46 = [2 x i8] c"r\00"
@.str.47 = [21 x i8] c"Can't read file %s \0A\00"
@.str.48 = [2 x i8] c"w\00"
@.str.49 = [27 x i8] c"Can't open write file %s \0A\00"
@.str.50 = [41 x i8] c"/* AUTO GEN PLEASE DO NOT MODIFY IT */ \0A\00"
@.str.51 = [2 x i8] c"\0A\00"
@.str.52 = [16 x i8] c"UCHAR %s[] = {\0A\00"
@.str.53 = [3 x i8] c"0x\00"
@.str.54 = [5 x i8] c"%02x\00"
@.str.55 = [3 x i8] c", \00"
@.str.56 = [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 [1024 x i8]
%11 = alloca [128 x i8]
%12 = alloca i8*
%13 = alloca i8*
%14 = alloca i8*
%15 = alloca i8*
%16 = alloca i8*
%17 = alloca i32
%18 = alloca i8
%19 = alloca [3 x i8]
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i8* null, i8** %12
store i8* null, i8** %13
store i8* null, i8** %16
store i32 0, i32* %17
%20 = call i64 @getenv(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
%21 = inttoptr i64 %20 to i8*
store i8* %21, i8** %12
%22 = call i64 @getenv(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
%23 = inttoptr i64 %22 to i8*
store i8* %23, i8** %13
%24 = getelementptr inbounds [1024 x i8], [1024 x i8]* %10, i64 0, i64 0
%25 = load i8*, i8** %13
%26 = load i8*, i8** %13
%27 = call i32 @strlen(i8* %26)
%28 = call i32 @memcpy(i8* %24, i8* %25, i32 %27)
%29 = load i8*, i8** %12
%30 = icmp ne i8* %29, null
br i1 %30, label %33, label %31
31: ; preds = %2
%32 = 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 %363
33: ; preds = %2
%34 = load i8*, i8** %13
%35 = icmp ne i8* %34, null
br i1 %35, label %38, label %36
36: ; preds = %33
%37 = 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 %363
38: ; preds = %33
%39 = load i8*, i8** %12
%40 = call i32 @strlen(i8* %39)
%41 = sext i32 %40 to i64
%42 = icmp ugt i64 %41, 924
br i1 %42, label %43, label %45
43: ; preds = %38
%44 = 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 %363
45: ; preds = %38
%46 = getelementptr inbounds [1024 x i8], [1024 x i8]* %10, i64 0, i64 0
%47 = call i8* @strtok(i8* %46, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0))
store i8* %47, i8** %13
br label %48
48: ; preds = %353, %45
%49 = load i8*, i8** %13
%50 = icmp ne i8* %49, null
br i1 %50, label %51, label %361
51: ; preds = %48
%52 = load i8*, i8** %13
%53 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.6, i64 0, i64 0), i8* %52)
%54 = getelementptr inbounds [1024 x i8], [1024 x i8]* %8, i64 0, i64 0
%55 = call i32 @memset(i8* %54, i32 0, i32 1024)
%56 = getelementptr inbounds [1024 x i8], [1024 x i8]* %9, i64 0, i64 0
%57 = call i32 @memset(i8* %56, i32 0, i32 1024)
%58 = getelementptr inbounds [128 x i8], [128 x i8]* %11, i64 0, i64 0
%59 = call i32 @memset(i8* %58, i32 0, i32 128)
%60 = getelementptr inbounds [1024 x i8], [1024 x i8]* %8, i64 0, i64 0
%61 = load i8*, i8** %12
%62 = call i32 @strcat(i8* %60, i8* %61)
%63 = getelementptr inbounds [1024 x i8], [1024 x i8]* %9, i64 0, i64 0
%64 = load i8*, i8** %12
%65 = call i32 @strcat(i8* %63, i8* %64)
%66 = load i8*, i8** %13
%67 = call i64 @strncmp(i8* %66, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.7, i64 0, i64 0), i32 4)
%68 = icmp eq i64 %67, 0
br i1 %68, label %69, label %76
69: ; preds = %51
%70 = getelementptr inbounds [1024 x i8], [1024 x i8]* %8, i64 0, i64 0
%71 = call i32 @strcat(i8* %70, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.8, i64 0, i64 0))
%72 = getelementptr inbounds [1024 x i8], [1024 x i8]* %9, i64 0, i64 0
%73 = call i32 @strcat(i8* %72, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.9, i64 0, i64 0))
%74 = getelementptr inbounds [128 x i8], [128 x i8]* %11, i64 0, i64 0
%75 = call i32 @strcat(i8* %74, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.10, i64 0, i64 0))
br label %297
76: ; preds = %51
%77 = load i8*, i8** %13
%78 = call i64 @strncmp(i8* %77, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.11, i64 0, i64 0), i32 4)
%79 = icmp eq i64 %78, 0
br i1 %79, label %80, label %87
80: ; preds = %76
%81 = getelementptr inbounds [1024 x i8], [1024 x i8]* %8, i64 0, i64 0
%82 = call i32 @strcat(i8* %81, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.12, i64 0, i64 0))
%83 = getelementptr inbounds [1024 x i8], [1024 x i8]* %9, i64 0, i64 0
%84 = call i32 @strcat(i8* %83, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.9, i64 0, i64 0))
%85 = getelementptr inbounds [128 x i8], [128 x i8]* %11, i64 0, i64 0
%86 = call i32 @strcat(i8* %85, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.10, i64 0, i64 0))
br label %296
87: ; preds = %76
%88 = load i8*, i8** %13
%89 = call i64 @strncmp(i8* %88, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.13, i64 0, i64 0), i32 4)
%90 = icmp eq i64 %89, 0
br i1 %90, label %91, label %98
91: ; preds = %87
%92 = getelementptr inbounds [1024 x i8], [1024 x i8]* %8, i64 0, i64 0
%93 = call i32 @strcat(i8* %92, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.8, i64 0, i64 0))
%94 = getelementptr inbounds [1024 x i8], [1024 x i8]* %9, i64 0, i64 0
%95 = call i32 @strcat(i8* %94, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.9, i64 0, i64 0))
%96 = getelementptr inbounds [128 x i8], [128 x i8]* %11, i64 0, i64 0
%97 = call i32 @strcat(i8* %96, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.10, i64 0, i64 0))
br label %295
98: ; preds = %87
%99 = load i8*, i8** %13
%100 = call i64 @strncmp(i8* %99, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.14, i64 0, i64 0), i32 4)
%101 = icmp eq i64 %100, 0
br i1 %101, label %102, label %109
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 ([20 x i8], [20 x i8]* @.str.12, i64 0, i64 0))
%105 = getelementptr inbounds [1024 x i8], [1024 x i8]* %9, i64 0, i64 0
%106 = call i32 @strcat(i8* %105, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.9, i64 0, i64 0))
%107 = getelementptr inbounds [128 x i8], [128 x i8]* %11, i64 0, i64 0
%108 = call i32 @strcat(i8* %107, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.10, i64 0, i64 0))
br label %294
109: ; preds = %98
%110 = load i8*, i8** %13
%111 = call i64 @strncmp(i8* %110, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.15, i64 0, i64 0), i32 4)
%112 = icmp eq i64 %111, 0
br i1 %112, label %113, label %120
113: ; preds = %109
%114 = getelementptr inbounds [1024 x i8], [1024 x i8]* %8, i64 0, i64 0
%115 = call i32 @strcat(i8* %114, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.12, i64 0, i64 0))
%116 = getelementptr inbounds [1024 x i8], [1024 x i8]* %9, i64 0, i64 0
%117 = call i32 @strcat(i8* %116, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.9, i64 0, i64 0))
%118 = getelementptr inbounds [128 x i8], [128 x i8]* %11, i64 0, i64 0
%119 = call i32 @strcat(i8* %118, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.10, i64 0, i64 0))
br label %293
120: ; preds = %109
%121 = load i8*, i8** %13
%122 = call i64 @strncmp(i8* %121, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.16, i64 0, i64 0), i32 4)
%123 = icmp eq i64 %122, 0
br i1 %123, label %124, label %131
124: ; preds = %120
%125 = getelementptr inbounds [1024 x i8], [1024 x i8]* %8, i64 0, i64 0
%126 = call i32 @strcat(i8* %125, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.12, i64 0, i64 0))
%127 = getelementptr inbounds [1024 x i8], [1024 x i8]* %9, i64 0, i64 0
%128 = call i32 @strcat(i8* %127, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.9, i64 0, i64 0))
%129 = getelementptr inbounds [128 x i8], [128 x i8]* %11, i64 0, i64 0
%130 = call i32 @strcat(i8* %129, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.10, i64 0, i64 0))
br label %292
131: ; preds = %120
%132 = load i8*, i8** %13
%133 = call i64 @strncmp(i8* %132, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.17, i64 0, i64 0), i32 4)
%134 = icmp eq i64 %133, 0
br i1 %134, label %135, label %142
135: ; preds = %131
%136 = getelementptr inbounds [1024 x i8], [1024 x i8]* %8, i64 0, i64 0
%137 = call i32 @strcat(i8* %136, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.12, i64 0, i64 0))
%138 = getelementptr inbounds [1024 x i8], [1024 x i8]* %9, i64 0, i64 0
%139 = call i32 @strcat(i8* %138, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.9, i64 0, i64 0))
%140 = getelementptr inbounds [128 x i8], [128 x i8]* %11, i64 0, i64 0
%141 = call i32 @strcat(i8* %140, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.10, i64 0, i64 0))
br label %291
142: ; preds = %131
%143 = load i8*, i8** %13
%144 = call i64 @strncmp(i8* %143, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.18, i64 0, i64 0), i32 4)
%145 = icmp eq i64 %144, 0
br i1 %145, label %146, label %153
146: ; preds = %142
%147 = getelementptr inbounds [1024 x i8], [1024 x i8]* %8, i64 0, i64 0
%148 = call i32 @strcat(i8* %147, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.12, i64 0, i64 0))
%149 = getelementptr inbounds [1024 x i8], [1024 x i8]* %9, i64 0, i64 0
%150 = call i32 @strcat(i8* %149, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.9, i64 0, i64 0))
%151 = getelementptr inbounds [128 x i8], [128 x i8]* %11, i64 0, i64 0
%152 = call i32 @strcat(i8* %151, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.10, i64 0, i64 0))
br label %290
153: ; preds = %142
%154 = load i8*, i8** %13
%155 = call i64 @strncmp(i8* %154, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.19, i64 0, i64 0), i32 4)
%156 = icmp eq i64 %155, 0
br i1 %156, label %157, label %164
157: ; preds = %153
%158 = getelementptr inbounds [1024 x i8], [1024 x i8]* %8, i64 0, i64 0
%159 = call i32 @strcat(i8* %158, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.12, i64 0, i64 0))
%160 = getelementptr inbounds [1024 x i8], [1024 x i8]* %9, i64 0, i64 0
%161 = call i32 @strcat(i8* %160, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.9, i64 0, i64 0))
%162 = getelementptr inbounds [128 x i8], [128 x i8]* %11, i64 0, i64 0
%163 = call i32 @strcat(i8* %162, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.10, i64 0, i64 0))
br label %289
164: ; preds = %153
%165 = load i8*, i8** %13
%166 = call i64 @strncmp(i8* %165, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.20, i64 0, i64 0), i32 4)
%167 = icmp eq i64 %166, 0
br i1 %167, label %168, label %175
168: ; preds = %164
%169 = getelementptr inbounds [1024 x i8], [1024 x i8]* %8, i64 0, i64 0
%170 = call i32 @strcat(i8* %169, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.12, i64 0, i64 0))
%171 = getelementptr inbounds [1024 x i8], [1024 x i8]* %9, i64 0, i64 0
%172 = call i32 @strcat(i8* %171, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.9, i64 0, i64 0))
%173 = getelementptr inbounds [128 x i8], [128 x i8]* %11, i64 0, i64 0
%174 = call i32 @strcat(i8* %173, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.10, i64 0, i64 0))
br label %288
175: ; preds = %164
%176 = load i8*, i8** %13
%177 = call i64 @strncmp(i8* %176, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.21, i64 0, i64 0), i32 4)
%178 = icmp eq i64 %177, 0
br i1 %178, label %179, label %186
179: ; preds = %175
%180 = getelementptr inbounds [1024 x i8], [1024 x i8]* %8, i64 0, i64 0
%181 = call i32 @strcat(i8* %180, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.8, i64 0, i64 0))
%182 = getelementptr inbounds [1024 x i8], [1024 x i8]* %9, i64 0, i64 0
%183 = call i32 @strcat(i8* %182, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.9, i64 0, i64 0))
%184 = getelementptr inbounds [128 x i8], [128 x i8]* %11, i64 0, i64 0
%185 = call i32 @strcat(i8* %184, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.10, i64 0, i64 0))
br label %287
186: ; preds = %175
%187 = load i8*, i8** %13
%188 = call i64 @strncmp(i8* %187, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.22, i64 0, i64 0), i32 3)
%189 = icmp eq i64 %188, 0
br i1 %189, label %190, label %197
190: ; preds = %186
%191 = getelementptr inbounds [1024 x i8], [1024 x i8]* %8, i64 0, i64 0
%192 = call i32 @strcat(i8* %191, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.12, i64 0, i64 0))
%193 = getelementptr inbounds [1024 x i8], [1024 x i8]* %9, i64 0, i64 0
%194 = call i32 @strcat(i8* %193, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.9, i64 0, i64 0))
%195 = getelementptr inbounds [128 x i8], [128 x i8]* %11, i64 0, i64 0
%196 = call i32 @strcat(i8* %195, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.10, i64 0, i64 0))
br label %286
197: ; preds = %186
%198 = load i8*, i8** %13
%199 = call i64 @strncmp(i8* %198, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.23, i64 0, i64 0), i32 3)
%200 = icmp eq i64 %199, 0
br i1 %200, label %201, label %208
201: ; preds = %197
%202 = getelementptr inbounds [1024 x i8], [1024 x i8]* %8, i64 0, i64 0
%203 = call i32 @strcat(i8* %202, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.8, i64 0, i64 0))
%204 = getelementptr inbounds [1024 x i8], [1024 x i8]* %9, i64 0, i64 0
%205 = call i32 @strcat(i8* %204, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.9, i64 0, i64 0))
%206 = getelementptr inbounds [128 x i8], [128 x i8]* %11, i64 0, i64 0
%207 = call i32 @strcat(i8* %206, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.10, i64 0, i64 0))
br label %285
208: ; preds = %197
%209 = load i8*, i8** %13
%210 = call i64 @strncmp(i8* %209, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.24, i64 0, i64 0), i32 7)
%211 = icmp eq i64 %210, 0
br i1 %211, label %224, label %212
212: ; preds = %208
%213 = load i8*, i8** %13
%214 = call i64 @strncmp(i8* %213, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.25, i64 0, i64 0), i32 7)
%215 = icmp eq i64 %214, 0
br i1 %215, label %224, label %216
216: ; preds = %212
%217 = load i8*, i8** %13
%218 = call i64 @strncmp(i8* %217, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.26, i64 0, i64 0), i32 7)
%219 = icmp eq i64 %218, 0
br i1 %219, label %224, label %220
220: ; preds = %216
%221 = load i8*, i8** %13
%222 = call i64 @strncmp(i8* %221, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.27, i64 0, i64 0), i32 7)
%223 = icmp eq i64 %222, 0
br i1 %223, label %224, label %231
224: ; preds = %220, %216, %212, %208
%225 = getelementptr inbounds [1024 x i8], [1024 x i8]* %8, i64 0, i64 0
%226 = call i32 @strcat(i8* %225, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.28, i64 0, i64 0))
%227 = getelementptr inbounds [1024 x i8], [1024 x i8]* %9, i64 0, i64 0
%228 = call i32 @strcat(i8* %227, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.29, i64 0, i64 0))
%229 = getelementptr inbounds [128 x i8], [128 x i8]* %11, i64 0, i64 0
%230 = call i32 @strcat(i8* %229, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.30, i64 0, i64 0))
br label %284
231: ; preds = %220
%232 = load i8*, i8** %13
%233 = call i64 @strncmp(i8* %232, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.31, i64 0, i64 0), i32 7)
%234 = icmp eq i64 %233, 0
br i1 %234, label %239, label %235
235: ; preds = %231
%236 = load i8*, i8** %13
%237 = call i64 @strncmp(i8* %236, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.32, i64 0, i64 0), i32 7)
%238 = icmp eq i64 %237, 0
br i1 %238, label %239, label %246
239: ; preds = %235, %231
%240 = getelementptr inbounds [1024 x i8], [1024 x i8]* %8, i64 0, i64 0
%241 = call i32 @strcat(i8* %240, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.28, i64 0, i64 0))
%242 = getelementptr inbounds [1024 x i8], [1024 x i8]* %9, i64 0, i64 0
%243 = call i32 @strcat(i8* %242, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.33, i64 0, i64 0))
%244 = getelementptr inbounds [128 x i8], [128 x i8]* %11, i64 0, i64 0
%245 = call i32 @strcat(i8* %244, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.34, i64 0, i64 0))
br label %283
246: ; preds = %235
%247 = load i8*, i8** %13
%248 = call i64 @strncmp(i8* %247, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.35, i64 0, i64 0), i32 7)
%249 = icmp eq i64 %248, 0
br i1 %249, label %254, label %250
250: ; preds = %246
%251 = load i8*, i8** %13
%252 = call i64 @strncmp(i8* %251, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.36, i64 0, i64 0), i32 7)
%253 = icmp eq i64 %252, 0
br i1 %253, label %254, label %261
254: ; preds = %250, %246
%255 = getelementptr inbounds [1024 x i8], [1024 x i8]* %8, i64 0, i64 0
%256 = call i32 @strcat(i8* %255, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.37, i64 0, i64 0))
%257 = getelementptr inbounds [1024 x i8], [1024 x i8]* %9, i64 0, i64 0
%258 = call i32 @strcat(i8* %257, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.38, i64 0, i64 0))
%259 = getelementptr inbounds [128 x i8], [128 x i8]* %11, i64 0, i64 0
%260 = call i32 @strcat(i8* %259, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.39, i64 0, i64 0))
br label %282
261: ; preds = %250
%262 = load i8*, i8** %13
%263 = call i64 @strncmp(i8* %262, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.40, i64 0, i64 0), i32 7)
%264 = icmp eq i64 %263, 0
br i1 %264, label %269, label %265
265: ; preds = %261
%266 = load i8*, i8** %13
%267 = call i64 @strncmp(i8* %266, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.41, i64 0, i64 0), i32 7)
%268 = icmp eq i64 %267, 0
br i1 %268, label %269, label %276
269: ; preds = %265, %261
%270 = getelementptr inbounds [1024 x i8], [1024 x i8]* %8, i64 0, i64 0
%271 = call i32 @strcat(i8* %270, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.42, i64 0, i64 0))
%272 = getelementptr inbounds [1024 x i8], [1024 x i8]* %9, i64 0, i64 0
%273 = call i32 @strcat(i8* %272, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.43, i64 0, i64 0))
%274 = getelementptr inbounds [128 x i8], [128 x i8]* %11, i64 0, i64 0
%275 = call i32 @strcat(i8* %274, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.44, i64 0, i64 0))
br label %281
276: ; preds = %265
%277 = getelementptr inbounds [1024 x i8], [1024 x i8]* %8, i64 0, i64 0
%278 = call i32 @strcat(i8* %277, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.8, i64 0, i64 0))
%279 = getelementptr inbounds [1024 x i8], [1024 x i8]* %9, i64 0, i64 0
%280 = call i32 @strcat(i8* %279, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.45, i64 0, i64 0))
br label %281
281: ; preds = %276, %269
br label %282
282: ; preds = %281, %254
br label %283
283: ; preds = %282, %239
br label %284
284: ; preds = %283, %224
br label %285
285: ; preds = %284, %201
br label %286
286: ; preds = %285, %190
br label %287
287: ; preds = %286, %179
br label %288
288: ; preds = %287, %168
br label %289
289: ; preds = %288, %157
br label %290
290: ; preds = %289, %146
br label %291
291: ; preds = %290, %135
br label %292
292: ; preds = %291, %124
br label %293
293: ; preds = %292, %113
br label %294
294: ; preds = %293, %102
br label %295
295: ; preds = %294, %91
br label %296
296: ; preds = %295, %80
br label %297
297: ; preds = %296, %69
%298 = getelementptr inbounds [1024 x i8], [1024 x i8]* %8, i64 0, i64 0
%299 = call i32* @fopen(i8* %298, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.46, i64 0, i64 0))
store i32* %299, i32** %6
%300 = load i32*, i32** %6
%301 = icmp eq i32* %300, null
br i1 %301, label %302, label %305
302: ; preds = %297
%303 = getelementptr inbounds [1024 x i8], [1024 x i8]* %8, i64 0, i64 0
%304 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.47, i64 0, i64 0), i8* %303)
store i32 -1, i32* %3
br label %363
305: ; preds = %297
%306 = getelementptr inbounds [1024 x i8], [1024 x i8]* %9, i64 0, i64 0
%307 = call i32* @fopen(i8* %306, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.48, i64 0, i64 0))
store i32* %307, i32** %7
%308 = load i32*, i32** %7
%309 = icmp eq i32* %308, null
br i1 %309, label %310, label %313
310: ; preds = %305
%311 = getelementptr inbounds [1024 x i8], [1024 x i8]* %9, i64 0, i64 0
%312 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.49, i64 0, i64 0), i8* %311)
store i32 -1, i32* %3
br label %363
313: ; preds = %305
%314 = load i32*, i32** %7
%315 = call i32 @fputs(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.50, i64 0, i64 0), i32* %314)
%316 = load i32*, i32** %7
%317 = call i32 @fputs(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.50, i64 0, i64 0), i32* %316)
%318 = load i32*, i32** %7
%319 = call i32 @fputs(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.51, i64 0, i64 0), i32* %318)
%320 = load i32*, i32** %7
%321 = call i32 @fputs(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.51, i64 0, i64 0), i32* %320)
%322 = load i32*, i32** %7
%323 = getelementptr inbounds [128 x i8], [128 x i8]* %11, i64 0, i64 0
%324 = call i32 @fprintf(i32* %322, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.52, i64 0, i64 0), i8* %323)
br label %325
325: ; preds = %313, %340
%326 = load i32*, i32** %6
%327 = call zeroext i8 @getc(i32* %326)
store i8 %327, i8* %18
%328 = load i32*, i32** %6
%329 = call i64 @feof(i32* %328)
%330 = icmp ne i64 %329, 0
br i1 %330, label %331, label %332
331: ; preds = %325
br label %353
332: ; preds = %325
%333 = getelementptr inbounds [3 x i8], [3 x i8]* %19, i64 0, i64 0
%334 = call i32 @memset(i8* %333, i32 0, i32 2)
%335 = load i32, i32* %17
%336 = icmp sge i32 %335, 16
br i1 %336, label %337, label %340
337: ; preds = %332
%338 = load i32*, i32** %7
%339 = call i32 @fputs(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.51, i64 0, i64 0), i32* %338)
store i32 0, i32* %17
br label %340
340: ; preds = %337, %332
%341 = load i32*, i32** %7
%342 = call i32 @fputs(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.53, i64 0, i64 0), i32* %341)
%343 = getelementptr inbounds [3 x i8], [3 x i8]* %19, i64 0, i64 0
%344 = load i8, i8* %18
%345 = call i32 @sprintf(i8* %343, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.54, i64 0, i64 0), i8 zeroext %344)
%346 = getelementptr inbounds [3 x i8], [3 x i8]* %19, i64 0, i64 0
%347 = load i32*, i32** %7
%348 = call i32 @fputs(i8* %346, i32* %347)
%349 = load i32*, i32** %7
%350 = call i32 @fputs(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.55, i64 0, i64 0), i32* %349)
%351 = load i32, i32* %17
%352 = add nsw i32 %351, 1
store i32 %352, i32* %17
br label %325
353: ; preds = %331
%354 = load i32*, i32** %7
%355 = call i32 @fputs(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.56, i64 0, i64 0), i32* %354)
%356 = load i32*, i32** %6
%357 = call i32 @fclose(i32* %356)
%358 = load i32*, i32** %7
%359 = call i32 @fclose(i32* %358)
%360 = call i8* @strtok(i8* null, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0))
store i8* %360, i8** %13
br label %48
361: ; preds = %48
%362 = call i32 @exit(i32 0)
unreachable
363: ; preds = %310, %302, %43, %36, %31
%364 = load i32, i32* %3
ret i32 %364
}

LLVM IR (-O2):
@.str = [11 x i8] c"RT28xx_DIR\00"
@.str.1 = [8 x i8] c"CHIPSET\00"
@.str.5 = [2 x i8] c" \00"
@.str.6 = [14 x i8] c"chipset = %s\0A\00"
@.str.7 = [5 x i8] c"2860\00"
@.str.8 = [20 x i8] c"/mcu/bin/rt2860.bin\00"
@.str.9 = [24 x i8] c"/include/mcu/firmware.h\00"
@.str.10 = [14 x i8] c"FirmwareImage\00"
@.str.11 = [5 x i8] c"2870\00"
@.str.12 = [20 x i8] c"/mcu/bin/rt2870.bin\00"
@.str.13 = [5 x i8] c"3090\00"
@.str.14 = [5 x i8] c"2070\00"
@.str.15 = [5 x i8] c"3070\00"
@.str.16 = [5 x i8] c"3572\00"
@.str.17 = [5 x i8] c"3573\00"
@.str.18 = [5 x i8] c"3370\00"
@.str.19 = [5 x i8] c"5370\00"
@.str.20 = [5 x i8] c"5572\00"
@.str.21 = [5 x i8] c"5592\00"
@.str.22 = [4 x i8] c"USB\00"
@.str.23 = [4 x i8] c"PCI\00"
@.str.24 = [8 x i8] c"mt7650e\00"
@.str.25 = [8 x i8] c"mt7650u\00"
@.str.26 = [8 x i8] c"mt7630e\00"
@.str.27 = [8 x i8] c"mt7630u\00"
@.str.28 = [20 x i8] c"/mcu/bin/MT7650.bin\00"
@.str.29 = [31 x i8] c"/include/mcu/MT7650_firmware.h\00"
@.str.30 = [21 x i8] c"MT7650_FirmwareImage\00"
@.str.31 = [8 x i8] c"mt7610e\00"
@.str.32 = [8 x i8] c"mt7610u\00"
@.str.33 = [31 x i8] c"/include/mcu/MT7610_firmware.h\00"
@.str.34 = [21 x i8] c"MT7610_FirmwareImage\00"
@.str.35 = [8 x i8] c"mt7662e\00"
@.str.36 = [8 x i8] c"mt7662u\00"
@.str.37 = [20 x i8] c"/mcu/bin/MT7662.bin\00"
@.str.38 = [31 x i8] c"/include/mcu/MT7662_firmware.h\00"
@.str.39 = [21 x i8] c"MT7662_FirmwareImage\00"
@.str.40 = [8 x i8] c"mt7612e\00"
@.str.41 = [8 x i8] c"mt7612u\00"
@.str.42 = [20 x i8] c"/mcu/bin/MT7612.bin\00"
@.str.43 = [31 x i8] c"/include/mcu/MT7612_firmware.h\00"
@.str.44 = [21 x i8] c"MT7612_FirmwareImage\00"
@.str.45 = [20 x i8] c"/include/firmware.h\00"
@.str.46 = [2 x i8] c"r\00"
@.str.47 = [21 x i8] c"Can't read file %s \0A\00"
@.str.48 = [2 x i8] c"w\00"
@.str.49 = [27 x i8] c"Can't open write file %s \0A\00"
@.str.50 = [41 x i8] c"/* AUTO GEN PLEASE DO NOT MODIFY IT */ \0A\00"
@.str.52 = [16 x i8] c"UCHAR %s[] = {\0A\00"
@.str.53 = [3 x i8] c"0x\00"
@.str.54 = [5 x i8] c"%02x\00"
@.str.55 = [3 x i8] c", \00"
@.str.56 = [5 x i8] c"} ;\0A\00"
@str = [43 x i8] c"Environment value \22RT28xx_DIR\22 not export \00"
@str.57 = [40 x i8] c"Environment value \22CHIPSET\22 not export \00"
@str.58 = [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 [1024 x i8]
%6 = alloca [128 x i8]
%7 = alloca [3 x i8]
%8 = getelementptr inbounds [1024 x i8], [1024 x i8]* %3, i64 0, i64 0
%9 = getelementptr inbounds [1024 x i8], [1024 x i8]* %4, i64 0, i64 0
%10 = getelementptr inbounds [1024 x i8], [1024 x i8]* %5, i64 0, i64 0
%11 = getelementptr inbounds [128 x i8], [128 x i8]* %6, i64 0, i64 0
%12 = tail call i64 @getenv(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
%13 = inttoptr i64 %12 to i8*
%14 = tail call i64 @getenv(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
%15 = inttoptr i64 %14 to i8*
%16 = tail call i32 @strlen(i8* %15)
%17 = call i32 @memcpy(i8* %10, i8* %15, i32 %16)
%18 = icmp eq i64 %12, 0
br i1 %18, label %19, label %21
19: ; preds = %2
%20 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([43 x i8], [43 x i8]* @str, i64 0, i64 0))
br label %228
21: ; preds = %2
%22 = icmp eq i64 %14, 0
br i1 %22, label %23, label %25
23: ; preds = %21
%24 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([40 x i8], [40 x i8]* @str.57, i64 0, i64 0))
br label %228
25: ; preds = %21
%26 = call i32 @strlen(i8* %13)
%27 = icmp ugt i32 %26, 924
br i1 %27, label %28, label %30
28: ; preds = %25
%29 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([44 x i8], [44 x i8]* @str.58, i64 0, i64 0))
br label %228
30: ; preds = %25
%31 = call i8* @strtok(i8* %10, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0))
%32 = icmp eq i8* %31, null
br i1 %32, label %226, label %33
33: ; preds = %30
%34 = getelementptr inbounds [3 x i8], [3 x i8]* %7, i64 0, i64 0
br label %35
35: ; preds = %33, %219
%36 = phi i32 [ 0, %33 ], [ %220, %219 ]
%37 = phi i8* [ %31, %33 ], [ %224, %219 ]
%38 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.6, i64 0, i64 0), i8* %37)
%39 = call i32 @memset(i8* %8, i32 0, i32 1024)
%40 = call i32 @memset(i8* %9, i32 0, i32 1024)
%41 = call i32 @memset(i8* %11, i32 0, i32 128)
%42 = call i32 @strcat(i8* %8, i8* %13)
%43 = call i32 @strcat(i8* %9, i8* %13)
%44 = call i64 @strncmp(i8* %37, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.7, i64 0, i64 0), i32 4)
%45 = icmp eq i64 %44, 0
br i1 %45, label %46, label %50
46: ; preds = %35
%47 = call i32 @strcat(i8* %8, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.8, i64 0, i64 0))
%48 = call i32 @strcat(i8* %9, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.9, i64 0, i64 0))
%49 = call i32 @strcat(i8* %11, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.10, i64 0, i64 0))
br label %183
50: ; preds = %35
%51 = call i64 @strncmp(i8* %37, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.11, i64 0, i64 0), i32 4)
%52 = icmp eq i64 %51, 0
br i1 %52, label %53, label %57
53: ; preds = %50
%54 = call i32 @strcat(i8* %8, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.12, i64 0, i64 0))
%55 = call i32 @strcat(i8* %9, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.9, i64 0, i64 0))
%56 = call i32 @strcat(i8* %11, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.10, i64 0, i64 0))
br label %183
57: ; preds = %50
%58 = call i64 @strncmp(i8* %37, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.13, i64 0, i64 0), i32 4)
%59 = icmp eq i64 %58, 0
br i1 %59, label %60, label %64
60: ; preds = %57
%61 = call i32 @strcat(i8* %8, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.8, i64 0, i64 0))
%62 = call i32 @strcat(i8* %9, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.9, i64 0, i64 0))
%63 = call i32 @strcat(i8* %11, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.10, i64 0, i64 0))
br label %183
64: ; preds = %57
%65 = call i64 @strncmp(i8* %37, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.14, i64 0, i64 0), i32 4)
%66 = icmp eq i64 %65, 0
br i1 %66, label %67, label %71
67: ; preds = %64
%68 = call i32 @strcat(i8* %8, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.12, i64 0, i64 0))
%69 = call i32 @strcat(i8* %9, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.9, i64 0, i64 0))
%70 = call i32 @strcat(i8* %11, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.10, i64 0, i64 0))
br label %183
71: ; preds = %64
%72 = call i64 @strncmp(i8* %37, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.15, i64 0, i64 0), i32 4)
%73 = icmp eq i64 %72, 0
br i1 %73, label %74, label %78
74: ; preds = %71
%75 = call i32 @strcat(i8* %8, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.12, i64 0, i64 0))
%76 = call i32 @strcat(i8* %9, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.9, i64 0, i64 0))
%77 = call i32 @strcat(i8* %11, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.10, i64 0, i64 0))
br label %183
78: ; preds = %71
%79 = call i64 @strncmp(i8* %37, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.16, i64 0, i64 0), i32 4)
%80 = icmp eq i64 %79, 0
br i1 %80, label %81, label %85
81: ; preds = %78
%82 = call i32 @strcat(i8* %8, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.12, i64 0, i64 0))
%83 = call i32 @strcat(i8* %9, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.9, i64 0, i64 0))
%84 = call i32 @strcat(i8* %11, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.10, i64 0, i64 0))
br label %183
85: ; preds = %78
%86 = call i64 @strncmp(i8* %37, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.17, i64 0, i64 0), i32 4)
%87 = icmp eq i64 %86, 0
br i1 %87, label %88, label %92
88: ; preds = %85
%89 = call i32 @strcat(i8* %8, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.12, i64 0, i64 0))
%90 = call i32 @strcat(i8* %9, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.9, i64 0, i64 0))
%91 = call i32 @strcat(i8* %11, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.10, i64 0, i64 0))
br label %183
92: ; preds = %85
%93 = call i64 @strncmp(i8* %37, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.18, i64 0, i64 0), i32 4)
%94 = icmp eq i64 %93, 0
br i1 %94, label %95, label %99
95: ; preds = %92
%96 = call i32 @strcat(i8* %8, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.12, i64 0, i64 0))
%97 = call i32 @strcat(i8* %9, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.9, i64 0, i64 0))
%98 = call i32 @strcat(i8* %11, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.10, i64 0, i64 0))
br label %183
99: ; preds = %92
%100 = call i64 @strncmp(i8* %37, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.19, i64 0, i64 0), i32 4)
%101 = icmp eq i64 %100, 0
br i1 %101, label %102, label %106
102: ; preds = %99
%103 = call i32 @strcat(i8* %8, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.12, i64 0, i64 0))
%104 = call i32 @strcat(i8* %9, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.9, i64 0, i64 0))
%105 = call i32 @strcat(i8* %11, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.10, i64 0, i64 0))
br label %183
106: ; preds = %99
%107 = call i64 @strncmp(i8* %37, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.20, i64 0, i64 0), i32 4)
%108 = icmp eq i64 %107, 0
br i1 %108, label %109, label %113
109: ; preds = %106
%110 = call i32 @strcat(i8* %8, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.12, i64 0, i64 0))
%111 = call i32 @strcat(i8* %9, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.9, i64 0, i64 0))
%112 = call i32 @strcat(i8* %11, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.10, i64 0, i64 0))
br label %183
113: ; preds = %106
%114 = call i64 @strncmp(i8* %37, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.21, i64 0, i64 0), i32 4)
%115 = icmp eq i64 %114, 0
br i1 %115, label %116, label %120
116: ; preds = %113
%117 = call i32 @strcat(i8* %8, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.8, i64 0, i64 0))
%118 = call i32 @strcat(i8* %9, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.9, i64 0, i64 0))
%119 = call i32 @strcat(i8* %11, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.10, i64 0, i64 0))
br label %183
120: ; preds = %113
%121 = call i64 @strncmp(i8* %37, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.22, i64 0, i64 0), i32 3)
%122 = icmp eq i64 %121, 0
br i1 %122, label %123, label %127
123: ; preds = %120
%124 = call i32 @strcat(i8* %8, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.12, i64 0, i64 0))
%125 = call i32 @strcat(i8* %9, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.9, i64 0, i64 0))
%126 = call i32 @strcat(i8* %11, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.10, i64 0, i64 0))
br label %183
127: ; preds = %120
%128 = call i64 @strncmp(i8* %37, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.23, i64 0, i64 0), i32 3)
%129 = icmp eq i64 %128, 0
br i1 %129, label %130, label %134
130: ; preds = %127
%131 = call i32 @strcat(i8* %8, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.8, i64 0, i64 0))
%132 = call i32 @strcat(i8* %9, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.9, i64 0, i64 0))
%133 = call i32 @strcat(i8* %11, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.10, i64 0, i64 0))
br label %183
134: ; preds = %127
%135 = call i64 @strncmp(i8* %37, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.24, i64 0, i64 0), i32 7)
%136 = icmp eq i64 %135, 0
br i1 %136, label %146, label %137
137: ; preds = %134
%138 = call i64 @strncmp(i8* %37, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.25, i64 0, i64 0), i32 7)
%139 = icmp eq i64 %138, 0
br i1 %139, label %146, label %140
140: ; preds = %137
%141 = call i64 @strncmp(i8* %37, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.26, i64 0, i64 0), i32 7)
%142 = icmp eq i64 %141, 0
br i1 %142, label %146, label %143
143: ; preds = %140
%144 = call i64 @strncmp(i8* %37, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.27, i64 0, i64 0), i32 7)
%145 = icmp eq i64 %144, 0
br i1 %145, label %146, label %150
146: ; preds = %143, %140, %137, %134
%147 = call i32 @strcat(i8* %8, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.28, i64 0, i64 0))
%148 = call i32 @strcat(i8* %9, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.29, i64 0, i64 0))
%149 = call i32 @strcat(i8* %11, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.30, i64 0, i64 0))
br label %183
150: ; preds = %143
%151 = call i64 @strncmp(i8* %37, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.31, i64 0, i64 0), i32 7)
%152 = icmp eq i64 %151, 0
br i1 %152, label %156, label %153
153: ; preds = %150
%154 = call i64 @strncmp(i8* %37, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.32, i64 0, i64 0), i32 7)
%155 = icmp eq i64 %154, 0
br i1 %155, label %156, label %160
156: ; preds = %153, %150
%157 = call i32 @strcat(i8* %8, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.28, i64 0, i64 0))
%158 = call i32 @strcat(i8* %9, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.33, i64 0, i64 0))
%159 = call i32 @strcat(i8* %11, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.34, i64 0, i64 0))
br label %183
160: ; preds = %153
%161 = call i64 @strncmp(i8* %37, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.35, i64 0, i64 0), i32 7)
%162 = icmp eq i64 %161, 0
br i1 %162, label %166, label %163
163: ; preds = %160
%164 = call i64 @strncmp(i8* %37, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.36, i64 0, i64 0), i32 7)
%165 = icmp eq i64 %164, 0
br i1 %165, label %166, label %170
166: ; preds = %163, %160
%167 = call i32 @strcat(i8* %8, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.37, i64 0, i64 0))
%168 = call i32 @strcat(i8* %9, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.38, i64 0, i64 0))
%169 = call i32 @strcat(i8* %11, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.39, i64 0, i64 0))
br label %183
170: ; preds = %163
%171 = call i64 @strncmp(i8* %37, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.40, i64 0, i64 0), i32 7)
%172 = icmp eq i64 %171, 0
br i1 %172, label %176, label %173
173: ; preds = %170
%174 = call i64 @strncmp(i8* %37, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.41, i64 0, i64 0), i32 7)
%175 = icmp eq i64 %174, 0
br i1 %175, label %176, label %180
176: ; preds = %173, %170
%177 = call i32 @strcat(i8* %8, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.42, i64 0, i64 0))
%178 = call i32 @strcat(i8* %9, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.43, i64 0, i64 0))
%179 = call i32 @strcat(i8* %11, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.44, i64 0, i64 0))
br label %183
180: ; preds = %173
%181 = call i32 @strcat(i8* %8, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.8, i64 0, i64 0))
%182 = call i32 @strcat(i8* %9, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.45, i64 0, i64 0))
br label %183
183: ; preds = %53, %67, %81, %95, %109, %123, %146, %166, %180, %176, %156, %130, %116, %102, %88, %74, %60, %46
%184 = call i32* @fopen(i8* %8, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.46, i64 0, i64 0))
%185 = icmp eq i32* %184, null
br i1 %185, label %186, label %188
186: ; preds = %183
%187 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @.str.47, i64 0, i64 0), i8* %8)
br label %228
188: ; preds = %183
%189 = call i32* @fopen(i8* %9, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.48, i64 0, i64 0))
%190 = icmp eq i32* %189, null
br i1 %190, label %191, label %193
191: ; preds = %188
%192 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @.str.49, i64 0, i64 0), i8* %9)
br label %228
193: ; preds = %188
%194 = call i64 @fwrite(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.50, i64 0, i64 0), i64 40, i64 1, i32* %189)
%195 = call i64 @fwrite(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.50, i64 0, i64 0), i64 40, i64 1, i32* %189)
%196 = call i32 @fputc(i32 10, i32* %189)
%197 = call i32 @fputc(i32 10, i32* %189)
%198 = call i32 @fprintf(i32* %189, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.52, i64 0, i64 0), i8* %11)
%199 = call zeroext i8 @getc(i32* %184)
%200 = call i64 @feof(i32* %184)
%201 = icmp eq i64 %200, 0
br i1 %201, label %202, label %219
202: ; preds = %193, %209
%203 = phi i8 [ %216, %209 ], [ %199, %193 ]
%204 = phi i32 [ %215, %209 ], [ %36, %193 ]
%205 = call i32 @memset(i8* %34, i32 0, i32 2)
%206 = icmp sgt i32 %204, 15
br i1 %206, label %207, label %209
207: ; preds = %202
%208 = call i32 @fputc(i32 10, i32* %189)
br label %209
209: ; preds = %202, %207
%210 = phi i32 [ 0, %207 ], [ %204, %202 ]
%211 = call i64 @fwrite(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.53, i64 0, i64 0), i64 2, i64 1, i32* %189)
%212 = call i32 @sprintf(i8* %34, i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.54, i64 0, i64 0), i8 zeroext %203)
%213 = call i32 @fputs(i8* %34, i32* %189)
%214 = call i64 @fwrite(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.55, i64 0, i64 0), i64 2, i64 1, i32* %189)
%215 = add nsw i32 %210, 1
%216 = call zeroext i8 @getc(i32* %184)
%217 = call i64 @feof(i32* %184)
%218 = icmp eq i64 %217, 0
br i1 %218, label %202, label %219
219: ; preds = %209, %193
%220 = phi i32 [ %36, %193 ], [ %215, %209 ]
%221 = call i64 @fwrite(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.56, i64 0, i64 0), i64 4, i64 1, i32* %189)
%222 = call i32 @fclose(i32* %184)
%223 = call i32 @fclose(i32* %189)
%224 = call i8* @strtok(i8* null, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0))
%225 = icmp eq i8* %224, null
br i1 %225, label %226, label %35
226: ; preds = %219, %30
%227 = call i32 @exit(i32 0)
unreachable
228: ; preds = %191, %186, %28, %23, %19
ret i32 -1
}