xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ common_join();
int /*<<< orphan*/ processend();
int /*<<< orphan*/ processinit();
int /*<<< orphan*/ t1(int /*<<< orphan*/);
int /*<<< orphan*/ t2(int /*<<< orphan*/);
int mymain() {
  int v1tmp;
  int v2tmp;
  processinit();
  t1(0);
  processend();
  processinit();
  t2(0);
  processend();
  common_join();
  return 0;
}


x86 assembly (clang, -O0):
<mymain>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1060 <processinit@plt>
xor    %edi,%edi
call   1030 <t1@plt>
mov    $0x0,%al
call   1050 <processend@plt>
mov    $0x0,%al
call   1060 <processinit@plt>
xor    %edi,%edi
call   1070 <t2@plt>
mov    $0x0,%al
call   1050 <processend@plt>
mov    $0x0,%al
call   1040 <common_join@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mymain>:
push   %rax
xor    %eax,%eax
call   1060 <processinit@plt>
xor    %edi,%edi
call   1030 <t1@plt>
xor    %eax,%eax
call   1050 <processend@plt>
xor    %eax,%eax
call   1060 <processinit@plt>
xor    %edi,%edi
call   1070 <t2@plt>
xor    %eax,%eax
call   1050 <processend@plt>
xor    %eax,%eax
call   1040 <common_join@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @mymain() {
%1 = alloca i32
%2 = alloca i32
%3 = call i32 (...) @processinit()
%4 = call i32 @t1(i32 0)
%5 = call i32 (...) @processend()
%6 = call i32 (...) @processinit()
%7 = call i32 @t2(i32 0)
%8 = call i32 (...) @processend()
%9 = call i32 (...) @common_join()
ret i32 0
}

LLVM IR (-O2):
define i32 @mymain() {
%1 = tail call i32 (...) @processinit()
%2 = tail call i32 @t1(i32 0)
%3 = tail call i32 (...) @processend()
%4 = tail call i32 (...) @processinit()
%5 = tail call i32 @t2(i32 0)
%6 = tail call i32 (...) @processend()
%7 = tail call i32 (...) @common_join()
ret i32 0
}
void halt_system() {}


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

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

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

