xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *);
void usage() {
  printf("tree_test [-q QUERIES] DATASET.dat\n"
         "          [UPDATE1.dat] ... [UPDATEn.dat]\n");
  exit(-1);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
mov    $0xffffffff,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
mov    $0xffffffff,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [78 x i8] c"tree_test [-q QUERIES] DATASET.dat\0A [UPDATE1.dat] ... [UPDATEn.dat]\0A\00"
define void @usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([78 x i8], [78 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @exit(i32 -1)
unreachable
}

LLVM IR (-O2):
@str = [77 x i8] c"tree_test [-q QUERIES] DATASET.dat\0A [UPDATE1.dat] ... [UPDATEn.dat]\00"
define void @usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([77 x i8], [77 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @exit(i32 -1)
unreachable
}
/* Variables and functions */
scalar_t__ strcasecmp(char *, char *);
char *strrchr(char *, char);
int has_extension(char *file_name, char *ext) {
  char *pos = strrchr(file_name, '.');
  if (pos && pos > file_name)
    return strcasecmp(pos + 1, ext) ? 0 : 1;
  return 0;
}


x86 assembly (clang, -O0):
<has_extension>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
mov    $0x2e,%esi
call   1040 <strrchr@plt>
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
je     1185 <has_extension+0x65>
mov    -0x20(%rbp),%rax
cmp    -0x10(%rbp),%rax
jbe    1185 <has_extension+0x65>
mov    -0x20(%rbp),%rdi
add    $0x1,%rdi
mov    -0x18(%rbp),%rsi
call   1030 <strcasecmp@plt>
mov    %rax,%rdx
mov    $0x1,%eax
xor    %ecx,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
mov    %eax,-0x4(%rbp)
jmp    118c <has_extension+0x6c>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<has_extension>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
mov    $0x2e,%esi
call   1040 <strrchr@plt>
mov    %rax,%rdi
xor    %eax,%eax
cmp    %rbx,%rdi
jbe    1155 <has_extension+0x35>
add    $0x1,%rdi
mov    %r14,%rsi
call   1030 <strcasecmp@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
sete   %al
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i32 @has_extension(i8* %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8*
store i8* %0, i8** %4
store i8* %1, i8** %5
%7 = load i8*, i8** %4
%8 = call i8* @strrchr(i8* %7, i8 signext 46)
store i8* %8, i8** %6
%9 = load i8*, i8** %6
%10 = icmp ne i8* %9, null
br i1 %10, label %11, label %23
11: ; preds = %2
%12 = load i8*, i8** %6
%13 = load i8*, i8** %4
%14 = icmp ugt i8* %12, %13
br i1 %14, label %15, label %23
15: ; preds = %11
%16 = load i8*, i8** %6
%17 = getelementptr inbounds i8, i8* %16, i64 1
%18 = load i8*, i8** %5
%19 = call i64 @strcasecmp(i8* %17, i8* %18)
%20 = icmp ne i64 %19, 0
%21 = zext i1 %20 to i64
%22 = select i1 %20, i32 0, i32 1
store i32 %22, i32* %3
br label %24
23: ; preds = %11, %2
store i32 0, i32* %3
br label %24
24: ; preds = %23, %15
%25 = load i32, i32* %3
ret i32 %25
}

LLVM IR (-O2):
define i32 @has_extension(i8* %0, i8* nocapture %1) {
%3 = tail call i8* @strrchr(i8* dereferenceable(1) %0, i8 signext 46)
%4 = icmp ugt i8* %3, %0
br i1 %4, label %5, label %10
5: ; preds = %2
%6 = getelementptr inbounds i8, i8* %3, i64 1
%7 = tail call i64 @strcasecmp(i8* %6, i8* %1)
%8 = icmp eq i64 %7, 0
%9 = zext i1 %8 to i32
br label %10
10: ; preds = %2, %5
%11 = phi i32 [ %9, %5 ], [ 0, %2 ]
ret i32 %11
}
char tk_lang_c_single_comment_end(void) { return '\n'; }


x86 assembly (clang, -O0):
<tk_lang_c_single_comment_end>:
push   %rbp
mov    %rsp,%rbp
mov    $0xa,%al
movsbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<tk_lang_c_single_comment_end>:
mov    $0xa,%al
ret

LLVM IR (-O0):
define signext i8 @tk_lang_c_single_comment_end() {
ret i8 10
}

LLVM IR (-O2):
define signext i8 @tk_lang_c_single_comment_end() {
ret i8 10
}
int test_imm_E7uint32_mem(unsigned int *val) {
  return ((*val) & (0xE7 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_E7uint32_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%edx
and    $0xe7,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_E7uint32_mem>:
testb  $0xe7,(%rdi)
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_E7uint32_mem(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = load i32, i32* %3
%5 = and i32 %4, 231
%6 = icmp ne i32 %5, 0
%7 = zext i1 %6 to i64
%8 = select i1 %6, i32 -20, i32 -40
ret i32 %8
}

LLVM IR (-O2):
define i32 @test_imm_E7uint32_mem(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = and i32 %2, 231
%4 = icmp eq i32 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ assert(char const *);
int /*<<< orphan*/ debug(int, char *);
int /*<<< orphan*/ exit(int);
char *strdup(char const *);
char *xstrdup(char const *str) {
  char *ret;
  assert(str);
  ret = strdup(str);
  if (!ret) {
    debug(1, "strdup failed");
    exit(1);
  }
  return ret;
}


x86 assembly (clang, -O0):
<xstrdup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <assert@plt>
mov    -0x8(%rbp),%rdi
call   1060 <strdup@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1188 <xstrdup+0x48>
mov    $0x1,%edi
lea    0xe87(%rip),%rsi
call   1030 <debug@plt>
mov    $0x1,%edi
call   1050 <exit@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xstrdup>:
push   %rbx
mov    %rdi,%rbx
call   1040 <assert@plt>
mov    %rbx,%rdi
call   1060 <strdup@plt>
test   %rax,%rax
je     1158 <xstrdup+0x18>
pop    %rbx
ret
lea    0xea1(%rip),%rsi
mov    $0x1,%edi
call   1030 <debug@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [14 x i8] c"strdup failed\00"
define i8* @xstrdup(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i32 @assert(i8* %4)
%6 = load i8*, i8** %2
%7 = call i8* @strdup(i8* %6)
store i8* %7, i8** %3
%8 = load i8*, i8** %3
%9 = icmp ne i8* %8, null
br i1 %9, label %13, label %10
10: ; preds = %1
%11 = call i32 @debug(i32 1, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%12 = call i32 @exit(i32 1)
unreachable
13: ; preds = %1
%14 = load i8*, i8** %3
ret i8* %14
}

LLVM IR (-O2):
@.str = [14 x i8] c"strdup failed\00"
define noalias i8* @xstrdup(i8* %0) {
%2 = tail call i32 @assert(i8* %0)
%3 = tail call i8* @strdup(i8* %0)
%4 = icmp eq i8* %3, null
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = tail call i32 @debug(i32 1, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%7 = tail call i32 @exit(i32 1)
unreachable
8: ; preds = %1
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ fr_chip_write(int, int);
int /*<<< orphan*/ fr_wait_toggle_bit(int /*<<< orphan*/);
void fr_chip_erase(void) {
  fr_chip_write(0x5555, 0xAA);
  fr_chip_write(0x2AAA, 0x55);
  fr_chip_write(0x5555, 0x80);
  fr_chip_write(0x5555, 0xAA);
  fr_chip_write(0x2AAA, 0x55);
  fr_chip_write(0x5555, 0x10);
  fr_wait_toggle_bit(0);
}


x86 assembly (clang, -O0):
<fr_chip_erase>:
push   %rbp
mov    %rsp,%rbp
mov    $0x5555,%edi
mov    $0xaa,%esi
call   1040 <fr_chip_write@plt>
mov    $0x2aaa,%edi
mov    $0x55,%esi
call   1040 <fr_chip_write@plt>
mov    $0x5555,%edi
mov    $0x80,%esi
call   1040 <fr_chip_write@plt>
mov    $0x5555,%edi
mov    $0xaa,%esi
call   1040 <fr_chip_write@plt>
mov    $0x2aaa,%edi
mov    $0x55,%esi
call   1040 <fr_chip_write@plt>
mov    $0x5555,%edi
mov    $0x10,%esi
call   1040 <fr_chip_write@plt>
xor    %edi,%edi
call   1030 <fr_wait_toggle_bit@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<fr_chip_erase>:
push   %rax
mov    $0x5555,%edi
mov    $0xaa,%esi
call   1040 <fr_chip_write@plt>
mov    $0x2aaa,%edi
mov    $0x55,%esi
call   1040 <fr_chip_write@plt>
mov    $0x5555,%edi
mov    $0x80,%esi
call   1040 <fr_chip_write@plt>
mov    $0x5555,%edi
mov    $0xaa,%esi
call   1040 <fr_chip_write@plt>
mov    $0x2aaa,%edi
mov    $0x55,%esi
call   1040 <fr_chip_write@plt>
mov    $0x5555,%edi
mov    $0x10,%esi
call   1040 <fr_chip_write@plt>
xor    %edi,%edi
pop    %rax
jmp    1030 <fr_wait_toggle_bit@plt>

LLVM IR (-O0):
define void @fr_chip_erase() {
%1 = call i32 @fr_chip_write(i32 21845, i32 170)
%2 = call i32 @fr_chip_write(i32 10922, i32 85)
%3 = call i32 @fr_chip_write(i32 21845, i32 128)
%4 = call i32 @fr_chip_write(i32 21845, i32 170)
%5 = call i32 @fr_chip_write(i32 10922, i32 85)
%6 = call i32 @fr_chip_write(i32 21845, i32 16)
%7 = call i32 @fr_wait_toggle_bit(i32 0)
ret void
}

LLVM IR (-O2):
define void @fr_chip_erase() {
%1 = tail call i32 @fr_chip_write(i32 21845, i32 170)
%2 = tail call i32 @fr_chip_write(i32 10922, i32 85)
%3 = tail call i32 @fr_chip_write(i32 21845, i32 128)
%4 = tail call i32 @fr_chip_write(i32 21845, i32 170)
%5 = tail call i32 @fr_chip_write(i32 10922, i32 85)
%6 = tail call i32 @fr_chip_write(i32 21845, i32 16)
%7 = tail call i32 @fr_wait_toggle_bit(i32 0)
ret void
}
void pthread_exit(void *value_ptr) {}


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

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

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

LLVM IR (-O2):
define void @pthread_exit(i8* nocapture %0) {
ret void
}
void avformat_network_deinit() {}


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

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

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

LLVM IR (-O2):
define void @avformat_network_deinit() {
ret void
}
int cairo_code_draw_pwrdecaycLabel_get_height() { return 123; }


x86 assembly (clang, -O0):
<cairo_code_draw_pwrdecaycLabel_get_height>:
push   %rbp
mov    %rsp,%rbp
mov    $0x7b,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @cairo_code_draw_pwrdecaycLabel_get_height() {
ret i32 123
}

LLVM IR (-O2):
define i32 @cairo_code_draw_pwrdecaycLabel_get_height() {
ret i32 123
}
/* Variables and functions */
int get_res(char *);
int /*<<< orphan*/ set_crmode();
int /*<<< orphan*/ tty_mode(int);
int main() {
  int res;
  tty_mode(0);
  set_crmode();
  res = get_res("Game");
  tty_mode(1);
  return res;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
xor    %edi,%edi
call   1050 <tty_mode@plt>
mov    $0x0,%al
call   1040 <set_crmode@plt>
lea    0xeac(%rip),%rdi
call   1030 <get_res@plt>
mov    %eax,-0x8(%rbp)
mov    $0x1,%edi
call   1050 <tty_mode@plt>
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %edi,%edi
call   1050 <tty_mode@plt>
xor    %eax,%eax
call   1040 <set_crmode@plt>
lea    0xeba(%rip),%rdi
call   1030 <get_res@plt>
mov    %eax,%ebx
mov    $0x1,%edi
call   1050 <tty_mode@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [5 x i8] c"Game\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 @tty_mode(i32 0)
%4 = call i32 (...) @set_crmode()
%5 = call i32 @get_res(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
store i32 %5, i32* %2
%6 = call i32 @tty_mode(i32 1)
%7 = load i32, i32* %2
ret i32 %7
}

LLVM IR (-O2):
@.str = [5 x i8] c"Game\00"
define i32 @main() {
%1 = tail call i32 @tty_mode(i32 0)
%2 = tail call i32 (...) @set_crmode()
%3 = tail call i32 @get_res(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%4 = tail call i32 @tty_mode(i32 1)
ret i32 %3
}
int uppercase(int c) {
  if (c >= 'a' && c <= 'z') {
    c -= 32;
  }
  return c;
}


x86 assembly (clang, -O0):
<uppercase>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x61,-0x4(%rbp)
jl     1124 <uppercase+0x24>
cmpl   $0x7a,-0x4(%rbp)
jg     1124 <uppercase+0x24>
mov    -0x4(%rbp),%eax
sub    $0x20,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @uppercase(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp sge i32 %3, 97
br i1 %4, label %5, label %11
5: ; preds = %1
%6 = load i32, i32* %2
%7 = icmp sle i32 %6, 122
br i1 %7, label %8, label %11
8: ; preds = %5
%9 = load i32, i32* %2
%10 = sub 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 @uppercase(i32 %0) {
%2 = add i32 %0, -97
%3 = icmp ult i32 %2, 26
%4 = add nsw i32 %0, -32
%5 = select i1 %3, i32 %4, i32 %0
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ write_call(int);
void write_call_table(void) {
  int i;
  for (i = 0; i < 99; i++)
    write_call(i);
}


x86 assembly (clang, -O0):
<write_call_table>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
cmpl   $0x63,-0x4(%rbp)
jge    113f <write_call_table+0x2f>
mov    -0x4(%rbp),%edi
call   1030 <write_call@plt>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    111f <write_call_table+0xf>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<write_call_table>:
push   %rbx
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %ebx,%edi
call   1030 <write_call@plt>
add    $0x1,%ebx
cmp    $0x63,%ebx
jne    1120 <write_call_table+0x10>
pop    %rbx
ret

LLVM IR (-O0):
define void @write_call_table() {
%1 = alloca i32
store i32 0, i32* %1
br label %2
2: ; preds = %8, %0
%3 = load i32, i32* %1
%4 = icmp slt i32 %3, 99
br i1 %4, label %5, label %11
5: ; preds = %2
%6 = load i32, i32* %1
%7 = call i32 @write_call(i32 %6)
br label %8
8: ; preds = %5
%9 = load i32, i32* %1
%10 = add nsw i32 %9, 1
store i32 %10, i32* %1
br label %2
11: ; preds = %2
ret void
}

LLVM IR (-O2):
define void @write_call_table() {
br label %1
1: ; preds = %0, %1
%2 = phi i32 [ 0, %0 ], [ %4, %1 ]
%3 = tail call i32 @write_call(i32 %2)
%4 = add nuw nsw i32 %2, 1
%5 = icmp eq i32 %4, 99
br i1 %5, label %6, label %1
6: ; preds = %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void bar() { printf("inside bar \n"); }


x86 assembly (clang, -O0):
<bar>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
call   1030 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<bar>:
lea    0xee9(%rip),%rdi
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [13 x i8] c"inside bar \0A\00"
define void @bar() {
%1 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [12 x i8] c"inside bar \00"
define void @bar() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @str, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef scalar_t__ uint8_t;
typedef int uint16_t;
typedef int /*<<< orphan*/ p;

/* Variables and functions */
uint16_t libcperciva_be16dec(const void *pp) {
  const uint8_t *p = (uint8_t const *)pp;
  return (uint16_t)((uint16_t)(p[1]) + ((uint16_t)(p[0]) << 8));
}


x86 assembly (clang, -O0):
<libcperciva_be16dec>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rax
mov    -0x10(%rbp),%rcx
mov    (%rcx),%rcx
shl    $0x8,%ecx
add    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<libcperciva_be16dec>:
mov    (%rdi),%eax
shl    $0x8,%eax
add    0x8(%rdi),%eax
ret

LLVM IR (-O0):
define i32 @libcperciva_be16dec(i8* %0) {
%2 = alloca i8*
%3 = alloca i64*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = bitcast i8* %4 to i64*
store i64* %5, i64** %3
%6 = load i64*, i64** %3
%7 = getelementptr inbounds i64, i64* %6, i64 1
%8 = load i64, i64* %7
%9 = trunc i64 %8 to i32
%10 = load i64*, i64** %3
%11 = getelementptr inbounds i64, i64* %10, i64 0
%12 = load i64, i64* %11
%13 = trunc i64 %12 to i32
%14 = shl i32 %13, 8
%15 = add nsw i32 %9, %14
ret i32 %15
}

LLVM IR (-O2):
define i32 @libcperciva_be16dec(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = getelementptr inbounds i8, i8* %0, i64 8
%4 = bitcast i8* %3 to i64*
%5 = load i64, i64* %4
%6 = trunc i64 %5 to i32
%7 = load i64, i64* %2
%8 = trunc i64 %7 to i32
%9 = shl i32 %8, 8
%10 = add nsw i32 %9, %6
ret i32 %10
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  scalar_t__ display;
};
typedef TYPE_1__ XAnyEvent;

/* Variables and functions */
void *get_XAnyEvent_display(void *_p) {
  return (void *)((XAnyEvent *)_p)->display;
}


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

x86 assembly (clang, -O2):
<get_XAnyEvent_display>:
mov    (%rdi),%rax
ret

LLVM IR (-O0):
%struct.TYPE_2__ = type { i64 }
define i8* @get_XAnyEvent_display(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = bitcast i8* %3 to %struct.TYPE_2__*
%5 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %4, i32 0, i32 0
%6 = load i64, i64* %5
%7 = inttoptr i64 %6 to i8*
ret i8* %7
}

LLVM IR (-O2):
define i8* @get_XAnyEvent_display(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
%4 = inttoptr i64 %3 to i8*
ret i8* %4
}
/* Type definitions */
struct db_table {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ db_table_free(struct db_table *);
void db_table_finish(struct db_table *rt) { db_table_free(rt); }


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

x86 assembly (clang, -O2):
<db_table_finish>:
jmp    1030 <db_table_free@plt>

LLVM IR (-O0):
%struct.db_table = type { i32 }
define void @db_table_finish(%struct.db_table* %0) {
%2 = alloca %struct.db_table*
store %struct.db_table* %0, %struct.db_table** %2
%3 = load %struct.db_table*, %struct.db_table** %2
%4 = call i32 @db_table_free(%struct.db_table* %3)
ret void
}

LLVM IR (-O2):
%struct.db_table = type { i32 }
define void @db_table_finish(%struct.db_table* %0) {
%2 = tail call i32 @db_table_free(%struct.db_table* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
void Error(char *s) {
  fprintf(stderr, "%s\n", s);
  exit(1);
}


x86 assembly (clang, -O0):
<Error>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ead(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xec0(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<Error>:
push   %rax
mov    %rdi,%rdx
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

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

LLVM IR (-O2):
@stderr = global i32 0
@.str = [4 x i8] c"%s\0A\00"
define void @Error(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = tail call i32 @exit(i32 1)
unreachable
}
void thermo_leave_powersave(void) { ; }


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

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

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

LLVM IR (-O2):
define void @thermo_leave_powersave() {
ret void
}
/* Type definitions */
struct ptr_valid_batch {
  int dummy;
};

/* Variables and functions */
int ptr_valid_batch(struct ptr_valid_batch *, void *, size_t, size_t, int);
bool ptr_valid_batch_w(struct ptr_valid_batch *batch, void *p, size_t align,
                       size_t size) {
  return ptr_valid_batch(batch, p, align, size, true);
}


x86 assembly (clang, -O0):
<ptr_valid_batch_w>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    $0x1,%r8d
call   1030 <ptr_valid_batch@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ptr_valid_batch_w>:
mov    $0x1,%r8d
jmp    1030 <ptr_valid_batch@plt>

LLVM IR (-O0):
%struct.ptr_valid_batch = type { i32 }
define i32 @ptr_valid_batch_w(%struct.ptr_valid_batch* %0, i8* %1, i64 %2, i64 %3) {
%5 = alloca %struct.ptr_valid_batch*
%6 = alloca i8*
%7 = alloca i64
%8 = alloca i64
store %struct.ptr_valid_batch* %0, %struct.ptr_valid_batch** %5
store i8* %1, i8** %6
store i64 %2, i64* %7
store i64 %3, i64* %8
%9 = load %struct.ptr_valid_batch*, %struct.ptr_valid_batch** %5
%10 = load i8*, i8** %6
%11 = load i64, i64* %7
%12 = load i64, i64* %8
%13 = call i32 @ptr_valid_batch(%struct.ptr_valid_batch* %9, i8* %10, i64 %11, i64 %12, i32 1)
ret i32 %13
}

LLVM IR (-O2):
%struct.ptr_valid_batch = type { i32 }
define i32 @ptr_valid_batch_w(%struct.ptr_valid_batch* %0, i8* %1, i64 %2, i64 %3) {
%5 = tail call i32 @ptr_valid_batch(%struct.ptr_valid_batch* %0, i8* %1, i64 %2, i64 %3, i32 1)
ret i32 %5
}
/* Variables and functions */
scalar_t__ floor(int);
int get_random();
int get_int(int max_int) { return (int)floor((max_int + 1) * get_random()); }


x86 assembly (clang, -O0):
<get_int>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    $0x0,%al
call   1030 <get_random@plt>
mov    -0x8(%rbp),%edi
imul   %eax,%edi
call   1040 <floor@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_int>:
push   %rbx
mov    %edi,%ebx
add    $0x1,%ebx
xor    %eax,%eax
call   1030 <get_random@plt>
imul   %eax,%ebx
mov    %ebx,%edi
pop    %rbx
jmp    1040 <floor@plt>

LLVM IR (-O0):
define i32 @get_int(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = add nsw i32 %3, 1
%5 = call i32 (...) @get_random()
%6 = mul nsw i32 %4, %5
%7 = call i64 @floor(i32 %6)
%8 = trunc i64 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
define i32 @get_int(i32 %0) {
%2 = add nsw i32 %0, 1
%3 = tail call i32 (...) @get_random()
%4 = mul nsw i32 %3, %2
%5 = tail call i64 @floor(i32 %4)
%6 = trunc i64 %5 to i32
ret i32 %6
}
/* Variables and functions */
int on_exit(void (*)(int, void *), int /*<<< orphan*/ *);
int atexit(void (*fctn)(void)) {
  return on_exit((void (*)(int, void *))fctn, NULL);
}


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

x86 assembly (clang, -O2):
<atexit>:
xor    %esi,%esi
jmp    1030 <on_exit@plt>

LLVM IR (-O0):
define i32 @atexit(void ()* %0) {
%2 = alloca void ()*
store void ()* %0, void ()** %2
%3 = load void ()*, void ()** %2
%4 = bitcast void ()* %3 to void (i32, i8*)*
%5 = call i32 @on_exit(void (i32, i8*)* %4, i32* null)
ret i32 %5
}

LLVM IR (-O2):
define i32 @atexit(void ()* %0) {
%2 = bitcast void ()* %0 to void (i32, i8*)*
%3 = tail call i32 @on_exit(void (i32, i8*)* %2, i32* null)
ret i32 %3
}
int bar() { return 12; }


x86 assembly (clang, -O0):
<bar>:
push   %rbp
mov    %rsp,%rbp
mov    $0xc,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @bar() {
ret i32 12
}

LLVM IR (-O2):
define i32 @bar() {
ret i32 12
}
/* Variables and functions */
scalar_t__ asin(double);
float asinf(float x) { return (float)asin((double)x); }


x86 assembly (clang, -O0):
<asinf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
call   1030 <asin@plt>
cvtsi2ss %rax,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<asinf>:
push   %rax
cvtss2sd %xmm0,%xmm0
call   1030 <asin@plt>
xorps  %xmm0,%xmm0
cvtsi2ss %rax,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @asinf(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = fpext float %3 to double
%5 = call i64 @asin(double %4)
%6 = sitofp i64 %5 to float
ret float %6
}

LLVM IR (-O2):
define float @asinf(float %0) {
%2 = fpext float %0 to double
%3 = tail call i64 @asin(double %2)
%4 = sitofp i64 %3 to float
ret float %4
}
__attribute__((ms_abi)) int add_msabi(int a, int b) { return a + b; }


x86 assembly (clang, -O0):
<add_msabi>:
push   %rbp
mov    %rsp,%rbp
push   %rax
mov    %ecx,-0x4(%rbp)
mov    %edx,-0x8(%rbp)
mov    -0x4(%rbp),%eax
add    -0x8(%rbp),%eax
add    $0x8,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<add_msabi>:
lea    (%rcx,%rdx,1),%eax
ret

LLVM IR (-O0):
define win64cc i32 @add_msabi(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = load i32, i32* %4
%7 = add nsw i32 %5, %6
ret i32 %7
}

LLVM IR (-O2):
define win64cc i32 @add_msabi(i32 %0, i32 %1) {
%3 = add nsw i32 %1, %0
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ snprintf(char *, int, char *, long);
int /*<<< orphan*/ strlen(char *);
char *strndup(char *, int /*<<< orphan*/);
char *libbun_i2s(long x) {
  char buf[128];
  snprintf(buf, 128, "%ld", x);
  return strndup(buf, strlen(buf));
}


x86 assembly (clang, -O0):
<libbun_i2s>:
push   %rbp
mov    %rsp,%rbp
sub    $0xa0,%rsp
mov    %rdi,-0x8(%rbp)
lea    -0x90(%rbp),%rdi
mov    -0x8(%rbp),%rcx
mov    $0x80,%esi
lea    0xeaa(%rip),%rdx
call   1040 <snprintf@plt>
lea    -0x90(%rbp),%rax
mov    %rax,-0x98(%rbp)
lea    -0x90(%rbp),%rdi
call   1030 <strlen@plt>
mov    -0x98(%rbp),%rdi
mov    %eax,%esi
call   1050 <strndup@plt>
add    $0xa0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<libbun_i2s>:
push   %rbx
sub    $0x80,%rsp
mov    %rdi,%rcx
lea    0xebe(%rip),%rdx
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    $0x80,%esi
call   1040 <snprintf@plt>
mov    %rbx,%rdi
call   1030 <strlen@plt>
mov    %rbx,%rdi
mov    %eax,%esi
call   1050 <strndup@plt>
add    $0x80,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%ld\00"
define i8* @libbun_i2s(i64 %0) {
%2 = alloca i64
%3 = alloca [128 x i8]
store i64 %0, i64* %2
%4 = getelementptr inbounds [128 x i8], [128 x i8]* %3, i64 0, i64 0
%5 = load i64, i64* %2
%6 = call i32 @snprintf(i8* %4, i32 128, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i64 %5)
%7 = getelementptr inbounds [128 x i8], [128 x i8]* %3, i64 0, i64 0
%8 = getelementptr inbounds [128 x i8], [128 x i8]* %3, i64 0, i64 0
%9 = call i32 @strlen(i8* %8)
%10 = call i8* @strndup(i8* %7, i32 %9)
ret i8* %10
}

LLVM IR (-O2):
@.str = [4 x i8] c"%ld\00"
define noalias i8* @libbun_i2s(i64 %0) {
%2 = alloca [128 x i8]
%3 = getelementptr inbounds [128 x i8], [128 x i8]* %2, i64 0, i64 0
%4 = call i32 @snprintf(i8* %3, i32 128, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i64 %0)
%5 = call i32 @strlen(i8* %3)
%6 = call i8* @strndup(i8* %3, i32 %5)
ret i8* %6
}
/* Variables and functions */
void *shmat(int, int /*<<< orphan*/ *, int /*<<< orphan*/);
int shmget(int, int, int);
void *ipc_get_addr() {
  int shm_id = 0;
  if ((shm_id = shmget((0x2a2a2a2a), (512), 0666)) != -1) {
    void *shm_addr = NULL;
    if ((shm_addr = shmat(shm_id, NULL, 0)) != (void *)-1)
      return shm_addr;
  }
  return NULL;
}


x86 assembly (clang, -O0):
<ipc_get_addr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0xc(%rbp)
mov    $0x2a2a2a2a,%edi
mov    $0x200,%esi
mov    $0x1b6,%edx
call   1040 <shmget@plt>
mov    %eax,-0xc(%rbp)
cmp    $0xffffffff,%eax
je     118b <ipc_get_addr+0x6b>
movq   $0x0,-0x18(%rbp)
mov    -0xc(%rbp),%edi
xor    %eax,%eax
mov    %eax,%esi
xor    %edx,%edx
call   1030 <shmat@plt>
mov    %rax,-0x18(%rbp)
mov    $0xffffffffffffffff,%rcx
cmp    %rcx,%rax
je     1186 <ipc_get_addr+0x66>
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    1193 <ipc_get_addr+0x73>
jmp    118b <ipc_get_addr+0x6b>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ipc_get_addr>:
push   %rax
mov    $0x2a2a2a2a,%edi
mov    $0x200,%esi
mov    $0x1b6,%edx
call   1040 <shmget@plt>
cmp    $0xffffffff,%eax
je     114d <ipc_get_addr+0x2d>
mov    %eax,%edi
xor    %esi,%esi
xor    %edx,%edx
call   1030 <shmat@plt>
cmp    $0xffffffffffffffff,%rax
je     114d <ipc_get_addr+0x2d>
pop    %rcx
ret
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i8* @ipc_get_addr() {
%1 = alloca i8*
%2 = alloca i32
%3 = alloca i8*
store i32 0, i32* %2
%4 = call i32 @shmget(i32 707406378, i32 512, i32 438)
store i32 %4, i32* %2
%5 = icmp ne i32 %4, -1
br i1 %5, label %6, label %13
6: ; preds = %0
store i8* null, i8** %3
%7 = load i32, i32* %2
%8 = call i8* @shmat(i32 %7, i32* null, i32 0)
store i8* %8, i8** %3
%9 = icmp ne i8* %8, inttoptr (i64 -1 to i8*)
br i1 %9, label %10, label %12
10: ; preds = %6
%11 = load i8*, i8** %3
store i8* %11, i8** %1
br label %14
12: ; preds = %6
br label %13
13: ; preds = %12, %0
store i8* null, i8** %1
br label %14
14: ; preds = %13, %10
%15 = load i8*, i8** %1
ret i8* %15
}

LLVM IR (-O2):
define i8* @ipc_get_addr() {
%1 = tail call i32 @shmget(i32 707406378, i32 512, i32 438)
%2 = icmp eq i32 %1, -1
br i1 %2, label %6, label %3
3: ; preds = %0
%4 = tail call i8* @shmat(i32 %1, i32* null, i32 0)
%5 = icmp eq i8* %4, inttoptr (i64 -1 to i8*)
br i1 %5, label %6, label %7
6: ; preds = %3, %0
br label %7
7: ; preds = %3, %6
%8 = phi i8* [ null, %6 ], [ %4, %3 ]
ret i8* %8
}
/* Type definitions */
typedef int uint16_t;

/* Variables and functions */
int read_bits(int);
uint16_t get_sample() {
  uint16_t tmp = 0;
  tmp |= (uint16_t)read_bits(4) << 8;
  tmp |= read_bits(8);
  if (tmp & 0x0800)
    tmp |= 0xF000;
  return tmp;
}


x86 assembly (clang, -O0):
<get_sample>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x4,%edi
call   1030 <read_bits@plt>
shl    $0x8,%eax
or     -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    $0x8,%edi
call   1030 <read_bits@plt>
or     -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0x800,%eax
cmp    $0x0,%eax
je     115e <get_sample+0x4e>
mov    -0x4(%rbp),%eax
or     $0xf000,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_sample>:
push   %rbx
mov    $0x4,%edi
call   1030 <read_bits@plt>
mov    %eax,%ebx
shl    $0x8,%ebx
mov    $0x8,%edi
call   1030 <read_bits@plt>
or     %ebx,%eax
mov    %eax,%ecx
or     $0xf000,%ecx
test   $0x800,%eax
cmovne %ecx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @get_sample() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @read_bits(i32 4)
%3 = shl i32 %2, 8
%4 = load i32, i32* %1
%5 = or i32 %4, %3
store i32 %5, i32* %1
%6 = call i32 @read_bits(i32 8)
%7 = load i32, i32* %1
%8 = or i32 %7, %6
store i32 %8, i32* %1
%9 = load i32, i32* %1
%10 = and i32 %9, 2048
%11 = icmp ne i32 %10, 0
br i1 %11, label %12, label %15
12: ; preds = %0
%13 = load i32, i32* %1
%14 = or i32 %13, 61440
store i32 %14, i32* %1
br label %15
15: ; preds = %12, %0
%16 = load i32, i32* %1
ret i32 %16
}

LLVM IR (-O2):
define i32 @get_sample() {
%1 = tail call i32 @read_bits(i32 4)
%2 = shl i32 %1, 8
%3 = tail call i32 @read_bits(i32 8)
%4 = or i32 %2, %3
%5 = and i32 %4, 2048
%6 = icmp eq i32 %5, 0
%7 = or i32 %4, 61440
%8 = select i1 %6, i32 %4, i32 %7
ret i32 %8
}
/* Variables and functions */
char *return_buf(char *);
void test_return_stack_memory_ok() {
  char stack_buf[100];
  char *pos = return_buf(stack_buf);
  (void)pos;
}


x86 assembly (clang, -O0):
<test_return_stack_memory_ok>:
push   %rbp
mov    %rsp,%rbp
sub    $0x80,%rsp
lea    -0x70(%rbp),%rdi
call   1030 <return_buf@plt>
mov    %rax,-0x78(%rbp)
add    $0x80,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_return_stack_memory_ok>:
sub    $0x68,%rsp
mov    %rsp,%rdi
call   1030 <return_buf@plt>
add    $0x68,%rsp
ret

LLVM IR (-O0):
define void @test_return_stack_memory_ok() {
%1 = alloca [100 x i8]
%2 = alloca i8*
%3 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 0
%4 = call i8* @return_buf(i8* %3)
store i8* %4, i8** %2
%5 = load i8*, i8** %2
ret void
}

LLVM IR (-O2):
define void @test_return_stack_memory_ok() {
%1 = alloca [100 x i8]
%2 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 0
%3 = call i8* @return_buf(i8* %2)
ret void
}
long geom2d_iszero(double f) { return ((f >= -0.0001) && (f <= +0.0001)); }


x86 assembly (clang, -O0):
<geom2d_iszero>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
xor    %eax,%eax
movsd  0xee8(%rip),%xmm1
ucomisd %xmm1,%xmm0
mov    %al,-0x9(%rbp)
jb     1138 <geom2d_iszero+0x38>
movsd  0xedb(%rip),%xmm0
ucomisd -0x8(%rbp),%xmm0
setae  %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
cltq
pop    %rbp
ret

x86 assembly (clang, -O2):
<geom2d_iszero>:
ucomisd 0xef8(%rip),%xmm0
setae  %al
movsd  0xef5(%rip),%xmm1
ucomisd %xmm0,%xmm1
setae  %cl
and    %al,%cl
movzbl %cl,%eax
ret

LLVM IR (-O0):
define i64 @geom2d_iszero(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fcmp oge double %3, -1.000000e-04
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load double, double* %2
%7 = fcmp ole double %6, 1.000000e-04
br label %8
8: ; preds = %5, %1
%9 = phi i1 [ false, %1 ], [ %7, %5 ]
%10 = zext i1 %9 to i32
%11 = sext i32 %10 to i64
ret i64 %11
}

LLVM IR (-O2):
define i64 @geom2d_iszero(double %0) {
%2 = fcmp oge double %0, -1.000000e-04
%3 = fcmp ole double %0, 1.000000e-04
%4 = and i1 %2, %3
%5 = zext i1 %4 to i64
ret i64 %5
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fputs(char *, int /*<<< orphan*/ *);
void addReaderInfo(FILE *out) {
  fputs(
      "<readerURL>\nhttp://www.seanet.com/~harrypy/MorseMail/\n</readerURL>\n",
      out);
}


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

x86 assembly (clang, -O2):
<addReaderInfo>:
mov    %rdi,%rcx
lea    0xee6(%rip),%rdi
mov    $0x43,%esi
mov    $0x1,%edx
jmp    1030 <fwrite@plt>

LLVM IR (-O0):
@.str = [68 x i8] c"<readerURL>\0Ahttp://www.seanet.com/~harrypy/MorseMail/\0A</readerURL>\0A\00"
define void @addReaderInfo(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = call i32 @fputs(i8* getelementptr inbounds ([68 x i8], [68 x i8]* @.str, i64 0, i64 0), i32* %3)
ret void
}

LLVM IR (-O2):
@.str = [68 x i8] c"<readerURL>\0Ahttp://www.seanet.com/~harrypy/MorseMail/\0A</readerURL>\0A\00"
define void @addReaderInfo(i32* nocapture %0) {
%2 = tail call i64 @fwrite(i8* getelementptr inbounds ([68 x i8], [68 x i8]* @.str, i64 0, i64 0), i64 67, i64 1, i32* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(int argc, const char *argv[]) {
  printf("Hello Huffman Tree.\n");
  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)
lea    0xed3(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [21 x i8] c"Hello Huffman Tree.\0A\00"
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 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [20 x i8] c"Hello Huffman Tree.\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @str, i64 0, i64 0))
ret i32 0
}
float convert_msToTempo(float milliseconds) {
  return (60.0f / milliseconds) * 1000;
}


x86 assembly (clang, -O0):
<convert_msToTempo>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  0xef3(%rip),%xmm0
divss  -0x4(%rbp),%xmm0
movss  0xee2(%rip),%xmm1
mulss  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<convert_msToTempo>:
movss  0xef8(%rip),%xmm1
divss  %xmm0,%xmm1
mulss  0xef0(%rip),%xmm1
movaps %xmm1,%xmm0
ret

LLVM IR (-O0):
define float @convert_msToTempo(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = fdiv float 6.000000e+01, %3
%5 = fmul float %4, 1.000000e+03
ret float %5
}

LLVM IR (-O2):
define float @convert_msToTempo(float %0) {
%2 = fdiv float 6.000000e+01, %0
%3 = fmul float %2, 1.000000e+03
ret float %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
void print_array(int arrayList[], int sz) {
  int i;
  for (i = 0; i < sz; i++)
    printf("%3d ", arrayList[i]);
  printf("\n");
}


x86 assembly (clang, -O0):
<print_array>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1159 <print_array+0x49>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,4),%esi
lea    0xebc(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1126 <print_array+0x16>
lea    0xea5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_array>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
test   %esi,%esi
jle    1157 <print_array+0x37>
mov    %rdi,%r15
mov    %esi,%r12d
lea    0xec7(%rip),%r14
xor    %ebx,%ebx
nopl   0x0(%rax,%rax,1)
mov    (%r15,%rbx,4),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
add    $0x1,%rbx
cmp    %rbx,%r12
jne    1140 <print_array+0x20>
mov    $0xa,%edi
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
jmp    1030 <putchar@plt>

LLVM IR (-O0):
@.str = [5 x i8] c"%3d \00"
@.str.1 = [2 x i8] c"\0A\00"
define void @print_array(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
%5 = alloca i32
store i32* %0, i32** %3
store i32 %1, i32* %4
store i32 0, i32* %5
br label %6
6: ; preds = %17, %2
%7 = load i32, i32* %5
%8 = load i32, i32* %4
%9 = icmp slt i32 %7, %8
br i1 %9, label %10, label %20
10: ; preds = %6
%11 = load i32*, i32** %3
%12 = load i32, i32* %5
%13 = sext i32 %12 to i64
%14 = getelementptr inbounds i32, i32* %11, i64 %13
%15 = load i32, i32* %14
%16 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %15)
br label %17
17: ; preds = %10
%18 = load i32, i32* %5
%19 = add nsw i32 %18, 1
store i32 %19, i32* %5
br label %6
20: ; preds = %6
%21 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [5 x i8] c"%3d \00"
define void @print_array(i32* nocapture %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %13
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %6
6: ; preds = %4, %6
%7 = phi i64 [ 0, %4 ], [ %11, %6 ]
%8 = getelementptr inbounds i32, i32* %0, i64 %7
%9 = load i32, i32* %8
%10 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %9)
%11 = add nuw nsw i64 %7, 1
%12 = icmp eq i64 %11, %5
br i1 %12, label %13, label %6
13: ; preds = %6, %2
%14 = tail call i32 @putchar(i32 10)
ret void
}
void INT_Excep_TPU3_TGI3C(void) {}


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

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

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

LLVM IR (-O2):
define void @INT_Excep_TPU3_TGI3C() {
ret void
}
unsigned long rho_ruby_create_double(double d) { return 0; }


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

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

LLVM IR (-O0):
define i64 @rho_ruby_create_double(double %0) {
%2 = alloca double
store double %0, double* %2
ret i64 0
}

LLVM IR (-O2):
define i64 @rho_ruby_create_double(double %0) {
ret i64 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, double, double);
void display_speeds(double feet_per_second, double meters_per_second,
                    int runner_num) {
  printf("%6d\t%0.2lf\t%0.2lf\n", runner_num, feet_per_second,
         meters_per_second);
  return;
}


x86 assembly (clang, -O0):
<display_speeds>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
mov    %edi,-0x14(%rbp)
mov    -0x14(%rbp),%esi
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
lea    0xec7(%rip),%rdi
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<display_speeds>:
mov    %edi,%esi
lea    0xee7(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [19 x i8] c"%6d\09%0.2lf\09%0.2lf\0A\00"
define void @display_speeds(double %0, double %1, i32 %2) {
%4 = alloca double
%5 = alloca double
%6 = alloca i32
store double %0, double* %4
store double %1, double* %5
store i32 %2, i32* %6
%7 = load i32, i32* %6
%8 = load double, double* %4
%9 = load double, double* %5
%10 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i32 %7, double %8, double %9)
ret void
}

LLVM IR (-O2):
@.str = [19 x i8] c"%6d\09%0.2lf\09%0.2lf\0A\00"
define void @display_speeds(double %0, double %1, i32 %2) {
%4 = tail call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i32 %2, double %0, double %1)
ret void
}
int classSafeOnStack(int classIndex) { return 1; }


x86 assembly (clang, -O0):
<classSafeOnStack>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    $0x1,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @classSafeOnStack(i32 %0) {
ret i32 1
}
/* Type definitions */
typedef int /*<<< orphan*/ ssize_t;

/* Variables and functions */
int /*<<< orphan*/ getline(char **, int /*<<< orphan*/ *, int /*<<< orphan*/);
int /*<<< orphan*/ stdin;
char *getInput() {
  char *msg = NULL;
  ssize_t buffersize = 0;
  getline(&msg, &buffersize, stdin);
  return msg;
}


x86 assembly (clang, -O0):
<getInput>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movq   $0x0,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    0x2eba(%rip),%rax
mov    (%rax),%edx
lea    -0x8(%rbp),%rdi
lea    -0xc(%rbp),%rsi
call   1030 <getline@plt>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getInput>:
sub    $0x18,%rsp
movq   $0x0,0x10(%rsp)
movl   $0x0,0xc(%rsp)
mov    0x2ebc(%rip),%rax
mov    (%rax),%edx
lea    0x10(%rsp),%rdi
lea    0xc(%rsp),%rsi
call   1030 <getline@plt>
mov    0x10(%rsp),%rax
add    $0x18,%rsp
ret

LLVM IR (-O0):
@stdin = global i32 0
define i8* @getInput() {
%1 = alloca i8*
%2 = alloca i32
store i8* null, i8** %1
store i32 0, i32* %2
%3 = load i32, i32* @stdin
%4 = call i32 @getline(i8** %1, i32* %2, i32 %3)
%5 = load i8*, i8** %1
ret i8* %5
}

LLVM IR (-O2):
@stdin = global i32 0
define i8* @getInput() {
%1 = alloca i8*
%2 = alloca i32
%3 = bitcast i8** %1 to i8*
store i8* null, i8** %1
%4 = bitcast i32* %2 to i8*
store i32 0, i32* %2
%5 = load i32, i32* @stdin
%6 = call i32 @getline(i8** %1, i32* %2, i32 %5)
%7 = load i8*, i8** %1
ret i8* %7
}
/* Variables and functions */
int /*<<< orphan*/ __mib_chain_clear(int);
void _mib_chain_clear(int id) { __mib_chain_clear(id); }


x86 assembly (clang, -O0):
<_mib_chain_clear>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <__mib_chain_clear@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_mib_chain_clear>:
jmp    1030 <__mib_chain_clear@plt>

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

LLVM IR (-O2):
define void @_mib_chain_clear(i32 %0) {
%2 = tail call i32 @__mib_chain_clear(i32 %0)
ret void
}
/* Type definitions */
typedef int uint8_t;
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
int /*<<< orphan*/ chr8setBank0(int);
int /*<<< orphan*/ prg32setBank0(int);
void m79_setParams(uint16_t addr, uint8_t val) {
  (void)addr;
  chr8setBank0((val & 7) << 13);
  prg32setBank0(((val >> 3) & 1) << 15);
}


x86 assembly (clang, -O0):
<m79_setParams>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%edi
and    $0x7,%edi
shl    $0xd,%edi
call   1040 <chr8setBank0@plt>
mov    -0x8(%rbp),%edi
sar    $0x3,%edi
and    $0x1,%edi
shl    $0xf,%edi
call   1030 <prg32setBank0@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<m79_setParams>:
push   %rbx
mov    %esi,%ebx
mov    %esi,%eax
shl    $0xd,%eax
movzwl %ax,%edi
call   1040 <chr8setBank0@plt>
and    $0x8,%ebx
shl    $0xc,%ebx
mov    %ebx,%edi
pop    %rbx
jmp    1030 <prg32setBank0@plt>

LLVM IR (-O0):
define void @m79_setParams(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = load i32, i32* %4
%7 = and i32 %6, 7
%8 = shl i32 %7, 13
%9 = call i32 @chr8setBank0(i32 %8)
%10 = load i32, i32* %4
%11 = ashr i32 %10, 3
%12 = and i32 %11, 1
%13 = shl i32 %12, 15
%14 = call i32 @prg32setBank0(i32 %13)
ret void
}

LLVM IR (-O2):
define void @m79_setParams(i32 %0, i32 %1) {
%3 = shl i32 %1, 13
%4 = and i32 %3, 57344
%5 = tail call i32 @chr8setBank0(i32 %4)
%6 = shl i32 %1, 12
%7 = and i32 %6, 32768
%8 = tail call i32 @prg32setBank0(i32 %7)
ret void
}
int fun533() { return 533; }


x86 assembly (clang, -O0):
<fun533>:
push   %rbp
mov    %rsp,%rbp
mov    $0x215,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @fun533() {
ret i32 533
}

LLVM IR (-O2):
define i32 @fun533() {
ret i32 533
}
float max(float x, float y) {
  if (x < y) {
    return y;
  } else {
    return x;
  }
}


x86 assembly (clang, -O0):
<max>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x8(%rbp)
movss  %xmm1,-0xc(%rbp)
movss  -0x8(%rbp),%xmm1
movss  -0xc(%rbp),%xmm0
ucomiss %xmm1,%xmm0
jbe    1130 <max+0x30>
movss  -0xc(%rbp),%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    113a <max+0x3a>
movss  -0x8(%rbp),%xmm0
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<max>:
maxss  %xmm0,%xmm1
movaps %xmm1,%xmm0
ret

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

LLVM IR (-O2):
define float @max(float %0, float %1) {
%3 = fcmp olt float %0, %1
%4 = select i1 %3, float %1, float %0
ret float %4
}
int dbgp_reset_prep(void) { return 1; }


x86 assembly (clang, -O0):
<dbgp_reset_prep>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @dbgp_reset_prep() {
ret i32 1
}

LLVM IR (-O2):
define i32 @dbgp_reset_prep() {
ret i32 1
}