xunge/DecIR huggingface dataset:
int syscall0(int call) {
  int rc;
  __asm__ volatile("movl %[call], %%eax	\n"
                   "int  %[xnum]		\n"
                   "movl %%eax,   %[rc]	\n"
                   : [rc] "=g"(rc)
                   : [call] "g"(call), [xnum] "i"(0x80)
                   : "%eax", "memory");
  return rc;
}


x86 assembly (clang, -O0):
<syscall0>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
int    $0x80
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<syscall0>:
mov    %edi,-0x8(%rsp)
mov    -0x8(%rsp),%eax
int    $0x80
mov    %eax,-0x4(%rsp)
mov    -0x4(%rsp),%eax
ret

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

LLVM IR (-O2):
define i32 @syscall0(i32 %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
%4 = load i32, i32* %2
ret i32 %4
}
AX0RX1(r0, r1, x0, x1, p0, p1) short r0, r1;
short *p0, *p1;
{
  if ((((short *)10000000)[x0]) <= (p1[x1]))
    return 1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<AX0RX1>:
push   %rbp
mov    %rsp,%rbp
mov    %esi,%eax
mov    %di,%si
mov    %si,-0x6(%rbp)
mov    %ax,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    %r8,-0x18(%rbp)
mov    %r9,-0x20(%rbp)
movslq -0xc(%rbp),%rcx
mov    $0x989680,%eax
movswl (%rax,%rcx,2),%eax
mov    -0x20(%rbp),%rcx
movslq -0x10(%rbp),%rdx
movswl (%rcx,%rdx,2),%ecx
cmp    %ecx,%eax
jg     114c <AX0RX1+0x4c>
movl   $0x1,-0x4(%rbp)
jmp    1153 <AX0RX1+0x53>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<AX0RX1>:
movslq %edx,%rax
movzwl 0x989680(%rax,%rax,1),%edx
movslq %ecx,%rcx
xor    %eax,%eax
cmp    (%r9,%rcx,2),%dx
setle  %al
ret

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

LLVM IR (-O2):
define i32 @AX0RX1(i32 %0, i32 %1, i32 %2, i32 %3, i16* nocapture readnone %4, i16* nocapture %5) {
%7 = sext i32 %2 to i64
%8 = getelementptr inbounds i16, i16* inttoptr (i64 10000000 to i16*), i64 %7
%9 = load i16, i16* %8
%10 = sext i32 %3 to i64
%11 = getelementptr inbounds i16, i16* %5, i64 %10
%12 = load i16, i16* %11
%13 = icmp sle i16 %9, %12
%14 = zext i1 %13 to i32
ret i32 %14
}
void test116_ArrayInitBug_targetInit__I() {}


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

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

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

LLVM IR (-O2):
define void @test116_ArrayInitBug_targetInit__I() {
ret void
}
/* Variables and functions */
float s_brrand();
float triangle() {
  float randnum, randnum2, output;
  randnum = s_brrand();
  randnum2 = s_brrand();
  output = 0.5 * (randnum + randnum2);
  return (output);
}


x86 assembly (clang, -O0):
<triangle>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <s_brrand@plt>
movss  %xmm0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <s_brrand@plt>
movss  %xmm0,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
addss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xeba(%rip),%xmm0
mulsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0xc(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<triangle>:
push   %rax
xor    %eax,%eax
call   1030 <s_brrand@plt>
movss  %xmm0,0x4(%rsp)
xor    %eax,%eax
call   1030 <s_brrand@plt>
addss  0x4(%rsp),%xmm0
mulss  0xecd(%rip),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @triangle() {
%1 = alloca float
%2 = alloca float
%3 = alloca float
%4 = call float (...) @s_brrand()
store float %4, float* %1
%5 = call float (...) @s_brrand()
store float %5, float* %2
%6 = load float, float* %1
%7 = load float, float* %2
%8 = fadd float %6, %7
%9 = fpext float %8 to double
%10 = fmul double 5.000000e-01, %9
%11 = fptrunc double %10 to float
store float %11, float* %3
%12 = load float, float* %3
ret float %12
}

LLVM IR (-O2):
define float @triangle() {
%1 = tail call float (...) @s_brrand()
%2 = tail call float (...) @s_brrand()
%3 = fadd float %1, %2
%4 = fmul float %3, 5.000000e-01
ret float %4
}
/* Variables and functions */
int /*<<< orphan*/ dos_putc(char);
void dos_puts(const char *p) {
  char c;
  while ((c = *p++) != 0)
    dos_putc(c);
}


x86 assembly (clang, -O0):
<dos_puts>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
mov    (%rax),%al
mov    %al,-0x9(%rbp)
movsbl %al,%eax
cmp    $0x0,%eax
je     114a <dos_puts+0x3a>
movsbl -0x9(%rbp),%edi
call   1030 <dos_putc@plt>
jmp    111c <dos_puts+0xc>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define void @dos_puts(i8* %0) {
%2 = alloca i8*
%3 = alloca i8
store i8* %0, i8** %2
br label %4
4: ; preds = %10, %1
%5 = load i8*, i8** %2
%6 = getelementptr inbounds i8, i8* %5, i32 1
store i8* %6, i8** %2
%7 = load i8, i8* %5
store i8 %7, i8* %3
%8 = sext i8 %7 to i32
%9 = icmp ne i32 %8, 0
br i1 %9, label %10, label %13
10: ; preds = %4
%11 = load i8, i8* %3
%12 = call i32 @dos_putc(i8 signext %11)
br label %4
13: ; preds = %4
ret void
}

LLVM IR (-O2):
define void @dos_puts(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %11, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %9, %4 ], [ %2, %1 ]
%6 = phi i8* [ %7, %4 ], [ %0, %1 ]
%7 = getelementptr inbounds i8, i8* %6, i64 1
%8 = tail call i32 @dos_putc(i8 signext %5)
%9 = load i8, i8* %7
%10 = icmp eq i8 %9, 0
br i1 %10, label %11, label %4
11: ; preds = %4, %1
ret void
}
void __cxa_guard_release(void) {}


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ _exit(int);
__attribute__((weak)) int _kill(pid_t pid, int sig) {
  if (pid == 1) {
    _exit(sig);
  }
  return 0;
}


x86 assembly (clang, -O0):
<_kill>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
cmpl   $0x1,-0x4(%rbp)
jne    1130 <_kill+0x20>
mov    -0x8(%rbp),%edi
call   1030 <_exit@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_kill>:
cmp    $0x1,%edi
je     1118 <_kill+0x8>
xor    %eax,%eax
ret
push   %rax
mov    %esi,%edi
call   1030 <_exit@plt>

LLVM IR (-O0):
define weak i32 @_kill(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = icmp eq i32 %5, 1
br i1 %6, label %7, label %10
7: ; preds = %2
%8 = load i32, i32* %4
%9 = call i32 @_exit(i32 %8)
unreachable
10: ; preds = %2
ret i32 0
}

LLVM IR (-O2):
define weak i32 @_kill(i32 %0, i32 %1) {
%3 = icmp eq i32 %0, 1
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = tail call i32 @_exit(i32 %1)
unreachable
6: ; preds = %2
ret i32 0
}
char *skipspace(char *p) {
  while (*p == ' ' || *p == '\t')
    p++;
  return p;
}


x86 assembly (clang, -O0):
<skipspace>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%ecx
mov    $0x1,%al
cmp    $0x20,%ecx
mov    %al,-0x9(%rbp)
je     112d <skipspace+0x2d>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x9,%eax
sete   %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
test   $0x1,%al
jne    113d <skipspace+0x3d>
jmp    114e <skipspace+0x4e>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1108 <skipspace+0x8>
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<skipspace>:
mov    %rdi,%rax
jmp    1114 <skipspace+0x14>
cs nopw 0x0(%rax,%rax,1)
nop
add    $0x1,%rax
movzbl (%rax),%ecx
cmp    $0x20,%cl
je     1110 <skipspace+0x10>
cmp    $0x9,%cl
je     1110 <skipspace+0x10>
ret

LLVM IR (-O0):
define i8* @skipspace(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
br label %3
3: ; preds = %15, %1
%4 = load i8*, i8** %2
%5 = load i8, i8* %4
%6 = sext i8 %5 to i32
%7 = icmp eq i32 %6, 32
br i1 %7, label %13, label %8
8: ; preds = %3
%9 = load i8*, i8** %2
%10 = load i8, i8* %9
%11 = sext i8 %10 to i32
%12 = icmp eq i32 %11, 9
br label %13
13: ; preds = %8, %3
%14 = phi i1 [ true, %3 ], [ %12, %8 ]
br i1 %14, label %15, label %18
15: ; preds = %13
%16 = load i8*, i8** %2
%17 = getelementptr inbounds i8, i8* %16, i32 1
store i8* %17, i8** %2
br label %3
18: ; preds = %13
%19 = load i8*, i8** %2
ret i8* %19
}

LLVM IR (-O2):
define i8* @skipspace(i8* %0) {
br label %2
2: ; preds = %5, %1
%3 = phi i8* [ %0, %1 ], [ %6, %5 ]
%4 = load i8, i8* %3
switch i8 %4, label %7 [
i8 32, label %5
i8 9, label %5
]
5: ; preds = %2, %2
%6 = getelementptr inbounds i8, i8* %3, i64 1
br label %2
7: ; preds = %2
ret i8* %3
}
/* Type definitions */
typedef int /*<<< orphan*/ pid_t;

/* Variables and functions */
scalar_t__ wait_for_syscall(int /*<<< orphan*/);
void process_signals(pid_t child) {
  while (1) {
    if (wait_for_syscall(child) != 0)
      break;
    if (wait_for_syscall(child) != 0)
      break;
  }
}


x86 assembly (clang, -O0):
<process_signals>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <wait_for_syscall@plt>
cmp    $0x0,%rax
je     1132 <process_signals+0x22>
jmp    114e <process_signals+0x3e>
mov    -0x4(%rbp),%edi
call   1030 <wait_for_syscall@plt>
cmp    $0x0,%rax
je     1149 <process_signals+0x39>
jmp    114e <process_signals+0x3e>
jmp    111b <process_signals+0xb>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<process_signals>:
push   %rbx
mov    %edi,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %ebx,%edi
call   1030 <wait_for_syscall@plt>
test   %rax,%rax
jne    1138 <process_signals+0x28>
mov    %ebx,%edi
call   1030 <wait_for_syscall@plt>
test   %rax,%rax
je     1120 <process_signals+0x10>
pop    %rbx
ret

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

LLVM IR (-O2):
define void @process_signals(i32 %0) {
br label %2
2: ; preds = %5, %1
%3 = tail call i64 @wait_for_syscall(i32 %0)
%4 = icmp eq i64 %3, 0
br i1 %4, label %5, label %8
5: ; preds = %2
%6 = tail call i64 @wait_for_syscall(i32 %0)
%7 = icmp eq i64 %6, 0
br i1 %7, label %2, label %8
8: ; preds = %5, %2
ret void
}
void destroy_possibles(char **possibles, int index) {
  for (int i = 0; i < index; i++) {
    free(possibles[i]);
  }
  free(possibles);
}


x86 assembly (clang, -O0):
<destroy_possibles>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1151 <destroy_possibles+0x41>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1030 <free@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1126 <destroy_possibles+0x16>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<destroy_possibles>:
push   %r15
push   %r14
push   %rbx
mov    %rdi,%r14
test   %esi,%esi
jle    1142 <destroy_possibles+0x32>
mov    %esi,%r15d
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    (%r14,%rbx,8),%rdi
call   1030 <free@plt>
add    $0x1,%rbx
cmp    %rbx,%r15
jne    1130 <destroy_possibles+0x20>
mov    %r14,%rdi
pop    %rbx
pop    %r14
pop    %r15
jmp    1030 <free@plt>

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

LLVM IR (-O2):
define void @destroy_possibles(i8** nocapture %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %8
6: ; preds = %8, %2
%7 = bitcast i8** %0 to i8*
tail call void @free(i8* %7)
ret void
8: ; preds = %4, %8
%9 = phi i64 [ 0, %4 ], [ %12, %8 ]
%10 = getelementptr inbounds i8*, i8** %0, i64 %9
%11 = load i8*, i8** %10
tail call void @free(i8* %11)
%12 = add nuw nsw i64 %9, 1
%13 = icmp eq i64 %12, %5
br i1 %13, label %6, label %8
}
float sacuboid(float a, float b, float c) {
  return ((a * b * 2) + (4 * b * c));
}


x86 assembly (clang, -O0):
<sacuboid>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  %xmm2,-0xc(%rbp)
movss  -0x4(%rbp),%xmm0
mulss  -0x8(%rbp),%xmm0
movss  0xedb(%rip),%xmm1
mulss  -0x8(%rbp),%xmm1
mulss  -0xc(%rbp),%xmm1
addss  %xmm0,%xmm0
addss  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<sacuboid>:
mulss  %xmm1,%xmm0
mulss  0xef4(%rip),%xmm1
mulss  %xmm2,%xmm1
addss  %xmm0,%xmm0
addss  %xmm1,%xmm0
ret

LLVM IR (-O0):
define float @sacuboid(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 = fmul float %7, %8
%10 = load float, float* %5
%11 = fmul float 4.000000e+00, %10
%12 = load float, float* %6
%13 = fmul float %11, %12
%14 = call float @llvm.fmuladd.f32(float %9, float 2.000000e+00, float %13)
ret float %14
}

LLVM IR (-O2):
define float @sacuboid(float %0, float %1, float %2) {
%4 = fmul float %0, %1
%5 = fmul float %1, 4.000000e+00
%6 = fmul float %5, %2
%7 = tail call float @llvm.fmuladd.f32(float %4, float 2.000000e+00, float %6)
ret float %7
}
/* Type definitions */
typedef int uint64_t;

/* Variables and functions */
int UINT64_C(int);
uint64_t boulderhash_transform(uint64_t val) {
  return UINT64_C(0x5851f42d4c957f2d) * val + UINT64_C(0x14057b7ef767814f);
}


x86 assembly (clang, -O0):
<boulderhash_transform>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x4c957f2d,%edi
call   1030 <UINT64_C@plt>
imul   -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    $0xf767814f,%edi
call   1030 <UINT64_C@plt>
mov    %eax,%ecx
mov    -0x8(%rbp),%eax
add    %ecx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<boulderhash_transform>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebx
mov    $0x4c957f2d,%edi
call   1030 <UINT64_C@plt>
mov    %eax,%ebp
imul   %ebx,%ebp
mov    $0xf767814f,%edi
call   1030 <UINT64_C@plt>
add    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @boulderhash_transform(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @UINT64_C(i32 1284865837)
%4 = load i32, i32* %2
%5 = mul nsw i32 %3, %4
%6 = call i32 @UINT64_C(i32 -144211633)
%7 = add nsw i32 %5, %6
ret i32 %7
}

LLVM IR (-O2):
define i32 @boulderhash_transform(i32 %0) {
%2 = tail call i32 @UINT64_C(i32 1284865837)
%3 = mul nsw i32 %2, %0
%4 = tail call i32 @UINT64_C(i32 -144211633)
%5 = add nsw i32 %3, %4
ret i32 %5
}
void LowPass_Close() {}


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

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

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

LLVM IR (-O2):
define void @LowPass_Close() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, double, double, double, double);
int /*<<< orphan*/ scanf(char *, double *);
int main() {
  double input_1;
  scanf("%lf", &input_1);
  printf("%f\n%.5f\n%le\n%lg", input_1, input_1, input_1, input_1);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
lea    -0x10(%rbp),%rsi
call   1040 <scanf@plt>
movsd  -0x10(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
movsd  -0x10(%rbp),%xmm2
movsd  -0x10(%rbp),%xmm3
lea    0xeaa(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
mov    %rsp,%rsi
call   1040 <scanf@plt>
movsd  (%rsp),%xmm0
lea    0xec8(%rip),%rdi
movaps %xmm0,%xmm1
movaps %xmm0,%xmm2
movaps %xmm0,%xmm3
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%lf\00"
@.str.1 = [16 x i8] c"%f\0A%.5f\0A%le\0A%lg\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca double
store i32 0, i32* %1
%3 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double* %2)
%4 = load double, double* %2
%5 = load double, double* %2
%6 = load double, double* %2
%7 = load double, double* %2
%8 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0), double %4, double %5, double %6, double %7)
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%lf\00"
@.str.1 = [16 x i8] c"%f\0A%.5f\0A%le\0A%lg\00"
define i32 @main() {
%1 = alloca double
%2 = bitcast double* %1 to i8*
%3 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double* %1)
%4 = load double, double* %1
%5 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0), double %4, double %4, double %4, double %4)
ret i32 0
}
unsigned int GPIOMultiplePinsRead(unsigned int baseAdd, unsigned int readMask) {
  return ((*((volatile unsigned int *)(baseAdd + (0x138)))) & readMask);
}


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

