#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 */
scalar_t__ cp2win(char *);
scalar_t__ disposeUrl();
int /*<<< orphan*/ downWeb(int, char *);
int /*<<< orphan*/ exit(int /*<<< orphan*/);
scalar_t__ getTDK();
scalar_t__ price();
int /*<<< orphan*/ printf(char *);
scalar_t__ sizeColor();
scalar_t__ writeRest();
scalar_t__ writeTop();
int main(int argc, char *argv[]) {
  downWeb(argc, argv[1]);
  if (0 != getTDK()) {
    printf("getTDK error!\n");
    exit(0);
  }
  if (0 != disposeUrl()) {
    printf("disposeUrl error!\n");
    exit(0);
  }
  if (0 != sizeColor()) {
    printf("get size|color error!\n");
    exit(0);
  }
  if (0 != writeTop()) {
    printf("writeTop error!\n");
    exit(0);
  }
  if (0 != price()) {
    printf("main: price error!\n");
    exit(0);
  }
  if (0 != writeRest()) {
    printf("writeRest error!\n");
    exit(0);
  }
  if (0 != cp2win(argv[1])) {
    printf("main: cp error!\n");
    exit(0);
  }
  printf("商品表单信息已生成\n请用Excel打开位于您桌面上的final.haha文件\n");
  printf("请仔细检查该表格，如无误请另存为 .xls 或 .xlsx 格式再行编辑\n");
  printf("\n如遇排版错乱或任何格式问题请使用您已知的任何方式联系张三本人\n");
  printf("\n感谢使用本软件，祝您幸福\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rsi
call   1090 <downWeb@plt>
mov    $0x0,%al
call   10b0 <getTDK@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    %rcx,%rax
je     11ee <main+0x4e>
lea    0xe1e(%rip),%rdi
call   1040 <printf@plt>
xor    %edi,%edi
call   10a0 <exit@plt>
mov    $0x0,%al
call   1050 <disposeUrl@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    %rcx,%rax
je     1216 <main+0x76>
lea    0xe05(%rip),%rdi
call   1040 <printf@plt>
xor    %edi,%edi
call   10a0 <exit@plt>
mov    $0x0,%al
call   10c0 <sizeColor@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    %rcx,%rax
je     123e <main+0x9e>
lea    0xdf0(%rip),%rdi
call   1040 <printf@plt>
xor    %edi,%edi
call   10a0 <exit@plt>
mov    $0x0,%al
call   1030 <writeTop@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    %rcx,%rax
je     1266 <main+0xc6>
lea    0xddf(%rip),%rdi
call   1040 <printf@plt>
xor    %edi,%edi
call   10a0 <exit@plt>
mov    $0x0,%al
call   1060 <price@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    %rcx,%rax
je     128e <main+0xee>
lea    0xdc8(%rip),%rdi
call   1040 <printf@plt>
xor    %edi,%edi
call   10a0 <exit@plt>
mov    $0x0,%al
call   1070 <writeRest@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    %rcx,%rax
je     12b6 <main+0x116>
lea    0xdb4(%rip),%rdi
call   1040 <printf@plt>
xor    %edi,%edi
call   10a0 <exit@plt>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1080 <cp2win@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    %rcx,%rax
je     12e4 <main+0x144>
lea    0xd98(%rip),%rdi
call   1040 <printf@plt>
xor    %edi,%edi
call   10a0 <exit@plt>
lea    0xd96(%rip),%rdi
call   1040 <printf@plt>
lea    0xdde(%rip),%rdi
call   1040 <printf@plt>
lea    0xe26(%rip),%rdi
call   1040 <printf@plt>
lea    0xe77(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    %rsi,%rbx
mov    0x8(%rsi),%rsi
call   1090 <downWeb@plt>
xor    %eax,%eax
call   10b0 <getTDK@plt>
test   %rax,%rax
jne    1237 <main+0x97>
xor    %eax,%eax
call   1050 <disposeUrl@plt>
test   %rax,%rax
jne    1240 <main+0xa0>
xor    %eax,%eax
call   10c0 <sizeColor@plt>
test   %rax,%rax
jne    1249 <main+0xa9>
xor    %eax,%eax
call   1030 <writeTop@plt>
test   %rax,%rax
jne    1252 <main+0xb2>
xor    %eax,%eax
call   1060 <price@plt>
test   %rax,%rax
jne    125b <main+0xbb>
xor    %eax,%eax
call   1070 <writeRest@plt>
test   %rax,%rax
jne    1264 <main+0xc4>
mov    0x8(%rbx),%rdi
call   1080 <cp2win@plt>
test   %rax,%rax
jne    126d <main+0xcd>
lea    0xdf6(%rip),%rdi
call   1040 <puts@plt>
lea    0xe3d(%rip),%rdi
call   1040 <puts@plt>
lea    0xe84(%rip),%rdi
call   1040 <puts@plt>
lea    0xed4(%rip),%rdi
call   1040 <puts@plt>
xor    %eax,%eax
pop    %rbx
ret
lea    0xf56(%rip),%rdi
jmp    1274 <main+0xd4>
lea    0xf3b(%rip),%rdi
jmp    1274 <main+0xd4>
lea    0xf1c(%rip),%rdi
jmp    1274 <main+0xd4>
lea    0xf03(%rip),%rdi
jmp    1274 <main+0xd4>
lea    0xee7(%rip),%rdi
jmp    1274 <main+0xd4>
lea    0xecd(%rip),%rdi
jmp    1274 <main+0xd4>
lea    0xeb4(%rip),%rdi
call   1040 <puts@plt>
xor    %edi,%edi
call   10a0 <exit@plt>

LLVM IR (-O0):
@.str = [15 x i8] c"getTDK error!\0A\00"
@.str.1 = [19 x i8] c"disposeUrl error!\0A\00"
@.str.2 = [23 x i8] c"get size|color error!\0A\00"
@.str.3 = [17 x i8] c"writeTop error!\0A\00"
@.str.4 = [20 x i8] c"main: price error!\0A\00"
@.str.5 = [18 x i8] c"writeRest error!\0A\00"
@.str.6 = [17 x i8] c"main: cp error!\0A\00"
@.str.7 = [84 x i8] c"\E5\95\86\E5\93\81\E8\A1\A8\E5\8D\95\E4\BF\A1\E6\81\AF\E5\B7\B2\E7\94\9F\E6\88\90\0A\E8\AF\B7\E7\94\A8Excel\E6\89\93\E5\BC\80\E4\BD\8D\E4\BA\8E\E6\82\A8\E6\A1\8C\E9\9D\A2\E4\B8\8A\E7\9A\84final.haha\E6\96\87\E4\BB\B6\0A\00"
@.str.8 = [84 x i8] c"\E8\AF\B7\E4\BB\94\E7\BB\86\E6\A3\80\E6\9F\A5\E8\AF\A5\E8\A1\A8\E6\A0\BC\EF\BC\8C\E5\A6\82\E6\97\A0\E8\AF\AF\E8\AF\B7\E5\8F\A6\E5\AD\98\E4\B8\BA .xls \E6\88\96 .xlsx \E6\A0\BC\E5\BC\8F\E5\86\8D\E8\A1\8C\E7\BC\96\E8\BE\91\0A\00"
@.str.9 = [93 x i8] c"\0A\E5\A6\82\E9\81\87\E6\8E\92\E7\89\88\E9\94\99\E4\B9\B1\E6\88\96\E4\BB\BB\E4\BD\95\E6\A0\BC\E5\BC\8F\E9\97\AE\E9\A2\98\E8\AF\B7\E4\BD\BF\E7\94\A8\E6\82\A8\E5\B7\B2\E7\9F\A5\E7\9A\84\E4\BB\BB\E4\BD\95\E6\96\B9\E5\BC\8F\E8\81\94\E7\B3\BB\E5\BC\A0\E4\B8\89\E6\9C\AC\E4\BA\BA\0A\00"
@.str.10 = [39 x i8] c"\0A\E6\84\9F\E8\B0\A2\E4\BD\BF\E7\94\A8\E6\9C\AC\E8\BD\AF\E4\BB\B6\EF\BC\8C\E7\A5\9D\E6\82\A8\E5\B9\B8\E7\A6\8F\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = load i32, i32* %4
%7 = load i8**, i8*** %5
%8 = getelementptr inbounds i8*, i8** %7, i64 1
%9 = load i8*, i8** %8
%10 = call i32 @downWeb(i32 %6, i8* %9)
%11 = call i64 (...) @getTDK()
%12 = icmp ne i64 0, %11
br i1 %12, label %13, label %16
13: ; preds = %2
%14 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%15 = call i32 @exit(i32 0)
unreachable
16: ; preds = %2
%17 = call i64 (...) @disposeUrl()
%18 = icmp ne i64 0, %17
br i1 %18, label %19, label %22
19: ; preds = %16
%20 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0))
%21 = call i32 @exit(i32 0)
unreachable
22: ; preds = %16
%23 = call i64 (...) @sizeColor()
%24 = icmp ne i64 0, %23
br i1 %24, label %25, label %28
25: ; preds = %22
%26 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.2, i64 0, i64 0))
%27 = call i32 @exit(i32 0)
unreachable
28: ; preds = %22
%29 = call i64 (...) @writeTop()
%30 = icmp ne i64 0, %29
br i1 %30, label %31, label %34
31: ; preds = %28
%32 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.3, i64 0, i64 0))
%33 = call i32 @exit(i32 0)
unreachable
34: ; preds = %28
%35 = call i64 (...) @price()
%36 = icmp ne i64 0, %35
br i1 %36, label %37, label %40
37: ; preds = %34
%38 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.4, i64 0, i64 0))
%39 = call i32 @exit(i32 0)
unreachable
40: ; preds = %34
%41 = call i64 (...) @writeRest()
%42 = icmp ne i64 0, %41
br i1 %42, label %43, label %46
43: ; preds = %40
%44 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.5, i64 0, i64 0))
%45 = call i32 @exit(i32 0)
unreachable
46: ; preds = %40
%47 = load i8**, i8*** %5
%48 = getelementptr inbounds i8*, i8** %47, i64 1
%49 = load i8*, i8** %48
%50 = call i64 @cp2win(i8* %49)
%51 = icmp ne i64 0, %50
br i1 %51, label %52, label %55
52: ; preds = %46
%53 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.6, i64 0, i64 0))
%54 = call i32 @exit(i32 0)
unreachable
55: ; preds = %46
%56 = call i32 @printf(i8* getelementptr inbounds ([84 x i8], [84 x i8]* @.str.7, i64 0, i64 0))
%57 = call i32 @printf(i8* getelementptr inbounds ([84 x i8], [84 x i8]* @.str.8, i64 0, i64 0))
%58 = call i32 @printf(i8* getelementptr inbounds ([93 x i8], [93 x i8]* @.str.9, i64 0, i64 0))
%59 = call i32 @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.10, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [83 x i8] c"\E5\95\86\E5\93\81\E8\A1\A8\E5\8D\95\E4\BF\A1\E6\81\AF\E5\B7\B2\E7\94\9F\E6\88\90\0A\E8\AF\B7\E7\94\A8Excel\E6\89\93\E5\BC\80\E4\BD\8D\E4\BA\8E\E6\82\A8\E6\A1\8C\E9\9D\A2\E4\B8\8A\E7\9A\84final.haha\E6\96\87\E4\BB\B6\00"
@str.11 = [83 x i8] c"\E8\AF\B7\E4\BB\94\E7\BB\86\E6\A3\80\E6\9F\A5\E8\AF\A5\E8\A1\A8\E6\A0\BC\EF\BC\8C\E5\A6\82\E6\97\A0\E8\AF\AF\E8\AF\B7\E5\8F\A6\E5\AD\98\E4\B8\BA .xls \E6\88\96 .xlsx \E6\A0\BC\E5\BC\8F\E5\86\8D\E8\A1\8C\E7\BC\96\E8\BE\91\00"
@str.12 = [92 x i8] c"\0A\E5\A6\82\E9\81\87\E6\8E\92\E7\89\88\E9\94\99\E4\B9\B1\E6\88\96\E4\BB\BB\E4\BD\95\E6\A0\BC\E5\BC\8F\E9\97\AE\E9\A2\98\E8\AF\B7\E4\BD\BF\E7\94\A8\E6\82\A8\E5\B7\B2\E7\9F\A5\E7\9A\84\E4\BB\BB\E4\BD\95\E6\96\B9\E5\BC\8F\E8\81\94\E7\B3\BB\E5\BC\A0\E4\B8\89\E6\9C\AC\E4\BA\BA\00"
@str.13 = [38 x i8] c"\0A\E6\84\9F\E8\B0\A2\E4\BD\BF\E7\94\A8\E6\9C\AC\E8\BD\AF\E4\BB\B6\EF\BC\8C\E7\A5\9D\E6\82\A8\E5\B9\B8\E7\A6\8F\00"
@str.14 = [16 x i8] c"main: cp error!\00"
@str.15 = [17 x i8] c"writeRest error!\00"
@str.16 = [19 x i8] c"main: price error!\00"
@str.17 = [16 x i8] c"writeTop error!\00"
@str.18 = [22 x i8] c"get size|color error!\00"
@str.19 = [18 x i8] c"disposeUrl error!\00"
@str.20 = [14 x i8] c"getTDK error!\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = getelementptr inbounds i8*, i8** %1, i64 1
%4 = load i8*, i8** %3
%5 = tail call i32 @downWeb(i32 %0, i8* %4)
%6 = tail call i64 (...) @getTDK()
%7 = icmp eq i64 %6, 0
br i1 %7, label %11, label %8
8: ; preds = %2
%9 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @str.20, i64 0, i64 0))
%10 = tail call i32 @exit(i32 0)
unreachable
11: ; preds = %2
%12 = tail call i64 (...) @disposeUrl()
%13 = icmp eq i64 %12, 0
br i1 %13, label %17, label %14
14: ; preds = %11
%15 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @str.19, i64 0, i64 0))
%16 = tail call i32 @exit(i32 0)
unreachable
17: ; preds = %11
%18 = tail call i64 (...) @sizeColor()
%19 = icmp eq i64 %18, 0
br i1 %19, label %23, label %20
20: ; preds = %17
%21 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @str.18, i64 0, i64 0))
%22 = tail call i32 @exit(i32 0)
unreachable
23: ; preds = %17
%24 = tail call i64 (...) @writeTop()
%25 = icmp eq i64 %24, 0
br i1 %25, label %29, label %26
26: ; preds = %23
%27 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @str.17, i64 0, i64 0))
%28 = tail call i32 @exit(i32 0)
unreachable
29: ; preds = %23
%30 = tail call i64 (...) @price()
%31 = icmp eq i64 %30, 0
br i1 %31, label %35, label %32
32: ; preds = %29
%33 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @str.16, i64 0, i64 0))
%34 = tail call i32 @exit(i32 0)
unreachable
35: ; preds = %29
%36 = tail call i64 (...) @writeRest()
%37 = icmp eq i64 %36, 0
br i1 %37, label %41, label %38
38: ; preds = %35
%39 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @str.15, i64 0, i64 0))
%40 = tail call i32 @exit(i32 0)
unreachable
41: ; preds = %35
%42 = load i8*, i8** %3
%43 = tail call i64 @cp2win(i8* %42)
%44 = icmp eq i64 %43, 0
br i1 %44, label %48, label %45
45: ; preds = %41
%46 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @str.14, i64 0, i64 0))
%47 = tail call i32 @exit(i32 0)
unreachable
48: ; preds = %41
%49 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([83 x i8], [83 x i8]* @str, i64 0, i64 0))
%50 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([83 x i8], [83 x i8]* @str.11, i64 0, i64 0))
%51 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([92 x i8], [92 x i8]* @str.12, i64 0, i64 0))
%52 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([38 x i8], [38 x i8]* @str.13, i64 0, i64 0))
ret i32 0
}