#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 */
struct question {
  int dummy;
};

/* Variables and functions */
int EXIT_SUCCESS;
int /*<<< orphan*/ kill_program(char *, char *);
struct question *parse_all_files(char **);
int /*<<< orphan*/ start_quiz(struct question *);
int main(int argc, char **argv) {
  struct question *q;
  if (argc < 2)
    kill_program("usage: %s <file> ...\n", argv[0]);
  q = parse_all_files(argv + 1);
  start_quiz(q);
  return EXIT_SUCCESS;
}


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   $0x2,-0x8(%rbp)
jge    1163 <main+0x33>
mov    -0x10(%rbp),%rax
mov    (%rax),%rsi
lea    0xea2(%rip),%rdi
call   1050 <kill_program@plt>
mov    -0x10(%rbp),%rdi
add    $0x8,%rdi
call   1040 <parse_all_files@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
call   1030 <start_quiz@plt>
mov    0x2e5c(%rip),%rax
mov    (%rax),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    %rsi,%rbx
cmp    $0x1,%edi
jg     1148 <main+0x18>
mov    (%rbx),%rsi
lea    0xebd(%rip),%rdi
call   1050 <kill_program@plt>
add    $0x8,%rbx
mov    %rbx,%rdi
call   1040 <parse_all_files@plt>
mov    %rax,%rdi
call   1030 <start_quiz@plt>
mov    0x2e7d(%rip),%rax
mov    (%rax),%eax
pop    %rbx
ret

LLVM IR (-O0):
%struct.question = type { i32 }
@.str = [22 x i8] c"usage: %s <file> ...\0A\00"
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca %struct.question*
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = load i32, i32* %4
%8 = icmp slt i32 %7, 2
br i1 %8, label %9, label %14
9: ; preds = %2
%10 = load i8**, i8*** %5
%11 = getelementptr inbounds i8*, i8** %10, i64 0
%12 = load i8*, i8** %11
%13 = call i32 @kill_program(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i8* %12)
br label %14
14: ; preds = %9, %2
%15 = load i8**, i8*** %5
%16 = getelementptr inbounds i8*, i8** %15, i64 1
%17 = call %struct.question* @parse_all_files(i8** %16)
store %struct.question* %17, %struct.question** %6
%18 = load %struct.question*, %struct.question** %6
%19 = call i32 @start_quiz(%struct.question* %18)
%20 = load i32, i32* @EXIT_SUCCESS
ret i32 %20
}

LLVM IR (-O2):
%struct.question = type { i32 }
@.str = [22 x i8] c"usage: %s <file> ...\0A\00"
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = icmp slt i32 %0, 2
br i1 %3, label %4, label %7
4: ; preds = %2
%5 = load i8*, i8** %1
%6 = tail call i32 @kill_program(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i8* %5)
br label %7
7: ; preds = %4, %2
%8 = getelementptr inbounds i8*, i8** %1, i64 1
%9 = tail call %struct.question* @parse_all_files(i8** %8)
%10 = tail call i32 @start_quiz(%struct.question* %9)
%11 = load i32, i32* @EXIT_SUCCESS
ret i32 %11
}