xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ printf(char *, float, float, float, ...);
int main(void) {
  int i;
  float x;
  i = 40;
  x = 839.21f;
  printf("|%d|%5d|%-5d|%5.3d|\n", i, i, i, i);
  printf("|%10.3f|%10.3e|%-10g|\n", x, x, x);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x28,-0x8(%rbp)
movss  0xed2(%rip),%xmm0
movss  %xmm0,-0xc(%rbp)
cvtsi2ssl -0x8(%rbp),%xmm0
cvtsi2ssl -0x8(%rbp),%xmm1
cvtsi2ssl -0x8(%rbp),%xmm2
mov    -0x8(%rbp),%esi
lea    0xeb8(%rip),%rdi
mov    $0x3,%al
call   1030 <printf@plt>
movss  -0xc(%rbp),%xmm0
movss  -0xc(%rbp),%xmm1
movss  -0xc(%rbp),%xmm2
lea    0xeb0(%rip),%rdi
mov    $0x3,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xef0(%rip),%rdi
movss  0xee0(%rip),%xmm0
movaps %xmm0,%xmm1
movaps %xmm0,%xmm2
mov    $0x28,%esi
mov    $0x3,%al
call   1030 <printf@plt>
lea    0xee4(%rip),%rdi
movss  0xec3(%rip),%xmm0
movaps %xmm0,%xmm1
movaps %xmm0,%xmm2
mov    $0x3,%al
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [21 x i8] c"|%d|%5d|%-5d|%5.3d|\0A\00"
@.str.1 = [23 x i8] c"|%10.3f|%10.3e|%-10g|\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca float
store i32 0, i32* %1
store i32 40, i32* %2
store float 0x408A39AE20000000, float* %3
%4 = load i32, i32* %2
%5 = sitofp i32 %4 to float
%6 = load i32, i32* %2
%7 = sitofp i32 %6 to float
%8 = load i32, i32* %2
%9 = sitofp i32 %8 to float
%10 = load i32, i32* %2
%11 = call i32 (i8*, float, float, float, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), float %5, float %7, float %9, i32 %10)
%12 = load float, float* %3
%13 = load float, float* %3
%14 = load float, float* %3
%15 = call i32 (i8*, float, float, float, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.1, i64 0, i64 0), float %12, float %13, float %14)
ret i32 0
}

LLVM IR (-O2):
@.str = [21 x i8] c"|%d|%5d|%-5d|%5.3d|\0A\00"
@.str.1 = [23 x i8] c"|%10.3f|%10.3e|%-10g|\0A\00"
define i32 @main() {
%1 = tail call i32 (i8*, float, float, float, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), float 4.000000e+01, float 4.000000e+01, float 4.000000e+01, i32 40)
%2 = tail call i32 (i8*, float, float, float, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.1, i64 0, i64 0), float 0x408A39AE20000000, float 0x408A39AE20000000, float 0x408A39AE20000000)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ valid_bo(long, int, int /*<<< orphan*/);
unsigned long insert_bo(unsigned long insn, long value, int dialect,
                        const char **errmsg) {
  if (!valid_bo(value, dialect, 0))
    *errmsg = "invalid conditional option";
  return insn | ((value & 0x1f) << 21);
}


x86 assembly (clang, -O0):
<insert_bo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%esi
xor    %edx,%edx
call   1030 <valid_bo@plt>
cmp    $0x0,%eax
jne    114c <insert_bo+0x3c>
mov    -0x20(%rbp),%rax
lea    0xeb7(%rip),%rcx
mov    %rcx,(%rax)
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%rcx
and    $0x1f,%rcx
shl    $0x15,%rcx
or     %rcx,%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<insert_bo>:
push   %r15
push   %r14
push   %rbx
mov    %rcx,%r15
mov    %rsi,%rbx
mov    %rdi,%r14
mov    %rsi,%rdi
mov    %edx,%esi
xor    %edx,%edx
call   1030 <valid_bo@plt>
test   %eax,%eax
jne    1138 <insert_bo+0x28>
lea    0xecb(%rip),%rax
mov    %rax,(%r15)
and    $0x1f,%ebx
shl    $0x15,%rbx
or     %r14,%rbx
mov    %rbx,%rax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [27 x i8] c"invalid conditional option\00"
define i64 @insert_bo(i64 %0, i64 %1, i32 %2, i8** %3) {
%5 = alloca i64
%6 = alloca i64
%7 = alloca i32
%8 = alloca i8**
store i64 %0, i64* %5
store i64 %1, i64* %6
store i32 %2, i32* %7
store i8** %3, i8*** %8
%9 = load i64, i64* %6
%10 = load i32, i32* %7
%11 = call i32 @valid_bo(i64 %9, i32 %10, i32 0)
%12 = icmp ne i32 %11, 0
br i1 %12, label %15, label %13
13: ; preds = %4
%14 = load i8**, i8*** %8
store i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), i8** %14
br label %15
15: ; preds = %13, %4
%16 = load i64, i64* %5
%17 = load i64, i64* %6
%18 = and i64 %17, 31
%19 = shl i64 %18, 21
%20 = or i64 %16, %19
ret i64 %20
}

LLVM IR (-O2):
@.str = [27 x i8] c"invalid conditional option\00"
define i64 @insert_bo(i64 %0, i64 %1, i32 %2, i8** nocapture writeonly %3) {
%5 = tail call i32 @valid_bo(i64 %1, i32 %2, i32 0)
%6 = icmp eq i32 %5, 0
br i1 %6, label %7, label %8
7: ; preds = %4
store i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), i8** %3
br label %8
8: ; preds = %7, %4
%9 = shl i64 %1, 21
%10 = and i64 %9, 65011712
%11 = or i64 %10, %0
ret i64 %11
}
reg0reg1_set(r0, r1, x0, x1, p0, p1) int r0, r1;
int *p0, *p1;
{ r0 = r1; }


