xunge/DecIR huggingface dataset:
void fd54(int n) {
P0A:
  goto P0A;
  {
    typedef int(*b)[n];
  P01A:
    goto P01A;
    {
      typedef int(*c)[n];
    P012A:
      goto P012A;
      0;
    }
  p01B:
    goto p01B;
    goto a;
  a : {
    typedef int(*d)[n];
  P013A:
    goto P013A;
    0;
  }
  P01C:
    goto P01C;
    ;
    typedef int(*e)[n];
  P014A:
    goto P014A;
    0;
  };
P0B:
  goto P0B;
  {
    typedef int(*f)[n];
  P02A:
    goto P02A;
    {
      typedef int(*g)[n];
    P024A:
      goto P024A;
      0;
    };
  P02B:
    goto P02B;
    {
      typedef int(*h)[n];
    P025A:
      goto P025A;
      0;
    };
  P02C:
    goto P02C;
    ;
    typedef int(*i)[n];
  P026A:
    goto P026A;
    0;
  };
P0C:
  goto P0C;
  ;
  typedef int(*j)[n];
P03A:
  goto P03A;
  0;
P03B:
  goto P03B;
}


x86 assembly (clang, -O0):
<fd54>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
jmp    1107 <fd54+0x7>

x86 assembly (clang, -O2):
<fd54>:
jmp    1100 <fd54>

LLVM IR (-O0):
define void @fd54(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
br label %3
3: ; preds = %3, %1
br label %3
4: ; No predecessors!
%5 = load i32, i32* %2
%6 = zext i32 %5 to i64
br label %7
7: ; preds = %7, %4
br label %7
8: ; No predecessors!
%9 = load i32, i32* %2
%10 = zext i32 %9 to i64
br label %11
11: ; preds = %11, %8
br label %11
12: ; preds = %12
br label %12
13: ; No predecessors!
%14 = load i32, i32* %2
%15 = zext i32 %14 to i64
br label %16
16: ; preds = %16, %13
br label %16
17: ; preds = %17
br label %17
18: ; No predecessors!
%19 = load i32, i32* %2
%20 = zext i32 %19 to i64
br label %21
21: ; preds = %21, %18
br label %21
22: ; preds = %22
br label %22
23: ; No predecessors!
%24 = load i32, i32* %2
%25 = zext i32 %24 to i64
br label %26
26: ; preds = %26, %23
br label %26
27: ; No predecessors!
%28 = load i32, i32* %2
%29 = zext i32 %28 to i64
br label %30
30: ; preds = %30, %27
br label %30
31: ; preds = %31
br label %31
32: ; No predecessors!
%33 = load i32, i32* %2
%34 = zext i32 %33 to i64
br label %35
35: ; preds = %35, %32
br label %35
36: ; preds = %36
br label %36
37: ; No predecessors!
%38 = load i32, i32* %2
%39 = zext i32 %38 to i64
br label %40
40: ; preds = %40, %37
br label %40
41: ; preds = %41
br label %41
42: ; No predecessors!
%43 = load i32, i32* %2
%44 = zext i32 %43 to i64
br label %45
45: ; preds = %45, %42
br label %45
46: ; preds = %46
br label %46
}

LLVM IR (-O2):
define void @fd54(i32 %0) {
br label %2
2: ; preds = %2, %1
br label %2
}
/* Variables and functions */
int /*<<< orphan*/ Inst_Printf(char *, char *, ...);
void Move_Ret_To_Foreign_D(int index) {
  Inst_Printf("la", "$13,pl_foreign_double");
  Inst_Printf("s.d", "$f0,%d($13)", index * 8);
}


x86 assembly (clang, -O0):
<Move_Ret_To_Foreign_D>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    0xede(%rip),%rdi
lea    0xeda(%rip),%rsi
mov    $0x0,%al
call   1030 <Inst_Printf@plt>
mov    -0x4(%rbp),%edx
shl    $0x3,%edx
lea    0xedc(%rip),%rdi
lea    0xed9(%rip),%rsi
mov    $0x0,%al
call   1030 <Inst_Printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Move_Ret_To_Foreign_D>:
push   %rbx
mov    %edi,%ebx
lea    0xee6(%rip),%rdi
lea    0xee2(%rip),%rsi
xor    %eax,%eax
call   1030 <Inst_Printf@plt>
shl    $0x3,%ebx
lea    0xee7(%rip),%rdi
lea    0xee4(%rip),%rsi
mov    %ebx,%edx
xor    %eax,%eax
pop    %rbx
jmp    1030 <Inst_Printf@plt>

LLVM IR (-O0):
@.str = [3 x i8] c"la\00"
@.str.1 = [22 x i8] c"$13,pl_foreign_double\00"
@.str.2 = [4 x i8] c"s.d\00"
@.str.3 = [12 x i8] c"$f0,%d($13)\00"
define void @Move_Ret_To_Foreign_D(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 (i8*, i8*, ...) @Inst_Printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0))
%4 = load i32, i32* %2
%5 = mul nsw i32 %4, 8
%6 = call i32 (i8*, i8*, ...) @Inst_Printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.3, i64 0, i64 0), i32 %5)
ret void
}

LLVM IR (-O2):
@.str = [3 x i8] c"la\00"
@.str.1 = [22 x i8] c"$13,pl_foreign_double\00"
@.str.2 = [4 x i8] c"s.d\00"
@.str.3 = [12 x i8] c"$f0,%d($13)\00"
define void @Move_Ret_To_Foreign_D(i32 %0) {
%2 = tail call i32 (i8*, i8*, ...) @Inst_Printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0))
%3 = shl nsw i32 %0, 3
%4 = tail call i32 (i8*, i8*, ...) @Inst_Printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.3, i64 0, i64 0), i32 %3)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ (*dtor_fn_t)(void *);

