xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
int main(int argc, char *argv[]) {
  printf("Hello from %s!\n", argv[0]);
  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    -0x10(%rbp),%rax
mov    (%rax),%rsi
lea    0xecc(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [16 x i8] c"Hello from %s!\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = load i8**, i8*** %5
%7 = getelementptr inbounds i8*, i8** %6, i64 0
%8 = load i8*, i8** %7
%9 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i8* %8)
ret i32 0
}

LLVM IR (-O2):
@.str = [16 x i8] c"Hello from %s!\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = load i8*, i8** %1
%4 = tail call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i8* %3)
ret i32 0
}
double average(double a, double b) { return b ? a / b : 0; }


x86 assembly (clang, -O0):
<average>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    112b <average+0x2b>
jp     112b <average+0x2b>
jmp    113f <average+0x3f>
movsd  -0x8(%rbp),%xmm0
divsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
jmp    114c <average+0x4c>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x18(%rbp)
jmp    114c <average+0x4c>
movsd  -0x18(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<average>:
xorpd  %xmm2,%xmm2
ucomisd %xmm2,%xmm1
jne    110c <average+0xc>
jnp    1114 <average+0x14>
divsd  %xmm1,%xmm0
movapd %xmm0,%xmm2
movapd %xmm2,%xmm0
ret

LLVM IR (-O0):
define double @average(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = load double, double* %4
%6 = fcmp une double %5, 0.000000e+00
br i1 %6, label %7, label %11
7: ; preds = %2
%8 = load double, double* %3
%9 = load double, double* %4
%10 = fdiv double %8, %9
br label %12
11: ; preds = %2
br label %12
12: ; preds = %11, %7
%13 = phi double [ %10, %7 ], [ 0.000000e+00, %11 ]
ret double %13
}

LLVM IR (-O2):
define double @average(double %0, double %1) {
%3 = fcmp une double %1, 0.000000e+00
%4 = fdiv double %0, %1
%5 = select i1 %3, double %4, double 0.000000e+00
ret double %5
}
/* Variables and functions */
int /*<<< orphan*/ _PROCEDURE_LINKAGE_TABLE_();
void strerror() {
  _PROCEDURE_LINKAGE_TABLE_();
  return;
}


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

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

LLVM IR (-O0):
define void @strerror() {
%1 = call i32 (...) @_PROCEDURE_LINKAGE_TABLE_()
ret void
}

LLVM IR (-O2):
define void @strerror() {
%1 = tail call i32 (...) @_PROCEDURE_LINKAGE_TABLE_()
ret void
}
int smb347_get_aicl_result(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @smb347_get_aicl_result() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ munmap(void *, int);
int drvFPGA_Munmap(void *pntr, int len) {
  munmap(pntr, len);
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @drvFPGA_Munmap(i8* %0, i32 %1) {
%3 = tail call i32 @munmap(i8* %0, i32 %1)
ret i32 0
}
/* Variables and functions */
int li_rand_device_bytes(unsigned char *, int);
int /*<<< orphan*/ li_rand_pseudo_bytes(unsigned char *, int);
int li_rand_bytes(unsigned char *buf, int num) {
  if (1 == li_rand_device_bytes(buf, num)) {
    return 1;
  } else {
    li_rand_pseudo_bytes(buf, num);
    return 0;
  }
}


x86 assembly (clang, -O0):
<li_rand_bytes>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%esi
call   1030 <li_rand_device_bytes@plt>
mov    %eax,%ecx
mov    $0x1,%eax
cmp    %ecx,%eax
jne    1156 <li_rand_bytes+0x36>
movl   $0x1,-0x4(%rbp)
jmp    1169 <li_rand_bytes+0x49>
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%esi
call   1040 <li_rand_pseudo_bytes@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<li_rand_bytes>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %rdi,%rbx
call   1030 <li_rand_device_bytes@plt>
mov    %eax,%ecx
mov    $0x1,%eax
cmp    $0x1,%ecx
je     1145 <li_rand_bytes+0x25>
mov    %rbx,%rdi
mov    %ebp,%esi
call   1040 <li_rand_pseudo_bytes@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @li_rand_bytes(i8* %0, i32 %1) {
%3 = tail call i32 @li_rand_device_bytes(i8* %0, i32 %1)
%4 = icmp eq i32 %3, 1
br i1 %4, label %7, label %5
5: ; preds = %2
%6 = tail call i32 @li_rand_pseudo_bytes(i8* %0, i32 %1)
br label %7
7: ; preds = %2, %5
%8 = phi i32 [ 0, %5 ], [ 1, %2 ]
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char const *);
int usage(const char *pname, int exit) {
  printf("Usage: %s FILE\n"
         "\n"
         "Dump the current state from file FILE.\n",
         pname);
  return exit;
}


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

x86 assembly (clang, -O2):
<usage>:
push   %rbx
mov    %esi,%ebx
mov    %rdi,%rsi
lea    0xee3(%rip),%rdi
call   1030 <printf@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [56 x i8] c"Usage: %s FILE\0A\0ADump the current state from file FILE.\0A\00"
define i32 @usage(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 = call i32 @printf(i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str, i64 0, i64 0), i8* %5)
%7 = load i32, i32* %4
ret i32 %7
}

LLVM IR (-O2):
@.str = [56 x i8] c"Usage: %s FILE\0A\0ADump the current state from file FILE.\0A\00"
define i32 @usage(i8* %0, i32 returned %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str, i64 0, i64 0), i8* %0)
ret i32 %1
}
/* Variables and functions */
int *malloc(int);
int *realloc(int *, int);
int *f5() {
  int *q = malloc(12);
  q = realloc(q, 20);
  return q;
}


