int entrypoint(void) {
  debug_print_str("bytecode started", 16);
  debug_print_str_start("Engine functionality level: ", 28);
  debug_print_uint(engine_functionality_level());
  debug_print_str_nonl(", dconf functionality level: ", 28);
  debug_print_uint(engine_dconf_level());
  debug_print_str_nonl("\n", 1);
  debug_print_str_start("Engine scan options: ", 21);
  debug_print_uint(engine_scan_options());
  debug_print_str_nonl(", db options: ", 13);
  debug_print_uint(engine_db_options());
  debug_print_str_nonl("\n", 1);
  debug("just print a string");
  debug(4);
  return 0xf00d;
}


x86 assembly (clang, -O0):
<entrypoint>:
push   %rbp
mov    %rsp,%rbp
lea    0xe65(%rip),%rdi
mov    $0x10,%esi
mov    $0x0,%al
call   1030 <debug_print_str@plt>
lea    0xe63(%rip),%rdi
mov    $0x1c,%esi
mov    $0x0,%al
call   1040 <debug_print_str_start@plt>
mov    $0x0,%al
call   1090 <engine_functionality_level@plt>
mov    %eax,%edi
mov    $0x0,%al
call   10a0 <debug_print_uint@plt>
lea    0xe5d(%rip),%rdi
mov    $0x1c,%esi
mov    $0x0,%al
call   10b0 <debug_print_str_nonl@plt>
mov    $0x0,%al
call   1070 <engine_dconf_level@plt>
mov    %eax,%edi
mov    $0x0,%al
call   10a0 <debug_print_uint@plt>
lea    0xe58(%rip),%rdi
mov    $0x1,%esi
mov    $0x0,%al
call   10b0 <debug_print_str_nonl@plt>
lea    0xe47(%rip),%rdi
mov    $0x15,%esi
mov    $0x0,%al
call   1040 <debug_print_str_start@plt>
mov    $0x0,%al
call   1050 <engine_scan_options@plt>
mov    %eax,%edi
mov    $0x0,%al
call   10a0 <debug_print_uint@plt>
lea    0xe3a(%rip),%rdi
mov    $0xd,%esi
mov    $0x0,%al
call   10b0 <debug_print_str_nonl@plt>
mov    $0x0,%al
call   1080 <engine_db_options@plt>
mov    %eax,%edi
mov    $0x0,%al
call   10a0 <debug_print_uint@plt>
lea    0xdff(%rip),%rdi
mov    $0x1,%esi
mov    $0x0,%al
call   10b0 <debug_print_str_nonl@plt>
lea    0xe13(%rip),%rdi
mov    $0x0,%al
call   1060 <debug@plt>
mov    $0x4,%edi
mov    $0x0,%al
call   1060 <debug@plt>
mov    $0xf00d,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<entrypoint>:
push   %rbx
lea    0xe68(%rip),%rdi
mov    $0x10,%esi
xor    %eax,%eax
call   1030 <debug_print_str@plt>
lea    0xe66(%rip),%rdi
mov    $0x1c,%esi
xor    %eax,%eax
call   1040 <debug_print_str_start@plt>
xor    %eax,%eax
call   1090 <engine_functionality_level@plt>
mov    %eax,%edi
xor    %eax,%eax
call   10a0 <debug_print_uint@plt>
lea    0xe60(%rip),%rdi
mov    $0x1c,%esi
xor    %eax,%eax
call   10b0 <debug_print_str_nonl@plt>
xor    %eax,%eax
call   1070 <engine_dconf_level@plt>
mov    %eax,%edi
xor    %eax,%eax
call   10a0 <debug_print_uint@plt>
lea    0xe5b(%rip),%rbx
mov    %rbx,%rdi
mov    $0x1,%esi
xor    %eax,%eax
call   10b0 <debug_print_str_nonl@plt>
lea    0xe47(%rip),%rdi
mov    $0x15,%esi
xor    %eax,%eax
call   1040 <debug_print_str_start@plt>
xor    %eax,%eax
call   1050 <engine_scan_options@plt>
mov    %eax,%edi
xor    %eax,%eax
call   10a0 <debug_print_uint@plt>
lea    0xe3a(%rip),%rdi
mov    $0xd,%esi
xor    %eax,%eax
call   10b0 <debug_print_str_nonl@plt>
xor    %eax,%eax
call   1080 <engine_db_options@plt>
mov    %eax,%edi
xor    %eax,%eax
call   10a0 <debug_print_uint@plt>
mov    %rbx,%rdi
mov    $0x1,%esi
xor    %eax,%eax
call   10b0 <debug_print_str_nonl@plt>
lea    0xe17(%rip),%rdi
xor    %eax,%eax
call   1060 <debug@plt>
mov    $0x4,%edi
xor    %eax,%eax
call   1060 <debug@plt>
mov    $0xf00d,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [17 x i8] c"bytecode started\00"
@.str.1 = [29 x i8] c"Engine functionality level: \00"
@.str.2 = [30 x i8] c", dconf functionality level: \00"
@.str.3 = [2 x i8] c"\0A\00"
@.str.4 = [22 x i8] c"Engine scan options: \00"
@.str.5 = [15 x i8] c", db options: \00"
@.str.6 = [20 x i8] c"just print a string\00"
define i32 @entrypoint() {
%1 = call i32 (i8*, i32, ...) bitcast (i32 (...)* @debug_print_str to i32 (i8*, i32, ...)*)(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i32 16)
%2 = call i32 (i8*, i32, ...) bitcast (i32 (...)* @debug_print_str_start to i32 (i8*, i32, ...)*)(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0), i32 28)
%3 = call i32 (...) @engine_functionality_level()
%4 = call i32 (i32, ...) bitcast (i32 (...)* @debug_print_uint to i32 (i32, ...)*)(i32 %3)
%5 = call i32 (i8*, i32, ...) bitcast (i32 (...)* @debug_print_str_nonl to i32 (i8*, i32, ...)*)(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.2, i64 0, i64 0), i32 28)
%6 = call i32 (...) @engine_dconf_level()
%7 = call i32 (i32, ...) bitcast (i32 (...)* @debug_print_uint to i32 (i32, ...)*)(i32 %6)
%8 = call i32 (i8*, i32, ...) bitcast (i32 (...)* @debug_print_str_nonl to i32 (i8*, i32, ...)*)(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0), i32 1)
%9 = call i32 (i8*, i32, ...) bitcast (i32 (...)* @debug_print_str_start to i32 (i8*, i32, ...)*)(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.4, i64 0, i64 0), i32 21)
%10 = call i32 (...) @engine_scan_options()
%11 = call i32 (i32, ...) bitcast (i32 (...)* @debug_print_uint to i32 (i32, ...)*)(i32 %10)
%12 = call i32 (i8*, i32, ...) bitcast (i32 (...)* @debug_print_str_nonl to i32 (i8*, i32, ...)*)(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.5, i64 0, i64 0), i32 13)
%13 = call i32 (...) @engine_db_options()
%14 = call i32 (i32, ...) bitcast (i32 (...)* @debug_print_uint to i32 (i32, ...)*)(i32 %13)
%15 = call i32 (i8*, i32, ...) bitcast (i32 (...)* @debug_print_str_nonl to i32 (i8*, i32, ...)*)(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0), i32 1)
%16 = call i32 (i8*, ...) bitcast (i32 (...)* @debug to i32 (i8*, ...)*)(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.6, i64 0, i64 0))
%17 = call i32 (i32, ...) bitcast (i32 (...)* @debug to i32 (i32, ...)*)(i32 4)
ret i32 61453
}

