#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*/ cmd;

/* Variables and functions */
int E2BIG;
int check_gcc_reject_mno_cygwin(char const *);
char *find_gcc(char const *);
int /*<<< orphan*/ printf(char *, ...);
int snprintf(char *, int, char *, char const *);
scalar_t__ strcmp(char const *, char *);
char *strerror(int);
scalar_t__ strstr(char const *, char *);
int system(char *);
int main(int argc, const char const **argv) {
  const char *app = "python cc_mingw.py";
  char cmd[1024 * 8], *p;
  int i, len, sz;
  int ret = 0;
  const char *spath, *gcc_exe;
  int remove_mno_cygwin;
  if (strstr(argv[0], "gcc") || strstr(argv[0], "GCC")) {
    gcc_exe = "gcc.exe";
  } else if (strstr(argv[0], "g++") || strstr(argv[0], "G++")) {
    gcc_exe = "g++.exe";
  } else {
    printf("Error: app name not gcc/g++\n");
    return -10;
  }
  gcc_exe = find_gcc(gcc_exe);
  if (!gcc_exe) {
    printf("Error: real gcc/g++ not found\n");
    return -20;
  }
  remove_mno_cygwin = check_gcc_reject_mno_cygwin(gcc_exe);
  if (remove_mno_cygwin < 0)
    return -30;
  len = snprintf(cmd, sizeof(cmd), "%s", gcc_exe);
  p = cmd + len;
  sz = sizeof(cmd) - len;
  for (i = 1; i < argc && sz > 0; ++i) {
    if (remove_mno_cygwin && strcmp(argv[i], "-mno-cygwin") == 0) {
      printf("Removed option '-mno-cygwin'.\n");
      continue;
    }
    len = snprintf(p, sz, " %s", argv[i]);
    if (len < 0 || len >= sz) {
      ret = E2BIG;
      break;
    }
    p += len;
    sz -= len;
  }
  if (!ret) {
    ret = system(cmd);
  }
  if (ret) {
    printf("Error: %s\n", strerror(ret));
  }
  return ret;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x2050,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xe60(%rip),%rax
mov    %rax,-0x18(%rbp)
movl   $0x0,-0x2038(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
lea    0xe57(%rip),%rsi
call   10a0 <strstr@plt>
cmp    $0x0,%rax
jne    11e8 <main+0x68>
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
lea    0xe3e(%rip),%rsi
call   10a0 <strstr@plt>
cmp    $0x0,%rax
je     11fb <main+0x7b>
lea    0xe2c(%rip),%rax
mov    %rax,-0x2048(%rbp)
jmp    1267 <main+0xe7>
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
lea    0xe1a(%rip),%rsi
call   10a0 <strstr@plt>
cmp    $0x0,%rax
jne    1235 <main+0xb5>
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
lea    0xe01(%rip),%rsi
call   10a0 <strstr@plt>
cmp    $0x0,%rax
je     1248 <main+0xc8>
lea    0xdef(%rip),%rax
mov    %rax,-0x2048(%rbp)
jmp    1262 <main+0xe2>
lea    0xde4(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0xfffffff6,-0x4(%rbp)
jmp    149c <main+0x31c>
jmp    1267 <main+0xe7>
mov    -0x2048(%rbp),%rdi
call   1070 <find_gcc@plt>
mov    %rax,-0x2048(%rbp)
cmpq   $0x0,-0x2048(%rbp)
jne    12a2 <main+0x122>
lea    0xdc1(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0xffffffec,-0x4(%rbp)
jmp    149c <main+0x31c>
mov    -0x2048(%rbp),%rdi
call   1080 <check_gcc_reject_mno_cygwin@plt>
mov    %eax,-0x204c(%rbp)
cmpl   $0x0,-0x204c(%rbp)
jge    12cd <main+0x14d>
movl   $0xffffffe2,-0x4(%rbp)
jmp    149c <main+0x31c>
lea    -0x2020(%rbp),%rdi
mov    -0x2048(%rbp),%rcx
mov    $0x2000,%esi
lea    0xdb4(%rip),%rdx
call   1050 <snprintf@plt>
mov    %eax,-0x2030(%rbp)
lea    -0x2020(%rbp),%rax
movslq -0x2030(%rbp),%rcx
add    %rcx,%rax
mov    %rax,-0x2028(%rbp)
movslq -0x2030(%rbp),%rcx
mov    $0x2000,%eax
sub    %rcx,%rax
mov    %eax,-0x2034(%rbp)
movl   $0x1,-0x202c(%rbp)
mov    -0x202c(%rbp),%ecx
xor    %eax,%eax
cmp    -0x8(%rbp),%ecx
mov    %al,-0x204d(%rbp)
jge    1350 <main+0x1d0>
cmpl   $0x0,-0x2034(%rbp)
setg   %al
mov    %al,-0x204d(%rbp)
mov    -0x204d(%rbp),%al
test   $0x1,%al
jne    1363 <main+0x1e3>
jmp    144b <main+0x2cb>
cmpl   $0x0,-0x204c(%rbp)
je     13a8 <main+0x228>
mov    -0x10(%rbp),%rax
movslq -0x202c(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
lea    0xce9(%rip),%rsi
call   1060 <strcmp@plt>
cmp    $0x0,%rax
jne    13a8 <main+0x228>
lea    0xcdf(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    1437 <main+0x2b7>
mov    -0x2028(%rbp),%rdi
mov    -0x2034(%rbp),%esi
mov    -0x10(%rbp),%rax
movslq -0x202c(%rbp),%rcx
mov    (%rax,%rcx,8),%rcx
lea    0xccf(%rip),%rdx
call   1050 <snprintf@plt>
mov    %eax,-0x2030(%rbp)
cmpl   $0x0,-0x2030(%rbp)
jl     13f5 <main+0x275>
mov    -0x2030(%rbp),%eax
cmp    -0x2034(%rbp),%eax
jl     1409 <main+0x289>
mov    0x2bec(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x2038(%rbp)
jmp    144b <main+0x2cb>
mov    -0x2030(%rbp),%ecx
mov    -0x2028(%rbp),%rax
movslq %ecx,%rcx
add    %rcx,%rax
mov    %rax,-0x2028(%rbp)
mov    -0x2030(%rbp),%ecx
mov    -0x2034(%rbp),%eax
sub    %ecx,%eax
mov    %eax,-0x2034(%rbp)
mov    -0x202c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x202c(%rbp)
jmp    1329 <main+0x1a9>
cmpl   $0x0,-0x2038(%rbp)
jne    146a <main+0x2ea>
lea    -0x2020(%rbp),%rdi
call   1030 <system@plt>
mov    %eax,-0x2038(%rbp)
cmpl   $0x0,-0x2038(%rbp)
je     1493 <main+0x313>
mov    -0x2038(%rbp),%edi
call   1090 <strerror@plt>
mov    %rax,%rsi
lea    0xc12(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x2038(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x2050,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x2008,%rsp
mov    %rsi,%r15
mov    %edi,%r14d
mov    (%rsi),%rdi
lea    0xe4f(%rip),%rsi
call   10b0 <strstr@plt>
lea    0xe4b(%rip),%rbx
test   %rax,%rax
jne    1209 <main+0x79>
mov    (%r15),%rdi
lea    0xe38(%rip),%rsi
call   10b0 <strstr@plt>
test   %rax,%rax
jne    1209 <main+0x79>
mov    (%r15),%rdi
lea    0xe6f(%rip),%rsi
call   10b0 <strstr@plt>
lea    0xe28(%rip),%rbx
test   %rax,%rax
jne    1209 <main+0x79>
mov    (%r15),%rdi
lea    0xe15(%rip),%rsi
call   10b0 <strstr@plt>
test   %rax,%rax
je     1340 <main+0x1b0>
mov    %rbx,%rdi
call   1080 <find_gcc@plt>
test   %rax,%rax
je     12db <main+0x14b>
mov    %rax,%rbp
mov    %rax,%rdi
call   1090 <check_gcc_reject_mno_cygwin@plt>
test   %eax,%eax
js     12ee <main+0x15e>
mov    %eax,%r12d
lea    0xdf2(%rip),%rdx
mov    %rsp,%rdi
mov    $0x2000,%ebx
mov    $0x2000,%esi
mov    %rbp,%rcx
call   1060 <snprintf@plt>
cmp    $0x2,%r14d
jl     1302 <main+0x172>
sub    %eax,%ebx
test   %ebx,%ebx
jle    1302 <main+0x172>
cltq
lea    (%rsp,%rax,1),%rbp
mov    %r14d,%r13d
mov    $0x2,%r14d
nop
test   %r12d,%r12d
je     128b <main+0xfb>
mov    -0x8(%r15,%r14,8),%rdi
lea    0xd9b(%rip),%rsi
call   1070 <strcmp@plt>
test   %rax,%rax
je     12c0 <main+0x130>
mov    -0x8(%r15,%r14,8),%rcx
mov    %rbp,%rdi
mov    %ebx,%esi
lea    0xd8c(%rip),%rdx
call   1060 <snprintf@plt>
test   %eax,%eax
js     12f5 <main+0x165>
sub    %eax,%ebx
jle    12f5 <main+0x165>
mov    %eax,%eax
add    %rax,%rbp
cmp    %r13,%r14
jb     12d1 <main+0x141>
jmp    1302 <main+0x172>
cs nopw 0x0(%rax,%rax,1)
nop
lea    0xdaa(%rip),%rdi
call   1030 <puts@plt>
cmp    %r13,%r14
jae    1302 <main+0x172>
add    $0x1,%r14
test   %ebx,%ebx
jg     1270 <main+0xe0>
jmp    1302 <main+0x172>
lea    0xd71(%rip),%rdi
call   1030 <puts@plt>
mov    $0xffffffec,%ebx
jmp    132c <main+0x19c>
mov    $0xffffffe2,%ebx
jmp    132c <main+0x19c>
mov    0x2cec(%rip),%rax
mov    (%rax),%ebx
test   %ebx,%ebx
jne    1310 <main+0x180>
mov    %rsp,%rdi
call   1040 <system@plt>
mov    %eax,%ebx
test   %eax,%eax
je     132a <main+0x19a>
mov    %ebx,%edi
call   10a0 <strerror@plt>
lea    0xd0e(%rip),%rdi
mov    %rax,%rsi
xor    %eax,%eax
call   1050 <printf@plt>
jmp    132c <main+0x19c>
xor    %ebx,%ebx
mov    %ebx,%eax
add    $0x2008,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
lea    0xcf0(%rip),%rdi
call   1030 <puts@plt>
mov    $0xfffffff6,%ebx
jmp    132c <main+0x19c>

LLVM IR (-O0):
@.str = [19 x i8] c"python cc_mingw.py\00"
@.str.1 = [4 x i8] c"gcc\00"
@.str.2 = [4 x i8] c"GCC\00"
@.str.3 = [8 x i8] c"gcc.exe\00"
@.str.4 = [4 x i8] c"g++\00"
@.str.5 = [4 x i8] c"G++\00"
@.str.6 = [8 x i8] c"g++.exe\00"
@.str.7 = [29 x i8] c"Error: app name not gcc/g++\0A\00"
@.str.8 = [31 x i8] c"Error: real gcc/g++ not found\0A\00"
@.str.9 = [3 x i8] c"%s\00"
@.str.10 = [12 x i8] c"-mno-cygwin\00"
@.str.11 = [31 x i8] c"Removed option '-mno-cygwin'.\0A\00"
@.str.12 = [4 x i8] c" %s\00"
@E2BIG = global i32 0
@.str.13 = [11 x i8] c"Error: %s\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i8*
%7 = alloca [8192 x i8]
%8 = alloca i8*
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i8*
%14 = alloca i8*
%15 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i8** %6
store i32 0, i32* %12
%16 = load i8**, i8*** %5
%17 = getelementptr inbounds i8*, i8** %16, i64 0
%18 = load i8*, i8** %17
%19 = call i64 @strstr(i8* %18, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
%20 = icmp ne i64 %19, 0
br i1 %20, label %27, label %21
21: ; preds = %2
%22 = load i8**, i8*** %5
%23 = getelementptr inbounds i8*, i8** %22, i64 0
%24 = load i8*, i8** %23
%25 = call i64 @strstr(i8* %24, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0))
%26 = icmp ne i64 %25, 0
br i1 %26, label %27, label %28
27: ; preds = %21, %2
store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0), i8** %14
br label %44
28: ; preds = %21
%29 = load i8**, i8*** %5
%30 = getelementptr inbounds i8*, i8** %29, i64 0
%31 = load i8*, i8** %30
%32 = call i64 @strstr(i8* %31, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0))
%33 = icmp ne i64 %32, 0
br i1 %33, label %40, label %34
34: ; preds = %28
%35 = load i8**, i8*** %5
%36 = getelementptr inbounds i8*, i8** %35, i64 0
%37 = load i8*, i8** %36
%38 = call i64 @strstr(i8* %37, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0))
%39 = icmp ne i64 %38, 0
br i1 %39, label %40, label %41
40: ; preds = %34, %28
store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.6, i64 0, i64 0), i8** %14
br label %43
41: ; preds = %34
%42 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.7, i64 0, i64 0))
store i32 -10, i32* %3
br label %134
43: ; preds = %40
br label %44
44: ; preds = %43, %27
%45 = load i8*, i8** %14
%46 = call i8* @find_gcc(i8* %45)
store i8* %46, i8** %14
%47 = load i8*, i8** %14
%48 = icmp ne i8* %47, null
br i1 %48, label %51, label %49
49: ; preds = %44
%50 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.8, i64 0, i64 0))
store i32 -20, i32* %3
br label %134
51: ; preds = %44
%52 = load i8*, i8** %14
%53 = call i32 @check_gcc_reject_mno_cygwin(i8* %52)
store i32 %53, i32* %15
%54 = load i32, i32* %15
%55 = icmp slt i32 %54, 0
br i1 %55, label %56, label %57
56: ; preds = %51
store i32 -30, i32* %3
br label %134
57: ; preds = %51
%58 = getelementptr inbounds [8192 x i8], [8192 x i8]* %7, i64 0, i64 0
%59 = load i8*, i8** %14
%60 = call i32 @snprintf(i8* %58, i32 8192, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.9, i64 0, i64 0), i8* %59)
store i32 %60, i32* %10
%61 = getelementptr inbounds [8192 x i8], [8192 x i8]* %7, i64 0, i64 0
%62 = load i32, i32* %10
%63 = sext i32 %62 to i64
%64 = getelementptr inbounds i8, i8* %61, i64 %63
store i8* %64, i8** %8
%65 = load i32, i32* %10
%66 = sext i32 %65 to i64
%67 = sub i64 8192, %66
%68 = trunc i64 %67 to i32
store i32 %68, i32* %11
store i32 1, i32* %9
br label %69
69: ; preds = %116, %57
%70 = load i32, i32* %9
%71 = load i32, i32* %4
%72 = icmp slt i32 %70, %71
br i1 %72, label %73, label %76
73: ; preds = %69
%74 = load i32, i32* %11
%75 = icmp sgt i32 %74, 0
br label %76
76: ; preds = %73, %69
%77 = phi i1 [ false, %69 ], [ %75, %73 ]
br i1 %77, label %78, label %119
78: ; preds = %76
%79 = load i32, i32* %15
%80 = icmp ne i32 %79, 0
br i1 %80, label %81, label %91
81: ; preds = %78
%82 = load i8**, i8*** %5
%83 = load i32, i32* %9
%84 = sext i32 %83 to i64
%85 = getelementptr inbounds i8*, i8** %82, i64 %84
%86 = load i8*, i8** %85
%87 = call i64 @strcmp(i8* %86, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.10, i64 0, i64 0))
%88 = icmp eq i64 %87, 0
br i1 %88, label %89, label %91
89: ; preds = %81
%90 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.11, i64 0, i64 0))
br label %116
91: ; preds = %81, %78
%92 = load i8*, i8** %8
%93 = load i32, i32* %11
%94 = load i8**, i8*** %5
%95 = load i32, i32* %9
%96 = sext i32 %95 to i64
%97 = getelementptr inbounds i8*, i8** %94, i64 %96
%98 = load i8*, i8** %97
%99 = call i32 @snprintf(i8* %92, i32 %93, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.12, i64 0, i64 0), i8* %98)
store i32 %99, i32* %10
%100 = load i32, i32* %10
%101 = icmp slt i32 %100, 0
br i1 %101, label %106, label %102
102: ; preds = %91
%103 = load i32, i32* %10
%104 = load i32, i32* %11
%105 = icmp sge i32 %103, %104
br i1 %105, label %106, label %108
106: ; preds = %102, %91
%107 = load i32, i32* @E2BIG
store i32 %107, i32* %12
br label %119
108: ; preds = %102
%109 = load i32, i32* %10
%110 = load i8*, i8** %8
%111 = sext i32 %109 to i64
%112 = getelementptr inbounds i8, i8* %110, i64 %111
store i8* %112, i8** %8
%113 = load i32, i32* %10
%114 = load i32, i32* %11
%115 = sub nsw i32 %114, %113
store i32 %115, i32* %11
br label %116
116: ; preds = %108, %89
%117 = load i32, i32* %9
%118 = add nsw i32 %117, 1
store i32 %118, i32* %9
br label %69
119: ; preds = %106, %76
%120 = load i32, i32* %12
%121 = icmp ne i32 %120, 0
br i1 %121, label %125, label %122
122: ; preds = %119
%123 = getelementptr inbounds [8192 x i8], [8192 x i8]* %7, i64 0, i64 0
%124 = call i32 @system(i8* %123)
store i32 %124, i32* %12
br label %125
125: ; preds = %122, %119
%126 = load i32, i32* %12
%127 = icmp ne i32 %126, 0
br i1 %127, label %128, label %132
128: ; preds = %125
%129 = load i32, i32* %12
%130 = call i8* @strerror(i32 %129)
%131 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.13, i64 0, i64 0), i8* %130)
br label %132
132: ; preds = %128, %125
%133 = load i32, i32* %12
store i32 %133, i32* %3
br label %134
134: ; preds = %132, %56, %49, %41
%135 = load i32, i32* %3
ret i32 %135
}

