xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
int main() {
  printf("%s\n", "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/"
                 "outputs/2022-01-22/02-19-57/repos/Akagi201/akcode/refs/heads/"
                 "master/c/ctest/test_debug/__FILE__.c");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeda(%rip),%rdi
lea    0xed7(%rip),%rsi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
lea    0xee5(%rip),%rsi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%s\0A\00"
@.str.1 = [154 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/Akagi201/akcode/refs/heads/master/c/ctest/test_debug/__FILE__.c\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([154 x i8], [154 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%s\0A\00"
@.str.1 = [154 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/Akagi201/akcode/refs/heads/master/c/ctest/test_debug/__FILE__.c\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([154 x i8], [154 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ writePort(char const *, unsigned char);
void send_downstream_message(const char *msg_data, unsigned char msg_len) {
  writePort(msg_data, msg_len);
}


x86 assembly (clang, -O0):
<send_downstream_message>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %sil,%al
mov    %rdi,-0x8(%rbp)
mov    %al,-0x9(%rbp)
mov    -0x8(%rbp),%rdi
movzbl -0x9(%rbp),%esi
call   1030 <writePort@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<send_downstream_message>:
jmp    1030 <writePort@plt>

LLVM IR (-O0):
define void @send_downstream_message(i8* %0, i8 zeroext %1) {
%3 = alloca i8*
%4 = alloca i8
store i8* %0, i8** %3
store i8 %1, i8* %4
%5 = load i8*, i8** %3
%6 = load i8, i8* %4
%7 = call i32 @writePort(i8* %5, i8 zeroext %6)
ret void
}

LLVM IR (-O2):
define void @send_downstream_message(i8* %0, i8 zeroext %1) {
%3 = tail call i32 @writePort(i8* %0, i8 zeroext %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ __utmpxname(char const *);
void utmpxname(const char *file) {
  __utmpxname(file);
  return;
}


x86 assembly (clang, -O0):
<utmpxname>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <__utmpxname@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<utmpxname>:
jmp    1030 <__utmpxname@plt>

LLVM IR (-O0):
define void @utmpxname(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @__utmpxname(i8* %3)
ret void
}

LLVM IR (-O2):
define void @utmpxname(i8* %0) {
%2 = tail call i32 @__utmpxname(i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ TRUE;
int /*<<< orphan*/ cbreak();
int /*<<< orphan*/ curs_set(int /*<<< orphan*/);
int /*<<< orphan*/ initscr();
int /*<<< orphan*/ keypad(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ refresh();
int /*<<< orphan*/ start_color();
int /*<<< orphan*/ stdscr;
void iniciarNcurses() {
  initscr();
  start_color();
  curs_set(0);
  cbreak();
  keypad(stdscr, TRUE);
  refresh();
}


x86 assembly (clang, -O0):
<iniciarNcurses>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1050 <initscr@plt>
mov    $0x0,%al
call   1060 <start_color@plt>
xor    %edi,%edi
call   1080 <curs_set@plt>
mov    $0x0,%al
call   1030 <cbreak@plt>
mov    0x2e61(%rip),%rax
mov    (%rax),%edi
mov    0x2e50(%rip),%rax
mov    (%rax),%esi
call   1040 <keypad@plt>
mov    $0x0,%al
call   1070 <refresh@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<iniciarNcurses>:
push   %rax
xor    %eax,%eax
call   1050 <initscr@plt>
xor    %eax,%eax
call   1060 <start_color@plt>
xor    %edi,%edi
call   1080 <curs_set@plt>
xor    %eax,%eax
call   1030 <cbreak@plt>
mov    0x2e64(%rip),%rax
mov    (%rax),%edi
mov    0x2e53(%rip),%rax
mov    (%rax),%esi
call   1040 <keypad@plt>
xor    %eax,%eax
pop    %rcx
jmp    1070 <refresh@plt>

LLVM IR (-O0):
@stdscr = global i32 0
@TRUE = global i32 0
define void @iniciarNcurses() {
%1 = call i32 (...) @initscr()
%2 = call i32 (...) @start_color()
%3 = call i32 @curs_set(i32 0)
%4 = call i32 (...) @cbreak()
%5 = load i32, i32* @stdscr
%6 = load i32, i32* @TRUE
%7 = call i32 @keypad(i32 %5, i32 %6)
%8 = call i32 (...) @refresh()
ret void
}

LLVM IR (-O2):
@stdscr = global i32 0
@TRUE = global i32 0
define void @iniciarNcurses() {
%1 = tail call i32 (...) @initscr()
%2 = tail call i32 (...) @start_color()
%3 = tail call i32 @curs_set(i32 0)
%4 = tail call i32 (...) @cbreak()
%5 = load i32, i32* @stdscr
%6 = load i32, i32* @TRUE
%7 = tail call i32 @keypad(i32 %5, i32 %6)
%8 = tail call i32 (...) @refresh()
ret void
}
void EVP_EncodeUpdate(void) {}


x86 assembly (clang, -O0):
<EVP_EncodeUpdate>:
push   %rbp
mov    %rsp,%rbp
pop    %rbp
ret

x86 assembly (clang, -O2):
<EVP_EncodeUpdate>:
ret

LLVM IR (-O0):
define void @EVP_EncodeUpdate() {
ret void
}

LLVM IR (-O2):
define void @EVP_EncodeUpdate() {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ b;

/* Variables and functions */
int write(int, char *, int);
int func_six(int x) {
  char b[32];
  int r = write(1, b, sizeof(b));
  return x;
}


x86 assembly (clang, -O0):
<func_six>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %edi,-0x4(%rbp)
lea    -0x30(%rbp),%rsi
mov    $0x1,%edi
mov    $0x20,%edx
call   1030 <write@plt>
mov    %eax,-0x34(%rbp)
mov    -0x4(%rbp),%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<func_six>:
push   %rbx
sub    $0x20,%rsp
mov    %edi,%ebx
mov    %rsp,%rsi
mov    $0x1,%edi
mov    $0x20,%edx
call   1030 <write@plt>
mov    %ebx,%eax
add    $0x20,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define i32 @func_six(i32 %0) {
%2 = alloca i32
%3 = alloca [32 x i8]
%4 = alloca i32
store i32 %0, i32* %2
%5 = getelementptr inbounds [32 x i8], [32 x i8]* %3, i64 0, i64 0
%6 = call i32 @write(i32 1, i8* %5, i32 32)
store i32 %6, i32* %4
%7 = load i32, i32* %2
ret i32 %7
}

LLVM IR (-O2):
define i32 @func_six(i32 returned %0) {
%2 = alloca [32 x i8]
%3 = getelementptr inbounds [32 x i8], [32 x i8]* %2, i64 0, i64 0
%4 = call i32 @write(i32 1, i8* %3, i32 32)
ret i32 %0
}
int getPC(int *context) { return *(context + 3); }


x86 assembly (clang, -O0):
<getPC>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    0xc(%rax),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<getPC>:
mov    0xc(%rdi),%eax
ret

LLVM IR (-O0):
define i32 @getPC(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = getelementptr inbounds i32, i32* %3, i64 3
%5 = load i32, i32* %4
ret i32 %5
}

LLVM IR (-O2):
define i32 @getPC(i32* nocapture %0) {
%2 = getelementptr inbounds i32, i32* %0, i64 3
%3 = load i32, i32* %2
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ fail(int, char *, char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *, char *);
int /*<<< orphan*/ stderr;
void debug(char *caller, char *message) {
  fprintf(stderr, "debug -- %s: %s\n", caller, message);
  if (!1) {
    fail(-1, caller, "Debug statement executed while in production.");
  }
}


x86 assembly (clang, -O0):
<debug>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2eb9(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
mov    -0x10(%rbp),%rcx
lea    0xec8(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<debug>:
mov    %rsi,%rcx
mov    %rdi,%rdx
mov    0x2ec3(%rip),%rax
mov    (%rax),%edi
lea    0xeda(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [17 x i8] c"debug -- %s: %s\0A\00"
define void @debug(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i32, i32* @stderr
%6 = load i8*, i8** %3
%7 = load i8*, i8** %4
%8 = call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* %6, i8* %7)
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [17 x i8] c"debug -- %s: %s\0A\00"
define void @debug(i8* %0, i8* %1) {
%3 = load i32, i32* @stderr
%4 = tail call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %1)
ret void
}
/* Variables and functions */
float s_brrand();
float linlo() {
  float randnum, randnum2;
  randnum = s_brrand();
  randnum2 = s_brrand();
  if (randnum2 < randnum)
    randnum = randnum2;
  return (randnum);
}


x86 assembly (clang, -O0):
<linlo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <s_brrand@plt>
movss  %xmm0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <s_brrand@plt>
movss  %xmm0,-0x8(%rbp)
movss  -0x8(%rbp),%xmm1
movss  -0x4(%rbp),%xmm0
ucomiss %xmm1,%xmm0
jbe    114d <linlo+0x3d>
movss  -0x8(%rbp),%xmm0
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<linlo>:
push   %rax
xor    %eax,%eax
call   1030 <s_brrand@plt>
movss  %xmm0,0x4(%rsp)
xor    %eax,%eax
call   1030 <s_brrand@plt>
minss  0x4(%rsp),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @linlo() {
%1 = alloca float
%2 = alloca float
%3 = call float (...) @s_brrand()
store float %3, float* %1
%4 = call float (...) @s_brrand()
store float %4, float* %2
%5 = load float, float* %2
%6 = load float, float* %1
%7 = fcmp olt float %5, %6
br i1 %7, label %8, label %10
8: ; preds = %0
%9 = load float, float* %2
store float %9, float* %1
br label %10
10: ; preds = %8, %0
%11 = load float, float* %1
ret float %11
}

LLVM IR (-O2):
define float @linlo() {
%1 = tail call float (...) @s_brrand()
%2 = tail call float (...) @s_brrand()
%3 = fcmp olt float %2, %1
%4 = select i1 %3, float %2, float %1
ret float %4
}
/* Type definitions */
typedef int /*<<< orphan*/ buf;

/* Variables and functions */
char *normalize(char *);
int /*<<< orphan*/ sflap_send(char *, int, int);
int /*<<< orphan*/ snprintf(char *, int, char *, char *);
void serv_add_deny(char *name) {
  char buf[1024];
  snprintf(buf, sizeof(buf), "toc_add_deny %s", normalize(name));
  sflap_send(buf, -1, 2);
}


x86 assembly (clang, -O0):
<serv_add_deny>:
push   %rbp
mov    %rsp,%rbp
sub    $0x420,%rsp
mov    %rdi,-0x8(%rbp)
lea    -0x410(%rbp),%rax
mov    %rax,-0x418(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <normalize@plt>
mov    -0x418(%rbp),%rdi
mov    %rax,%rcx
mov    $0x400,%esi
lea    0xe94(%rip),%rdx
call   1030 <snprintf@plt>
lea    -0x410(%rbp),%rdi
mov    $0xffffffff,%esi
mov    $0x2,%edx
call   1050 <sflap_send@plt>
add    $0x420,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<serv_add_deny>:
push   %rbx
sub    $0x400,%rsp
call   1040 <normalize@plt>
lea    0xebc(%rip),%rdx
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    $0x400,%esi
mov    %rax,%rcx
call   1030 <snprintf@plt>
mov    %rbx,%rdi
mov    $0xffffffff,%esi
mov    $0x2,%edx
call   1050 <sflap_send@plt>
add    $0x400,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [16 x i8] c"toc_add_deny %s\00"
define void @serv_add_deny(i8* %0) {
%2 = alloca i8*
%3 = alloca [1024 x i8]
store i8* %0, i8** %2
%4 = getelementptr inbounds [1024 x i8], [1024 x i8]* %3, i64 0, i64 0
%5 = load i8*, i8** %2
%6 = call i8* @normalize(i8* %5)
%7 = call i32 @snprintf(i8* %4, i32 1024, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i8* %6)
%8 = getelementptr inbounds [1024 x i8], [1024 x i8]* %3, i64 0, i64 0
%9 = call i32 @sflap_send(i8* %8, i32 -1, i32 2)
ret void
}

LLVM IR (-O2):
@.str = [16 x i8] c"toc_add_deny %s\00"
define void @serv_add_deny(i8* %0) {
%2 = alloca [1024 x i8]
%3 = getelementptr inbounds [1024 x i8], [1024 x i8]* %2, i64 0, i64 0
%4 = tail call i8* @normalize(i8* %0)
%5 = call i32 @snprintf(i8* %3, i32 1024, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = call i32 @sflap_send(i8* %3, i32 -1, i32 2)
ret void
}
/* Variables and functions */
int imax(int, int /*<<< orphan*/);
int /*<<< orphan*/ imin(int, int);
int iclamp(int v, int minv, int maxv) { return imax(minv, imin(v, maxv)); }


x86 assembly (clang, -O0):
<iclamp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    -0xc(%rbp),%esi
call   1030 <imin@plt>
mov    -0x10(%rbp),%edi
mov    %eax,%esi
call   1040 <imax@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<iclamp>:
push   %rbx
mov    %esi,%ebx
mov    %edx,%esi
call   1030 <imin@plt>
mov    %ebx,%edi
mov    %eax,%esi
pop    %rbx
jmp    1040 <imax@plt>

LLVM IR (-O0):
define i32 @iclamp(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i32, i32* %5
%8 = load i32, i32* %4
%9 = load i32, i32* %6
%10 = call i32 @imin(i32 %8, i32 %9)
%11 = call i32 @imax(i32 %7, i32 %10)
ret i32 %11
}

LLVM IR (-O2):
define i32 @iclamp(i32 %0, i32 %1, i32 %2) {
%4 = tail call i32 @imin(i32 %0, i32 %2)
%5 = tail call i32 @imax(i32 %1, i32 %4)
ret i32 %5
}
void rop3_51_0_0(unsigned char *D, unsigned char S, unsigned char T) {
  unsigned char stk1;
  stk1 = ~S;
  *D = stk1;
}


x86 assembly (clang, -O0):
<rop3_51_0_0>:
push   %rbp
mov    %rsp,%rbp
mov    %dl,%al
mov    %sil,%cl
mov    %rdi,-0x8(%rbp)
mov    %cl,-0x9(%rbp)
mov    %al,-0xa(%rbp)
movzbl -0x9(%rbp),%eax
xor    $0xffffffff,%eax
mov    %al,-0xb(%rbp)
mov    -0xb(%rbp),%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<rop3_51_0_0>:
not    %sil
mov    %sil,(%rdi)
ret

LLVM IR (-O0):
define void @rop3_51_0_0(i8* %0, i8 zeroext %1, i8 zeroext %2) {
%4 = alloca i8*
%5 = alloca i8
%6 = alloca i8
%7 = alloca i8
store i8* %0, i8** %4
store i8 %1, i8* %5
store i8 %2, i8* %6
%8 = load i8, i8* %5
%9 = zext i8 %8 to i32
%10 = xor i32 %9, -1
%11 = trunc i32 %10 to i8
store i8 %11, i8* %7
%12 = load i8, i8* %7
%13 = load i8*, i8** %4
store i8 %12, i8* %13
ret void
}

LLVM IR (-O2):
define void @rop3_51_0_0(i8* nocapture writeonly %0, i8 zeroext %1, i8 zeroext %2) {
%4 = xor i8 %1, -1
store i8 %4, i8* %0
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *, int, int);
void exitfunc4(int status, void *arg) {
  printf("Executing exitfunc4 (status=%d, arg=%d)\n", status, (int)arg);
  exit((int)arg);
}


x86 assembly (clang, -O0):
<exitfunc4>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%esi
mov    -0x10(%rbp),%rax
mov    %eax,%edx
lea    0xec1(%rip),%rdi
call   1030 <printf@plt>
mov    -0x10(%rbp),%rax
mov    %eax,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<exitfunc4>:
push   %rbx
mov    %rsi,%rbx
mov    %edi,%esi
lea    0xed3(%rip),%rdi
mov    %ebx,%edx
call   1030 <printf@plt>
mov    %ebx,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [41 x i8] c"Executing exitfunc4 (status=%d, arg=%d)\0A\00"
define void @exitfunc4(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
store i32 %0, i32* %3
store i8* %1, i8** %4
%5 = load i32, i32* %3
%6 = load i8*, i8** %4
%7 = ptrtoint i8* %6 to i32
%8 = call i32 @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0), i32 %5, i32 %7)
%9 = load i8*, i8** %4
%10 = ptrtoint i8* %9 to i32
%11 = call i32 @exit(i32 %10)
unreachable
}

LLVM IR (-O2):
@.str = [41 x i8] c"Executing exitfunc4 (status=%d, arg=%d)\0A\00"
define void @exitfunc4(i32 %0, i8* %1) {
%3 = ptrtoint i8* %1 to i64
%4 = trunc i64 %3 to i32
%5 = tail call i32 @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0), i32 %0, i32 %4)
%6 = tail call i32 @exit(i32 %4)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ outb(int, int);
void habilitar_pic() {
  outb(0x20 + 1, 0x00);
  outb(0xA0 + 1, 0x00);
}


x86 assembly (clang, -O0):
<habilitar_pic>:
push   %rbp
mov    %rsp,%rbp
mov    $0x21,%edi
xor    %esi,%esi
call   1030 <outb@plt>
mov    $0xa1,%edi
xor    %esi,%esi
call   1030 <outb@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<habilitar_pic>:
push   %rax
mov    $0x21,%edi
xor    %esi,%esi
call   1030 <outb@plt>
mov    $0xa1,%edi
xor    %esi,%esi
pop    %rax
jmp    1030 <outb@plt>

LLVM IR (-O0):
define void @habilitar_pic() {
%1 = call i32 @outb(i32 33, i32 0)
%2 = call i32 @outb(i32 161, i32 0)
ret void
}

LLVM IR (-O2):
define void @habilitar_pic() {
%1 = tail call i32 @outb(i32 33, i32 0)
%2 = tail call i32 @outb(i32 161, i32 0)
ret void
}
int main() {
  int n = 10;
  int i, sum = 0;
  for (i = 1; i <= 10; i++) {
    sum += i;
  }
  return sum;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movl   $0xa,-0x8(%rbp)
movl   $0x0,-0x10(%rbp)
movl   $0x1,-0xc(%rbp)
cmpl   $0xa,-0xc(%rbp)
jg     1141 <main+0x41>
mov    -0xc(%rbp),%eax
add    -0x10(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1120 <main+0x20>
mov    -0x10(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
mov    $0x37,%eax
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 0, i32* %1
store i32 10, i32* %2
store i32 0, i32* %4
store i32 1, i32* %3
br label %5
5: ; preds = %12, %0
%6 = load i32, i32* %3
%7 = icmp sle i32 %6, 10
br i1 %7, label %8, label %15
8: ; preds = %5
%9 = load i32, i32* %3
%10 = load i32, i32* %4
%11 = add nsw i32 %10, %9
store i32 %11, i32* %4
br label %12
12: ; preds = %8
%13 = load i32, i32* %3
%14 = add nsw i32 %13, 1
store i32 %14, i32* %3
br label %5
15: ; preds = %5
%16 = load i32, i32* %4
ret i32 %16
}

LLVM IR (-O2):
define i32 @main() {
ret i32 55
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, float *);
void funTemF2C(void) {
  float tc;
  float tf;
  printf("enter tf ");
  scanf("%f", &tf);
  tc = 5 * (tf - 32) / 9;
  printf("tc is %f", tc);
}


x86 assembly (clang, -O0):
<funTemF2C>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xedd(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xedf(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
movss  -0x8(%rbp),%xmm1
movss  0xeb5(%rip),%xmm0
subss  %xmm0,%xmm1
movss  0xea5(%rip),%xmm0
mulss  %xmm1,%xmm0
movss  0xe95(%rip),%xmm1
divss  %xmm1,%xmm0
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xe92(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<funTemF2C>:
push   %rax
lea    0xee4(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xee6(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1040 <scanf@plt>
movss  0x4(%rsp),%xmm0
addss  0xeb2(%rip),%xmm0
mulss  0xeae(%rip),%xmm0
divss  0xeaa(%rip),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xead(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
pop    %rax
ret

LLVM IR (-O0):
@.str = [10 x i8] c"enter tf \00"
@.str.1 = [3 x i8] c"%f\00"
@.str.2 = [9 x i8] c"tc is %f\00"
define void @funTemF2C() {
%1 = alloca float
%2 = alloca float
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %2)
%5 = load float, float* %2
%6 = fsub float %5, 3.200000e+01
%7 = fmul float 5.000000e+00, %6
%8 = fdiv float %7, 9.000000e+00
store float %8, float* %1
%9 = load float, float* %1
%10 = fpext float %9 to double
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0), double %10)
ret void
}

LLVM IR (-O2):
@.str = [10 x i8] c"enter tf \00"
@.str.1 = [3 x i8] c"%f\00"
@.str.2 = [9 x i8] c"tc is %f\00"
define void @funTemF2C() {
%1 = alloca float
%2 = bitcast float* %1 to i8*
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %1)
%5 = load float, float* %1
%6 = fadd float %5, -3.200000e+01
%7 = fmul float %6, 5.000000e+00
%8 = fdiv float %7, 9.000000e+00
%9 = fpext float %8 to double
%10 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0), double %9)
ret void
}
/* Type definitions */
struct battle_char {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ add_status(struct battle_char *, int);
scalar_t__ get_random(int /*<<< orphan*/, int);
scalar_t__ mod6(struct battle_char *, struct battle_char *, int);
void protect(struct battle_char *origin, struct battle_char *target) {
  if (get_random(0, 100) < mod6(origin, target, 200))
    add_status(target, 23);
}


x86 assembly (clang, -O0):
<protect>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
xor    %edi,%edi
mov    $0x64,%esi
call   1030 <get_random@plt>
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    $0xc8,%edx
call   1040 <mod6@plt>
mov    %rax,%rcx
mov    -0x18(%rbp),%rax
cmp    %rcx,%rax
jge    1180 <protect+0x50>
mov    -0x10(%rbp),%rdi
mov    $0x17,%esi
call   1050 <add_status@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<protect>:
push   %r15
push   %r14
push   %rbx
mov    %rsi,%r14
mov    %rdi,%r15
xor    %edi,%edi
mov    $0x64,%esi
call   1030 <get_random@plt>
mov    %rax,%rbx
mov    %r15,%rdi
mov    %r14,%rsi
mov    $0xc8,%edx
call   1040 <mod6@plt>
cmp    %rax,%rbx
jge    1171 <protect+0x41>
mov    %r14,%rdi
mov    $0x17,%esi
pop    %rbx
pop    %r14
pop    %r15
jmp    1050 <add_status@plt>
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
%struct.battle_char = type { i32 }
define void @protect(%struct.battle_char* %0, %struct.battle_char* %1) {
%3 = alloca %struct.battle_char*
%4 = alloca %struct.battle_char*
store %struct.battle_char* %0, %struct.battle_char** %3
store %struct.battle_char* %1, %struct.battle_char** %4
%5 = call i64 @get_random(i32 0, i32 100)
%6 = load %struct.battle_char*, %struct.battle_char** %3
%7 = load %struct.battle_char*, %struct.battle_char** %4
%8 = call i64 @mod6(%struct.battle_char* %6, %struct.battle_char* %7, i32 200)
%9 = icmp slt i64 %5, %8
br i1 %9, label %10, label %13
10: ; preds = %2
%11 = load %struct.battle_char*, %struct.battle_char** %4
%12 = call i32 @add_status(%struct.battle_char* %11, i32 23)
br label %13
13: ; preds = %10, %2
ret void
}

LLVM IR (-O2):
%struct.battle_char = type { i32 }
define void @protect(%struct.battle_char* %0, %struct.battle_char* %1) {
%3 = tail call i64 @get_random(i32 0, i32 100)
%4 = tail call i64 @mod6(%struct.battle_char* %0, %struct.battle_char* %1, i32 200)
%5 = icmp slt i64 %3, %4
br i1 %5, label %6, label %8
6: ; preds = %2
%7 = tail call i32 @add_status(%struct.battle_char* %1, i32 23)
br label %8
8: ; preds = %6, %2
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ jmp_buf;

/* Variables and functions */
int /*<<< orphan*/ baz(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, ...);
int setjmp(int /*<<< orphan*/);
int main() {
  jmp_buf buf;
  int ret;
  printf("Inside main\n");
  if ((ret = setjmp(buf)) != 0) {
    printf("ret == %d\n", ret);
  } else {
    baz(buf);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x8(%rbp),%edi
call   1050 <setjmp@plt>
mov    %eax,-0xc(%rbp)
cmp    $0x0,%eax
je     1177 <main+0x47>
mov    -0xc(%rbp),%esi
lea    0xea2(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    117f <main+0x4f>
mov    -0x8(%rbp),%edi
call   1030 <baz@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xec3(%rip),%rdi
call   1040 <puts@plt>
call   1060 <setjmp@plt>
test   %eax,%eax
je     1168 <main+0x28>
mov    %eax,%esi
lea    0xea1(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
jmp    116d <main+0x2d>
call   1030 <baz@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [13 x i8] c"Inside main\0A\00"
@.str.1 = [11 x i8] c"ret == %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
%5 = load i32, i32* %2
%6 = call i32 @setjmp(i32 %5)
store i32 %6, i32* %3
%7 = icmp ne i32 %6, 0
br i1 %7, label %8, label %11
8: ; preds = %0
%9 = load i32, i32* %3
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i32 %9)
br label %14
11: ; preds = %0
%12 = load i32, i32* %2
%13 = call i32 @baz(i32 %12)
br label %14
14: ; preds = %11, %8
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [11 x i8] c"ret == %d\0A\00"
@str = [12 x i8] c"Inside main\00"
define i32 @main() {
%1 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @str, i64 0, i64 0))
%2 = call i32 @setjmp(i32 undef)
%3 = icmp eq i32 %2, 0
br i1 %3, label %6, label %4
4: ; preds = %0
%5 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i32 %2)
br label %8
6: ; preds = %0
%7 = call i32 @baz(i32 undef)
br label %8
8: ; preds = %6, %4
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ cha_exit(int, char *);
int /*<<< orphan*/ perror(char *);
void cha_perror(char *s) {
  cha_exit(-1, "");
  perror(s);
}


x86 assembly (clang, -O0):
<cha_perror>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0xffffffff,%edi
lea    0xec8(%rip),%rsi
call   1030 <cha_exit@plt>
mov    -0x8(%rbp),%rdi
call   1040 <perror@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cha_perror>:
push   %rbx
mov    %rdi,%rbx
lea    0xed5(%rip),%rsi
mov    $0xffffffff,%edi
call   1030 <cha_exit@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1040 <perror@plt>

LLVM IR (-O0):
@.str = [1 x i8] zeroinitializer
define void @cha_perror(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 @cha_exit(i32 -1, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
%4 = load i8*, i8** %2
%5 = call i32 @perror(i8* %4)
ret void
}

LLVM IR (-O2):
@.str = [1 x i8] zeroinitializer
define void @cha_perror(i8* nocapture %0) {
%2 = tail call i32 @cha_exit(i32 -1, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @perror(i8* %0)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
int /*<<< orphan*/ p264_pixel_avg_w4_mmxext(int /*<<< orphan*/ *, int,
                                            int /*<<< orphan*/ *, int,
                                            int /*<<< orphan*/ *, int, int);
void p264_pixel_avg_4x2_mmxext(uint8_t *dst, int i_dst, uint8_t *src,
                               int i_src) {
  p264_pixel_avg_w4_mmxext(dst, i_dst, dst, i_dst, src, i_src, 2);
}


x86 assembly (clang, -O0):
<p264_pixel_avg_4x2_mmxext>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x8(%rbp),%rdx
mov    -0xc(%rbp),%ecx
mov    -0x18(%rbp),%r8
mov    -0x1c(%rbp),%r9d
movl   $0x2,(%rsp)
call   1030 <p264_pixel_avg_w4_mmxext@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<p264_pixel_avg_4x2_mmxext>:
push   %rax
mov    %ecx,%r9d
mov    %rdx,%r8
movl   $0x2,(%rsp)
mov    %rdi,%rdx
mov    %esi,%ecx
call   1030 <p264_pixel_avg_w4_mmxext@plt>
pop    %rax
ret

LLVM IR (-O0):
define void @p264_pixel_avg_4x2_mmxext(i32* %0, i32 %1, i32* %2, i32 %3) {
%5 = alloca i32*
%6 = alloca i32
%7 = alloca i32*
%8 = alloca i32
store i32* %0, i32** %5
store i32 %1, i32* %6
store i32* %2, i32** %7
store i32 %3, i32* %8
%9 = load i32*, i32** %5
%10 = load i32, i32* %6
%11 = load i32*, i32** %5
%12 = load i32, i32* %6
%13 = load i32*, i32** %7
%14 = load i32, i32* %8
%15 = call i32 @p264_pixel_avg_w4_mmxext(i32* %9, i32 %10, i32* %11, i32 %12, i32* %13, i32 %14, i32 2)
ret void
}

LLVM IR (-O2):
define void @p264_pixel_avg_4x2_mmxext(i32* %0, i32 %1, i32* %2, i32 %3) {
%5 = tail call i32 @p264_pixel_avg_w4_mmxext(i32* %0, i32 %1, i32* %0, i32 %1, i32* %2, i32 %3, i32 2)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
int /*<<< orphan*/ burnstack(int);
int /*<<< orphan*/ do_x25519(int /*<<< orphan*/ *, int /*<<< orphan*/ const *,
                             int /*<<< orphan*/ const *);
void DH(uint8_t out[32], const uint8_t sec[32], const uint8_t point[32]) {
  do_x25519(out, sec, point);
  burnstack(2048);
}


x86 assembly (clang, -O0):
<DH>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1030 <do_x25519@plt>
mov    $0x800,%edi
call   1040 <burnstack@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<DH>:
push   %rax
call   1030 <do_x25519@plt>
mov    $0x800,%edi
pop    %rax
jmp    1040 <burnstack@plt>

LLVM IR (-O0):
define void @DH(i32* %0, i32* %1, i32* %2) {
%4 = alloca i32*
%5 = alloca i32*
%6 = alloca i32*
store i32* %0, i32** %4
store i32* %1, i32** %5
store i32* %2, i32** %6
%7 = load i32*, i32** %4
%8 = load i32*, i32** %5
%9 = load i32*, i32** %6
%10 = call i32 @do_x25519(i32* %7, i32* %8, i32* %9)
%11 = call i32 @burnstack(i32 2048)
ret void
}

LLVM IR (-O2):
define void @DH(i32* %0, i32* %1, i32* %2) {
%4 = tail call i32 @do_x25519(i32* %0, i32* %1, i32* %2)
%5 = tail call i32 @burnstack(i32 2048)
ret void
}
/* Variables and functions */
int SIGBUS;
int /*<<< orphan*/ STDOUT_FILENO;
int /*<<< orphan*/ _exit(int /*<<< orphan*/);
int /*<<< orphan*/ write(int /*<<< orphan*/, char *, int);
void sigbus_handler(int signum) {
  if (signum == SIGBUS) {
    write(STDOUT_FILENO, "SIGBUS triggered\n",
          sizeof("SIGBUS triggered\n") - 1);
    write(STDOUT_FILENO, "Test PASSED\n", sizeof("Test PASSED\n") - 1);
    _exit(0);
  }
}


x86 assembly (clang, -O0):
<sigbus_handler>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    0x2eb3(%rip),%rcx
cmp    (%rcx),%eax
jne    1178 <sigbus_handler+0x58>
mov    0x2eac(%rip),%rax
mov    (%rax),%edi
lea    0xeb3(%rip),%rsi
mov    $0x11,%edx
call   1040 <write@plt>
mov    0x2e92(%rip),%rax
mov    (%rax),%edi
lea    0xeab(%rip),%rsi
mov    $0xc,%edx
call   1040 <write@plt>
xor    %edi,%edi
call   1030 <_exit@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sigbus_handler>:
push   %rbx
mov    0x2ec0(%rip),%rax
cmp    %edi,(%rax)
je     112e <sigbus_handler+0xe>
pop    %rbx
ret
mov    0x2ebb(%rip),%rbx
mov    (%rbx),%edi
lea    0xec2(%rip),%rsi
mov    $0x11,%edx
call   1040 <write@plt>
mov    (%rbx),%edi
lea    0xec1(%rip),%rsi
mov    $0xc,%edx
call   1040 <write@plt>
xor    %edi,%edi
call   1030 <_exit@plt>

LLVM IR (-O0):
@SIGBUS = global i32 0
@STDOUT_FILENO = global i32 0
@.str = [18 x i8] c"SIGBUS triggered\0A\00"
@.str.1 = [13 x i8] c"Test PASSED\0A\00"
define void @sigbus_handler(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = load i32, i32* @SIGBUS
%5 = icmp eq i32 %3, %4
br i1 %5, label %6, label %12
6: ; preds = %1
%7 = load i32, i32* @STDOUT_FILENO
%8 = call i32 @write(i32 %7, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i32 17)
%9 = load i32, i32* @STDOUT_FILENO
%10 = call i32 @write(i32 %9, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), i32 12)
%11 = call i32 @_exit(i32 0)
unreachable
12: ; preds = %1
ret void
}

LLVM IR (-O2):
@SIGBUS = global i32 0
@STDOUT_FILENO = global i32 0
@.str = [18 x i8] c"SIGBUS triggered\0A\00"
@.str.1 = [13 x i8] c"Test PASSED\0A\00"
define void @sigbus_handler(i32 %0) {
%2 = load i32, i32* @SIGBUS
%3 = icmp eq i32 %2, %0
br i1 %3, label %4, label %10
4: ; preds = %1
%5 = load i32, i32* @STDOUT_FILENO
%6 = tail call i32 @write(i32 %5, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i32 17)
%7 = load i32, i32* @STDOUT_FILENO
%8 = tail call i32 @write(i32 %7, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), i32 12)
%9 = tail call i32 @_exit(i32 0)
unreachable
10: ; preds = %1
ret void
}
/* Variables and functions */
int check_number(char const *, char const *);
scalar_t__ errno;
scalar_t__ strtol(char const *, char **, int);
bool parse_int(const char **string, int *result) {
  errno = 0;
  const char *start = *string;
  char *end;
  *result = (int)strtol(start, &end, 10);
  *string = end;
  return check_number(start, *string);
}


x86 assembly (clang, -O0):
<parse_int>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2ea9(%rip),%rax
movq   $0x0,(%rax)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
lea    -0x20(%rbp),%rsi
mov    $0xa,%edx
call   1030 <strtol@plt>
mov    %eax,%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x20(%rbp),%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x18(%rbp),%rdi
mov    -0x8(%rbp),%rax
mov    (%rax),%rsi
call   1040 <check_number@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<parse_int>:
push   %r15
push   %r14
push   %rbx
sub    $0x10,%rsp
mov    %rsi,%r14
mov    %rdi,%r15
mov    0x2eaa(%rip),%rax
movq   $0x0,(%rax)
mov    (%rdi),%rbx
lea    0x8(%rsp),%rsi
mov    %rbx,%rdi
mov    $0xa,%edx
call   1030 <strtol@plt>
mov    %eax,(%r14)
mov    0x8(%rsp),%rsi
mov    %rsi,(%r15)
mov    %rbx,%rdi
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %r15
jmp    1040 <check_number@plt>

LLVM IR (-O0):
@errno = global i64 0
define i32 @parse_int(i8** %0, i32* %1) {
%3 = alloca i8**
%4 = alloca i32*
%5 = alloca i8*
%6 = alloca i8*
store i8** %0, i8*** %3
store i32* %1, i32** %4
store i64 0, i64* @errno
%7 = load i8**, i8*** %3
%8 = load i8*, i8** %7
store i8* %8, i8** %5
%9 = load i8*, i8** %5
%10 = call i64 @strtol(i8* %9, i8** %6, i32 10)
%11 = trunc i64 %10 to i32
%12 = load i32*, i32** %4
store i32 %11, i32* %12
%13 = load i8*, i8** %6
%14 = load i8**, i8*** %3
store i8* %13, i8** %14
%15 = load i8*, i8** %5
%16 = load i8**, i8*** %3
%17 = load i8*, i8** %16
%18 = call i32 @check_number(i8* %15, i8* %17)
ret i32 %18
}

LLVM IR (-O2):
@errno = global i64 0
define i32 @parse_int(i8** nocapture %0, i32* nocapture writeonly %1) {
%3 = alloca i8*
store i64 0, i64* @errno
%4 = load i8*, i8** %0
%5 = bitcast i8** %3 to i8*
%6 = call i64 @strtol(i8* %4, i8** %3, i32 10)
%7 = trunc i64 %6 to i32
store i32 %7, i32* %1
%8 = load i8*, i8** %3
store i8* %8, i8** %0
%9 = tail call i32 @check_number(i8* %4, i8* %8)
ret i32 %9
}
void *component_rock_alloc(void) {}


x86 assembly (clang, -O0):
<component_rock_alloc>:
push   %rbp
mov    %rsp,%rbp
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<component_rock_alloc>:
ret

LLVM IR (-O0):
define i8* @component_rock_alloc() {
%1 = alloca i8*
%2 = load i8*, i8** %1
ret i8* %2
}

LLVM IR (-O2):
define noalias i8* @component_rock_alloc() {
ret i8* undef
}
/* Variables and functions */
void stub1();
scalar_t__ y_or_n_p(char *);
void with_message_repeat(void (*f)(void), char *str) {
  do {
    (*f)();
  } while ((y_or_n_p(str)));
}


x86 assembly (clang, -O0):
<with_message_repeat>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
call   *-0x8(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <y_or_n_p@plt>
cmp    $0x0,%rax
jne    1120 <with_message_repeat+0x10>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<with_message_repeat>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
nopw   0x0(%rax,%rax,1)
call   *%rbx
mov    %r14,%rdi
call   1030 <y_or_n_p@plt>
test   %rax,%rax
jne    1120 <with_message_repeat+0x10>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @with_message_repeat(void ()* %0, i8* %1) {
%3 = alloca void ()*
%4 = alloca i8*
store void ()* %0, void ()** %3
store i8* %1, i8** %4
br label %5
5: ; preds = %7, %2
%6 = load void ()*, void ()** %3
br label %7
7: ; preds = %5
%8 = load i8*, i8** %4
%9 = call i64 @y_or_n_p(i8* %8)
%10 = icmp ne i64 %9, 0
br i1 %10, label %5, label %11
11: ; preds = %7
ret void
}

LLVM IR (-O2):
define void @with_message_repeat(void ()* nocapture %0, i8* %1) {
br label %3
3: ; preds = %3, %2
tail call void %0()
%4 = tail call i64 @y_or_n_p(i8* %1)
%5 = icmp eq i64 %4, 0
br i1 %5, label %6, label %3
6: ; preds = %3
ret void
}
/* Type definitions */
struct obs_output {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ do_output_signal(struct obs_output *, char *);
void signal_start(struct obs_output *output) {
  do_output_signal(output, "start");
}


x86 assembly (clang, -O0):
<signal_start>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xed9(%rip),%rsi
call   1030 <do_output_signal@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<signal_start>:
lea    0xee9(%rip),%rsi
jmp    1030 <do_output_signal@plt>

LLVM IR (-O0):
%struct.obs_output = type { i32 }
@.str = [6 x i8] c"start\00"
define void @signal_start(%struct.obs_output* %0) {
%2 = alloca %struct.obs_output*
store %struct.obs_output* %0, %struct.obs_output** %2
%3 = load %struct.obs_output*, %struct.obs_output** %2
%4 = call i32 @do_output_signal(%struct.obs_output* %3, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
%struct.obs_output = type { i32 }
@.str = [6 x i8] c"start\00"
define void @signal_start(%struct.obs_output* %0) {
%2 = tail call i32 @do_output_signal(%struct.obs_output* %0, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
ret void
}
void GUI_HudDraw() {}


x86 assembly (clang, -O0):
<GUI_HudDraw>:
push   %rbp
mov    %rsp,%rbp
pop    %rbp
ret

x86 assembly (clang, -O2):
<GUI_HudDraw>:
ret

LLVM IR (-O0):
define void @GUI_HudDraw() {
ret void
}

LLVM IR (-O2):
define void @GUI_HudDraw() {
ret void
}
double Zero() { return 0.0; }


x86 assembly (clang, -O0):
<Zero>:
push   %rbp
mov    %rsp,%rbp
xorps  %xmm0,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<Zero>:
xorps  %xmm0,%xmm0
ret

LLVM IR (-O0):
define double @Zero() {
ret double 0.000000e+00
}

LLVM IR (-O2):
define double @Zero() {
ret double 0.000000e+00
}
/* Variables and functions */
scalar_t__ RAND_MAX;
double rand();
int /*<<< orphan*/ sleep(int);
void sleep_random_123() {
  double raw_rand_sleep;
  int rand_sleep;
  raw_rand_sleep = rand() / (double)RAND_MAX;
  rand_sleep = 1 + ((int)(raw_rand_sleep * 3));
  sleep(rand_sleep);
}


x86 assembly (clang, -O0):
<sleep_random_123>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1040 <rand@plt>
mov    0x2eb2(%rip),%rax
cvtsi2sdq (%rax),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  0xeb4(%rip),%xmm0
mulsd  -0x8(%rbp),%xmm0
cvttsd2si %xmm0,%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%edi
call   1030 <sleep@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sleep_random_123>:
push   %rax
xor    %eax,%eax
call   1040 <rand@plt>
mov    0x2eb9(%rip),%rax
cvtsi2sdq (%rax),%xmm1
divsd  %xmm1,%xmm0
mulsd  0xec0(%rip),%xmm0
cvttsd2si %xmm0,%edi
add    $0x1,%edi
pop    %rax
jmp    1030 <sleep@plt>

LLVM IR (-O0):
@RAND_MAX = global i64 0
define void @sleep_random_123() {
%1 = alloca double
%2 = alloca i32
%3 = call double (...) @rand()
%4 = load i64, i64* @RAND_MAX
%5 = sitofp i64 %4 to double
%6 = fdiv double %3, %5
store double %6, double* %1
%7 = load double, double* %1
%8 = fmul double %7, 3.000000e+00
%9 = fptosi double %8 to i32
%10 = add nsw i32 1, %9
store i32 %10, i32* %2
%11 = load i32, i32* %2
%12 = call i32 @sleep(i32 %11)
ret void
}

LLVM IR (-O2):
@RAND_MAX = global i64 0
define void @sleep_random_123() {
%1 = tail call double (...) @rand()
%2 = load i64, i64* @RAND_MAX
%3 = sitofp i64 %2 to double
%4 = fdiv double %1, %3
%5 = fmul double %4, 3.000000e+00
%6 = fptosi double %5 to i32
%7 = add nsw i32 %6, 1
%8 = tail call i32 @sleep(i32 %7)
ret void
}
double remainer(double x, double y) {
  double result;
  return result;
}


x86 assembly (clang, -O0):
<remainer>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x18(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<remainer>:
ret

LLVM IR (-O0):
define double @remainer(double %0, double %1) {
%3 = alloca double
%4 = alloca double
%5 = alloca double
store double %0, double* %3
store double %1, double* %4
%6 = load double, double* %5
ret double %6
}

LLVM IR (-O2):
define double @remainer(double %0, double %1) {
ret double undef
}
int got_response_handler() { return 0; }


x86 assembly (clang, -O0):
<got_response_handler>:
push   %rbp
mov    %rsp,%rbp
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<got_response_handler>:
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @got_response_handler() {
ret i32 0
}

LLVM IR (-O2):
define i32 @got_response_handler() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ fsleep(double);
scalar_t__ lloyd_bgm_is_playing();
int /*<<< orphan*/ lloyd_bgm_start(char *);
int /*<<< orphan*/ lloyd_close();
int /*<<< orphan*/ lloyd_init();
int /*<<< orphan*/ lloyd_update();
int main() {
  lloyd_init();
  lloyd_bgm_start("bgm0001.ogg");
  while (lloyd_bgm_is_playing()) {
    fsleep(0.01);
    lloyd_update();
  }
  lloyd_close();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1060 <lloyd_init@plt>
lea    0xe8b(%rip),%rdi
call   1080 <lloyd_bgm_start@plt>
mov    $0x0,%al
call   1030 <lloyd_bgm_is_playing@plt>
cmp    $0x0,%rax
je     11ac <main+0x4c>
movsd  0xe65(%rip),%xmm0
call   1070 <fsleep@plt>
mov    $0x0,%al
call   1040 <lloyd_update@plt>
jmp    1182 <main+0x22>
mov    $0x0,%al
call   1050 <lloyd_close@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1060 <lloyd_init@plt>
lea    0xe99(%rip),%rdi
call   1080 <lloyd_bgm_start@plt>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
xor    %eax,%eax
call   1030 <lloyd_bgm_is_playing@plt>
test   %rax,%rax
je     11a2 <main+0x42>
movsd  0xe6c(%rip),%xmm0
call   1070 <fsleep@plt>
xor    %eax,%eax
call   1040 <lloyd_update@plt>
jmp    1180 <main+0x20>
xor    %eax,%eax
call   1050 <lloyd_close@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [12 x i8] c"bgm0001.ogg\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @lloyd_init()
%3 = call i32 @lloyd_bgm_start(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
br label %4
4: ; preds = %7, %0
%5 = call i64 (...) @lloyd_bgm_is_playing()
%6 = icmp ne i64 %5, 0
br i1 %6, label %7, label %10
7: ; preds = %4
%8 = call i32 @fsleep(double 1.000000e-02)
%9 = call i32 (...) @lloyd_update()
br label %4
10: ; preds = %4
%11 = call i32 (...) @lloyd_close()
ret i32 0
}

LLVM IR (-O2):
@.str = [12 x i8] c"bgm0001.ogg\00"
define i32 @main() {
%1 = tail call i32 (...) @lloyd_init()
%2 = tail call i32 @lloyd_bgm_start(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%3 = tail call i64 (...) @lloyd_bgm_is_playing()
%4 = icmp eq i64 %3, 0
br i1 %4, label %10, label %5
5: ; preds = %0, %5
%6 = tail call i32 @fsleep(double 1.000000e-02)
%7 = tail call i32 (...) @lloyd_update()
%8 = tail call i64 (...) @lloyd_bgm_is_playing()
%9 = icmp eq i64 %8, 0
br i1 %9, label %10, label %5
10: ; preds = %5, %0
%11 = tail call i32 (...) @lloyd_close()
ret i32 0
}
unsigned lmin(unsigned *x) {
  unsigned minsofar = x[0], mini = 0, i = 0;
  while (x[i]) {
    if (x[i] < minsofar) {
      minsofar = x[i];
      mini = i;
    }
    i++;
  }
  return mini;
}


x86 assembly (clang, -O0):
<lmin>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x14(%rbp),%ecx
cmpl   $0x0,(%rax,%rcx,4)
je     1164 <lmin+0x64>
mov    -0x8(%rbp),%rax
mov    -0x14(%rbp),%ecx
mov    (%rax,%rcx,4),%eax
cmp    -0xc(%rbp),%eax
jae    1156 <lmin+0x56>
mov    -0x8(%rbp),%rax
mov    -0x14(%rbp),%ecx
mov    (%rax,%rcx,4),%eax
mov    %eax,-0xc(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    111f <lmin+0x1f>
mov    -0x10(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<lmin>:
mov    (%rdi),%ecx
xor    %eax,%eax
test   %ecx,%ecx
je     1129 <lmin+0x29>
mov    $0x1,%edx
mov    %ecx,%esi
nop
lea    -0x1(%rdx),%r8d
cmp    %esi,%ecx
cmovb  %ecx,%esi
cmovb  %r8d,%eax
mov    %edx,%ecx
mov    (%rdi,%rcx,4),%ecx
add    $0x1,%edx
test   %ecx,%ecx
jne    1110 <lmin+0x10>
ret

LLVM IR (-O0):
define i32 @lmin(i32* %0) {
%2 = alloca i32*
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32* %0, i32** %2
%6 = load i32*, i32** %2
%7 = getelementptr inbounds i32, i32* %6, i64 0
%8 = load i32, i32* %7
store i32 %8, i32* %3
store i32 0, i32* %4
store i32 0, i32* %5
br label %9
9: ; preds = %31, %1
%10 = load i32*, i32** %2
%11 = load i32, i32* %5
%12 = zext i32 %11 to i64
%13 = getelementptr inbounds i32, i32* %10, i64 %12
%14 = load i32, i32* %13
%15 = icmp ne i32 %14, 0
br i1 %15, label %16, label %34
16: ; preds = %9
%17 = load i32*, i32** %2
%18 = load i32, i32* %5
%19 = zext i32 %18 to i64
%20 = getelementptr inbounds i32, i32* %17, i64 %19
%21 = load i32, i32* %20
%22 = load i32, i32* %3
%23 = icmp ult i32 %21, %22
br i1 %23, label %24, label %31
24: ; preds = %16
%25 = load i32*, i32** %2
%26 = load i32, i32* %5
%27 = zext i32 %26 to i64
%28 = getelementptr inbounds i32, i32* %25, i64 %27
%29 = load i32, i32* %28
store i32 %29, i32* %3
%30 = load i32, i32* %5
store i32 %30, i32* %4
br label %31
31: ; preds = %24, %16
%32 = load i32, i32* %5
%33 = add i32 %32, 1
store i32 %33, i32* %5
br label %9
34: ; preds = %9
%35 = load i32, i32* %4
ret i32 %35
}

LLVM IR (-O2):
define i32 @lmin(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = icmp eq i32 %2, 0
br i1 %3, label %17, label %4
4: ; preds = %1, %4
%5 = phi i32 [ %15, %4 ], [ %2, %1 ]
%6 = phi i32 [ %12, %4 ], [ 0, %1 ]
%7 = phi i32 [ %11, %4 ], [ 0, %1 ]
%8 = phi i32 [ %10, %4 ], [ %2, %1 ]
%9 = icmp ult i32 %5, %8
%10 = select i1 %9, i32 %5, i32 %8
%11 = select i1 %9, i32 %6, i32 %7
%12 = add i32 %6, 1
%13 = zext i32 %12 to i64
%14 = getelementptr inbounds i32, i32* %0, i64 %13
%15 = load i32, i32* %14
%16 = icmp eq i32 %15, 0
br i1 %16, label %17, label %4
17: ; preds = %4, %1
%18 = phi i32 [ 0, %1 ], [ %11, %4 ]
ret i32 %18
}
int Q_tolower(int c) {
  if (((c) >= 'A' && (c) <= 'Z')) {
    c += ('a' - 'A');
  }
  return c;
}


x86 assembly (clang, -O0):
<Q_tolower>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x41,-0x4(%rbp)
jl     1124 <Q_tolower+0x24>
cmpl   $0x5a,-0x4(%rbp)
jg     1124 <Q_tolower+0x24>
mov    -0x4(%rbp),%eax
add    $0x20,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<Q_tolower>:
lea    -0x41(%rdi),%ecx
lea    0x20(%rdi),%eax
cmp    $0x1a,%ecx
cmovae %edi,%eax
ret

LLVM IR (-O0):
define i32 @Q_tolower(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp sge i32 %3, 65
br i1 %4, label %5, label %11
5: ; preds = %1
%6 = load i32, i32* %2
%7 = icmp sle i32 %6, 90
br i1 %7, label %8, label %11
8: ; preds = %5
%9 = load i32, i32* %2
%10 = add nsw i32 %9, 32
store i32 %10, i32* %2
br label %11
11: ; preds = %8, %5, %1
%12 = load i32, i32* %2
ret i32 %12
}

LLVM IR (-O2):
define i32 @Q_tolower(i32 %0) {
%2 = add i32 %0, -65
%3 = icmp ult i32 %2, 26
%4 = add nsw i32 %0, 32
%5 = select i1 %3, i32 %4, i32 %0
ret i32 %5
}
int raspberry_snprintf(char *format, ...) { return 0; }


x86 assembly (clang, -O0):
<raspberry_snprintf>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<raspberry_snprintf>:
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @raspberry_snprintf(i8* %0, ...) {
%2 = alloca i8*
store i8* %0, i8** %2
ret i32 0
}

LLVM IR (-O2):
define i32 @raspberry_snprintf(i8* nocapture readnone %0, ...) {
ret i32 0
}