LLVM IR (-O2):
@.str = [17 x i8] c"bytecode started\00"
@.str.1 = [29 x i8] c"Engine functionality level: \00"
@.str.2 = [30 x i8] c", dconf functionality level: \00"
@.str.3 = [2 x i8] c"\0A\00"
@.str.4 = [22 x i8] c"Engine scan options: \00"
@.str.5 = [15 x i8] c", db options: \00"
@.str.6 = [20 x i8] c"just print a string\00"
define i32 @entrypoint() {
%1 = tail call i32 (i8*, i32, ...) bitcast (i32 (...)* @debug_print_str to i32 (i8*, i32, ...)*)(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i32 16)
%2 = tail call i32 (i8*, i32, ...) bitcast (i32 (...)* @debug_print_str_start to i32 (i8*, i32, ...)*)(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0), i32 28)
%3 = tail call i32 (...) @engine_functionality_level()
%4 = tail call i32 (i32, ...) bitcast (i32 (...)* @debug_print_uint to i32 (i32, ...)*)(i32 %3)
%5 = tail call i32 (i8*, i32, ...) bitcast (i32 (...)* @debug_print_str_nonl to i32 (i8*, i32, ...)*)(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.2, i64 0, i64 0), i32 28)
%6 = tail call i32 (...) @engine_dconf_level()
%7 = tail call i32 (i32, ...) bitcast (i32 (...)* @debug_print_uint to i32 (i32, ...)*)(i32 %6)
%8 = tail call i32 (i8*, i32, ...) bitcast (i32 (...)* @debug_print_str_nonl to i32 (i8*, i32, ...)*)(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0), i32 1)
%9 = tail call i32 (i8*, i32, ...) bitcast (i32 (...)* @debug_print_str_start to i32 (i8*, i32, ...)*)(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.4, i64 0, i64 0), i32 21)
%10 = tail call i32 (...) @engine_scan_options()
%11 = tail call i32 (i32, ...) bitcast (i32 (...)* @debug_print_uint to i32 (i32, ...)*)(i32 %10)
%12 = tail call i32 (i8*, i32, ...) bitcast (i32 (...)* @debug_print_str_nonl to i32 (i8*, i32, ...)*)(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.5, i64 0, i64 0), i32 13)
%13 = tail call i32 (...) @engine_db_options()
%14 = tail call i32 (i32, ...) bitcast (i32 (...)* @debug_print_uint to i32 (i32, ...)*)(i32 %13)
%15 = tail call i32 (i8*, i32, ...) bitcast (i32 (...)* @debug_print_str_nonl to i32 (i8*, i32, ...)*)(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0), i32 1)
%16 = tail call i32 (i8*, ...) bitcast (i32 (...)* @debug to i32 (i8*, ...)*)(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.6, i64 0, i64 0))
%17 = tail call i32 (i32, ...) bitcast (i32 (...)* @debug to i32 (i32, ...)*)(i32 4)
ret i32 61453
}