LLVM IR (-O2):
@.str.1 = [4 x i8] c"gcc\00"
@.str.2 = [4 x i8] c"GCC\00"
@.str.3 = [8 x i8] c"gcc.exe\00"
@.str.4 = [4 x i8] c"g++\00"
@.str.5 = [4 x i8] c"G++\00"
@.str.6 = [8 x i8] c"g++.exe\00"
@.str.9 = [3 x i8] c"%s\00"
@.str.10 = [12 x i8] c"-mno-cygwin\00"
@.str.12 = [4 x i8] c" %s\00"
@E2BIG = global i32 0
@.str.13 = [11 x i8] c"Error: %s\0A\00"
@str = [28 x i8] c"Error: app name not gcc/g++\00"
@str.14 = [30 x i8] c"Error: real gcc/g++ not found\00"
@str.15 = [30 x i8] c"Removed option '-mno-cygwin'.\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca [8192 x i8]
%4 = getelementptr inbounds [8192 x i8], [8192 x i8]* %3, i64 0, i64 0
%5 = load i8*, i8** %1
%6 = tail call i64 @strstr(i8* %5, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
%7 = icmp eq i64 %6, 0
br i1 %7, label %8, label %22
8: ; preds = %2
%9 = load i8*, i8** %1
%10 = tail call i64 @strstr(i8* %9, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0))
%11 = icmp eq i64 %10, 0
br i1 %11, label %12, label %22
12: ; preds = %8
%13 = load i8*, i8** %1
%14 = tail call i64 @strstr(i8* %13, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0))
%15 = icmp eq i64 %14, 0
br i1 %15, label %16, label %22
16: ; preds = %12
%17 = load i8*, i8** %1
%18 = tail call i64 @strstr(i8* %17, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0))
%19 = icmp eq i64 %18, 0
br i1 %19, label %20, label %22
20: ; preds = %16
%21 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @str, i64 0, i64 0))
br label %81
22: ; preds = %12, %16, %2, %8
%23 = phi i8* [ getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0), %8 ], [ getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0), %2 ], [ getelementptr inbounds ([8 x i8], [8 x i8]* @.str.6, i64 0, i64 0), %16 ], [ getelementptr inbounds ([8 x i8], [8 x i8]* @.str.6, i64 0, i64 0), %12 ]
%24 = tail call i8* @find_gcc(i8* %23)
%25 = icmp eq i8* %24, null
br i1 %25, label %26, label %28
26: ; preds = %22
%27 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @str.14, i64 0, i64 0))
br label %81
28: ; preds = %22
%29 = tail call i32 @check_gcc_reject_mno_cygwin(i8* %24)
%30 = icmp slt i32 %29, 0
br i1 %30, label %81, label %31
31: ; preds = %28
%32 = call i32 @snprintf(i8* %4, i32 8192, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.9, i64 0, i64 0), i8* %24)
%33 = sub i32 8192, %32
%34 = icmp sgt i32 %0, 1
%35 = icmp sgt i32 %33, 0
%36 = select i1 %34, i1 %35, i1 false
br i1 %36, label %37, label %74
37: ; preds = %31
%38 = sext i32 %32 to i64
%39 = getelementptr inbounds [8192 x i8], [8192 x i8]* %3, i64 0, i64 %38
%40 = icmp eq i32 %29, 0
%41 = zext i32 %0 to i64
br label %42
42: ; preds = %37, %64
%43 = phi i64 [ 1, %37 ], [ %67, %64 ]
%44 = phi i8* [ %39, %37 ], [ %66, %64 ]
%45 = phi i32 [ %33, %37 ], [ %65, %64 ]
br i1 %40, label %53, label %46
46: ; preds = %42
%47 = getelementptr inbounds i8*, i8** %1, i64 %43
%48 = load i8*, i8** %47
%49 = call i64 @strcmp(i8* %48, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.10, i64 0, i64 0))
%50 = icmp eq i64 %49, 0
br i1 %50, label %51, label %53
51: ; preds = %46
%52 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @str.15, i64 0, i64 0))
br label %64
53: ; preds = %46, %42
%54 = getelementptr inbounds i8*, i8** %1, i64 %43
%55 = load i8*, i8** %54
%56 = call i32 @snprintf(i8* %44, i32 %45, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.12, i64 0, i64 0), i8* %55)
%57 = icmp sgt i32 %56, -1
%58 = icmp sgt i32 %45, %56
%59 = select i1 %57, i1 %58, i1 false
br i1 %59, label %60, label %71
60: ; preds = %53
%61 = zext i32 %56 to i64
%62 = getelementptr inbounds i8, i8* %44, i64 %61
%63 = sub nsw i32 %45, %56
br label %64
64: ; preds = %60, %51
%65 = phi i32 [ %45, %51 ], [ %63, %60 ]
%66 = phi i8* [ %44, %51 ], [ %62, %60 ]
%67 = add nuw nsw i64 %43, 1
%68 = icmp ult i64 %67, %41
%69 = icmp sgt i32 %65, 0
%70 = select i1 %68, i1 %69, i1 false
br i1 %70, label %42, label %74
71: ; preds = %53
%72 = load i32, i32* @E2BIG
%73 = icmp eq i32 %72, 0
br i1 %73, label %74, label %77
74: ; preds = %64, %31, %71
%75 = call i32 @system(i8* %4)
%76 = icmp eq i32 %75, 0
br i1 %76, label %81, label %77
77: ; preds = %71, %74
%78 = phi i32 [ %75, %74 ], [ %72, %71 ]
%79 = call i8* @strerror(i32 %78)
%80 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str.13, i64 0, i64 0), i8* %79)
br label %81
81: ; preds = %74, %77, %28, %26, %20
%82 = phi i32 [ -20, %26 ], [ -10, %20 ], [ -30, %28 ], [ %78, %77 ], [ 0, %74 ]
ret i32 %82
}