xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ HplMsp430GeneralIOP__26__IO__set();
void Msp430GpioC__4__HplGeneralIO__set(void) {
  HplMsp430GeneralIOP__26__IO__set();
}


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

x86 assembly (clang, -O2):
<Msp430GpioC__4__HplGeneralIO__set>:
xor    %eax,%eax
jmp    1030 <HplMsp430GeneralIOP__26__IO__set@plt>

LLVM IR (-O0):
define void @Msp430GpioC__4__HplGeneralIO__set() {
%1 = call i32 (...) @HplMsp430GeneralIOP__26__IO__set()
ret void
}

LLVM IR (-O2):
define void @Msp430GpioC__4__HplGeneralIO__set() {
%1 = tail call i32 (...) @HplMsp430GeneralIOP__26__IO__set()
ret void
}
int main(void) {
  int i = 41;
  {
    int j = 1;
    i = i + j;
  }
  return i;
}


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

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
store i32 41, i32* %2
store i32 1, i32* %3
%4 = load i32, i32* %2
%5 = load i32, i32* %3
%6 = add nsw i32 %4, %5
store i32 %6, i32* %2
%7 = load i32, i32* %2
ret i32 %7
}

LLVM IR (-O2):
define i32 @main() {
ret i32 42
}
/* Variables and functions */
int /*<<< orphan*/ gmvwrite_cells_amr(char *, char *, char *);
void fgmvwrite_cells_amr_(char *numcells, char *numtop, char *daughters) {
  gmvwrite_cells_amr(numcells, numtop, daughters);
}


x86 assembly (clang, -O0):
<fgmvwrite_cells_amr_>:
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 <gmvwrite_cells_amr@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fgmvwrite_cells_amr_>:
jmp    1030 <gmvwrite_cells_amr@plt>

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

LLVM IR (-O2):
define void @fgmvwrite_cells_amr_(i8* %0, i8* %1, i8* %2) {
%4 = tail call i32 @gmvwrite_cells_amr(i8* %0, i8* %1, i8* %2)
ret void
}
/* Variables and functions */
float ptiso(float);
float HoverEorpTiso(float HADoverEM, int pid) {
  if (pid == 13 || pid == -13)
    return ptiso(HADoverEM);
  else
    return HADoverEM;
}


x86 assembly (clang, -O0):
<HoverEorpTiso>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x8(%rbp)
mov    %edi,-0xc(%rbp)
cmpl   $0xd,-0xc(%rbp)
je     1134 <HoverEorpTiso+0x24>
cmpl   $0xfffffff3,-0xc(%rbp)
jne    1148 <HoverEorpTiso+0x38>
movss  -0x8(%rbp),%xmm0
call   1030 <ptiso@plt>
movss  %xmm0,-0x4(%rbp)
jmp    1152 <HoverEorpTiso+0x42>
movss  -0x8(%rbp),%xmm0
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<HoverEorpTiso>:
cmp    $0xd,%edi
je     111a <HoverEorpTiso+0xa>
cmp    $0xfffffff3,%edi
jne    111f <HoverEorpTiso+0xf>
jmp    1030 <ptiso@plt>
ret

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

LLVM IR (-O2):
define float @HoverEorpTiso(float %0, i32 %1) {
switch i32 %1, label %5 [
i32 -13, label %3
i32 13, label %3
]
3: ; preds = %2, %2
%4 = tail call float @ptiso(float %0)
br label %5
5: ; preds = %2, %3
%6 = phi float [ %4, %3 ], [ %0, %2 ]
ret float %6
}
int fun1235() { return 1235; }


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

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

LLVM IR (-O0):
define i32 @fun1235() {
ret i32 1235
}

LLVM IR (-O2):
define i32 @fun1235() {
ret i32 1235
}
/* Variables and functions */
int /*<<< orphan*/ start_shell();
int main() {
  start_shell();
  return 0xDEADBEEF;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <start_shell@plt>
mov    $0xdeadbeef,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @start_shell()
ret i32 -559038737
}
/* Variables and functions */
int imax(int, int);
int imin(int, int);
int imedian_old(int a, int b, int c) {
  return (a + b + c - imin(a, imin(b, c)) - imax(a, imax(b, c)));
}


