#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 */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ bios_table();
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *);
int /*<<< orphan*/ gemdos_table();
int /*<<< orphan*/ generate_bindings_old(int /*<<< orphan*/ *,
                                         int /*<<< orphan*/, int);
int /*<<< orphan*/ generate_traps_h(char *);
int parse_syscall_description(int /*<<< orphan*/ *);
int /*<<< orphan*/ perror(char *);
int /*<<< orphan*/ print_head(int /*<<< orphan*/ *, char const *);
int /*<<< orphan*/ xbios_table();
int main(int argc, char **argv) {
  const char *myname = *argv++;
  int error;
  if (*argv == NULL) {
    error = parse_syscall_description(NULL);
  } else {
    FILE *f;
    f = fopen(*argv, "rt");
    if (f) {
      error = parse_syscall_description(f);
      fclose(f);
    } else {
      perror(*argv);
      exit(1);
    }
  }
  if (!error) {
    FILE *f;
    f = fopen("../include/mint/sysbind.h", "w");
    if (!f) {
      perror("sysbind.h");
      exit(1);
    }
    print_head(f, myname);
    fprintf(f, "#ifndef _MINT_SYSBIND_H\n");
    fprintf(f, "#define _MINT_SYSBIND_H\n");
    fprintf(f, "\n");
    fprintf(f, "#ifndef _FEATURES_H\n");
    fprintf(f, "# include <features.h>\n");
    fprintf(f, "#endif\n");
    fprintf(f, "\n");
    fprintf(f, "#ifndef _MINT_OSTRUCT_H\n");
    fprintf(f, "# include <mint/ostruct.h>\n");
    fprintf(f, "#endif\n");
    fprintf(f, "\n");
    fprintf(f, "#ifndef _MINT_TRAP1_H\n");
    fprintf(f, "# include <mint/trap1.h>\n");
    fprintf(f, "#endif\n");
    fprintf(f, "#ifndef _MINT_TRAP13_H\n");
    fprintf(f, "# include <mint/trap13.h>\n");
    fprintf(f, "#endif\n");
    fprintf(f, "#ifndef _MINT_TRAP14_H\n");
    fprintf(f, "# include <mint/trap14.h>\n");
    fprintf(f, "#endif\n");
    fprintf(f, "\n");
    fprintf(f, "__BEGIN_DECLS\n");
    fprintf(f, "\n");
    fprintf(f, "/* GEMDOS */\n");
    fprintf(f, "\n");
    generate_bindings_old(f, gemdos_table(), 1);
    fprintf(f, "/* BIOS */\n");
    fprintf(f, "\n");
    generate_bindings_old(f, bios_table(), 13);
    fprintf(f, "/* XBIOS */\n");
    fprintf(f, "\n");
    generate_bindings_old(f, xbios_table(), 14);
    fprintf(f, "__END_DECLS\n");
    fprintf(f, "\n");
    fprintf(f, "#endif /* _MINT_SYSBIND_H */\n");
    fclose(f);
    generate_traps_h("../include/mint");
  }
  return error;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x8,%rcx
mov    %rcx,-0x10(%rbp)
mov    (%rax),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
cmpq   $0x0,(%rax)
jne    120b <main+0x4b>
xor    %eax,%eax
mov    %eax,%edi
call   1070 <parse_syscall_description@plt>
mov    %eax,-0x1c(%rbp)
jmp    1262 <main+0xa2>
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
lea    0xde7(%rip),%rsi
call   10a0 <fopen@plt>
mov    %rax,-0x28(%rbp)
cmpq   $0x0,-0x28(%rbp)
je     1247 <main+0x87>
mov    -0x28(%rbp),%rdi
call   1070 <parse_syscall_description@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x28(%rbp),%rdi
call   1030 <fclose@plt>
jmp    125d <main+0x9d>
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
call   10b0 <perror@plt>
mov    $0x1,%edi
call   10d0 <exit@plt>
jmp    1262 <main+0xa2>
cmpl   $0x0,-0x1c(%rbp)
jne    1523 <main+0x363>
lea    0xd90(%rip),%rdi
lea    0xda3(%rip),%rsi
call   10a0 <fopen@plt>
mov    %rax,-0x30(%rbp)
cmpq   $0x0,-0x30(%rbp)
jne    12a4 <main+0xe4>
lea    0xd7e(%rip),%rdi
call   10b0 <perror@plt>
mov    $0x1,%edi
call   10d0 <exit@plt>
mov    -0x30(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   10c0 <print_head@plt>
mov    -0x30(%rbp),%rdi
lea    0xd63(%rip),%rsi
call   1060 <fprintf@plt>
mov    -0x30(%rbp),%rdi
lea    0xd6c(%rip),%rsi
call   1060 <fprintf@plt>
mov    -0x30(%rbp),%rdi
lea    0xed5(%rip),%rsi
call   1060 <fprintf@plt>
mov    -0x30(%rbp),%rdi
lea    0xd65(%rip),%rsi
call   1060 <fprintf@plt>
mov    -0x30(%rbp),%rdi
lea    0xd6a(%rip),%rsi
call   1060 <fprintf@plt>
mov    -0x30(%rbp),%rdi
lea    0xd72(%rip),%rsi
call   1060 <fprintf@plt>
mov    -0x30(%rbp),%rdi
lea    0xe95(%rip),%rsi
call   1060 <fprintf@plt>
mov    -0x30(%rbp),%rdi
lea    0xd5a(%rip),%rsi
call   1060 <fprintf@plt>
mov    -0x30(%rbp),%rdi
lea    0xd63(%rip),%rsi
call   1060 <fprintf@plt>
mov    -0x30(%rbp),%rdi
lea    0xd32(%rip),%rsi
call   1060 <fprintf@plt>
mov    -0x30(%rbp),%rdi
lea    0xe55(%rip),%rsi
call   1060 <fprintf@plt>
mov    -0x30(%rbp),%rdi
lea    0xd4f(%rip),%rsi
call   1060 <fprintf@plt>
mov    -0x30(%rbp),%rdi
lea    0xd56(%rip),%rsi
call   1060 <fprintf@plt>
mov    -0x30(%rbp),%rdi
lea    0xcf2(%rip),%rsi
call   1060 <fprintf@plt>
mov    -0x30(%rbp),%rdi
lea    0xd50(%rip),%rsi
call   1060 <fprintf@plt>
mov    -0x30(%rbp),%rdi
lea    0xd58(%rip),%rsi
call   1060 <fprintf@plt>
mov    -0x30(%rbp),%rdi
lea    0xcc2(%rip),%rsi
call   1060 <fprintf@plt>
mov    -0x30(%rbp),%rdi
lea    0xd53(%rip),%rsi
call   1060 <fprintf@plt>
mov    -0x30(%rbp),%rdi
lea    0xd5b(%rip),%rsi
call   1060 <fprintf@plt>
mov    -0x30(%rbp),%rdi
lea    0xc92(%rip),%rsi
call   1060 <fprintf@plt>
mov    -0x30(%rbp),%rdi
lea    0xdb5(%rip),%rsi
call   1060 <fprintf@plt>
mov    -0x30(%rbp),%rdi
lea    0xd46(%rip),%rsi
call   1060 <fprintf@plt>
mov    -0x30(%rbp),%rdi
lea    0xd95(%rip),%rsi
call   1060 <fprintf@plt>
mov    -0x30(%rbp),%rdi
lea    0xd35(%rip),%rsi
call   1060 <fprintf@plt>
mov    -0x30(%rbp),%rdi
lea    0xd75(%rip),%rsi
call   1060 <fprintf@plt>
mov    -0x30(%rbp),%rax
mov    %rax,-0x48(%rbp)
mov    $0x0,%al
call   1080 <gemdos_table@plt>
mov    -0x48(%rbp),%rdi
mov    %eax,%esi
mov    $0x1,%edx
call   1040 <generate_bindings_old@plt>
mov    -0x30(%rbp),%rdi
lea    0xd04(%rip),%rsi
call   1060 <fprintf@plt>
mov    -0x30(%rbp),%rdi
lea    0xd36(%rip),%rsi
call   1060 <fprintf@plt>
mov    -0x30(%rbp),%rax
mov    %rax,-0x40(%rbp)
mov    $0x0,%al
call   1090 <bios_table@plt>
mov    -0x40(%rbp),%rdi
mov    %eax,%esi
mov    $0xd,%edx
call   1040 <generate_bindings_old@plt>
mov    -0x30(%rbp),%rdi
lea    0xcd1(%rip),%rsi
call   1060 <fprintf@plt>
mov    -0x30(%rbp),%rdi
lea    0xcf7(%rip),%rsi
call   1060 <fprintf@plt>
mov    -0x30(%rbp),%rax
mov    %rax,-0x38(%rbp)
mov    $0x0,%al
call   1050 <xbios_table@plt>
mov    -0x38(%rbp),%rdi
mov    %eax,%esi
mov    $0xe,%edx
call   1040 <generate_bindings_old@plt>
mov    -0x30(%rbp),%rdi
lea    0xc9f(%rip),%rsi
call   1060 <fprintf@plt>
mov    -0x30(%rbp),%rdi
lea    0xcb8(%rip),%rsi
call   1060 <fprintf@plt>
mov    -0x30(%rbp),%rdi
lea    0xc8c(%rip),%rsi
call   1060 <fprintf@plt>
mov    -0x30(%rbp),%rdi
call   1030 <fclose@plt>
lea    0xc95(%rip),%rdi
call   10e0 <generate_traps_h@plt>
mov    -0x1c(%rbp),%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    (%rsi),%r14
mov    0x8(%rsi),%rdi
test   %rdi,%rdi
je     121c <main+0x4c>
mov    %rsi,%rbx
lea    0xe13(%rip),%rsi
call   10a0 <fopen@plt>
test   %rax,%rax
je     1564 <main+0x394>
mov    %rax,%rbp
mov    %rax,%rdi
call   1070 <parse_syscall_description@plt>
mov    %eax,%r15d
mov    %rbp,%rdi
call   1030 <fclose@plt>
test   %r15d,%r15d
jne    1556 <main+0x386>
jmp    122f <main+0x5f>
xor    %edi,%edi
call   1070 <parse_syscall_description@plt>
mov    %eax,%r15d
test   %r15d,%r15d
jne    1556 <main+0x386>
lea    0xdcd(%rip),%rdi
lea    0xde0(%rip),%rsi
call   10a0 <fopen@plt>
test   %rax,%rax
je     156a <main+0x39a>
mov    %rax,%rbx
mov    %rax,%rdi
mov    %r14,%rsi
call   10c0 <print_head@plt>
lea    0xdbf(%rip),%rdi
mov    $0x18,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   10e0 <fwrite@plt>
lea    0xdbf(%rip),%rdi
mov    $0x18,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   10e0 <fwrite@plt>
mov    $0xa,%edi
mov    %rbx,%rsi
call   1050 <fputc@plt>
lea    0xdb2(%rip),%rdi
mov    $0x14,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   10e0 <fwrite@plt>
lea    0xdae(%rip),%rdi
mov    $0x17,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   10e0 <fwrite@plt>
lea    0xdad(%rip),%r14
mov    $0x7,%esi
mov    $0x1,%edx
mov    %r14,%rdi
mov    %rbx,%rcx
call   10e0 <fwrite@plt>
mov    $0xa,%edi
mov    %rbx,%rsi
call   1050 <fputc@plt>
lea    0xd8c(%rip),%rdi
mov    $0x18,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   10e0 <fwrite@plt>
lea    0xd8c(%rip),%rdi
mov    $0x1b,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   10e0 <fwrite@plt>
mov    $0x7,%esi
mov    $0x1,%edx
mov    %r14,%rdi
mov    %rbx,%rcx
call   10e0 <fwrite@plt>
mov    $0xa,%edi
mov    %rbx,%rsi
call   1050 <fputc@plt>
lea    0xd6d(%rip),%rdi
mov    $0x16,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   10e0 <fwrite@plt>
lea    0xd6b(%rip),%rdi
mov    $0x19,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   10e0 <fwrite@plt>
mov    $0x7,%esi
mov    $0x1,%edx
mov    %r14,%rdi
mov    %rbx,%rcx
call   10e0 <fwrite@plt>
lea    0xd57(%rip),%rdi
mov    $0x17,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   10e0 <fwrite@plt>
lea    0xd56(%rip),%rdi
mov    $0x1a,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   10e0 <fwrite@plt>
mov    $0x7,%esi
mov    $0x1,%edx
mov    %r14,%rdi
mov    %rbx,%rcx
call   10e0 <fwrite@plt>
lea    0xd43(%rip),%rdi
mov    $0x17,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   10e0 <fwrite@plt>
lea    0xd42(%rip),%rdi
mov    $0x1a,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   10e0 <fwrite@plt>
mov    $0x7,%esi
mov    $0x1,%edx
mov    %r14,%rdi
mov    %rbx,%rcx
call   10e0 <fwrite@plt>
mov    $0xa,%edi
mov    %rbx,%rsi
call   1050 <fputc@plt>
lea    0xd22(%rip),%rdi
mov    $0xe,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   10e0 <fwrite@plt>
mov    $0xa,%edi
mov    %rbx,%rsi
call   1050 <fputc@plt>
lea    0xd0b(%rip),%rdi
mov    $0xd,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   10e0 <fwrite@plt>
mov    $0xa,%edi
mov    %rbx,%rsi
call   1050 <fputc@plt>
xor    %eax,%eax
call   1080 <gemdos_table@plt>
mov    %rbx,%rdi
mov    %eax,%esi
mov    $0x1,%edx
call   1040 <generate_bindings_old@plt>
lea    0xcdd(%rip),%rdi
mov    $0xb,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   10e0 <fwrite@plt>
mov    $0xa,%edi
mov    %rbx,%rsi
call   1050 <fputc@plt>
xor    %eax,%eax
call   1090 <bios_table@plt>
mov    %rbx,%rdi
mov    %eax,%esi
mov    $0xd,%edx
call   1040 <generate_bindings_old@plt>
lea    0xcad(%rip),%rdi
mov    $0xc,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   10e0 <fwrite@plt>
mov    $0xa,%edi
mov    %rbx,%rsi
call   1050 <fputc@plt>
xor    %eax,%eax
call   1060 <xbios_table@plt>
mov    %rbx,%rdi
mov    %eax,%esi
mov    $0xe,%edx
call   1040 <generate_bindings_old@plt>
lea    0xc7e(%rip),%rdi
mov    $0xc,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   10e0 <fwrite@plt>
mov    $0xa,%edi
mov    %rbx,%rsi
call   1050 <fputc@plt>
lea    0xc65(%rip),%rdi
mov    $0x1d,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   10e0 <fwrite@plt>
mov    %rbx,%rdi
call   1030 <fclose@plt>
lea    0xc62(%rip),%rdi
call   10f0 <generate_traps_h@plt>
mov    %r15d,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret
mov    0x8(%rbx),%rdi
jmp    1571 <main+0x3a1>
lea    0xaa2(%rip),%rdi
call   10b0 <perror@plt>
mov    $0x1,%edi
call   10d0 <exit@plt>

LLVM IR (-O0):
@.str = [3 x i8] c"rt\00"
@.str.1 = [26 x i8] c"../include/mint/sysbind.h\00"
@.str.2 = [2 x i8] c"w\00"
@.str.3 = [10 x i8] c"sysbind.h\00"
@.str.4 = [25 x i8] c"#ifndef _MINT_SYSBIND_H\0A\00"
@.str.5 = [25 x i8] c"#define _MINT_SYSBIND_H\0A\00"
@.str.6 = [2 x i8] c"\0A\00"
@.str.7 = [21 x i8] c"#ifndef _FEATURES_H\0A\00"
@.str.8 = [24 x i8] c"# include <features.h>\0A\00"
@.str.9 = [8 x i8] c"#endif\0A\00"
@.str.10 = [25 x i8] c"#ifndef _MINT_OSTRUCT_H\0A\00"
@.str.11 = [28 x i8] c"# include <mint/ostruct.h>\0A\00"
@.str.12 = [23 x i8] c"#ifndef _MINT_TRAP1_H\0A\00"
@.str.13 = [26 x i8] c"# include <mint/trap1.h>\0A\00"
@.str.14 = [24 x i8] c"#ifndef _MINT_TRAP13_H\0A\00"
@.str.15 = [27 x i8] c"# include <mint/trap13.h>\0A\00"
@.str.16 = [24 x i8] c"#ifndef _MINT_TRAP14_H\0A\00"
@.str.17 = [27 x i8] c"# include <mint/trap14.h>\0A\00"
@.str.18 = [15 x i8] c"__BEGIN_DECLS\0A\00"
@.str.19 = [14 x i8] c"/* GEMDOS */\0A\00"
@.str.20 = [12 x i8] c"/* BIOS */\0A\00"
@.str.21 = [13 x i8] c"/* XBIOS */\0A\00"
@.str.22 = [13 x i8] c"__END_DECLS\0A\00"
@.str.23 = [30 x i8] c"#endif /* _MINT_SYSBIND_H */\0A\00"
@.str.24 = [16 x i8] c"../include/mint\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i8*
%7 = alloca i32
%8 = alloca i32*
%9 = alloca i32*
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%10 = load i8**, i8*** %5
%11 = getelementptr inbounds i8*, i8** %10, i32 1
store i8** %11, i8*** %5
%12 = load i8*, i8** %10
store i8* %12, i8** %6
%13 = load i8**, i8*** %5
%14 = load i8*, i8** %13
%15 = icmp eq i8* %14, null
br i1 %15, label %16, label %18
16: ; preds = %2
%17 = call i32 @parse_syscall_description(i32* null)
store i32 %17, i32* %7
br label %35
18: ; preds = %2
%19 = load i8**, i8*** %5
%20 = load i8*, i8** %19
%21 = call i32* @fopen(i8* %20, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
store i32* %21, i32** %8
%22 = load i32*, i32** %8
%23 = icmp ne i32* %22, null
br i1 %23, label %24, label %29
24: ; preds = %18
%25 = load i32*, i32** %8
%26 = call i32 @parse_syscall_description(i32* %25)
store i32 %26, i32* %7
%27 = load i32*, i32** %8
%28 = call i32 @fclose(i32* %27)
br label %34
29: ; preds = %18
%30 = load i8**, i8*** %5
%31 = load i8*, i8** %30
%32 = call i32 @perror(i8* %31)
%33 = call i32 @exit(i32 1)
unreachable
34: ; preds = %24
br label %35
35: ; preds = %34, %16
%36 = load i32, i32* %7
%37 = icmp ne i32 %36, 0
br i1 %37, label %125, label %38
38: ; preds = %35
%39 = call i32* @fopen(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
store i32* %39, i32** %9
%40 = load i32*, i32** %9
%41 = icmp ne i32* %40, null
br i1 %41, label %45, label %42
42: ; preds = %38
%43 = call i32 @perror(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.3, i64 0, i64 0))
%44 = call i32 @exit(i32 1)
unreachable
45: ; preds = %38
%46 = load i32*, i32** %9
%47 = load i8*, i8** %6
%48 = call i32 @print_head(i32* %46, i8* %47)
%49 = load i32*, i32** %9
%50 = call i32 @fprintf(i32* %49, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.4, i64 0, i64 0))
%51 = load i32*, i32** %9
%52 = call i32 @fprintf(i32* %51, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.5, i64 0, i64 0))
%53 = load i32*, i32** %9
%54 = call i32 @fprintf(i32* %53, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.6, i64 0, i64 0))
%55 = load i32*, i32** %9
%56 = call i32 @fprintf(i32* %55, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.7, i64 0, i64 0))
%57 = load i32*, i32** %9
%58 = call i32 @fprintf(i32* %57, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.8, i64 0, i64 0))
%59 = load i32*, i32** %9
%60 = call i32 @fprintf(i32* %59, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.9, i64 0, i64 0))
%61 = load i32*, i32** %9
%62 = call i32 @fprintf(i32* %61, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.6, i64 0, i64 0))
%63 = load i32*, i32** %9
%64 = call i32 @fprintf(i32* %63, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.10, i64 0, i64 0))
%65 = load i32*, i32** %9
%66 = call i32 @fprintf(i32* %65, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.11, i64 0, i64 0))
%67 = load i32*, i32** %9
%68 = call i32 @fprintf(i32* %67, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.9, i64 0, i64 0))
%69 = load i32*, i32** %9
%70 = call i32 @fprintf(i32* %69, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.6, i64 0, i64 0))
%71 = load i32*, i32** %9
%72 = call i32 @fprintf(i32* %71, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.12, i64 0, i64 0))
%73 = load i32*, i32** %9
%74 = call i32 @fprintf(i32* %73, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.13, i64 0, i64 0))
%75 = load i32*, i32** %9
%76 = call i32 @fprintf(i32* %75, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.9, i64 0, i64 0))
%77 = load i32*, i32** %9
%78 = call i32 @fprintf(i32* %77, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.14, i64 0, i64 0))
%79 = load i32*, i32** %9
%80 = call i32 @fprintf(i32* %79, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.15, i64 0, i64 0))
%81 = load i32*, i32** %9
%82 = call i32 @fprintf(i32* %81, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.9, i64 0, i64 0))
%83 = load i32*, i32** %9
%84 = call i32 @fprintf(i32* %83, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.16, i64 0, i64 0))
%85 = load i32*, i32** %9
%86 = call i32 @fprintf(i32* %85, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.17, i64 0, i64 0))
%87 = load i32*, i32** %9
%88 = call i32 @fprintf(i32* %87, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.9, i64 0, i64 0))
%89 = load i32*, i32** %9
%90 = call i32 @fprintf(i32* %89, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.6, i64 0, i64 0))
%91 = load i32*, i32** %9
%92 = call i32 @fprintf(i32* %91, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.18, i64 0, i64 0))
%93 = load i32*, i32** %9
%94 = call i32 @fprintf(i32* %93, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.6, i64 0, i64 0))
%95 = load i32*, i32** %9
%96 = call i32 @fprintf(i32* %95, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.19, i64 0, i64 0))
%97 = load i32*, i32** %9
%98 = call i32 @fprintf(i32* %97, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.6, i64 0, i64 0))
%99 = load i32*, i32** %9
%100 = call i32 (...) @gemdos_table()
%101 = call i32 @generate_bindings_old(i32* %99, i32 %100, i32 1)
%102 = load i32*, i32** %9
%103 = call i32 @fprintf(i32* %102, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.20, i64 0, i64 0))
%104 = load i32*, i32** %9
%105 = call i32 @fprintf(i32* %104, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.6, i64 0, i64 0))
%106 = load i32*, i32** %9
%107 = call i32 (...) @bios_table()
%108 = call i32 @generate_bindings_old(i32* %106, i32 %107, i32 13)
%109 = load i32*, i32** %9
%110 = call i32 @fprintf(i32* %109, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.21, i64 0, i64 0))
%111 = load i32*, i32** %9
%112 = call i32 @fprintf(i32* %111, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.6, i64 0, i64 0))
%113 = load i32*, i32** %9
%114 = call i32 (...) @xbios_table()
%115 = call i32 @generate_bindings_old(i32* %113, i32 %114, i32 14)
%116 = load i32*, i32** %9
%117 = call i32 @fprintf(i32* %116, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.22, i64 0, i64 0))
%118 = load i32*, i32** %9
%119 = call i32 @fprintf(i32* %118, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.6, i64 0, i64 0))
%120 = load i32*, i32** %9
%121 = call i32 @fprintf(i32* %120, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.23, i64 0, i64 0))
%122 = load i32*, i32** %9
%123 = call i32 @fclose(i32* %122)
%124 = call i32 @generate_traps_h(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.24, i64 0, i64 0))
br label %125
125: ; preds = %45, %35
%126 = load i32, i32* %7
ret i32 %126
}

