xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ dev_printk(char *, void *, char *, unsigned int);
void lpfc_peer_port_login_init(void *vport, unsigned int val) {
  dev_printk("3", (void *)0,
             "0423 lpfc_"
             "peer_port_login"
             " attribute cannot be set to %d, "
             "allowed range is [0, 1]\n",
             val);
}


x86 assembly (clang, -O0):
<lpfc_peer_port_login_init>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%ecx
lea    0xed7(%rip),%rdi
xor    %eax,%eax
mov    %eax,%esi
lea    0xece(%rip),%rdx
call   1030 <dev_printk@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<lpfc_peer_port_login_init>:
mov    %esi,%ecx
lea    0xee7(%rip),%rdi
lea    0xee2(%rip),%rdx
xor    %esi,%esi
jmp    1030 <dev_printk@plt>

LLVM IR (-O0):
@.str = [2 x i8] c"3\00"
@.str.1 = [82 x i8] c"0423 lpfc_peer_port_login attribute cannot be set to %d, allowed range is [0, 1]\0A\00"
define void @lpfc_peer_port_login_init(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = call i32 @dev_printk(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i8* null, i8* getelementptr inbounds ([82 x i8], [82 x i8]* @.str.1, i64 0, i64 0), i32 %5)
ret void
}

LLVM IR (-O2):
@.str = [2 x i8] c"3\00"
@.str.1 = [82 x i8] c"0423 lpfc_peer_port_login attribute cannot be set to %d, allowed range is [0, 1]\0A\00"
define void @lpfc_peer_port_login_init(i8* nocapture readnone %0, i32 %1) {
%3 = tail call i32 @dev_printk(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i8* null, i8* getelementptr inbounds ([82 x i8], [82 x i8]* @.str.1, i64 0, i64 0), i32 %1)
ret void
}
void swap(int *tree, int i, int j) {}


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

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

LLVM IR (-O0):
define void @swap(i32* %0, i32 %1, i32 %2) {
%4 = alloca i32*
%5 = alloca i32
%6 = alloca i32
store i32* %0, i32** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
ret void
}

LLVM IR (-O2):
define void @swap(i32* nocapture %0, i32 %1, i32 %2) {
ret void
}
/* Variables and functions */
int dep2();
int dep4();
int dep1(void) { return dep4() - dep2(); }


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

x86 assembly (clang, -O2):
<dep1>:
push   %rbx
xor    %eax,%eax
call   1040 <dep4@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1030 <dep2@plt>
sub    %eax,%ebx
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @dep1() {
%1 = call i32 (...) @dep4()
%2 = call i32 (...) @dep2()
%3 = sub nsw i32 %1, %2
ret i32 %3
}

LLVM IR (-O2):
define i32 @dep1() {
%1 = tail call i32 (...) @dep4()
%2 = tail call i32 (...) @dep2()
%3 = sub nsw i32 %1, %2
ret i32 %3
}
int pthread_stack_getptr(void **pstackptr) {
  volatile void *stackptr;
  stackptr = &stackptr;
  pthread_noop_access((void *)&stackptr);
  *pstackptr = (void *)stackptr;
  return 0;
}


