xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int pa_mcalign_csize() {
  printf("NOT IMPLEMENTED:"
         "pa_mcalign_csize"
         "\n");
}


x86 assembly (clang, -O0):
<pa_mcalign_csize>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xee1(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [34 x i8] c"NOT IMPLEMENTED:pa_mcalign_csize\0A\00"
define i32 @pa_mcalign_csize() {
%1 = alloca i32
%2 = call i32 @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
@str = [33 x i8] c"NOT IMPLEMENTED:pa_mcalign_csize\00"
define i32 @pa_mcalign_csize() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @str, i64 0, i64 0))
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ memmove(void *, void const *, size_t);
void bcopy(const void *src, void *dest, size_t len) { memmove(dest, src, len); }


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

x86 assembly (clang, -O2):
<bcopy>:
mov    %rdi,%rax
mov    %rsi,%rdi
mov    %rax,%rsi
jmp    1030 <memmove@plt>

LLVM IR (-O0):
define void @bcopy(i8* %0, i8* %1, i64 %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i64
store i8* %0, i8** %4
store i8* %1, i8** %5
store i64 %2, i64* %6
%7 = load i8*, i8** %5
%8 = load i8*, i8** %4
%9 = load i64, i64* %6
%10 = call i32 @memmove(i8* %7, i8* %8, i64 %9)
ret void
}

LLVM IR (-O2):
define void @bcopy(i8* %0, i8* %1, i64 %2) {
%4 = tail call i32 @memmove(i8* %1, i8* %0, i64 %2)
ret void
}
/* Variables and functions */
scalar_t__ KIONIX_ACCEL_read_bytes(int, char *, int);
int /*<<< orphan*/ KIONIX_ACCEL_write_byte(int, char);
int KIONIX_ACCEL_motion_unmask_z(void) {
  char int_ctrl_reg2 = 0;
  int status = 0;
  if (KIONIX_ACCEL_read_bytes(0x1F, &int_ctrl_reg2, 1) == 0) {
    int_ctrl_reg2 &= ~0x20;
    KIONIX_ACCEL_write_byte(0x1F, int_ctrl_reg2);
  } else
    status = 1;
  return status;
}


x86 assembly (clang, -O0):
<KIONIX_ACCEL_motion_unmask_z>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movb   $0x0,-0x1(%rbp)
movl   $0x0,-0x8(%rbp)
mov    $0x1f,%edi
lea    -0x1(%rbp),%rsi
mov    $0x1,%edx
call   1030 <KIONIX_ACCEL_read_bytes@plt>
cmp    $0x0,%rax
jne    116d <KIONIX_ACCEL_motion_unmask_z+0x4d>
movsbl -0x1(%rbp),%eax
and    $0xffffffdf,%eax
mov    %al,-0x1(%rbp)
mov    $0x1f,%edi
movsbl -0x1(%rbp),%esi
call   1040 <KIONIX_ACCEL_write_byte@plt>
jmp    1174 <KIONIX_ACCEL_motion_unmask_z+0x54>
movl   $0x1,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<KIONIX_ACCEL_motion_unmask_z>:
push   %rbx
sub    $0x10,%rsp
movb   $0x0,0xf(%rsp)
lea    0xf(%rsp),%rsi
mov    $0x1,%ebx
mov    $0x1f,%edi
mov    $0x1,%edx
call   1030 <KIONIX_ACCEL_read_bytes@plt>
test   %rax,%rax
jne    1161 <KIONIX_ACCEL_motion_unmask_z+0x41>
movsbl 0xf(%rsp),%esi
and    $0xffffffdf,%esi
mov    %sil,0xf(%rsp)
mov    $0x1f,%edi
call   1040 <KIONIX_ACCEL_write_byte@plt>
xor    %ebx,%ebx
mov    %ebx,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define i32 @KIONIX_ACCEL_motion_unmask_z() {
%1 = alloca i8
%2 = alloca i32
store i8 0, i8* %1
store i32 0, i32* %2
%3 = call i64 @KIONIX_ACCEL_read_bytes(i32 31, i8* %1, i32 1)
%4 = icmp eq i64 %3, 0
br i1 %4, label %5, label %12
5: ; preds = %0
%6 = load i8, i8* %1
%7 = sext i8 %6 to i32
%8 = and i32 %7, -33
%9 = trunc i32 %8 to i8
store i8 %9, i8* %1
%10 = load i8, i8* %1
%11 = call i32 @KIONIX_ACCEL_write_byte(i32 31, i8 signext %10)
br label %13
12: ; preds = %0
store i32 1, i32* %2
br label %13
13: ; preds = %12, %5
%14 = load i32, i32* %2
ret i32 %14
}

