xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ log_f(char *);
int mouseb_none_poll(void) {
  log_f("mouseb:none: mouseb_none_poll()\n");
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [33 x i8] c"mouseb:none: mouseb_none_poll()\0A\00"
define i32 @mouseb_none_poll() {
%1 = call i32 @log_f(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [33 x i8] c"mouseb:none: mouseb_none_poll()\0A\00"
define i32 @mouseb_none_poll() {
%1 = tail call i32 @log_f(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
/* Type definitions */
typedef int uint64_t;

/* Variables and functions */
int lrand48();
uint64_t rand_num_64(uint64_t range) {
  uint64_t rand_hi, rand_md, rand_lo, result;
  rand_hi = lrand48();
  rand_md = lrand48();
  rand_lo = lrand48();
  result = (rand_hi << 42) + (rand_md << 21) + rand_lo;
  return (result % range);
}


x86 assembly (clang, -O0):
<rand_num_64>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x0,%al
call   1030 <lrand48@plt>
mov    %eax,-0x8(%rbp)
mov    $0x0,%al
call   1030 <lrand48@plt>
mov    %eax,-0xc(%rbp)
mov    $0x0,%al
call   1030 <lrand48@plt>
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%eax
mov    $0x2a,%ecx
shl    %cl,%eax
mov    -0xc(%rbp),%ecx
shl    $0x15,%ecx
add    %ecx,%eax
add    -0x10(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cltd
idivl  -0x4(%rbp)
mov    %edx,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rand_num_64>:
push   %rax
xor    %eax,%eax
call   1030 <lrand48@plt>
xor    %eax,%eax
call   1030 <lrand48@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <lrand48@plt>

LLVM IR (-O0):
define i32 @rand_num_64(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %2
%7 = call i32 (...) @lrand48()
store i32 %7, i32* %3
%8 = call i32 (...) @lrand48()
store i32 %8, i32* %4
%9 = call i32 (...) @lrand48()
store i32 %9, i32* %5
%10 = load i32, i32* %3
%11 = shl i32 %10, 42
%12 = load i32, i32* %4
%13 = shl i32 %12, 21
%14 = add nsw i32 %11, %13
%15 = load i32, i32* %5
%16 = add nsw i32 %14, %15
store i32 %16, i32* %6
%17 = load i32, i32* %6
%18 = load i32, i32* %2
%19 = srem i32 %17, %18
ret i32 %19
}

LLVM IR (-O2):
define i32 @rand_num_64(i32 %0) {
%2 = tail call i32 (...) @lrand48()
%3 = tail call i32 (...) @lrand48()
%4 = tail call i32 (...) @lrand48()
ret i32 poison
}
/* Variables and functions */
int f198(int *);
int f199(int *p) { return f198(p); }


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

x86 assembly (clang, -O2):
<f199>:
jmp    1030 <f198@plt>

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

LLVM IR (-O2):
define i32 @f199(i32* %0) {
%2 = tail call i32 @f198(i32* %0)
ret i32 %2
}
long labs(long arg) {
  if (arg < 0)
    arg = -arg;
  return (arg);
}


x86 assembly (clang, -O0):
<labs>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jge    111d <labs+0x1d>
xor    %eax,%eax
sub    -0x8(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

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

LLVM IR (-O0):
define i64 @labs(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = icmp slt i64 %3, 0
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i64, i64* %2
%7 = sub nsw i64 0, %6
store i64 %7, i64* %2
br label %8
8: ; preds = %5, %1
%9 = load i64, i64* %2
ret i64 %9
}

LLVM IR (-O2):
define i64 @labs(i64 %0) {
%2 = tail call i64 @llvm.abs.i64(i64 %0, i1 true)
ret i64 %2
}
void gtk_container_set_border_width() {}


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

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

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

LLVM IR (-O2):
define void @gtk_container_set_border_width() {
ret void
}
int do_687() { return 687; }


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

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

LLVM IR (-O0):
define i32 @do_687() {
ret i32 687
}

LLVM IR (-O2):
define i32 @do_687() {
ret i32 687
}
/* Variables and functions */
int chr_get_skip_delta(unsigned char *, unsigned char);
unsigned char *fnt_get_chr(unsigned char *fbuf, unsigned char code) {
  return fbuf + 7 + chr_get_skip_delta(fbuf + 7, code - ' ');
}


x86 assembly (clang, -O0):
<fnt_get_chr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %sil,%al
mov    %rdi,-0x8(%rbp)
mov    %al,-0x9(%rbp)
mov    -0x8(%rbp),%rax
add    $0x7,%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
add    $0x7,%rdi
movzbl -0x9(%rbp),%eax
sub    $0x20,%eax
movzbl %al,%esi
call   1030 <chr_get_skip_delta@plt>
mov    %eax,%ecx
mov    -0x18(%rbp),%rax
movslq %ecx,%rcx
add    %rcx,%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fnt_get_chr>:
push   %rbx
mov    %rdi,%rbx
add    $0x7,%rdi
add    $0xe0,%sil
movzbl %sil,%esi
call   1030 <chr_get_skip_delta@plt>
cltq
add    %rbx,%rax
add    $0x7,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i8* @fnt_get_chr(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 = getelementptr inbounds i8, i8* %5, i64 7
%7 = load i8*, i8** %3
%8 = getelementptr inbounds i8, i8* %7, i64 7
%9 = load i8, i8* %4
%10 = zext i8 %9 to i32
%11 = sub nsw i32 %10, 32
%12 = trunc i32 %11 to i8
%13 = call i32 @chr_get_skip_delta(i8* %8, i8 zeroext %12)
%14 = sext i32 %13 to i64
%15 = getelementptr inbounds i8, i8* %6, i64 %14
ret i8* %15
}

LLVM IR (-O2):
define i8* @fnt_get_chr(i8* %0, i8 zeroext %1) {
%3 = getelementptr inbounds i8, i8* %0, i64 7
%4 = add i8 %1, -32
%5 = tail call i32 @chr_get_skip_delta(i8* %3, i8 zeroext %4)
%6 = sext i32 %5 to i64
%7 = getelementptr inbounds i8, i8* %3, i64 %6
ret i8* %7
}
void appendHEX2(char **pDstStr, int n) {
  *((*pDstStr)++) = "0123456789ABCDEF"[(n >> 4) & 0xf];
  *((*pDstStr)++) = "0123456789ABCDEF"[n & 0xf];
  **pDstStr = 0;
}


x86 assembly (clang, -O0):
<appendHEX2>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
sar    $0x4,%eax
and    $0xf,%eax
movslq %eax,%rcx
lea    0xee2(%rip),%rax
mov    (%rax,%rcx,1),%cl
mov    -0x8(%rbp),%rdx
mov    (%rdx),%rax
mov    %rax,%rsi
add    $0x1,%rsi
mov    %rsi,(%rdx)
mov    %cl,(%rax)
mov    -0xc(%rbp),%eax
and    $0xf,%eax
movslq %eax,%rcx
lea    0xebc(%rip),%rax
mov    (%rax,%rcx,1),%cl
mov    -0x8(%rbp),%rdx
mov    (%rdx),%rax
mov    %rax,%rsi
add    $0x1,%rsi
mov    %rsi,(%rdx)
mov    %cl,(%rax)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
movb   $0x0,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<appendHEX2>:
mov    %esi,%eax
shr    $0x4,%eax
and    $0xf,%eax
lea    0xef1(%rip),%r8
mov    (%rax,%r8,1),%al
mov    (%rdi),%rdx
lea    0x1(%rdx),%rcx
mov    %rcx,(%rdi)
mov    %al,(%rdx)
and    $0xf,%esi
mov    (%rsi,%r8,1),%al
mov    (%rdi),%rcx
lea    0x1(%rcx),%rdx
mov    %rdx,(%rdi)
mov    %al,(%rcx)
mov    (%rdi),%rax
movb   $0x0,(%rax)
ret

LLVM IR (-O0):
@.str = [17 x i8] c"0123456789ABCDEF\00"
define void @appendHEX2(i8** %0, i32 %1) {
%3 = alloca i8**
%4 = alloca i32
store i8** %0, i8*** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = ashr i32 %5, 4
%7 = and i32 %6, 15
%8 = sext i32 %7 to i64
%9 = getelementptr inbounds [17 x i8], [17 x i8]* @.str, i64 0, i64 %8
%10 = load i8, i8* %9
%11 = load i8**, i8*** %3
%12 = load i8*, i8** %11
%13 = getelementptr inbounds i8, i8* %12, i32 1
store i8* %13, i8** %11
store i8 %10, i8* %12
%14 = load i32, i32* %4
%15 = and i32 %14, 15
%16 = sext i32 %15 to i64
%17 = getelementptr inbounds [17 x i8], [17 x i8]* @.str, i64 0, i64 %16
%18 = load i8, i8* %17
%19 = load i8**, i8*** %3
%20 = load i8*, i8** %19
%21 = getelementptr inbounds i8, i8* %20, i32 1
store i8* %21, i8** %19
store i8 %18, i8* %20
%22 = load i8**, i8*** %3
%23 = load i8*, i8** %22
store i8 0, i8* %23
ret void
}

LLVM IR (-O2):
@.str = [17 x i8] c"0123456789ABCDEF\00"
define void @appendHEX2(i8** nocapture %0, i32 %1) {
%3 = lshr i32 %1, 4
%4 = and i32 %3, 15
%5 = zext i32 %4 to i64
%6 = getelementptr inbounds [17 x i8], [17 x i8]* @.str, i64 0, i64 %5
%7 = load i8, i8* %6
%8 = load i8*, i8** %0
%9 = getelementptr inbounds i8, i8* %8, i64 1
store i8* %9, i8** %0
store i8 %7, i8* %8
%10 = and i32 %1, 15
%11 = zext i32 %10 to i64
%12 = getelementptr inbounds [17 x i8], [17 x i8]* @.str, i64 0, i64 %11
%13 = load i8, i8* %12
%14 = load i8*, i8** %0
%15 = getelementptr inbounds i8, i8* %14, i64 1
store i8* %15, i8** %0
store i8 %13, i8* %14
%16 = load i8*, i8** %0
store i8 0, i8* %16
ret void
}
unsigned uint16_from_buffer(unsigned char *buffer, int offset) {
  return buffer[offset] | (buffer[offset + 1] << 8);
}


x86 assembly (clang, -O0):
<uint16_from_buffer>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movzbl (%rax,%rcx,1),%eax
mov    -0x8(%rbp),%rcx
mov    -0xc(%rbp),%edx
add    $0x1,%edx
movslq %edx,%rdx
movzbl (%rcx,%rdx,1),%ecx
shl    $0x8,%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<uint16_from_buffer>:
movslq %esi,%rax
movzwl (%rdi,%rax,1),%eax
ret

LLVM IR (-O0):
define i32 @uint16_from_buffer(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i8*, i8** %3
%6 = load i32, i32* %4
%7 = sext i32 %6 to i64
%8 = getelementptr inbounds i8, i8* %5, i64 %7
%9 = load i8, i8* %8
%10 = zext i8 %9 to i32
%11 = load i8*, i8** %3
%12 = load i32, i32* %4
%13 = add nsw i32 %12, 1
%14 = sext i32 %13 to i64
%15 = getelementptr inbounds i8, i8* %11, i64 %14
%16 = load i8, i8* %15
%17 = zext i8 %16 to i32
%18 = shl i32 %17, 8
%19 = or i32 %10, %18
ret i32 %19
}

LLVM IR (-O2):
define i32 @uint16_from_buffer(i8* nocapture %0, i32 %1) {
%3 = sext i32 %1 to i64
%4 = getelementptr inbounds i8, i8* %0, i64 %3
%5 = load i8, i8* %4
%6 = zext i8 %5 to i32
%7 = add nsw i32 %1, 1
%8 = sext i32 %7 to i64
%9 = getelementptr inbounds i8, i8* %0, i64 %8
%10 = load i8, i8* %9
%11 = zext i8 %10 to i32
%12 = shl nuw nsw i32 %11, 8
%13 = or i32 %12, %6
ret i32 %13
}
void gtk_check_menu_item_get_draw_as_radio() {}


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

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

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

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

/* Variables and functions */
struct rexp_node *rx_mk_r_binop(int, struct rexp_node *, int /*<<< orphan*/);
struct rexp_node *rx_mk_r_monop(int type, struct rexp_node *a) {
  return rx_mk_r_binop(type, a, 0);
}


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

x86 assembly (clang, -O2):
<rx_mk_r_monop>:
xor    %edx,%edx
jmp    1030 <rx_mk_r_binop@plt>

LLVM IR (-O0):
%struct.rexp_node = type { i32 }
define %struct.rexp_node* @rx_mk_r_monop(i32 %0, %struct.rexp_node* %1) {
%3 = alloca i32
%4 = alloca %struct.rexp_node*
store i32 %0, i32* %3
store %struct.rexp_node* %1, %struct.rexp_node** %4
%5 = load i32, i32* %3
%6 = load %struct.rexp_node*, %struct.rexp_node** %4
%7 = call %struct.rexp_node* @rx_mk_r_binop(i32 %5, %struct.rexp_node* %6, i32 0)
ret %struct.rexp_node* %7
}

LLVM IR (-O2):
%struct.rexp_node = type { i32 }
define %struct.rexp_node* @rx_mk_r_monop(i32 %0, %struct.rexp_node* %1) {
%3 = tail call %struct.rexp_node* @rx_mk_r_binop(i32 %0, %struct.rexp_node* %1, i32 0)
ret %struct.rexp_node* %3
}
/* Variables and functions */
char *bool_to_str(int);
scalar_t__ make_version_cmp(int *, char const *, unsigned int, char **);
char *make_version_eq(char const *nm, unsigned int argc, char **argv) {
  bool err = false;
  bool res;
  res = (make_version_cmp(&err, nm, argc, argv) == 0);
  if (err)
    return NULL;
  return bool_to_str(res);
}


x86 assembly (clang, -O0):
<make_version_eq>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    %rdx,-0x20(%rbp)
movl   $0x0,-0x24(%rbp)
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
mov    -0x20(%rbp),%rcx
lea    -0x24(%rbp),%rdi
call   1030 <make_version_cmp@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x28(%rbp)
cmpl   $0x0,-0x24(%rbp)
je     1174 <make_version_eq+0x54>
movq   $0x0,-0x8(%rbp)
jmp    1180 <make_version_eq+0x60>
mov    -0x28(%rbp),%edi
call   1040 <bool_to_str@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<make_version_eq>:
push   %rax
mov    %rdx,%rcx
mov    %esi,%edx
mov    %rdi,%rsi
movl   $0x0,0x4(%rsp)
lea    0x4(%rsp),%rdi
call   1030 <make_version_cmp@plt>
cmpl   $0x0,0x4(%rsp)
je     1146 <make_version_eq+0x26>
xor    %eax,%eax
pop    %rcx
ret
xor    %edi,%edi
test   %rax,%rax
sete   %dil
call   1040 <bool_to_str@plt>
pop    %rcx
ret

LLVM IR (-O0):
define i8* @make_version_eq(i8* %0, i32 %1, i8** %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i32
%7 = alloca i8**
%8 = alloca i32
%9 = alloca i32
store i8* %0, i8** %5
store i32 %1, i32* %6
store i8** %2, i8*** %7
store i32 0, i32* %8
%10 = load i8*, i8** %5
%11 = load i32, i32* %6
%12 = load i8**, i8*** %7
%13 = call i64 @make_version_cmp(i32* %8, i8* %10, i32 %11, i8** %12)
%14 = icmp eq i64 %13, 0
%15 = zext i1 %14 to i32
store i32 %15, i32* %9
%16 = load i32, i32* %8
%17 = icmp ne i32 %16, 0
br i1 %17, label %18, label %19
18: ; preds = %3
store i8* null, i8** %4
br label %22
19: ; preds = %3
%20 = load i32, i32* %9
%21 = call i8* @bool_to_str(i32 %20)
store i8* %21, i8** %4
br label %22
22: ; preds = %19, %18
%23 = load i8*, i8** %4
ret i8* %23
}

LLVM IR (-O2):
define i8* @make_version_eq(i8* %0, i32 %1, i8** %2) {
%4 = alloca i32
%5 = bitcast i32* %4 to i8*
store i32 0, i32* %4
%6 = call i64 @make_version_cmp(i32* %4, i8* %0, i32 %1, i8** %2)
%7 = load i32, i32* %4
%8 = icmp eq i32 %7, 0
br i1 %8, label %9, label %13
9: ; preds = %3
%10 = icmp eq i64 %6, 0
%11 = zext i1 %10 to i32
%12 = call i8* @bool_to_str(i32 %11)
br label %13
13: ; preds = %3, %9
%14 = phi i8* [ %12, %9 ], [ null, %3 ]
ret i8* %14
}
void init_gauged() {}


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

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

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

LLVM IR (-O2):
define void @init_gauged() {
ret void
}
double INHGtoATM(double INHG) {
  double ATM = 0.033421 * INHG;
  return ATM;
}


x86 assembly (clang, -O0):
<INHGtoATM>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  0xeef(%rip),%xmm0
mulsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<INHGtoATM>:
mulsd  0xef8(%rip),%xmm0
ret

LLVM IR (-O0):
define double @INHGtoATM(double %0) {
%2 = alloca double
%3 = alloca double
store double %0, double* %2
%4 = load double, double* %2
%5 = fmul double 3.342100e-02, %4
store double %5, double* %3
%6 = load double, double* %3
ret double %6
}

LLVM IR (-O2):
define double @INHGtoATM(double %0) {
%2 = fmul double %0, 3.342100e-02
ret double %2
}
int compute_dictionary() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @compute_dictionary() {
ret i32 0
}
int getFileSize(char *buffer) {
  int tmp[4];
  tmp[0] = ((int)buffer[28]);
  tmp[1] = ((int)buffer[29]);
  tmp[2] = ((int)buffer[30]);
  tmp[3] = ((int)buffer[31]);
  return (tmp[0] | tmp[1]) | (tmp[2] | tmp[3]);
}


x86 assembly (clang, -O0):
<getFileSize>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl 0x1c(%rax),%eax
mov    %eax,-0x20(%rbp)
mov    -0x8(%rbp),%rax
movsbl 0x1d(%rax),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x8(%rbp),%rax
movsbl 0x1e(%rax),%eax
mov    %eax,-0x18(%rbp)
mov    -0x8(%rbp),%rax
movsbl 0x1f(%rax),%eax
mov    %eax,-0x14(%rbp)
mov    -0x20(%rbp),%eax
or     -0x1c(%rbp),%eax
mov    -0x18(%rbp),%ecx
or     -0x14(%rbp),%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<getFileSize>:
movd   0x1c(%rdi),%xmm0
movdqa %xmm0,%xmm1
psrld  $0x10,%xmm1
por    %xmm0,%xmm1
movdqa %xmm1,%xmm0
psrlw  $0x8,%xmm0
por    %xmm1,%xmm0
movd   %xmm0,%eax
movsbl %al,%eax
ret

LLVM IR (-O0):
define i32 @getFileSize(i8* %0) {
%2 = alloca i8*
%3 = alloca [4 x i32]
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = getelementptr inbounds i8, i8* %4, i64 28
%6 = load i8, i8* %5
%7 = sext i8 %6 to i32
%8 = getelementptr inbounds [4 x i32], [4 x i32]* %3, i64 0, i64 0
store i32 %7, i32* %8
%9 = load i8*, i8** %2
%10 = getelementptr inbounds i8, i8* %9, i64 29
%11 = load i8, i8* %10
%12 = sext i8 %11 to i32
%13 = getelementptr inbounds [4 x i32], [4 x i32]* %3, i64 0, i64 1
store i32 %12, i32* %13
%14 = load i8*, i8** %2
%15 = getelementptr inbounds i8, i8* %14, i64 30
%16 = load i8, i8* %15
%17 = sext i8 %16 to i32
%18 = getelementptr inbounds [4 x i32], [4 x i32]* %3, i64 0, i64 2
store i32 %17, i32* %18
%19 = load i8*, i8** %2
%20 = getelementptr inbounds i8, i8* %19, i64 31
%21 = load i8, i8* %20
%22 = sext i8 %21 to i32
%23 = getelementptr inbounds [4 x i32], [4 x i32]* %3, i64 0, i64 3
store i32 %22, i32* %23
%24 = getelementptr inbounds [4 x i32], [4 x i32]* %3, i64 0, i64 0
%25 = load i32, i32* %24
%26 = getelementptr inbounds [4 x i32], [4 x i32]* %3, i64 0, i64 1
%27 = load i32, i32* %26
%28 = or i32 %25, %27
%29 = getelementptr inbounds [4 x i32], [4 x i32]* %3, i64 0, i64 2
%30 = load i32, i32* %29
%31 = getelementptr inbounds [4 x i32], [4 x i32]* %3, i64 0, i64 3
%32 = load i32, i32* %31
%33 = or i32 %30, %32
%34 = or i32 %28, %33
ret i32 %34
}

LLVM IR (-O2):
define i32 @getFileSize(i8* nocapture %0) {
%2 = getelementptr inbounds i8, i8* %0, i64 28
%3 = bitcast i8* %2 to <4 x i8>*
%4 = load <4 x i8>, <4 x i8>* %3
%5 = call i8 @llvm.vector.reduce.or.v4i8(<4 x i8> %4)
%6 = sext i8 %5 to i32
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, ...);
int /*<<< orphan*/ stderr;
void Usage(char prog_name[]) {
  fprintf(stderr, "usage: %s ", prog_name);
  fprintf(stderr, "<bin_count> <min_meas> <max_meas> <data_count> <threads>\n");
  exit(0);
}


x86 assembly (clang, -O0):
<Usage>:
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
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2e92(%rip),%rax
mov    (%rax),%edi
lea    0xeb4(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
xor    %edi,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<Usage>:
push   %rbx
mov    %rdi,%rdx
mov    0x2eb5(%rip),%rbx
mov    (%rbx),%edi
lea    0xecc(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0xec7(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
xor    %edi,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [11 x i8] c"usage: %s \00"
@.str.1 = [58 x i8] c"<bin_count> <min_meas> <max_meas> <data_count> <threads>\0A\00"
define void @Usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 (i32, i8*, ...) @fprintf(i32 %3, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = load i32, i32* @stderr
%7 = call i32 (i32, i8*, ...) @fprintf(i32 %6, i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str.1, i64 0, i64 0))
%8 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [11 x i8] c"usage: %s \00"
@.str.1 = [58 x i8] c"<bin_count> <min_meas> <max_meas> <data_count> <threads>\0A\00"
define void @Usage(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 (i32, i8*, ...) @fprintf(i32 %2, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = load i32, i32* @stderr
%5 = tail call i32 (i32, i8*, ...) @fprintf(i32 %4, i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str.1, i64 0, i64 0))
%6 = tail call i32 @exit(i32 0)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ free(void *const);
void ckfree(void *const p) {
  if (p) {
    free(p);
  }
}


x86 assembly (clang, -O0):
<ckfree>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1130 <ckfree+0x20>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ckfree>:
test   %rdi,%rdi
je     111a <ckfree+0xa>
jmp    1030 <free@plt>
ret

LLVM IR (-O0):
define void @ckfree(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = icmp ne i8* %3, null
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i8*, i8** %2
%7 = call i32 @free(i8* %6)
br label %8
8: ; preds = %5, %1
ret void
}

LLVM IR (-O2):
define void @ckfree(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 @free(i8* %0)
br label %5
5: ; preds = %3, %1
ret void
}
void sigio(int s) {}


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

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

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

LLVM IR (-O2):
define void @sigio(i32 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ abort_crypto_lib(char *);
void check_valid_symmetric_key_item_size(int size) {
  if (size != 1 + 32)
    abort_crypto_lib("Illegal size for symmetric key item");
}


x86 assembly (clang, -O0):
<check_valid_symmetric_key_item_size>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x21,-0x4(%rbp)
je     1131 <check_valid_symmetric_key_item_size+0x21>
lea    0xed4(%rip),%rdi
call   1030 <abort_crypto_lib@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<check_valid_symmetric_key_item_size>:
cmp    $0x21,%edi
jne    1116 <check_valid_symmetric_key_item_size+0x6>
ret
lea    0xee3(%rip),%rdi
jmp    1030 <abort_crypto_lib@plt>

LLVM IR (-O0):
@.str = [36 x i8] c"Illegal size for symmetric key item\00"
define void @check_valid_symmetric_key_item_size(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp ne i32 %3, 33
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = call i32 @abort_crypto_lib(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0))
br label %7
7: ; preds = %5, %1
ret void
}

LLVM IR (-O2):
@.str = [36 x i8] c"Illegal size for symmetric key item\00"
define void @check_valid_symmetric_key_item_size(i32 %0) {
%2 = icmp eq i32 %0, 33
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 @abort_crypto_lib(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0))
br label %5
5: ; preds = %3, %1
ret void
}
void ptt_set(int ot, int chan, int ptt_signal) { return; }


x86 assembly (clang, -O0):
<ptt_set>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @ptt_set(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
ret void
}

LLVM IR (-O2):
define void @ptt_set(i32 %0, i32 %1, i32 %2) {
ret void
}
/* Variables and functions */
size_t strlen(const char *s) {
  register unsigned int len = 0;
  while (s[len] != '\0')
    len++;
  return (len);
}


x86 assembly (clang, -O0):
<strlen>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
je     1131 <strlen+0x31>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    110f <strlen+0xf>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strlen>:
mov    $0xffffffff,%eax
cs nopw 0x0(%rax,%rax,1)
nop
add    $0x1,%eax
cmpb   $0x0,(%rdi,%rax,1)
jne    1110 <strlen+0x10>
mov    %eax,%eax
ret

LLVM IR (-O0):
define i64 @strlen(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
store i32 0, i32* %3
br label %4
4: ; preds = %12, %1
%5 = load i8*, i8** %2
%6 = load i32, i32* %3
%7 = zext i32 %6 to i64
%8 = getelementptr inbounds i8, i8* %5, i64 %7
%9 = load i8, i8* %8
%10 = sext i8 %9 to i32
%11 = icmp ne i32 %10, 0
br i1 %11, label %12, label %15
12: ; preds = %4
%13 = load i32, i32* %3
%14 = add i32 %13, 1
store i32 %14, i32* %3
br label %4
15: ; preds = %4
%16 = load i32, i32* %3
%17 = zext i32 %16 to i64
ret i64 %17
}

LLVM IR (-O2):
define i64 @strlen(i8* nocapture %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i32 [ 0, %1 ], [ %8, %2 ]
%4 = zext i32 %3 to i64
%5 = getelementptr inbounds i8, i8* %0, i64 %4
%6 = load i8, i8* %5
%7 = icmp eq i8 %6, 0
%8 = add i32 %3, 1
br i1 %7, label %9, label %2
9: ; preds = %2
%10 = zext i32 %3 to i64
ret i64 %10
}
/* Variables and functions */
scalar_t__ remove(char *);
int remove_file(char *path) {
  if (remove(path))
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<remove_file>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <remove@plt>
cmp    $0x0,%rax
je     113b <remove_file+0x2b>
movl   $0x1,-0x4(%rbp)
jmp    1142 <remove_file+0x32>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<remove_file>:
push   %rax
call   1030 <remove@plt>
xor    %ecx,%ecx
test   %rax,%rax
setne  %cl
mov    %ecx,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @remove_file(i8* nocapture %0) {
%2 = tail call i64 @remove(i8* %0)
%3 = icmp ne i64 %2, 0
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int test_and(int, int, int);
int main() {
  int a = 7;
  int b = 8;
  int c = 1;
  return test_and(c, a, b);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x7,-0x8(%rbp)
movl   $0x8,-0xc(%rbp)
movl   $0x1,-0x10(%rbp)
mov    -0x10(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
call   1030 <test_and@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
mov    $0x1,%edi
mov    $0x7,%esi
mov    $0x8,%edx
jmp    1030 <test_and@plt>

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 7, i32* %2
store i32 8, i32* %3
store i32 1, i32* %4
%5 = load i32, i32* %4
%6 = load i32, i32* %2
%7 = load i32, i32* %3
%8 = call i32 @test_and(i32 %5, i32 %6, i32 %7)
ret i32 %8
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @test_and(i32 1, i32 7, i32 8)
ret i32 %1
}
int hex(int n) { return n * ((2 * n) - 1); }


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

x86 assembly (clang, -O2):
<hex>:
lea    (%rdi,%rdi,1),%eax
add    $0xffffffff,%eax
imul   %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @hex(i32 %0) {
%2 = shl nsw i32 %0, 1
%3 = add nsw i32 %2, -1
%4 = mul nsw i32 %3, %0
ret i32 %4
}
/* Variables and functions */
scalar_t__ param_getptr(char const *, int *, int *, int);
char param_getchar(const char *line, int paramnum) {
  int bg, en;
  if (param_getptr(line, &bg, &en, paramnum))
    return 0x00;
  return line[bg];
}


x86 assembly (clang, -O0):
<param_getchar>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%ecx
lea    -0x18(%rbp),%rsi
lea    -0x1c(%rbp),%rdx
call   1030 <param_getptr@plt>
cmp    $0x0,%rax
je     1146 <param_getchar+0x36>
movb   $0x0,-0x1(%rbp)
jmp    1154 <param_getchar+0x44>
mov    -0x10(%rbp),%rax
movslq -0x18(%rbp),%rcx
mov    (%rax,%rcx,1),%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<param_getchar>:
push   %rbx
sub    $0x10,%rsp
mov    %esi,%ecx
mov    %rdi,%rbx
lea    0x8(%rsp),%rsi
lea    0xc(%rsp),%rdx
call   1030 <param_getptr@plt>
test   %rax,%rax
je     1132 <param_getchar+0x22>
xor    %eax,%eax
jmp    113a <param_getchar+0x2a>
movslq 0x8(%rsp),%rax
mov    (%rbx,%rax,1),%al
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define signext i8 @param_getchar(i8* %0, i32 %1) {
%3 = alloca i8
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i8* %0, i8** %4
store i32 %1, i32* %5
%8 = load i8*, i8** %4
%9 = load i32, i32* %5
%10 = call i64 @param_getptr(i8* %8, i32* %6, i32* %7, i32 %9)
%11 = icmp ne i64 %10, 0
br i1 %11, label %12, label %13
12: ; preds = %2
store i8 0, i8* %3
br label %19
13: ; preds = %2
%14 = load i8*, i8** %4
%15 = load i32, i32* %6
%16 = sext i32 %15 to i64
%17 = getelementptr inbounds i8, i8* %14, i64 %16
%18 = load i8, i8* %17
store i8 %18, i8* %3
br label %19
19: ; preds = %13, %12
%20 = load i8, i8* %3
ret i8 %20
}

LLVM IR (-O2):
define signext i8 @param_getchar(i8* %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = bitcast i32* %3 to i8*
%6 = bitcast i32* %4 to i8*
%7 = call i64 @param_getptr(i8* %0, i32* %3, i32* %4, i32 %1)
%8 = icmp eq i64 %7, 0
br i1 %8, label %9, label %14
9: ; preds = %2
%10 = load i32, i32* %3
%11 = sext i32 %10 to i64
%12 = getelementptr inbounds i8, i8* %0, i64 %11
%13 = load i8, i8* %12
br label %14
14: ; preds = %2, %9
%15 = phi i8 [ %13, %9 ], [ 0, %2 ]
ret i8 %15
}
void baa(int a, int b) {}


x86 assembly (clang, -O0):
<baa>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @baa(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
ret void
}

LLVM IR (-O2):
define void @baa(i32 %0, i32 %1) {
ret void
}
/* Variables and functions */
int _ctype_lookup(int);
int ispunct(int c) { return _ctype_lookup(c) & (0x10); }


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

x86 assembly (clang, -O2):
<ispunct>:
push   %rax
call   1030 <_ctype_lookup@plt>
and    $0x10,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @ispunct(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @_ctype_lookup(i32 %3)
%5 = and i32 %4, 16
ret i32 %5
}

LLVM IR (-O2):
define i32 @ispunct(i32 %0) {
%2 = tail call i32 @_ctype_lookup(i32 %0)
%3 = and i32 %2, 16
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ freeMemoryBlock(void **, int);
void freeMemoryBlocks(int memory_amount, void **memory_pointer) {
  int memory_block_index = 0;
  for (memory_block_index = 0; memory_block_index < memory_amount;
       memory_block_index++)
    freeMemoryBlock(memory_pointer, memory_block_index);
  return;
}


x86 assembly (clang, -O0):
<freeMemoryBlocks>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    1153 <freeMemoryBlocks+0x43>
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%esi
call   1030 <freeMemoryBlock@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    112d <freeMemoryBlocks+0x1d>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<freeMemoryBlocks>:
push   %rbp
push   %r14
push   %rbx
test   %edi,%edi
jle    1131 <freeMemoryBlocks+0x21>
mov    %rsi,%r14
mov    %edi,%ebp
xor    %ebx,%ebx
nop
mov    %r14,%rdi
mov    %ebx,%esi
call   1030 <freeMemoryBlock@plt>
add    $0x1,%ebx
cmp    %ebx,%ebp
jne    1120 <freeMemoryBlocks+0x10>
pop    %rbx
pop    %r14
pop    %rbp
ret

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

LLVM IR (-O2):
define void @freeMemoryBlocks(i32 %0, i8** %1) {
%3 = icmp sgt i32 %0, 0
br i1 %3, label %4, label %9
4: ; preds = %2, %4
%5 = phi i32 [ %7, %4 ], [ 0, %2 ]
%6 = tail call i32 @freeMemoryBlock(i8** %1, i32 %5)
%7 = add nuw nsw i32 %5, 1
%8 = icmp eq i32 %7, %0
br i1 %8, label %9, label %4
9: ; preds = %4, %2
ret void
}
recti_(x1, y1, x2, y2) int *x1, *y1, *x2, *y2;
{ rect((float)*x1, (float)*y1, (float)*x2, (float)*y2); }


x86 assembly (clang, -O0):
<recti_>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    %rcx,-0x28(%rbp)
mov    -0x10(%rbp),%rax
cvtsi2ssl (%rax),%xmm0
cvtss2sd %xmm0,%xmm0
mov    -0x18(%rbp),%rax
cvtsi2ssl (%rax),%xmm1
cvtss2sd %xmm1,%xmm1
mov    -0x20(%rbp),%rax
cvtsi2ssl (%rax),%xmm2
cvtss2sd %xmm2,%xmm2
mov    -0x28(%rbp),%rax
cvtsi2ssl (%rax),%xmm3
cvtss2sd %xmm3,%xmm3
mov    $0x4,%al
call   1030 <rect@plt>
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<recti_>:
cvtsi2ssl (%rdi),%xmm0
cvtsi2ssl (%rsi),%xmm1
cvtsi2ssl (%rdx),%xmm2
cvtss2sd %xmm0,%xmm0
cvtsi2ssl (%rcx),%xmm3
cvtss2sd %xmm1,%xmm1
cvtss2sd %xmm2,%xmm2
cvtss2sd %xmm3,%xmm3
mov    $0x4,%al
jmp    1030 <rect@plt>

LLVM IR (-O0):
define i32 @recti_(i32* %0, i32* %1, i32* %2, i32* %3) {
%5 = alloca i32
%6 = alloca i32*
%7 = alloca i32*
%8 = alloca i32*
%9 = alloca i32*
store i32* %0, i32** %6
store i32* %1, i32** %7
store i32* %2, i32** %8
store i32* %3, i32** %9
%10 = load i32*, i32** %6
%11 = load i32, i32* %10
%12 = sitofp i32 %11 to float
%13 = fpext float %12 to double
%14 = load i32*, i32** %7
%15 = load i32, i32* %14
%16 = sitofp i32 %15 to float
%17 = fpext float %16 to double
%18 = load i32*, i32** %8
%19 = load i32, i32* %18
%20 = sitofp i32 %19 to float
%21 = fpext float %20 to double
%22 = load i32*, i32** %9
%23 = load i32, i32* %22
%24 = sitofp i32 %23 to float
%25 = fpext float %24 to double
%26 = call i32 (double, double, double, double, ...) bitcast (i32 (...)* @rect to i32 (double, double, double, double, ...)*)(double %13, double %17, double %21, double %25)
%27 = load i32, i32* %5
ret i32 %27
}

LLVM IR (-O2):
define i32 @recti_(i32* nocapture %0, i32* nocapture %1, i32* nocapture %2, i32* nocapture %3) {
%5 = load i32, i32* %0
%6 = sitofp i32 %5 to float
%7 = fpext float %6 to double
%8 = load i32, i32* %1
%9 = sitofp i32 %8 to float
%10 = fpext float %9 to double
%11 = load i32, i32* %2
%12 = sitofp i32 %11 to float
%13 = fpext float %12 to double
%14 = load i32, i32* %3
%15 = sitofp i32 %14 to float
%16 = fpext float %15 to double
%17 = tail call i32 (double, double, double, double, ...) bitcast (i32 (...)* @rect to i32 (double, double, double, double, ...)*)(double %7, double %10, double %13, double %16)
ret i32 undef
}
/* Variables and functions */
char thermo_lo_threshold_get();
int /*<<< orphan*/ thermo_lo_threshold_set(char);
void thermo_lo_threshold_inc() {
  char val;
  val = thermo_lo_threshold_get();
  if (val == (128))
    return;
  if (val < (85)) {
    val++;
    thermo_lo_threshold_set(val);
  }
}


x86 assembly (clang, -O0):
<thermo_lo_threshold_inc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <thermo_lo_threshold_get@plt>
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
cmp    $0x80,%eax
jne    1146 <thermo_lo_threshold_inc+0x26>
jmp    1164 <thermo_lo_threshold_inc+0x44>
movsbl -0x1(%rbp),%eax
cmp    $0x55,%eax
jge    1164 <thermo_lo_threshold_inc+0x44>
mov    -0x1(%rbp),%al
add    $0x1,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%edi
call   1040 <thermo_lo_threshold_set@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<thermo_lo_threshold_inc>:
push   %rax
xor    %eax,%eax
call   1030 <thermo_lo_threshold_get@plt>
cmp    $0x54,%al
jg     1137 <thermo_lo_threshold_inc+0x17>
add    $0x1,%al
movsbl %al,%edi
pop    %rax
jmp    1040 <thermo_lo_threshold_set@plt>
pop    %rax
ret

LLVM IR (-O0):
define void @thermo_lo_threshold_inc() {
%1 = alloca i8
%2 = call signext i8 (...) @thermo_lo_threshold_get()
store i8 %2, i8* %1
%3 = load i8, i8* %1
%4 = sext i8 %3 to i32
%5 = icmp eq i32 %4, 128
br i1 %5, label %6, label %7
6: ; preds = %0
br label %16
7: ; preds = %0
%8 = load i8, i8* %1
%9 = sext i8 %8 to i32
%10 = icmp slt i32 %9, 85
br i1 %10, label %11, label %16
11: ; preds = %7
%12 = load i8, i8* %1
%13 = add i8 %12, 1
store i8 %13, i8* %1
%14 = load i8, i8* %1
%15 = call i32 @thermo_lo_threshold_set(i8 signext %14)
br label %16
16: ; preds = %6, %11, %7
ret void
}

LLVM IR (-O2):
define void @thermo_lo_threshold_inc() {
%1 = tail call signext i8 (...) @thermo_lo_threshold_get()
%2 = icmp slt i8 %1, 85
br i1 %2, label %3, label %6
3: ; preds = %0
%4 = add nsw i8 %1, 1
%5 = tail call i32 @thermo_lo_threshold_set(i8 signext %4)
br label %6
6: ; preds = %0, %3
ret void
}
int simpleFunc(int A) { return A; }


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

x86 assembly (clang, -O2):
<simpleFunc>:
mov    %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @simpleFunc(i32 returned %0) {
ret i32 %0
}
int func(int a, int c) {
  int b;
  b = 3;
  a = b + c;
  if (1) {
    a = a + a;
    a = a + a;
    return b;
  } else {
    b = b + b;
    return b * b * b;
  }
  double da;
  double db;
  double dc;
  da = 13.0;
  db = 17.5;
  dc = da / db;
  return c;
}


x86 assembly (clang, -O0):
<func>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
movl   $0x3,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @func(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca double
%7 = alloca double
%8 = alloca double
store i32 %0, i32* %3
store i32 %1, i32* %4
store i32 3, i32* %5
%9 = load i32, i32* %5
%10 = load i32, i32* %4
%11 = add nsw i32 %9, %10
store i32 %11, i32* %3
%12 = load i32, i32* %3
%13 = load i32, i32* %3
%14 = add nsw i32 %12, %13
store i32 %14, i32* %3
%15 = load i32, i32* %3
%16 = load i32, i32* %3
%17 = add nsw i32 %15, %16
store i32 %17, i32* %3
%18 = load i32, i32* %5
ret i32 %18
}

LLVM IR (-O2):
define i32 @func(i32 %0, i32 %1) {
ret i32 3
}
void setClass(int *entry, int class) { *(entry + 3) = class; }


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

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

LLVM IR (-O0):
define void @setClass(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
store i32* %0, i32** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = load i32*, i32** %3
%7 = getelementptr inbounds i32, i32* %6, i64 3
store i32 %5, i32* %7
ret void
}

LLVM IR (-O2):
define void @setClass(i32* nocapture writeonly %0, i32 %1) {
%3 = getelementptr inbounds i32, i32* %0, i64 3
store i32 %1, i32* %3
ret void
}
/* Type definitions */
typedef scalar_t__ uint32_t;

/* Variables and functions */
bool __u32_eq(void *a, void *b) { return *(uint32_t *)a == *(uint32_t *)b; }


x86 assembly (clang, -O0):
<__u32_eq>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    -0x10(%rbp),%rcx
cmp    (%rcx),%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<__u32_eq>:
mov    (%rdi),%rcx
xor    %eax,%eax
cmp    (%rsi),%rcx
sete   %al
ret

LLVM IR (-O0):
define i32 @__u32_eq(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = bitcast i8* %5 to i64*
%7 = load i64, i64* %6
%8 = load i8*, i8** %4
%9 = bitcast i8* %8 to i64*
%10 = load i64, i64* %9
%11 = icmp eq i64 %7, %10
%12 = zext i1 %11 to i32
ret i32 %12
}

LLVM IR (-O2):
define i32 @__u32_eq(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i64*
%4 = load i64, i64* %3
%5 = bitcast i8* %1 to i64*
%6 = load i64, i64* %5
%7 = icmp eq i64 %4, %6
%8 = zext i1 %7 to i32
ret i32 %8
}
/* Type definitions */
typedef int /*<<< orphan*/ AUTHORITY_KEYID;
typedef int /*<<< orphan*/ ASN1_VALUE;

/* Variables and functions */
int /*<<< orphan*/ ASN1_item_free(int /*<<< orphan*/ *, int /*<<< orphan*/ *);
int /*<<< orphan*/ AUTHORITY_KEYID_it;
void AUTHORITY_KEYID_free(AUTHORITY_KEYID *a) {
  ASN1_item_free((ASN1_VALUE *)a, &AUTHORITY_KEYID_it);
}


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

x86 assembly (clang, -O2):
<AUTHORITY_KEYID_free>:
mov    0x2ed1(%rip),%rsi
jmp    1030 <ASN1_item_free@plt>

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

LLVM IR (-O2):
@AUTHORITY_KEYID_it = global i32 0
define void @AUTHORITY_KEYID_free(i32* %0) {
%2 = tail call i32 @ASN1_item_free(i32* %0, i32* @AUTHORITY_KEYID_it)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void usage(void) {
  fprintf(stderr, ("Usage:  findsuper device [skipbytes [startkb]]\n"));
  exit(1);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rax
mov    0x2eb8(%rip),%rax
mov    (%rax),%edi
lea    0xecf(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [48 x i8] c"Usage: findsuper device [skipbytes [startkb]]\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [48 x i8] c"Usage: findsuper device [skipbytes [startkb]]\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @exit(i32 1)
unreachable
}
char *getCmd(void) {
  char *cmd;
  cmd = (char *)malloc(24);
  printf("Fs:");
  scanf("%s", cmd);
  return *cmd;
}


x86 assembly (clang, -O0):
<getCmd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x18,%edi
call   1040 <malloc@plt>
mov    %rax,-0x8(%rbp)
lea    0xeb3(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%rsi
lea    0xea5(%rip),%rdi
mov    $0x0,%al
call   1050 <scanf@plt>
mov    -0x8(%rbp),%rax
movsbq (%rax),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getCmd>:
push   %rbx
mov    $0x18,%edi
call   1040 <malloc@plt>
mov    %rax,%rbx
lea    0xebb(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xeb1(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1050 <scanf@plt>
movsbq (%rbx),%rax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [4 x i8] c"Fs:\00"
@.str.1 = [3 x i8] c"%s\00"
define i8* @getCmd() {
%1 = alloca i8*
%2 = call i8* @malloc(i64 24)
store i8* %2, i8** %1
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%4 = load i8*, i8** %1
%5 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %4)
%6 = load i8*, i8** %1
%7 = load i8, i8* %6
%8 = sext i8 %7 to i64
%9 = inttoptr i64 %8 to i8*
ret i8* %9
}

LLVM IR (-O2):
@.str = [4 x i8] c"Fs:\00"
@.str.1 = [3 x i8] c"%s\00"
define i8* @getCmd() {
%1 = tail call dereferenceable_or_null(24) i8* @malloc(i64 24)
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %1)
%4 = load i8, i8* %1
%5 = sext i8 %4 to i64
%6 = inttoptr i64 %5 to i8*
ret i8* %6
}
int test_imm_64int16_reg(short val) {
  return ((val) & (0x64 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_64int16_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
movswl -0x2(%rbp),%edx
and    $0x64,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_64int16_reg>:
test   $0x64,%dil
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_64int16_reg(i16 signext %0) {
%2 = alloca i16
store i16 %0, i16* %2
%3 = load i16, i16* %2
%4 = sext i16 %3 to i32
%5 = and i32 %4, 100
%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_64int16_reg(i16 signext %0) {
%2 = and i16 %0, 100
%3 = icmp eq i16 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ g(int, void (*)(int));
void f(int i, ...) { g(i + 1, &f); }


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
add    $0x1,%edi
mov    0x2eb8(%rip),%rsi
call   1030 <g@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f>:
add    $0x1,%edi
mov    0x2ec6(%rip),%rsi
jmp    1030 <g@plt>

LLVM IR (-O0):
define void @f(i32 %0, ...) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = add nsw i32 %3, 1
%5 = call i32 @g(i32 %4, void (i32)* bitcast (void (i32, ...)* @f to void (i32)*))
ret void
}

LLVM IR (-O2):
define void @f(i32 %0, ...) {
%2 = add nsw i32 %0, 1
%3 = tail call i32 @g(i32 %2, void (i32)* bitcast (void (i32, ...)* @f to void (i32)*))
ret void
}