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

/* Variables and functions */
int /*<<< orphan*/ fs_2_h_patch_sc66(char *, char *);
int /*<<< orphan*/ fs_2_h_patch_x1000(char *, char *);
int /*<<< orphan*/ help();
scalar_t__ strcmp(char *, char *);
int /*<<< orphan*/ strcpy(char *, char *);
int main(int argc, const char *argv[]) {
  int ret = 0;
  int md5 = 0;
  char **pp = NULL;
  char in_path[512] = "inf.txt";
  char out_path[512] = "_fs_patch.h";
  char module[512] = "x1000";
  if (argc == 1) {
    help();
    return 0;
  }
  for (pp = (char **)(argv + 1); *pp; pp++) {
    if (strcmp(*pp, "-o") == 0) {
      pp++;
      if (*pp)
        strcpy(out_path, *pp);
      else
        break;
    } else if (strcmp(*pp, "-i") == 0) {
      pp++;
      if (*pp)
        strcpy(in_path, *pp);
      else
        break;
    } else if (strcmp(*pp, "-v") == 0) {
      help();
      return 0;
    } else if (strcmp(*pp, "-m") == 0) {
      pp++;
      if (*pp)
        strcpy(module, *pp);
      else
        break;
    }
  }
  if (strcmp(module, "sc66") == 0) {
    fs_2_h_patch_sc66(in_path, out_path);
  } else {
    fs_2_h_patch_x1000(in_path, out_path);
  }
  return ret;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x620,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
movq   $0x0,-0x20(%rbp)
lea    -0x220(%rbp),%rdi
lea    0xe53(%rip),%rsi
mov    $0x200,%edx
call   1080 <memcpy@plt>
lea    -0x420(%rbp),%rdi
lea    0x103b(%rip),%rsi
mov    $0x200,%edx
call   1080 <memcpy@plt>
lea    -0x620(%rbp),%rdi
xor    %esi,%esi
mov    $0x200,%edx
call   1050 <memset@plt>
movb   $0x78,-0x620(%rbp)
movb   $0x31,-0x61f(%rbp)
movb   $0x30,-0x61e(%rbp)
movb   $0x30,-0x61d(%rbp)
movb   $0x30,-0x61c(%rbp)
cmpl   $0x1,-0x8(%rbp)
jne    1222 <main+0xb2>
mov    $0x0,%al
call   1090 <help@plt>
movl   $0x0,-0x4(%rbp)
jmp    13ea <main+0x27a>
mov    -0x10(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
cmpq   $0x0,(%rax)
je     139c <main+0x22c>
mov    -0x20(%rbp),%rax
mov    (%rax),%rdi
lea    0x11b6(%rip),%rsi
call   1070 <strcmp@plt>
cmp    $0x0,%rax
jne    1295 <main+0x125>
mov    -0x20(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
cmpq   $0x0,(%rax)
je     128b <main+0x11b>
lea    -0x420(%rbp),%rdi
mov    -0x20(%rbp),%rax
mov    (%rax),%rsi
call   1040 <strcpy@plt>
jmp    1290 <main+0x120>
jmp    139c <main+0x22c>
jmp    1386 <main+0x216>
mov    -0x20(%rbp),%rax
mov    (%rax),%rdi
lea    0x1160(%rip),%rsi
call   1070 <strcmp@plt>
cmp    $0x0,%rax
jne    12ee <main+0x17e>
mov    -0x20(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
cmpq   $0x0,(%rax)
je     12e4 <main+0x174>
lea    -0x220(%rbp),%rdi
mov    -0x20(%rbp),%rax
mov    (%rax),%rsi
call   1040 <strcpy@plt>
jmp    12e9 <main+0x179>
jmp    139c <main+0x22c>
jmp    1381 <main+0x211>
mov    -0x20(%rbp),%rax
mov    (%rax),%rdi
lea    0x110a(%rip),%rsi
call   1070 <strcmp@plt>
cmp    $0x0,%rax
jne    131e <main+0x1ae>
mov    $0x0,%al
call   1090 <help@plt>
movl   $0x0,-0x4(%rbp)
jmp    13ea <main+0x27a>
mov    -0x20(%rbp),%rax
mov    (%rax),%rdi
lea    0x10dd(%rip),%rsi
call   1070 <strcmp@plt>
cmp    $0x0,%rax
jne    1377 <main+0x207>
mov    -0x20(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
cmpq   $0x0,(%rax)
je     136d <main+0x1fd>
lea    -0x620(%rbp),%rdi
mov    -0x20(%rbp),%rax
mov    (%rax),%rsi
call   1040 <strcpy@plt>
jmp    1372 <main+0x202>
jmp    139c <main+0x22c>
jmp    1377 <main+0x207>
jmp    137c <main+0x20c>
jmp    1381 <main+0x211>
jmp    1386 <main+0x216>
jmp    138b <main+0x21b>
mov    -0x20(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x20(%rbp)
jmp    122e <main+0xbe>
lea    -0x620(%rbp),%rdi
lea    0x1062(%rip),%rsi
call   1070 <strcmp@plt>
cmp    $0x0,%rax
jne    13d1 <main+0x261>
lea    -0x220(%rbp),%rdi
lea    -0x420(%rbp),%rsi
call   1060 <fs_2_h_patch_sc66@plt>
jmp    13e4 <main+0x274>
lea    -0x220(%rbp),%rdi
lea    -0x420(%rbp),%rsi
call   1030 <fs_2_h_patch_x1000@plt>
mov    -0x14(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x620,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x608,%rsp
mov    %rsi,%r15
mov    %edi,%ebp
lea    0xe73(%rip),%rsi
lea    0x400(%rsp),%rdi
mov    $0x200,%edx
call   1080 <memcpy@plt>
lea    0x105a(%rip),%rsi
lea    0x200(%rsp),%rdi
mov    $0x200,%edx
call   1080 <memcpy@plt>
mov    %rsp,%rdi
mov    $0x200,%edx
xor    %esi,%esi
call   1050 <memset@plt>
movl   $0x30303178,(%rsp)
movb   $0x30,0x4(%rsp)
cmp    $0x1,%ebp
jne    11e4 <main+0x74>
xor    %eax,%eax
call   1090 <help@plt>
jmp    12fa <main+0x18a>
mov    0x8(%r15),%rdi
test   %rdi,%rdi
je     12ca <main+0x15a>
lea    0x8(%r15),%rbx
lea    0x1204(%rip),%r14
lea    0x1200(%rip),%r12
lea    0x11fc(%rip),%rbp
lea    0x11f8(%rip),%r13
jmp    1251 <main+0xe1>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    0x10(%r15),%rsi
test   %rsi,%rsi
je     12ca <main+0x15a>
add    $0x10,%r15
lea    0x400(%rsp),%rdi
call   1040 <strcpy@plt>
mov    %r15,%rbx
mov    %rbx,%r15
add    $0x8,%rbx
mov    0x8(%r15),%rdi
test   %rdi,%rdi
je     12ca <main+0x15a>
mov    %r14,%rsi
call   1070 <strcmp@plt>
test   %rax,%rax
je     12b0 <main+0x140>
mov    (%rbx),%rdi
mov    %r12,%rsi
call   1070 <strcmp@plt>
test   %rax,%rax
je     1220 <main+0xb0>
mov    (%rbx),%rdi
mov    %rbp,%rsi
call   1070 <strcmp@plt>
test   %rax,%rax
je     11d8 <main+0x68>
mov    (%rbx),%rdi
mov    %r13,%rsi
call   1070 <strcmp@plt>
test   %rax,%rax
jne    1241 <main+0xd1>
mov    0x10(%r15),%rsi
test   %rsi,%rsi
je     12ca <main+0x15a>
add    $0x10,%r15
mov    %rsp,%rdi
jmp    1239 <main+0xc9>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    0x10(%r15),%rsi
test   %rsi,%rsi
je     12ca <main+0x15a>
add    $0x10,%r15
lea    0x200(%rsp),%rdi
jmp    1239 <main+0xc9>
lea    0x113b(%rip),%rsi
mov    %rsp,%rdi
call   1070 <strcmp@plt>
lea    0x400(%rsp),%rdi
lea    0x200(%rsp),%rsi
test   %rax,%rax
je     12f5 <main+0x185>
call   1030 <fs_2_h_patch_x1000@plt>
jmp    12fa <main+0x18a>
call   1060 <fs_2_h_patch_sc66@plt>
xor    %eax,%eax
add    $0x608,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@__const.main.in_path = [512 x i8] c"inf.txt\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00"
@__const.main.out_path = [512 x i8] c"_fs_patch.h\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00"
@.str = [3 x i8] c"-o\00"
@.str.1 = [3 x i8] c"-i\00"
@.str.2 = [3 x i8] c"-v\00"
@.str.3 = [3 x i8] c"-m\00"
@.str.4 = [5 x i8] c"sc66\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 i8**
%9 = alloca [512 x i8]
%10 = alloca [512 x i8]
%11 = alloca [512 x i8]
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 0, i32* %6
store i32 0, i32* %7
store i8** null, i8*** %8
%12 = bitcast [512 x i8]* %9 to i8*
%13 = bitcast [512 x i8]* %10 to i8*
%14 = bitcast [512 x i8]* %11 to i8*
%15 = bitcast i8* %14 to [512 x i8]*
%16 = getelementptr inbounds [512 x i8], [512 x i8]* %15, i32 0, i32 0
store i8 120, i8* %16
%17 = getelementptr inbounds [512 x i8], [512 x i8]* %15, i32 0, i32 1
store i8 49, i8* %17
%18 = getelementptr inbounds [512 x i8], [512 x i8]* %15, i32 0, i32 2
store i8 48, i8* %18
%19 = getelementptr inbounds [512 x i8], [512 x i8]* %15, i32 0, i32 3
store i8 48, i8* %19
%20 = getelementptr inbounds [512 x i8], [512 x i8]* %15, i32 0, i32 4
store i8 48, i8* %20
%21 = load i32, i32* %4
%22 = icmp eq i32 %21, 1
br i1 %22, label %23, label %25
23: ; preds = %2
%24 = call i32 (...) @help()
store i32 0, i32* %3
br label %114
25: ; preds = %2
%26 = load i8**, i8*** %5
%27 = getelementptr inbounds i8*, i8** %26, i64 1
store i8** %27, i8*** %8
br label %28
28: ; preds = %97, %25
%29 = load i8**, i8*** %8
%30 = load i8*, i8** %29
%31 = icmp ne i8* %30, null
br i1 %31, label %32, label %100
32: ; preds = %28
%33 = load i8**, i8*** %8
%34 = load i8*, i8** %33
%35 = call i64 @strcmp(i8* %34, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%36 = icmp eq i64 %35, 0
br i1 %36, label %37, label %50
37: ; preds = %32
%38 = load i8**, i8*** %8
%39 = getelementptr inbounds i8*, i8** %38, i32 1
store i8** %39, i8*** %8
%40 = load i8**, i8*** %8
%41 = load i8*, i8** %40
%42 = icmp ne i8* %41, null
br i1 %42, label %43, label %48
43: ; preds = %37
%44 = getelementptr inbounds [512 x i8], [512 x i8]* %10, i64 0, i64 0
%45 = load i8**, i8*** %8
%46 = load i8*, i8** %45
%47 = call i32 @strcpy(i8* %44, i8* %46)
br label %49
48: ; preds = %37
br label %100
49: ; preds = %43
br label %96
50: ; preds = %32
%51 = load i8**, i8*** %8
%52 = load i8*, i8** %51
%53 = call i64 @strcmp(i8* %52, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%54 = icmp eq i64 %53, 0
br i1 %54, label %55, label %68
55: ; preds = %50
%56 = load i8**, i8*** %8
%57 = getelementptr inbounds i8*, i8** %56, i32 1
store i8** %57, i8*** %8
%58 = load i8**, i8*** %8
%59 = load i8*, i8** %58
%60 = icmp ne i8* %59, null
br i1 %60, label %61, label %66
61: ; preds = %55
%62 = getelementptr inbounds [512 x i8], [512 x i8]* %9, i64 0, i64 0
%63 = load i8**, i8*** %8
%64 = load i8*, i8** %63
%65 = call i32 @strcpy(i8* %62, i8* %64)
br label %67
66: ; preds = %55
br label %100
67: ; preds = %61
br label %95
68: ; preds = %50
%69 = load i8**, i8*** %8
%70 = load i8*, i8** %69
%71 = call i64 @strcmp(i8* %70, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
%72 = icmp eq i64 %71, 0
br i1 %72, label %73, label %75
73: ; preds = %68
%74 = call i32 (...) @help()
store i32 0, i32* %3
br label %114
75: ; preds = %68
%76 = load i8**, i8*** %8
%77 = load i8*, i8** %76
%78 = call i64 @strcmp(i8* %77, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0))
%79 = icmp eq i64 %78, 0
br i1 %79, label %80, label %93
80: ; preds = %75
%81 = load i8**, i8*** %8
%82 = getelementptr inbounds i8*, i8** %81, i32 1
store i8** %82, i8*** %8
%83 = load i8**, i8*** %8
%84 = load i8*, i8** %83
%85 = icmp ne i8* %84, null
br i1 %85, label %86, label %91
86: ; preds = %80
%87 = getelementptr inbounds [512 x i8], [512 x i8]* %11, i64 0, i64 0
%88 = load i8**, i8*** %8
%89 = load i8*, i8** %88
%90 = call i32 @strcpy(i8* %87, i8* %89)
br label %92
91: ; preds = %80
br label %100
92: ; preds = %86
br label %93
93: ; preds = %92, %75
br label %94
94: ; preds = %93
br label %95
95: ; preds = %94, %67
br label %96
96: ; preds = %95, %49
br label %97
97: ; preds = %96
%98 = load i8**, i8*** %8
%99 = getelementptr inbounds i8*, i8** %98, i32 1
store i8** %99, i8*** %8
br label %28
100: ; preds = %91, %66, %48, %28
%101 = getelementptr inbounds [512 x i8], [512 x i8]* %11, i64 0, i64 0
%102 = call i64 @strcmp(i8* %101, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0))
%103 = icmp eq i64 %102, 0
br i1 %103, label %104, label %108
104: ; preds = %100
%105 = getelementptr inbounds [512 x i8], [512 x i8]* %9, i64 0, i64 0
%106 = getelementptr inbounds [512 x i8], [512 x i8]* %10, i64 0, i64 0
%107 = call i32 @fs_2_h_patch_sc66(i8* %105, i8* %106)
br label %112
108: ; preds = %100
%109 = getelementptr inbounds [512 x i8], [512 x i8]* %9, i64 0, i64 0
%110 = getelementptr inbounds [512 x i8], [512 x i8]* %10, i64 0, i64 0
%111 = call i32 @fs_2_h_patch_x1000(i8* %109, i8* %110)
br label %112
112: ; preds = %108, %104
%113 = load i32, i32* %6
store i32 %113, i32* %3
br label %114
114: ; preds = %112, %73, %23
%115 = load i32, i32* %3
ret i32 %115
}

LLVM IR (-O2):
@__const.main.in_path = [512 x i8] c"inf.txt\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00"
@__const.main.out_path = [512 x i8] c"_fs_patch.h\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00"
@.str = [3 x i8] c"-o\00"
@.str.1 = [3 x i8] c"-i\00"
@.str.2 = [3 x i8] c"-v\00"
@.str.3 = [3 x i8] c"-m\00"
@.str.4 = [5 x i8] c"sc66\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca [512 x i8]
%4 = alloca [512 x i8]
%5 = alloca [512 x i8]
%6 = getelementptr inbounds [512 x i8], [512 x i8]* %3, i64 0, i64 0
%7 = getelementptr inbounds [512 x i8], [512 x i8]* %4, i64 0, i64 0
%8 = getelementptr inbounds [512 x i8], [512 x i8]* %5, i64 0, i64 0
store i8 120, i8* %8
%9 = getelementptr inbounds [512 x i8], [512 x i8]* %5, i64 0, i64 1
store i8 49, i8* %9
%10 = getelementptr inbounds [512 x i8], [512 x i8]* %5, i64 0, i64 2
store i8 48, i8* %10
%11 = getelementptr inbounds [512 x i8], [512 x i8]* %5, i64 0, i64 3
store i8 48, i8* %11
%12 = getelementptr inbounds [512 x i8], [512 x i8]* %5, i64 0, i64 4
store i8 48, i8* %12
%13 = icmp eq i32 %0, 1
br i1 %13, label %18, label %14
14: ; preds = %2
%15 = getelementptr inbounds i8*, i8** %1, i64 1
%16 = load i8*, i8** %15
%17 = icmp eq i8* %16, null
br i1 %17, label %63, label %20
18: ; preds = %2
%19 = tail call i32 (...) @help()
br label %70
20: ; preds = %14, %58
%21 = phi i8* [ %61, %58 ], [ %16, %14 ]
%22 = phi i8** [ %60, %58 ], [ %15, %14 ]
%23 = phi i8** [ %59, %58 ], [ %1, %14 ]
%24 = call i64 @strcmp(i8* %21, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%25 = icmp eq i64 %24, 0
br i1 %25, label %26, label %32
26: ; preds = %20
%27 = getelementptr inbounds i8*, i8** %23, i64 2
%28 = load i8*, i8** %27
%29 = icmp eq i8* %28, null
br i1 %29, label %63, label %30
30: ; preds = %26
%31 = call i32 @strcpy(i8* %7, i8* %28)
br label %58
32: ; preds = %20
%33 = load i8*, i8** %22
%34 = call i64 @strcmp(i8* %33, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%35 = icmp eq i64 %34, 0
br i1 %35, label %36, label %42
36: ; preds = %32
%37 = getelementptr inbounds i8*, i8** %23, i64 2
%38 = load i8*, i8** %37
%39 = icmp eq i8* %38, null
br i1 %39, label %63, label %40
40: ; preds = %36
%41 = call i32 @strcpy(i8* %6, i8* %38)
br label %58
42: ; preds = %32
%43 = load i8*, i8** %22
%44 = call i64 @strcmp(i8* %43, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
%45 = icmp eq i64 %44, 0
br i1 %45, label %46, label %48
46: ; preds = %42
%47 = call i32 (...) @help()
br label %70
48: ; preds = %42
%49 = load i8*, i8** %22
%50 = call i64 @strcmp(i8* %49, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0))
%51 = icmp eq i64 %50, 0
br i1 %51, label %52, label %58
52: ; preds = %48
%53 = getelementptr inbounds i8*, i8** %23, i64 2
%54 = load i8*, i8** %53
%55 = icmp eq i8* %54, null
br i1 %55, label %63, label %56
56: ; preds = %52
%57 = call i32 @strcpy(i8* %8, i8* %54)
br label %58
58: ; preds = %30, %56, %48, %40
%59 = phi i8** [ %27, %30 ], [ %37, %40 ], [ %53, %56 ], [ %22, %48 ]
%60 = getelementptr inbounds i8*, i8** %59, i64 1
%61 = load i8*, i8** %60
%62 = icmp eq i8* %61, null
br i1 %62, label %63, label %20
63: ; preds = %58, %26, %36, %52, %14
%64 = call i64 @strcmp(i8* %8, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0))
%65 = icmp eq i64 %64, 0
br i1 %65, label %66, label %68
66: ; preds = %63
%67 = call i32 @fs_2_h_patch_sc66(i8* %6, i8* %7)
br label %70
68: ; preds = %63
%69 = call i32 @fs_2_h_patch_x1000(i8* %6, i8* %7)
br label %70
70: ; preds = %66, %68, %46, %18
ret i32 0
}