#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*/ print_args(char **, int);
int /*<<< orphan*/ print_call(char **, int);
int /*<<< orphan*/ print_comment(char **, int);
int /*<<< orphan*/ print_context(char **, int);
int /*<<< orphan*/ print_header(char **, int);
int /*<<< orphan*/ print_mmap(char **, int);
int /*<<< orphan*/ print_resource(char **, int);
int /*<<< orphan*/ print_trace(char **, int);
int /*<<< orphan*/ print_trace_step(char **, int);
int /*<<< orphan*/ strcmp(char *, char *);
int /*<<< orphan*/ tzset();
int main(int argc, char *argv[]) {
  tzset();
  if (argc > 1) {
    if (!strcmp(argv[1], "header")) {
      print_header(&argv[2], argc);
    } else if (!strcmp(argv[1], "mmap")) {
      print_mmap(&argv[2], argc);
    } else if (!strcmp(argv[1], "call")) {
      print_call(&argv[2], argc);
    } else if (!strcmp(argv[1], "trace")) {
      print_trace(&argv[2], argc);
    } else if (!strcmp(argv[1], "trace_step")) {
      print_trace_step(&argv[2], argc);
    } else if (!strcmp(argv[1], "context")) {
      print_context(&argv[2], argc);
    } else if (!strcmp(argv[1], "comment")) {
      print_comment(&argv[2], argc);
    } else if (!strcmp(argv[1], "args")) {
      print_args(&argv[2], argc);
    } else if (!strcmp(argv[1], "resource")) {
      print_resource(&argv[2], argc);
    }
  }
  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    $0x0,%al
call   1060 <tzset@plt>
cmpl   $0x1,-0x8(%rbp)
jle    13c1 <main+0x211>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xe1a(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%eax
jne    1209 <main+0x59>
mov    -0x10(%rbp),%rdi
add    $0x10,%rdi
mov    -0x8(%rbp),%esi
call   10b0 <print_header@plt>
jmp    13bc <main+0x20c>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xdef(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%eax
jne    123b <main+0x8b>
mov    -0x10(%rbp),%rdi
add    $0x10,%rdi
mov    -0x8(%rbp),%esi
call   1030 <print_mmap@plt>
jmp    13b7 <main+0x207>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xdc2(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%eax
jne    126d <main+0xbd>
mov    -0x10(%rbp),%rdi
add    $0x10,%rdi
mov    -0x8(%rbp),%esi
call   10c0 <print_call@plt>
jmp    13b2 <main+0x202>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xd95(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%eax
jne    129f <main+0xef>
mov    -0x10(%rbp),%rdi
add    $0x10,%rdi
mov    -0x8(%rbp),%esi
call   1070 <print_trace@plt>
jmp    13ad <main+0x1fd>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xd69(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%eax
jne    12d1 <main+0x121>
mov    -0x10(%rbp),%rdi
add    $0x10,%rdi
mov    -0x8(%rbp),%esi
call   1080 <print_trace_step@plt>
jmp    13a8 <main+0x1f8>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xd42(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%eax
jne    1303 <main+0x153>
mov    -0x10(%rbp),%rdi
add    $0x10,%rdi
mov    -0x8(%rbp),%esi
call   1050 <print_context@plt>
jmp    13a3 <main+0x1f3>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xd18(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%eax
jne    1335 <main+0x185>
mov    -0x10(%rbp),%rdi
add    $0x10,%rdi
mov    -0x8(%rbp),%esi
call   1090 <print_comment@plt>
jmp    139e <main+0x1ee>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xcee(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%eax
jne    1367 <main+0x1b7>
mov    -0x10(%rbp),%rdi
add    $0x10,%rdi
mov    -0x8(%rbp),%esi
call   10d0 <print_args@plt>
jmp    1399 <main+0x1e9>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xcc1(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%eax
jne    1394 <main+0x1e4>
mov    -0x10(%rbp),%rdi
add    $0x10,%rdi
mov    -0x8(%rbp),%esi
call   10a0 <print_resource@plt>
jmp    1399 <main+0x1e9>
jmp    139e <main+0x1ee>
jmp    13a3 <main+0x1f3>
jmp    13a8 <main+0x1f8>
jmp    13ad <main+0x1fd>
jmp    13b2 <main+0x202>
jmp    13b7 <main+0x207>
jmp    13bc <main+0x20c>
jmp    13c1 <main+0x211>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r14
push   %rbx
mov    %rsi,%rbx
mov    %edi,%r14d
xor    %eax,%eax
call   1060 <tzset@plt>
cmp    $0x2,%r14d
jl     1338 <main+0x188>
mov    0x8(%rbx),%rbp
lea    0xe2a(%rip),%rsi
mov    %rbp,%rdi
call   1040 <strcmp@plt>
test   %eax,%eax
je     12b2 <main+0x102>
lea    0xe1a(%rip),%rsi
mov    %rbp,%rdi
call   1040 <strcmp@plt>
test   %eax,%eax
je     12c3 <main+0x113>
lea    0xe08(%rip),%rsi
mov    %rbp,%rdi
call   1040 <strcmp@plt>
test   %eax,%eax
je     12d4 <main+0x124>
lea    0xdf6(%rip),%rsi
mov    %rbp,%rdi
call   1040 <strcmp@plt>
test   %eax,%eax
je     12e5 <main+0x135>
lea    0xde5(%rip),%rsi
mov    %rbp,%rdi
call   1040 <strcmp@plt>
test   %eax,%eax
je     12f6 <main+0x146>
lea    0xdd9(%rip),%rsi
mov    %rbp,%rdi
call   1040 <strcmp@plt>
test   %eax,%eax
je     1307 <main+0x157>
lea    0xdca(%rip),%rsi
mov    %rbp,%rdi
call   1040 <strcmp@plt>
test   %eax,%eax
je     1318 <main+0x168>
lea    0xdbb(%rip),%rsi
mov    %rbp,%rdi
call   1040 <strcmp@plt>
test   %eax,%eax
je     1329 <main+0x179>
lea    0xda9(%rip),%rsi
mov    %rbp,%rdi
call   1040 <strcmp@plt>
test   %eax,%eax
jne    1338 <main+0x188>
add    $0x10,%rbx
mov    %rbx,%rdi
mov    %r14d,%esi
call   10a0 <print_resource@plt>
jmp    1338 <main+0x188>
add    $0x10,%rbx
mov    %rbx,%rdi
mov    %r14d,%esi
call   10b0 <print_header@plt>
jmp    1338 <main+0x188>
add    $0x10,%rbx
mov    %rbx,%rdi
mov    %r14d,%esi
call   1030 <print_mmap@plt>
jmp    1338 <main+0x188>
add    $0x10,%rbx
mov    %rbx,%rdi
mov    %r14d,%esi
call   10c0 <print_call@plt>
jmp    1338 <main+0x188>
add    $0x10,%rbx
mov    %rbx,%rdi
mov    %r14d,%esi
call   1070 <print_trace@plt>
jmp    1338 <main+0x188>
add    $0x10,%rbx
mov    %rbx,%rdi
mov    %r14d,%esi
call   1080 <print_trace_step@plt>
jmp    1338 <main+0x188>
add    $0x10,%rbx
mov    %rbx,%rdi
mov    %r14d,%esi
call   1050 <print_context@plt>
jmp    1338 <main+0x188>
add    $0x10,%rbx
mov    %rbx,%rdi
mov    %r14d,%esi
call   1090 <print_comment@plt>
jmp    1338 <main+0x188>
add    $0x10,%rbx
mov    %rbx,%rdi
mov    %r14d,%esi
call   10d0 <print_args@plt>
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
@.str = [7 x i8] c"header\00"
@.str.1 = [5 x i8] c"mmap\00"
@.str.2 = [5 x i8] c"call\00"
@.str.3 = [6 x i8] c"trace\00"
@.str.4 = [11 x i8] c"trace_step\00"
@.str.5 = [8 x i8] c"context\00"
@.str.6 = [8 x i8] c"comment\00"
@.str.7 = [5 x i8] c"args\00"
@.str.8 = [9 x i8] c"resource\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 = call i32 (...) @tzset()
%7 = load i32, i32* %4
%8 = icmp sgt i32 %7, 1
br i1 %8, label %9, label %117
9: ; preds = %2
%10 = load i8**, i8*** %5
%11 = getelementptr inbounds i8*, i8** %10, i64 1
%12 = load i8*, i8** %11
%13 = call i32 @strcmp(i8* %12, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%14 = icmp ne i32 %13, 0
br i1 %14, label %20, label %15
15: ; preds = %9
%16 = load i8**, i8*** %5
%17 = getelementptr inbounds i8*, i8** %16, i64 2
%18 = load i32, i32* %4
%19 = call i32 @print_header(i8** %17, i32 %18)
br label %116
20: ; preds = %9
%21 = load i8**, i8*** %5
%22 = getelementptr inbounds i8*, i8** %21, i64 1
%23 = load i8*, i8** %22
%24 = call i32 @strcmp(i8* %23, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
%25 = icmp ne i32 %24, 0
br i1 %25, label %31, label %26
26: ; preds = %20
%27 = load i8**, i8*** %5
%28 = getelementptr inbounds i8*, i8** %27, i64 2
%29 = load i32, i32* %4
%30 = call i32 @print_mmap(i8** %28, i32 %29)
br label %115
31: ; preds = %20
%32 = load i8**, i8*** %5
%33 = getelementptr inbounds i8*, i8** %32, i64 1
%34 = load i8*, i8** %33
%35 = call i32 @strcmp(i8* %34, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
%36 = icmp ne i32 %35, 0
br i1 %36, label %42, label %37
37: ; preds = %31
%38 = load i8**, i8*** %5
%39 = getelementptr inbounds i8*, i8** %38, i64 2
%40 = load i32, i32* %4
%41 = call i32 @print_call(i8** %39, i32 %40)
br label %114
42: ; preds = %31
%43 = load i8**, i8*** %5
%44 = getelementptr inbounds i8*, i8** %43, i64 1
%45 = load i8*, i8** %44
%46 = call i32 @strcmp(i8* %45, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0))
%47 = icmp ne i32 %46, 0
br i1 %47, label %53, label %48
48: ; preds = %42
%49 = load i8**, i8*** %5
%50 = getelementptr inbounds i8*, i8** %49, i64 2
%51 = load i32, i32* %4
%52 = call i32 @print_trace(i8** %50, i32 %51)
br label %113
53: ; preds = %42
%54 = load i8**, i8*** %5
%55 = getelementptr inbounds i8*, i8** %54, i64 1
%56 = load i8*, i8** %55
%57 = call i32 @strcmp(i8* %56, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.4, i64 0, i64 0))
%58 = icmp ne i32 %57, 0
br i1 %58, label %64, label %59
59: ; preds = %53
%60 = load i8**, i8*** %5
%61 = getelementptr inbounds i8*, i8** %60, i64 2
%62 = load i32, i32* %4
%63 = call i32 @print_trace_step(i8** %61, i32 %62)
br label %112
64: ; preds = %53
%65 = load i8**, i8*** %5
%66 = getelementptr inbounds i8*, i8** %65, i64 1
%67 = load i8*, i8** %66
%68 = call i32 @strcmp(i8* %67, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.5, i64 0, i64 0))
%69 = icmp ne i32 %68, 0
br i1 %69, label %75, label %70
70: ; preds = %64
%71 = load i8**, i8*** %5
%72 = getelementptr inbounds i8*, i8** %71, i64 2
%73 = load i32, i32* %4
%74 = call i32 @print_context(i8** %72, i32 %73)
br label %111
75: ; preds = %64
%76 = load i8**, i8*** %5
%77 = getelementptr inbounds i8*, i8** %76, i64 1
%78 = load i8*, i8** %77
%79 = call i32 @strcmp(i8* %78, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.6, i64 0, i64 0))
%80 = icmp ne i32 %79, 0
br i1 %80, label %86, label %81
81: ; preds = %75
%82 = load i8**, i8*** %5
%83 = getelementptr inbounds i8*, i8** %82, i64 2
%84 = load i32, i32* %4
%85 = call i32 @print_comment(i8** %83, i32 %84)
br label %110
86: ; preds = %75
%87 = load i8**, i8*** %5
%88 = getelementptr inbounds i8*, i8** %87, i64 1
%89 = load i8*, i8** %88
%90 = call i32 @strcmp(i8* %89, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.7, i64 0, i64 0))
%91 = icmp ne i32 %90, 0
br i1 %91, label %97, label %92
92: ; preds = %86
%93 = load i8**, i8*** %5
%94 = getelementptr inbounds i8*, i8** %93, i64 2
%95 = load i32, i32* %4
%96 = call i32 @print_args(i8** %94, i32 %95)
br label %109
97: ; preds = %86
%98 = load i8**, i8*** %5
%99 = getelementptr inbounds i8*, i8** %98, i64 1
%100 = load i8*, i8** %99
%101 = call i32 @strcmp(i8* %100, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.8, i64 0, i64 0))
%102 = icmp ne i32 %101, 0
br i1 %102, label %108, label %103
103: ; preds = %97
%104 = load i8**, i8*** %5
%105 = getelementptr inbounds i8*, i8** %104, i64 2
%106 = load i32, i32* %4
%107 = call i32 @print_resource(i8** %105, i32 %106)
br label %108
108: ; preds = %103, %97
br label %109
109: ; preds = %108, %92
br label %110
110: ; preds = %109, %81
br label %111
111: ; preds = %110, %70
br label %112
112: ; preds = %111, %59
br label %113
113: ; preds = %112, %48
br label %114
114: ; preds = %113, %37
br label %115
115: ; preds = %114, %26
br label %116
116: ; preds = %115, %15
br label %117
117: ; preds = %116, %2
ret i32 0
}

LLVM IR (-O2):
@.str = [7 x i8] c"header\00"
@.str.1 = [5 x i8] c"mmap\00"
@.str.2 = [5 x i8] c"call\00"
@.str.3 = [6 x i8] c"trace\00"
@.str.4 = [11 x i8] c"trace_step\00"
@.str.5 = [8 x i8] c"context\00"
@.str.6 = [8 x i8] c"comment\00"
@.str.7 = [5 x i8] c"args\00"
@.str.8 = [9 x i8] c"resource\00"
define i32 @main(i32 %0, i8** %1) {
%3 = tail call i32 (...) @tzset()
%4 = icmp sgt i32 %0, 1
br i1 %4, label %5, label %61
5: ; preds = %2
%6 = getelementptr inbounds i8*, i8** %1, i64 1
%7 = load i8*, i8** %6
%8 = tail call i32 @strcmp(i8* dereferenceable(1) %7, i8* dereferenceable(7) getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%9 = icmp eq i32 %8, 0
br i1 %9, label %10, label %13
10: ; preds = %5
%11 = getelementptr inbounds i8*, i8** %1, i64 2
%12 = tail call i32 @print_header(i8** %11, i32 %0)
br label %61
13: ; preds = %5
%14 = tail call i32 @strcmp(i8* dereferenceable(1) %7, i8* dereferenceable(5) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
%15 = icmp eq i32 %14, 0
br i1 %15, label %16, label %19
16: ; preds = %13
%17 = getelementptr inbounds i8*, i8** %1, i64 2
%18 = tail call i32 @print_mmap(i8** %17, i32 %0)
br label %61
19: ; preds = %13
%20 = tail call i32 @strcmp(i8* dereferenceable(1) %7, i8* dereferenceable(5) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
%21 = icmp eq i32 %20, 0
br i1 %21, label %22, label %25
22: ; preds = %19
%23 = getelementptr inbounds i8*, i8** %1, i64 2
%24 = tail call i32 @print_call(i8** %23, i32 %0)
br label %61
25: ; preds = %19
%26 = tail call i32 @strcmp(i8* dereferenceable(1) %7, i8* dereferenceable(6) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0))
%27 = icmp eq i32 %26, 0
br i1 %27, label %28, label %31
28: ; preds = %25
%29 = getelementptr inbounds i8*, i8** %1, i64 2
%30 = tail call i32 @print_trace(i8** %29, i32 %0)
br label %61
31: ; preds = %25
%32 = tail call i32 @strcmp(i8* dereferenceable(1) %7, i8* dereferenceable(11) getelementptr inbounds ([11 x i8], [11 x i8]* @.str.4, i64 0, i64 0))
%33 = icmp eq i32 %32, 0
br i1 %33, label %34, label %37
34: ; preds = %31
%35 = getelementptr inbounds i8*, i8** %1, i64 2
%36 = tail call i32 @print_trace_step(i8** %35, i32 %0)
br label %61
37: ; preds = %31
%38 = tail call i32 @strcmp(i8* dereferenceable(1) %7, i8* dereferenceable(8) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.5, i64 0, i64 0))
%39 = icmp eq i32 %38, 0
br i1 %39, label %40, label %43
40: ; preds = %37
%41 = getelementptr inbounds i8*, i8** %1, i64 2
%42 = tail call i32 @print_context(i8** %41, i32 %0)
br label %61
43: ; preds = %37
%44 = tail call i32 @strcmp(i8* dereferenceable(1) %7, i8* dereferenceable(8) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.6, i64 0, i64 0))
%45 = icmp eq i32 %44, 0
br i1 %45, label %46, label %49
46: ; preds = %43
%47 = getelementptr inbounds i8*, i8** %1, i64 2
%48 = tail call i32 @print_comment(i8** %47, i32 %0)
br label %61
49: ; preds = %43
%50 = tail call i32 @strcmp(i8* dereferenceable(1) %7, i8* dereferenceable(5) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.7, i64 0, i64 0))
%51 = icmp eq i32 %50, 0
br i1 %51, label %52, label %55
52: ; preds = %49
%53 = getelementptr inbounds i8*, i8** %1, i64 2
%54 = tail call i32 @print_args(i8** %53, i32 %0)
br label %61
55: ; preds = %49
%56 = tail call i32 @strcmp(i8* dereferenceable(1) %7, i8* dereferenceable(9) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.8, i64 0, i64 0))
%57 = icmp eq i32 %56, 0
br i1 %57, label %58, label %61
58: ; preds = %55
%59 = getelementptr inbounds i8*, i8** %1, i64 2
%60 = tail call i32 @print_resource(i8** %59, i32 %0)
br label %61
61: ; preds = %10, %22, %34, %46, %55, %58, %52, %40, %28, %16, %2
ret i32 0
}