x86 assembly (clang, -O2):
<GPIOMultiplePinsRead>:
mov    %esi,%eax
add    $0x138,%edi
and    (%rdi),%eax
ret

LLVM IR (-O0):
define i32 @GPIOMultiplePinsRead(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = add i32 %5, 312
%7 = zext i32 %6 to i64
%8 = inttoptr i64 %7 to i32*
%9 = load volatile i32, i32* %8
%10 = load i32, i32* %4
%11 = and i32 %9, %10
ret i32 %11
}

LLVM IR (-O2):
define i32 @GPIOMultiplePinsRead(i32 %0, i32 %1) {
%3 = add i32 %0, 312
%4 = zext i32 %3 to i64
%5 = inttoptr i64 %4 to i32*
%6 = load volatile i32, i32* %5
%7 = and i32 %6, %1
ret i32 %7
}
int sqHashId(int id, int max) { return ((id * (id + 17)) % max); }


x86 assembly (clang, -O0):
<sqHashId>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x4(%rbp),%ecx
add    $0x11,%ecx
imul   %ecx,%eax
cltd
idivl  -0x8(%rbp)
mov    %edx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<sqHashId>:
lea    0x11(%rdi),%eax
imul   %edi,%eax
cltd
idiv   %esi
mov    %edx,%eax
ret