x86 assembly (clang, -O0):
<pthread_stack_getptr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    -0x10(%rbp),%rax
mov    %rax,-0x10(%rbp)
lea    -0x10(%rbp),%rdi
mov    $0x0,%al
call   1030 <pthread_noop_access@plt>
mov    -0x10(%rbp),%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,(%rax)
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pthread_stack_getptr>:
push   %rbx
sub    $0x10,%rsp
mov    %rdi,%rbx
lea    0x8(%rsp),%rdi
mov    %rdi,0x8(%rsp)
xor    %eax,%eax
call   1030 <pthread_noop_access@plt>
mov    0x8(%rsp),%rax
mov    %rax,(%rbx)
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @pthread_stack_getptr(i8** nocapture writeonly %0) {
%2 = alloca i8*
%3 = bitcast i8** %2 to i8*
%4 = bitcast i8** %2 to i8***
store i8** %2, i8*** %4
%5 = call i32 (i8*, ...) bitcast (i32 (...)* @pthread_noop_access to i32 (i8*, ...)*)(i8* %3)
%6 = load i8*, i8** %2
store i8* %6, i8** %0
ret i32 0
}
int test_imm_46int64_highword_mem(long long *val) {
  return ((*val >> 32) & (0x46 << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_46int64_highword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 300647710720
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
double sinf(double);
double sin(double arg) { return sinf(arg); }


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

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

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

LLVM IR (-O2):
define double @sin(double %0) {
%2 = tail call double @sinf(double %0)
ret double %2
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, unsigned char);
void fprint_movx_atRi(FILE *stream, unsigned char i) {
  fprintf(stream, "MOVX  A, @R%X                    ", i);
}


x86 assembly (clang, -O0):
<fprint_movx_atRi>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %sil,%al
mov    %rdi,-0x8(%rbp)
mov    %al,-0x9(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xed3(%rip),%rsi
movzbl -0x9(%rbp),%edx
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fprint_movx_atRi>:
mov    %esi,%edx
lea    0xee7(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@.str = [34 x i8] c"MOVX A, @R%X \00"
define void @fprint_movx_atRi(i32* %0, i8 zeroext %1) {
%3 = alloca i32*
%4 = alloca i8
store i32* %0, i32** %3
store i8 %1, i8* %4
%5 = load i32*, i32** %3
%6 = load i8, i8* %4
%7 = call i32 @fprintf(i32* %5, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0), i8 zeroext %6)
ret void
}

LLVM IR (-O2):
@.str = [34 x i8] c"MOVX A, @R%X \00"
define void @fprint_movx_atRi(i32* nocapture %0, i8 zeroext %1) {
%3 = tail call i32 @fprintf(i32* %0, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0), i8 zeroext %1)
ret void
}
/* Variables and functions */
float fmax(float const, float const);
float max(const float v1, const float v2) { return fmax(v1, v2); }


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

x86 assembly (clang, -O2):
<max>:
movaps %xmm0,%xmm2
cmpunordss %xmm0,%xmm2
movaps %xmm2,%xmm3
andps  %xmm1,%xmm3
maxss  %xmm0,%xmm1
andnps %xmm1,%xmm2
orps   %xmm3,%xmm2
movaps %xmm2,%xmm0
ret

LLVM IR (-O0):
define float @max(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 @fmax(float %5, float %6)
ret float %7
}

LLVM IR (-O2):
define float @max(float %0, float %1) {
%3 = tail call nsz float @llvm.maxnum.f32(float %0, float %1)
ret float %3
}
/* Variables and functions */
int strlen(char *);
char tolower(char);
char *lowCase(char *string) {
  char *point = string;
  while (string < point + strlen(point)) {
    *string = tolower(*string);
    *string++;
  }
  return point;
}


x86 assembly (clang, -O0):
<lowCase>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%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),%rcx
mov    %eax,%edx
mov    -0x18(%rbp),%rax
movslq %edx,%rdx
add    %rdx,%rcx
cmp    %rcx,%rax
jae    118b <lowCase+0x6b>
mov    -0x8(%rbp),%rax
movsbl (%rax),%edi
call   1040 <tolower@plt>
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1134 <lowCase+0x14>
mov    -0x10(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<lowCase>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
call   1030 <strlen@plt>
test   %eax,%eax
jle    1160 <lowCase+0x40>
mov    %r14,%rbx
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
movsbl (%rbx),%edi
call   1040 <tolower@plt>
mov    %al,(%rbx)
add    $0x1,%rbx
mov    %r14,%rdi
call   1030 <strlen@plt>
cltq
add    %r14,%rax
cmp    %rax,%rbx
jb     1140 <lowCase+0x20>
mov    %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i8* @lowCase(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 = %13, %1
%6 = load i8*, i8** %2
%7 = load i8*, i8** %3
%8 = load i8*, i8** %3
%9 = call i32 @strlen(i8* %8)
%10 = sext i32 %9 to i64
%11 = getelementptr inbounds i8, i8* %7, i64 %10
%12 = icmp ult i8* %6, %11
br i1 %12, label %13, label %21
13: ; preds = %5
%14 = load i8*, i8** %2
%15 = load i8, i8* %14
%16 = call signext i8 @tolower(i8 signext %15)
%17 = load i8*, i8** %2
store i8 %16, i8* %17
%18 = load i8*, i8** %2
%19 = getelementptr inbounds i8, i8* %18, i32 1
store i8* %19, i8** %2
%20 = load i8, i8* %18
br label %5
21: ; preds = %5
%22 = load i8*, i8** %3
ret i8* %22
}

LLVM IR (-O2):
define i8* @lowCase(i8* returned %0) {
%2 = tail call i32 @strlen(i8* %0)
%3 = icmp sgt i32 %2, 0
br i1 %3, label %4, label %13
4: ; preds = %1, %4
%5 = phi i8* [ %8, %4 ], [ %0, %1 ]
%6 = load i8, i8* %5
%7 = tail call signext i8 @tolower(i8 signext %6)
store i8 %7, i8* %5
%8 = getelementptr inbounds i8, i8* %5, i64 1
%9 = tail call i32 @strlen(i8* %0)
%10 = sext i32 %9 to i64
%11 = getelementptr inbounds i8, i8* %0, i64 %10
%12 = icmp ult i8* %8, %11
br i1 %12, label %4, label %13
13: ; preds = %4, %1
ret i8* %0
}
/* Variables and functions */
int /*<<< orphan*/ destroy_passphrase();
__attribute__((destructor)) void passphrase_destructor(void) {
  destroy_passphrase();
}


x86 assembly (clang, -O0):
<passphrase_destructor>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <destroy_passphrase@plt>
pop    %rbp
ret

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

LLVM IR (-O0):
@llvm.global_dtors = appending global [1 x { i32, void ()*, i8* }] [{ i32, void ()*, i8* } { i32 65535, void ()* @passphrase_destructor, i8* null }]
define void @passphrase_destructor() {
%1 = call i32 (...) @destroy_passphrase()
ret void
}

LLVM IR (-O2):
@llvm.global_dtors = appending global [1 x { i32, void ()*, i8* }] [{ i32, void ()*, i8* } { i32 65535, void ()* @passphrase_destructor, i8* null }]
define void @passphrase_destructor() {
%1 = tail call i32 (...) @destroy_passphrase()
ret void
}
double perihelion(double sma, double e) {
  double r;
  r = sma * (1.0 - e);
  return r;
}


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

x86 assembly (clang, -O2):
<perihelion>:
movsd  0xef8(%rip),%xmm2
subsd  %xmm1,%xmm2
mulsd  %xmm2,%xmm0
ret

LLVM IR (-O0):
define double @perihelion(double %0, double %1) {
%3 = alloca double
%4 = alloca double
%5 = alloca double
store double %0, double* %3
store double %1, double* %4
%6 = load double, double* %3
%7 = load double, double* %4
%8 = fsub double 1.000000e+00, %7
%9 = fmul double %6, %8
store double %9, double* %5
%10 = load double, double* %5
ret double %10
}

LLVM IR (-O2):
define double @perihelion(double %0, double %1) {
%3 = fsub double 1.000000e+00, %1
%4 = fmul double %3, %0
ret double %4
}
void test_assertions_tear_down(struct mu_test_desc *desc) {}


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

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

LLVM IR (-O0):
%struct.mu_test_desc = type opaque
define void @test_assertions_tear_down(%struct.mu_test_desc* %0) {
%2 = alloca %struct.mu_test_desc*
store %struct.mu_test_desc* %0, %struct.mu_test_desc** %2
ret void
}

LLVM IR (-O2):
%struct.mu_test_desc = type opaque
define void @test_assertions_tear_down(%struct.mu_test_desc* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ ENOSYS;
int /*<<< orphan*/ __set_errno(int /*<<< orphan*/);
int __sigblock(int mask) {
  __set_errno(ENOSYS);
  return -1;
}


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

x86 assembly (clang, -O2):
<__sigblock>:
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 @__sigblock(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* @ENOSYS
%4 = call i32 @__set_errno(i32 %3)
ret i32 -1
}

LLVM IR (-O2):
@ENOSYS = global i32 0
define i32 @__sigblock(i32 %0) {
%2 = load i32, i32* @ENOSYS
%3 = tail call i32 @__set_errno(i32 %2)
ret i32 -1
}
/* Variables and functions */
int /*<<< orphan*/ __VERIFIER_error();
scalar_t__ __VERIFIER_nondet_int();
int main() {
  int x, y;
  if (__VERIFIER_nondet_int()) {
    x = 0;
    y = 1;
  } else {
    x = 1;
    y = 0;
  }
  if (x + y != 1)
    __VERIFIER_error();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_int@plt>
cmp    $0x0,%rax
je     1153 <main+0x33>
movl   $0x0,-0x8(%rbp)
movl   $0x1,-0xc(%rbp)
jmp    1161 <main+0x41>
movl   $0x1,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%eax
add    -0xc(%rbp),%eax
cmp    $0x1,%eax
je     1177 <main+0x57>
mov    $0x0,%al
call   1040 <__VERIFIER_error@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i64 (...) @__VERIFIER_nondet_int()
ret i32 0
}
void vmm_trace_start(void *a) {}


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

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

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

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


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

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

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

LLVM IR (-O2):
define void @RTFileAioReqGetRC() {
ret void
}
int ftest1(void) { return 1; }


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

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

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

LLVM IR (-O2):
define i32 @ftest1() {
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ sesc_postevent(int, int, void const *);
void sesc_postevent_(int vaddr, int type, const void *sptr) {
  sesc_postevent(vaddr, type, sptr);
}


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

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

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

LLVM IR (-O2):
define void @sesc_postevent_(i32 %0, i32 %1, i8* %2) {
%4 = tail call i32 @sesc_postevent(i32 %0, i32 %1, i8* %2)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ safe_fclose(int /*<<< orphan*/ *);
void safe_fclosep(FILE **p) {
  if (*p)
    safe_fclose(*p);
}


x86 assembly (clang, -O0):
<safe_fclosep>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
cmpq   $0x0,(%rax)
je     1136 <safe_fclosep+0x26>
mov    -0x8(%rbp),%rax
mov    (%rax),%rdi
call   1030 <safe_fclose@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<safe_fclosep>:
mov    (%rdi),%rdi
test   %rdi,%rdi
je     111d <safe_fclosep+0xd>
jmp    1030 <safe_fclose@plt>
ret

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

LLVM IR (-O2):
define void @safe_fclosep(i32** nocapture %0) {
%2 = load i32*, i32** %0
%3 = icmp eq i32* %2, null
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i32 @safe_fclose(i32* %2)
br label %6
6: ; preds = %4, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ debug(int, char *, int);
int /*<<< orphan*/ sscanf(char *, char *, int *);
int confSaveMode(char *value, short handling, void *result) {
  int *dest = (int *)result;
  sscanf(value, "%3o", dest);
  debug(3, "set mode: %03o", *dest);
  return 0;
}


x86 assembly (clang, -O0):
<confSaveMode>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %si,%ax
mov    %rdi,-0x8(%rbp)
mov    %ax,-0xa(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x20(%rbp),%rdx
lea    0xeb2(%rip),%rsi
call   1040 <sscanf@plt>
mov    -0x20(%rbp),%rax
mov    (%rax),%edx
mov    $0x3,%edi
lea    0xe9f(%rip),%rsi
call   1030 <debug@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<confSaveMode>:
push   %rbx
mov    %rdx,%rbx
lea    0xed5(%rip),%rsi
call   1040 <sscanf@plt>
mov    (%rbx),%edx
lea    0xecb(%rip),%rsi
mov    $0x3,%edi
call   1030 <debug@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%3o\00"
@.str.1 = [15 x i8] c"set mode: %03o\00"
define i32 @confSaveMode(i8* %0, i16 signext %1, i8* %2) {
%4 = alloca i8*
%5 = alloca i16
%6 = alloca i8*
%7 = alloca i32*
store i8* %0, i8** %4
store i16 %1, i16* %5
store i8* %2, i8** %6
%8 = load i8*, i8** %6
%9 = bitcast i8* %8 to i32*
store i32* %9, i32** %7
%10 = load i8*, i8** %4
%11 = load i32*, i32** %7
%12 = call i32 @sscanf(i8* %10, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32* %11)
%13 = load i32*, i32** %7
%14 = load i32, i32* %13
%15 = call i32 @debug(i32 3, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0), i32 %14)
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%3o\00"
@.str.1 = [15 x i8] c"set mode: %03o\00"
define i32 @confSaveMode(i8* nocapture %0, i16 signext %1, i8* %2) {
%4 = bitcast i8* %2 to i32*
%5 = tail call i32 @sscanf(i8* %0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32* %4)
%6 = load i32, i32* %4
%7 = tail call i32 @debug(i32 3, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0), i32 %6)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ uint64_t;

/* Variables and functions */
int /*<<< orphan*/ _bswap64(int /*<<< orphan*/);
uint64_t be64dec(const void *buf) { return _bswap64(*((uint64_t *)buf)); }


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

x86 assembly (clang, -O2):
<be64dec>:
mov    (%rdi),%edi
jmp    1030 <_bswap64@plt>

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

LLVM IR (-O2):
define i32 @be64dec(i8* nocapture %0) {
%2 = bitcast i8* %0 to i32*
%3 = load i32, i32* %2
%4 = tail call i32 @_bswap64(i32 %3)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ GL_MODELVIEW;
int /*<<< orphan*/ GL_PROJECTION;
int /*<<< orphan*/ glMatrixMode(int /*<<< orphan*/);
int /*<<< orphan*/ gluLookAt(double, double, double, double, double, double,
                             double, double, int);
int /*<<< orphan*/ gluPerspective(double, double, double, double);
void setupMatrices(void) {
  glMatrixMode(GL_PROJECTION);
  gluPerspective(50.0, 1.0, 1.0, 10.0);
  glMatrixMode(GL_MODELVIEW);
  gluLookAt(0.0, 0.0, 5.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.);
}


x86 assembly (clang, -O0):
<setupMatrices>:
push   %rbp
mov    %rsp,%rbp
mov    0x2e9d(%rip),%rax
mov    (%rax),%edi
call   1040 <glMatrixMode@plt>
movsd  0xec6(%rip),%xmm0
movsd  0xeb6(%rip),%xmm2
movsd  0xebe(%rip),%xmm3
movaps %xmm2,%xmm1
call   1050 <gluPerspective@plt>
mov    0x2e7f(%rip),%rax
mov    (%rax),%edi
call   1040 <glMatrixMode@plt>
xorps  %xmm6,%xmm6
movsd  0xe85(%rip),%xmm2
movsd  0xe85(%rip),%xmm7
xor    %edi,%edi
movaps %xmm6,%xmm0
movaps %xmm6,%xmm1
movaps %xmm6,%xmm3
movaps %xmm6,%xmm4
movaps %xmm6,%xmm5
call   1030 <gluLookAt@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<setupMatrices>:
push   %rax
mov    0x2ea0(%rip),%rax
mov    (%rax),%edi
call   1040 <glMatrixMode@plt>
movsd  0xeb9(%rip),%xmm0
movsd  0xeb9(%rip),%xmm1
movsd  0xeb9(%rip),%xmm3
movaps %xmm1,%xmm2
call   1050 <gluPerspective@plt>
mov    0x2e82(%rip),%rax
mov    (%rax),%edi
call   1040 <glMatrixMode@plt>
movsd  0xea3(%rip),%xmm2
xorps  %xmm0,%xmm0
xorps  %xmm1,%xmm1
xorps  %xmm3,%xmm3
xorps  %xmm4,%xmm4
xorps  %xmm5,%xmm5
xorps  %xmm6,%xmm6
movsd  0xe79(%rip),%xmm7
xor    %edi,%edi
pop    %rax
jmp    1030 <gluLookAt@plt>

LLVM IR (-O0):
@GL_PROJECTION = global i32 0
@GL_MODELVIEW = global i32 0
define void @setupMatrices() {
%1 = load i32, i32* @GL_PROJECTION
%2 = call i32 @glMatrixMode(i32 %1)
%3 = call i32 @gluPerspective(double 5.000000e+01, double 1.000000e+00, double 1.000000e+00, double 1.000000e+01)
%4 = load i32, i32* @GL_MODELVIEW
%5 = call i32 @glMatrixMode(i32 %4)
%6 = call i32 @gluLookAt(double 0.000000e+00, double 0.000000e+00, double 5.000000e+00, double 0.000000e+00, double 0.000000e+00, double 0.000000e+00, double 0.000000e+00, double 1.000000e+00, i32 0)
ret void
}

LLVM IR (-O2):
@GL_PROJECTION = global i32 0
@GL_MODELVIEW = global i32 0
define void @setupMatrices() {
%1 = load i32, i32* @GL_PROJECTION
%2 = tail call i32 @glMatrixMode(i32 %1)
%3 = tail call i32 @gluPerspective(double 5.000000e+01, double 1.000000e+00, double 1.000000e+00, double 1.000000e+01)
%4 = load i32, i32* @GL_MODELVIEW
%5 = tail call i32 @glMatrixMode(i32 %4)
%6 = tail call i32 @gluLookAt(double 0.000000e+00, double 0.000000e+00, double 5.000000e+00, double 0.000000e+00, double 0.000000e+00, double 0.000000e+00, double 0.000000e+00, double 1.000000e+00, i32 0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ ldexp(scalar_t__, int);
scalar_t__ luaL_check_number(int);
int /*<<< orphan*/ lua_pushnumber(int /*<<< orphan*/);
void math_ldexp(void) {
  lua_pushnumber(ldexp(luaL_check_number(1), ((int)luaL_check_number(2))));
}


x86 assembly (clang, -O0):
<math_ldexp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x1,%edi
call   1040 <luaL_check_number@plt>
mov    %rax,-0x8(%rbp)
mov    $0x2,%edi
call   1040 <luaL_check_number@plt>
mov    -0x8(%rbp),%rdi
mov    %eax,%esi
call   1030 <ldexp@plt>
mov    %eax,%edi
call   1050 <lua_pushnumber@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<math_ldexp>:
push   %rbx
mov    $0x1,%edi
call   1040 <luaL_check_number@plt>
mov    %rax,%rbx
mov    $0x2,%edi
call   1040 <luaL_check_number@plt>
mov    %rbx,%rdi
mov    %eax,%esi
call   1030 <ldexp@plt>
mov    %eax,%edi
pop    %rbx
jmp    1050 <lua_pushnumber@plt>

LLVM IR (-O0):
define void @math_ldexp() {
%1 = call i64 @luaL_check_number(i32 1)
%2 = call i64 @luaL_check_number(i32 2)
%3 = trunc i64 %2 to i32
%4 = call i32 @ldexp(i64 %1, i32 %3)
%5 = call i32 @lua_pushnumber(i32 %4)
ret void
}

LLVM IR (-O2):
define void @math_ldexp() {
%1 = tail call i64 @luaL_check_number(i32 1)
%2 = tail call i64 @luaL_check_number(i32 2)
%3 = trunc i64 %2 to i32
%4 = tail call i32 @ldexp(i64 %1, i32 %3)
%5 = tail call i32 @lua_pushnumber(i32 %4)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ bar(int, int, int, int);
int popNumber();
int /*<<< orphan*/ pushNumber(int /*<<< orphan*/);
void basBar() {
  int x, y, x1, y1;
  y1 = popNumber();
  x1 = popNumber();
  y = popNumber();
  x = popNumber();
  pushNumber(bar(x, y, x1, y1));
}


x86 assembly (clang, -O0):
<basBar>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1050 <popNumber@plt>
mov    %eax,-0x10(%rbp)
mov    $0x0,%al
call   1050 <popNumber@plt>
mov    %eax,-0xc(%rbp)
mov    $0x0,%al
call   1050 <popNumber@plt>
mov    %eax,-0x8(%rbp)
mov    $0x0,%al
call   1050 <popNumber@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
mov    -0x10(%rbp),%ecx
call   1030 <bar@plt>
mov    %eax,%edi
call   1040 <pushNumber@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<basBar>:
push   %rbp
push   %r14
push   %rbx
xor    %eax,%eax
call   1050 <popNumber@plt>
mov    %eax,%r14d
xor    %eax,%eax
call   1050 <popNumber@plt>
mov    %eax,%ebp
xor    %eax,%eax
call   1050 <popNumber@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1050 <popNumber@plt>
mov    %eax,%edi
mov    %ebx,%esi
mov    %ebp,%edx
mov    %r14d,%ecx
call   1030 <bar@plt>
mov    %eax,%edi
pop    %rbx
pop    %r14
pop    %rbp
jmp    1040 <pushNumber@plt>

LLVM IR (-O0):
define void @basBar() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = call i32 (...) @popNumber()
store i32 %5, i32* %4
%6 = call i32 (...) @popNumber()
store i32 %6, i32* %3
%7 = call i32 (...) @popNumber()
store i32 %7, i32* %2
%8 = call i32 (...) @popNumber()
store i32 %8, i32* %1
%9 = load i32, i32* %1
%10 = load i32, i32* %2
%11 = load i32, i32* %3
%12 = load i32, i32* %4
%13 = call i32 @bar(i32 %9, i32 %10, i32 %11, i32 %12)
%14 = call i32 @pushNumber(i32 %13)
ret void
}

LLVM IR (-O2):
define void @basBar() {
%1 = tail call i32 (...) @popNumber()
%2 = tail call i32 (...) @popNumber()
%3 = tail call i32 (...) @popNumber()
%4 = tail call i32 (...) @popNumber()
%5 = tail call i32 @bar(i32 %4, i32 %3, i32 %2, i32 %1)
%6 = tail call i32 @pushNumber(i32 %5)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int strlen(char *);
void getStringLength() {
  char hello[] = "Hello";
  printf("hello length = %d \n", strlen(hello));
}


x86 assembly (clang, -O0):
<getStringLength>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0xed2(%rip),%eax
mov    %eax,-0x6(%rbp)
mov    0xecc(%rip),%ax
mov    %ax,-0x2(%rbp)
lea    -0x6(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,%esi
lea    0xeb8(%rip),%rdi
call   1040 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getStringLength>:
push   %rax
movw   $0x6f,0x4(%rsp)
movl   $0x6c6c6548,(%rsp)
mov    %rsp,%rdi
call   1030 <strlen@plt>
lea    0xec8(%rip),%rdi
mov    %eax,%esi
call   1040 <printf@plt>
pop    %rax
ret

LLVM IR (-O0):
@__const.getStringLength.hello = [6 x i8] c"Hello\00"
@.str = [20 x i8] c"hello length = %d \0A\00"
define void @getStringLength() {
%1 = alloca [6 x i8]
%2 = bitcast [6 x i8]* %1 to i8*
%3 = getelementptr inbounds [6 x i8], [6 x i8]* %1, i64 0, i64 0
%4 = call i32 @strlen(i8* %3)
%5 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i32 %4)
ret void
}

LLVM IR (-O2):
@__const.getStringLength.hello = [6 x i8] c"Hello\00"
@.str = [20 x i8] c"hello length = %d \0A\00"
define void @getStringLength() {
%1 = alloca [6 x i8]
%2 = getelementptr inbounds [6 x i8], [6 x i8]* %1, i64 0, i64 0
%3 = call i32 @strlen(i8* %2)
%4 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i32 %3)
ret void
}
int _close(int file) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @_close(i32 %0) {
ret i32 0
}
void vga_switcheroo_unregister_handler(void) {}


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

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

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

LLVM IR (-O2):
define void @vga_switcheroo_unregister_handler() {
ret void
}
/* Variables and functions */
float __nv_jnf(int, float);
float jnf(int __n, float __a) { return __nv_jnf(__n, __a); }


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

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

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

LLVM IR (-O2):
define float @jnf(i32 %0, float %1) {
%3 = tail call float @__nv_jnf(i32 %0, float %1)
ret float %3
}
/* Variables and functions */
int wholeWeeks(int, char *, char *, char *);
int main() { int reuslt = wholeWeeks(2014, "April", "May", "Wednesday"); }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x7de,%edi
lea    0xedc(%rip),%rsi
lea    0xedb(%rip),%rdx
lea    0xed8(%rip),%rcx
call   1030 <wholeWeeks@plt>
mov    %eax,-0x4(%rbp)
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rsi
lea    0xee7(%rip),%rdx
lea    0xee4(%rip),%rcx
mov    $0x7de,%edi
call   1030 <wholeWeeks@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [6 x i8] c"April\00"
@.str.1 = [4 x i8] c"May\00"
@.str.2 = [10 x i8] c"Wednesday\00"
define i32 @main() {
%1 = alloca i32
%2 = call i32 @wholeWeeks(i32 2014, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0))
store i32 %2, i32* %1
ret i32 0
}

LLVM IR (-O2):
@.str = [6 x i8] c"April\00"
@.str.1 = [4 x i8] c"May\00"
@.str.2 = [10 x i8] c"Wednesday\00"
define i32 @main() {
%1 = tail call i32 @wholeWeeks(i32 2014, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ BNCIO(int);
int BNCDigitRight() {
  int ii, stat = 99;
  char com1, data;
  BNCIO(45);
  return (stat);
}


x86 assembly (clang, -O0):
<BNCDigitRight>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x63,-0x8(%rbp)
mov    $0x2d,%edi
call   1030 <BNCIO@plt>
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<BNCDigitRight>:
push   %rax
mov    $0x2d,%edi
call   1030 <BNCIO@plt>
mov    $0x63,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @BNCDigitRight() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i8
%4 = alloca i8
store i32 99, i32* %2
%5 = call i32 @BNCIO(i32 45)
%6 = load i32, i32* %2
ret i32 %6
}

LLVM IR (-O2):
define i32 @BNCDigitRight() {
%1 = tail call i32 @BNCIO(i32 45)
ret i32 99
}
void CRYPTO_get_ex_data_implementation(void) {}


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

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

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

LLVM IR (-O2):
define void @CRYPTO_get_ex_data_implementation() {
ret void
}
void clear_libs(vois) {
  if (bproc_libclear()) {
    perror("VMAD_LIB_CLEAR");
    exit(1);
  }
}


x86 assembly (clang, -O0):
<clear_libs>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x0,%al
call   1050 <bproc_libclear@plt>
cmp    $0x0,%eax
je     1163 <clear_libs+0x33>
lea    0xeae(%rip),%rdi
mov    $0x0,%al
call   1030 <perror@plt>
mov    $0x1,%edi
call   1040 <exit@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<clear_libs>:
push   %rax
xor    %eax,%eax
call   1050 <bproc_libclear@plt>
test   %eax,%eax
jne    113e <clear_libs+0xe>
pop    %rax
ret
lea    0xebb(%rip),%rdi
xor    %eax,%eax
call   1030 <perror@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [15 x i8] c"VMAD_LIB_CLEAR\00"
define void @clear_libs(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 (...) @bproc_libclear()
%4 = icmp ne i32 %3, 0
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = call i32 (i8*, ...) bitcast (i32 (...)* @perror to i32 (i8*, ...)*)(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
unreachable
7: ; preds = %1
ret void
}

LLVM IR (-O2):
@.str = [15 x i8] c"VMAD_LIB_CLEAR\00"
define void @clear_libs(i32 %0) {
%2 = tail call i32 (...) @bproc_libclear()
%3 = icmp eq i32 %2, 0
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i32 (i8*, ...) bitcast (i32 (...)* @perror to i32 (i8*, ...)*)(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
tail call void @exit(i32 1)
unreachable
6: ; preds = %1
ret void
}
/* Type definitions */
struct variety {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free_object(int, short *);
void free_variety(struct variety *vty) { free_object(19, (short *)vty); }


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

x86 assembly (clang, -O2):
<free_variety>:
mov    %rdi,%rsi
mov    $0x13,%edi
jmp    1030 <free_object@plt>

LLVM IR (-O0):
%struct.variety = type { i32 }
define void @free_variety(%struct.variety* %0) {
%2 = alloca %struct.variety*
store %struct.variety* %0, %struct.variety** %2
%3 = load %struct.variety*, %struct.variety** %2
%4 = bitcast %struct.variety* %3 to i16*
%5 = call i32 @free_object(i32 19, i16* %4)
ret void
}

LLVM IR (-O2):
%struct.variety = type { i32 }
define void @free_variety(%struct.variety* %0) {
%2 = bitcast %struct.variety* %0 to i16*
%3 = tail call i32 @free_object(i32 19, i16* %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ __inc_remove_counter();
int __unlinkat(int, char const *, int);
int unlinkat(int fd, const char *path, int flag) {
  int res = __unlinkat(fd, path, flag);
  if (res == 0) {
    __inc_remove_counter();
  }
  return res;
}


x86 assembly (clang, -O0):
<unlinkat>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
call   1030 <__unlinkat@plt>
mov    %eax,-0x18(%rbp)
cmpl   $0x0,-0x18(%rbp)
jne    1155 <unlinkat+0x35>
mov    $0x0,%al
call   1040 <__inc_remove_counter@plt>
mov    -0x18(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<unlinkat>:
push   %rbx
call   1030 <__unlinkat@plt>
mov    %eax,%ebx
test   %eax,%eax
jne    1133 <unlinkat+0x13>
xor    %eax,%eax
call   1040 <__inc_remove_counter@plt>
mov    %ebx,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @unlinkat(i32 %0, i8* %1, i32 %2) {
%4 = tail call i32 @__unlinkat(i32 %0, i8* %1, i32 %2)
%5 = icmp eq i32 %4, 0
br i1 %5, label %6, label %8
6: ; preds = %3
%7 = tail call i32 (...) @__inc_remove_counter()
br label %8
8: ; preds = %6, %3
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ Fatal_OutOfMemory();
void *realloc(void *, size_t);
void *Reallocate(void *p_ptr, size_t p_new_size) {
  void *t_new_ptr;
  t_new_ptr = realloc(p_ptr, p_new_size);
  if (t_new_ptr == NULL)
    Fatal_OutOfMemory();
  return t_new_ptr;
}


x86 assembly (clang, -O0):
<Reallocate>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <realloc@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    1153 <Reallocate+0x33>
mov    $0x0,%al
call   1030 <Fatal_OutOfMemory@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Reallocate>:
push   %rbx
call   1040 <realloc@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    1135 <Reallocate+0x15>
xor    %eax,%eax
call   1030 <Fatal_OutOfMemory@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i8* @Reallocate(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 i8* @realloc(i8* %6, i64 %7)
store i8* %8, i8** %5
%9 = load i8*, i8** %5
%10 = icmp eq i8* %9, null
br i1 %10, label %11, label %13
11: ; preds = %2
%12 = call i32 (...) @Fatal_OutOfMemory()
br label %13
13: ; preds = %11, %2
%14 = load i8*, i8** %5
ret i8* %14
}

LLVM IR (-O2):
define noalias i8* @Reallocate(i8* nocapture %0, i64 %1) {
%3 = tail call i8* @realloc(i8* %0, i64 %1)
%4 = icmp eq i8* %3, null
br i1 %4, label %5, label %7
5: ; preds = %2
%6 = tail call i32 (...) @Fatal_OutOfMemory()
br label %7
7: ; preds = %5, %2
ret i8* %3
}
/* Variables and functions */
int readl(int);
int oldland_serial_tstc(void) { return (readl(0x80000000 + 0x4) & (1 << 1)); }


x86 assembly (clang, -O0):
<oldland_serial_tstc>:
push   %rbp
mov    %rsp,%rbp
mov    $0x80000004,%edi
call   1030 <readl@plt>
and    $0x2,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<oldland_serial_tstc>:
push   %rax
mov    $0x80000004,%edi
call   1030 <readl@plt>
and    $0x2,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @oldland_serial_tstc() {
%1 = call i32 @readl(i32 -2147483644)
%2 = and i32 %1, 2
ret i32 %2
}

LLVM IR (-O2):
define i32 @oldland_serial_tstc() {
%1 = tail call i32 @readl(i32 -2147483644)
%2 = and i32 %1, 2
ret i32 %2
}
/* Variables and functions */
char *estrdup(char const *);
int /*<<< orphan*/ free(char *);
char *getvar(char *);
int /*<<< orphan*/ navreset();
int /*<<< orphan*/ setvar(char *, char *);
char *resetroom(const char *dest) {
  char *sdest = estrdup(dest);
  navreset();
  setvar("room", sdest);
  free(sdest);
  return getvar("room");
}


x86 assembly (clang, -O0):
<resetroom>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1050 <estrdup@plt>
mov    %rax,-0x10(%rbp)
mov    $0x0,%al
call   1070 <navreset@plt>
mov    -0x10(%rbp),%rsi
lea    0xe85(%rip),%rdi
call   1060 <setvar@plt>
mov    -0x10(%rbp),%rdi
call   1040 <free@plt>
lea    0xe70(%rip),%rdi
call   1030 <getvar@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<resetroom>:
push   %r14
push   %rbx
push   %rax
call   1050 <estrdup@plt>
mov    %rax,%rbx
xor    %eax,%eax
call   1070 <navreset@plt>
lea    0xe96(%rip),%r14
mov    %r14,%rdi
mov    %rbx,%rsi
call   1060 <setvar@plt>
mov    %rbx,%rdi
call   1040 <free@plt>
mov    %r14,%rdi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <getvar@plt>

LLVM IR (-O0):
@.str = [5 x i8] c"room\00"
define i8* @resetroom(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i8* @estrdup(i8* %4)
store i8* %5, i8** %3
%6 = call i32 (...) @navreset()
%7 = load i8*, i8** %3
%8 = call i32 @setvar(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* %7)
%9 = load i8*, i8** %3
%10 = call i32 @free(i8* %9)
%11 = call i8* @getvar(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
ret i8* %11
}

LLVM IR (-O2):
@.str = [5 x i8] c"room\00"
define i8* @resetroom(i8* %0) {
%2 = tail call i8* @estrdup(i8* %0)
%3 = tail call i32 (...) @navreset()
%4 = tail call i32 @setvar(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* %2)
%5 = tail call i32 @free(i8* %2)
%6 = tail call i8* @getvar(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
ret i8* %6
}
int solveMeSecond(int a, int b) { return a + b; }


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

x86 assembly (clang, -O2):
<solveMeSecond>:
lea    (%rdi,%rsi,1),%eax
ret

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

LLVM IR (-O2):
define i32 @solveMeSecond(i32 %0, i32 %1) {
%3 = add nsw i32 %1, %0
ret i32 %3
}
int test_imm_62int16_reg(short val) {
  return ((val) & (-0x62 << 0)) ? -20 : -40;
}


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

x86 assembly (clang, -O2):
<test_imm_62int16_reg>:
test   $0xff9e,%edi
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_62int16_reg(i16 signext %0) {
%2 = and i16 %0, -98
%3 = icmp eq i16 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ s2rectyz(float, float, float, float, float);
void s2rectyz_(float *ymin, float *ymax, float *zmin, float *zmax, float *x) {
  s2rectyz(*ymin, *ymax, *zmin, *zmax, *x);
}


x86 assembly (clang, -O0):
<s2rectyz_>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    -0x8(%rbp),%rax
movss  (%rax),%xmm0
mov    -0x10(%rbp),%rax
movss  (%rax),%xmm1
mov    -0x18(%rbp),%rax
movss  (%rax),%xmm2
mov    -0x20(%rbp),%rax
movss  (%rax),%xmm3
mov    -0x28(%rbp),%rax
movss  (%rax),%xmm4
call   1030 <s2rectyz@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<s2rectyz_>:
movss  (%rdi),%xmm0
movss  (%rsi),%xmm1
movss  (%rdx),%xmm2
movss  (%rcx),%xmm3
movss  (%r8),%xmm4
jmp    1030 <s2rectyz@plt>

LLVM IR (-O0):
define void @s2rectyz_(float* %0, float* %1, float* %2, float* %3, float* %4) {
%6 = alloca float*
%7 = alloca float*
%8 = alloca float*
%9 = alloca float*
%10 = alloca float*
store float* %0, float** %6
store float* %1, float** %7
store float* %2, float** %8
store float* %3, float** %9
store float* %4, float** %10
%11 = load float*, float** %6
%12 = load float, float* %11
%13 = load float*, float** %7
%14 = load float, float* %13
%15 = load float*, float** %8
%16 = load float, float* %15
%17 = load float*, float** %9
%18 = load float, float* %17
%19 = load float*, float** %10
%20 = load float, float* %19
%21 = call i32 @s2rectyz(float %12, float %14, float %16, float %18, float %20)
ret void
}

LLVM IR (-O2):
define void @s2rectyz_(float* nocapture %0, float* nocapture %1, float* nocapture %2, float* nocapture %3, float* nocapture %4) {
%6 = load float, float* %0
%7 = load float, float* %1
%8 = load float, float* %2
%9 = load float, float* %3
%10 = load float, float* %4
%11 = tail call i32 @s2rectyz(float %6, float %7, float %8, float %9, float %10)
ret void
}
/* Type definitions */
struct t_config_option {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ gui_chat_prefix_build();
void config_change_prefix(const void *pointer, void *data,
                          struct t_config_option *option) {
  (void)pointer;
  (void)data;
  (void)option;
  gui_chat_prefix_build();
}


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

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

LLVM IR (-O0):
%struct.t_config_option = type { i32 }
define void @config_change_prefix(i8* %0, i8* %1, %struct.t_config_option* %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca %struct.t_config_option*
store i8* %0, i8** %4
store i8* %1, i8** %5
store %struct.t_config_option* %2, %struct.t_config_option** %6
%7 = load i8*, i8** %4
%8 = load i8*, i8** %5
%9 = load %struct.t_config_option*, %struct.t_config_option** %6
%10 = call i32 (...) @gui_chat_prefix_build()
ret void
}

LLVM IR (-O2):
%struct.t_config_option = type { i32 }
define void @config_change_prefix(i8* nocapture readnone %0, i8* nocapture readnone %1, %struct.t_config_option* nocapture readnone %2) {
%4 = tail call i32 (...) @gui_chat_prefix_build()
ret void
}
void io_cli() { asm volatile("cli"); }


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

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

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

LLVM IR (-O2):
define void @io_cli() {
tail call void asm sideeffect "cli", "~{dirflag},~{fpsr},~{flags}"()
ret void
}