#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*/ init_buffer();
int /*<<< orphan*/ init_err();
int /*<<< orphan*/ init_header();
int /*<<< orphan*/ init_memory();
int /*<<< orphan*/ init_process();
int /*<<< orphan*/ init_sound();
int /*<<< orphan*/ init_undo();
int /*<<< orphan*/ interpret();
int /*<<< orphan*/ os_init_screen();
int /*<<< orphan*/ os_init_setup();
int /*<<< orphan*/ os_process_arguments(int, char **);
int /*<<< orphan*/ os_reset_screen();
int /*<<< orphan*/ reset_memory();
int /*<<< orphan*/ z_restart();
int main(int argc, char *argv[]) {
  init_header();
  os_init_setup();
  os_process_arguments(argc, argv);
  init_buffer();
  init_err();
  init_memory();
  init_process();
  init_sound();
  os_init_screen();
  init_undo();
  z_restart();
  interpret();
  reset_memory();
  os_reset_screen();
  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   1090 <init_header@plt>
mov    $0x0,%al
call   10f0 <os_init_setup@plt>
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1060 <os_process_arguments@plt>
mov    $0x0,%al
call   10c0 <init_buffer@plt>
mov    $0x0,%al
call   1100 <init_err@plt>
mov    $0x0,%al
call   1080 <init_memory@plt>
mov    $0x0,%al
call   1040 <init_process@plt>
mov    $0x0,%al
call   1030 <init_sound@plt>
mov    $0x0,%al
call   1050 <os_init_screen@plt>
mov    $0x0,%al
call   10b0 <init_undo@plt>
mov    $0x0,%al
call   10d0 <z_restart@plt>
mov    $0x0,%al
call   10e0 <interpret@plt>
mov    $0x0,%al
call   10a0 <reset_memory@plt>
mov    $0x0,%al
call   1070 <os_reset_screen@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   1090 <init_header@plt>
xor    %eax,%eax
call   10f0 <os_init_setup@plt>
mov    %ebp,%edi
mov    %rbx,%rsi
call   1060 <os_process_arguments@plt>
xor    %eax,%eax
call   10c0 <init_buffer@plt>
xor    %eax,%eax
call   1100 <init_err@plt>
xor    %eax,%eax
call   1080 <init_memory@plt>
xor    %eax,%eax
call   1040 <init_process@plt>
xor    %eax,%eax
call   1030 <init_sound@plt>
xor    %eax,%eax
call   1050 <os_init_screen@plt>
xor    %eax,%eax
call   10b0 <init_undo@plt>
xor    %eax,%eax
call   10d0 <z_restart@plt>
xor    %eax,%eax
call   10e0 <interpret@plt>
xor    %eax,%eax
call   10a0 <reset_memory@plt>
xor    %eax,%eax
call   1070 <os_reset_screen@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 (...) @init_header()
%7 = call i32 (...) @os_init_setup()
%8 = load i32, i32* %4
%9 = load i8**, i8*** %5
%10 = call i32 @os_process_arguments(i32 %8, i8** %9)
%11 = call i32 (...) @init_buffer()
%12 = call i32 (...) @init_err()
%13 = call i32 (...) @init_memory()
%14 = call i32 (...) @init_process()
%15 = call i32 (...) @init_sound()
%16 = call i32 (...) @os_init_screen()
%17 = call i32 (...) @init_undo()
%18 = call i32 (...) @z_restart()
%19 = call i32 (...) @interpret()
%20 = call i32 (...) @reset_memory()
%21 = call i32 (...) @os_reset_screen()
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** %1) {
%3 = tail call i32 (...) @init_header()
%4 = tail call i32 (...) @os_init_setup()
%5 = tail call i32 @os_process_arguments(i32 %0, i8** %1)
%6 = tail call i32 (...) @init_buffer()
%7 = tail call i32 (...) @init_err()
%8 = tail call i32 (...) @init_memory()
%9 = tail call i32 (...) @init_process()
%10 = tail call i32 (...) @init_sound()
%11 = tail call i32 (...) @os_init_screen()
%12 = tail call i32 (...) @init_undo()
%13 = tail call i32 (...) @z_restart()
%14 = tail call i32 (...) @interpret()
%15 = tail call i32 (...) @reset_memory()
%16 = tail call i32 (...) @os_reset_screen()
ret i32 0
}