#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__ do_input();
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ grok_args(int, char **);
int /*<<< orphan*/ print_report();
int /*<<< orphan*/ putchar(char);
int /*<<< orphan*/ rocksim_report();
int /*<<< orphan*/ save_text_dump(int /*<<< orphan*/);
int /*<<< orphan*/ set_fuel_type();
int /*<<< orphan*/ stdout;
int main(int argc, char **argv) {
  grok_args(argc, argv);
  if (do_input()) {
    set_fuel_type();
    print_report();
    rocksim_report();
  }
  putchar('\n');
  save_text_dump(stdout);
  exit(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),%rsi
call   10a0 <grok_args@plt>
mov    $0x0,%al
call   1070 <do_input@plt>
cmp    $0x0,%rax
je     11c8 <main+0x48>
mov    $0x0,%al
call   1040 <set_fuel_type@plt>
mov    $0x0,%al
call   1050 <print_report@plt>
mov    $0x0,%al
call   1060 <rocksim_report@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    0x2e07(%rip),%rax
mov    (%rax),%edi
call   1080 <save_text_dump@plt>
xor    %edi,%edi
call   1090 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rax
call   10a0 <grok_args@plt>
xor    %eax,%eax
call   1070 <do_input@plt>
test   %rax,%rax
je     11a7 <main+0x27>
xor    %eax,%eax
call   1040 <set_fuel_type@plt>
xor    %eax,%eax
call   1050 <print_report@plt>
xor    %eax,%eax
call   1060 <rocksim_report@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    0x2e28(%rip),%rax
mov    (%rax),%edi
call   1080 <save_text_dump@plt>
xor    %edi,%edi
call   1090 <exit@plt>

LLVM IR (-O0):
@stdout = global i32 0
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 = call i32 @grok_args(i32 %6, i8** %7)
%9 = call i64 (...) @do_input()
%10 = icmp ne i64 %9, 0
br i1 %10, label %11, label %15
11: ; preds = %2
%12 = call i32 (...) @set_fuel_type()
%13 = call i32 (...) @print_report()
%14 = call i32 (...) @rocksim_report()
br label %15
15: ; preds = %11, %2
%16 = call i32 @putchar(i8 signext 10)
%17 = load i32, i32* @stdout
%18 = call i32 @save_text_dump(i32 %17)
%19 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@stdout = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = tail call i32 @grok_args(i32 %0, i8** %1)
%4 = tail call i64 (...) @do_input()
%5 = icmp eq i64 %4, 0
br i1 %5, label %10, label %6
6: ; preds = %2
%7 = tail call i32 (...) @set_fuel_type()
%8 = tail call i32 (...) @print_report()
%9 = tail call i32 (...) @rocksim_report()
br label %10
10: ; preds = %6, %2
%11 = tail call i32 @putchar(i8 signext 10)
%12 = load i32, i32* @stdout
%13 = tail call i32 @save_text_dump(i32 %12)
%14 = tail call i32 @exit(i32 0)
unreachable
}