/* Variables and functions */
int /*<<< orphan*/ NRT_Free(void *);
void nrt_varsize_dtor(void *ptr, size_t size, void *info) {
  ;
  if (info) {
    typedef void dtor_fn_t(void *ptr);
    dtor_fn_t *dtor = info;
    dtor(ptr);
  }
  NRT_Free(ptr);
}


x86 assembly (clang, -O0):
<nrt_varsize_dtor>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     1141 <nrt_varsize_dtor+0x31>
mov    -0x18(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
mov    -0x8(%rbp),%rdi
call   *%rax
mov    -0x8(%rbp),%rdi
call   1030 <NRT_Free@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<nrt_varsize_dtor>:
push   %rbx
mov    %rdi,%rbx
test   %rdx,%rdx
je     111e <nrt_varsize_dtor+0xe>
mov    %rbx,%rdi
call   *%rdx
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <NRT_Free@plt>

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

LLVM IR (-O2):
define void @nrt_varsize_dtor(i8* %0, i64 %1, i8* %2) {
%4 = icmp eq i8* %2, null
br i1 %4, label %7, label %5
5: ; preds = %3
%6 = bitcast i8* %2 to void (i8*)*
tail call void %6(i8* %0)
br label %7
7: ; preds = %5, %3
%8 = tail call i32 @NRT_Free(i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, double, double, double);
int /*<<< orphan*/ voltage_divider_solver(double *, double *, double, double);
int main(int argc, char *argv[]) {
  double upside, downside;
  voltage_divider_solver(&upside, &downside, 3.3, 0.12);
  printf("%3f\t%3f\t%3f\r\n", upside, downside,
         downside / (downside + upside) * 3.3);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0x18(%rbp),%rdi
lea    -0x20(%rbp),%rsi
movsd  0xeba(%rip),%xmm0
movsd  0xeba(%rip),%xmm1
call   1040 <voltage_divider_solver@plt>
movsd  -0x18(%rbp),%xmm0
movsd  -0x20(%rbp),%xmm1
movsd  -0x20(%rbp),%xmm2
movsd  -0x20(%rbp),%xmm3
addsd  -0x18(%rbp),%xmm3
divsd  %xmm3,%xmm2
movsd  0xe88(%rip),%xmm3
mulsd  %xmm3,%xmm2
lea    0xe8d(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
lea    0x10(%rsp),%rdi
lea    0x8(%rsp),%rsi
movsd  0xeca(%rip),%xmm0
movsd  0xeca(%rip),%xmm1
call   1040 <voltage_divider_solver@plt>
movsd  0x10(%rsp),%xmm0
movsd  0x8(%rsp),%xmm1
movapd %xmm0,%xmm3
addsd  %xmm1,%xmm3
movapd %xmm1,%xmm2
divsd  %xmm3,%xmm2
mulsd  0xe99(%rip),%xmm2
lea    0xea2(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
@.str = [14 x i8] c"%3f\09%3f\09%3f\0D\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca double
%7 = alloca double
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%8 = call i32 @voltage_divider_solver(double* %6, double* %7, double 3.300000e+00, double 1.200000e-01)
%9 = load double, double* %6
%10 = load double, double* %7
%11 = load double, double* %7
%12 = load double, double* %7
%13 = load double, double* %6
%14 = fadd double %12, %13
%15 = fdiv double %11, %14
%16 = fmul double %15, 3.300000e+00
%17 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), double %9, double %10, double %16)
ret i32 0
}

LLVM IR (-O2):
@.str = [14 x i8] c"%3f\09%3f\09%3f\0D\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca double
%4 = alloca double
%5 = bitcast double* %3 to i8*
%6 = bitcast double* %4 to i8*
%7 = call i32 @voltage_divider_solver(double* %3, double* %4, double 3.300000e+00, double 1.200000e-01)
%8 = load double, double* %3
%9 = load double, double* %4
%10 = fadd double %8, %9
%11 = fdiv double %9, %10
%12 = fmul double %11, 3.300000e+00
%13 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), double %8, double %9, double %12)
ret i32 0
}
void gtk_about_dialog_set_url_hook() {}


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

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

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

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

/* Variables and functions */
int tmult_ok_64(int x, int y) {
  int64_t pll = (int64_t)x * y;
  return pll == (int)pll;
}


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

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

LLVM IR (-O0):
define i32 @tmult_ok_64(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 = load i32, i32* %4
%8 = mul nsw i32 %6, %7
store i32 %8, i32* %5
%9 = load i32, i32* %5
%10 = load i32, i32* %5
%11 = icmp eq i32 %9, %10
%12 = zext i1 %11 to i32
ret i32 %12
}

LLVM IR (-O2):
define i32 @tmult_ok_64(i32 %0, i32 %1) {
ret i32 1
}
int pierwsza(int n) {
  int i;
  if (n == 1)
    return 0;
  for (i = 2; i * i <= n; i++) {
    if (n % i == 0)
      return 0;
  }
  return 1;
}


