xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ g(int *, int);
void f(int x, int *y) {
  int u;
  if (x > 0) {
    f(x - 1, &u);
    *y = x * u + 2;
  } else
    *y = 5;
  if (*y > 5) {
    g(y, x);
  }
}


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x0,-0x4(%rbp)
jle    115d <f+0x3d>
mov    -0x4(%rbp),%edi
sub    $0x1,%edi
lea    -0x14(%rbp),%rsi
call   1030 <f@plt>
mov    -0x4(%rbp),%ecx
imul   -0x14(%rbp),%ecx
add    $0x2,%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
jmp    1167 <f+0x47>
mov    -0x10(%rbp),%rax
movl   $0x5,(%rax)
mov    -0x10(%rbp),%rax
cmpl   $0x5,(%rax)
jle    1180 <f+0x60>
mov    -0x10(%rbp),%rdi
mov    -0x4(%rbp),%esi
call   1040 <g@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
test   %edi,%edi
jle    1158 <f+0x38>
mov    %edi,%ebx
lea    -0x1(%rbx),%edi
lea    0x4(%rsp),%rsi
call   1030 <f@plt>
mov    0x4(%rsp),%eax
imul   %ebx,%eax
lea    0x2(%rax),%ecx
mov    %ecx,(%r14)
cmp    $0x4,%eax
jl     115f <f+0x3f>
mov    %r14,%rdi
mov    %ebx,%esi
call   1040 <g@plt>
jmp    115f <f+0x3f>
movl   $0x5,(%r14)
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @f(i32 %0, i32* %1) {
%3 = alloca i32
%4 = alloca i32*
%5 = alloca i32
store i32 %0, i32* %3
store i32* %1, i32** %4
%6 = load i32, i32* %3
%7 = icmp sgt i32 %6, 0
br i1 %7, label %8, label %16
8: ; preds = %2
%9 = load i32, i32* %3
%10 = sub nsw i32 %9, 1
%11 = load i32, i32* %3
%12 = load i32, i32* %5
%13 = mul nsw i32 %11, %12
%14 = add nsw i32 %13, 2
%15 = load i32*, i32** %4
store i32 %14, i32* %15
br label %18
16: ; preds = %2
%17 = load i32*, i32** %4
store i32 5, i32* %17
br label %18
18: ; preds = %16, %8
%19 = load i32*, i32** %4
%20 = load i32, i32* %19
%21 = icmp sgt i32 %20, 5
br i1 %21, label %22, label %26
22: ; preds = %18
%23 = load i32*, i32** %4
%24 = load i32, i32* %3
%25 = call i32 @g(i32* %23, i32 %24)
br label %26
26: ; preds = %22, %18
ret void
}

LLVM IR (-O2):
define void @f(i32 %0, i32* %1) {
%3 = alloca i32
%4 = bitcast i32* %3 to i8*
%5 = icmp sgt i32 %0, 0
br i1 %5, label %7, label %6
6: ; preds = %2
store i32 5, i32* %1
br label %15
7: ; preds = %2
%8 = add nsw i32 %0, -1
%9 = load i32, i32* %3
%10 = mul nsw i32 %9, %0
%11 = add nsw i32 %10, 2
store i32 %11, i32* %1
%12 = icmp sgt i32 %10, 3
br i1 %12, label %13, label %15
13: ; preds = %7
%14 = call i32 @g(i32* %1, i32 %0)
br label %15
15: ; preds = %6, %13, %7
ret void
}
void debug(char *info) {}


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

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

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

LLVM IR (-O2):
define void @debug(i8* nocapture %0) {
ret void
}
/* Variables and functions */
int omp_get_thread_num();
int /*<<< orphan*/ printf(char *, ...);
int main(void) {
#pragma omp parallel
  {
    int id = omp_get_thread_num();
    printf("Hey, I'm thread #%d\n", id);
#pragma omp critical
    { printf("Thread #%d *inside* critical section!\n", id); }
  }
  printf("Done!\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <omp_get_thread_num@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%esi
lea    0xebd(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x8(%rbp),%esi
lea    0xec1(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xeda(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %eax,%eax
call   1040 <omp_get_thread_num@plt>
mov    %eax,%ebx
lea    0xebf(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xec4(%rip),%rdi
mov    %ebx,%esi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xedb(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [21 x i8] c"Hey, I'm thread #%d\0A\00"
@.str.1 = [39 x i8] c"Thread #%d *inside* critical section!\0A\00"
@.str.2 = [7 x i8] c"Done!\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 (...) @omp_get_thread_num()
store i32 %3, i32* %2
%4 = load i32, i32* %2
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i32 %4)
%6 = load i32, i32* %2
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.1, i64 0, i64 0), i32 %6)
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [21 x i8] c"Hey, I'm thread #%d\0A\00"
@.str.1 = [39 x i8] c"Thread #%d *inside* critical section!\0A\00"
@str = [6 x i8] c"Done!\00"
define i32 @main() {
%1 = tail call i32 (...) @omp_get_thread_num()
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i32 %1)
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([39 x i8], [39 x i8]* @.str.1, i64 0, i64 0), i32 %1)
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @str, i64 0, i64 0))
ret i32 0
}
unsigned long int upow(b, e)
unsigned long int b;
unsigned int e;
{
  unsigned long int y = 1;
  while (e != 0) {
    while ((e & 1) == 0) {
      b = b * b;
      e >>= 1;
    }
    y = y * b;
    e -= 1;
  }
  return y;
}


