#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 Number();
int /*<<< orphan*/ fflush(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ stderr;
int /*<<< orphan*/ stdout;
int main(int argc, char **argv) {
  if (argc == 1) {
    fprintf(stderr, "Error, expected explicit argument.\n");
    fflush(stderr);
    return -1;
  }
  for (int i = 0; i < argc; ++i) {
    printf("%d) %s", i, argv[i]);
    printf("\n");
  }
  printf("The answer is %d.\n", Number());
  fflush(stdout);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x1,-0x8(%rbp)
jne    118f <main+0x4f>
mov    0x2e79(%rip),%rax
mov    (%rax),%edi
lea    0xe90(%rip),%rsi
call   1040 <fprintf@plt>
mov    0x2e64(%rip),%rax
mov    (%rax),%edi
call   1050 <fflush@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    1207 <main+0xc7>
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    11db <main+0x9b>
mov    -0x14(%rbp),%esi
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rdx
lea    0xe6c(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe76(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1196 <main+0x56>
mov    $0x0,%al
call   1060 <Number@plt>
mov    %eax,%esi
lea    0xe40(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    0x2ddf(%rip),%rax
mov    (%rax),%edi
call   1050 <fflush@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
cmp    $0x1,%edi
jne    1179 <main+0x29>
mov    0x2e7c(%rip),%rbx
mov    (%rbx),%edi
lea    0xe93(%rip),%rsi
call   1050 <fprintf@plt>
mov    $0xffffffff,%ebp
jmp    11d3 <main+0x83>
jl     11b3 <main+0x63>
mov    %rsi,%r15
mov    %edi,%r12d
lea    0xe9c(%rip),%r14
xor    %ebx,%ebx
nopw   0x0(%rax,%rax,1)
mov    (%r15,%rbx,8),%rdx
mov    %r14,%rdi
mov    %ebx,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
add    $0x1,%rbx
cmp    %rbx,%r12
jne    1190 <main+0x40>
xor    %ebp,%ebp
xor    %eax,%eax
call   1070 <Number@plt>
lea    0xe68(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x2e05(%rip),%rbx
mov    (%rbx),%edi
call   1060 <fflush@plt>
mov    %ebp,%eax
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@stderr = global i32 0
@.str = [36 x i8] c"Error, expected explicit argument.\0A\00"
@.str.1 = [7 x i8] c"%d) %s\00"
@.str.2 = [2 x i8] c"\0A\00"
@.str.3 = [19 x i8] c"The answer is %d.\0A\00"
@stdout = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = load i32, i32* %4
%8 = icmp eq i32 %7, 1
br i1 %8, label %9, label %14
9: ; preds = %2
%10 = load i32, i32* @stderr
%11 = call i32 @fprintf(i32 %10, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0))
%12 = load i32, i32* @stderr
%13 = call i32 @fflush(i32 %12)
store i32 -1, i32* %3
br label %36
14: ; preds = %2
store i32 0, i32* %6
br label %15
15: ; preds = %28, %14
%16 = load i32, i32* %6
%17 = load i32, i32* %4
%18 = icmp slt i32 %16, %17
br i1 %18, label %19, label %31
19: ; preds = %15
%20 = load i32, i32* %6
%21 = load i8**, i8*** %5
%22 = load i32, i32* %6
%23 = sext i32 %22 to i64
%24 = getelementptr inbounds i8*, i8** %21, i64 %23
%25 = load i8*, i8** %24
%26 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i32 %20, i8* %25)
%27 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
br label %28
28: ; preds = %19
%29 = load i32, i32* %6
%30 = add nsw i32 %29, 1
store i32 %30, i32* %6
br label %15
31: ; preds = %15
%32 = call i32 (...) @Number()
%33 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.3, i64 0, i64 0), i32 %32)
%34 = load i32, i32* @stdout
%35 = call i32 @fflush(i32 %34)
store i32 0, i32* %3
br label %36
36: ; preds = %31, %9
%37 = load i32, i32* %3
ret i32 %37
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [36 x i8] c"Error, expected explicit argument.\0A\00"
@.str.1 = [7 x i8] c"%d) %s\00"
@.str.3 = [19 x i8] c"The answer is %d.\0A\00"
@stdout = global i32 0
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp eq i32 %0, 1
br i1 %3, label %8, label %4
4: ; preds = %2
%5 = icmp sgt i32 %0, 0
br i1 %5, label %6, label %11
6: ; preds = %4
%7 = zext i32 %0 to i64
br label %14
8: ; preds = %2
%9 = load i32, i32* @stderr
%10 = tail call i32 @fprintf(i32 %9, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0))
br label %23
11: ; preds = %14, %4
%12 = tail call i32 (...) @Number()
%13 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str.3, i64 0, i64 0), i32 %12)
br label %23
14: ; preds = %6, %14
%15 = phi i64 [ 0, %6 ], [ %21, %14 ]
%16 = getelementptr inbounds i8*, i8** %1, i64 %15
%17 = load i8*, i8** %16
%18 = trunc i64 %15 to i32
%19 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i32 %18, i8* %17)
%20 = tail call i32 @putchar(i32 10)
%21 = add nuw nsw i64 %15, 1
%22 = icmp eq i64 %21, %7
br i1 %22, label %11, label %14
23: ; preds = %11, %8
%24 = phi i32* [ @stdout, %11 ], [ @stderr, %8 ]
%25 = phi i32 [ 0, %11 ], [ -1, %8 ]
%26 = load i32, i32* %24
%27 = tail call i32 @fflush(i32 %26)
ret i32 %25
}