x86 assembly (clang, -O0):
<imedian_old>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%eax
add    -0x8(%rbp),%eax
add    -0xc(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
call   1030 <imin@plt>
mov    -0x1c(%rbp),%edi
mov    %eax,%esi
call   1030 <imin@plt>
mov    %eax,%ecx
mov    -0x18(%rbp),%eax
sub    %ecx,%eax
mov    %eax,-0x10(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
call   1040 <imax@plt>
mov    -0x14(%rbp),%edi
mov    %eax,%esi
call   1040 <imax@plt>
mov    %eax,%ecx
mov    -0x10(%rbp),%eax
sub    %ecx,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<imedian_old>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %edx,%r14d
mov    %esi,%ebx
mov    %edi,%ebp
mov    %esi,%edi
mov    %edx,%esi
call   1030 <imin@plt>
mov    %ebp,%edi
mov    %eax,%esi
call   1030 <imin@plt>
mov    %eax,%r15d
mov    %ebx,%edi
mov    %r14d,%esi
call   1040 <imax@plt>
mov    %ebp,%edi
mov    %eax,%esi
call   1040 <imax@plt>
add    %ebp,%ebx
add    %r14d,%ebx
add    %r15d,%eax
sub    %eax,%ebx
mov    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define i32 @imedian_old(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* %4
%8 = load i32, i32* %5
%9 = add nsw i32 %7, %8
%10 = load i32, i32* %6
%11 = add nsw i32 %9, %10
%12 = load i32, i32* %4
%13 = load i32, i32* %5
%14 = load i32, i32* %6
%15 = call i32 @imin(i32 %13, i32 %14)
%16 = call i32 @imin(i32 %12, i32 %15)
%17 = sub nsw i32 %11, %16
%18 = load i32, i32* %4
%19 = load i32, i32* %5
%20 = load i32, i32* %6
%21 = call i32 @imax(i32 %19, i32 %20)
%22 = call i32 @imax(i32 %18, i32 %21)
%23 = sub nsw i32 %17, %22
ret i32 %23
}

LLVM IR (-O2):
define i32 @imedian_old(i32 %0, i32 %1, i32 %2) {
%4 = tail call i32 @imin(i32 %1, i32 %2)
%5 = tail call i32 @imin(i32 %0, i32 %4)
%6 = tail call i32 @imax(i32 %1, i32 %2)
%7 = tail call i32 @imax(i32 %0, i32 %6)
%8 = add i32 %1, %0
%9 = add i32 %8, %2
%10 = add i32 %5, %7
%11 = sub i32 %9, %10
ret i32 %11
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, double, double);
double sin(double);
int main(void) {
  double x = 1.0 / 3.0 * 3.14159265358979323846 / 2;
  double result = sin(x);
  printf("The sine of %lf is %lf\n", x, result);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movsd  0xec9(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
call   1040 <sin@plt>
movsd  %xmm0,-0x18(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm1
lea    0xeac(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xef8(%rip),%rdi
movsd  0xee0(%rip),%xmm0
movsd  0xee0(%rip),%xmm1
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [24 x i8] c"The sine of %lf is %lf\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), double 0x3FE0C152382D7365, double 0x3FDFFFFFFFFFFFFF)
ret i32 0
}
float f0(__attribute__((vector_size(16))) float t) { return ((float *)&t)[0]; }


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

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

LLVM IR (-O0):
define float @f0(<4 x float> %0) {
%2 = alloca <4 x float>
store <4 x float> %0, <4 x float>* %2
%3 = bitcast <4 x float>* %2 to float*
%4 = getelementptr inbounds float, float* %3, i64 0
%5 = load float, float* %4
ret float %5
}

LLVM IR (-O2):
define float @f0(<4 x float> %0) {
%2 = extractelement <4 x float> %0, i64 0
ret float %2
}
void izq(int x, int y, int mat[3][3]) {
  mat[x][y] = mat[x][y - 1];
  mat[x][y - 1] = 0;
}


x86 assembly (clang, -O0):
<izq>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x4(%rbp),%rcx
imul   $0xc,%rcx,%rcx
add    %rcx,%rax
mov    -0x8(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,4),%edx
mov    -0x10(%rbp),%rax
movslq -0x4(%rbp),%rcx
imul   $0xc,%rcx,%rcx
add    %rcx,%rax
movslq -0x8(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x10(%rbp),%rax
movslq -0x4(%rbp),%rcx
imul   $0xc,%rcx,%rcx
add    %rcx,%rax
mov    -0x8(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
movl   $0x0,(%rax,%rcx,4)
pop    %rbp
ret

x86 assembly (clang, -O2):
<izq>:
movslq %edi,%rax
lea    (%rax,%rax,2),%rax
lea    (%rdx,%rax,4),%rax
movslq %esi,%rcx
mov    -0x4(%rax,%rcx,4),%edx
mov    %edx,(%rax,%rcx,4)
movl   $0x0,-0x4(%rax,%rcx,4)
ret

LLVM IR (-O0):
define void @izq(i32 %0, i32 %1, [3 x i32]* %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca [3 x i32]*
store i32 %0, i32* %4
store i32 %1, i32* %5
store [3 x i32]* %2, [3 x i32]** %6
%7 = load [3 x i32]*, [3 x i32]** %6
%8 = load i32, i32* %4
%9 = sext i32 %8 to i64
%10 = getelementptr inbounds [3 x i32], [3 x i32]* %7, i64 %9
%11 = load i32, i32* %5
%12 = sub nsw i32 %11, 1
%13 = sext i32 %12 to i64
%14 = getelementptr inbounds [3 x i32], [3 x i32]* %10, i64 0, i64 %13
%15 = load i32, i32* %14
%16 = load [3 x i32]*, [3 x i32]** %6
%17 = load i32, i32* %4
%18 = sext i32 %17 to i64
%19 = getelementptr inbounds [3 x i32], [3 x i32]* %16, i64 %18
%20 = load i32, i32* %5
%21 = sext i32 %20 to i64
%22 = getelementptr inbounds [3 x i32], [3 x i32]* %19, i64 0, i64 %21
store i32 %15, i32* %22
%23 = load [3 x i32]*, [3 x i32]** %6
%24 = load i32, i32* %4
%25 = sext i32 %24 to i64
%26 = getelementptr inbounds [3 x i32], [3 x i32]* %23, i64 %25
%27 = load i32, i32* %5
%28 = sub nsw i32 %27, 1
%29 = sext i32 %28 to i64
%30 = getelementptr inbounds [3 x i32], [3 x i32]* %26, i64 0, i64 %29
store i32 0, i32* %30
ret void
}

LLVM IR (-O2):
define void @izq(i32 %0, i32 %1, [3 x i32]* nocapture %2) {
%4 = sext i32 %0 to i64
%5 = add nsw i32 %1, -1
%6 = sext i32 %5 to i64
%7 = getelementptr inbounds [3 x i32], [3 x i32]* %2, i64 %4, i64 %6
%8 = load i32, i32* %7
%9 = sext i32 %1 to i64
%10 = getelementptr inbounds [3 x i32], [3 x i32]* %2, i64 %4, i64 %9
store i32 %8, i32* %10
store i32 0, i32* %7
ret void
}
int ichars(int v) {
  int r = 1;
  if (v < 0) {
    r++;
    v = -v;
  }
  for (r = 1; v >= 10; v /= 10, r++)
    ;
  return (r);
}


x86 assembly (clang, -O0):
<ichars>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
cmpl   $0x0,-0x4(%rbp)
jge    1129 <ichars+0x29>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
xor    %eax,%eax
sub    -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
cmpl   $0xa,-0x4(%rbp)
jl     115b <ichars+0x5b>
jmp    113f <ichars+0x3f>
mov    -0x4(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %eax,-0x4(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1130 <ichars+0x30>
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ichars>:
mov    %edi,%ecx
neg    %ecx
cmovs  %edi,%ecx
mov    $0x1,%eax
cmp    $0xa,%ecx
jb     1134 <ichars+0x34>
mov    $0x1,%eax
mov    $0xcccccccd,%edx
nopl   0x0(%rax,%rax,1)
mov    %ecx,%esi
imul   %rdx,%rsi
shr    $0x23,%rsi
add    $0x1,%eax
cmp    $0x63,%ecx
mov    %esi,%ecx
ja     1120 <ichars+0x20>
ret

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

LLVM IR (-O2):
define i32 @ichars(i32 %0) {
%2 = tail call i32 @llvm.abs.i32(i32 %0, i1 true)
%3 = icmp ugt i32 %2, 9
br i1 %3, label %4, label %10
4: ; preds = %1, %4
%5 = phi i32 [ %8, %4 ], [ 1, %1 ]
%6 = phi i32 [ %7, %4 ], [ %2, %1 ]
%7 = udiv i32 %6, 10
%8 = add nuw nsw i32 %5, 1
%9 = icmp ugt i32 %6, 99
br i1 %9, label %4, label %10
10: ; preds = %4, %1
%11 = phi i32 [ 1, %1 ], [ %8, %4 ]
ret i32 %11
}
/* Variables and functions */
int /*<<< orphan*/ __VERIFIER_assert(int);
int __VERIFIER_nondet_int();
int log2(int /*<<< orphan*/);
int /*<<< orphan*/ pow2(int);
void main() {
  int n = __VERIFIER_nondet_int();
  __VERIFIER_assert(n <= log2(pow2(n)));
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1050 <__VERIFIER_nondet_int@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <pow2@plt>
mov    %eax,%edi
call   1040 <log2@plt>
mov    %eax,%ecx
mov    -0x8(%rbp),%eax
cmp    %ecx,%eax
setle  %al
and    $0x1,%al
movzbl %al,%edi
call   1060 <__VERIFIER_assert@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %eax,%eax
call   1050 <__VERIFIER_nondet_int@plt>
mov    %eax,%ebx
mov    %eax,%edi
call   1030 <pow2@plt>
mov    %eax,%edi
call   1040 <log2@plt>
xor    %edi,%edi
cmp    %eax,%ebx
setle  %dil
pop    %rbx
jmp    1060 <__VERIFIER_assert@plt>

LLVM IR (-O0):
define void @main() {
%1 = alloca i32
%2 = call i32 (...) @__VERIFIER_nondet_int()
store i32 %2, i32* %1
%3 = load i32, i32* %1
%4 = load i32, i32* %1
%5 = call i32 @pow2(i32 %4)
%6 = call i32 @log2(i32 %5)
%7 = icmp sle i32 %3, %6
%8 = zext i1 %7 to i32
%9 = call i32 @__VERIFIER_assert(i32 %8)
ret void
}

LLVM IR (-O2):
define void @main() {
%1 = tail call i32 (...) @__VERIFIER_nondet_int()
%2 = tail call i32 @pow2(i32 %1)
%3 = tail call i32 @log2(i32 %2)
%4 = icmp sle i32 %1, %3
%5 = zext i1 %4 to i32
%6 = tail call i32 @__VERIFIER_assert(i32 %5)
ret void
}
int cairo_code_draw_flatDial_get_width() { return 30; }


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

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

LLVM IR (-O0):
define i32 @cairo_code_draw_flatDial_get_width() {
ret i32 30
}

LLVM IR (-O2):
define i32 @cairo_code_draw_flatDial_get_width() {
ret i32 30
}
/* Variables and functions */
scalar_t__ SEXP_rawptr_mask(void *, uintptr_t);
void *SEXP_rawptr_safemerge(void *ptr, uintptr_t bits, uintptr_t mask) {
  return (void *)(((uintptr_t)SEXP_rawptr_mask(ptr, mask)) | (~mask & bits));
}


x86 assembly (clang, -O0):
<SEXP_rawptr_safemerge>:
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    -0x18(%rbp),%rsi
call   1030 <SEXP_rawptr_mask@plt>
mov    -0x18(%rbp),%rcx
xor    $0xffffffffffffffff,%rcx
and    -0x10(%rbp),%rcx
or     %rcx,%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<SEXP_rawptr_safemerge>:
push   %r14
push   %rbx
push   %rax
mov    %rdx,%rbx
mov    %rsi,%r14
mov    %rdx,%rsi
call   1030 <SEXP_rawptr_mask@plt>
not    %rbx
and    %r14,%rbx
or     %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i8* @SEXP_rawptr_safemerge(i8* %0, i64 %1, i64 %2) {
%4 = alloca i8*
%5 = alloca i64
%6 = alloca i64
store i8* %0, i8** %4
store i64 %1, i64* %5
store i64 %2, i64* %6
%7 = load i8*, i8** %4
%8 = load i64, i64* %6
%9 = call i64 @SEXP_rawptr_mask(i8* %7, i64 %8)
%10 = load i64, i64* %6
%11 = xor i64 %10, -1
%12 = load i64, i64* %5
%13 = and i64 %11, %12
%14 = or i64 %9, %13
%15 = inttoptr i64 %14 to i8*
ret i8* %15
}

LLVM IR (-O2):
define i8* @SEXP_rawptr_safemerge(i8* %0, i64 %1, i64 %2) {
%4 = tail call i64 @SEXP_rawptr_mask(i8* %0, i64 %2)
%5 = xor i64 %2, -1
%6 = and i64 %5, %1
%7 = or i64 %4, %6
%8 = inttoptr i64 %7 to i8*
ret i8* %8
}
/* Variables and functions */
int /*<<< orphan*/ drv_generic_i2c_close();
int /*<<< orphan*/ drv_generic_i2c_data(int /*<<< orphan*/);
void drv_HD_I2C_stop(void) {
  drv_generic_i2c_data(0);
  drv_generic_i2c_close();
}


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

x86 assembly (clang, -O2):
<drv_HD_I2C_stop>:
push   %rax
xor    %edi,%edi
call   1030 <drv_generic_i2c_data@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <drv_generic_i2c_close@plt>

LLVM IR (-O0):
define void @drv_HD_I2C_stop() {
%1 = call i32 @drv_generic_i2c_data(i32 0)
%2 = call i32 (...) @drv_generic_i2c_close()
ret void
}

LLVM IR (-O2):
define void @drv_HD_I2C_stop() {
%1 = tail call i32 @drv_generic_i2c_data(i32 0)
%2 = tail call i32 (...) @drv_generic_i2c_close()
ret void
}
/* Variables and functions */
char *strdup(char *);
char *nebcallback2str(__attribute__((__unused__)) int i) {
  return strdup("UNKNOWN");
}


x86 assembly (clang, -O0):
<nebcallback2str>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    0xede(%rip),%rdi
call   1030 <strdup@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [8 x i8] c"UNKNOWN\00"
define i8* @nebcallback2str(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i8* @strdup(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret i8* %3
}

LLVM IR (-O2):
@.str = [8 x i8] c"UNKNOWN\00"
define noalias i8* @nebcallback2str(i32 %0) {
%2 = tail call dereferenceable_or_null(8) i8* @strdup(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret i8* %2
}
int comp_randperm(const void *a, const void *b) {
  return ((int)(*(double *)a - *(double *)b));
}


x86 assembly (clang, -O0):
<comp_randperm>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x10(%rbp),%rax
subsd  (%rax),%xmm0
cvttsd2si %xmm0,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<comp_randperm>:
movsd  (%rdi),%xmm0
subsd  (%rsi),%xmm0
cvttsd2si %xmm0,%eax
ret

LLVM IR (-O0):
define i32 @comp_randperm(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = bitcast i8* %5 to double*
%7 = load double, double* %6
%8 = load i8*, i8** %4
%9 = bitcast i8* %8 to double*
%10 = load double, double* %9
%11 = fsub double %7, %10
%12 = fptosi double %11 to i32
ret i32 %12
}

LLVM IR (-O2):
define i32 @comp_randperm(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to double*
%4 = load double, double* %3
%5 = bitcast i8* %1 to double*
%6 = load double, double* %5
%7 = fsub double %4, %6
%8 = fptosi double %7 to i32
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ vec4d_scalarDiv(double *, double);
void vec4d_homogenize(double v[4]) { vec4d_scalarDiv(v, v[3]); }


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

x86 assembly (clang, -O2):
<vec4d_homogenize>:
movsd  0x18(%rdi),%xmm0
jmp    1030 <vec4d_scalarDiv@plt>

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

LLVM IR (-O2):
define void @vec4d_homogenize(double* %0) {
%2 = getelementptr inbounds double, double* %0, i64 3
%3 = load double, double* %2
%4 = tail call i32 @vec4d_scalarDiv(double* %0, double %3)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ SHA1Transform(int /*<<< orphan*/ *,
                                 int /*<<< orphan*/ const *);
void sha1_transform(uint8_t *state, const uint8_t data[64]) {
  SHA1Transform((uint32_t *)state, data);
}


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

x86 assembly (clang, -O2):
<sha1_transform>:
jmp    1030 <SHA1Transform@plt>

LLVM IR (-O0):
define void @sha1_transform(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 @SHA1Transform(i32* %5, i32* %6)
ret void
}

LLVM IR (-O2):
define void @sha1_transform(i32* %0, i32* %1) {
%3 = tail call i32 @SHA1Transform(i32* %0, i32* %1)
ret void
}
f(int a) {
  if (a > 2)
    ;
}


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x2,-0x8(%rbp)
jle    1116 <f+0x16>
jmp    1116 <f+0x16>
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @f(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp sgt i32 %4, 2
br i1 %5, label %6, label %7
6: ; preds = %1
br label %7
7: ; preds = %6, %1
%8 = load i32, i32* %2
ret i32 %8
}

LLVM IR (-O2):
define i32 @f(i32 %0) {
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int /*<<< orphan*/);
int /*<<< orphan*/ read_port();
int main() { printf("Serial data:", read_port()); }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <read_port@plt>
mov    %eax,%esi
lea    0xecc(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [13 x i8] c"Serial data:\00"
define i32 @main() {
%1 = call i32 (...) @read_port()
%2 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 0
}

LLVM IR (-O2):
@.str = [13 x i8] c"Serial data:\00"
define i32 @main() {
%1 = tail call i32 (...) @read_port()
%2 = tail call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 0
}
void delete (struct node *head, int index) {}


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

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

LLVM IR (-O0):
%struct.node = type opaque
define void @delete(%struct.node* %0, i32 %1) {
%3 = alloca %struct.node*
%4 = alloca i32
store %struct.node* %0, %struct.node** %3
store i32 %1, i32* %4
ret void
}

LLVM IR (-O2):
%struct.node = type opaque
define void @delete(%struct.node* nocapture %0, i32 %1) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ isLiftAtTarget();
int /*<<< orphan*/ wait1Msec(int);
void waitLiftAtTarget() {
  while (!isLiftAtTarget()) {
    wait1Msec(10);
  }
}


x86 assembly (clang, -O0):
<waitLiftAtTarget>:
push   %rbp
mov    %rsp,%rbp
jmp    1129 <waitLiftAtTarget+0x9>
mov    $0x0,%al
call   1030 <isLiftAtTarget@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
test   $0x1,%al
jne    1145 <waitLiftAtTarget+0x25>
jmp    1154 <waitLiftAtTarget+0x34>
mov    $0xa,%edi
call   1040 <wait1Msec@plt>
jmp    1129 <waitLiftAtTarget+0x9>
pop    %rbp
ret

x86 assembly (clang, -O2):
<waitLiftAtTarget>:
push   %rax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1030 <isLiftAtTarget@plt>
test   %eax,%eax
jne    1147 <waitLiftAtTarget+0x27>
mov    $0xa,%edi
call   1040 <wait1Msec@plt>
jmp    1130 <waitLiftAtTarget+0x10>
pop    %rax
ret

LLVM IR (-O0):
define void @waitLiftAtTarget() {
br label %1
1: ; preds = %5, %0
%2 = call i32 (...) @isLiftAtTarget()
%3 = icmp ne i32 %2, 0
%4 = xor i1 %3, true
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = call i32 @wait1Msec(i32 10)
br label %1
7: ; preds = %1
ret void
}

LLVM IR (-O2):
define void @waitLiftAtTarget() {
%1 = tail call i32 (...) @isLiftAtTarget()
%2 = icmp eq i32 %1, 0
br i1 %2, label %3, label %7
3: ; preds = %0, %3
%4 = tail call i32 @wait1Msec(i32 10)
%5 = tail call i32 (...) @isLiftAtTarget()
%6 = icmp eq i32 %5, 0
br i1 %6, label %3, label %7
7: ; preds = %3, %0
ret void
}
/* Variables and functions */
int abs(int);
int distance(int x0, int y0, int x1, int y1) {
  int dx, dy;
  dx = abs(x0 - x1);
  dy = abs(y0 - y1);
  return dx > dy ? dx : dy;
}


x86 assembly (clang, -O0):
<distance>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    -0x4(%rbp),%edi
sub    -0xc(%rbp),%edi
call   1030 <abs@plt>
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%edi
sub    -0x10(%rbp),%edi
call   1030 <abs@plt>
mov    %eax,-0x18(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x18(%rbp),%eax
jle    1157 <distance+0x47>
mov    -0x14(%rbp),%eax
mov    %eax,-0x1c(%rbp)
jmp    115d <distance+0x4d>
mov    -0x18(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<distance>:
sub    %edx,%edi
mov    %edi,%edx
neg    %edx
cmovs  %edi,%edx
sub    %ecx,%esi
mov    %esi,%eax
neg    %eax
cmovs  %esi,%eax
cmp    %eax,%edx
cmova  %edx,%eax
ret

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

LLVM IR (-O2):
define i32 @distance(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = sub nsw i32 %0, %2
%6 = tail call i32 @llvm.abs.i32(i32 %5, i1 true)
%7 = sub nsw i32 %1, %3
%8 = tail call i32 @llvm.abs.i32(i32 %7, i1 true)
%9 = icmp ugt i32 %6, %8
%10 = select i1 %9, i32 %6, i32 %8
ret i32 %10
}
int main(void) {
  int a[][2] = {1, 2, 3, 4, 5, 6};
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
mov    0xeee(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xeeb(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0xee8(%rip),%rax
mov    %rax,-0x10(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
@__const.main.a = [3 x [2 x i32]] [[2 x i32] [i32 1, i32 2], [2 x i32] [i32 3, i32 4], [2 x i32] [i32 5, i32 6]]
define i32 @main() {
%1 = alloca i32
%2 = alloca [3 x [2 x i32]]
store i32 0, i32* %1
%3 = bitcast [3 x [2 x i32]]* %2 to i8*
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *);
void md_table_tr_beg(FILE *fw, int term) {
  switch (term) {
  case 0:
    break;
  case 1:
    fprintf(fw, "<tr> ");
    break;
  case 2:
    break;
  }
}


x86 assembly (clang, -O0):
<md_table_tr_beg>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
test   %eax,%eax
je     1154 <md_table_tr_beg+0x44>
jmp    1132 <md_table_tr_beg+0x22>
mov    -0x10(%rbp),%eax
sub    $0x1,%eax
je     1159 <md_table_tr_beg+0x49>
jmp    1143 <md_table_tr_beg+0x33>
mov    -0x10(%rbp),%eax
sub    $0x2,%eax
je     116e <md_table_tr_beg+0x5e>
jmp    1173 <md_table_tr_beg+0x63>
jmp    1173 <md_table_tr_beg+0x63>
mov    -0x8(%rbp),%rdi
lea    0xe9c(%rip),%rsi
call   1030 <fprintf@plt>
jmp    1173 <md_table_tr_beg+0x63>
jmp    1173 <md_table_tr_beg+0x63>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<md_table_tr_beg>:
cmp    $0x1,%esi
jne    112e <md_table_tr_beg+0x1e>
mov    %rdi,%rcx
lea    0xee1(%rip),%rdi
mov    $0x5,%esi
mov    $0x1,%edx
jmp    1030 <fwrite@plt>
ret

LLVM IR (-O0):
@.str = [6 x i8] c"<tr> \00"
define void @md_table_tr_beg(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
store i32* %0, i32** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
switch i32 %5, label %11 [
i32 0, label %6
i32 1, label %7
i32 2, label %10
]
6: ; preds = %2
br label %11
7: ; preds = %2
%8 = load i32*, i32** %3
%9 = call i32 @fprintf(i32* %8, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
br label %11
10: ; preds = %2
br label %11
11: ; preds = %2, %10, %7, %6
ret void
}

LLVM IR (-O2):
@.str = [6 x i8] c"<tr> \00"
define void @md_table_tr_beg(i32* nocapture %0, i32 %1) {
%3 = icmp eq i32 %1, 1
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = tail call i64 @fwrite(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i64 5, i64 1, i32* %0)
br label %6
6: ; preds = %2, %4
ret void
}
void pthread_attr_setguardsize() {}


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

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

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

LLVM IR (-O2):
define void @pthread_attr_setguardsize() {
ret void
}
/* Variables and functions */
int de_feat_get_num_layers_by_chn(unsigned int, unsigned int);
int bsp_disp_feat_get_num_layers_by_chn(unsigned int disp, unsigned int chn) {
  return de_feat_get_num_layers_by_chn(disp, chn);
}


x86 assembly (clang, -O0):
<bsp_disp_feat_get_num_layers_by_chn>:
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 <de_feat_get_num_layers_by_chn@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bsp_disp_feat_get_num_layers_by_chn>:
jmp    1030 <de_feat_get_num_layers_by_chn@plt>

LLVM IR (-O0):
define i32 @bsp_disp_feat_get_num_layers_by_chn(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 @de_feat_get_num_layers_by_chn(i32 %5, i32 %6)
ret i32 %7
}

LLVM IR (-O2):
define i32 @bsp_disp_feat_get_num_layers_by_chn(i32 %0, i32 %1) {
%3 = tail call i32 @de_feat_get_num_layers_by_chn(i32 %0, i32 %1)
ret i32 %3
}
char *strcpy(char *destination, const char *source) {
  char *dst = destination;
  while (*source) {
    *(dst++) = *(source++);
  }
  *(dst++) = 0;
  return dst;
}


x86 assembly (clang, -O0):
<strcpy>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
cmpb   $0x0,(%rax)
je     1148 <strcpy+0x48>
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
mov    (%rax),%cl
mov    -0x18(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x18(%rbp)
mov    %cl,(%rax)
jmp    1114 <strcpy+0x14>
mov    -0x18(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x18(%rbp)
movb   $0x0,(%rax)
mov    -0x18(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strcpy>:
mov    %rdi,%rax
mov    (%rsi),%cl
test   %cl,%cl
je     1121 <strcpy+0x21>
add    $0x1,%rsi
nopl   (%rax)
mov    %cl,(%rax)
add    $0x1,%rax
movzbl (%rsi),%ecx
add    $0x1,%rsi
test   %cl,%cl
jne    1110 <strcpy+0x10>
movb   $0x0,(%rax)
add    $0x1,%rax
ret

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

LLVM IR (-O2):
define i8* @strcpy(i8* writeonly %0, i8* nocapture %1) {
%3 = load i8, i8* %1
%4 = icmp eq i8 %3, 0
br i1 %4, label %13, label %5
5: ; preds = %2, %5
%6 = phi i8 [ %11, %5 ], [ %3, %2 ]
%7 = phi i8* [ %10, %5 ], [ %0, %2 ]
%8 = phi i8* [ %9, %5 ], [ %1, %2 ]
%9 = getelementptr inbounds i8, i8* %8, i64 1
%10 = getelementptr inbounds i8, i8* %7, i64 1
store i8 %6, i8* %7
%11 = load i8, i8* %9
%12 = icmp eq i8 %11, 0
br i1 %12, label %13, label %5
13: ; preds = %5, %2
%14 = phi i8* [ %0, %2 ], [ %10, %5 ]
%15 = getelementptr inbounds i8, i8* %14, i64 1
store i8 0, i8* %14
ret i8* %15
}
/* Type definitions */
struct block_device {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ bdev_get_queue(struct block_device *);
unsigned int queue_discard_zeroes_data(int /*<<< orphan*/);
__attribute__((always_)) unsigned int
bdev_discard_zeroes_data(struct block_device *bdev) {
  return queue_discard_zeroes_data(bdev_get_queue(bdev));
}


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

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

LLVM IR (-O0):
%struct.block_device = type { i32 }
define i32 @bdev_discard_zeroes_data(%struct.block_device* %0) {
%2 = alloca %struct.block_device*
store %struct.block_device* %0, %struct.block_device** %2
%3 = load %struct.block_device*, %struct.block_device** %2
%4 = call i32 @bdev_get_queue(%struct.block_device* %3)
%5 = call i32 @queue_discard_zeroes_data(i32 %4)
ret i32 %5
}

LLVM IR (-O2):
%struct.block_device = type { i32 }
define i32 @bdev_discard_zeroes_data(%struct.block_device* %0) {
%2 = tail call i32 @bdev_get_queue(%struct.block_device* %0)
%3 = tail call i32 @queue_discard_zeroes_data(i32 %2)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(int argc, char *argv[]) {
  printf("Hello cross-compilation world!\n");
  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
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [32 x i8] c"Hello cross-compilation world!\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 @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [31 x i8] c"Hello cross-compilation world!\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int _ada_use_c2phc4c(int, int *, int *, double *, int /*<<< orphan*/);
int solcon_write_solution_dimensions_to_defined_output_file(int len, int dim) {
  int fail;
  double *c;
  fail = _ada_use_c2phc4c(140, &len, &dim, c, 0);
  return fail;
}


x86 assembly (clang, -O0):
<solcon_write_solution_dimensions_to_defined_output_file>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x18(%rbp),%rcx
mov    $0x8c,%edi
lea    -0x4(%rbp),%rsi
lea    -0x8(%rbp),%rdx
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc4c@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<solcon_write_solution_dimensions_to_defined_output_file>:
push   %rax
mov    %edi,0x4(%rsp)
mov    %esi,(%rsp)
lea    0x4(%rsp),%rsi
mov    %rsp,%rdx
mov    $0x8c,%edi
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc4c@plt>
pop    %rcx
ret

LLVM IR (-O0):
define i32 @solcon_write_solution_dimensions_to_defined_output_file(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca double*
store i32 %0, i32* %3
store i32 %1, i32* %4
%7 = load double*, double** %6
%8 = call i32 @_ada_use_c2phc4c(i32 140, i32* %3, i32* %4, double* %7, i32 0)
store i32 %8, i32* %5
%9 = load i32, i32* %5
ret i32 %9
}

LLVM IR (-O2):
define i32 @solcon_write_solution_dimensions_to_defined_output_file(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = call i32 @_ada_use_c2phc4c(i32 140, i32* %3, i32* %4, double* undef, i32 0)
ret i32 %5
}
/* Variables and functions */
scalar_t__ getchar();
scalar_t__ isprint(char);
int /*<<< orphan*/ printf(char *, char);
int main(void) {
  char c = NULL;
  c = (char)getchar();
  if (isprint(c)) {
    printf("%02x is Printable Character!\n", c);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movb   $0x0,-0x5(%rbp)
mov    $0x0,%al
call   1040 <getchar@plt>
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%edi
call   1050 <isprint@plt>
cmp    $0x0,%rax
je     1170 <main+0x40>
lea    0xe99(%rip),%rdi
movsbl -0x5(%rbp),%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %eax,%eax
call   1040 <getchar@plt>
mov    %rax,%rbx
movsbl %bl,%edi
call   1050 <isprint@plt>
test   %rax,%rax
je     1157 <main+0x27>
movsbl %bl,%esi
lea    0xeae(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [30 x i8] c"%02x is Printable Character!\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8
store i32 0, i32* %1
store i8 0, i8* %2
%3 = call i64 (...) @getchar()
%4 = trunc i64 %3 to i8
store i8 %4, i8* %2
%5 = load i8, i8* %2
%6 = call i64 @isprint(i8 signext %5)
%7 = icmp ne i64 %6, 0
br i1 %7, label %8, label %11
8: ; preds = %0
%9 = load i8, i8* %2
%10 = call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0), i8 signext %9)
br label %11
11: ; preds = %8, %0
ret i32 0
}

LLVM IR (-O2):
@.str = [30 x i8] c"%02x is Printable Character!\0A\00"
define i32 @main() {
%1 = tail call i64 (...) @getchar()
%2 = trunc i64 %1 to i8
%3 = tail call i64 @isprint(i8 signext %2)
%4 = icmp eq i64 %3, 0
br i1 %4, label %7, label %5
5: ; preds = %0
%6 = tail call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0), i8 signext %2)
br label %7
7: ; preds = %5, %0
ret i32 0
}
/* Variables and functions */
int __builtin_mips_cabs_ole_s(float, float);
int test6(float a, float b) { return __builtin_mips_cabs_ole_s(a, b); }


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

x86 assembly (clang, -O2):
<test6>:
jmp    1030 <__builtin_mips_cabs_ole_s@plt>

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

LLVM IR (-O2):
define i32 @test6(float %0, float %1) {
%3 = tail call i32 @__builtin_mips_cabs_ole_s(float %0, float %1)
ret i32 %3
}
int hash(int sz, void *obj) {
  short i = *(((char *)obj));
  return (int)(i & (1024 - 1));
}


x86 assembly (clang, -O0):
<hash>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
mov    %ax,-0x12(%rbp)
movswl -0x12(%rbp),%eax
and    $0x3ff,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<hash>:
movsbl (%rsi),%eax
and    $0x3ff,%eax
ret

LLVM IR (-O0):
define i32 @hash(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i16
store i32 %0, i32* %3
store i8* %1, i8** %4
%6 = load i8*, i8** %4
%7 = load i8, i8* %6
%8 = sext i8 %7 to i16
store i16 %8, i16* %5
%9 = load i16, i16* %5
%10 = sext i16 %9 to i32
%11 = and i32 %10, 1023
ret i32 %11
}

LLVM IR (-O2):
define i32 @hash(i32 %0, i8* nocapture %1) {
%3 = load i8, i8* %1
%4 = sext i8 %3 to i32
%5 = and i32 %4, 1023
ret i32 %5
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ get_frequencies(char const *, int *);
int /*<<< orphan*/ print_frequencies(int /*<<< orphan*/ *, int *);
int print_file_frequencies(FILE *out, const char filename[]) {
  int frequencies[0x100];
  if (!get_frequencies(filename, frequencies))
    return 1;
  print_frequencies(out, frequencies);
  return 0;
}


x86 assembly (clang, -O0):
<print_file_frequencies>:
push   %rbp
mov    %rsp,%rbp
sub    $0x420,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
lea    -0x420(%rbp),%rsi
call   1040 <get_frequencies@plt>
cmp    $0x0,%eax
jne    1158 <print_file_frequencies+0x38>
movl   $0x1,-0x4(%rbp)
jmp    116f <print_file_frequencies+0x4f>
mov    -0x10(%rbp),%rdi
lea    -0x420(%rbp),%rsi
call   1030 <print_frequencies@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x420,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_file_frequencies>:
push   %rbx
sub    $0x400,%rsp
mov    %rsi,%rax
mov    %rdi,%rbx
mov    %rsp,%rsi
mov    %rax,%rdi
call   1040 <get_frequencies@plt>
test   %eax,%eax
je     114c <print_file_frequencies+0x2c>
mov    %rsp,%rsi
mov    %rbx,%rdi
call   1030 <print_frequencies@plt>
xor    %eax,%eax
jmp    1151 <print_file_frequencies+0x31>
mov    $0x1,%eax
add    $0x400,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define i32 @print_file_frequencies(i32* %0, i8* %1) {
%3 = alloca i32
%4 = alloca i32*
%5 = alloca i8*
%6 = alloca [256 x i32]
store i32* %0, i32** %4
store i8* %1, i8** %5
%7 = load i8*, i8** %5
%8 = getelementptr inbounds [256 x i32], [256 x i32]* %6, i64 0, i64 0
%9 = call i32 @get_frequencies(i8* %7, i32* %8)
%10 = icmp ne i32 %9, 0
br i1 %10, label %12, label %11
11: ; preds = %2
store i32 1, i32* %3
br label %16
12: ; preds = %2
%13 = load i32*, i32** %4
%14 = getelementptr inbounds [256 x i32], [256 x i32]* %6, i64 0, i64 0
%15 = call i32 @print_frequencies(i32* %13, i32* %14)
store i32 0, i32* %3
br label %16
16: ; preds = %12, %11
%17 = load i32, i32* %3
ret i32 %17
}

LLVM IR (-O2):
define i32 @print_file_frequencies(i32* %0, i8* %1) {
%3 = alloca [256 x i32]
%4 = bitcast [256 x i32]* %3 to i8*
%5 = getelementptr inbounds [256 x i32], [256 x i32]* %3, i64 0, i64 0
%6 = call i32 @get_frequencies(i8* %1, i32* %5)
%7 = icmp eq i32 %6, 0
br i1 %7, label %10, label %8
8: ; preds = %2
%9 = call i32 @print_frequencies(i32* %0, i32* %5)
br label %10
10: ; preds = %2, %8
%11 = phi i32 [ 0, %8 ], [ 1, %2 ]
ret i32 %11
}
/* Variables and functions */
int uncompress(unsigned char *, unsigned long *, unsigned char const *,
               unsigned long);
int uncompress_wrapper(unsigned char *dest, unsigned long *dest_len,
                       const unsigned char *src, unsigned long src_len) {
  int res;
  res = uncompress(dest, dest_len, src, src_len);
  return res;
}


x86 assembly (clang, -O0):
<uncompress_wrapper>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
call   1030 <uncompress@plt>
mov    %eax,-0x24(%rbp)
mov    -0x24(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<uncompress_wrapper>:
jmp    1030 <uncompress@plt>

LLVM IR (-O0):
define i32 @uncompress_wrapper(i8* %0, i64* %1, i8* %2, i64 %3) {
%5 = alloca i8*
%6 = alloca i64*
%7 = alloca i8*
%8 = alloca i64
%9 = alloca i32
store i8* %0, i8** %5
store i64* %1, i64** %6
store i8* %2, i8** %7
store i64 %3, i64* %8
%10 = load i8*, i8** %5
%11 = load i64*, i64** %6
%12 = load i8*, i8** %7
%13 = load i64, i64* %8
%14 = call i32 @uncompress(i8* %10, i64* %11, i8* %12, i64 %13)
store i32 %14, i32* %9
%15 = load i32, i32* %9
ret i32 %15
}

LLVM IR (-O2):
define i32 @uncompress_wrapper(i8* %0, i64* %1, i8* %2, i64 %3) {
%5 = tail call i32 @uncompress(i8* %0, i64* %1, i8* %2, i64 %3)
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ redblack(int);
void *worker(void *arg) {
  int id = *((int *)arg);
  redblack(id);
  return NULL;
}


x86 assembly (clang, -O0):
<worker>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%edi
call   1030 <redblack@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<worker>:
push   %rax
mov    (%rdi),%edi
call   1030 <redblack@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define noalias i8* @worker(i8* nocapture %0) {
%2 = bitcast i8* %0 to i32*
%3 = load i32, i32* %2
%4 = tail call i32 @redblack(i32 %3)
ret i8* null
}