xunge/DecIR huggingface dataset:
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
void uDMAChannelPriorityClear(uint32_t ui32Base, uint32_t ui32ChannelNum) {
  ;
  ;
  (*((volatile unsigned long *)(ui32Base + 0x0000003C))) = 1 << ui32ChannelNum;
}


x86 assembly (clang, -O0):
<uDMAChannelPriorityClear>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%ecx
mov    $0x1,%eax
shl    %cl,%eax
movslq %eax,%rcx
mov    -0x4(%rbp),%eax
add    $0x3c,%eax
cltq
mov    %rcx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<uDMAChannelPriorityClear>:
mov    %esi,%ecx
mov    $0x1,%eax
shl    %cl,%eax
cltq
movslq %edi,%rcx
mov    %rax,0x3c(%rcx)
ret

LLVM IR (-O0):
define void @uDMAChannelPriorityClear(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 = shl i32 1, %5
%7 = sext i32 %6 to i64
%8 = load i32, i32* %3
%9 = add nsw i32 %8, 60
%10 = sext i32 %9 to i64
%11 = inttoptr i64 %10 to i64*
store volatile i64 %7, i64* %11
ret void
}

LLVM IR (-O2):
define void @uDMAChannelPriorityClear(i32 %0, i32 %1) {
%3 = shl nuw i32 1, %1
%4 = sext i32 %3 to i64
%5 = add nsw i32 %0, 60
%6 = sext i32 %5 to i64
%7 = inttoptr i64 %6 to i64*
store volatile i64 %4, i64* %7
ret void
}
float __negsf2(float a) {
  long lc = (*(const long *)&a) ^ 0x80000000;
  return (*(const float *)&lc);
}