LLVM IR (-O0):
define i32 @sqHashId(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = load i32, i32* %3
%7 = add nsw i32 %6, 17
%8 = mul nsw i32 %5, %7
%9 = load i32, i32* %4
%10 = srem i32 %8, %9
ret i32 %10
}

LLVM IR (-O2):
define i32 @sqHashId(i32 %0, i32 %1) {
%3 = add nsw i32 %0, 17
%4 = mul nsw i32 %3, %0
%5 = srem i32 %4, %1
ret i32 %5
}
int foo(void) { return 20; }


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

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

LLVM IR (-O0):
define i32 @foo() {
ret i32 20
}

LLVM IR (-O2):
define i32 @foo() {
ret i32 20
}
void change_play_gain(float volume) { int vol, arg; }


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

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

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

LLVM IR (-O2):
define void @change_play_gain(float %0) {
ret void
}
int test_imm_83int64_highword_reg(long long val) {
  return ((val >> 32) & (0x83 << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_83int64_highword_reg(i64 %0) {
%2 = and i64 %0, 562640715776
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
size_t min(size_t a, size_t b) {
  if (a < b)
    return a;
  return b;
}


x86 assembly (clang, -O0):
<min>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
cmp    -0x18(%rbp),%rax
jae    1127 <min+0x27>
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    112f <min+0x2f>
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<min>:
mov    %rsi,%rax
cmp    %rsi,%rdi
cmovb  %rdi,%rax
ret

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

LLVM IR (-O2):
define i64 @min(i64 %0, i64 %1) {
%3 = icmp ult i64 %0, %1
%4 = select i1 %3, i64 %0, i64 %1
ret i64 %4
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
int /*<<< orphan*/ ASSERT(int);
void EMACLPILinkClear(uint32_t ui32Base) {
  ASSERT(ui32Base == 0x400EC000);
  (*((volatile uint32_t *)(ui32Base + 0x00000030))) &= ~(0x00020000);
}


x86 assembly (clang, -O0):
<EMACLPILinkClear>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x400ec000,-0x4(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <ASSERT@plt>
mov    -0x4(%rbp),%eax
add    $0x30,%eax
cltq
mov    (%rax),%ecx
and    $0xfffdffff,%ecx
mov    %ecx,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<EMACLPILinkClear>:
push   %rbx
mov    %edi,%ebx
xor    %edi,%edi
cmp    $0x400ec000,%ebx
sete   %dil
call   1030 <ASSERT@plt>
movslq %ebx,%rax
andl   $0xfffdffff,0x30(%rax)
pop    %rbx
ret

LLVM IR (-O0):
define void @EMACLPILinkClear(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp eq i32 %3, 1074708480
%5 = zext i1 %4 to i32
%6 = call i32 @ASSERT(i32 %5)
%7 = load i32, i32* %2
%8 = add nsw i32 %7, 48
%9 = sext i32 %8 to i64
%10 = inttoptr i64 %9 to i32*
%11 = load volatile i32, i32* %10
%12 = and i32 %11, -131073
store volatile i32 %12, i32* %10
ret void
}

LLVM IR (-O2):
define void @EMACLPILinkClear(i32 %0) {
%2 = icmp eq i32 %0, 1074708480
%3 = zext i1 %2 to i32
%4 = tail call i32 @ASSERT(i32 %3)
%5 = add nsw i32 %0, 48
%6 = sext i32 %5 to i64
%7 = inttoptr i64 %6 to i32*
%8 = load volatile i32, i32* %7
%9 = and i32 %8, -131073
store volatile i32 %9, i32* %7
ret void
}
__attribute__((no, noclone)) unsigned __int128 t163_2sub(unsigned __int128 y) {
  unsigned __int128 x = (1);
  unsigned __int128 r;
  if (__builtin_sub_overflow(x, y, &r))
    bar();
  return r;
}


x86 assembly (clang, -O0):
<t163_2sub>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
mov    %rdi,-0x20(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x20(%rbp),%rax
mov    -0x18(%rbp),%rcx
mov    %rcx,-0x28(%rbp)
mov    %rax,-0x30(%rbp)
movq   $0x0,-0x38(%rbp)
movq   $0x1,-0x40(%rbp)
mov    -0x40(%rbp),%rdx
mov    -0x38(%rbp),%rcx
mov    -0x30(%rbp),%rsi
mov    -0x28(%rbp),%rax
sub    %rsi,%rdx
sbb    %rax,%rcx
setb   %al
mov    %rdx,-0x50(%rbp)
mov    %rcx,-0x48(%rbp)
test   $0x1,%al
jne    116e <t163_2sub+0x5e>
jmp    1175 <t163_2sub+0x65>
mov    $0x0,%al
call   1030 <bar@plt>
mov    -0x50(%rbp),%rax
mov    -0x48(%rbp),%rcx
mov    %rcx,-0x8(%rbp)
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x8(%rbp),%rdx
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<t163_2sub>:
push   %r14
push   %rbx
push   %rax
xor    %r14d,%r14d
mov    $0x1,%ebx
sub    %rdi,%rbx
sbb    %rsi,%r14
jae    112b <t163_2sub+0x1b>
xor    %eax,%eax
call   1030 <bar@plt>
mov    %rbx,%rax
mov    %r14,%rdx
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define { i64, i64 } @t163_2sub(i64 %0, i64 %1) {
%3 = alloca i128
%4 = alloca i128
%5 = alloca i128
%6 = alloca i128
%7 = alloca i128
%8 = bitcast i128* %4 to { i64, i64 }*
%9 = getelementptr inbounds { i64, i64 }, { i64, i64 }* %8, i32 0, i32 0
store i64 %0, i64* %9
%10 = getelementptr inbounds { i64, i64 }, { i64, i64 }* %8, i32 0, i32 1
store i64 %1, i64* %10
%11 = load i128, i128* %4
store i128 %11, i128* %5
store i128 1, i128* %6
%12 = load i128, i128* %6
%13 = load i128, i128* %5
%14 = call { i128, i1 } @llvm.usub.with.overflow.i128(i128 %12, i128 %13)
%15 = extractvalue { i128, i1 } %14, 1
%16 = extractvalue { i128, i1 } %14, 0
store i128 %16, i128* %7
br i1 %15, label %17, label %19
17: ; preds = %2
%18 = call i32 (...) @bar()
br label %19
19: ; preds = %17, %2
%20 = load i128, i128* %7
store i128 %20, i128* %3
%21 = bitcast i128* %3 to { i64, i64 }*
%22 = load { i64, i64 }, { i64, i64 }* %21
ret { i64, i64 } %22
}

LLVM IR (-O2):
define { i64, i64 } @t163_2sub(i64 %0, i64 %1) {
%3 = zext i64 %1 to i128
%4 = shl nuw i128 %3, 64
%5 = zext i64 %0 to i128
%6 = or i128 %4, %5
%7 = tail call { i128, i1 } @llvm.usub.with.overflow.i128(i128 1, i128 %6)
%8 = extractvalue { i128, i1 } %7, 1
%9 = extractvalue { i128, i1 } %7, 0
br i1 %8, label %10, label %12
10: ; preds = %2
%11 = tail call i32 (...) @bar()
br label %12
12: ; preds = %10, %2
%13 = trunc i128 %9 to i64
%14 = lshr i128 %9, 64
%15 = trunc i128 %14 to i64
%16 = insertvalue { i64, i64 } poison, i64 %13, 0
%17 = insertvalue { i64, i64 } %16, i64 %15, 1
ret { i64, i64 } %17
}
/* Variables and functions */
int /*<<< orphan*/ __ISB();
unsigned int __get_SCTLR();
int /*<<< orphan*/ __set_SCTLR(unsigned int);
void L1C_DisableCaches(void) {
  __set_SCTLR(__get_SCTLR() & ~(1U << 12U) & ~(1U << 2U));
  __ISB();
}


x86 assembly (clang, -O0):
<L1C_DisableCaches>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <__get_SCTLR@plt>
mov    %eax,%edi
and    $0xffffefff,%edi
and    $0xfffffffb,%edi
call   1050 <__set_SCTLR@plt>
mov    $0x0,%al
call   1030 <__ISB@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<L1C_DisableCaches>:
push   %rax
xor    %eax,%eax
call   1040 <__get_SCTLR@plt>
and    $0xffffeffb,%eax
mov    %eax,%edi
call   1050 <__set_SCTLR@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <__ISB@plt>

LLVM IR (-O0):
define void @L1C_DisableCaches() {
%1 = call i32 (...) @__get_SCTLR()
%2 = and i32 %1, -4097
%3 = and i32 %2, -5
%4 = call i32 @__set_SCTLR(i32 %3)
%5 = call i32 (...) @__ISB()
ret void
}

LLVM IR (-O2):
define void @L1C_DisableCaches() {
%1 = tail call i32 (...) @__get_SCTLR()
%2 = and i32 %1, -4101
%3 = tail call i32 @__set_SCTLR(i32 %2)
%4 = tail call i32 (...) @__ISB()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ db_read_random_test();
int /*<<< orphan*/ db_read_seq_test();
int /*<<< orphan*/ db_write_test();
int /*<<< orphan*/ printf(char *);
void db_tests() {
  db_write_test();
  db_read_seq_test();
  db_read_random_test();
  printf("+-----------------------+---------------------------+----------------"
         "------------------+---------------------+\n");
}


x86 assembly (clang, -O0):
<db_tests>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1060 <db_write_test@plt>
mov    $0x0,%al
call   1050 <db_read_seq_test@plt>
mov    $0x0,%al
call   1040 <db_read_random_test@plt>
lea    0xea0(%rip),%rdi
call   1030 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<db_tests>:
push   %rax
xor    %eax,%eax
call   1060 <db_write_test@plt>
xor    %eax,%eax
call   1050 <db_read_seq_test@plt>
xor    %eax,%eax
call   1040 <db_read_random_test@plt>
lea    0xea3(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [112 x i8] c"+-----------------------+---------------------------+----------------------------------+---------------------+\0A\00"
define void @db_tests() {
%1 = call i32 (...) @db_write_test()
%2 = call i32 (...) @db_read_seq_test()
%3 = call i32 (...) @db_read_random_test()
%4 = call i32 @printf(i8* getelementptr inbounds ([112 x i8], [112 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [111 x i8] c"+-----------------------+---------------------------+----------------------------------+---------------------+\00"
define void @db_tests() {
%1 = tail call i32 (...) @db_write_test()
%2 = tail call i32 (...) @db_read_seq_test()
%3 = tail call i32 (...) @db_read_random_test()
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([111 x i8], [111 x i8]* @str, i64 0, i64 0))
ret void
}
void retarget_init() {}


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

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

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

LLVM IR (-O2):
define void @retarget_init() {
ret void
}
void utils_blocking_delay_ms(unsigned int ms) {
  int i = 0;
  for (i = 0; i < ms * 1000; i++) {
  }
}


x86 assembly (clang, -O0):
<utils_blocking_delay_ms>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
imul   $0x3e8,-0x4(%rbp),%ecx
cmp    %ecx,%eax
jae    113a <utils_blocking_delay_ms+0x3a>
jmp    112c <utils_blocking_delay_ms+0x2c>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1115 <utils_blocking_delay_ms+0x15>
pop    %rbp
ret

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

LLVM IR (-O0):
define void @utils_blocking_delay_ms(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
store i32 0, i32* %3
store i32 0, i32* %3
br label %4
4: ; preds = %10, %1
%5 = load i32, i32* %3
%6 = load i32, i32* %2
%7 = mul i32 %6, 1000
%8 = icmp ult i32 %5, %7
br i1 %8, label %9, label %13
9: ; preds = %4
br label %10
10: ; preds = %9
%11 = load i32, i32* %3
%12 = add nsw i32 %11, 1
store i32 %12, i32* %3
br label %4
13: ; preds = %4
ret void
}

LLVM IR (-O2):
define void @utils_blocking_delay_ms(i32 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
void help(char *program_name) {
  fprintf(stderr, "%s [-i | -f] source_file(s) target_file\n", program_name);
  exit(EXIT_FAILURE);
}


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

x86 assembly (clang, -O2):
<help>:
push   %rax
mov    %rdi,%rdx
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e98(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [41 x i8] c"%s [-i | -f] source_file(s) target_file\0A\00"
@EXIT_FAILURE = global i32 0
define void @help(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = load i32, i32* @EXIT_FAILURE
%7 = call i32 @exit(i32 %6)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [41 x i8] c"%s [-i | -f] source_file(s) target_file\0A\00"
@EXIT_FAILURE = global i32 0
define void @help(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = load i32, i32* @EXIT_FAILURE
%5 = tail call i32 @exit(i32 %4)
unreachable
}
/* Type definitions */
typedef int dev_t;

/* Variables and functions */
unsigned int minor(dev_t dev) { return dev & 0xFF; }


x86 assembly (clang, -O0):
<minor>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0xff,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<minor>:
movzbl %dil,%eax
ret

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

LLVM IR (-O2):
define i32 @minor(i32 %0) {
%2 = and i32 %0, 255
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ sleep(int);
void scunit__Fourth_test(int *scunit__test_failed) { sleep(1); }


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

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

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

LLVM IR (-O2):
define void @scunit__Fourth_test(i32* nocapture readnone %0) {
%2 = tail call i32 @sleep(i32 1)
ret void
}
unsigned long hash_key(char *str) {
  unsigned long key = 0;
  for (char *c = str; *c; c++) {
    key += *c;
    key *= *c;
    key <<= 8;
    key /= *c;
  }
  return key;
}


x86 assembly (clang, -O0):
<hash_key>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movq   $0x0,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
cmpb   $0x0,(%rax)
je     1178 <hash_key+0x78>
mov    -0x18(%rbp),%rax
movsbq (%rax),%rax
add    -0x10(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x18(%rbp),%rax
movsbq (%rax),%rax
imul   -0x10(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
shl    $0x8,%rax
mov    %rax,-0x10(%rbp)
mov    -0x18(%rbp),%rax
movsbq (%rax),%rcx
mov    -0x10(%rbp),%rax
xor    %edx,%edx
div    %rcx
mov    %rax,-0x10(%rbp)
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    1118 <hash_key+0x18>
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<hash_key>:
mov    (%rdi),%cl
test   %cl,%cl
je     1141 <hash_key+0x41>
add    $0x1,%rdi
xor    %eax,%eax
jmp    1120 <hash_key+0x20>
xchg   %ax,%ax
xor    %edx,%edx
div    %rcx
movzbl (%rdi),%ecx
add    $0x1,%rdi
test   %cl,%cl
je     1143 <hash_key+0x43>
movsbq %cl,%rcx
add    %rcx,%rax
imul   %rcx,%rax
shl    $0x8,%rax
mov    %rax,%rdx
or     %rcx,%rdx
shr    $0x20,%rdx
jne    1110 <hash_key+0x10>
xor    %edx,%edx
div    %ecx
jmp    1115 <hash_key+0x15>
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i64 @hash_key(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %4, label %6
4: ; preds = %6, %1
%5 = phi i64 [ 0, %1 ], [ %14, %6 ]
ret i64 %5
6: ; preds = %1, %6
%7 = phi i8 [ %16, %6 ], [ %2, %1 ]
%8 = phi i8* [ %15, %6 ], [ %0, %1 ]
%9 = phi i64 [ %14, %6 ], [ 0, %1 ]
%10 = sext i8 %7 to i64
%11 = add i64 %9, %10
%12 = shl nsw i64 %10, 8
%13 = mul i64 %12, %11
%14 = udiv i64 %13, %10
%15 = getelementptr inbounds i8, i8* %8, i64 1
%16 = load i8, i8* %15
%17 = icmp eq i8 %16, 0
br i1 %17, label %4, label %6
}
/* Type definitions */
struct ss7 {
  int dummy;
};
struct isup_call {
  int dummy;
};

/* Variables and functions */
int isup_start_timer(struct ss7 *, struct isup_call *, int);
int isup_start_digittimeout(struct ss7 *ss7, struct isup_call *c) {
  return isup_start_timer(ss7, c, 10);
}


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

x86 assembly (clang, -O2):
<isup_start_digittimeout>:
mov    $0xa,%edx
jmp    1030 <isup_start_timer@plt>

LLVM IR (-O0):
%struct.ss7 = type { i32 }
%struct.isup_call = type { i32 }
define i32 @isup_start_digittimeout(%struct.ss7* %0, %struct.isup_call* %1) {
%3 = alloca %struct.ss7*
%4 = alloca %struct.isup_call*
store %struct.ss7* %0, %struct.ss7** %3
store %struct.isup_call* %1, %struct.isup_call** %4
%5 = load %struct.ss7*, %struct.ss7** %3
%6 = load %struct.isup_call*, %struct.isup_call** %4
%7 = call i32 @isup_start_timer(%struct.ss7* %5, %struct.isup_call* %6, i32 10)
ret i32 %7
}

LLVM IR (-O2):
%struct.ss7 = type { i32 }
%struct.isup_call = type { i32 }
define i32 @isup_start_digittimeout(%struct.ss7* %0, %struct.isup_call* %1) {
%3 = tail call i32 @isup_start_timer(%struct.ss7* %0, %struct.isup_call* %1, i32 10)
ret i32 %3
}
/* Type definitions */
typedef int /*<<< orphan*/ arr2;
typedef int /*<<< orphan*/ arr;

/* Variables and functions */
int /*<<< orphan*/ getchar();
int /*<<< orphan*/ printf(char *, int, char *);
int main() {
  char arr[8] = "Hello";
  char arr2[8] = {'H', 'e', 'l', 'l', 'o'};
  printf("arr[] has size: %d\n%s.\n", sizeof(arr), arr);
  printf("arr2[] has size: %d\n%s.", sizeof(arr2), arr2);
  getchar();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xeca(%rip),%rax
mov    %rax,-0xc(%rbp)
mov    0xebf(%rip),%rax
mov    %rax,-0x14(%rbp)
lea    -0xc(%rbp),%rdx
lea    0xeb8(%rip),%rdi
mov    $0x8,%esi
call   1030 <printf@plt>
lea    -0x14(%rbp),%rdx
lea    0xebb(%rip),%rdi
mov    $0x8,%esi
call   1030 <printf@plt>
mov    $0x0,%al
call   1040 <getchar@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
movabs $0x6f6c6c6548,%rax
mov    %rax,0x10(%rsp)
mov    %rax,0x8(%rsp)
lea    0xec1(%rip),%rdi
lea    0x10(%rsp),%rdx
mov    $0x8,%esi
call   1030 <printf@plt>
lea    0xec3(%rip),%rdi
lea    0x8(%rsp),%rdx
mov    $0x8,%esi
call   1030 <printf@plt>
xor    %eax,%eax
call   1040 <getchar@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
@__const.main.arr = [8 x i8] c"Hello\00\00\00"
@__const.main.arr2 = [8 x i8] c"Hello\00\00\00"
@.str = [24 x i8] c"arr[] has size: %d\0A%s.\0A\00"
@.str.1 = [24 x i8] c"arr2[] has size: %d\0A%s.\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [8 x i8]
%3 = alloca [8 x i8]
store i32 0, i32* %1
%4 = bitcast [8 x i8]* %2 to i8*
%5 = bitcast [8 x i8]* %3 to i8*
%6 = getelementptr inbounds [8 x i8], [8 x i8]* %2, i64 0, i64 0
%7 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i32 8, i8* %6)
%8 = getelementptr inbounds [8 x i8], [8 x i8]* %3, i64 0, i64 0
%9 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.1, i64 0, i64 0), i32 8, i8* %8)
%10 = call i32 (...) @getchar()
ret i32 0
}

LLVM IR (-O2):
@.str = [24 x i8] c"arr[] has size: %d\0A%s.\0A\00"
@.str.1 = [24 x i8] c"arr2[] has size: %d\0A%s.\00"
define i32 @main() {
%1 = alloca i64
%2 = alloca i64
%3 = bitcast i64* %1 to i8*
store i64 478560413000, i64* %1
%4 = bitcast i64* %2 to i8*
store i64 478560413000, i64* %2
%5 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i32 8, i8* %3)
%6 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.1, i64 0, i64 0), i32 8, i8* %4)
%7 = call i32 (...) @getchar()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int hello() {
  printf("Hello World.\n");
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [14 x i8] c"Hello World.\0A\00"
define i32 @hello() {
%1 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [13 x i8] c"Hello World.\00"
define i32 @hello() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str, i64 0, i64 0))
ret i32 0
}
void *atomic_xchg(void **ptr, void *new) {
  void *old = new;
  __asm__ volatile("xchg %0, %1\n" : "+r"(old), "+m"(*ptr) : : "memory", "cc");
  return old;
}


x86 assembly (clang, -O0):
<atomic_xchg>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    -0x8(%rbp),%rcx
xchg   %rax,(%rcx)
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<atomic_xchg>:
mov    %rsi,%rax
xchg   %rax,(%rdi)
ret

LLVM IR (-O0):
define i8* @atomic_xchg(i8** %0, i8* %1) {
%3 = alloca i8**
%4 = alloca i8*
%5 = alloca i8*
store i8** %0, i8*** %3
store i8* %1, i8** %4
%6 = load i8*, i8** %4
store i8* %6, i8** %5
%7 = load i8*, i8** %5
%8 = load i8**, i8*** %3
%9 = call i8* asm sideeffect "xchg $0, $1\0A", "=r,=*m,0,*m,~{memory},~{cc},~{dirflag},~{fpsr},~{flags}"(i8** elementtype(i8*) %8, i8* %7, i8** elementtype(i8*) %8)
store i8* %9, i8** %5
%10 = load i8*, i8** %5
ret i8* %10
}

LLVM IR (-O2):
define i8* @atomic_xchg(i8** %0, i8* %1) {
%3 = tail call i8* asm sideeffect "xchg $0, $1\0A", "=r,=*m,0,*m,~{memory},~{cc},~{dirflag},~{fpsr},~{flags}"(i8** elementtype(i8*) %0, i8* %1, i8** elementtype(i8*) %0)
ret i8* %3
}
int hf_stat(void) { return 1; }


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

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

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

LLVM IR (-O2):
define i32 @hf_stat() {
ret i32 1
}
/* Forward declarations */
typedef struct lines TYPE_1__;

/* Type definitions */
struct lines {
  int *a;
  struct point *b;
};

/* Variables and functions */
int /*<<< orphan*/ printid(TYPE_1__ **);
void main() {
  struct point {
    int x;
    int y;
  };
  struct lines {
    int a[2];
    struct point b[1];
  } l[1][2];
  l[0][0].a[0] = 13;
  l[0][1].b[0].y = 14;
  printid(l);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0xd,-0x20(%rbp)
movl   $0xe,-0x4(%rbp)
lea    -0x20(%rbp),%rdi
call   1030 <printid@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x28,%rsp
movl   $0xd,(%rsp)
movl   $0xe,0x1c(%rsp)
mov    %rsp,%rdi
call   1030 <printid@plt>
add    $0x28,%rsp
ret

LLVM IR (-O0):
%struct.lines = type { [2 x i32], [1 x %struct.point] }
%struct.point = type { i32, i32 }
%struct.lines.0 = type { i32*, %struct.point.1* }
%struct.point.1 = type opaque
define void @main() {
%1 = alloca [1 x [2 x %struct.lines]]
%2 = getelementptr inbounds [1 x [2 x %struct.lines]], [1 x [2 x %struct.lines]]* %1, i64 0, i64 0
%3 = getelementptr inbounds [2 x %struct.lines], [2 x %struct.lines]* %2, i64 0, i64 0
%4 = getelementptr inbounds %struct.lines, %struct.lines* %3, i32 0, i32 0
%5 = getelementptr inbounds [2 x i32], [2 x i32]* %4, i64 0, i64 0
store i32 13, i32* %5
%6 = getelementptr inbounds [1 x [2 x %struct.lines]], [1 x [2 x %struct.lines]]* %1, i64 0, i64 0
%7 = getelementptr inbounds [2 x %struct.lines], [2 x %struct.lines]* %6, i64 0, i64 1
%8 = getelementptr inbounds %struct.lines, %struct.lines* %7, i32 0, i32 1
%9 = getelementptr inbounds [1 x %struct.point], [1 x %struct.point]* %8, i64 0, i64 0
%10 = getelementptr inbounds %struct.point, %struct.point* %9, i32 0, i32 1
store i32 14, i32* %10
%11 = getelementptr inbounds [1 x [2 x %struct.lines]], [1 x [2 x %struct.lines]]* %1, i64 0, i64 0
%12 = bitcast [2 x %struct.lines]* %11 to %struct.lines.0**
%13 = call i32 @printid(%struct.lines.0** %12)
ret void
}

LLVM IR (-O2):
%struct.lines = type { [2 x i32], [1 x %struct.point] }
%struct.point = type { i32, i32 }
%struct.lines.0 = type { i32*, %struct.point.1* }
%struct.point.1 = type opaque
define void @main() {
%1 = alloca [1 x [2 x %struct.lines]]
%2 = bitcast [1 x [2 x %struct.lines]]* %1 to i8*
%3 = getelementptr inbounds [1 x [2 x %struct.lines]], [1 x [2 x %struct.lines]]* %1, i64 0, i64 0, i64 0, i32 0, i64 0
store i32 13, i32* %3
%4 = getelementptr inbounds [1 x [2 x %struct.lines]], [1 x [2 x %struct.lines]]* %1, i64 0, i64 0, i64 1, i32 1, i64 0, i32 1
store i32 14, i32* %4
%5 = bitcast [1 x [2 x %struct.lines]]* %1 to %struct.lines.0**
%6 = call i32 @printid(%struct.lines.0** %5)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char const *);
void show_debug(const char *msg) { printf("%s\n", msg); }


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

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

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

LLVM IR (-O2):
@.str = [4 x i8] c"%s\0A\00"
define void @show_debug(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}