x86 assembly (clang, -O0):
<f5>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0xc,%edi
call   1030 <malloc@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x14,%esi
call   1040 <realloc@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f5>:
push   %rax
mov    $0xc,%edi
call   1030 <malloc@plt>
mov    %rax,%rdi
mov    $0x14,%esi
pop    %rax
jmp    1040 <realloc@plt>

LLVM IR (-O0):
define i32* @f5() {
%1 = alloca i32*
%2 = call i32* @malloc(i32 12)
store i32* %2, i32** %1
%3 = load i32*, i32** %1
%4 = call i32* @realloc(i32* %3, i32 20)
store i32* %4, i32** %1
%5 = load i32*, i32** %1
ret i32* %5
}

LLVM IR (-O2):
define i32* @f5() {
%1 = tail call i32* @malloc(i32 12)
%2 = tail call i32* @realloc(i32* %1, i32 20)
ret i32* %2
}
void RFA1RadioP__SoftwareAckConfig__reportChannelError(void) {}


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

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

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

LLVM IR (-O2):
define void @RFA1RadioP__SoftwareAckConfig__reportChannelError() {
ret void
}
A(x) {
  int y[9999];
  return 2 * (x + 3);
}


x86 assembly (clang, -O0):
<A>:
push   %rbp
mov    %rsp,%rbp
sub    $0x9bc0,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x3,%eax
shl    $0x1,%eax
add    $0x9bc0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<A>:
lea    (%rdi,%rdi,1),%eax
add    $0x6,%eax
ret

LLVM IR (-O0):
define i32 @A(i32 %0) {
%2 = alloca i32
%3 = alloca [9999 x i32]
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = add nsw i32 %4, 3
%6 = mul nsw i32 2, %5
ret i32 %6
}