LLVM IR (-O2):
define i32 @KIONIX_ACCEL_motion_unmask_z() {
%1 = alloca i8
store i8 0, i8* %1
%2 = call i64 @KIONIX_ACCEL_read_bytes(i32 31, i8* %1, i32 1)
%3 = icmp eq i64 %2, 0
br i1 %3, label %4, label %8
4: ; preds = %0
%5 = load i8, i8* %1
%6 = and i8 %5, -33
store i8 %6, i8* %1
%7 = call i32 @KIONIX_ACCEL_write_byte(i32 31, i8 signext %6)
br label %8
8: ; preds = %0, %4
%9 = phi i32 [ 0, %4 ], [ 1, %0 ]
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ ERR_error_string_n(unsigned long, char *, int);
char *ERR_error_string(unsigned long e, char *ret) {
  static char buf[256];
  if (ret == NULL)
    ret = buf;
  ERR_error_string_n(e, ret, 256);
  return ret;
}


x86 assembly (clang, -O0):
<ERR_error_string>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1136 <ERR_error_string+0x26>
lea    0x2f0e(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    $0x100,%edx
call   1030 <ERR_error_string_n@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ERR_error_string>:
push   %rbx
test   %rsi,%rsi
lea    0x2f25(%rip),%rbx
cmovne %rsi,%rbx
mov    %rbx,%rsi
mov    $0x100,%edx
call   1030 <ERR_error_string_n@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@ERR_error_string.buf = internal global [256 x i8] zeroinitializer
define i8* @ERR_error_string(i64 %0, i8* %1) {
%3 = alloca i64
%4 = alloca i8*
store i64 %0, i64* %3
store i8* %1, i8** %4
%5 = load i8*, i8** %4
%6 = icmp eq i8* %5, null
br i1 %6, label %7, label %8
7: ; preds = %2
store i8* getelementptr inbounds ([256 x i8], [256 x i8]* @ERR_error_string.buf, i64 0, i64 0), i8** %4
br label %8
8: ; preds = %7, %2
%9 = load i64, i64* %3
%10 = load i8*, i8** %4
%11 = call i32 @ERR_error_string_n(i64 %9, i8* %10, i32 256)
%12 = load i8*, i8** %4
ret i8* %12
}

LLVM IR (-O2):
@ERR_error_string.buf = internal global [256 x i8] zeroinitializer
define i8* @ERR_error_string(i64 %0, i8* %1) {
%3 = icmp eq i8* %1, null
%4 = select i1 %3, i8* getelementptr inbounds ([256 x i8], [256 x i8]* @ERR_error_string.buf, i64 0, i64 0), i8* %1
%5 = tail call i32 @ERR_error_string_n(i64 %0, i8* %4, i32 256)
ret i8* %4
}
/* Variables and functions */
int /*<<< orphan*/ slaset_(char *, int *, int *, float *, float *, float *,
                           int *);
void aa_cla_slaset(char UPLO, int M, int N, float ALPHA, float BETA, float *A,
                   int LDA) {
  slaset_(&UPLO, &M, &N, &ALPHA, &BETA, A, &LDA);
}


x86 assembly (clang, -O0):
<aa_cla_slaset>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
movss  %xmm0,-0x10(%rbp)
movss  %xmm1,-0x14(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8d,-0x24(%rbp)
mov    -0x20(%rbp),%r9
lea    -0x1(%rbp),%rdi
lea    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdx
lea    -0x10(%rbp),%rcx
lea    -0x14(%rbp),%r8
lea    -0x24(%rbp),%rax
mov    %rax,(%rsp)
call   1030 <slaset_@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<aa_cla_slaset>:
sub    $0x28,%rsp
mov    %rcx,%r9
mov    %dil,0x13(%rsp)
mov    %esi,0x24(%rsp)
mov    %edx,0x20(%rsp)
movss  %xmm0,0x1c(%rsp)
movss  %xmm1,0x18(%rsp)
mov    %r8d,0x14(%rsp)
lea    0x14(%rsp),%rax
mov    %rax,(%rsp)
lea    0x13(%rsp),%rdi
lea    0x24(%rsp),%rsi
lea    0x20(%rsp),%rdx
lea    0x1c(%rsp),%rcx
lea    0x18(%rsp),%r8
call   1030 <slaset_@plt>
add    $0x28,%rsp
ret

LLVM IR (-O0):
define void @aa_cla_slaset(i8 signext %0, i32 %1, i32 %2, float %3, float %4, float* %5, i32 %6) {
%8 = alloca i8
%9 = alloca i32
%10 = alloca i32
%11 = alloca float
%12 = alloca float
%13 = alloca float*
%14 = alloca i32
store i8 %0, i8* %8
store i32 %1, i32* %9
store i32 %2, i32* %10
store float %3, float* %11
store float %4, float* %12
store float* %5, float** %13
store i32 %6, i32* %14
%15 = load float*, float** %13
%16 = call i32 @slaset_(i8* %8, i32* %9, i32* %10, float* %11, float* %12, float* %15, i32* %14)
ret void
}

LLVM IR (-O2):
define void @aa_cla_slaset(i8 signext %0, i32 %1, i32 %2, float %3, float %4, float* %5, i32 %6) {
%8 = alloca i8
%9 = alloca i32
%10 = alloca i32
%11 = alloca float
%12 = alloca float
%13 = alloca i32
store i8 %0, i8* %8
store i32 %1, i32* %9
store i32 %2, i32* %10
store float %3, float* %11
store float %4, float* %12
store i32 %6, i32* %13
%14 = call i32 @slaset_(i8* %8, i32* %9, i32* %10, float* %11, float* %12, float* %5, i32* %13)
ret void
}
void kol_get_kernel_ver(char buff16b[]) {
  asm volatile("int $0x40" ::"a"(18), "b"(13), "c"(buff16b));
}


x86 assembly (clang, -O0):
<kol_get_kernel_ver>:
push   %rbp
mov    %rsp,%rbp
push   %rbx
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rcx
mov    $0x12,%eax
mov    $0xd,%ebx
int    $0x40
pop    %rbx
pop    %rbp
ret

x86 assembly (clang, -O2):
<kol_get_kernel_ver>:
push   %rbx
mov    %rdi,%rcx
mov    $0x12,%eax
mov    $0xd,%ebx
int    $0x40
pop    %rbx
ret

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

LLVM IR (-O2):
define void @kol_get_kernel_ver(i8* %0) {
tail call void asm sideeffect "int $$0x40", "{ax},{bx},{cx},~{dirflag},~{fpsr},~{flags}"(i32 18, i32 13, i8* %0)
ret void
}
void cnfUnlock(void) {}


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

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

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

LLVM IR (-O2):
define void @cnfUnlock() {
ret void
}
/* Variables and functions */
unsigned int rgb_to_pixel15bgr(unsigned int, unsigned int, unsigned int);
unsigned int rgb_to_pixel15bgr_dup(unsigned int r, unsigned int g,
                                   unsigned int b) {
  unsigned int col;
  col = rgb_to_pixel15bgr(r, g, b);
  col |= col << 16;
  return col;
}


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

x86 assembly (clang, -O2):
<rgb_to_pixel15bgr_dup>:
push   %rax
call   1030 <rgb_to_pixel15bgr@plt>
mov    %eax,%ecx
shl    $0x10,%ecx
or     %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @rgb_to_pixel15bgr_dup(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%8 = load i32, i32* %4
%9 = load i32, i32* %5
%10 = load i32, i32* %6
%11 = call i32 @rgb_to_pixel15bgr(i32 %8, i32 %9, i32 %10)
store i32 %11, i32* %7
%12 = load i32, i32* %7
%13 = shl i32 %12, 16
%14 = load i32, i32* %7
%15 = or i32 %14, %13
store i32 %15, i32* %7
%16 = load i32, i32* %7
ret i32 %16
}

LLVM IR (-O2):
define i32 @rgb_to_pixel15bgr_dup(i32 %0, i32 %1, i32 %2) {
%4 = tail call i32 @rgb_to_pixel15bgr(i32 %0, i32 %1, i32 %2)
%5 = shl i32 %4, 16
%6 = or i32 %5, %4
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(void) { printf("Hello from cfoo"); }


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

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

LLVM IR (-O0):
@.str = [16 x i8] c"Hello from cfoo\00"
define i32 @main() {
%1 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [16 x i8] c"Hello from cfoo\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
float fmodf(float x, float y) {
  float res;
  asm("1:\tfprem\n\t"
      "fstsw   %%ax\n\t"
      "sahf\n\t"
      "jp      1b\n\t"
      "fstp    %%st(1)"
      : "=t"(res)
      : "0"(x), "u"(y)
      : "ax", "st(1)");
  return res;
}


x86 assembly (clang, -O0):
<fmodf>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x4(%rbp),%xmm1
movss  -0x8(%rbp),%xmm0
movss  %xmm1,-0x10(%rbp)
movss  %xmm0,-0x14(%rbp)
flds   -0x10(%rbp)
flds   -0x14(%rbp)
fxch   %st(1)
fprem
fstsw  %ax
sahf
jp     112a <fmodf+0x2a>
fstp   %st(1)
fstps  -0x18(%rbp)
movss  -0x18(%rbp),%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0xc(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<fmodf>:
movss  %xmm0,-0x4(%rsp)
movss  %xmm1,-0x8(%rsp)
flds   -0x4(%rsp)
flds   -0x8(%rsp)
fxch   %st(1)
fprem
fstsw  %ax
sahf
jp     1116 <fmodf+0x16>
fstp   %st(1)
fstps  -0xc(%rsp)
movss  -0xc(%rsp),%xmm0
ret

LLVM IR (-O0):
define float @fmodf(float %0, float %1) {
%3 = alloca float
%4 = alloca float
%5 = alloca float
store float %0, float* %3
store float %1, float* %4
%6 = load float, float* %3
%7 = load float, float* %4
%8 = call float asm "1:\09fprem\0A\09fstsw %ax\0A\09sahf\0A\09jp 1b\0A\09fstp %st(1)", "={st},0,{st(1)},~{ax},~{st(1)},~{dirflag},~{fpsr},~{flags}"(float %6, float %7)
store float %8, float* %5
%9 = load float, float* %5
ret float %9
}

LLVM IR (-O2):
define float @fmodf(float %0, float %1) {
%3 = tail call float asm "1:\09fprem\0A\09fstsw %ax\0A\09sahf\0A\09jp 1b\0A\09fstp %st(1)", "={st},0,{st(1)},~{ax},~{st(1)},~{dirflag},~{fpsr},~{flags}"(float %0, float %1)
ret float %3
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  unsigned long blue_mult;
};
typedef TYPE_1__ XStandardColormap;

/* Variables and functions */
void set_XStandardColormap_blue_mult(void *_p, unsigned long _v) {
  ((XStandardColormap *)_p)->blue_mult = (unsigned long)_v;
}


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

x86 assembly (clang, -O2):
<set_XStandardColormap_blue_mult>:
mov    %rsi,(%rdi)
ret

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

LLVM IR (-O2):
define void @set_XStandardColormap_blue_mult(i8* nocapture writeonly %0, i64 %1) {
%3 = bitcast i8* %0 to i64*
store i64 %1, i64* %3
ret void
}
int calc(int x, int y) {
  int a1, a2;
  a1 = x;
  a2 = y;
  int z = a1 + a2;
  int b = z * 10;
  return b;
}


x86 assembly (clang, -O0):
<calc>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
add    -0x10(%rbp),%eax
mov    %eax,-0x14(%rbp)
imul   $0xa,-0x14(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<calc>:
add    %esi,%edi
add    %edi,%edi
lea    (%rdi,%rdi,4),%eax
ret

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

LLVM IR (-O2):
define i32 @calc(i32 %0, i32 %1) {
%3 = add nsw i32 %1, %0
%4 = mul nsw i32 %3, 10
ret i32 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ jmp_buf;

/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ longjmp(int /*<<< orphan*/, int);
int /*<<< orphan*/ printf(char *);
scalar_t__ setjmp(int /*<<< orphan*/);
main() {
  jmp_buf foo;
  if (setjmp(foo)) {
    exit(0);
  }
  printf("Hi mom\n");
  longjmp(foo, 1);
  printf("Should never reach here\n");
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    -0x8(%rbp),%edi
call   1040 <setjmp@plt>
cmp    $0x0,%rax
je     1168 <main+0x28>
xor    %edi,%edi
call   1060 <exit@plt>
lea    0xe91(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%edi
mov    $0x1,%esi
call   1050 <longjmp@plt>

x86 assembly (clang, -O2):
<main>:
push   %rax
call   1040 <setjmp@plt>
test   %rax,%rax
jne    1161 <main+0x21>
lea    0xeae(%rip),%rdi
call   1030 <puts@plt>
mov    $0x1,%esi
call   1050 <longjmp@plt>
xor    %edi,%edi
call   1060 <exit@plt>

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

LLVM IR (-O2):
@str = [7 x i8] c"Hi mom\00"
define i32 @main() {
%1 = tail call i64 @setjmp(i32 undef)
%2 = icmp eq i64 %1, 0
br i1 %2, label %5, label %3
3: ; preds = %0
%4 = tail call i32 @exit(i32 0)
unreachable
5: ; preds = %0
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @str, i64 0, i64 0))
%7 = tail call i32 @longjmp(i32 undef, i32 1)
unreachable
}
double cog_math_radians_to_degrees(double radians) {
  return (radians * (180.0f / 3.14159265));
}


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

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

LLVM IR (-O0):
define double @cog_math_radians_to_degrees(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fmul double %3, 0x404CA5DC1AF05A77
ret double %4
}

LLVM IR (-O2):
define double @cog_math_radians_to_degrees(double %0) {
%2 = fmul double %0, 0x404CA5DC1AF05A77
ret double %2
}
/* Variables and functions */
float pow(int, float);
float exp2(float x) { return pow(2, x); }


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

x86 assembly (clang, -O2):
<exp2>:
mov    $0x2,%edi
jmp    1030 <pow@plt>

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

LLVM IR (-O2):
define float @exp2(float %0) {
%2 = tail call float @pow(i32 2, float %0)
ret float %2
}
/* Variables and functions */
int gleIntLoadCore_2_1_Version_3_1();
int gleIntLoadCore_2_1_Base() {
  int bIsLoaded = gleIntLoadCore_2_1_Version_3_1();
  return bIsLoaded;
}


x86 assembly (clang, -O0):
<gleIntLoadCore_2_1_Base>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <gleIntLoadCore_2_1_Version_3_1@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gleIntLoadCore_2_1_Base>:
xor    %eax,%eax
jmp    1030 <gleIntLoadCore_2_1_Version_3_1@plt>

LLVM IR (-O0):
define i32 @gleIntLoadCore_2_1_Base() {
%1 = alloca i32
%2 = call i32 (...) @gleIntLoadCore_2_1_Version_3_1()
store i32 %2, i32* %1
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
define i32 @gleIntLoadCore_2_1_Base() {
%1 = tail call i32 (...) @gleIntLoadCore_2_1_Version_3_1()
ret i32 %1
}
int ld_bge_rm1(long double a1, long double *a2) {
  return (__builtin_isgreaterequal(a1, *a2));
}


x86 assembly (clang, -O0):
<ld_bge_rm1>:
push   %rbp
mov    %rsp,%rbp
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
mov    %rdi,-0x18(%rbp)
fldt   -0x10(%rbp)
mov    -0x18(%rbp),%rax
fldt   (%rax)
fxch   %st(1)
fucomip %st(1),%st
fstp   %st(0)
setae  %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ld_bge_rm1>:
fldt   0x8(%rsp)
fldt   (%rdi)
xor    %eax,%eax
fxch   %st(1)
fucomip %st(1),%st
fstp   %st(0)
setae  %al
ret

LLVM IR (-O0):
define i32 @ld_bge_rm1(x86_fp80 %0, x86_fp80* %1) {
%3 = alloca x86_fp80
%4 = alloca x86_fp80*
store x86_fp80 %0, x86_fp80* %3
store x86_fp80* %1, x86_fp80** %4
%5 = load x86_fp80, x86_fp80* %3
%6 = load x86_fp80*, x86_fp80** %4
%7 = load x86_fp80, x86_fp80* %6
%8 = fcmp oge x86_fp80 %5, %7
%9 = zext i1 %8 to i32
ret i32 %9
}

LLVM IR (-O2):
define i32 @ld_bge_rm1(x86_fp80 %0, x86_fp80* nocapture %1) {
%3 = load x86_fp80, x86_fp80* %1
%4 = fcmp ole x86_fp80 %3, %0
%5 = zext i1 %4 to i32
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ itoa(int, char *);
int /*<<< orphan*/ printf(char *, char *);
int main(void) {
  char s[100];
  itoa(1234, s);
  printf("Output:%s\n", s);
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x70,%rsp
mov    %rsp,%rbx
mov    $0x4d2,%edi
mov    %rbx,%rsi
call   1040 <itoa@plt>
lea    0xec4(%rip),%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x70,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [11 x i8] c"Output:%s\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [100 x i8]
store i32 0, i32* %1
%3 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 0
%4 = call i32 @itoa(i32 1234, i8* %3)
%5 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 0
%6 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %5)
ret i32 0
}

LLVM IR (-O2):
@.str = [11 x i8] c"Output:%s\0A\00"
define i32 @main() {
%1 = alloca [100 x i8]
%2 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 0
%3 = call i32 @itoa(i32 1234, i8* %2)
%4 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %2)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main() {
  printf("Hello filesystem.\n\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeda(%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 = [20 x i8] c"Hello filesystem.\0A\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [19 x i8] c"Hello filesystem.\0A\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
char tolower(char c) {
  if (c >= 'A' && c <= 'Z')
    return (c + 32);
  return c;
}


x86 assembly (clang, -O0):
<tolower>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x2(%rbp)
movsbl -0x2(%rbp),%eax
cmp    $0x41,%eax
jl     1133 <tolower+0x33>
movsbl -0x2(%rbp),%eax
cmp    $0x5a,%eax
jg     1133 <tolower+0x33>
movsbl -0x2(%rbp),%eax
add    $0x20,%eax
mov    %al,-0x1(%rbp)
jmp    1139 <tolower+0x39>
mov    -0x2(%rbp),%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define signext i8 @tolower(i8 signext %0) {
%2 = alloca i8
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
%6 = icmp sge i32 %5, 65
br i1 %6, label %7, label %16
7: ; preds = %1
%8 = load i8, i8* %3
%9 = sext i8 %8 to i32
%10 = icmp sle i32 %9, 90
br i1 %10, label %11, label %16
11: ; preds = %7
%12 = load i8, i8* %3
%13 = sext i8 %12 to i32
%14 = add nsw i32 %13, 32
%15 = trunc i32 %14 to i8
store i8 %15, i8* %2
br label %18
16: ; preds = %7, %1
%17 = load i8, i8* %3
store i8 %17, i8* %2
br label %18
18: ; preds = %16, %11
%19 = load i8, i8* %2
ret i8 %19
}

LLVM IR (-O2):
define signext i8 @tolower(i8 signext %0) {
%2 = add i8 %0, -65
%3 = icmp ult i8 %2, 26
%4 = add i8 %0, 32
%5 = select i1 %3, i8 %4, i8 %0
ret i8 %5
}
/* Variables and functions */
int /*<<< orphan*/ ENOSYS;
int /*<<< orphan*/ errno;
int _read(int file __attribute__((unused)), char *ptr __attribute__((unused)),
          int len __attribute__((unused))) {
  errno = ENOSYS;
  return -1;
}


x86 assembly (clang, -O0):
<_read>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    0x2ed3(%rip),%rax
mov    (%rax),%ecx
mov    0x2eba(%rip),%rax
mov    %ecx,(%rax)
mov    $0xffffffff,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_read>:
mov    0x2ee1(%rip),%rax
mov    (%rax),%eax
mov    0x2ec8(%rip),%rcx
mov    %eax,(%rcx)
mov    $0xffffffff,%eax
ret

LLVM IR (-O0):
@ENOSYS = global i32 0
@errno = global i32 0
define i32 @_read(i32 %0, i8* %1, i32 %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i32
store i32 %0, i32* %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%7 = load i32, i32* @ENOSYS
store i32 %7, i32* @errno
ret i32 -1
}

LLVM IR (-O2):
@ENOSYS = global i32 0
@errno = global i32 0
define i32 @_read(i32 %0, i8* nocapture readnone %1, i32 %2) {
%4 = load i32, i32* @ENOSYS
store i32 %4, i32* @errno
ret i32 -1
}
/* Type definitions */
typedef int /*<<< orphan*/ __pid_t;

/* Variables and functions */
int /*<<< orphan*/ ENOSYS;
int /*<<< orphan*/ __set_errno(int /*<<< orphan*/);
int killpg(__pid_t pgrp, int sig) {
  __set_errno(ENOSYS);
  return -1;
}


x86 assembly (clang, -O0):
<killpg>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    0x2ec3(%rip),%rax
mov    (%rax),%edi
call   1030 <__set_errno@plt>
mov    $0xffffffff,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<killpg>:
push   %rax
mov    0x2ed0(%rip),%rax
mov    (%rax),%edi
call   1030 <__set_errno@plt>
mov    $0xffffffff,%eax
pop    %rcx
ret

LLVM IR (-O0):
@ENOSYS = global i32 0
define i32 @killpg(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* @ENOSYS
%6 = call i32 @__set_errno(i32 %5)
ret i32 -1
}

LLVM IR (-O2):
@ENOSYS = global i32 0
define i32 @killpg(i32 %0, i32 %1) {
%3 = load i32, i32* @ENOSYS
%4 = tail call i32 @__set_errno(i32 %3)
ret i32 -1
}
/* Variables and functions */
int /*<<< orphan*/ snprintf(char *, int, char *, int);
char *_itoa(int n) {
  static char buf[32];
  snprintf(buf, 32, "%d", n);
  return buf;
}


x86 assembly (clang, -O0):
<_itoa>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%ecx
lea    0x2f1b(%rip),%rdi
mov    $0x20,%esi
lea    0xecf(%rip),%rdx
call   1030 <snprintf@plt>
lea    0x2f03(%rip),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_itoa>:
push   %rbx
mov    %edi,%ecx
lea    0x2f26(%rip),%rbx
lea    0xedf(%rip),%rdx
mov    %rbx,%rdi
mov    $0x20,%esi
call   1030 <snprintf@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@_itoa.buf = internal global [32 x i8] zeroinitializer
@.str = [3 x i8] c"%d\00"
define i8* @_itoa(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @snprintf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @_itoa.buf, i64 0, i64 0), i32 32, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %3)
ret i8* getelementptr inbounds ([32 x i8], [32 x i8]* @_itoa.buf, i64 0, i64 0)
}

LLVM IR (-O2):
@_itoa.buf = internal global [32 x i8] zeroinitializer
@.str = [3 x i8] c"%d\00"
define i8* @_itoa(i32 %0) {
%2 = tail call i32 @snprintf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @_itoa.buf, i64 0, i64 0), i32 32, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %0)
ret i8* getelementptr inbounds ([32 x i8], [32 x i8]* @_itoa.buf, i64 0, i64 0)
}
/* Type definitions */
typedef int /*<<< orphan*/ int64_t;

/* Variables and functions */
int /*<<< orphan*/ read_leb128(unsigned char **, int *);
int64_t read_uleb128(unsigned char **data) {
  int b;
  return read_leb128(data, &b);
}


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

x86 assembly (clang, -O2):
<read_uleb128>:
push   %rax
lea    0x4(%rsp),%rsi
call   1030 <read_leb128@plt>
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @read_uleb128(i8** %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
%4 = call i32 @read_leb128(i8** %0, i32* %2)
ret i32 %4
}
int __test() {
  int iters = 0;
  for (int x = 0, y = 4;; ++x, y += 2, ++iters) {
    if (x + y > 10000000) {
      break;
    }
  }
  return iters;
}


x86 assembly (clang, -O0):
<__test>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
movl   $0x4,-0xc(%rbp)
mov    -0x8(%rbp),%eax
add    -0xc(%rbp),%eax
cmp    $0x989680,%eax
jle    112f <__test+0x2f>
jmp    1154 <__test+0x54>
jmp    1134 <__test+0x34>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0xc(%rbp),%eax
add    $0x2,%eax
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    1119 <__test+0x19>
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @__test() {
ret i32 3333333
}
/* Variables and functions */
int /*<<< orphan*/ __testThreadRun();
int /*<<< orphan*/ __testThreadSyncLock();
int /*<<< orphan*/ __test_thread_communicate();
void testThreadSuit() {
  __testThreadRun();
  __testThreadSyncLock();
  __test_thread_communicate();
}


x86 assembly (clang, -O0):
<testThreadSuit>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1050 <__testThreadRun@plt>
mov    $0x0,%al
call   1040 <__testThreadSyncLock@plt>
mov    $0x0,%al
call   1030 <__test_thread_communicate@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<testThreadSuit>:
push   %rax
xor    %eax,%eax
call   1050 <__testThreadRun@plt>
xor    %eax,%eax
call   1040 <__testThreadSyncLock@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <__test_thread_communicate@plt>

LLVM IR (-O0):
define void @testThreadSuit() {
%1 = call i32 (...) @__testThreadRun()
%2 = call i32 (...) @__testThreadSyncLock()
%3 = call i32 (...) @__test_thread_communicate()
ret void
}

LLVM IR (-O2):
define void @testThreadSuit() {
%1 = tail call i32 (...) @__testThreadRun()
%2 = tail call i32 (...) @__testThreadSyncLock()
%3 = tail call i32 (...) @__test_thread_communicate()
ret void
}
unsigned ht_improve_hash_(unsigned h) {
  h += ~(h << 9);
  h ^= ((h >> 14) | (h << 18));
  h += (h << 4);
  h ^= ((h >> 10) | (h << 22));
  return h;
}


x86 assembly (clang, -O0):
<ht_improve_hash_>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shl    $0x9,%eax
xor    $0xffffffff,%eax
add    -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shr    $0xe,%eax
mov    -0x4(%rbp),%ecx
shl    $0x12,%ecx
or     %ecx,%eax
xor    -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shl    $0x4,%eax
add    -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shr    $0xa,%eax
mov    -0x4(%rbp),%ecx
shl    $0x16,%ecx
or     %ecx,%eax
xor    -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ht_improve_hash_>:
mov    %edi,%eax
shl    $0x9,%eax
not    %eax
add    %edi,%eax
mov    %eax,%ecx
rol    $0x12,%ecx
xor    %eax,%ecx
mov    %ecx,%edx
shl    $0x4,%edx
add    %ecx,%edx
mov    %edx,%eax
rol    $0x16,%eax
xor    %edx,%eax
ret

LLVM IR (-O0):
define i32 @ht_improve_hash_(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = shl i32 %3, 9
%5 = xor i32 %4, -1
%6 = load i32, i32* %2
%7 = add i32 %6, %5
store i32 %7, i32* %2
%8 = load i32, i32* %2
%9 = lshr i32 %8, 14
%10 = load i32, i32* %2
%11 = shl i32 %10, 18
%12 = or i32 %9, %11
%13 = load i32, i32* %2
%14 = xor i32 %13, %12
store i32 %14, i32* %2
%15 = load i32, i32* %2
%16 = shl i32 %15, 4
%17 = load i32, i32* %2
%18 = add i32 %17, %16
store i32 %18, i32* %2
%19 = load i32, i32* %2
%20 = lshr i32 %19, 10
%21 = load i32, i32* %2
%22 = shl i32 %21, 22
%23 = or i32 %20, %22
%24 = load i32, i32* %2
%25 = xor i32 %24, %23
store i32 %25, i32* %2
%26 = load i32, i32* %2
ret i32 %26
}

LLVM IR (-O2):
define i32 @ht_improve_hash_(i32 %0) {
%2 = shl i32 %0, 9
%3 = xor i32 %2, -1
%4 = add i32 %3, %0
%5 = tail call i32 @llvm.fshl.i32(i32 %4, i32 %4, i32 18)
%6 = xor i32 %5, %4
%7 = mul i32 %6, 17
%8 = lshr i32 %7, 10
%9 = mul i32 %6, 71303168
%10 = or i32 %8, %9
%11 = xor i32 %10, %7
ret i32 %11
}
/* Variables and functions */
int /*<<< orphan*/ NW_ShellExc(char *);
void NW_InquireArp(void) { NW_ShellExc("arp"); }


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

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

LLVM IR (-O0):
@.str = [4 x i8] c"arp\00"
define void @NW_InquireArp() {
%1 = call i32 @NW_ShellExc(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"arp\00"
define void @NW_InquireArp() {
%1 = tail call i32 @NW_ShellExc(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
void cpu_irq_restore(uintptr_t flags) {}


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

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

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

LLVM IR (-O2):
define void @cpu_irq_restore(i64 %0) {
ret void
}
/* Variables and functions */
scalar_t__ memchr(char const *, int /*<<< orphan*/, size_t);
size_t strnlen(const char *s, size_t maxlen) {
  const char *p = (const char *)memchr(s, 0, maxlen);
  return p ? p - s : maxlen;
}


x86 assembly (clang, -O0):
<strnlen>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rdx
xor    %esi,%esi
call   1030 <memchr@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     1152 <strnlen+0x42>
mov    -0x18(%rbp),%rax
mov    -0x8(%rbp),%rcx
sub    %rcx,%rax
mov    %rax,-0x20(%rbp)
jmp    115a <strnlen+0x4a>
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strnlen>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
xor    %esi,%esi
mov    %r14,%rdx
call   1030 <memchr@plt>
mov    %rax,%rcx
sub    %rbx,%rcx
test   %rax,%rax
cmove  %r14,%rcx
mov    %rcx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i64 @strnlen(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
%5 = alloca i8*
store i8* %0, i8** %3
store i64 %1, i64* %4
%6 = load i8*, i8** %3
%7 = load i64, i64* %4
%8 = call i64 @memchr(i8* %6, i32 0, i64 %7)
%9 = inttoptr i64 %8 to i8*
store i8* %9, i8** %5
%10 = load i8*, i8** %5
%11 = icmp ne i8* %10, null
br i1 %11, label %12, label %18
12: ; preds = %2
%13 = load i8*, i8** %5
%14 = load i8*, i8** %3
%15 = ptrtoint i8* %13 to i64
%16 = ptrtoint i8* %14 to i64
%17 = sub i64 %15, %16
br label %20
18: ; preds = %2
%19 = load i64, i64* %4
br label %20
20: ; preds = %18, %12
%21 = phi i64 [ %17, %12 ], [ %19, %18 ]
ret i64 %21
}

LLVM IR (-O2):
define i64 @strnlen(i8* %0, i64 %1) {
%3 = tail call i64 @memchr(i8* %0, i32 0, i64 %1)
%4 = icmp eq i64 %3, 0
%5 = ptrtoint i8* %0 to i64
%6 = sub i64 %3, %5
%7 = select i1 %4, i64 %1, i64 %6
ret i64 %7
}
float ffiTestFloats(float f1, float f2) {
  ;
  return (float)(f1 + f2);
}


x86 assembly (clang, -O0):
<ffiTestFloats>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
addss  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<ffiTestFloats>:
addss  %xmm1,%xmm0
ret

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

LLVM IR (-O2):
define float @ffiTestFloats(float %0, float %1) {
%3 = fadd float %0, %1
ret float %3
}
/* Variables and functions */
int bb_strtoull(char const *, char **, int);
__attribute__((always_)) unsigned bb_strtou(const char *arg, char **endp,
                                            int base) {
  return bb_strtoull(arg, endp, base);
}


x86 assembly (clang, -O0):
<bb_strtou>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
call   1030 <bb_strtoull@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bb_strtou>:
jmp    1030 <bb_strtoull@plt>

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

LLVM IR (-O2):
define i32 @bb_strtou(i8* %0, i8** %1, i32 %2) {
%4 = tail call i32 @bb_strtoull(i8* %0, i8** %1, i32 %2)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ U_WMRNOTIMPLEMENTED_swap(char *, int);
void U_WMRE3_swap(char *record, int torev) {
  U_WMRNOTIMPLEMENTED_swap(record, torev);
}


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

x86 assembly (clang, -O2):
<U_WMRE3_swap>:
jmp    1030 <U_WMRNOTIMPLEMENTED_swap@plt>

LLVM IR (-O0):
define void @U_WMRE3_swap(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 = call i32 @U_WMRNOTIMPLEMENTED_swap(i8* %5, i32 %6)
ret void
}

LLVM IR (-O2):
define void @U_WMRE3_swap(i8* %0, i32 %1) {
%3 = tail call i32 @U_WMRNOTIMPLEMENTED_swap(i8* %0, i32 %1)
ret void
}
/* Variables and functions */
scalar_t__ jdns_alloc(int);
int /*<<< orphan*/ memcpy(char *, char const *, int);
int strlen(char const *);
char *jdns_strdup(const char *s) {
  char *p;
  int len;
  len = strlen(s) + 1;
  p = (char *)jdns_alloc(len);
  memcpy(p, s, len);
  return p;
}


x86 assembly (clang, -O0):
<jdns_strdup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%edi
call   1050 <jdns_alloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    -0x14(%rbp),%edx
call   1040 <memcpy@plt>
mov    -0x10(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<jdns_strdup>:
push   %rbp
push   %r14
push   %rbx
mov    %rdi,%r14
call   1030 <strlen@plt>
lea    0x1(%rax),%ebp
mov    %ebp,%edi
call   1050 <jdns_alloc@plt>
mov    %rax,%rbx
mov    %rax,%rdi
mov    %r14,%rsi
mov    %ebp,%edx
call   1040 <memcpy@plt>
mov    %rbx,%rax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define i8* @jdns_strdup(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %2
%5 = load i8*, i8** %2
%6 = call i32 @strlen(i8* %5)
%7 = add nsw i32 %6, 1
store i32 %7, i32* %4
%8 = load i32, i32* %4
%9 = call i64 @jdns_alloc(i32 %8)
%10 = inttoptr i64 %9 to i8*
store i8* %10, i8** %3
%11 = load i8*, i8** %3
%12 = load i8*, i8** %2
%13 = load i32, i32* %4
%14 = call i32 @memcpy(i8* %11, i8* %12, i32 %13)
%15 = load i8*, i8** %3
ret i8* %15
}

LLVM IR (-O2):
define i8* @jdns_strdup(i8* %0) {
%2 = tail call i32 @strlen(i8* %0)
%3 = add nsw i32 %2, 1
%4 = tail call i64 @jdns_alloc(i32 %3)
%5 = inttoptr i64 %4 to i8*
%6 = tail call i32 @memcpy(i8* %5, i8* %0, i32 %3)
ret i8* %5
}
/* Variables and functions */
int dcloadsyscall(int /*<<< orphan*/, int, char *, int);
int read(int file, char *ptr, int len) {
  if (*(unsigned int *)0x8c004004 == 0xdeadbeef)
    return dcloadsyscall(0, file, ptr, len);
  else
    return -1;
}


x86 assembly (clang, -O0):
<read>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    $0x8c004004,%eax
cmpl   $0xdeadbeef,(%rax)
jne    114c <read+0x3c>
mov    -0x8(%rbp),%esi
mov    -0x10(%rbp),%rdx
mov    -0x14(%rbp),%ecx
xor    %edi,%edi
call   1030 <dcloadsyscall@plt>
mov    %eax,-0x4(%rbp)
jmp    1153 <read+0x43>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<read>:
mov    $0x8c004004,%eax
cmpl   $0xdeadbeef,(%rax)
jne    112b <read+0x1b>
mov    %edx,%ecx
mov    %rsi,%rdx
mov    %edi,%esi
xor    %edi,%edi
jmp    1030 <dcloadsyscall@plt>
mov    $0xffffffff,%eax
ret

LLVM IR (-O0):
define i32 @read(i32 %0, i8* %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i8*
%7 = alloca i32
store i32 %0, i32* %5
store i8* %1, i8** %6
store i32 %2, i32* %7
%8 = load i32, i32* inttoptr (i64 2348826628 to i32*)
%9 = icmp eq i32 %8, -559038737
br i1 %9, label %10, label %15
10: ; preds = %3
%11 = load i32, i32* %5
%12 = load i8*, i8** %6
%13 = load i32, i32* %7
%14 = call i32 @dcloadsyscall(i32 0, i32 %11, i8* %12, i32 %13)
store i32 %14, i32* %4
br label %16
15: ; preds = %3
store i32 -1, i32* %4
br label %16
16: ; preds = %15, %10
%17 = load i32, i32* %4
ret i32 %17
}

LLVM IR (-O2):
define i32 @read(i32 %0, i8* %1, i32 %2) {
%4 = load i32, i32* inttoptr (i64 2348826628 to i32*)
%5 = icmp eq i32 %4, -559038737
br i1 %5, label %6, label %8
6: ; preds = %3
%7 = tail call i32 @dcloadsyscall(i32 0, i32 %0, i8* %1, i32 %2)
br label %8
8: ; preds = %3, %6
%9 = phi i32 [ %7, %6 ], [ -1, %3 ]
ret i32 %9
}
void crunch(int usecs) {
  int i;
  while (usecs-- > 0) {
    for (i = 0; i < 1000; i++)
      ;
  }
}


x86 assembly (clang, -O0):
<crunch>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0x4(%rbp)
cmp    $0x0,%eax
jle    1147 <crunch+0x47>
movl   $0x0,-0x8(%rbp)
cmpl   $0x3e8,-0x8(%rbp)
jge    1142 <crunch+0x42>
jmp    1134 <crunch+0x34>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1122 <crunch+0x22>
jmp    1107 <crunch+0x7>
pop    %rbp
ret

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

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

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

/* Variables and functions */
int /*<<< orphan*/ memset(char *, int /*<<< orphan*/, int);
int /*<<< orphan*/ sleep(int);
int /*<<< orphan*/ strcpy(char *, char *);
void *thread4(void *arg) {
  while (1) {
    sleep(1);
    char szBuf[128];
    memset(szBuf, 0, sizeof(szBuf));
    strcpy(szBuf, "thread3");
  }
}


x86 assembly (clang, -O0):
<thread4>:
push   %rbp
mov    %rsp,%rbp
sub    $0x90,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x1,%edi
call   1050 <sleep@plt>
lea    -0x90(%rbp),%rdi
xor    %esi,%esi
mov    $0x80,%edx
call   1040 <memset@plt>
lea    -0x90(%rbp),%rdi
lea    0xe96(%rip),%rsi
call   1030 <strcpy@plt>
jmp    113f <thread4+0xf>

x86 assembly (clang, -O2):
<thread4>:
push   %r14
push   %rbx
sub    $0x88,%rsp
mov    %rsp,%rbx
lea    0xebc(%rip),%r14
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    $0x1,%edi
call   1050 <sleep@plt>
mov    %rbx,%rdi
xor    %esi,%esi
mov    $0x80,%edx
call   1040 <memset@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1030 <strcpy@plt>
jmp    1150 <thread4+0x20>

LLVM IR (-O0):
@.str = [8 x i8] c"thread3\00"
define i8* @thread4(i8* %0) {
%2 = alloca i8*
%3 = alloca [128 x i8]
store i8* %0, i8** %2
br label %4
4: ; preds = %1, %4
%5 = call i32 @sleep(i32 1)
%6 = getelementptr inbounds [128 x i8], [128 x i8]* %3, i64 0, i64 0
%7 = call i32 @memset(i8* %6, i32 0, i32 128)
%8 = getelementptr inbounds [128 x i8], [128 x i8]* %3, i64 0, i64 0
%9 = call i32 @strcpy(i8* %8, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
br label %4
}

LLVM IR (-O2):
@.str = [8 x i8] c"thread3\00"
define noalias i8* @thread4(i8* nocapture readnone %0) {
%2 = alloca [128 x i8]
%3 = getelementptr inbounds [128 x i8], [128 x i8]* %2, i64 0, i64 0
br label %4
4: ; preds = %1, %4
%5 = call i32 @sleep(i32 1)
%6 = call i32 @memset(i8* %3, i32 0, i32 128)
%7 = call i32 @strcpy(i8* %3, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
br label %4
}
/* Variables and functions */
void *gb_int2ptr(const int i) {
  union {
    void *p;
    int i;
  } x = {NULL};
  x.i = i;
  return x.p;
}


x86 assembly (clang, -O0):
<gb_int2ptr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    -0x10(%rbp),%rdi
xor    %esi,%esi
mov    $0x8,%edx
call   1030 <memset@plt>
mov    -0x4(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
%union.anon = type { i8* }
define i8* @gb_int2ptr(i32 %0) {
%2 = alloca i32
%3 = alloca %union.anon
store i32 %0, i32* %2
%4 = bitcast %union.anon* %3 to i8*
%5 = load i32, i32* %2
%6 = bitcast %union.anon* %3 to i32*
store i32 %5, i32* %6
%7 = bitcast %union.anon* %3 to i8**
%8 = load i8*, i8** %7
ret i8* %8
}

LLVM IR (-O2):
define i8* @gb_int2ptr(i32 %0) {
%2 = zext i32 %0 to i64
%3 = inttoptr i64 %2 to i8*
ret i8* %3
}
int of_machine_is_compatible(const char *compat) { return 0; }


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

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

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

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