x86 assembly (clang, -O0):
<pierwsza>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x1,-0x8(%rbp)
jne    111d <pierwsza+0x1d>
movl   $0x0,-0x4(%rbp)
jmp    116a <pierwsza+0x6a>
movl   $0x2,-0xc(%rbp)
mov    -0xc(%rbp),%eax
imul   -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
jg     1163 <pierwsza+0x63>
mov    -0x8(%rbp),%eax
cltd
idivl  -0xc(%rbp)
cmp    $0x0,%edx
jne    1150 <pierwsza+0x50>
movl   $0x0,-0x4(%rbp)
jmp    116a <pierwsza+0x6a>
jmp    1155 <pierwsza+0x55>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1124 <pierwsza+0x24>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<pierwsza>:
xor    %ecx,%ecx
cmp    $0x1,%edi
jne    110a <pierwsza+0xa>
mov    %ecx,%eax
ret
cmp    $0x4,%edi
jge    1115 <pierwsza+0x15>
mov    $0x1,%eax
ret
mov    $0x2,%esi
nopw   0x0(%rax,%rax,1)
mov    %edi,%eax
cltd
idiv   %esi
test   %edx,%edx
je     1107 <pierwsza+0x7>
add    $0x1,%esi
mov    %esi,%eax
imul   %esi,%eax
cmp    %edi,%eax
jle    1120 <pierwsza+0x20>
mov    $0x1,%eax
ret

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