LLVM IR (-O2):
define void @halt_system() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int rob(int *, int);
int main(int argc, char const *argv[]) {
  int nums[] = {2, 1, 2, 1};
  printf("%d\n", rob(nums, 4));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0xec3(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xec0(%rip),%rax
mov    %rax,-0x18(%rbp)
lea    -0x20(%rbp),%rdi
mov    $0x4,%esi
call   1040 <rob@plt>
mov    %eax,%esi
lea    0xead(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
movaps 0xed5(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rdi
mov    $0x4,%esi
call   1040 <rob@plt>
lea    0xecd(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

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

LLVM IR (-O2):
@__const.main.nums = [4 x i32] [i32 2, i32 1, i32 2, i32 1]
@.str = [4 x i8] c"%d\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [4 x i32]
%4 = bitcast [4 x i32]* %3 to i8*
%5 = getelementptr inbounds [4 x i32], [4 x i32]* %3, i64 0, i64 0
%6 = call i32 @rob(i32* %5, i32 4)
%7 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %6)
ret i32 0
}
int add3(int b) { return (3 + b) != 0; }


x86 assembly (clang, -O0):
<add3>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x3,%eax
cmp    $0x0,%eax
setne  %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<add3>:
xor    %eax,%eax
cmp    $0xfffffffd,%edi
setne  %al
ret

LLVM IR (-O0):
define i32 @add3(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = add nsw i32 3, %3
%5 = icmp ne i32 %4, 0
%6 = zext i1 %5 to i32
ret i32 %6
}

LLVM IR (-O2):
define i32 @add3(i32 %0) {
%2 = icmp ne i32 %0, -3
%3 = zext i1 %2 to i32
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ esp_task_wdt_reset();
void HAL_watchdog_refresh() { esp_task_wdt_reset(); }


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

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

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

LLVM IR (-O2):
define void @HAL_watchdog_refresh() {
%1 = tail call i32 (...) @esp_task_wdt_reset()
ret void
}
/* Type definitions */
struct list_head {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ list_add(struct list_head *, struct list_head *);
int /*<<< orphan*/ list_del(struct list_head *);
__attribute__((always_)) void list_move(struct list_head *list,
                                        struct list_head *head) {
  list_del(list);
  list_add(list, head);
}


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

x86 assembly (clang, -O2):
<list_move>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
call   1030 <list_del@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <list_add@plt>

LLVM IR (-O0):
%struct.list_head = type { i32 }
define void @list_move(%struct.list_head* %0, %struct.list_head* %1) {
%3 = alloca %struct.list_head*
%4 = alloca %struct.list_head*
store %struct.list_head* %0, %struct.list_head** %3
store %struct.list_head* %1, %struct.list_head** %4
%5 = load %struct.list_head*, %struct.list_head** %3
%6 = call i32 @list_del(%struct.list_head* %5)
%7 = load %struct.list_head*, %struct.list_head** %3
%8 = load %struct.list_head*, %struct.list_head** %4
%9 = call i32 @list_add(%struct.list_head* %7, %struct.list_head* %8)
ret void
}

LLVM IR (-O2):
%struct.list_head = type { i32 }
define void @list_move(%struct.list_head* %0, %struct.list_head* %1) {
%3 = tail call i32 @list_del(%struct.list_head* %0)
%4 = tail call i32 @list_add(%struct.list_head* %0, %struct.list_head* %1)
ret void
}
void mat_product(unsigned n) {
  for (unsigned i = 0; i < n; i++) {
    for (unsigned j = 0; j < n; j++) {
    }
  }
}


x86 assembly (clang, -O0):
<mat_product>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x4(%rbp),%eax
jae    1153 <mat_product+0x53>
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x4(%rbp),%eax
jae    1140 <mat_product+0x40>
jmp    1132 <mat_product+0x32>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1121 <mat_product+0x21>
jmp    1145 <mat_product+0x45>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    110e <mat_product+0xe>
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @mat_product(i32 %0) {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ GPIODirModeSet(int /*<<< orphan*/, int /*<<< orphan*/, int);
int /*<<< orphan*/ GPIOPadConfigSet(int /*<<< orphan*/, int /*<<< orphan*/, int,
                                    int);
void GPIOPinTypeComparatorOutput(uint32_t ui32Port, uint8_t ui8Pins) {
  ;
  GPIODirModeSet(ui32Port, ui8Pins, 0x00000002);
  GPIOPadConfigSet(ui32Port, ui8Pins, 0x00000001, 0x00000008);
}


x86 assembly (clang, -O0):
<GPIOPinTypeComparatorOutput>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    $0x2,%edx
call   1040 <GPIODirModeSet@plt>
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    $0x1,%edx
mov    $0x8,%ecx
call   1030 <GPIOPadConfigSet@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<GPIOPinTypeComparatorOutput>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
mov    $0x2,%edx
call   1040 <GPIODirModeSet@plt>
mov    %ebp,%edi
mov    %ebx,%esi
mov    $0x1,%edx
mov    $0x8,%ecx
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <GPIOPadConfigSet@plt>

LLVM IR (-O0):
define void @GPIOPinTypeComparatorOutput(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 @GPIODirModeSet(i32 %5, i32 %6, i32 2)
%8 = load i32, i32* %3
%9 = load i32, i32* %4
%10 = call i32 @GPIOPadConfigSet(i32 %8, i32 %9, i32 1, i32 8)
ret void
}

LLVM IR (-O2):
define void @GPIOPinTypeComparatorOutput(i32 %0, i32 %1) {
%3 = tail call i32 @GPIODirModeSet(i32 %0, i32 %1, i32 2)
%4 = tail call i32 @GPIOPadConfigSet(i32 %0, i32 %1, i32 1, i32 8)
ret void
}
float circle(float x, float y) {
  return ((((x - 0.5) * (x - 0.5)) + ((y - 0.5) * (y - 0.5))) <=
          ((0.5) * (0.5)));
}


x86 assembly (clang, -O0):
<circle>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xee9(%rip),%xmm0
subsd  %xmm0,%xmm1
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm2
movsd  0xed4(%rip),%xmm0
subsd  %xmm0,%xmm2
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xebf(%rip),%xmm3
subsd  %xmm3,%xmm0
movss  -0x8(%rbp),%xmm3
cvtss2sd %xmm3,%xmm3
movsd  0xeaa(%rip),%xmm4
subsd  %xmm4,%xmm3
mulsd  %xmm3,%xmm0
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movsd  0xe8a(%rip),%xmm0
ucomisd %xmm1,%xmm0
setae  %al
and    $0x1,%al
movzbl %al,%eax
cvtsi2ss %eax,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<circle>:
cvtss2sd %xmm0,%xmm0
movsd  0xef4(%rip),%xmm2
addsd  %xmm2,%xmm0
cvtss2sd %xmm1,%xmm1
addsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm1
mulsd  %xmm0,%xmm0
addsd  %xmm1,%xmm0
movsd  0xedc(%rip),%xmm1
ucomisd %xmm0,%xmm1
jae    1137 <circle+0x37>
xorpd  %xmm0,%xmm0
ret
movss  0xed1(%rip),%xmm0
ret

LLVM IR (-O0):
define float @circle(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 = fpext float %5 to double
%7 = fsub double %6, 5.000000e-01
%8 = load float, float* %3
%9 = fpext float %8 to double
%10 = fsub double %9, 5.000000e-01
%11 = load float, float* %4
%12 = fpext float %11 to double
%13 = fsub double %12, 5.000000e-01
%14 = load float, float* %4
%15 = fpext float %14 to double
%16 = fsub double %15, 5.000000e-01
%17 = fmul double %13, %16
%18 = call double @llvm.fmuladd.f64(double %7, double %10, double %17)
%19 = fcmp ole double %18, 2.500000e-01
%20 = zext i1 %19 to i32
%21 = sitofp i32 %20 to float
ret float %21
}

LLVM IR (-O2):
define float @circle(float %0, float %1) {
%3 = fpext float %0 to double
%4 = fadd double %3, -5.000000e-01
%5 = fpext float %1 to double
%6 = fadd double %5, -5.000000e-01
%7 = fmul double %6, %6
%8 = tail call double @llvm.fmuladd.f64(double %4, double %4, double %7)
%9 = fcmp ole double %8, 2.500000e-01
%10 = uitofp i1 %9 to float
ret float %10
}
/* Variables and functions */
double MM(double, double);
double MM2(double x, double a, double b) {
  return MM(x * MM(a, b), 0.5 * (a + b));
}


x86 assembly (clang, -O0):
<MM2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm1
call   1030 <MM@plt>
movaps %xmm0,%xmm1
movsd  -0x20(%rbp),%xmm0
mulsd  %xmm1,%xmm0
movsd  -0x10(%rbp),%xmm2
addsd  -0x18(%rbp),%xmm2
movsd  0xea2(%rip),%xmm1
mulsd  %xmm2,%xmm1
call   1030 <MM@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<MM2>:
sub    $0x18,%rsp
movsd  %xmm2,(%rsp)
movsd  %xmm1,0x8(%rsp)
movsd  %xmm0,0x10(%rsp)
movapd %xmm1,%xmm0
movaps %xmm2,%xmm1
call   1030 <MM@plt>
mulsd  0x10(%rsp),%xmm0
movsd  0x8(%rsp),%xmm1
addsd  (%rsp),%xmm1
mulsd  0xeb6(%rip),%xmm1
add    $0x18,%rsp
jmp    1030 <MM@plt>

LLVM IR (-O0):
define double @MM2(double %0, double %1, double %2) {
%4 = alloca double
%5 = alloca double
%6 = alloca double
store double %0, double* %4
store double %1, double* %5
store double %2, double* %6
%7 = load double, double* %4
%8 = load double, double* %5
%9 = load double, double* %6
%10 = call double @MM(double %8, double %9)
%11 = fmul double %7, %10
%12 = load double, double* %5
%13 = load double, double* %6
%14 = fadd double %12, %13
%15 = fmul double 5.000000e-01, %14
%16 = call double @MM(double %11, double %15)
ret double %16
}

LLVM IR (-O2):
define double @MM2(double %0, double %1, double %2) {
%4 = tail call double @MM(double %1, double %2)
%5 = fmul double %4, %0
%6 = fadd double %1, %2
%7 = fmul double %6, 5.000000e-01
%8 = tail call double @MM(double %5, double %7)
ret double %8
}
indreg0indreg1_set(r0, r1, x0, x1, p0, p1) int r0, r1;
int *p0, *p1;
{ (*p0) = (*p1); }


x86 assembly (clang, -O0):
<indreg0indreg1_set>:
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    -0x28(%rbp),%rax
mov    (%rax),%ecx
mov    -0x20(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<indreg0indreg1_set>:
mov    (%r9),%eax
mov    %eax,(%r8)
ret

LLVM IR (-O0):
define i32 @indreg0indreg1_set(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** %13
%15 = load i32, i32* %14
%16 = load i32*, i32** %12
store i32 %15, i32* %16
%17 = load i32, i32* %7
ret i32 %17
}

LLVM IR (-O2):
define i32 @indreg0indreg1_set(i32 %0, i32 %1, i32 %2, i32 %3, i32* nocapture writeonly %4, i32* nocapture %5) {
%7 = load i32, i32* %5
store i32 %7, i32* %4
ret i32 undef
}
int abs(int j) {
  if (j < 0) {
    j = -j;
  }
  return j;
}


x86 assembly (clang, -O0):
<abs>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jge    1119 <abs+0x19>
xor    %eax,%eax
sub    -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @abs(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 %8
5: ; preds = %1
%6 = load i32, i32* %2
%7 = sub nsw i32 0, %6
store i32 %7, i32* %2
br label %8
8: ; preds = %5, %1
%9 = load i32, i32* %2
ret i32 %9
}

LLVM IR (-O2):
define i32 @abs(i32 %0) {
%2 = tail call i32 @llvm.abs.i32(i32 %0, i1 true)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ term();
void expr() { term(); }


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

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

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

LLVM IR (-O2):
define void @expr() {
%1 = tail call i32 (...) @term()
ret void
}
unsigned int endianness(void) {
  int i = 1;
  if (((char *)&i)[0] == 1)
    return 1234;
  return 4321;
}


x86 assembly (clang, -O0):
<endianness>:
push   %rbp
mov    %rsp,%rbp
movl   $0x1,-0x8(%rbp)
movsbl -0x8(%rbp),%eax
cmp    $0x1,%eax
jne    1124 <endianness+0x24>
movl   $0x4d2,-0x4(%rbp)
jmp    112b <endianness+0x2b>
movl   $0x10e1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @endianness() {
%1 = alloca i32
%2 = alloca i32
store i32 1, i32* %2
%3 = bitcast i32* %2 to i8*
%4 = getelementptr inbounds i8, i8* %3, i64 0
%5 = load i8, i8* %4
%6 = sext i8 %5 to i32
%7 = icmp eq i32 %6, 1
br i1 %7, label %8, label %9
8: ; preds = %0
store i32 1234, i32* %1
br label %10
9: ; preds = %0
store i32 4321, i32* %1
br label %10
10: ; preds = %9, %8
%11 = load i32, i32* %1
ret i32 %11
}

LLVM IR (-O2):
define i32 @endianness() {
ret i32 1234
}
/* Variables and functions */
int /*<<< orphan*/ glRotatef(double, double, double, double);
int /*<<< orphan*/ glTranslatef(double, double, double);
void bend_left(void) {
  glRotatef(0.1 * (-900), 0.0, 0.0, 1.0);
  glTranslatef(0.0, 1.000000, 0.0);
  glRotatef(0.1 * (900), 1.0, 0.0, 0.0);
  glTranslatef(0.0, -1.000000, 0.0);
}


x86 assembly (clang, -O0):
<bend_left>:
push   %rbp
mov    %rsp,%rbp
movsd  0xeec(%rip),%xmm0
xorps  %xmm2,%xmm2
movsd  0xed9(%rip),%xmm3
movaps %xmm2,%xmm1
call   1040 <glRotatef@plt>
xorps  %xmm2,%xmm2
movsd  0xec6(%rip),%xmm1
movaps %xmm2,%xmm0
call   1030 <glTranslatef@plt>
movsd  0xeae(%rip),%xmm0
movsd  0xeae(%rip),%xmm1
xorps  %xmm3,%xmm3
movaps %xmm3,%xmm2
call   1040 <glRotatef@plt>
xorps  %xmm2,%xmm2
movsd  0xe88(%rip),%xmm1
movaps %xmm2,%xmm0
call   1030 <glTranslatef@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<bend_left>:
push   %rax
movsd  0xed7(%rip),%xmm0
movsd  0xed7(%rip),%xmm3
xorps  %xmm1,%xmm1
xorps  %xmm2,%xmm2
call   1040 <glRotatef@plt>
xorps  %xmm0,%xmm0
xorps  %xmm2,%xmm2
movsd  0xebe(%rip),%xmm1
call   1030 <glTranslatef@plt>
movsd  0xeb9(%rip),%xmm0
xorps  %xmm2,%xmm2
xorps  %xmm3,%xmm3
movsd  0xea3(%rip),%xmm1
call   1040 <glRotatef@plt>
movsd  0xea6(%rip),%xmm1
xorps  %xmm0,%xmm0
xorps  %xmm2,%xmm2
pop    %rax
jmp    1030 <glTranslatef@plt>

LLVM IR (-O0):
define void @bend_left() {
%1 = call i32 @glRotatef(double -9.000000e+01, double 0.000000e+00, double 0.000000e+00, double 1.000000e+00)
%2 = call i32 @glTranslatef(double 0.000000e+00, double 1.000000e+00, double 0.000000e+00)
%3 = call i32 @glRotatef(double 9.000000e+01, double 1.000000e+00, double 0.000000e+00, double 0.000000e+00)
%4 = call i32 @glTranslatef(double 0.000000e+00, double -1.000000e+00, double 0.000000e+00)
ret void
}

LLVM IR (-O2):
define void @bend_left() {
%1 = tail call i32 @glRotatef(double -9.000000e+01, double 0.000000e+00, double 0.000000e+00, double 1.000000e+00)
%2 = tail call i32 @glTranslatef(double 0.000000e+00, double 1.000000e+00, double 0.000000e+00)
%3 = tail call i32 @glRotatef(double 9.000000e+01, double 1.000000e+00, double 0.000000e+00, double 0.000000e+00)
%4 = tail call i32 @glTranslatef(double 0.000000e+00, double -1.000000e+00, double 0.000000e+00)
ret void
}
void ff_hevc_put_hevc_uni_pel_pixels6_8_sse4() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_uni_pel_pixels6_8_sse4() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ ENOSYS;
int /*<<< orphan*/ errno;
int fcntl(int fd, int cmd, ...) {
  errno = ENOSYS;
  return -1;
}


x86 assembly (clang, -O0):
<fcntl>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    0x2ed7(%rip),%rax
mov    (%rax),%ecx
mov    0x2ebe(%rip),%rax
mov    %ecx,(%rax)
mov    $0xffffffff,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<fcntl>:
mov    0x2ee1(%rip),%rax
mov    (%rax),%eax
mov    0x2ec8(%rip),%rcx
mov    %eax,(%rcx)
mov    $0xffffffff,%eax
ret

LLVM IR (-O0):
@ENOSYS = global i32 0
@errno = global i32 0
define i32 @fcntl(i32 %0, i32 %1, ...) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* @ENOSYS
store i32 %5, i32* @errno
ret i32 -1
}

LLVM IR (-O2):
@ENOSYS = global i32 0
@errno = global i32 0
define i32 @fcntl(i32 %0, i32 %1, ...) {
%3 = load i32, i32* @ENOSYS
store i32 %3, i32* @errno
ret i32 -1
}
__attribute__((no, noclone)) long long f3(long long a, long long b,
                                          long long c) {
  long long i;
  int l;
#pragma omp taskloop default(none) lastprivate(i, l)
  for (i = a; i < b; i += c)
    l = i;
  return l * 7 + i;
}


x86 assembly (clang, -O0):
<f3>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
cmp    -0x10(%rbp),%rax
jge    113e <f3+0x3e>
mov    -0x20(%rbp),%rax
mov    %eax,-0x24(%rbp)
mov    -0x18(%rbp),%rax
add    -0x20(%rbp),%rax
mov    %rax,-0x20(%rbp)
jmp    1118 <f3+0x18>
imul   $0x7,-0x24(%rbp),%eax
cltq
add    -0x20(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f3>:
mov    %rdi,%rax
cmp    %rsi,%rdi
jge    1133 <f3+0x33>
movabs $0x700000000,%rdi
mov    %rax,%rcx
imul   %rdi,%rcx
imul   %rdx,%rdi
sub    %rdi,%rcx
add    %rdx,%rax
add    %rdi,%rcx
cmp    %rsi,%rax
jl     1120 <f3+0x20>
sar    $0x20,%rcx
add    %rcx,%rax
ret
xor    %ecx,%ecx
add    %rcx,%rax
ret

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

LLVM IR (-O2):
define i64 @f3(i64 %0, i64 %1, i64 %2) {
%4 = icmp slt i64 %0, %1
br i1 %4, label %5, label %12
5: ; preds = %3, %5
%6 = phi i64 [ %7, %5 ], [ %0, %3 ]
%7 = add nsw i64 %6, %2
%8 = icmp slt i64 %7, %1
br i1 %8, label %5, label %9
9: ; preds = %5
%10 = mul i64 %6, 30064771072
%11 = ashr exact i64 %10, 32
br label %12
12: ; preds = %9, %3
%13 = phi i64 [ %7, %9 ], [ %0, %3 ]
%14 = phi i64 [ %11, %9 ], [ 0, %3 ]
%15 = add nsw i64 %14, %13
ret i64 %15
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  scalar_t__ class;
};
typedef TYPE_1__ XVisualInfo;

/* Variables and functions */
int get_XVisualInfo_class(void *_p) { return (int)((XVisualInfo *)_p)->class; }


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

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

LLVM IR (-O0):
%struct.TYPE_2__ = type { i64 }
define i32 @get_XVisualInfo_class(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = bitcast i8* %3 to %struct.TYPE_2__*
%5 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %4, i32 0, i32 0
%6 = load i64, i64* %5
%7 = trunc i64 %6 to i32
ret i32 %7
}

LLVM IR (-O2):
define i32 @get_XVisualInfo_class(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
%4 = trunc i64 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int ref();
int test();
int main() {
  int a = test();
  int b = ref();
  if (a != b)
    abort();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1050 <test@plt>
mov    %eax,-0x8(%rbp)
mov    $0x0,%al
call   1040 <ref@plt>
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
je     1166 <main+0x36>
mov    $0x0,%al
call   1030 <abort@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %eax,%eax
call   1050 <test@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1040 <ref@plt>
cmp    %eax,%ebx
jne    1149 <main+0x19>
xor    %eax,%eax
pop    %rbx
ret
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
%4 = call i32 (...) @test()
store i32 %4, i32* %2
%5 = call i32 (...) @ref()
store i32 %5, i32* %3
%6 = load i32, i32* %2
%7 = load i32, i32* %3
%8 = icmp ne i32 %6, %7
br i1 %8, label %9, label %11
9: ; preds = %0
%10 = call i32 (...) @abort()
unreachable
11: ; preds = %0
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @test()
%2 = tail call i32 (...) @ref()
%3 = icmp eq i32 %1, %2
br i1 %3, label %6, label %4
4: ; preds = %0
%5 = tail call i32 (...) @abort()
unreachable
6: ; preds = %0
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ m41_reset();
int /*<<< orphan*/ p32c8init(int /*<<< orphan*/ *, int /*<<< orphan*/,
                             int /*<<< orphan*/ *, int /*<<< orphan*/,
                             int /*<<< orphan*/ *, int /*<<< orphan*/);
void m41_init(uint8_t *prgROMin, uint32_t prgROMsizeIn, uint8_t *prgRAMin,
              uint32_t prgRAMsizeIn, uint8_t *chrROMin, uint32_t chrROMsizeIn) {
  p32c8init(prgROMin, prgROMsizeIn, prgRAMin, prgRAMsizeIn, chrROMin,
            chrROMsizeIn);
  m41_reset();
}


x86 assembly (clang, -O0):
<m41_init>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9d,-0x2c(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x18(%rbp),%rdx
mov    -0x1c(%rbp),%ecx
mov    -0x28(%rbp),%r8
mov    -0x2c(%rbp),%r9d
call   1040 <p32c8init@plt>
mov    $0x0,%al
call   1030 <m41_reset@plt>
add    $0x30,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define void @m41_init(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 @p32c8init(i32* %13, i32 %14, i32* %15, i32 %16, i32* %17, i32 %18)
%20 = call i32 (...) @m41_reset()
ret void
}

LLVM IR (-O2):
define void @m41_init(i32* %0, i32 %1, i32* %2, i32 %3, i32* %4, i32 %5) {
%7 = tail call i32 @p32c8init(i32* %0, i32 %1, i32* %2, i32 %3, i32* %4, i32 %5)
%8 = tail call i32 (...) @m41_reset()
ret void
}
/* Variables and functions */
int ceil(double);
double log2(int /*<<< orphan*/);
int /*<<< orphan*/ pow(double, int);
int hll_precision_for_error(double err) {
  if (err >= 1 || err <= 0)
    return -1;
  double p = log2(pow(1.04 / err, 2));
  return ceil(p);
}


x86 assembly (clang, -O0):
<hll_precision_for_error>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  0xeb6(%rip),%xmm1
ucomisd %xmm1,%xmm0
jae    1162 <hll_precision_for_error+0x32>
xorps  %xmm0,%xmm0
ucomisd -0x10(%rbp),%xmm0
jb     116e <hll_precision_for_error+0x3e>
movl   $0xffffffff,-0x4(%rbp)
jmp    119e <hll_precision_for_error+0x6e>
movsd  0xe92(%rip),%xmm0
divsd  -0x10(%rbp),%xmm0
mov    $0x2,%edi
call   1050 <pow@plt>
mov    %eax,%edi
call   1030 <log2@plt>
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
call   1040 <ceil@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<hll_precision_for_error>:
push   %rax
ucomisd 0xec7(%rip),%xmm0
jae    116c <hll_precision_for_error+0x3c>
xorpd  %xmm1,%xmm1
ucomisd %xmm0,%xmm1
jae    116c <hll_precision_for_error+0x3c>
movsd  0xebb(%rip),%xmm1
divsd  %xmm0,%xmm1
movapd %xmm1,%xmm0
mov    $0x2,%edi
call   1050 <pow@plt>
mov    %eax,%edi
call   1030 <log2@plt>
pop    %rax
jmp    1040 <ceil@plt>
mov    $0xffffffff,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @hll_precision_for_error(double %0) {
%2 = alloca i32
%3 = alloca double
%4 = alloca double
store double %0, double* %3
%5 = load double, double* %3
%6 = fcmp oge double %5, 1.000000e+00
br i1 %6, label %10, label %7
7: ; preds = %1
%8 = load double, double* %3
%9 = fcmp ole double %8, 0.000000e+00
br i1 %9, label %10, label %11
10: ; preds = %7, %1
store i32 -1, i32* %2
br label %18
11: ; preds = %7
%12 = load double, double* %3
%13 = fdiv double 1.040000e+00, %12
%14 = call i32 @pow(double %13, i32 2)
%15 = call double @log2(i32 %14)
store double %15, double* %4
%16 = load double, double* %4
%17 = call i32 @ceil(double %16)
store i32 %17, i32* %2
br label %18
18: ; preds = %11, %10
%19 = load i32, i32* %2
ret i32 %19
}

LLVM IR (-O2):
define i32 @hll_precision_for_error(double %0) {
%2 = fcmp oge double %0, 1.000000e+00
%3 = fcmp ole double %0, 0.000000e+00
%4 = or i1 %2, %3
br i1 %4, label %10, label %5
5: ; preds = %1
%6 = fdiv double 1.040000e+00, %0
%7 = tail call i32 @pow(double %6, i32 2)
%8 = tail call double @log2(i32 %7)
%9 = tail call i32 @ceil(double %8)
br label %10
10: ; preds = %1, %5
%11 = phi i32 [ %9, %5 ], [ -1, %1 ]
ret i32 %11
}
/* Variables and functions */
int remove(char const *);
int fs_delete_file(const char *file_name) { return remove(file_name); }


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

x86 assembly (clang, -O2):
<fs_delete_file>:
jmp    1030 <remove@plt>

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

LLVM IR (-O2):
define i32 @fs_delete_file(i8* nocapture %0) {
%2 = tail call i32 @remove(i8* %0)
ret i32 %2
}
void strCopy(char *input, char *output) {
  while (*input != '\0')
    *output++ = *input++;
  output = '\0';
}


x86 assembly (clang, -O0):
<strCopy>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     1143 <strCopy+0x43>
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
mov    (%rax),%cl
mov    -0x10(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x10(%rbp)
mov    %cl,(%rax)
jmp    110c <strCopy+0xc>
movq   $0x0,-0x10(%rbp)
pop    %rbp
ret

x86 assembly (clang, -O2):
<strCopy>:
mov    (%rdi),%al
test   %al,%al
je     1120 <strCopy+0x20>
xor    %ecx,%ecx
nopl   0x0(%rax,%rax,1)
mov    %al,(%rsi,%rcx,1)
movzbl 0x1(%rdi,%rcx,1),%eax
add    $0x1,%rcx
test   %al,%al
jne    1110 <strCopy+0x10>
ret

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

LLVM IR (-O2):
define void @strCopy(i8* nocapture %0, i8* nocapture writeonly %1) {
%3 = load i8, i8* %0
%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 ], [ %1, %2 ]
%8 = phi i8* [ %9, %5 ], [ %0, %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
ret void
}
void *identity(void *x) { return x; }


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

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

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

LLVM IR (-O2):
define i8* @identity(i8* readnone returned %0) {
ret i8* %0
}
/* Type definitions */
typedef int /*<<< orphan*/ ASN1_VALUE;
typedef int /*<<< orphan*/ ASN1_OCTET_STRING;

/* Variables and functions */
int /*<<< orphan*/ ASN1_OCTET_STRING_it;
int /*<<< orphan*/ ASN1_item_free(int /*<<< orphan*/ *, int /*<<< orphan*/ *);
void ASN1_OCTET_STRING_free(ASN1_OCTET_STRING *a) {
  ASN1_item_free((ASN1_VALUE *)a, &ASN1_OCTET_STRING_it);
}


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

x86 assembly (clang, -O2):
<ASN1_OCTET_STRING_free>:
mov    0x2ec9(%rip),%rsi
jmp    1030 <ASN1_item_free@plt>

LLVM IR (-O0):
@ASN1_OCTET_STRING_it = global i32 0
define void @ASN1_OCTET_STRING_free(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = call i32 @ASN1_item_free(i32* %3, i32* @ASN1_OCTET_STRING_it)
ret void
}

LLVM IR (-O2):
@ASN1_OCTET_STRING_it = global i32 0
define void @ASN1_OCTET_STRING_free(i32* %0) {
%2 = tail call i32 @ASN1_item_free(i32* %0, i32* @ASN1_OCTET_STRING_it)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ kb_rmmapping(int);
int transl_strict(unsigned char const *, int);
void rmkey(const unsigned char *input, int keypr) {
  int flags = keypr & (0x100 | 0x200 | 0x400);
  int old = transl_strict(input, flags);
  if (old && old != (keypr & 63))
    kb_rmmapping(old | flags);
}


x86 assembly (clang, -O0):
<rmkey>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
and    $0x700,%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%esi
call   1040 <transl_strict@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
je     116f <rmkey+0x4f>
mov    -0x14(%rbp),%eax
mov    -0xc(%rbp),%ecx
and    $0x3f,%ecx
cmp    %ecx,%eax
je     116f <rmkey+0x4f>
mov    -0x14(%rbp),%edi
or     -0x10(%rbp),%edi
call   1030 <kb_rmmapping@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rmkey>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %esi,%ebx
and    $0x700,%ebx
mov    %ebx,%esi
call   1040 <transl_strict@plt>
test   %eax,%eax
je     114e <rmkey+0x2e>
and    $0x3f,%ebp
cmp    %ebp,%eax
je     114e <rmkey+0x2e>
or     %ebx,%eax
mov    %eax,%edi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <kb_rmmapping@plt>
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define void @rmkey(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%7 = load i32, i32* %4
%8 = and i32 %7, 1792
store i32 %8, i32* %5
%9 = load i8*, i8** %3
%10 = load i32, i32* %5
%11 = call i32 @transl_strict(i8* %9, i32 %10)
store i32 %11, i32* %6
%12 = load i32, i32* %6
%13 = icmp ne i32 %12, 0
br i1 %13, label %14, label %24
14: ; preds = %2
%15 = load i32, i32* %6
%16 = load i32, i32* %4
%17 = and i32 %16, 63
%18 = icmp ne i32 %15, %17
br i1 %18, label %19, label %24
19: ; preds = %14
%20 = load i32, i32* %6
%21 = load i32, i32* %5
%22 = or i32 %20, %21
%23 = call i32 @kb_rmmapping(i32 %22)
br label %24
24: ; preds = %19, %14, %2
ret void
}

LLVM IR (-O2):
define void @rmkey(i8* %0, i32 %1) {
%3 = and i32 %1, 1792
%4 = tail call i32 @transl_strict(i8* %0, i32 %3)
%5 = icmp eq i32 %4, 0
%6 = and i32 %1, 63
%7 = icmp eq i32 %4, %6
%8 = or i1 %5, %7
br i1 %8, label %12, label %9
9: ; preds = %2
%10 = or i32 %4, %3
%11 = tail call i32 @kb_rmmapping(i32 %10)
br label %12
12: ; preds = %9, %2
ret void
}
void ARGBToUVJRow_NEON() {}


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

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

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

LLVM IR (-O2):
define void @ARGBToUVJRow_NEON() {
ret void
}
/* Variables and functions */
void swap(void *v[], size_t a, size_t b) {
  void *tmp;
  tmp = v[a];
  v[a] = v[b];
  v[b] = tmp;
}


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

x86 assembly (clang, -O2):
<swap>:
mov    (%rdi,%rsi,8),%rax
mov    (%rdi,%rdx,8),%rcx
mov    %rcx,(%rdi,%rsi,8)
mov    %rax,(%rdi,%rdx,8)
ret

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

LLVM IR (-O2):
define void @swap(i8** nocapture %0, i64 %1, i64 %2) {
%4 = getelementptr inbounds i8*, i8** %0, i64 %1
%5 = load i8*, i8** %4
%6 = getelementptr inbounds i8*, i8** %0, i64 %2
%7 = load i8*, i8** %6
store i8* %7, i8** %4
store i8* %5, i8** %6
ret void
}
/* Variables and functions */
int /*<<< orphan*/ AAAA_CONTROL_LOOP_IMPL();
int /*<<< orphan*/ AAAA_TEMPERATURE_IMPL();
int /*<<< orphan*/ AIBV_plant_IMPL();
int main(int argc, char *argv[]) {
#pragma omp parallel sections
  {
#pragma omp section
    { AAAA_CONTROL_LOOP_IMPL(); }
#pragma omp section
    { AAAA_TEMPERATURE_IMPL(); }
#pragma omp section
    { AIBV_plant_IMPL(); }
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1050 <AAAA_CONTROL_LOOP_IMPL@plt>
mov    $0x0,%al
call   1040 <AAAA_TEMPERATURE_IMPL@plt>
mov    $0x0,%al
call   1030 <AIBV_plant_IMPL@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
store i32 %0, i32* %3
store i8** %1, i8*** %4
%5 = call i32 (...) @AAAA_CONTROL_LOOP_IMPL()
%6 = call i32 (...) @AAAA_TEMPERATURE_IMPL()
%7 = call i32 (...) @AIBV_plant_IMPL()
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @AAAA_CONTROL_LOOP_IMPL()
%4 = tail call i32 (...) @AAAA_TEMPERATURE_IMPL()
%5 = tail call i32 (...) @AIBV_plant_IMPL()
ret i32 0
}
/* Variables and functions */
double RAND_MAX;
scalar_t__ rand();
float bot_randf() { return ((float)rand()) / (RAND_MAX + 1.0); }


x86 assembly (clang, -O0):
<bot_randf>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <rand@plt>
cvtsi2ss %rax,%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xed4(%rip),%xmm1
mov    0x2eb5(%rip),%rax
addsd  (%rax),%xmm1
divsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<bot_randf>:
push   %rax
xor    %eax,%eax
call   1030 <rand@plt>
cvtsi2ss %rax,%xmm0
mov    0x2ec4(%rip),%rax
movsd  (%rax),%xmm1
addsd  0xed0(%rip),%xmm1
cvtss2sd %xmm0,%xmm0
divsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
pop    %rax
ret

LLVM IR (-O0):
@RAND_MAX = global double 0.000000e+00
define float @bot_randf() {
%1 = call i64 (...) @rand()
%2 = sitofp i64 %1 to float
%3 = fpext float %2 to double
%4 = load double, double* @RAND_MAX
%5 = fadd double %4, 1.000000e+00
%6 = fdiv double %3, %5
%7 = fptrunc double %6 to float
ret float %7
}

LLVM IR (-O2):
@RAND_MAX = global double 0.000000e+00
define float @bot_randf() {
%1 = tail call i64 (...) @rand()
%2 = sitofp i64 %1 to float
%3 = fpext float %2 to double
%4 = load double, double* @RAND_MAX
%5 = fadd double %4, 1.000000e+00
%6 = fdiv double %3, %5
%7 = fptrunc double %6 to float
ret float %7
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef scalar_t__ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ const *get_transport6(int /*<<< orphan*/ const *,
                                         scalar_t__);
const uint8_t *get_inner6(const uint8_t *b, uint32_t blen) {
  return get_transport6(b + 8, blen - 8);
}


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

x86 assembly (clang, -O2):
<get_inner6>:
add    $0x20,%rdi
add    $0xfffffffffffffff8,%rsi
jmp    1030 <get_transport6@plt>

LLVM IR (-O0):
define i32* @get_inner6(i32* %0, i64 %1) {
%3 = alloca i32*
%4 = alloca i64
store i32* %0, i32** %3
store i64 %1, i64* %4
%5 = load i32*, i32** %3
%6 = getelementptr inbounds i32, i32* %5, i64 8
%7 = load i64, i64* %4
%8 = sub nsw i64 %7, 8
%9 = call i32* @get_transport6(i32* %6, i64 %8)
ret i32* %9
}

LLVM IR (-O2):
define i32* @get_inner6(i32* %0, i64 %1) {
%3 = getelementptr inbounds i32, i32* %0, i64 8
%4 = add nsw i64 %1, -8
%5 = tail call i32* @get_transport6(i32* %3, i64 %4)
ret i32* %5
}
/* Type definitions */
typedef int int8_t;
typedef int /*<<< orphan*/ input;

/* Variables and functions */
int /*<<< orphan*/ test_rebase(int, int *, int, int, int *, int /*<<< orphan*/);
void test_first_base_is_negative(void) {
  int8_t input[] = {1};
  int8_t expected[] = {0};
  test_rebase(-2, input, (sizeof(input) / sizeof(input[0])), 10, expected, 0);
}


x86 assembly (clang, -O0):
<test_first_base_is_negative>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0xed2(%rip),%eax
mov    %eax,-0x4(%rbp)
lea    -0x8(%rbp),%rdi
xor    %esi,%esi
mov    $0x4,%edx
call   1030 <memset@plt>
lea    -0x4(%rbp),%rsi
lea    -0x8(%rbp),%r8
mov    $0xfffffffe,%edi
mov    $0x1,%edx
mov    $0xa,%ecx
xor    %r9d,%r9d
call   1040 <test_rebase@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_first_base_is_negative>:
push   %rax
movl   $0x1,0x4(%rsp)
movl   $0x0,(%rsp)
lea    0x4(%rsp),%rsi
mov    %rsp,%r8
mov    $0xfffffffe,%edi
mov    $0x1,%edx
mov    $0xa,%ecx
xor    %r9d,%r9d
call   1030 <test_rebase@plt>
pop    %rax
ret

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

LLVM IR (-O2):
define void @test_first_base_is_negative() {
%1 = alloca [1 x i32]
%2 = alloca [1 x i32]
%3 = bitcast [1 x i32]* %1 to i8*
%4 = getelementptr inbounds [1 x i32], [1 x i32]* %1, i64 0, i64 0
store i32 1, i32* %4
%5 = bitcast [1 x i32]* %2 to i8*
%6 = getelementptr inbounds [1 x i32], [1 x i32]* %2, i64 0, i64 0
store i32 0, i32* %6
%7 = call i32 @test_rebase(i32 -2, i32* %4, i32 1, i32 10, i32* %6, i32 0)
ret void
}
unsigned __int128 fun_zi128(unsigned __int128 a, unsigned __int128 b) {
  return a;
}


x86 assembly (clang, -O0):
<fun_zi128>:
push   %rbp
mov    %rsp,%rbp
mov    %rdx,%rax
mov    %rdi,-0x20(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x20(%rbp),%rdx
mov    -0x18(%rbp),%rsi
mov    %rax,-0x30(%rbp)
mov    %rcx,-0x28(%rbp)
mov    -0x30(%rbp),%rax
mov    -0x28(%rbp),%rcx
mov    %rsi,-0x38(%rbp)
mov    %rdx,-0x40(%rbp)
mov    %rcx,-0x48(%rbp)
mov    %rax,-0x50(%rbp)
mov    -0x40(%rbp),%rax
mov    -0x38(%rbp),%rcx
mov    %rcx,-0x8(%rbp)
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x8(%rbp),%rdx
pop    %rbp
ret

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

LLVM IR (-O0):
define { i64, i64 } @fun_zi128(i64 %0, i64 %1, i64 %2, i64 %3) {
%5 = alloca i128
%6 = alloca i128
%7 = alloca i128
%8 = alloca i128
%9 = alloca i128
%10 = bitcast i128* %6 to { i64, i64 }*
%11 = getelementptr inbounds { i64, i64 }, { i64, i64 }* %10, i32 0, i32 0
store i64 %0, i64* %11
%12 = getelementptr inbounds { i64, i64 }, { i64, i64 }* %10, i32 0, i32 1
store i64 %1, i64* %12
%13 = load i128, i128* %6
%14 = bitcast i128* %7 to { i64, i64 }*
%15 = getelementptr inbounds { i64, i64 }, { i64, i64 }* %14, i32 0, i32 0
store i64 %2, i64* %15
%16 = getelementptr inbounds { i64, i64 }, { i64, i64 }* %14, i32 0, i32 1
store i64 %3, i64* %16
%17 = load i128, i128* %7
store i128 %13, i128* %8
store i128 %17, i128* %9
%18 = load i128, i128* %8
store i128 %18, i128* %5
%19 = bitcast i128* %5 to { i64, i64 }*
%20 = load { i64, i64 }, { i64, i64 }* %19
ret { i64, i64 } %20
}

LLVM IR (-O2):
define { i64, i64 } @fun_zi128(i64 %0, i64 %1, i64 %2, i64 %3) {
%5 = insertvalue { i64, i64 } poison, i64 %0, 0
%6 = insertvalue { i64, i64 } %5, i64 %1, 1
ret { i64, i64 } %6
}
/* Variables and functions */
int /*<<< orphan*/ emit32(int);
int /*<<< orphan*/ emit8(int);
void elf_emit_main_exit() {
  emit8(0x89);
  emit8(0xc3);
  emit8(0xb8);
  emit32(0x1);
  emit8(0xcd);
  emit8(0x80);
}


x86 assembly (clang, -O0):
<elf_emit_main_exit>:
push   %rbp
mov    %rsp,%rbp
mov    $0x89,%edi
call   1030 <emit8@plt>
mov    $0xc3,%edi
call   1030 <emit8@plt>
mov    $0xb8,%edi
call   1030 <emit8@plt>
mov    $0x1,%edi
call   1040 <emit32@plt>
mov    $0xcd,%edi
call   1030 <emit8@plt>
mov    $0x80,%edi
call   1030 <emit8@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<elf_emit_main_exit>:
push   %rax
mov    $0x89,%edi
call   1030 <emit8@plt>
mov    $0xc3,%edi
call   1030 <emit8@plt>
mov    $0xb8,%edi
call   1030 <emit8@plt>
mov    $0x1,%edi
call   1040 <emit32@plt>
mov    $0xcd,%edi
call   1030 <emit8@plt>
mov    $0x80,%edi
pop    %rax
jmp    1030 <emit8@plt>

LLVM IR (-O0):
define void @elf_emit_main_exit() {
%1 = call i32 @emit8(i32 137)
%2 = call i32 @emit8(i32 195)
%3 = call i32 @emit8(i32 184)
%4 = call i32 @emit32(i32 1)
%5 = call i32 @emit8(i32 205)
%6 = call i32 @emit8(i32 128)
ret void
}

LLVM IR (-O2):
define void @elf_emit_main_exit() {
%1 = tail call i32 @emit8(i32 137)
%2 = tail call i32 @emit8(i32 195)
%3 = tail call i32 @emit8(i32 184)
%4 = tail call i32 @emit32(i32 1)
%5 = tail call i32 @emit8(i32 205)
%6 = tail call i32 @emit8(i32 128)
ret void
}