LLVM IR (-O2):
define i32 @A(i32 %0) {
%2 = shl i32 %0, 1
%3 = add i32 %2, 6
ret i32 %3
}
/* Type definitions */
struct VariableShare {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ RVS_LocalVariableChanged(struct VariableShare *,
                                            unsigned int);
int RVS_LocalVariableIsUptodate(struct VariableShare *vsh,
                                unsigned int var_id) {
  return (!RVS_LocalVariableChanged(vsh, var_id));
}


x86 assembly (clang, -O0):
<RVS_LocalVariableIsUptodate>:
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 <RVS_LocalVariableChanged@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.VariableShare = type { i32 }
define i32 @RVS_LocalVariableIsUptodate(%struct.VariableShare* %0, i32 %1) {
%3 = alloca %struct.VariableShare*
%4 = alloca i32
store %struct.VariableShare* %0, %struct.VariableShare** %3
store i32 %1, i32* %4
%5 = load %struct.VariableShare*, %struct.VariableShare** %3
%6 = load i32, i32* %4
%7 = call i32 @RVS_LocalVariableChanged(%struct.VariableShare* %5, i32 %6)
%8 = icmp ne i32 %7, 0
%9 = xor i1 %8, true
%10 = zext i1 %9 to i32
ret i32 %10
}

LLVM IR (-O2):
%struct.VariableShare = type { i32 }
define i32 @RVS_LocalVariableIsUptodate(%struct.VariableShare* %0, i32 %1) {
%3 = tail call i32 @RVS_LocalVariableChanged(%struct.VariableShare* %0, i32 %1)
%4 = icmp eq i32 %3, 0
%5 = zext i1 %4 to i32
ret i32 %5
}
char nand_gate(char x, char y) {
  if (x == '1' && y == '1') {
    return '0';
  } else {
    return '1';
  }
}


x86 assembly (clang, -O0):
<nand_gate>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x2(%rbp)
mov    %al,-0x3(%rbp)
movsbl -0x2(%rbp),%eax
cmp    $0x31,%eax
jne    1133 <nand_gate+0x33>
movsbl -0x3(%rbp),%eax
cmp    $0x31,%eax
jne    1133 <nand_gate+0x33>
movb   $0x30,-0x1(%rbp)
jmp    1137 <nand_gate+0x37>
movb   $0x31,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<nand_gate>:
xor    $0x31,%dil
xor    $0x31,%sil
or     %dil,%sil
sete   %al
xor    $0x31,%al
ret

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

LLVM IR (-O2):
define signext i8 @nand_gate(i8 signext %0, i8 signext %1) {
%3 = icmp eq i8 %0, 49
%4 = icmp eq i8 %1, 49
%5 = and i1 %3, %4
%6 = select i1 %5, i8 48, i8 49
ret i8 %6
}
AR0AR1(r0, r1, x0, x1, p0, p1) int r0, r1;
int *p0, *p1;
{
  if ((p0[10000000]) <= (p1[1111111 / 4]))
    return 1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<AR0AR1>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    %r8,-0x20(%rbp)
mov    %r9,-0x28(%rbp)
mov    -0x20(%rbp),%rax
mov    0x2625a00(%rax),%eax
mov    -0x28(%rbp),%rcx
cmp    0x10f444(%rcx),%eax
jg     113e <AR0AR1+0x3e>
movl   $0x1,-0x4(%rbp)
jmp    1145 <AR0AR1+0x45>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<AR0AR1>:
mov    0x2625a00(%r8),%ecx
xor    %eax,%eax
cmp    0x10f444(%r9),%ecx
setle  %al
ret

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

LLVM IR (-O2):
define i32 @AR0AR1(i32 %0, i32 %1, i32 %2, i32 %3, i32* nocapture %4, i32* nocapture %5) {
%7 = getelementptr inbounds i32, i32* %4, i64 10000000
%8 = load i32, i32* %7
%9 = getelementptr inbounds i32, i32* %5, i64 277777
%10 = load i32, i32* %9
%11 = icmp sle i32 %8, %10
%12 = zext i1 %11 to i32
ret i32 %12
}
/* Variables and functions */
int /*<<< orphan*/ timer1PWMAOff();
int /*<<< orphan*/ timer1PWMBOff();
void neutral(void) {
  timer1PWMAOff();
  timer1PWMBOff();
}


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

x86 assembly (clang, -O2):
<neutral>:
push   %rax
xor    %eax,%eax
call   1040 <timer1PWMAOff@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <timer1PWMBOff@plt>

LLVM IR (-O0):
define void @neutral() {
%1 = call i32 (...) @timer1PWMAOff()
%2 = call i32 (...) @timer1PWMBOff()
ret void
}

LLVM IR (-O2):
define void @neutral() {
%1 = tail call i32 (...) @timer1PWMAOff()
%2 = tail call i32 (...) @timer1PWMBOff()
ret void
}
/* Type definitions */
struct stat {
  scalar_t__ st_size;
};

/* Variables and functions */
scalar_t__ stat(char *, struct stat *);
int get_file_size(char *filename) {
  struct stat buf;
  if (stat(filename, &buf) == 0) {
    if (buf.st_size == 0)
      return buf.st_size;
  }
  return -1;
}


x86 assembly (clang, -O0):
<get_file_size>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    -0x18(%rbp),%rsi
call   1030 <stat@plt>
cmp    $0x0,%rax
jne    114f <get_file_size+0x3f>
cmpq   $0x0,-0x18(%rbp)
jne    114a <get_file_size+0x3a>
mov    -0x18(%rbp),%rax
mov    %eax,-0x4(%rbp)
jmp    1156 <get_file_size+0x46>
jmp    114f <get_file_size+0x3f>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_file_size>:
push   %rax
mov    %rsp,%rsi
call   1030 <stat@plt>
xor    %ecx,%ecx
or     (%rsp),%rax
setne  %cl
neg    %ecx
mov    %ecx,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
%struct.stat = type { i64 }
define i32 @get_file_size(i8* %0) {
%2 = alloca %struct.stat
%3 = bitcast %struct.stat* %2 to i8*
%4 = call i64 @stat(i8* %0, %struct.stat* %2)
%5 = icmp ne i64 %4, 0
%6 = getelementptr inbounds %struct.stat, %struct.stat* %2, i64 0, i32 0
%7 = load i64, i64* %6
%8 = icmp ne i64 %7, 0
%9 = select i1 %5, i1 true, i1 %8
%10 = sext i1 %9 to i32
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ i2c_DisableNoiseFilter(int);
void i2c1_DisableNoiseFilter(void) { i2c_DisableNoiseFilter(1); }


x86 assembly (clang, -O0):
<i2c1_DisableNoiseFilter>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%edi
call   1030 <i2c_DisableNoiseFilter@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<i2c1_DisableNoiseFilter>:
mov    $0x1,%edi
jmp    1030 <i2c_DisableNoiseFilter@plt>

LLVM IR (-O0):
define void @i2c1_DisableNoiseFilter() {
%1 = call i32 @i2c_DisableNoiseFilter(i32 1)
ret void
}

LLVM IR (-O2):
define void @i2c1_DisableNoiseFilter() {
%1 = tail call i32 @i2c_DisableNoiseFilter(i32 1)
ret void
}
void CRYPTO_set_dynlock_lock_callback(void (*dyn_lock_function)(
    int mode, struct CRYPTO_dynlock_value *l, const char *file, int line)) {
  return;
}


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

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

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

LLVM IR (-O2):
%struct.CRYPTO_dynlock_value = type opaque
define void @CRYPTO_set_dynlock_lock_callback(void (i32, %struct.CRYPTO_dynlock_value*, i8*, i32)* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ error(int /*<<< orphan*/, int /*<<< orphan*/, char *);
int /*<<< orphan*/ exit(int /*<<< orphan*/);
void onsigalrm(int sig) {
  error(0, 0, "exit as requested");
  exit(0);
}


x86 assembly (clang, -O0):
<onsigalrm>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
xor    %esi,%esi
lea    0xecc(%rip),%rdx
mov    %esi,%edi
call   1030 <error@plt>
xor    %edi,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<onsigalrm>:
push   %rax
lea    0xed8(%rip),%rdx
xor    %edi,%edi
xor    %esi,%esi
call   1030 <error@plt>
xor    %edi,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [18 x i8] c"exit as requested\00"
define void @onsigalrm(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @error(i32 0, i32 0, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@.str = [18 x i8] c"exit as requested\00"
define void @onsigalrm(i32 %0) {
%2 = tail call i32 @error(i32 0, i32 0, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @exit(i32 0)
unreachable
}
/* Variables and functions */
int EXIT_SUCCESS;
char *get_line();
int /*<<< orphan*/ printf(char *, char *, int);
int strlen(char *);
char *trim(char *);
int main(void) {
  char *text = get_line();
  printf("%s %d\n", text, strlen(text));
  printf("%s %d\n", trim(text), strlen(trim(text)));
  return (EXIT_SUCCESS);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <get_line@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <strlen@plt>
mov    -0x20(%rbp),%rsi
mov    %eax,%edx
lea    0xe88(%rip),%rdi
call   1050 <printf@plt>
mov    -0x10(%rbp),%rdi
call   1060 <trim@plt>
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1060 <trim@plt>
mov    %rax,%rdi
call   1040 <strlen@plt>
mov    -0x18(%rbp),%rsi
mov    %eax,%edx
lea    0xe58(%rip),%rdi
call   1050 <printf@plt>
mov    0x2e2c(%rip),%rax
mov    (%rax),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
xor    %eax,%eax
call   1030 <get_line@plt>
mov    %rax,%rbx
mov    %rax,%rdi
call   1040 <strlen@plt>
lea    0xea2(%rip),%r14
mov    %r14,%rdi
mov    %rbx,%rsi
mov    %eax,%edx
call   1050 <printf@plt>
mov    %rbx,%rdi
call   1060 <trim@plt>
mov    %rax,%r15
mov    %rbx,%rdi
call   1060 <trim@plt>
mov    %rax,%rdi
call   1040 <strlen@plt>
mov    %r14,%rdi
mov    %r15,%rsi
mov    %eax,%edx
call   1050 <printf@plt>
mov    0x2e46(%rip),%rax
mov    (%rax),%eax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [7 x i8] c"%s %d\0A\00"
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = alloca i32
%2 = alloca i8*
store i32 0, i32* %1
%3 = call i8* (...) @get_line()
store i8* %3, i8** %2
%4 = load i8*, i8** %2
%5 = load i8*, i8** %2
%6 = call i32 @strlen(i8* %5)
%7 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* %4, i32 %6)
%8 = load i8*, i8** %2
%9 = call i8* @trim(i8* %8)
%10 = load i8*, i8** %2
%11 = call i8* @trim(i8* %10)
%12 = call i32 @strlen(i8* %11)
%13 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* %9, i32 %12)
%14 = load i32, i32* @EXIT_SUCCESS
ret i32 %14
}

LLVM IR (-O2):
@.str = [7 x i8] c"%s %d\0A\00"
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = tail call i8* (...) @get_line()
%2 = tail call i32 @strlen(i8* %1)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* %1, i32 %2)
%4 = tail call i8* @trim(i8* %1)
%5 = tail call i8* @trim(i8* %1)
%6 = tail call i32 @strlen(i8* %5)
%7 = tail call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* %4, i32 %6)
%8 = load i32, i32* @EXIT_SUCCESS
ret i32 %8
}
/* Variables and functions */
void *malloc(size_t);
int /*<<< orphan*/ memset(void *, int /*<<< orphan*/, size_t);
void *calloc(size_t nmemb, size_t size) {
  void *ret;
  ret = malloc(nmemb * size);
  if (ret != ((void *)0))
    memset(ret, 0, nmemb * size);
  return ret;
}


x86 assembly (clang, -O0):
<calloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
imul   -0x10(%rbp),%rdi
call   1040 <malloc@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     1161 <calloc+0x41>
mov    -0x18(%rbp),%rdi
mov    -0x8(%rbp),%rdx
imul   -0x10(%rbp),%rdx
xor    %esi,%esi
call   1030 <memset@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<calloc>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
imul   %rsi,%rbx
mov    %rbx,%rdi
call   1040 <malloc@plt>
mov    %rax,%r14
test   %rax,%rax
je     1148 <calloc+0x28>
mov    %r14,%rdi
xor    %esi,%esi
mov    %rbx,%rdx
call   1030 <memset@plt>
mov    %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i8* @calloc(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* %3
%7 = load i64, i64* %4
%8 = mul i64 %6, %7
%9 = call i8* @malloc(i64 %8)
store i8* %9, i8** %5
%10 = load i8*, i8** %5
%11 = icmp ne i8* %10, null
br i1 %11, label %12, label %18
12: ; preds = %2
%13 = load i8*, i8** %5
%14 = load i64, i64* %3
%15 = load i64, i64* %4
%16 = mul i64 %14, %15
%17 = call i32 @memset(i8* %13, i32 0, i64 %16)
br label %18
18: ; preds = %12, %2
%19 = load i8*, i8** %5
ret i8* %19
}

LLVM IR (-O2):
define i8* @calloc(i64 %0, i64 %1) {
%3 = mul i64 %1, %0
%4 = tail call i8* @malloc(i64 %3)
%5 = icmp eq i8* %4, null
br i1 %5, label %8, label %6
6: ; preds = %2
%7 = tail call i32 @memset(i8* %4, i32 0, i64 %3)
br label %8
8: ; preds = %6, %2
ret i8* %4
}
void not_annotated_c_1_3() {}


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

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

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

LLVM IR (-O2):
define void @not_annotated_c_1_3() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, float);
int main(int argc, const char *argv[]) {
  float weight;
  weight = 14.2;
  printf("The turkey weights %f.\n", weight);
  float cookingTime;
  cookingTime = 15.0 + 15.0 * weight;
  printf("Cook it for %f minutes.\n", cookingTime);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movss  0xeda(%rip),%xmm0
movss  %xmm0,-0x14(%rbp)
movss  -0x14(%rbp),%xmm0
lea    0xecd(%rip),%rdi
call   1030 <printf@plt>
movss  -0x14(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xeab(%rip),%xmm1
mulsd  %xmm1,%xmm0
addsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x18(%rbp)
movss  -0x18(%rbp),%xmm0
lea    0xeb2(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [24 x i8] c"The turkey weights %f.\0A\00"
@.str.1 = [25 x i8] c"Cook it for %f minutes.\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca float
%7 = alloca float
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store float 0x402C666660000000, float* %6
%8 = load float, float* %6
%9 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), float %8)
%10 = load float, float* %6
%11 = fpext float %10 to double
%12 = call double @llvm.fmuladd.f64(double 1.500000e+01, double %11, double 1.500000e+01)
%13 = fptrunc double %12 to float
store float %13, float* %7
%14 = load float, float* %7
%15 = call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.1, i64 0, i64 0), float %14)
ret i32 0
}