x86 assembly (clang, -O0):
<upow>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movq   $0x1,-0x18(%rbp)
cmpl   $0x0,-0xc(%rbp)
je     1167 <upow+0x67>
jmp    1122 <upow+0x22>
mov    -0xc(%rbp),%eax
and    $0x1,%eax
cmp    $0x0,%eax
jne    114c <upow+0x4c>
mov    -0x8(%rbp),%rax
imul   -0x8(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0xc(%rbp),%eax
shr    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1122 <upow+0x22>
mov    -0x18(%rbp),%rax
imul   -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0xc(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1113 <upow+0x13>
mov    -0x18(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<upow>:
mov    $0x1,%eax
test   %esi,%esi
jne    111d <upow+0x1d>
ret
nopw   0x0(%rax,%rax,1)
mov    %esi,%ecx
imul   %rdi,%rax
add    $0xffffffff,%ecx
mov    %ecx,%esi
je     1109 <upow+0x9>
test   $0x1,%sil
jne    1110 <upow+0x10>
mov    %esi,%ecx
cs nopw 0x0(%rax,%rax,1)
nop
imul   %rdi,%rdi
shr    %ecx
test   $0x2,%sil
mov    %ecx,%esi
je     1130 <upow+0x30>
jmp    1112 <upow+0x12>

LLVM IR (-O0):
define i64 @upow(i64 %0, i32 %1) {
%3 = alloca i64
%4 = alloca i32
%5 = alloca i64
store i64 %0, i64* %3
store i32 %1, i32* %4
store i64 1, i64* %5
br label %6
6: ; preds = %20, %2
%7 = load i32, i32* %4
%8 = icmp ne i32 %7, 0
br i1 %8, label %9, label %26
9: ; preds = %6
br label %10
10: ; preds = %14, %9
%11 = load i32, i32* %4
%12 = and i32 %11, 1
%13 = icmp eq i32 %12, 0
br i1 %13, label %14, label %20
14: ; preds = %10
%15 = load i64, i64* %3
%16 = load i64, i64* %3
%17 = mul i64 %15, %16
store i64 %17, i64* %3
%18 = load i32, i32* %4
%19 = lshr i32 %18, 1
store i32 %19, i32* %4
br label %10
20: ; preds = %10
%21 = load i64, i64* %5
%22 = load i64, i64* %3
%23 = mul i64 %21, %22
store i64 %23, i64* %5
%24 = load i32, i32* %4
%25 = sub i32 %24, 1
store i32 %25, i32* %4
br label %6
26: ; preds = %6
%27 = load i64, i64* %5
ret i64 %27
}

LLVM IR (-O2):
define i64 @upow(i64 %0, i32 %1) {
%3 = icmp eq i32 %1, 0
br i1 %3, label %23, label %4
4: ; preds = %2, %17
%5 = phi i64 [ %20, %17 ], [ 1, %2 ]
%6 = phi i32 [ %21, %17 ], [ %1, %2 ]
%7 = phi i64 [ %18, %17 ], [ %0, %2 ]
%8 = and i32 %6, 1
%9 = icmp eq i32 %8, 0
br i1 %9, label %10, label %17
10: ; preds = %4, %10
%11 = phi i32 [ %14, %10 ], [ %6, %4 ]
%12 = phi i64 [ %13, %10 ], [ %7, %4 ]
%13 = mul i64 %12, %12
%14 = lshr i32 %11, 1
%15 = and i32 %11, 2
%16 = icmp eq i32 %15, 0
br i1 %16, label %10, label %17
17: ; preds = %10, %4
%18 = phi i64 [ %7, %4 ], [ %13, %10 ]
%19 = phi i32 [ %6, %4 ], [ %14, %10 ]
%20 = mul i64 %18, %5
%21 = add i32 %19, -1
%22 = icmp eq i32 %21, 0
br i1 %22, label %23, label %4
23: ; preds = %17, %2
%24 = phi i64 [ 1, %2 ], [ %20, %17 ]
ret i64 %24
}
int test_imm_16int16_reg(short val) {
  return ((val) & (-0x16 << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_16int16_reg(i16 signext %0) {
%2 = and i16 %0, -22
%3 = icmp eq i16 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
int populate_bits(int x) {
  x |= x >> 1;
  x |= x >> 2;
  x |= x >> 4;
  x |= x >> 8;
  x |= x >> 16;
  return x;
}


x86 assembly (clang, -O0):
<populate_bits>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x1,%eax
or     -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x2,%eax
or     -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x4,%eax
or     -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x8,%eax
or     -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x10,%eax
or     -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<populate_bits>:
mov    %edi,%eax
sar    %eax
or     %edi,%eax
mov    %eax,%ecx
sar    $0x2,%ecx
or     %eax,%ecx
mov    %ecx,%eax
sar    $0x4,%eax
or     %ecx,%eax
mov    %eax,%ecx
sar    $0x8,%ecx
or     %eax,%ecx
mov    %ecx,%eax
sar    $0x10,%eax
or     %ecx,%eax
ret

LLVM IR (-O0):
define i32 @populate_bits(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = ashr i32 %3, 1
%5 = load i32, i32* %2
%6 = or i32 %5, %4
store i32 %6, i32* %2
%7 = load i32, i32* %2
%8 = ashr i32 %7, 2
%9 = load i32, i32* %2
%10 = or i32 %9, %8
store i32 %10, i32* %2
%11 = load i32, i32* %2
%12 = ashr i32 %11, 4
%13 = load i32, i32* %2
%14 = or i32 %13, %12
store i32 %14, i32* %2
%15 = load i32, i32* %2
%16 = ashr i32 %15, 8
%17 = load i32, i32* %2
%18 = or i32 %17, %16
store i32 %18, i32* %2
%19 = load i32, i32* %2
%20 = ashr i32 %19, 16
%21 = load i32, i32* %2
%22 = or i32 %21, %20
store i32 %22, i32* %2
%23 = load i32, i32* %2
ret i32 %23
}

LLVM IR (-O2):
define i32 @populate_bits(i32 %0) {
%2 = ashr i32 %0, 1
%3 = or i32 %2, %0
%4 = ashr i32 %3, 2
%5 = or i32 %4, %3
%6 = ashr i32 %5, 4
%7 = or i32 %6, %5
%8 = ashr i32 %7, 8
%9 = or i32 %8, %7
%10 = ashr i32 %9, 16
%11 = or i32 %10, %9
ret i32 %11
}
/* Variables and functions */
int /*<<< orphan*/ F_DUPFD;
int /*<<< orphan*/ machdep_sys_close(int);
int /*<<< orphan*/ machdep_sys_fcntl(int, int /*<<< orphan*/, int);
machdep_sys_dup2(int a, int b) {
  machdep_sys_close(b);
  machdep_sys_fcntl(a, F_DUPFD, b);
}


x86 assembly (clang, -O0):
<machdep_sys_dup2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%edi
call   1030 <machdep_sys_close@plt>
mov    -0x8(%rbp),%edi
mov    0x2ea8(%rip),%rax
mov    (%rax),%esi
mov    -0xc(%rbp),%edx
call   1040 <machdep_sys_fcntl@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<machdep_sys_dup2>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
mov    %esi,%edi
call   1030 <machdep_sys_close@plt>
mov    0x2eb3(%rip),%rax
mov    (%rax),%esi
mov    %ebp,%edi
mov    %ebx,%edx
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1040 <machdep_sys_fcntl@plt>

LLVM IR (-O0):
@F_DUPFD = global i32 0
define i32 @machdep_sys_dup2(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* %5
%7 = call i32 @machdep_sys_close(i32 %6)
%8 = load i32, i32* %4
%9 = load i32, i32* @F_DUPFD
%10 = load i32, i32* %5
%11 = call i32 @machdep_sys_fcntl(i32 %8, i32 %9, i32 %10)
%12 = load i32, i32* %3
ret i32 %12
}

LLVM IR (-O2):
@F_DUPFD = global i32 0
define i32 @machdep_sys_dup2(i32 %0, i32 %1) {
%3 = tail call i32 @machdep_sys_close(i32 %1)
%4 = load i32, i32* @F_DUPFD
%5 = tail call i32 @machdep_sys_fcntl(i32 %0, i32 %4, i32 %1)
ret i32 undef
}
void av_chroma_location_from_name() {}


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

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

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

LLVM IR (-O2):
define void @av_chroma_location_from_name() {
ret void
}
int main(void) {
  double long x;
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
void ft_striter(char *s, void (*f)(char *)) {
  if (!s || !f)
    return;
  if (*s) {
    f(s);
    ft_striter(s + 1, f);
  }
  return;
}


x86 assembly (clang, -O0):
<ft_striter>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1136 <ft_striter+0x26>
cmpq   $0x0,-0x10(%rbp)
jne    113b <ft_striter+0x2b>
jmp    1168 <ft_striter+0x58>
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     1163 <ft_striter+0x53>
mov    -0x10(%rbp),%rax
mov    -0x8(%rbp),%rdi
call   *%rax
mov    -0x8(%rbp),%rdi
add    $0x1,%rdi
mov    -0x10(%rbp),%rsi
call   1030 <ft_striter@plt>
jmp    1168 <ft_striter+0x58>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_striter>:
push   %r14
push   %rbx
push   %rax
test   %rsi,%rsi
je     1130 <ft_striter+0x30>
mov    %rdi,%rbx
test   %rdi,%rdi
je     1130 <ft_striter+0x30>
cmpb   $0x0,(%rbx)
je     1130 <ft_striter+0x30>
mov    %rsi,%r14
nopl   0x0(%rax)
mov    %rbx,%rdi
call   *%r14
cmpb   $0x0,0x1(%rbx)
lea    0x1(%rbx),%rbx
jne    1120 <ft_striter+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define void @ft_striter(i8* %0, void (i8*)* %1) {
%3 = icmp ne void (i8*)* %1, null
%4 = icmp ne i8* %0, null
%5 = and i1 %3, %4
br i1 %5, label %6, label %14
6: ; preds = %2
%7 = load i8, i8* %0
%8 = icmp eq i8 %7, 0
br i1 %8, label %14, label %9
9: ; preds = %6, %9
%10 = phi i8* [ %11, %9 ], [ %0, %6 ]
tail call void %1(i8* %10)
%11 = getelementptr inbounds i8, i8* %10, i64 1
%12 = load i8, i8* %11
%13 = icmp eq i8 %12, 0
br i1 %13, label %14, label %9
14: ; preds = %9, %6, %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(unsigned long long *);
void destroySetArr(unsigned long long *setArr) { free(setArr); }


x86 assembly (clang, -O0):
<destroySetArr>:
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):
<destroySetArr>:
jmp    1030 <free@plt>

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

LLVM IR (-O2):
define void @destroySetArr(i64* nocapture %0) {
%2 = tail call i32 @free(i64* %0)
ret void
}
double GetMOA(double *sln, int yardage) {
  double size = sln[50001 * 10 + 1];
  if (yardage < size) {
    return sln[10 * yardage + 2];
  } else
    return 0;
}


x86 assembly (clang, -O0):
<GetMOA>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    -0x10(%rbp),%rax
movsd  0x3d0958(%rax),%xmm0
movsd  %xmm0,-0x20(%rbp)
cvtsi2sdl -0x14(%rbp),%xmm1
movsd  -0x20(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jbe    114d <GetMOA+0x4d>
mov    -0x10(%rbp),%rax
imul   $0xa,-0x14(%rbp),%ecx
add    $0x2,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1155 <GetMOA+0x55>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<GetMOA>:
cvtsi2sd %esi,%xmm1
movsd  0x3d0958(%rdi),%xmm2
xorps  %xmm0,%xmm0
ucomisd %xmm1,%xmm2
jbe    1122 <GetMOA+0x22>
add    %esi,%esi
lea    (%rsi,%rsi,4),%eax
cltq
movsd  0x10(%rdi,%rax,8),%xmm0
ret

LLVM IR (-O0):
define double @GetMOA(double* %0, i32 %1) {
%3 = alloca double
%4 = alloca double*
%5 = alloca i32
%6 = alloca double
store double* %0, double** %4
store i32 %1, i32* %5
%7 = load double*, double** %4
%8 = getelementptr inbounds double, double* %7, i64 500011
%9 = load double, double* %8
store double %9, double* %6
%10 = load i32, i32* %5
%11 = sitofp i32 %10 to double
%12 = load double, double* %6
%13 = fcmp olt double %11, %12
br i1 %13, label %14, label %22
14: ; preds = %2
%15 = load double*, double** %4
%16 = load i32, i32* %5
%17 = mul nsw i32 10, %16
%18 = add nsw i32 %17, 2
%19 = sext i32 %18 to i64
%20 = getelementptr inbounds double, double* %15, i64 %19
%21 = load double, double* %20
store double %21, double* %3
br label %23
22: ; preds = %2
store double 0.000000e+00, double* %3
br label %23
23: ; preds = %22, %14
%24 = load double, double* %3
ret double %24
}

LLVM IR (-O2):
define double @GetMOA(double* nocapture %0, i32 %1) {
%3 = getelementptr inbounds double, double* %0, i64 500011
%4 = load double, double* %3
%5 = sitofp i32 %1 to double
%6 = fcmp ogt double %4, %5
br i1 %6, label %7, label %13
7: ; preds = %2
%8 = mul nsw i32 %1, 10
%9 = add nsw i32 %8, 2
%10 = sext i32 %9 to i64
%11 = getelementptr inbounds double, double* %0, i64 %10
%12 = load double, double* %11
br label %13
13: ; preds = %2, %7
%14 = phi double [ %12, %7 ], [ 0.000000e+00, %2 ]
ret double %14
}
int htoi(int x) { return 9 * (x >> 6) + (x & 0x0f); }


x86 assembly (clang, -O0):
<htoi>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x6,%eax
imul   $0x9,%eax,%eax
mov    -0x4(%rbp),%ecx
and    $0xf,%ecx
add    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<htoi>:
mov    %edi,%eax
sar    $0x6,%eax
lea    (%rax,%rax,8),%eax
and    $0xf,%edi
add    %edi,%eax
ret

LLVM IR (-O0):
define i32 @htoi(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = ashr i32 %3, 6
%5 = mul nsw i32 9, %4
%6 = load i32, i32* %2
%7 = and i32 %6, 15
%8 = add nsw i32 %5, %7
ret i32 %8
}

LLVM IR (-O2):
define i32 @htoi(i32 %0) {
%2 = ashr i32 %0, 6
%3 = mul nsw i32 %2, 9
%4 = and i32 %0, 15
%5 = add nsw i32 %3, %4
ret i32 %5
}
void exynos4_default_sdhci1(void) {}


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

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

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

LLVM IR (-O2):
define void @exynos4_default_sdhci1() {
ret void
}
/* Forward declarations */
typedef struct TYPE_3__ TYPE_1__;

/* Type definitions */
struct TYPE_3__ {
  long long quot;
  long long rem;
};
typedef TYPE_1__ lldiv_t;

/* Variables and functions */
lldiv_t lldiv(long long numer, long long denom) {
  lldiv_t retval;
  retval.quot = numer / denom;
  retval.rem = numer % denom;
  return (retval);
}


x86 assembly (clang, -O0):
<lldiv>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x18(%rbp)
mov    %rsi,-0x20(%rbp)
mov    -0x18(%rbp),%rax
mov    -0x20(%rbp),%rcx
cqto
idiv   %rcx
mov    %rax,-0x10(%rbp)
mov    -0x18(%rbp),%rax
mov    -0x20(%rbp),%rcx
cqto
idiv   %rcx
mov    %rdx,-0x8(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x8(%rbp),%rdx
pop    %rbp
ret

x86 assembly (clang, -O2):
<lldiv>:
mov    %rdi,%rax
mov    %rdi,%rcx
or     %rsi,%rcx
shr    $0x20,%rcx
je     1115 <lldiv+0x15>
cqto
idiv   %rsi
ret
xor    %edx,%edx
div    %esi
ret

LLVM IR (-O0):
%struct.TYPE_3__ = type { i64, i64 }
define { i64, i64 } @lldiv(i64 %0, i64 %1) {
%3 = alloca %struct.TYPE_3__
%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 = sdiv i64 %6, %7
%9 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %3, i32 0, i32 0
store i64 %8, i64* %9
%10 = load i64, i64* %4
%11 = load i64, i64* %5
%12 = srem i64 %10, %11
%13 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %3, i32 0, i32 1
store i64 %12, i64* %13
%14 = bitcast %struct.TYPE_3__* %3 to { i64, i64 }*
%15 = load { i64, i64 }, { i64, i64 }* %14
ret { i64, i64 } %15
}

LLVM IR (-O2):
define { i64, i64 } @lldiv(i64 %0, i64 %1) {
%3 = sdiv i64 %0, %1
%4 = srem i64 %0, %1
%5 = insertvalue { i64, i64 } poison, i64 %3, 0
%6 = insertvalue { i64, i64 } %5, i64 %4, 1
ret { i64, i64 } %6
}
int do_718() { return 718; }


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

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

LLVM IR (-O0):
define i32 @do_718() {
ret i32 718
}

LLVM IR (-O2):
define i32 @do_718() {
ret i32 718
}
/* Variables and functions */
unsigned int _bzhi_u32(unsigned int, unsigned int);
unsigned int __attribute__((__target__("bmi2")))
bzhi_u32_wrap(unsigned int x, unsigned int y) {
  return _bzhi_u32(x, y);
}


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

x86 assembly (clang, -O2):
<bzhi_u32_wrap>:
jmp    1030 <_bzhi_u32@plt>

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

LLVM IR (-O2):
define i32 @bzhi_u32_wrap(i32 %0, i32 %1) {
%3 = tail call i32 @_bzhi_u32(i32 %0, i32 %1)
ret i32 %3
}
/* Variables and functions */
float fasterexp(float);
float fastertanh(float p) {
  return -1.0f + 2.0f / (1.0f + fasterexp(-2.0f * p));
}


x86 assembly (clang, -O0):
<fastertanh>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  0xee7(%rip),%xmm0
mulss  -0x4(%rbp),%xmm0
call   1030 <fasterexp@plt>
movaps %xmm0,%xmm1
movss  0xece(%rip),%xmm0
addss  %xmm1,%xmm0
movss  0xebe(%rip),%xmm1
divss  %xmm0,%xmm1
movss  0xeae(%rip),%xmm0
addss  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fastertanh>:
push   %rax
mulss  0xee7(%rip),%xmm0
call   1030 <fasterexp@plt>
addss  0xede(%rip),%xmm0
movss  0xeda(%rip),%xmm1
divss  %xmm0,%xmm1
addss  0xed2(%rip),%xmm1
movaps %xmm1,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @fastertanh(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = fmul float -2.000000e+00, %3
%5 = call float @fasterexp(float %4)
%6 = fadd float 1.000000e+00, %5
%7 = fdiv float 2.000000e+00, %6
%8 = fadd float -1.000000e+00, %7
ret float %8
}

LLVM IR (-O2):
define float @fastertanh(float %0) {
%2 = fmul float %0, -2.000000e+00
%3 = tail call float @fasterexp(float %2)
%4 = fadd float %3, 1.000000e+00
%5 = fdiv float 2.000000e+00, %4
%6 = fadd float %5, -1.000000e+00
ret float %6
}
/* Type definitions */
typedef int /*<<< orphan*/ WINDOW;

/* Variables and functions */
int /*<<< orphan*/ A_BOLD;
int /*<<< orphan*/ COLOR_PAIR(int);
scalar_t__ TRUE;
scalar_t__ has_colors();
int /*<<< orphan*/ wattroff(int /*<<< orphan*/ *, int /*<<< orphan*/);
void plaza_drop_palette(WINDOW *win, int palette) {
  if (has_colors() == TRUE) {
    wattroff(win, COLOR_PAIR(palette));
    wattroff(win, A_BOLD);
  }
}


x86 assembly (clang, -O0):
<plaza_drop_palette>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    $0x0,%al
call   1030 <has_colors@plt>
mov    0x2e9b(%rip),%rcx
cmp    (%rcx),%rax
jne    1183 <plaza_drop_palette+0x53>
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0xc(%rbp),%edi
call   1040 <COLOR_PAIR@plt>
mov    -0x18(%rbp),%rdi
mov    %eax,%esi
call   1050 <wattroff@plt>
mov    -0x8(%rbp),%rdi
mov    0x2e5c(%rip),%rax
mov    (%rax),%esi
call   1050 <wattroff@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<plaza_drop_palette>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %rdi,%rbx
xor    %eax,%eax
call   1030 <has_colors@plt>
mov    0x2ea2(%rip),%rcx
cmp    (%rcx),%rax
jne    1173 <plaza_drop_palette+0x43>
mov    %ebp,%edi
call   1040 <COLOR_PAIR@plt>
mov    %rbx,%rdi
mov    %eax,%esi
call   1050 <wattroff@plt>
mov    0x2e75(%rip),%rax
mov    (%rax),%esi
mov    %rbx,%rdi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1050 <wattroff@plt>
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@TRUE = global i64 0
@A_BOLD = global i32 0
define void @plaza_drop_palette(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
store i32* %0, i32** %3
store i32 %1, i32* %4
%5 = call i64 (...) @has_colors()
%6 = load i64, i64* @TRUE
%7 = icmp eq i64 %5, %6
br i1 %7, label %8, label %16
8: ; preds = %2
%9 = load i32*, i32** %3
%10 = load i32, i32* %4
%11 = call i32 @COLOR_PAIR(i32 %10)
%12 = call i32 @wattroff(i32* %9, i32 %11)
%13 = load i32*, i32** %3
%14 = load i32, i32* @A_BOLD
%15 = call i32 @wattroff(i32* %13, i32 %14)
br label %16
16: ; preds = %8, %2
ret void
}

LLVM IR (-O2):
@TRUE = global i64 0
@A_BOLD = global i32 0
define void @plaza_drop_palette(i32* %0, i32 %1) {
%3 = tail call i64 (...) @has_colors()
%4 = load i64, i64* @TRUE
%5 = icmp eq i64 %3, %4
br i1 %5, label %6, label %11
6: ; preds = %2
%7 = tail call i32 @COLOR_PAIR(i32 %1)
%8 = tail call i32 @wattroff(i32* %0, i32 %7)
%9 = load i32, i32* @A_BOLD
%10 = tail call i32 @wattroff(i32* %0, i32 %9)
br label %11
11: ; preds = %6, %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ check_result(char *, char *);
int main(int argc, char *argv[]) {
  check_result("ECDH", "/sys/kernel/debug/bluetooth/selftest_ecdh");
  check_result("SMP", "/sys/kernel/debug/bluetooth/selftest_smp");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xed3(%rip),%rdi
lea    0xed1(%rip),%rsi
call   1030 <check_result@plt>
lea    0xeef(%rip),%rdi
lea    0xeec(%rip),%rsi
call   1030 <check_result@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
lea    0xee6(%rip),%rsi
call   1030 <check_result@plt>
lea    0xf04(%rip),%rdi
lea    0xf01(%rip),%rsi
call   1030 <check_result@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [5 x i8] c"ECDH\00"
@.str.1 = [42 x i8] c"/sys/kernel/debug/bluetooth/selftest_ecdh\00"
@.str.2 = [4 x i8] c"SMP\00"
@.str.3 = [41 x i8] c"/sys/kernel/debug/bluetooth/selftest_smp\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 @check_result(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.1, i64 0, i64 0))
%7 = call i32 @check_result(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.3, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [5 x i8] c"ECDH\00"
@.str.1 = [42 x i8] c"/sys/kernel/debug/bluetooth/selftest_ecdh\00"
@.str.2 = [4 x i8] c"SMP\00"
@.str.3 = [41 x i8] c"/sys/kernel/debug/bluetooth/selftest_smp\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @check_result(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.1, i64 0, i64 0))
%4 = tail call i32 @check_result(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.3, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ parse();
int /*<<< orphan*/ printf(char *);
int main(int argc, char *argv[]) {
  parse();
  printf("fixme..");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1040 <parse@plt>
lea    0xebc(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@.str = [8 x i8] c"fixme..\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @parse()
%4 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
int test(int x) { return (2 * x) / 2; }


x86 assembly (clang, -O0):
<test>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shl    $0x1,%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @test(i32 returned %0) {
ret i32 %0
}
/* Type definitions */
struct pci_device_id {
  int dummy;
};
struct pci_dev {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ pci_info(struct pci_dev *, char *);
int pci_pf_stub_probe(struct pci_dev *dev, const struct pci_device_id *id) {
  pci_info(dev, "claimed by pci-pf-stub\n");
  return 0;
}


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

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

LLVM IR (-O0):
%struct.pci_dev = type { i32 }
%struct.pci_device_id = type { i32 }
@.str = [24 x i8] c"claimed by pci-pf-stub\0A\00"
define i32 @pci_pf_stub_probe(%struct.pci_dev* %0, %struct.pci_device_id* %1) {
%3 = alloca %struct.pci_dev*
%4 = alloca %struct.pci_device_id*
store %struct.pci_dev* %0, %struct.pci_dev** %3
store %struct.pci_device_id* %1, %struct.pci_device_id** %4
%5 = load %struct.pci_dev*, %struct.pci_dev** %3
%6 = call i32 @pci_info(%struct.pci_dev* %5, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
%struct.pci_dev = type { i32 }
%struct.pci_device_id = type { i32 }
@.str = [24 x i8] c"claimed by pci-pf-stub\0A\00"
define i32 @pci_pf_stub_probe(%struct.pci_dev* %0, %struct.pci_device_id* nocapture readnone %1) {
%3 = tail call i32 @pci_info(%struct.pci_dev* %0, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
char *GetConfigVar(char *);
char *my_GetDHCPint(void) { return (GetConfigVar("dhcp-interface")); }


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

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

LLVM IR (-O0):
@.str = [15 x i8] c"dhcp-interface\00"
define i8* @my_GetDHCPint() {
%1 = call i8* @GetConfigVar(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
ret i8* %1
}

LLVM IR (-O2):
@.str = [15 x i8] c"dhcp-interface\00"
define i8* @my_GetDHCPint() {
%1 = tail call i8* @GetConfigVar(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
ret i8* %1
}
/* Variables and functions */
int /*<<< orphan*/ Mpu6000SettingsHandle();
int /*<<< orphan*/ UAVObjLogging(int /*<<< orphan*/);
void Mpu6000SettingsLogging() { UAVObjLogging(Mpu6000SettingsHandle()); }


x86 assembly (clang, -O0):
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <Mpu6000SettingsHandle@plt>
mov    %eax,%edi
call   1030 <UAVObjLogging@plt>
pop    %rbp
ret

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

LLVM IR (-O0):
define void @Mpu6000SettingsLogging() {
%1 = call i32 (...) @Mpu6000SettingsHandle()
%2 = call i32 @UAVObjLogging(i32 %1)
ret void
}

LLVM IR (-O2):
define void @Mpu6000SettingsLogging() {
%1 = tail call i32 (...) @Mpu6000SettingsHandle()
%2 = tail call i32 @UAVObjLogging(i32 %1)
ret void
}
/* Variables and functions */
int getnpar(int /*<<< orphan*/, char *, char *, unsigned int *);
int getparuint(char *name, unsigned int *ptr) {
  return getnpar(0, name, "p", ptr);
}


x86 assembly (clang, -O0):
<getparuint>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rcx
xor    %edi,%edi
lea    0xecf(%rip),%rdx
call   1030 <getnpar@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getparuint>:
mov    %rsi,%rcx
mov    %rdi,%rsi
lea    0xee3(%rip),%rdx
xor    %edi,%edi
jmp    1030 <getnpar@plt>

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

LLVM IR (-O2):
@.str = [2 x i8] c"p\00"
define i32 @getparuint(i8* %0, i32* %1) {
%3 = tail call i32 @getnpar(i32 0, i8* %0, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i32* %1)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ main();
void decibel_start(void) {
  int _exit(int status);
  main();
  _exit(0);
}


x86 assembly (clang, -O0):
<decibel_start>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <main@plt>
xor    %edi,%edi
call   1030 <_exit@plt>

x86 assembly (clang, -O2):
<decibel_start>:
push   %rax
xor    %eax,%eax
call   1040 <main@plt>
xor    %edi,%edi
call   1030 <_exit@plt>

LLVM IR (-O0):
define void @decibel_start() {
%1 = call i32 (...) @main()
%2 = call i32 @_exit(i32 0)
unreachable
}

LLVM IR (-O2):
define void @decibel_start() {
%1 = tail call i32 (...) @main()
%2 = tail call i32 @_exit(i32 0)
unreachable
}
int absl(int a, int b) {
  if (a > b)
    return (a - b);
  else
    return (b - a);
}


x86 assembly (clang, -O0):
<absl>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jle    1124 <absl+0x24>
mov    -0x8(%rbp),%eax
sub    -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    112d <absl+0x2d>
mov    -0xc(%rbp),%eax
sub    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<absl>:
mov    %edi,%eax
sub    %esi,%eax
neg    %eax
sub    %esi,%edi
cmovg  %edi,%eax
ret

LLVM IR (-O0):
define i32 @absl(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 = load i32, i32* %5
%8 = icmp sgt i32 %6, %7
br i1 %8, label %9, label %13
9: ; preds = %2
%10 = load i32, i32* %4
%11 = load i32, i32* %5
%12 = sub nsw i32 %10, %11
store i32 %12, i32* %3
br label %17
13: ; preds = %2
%14 = load i32, i32* %5
%15 = load i32, i32* %4
%16 = sub nsw i32 %14, %15
store i32 %16, i32* %3
br label %17
17: ; preds = %13, %9
%18 = load i32, i32* %3
ret i32 %18
}

LLVM IR (-O2):
define i32 @absl(i32 %0, i32 %1) {
%3 = icmp sgt i32 %0, %1
%4 = sub nsw i32 %0, %1
%5 = sub nsw i32 %1, %0
%6 = select i1 %3, i32 %4, i32 %5
ret i32 %6
}
/* Variables and functions */
int dwarf_get_LNS_name(unsigned int, char const **);
char const *ellipname(int, unsigned int, char const *, char *, int);
const char *get_LNS_name(unsigned int val_in, int printonerr) {
  const char *v = 0;
  int res = dwarf_get_LNS_name(val_in, &v);
  return ellipname(res, val_in, v, "LNS", printonerr);
}


x86 assembly (clang, -O0):
<get_LNS_name>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
movq   $0x0,-0x10(%rbp)
mov    -0x4(%rbp),%edi
lea    -0x10(%rbp),%rsi
call   1030 <dwarf_get_LNS_name@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%edi
mov    -0x4(%rbp),%esi
mov    -0x10(%rbp),%rdx
mov    -0x8(%rbp),%r8d
lea    0xea6(%rip),%rcx
call   1040 <ellipname@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_LNS_name>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
movq   $0x0,(%rsp)
mov    %rsp,%rsi
call   1030 <dwarf_get_LNS_name@plt>
mov    (%rsp),%rdx
lea    0xebe(%rip),%rcx
mov    %eax,%edi
mov    %ebp,%esi
mov    %ebx,%r8d
call   1040 <ellipname@plt>
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [4 x i8] c"LNS\00"
define i8* @get_LNS_name(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
store i8* null, i8** %5
%7 = load i32, i32* %3
%8 = call i32 @dwarf_get_LNS_name(i32 %7, i8** %5)
store i32 %8, i32* %6
%9 = load i32, i32* %6
%10 = load i32, i32* %3
%11 = load i8*, i8** %5
%12 = load i32, i32* %4
%13 = call i8* @ellipname(i32 %9, i32 %10, i8* %11, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %12)
ret i8* %13
}

LLVM IR (-O2):
@.str = [4 x i8] c"LNS\00"
define i8* @get_LNS_name(i32 %0, i32 %1) {
%3 = alloca i8*
%4 = bitcast i8** %3 to i8*
store i8* null, i8** %3
%5 = call i32 @dwarf_get_LNS_name(i32 %0, i8** %3)
%6 = load i8*, i8** %3
%7 = call i8* @ellipname(i32 %5, i32 %0, i8* %6, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i8* %7
}
/* Type definitions */
typedef int /*<<< orphan*/ __m128i;

/* Variables and functions */
unsigned char _mm_aesdecwide256kl_u8(int /*<<< orphan*/ *,
                                     int /*<<< orphan*/ const *, void const *);
unsigned char test__mm_aesdecwide256kl_u8(__m128i odata[8],
                                          const __m128i idata[8],
                                          const void *h) {
  return _mm_aesdecwide256kl_u8(odata, idata, h);
}


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

x86 assembly (clang, -O2):
<test__mm_aesdecwide256kl_u8>:
jmp    1030 <_mm_aesdecwide256kl_u8@plt>

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

LLVM IR (-O2):
define zeroext i8 @test__mm_aesdecwide256kl_u8(i32* %0, i32* %1, i8* %2) {
%4 = tail call zeroext i8 @_mm_aesdecwide256kl_u8(i32* %0, i32* %1, i8* %2)
ret i8 %4
}
unsigned short int f54(unsigned short int x, unsigned long int y) {
  return (x << (8 * 2 - y)) ^ (x >> y);
}


x86 assembly (clang, -O0):
<f54>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
mov    %rsi,-0x10(%rbp)
movzwl -0x2(%rbp),%eax
mov    $0x10,%ecx
sub    -0x10(%rbp),%rcx
shl    %cl,%eax
movzwl -0x2(%rbp),%edx
mov    -0x10(%rbp),%rcx
sar    %cl,%edx
mov    %edx,%ecx
xor    %ecx,%eax
movzwl %ax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f54>:
mov    $0x10,%cl
sub    %sil,%cl
mov    %edi,%eax
shl    %cl,%eax
mov    %esi,%ecx
shr    %cl,%edi
xor    %edi,%eax
ret

LLVM IR (-O0):
define zeroext i16 @f54(i16 zeroext %0, i64 %1) {
%3 = alloca i16
%4 = alloca i64
store i16 %0, i16* %3
store i64 %1, i64* %4
%5 = load i16, i16* %3
%6 = zext i16 %5 to i32
%7 = load i64, i64* %4
%8 = sub i64 16, %7
%9 = trunc i64 %8 to i32
%10 = shl i32 %6, %9
%11 = load i16, i16* %3
%12 = zext i16 %11 to i32
%13 = load i64, i64* %4
%14 = trunc i64 %13 to i32
%15 = ashr i32 %12, %14
%16 = xor i32 %10, %15
%17 = trunc i32 %16 to i16
ret i16 %17
}

LLVM IR (-O2):
define zeroext i16 @f54(i16 zeroext %0, i64 %1) {
%3 = zext i16 %0 to i32
%4 = trunc i64 %1 to i32
%5 = sub i32 16, %4
%6 = shl i32 %3, %5
%7 = lshr i32 %3, %4
%8 = xor i32 %6, %7
%9 = trunc i32 %8 to i16
ret i16 %9
}
int cmc_getPassword(const char username_in[], char password[]) { return 1; }


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

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

LLVM IR (-O0):
define i32 @cmc_getPassword(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 @cmc_getPassword(i8* nocapture readnone %0, i8* nocapture readnone %1) {
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void printDebugLine() { printf("\n**************************\n"); }


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

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

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

LLVM IR (-O2):
@str = [28 x i8] c"\0A**************************\00"
define void @printDebugLine() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void print_hex(int n) {
  if (n < 10)
    printf("%d", n);
  else
    printf("%c", 87 + n);
}


x86 assembly (clang, -O0):
<print_hex>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0xa,-0x4(%rbp)
jge    1139 <print_hex+0x29>
mov    -0x4(%rbp),%esi
lea    0xed1(%rip),%rdi
call   1030 <printf@plt>
jmp    114b <print_hex+0x3b>
mov    -0x4(%rbp),%esi
add    $0x57,%esi
lea    0xebd(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_hex>:
mov    %edi,%esi
cmp    $0x9,%edi
jg     1123 <print_hex+0x13>
lea    0xee2(%rip),%rdi
jmp    1030 <printf@plt>
add    $0x57,%esi
lea    0xed6(%rip),%rdi
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [3 x i8] c"%c\00"
define void @print_hex(i32 %0) {
%2 = icmp slt i32 %0, 10
br i1 %2, label %3, label %5
3: ; preds = %1
%4 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %0)
br label %8
5: ; preds = %1
%6 = add nuw nsw i32 %0, 87
%7 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 %6)
br label %8
8: ; preds = %5, %3
ret void
}
unsigned int prng(void) {
  static unsigned int seed = 22222;
  seed = (seed * 96314165) + 907633515;
  return seed;
}


x86 assembly (clang, -O0):
<prng>:
push   %rbp
mov    %rsp,%rbp
imul   $0x5bda335,0x2f12(%rip),%eax
a3 bd 05
add    $0x3619636b,%eax
mov    %eax,0x2f07(%rip)
mov    0x2f01(%rip),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<prng>:
imul   $0x5bda335,0x2f16(%rip),%eax
a3 bd 05
add    $0x3619636b,%eax
mov    %eax,0x2f0b(%rip)
ret

LLVM IR (-O0):
@prng.seed = internal global i32 22222
define i32 @prng() {
%1 = load i32, i32* @prng.seed
%2 = mul i32 %1, 96314165
%3 = add i32 %2, 907633515
store i32 %3, i32* @prng.seed
%4 = load i32, i32* @prng.seed
ret i32 %4
}

LLVM IR (-O2):
@prng.seed = internal unnamed_addr global i32 22222
define i32 @prng() {
%1 = load i32, i32* @prng.seed
%2 = mul i32 %1, 96314165
%3 = add i32 %2, 907633515
store i32 %3, i32* @prng.seed
ret i32 %3
}
int cmpIntDsc(int x, int y) { return x >= y; }


x86 assembly (clang, -O0):
<cmpIntDsc>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
setge  %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<cmpIntDsc>:
xor    %eax,%eax
cmp    %esi,%edi
setge  %al
ret

LLVM IR (-O0):
define i32 @cmpIntDsc(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = load i32, i32* %4
%7 = icmp sge i32 %5, %6
%8 = zext i1 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
define i32 @cmpIntDsc(i32 %0, i32 %1) {
%3 = icmp sge i32 %0, %1
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
char *findVarData(char *);
char *cgiOptionalString(char *varName) { return findVarData(varName); }


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

x86 assembly (clang, -O2):
<cgiOptionalString>:
jmp    1030 <findVarData@plt>

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

LLVM IR (-O2):
define i8* @cgiOptionalString(i8* %0) {
%2 = tail call i8* @findVarData(i8* %0)
ret i8* %2
}