LLVM IR (-O2):
@.str = [3 x i8] c"rt\00"
@.str.1 = [26 x i8] c"../include/mint/sysbind.h\00"
@.str.2 = [2 x i8] c"w\00"
@.str.3 = [10 x i8] c"sysbind.h\00"
@.str.4 = [25 x i8] c"#ifndef _MINT_SYSBIND_H\0A\00"
@.str.5 = [25 x i8] c"#define _MINT_SYSBIND_H\0A\00"
@.str.7 = [21 x i8] c"#ifndef _FEATURES_H\0A\00"
@.str.8 = [24 x i8] c"# include <features.h>\0A\00"
@.str.9 = [8 x i8] c"#endif\0A\00"
@.str.10 = [25 x i8] c"#ifndef _MINT_OSTRUCT_H\0A\00"
@.str.11 = [28 x i8] c"# include <mint/ostruct.h>\0A\00"
@.str.12 = [23 x i8] c"#ifndef _MINT_TRAP1_H\0A\00"
@.str.13 = [26 x i8] c"# include <mint/trap1.h>\0A\00"
@.str.14 = [24 x i8] c"#ifndef _MINT_TRAP13_H\0A\00"
@.str.15 = [27 x i8] c"# include <mint/trap13.h>\0A\00"
@.str.16 = [24 x i8] c"#ifndef _MINT_TRAP14_H\0A\00"
@.str.17 = [27 x i8] c"# include <mint/trap14.h>\0A\00"
@.str.18 = [15 x i8] c"__BEGIN_DECLS\0A\00"
@.str.19 = [14 x i8] c"/* GEMDOS */\0A\00"
@.str.20 = [12 x i8] c"/* BIOS */\0A\00"
@.str.21 = [13 x i8] c"/* XBIOS */\0A\00"
@.str.22 = [13 x i8] c"__END_DECLS\0A\00"
@.str.23 = [30 x i8] c"#endif /* _MINT_SYSBIND_H */\0A\00"
@.str.24 = [16 x i8] c"../include/mint\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = getelementptr inbounds i8*, i8** %1, i64 1
%4 = load i8*, i8** %1
%5 = load i8*, i8** %3
%6 = icmp eq i8* %5, null
br i1 %6, label %7, label %9
7: ; preds = %2
%8 = tail call i32 @parse_syscall_description(i32* null)
br label %19
9: ; preds = %2
%10 = tail call i32* @fopen(i8* %5, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%11 = icmp eq i32* %10, null
br i1 %11, label %15, label %12
12: ; preds = %9
%13 = tail call i32 @parse_syscall_description(i32* %10)
%14 = tail call i32 @fclose(i32* %10)
br label %19
15: ; preds = %9
%16 = load i8*, i8** %3
%17 = tail call i32 @perror(i8* %16)
%18 = tail call i32 @exit(i32 1)
unreachable
19: ; preds = %12, %7
%20 = phi i32 [ %8, %7 ], [ %13, %12 ]
%21 = icmp eq i32 %20, 0
br i1 %21, label %22, label %70
22: ; preds = %19
%23 = tail call i32* @fopen(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%24 = icmp eq i32* %23, null
br i1 %24, label %25, label %28
25: ; preds = %22
%26 = tail call i32 @perror(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.3, i64 0, i64 0))
%27 = tail call i32 @exit(i32 1)
unreachable
28: ; preds = %22
%29 = tail call i32 @print_head(i32* %23, i8* %4)
%30 = tail call i64 @fwrite(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.4, i64 0, i64 0), i64 24, i64 1, i32* %23)
%31 = tail call i64 @fwrite(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.5, i64 0, i64 0), i64 24, i64 1, i32* %23)
%32 = tail call i32 @fputc(i32 10, i32* %23)
%33 = tail call i64 @fwrite(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.7, i64 0, i64 0), i64 20, i64 1, i32* %23)
%34 = tail call i64 @fwrite(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.8, i64 0, i64 0), i64 23, i64 1, i32* %23)
%35 = tail call i64 @fwrite(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.9, i64 0, i64 0), i64 7, i64 1, i32* %23)
%36 = tail call i32 @fputc(i32 10, i32* %23)
%37 = tail call i64 @fwrite(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.10, i64 0, i64 0), i64 24, i64 1, i32* %23)
%38 = tail call i64 @fwrite(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.11, i64 0, i64 0), i64 27, i64 1, i32* %23)
%39 = tail call i64 @fwrite(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.9, i64 0, i64 0), i64 7, i64 1, i32* %23)
%40 = tail call i32 @fputc(i32 10, i32* %23)
%41 = tail call i64 @fwrite(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.12, i64 0, i64 0), i64 22, i64 1, i32* %23)
%42 = tail call i64 @fwrite(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.13, i64 0, i64 0), i64 25, i64 1, i32* %23)
%43 = tail call i64 @fwrite(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.9, i64 0, i64 0), i64 7, i64 1, i32* %23)
%44 = tail call i64 @fwrite(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.14, i64 0, i64 0), i64 23, i64 1, i32* %23)
%45 = tail call i64 @fwrite(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.15, i64 0, i64 0), i64 26, i64 1, i32* %23)
%46 = tail call i64 @fwrite(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.9, i64 0, i64 0), i64 7, i64 1, i32* %23)
%47 = tail call i64 @fwrite(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.16, i64 0, i64 0), i64 23, i64 1, i32* %23)
%48 = tail call i64 @fwrite(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.17, i64 0, i64 0), i64 26, i64 1, i32* %23)
%49 = tail call i64 @fwrite(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.9, i64 0, i64 0), i64 7, i64 1, i32* %23)
%50 = tail call i32 @fputc(i32 10, i32* %23)
%51 = tail call i64 @fwrite(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.18, i64 0, i64 0), i64 14, i64 1, i32* %23)
%52 = tail call i32 @fputc(i32 10, i32* %23)
%53 = tail call i64 @fwrite(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.19, i64 0, i64 0), i64 13, i64 1, i32* %23)
%54 = tail call i32 @fputc(i32 10, i32* %23)
%55 = tail call i32 (...) @gemdos_table()
%56 = tail call i32 @generate_bindings_old(i32* %23, i32 %55, i32 1)
%57 = tail call i64 @fwrite(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.20, i64 0, i64 0), i64 11, i64 1, i32* %23)
%58 = tail call i32 @fputc(i32 10, i32* %23)
%59 = tail call i32 (...) @bios_table()
%60 = tail call i32 @generate_bindings_old(i32* %23, i32 %59, i32 13)
%61 = tail call i64 @fwrite(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.21, i64 0, i64 0), i64 12, i64 1, i32* %23)
%62 = tail call i32 @fputc(i32 10, i32* %23)
%63 = tail call i32 (...) @xbios_table()
%64 = tail call i32 @generate_bindings_old(i32* %23, i32 %63, i32 14)
%65 = tail call i64 @fwrite(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.22, i64 0, i64 0), i64 12, i64 1, i32* %23)
%66 = tail call i32 @fputc(i32 10, i32* %23)
%67 = tail call i64 @fwrite(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.23, i64 0, i64 0), i64 29, i64 1, i32* %23)
%68 = tail call i32 @fclose(i32* %23)
%69 = tail call i32 @generate_traps_h(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.24, i64 0, i64 0))
br label %70
70: ; preds = %28, %19
ret i32 %20
}