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

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