#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*/ test_boolean_arg();
int /*<<< orphan*/ test_callback();
int /*<<< orphan*/ test_dash_dash();
int /*<<< orphan*/ test_equal_char();
int /*<<< orphan*/ test_integer_arg();
int /*<<< orphan*/ test_keep_argv0();
int /*<<< orphan*/ test_long_option();
int /*<<< orphan*/ test_multiple_short();
int /*<<< orphan*/ test_no_arg();
int /*<<< orphan*/ test_number_callback();
int /*<<< orphan*/ test_remain_arg();
int /*<<< orphan*/ test_string_arg();
int /*<<< orphan*/ test_unknown();
int /*<<< orphan*/ test_user_input(int, char const **);
int main(int argc, const char *argv[]) {
  test_no_arg();
  test_boolean_arg();
  test_string_arg();
  test_integer_arg();
  test_long_option();
  test_multiple_short();
  test_equal_char();
  test_keep_argv0();
  test_dash_dash();
  test_remain_arg();
  test_unknown();
  test_callback();
  test_number_callback();
  if (argc > 1) {
    test_user_input(argc, argv);
  }
  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   1100 <test_no_arg@plt>
mov    $0x0,%al
call   1090 <test_boolean_arg@plt>
mov    $0x0,%al
call   1050 <test_string_arg@plt>
mov    $0x0,%al
call   10e0 <test_integer_arg@plt>
mov    $0x0,%al
call   10d0 <test_long_option@plt>
mov    $0x0,%al
call   10b0 <test_multiple_short@plt>
mov    $0x0,%al
call   10c0 <test_equal_char@plt>
mov    $0x0,%al
call   1060 <test_keep_argv0@plt>
mov    $0x0,%al
call   1040 <test_dash_dash@plt>
mov    $0x0,%al
call   10a0 <test_remain_arg@plt>
mov    $0x0,%al
call   1080 <test_unknown@plt>
mov    $0x0,%al
call   10f0 <test_callback@plt>
mov    $0x0,%al
call   1030 <test_number_callback@plt>
cmpl   $0x1,-0x8(%rbp)
jle    1267 <main+0x87>
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1070 <test_user_input@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %edi,%ebp
xor    %eax,%eax
call   1100 <test_no_arg@plt>
xor    %eax,%eax
call   1090 <test_boolean_arg@plt>
xor    %eax,%eax
call   1050 <test_string_arg@plt>
xor    %eax,%eax
call   10e0 <test_integer_arg@plt>
xor    %eax,%eax
call   10d0 <test_long_option@plt>
xor    %eax,%eax
call   10b0 <test_multiple_short@plt>
xor    %eax,%eax
call   10c0 <test_equal_char@plt>
xor    %eax,%eax
call   1060 <test_keep_argv0@plt>
xor    %eax,%eax
call   1040 <test_dash_dash@plt>
xor    %eax,%eax
call   10a0 <test_remain_arg@plt>
xor    %eax,%eax
call   1080 <test_unknown@plt>
xor    %eax,%eax
call   10f0 <test_callback@plt>
xor    %eax,%eax
call   1030 <test_number_callback@plt>
cmp    $0x2,%ebp
jl     1252 <main+0x72>
mov    %ebp,%edi
mov    %rbx,%rsi
call   1070 <test_user_input@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
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 (...) @test_no_arg()
%7 = call i32 (...) @test_boolean_arg()
%8 = call i32 (...) @test_string_arg()
%9 = call i32 (...) @test_integer_arg()
%10 = call i32 (...) @test_long_option()
%11 = call i32 (...) @test_multiple_short()
%12 = call i32 (...) @test_equal_char()
%13 = call i32 (...) @test_keep_argv0()
%14 = call i32 (...) @test_dash_dash()
%15 = call i32 (...) @test_remain_arg()
%16 = call i32 (...) @test_unknown()
%17 = call i32 (...) @test_callback()
%18 = call i32 (...) @test_number_callback()
%19 = load i32, i32* %4
%20 = icmp sgt i32 %19, 1
br i1 %20, label %21, label %25
21: ; preds = %2
%22 = load i32, i32* %4
%23 = load i8**, i8*** %5
%24 = call i32 @test_user_input(i32 %22, i8** %23)
br label %25
25: ; preds = %21, %2
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** %1) {
%3 = tail call i32 (...) @test_no_arg()
%4 = tail call i32 (...) @test_boolean_arg()
%5 = tail call i32 (...) @test_string_arg()
%6 = tail call i32 (...) @test_integer_arg()
%7 = tail call i32 (...) @test_long_option()
%8 = tail call i32 (...) @test_multiple_short()
%9 = tail call i32 (...) @test_equal_char()
%10 = tail call i32 (...) @test_keep_argv0()
%11 = tail call i32 (...) @test_dash_dash()
%12 = tail call i32 (...) @test_remain_arg()
%13 = tail call i32 (...) @test_unknown()
%14 = tail call i32 (...) @test_callback()
%15 = tail call i32 (...) @test_number_callback()
%16 = icmp sgt i32 %0, 1
br i1 %16, label %17, label %19
17: ; preds = %2
%18 = tail call i32 @test_user_input(i32 %0, i8** %1)
br label %19
19: ; preds = %17, %2
ret i32 0
}