LLVM IR (-O2):
define i32 @pierwsza(i32 %0) {
%2 = icmp eq i32 %0, 1
br i1 %2, label %13, label %3
3: ; preds = %1
%4 = icmp slt i32 %0, 4
br i1 %4, label %13, label %8
5: ; preds = %8
%6 = mul nsw i32 %12, %12
%7 = icmp sgt i32 %6, %0
br i1 %7, label %13, label %8
8: ; preds = %3, %5
%9 = phi i32 [ %12, %5 ], [ 2, %3 ]
%10 = srem i32 %0, %9
%11 = icmp eq i32 %10, 0
%12 = add nuw nsw i32 %9, 1
br i1 %11, label %13, label %5
13: ; preds = %8, %5, %3, %1
%14 = phi i32 [ 0, %1 ], [ 1, %3 ], [ 0, %8 ], [ 1, %5 ]
ret i32 %14
}
int test_imm_A5uint16_reg(unsigned short val) {
  return ((val) & (-0xA5 << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_A5uint16_reg(i16 zeroext %0) {
%2 = alloca i16
store i16 %0, i16* %2
%3 = load i16, i16* %2
%4 = zext i16 %3 to i32
%5 = and i32 %4, -165
%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_A5uint16_reg(i16 zeroext %0) {
%2 = and i16 %0, -165
%3 = icmp eq i16 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
int dma_reserve(int size) { return 1; }


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

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

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

LLVM IR (-O2):
define i32 @dma_reserve(i32 %0) {
ret i32 1
}
int maxval(int v0, int v1) { return (v0 > v1) ? v0 : v1; }


x86 assembly (clang, -O0):
<maxval>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
jle    1121 <maxval+0x21>
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
jmp    1127 <maxval+0x27>
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<maxval>:
mov    %esi,%eax
cmp    %esi,%edi
cmovg  %edi,%eax
ret

LLVM IR (-O0):
define i32 @maxval(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 sgt i32 %5, %6
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = load i32, i32* %3
br label %12
10: ; preds = %2
%11 = load i32, i32* %4
br label %12
12: ; preds = %10, %8
%13 = phi i32 [ %9, %8 ], [ %11, %10 ]
ret i32 %13
}

LLVM IR (-O2):
define i32 @maxval(i32 %0, i32 %1) {
%3 = icmp sgt i32 %0, %1
%4 = select i1 %3, i32 %0, i32 %1
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int main(int argv, char **argvs) {
  printf("**********\n");
  printf("**Hello**\n");
  printf("**********\n");
  printf("%d\n", argv);
  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
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xed1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xeb7(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%esi
lea    0xebd(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
mov    %edi,%ebx
lea    0xee1(%rip),%r14
mov    %r14,%rdi
call   1030 <puts@plt>
lea    0xec8(%rip),%rdi
call   1030 <puts@plt>
mov    %r14,%rdi
call   1030 <puts@plt>
lea    0xeb0(%rip),%rdi
mov    %ebx,%esi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
@.str.2 = [4 x i8] c"%d\0A\00"
@str.3 = [10 x i8] c"**Hello**\00"
@str.4 = [11 x i8] c"**********\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @str.4, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @str.3, i64 0, i64 0))
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @str.4, i64 0, i64 0))
%6 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 %0)
ret i32 0
}
b(struct z *a) {}


x86 assembly (clang, -O0):
<b>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.z = type opaque
define i32 @b(%struct.z* %0) {
%2 = alloca i32
%3 = alloca %struct.z*
store %struct.z* %0, %struct.z** %3
%4 = load i32, i32* %2
ret i32 %4
}

LLVM IR (-O2):
%struct.z = type opaque
define i32 @b(%struct.z* nocapture readnone %0) {
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void basic_pointer_changeValue(int x) {
  int *adresse_von_x = &x;
  x = 10;
  printf("x = %d\n", x);
  *adresse_von_x = 20;
  printf("x = %d\n", *adresse_von_x);
}


x86 assembly (clang, -O0):
<basic_pointer_changeValue>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    -0x4(%rbp),%rax
mov    %rax,-0x10(%rbp)
movl   $0xa,-0x4(%rbp)
mov    -0x4(%rbp),%esi
lea    0xecc(%rip),%rdi
call   1030 <printf@plt>
mov    -0x10(%rbp),%rax
movl   $0x14,(%rax)
mov    -0x10(%rbp),%rax
mov    (%rax),%esi
lea    0xeb0(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<basic_pointer_changeValue>:
push   %rbx
lea    0xee8(%rip),%rbx
mov    %rbx,%rdi
mov    $0xa,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x14,%esi
pop    %rbx
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [8 x i8] c"x = %d\0A\00"
define void @basic_pointer_changeValue(i32 %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 10)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 20)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ scaleBilinearBW(int *, int, int, int *, int, int);
void resize(int *srcImgVector, int srcImgWidth, int srcImgHeight,
            int *dstImgVector, int dstImgWidth, int dstImgHeight) {
  scaleBilinearBW(srcImgVector, srcImgWidth, srcImgHeight, dstImgVector,
                  dstImgWidth, dstImgHeight);
}


x86 assembly (clang, -O0):
<resize>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %rcx,-0x18(%rbp)
mov    %r8d,-0x1c(%rbp)
mov    %r9d,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
mov    -0x18(%rbp),%rcx
mov    -0x1c(%rbp),%r8d
mov    -0x20(%rbp),%r9d
call   1030 <scaleBilinearBW@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<resize>:
jmp    1030 <scaleBilinearBW@plt>

LLVM IR (-O0):
define void @resize(i32* %0, i32 %1, i32 %2, i32* %3, i32 %4, i32 %5) {
%7 = alloca i32*
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32*
%11 = alloca i32
%12 = alloca i32
store i32* %0, i32** %7
store i32 %1, i32* %8
store i32 %2, i32* %9
store i32* %3, i32** %10
store i32 %4, i32* %11
store i32 %5, i32* %12
%13 = load i32*, i32** %7
%14 = load i32, i32* %8
%15 = load i32, i32* %9
%16 = load i32*, i32** %10
%17 = load i32, i32* %11
%18 = load i32, i32* %12
%19 = call i32 @scaleBilinearBW(i32* %13, i32 %14, i32 %15, i32* %16, i32 %17, i32 %18)
ret void
}

LLVM IR (-O2):
define void @resize(i32* %0, i32 %1, i32 %2, i32* %3, i32 %4, i32 %5) {
%7 = tail call i32 @scaleBilinearBW(i32* %0, i32 %1, i32 %2, i32* %3, i32 %4, i32 %5)
ret void
}
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
uint8_t compute_query_length_header(int function) {
  int length;
  if (function <= 0x05 || function == 0x06)
    length = 4;
  else if (function == 0x0F || function == 0x10)
    length = 5;
  else
    length = 0;
  return length;
}


x86 assembly (clang, -O0):
<compute_query_length_header>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x5,-0x4(%rbp)
jle    111b <compute_query_length_header+0x1b>
cmpl   $0x6,-0x4(%rbp)
jne    1127 <compute_query_length_header+0x27>
movl   $0x4,-0x8(%rbp)
jmp    1153 <compute_query_length_header+0x53>
cmpl   $0xf,-0x4(%rbp)
je     113b <compute_query_length_header+0x3b>
cmpl   $0x10,-0x4(%rbp)
jne    1147 <compute_query_length_header+0x47>
movl   $0x5,-0x8(%rbp)
jmp    114e <compute_query_length_header+0x4e>
movl   $0x0,-0x8(%rbp)
jmp    1153 <compute_query_length_header+0x53>
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<compute_query_length_header>:
lea    -0xf(%rdi),%eax
xor    %ecx,%ecx
cmp    $0x2,%eax
setb   %cl
cmp    $0x7,%edi
lea    (%rcx,%rcx,4),%ecx
mov    $0x4,%eax
cmovge %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @compute_query_length_header(i32 %0) {
%2 = icmp slt i32 %0, 7
%3 = add i32 %0, -15
%4 = icmp ult i32 %3, 2
%5 = select i1 %4, i32 5, i32 0
%6 = select i1 %2, i32 4, i32 %5
ret i32 %6
}
/* Variables and functions */
unsigned int _tzcnt_u32(unsigned int);
unsigned int func_tzcnt32_2(unsigned int X) { return _tzcnt_u32(X); }


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

x86 assembly (clang, -O2):
<func_tzcnt32_2>:
jmp    1030 <_tzcnt_u32@plt>

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

LLVM IR (-O2):
define i32 @func_tzcnt32_2(i32 %0) {
%2 = tail call i32 @_tzcnt_u32(i32 %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ kill(int, int /*<<< orphan*/);
int process_exists(int pid) { return !kill(pid, 0); }


x86 assembly (clang, -O0):
<process_exists>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
xor    %esi,%esi
call   1030 <kill@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @process_exists(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @kill(i32 %3, i32 0)
%5 = icmp ne i32 %4, 0
%6 = xor i1 %5, true
%7 = zext i1 %6 to i32
ret i32 %7
}

LLVM IR (-O2):
define i32 @process_exists(i32 %0) {
%2 = tail call i32 @kill(i32 %0, i32 0)
%3 = icmp eq i32 %2, 0
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Type definitions */
typedef int uintmax_t;

/* Variables and functions */
uintmax_t rightmost_1bit(uintmax_t x) { return x & -x; }


x86 assembly (clang, -O0):
<rightmost_1bit>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
xor    %ecx,%ecx
sub    -0x4(%rbp),%ecx
and    %ecx,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @rightmost_1bit(i32 %0) {
%2 = sub nsw i32 0, %0
%3 = and i32 %2, %0
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ print_bit(float);
int /*<<< orphan*/ printf(char *, float);
int main(int argc, char *argv[]) {
  float f = 2.625;
  printf("f = %-12f : ", f);
  print_bit(f);
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [13 x i8] c"f = %-12f : \00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca float
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store float 2.625000e+00, float* %6
%7 = load float, float* %6
%8 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), float %7)
%9 = load float, float* %6
%10 = call i32 @print_bit(float %9)
ret i32 0
}

LLVM IR (-O2):
@.str = [13 x i8] c"f = %-12f : \00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), float 2.625000e+00)
%4 = tail call i32 @print_bit(float 2.625000e+00)
ret i32 0
}
int initialize() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @initialize() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void Fan(int fan) {
  fan = fan;
  fprintf(stderr, "NexStar does not have a fan.\n");
}


x86 assembly (clang, -O0):
<Fan>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    0x2eb8(%rip),%rax
mov    (%rax),%edi
lea    0xecf(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Fan>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%edi
lea    0xee0(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [30 x i8] c"NexStar does not have a fan.\0A\00"
define void @Fan(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
store i32 %3, i32* %2
%4 = load i32, i32* @stderr
%5 = call i32 @fprintf(i32 %4, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [30 x i8] c"NexStar does not have a fan.\0A\00"
define void @Fan(i32 %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0))
ret void
}
int cc608_good_parity(const int *parity_table, unsigned int data) {
  int ret = parity_table[data & 0xff] && parity_table[(data & 0xff00) >> 8];
  if (!ret) {
  }
  return ret;
}


x86 assembly (clang, -O0):
<cc608_good_parity>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rcx
mov    -0xc(%rbp),%eax
and    $0xff,%eax
mov    %eax,%eax
mov    %eax,%edx
xor    %eax,%eax
cmpl   $0x0,(%rcx,%rdx,4)
mov    %al,-0x11(%rbp)
je     1146 <cc608_good_parity+0x46>
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
and    $0xff00,%ecx
shr    $0x8,%ecx
mov    %ecx,%ecx
cmpl   $0x0,(%rax,%rcx,4)
setne  %al
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x10(%rbp)
cmpl   $0x0,-0x10(%rbp)
jne    1160 <cc608_good_parity+0x60>
jmp    1160 <cc608_good_parity+0x60>
mov    -0x10(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<cc608_good_parity>:
mov    %esi,%eax
movzbl %al,%ecx
cmpl   $0x0,(%rdi,%rcx,4)
je     1118 <cc608_good_parity+0x18>
movzbl %ah,%ecx
xor    %eax,%eax
cmpl   $0x0,(%rdi,%rcx,4)
setne  %al
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @cc608_good_parity(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 = load i32, i32* %4
%8 = and i32 %7, 255
%9 = zext i32 %8 to i64
%10 = getelementptr inbounds i32, i32* %6, i64 %9
%11 = load i32, i32* %10
%12 = icmp ne i32 %11, 0
br i1 %12, label %13, label %22
13: ; preds = %2
%14 = load i32*, i32** %3
%15 = load i32, i32* %4
%16 = and i32 %15, 65280
%17 = lshr i32 %16, 8
%18 = zext i32 %17 to i64
%19 = getelementptr inbounds i32, i32* %14, i64 %18
%20 = load i32, i32* %19
%21 = icmp ne i32 %20, 0
br label %22
22: ; preds = %13, %2
%23 = phi i1 [ false, %2 ], [ %21, %13 ]
%24 = zext i1 %23 to i32
store i32 %24, i32* %5
%25 = load i32, i32* %5
%26 = icmp ne i32 %25, 0
br i1 %26, label %28, label %27
27: ; preds = %22
br label %28
28: ; preds = %27, %22
%29 = load i32, i32* %5
ret i32 %29
}

LLVM IR (-O2):
define i32 @cc608_good_parity(i32* nocapture %0, i32 %1) {
%3 = and i32 %1, 255
%4 = zext i32 %3 to i64
%5 = getelementptr inbounds i32, i32* %0, i64 %4
%6 = load i32, i32* %5
%7 = icmp eq i32 %6, 0
br i1 %7, label %16, label %8
8: ; preds = %2
%9 = lshr i32 %1, 8
%10 = and i32 %9, 255
%11 = zext i32 %10 to i64
%12 = getelementptr inbounds i32, i32* %0, i64 %11
%13 = load i32, i32* %12
%14 = icmp ne i32 %13, 0
%15 = zext i1 %14 to i32
br label %16
16: ; preds = %8, %2
%17 = phi i32 [ 0, %2 ], [ %15, %8 ]
ret i32 %17
}
double bbob2009_fmax(double a, double b) { return (a > b) ? a : b; }


x86 assembly (clang, -O0):
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
ucomisd -0x10(%rbp),%xmm0
jbe    112d <bbob2009_fmax+0x2d>
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
jmp    1137 <bbob2009_fmax+0x37>
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
maxsd  %xmm1,%xmm0
ret

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

LLVM IR (-O2):
define double @bbob2009_fmax(double %0, double %1) {
%3 = fcmp ogt double %0, %1
%4 = select i1 %3, double %0, double %1
ret double %4
}
/* Type definitions */
struct scf_64b {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ set_cm(struct scf_64b *, int);
int /*<<< orphan*/ set_flg(struct scf_64b *, int /*<<< orphan*/);
int /*<<< orphan*/ set_id1id2(struct scf_64b *, int);
int /*<<< orphan*/ set_mtime(struct scf_64b *, int /*<<< orphan*/);
int /*<<< orphan*/ set_os(struct scf_64b *, int);
int /*<<< orphan*/ set_xfl(struct scf_64b *, int);
void init_gzip_header(struct scf_64b *scf) {
  set_id1id2(scf, 0x1f8b);
  set_cm(scf, 8);
  set_flg(scf, 0);
  set_mtime(scf, 0);
  set_xfl(scf, 2);
  set_os(scf, 3);
}


x86 assembly (clang, -O0):
<init_gzip_header>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x1f8b,%esi
call   1060 <set_id1id2@plt>
mov    -0x8(%rbp),%rdi
mov    $0x8,%esi
call   1050 <set_cm@plt>
mov    -0x8(%rbp),%rdi
xor    %esi,%esi
call   1080 <set_flg@plt>
mov    -0x8(%rbp),%rdi
xor    %esi,%esi
call   1070 <set_mtime@plt>
mov    -0x8(%rbp),%rdi
mov    $0x2,%esi
call   1030 <set_xfl@plt>
mov    -0x8(%rbp),%rdi
mov    $0x3,%esi
call   1040 <set_os@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<init_gzip_header>:
push   %rbx
mov    %rdi,%rbx
mov    $0x1f8b,%esi
call   1060 <set_id1id2@plt>
mov    %rbx,%rdi
mov    $0x8,%esi
call   1050 <set_cm@plt>
mov    %rbx,%rdi
xor    %esi,%esi
call   1080 <set_flg@plt>
mov    %rbx,%rdi
xor    %esi,%esi
call   1070 <set_mtime@plt>
mov    %rbx,%rdi
mov    $0x2,%esi
call   1030 <set_xfl@plt>
mov    %rbx,%rdi
mov    $0x3,%esi
pop    %rbx
jmp    1040 <set_os@plt>

LLVM IR (-O0):
%struct.scf_64b = type { i32 }
define void @init_gzip_header(%struct.scf_64b* %0) {
%2 = alloca %struct.scf_64b*
store %struct.scf_64b* %0, %struct.scf_64b** %2
%3 = load %struct.scf_64b*, %struct.scf_64b** %2
%4 = call i32 @set_id1id2(%struct.scf_64b* %3, i32 8075)
%5 = load %struct.scf_64b*, %struct.scf_64b** %2
%6 = call i32 @set_cm(%struct.scf_64b* %5, i32 8)
%7 = load %struct.scf_64b*, %struct.scf_64b** %2
%8 = call i32 @set_flg(%struct.scf_64b* %7, i32 0)
%9 = load %struct.scf_64b*, %struct.scf_64b** %2
%10 = call i32 @set_mtime(%struct.scf_64b* %9, i32 0)
%11 = load %struct.scf_64b*, %struct.scf_64b** %2
%12 = call i32 @set_xfl(%struct.scf_64b* %11, i32 2)
%13 = load %struct.scf_64b*, %struct.scf_64b** %2
%14 = call i32 @set_os(%struct.scf_64b* %13, i32 3)
ret void
}

LLVM IR (-O2):
%struct.scf_64b = type { i32 }
define void @init_gzip_header(%struct.scf_64b* %0) {
%2 = tail call i32 @set_id1id2(%struct.scf_64b* %0, i32 8075)
%3 = tail call i32 @set_cm(%struct.scf_64b* %0, i32 8)
%4 = tail call i32 @set_flg(%struct.scf_64b* %0, i32 0)
%5 = tail call i32 @set_mtime(%struct.scf_64b* %0, i32 0)
%6 = tail call i32 @set_xfl(%struct.scf_64b* %0, i32 2)
%7 = tail call i32 @set_os(%struct.scf_64b* %0, i32 3)
ret void
}
/* Type definitions */
struct triple {
  int dummy;
};
struct compile_state {
  int dummy;
};

/* Variables and functions */
int triple_is_branch_type(struct compile_state *, struct triple *, int);
int triple_is_call(struct compile_state *state, struct triple *ins) {
  return triple_is_branch_type(state, ins, 0x080);
}


x86 assembly (clang, -O0):
<triple_is_call>:
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    $0x80,%edx
call   1030 <triple_is_branch_type@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<triple_is_call>:
mov    $0x80,%edx
jmp    1030 <triple_is_branch_type@plt>

LLVM IR (-O0):
%struct.compile_state = type { i32 }
%struct.triple = type { i32 }
define i32 @triple_is_call(%struct.compile_state* %0, %struct.triple* %1) {
%3 = alloca %struct.compile_state*
%4 = alloca %struct.triple*
store %struct.compile_state* %0, %struct.compile_state** %3
store %struct.triple* %1, %struct.triple** %4
%5 = load %struct.compile_state*, %struct.compile_state** %3
%6 = load %struct.triple*, %struct.triple** %4
%7 = call i32 @triple_is_branch_type(%struct.compile_state* %5, %struct.triple* %6, i32 128)
ret i32 %7
}

LLVM IR (-O2):
%struct.compile_state = type { i32 }
%struct.triple = type { i32 }
define i32 @triple_is_call(%struct.compile_state* %0, %struct.triple* %1) {
%3 = tail call i32 @triple_is_branch_type(%struct.compile_state* %0, %struct.triple* %1, i32 128)
ret i32 %3
}
void setParameter(unsigned int sp, unsigned int param, unsigned int value) {
  if (param > 10) {
    return;
  }
  *((unsigned int *)(sp + param * 4)) = value;
}


x86 assembly (clang, -O0):
<setParameter>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
cmpl   $0xa,-0x8(%rbp)
jbe    111c <setParameter+0x1c>
jmp    112e <setParameter+0x2e>
mov    -0xc(%rbp),%ecx
mov    -0x4(%rbp),%eax
mov    -0x8(%rbp),%edx
shl    $0x2,%edx
add    %edx,%eax
mov    %eax,%eax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<setParameter>:
cmp    $0xa,%esi
ja     110a <setParameter+0xa>
lea    (%rdi,%rsi,4),%eax
mov    %edx,(%rax)
ret

LLVM IR (-O0):
define void @setParameter(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i32, i32* %5
%8 = icmp ugt i32 %7, 10
br i1 %8, label %9, label %10
9: ; preds = %3
br label %18
10: ; preds = %3
%11 = load i32, i32* %6
%12 = load i32, i32* %4
%13 = load i32, i32* %5
%14 = mul i32 %13, 4
%15 = add i32 %12, %14
%16 = zext i32 %15 to i64
%17 = inttoptr i64 %16 to i32*
store i32 %11, i32* %17
br label %18
18: ; preds = %10, %9
ret void
}

LLVM IR (-O2):
define void @setParameter(i32 %0, i32 %1, i32 %2) {
%4 = icmp ugt i32 %1, 10
br i1 %4, label %10, label %5
5: ; preds = %3
%6 = shl nuw nsw i32 %1, 2
%7 = add i32 %6, %0
%8 = zext i32 %7 to i64
%9 = inttoptr i64 %8 to i32*
store i32 %2, i32* %9
br label %10
10: ; preds = %3, %5
ret void
}
int test_trueThreeFourths(int x) {
  long long int x3 = (long long int)x * 3LL;
  return (int)(x3 / 4LL);
}


x86 assembly (clang, -O0):
<test_trueThreeFourths>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movslq -0x4(%rbp),%rax
imul   $0x3,%rax,%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    $0x4,%ecx
cqto
idiv   %rcx
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_trueThreeFourths>:
movslq %edi,%rax
lea    (%rax,%rax,2),%rcx
lea    (%rax,%rax,2),%rax
add    $0x3,%rax
test   %rcx,%rcx
cmovns %rcx,%rax
shr    $0x2,%rax
ret

LLVM IR (-O0):
define i32 @test_trueThreeFourths(i32 %0) {
%2 = alloca i32
%3 = alloca i64
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = sext i32 %4 to i64
%6 = mul nsw i64 %5, 3
store i64 %6, i64* %3
%7 = load i64, i64* %3
%8 = sdiv i64 %7, 4
%9 = trunc i64 %8 to i32
ret i32 %9
}

LLVM IR (-O2):
define i32 @test_trueThreeFourths(i32 %0) {
%2 = sext i32 %0 to i64
%3 = mul nsw i64 %2, 3
%4 = sdiv i64 %3, 4
%5 = trunc i64 %4 to i32
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ ft_putchar(int);
void ft_putnbr(int n) {
  if (n < 0 && (n *= (-1)))
    (void)ft_putchar('-');
  if ((n / 10) != 0)
    (void)ft_putnbr(n / 10);
  (void)ft_putchar((n % 10) + '0');
  return;
}


x86 assembly (clang, -O0):
<ft_putnbr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jge    114f <ft_putnbr+0x2f>
imul   $0xffffffff,-0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
cmp    $0x0,%eax
je     114f <ft_putnbr+0x2f>
mov    $0x2d,%edi
call   1030 <ft_putchar@plt>
mov    -0x4(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
cmp    $0x0,%eax
je     1175 <ft_putnbr+0x55>
mov    -0x4(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %eax,%edi
call   1040 <ft_putnbr@plt>
mov    -0x4(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %edx,%edi
add    $0x30,%edi
call   1030 <ft_putchar@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_putnbr>:
push   %r14
push   %rbx
push   %rax
mov    %edi,%ebx
test   %edi,%edi
jns    1136 <ft_putnbr+0x16>
neg    %ebx
mov    $0x2d,%edi
call   1030 <ft_putchar@plt>
mov    %ebx,%r14d
cmp    $0xa,%ebx
jb     1150 <ft_putnbr+0x30>
mov    $0xcccccccd,%edi
imul   %r14,%rdi
shr    $0x23,%rdi
call   1040 <ft_putnbr@plt>
mov    $0xcccccccd,%eax
imul   %r14,%rax
shr    $0x23,%rax
add    %eax,%eax
lea    (%rax,%rax,4),%eax
sub    %eax,%ebx
or     $0x30,%ebx
mov    %ebx,%edi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <ft_putchar@plt>

LLVM IR (-O0):
define void @ft_putnbr(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp slt i32 %3, 0
br i1 %4, label %5, label %11
5: ; preds = %1
%6 = load i32, i32* %2
%7 = mul nsw i32 %6, -1
store i32 %7, i32* %2
%8 = icmp ne i32 %7, 0
br i1 %8, label %9, label %11
9: ; preds = %5
%10 = call i32 @ft_putchar(i32 45)
br label %11
11: ; preds = %9, %5, %1
%12 = load i32, i32* %2
%13 = sdiv i32 %12, 10
%14 = icmp ne i32 %13, 0
br i1 %14, label %15, label %18
15: ; preds = %11
%16 = load i32, i32* %2
%17 = sdiv i32 %16, 10
br label %18
18: ; preds = %15, %11
%19 = load i32, i32* %2
%20 = srem i32 %19, 10
%21 = add nsw i32 %20, 48
%22 = call i32 @ft_putchar(i32 %21)
ret void
}

LLVM IR (-O2):
define void @ft_putnbr(i32 %0) {
%2 = icmp slt i32 %0, 0
br i1 %2, label %3, label %6
3: ; preds = %1
%4 = sub nsw i32 0, %0
%5 = tail call i32 @ft_putchar(i32 45)
br label %6
6: ; preds = %3, %1
%7 = phi i32 [ %4, %3 ], [ %0, %1 ]
%8 = icmp ult i32 %7, 10
br i1 %8, label %11, label %9
9: ; preds = %6
%10 = udiv i32 %7, 10
tail call void @ft_putnbr(i32 %10)
br label %11
11: ; preds = %9, %6
%12 = urem i32 %7, 10
%13 = or i32 %12, 48
%14 = tail call i32 @ft_putchar(i32 %13)
ret void
}
adrreg0adrx1(r0, r1, x0, x1, p0, p1) int r0, r1;
int *p0, *p1;
{
  if ((p0[10000000]) <= (((int *)11111111)[x1]))
    return 1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<adrreg0adrx1>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    %r8,-0x20(%rbp)
mov    %r9,-0x28(%rbp)
mov    -0x20(%rbp),%rax
mov    0x2625a00(%rax),%eax
movslq -0x14(%rbp),%rdx
mov    $0xa98ac7,%ecx
cmp    (%rcx,%rdx,4),%eax
jg     1140 <adrreg0adrx1+0x40>
movl   $0x1,-0x4(%rbp)
jmp    1147 <adrreg0adrx1+0x47>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<adrreg0adrx1>:
mov    0x2625a00(%r8),%edx
movslq %ecx,%rcx
xor    %eax,%eax
cmp    0xa98ac7(,%rcx,4),%edx
setle  %al
ret

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

LLVM IR (-O2):
define i32 @adrreg0adrx1(i32 %0, i32 %1, i32 %2, i32 %3, i32* nocapture %4, i32* nocapture readnone %5) {
%7 = getelementptr inbounds i32, i32* %4, i64 10000000
%8 = load i32, i32* %7
%9 = sext i32 %3 to i64
%10 = getelementptr inbounds i32, i32* inttoptr (i64 11111111 to i32*), i64 %9
%11 = load i32, i32* %10
%12 = icmp sle i32 %8, %11
%13 = zext i1 %12 to i32
ret i32 %13
}
/* Type definitions */
struct mb_interpreter_t {
  int dummy;
};

/* Variables and functions */
int _remove_func(struct mb_interpreter_t *, char *, int /*<<< orphan*/);
int mb_remove_func(struct mb_interpreter_t *s, const char *n) {
  if (!s || !n)
    return 0;
  return _remove_func(s, (char *)n, (0));
}


x86 assembly (clang, -O0):
<mb_remove_func>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     1136 <mb_remove_func+0x26>
cmpq   $0x0,-0x18(%rbp)
jne    1142 <mb_remove_func+0x32>
movl   $0x0,-0x4(%rbp)
jmp    1154 <mb_remove_func+0x44>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
xor    %edx,%edx
call   1030 <_remove_func@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mb_remove_func>:
test   %rdi,%rdi
je     1121 <mb_remove_func+0x11>
test   %rsi,%rsi
je     1121 <mb_remove_func+0x11>
xor    %edx,%edx
jmp    1030 <_remove_func@plt>
xor    %eax,%eax
ret

LLVM IR (-O0):
%struct.mb_interpreter_t = type { i32 }
define i32 @mb_remove_func(%struct.mb_interpreter_t* %0, i8* %1) {
%3 = alloca i32
%4 = alloca %struct.mb_interpreter_t*
%5 = alloca i8*
store %struct.mb_interpreter_t* %0, %struct.mb_interpreter_t** %4
store i8* %1, i8** %5
%6 = load %struct.mb_interpreter_t*, %struct.mb_interpreter_t** %4
%7 = icmp ne %struct.mb_interpreter_t* %6, null
br i1 %7, label %8, label %11
8: ; preds = %2
%9 = load i8*, i8** %5
%10 = icmp ne i8* %9, null
br i1 %10, label %12, label %11
11: ; preds = %8, %2
store i32 0, i32* %3
br label %16
12: ; preds = %8
%13 = load %struct.mb_interpreter_t*, %struct.mb_interpreter_t** %4
%14 = load i8*, i8** %5
%15 = call i32 @_remove_func(%struct.mb_interpreter_t* %13, i8* %14, i32 0)
store i32 %15, i32* %3
br label %16
16: ; preds = %12, %11
%17 = load i32, i32* %3
ret i32 %17
}

LLVM IR (-O2):
%struct.mb_interpreter_t = type { i32 }
define i32 @mb_remove_func(%struct.mb_interpreter_t* %0, i8* %1) {
%3 = icmp ne %struct.mb_interpreter_t* %0, null
%4 = icmp ne i8* %1, null
%5 = and i1 %3, %4
br i1 %5, label %6, label %8
6: ; preds = %2
%7 = tail call i32 @_remove_func(%struct.mb_interpreter_t* %0, i8* %1, i32 0)
br label %8
8: ; preds = %2, %6
%9 = phi i32 [ %7, %6 ], [ 0, %2 ]
ret i32 %9
}
/* Type definitions */
typedef int /*<<< orphan*/ uid_t;
struct passwd {
  int dummy;
};

/* Variables and functions */
struct passwd *getpwuid(uid_t uid) {
  return NULL;
}


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

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

LLVM IR (-O0):
%struct.passwd = type { i32 }
define %struct.passwd* @getpwuid(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
ret %struct.passwd* null
}

LLVM IR (-O2):
%struct.passwd = type { i32 }
define noalias %struct.passwd* @getpwuid(i32 %0) {
ret %struct.passwd* null
}
/* Variables and functions */
int /*<<< orphan*/ key_tasklist_scroll(char);
void key_tasklist_scroll_down(void) { key_tasklist_scroll('d'); }


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

x86 assembly (clang, -O2):
<key_tasklist_scroll_down>:
mov    $0x64,%edi
jmp    1030 <key_tasklist_scroll@plt>

LLVM IR (-O0):
define void @key_tasklist_scroll_down() {
%1 = call i32 @key_tasklist_scroll(i8 signext 100)
ret void
}

LLVM IR (-O2):
define void @key_tasklist_scroll_down() {
%1 = tail call i32 @key_tasklist_scroll(i8 signext 100)
ret void
}