x86 assembly (clang, -O0):
<reg0reg1_set>:
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    -0xc(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @reg0reg1_set(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* %9
store i32 %14, i32* %8
%15 = load i32, i32* %7
ret i32 %15
}

LLVM IR (-O2):
define i32 @reg0reg1_set(i32 %0, i32 %1, i32 %2, i32 %3, i32* nocapture readnone %4, i32* nocapture readnone %5) {
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ bar(int *);
int foo() {
  int a[3];
  int b;
  a[0] = 1;
  a[1] = 2;
  a[2] = 3;
  bar(a);
  return a[0] + a[1] + a[2];
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x1,-0xc(%rbp)
movl   $0x2,-0x8(%rbp)
movl   $0x3,-0x4(%rbp)
lea    -0xc(%rbp),%rdi
call   1030 <bar@plt>
mov    -0xc(%rbp),%eax
add    -0x8(%rbp),%eax
add    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo>:
sub    $0x18,%rsp
movabs $0x200000001,%rax
mov    %rax,0xc(%rsp)
movl   $0x3,0x14(%rsp)
lea    0xc(%rsp),%rdi
call   1030 <bar@plt>
mov    0x10(%rsp),%eax
add    0xc(%rsp),%eax
add    0x14(%rsp),%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
define i32 @foo() {
%1 = alloca [3 x i32]
%2 = alloca i32
%3 = getelementptr inbounds [3 x i32], [3 x i32]* %1, i64 0, i64 0
store i32 1, i32* %3
%4 = getelementptr inbounds [3 x i32], [3 x i32]* %1, i64 0, i64 1
store i32 2, i32* %4
%5 = getelementptr inbounds [3 x i32], [3 x i32]* %1, i64 0, i64 2
store i32 3, i32* %5
%6 = getelementptr inbounds [3 x i32], [3 x i32]* %1, i64 0, i64 0
%7 = call i32 @bar(i32* %6)
%8 = getelementptr inbounds [3 x i32], [3 x i32]* %1, i64 0, i64 0
%9 = load i32, i32* %8
%10 = getelementptr inbounds [3 x i32], [3 x i32]* %1, i64 0, i64 1
%11 = load i32, i32* %10
%12 = add nsw i32 %9, %11
%13 = getelementptr inbounds [3 x i32], [3 x i32]* %1, i64 0, i64 2
%14 = load i32, i32* %13
%15 = add nsw i32 %12, %14
ret i32 %15
}

LLVM IR (-O2):
define i32 @foo() {
%1 = alloca [3 x i32]
%2 = bitcast [3 x i32]* %1 to i8*
%3 = getelementptr inbounds [3 x i32], [3 x i32]* %1, i64 0, i64 0
store i32 1, i32* %3
%4 = getelementptr inbounds [3 x i32], [3 x i32]* %1, i64 0, i64 1
store i32 2, i32* %4
%5 = getelementptr inbounds [3 x i32], [3 x i32]* %1, i64 0, i64 2
store i32 3, i32* %5
%6 = call i32 @bar(i32* %3)
%7 = load i32, i32* %3
%8 = load i32, i32* %4
%9 = add nsw i32 %8, %7
%10 = load i32, i32* %5
%11 = add nsw i32 %9, %10
ret i32 %11
}
int fn(short p1, short p2, short p3, short p4, short p5, unsigned long p6,
       short p7, short p8, short p9) {
  return p1 + p2 + p3 + p4 + p5 + p6 + p7 + p8 + p9;
}


x86 assembly (clang, -O0):
<fn>:
push   %rbp
mov    %rsp,%rbp
mov    %r8w,%ax
mov    0x20(%rbp),%r8w
mov    0x18(%rbp),%r8w
mov    0x10(%rbp),%r8w
mov    %di,-0x2(%rbp)
mov    %si,-0x4(%rbp)
mov    %dx,-0x6(%rbp)
mov    %cx,-0x8(%rbp)
mov    %ax,-0xa(%rbp)
mov    %r9,-0x18(%rbp)
movswl -0x2(%rbp),%eax
movswl -0x4(%rbp),%ecx
add    %ecx,%eax
movswl -0x6(%rbp),%ecx
add    %ecx,%eax
movswl -0x8(%rbp),%ecx
add    %ecx,%eax
movswl -0xa(%rbp),%ecx
add    %ecx,%eax
cltq
add    -0x18(%rbp),%rax
movswq 0x10(%rbp),%rcx
add    %rcx,%rax
movswq 0x18(%rbp),%rcx
add    %rcx,%rax
movswq 0x20(%rbp),%rcx
add    %rcx,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<fn>:
push   %rbx
movswl 0x20(%rsp),%r10d
movswl 0x18(%rsp),%r11d
movswl 0x10(%rsp),%ebx
lea    (%rdi,%rsi,1),%eax
add    %edx,%eax
add    %ecx,%eax
add    %r8d,%eax
add    %r9d,%eax
add    %ebx,%eax
add    %r11d,%eax
add    %r10d,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @fn(i16 signext %0, i16 signext %1, i16 signext %2, i16 signext %3, i16 signext %4, i64 %5, i16 signext %6, i16 signext %7, i16 signext %8) {
%10 = alloca i16
%11 = alloca i16
%12 = alloca i16
%13 = alloca i16
%14 = alloca i16
%15 = alloca i64
%16 = alloca i16
%17 = alloca i16
%18 = alloca i16
store i16 %0, i16* %10
store i16 %1, i16* %11
store i16 %2, i16* %12
store i16 %3, i16* %13
store i16 %4, i16* %14
store i64 %5, i64* %15
store i16 %6, i16* %16
store i16 %7, i16* %17
store i16 %8, i16* %18
%19 = load i16, i16* %10
%20 = sext i16 %19 to i32
%21 = load i16, i16* %11
%22 = sext i16 %21 to i32
%23 = add nsw i32 %20, %22
%24 = load i16, i16* %12
%25 = sext i16 %24 to i32
%26 = add nsw i32 %23, %25
%27 = load i16, i16* %13
%28 = sext i16 %27 to i32
%29 = add nsw i32 %26, %28
%30 = load i16, i16* %14
%31 = sext i16 %30 to i32
%32 = add nsw i32 %29, %31
%33 = sext i32 %32 to i64
%34 = load i64, i64* %15
%35 = add i64 %33, %34
%36 = load i16, i16* %16
%37 = sext i16 %36 to i64
%38 = add i64 %35, %37
%39 = load i16, i16* %17
%40 = sext i16 %39 to i64
%41 = add i64 %38, %40
%42 = load i16, i16* %18
%43 = sext i16 %42 to i64
%44 = add i64 %41, %43
%45 = trunc i64 %44 to i32
ret i32 %45
}

LLVM IR (-O2):
define i32 @fn(i16 signext %0, i16 signext %1, i16 signext %2, i16 signext %3, i16 signext %4, i64 %5, i16 signext %6, i16 signext %7, i16 signext %8) {
%10 = sext i16 %0 to i64
%11 = sext i16 %1 to i64
%12 = add nsw i64 %11, %10
%13 = sext i16 %2 to i64
%14 = add nsw i64 %12, %13
%15 = sext i16 %3 to i64
%16 = add nsw i64 %14, %15
%17 = sext i16 %4 to i64
%18 = add nsw i64 %16, %17
%19 = add i64 %18, %5
%20 = sext i16 %6 to i64
%21 = add i64 %19, %20
%22 = sext i16 %7 to i64
%23 = add i64 %21, %22
%24 = sext i16 %8 to i64
%25 = add i64 %23, %24
%26 = trunc i64 %25 to i32
ret i32 %26
}
int DoesNotRemoveVariableCopyWhenSrcReassigned() {
  int x = 10;
  int y = x;
  x = 20;
  return y;
}


x86 assembly (clang, -O0):
<DoesNotRemoveVariableCopyWhenSrcReassigned>:
push   %rbp
mov    %rsp,%rbp
movl   $0xa,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
movl   $0x14,-0x4(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @DoesNotRemoveVariableCopyWhenSrcReassigned() {
%1 = alloca i32
%2 = alloca i32
store i32 10, i32* %1
%3 = load i32, i32* %1
store i32 %3, i32* %2
store i32 20, i32* %1
%4 = load i32, i32* %2
ret i32 %4
}

LLVM IR (-O2):
define i32 @DoesNotRemoveVariableCopyWhenSrcReassigned() {
ret i32 10
}
/* Type definitions */
struct list_head {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ list_init_head(struct list_head *);
struct list_head *list_last(struct list_head *);
int /*<<< orphan*/ sys_list_del_node(struct list_head *);
void list_pop_back(struct list_head *head) {
  struct list_head *last_node = list_last(head);
  sys_list_del_node(last_node);
  list_init_head(last_node);
}


x86 assembly (clang, -O0):
<list_pop_back>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <list_last@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1050 <sys_list_del_node@plt>
mov    -0x10(%rbp),%rdi
call   1040 <list_init_head@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<list_pop_back>:
push   %rbx
call   1030 <list_last@plt>
mov    %rax,%rbx
mov    %rax,%rdi
call   1050 <sys_list_del_node@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1040 <list_init_head@plt>

LLVM IR (-O0):
%struct.list_head = type { i32 }
define void @list_pop_back(%struct.list_head* %0) {
%2 = alloca %struct.list_head*
%3 = alloca %struct.list_head*
store %struct.list_head* %0, %struct.list_head** %2
%4 = load %struct.list_head*, %struct.list_head** %2
%5 = call %struct.list_head* @list_last(%struct.list_head* %4)
store %struct.list_head* %5, %struct.list_head** %3
%6 = load %struct.list_head*, %struct.list_head** %3
%7 = call i32 @sys_list_del_node(%struct.list_head* %6)
%8 = load %struct.list_head*, %struct.list_head** %3
%9 = call i32 @list_init_head(%struct.list_head* %8)
ret void
}

LLVM IR (-O2):
%struct.list_head = type { i32 }
define void @list_pop_back(%struct.list_head* %0) {
%2 = tail call %struct.list_head* @list_last(%struct.list_head* %0)
%3 = tail call i32 @sys_list_del_node(%struct.list_head* %2)
%4 = tail call i32 @list_init_head(%struct.list_head* %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(char *const);
scalar_t__ malloc(int);
void buffer_underflow() {
  char *const memory = (char *)malloc(sizeof(int));
  memory[-1] = '!';
  free(memory);
}


x86 assembly (clang, -O0):
<buffer_underflow>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x4,%edi
call   1040 <malloc@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movb   $0x21,-0x1(%rax)
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<buffer_underflow>:
push   %rax
mov    $0x4,%edi
call   1040 <malloc@plt>
movb   $0x21,-0x1(%rax)
mov    %rax,%rdi
pop    %rax
jmp    1030 <free@plt>

LLVM IR (-O0):
define void @buffer_underflow() {
%1 = alloca i8*
%2 = call i64 @malloc(i32 4)
%3 = inttoptr i64 %2 to i8*
store i8* %3, i8** %1
%4 = load i8*, i8** %1
%5 = getelementptr inbounds i8, i8* %4, i64 -1
store i8 33, i8* %5
%6 = load i8*, i8** %1
%7 = call i32 @free(i8* %6)
ret void
}

LLVM IR (-O2):
define void @buffer_underflow() {
%1 = tail call i64 @malloc(i32 4)
%2 = inttoptr i64 %1 to i8*
%3 = getelementptr inbounds i8, i8* %2, i64 -1
store i8 33, i8* %3
%4 = tail call i32 @free(i8* %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, int *);
void lenum(int *n) {
  printf("Entre com um numero: ");
  scanf("%d", n);
}


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

x86 assembly (clang, -O2):
<lenum>:
push   %rbx
mov    %rdi,%rbx
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
lea    0xedf(%rip),%rdi
mov    %rbx,%rsi
pop    %rbx
jmp    1040 <scanf@plt>

LLVM IR (-O0):
@.str = [22 x i8] c"Entre com um numero: \00"
@.str.1 = [3 x i8] c"%d\00"
define void @lenum(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
%4 = load i32*, i32** %2
%5 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %4)
ret void
}

LLVM IR (-O2):
@.str = [22 x i8] c"Entre com um numero: \00"
@.str.1 = [3 x i8] c"%d\00"
define void @lenum(i32* %0) {
%2 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %0)
ret void
}
/* Type definitions */
typedef int int32_t;

/* Variables and functions */
float intBitsToFloat(int);
float pow2if(int q) { return intBitsToFloat(((int32_t)(q + 0x7f)) << 23); }


x86 assembly (clang, -O0):
<pow2if>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
add    $0x7f,%edi
shl    $0x17,%edi
call   1030 <intBitsToFloat@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pow2if>:
shl    $0x17,%edi
add    $0x3f800000,%edi
jmp    1030 <intBitsToFloat@plt>

LLVM IR (-O0):
define float @pow2if(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = add nsw i32 %3, 127
%5 = shl i32 %4, 23
%6 = call float @intBitsToFloat(i32 %5)
ret float %6
}

LLVM IR (-O2):
define float @pow2if(i32 %0) {
%2 = shl i32 %0, 23
%3 = add i32 %2, 1065353216
%4 = tail call float @intBitsToFloat(i32 %3)
ret float %4
}
/* Variables and functions */
int /*<<< orphan*/ enable_missile_safety_mode();
int /*<<< orphan*/ launch_missiles();
void test_missiles(void) {
  enable_missile_safety_mode();
  launch_missiles();
}


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

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

LLVM IR (-O0):
define void @test_missiles() {
%1 = call i32 (...) @enable_missile_safety_mode()
%2 = call i32 (...) @launch_missiles()
ret void
}

LLVM IR (-O2):
define void @test_missiles() {
%1 = tail call i32 (...) @enable_missile_safety_mode()
%2 = tail call i32 (...) @launch_missiles()
ret void
}
/* Variables and functions */
long double __qlog(long double);
long double intr_wrap_049(long double p1) { return __qlog(p1); }


x86 assembly (clang, -O0):
<intr_wrap_049>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
fldt   -0x10(%rbp)
mov    %rsp,%rax
fstpt  (%rax)
call   1030 <__qlog@plt>
fld    %st(0)
fstp   %st(0)
add    $0x20,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define x86_fp80 @intr_wrap_049(x86_fp80 %0) {
%2 = tail call x86_fp80 @__qlog(x86_fp80 %0)
ret x86_fp80 %2
}
void RTTarFileSeek(void) {}


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

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

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

LLVM IR (-O2):
define void @RTTarFileSeek() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ e_abs();
int /*<<< orphan*/ e_jmp();
void e_jmp_abs() {
  e_abs();
  e_jmp();
}


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

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

LLVM IR (-O0):
define void @e_jmp_abs() {
%1 = call i32 (...) @e_abs()
%2 = call i32 (...) @e_jmp()
ret void
}

LLVM IR (-O2):
define void @e_jmp_abs() {
%1 = tail call i32 (...) @e_abs()
%2 = tail call i32 (...) @e_jmp()
ret void
}
void bitmap_parselist(void) { nsc_assert(0, __func__); }


x86 assembly (clang, -O0):
<bitmap_parselist>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
lea    0xee3(%rip),%rsi
mov    $0x0,%al
call   1030 <nsc_assert@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<bitmap_parselist>:
lea    0xee9(%rip),%rsi
xor    %edi,%edi
xor    %eax,%eax
jmp    1030 <nsc_assert@plt>

LLVM IR (-O0):
@__func__.bitmap_parselist = [17 x i8] c"bitmap_parselist\00"
define void @bitmap_parselist() {
%1 = call i32 (i32, i8*, ...) bitcast (i32 (...)* @nsc_assert to i32 (i32, i8*, ...)*)(i32 0, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @__func__.bitmap_parselist, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@__func__.bitmap_parselist = [17 x i8] c"bitmap_parselist\00"
define void @bitmap_parselist() {
%1 = tail call i32 (i32, i8*, ...) bitcast (i32 (...)* @nsc_assert to i32 (i32, i8*, ...)*)(i32 0, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @__func__.bitmap_parselist, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ puts(char *);
void usage(char *name) {
  printf("Usage: %s [options]\n\n", name);
  puts("Options:");
  puts(" -s STR  Server IP");
  puts(" -p NUM  Server port number (default: 5001)");
  puts(" -h      Show this help message and exit");
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xec9(%rip),%rdi
call   1040 <printf@plt>
lea    0xed3(%rip),%rdi
call   1030 <puts@plt>
lea    0xed0(%rip),%rdi
call   1030 <puts@plt>
lea    0xed7(%rip),%rdi
call   1030 <puts@plt>
lea    0xef7(%rip),%rdi
call   1030 <puts@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<usage>:
push   %rax
mov    %rdi,%rsi
lea    0xed5(%rip),%rdi
call   1040 <printf@plt>
lea    0xedf(%rip),%rdi
call   1030 <puts@plt>
lea    0xedc(%rip),%rdi
call   1030 <puts@plt>
lea    0xee3(%rip),%rdi
call   1030 <puts@plt>
lea    0xf03(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [22 x i8] c"Usage: %s [options]\0A\0A\00"
@.str.1 = [9 x i8] c"Options:\00"
@.str.2 = [19 x i8] c" -s STR Server IP\00"
@.str.3 = [44 x i8] c" -p NUM Server port number (default: 5001)\00"
@.str.4 = [41 x i8] c" -h Show this help message and exit\00"
define void @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = call i32 @puts(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0))
%6 = call i32 @puts(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.2, i64 0, i64 0))
%7 = call i32 @puts(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.3, i64 0, i64 0))
%8 = call i32 @puts(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.4, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [22 x i8] c"Usage: %s [options]\0A\0A\00"
@.str.1 = [9 x i8] c"Options:\00"
@.str.2 = [19 x i8] c" -s STR Server IP\00"
@.str.3 = [44 x i8] c" -p NUM Server port number (default: 5001)\00"
@.str.4 = [41 x i8] c" -h Show this help message and exit\00"
define void @usage(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str.2, i64 0, i64 0))
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([44 x i8], [44 x i8]* @.str.3, i64 0, i64 0))
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([41 x i8], [41 x i8]* @.str.4, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(char *);
void destruirString(void *e) {
  char **d = (char **)e;
  free(*d);
}


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

x86 assembly (clang, -O2):
<destruirString>:
mov    (%rdi),%rdi
jmp    1030 <free@plt>

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

LLVM IR (-O2):
define void @destruirString(i8* nocapture %0) {
%2 = bitcast i8* %0 to i8**
%3 = load i8*, i8** %2
%4 = tail call i32 @free(i8* %3)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;
typedef int /*<<< orphan*/ int32_t;

/* Variables and functions */
int /*<<< orphan*/ jenkins_hash_array(int /*<<< orphan*/ const *,
                                      int /*<<< orphan*/, int);
uint32_t jenkins_hash_intarray(uint32_t n, const int32_t *d) {
  return jenkins_hash_array((const uint32_t *)d, n, 0x17836abc);
}


x86 assembly (clang, -O0):
<jenkins_hash_intarray>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x4(%rbp),%esi
mov    $0x17836abc,%edx
call   1030 <jenkins_hash_array@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<jenkins_hash_intarray>:
mov    %edi,%eax
mov    %rsi,%rdi
mov    %eax,%esi
mov    $0x17836abc,%edx
jmp    1030 <jenkins_hash_array@plt>

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

LLVM IR (-O2):
define i32 @jenkins_hash_intarray(i32 %0, i32* %1) {
%3 = tail call i32 @jenkins_hash_array(i32* %1, i32 %0, i32 394488508)
ret i32 %3
}
/* Variables and functions */
double __ocml_tan_f64(double);
double tan(double x) { return __ocml_tan_f64(x); }


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

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

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

LLVM IR (-O2):
define double @tan(double %0) {
%2 = tail call double @__ocml_tan_f64(double %0)
ret double %2
}
void snd_init() { return; }


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

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

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

LLVM IR (-O2):
define void @snd_init() {
ret void
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
int /*<<< orphan*/ ASSERT(int);
void USBDMAChannelAddressSet(uint32_t ui32Base, uint32_t ui32Channel,
                             void *pvAddress) {
  ASSERT(ui32Base == 0x40050000);
  ASSERT(ui32Channel < 8);
  (*((volatile uint32_t *)(ui32Base + 0x00000208 + (0x10 * ui32Channel)))) =
      (uint32_t)pvAddress;
}


x86 assembly (clang, -O0):
<USBDMAChannelAddressSet>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
cmpl   $0x40050000,-0x4(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <ASSERT@plt>
cmpl   $0x8,-0x8(%rbp)
setl   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <ASSERT@plt>
mov    -0x10(%rbp),%rax
mov    %eax,%ecx
mov    -0x4(%rbp),%eax
add    $0x208,%eax
mov    -0x8(%rbp),%edx
shl    $0x4,%edx
add    %edx,%eax
cltq
mov    %ecx,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<USBDMAChannelAddressSet>:
push   %rbp
push   %r14
push   %rbx
mov    %rdx,%r14
mov    %esi,%ebp
mov    %edi,%ebx
xor    %edi,%edi
cmp    $0x40050000,%ebx
sete   %dil
call   1030 <ASSERT@plt>
xor    %edi,%edi
cmp    $0x8,%ebp
setl   %dil
call   1030 <ASSERT@plt>
movslq %ebx,%rax
movslq %ebp,%rcx
shl    $0x4,%rcx
mov    %r14d,0x208(%rax,%rcx,1)
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define void @USBDMAChannelAddressSet(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 = icmp eq i32 %7, 1074069504
%9 = zext i1 %8 to i32
%10 = call i32 @ASSERT(i32 %9)
%11 = load i32, i32* %5
%12 = icmp slt i32 %11, 8
%13 = zext i1 %12 to i32
%14 = call i32 @ASSERT(i32 %13)
%15 = load i8*, i8** %6
%16 = ptrtoint i8* %15 to i32
%17 = load i32, i32* %4
%18 = add nsw i32 %17, 520
%19 = load i32, i32* %5
%20 = mul nsw i32 16, %19
%21 = add nsw i32 %18, %20
%22 = sext i32 %21 to i64
%23 = inttoptr i64 %22 to i32*
store volatile i32 %16, i32* %23
ret void
}

LLVM IR (-O2):
define void @USBDMAChannelAddressSet(i32 %0, i32 %1, i8* %2) {
%4 = icmp eq i32 %0, 1074069504
%5 = zext i1 %4 to i32
%6 = tail call i32 @ASSERT(i32 %5)
%7 = icmp slt i32 %1, 8
%8 = zext i1 %7 to i32
%9 = tail call i32 @ASSERT(i32 %8)
%10 = ptrtoint i8* %2 to i64
%11 = trunc i64 %10 to i32
%12 = add nsw i32 %0, 520
%13 = shl nsw i32 %1, 4
%14 = add nsw i32 %12, %13
%15 = sext i32 %14 to i64
%16 = inttoptr i64 %15 to i32*
store volatile i32 %11, i32* %16
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
void usage(char **argv) {
  fprintf(stderr, "Usage: %s ethX\n", argv[0]);
  exit(1);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ead(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rax
mov    (%rax),%rdx
lea    0xebd(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

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

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

LLVM IR (-O2):
@stderr = global i32 0
@.str = [16 x i8] c"Usage: %s ethX\0A\00"
define void @usage(i8** nocapture %0) {
%2 = load i32, i32* @stderr
%3 = load i8*, i8** %0
%4 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ assert_int_equal(int, int /*<<< orphan*/);
int /*<<< orphan*/ w_half_open_files(int, int);
void w_half_open_files_test(void **state) {
  assert_int_equal(
      0x1010101010101010ul | 0x4040404040404040ul,
      w_half_open_files(0x000000000000AF00ul, 0x00FF000000000000ul));
}


x86 assembly (clang, -O0):
<w_half_open_files_test>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0xaf00,%edi
xor    %esi,%esi
call   1040 <w_half_open_files@plt>
mov    %eax,%esi
mov    $0x50505050,%edi
call   1030 <assert_int_equal@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<w_half_open_files_test>:
push   %rax
mov    $0xaf00,%edi
xor    %esi,%esi
call   1040 <w_half_open_files@plt>
mov    $0x50505050,%edi
mov    %eax,%esi
pop    %rax
jmp    1030 <assert_int_equal@plt>

LLVM IR (-O0):
define void @w_half_open_files_test(i8** %0) {
%2 = alloca i8**
store i8** %0, i8*** %2
%3 = call i32 @w_half_open_files(i32 44800, i32 0)
%4 = call i32 @assert_int_equal(i32 1347440720, i32 %3)
ret void
}

LLVM IR (-O2):
define void @w_half_open_files_test(i8** nocapture readnone %0) {
%2 = tail call i32 @w_half_open_files(i32 44800, i32 0)
%3 = tail call i32 @assert_int_equal(i32 1347440720, i32 %2)
ret void
}
int limit(int val, int min, int max) {
  if (val < min)
    return min;
  else if (val > max)
    return max;
  else
    return val;
}


x86 assembly (clang, -O0):
<limit>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1124 <limit+0x24>
mov    -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1141 <limit+0x41>
mov    -0x8(%rbp),%eax
cmp    -0x10(%rbp),%eax
jle    113b <limit+0x3b>
mov    -0x10(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1141 <limit+0x41>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<limit>:
mov    %edx,%eax
cmp    %edx,%edi
cmovle %edi,%eax
cmp    %esi,%edi
cmovl  %esi,%eax
ret

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

LLVM IR (-O2):
define i32 @limit(i32 %0, i32 %1, i32 %2) {
%4 = icmp slt i32 %0, %1
%5 = icmp sgt i32 %0, %2
%6 = select i1 %5, i32 %2, i32 %0
%7 = select i1 %4, i32 %1, i32 %6
ret i32 %7
}
/* Variables and functions */
int bench(int *, int);
scalar_t__ malloc(int);
int main(int argc, char const *argv[]) {
  int *array = (int *)malloc(20 * sizeof(int));
  int a = bench(array, argc);
  return a;
}


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)
mov    $0x50,%edi
call   1040 <malloc@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x8(%rbp),%esi
call   1030 <bench@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    %edi,%ebx
mov    $0x50,%edi
call   1040 <malloc@plt>
mov    %rax,%rdi
mov    %ebx,%esi
pop    %rbx
jmp    1030 <bench@plt>

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32*
%7 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%8 = call i64 @malloc(i32 80)
%9 = inttoptr i64 %8 to i32*
store i32* %9, i32** %6
%10 = load i32*, i32** %6
%11 = load i32, i32* %4
%12 = call i32 @bench(i32* %10, i32 %11)
store i32 %12, i32* %7
%13 = load i32, i32* %7
ret i32 %13
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i64 @malloc(i32 80)
%4 = inttoptr i64 %3 to i32*
%5 = tail call i32 @bench(i32* %4, i32 %0)
ret i32 %5
}
/* Variables and functions */
float __nv_fmaf_ru(float, float, float);
float __fmaf_ru(float __a, float __b, float __c) {
  return __nv_fmaf_ru(__a, __b, __c);
}


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

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

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

LLVM IR (-O2):
define float @__fmaf_ru(float %0, float %1, float %2) {
%4 = tail call float @__nv_fmaf_ru(float %0, float %1, float %2)
ret float %4
}
/* Type definitions */
typedef int uint32_t;
typedef scalar_t__ time_t;
typedef int /*<<< orphan*/ out_msg;

/* Variables and functions */
int /*<<< orphan*/ _xmit(char *);
int /*<<< orphan*/ snprintf(char *, int, char *, int, long);
scalar_t__ time(int /*<<< orphan*/ *);
void _resume_job(long my_job_id) {
  time_t now = time(NULL);
  char out_msg[128];
  snprintf(out_msg, sizeof(out_msg), "TS=%u AUTH=root DT=CMD=RESUMEJOB ARG=%ld",
           (uint32_t)now, my_job_id);
  _xmit(out_msg);
}


x86 assembly (clang, -O0):
<_resume_job>:
push   %rbp
mov    %rsp,%rbp
sub    $0x90,%rsp
mov    %rdi,-0x8(%rbp)
xor    %eax,%eax
mov    %eax,%edi
call   1050 <time@plt>
mov    %rax,-0x10(%rbp)
lea    -0x90(%rbp),%rdi
mov    -0x10(%rbp),%rax
mov    %eax,%ecx
mov    -0x8(%rbp),%r8
mov    $0x80,%esi
lea    0xe97(%rip),%rdx
call   1030 <snprintf@plt>
lea    -0x90(%rbp),%rdi
call   1040 <_xmit@plt>
add    $0x90,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_resume_job>:
push   %r14
push   %rbx
sub    $0x88,%rsp
mov    %rdi,%rbx
xor    %edi,%edi
call   1050 <time@plt>
lea    0xeb5(%rip),%rdx
mov    %rsp,%r14
mov    %r14,%rdi
mov    $0x80,%esi
mov    %eax,%ecx
mov    %rbx,%r8
call   1030 <snprintf@plt>
mov    %r14,%rdi
call   1040 <_xmit@plt>
add    $0x88,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [41 x i8] c"TS=%u AUTH=root DT=CMD=RESUMEJOB ARG=%ld\00"
define void @_resume_job(i64 %0) {
%2 = alloca i64
%3 = alloca i64
%4 = alloca [128 x i8]
store i64 %0, i64* %2
%5 = call i64 @time(i32* null)
store i64 %5, i64* %3
%6 = getelementptr inbounds [128 x i8], [128 x i8]* %4, i64 0, i64 0
%7 = load i64, i64* %3
%8 = trunc i64 %7 to i32
%9 = load i64, i64* %2
%10 = call i32 @snprintf(i8* %6, i32 128, i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0), i32 %8, i64 %9)
%11 = getelementptr inbounds [128 x i8], [128 x i8]* %4, i64 0, i64 0
%12 = call i32 @_xmit(i8* %11)
ret void
}

LLVM IR (-O2):
@.str = [41 x i8] c"TS=%u AUTH=root DT=CMD=RESUMEJOB ARG=%ld\00"
define void @_resume_job(i64 %0) {
%2 = alloca [128 x i8]
%3 = tail call i64 @time(i32* null)
%4 = getelementptr inbounds [128 x i8], [128 x i8]* %2, i64 0, i64 0
%5 = trunc i64 %3 to i32
%6 = call i32 @snprintf(i8* %4, i32 128, i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0), i32 %5, i64 %0)
%7 = call i32 @_xmit(i8* %4)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ F_OK;
int /*<<< orphan*/ access(char *, int /*<<< orphan*/);
int check_samba_locked(void) { return (!access("/tmp/tmp_samba_lock", F_OK)); }


x86 assembly (clang, -O0):
<check_samba_locked>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ebd(%rip),%rax
mov    (%rax),%esi
lea    0xedc(%rip),%rdi
call   1030 <access@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<check_samba_locked>:
push   %rax
mov    0x2ec0(%rip),%rax
mov    (%rax),%esi
lea    0xedf(%rip),%rdi
call   1030 <access@plt>
xor    %ecx,%ecx
test   %eax,%eax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [20 x i8] c"/tmp/tmp_samba_lock\00"
@F_OK = global i32 0
define i32 @check_samba_locked() {
%1 = load i32, i32* @F_OK
%2 = call i32 @access(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i32 %1)
%3 = icmp ne i32 %2, 0
%4 = xor i1 %3, true
%5 = zext i1 %4 to i32
ret i32 %5
}

LLVM IR (-O2):
@.str = [20 x i8] c"/tmp/tmp_samba_lock\00"
@F_OK = global i32 0
define i32 @check_samba_locked() {
%1 = load i32, i32* @F_OK
%2 = tail call i32 @access(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i32 %1)
%3 = icmp eq i32 %2, 0
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
char *calloc(int, int);
char *malloc(int);
int /*<<< orphan*/ sprintf(char *, char *, int);
int /*<<< orphan*/ strcpy(char *, char *);
int strlen(char *);
char *Requete_Deplacement_Envoi(int direction) {
  char *Req;
  char *req_dep = calloc(10, sizeof(char));
  sprintf(req_dep, "1,%d", direction);
  Req = malloc((strlen(req_dep) + 1) * sizeof(char));
  strcpy(Req, req_dep);
  return Req;
}


x86 assembly (clang, -O0):
<Requete_Deplacement_Envoi>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    $0xa,%edi
mov    $0x1,%esi
call   1050 <calloc@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x4(%rbp),%edx
lea    0xe84(%rip),%rsi
call   1070 <sprintf@plt>
mov    -0x18(%rbp),%rdi
call   1040 <strlen@plt>
add    $0x1,%eax
cltq
shl    $0x0,%rax
mov    %eax,%edi
call   1060 <malloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1030 <strcpy@plt>
mov    -0x10(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Requete_Deplacement_Envoi>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebp
mov    $0xa,%edi
mov    $0x1,%esi
call   1050 <calloc@plt>
mov    %rax,%rbx
lea    0xe92(%rip),%rsi
mov    %rax,%rdi
mov    %ebp,%edx
call   1070 <sprintf@plt>
mov    %rbx,%rdi
call   1040 <strlen@plt>
lea    0x1(%rax),%edi
call   1060 <malloc@plt>
mov    %rax,%rbp
mov    %rax,%rdi
mov    %rbx,%rsi
call   1030 <strcpy@plt>
mov    %rbp,%rax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [5 x i8] c"1,%d\00"
define i8* @Requete_Deplacement_Envoi(i32 %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca i8*
store i32 %0, i32* %2
%5 = call i8* @calloc(i32 10, i32 1)
store i8* %5, i8** %4
%6 = load i8*, i8** %4
%7 = load i32, i32* %2
%8 = call i32 @sprintf(i8* %6, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %7)
%9 = load i8*, i8** %4
%10 = call i32 @strlen(i8* %9)
%11 = add nsw i32 %10, 1
%12 = sext i32 %11 to i64
%13 = mul i64 %12, 1
%14 = trunc i64 %13 to i32
%15 = call i8* @malloc(i32 %14)
store i8* %15, i8** %3
%16 = load i8*, i8** %3
%17 = load i8*, i8** %4
%18 = call i32 @strcpy(i8* %16, i8* %17)
%19 = load i8*, i8** %3
ret i8* %19
}

LLVM IR (-O2):
@.str = [5 x i8] c"1,%d\00"
define i8* @Requete_Deplacement_Envoi(i32 %0) {
%2 = tail call dereferenceable_or_null(10) i8* @calloc(i32 10, i32 1)
%3 = tail call i32 @sprintf(i8* dereferenceable(1) %2, i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %0)
%4 = tail call i32 @strlen(i8* %2)
%5 = add nsw i32 %4, 1
%6 = tail call i8* @malloc(i32 %5)
%7 = tail call i32 @strcpy(i8* %6, i8* %2)
ret i8* %6
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ *fdopen(int, char *);
int mkstemps(char *, int);
FILE *fmkstemps(char *template, int suffixlen) {
  int fd;
  if ((fd = mkstemps(template, suffixlen)) < 0)
    return NULL;
  return fdopen(fd, "w");
}


x86 assembly (clang, -O0):
<fmkstemps>:
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 <mkstemps@plt>
mov    %eax,-0x18(%rbp)
cmp    $0x0,%eax
jge    1154 <fmkstemps+0x34>
movq   $0x0,-0x8(%rbp)
jmp    1167 <fmkstemps+0x47>
mov    -0x18(%rbp),%edi
lea    0xea2(%rip),%rsi
call   1040 <fdopen@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fmkstemps>:
push   %rax
call   1030 <mkstemps@plt>
test   %eax,%eax
js     1139 <fmkstemps+0x19>
lea    0xecf(%rip),%rsi
mov    %eax,%edi
pop    %rax
jmp    1040 <fdopen@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [2 x i8] c"w\00"
define i32* @fmkstemps(i8* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i32
store i8* %0, i8** %4
store i32 %1, i32* %5
%7 = load i8*, i8** %4
%8 = load i32, i32* %5
%9 = call i32 @mkstemps(i8* %7, i32 %8)
store i32 %9, i32* %6
%10 = icmp slt i32 %9, 0
br i1 %10, label %11, label %12
11: ; preds = %2
store i32* null, i32** %3
br label %15
12: ; preds = %2
%13 = load i32, i32* %6
%14 = call i32* @fdopen(i32 %13, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
store i32* %14, i32** %3
br label %15
15: ; preds = %12, %11
%16 = load i32*, i32** %3
ret i32* %16
}

LLVM IR (-O2):
@.str = [2 x i8] c"w\00"
define noalias i32* @fmkstemps(i8* %0, i32 %1) {
%3 = tail call i32 @mkstemps(i8* %0, i32 %1)
%4 = icmp slt i32 %3, 0
br i1 %4, label %7, label %5
5: ; preds = %2
%6 = tail call i32* @fdopen(i32 %3, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
br label %7
7: ; preds = %2, %5
%8 = phi i32* [ %6, %5 ], [ null, %2 ]
ret i32* %8
}
int fun1178() { return 1178; }


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

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

LLVM IR (-O0):
define i32 @fun1178() {
ret i32 1178
}

LLVM IR (-O2):
define i32 @fun1178() {
ret i32 1178
}
/* Variables and functions */
double pow(double, double);
double H(double a) { return pow(a, 3.0); }


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

x86 assembly (clang, -O2):
<H>:
movsd  0xee8(%rip),%xmm1
jmp    1030 <pow@plt>

LLVM IR (-O0):
define double @H(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = call double @pow(double %3, double 3.000000e+00)
ret double %4
}

LLVM IR (-O2):
define double @H(double %0) {
%2 = tail call double @pow(double %0, double 3.000000e+00)
ret double %2
}
/* Variables and functions */
scalar_t__ jn(int, double);
int /*<<< orphan*/ link_failure_jn();
void test_jn(int x, double d) {
  if (jn(x, d) != jn(x, d))
    link_failure_jn();
}


x86 assembly (clang, -O0):
<test_jn>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
movsd  %xmm0,-0x10(%rbp)
mov    -0x4(%rbp),%edi
movsd  -0x10(%rbp),%xmm0
call   1040 <jn@plt>
mov    %rax,-0x18(%rbp)
mov    -0x4(%rbp),%edi
movsd  -0x10(%rbp),%xmm0
call   1040 <jn@plt>
mov    %rax,%rcx
mov    -0x18(%rbp),%rax
cmp    %rcx,%rax
je     1165 <test_jn+0x45>
mov    $0x0,%al
call   1030 <link_failure_jn@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_jn>:
push   %r14
push   %rbx
push   %rax
movsd  %xmm0,(%rsp)
mov    %edi,%ebx
call   1040 <jn@plt>
mov    %rax,%r14
mov    %ebx,%edi
movsd  (%rsp),%xmm0
call   1040 <jn@plt>
cmp    %rax,%r14
jne    114c <test_jn+0x2c>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <link_failure_jn@plt>

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

LLVM IR (-O2):
define void @test_jn(i32 %0, double %1) {
%3 = tail call i64 @jn(i32 %0, double %1)
%4 = tail call i64 @jn(i32 %0, double %1)
%5 = icmp eq i64 %3, %4
br i1 %5, label %8, label %6
6: ; preds = %2
%7 = tail call i32 (...) @link_failure_jn()
br label %8
8: ; preds = %6, %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(int /*<<< orphan*/);
int /*<<< orphan*/ get_origin_addr(void *);
void array_release(void *array) { free(get_origin_addr(array)); }


x86 assembly (clang, -O0):
<array_release>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <get_origin_addr@plt>
mov    %eax,%edi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<array_release>:
push   %rax
call   1040 <get_origin_addr@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <free@plt>

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

LLVM IR (-O2):
define void @array_release(i8* %0) {
%2 = tail call i32 @get_origin_addr(i8* %0)
%3 = tail call i32 @free(i32 %2)
ret void
}