x86 assembly (clang, -O0):
<__negsf2>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movabs $0x80000000,%rax
xor    -0x4(%rbp),%rax
mov    %rax,-0x10(%rbp)
movss  -0x10(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<__negsf2>:
movss  %xmm0,-0x8(%rsp)
mov    $0x80000000,%eax
xor    -0x8(%rsp),%eax
movd   %eax,%xmm0
ret

LLVM IR (-O0):
define float @__negsf2(float %0) {
%2 = alloca float
%3 = alloca i64
store float %0, float* %2
%4 = bitcast float* %2 to i64*
%5 = load i64, i64* %4
%6 = xor i64 %5, 2147483648
store i64 %6, i64* %3
%7 = bitcast i64* %3 to float*
%8 = load float, float* %7
ret float %8
}

LLVM IR (-O2):
define float @__negsf2(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = bitcast float* %2 to i64*
%4 = load i64, i64* %3
%5 = trunc i64 %4 to i32
%6 = xor i32 %5, -2147483648
%7 = bitcast i32 %6 to float
ret float %7
}
int test_imm_DFint16_mem(short *val) {
  return ((*val) & (0xDF << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_DFint16_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movswl (%rax),%edx
and    $0xdf,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @test_imm_DFint16_mem(i16* nocapture %0) {
%2 = load i16, i16* %0
%3 = and i16 %2, 223
%4 = icmp eq i16 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ islower(int);
void t_islower_0x85() {
  Assert_real((islower(133) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_islower.c",
              670, ("islower should be 0 for 0x85"));
}


x86 assembly (clang, -O0):
<t_islower_0x85>:
push   %rbp
mov    %rsp,%rbp
mov    $0x85,%edi
call   1030 <islower@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xebf(%rip),%rsi
mov    $0x29e,%edx
lea    0xf5b(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_islower_0x85>:
push   %rax
mov    $0x85,%edi
call   1030 <islower@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x29e,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_islower.c\00"
@.str.1 = [29 x i8] c"islower should be 0 for 0x85\00"
define void @t_islower_0x85() {
%1 = call i64 @islower(i32 133)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 670, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_islower.c\00"
@.str.1 = [29 x i8] c"islower should be 0 for 0x85\00"
define void @t_islower_0x85() {
%1 = tail call i64 @islower(i32 133)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 670, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void free_count(void *data) { free(data); }


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

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

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

LLVM IR (-O2):
define void @free_count(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
int min_0_a(int a, int b) {
  if (a != 0) {
    if (a > 0)
      return a;
  } else {
    if (a != 0)
      return b;
  }
}


x86 assembly (clang, -O0):
<min_0_a>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpl   $0x0,-0x8(%rbp)
je     112e <min_0_a+0x2e>
cmpl   $0x0,-0x8(%rbp)
jle    1129 <min_0_a+0x29>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1148 <min_0_a+0x48>
jmp    1148 <min_0_a+0x48>
cmpl   $0x0,-0x8(%rbp)
je     1143 <min_0_a+0x43>
mov    -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1148 <min_0_a+0x48>
jmp    1148 <min_0_a+0x48>
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @min_0_a(i32 returned %0, i32 %1) {
ret i32 %0
}
/* Type definitions */
struct company {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(void *);
void company_delete(const struct company *c) { free((void *)c); }


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

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

LLVM IR (-O0):
%struct.company = type { i32 }
define void @company_delete(%struct.company* %0) {
%2 = alloca %struct.company*
store %struct.company* %0, %struct.company** %2
%3 = load %struct.company*, %struct.company** %2
%4 = bitcast %struct.company* %3 to i8*
%5 = call i32 @free(i8* %4)
ret void
}

LLVM IR (-O2):
%struct.company = type { i32 }
define void @company_delete(%struct.company* nocapture %0) {
%2 = bitcast %struct.company* %0 to i8*
%3 = tail call i32 @free(i8* %2)
ret void
}
int srcharray(int *array, int b, int value) {
  for (int i = 0; i < b; ++i) {
    if (array[i] == value) {
      return 0;
    }
  }
  return -1;
}


x86 assembly (clang, -O0):
<srcharray>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    %edx,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    1154 <srcharray+0x54>
mov    -0x10(%rbp),%rax
movslq -0x1c(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
cmp    -0x18(%rbp),%eax
jne    1141 <srcharray+0x41>
movl   $0x0,-0x4(%rbp)
jmp    115b <srcharray+0x5b>
jmp    1146 <srcharray+0x46>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1115 <srcharray+0x15>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<srcharray>:
test   %esi,%esi
jle    113a <srcharray+0x3a>
xor    %eax,%eax
cmp    %edx,(%rdi)
je     1139 <srcharray+0x39>
mov    %esi,%ecx
mov    $0x1,%eax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    %rax,%rsi
cmp    %rax,%rcx
je     1131 <srcharray+0x31>
lea    0x1(%rsi),%rax
cmp    %edx,(%rdi,%rsi,4)
jne    1120 <srcharray+0x20>
xor    %eax,%eax
cmp    %rcx,%rsi
adc    $0xffffffff,%eax
ret
mov    $0xffffffff,%eax
ret

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

LLVM IR (-O2):
define i32 @srcharray(i32* nocapture %0, i32 %1, i32 %2) {
%4 = icmp sgt i32 %1, 0
br i1 %4, label %5, label %21
5: ; preds = %3
%6 = zext i32 %1 to i64
%7 = zext i32 %1 to i64
%8 = load i32, i32* %0
%9 = icmp eq i32 %8, %2
br i1 %9, label %21, label %10
10: ; preds = %5, %13
%11 = phi i64 [ %17, %13 ], [ 1, %5 ]
%12 = icmp eq i64 %11, %7
br i1 %12, label %18, label %13
13: ; preds = %10
%14 = getelementptr inbounds i32, i32* %0, i64 %11
%15 = load i32, i32* %14
%16 = icmp eq i32 %15, %2
%17 = add nuw nsw i64 %11, 1
br i1 %16, label %18, label %10
18: ; preds = %10, %13
%19 = icmp uge i64 %11, %6
%20 = sext i1 %19 to i32
br label %21
21: ; preds = %18, %5, %3
%22 = phi i32 [ -1, %3 ], [ 0, %5 ], [ %20, %18 ]
ret i32 %22
}
/* Variables and functions */
char *create_memory();
void use_memory() {
  char *new_memory = create_memory();
  new_memory[0] = 'A';
}


x86 assembly (clang, -O0):
<use_memory>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <create_memory@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movb   $0x41,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<use_memory>:
push   %rax
xor    %eax,%eax
call   1030 <create_memory@plt>
movb   $0x41,(%rax)
pop    %rax
ret

LLVM IR (-O0):
define void @use_memory() {
%1 = alloca i8*
%2 = call i8* (...) @create_memory()
store i8* %2, i8** %1
%3 = load i8*, i8** %1
%4 = getelementptr inbounds i8, i8* %3, i64 0
store i8 65, i8* %4
ret void
}

LLVM IR (-O2):
define void @use_memory() {
%1 = tail call i8* (...) @create_memory()
store i8 65, i8* %1
ret void
}
/* Type definitions */
struct pool {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ xml_node_find(int, char const *, struct pool *);
char *xml_node_text(int /*<<< orphan*/, struct pool *);
char *xml_node_find_text(int node, const char *name, struct pool *p) {
  return xml_node_text(xml_node_find(node, name, p), p);
}


x86 assembly (clang, -O0):
<xml_node_find_text>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1040 <xml_node_find@plt>
mov    %eax,%edi
mov    -0x18(%rbp),%rsi
call   1030 <xml_node_text@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xml_node_find_text>:
push   %rbx
mov    %rdx,%rbx
call   1040 <xml_node_find@plt>
mov    %eax,%edi
mov    %rbx,%rsi
pop    %rbx
jmp    1030 <xml_node_text@plt>

LLVM IR (-O0):
%struct.pool = type { i32 }
define i8* @xml_node_find_text(i32 %0, i8* %1, %struct.pool* %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca %struct.pool*
store i32 %0, i32* %4
store i8* %1, i8** %5
store %struct.pool* %2, %struct.pool** %6
%7 = load i32, i32* %4
%8 = load i8*, i8** %5
%9 = load %struct.pool*, %struct.pool** %6
%10 = call i32 @xml_node_find(i32 %7, i8* %8, %struct.pool* %9)
%11 = load %struct.pool*, %struct.pool** %6
%12 = call i8* @xml_node_text(i32 %10, %struct.pool* %11)
ret i8* %12
}

LLVM IR (-O2):
%struct.pool = type { i32 }
define i8* @xml_node_find_text(i32 %0, i8* %1, %struct.pool* %2) {
%4 = tail call i32 @xml_node_find(i32 %0, i8* %1, %struct.pool* %2)
%5 = tail call i8* @xml_node_text(i32 %4, %struct.pool* %2)
ret i8* %5
}
long fixdiv32(long x, long y) {
  long long temp;
  if (x == 0)
    return 0;
  if (y == 0)
    return 0x7fffffff;
  temp = x;
  temp <<= 20;
  return (long)(temp / y);
}


x86 assembly (clang, -O0):
<fixdiv32>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1124 <fixdiv32+0x24>
movq   $0x0,-0x8(%rbp)
jmp    115e <fixdiv32+0x5e>
cmpq   $0x0,-0x18(%rbp)
jne    113c <fixdiv32+0x3c>
movq   $0x7fffffff,-0x8(%rbp)
7f
jmp    115e <fixdiv32+0x5e>
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
shl    $0x14,%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
cqto
idivq  -0x18(%rbp)
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<fixdiv32>:
test   %rdi,%rdi
je     1123 <fixdiv32+0x23>
test   %rsi,%rsi
je     1126 <fixdiv32+0x26>
shl    $0x14,%rdi
mov    %rdi,%rax
or     %rsi,%rax
shr    $0x20,%rax
je     112c <fixdiv32+0x2c>
mov    %rdi,%rax
cqto
idiv   %rsi
ret
xor    %eax,%eax
ret
mov    $0x7fffffff,%eax
ret
mov    %edi,%eax
xor    %edx,%edx
div    %esi
ret

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

LLVM IR (-O2):
define i64 @fixdiv32(i64 %0, i64 %1) {
%3 = icmp eq i64 %0, 0
br i1 %3, label %9, label %4
4: ; preds = %2
%5 = icmp eq i64 %1, 0
br i1 %5, label %9, label %6
6: ; preds = %4
%7 = shl i64 %0, 20
%8 = sdiv i64 %7, %1
br label %9
9: ; preds = %4, %2, %6
%10 = phi i64 [ %8, %6 ], [ 0, %2 ], [ 2147483647, %4 ]
ret i64 %10
}
/* Variables and functions */
int /*<<< orphan*/ aryt(int);
int /*<<< orphan*/ dziwneFor(int *, int);
int /*<<< orphan*/ sprPostAndPre(int *, int);
int main() {
  int tab[] = {1, 2, 3, 4, 5};
  dziwneFor(tab, 5);
  sprPostAndPre(tab, 3);
  aryt(10);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    0xec1(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xebe(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0xebc(%rip),%eax
mov    %eax,-0x10(%rbp)
lea    -0x20(%rbp),%rdi
mov    $0x5,%esi
call   1040 <dziwneFor@plt>
lea    -0x20(%rbp),%rdi
mov    $0x3,%esi
call   1050 <sprPostAndPre@plt>
mov    $0xa,%edi
call   1030 <aryt@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x20,%rsp
mov    0xed5(%rip),%eax
mov    %eax,0x10(%rsp)
movaps 0xeba(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    $0x5,%esi
call   1040 <dziwneFor@plt>
mov    %rbx,%rdi
mov    $0x3,%esi
call   1050 <sprPostAndPre@plt>
mov    $0xa,%edi
call   1030 <aryt@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@__const.main.tab = [5 x i32] [i32 1, i32 2, i32 3, i32 4, i32 5]
define i32 @main() {
%1 = alloca [5 x i32]
%2 = bitcast [5 x i32]* %1 to i8*
%3 = getelementptr inbounds [5 x i32], [5 x i32]* %1, i64 0, i64 0
%4 = call i32 @dziwneFor(i32* %3, i32 5)
%5 = getelementptr inbounds [5 x i32], [5 x i32]* %1, i64 0, i64 0
%6 = call i32 @sprPostAndPre(i32* %5, i32 3)
%7 = call i32 @aryt(i32 10)
ret i32 0
}

LLVM IR (-O2):
@__const.main.tab = [5 x i32] [i32 1, i32 2, i32 3, i32 4, i32 5]
define i32 @main() {
%1 = alloca [5 x i32]
%2 = bitcast [5 x i32]* %1 to i8*
%3 = getelementptr inbounds [5 x i32], [5 x i32]* %1, i64 0, i64 0
%4 = call i32 @dziwneFor(i32* %3, i32 5)
%5 = call i32 @sprPostAndPre(i32* %3, i32 3)
%6 = call i32 @aryt(i32 10)
ret i32 0
}
void BN_from_montgomery(void) {}


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

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

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

LLVM IR (-O2):
define void @BN_from_montgomery() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void func_ppp(int ***ppp) { printf("%d\n", ***ppp); }


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

x86 assembly (clang, -O2):
<func_ppp>:
mov    (%rdi),%rax
mov    (%rax),%rax
mov    (%rax),%esi
lea    0xee1(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"%d\0A\00"
define void @func_ppp(i32*** %0) {
%2 = alloca i32***
store i32*** %0, i32**** %2
%3 = load i32***, i32**** %2
%4 = load i32**, i32*** %3
%5 = load i32*, i32** %4
%6 = load i32, i32* %5
%7 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %6)
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define void @func_ppp(i32*** nocapture %0) {
%2 = load i32**, i32*** %0
%3 = load i32*, i32** %2
%4 = load i32, i32* %3
%5 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %4)
ret void
}
unsigned short hc_toggle_boolean(variable)
unsigned short *variable;
{
  if (*variable) {
    *variable = 0;
    return (0);
  } else {
    *variable = 1;
    return (1);
  }
}


x86 assembly (clang, -O0):
<hc_toggle_boolean>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
cmpw   $0x0,(%rax)
je     112a <hc_toggle_boolean+0x2a>
mov    -0x10(%rbp),%rax
movw   $0x0,(%rax)
movw   $0x0,-0x2(%rbp)
jmp    1139 <hc_toggle_boolean+0x39>
mov    -0x10(%rbp),%rax
movw   $0x1,(%rax)
movw   $0x1,-0x2(%rbp)
movzwl -0x2(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<hc_toggle_boolean>:
xor    %eax,%eax
cmpw   $0x0,(%rdi)
sete   %al
mov    %ax,(%rdi)
ret

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

LLVM IR (-O2):
define zeroext i16 @hc_toggle_boolean(i16* nocapture %0) {
%2 = load i16, i16* %0
%3 = icmp eq i16 %2, 0
%4 = zext i1 %3 to i16
store i16 %4, i16* %0
ret i16 %4
}
/* Variables and functions */
int /*<<< orphan*/ bind_or_unbind_set(char *, char *, char *);
void unbind_set(char *keymap, char *keyset) {
  char *command = "0";
  bind_or_unbind_set(keymap, command, keyset);
}


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

x86 assembly (clang, -O2):
<unbind_set>:
mov    %rsi,%rdx
lea    0xee6(%rip),%rsi
jmp    1030 <bind_or_unbind_set@plt>

LLVM IR (-O0):
@.str = [2 x i8] c"0\00"
define void @unbind_set(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
store i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i8** %5
%6 = load i8*, i8** %3
%7 = load i8*, i8** %5
%8 = load i8*, i8** %4
%9 = call i32 @bind_or_unbind_set(i8* %6, i8* %7, i8* %8)
ret void
}

LLVM IR (-O2):
@.str = [2 x i8] c"0\00"
define void @unbind_set(i8* %0, i8* %1) {
%3 = tail call i32 @bind_or_unbind_set(i8* %0, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i8* %1)
ret void
}
/* Type definitions */
typedef unsigned long long uint64_t;

/* Variables and functions */
uint64_t node_index(uint64_t i) { return (i & ~(1ull << 63)); }


x86 assembly (clang, -O0):
<node_index>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movabs $0x7fffffffffffffff,%rax
ff ff 7f
and    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<node_index>:
movabs $0x7fffffffffffffff,%rax
ff ff 7f
and    %rdi,%rax
ret

LLVM IR (-O0):
define i64 @node_index(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = and i64 %3, 9223372036854775807
ret i64 %4
}

LLVM IR (-O2):
define i64 @node_index(i64 %0) {
%2 = and i64 %0, 9223372036854775807
ret i64 %2
}
/* Variables and functions */
int /*<<< orphan*/ set_value(int);
void unlock_sem() { set_value(1); }


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

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

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

LLVM IR (-O2):
define void @unlock_sem() {
%1 = tail call i32 @set_value(i32 1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
__attribute__((__noreturn__)) void exitfunc15(void) {
  printf("Executing exitfunc"
         "15"
         ".\n");
  exit(0);
}


x86 assembly (clang, -O0):
<exitfunc15>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
xor    %edi,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<exitfunc15>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
xor    %edi,%edi
call   1040 <exit@plt>

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

LLVM IR (-O2):
@str = [22 x i8] c"Executing exitfunc15.\00"
define void @exitfunc15() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @exit(i32 0)
unreachable
}
unsigned char log2_approx64(unsigned long long int x) {
  int i;
  unsigned char l2;
  l2 = 0;
  for (i = 0; i < 63; i++)
    if ((x & (((long long int)1) << i)) != 0)
      l2 = i;
  return (l2);
}


x86 assembly (clang, -O0):
<log2_approx64>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movb   $0x0,-0xd(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x3f,-0xc(%rbp)
jge    1155 <log2_approx64+0x55>
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
mov    $0x1,%edx
shl    %cl,%rdx
mov    %rdx,%rcx
and    %rcx,%rax
cmp    $0x0,%rax
je     1142 <log2_approx64+0x42>
mov    -0xc(%rbp),%eax
mov    %al,-0xd(%rbp)
jmp    1147 <log2_approx64+0x47>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1113 <log2_approx64+0x13>
movzbl -0xd(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<log2_approx64>:
xor    %ecx,%ecx
xor    %eax,%eax
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
bt     %rcx,%rdi
movzbl %al,%eax
cmovb  %ecx,%eax
mov    %rdi,%rdx
shr    %cl,%rdx
lea    0x1(%rcx),%esi
test   $0x2,%dl
movzbl %sil,%esi
cmove  %eax,%esi
lea    0x2(%rcx),%eax
test   $0x4,%dl
movzbl %al,%eax
cmove  %esi,%eax
add    $0x3,%rcx
cmp    $0x3f,%rcx
jne    1110 <log2_approx64+0x10>
ret

LLVM IR (-O0):
define zeroext i8 @log2_approx64(i64 %0) {
%2 = alloca i64
%3 = alloca i32
%4 = alloca i8
store i64 %0, i64* %2
store i8 0, i8* %4
store i32 0, i32* %3
br label %5
5: ; preds = %19, %1
%6 = load i32, i32* %3
%7 = icmp slt i32 %6, 63
br i1 %7, label %8, label %22
8: ; preds = %5
%9 = load i64, i64* %2
%10 = load i32, i32* %3
%11 = zext i32 %10 to i64
%12 = shl i64 1, %11
%13 = and i64 %9, %12
%14 = icmp ne i64 %13, 0
br i1 %14, label %15, label %18
15: ; preds = %8
%16 = load i32, i32* %3
%17 = trunc i32 %16 to i8
store i8 %17, i8* %4
br label %18
18: ; preds = %15, %8
br label %19
19: ; preds = %18
%20 = load i32, i32* %3
%21 = add nsw i32 %20, 1
store i32 %21, i32* %3
br label %5
22: ; preds = %5
%23 = load i8, i8* %4
ret i8 %23
}

LLVM IR (-O2):
define zeroext i8 @log2_approx64(i64 %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i64 [ 0, %1 ], [ %23, %2 ]
%4 = phi i8 [ 0, %1 ], [ %22, %2 ]
%5 = phi i32 [ 0, %1 ], [ %24, %2 ]
%6 = shl nuw nsw i64 1, %3
%7 = and i64 %6, %0
%8 = icmp eq i64 %7, 0
%9 = trunc i32 %5 to i8
%10 = select i1 %8, i8 %4, i8 %9
%11 = shl i64 2, %3
%12 = and i64 %11, %0
%13 = icmp eq i64 %12, 0
%14 = trunc i32 %5 to i8
%15 = add i8 %14, 1
%16 = select i1 %13, i8 %10, i8 %15
%17 = shl i64 4, %3
%18 = and i64 %17, %0
%19 = icmp eq i64 %18, 0
%20 = trunc i32 %5 to i8
%21 = add i8 %20, 2
%22 = select i1 %19, i8 %16, i8 %21
%23 = add nuw nsw i64 %3, 3
%24 = add nuw nsw i32 %5, 3
%25 = icmp eq i64 %23, 63
br i1 %25, label %26, label %2
26: ; preds = %2
ret i8 %22
}
/* Type definitions */
typedef int /*<<< orphan*/ const uint8_t;

/* Variables and functions */
uint8_t hfp_subevent_enhanced_call_status_get_clcc_mpty(const uint8_t *event) {
  return event[6];
}


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

x86 assembly (clang, -O2):
<hfp_subevent_enhanced_call_status_get_clcc_mpty>:
mov    0x18(%rdi),%eax
ret

LLVM IR (-O0):
define i32 @hfp_subevent_enhanced_call_status_get_clcc_mpty(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = getelementptr inbounds i32, i32* %3, i64 6
%5 = load i32, i32* %4
ret i32 %5
}

LLVM IR (-O2):
define i32 @hfp_subevent_enhanced_call_status_get_clcc_mpty(i32* nocapture %0) {
%2 = getelementptr inbounds i32, i32* %0, i64 6
%3 = load i32, i32* %2
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ fun0();
int main() { fun0(); }


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

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

LLVM IR (-O0):
define i32 @main() {
%1 = call i32 (...) @fun0()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @fun0()
ret i32 0
}
double add_db(a, b)
double a, b;
{
  a = pow(10.0, a / 10.0);
  b = pow(10.0, b / 10.0);
  return 10 * log10(a + b);
}


x86 assembly (clang, -O0):
<add_db>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm1
movsd  0xec1(%rip),%xmm0
divsd  %xmm0,%xmm1
movsd  0xeb5(%rip),%xmm0
call   1030 <pow@plt>
movsd  %xmm0,-0x8(%rbp)
movsd  -0x10(%rbp),%xmm1
movsd  0xe9e(%rip),%xmm0
divsd  %xmm0,%xmm1
movsd  0xe92(%rip),%xmm0
call   1030 <pow@plt>
movsd  %xmm0,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
addsd  -0x10(%rbp),%xmm0
call   1040 <log10@plt>
movaps %xmm0,%xmm1
movsd  0xe6e(%rip),%xmm0
mulsd  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<add_db>:
sub    $0x18,%rsp
movsd  %xmm1,0x10(%rsp)
movapd %xmm0,%xmm1
movsd  0xeca(%rip),%xmm0
divsd  %xmm0,%xmm1
call   1030 <pow@plt>
movsd  %xmm0,0x8(%rsp)
movsd  0xeb3(%rip),%xmm0
movsd  0x10(%rsp),%xmm1
divsd  %xmm0,%xmm1
call   1030 <pow@plt>
addsd  0x8(%rsp),%xmm0
call   1040 <log10@plt>
mulsd  0xe91(%rip),%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
define double @add_db(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = load double, double* %3
%6 = fdiv double %5, 1.000000e+01
%7 = call double @pow(double 1.000000e+01, double %6)
store double %7, double* %3
%8 = load double, double* %4
%9 = fdiv double %8, 1.000000e+01
%10 = call double @pow(double 1.000000e+01, double %9)
store double %10, double* %4
%11 = load double, double* %3
%12 = load double, double* %4
%13 = fadd double %11, %12
%14 = call double @log10(double %13)
%15 = fmul double 1.000000e+01, %14
ret double %15
}

LLVM IR (-O2):
define double @add_db(double %0, double %1) {
%3 = fdiv double %0, 1.000000e+01
%4 = tail call double @pow(double 1.000000e+01, double %3)
%5 = fdiv double %1, 1.000000e+01
%6 = tail call double @pow(double 1.000000e+01, double %5)
%7 = fadd double %4, %6
%8 = tail call double @log10(double %7)
%9 = fmul double %8, 1.000000e+01
ret double %9
}
/* Variables and functions */
int useGlob(int);
int callsUseGlob(int a) { return (useGlob(a)); }


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

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

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

LLVM IR (-O2):
define i32 @callsUseGlob(i32 %0) {
%2 = tail call i32 @useGlob(i32 %0)
ret i32 %2
}
int sandbox_consume_extension(const char *path, const char *ext_token) {
  return -1;
}


x86 assembly (clang, -O0):
<sandbox_consume_extension>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0xffffffff,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @sandbox_consume_extension(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
ret i32 -1
}

LLVM IR (-O2):
define i32 @sandbox_consume_extension(i8* nocapture readnone %0, i8* nocapture readnone %1) {
ret i32 -1
}
void rop3_15_0_0(unsigned char *D, unsigned char S, unsigned char T) {
  unsigned char stk1;
  stk1 = ~T;
  *D = stk1;
}


x86 assembly (clang, -O0):
<rop3_15_0_0>:
push   %rbp
mov    %rsp,%rbp
mov    %dl,%al
mov    %sil,%cl
mov    %rdi,-0x8(%rbp)
mov    %cl,-0x9(%rbp)
mov    %al,-0xa(%rbp)
movzbl -0xa(%rbp),%eax
xor    $0xffffffff,%eax
mov    %al,-0xb(%rbp)
mov    -0xb(%rbp),%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<rop3_15_0_0>:
not    %dl
mov    %dl,(%rdi)
ret

LLVM IR (-O0):
define void @rop3_15_0_0(i8* %0, i8 zeroext %1, i8 zeroext %2) {
%4 = alloca i8*
%5 = alloca i8
%6 = alloca i8
%7 = alloca i8
store i8* %0, i8** %4
store i8 %1, i8* %5
store i8 %2, i8* %6
%8 = load i8, i8* %6
%9 = zext i8 %8 to i32
%10 = xor i32 %9, -1
%11 = trunc i32 %10 to i8
store i8 %11, i8* %7
%12 = load i8, i8* %7
%13 = load i8*, i8** %4
store i8 %12, i8* %13
ret void
}

LLVM IR (-O2):
define void @rop3_15_0_0(i8* nocapture writeonly %0, i8 zeroext %1, i8 zeroext %2) {
%4 = xor i8 %2, -1
store i8 %4, i8* %0
ret void
}
/* Variables and functions */
scalar_t__ alloc(int);
int /*<<< orphan*/ free(int *);
int main(int argc, char const *argv[]) {
  int *new_memory = (int *)alloc((25) * sizeof(int));
  free(new_memory);
  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)
mov    $0x64,%edi
call   1040 <alloc@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
call   1030 <free@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x64,%edi
call   1040 <alloc@plt>
mov    %rax,%rdi
call   1030 <free@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i64 @alloc(i32 100)
%4 = inttoptr i64 %3 to i32*
%5 = tail call i32 @free(i32* %4)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ strcmp(char *, char *);
int builtin_command(char **argv) {
  if (!strcmp(argv[0], "quit"))
    exit(0);
  if (!strcmp(argv[0], "&"))
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<builtin_command>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
lea    0xec6(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%eax
jne    114f <builtin_command+0x2f>
xor    %edi,%edi
call   1040 <exit@plt>
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
lea    0xea8(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%eax
jne    1177 <builtin_command+0x57>
movl   $0x1,-0x4(%rbp)
jmp    117e <builtin_command+0x5e>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<builtin_command>:
push   %rbx
mov    (%rdi),%rbx
lea    0xed5(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcmp@plt>
test   %eax,%eax
je     1151 <builtin_command+0x31>
lea    0xec7(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcmp@plt>
xor    %ecx,%ecx
test   %eax,%eax
sete   %cl
mov    %ecx,%eax
pop    %rbx
ret
xor    %edi,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [5 x i8] c"quit\00"
@.str.1 = [2 x i8] c"&\00"
define i32 @builtin_command(i8** %0) {
%2 = alloca i32
%3 = alloca i8**
store i8** %0, i8*** %3
%4 = load i8**, i8*** %3
%5 = getelementptr inbounds i8*, i8** %4, i64 0
%6 = load i8*, i8** %5
%7 = call i32 @strcmp(i8* %6, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%8 = icmp ne i32 %7, 0
br i1 %8, label %11, label %9
9: ; preds = %1
%10 = call i32 @exit(i32 0)
unreachable
11: ; preds = %1
%12 = load i8**, i8*** %3
%13 = getelementptr inbounds i8*, i8** %12, i64 0
%14 = load i8*, i8** %13
%15 = call i32 @strcmp(i8* %14, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%16 = icmp ne i32 %15, 0
br i1 %16, label %18, label %17
17: ; preds = %11
store i32 1, i32* %2
br label %19
18: ; preds = %11
store i32 0, i32* %2
br label %19
19: ; preds = %18, %17
%20 = load i32, i32* %2
ret i32 %20
}

LLVM IR (-O2):
@.str = [5 x i8] c"quit\00"
@.str.1 = [2 x i8] c"&\00"
define i32 @builtin_command(i8** nocapture %0) {
%2 = load i8*, i8** %0
%3 = tail call i32 @strcmp(i8* dereferenceable(1) %2, i8* dereferenceable(5) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%4 = icmp eq i32 %3, 0
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = tail call i32 @exit(i32 0)
unreachable
7: ; preds = %1
%8 = tail call i32 @strcmp(i8* dereferenceable(1) %2, i8* dereferenceable(2) getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%9 = icmp eq i32 %8, 0
%10 = zext i1 %9 to i32
ret i32 %10
}
/* Type definitions */
typedef int /*<<< orphan*/ pthread_t;

/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ pthread_join(int /*<<< orphan*/, void **);
void *thread2_func(void *arg) {
  pthread_t t1 = (pthread_t)arg;
  void *result;
  pthread_join(t1, &result);
  printf("thread2 received code %08x from thread1\n", (int)result);
  return NULL;
}


x86 assembly (clang, -O0):
<thread2_func>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%edi
lea    -0x18(%rbp),%rsi
call   1040 <pthread_join@plt>
mov    -0x18(%rbp),%rax
mov    %eax,%esi
lea    0xeb4(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<thread2_func>:
push   %rax
mov    %rsp,%rsi
call   1040 <pthread_join@plt>
mov    (%rsp),%esi
lea    0xecd(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [41 x i8] c"thread2 received code %08x from thread1\0A\00"
define i8* @thread2_func(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
%4 = alloca i8*
store i8* %0, i8** %2
%5 = load i8*, i8** %2
%6 = ptrtoint i8* %5 to i32
store i32 %6, i32* %3
%7 = load i32, i32* %3
%8 = call i32 @pthread_join(i32 %7, i8** %4)
%9 = load i8*, i8** %4
%10 = ptrtoint i8* %9 to i32
%11 = call i32 @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0), i32 %10)
ret i8* null
}

LLVM IR (-O2):
@.str = [41 x i8] c"thread2 received code %08x from thread1\0A\00"
define noalias i8* @thread2_func(i8* %0) {
%2 = alloca i8*
%3 = ptrtoint i8* %0 to i64
%4 = trunc i64 %3 to i32
%5 = bitcast i8** %2 to i8*
%6 = call i32 @pthread_join(i32 %4, i8** %2)
%7 = load i8*, i8** %2
%8 = ptrtoint i8* %7 to i64
%9 = trunc i64 %8 to i32
%10 = call i32 @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0), i32 %9)
ret i8* null
}
/* Variables and functions */
int /*<<< orphan*/ buf_random();
int /*<<< orphan*/ doSleep();
void our_sleep() {
  buf_random();
  doSleep();
}


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

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

LLVM IR (-O0):
define void @our_sleep() {
%1 = call i32 (...) @buf_random()
%2 = call i32 (...) @doSleep()
ret void
}

LLVM IR (-O2):
define void @our_sleep() {
%1 = tail call i32 (...) @buf_random()
%2 = tail call i32 (...) @doSleep()
ret void
}
/* Variables and functions */
void glmAdd3fs_(float x[3], float y) {
  for (size_t i = 0; i < 3; ++i)
    x[i] += y;
}


x86 assembly (clang, -O0):
<glmAdd3fs_>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movss  %xmm0,-0xc(%rbp)
movq   $0x0,-0x18(%rbp)
cmpq   $0x3,-0x18(%rbp)
jae    1148 <glmAdd3fs_+0x48>
movss  -0xc(%rbp),%xmm0
mov    -0x8(%rbp),%rax
mov    -0x18(%rbp),%rcx
addss  (%rax,%rcx,4),%xmm0
movss  %xmm0,(%rax,%rcx,4)
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    1115 <glmAdd3fs_+0x15>
pop    %rbp
ret

x86 assembly (clang, -O2):
<glmAdd3fs_>:
movss  (%rdi),%xmm1
addss  %xmm0,%xmm1
movss  %xmm1,(%rdi)
movss  0x4(%rdi),%xmm1
addss  %xmm0,%xmm1
movss  %xmm1,0x4(%rdi)
addss  0x8(%rdi),%xmm0
movss  %xmm0,0x8(%rdi)
ret

LLVM IR (-O0):
define void @glmAdd3fs_(float* %0, float %1) {
%3 = alloca float*
%4 = alloca float
%5 = alloca i64
store float* %0, float** %3
store float %1, float* %4
store i64 0, i64* %5
br label %6
6: ; preds = %16, %2
%7 = load i64, i64* %5
%8 = icmp ult i64 %7, 3
br i1 %8, label %9, label %19
9: ; preds = %6
%10 = load float, float* %4
%11 = load float*, float** %3
%12 = load i64, i64* %5
%13 = getelementptr inbounds float, float* %11, i64 %12
%14 = load float, float* %13
%15 = fadd float %14, %10
store float %15, float* %13
br label %16
16: ; preds = %9
%17 = load i64, i64* %5
%18 = add i64 %17, 1
store i64 %18, i64* %5
br label %6
19: ; preds = %6
ret void
}

LLVM IR (-O2):
define void @glmAdd3fs_(float* nocapture %0, float %1) {
%3 = load float, float* %0
%4 = fadd float %3, %1
store float %4, float* %0
%5 = getelementptr inbounds float, float* %0, i64 1
%6 = load float, float* %5
%7 = fadd float %6, %1
store float %7, float* %5
%8 = getelementptr inbounds float, float* %0, i64 2
%9 = load float, float* %8
%10 = fadd float %9, %1
store float %10, float* %8
ret void
}
/* Variables and functions */
int /*<<< orphan*/ RVS_Ipoint(int);
int /*<<< orphan*/ loopN(unsigned int);
void run_loop(unsigned count) {
  RVS_Ipoint(10);
  loopN(count);
  RVS_Ipoint(11);
}


x86 assembly (clang, -O0):
<run_loop>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0xa,%edi
call   1040 <RVS_Ipoint@plt>
mov    -0x4(%rbp),%edi
call   1030 <loopN@plt>
mov    $0xb,%edi
call   1040 <RVS_Ipoint@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<run_loop>:
push   %rbx
mov    %edi,%ebx
mov    $0xa,%edi
call   1040 <RVS_Ipoint@plt>
mov    %ebx,%edi
call   1030 <loopN@plt>
mov    $0xb,%edi
pop    %rbx
jmp    1040 <RVS_Ipoint@plt>

LLVM IR (-O0):
define void @run_loop(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @RVS_Ipoint(i32 10)
%4 = load i32, i32* %2
%5 = call i32 @loopN(i32 %4)
%6 = call i32 @RVS_Ipoint(i32 11)
ret void
}

LLVM IR (-O2):
define void @run_loop(i32 %0) {
%2 = tail call i32 @RVS_Ipoint(i32 10)
%3 = tail call i32 @loopN(i32 %0)
%4 = tail call i32 @RVS_Ipoint(i32 11)
ret void
}
int anetV6Only(char *err, int s) { return -1; }


x86 assembly (clang, -O0):
<anetV6Only>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    $0xffffffff,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @anetV6Only(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
ret i32 -1
}

LLVM IR (-O2):
define i32 @anetV6Only(i8* nocapture readnone %0, i32 %1) {
ret i32 -1
}
double func(double x) {
  if (x < 3.14159265)
    return 0;
  if (x < (3 * 3.14159265) / 2)
    return x - 3.14159265;
  return -x + 2 * 3.14159265;
}


x86 assembly (clang, -O0):
<func>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x10(%rbp)
movsd  0xeef(%rip),%xmm0
ucomisd -0x10(%rbp),%xmm0
jbe    1129 <func+0x29>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1184 <func+0x84>
movsd  0xed7(%rip),%xmm0
ucomisd -0x10(%rbp),%xmm0
jbe    1157 <func+0x57>
movsd  -0x10(%rbp),%xmm0
movsd  0xeb7(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1184 <func+0x84>
movsd  -0x10(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  0xe95(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<func>:
xorpd  %xmm1,%xmm1
movsd  0xef4(%rip),%xmm2
ucomisd %xmm0,%xmm2
ja     1135 <func+0x35>
movsd  0xeee(%rip),%xmm1
ucomisd %xmm0,%xmm1
jbe    1129 <func+0x29>
addsd  0xef0(%rip),%xmm0
ret
movsd  0xedf(%rip),%xmm1
subsd  %xmm0,%xmm1
movapd %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @func(double %0) {
%2 = alloca double
%3 = alloca double
store double %0, double* %3
%4 = load double, double* %3
%5 = fcmp olt double %4, 0x400921FB53C8D4F1
br i1 %5, label %6, label %7
6: ; preds = %1
store double 0.000000e+00, double* %2
br label %17
7: ; preds = %1
%8 = load double, double* %3
%9 = fcmp olt double %8, 0x4012D97C7ED69FB5
br i1 %9, label %10, label %13
10: ; preds = %7
%11 = load double, double* %3
%12 = fsub double %11, 0x400921FB53C8D4F1
store double %12, double* %2
br label %17
13: ; preds = %7
%14 = load double, double* %3
%15 = fneg double %14
%16 = fadd double %15, 0x401921FB53C8D4F1
store double %16, double* %2
br label %17
17: ; preds = %13, %10, %6
%18 = load double, double* %2
ret double %18
}

LLVM IR (-O2):
define double @func(double %0) {
%2 = fcmp olt double %0, 0x400921FB53C8D4F1
br i1 %2, label %9, label %3
3: ; preds = %1
%4 = fcmp olt double %0, 0x4012D97C7ED69FB5
br i1 %4, label %5, label %7
5: ; preds = %3
%6 = fadd double %0, 0xC00921FB53C8D4F1
br label %9
7: ; preds = %3
%8 = fsub double 0x401921FB53C8D4F1, %0
br label %9
9: ; preds = %1, %7, %5
%10 = phi double [ %6, %5 ], [ %8, %7 ], [ 0.000000e+00, %1 ]
ret double %10
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
main() {
  int b, c;
  b = 1;
  while (c < 30) {
    b = b * 2;
    c = c + 1;
    printf("%d ", b);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
cmpl   $0x1e,-0xc(%rbp)
jge    1156 <main+0x46>
mov    -0x8(%rbp),%eax
shl    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%esi
lea    0xeb4(%rip),%rdi
call   1030 <printf@plt>
jmp    1126 <main+0x16>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
/* Variables and functions */
int EXIT_SUCCESS;
int /*<<< orphan*/ FAIL(char *);
int /*<<< orphan*/ PASS(char *);
scalar_t__ foo1();
scalar_t__ foo2();
int main() {
  if (foo1() && foo2())
    PASS("weak-lazy-slidable");
  else
    FAIL("weak-lazy-slidable");
  return EXIT_SUCCESS;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1050 <foo1@plt>
cmp    $0x0,%rax
je     1182 <main+0x42>
mov    $0x0,%al
call   1030 <foo2@plt>
cmp    $0x0,%rax
je     1182 <main+0x42>
lea    0xe88(%rip),%rdi
call   1040 <PASS@plt>
jmp    118e <main+0x4e>
lea    0xe77(%rip),%rdi
call   1060 <FAIL@plt>
mov    0x2e4b(%rip),%rax
mov    (%rax),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1050 <foo1@plt>
test   %rax,%rax
je     1167 <main+0x27>
xor    %eax,%eax
call   1030 <foo2@plt>
test   %rax,%rax
je     1167 <main+0x27>
lea    0xea0(%rip),%rdi
call   1040 <PASS@plt>
jmp    1173 <main+0x33>
lea    0xe92(%rip),%rdi
call   1060 <FAIL@plt>
mov    0x2e66(%rip),%rax
mov    (%rax),%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [19 x i8] c"weak-lazy-slidable\00"
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i64 (...) @foo1()
%3 = icmp ne i64 %2, 0
br i1 %3, label %4, label %9
4: ; preds = %0
%5 = call i64 (...) @foo2()
%6 = icmp ne i64 %5, 0
br i1 %6, label %7, label %9
7: ; preds = %4
%8 = call i32 @PASS(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
br label %11
9: ; preds = %4, %0
%10 = call i32 @FAIL(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
br label %11
11: ; preds = %9, %7
%12 = load i32, i32* @EXIT_SUCCESS
ret i32 %12
}

LLVM IR (-O2):
@.str = [19 x i8] c"weak-lazy-slidable\00"
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = tail call i64 (...) @foo1()
%2 = icmp eq i64 %1, 0
br i1 %2, label %8, label %3
3: ; preds = %0
%4 = tail call i64 (...) @foo2()
%5 = icmp eq i64 %4, 0
br i1 %5, label %8, label %6
6: ; preds = %3
%7 = tail call i32 @PASS(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
br label %10
8: ; preds = %3, %0
%9 = tail call i32 @FAIL(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
br label %10
10: ; preds = %8, %6
%11 = load i32, i32* @EXIT_SUCCESS
ret i32 %11
}