LLVM IR (-O2):
@.str = [24 x i8] c"The turkey weights %f.\0A\00"
@.str.1 = [25 x i8] c"Cook it for %f minutes.\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), float 0x402C666660000000)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.1, i64 0, i64 0), float 2.280000e+02)
ret i32 0
}
/* Variables and functions */
char *filesys_decompressor_for_file(char *);
int compressed_filename_p(char *filename) {
  char *decompressor;
  decompressor = filesys_decompressor_for_file(filename);
  if (decompressor)
    return (1);
  else
    return (0);
}


x86 assembly (clang, -O0):
<compressed_filename_p>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <filesys_decompressor_for_file@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     1140 <compressed_filename_p+0x30>
movl   $0x1,-0x4(%rbp)
jmp    1147 <compressed_filename_p+0x37>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @compressed_filename_p(i8* %0) {
%2 = tail call i8* @filesys_decompressor_for_file(i8* %0)
%3 = icmp ne i8* %2, null
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void test_func(void) { printf("test_func: version 2\n"); }


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

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

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

LLVM IR (-O2):
@str = [21 x i8] c"test_func: version 2\00"
define void @test_func() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ my_putchar(char);
int my_putstr(char *str) {
  int i;
  i = 0;
  while (str[i]) {
    my_putchar(str[i]);
    ++i;
  }
  return (0);
}


x86 assembly (clang, -O0):
<my_putstr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
cmpb   $0x0,(%rax,%rcx,1)
je     1154 <my_putstr+0x44>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movsbl (%rax,%rcx,1),%edi
call   1030 <my_putchar@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1123 <my_putstr+0x13>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<my_putstr>:
push   %rbx
mov    (%rdi),%al
test   %al,%al
je     1133 <my_putstr+0x23>
mov    %rdi,%rbx
add    $0x1,%rbx
xchg   %ax,%ax
movsbl %al,%edi
call   1030 <my_putchar@plt>
movzbl (%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1120 <my_putstr+0x10>
xor    %eax,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @my_putstr(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %12, label %4
4: ; preds = %1, %4
%5 = phi i64 [ %8, %4 ], [ 0, %1 ]
%6 = phi i8 [ %10, %4 ], [ %2, %1 ]
%7 = tail call i32 @my_putchar(i8 signext %6)
%8 = add nuw i64 %5, 1
%9 = getelementptr inbounds i8, i8* %0, i64 %8
%10 = load i8, i8* %9
%11 = icmp eq i8 %10, 0
br i1 %11, label %12, label %4
12: ; preds = %4, %1
ret i32 0
}
void test_promote_or_convert2(float _Complex fc) {
  int *cp = promote_or_convert2(fc);
}


x86 assembly (clang, -O0):
<test_promote_or_convert2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movlpd %xmm0,-0x8(%rbp)
movss  -0x8(%rbp),%xmm1
movss  -0x4(%rbp),%xmm0
movss  %xmm1,-0x18(%rbp)
movss  %xmm0,-0x14(%rbp)
movsd  -0x18(%rbp),%xmm0
mov    $0x1,%al
call   1030 <promote_or_convert2@plt>
cltq
mov    %rax,-0x10(%rbp)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_promote_or_convert2>:
mov    $0x1,%al
jmp    1030 <promote_or_convert2@plt>

LLVM IR (-O0):
define void @test_promote_or_convert2(<2 x float> %0) {
%2 = alloca { float, float }
%3 = alloca i32*
%4 = alloca { float, float }
%5 = bitcast { float, float }* %2 to <2 x float>*
store <2 x float> %0, <2 x float>* %5
%6 = getelementptr inbounds { float, float }, { float, float }* %2, i32 0, i32 0
%7 = load float, float* %6
%8 = getelementptr inbounds { float, float }, { float, float }* %2, i32 0, i32 1
%9 = load float, float* %8
%10 = getelementptr inbounds { float, float }, { float, float }* %4, i32 0, i32 0
%11 = getelementptr inbounds { float, float }, { float, float }* %4, i32 0, i32 1
store float %7, float* %10
store float %9, float* %11
%12 = bitcast { float, float }* %4 to <2 x float>*
%13 = load <2 x float>, <2 x float>* %12
%14 = call i32 (<2 x float>, ...) bitcast (i32 (...)* @promote_or_convert2 to i32 (<2 x float>, ...)*)(<2 x float> %13)
%15 = sext i32 %14 to i64
%16 = inttoptr i64 %15 to i32*
store i32* %16, i32** %3
ret void
}

LLVM IR (-O2):
define void @test_promote_or_convert2(<2 x float> %0) {
%2 = tail call i32 (<2 x float>, ...) bitcast (i32 (...)* @promote_or_convert2 to i32 (<2 x float>, ...)*)(<2 x float> %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ RAND_load_file(char *, int);
int openssl_tool_seed_prng(int bytes) {
  if (!RAND_load_file("/dev/urandom", bytes))
    return 0;
  return 1;
}


x86 assembly (clang, -O0):
<openssl_tool_seed_prng>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%esi
lea    0xedb(%rip),%rdi
call   1030 <RAND_load_file@plt>
cmp    $0x0,%eax
jne    113f <openssl_tool_seed_prng+0x2f>
movl   $0x0,-0x4(%rbp)
jmp    1146 <openssl_tool_seed_prng+0x36>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<openssl_tool_seed_prng>:
push   %rax
mov    %edi,%esi
lea    0xee6(%rip),%rdi
call   1030 <RAND_load_file@plt>
xor    %ecx,%ecx
test   %eax,%eax
setne  %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [13 x i8] c"/dev/urandom\00"
define i32 @openssl_tool_seed_prng(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = call i32 @RAND_load_file(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32 %4)
%6 = icmp ne i32 %5, 0
br i1 %6, label %8, label %7
7: ; preds = %1
store i32 0, i32* %2
br label %9
8: ; preds = %1
store i32 1, i32* %2
br label %9
9: ; preds = %8, %7
%10 = load i32, i32* %2
ret i32 %10
}

LLVM IR (-O2):
@.str = [13 x i8] c"/dev/urandom\00"
define i32 @openssl_tool_seed_prng(i32 %0) {
%2 = tail call i32 @RAND_load_file(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32 %0)
%3 = icmp ne i32 %2, 0
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int R32(int);
int /*<<< orphan*/ W32(int, char const);
void uart_write(const char ch) {
  while (R32((((0x3F000000 + 0x200000) + 0x1000) + 0x18)) & (1 << 5)) {
  }
  W32((((0x3F000000 + 0x200000) + 0x1000) + 0x00), ch);
}


x86 assembly (clang, -O0):
<uart_write>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    $0x3f201018,%edi
call   1040 <R32@plt>
and    $0x20,%eax
cmp    $0x0,%eax
je     1149 <uart_write+0x29>
jmp    112e <uart_write+0xe>
mov    $0x3f201000,%edi
movsbl -0x1(%rbp),%esi
call   1030 <W32@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<uart_write>:
push   %rbx
mov    %edi,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    $0x3f201018,%edi
call   1040 <R32@plt>
test   $0x20,%al
jne    1130 <uart_write+0x10>
movsbl %bl,%esi
mov    $0x3f201000,%edi
pop    %rbx
jmp    1030 <W32@plt>

LLVM IR (-O0):
define void @uart_write(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
br label %3
3: ; preds = %7, %1
%4 = call i32 @R32(i32 1059065880)
%5 = and i32 %4, 32
%6 = icmp ne i32 %5, 0
br i1 %6, label %7, label %8
7: ; preds = %3
br label %3
8: ; preds = %3
%9 = load i8, i8* %2
%10 = call i32 @W32(i32 1059065856, i8 signext %9)
ret void
}

LLVM IR (-O2):
define void @uart_write(i8 signext %0) {
br label %2
2: ; preds = %2, %1
%3 = tail call i32 @R32(i32 1059065880)
%4 = and i32 %3, 32
%5 = icmp eq i32 %4, 0
br i1 %5, label %6, label %2
6: ; preds = %2
%7 = tail call i32 @W32(i32 1059065856, i8 signext %0)
ret void
}
/* Variables and functions */
int memcmp(void *, void *, size_t);
int strncmp(const char *str1, const char *str2, size_t num) {
  return memcmp((void *)str1, (void *)str2, num);
}


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

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

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

LLVM IR (-O2):
define i32 @strncmp(i8* nocapture %0, i8* nocapture %1, i64 %2) {
%4 = tail call i32 @memcmp(i8* %0, i8* %1, i64 %2)
ret i32 %4
}
/* Variables and functions */
void *contract_non_null(void const *, char const *, char const *, int,
                        char const *, char *);
void *_contract_requires_non_null(const void *x, const char *x_s,
                                  const char *file, int line,
                                  const char *func) {
  return contract_non_null(x, x_s, file, line, func,
                           "%s:%d: %s: Requires `%s' != NULL failed.\n");
}


x86 assembly (clang, -O0):
<_contract_requires_non_null>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    %r8,-0x28(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x1c(%rbp),%ecx
mov    -0x28(%rbp),%r8
lea    0xebb(%rip),%r9
call   1030 <contract_non_null@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_contract_requires_non_null>:
lea    0xee9(%rip),%r9
jmp    1030 <contract_non_null@plt>

LLVM IR (-O0):
@.str = [42 x i8] c"%s:%d: %s: Requires `%s' != NULL failed.\0A\00"
define i8* @_contract_requires_non_null(i8* %0, i8* %1, i8* %2, i32 %3, i8* %4) {
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i8*
%9 = alloca i32
%10 = alloca i8*
store i8* %0, i8** %6
store i8* %1, i8** %7
store i8* %2, i8** %8
store i32 %3, i32* %9
store i8* %4, i8** %10
%11 = load i8*, i8** %6
%12 = load i8*, i8** %7
%13 = load i8*, i8** %8
%14 = load i32, i32* %9
%15 = load i8*, i8** %10
%16 = call i8* @contract_non_null(i8* %11, i8* %12, i8* %13, i32 %14, i8* %15, i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0))
ret i8* %16
}

LLVM IR (-O2):
@.str = [42 x i8] c"%s:%d: %s: Requires `%s' != NULL failed.\0A\00"
define i8* @_contract_requires_non_null(i8* %0, i8* %1, i8* %2, i32 %3, i8* %4) {
%6 = tail call i8* @contract_non_null(i8* %0, i8* %1, i8* %2, i32 %3, i8* %4, i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0))
ret i8* %6
}
void I422ToRGB565Row_SSSE3() {}


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

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

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

LLVM IR (-O2):
define void @I422ToRGB565Row_SSSE3() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void fkbd_usage(void) {
  printf("FKBD options:\n"
         "--fkbd\n"
         "      select FoxyKBD application.\n"
         "--injection=<interval>[:<delay>:<runtime>]\n"
         "      enable key injection timing on virtio console.\n"
         "--netlog<index>[=<filename>]\n"
         "      enable logging on virtio network device instance <index>.\n"
         "--hddlog<index>[=<filename>]\n"
         "      enable logging on virtio block device instance <index>.\n"
         "--coalesce=<timeout>\n"
         "      specify log coalescing timeout in mili-seconds.\n");
  return;
}


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

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

LLVM IR (-O0):
@.str = [411 x i8] c"FKBD options:\0A--fkbd\0A select FoxyKBD application.\0A--injection=<interval>[:<delay>:<runtime>]\0A enable key injection timing on virtio console.\0A--netlog<index>[=<filename>]\0A enable logging on virtio network device instance <index>.\0A--hddlog<index>[=<filename>]\0A enable logging on virtio block device instance <index>.\0A--coalesce=<timeout>\0A specify log coalescing timeout in mili-seconds.\0A\00"
define void @fkbd_usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([411 x i8], [411 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [410 x i8] c"FKBD options:\0A--fkbd\0A select FoxyKBD application.\0A--injection=<interval>[:<delay>:<runtime>]\0A enable key injection timing on virtio console.\0A--netlog<index>[=<filename>]\0A enable logging on virtio network device instance <index>.\0A--hddlog<index>[=<filename>]\0A enable logging on virtio block device instance <index>.\0A--coalesce=<timeout>\0A specify log coalescing timeout in mili-seconds.\00"
define void @fkbd_usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([410 x i8], [410 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ WHSync();
void StateRestore(int version) { WHSync(); }


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

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

LLVM IR (-O0):
define void @StateRestore(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 (...) @WHSync()
ret void
}

LLVM IR (-O2):
define void @StateRestore(i32 %0) {
%2 = tail call i32 (...) @WHSync()
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ sqlite3_vtab;

/* Variables and functions */
int cXRelease(int /*<<< orphan*/ *, int);
int cXDestroy(sqlite3_vtab *pVTab) { return cXRelease(pVTab, 1); }


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

x86 assembly (clang, -O2):
<cXDestroy>:
mov    $0x1,%esi
jmp    1030 <cXRelease@plt>

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

LLVM IR (-O2):
define i32 @cXDestroy(i32* %0) {
%2 = tail call i32 @cXRelease(i32* %0, i32 1)
ret i32 %2
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
void screen_ssd1306_set_startpage(uint8_t page) {}


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

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

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

LLVM IR (-O2):
define void @screen_ssd1306_set_startpage(i32 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int pa_stream_prebuf() {
  printf("NOT IMPLEMENTED:"
         "pa_stream_prebuf"
         "\n");
}


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

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

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

LLVM IR (-O2):
@str = [33 x i8] c"NOT IMPLEMENTED:pa_stream_prebuf\00"
define i32 @pa_stream_prebuf() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @str, i64 0, i64 0))
ret i32 undef
}
/* Variables and functions */
scalar_t__ pow(int, int);
int sqrt(scalar_t__);
int dist(int ghost[3], int pac[3]) {
  int a;
  a = sqrt((pow((ghost[0] - pac[0]), 2)) + (pow((ghost[1] - pac[1]), 2)));
  return a;
}


x86 assembly (clang, -O0):
<dist>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rax
sub    (%rax),%edi
mov    $0x2,%esi
call   1030 <pow@plt>
mov    %rax,-0x20(%rbp)
mov    -0x8(%rbp),%rax
mov    0x4(%rax),%edi
mov    -0x10(%rbp),%rax
sub    0x4(%rax),%edi
mov    $0x2,%esi
call   1030 <pow@plt>
mov    -0x20(%rbp),%rdi
add    %rax,%rdi
call   1040 <sqrt@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dist>:
push   %r15
push   %r14
push   %rbx
mov    %rsi,%r14
mov    %rdi,%r15
mov    (%rdi),%edi
sub    (%rsi),%edi
mov    $0x2,%esi
call   1030 <pow@plt>
mov    %rax,%rbx
mov    0x4(%r15),%edi
sub    0x4(%r14),%edi
mov    $0x2,%esi
call   1030 <pow@plt>
add    %rax,%rbx
mov    %rbx,%rdi
pop    %rbx
pop    %r14
pop    %r15
jmp    1040 <sqrt@plt>

LLVM IR (-O0):
define i32 @dist(i32* %0, i32* %1) {
%3 = alloca i32*
%4 = alloca i32*
%5 = alloca i32
store i32* %0, i32** %3
store i32* %1, i32** %4
%6 = load i32*, i32** %3
%7 = getelementptr inbounds i32, i32* %6, i64 0
%8 = load i32, i32* %7
%9 = load i32*, i32** %4
%10 = getelementptr inbounds i32, i32* %9, i64 0
%11 = load i32, i32* %10
%12 = sub nsw i32 %8, %11
%13 = call i64 @pow(i32 %12, i32 2)
%14 = load i32*, i32** %3
%15 = getelementptr inbounds i32, i32* %14, i64 1
%16 = load i32, i32* %15
%17 = load i32*, i32** %4
%18 = getelementptr inbounds i32, i32* %17, i64 1
%19 = load i32, i32* %18
%20 = sub nsw i32 %16, %19
%21 = call i64 @pow(i32 %20, i32 2)
%22 = add nsw i64 %13, %21
%23 = call i32 @sqrt(i64 %22)
store i32 %23, i32* %5
%24 = load i32, i32* %5
ret i32 %24
}

LLVM IR (-O2):
define i32 @dist(i32* nocapture %0, i32* nocapture %1) {
%3 = load i32, i32* %0
%4 = load i32, i32* %1
%5 = sub nsw i32 %3, %4
%6 = tail call i64 @pow(i32 %5, i32 2)
%7 = getelementptr inbounds i32, i32* %0, i64 1
%8 = load i32, i32* %7
%9 = getelementptr inbounds i32, i32* %1, i64 1
%10 = load i32, i32* %9
%11 = sub nsw i32 %8, %10
%12 = tail call i64 @pow(i32 %11, i32 2)
%13 = add nsw i64 %12, %6
%14 = tail call i32 @sqrt(i64 %13)
ret i32 %14
}
/* Variables and functions */
int /*<<< orphan*/ parse_opt(int, char **);
int main(int argc, char **argv) { parse_opt(argc, argv); }


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

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

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** %1) {
%3 = tail call i32 @parse_opt(i32 %0, i8** %1)
ret i32 0
}