xunge/DecIR huggingface dataset:
indreg0reg1_set(r0, r1, x0, x1, p0, p1) float r0, r1;
float *p0, *p1;
{ (*p0) = r1; }


x86 assembly (clang, -O0):
<indreg0reg1_set>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm1,-0x30(%rbp)
movaps %xmm0,%xmm1
movsd  -0x30(%rbp),%xmm0
cvtsd2ss %xmm1,%xmm1
cvtsd2ss %xmm0,%xmm0
movss  %xmm1,-0x8(%rbp)
movss  %xmm0,-0xc(%rbp)
mov    %edi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    %rdx,-0x20(%rbp)
mov    %rcx,-0x28(%rbp)
movss  -0xc(%rbp),%xmm0
mov    -0x20(%rbp),%rax
movss  %xmm0,(%rax)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<indreg0reg1_set>:
cvtsd2ss %xmm1,%xmm0
movss  %xmm0,(%rdx)
ret

LLVM IR (-O0):
define i32 @indreg0reg1_set(double %0, double %1, i32 %2, i32 %3, float* %4, float* %5) {
%7 = alloca i32
%8 = alloca float
%9 = alloca float
%10 = alloca i32
%11 = alloca i32
%12 = alloca float*
%13 = alloca float*
%14 = fptrunc double %0 to float
%15 = fptrunc double %1 to float
store float %14, float* %8
store float %15, float* %9
store i32 %2, i32* %10
store i32 %3, i32* %11
store float* %4, float** %12
store float* %5, float** %13
%16 = load float, float* %9
%17 = load float*, float** %12
store float %16, float* %17
%18 = load i32, i32* %7
ret i32 %18
}

LLVM IR (-O2):
define i32 @indreg0reg1_set(double %0, double %1, i32 %2, i32 %3, float* nocapture writeonly %4, float* nocapture readnone %5) {
%7 = fptrunc double %1 to float
store float %7, float* %4
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ malloc(int);
int main(void) {
  int i;
  for (i = 0; i < 200; i++) {
    malloc(i);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0xc8,-0x8(%rbp)
jge    1149 <main+0x39>
mov    -0x8(%rbp),%edi
call   1030 <malloc@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1126 <main+0x16>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %ebx,%edi
call   1030 <malloc@plt>
add    $0x1,%ebx
cmp    $0xc8,%ebx
jne    1120 <main+0x10>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
br label %3
3: ; preds = %9, %0
%4 = load i32, i32* %2
%5 = icmp slt i32 %4, 200
br i1 %5, label %6, label %12
6: ; preds = %3
%7 = load i32, i32* %2
%8 = call i32 @malloc(i32 %7)
br label %9
9: ; preds = %6
%10 = load i32, i32* %2
%11 = add nsw i32 %10, 1
store i32 %11, i32* %2
br label %3
12: ; preds = %3
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
br label %1
1: ; preds = %0, %1
%2 = phi i32 [ 0, %0 ], [ %4, %1 ]
%3 = tail call i32 @malloc(i32 %2)
%4 = add nuw nsw i32 %2, 1
%5 = icmp eq i32 %4, 200
br i1 %5, label %6, label %1
6: ; preds = %1
ret i32 0
}
void pm_mpp_dbg_showall(unsigned int level) {}


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

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

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

LLVM IR (-O2):
define void @pm_mpp_dbg_showall(i32 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
main() { printf("hello, world!\n"); }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
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 = [15 x i8] c"hello, world!\0A\00"
define i32 @main() {
%1 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [14 x i8] c"hello, world!\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ local_bh_enable();
void __rcu_read_unlock_bh(void) { local_bh_enable(); }


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

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

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

LLVM IR (-O2):
define void @__rcu_read_unlock_bh() {
%1 = tail call i32 (...) @local_bh_enable()
ret void
}
void ff_hevc_put_hevc_uni_epel_hv32_10_avx2() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_uni_epel_hv32_10_avx2() {
ret void
}
int test4(int a, int *b) { return b[a]; }


x86 assembly (clang, -O0):
<test4>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x4(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test4>:
movslq %edi,%rax
mov    (%rsi,%rax,4),%eax
ret

LLVM IR (-O0):
define i32 @test4(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
%6 = load i32, i32* %3
%7 = sext i32 %6 to i64
%8 = getelementptr inbounds i32, i32* %5, i64 %7
%9 = load i32, i32* %8
ret i32 %9
}

LLVM IR (-O2):
define i32 @test4(i32 %0, i32* nocapture %1) {
%3 = sext i32 %0 to i64
%4 = getelementptr inbounds i32, i32* %1, i64 %3
%5 = load i32, i32* %4
ret i32 %5
}
/* Type definitions */
struct rt_rtmp_adapter {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ AsicForceWakeup(struct rt_rtmp_adapter *,
                                   int /*<<< orphan*/);
void RTMPHandleTwakeupInterrupt(struct rt_rtmp_adapter *pAd) {
  AsicForceWakeup(pAd, 0);
}


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

x86 assembly (clang, -O2):
<RTMPHandleTwakeupInterrupt>:
xor    %esi,%esi
jmp    1030 <AsicForceWakeup@plt>

LLVM IR (-O0):
%struct.rt_rtmp_adapter = type { i32 }
define void @RTMPHandleTwakeupInterrupt(%struct.rt_rtmp_adapter* %0) {
%2 = alloca %struct.rt_rtmp_adapter*
store %struct.rt_rtmp_adapter* %0, %struct.rt_rtmp_adapter** %2
%3 = load %struct.rt_rtmp_adapter*, %struct.rt_rtmp_adapter** %2
%4 = call i32 @AsicForceWakeup(%struct.rt_rtmp_adapter* %3, i32 0)
ret void
}

LLVM IR (-O2):
%struct.rt_rtmp_adapter = type { i32 }
define void @RTMPHandleTwakeupInterrupt(%struct.rt_rtmp_adapter* %0) {
%2 = tail call i32 @AsicForceWakeup(%struct.rt_rtmp_adapter* %0, i32 0)
ret void
}
float lerp(float a, float b, float f) { return (a * (1.0 - f)) + (b * f); }


x86 assembly (clang, -O0):
<lerp>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  %xmm2,-0xc(%rbp)
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movss  -0xc(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
movsd  0xed3(%rip),%xmm2
subsd  %xmm1,%xmm2
movss  -0x8(%rbp),%xmm1
mulss  -0xc(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<lerp>:
cvtss2sd %xmm0,%xmm0
cvtss2sd %xmm2,%xmm3
movsd  0xef0(%rip),%xmm4
subsd  %xmm3,%xmm4
mulsd  %xmm0,%xmm4
mulss  %xmm2,%xmm1
xorps  %xmm0,%xmm0
cvtss2sd %xmm1,%xmm0
addsd  %xmm4,%xmm0
cvtsd2ss %xmm0,%xmm0
ret

LLVM IR (-O0):
define float @lerp(float %0, float %1, float %2) {
%4 = alloca float
%5 = alloca float
%6 = alloca float
store float %0, float* %4
store float %1, float* %5
store float %2, float* %6
%7 = load float, float* %4
%8 = fpext float %7 to double
%9 = load float, float* %6
%10 = fpext float %9 to double
%11 = fsub double 1.000000e+00, %10
%12 = load float, float* %5
%13 = load float, float* %6
%14 = fmul float %12, %13
%15 = fpext float %14 to double
%16 = call double @llvm.fmuladd.f64(double %8, double %11, double %15)
%17 = fptrunc double %16 to float
ret float %17
}

LLVM IR (-O2):
define float @lerp(float %0, float %1, float %2) {
%4 = fpext float %0 to double
%5 = fpext float %2 to double
%6 = fsub double 1.000000e+00, %5
%7 = fmul float %1, %2
%8 = fpext float %7 to double
%9 = tail call double @llvm.fmuladd.f64(double %4, double %6, double %8)
%10 = fptrunc double %9 to float
ret float %10
}
unsigned int CharClass_IsUpper(char ch) {
  return (ch >= 'A') && (ch <= 'Z');
  __builtin_unreachable();
}


x86 assembly (clang, -O0):
<CharClass_IsUpper>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%ecx
xor    %eax,%eax
cmp    $0x41,%ecx
mov    %al,-0x2(%rbp)
jl     1129 <CharClass_IsUpper+0x29>
movsbl -0x1(%rbp),%eax
cmp    $0x5a,%eax
setle  %al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<CharClass_IsUpper>:
add    $0xbf,%dil
xor    %eax,%eax
cmp    $0x1a,%dil
setb   %al
ret

LLVM IR (-O0):
define i32 @CharClass_IsUpper(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = icmp sge i32 %4, 65
br i1 %5, label %6, label %10
6: ; preds = %1
%7 = load i8, i8* %2
%8 = sext i8 %7 to i32
%9 = icmp sle i32 %8, 90
br label %10
10: ; preds = %6, %1
%11 = phi i1 [ false, %1 ], [ %9, %6 ]
%12 = zext i1 %11 to i32
ret i32 %12
}

LLVM IR (-O2):
define i32 @CharClass_IsUpper(i8 signext %0) {
%2 = add i8 %0, -65
%3 = icmp ult i8 %2, 26
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int _ada_use_c2phc(int, int *, int *, double *);
int solve_linear_product_system(void) {
  int fail, *a, *b;
  double *c;
  fail = _ada_use_c2phc(114, a, b, c);
  return fail;
}


x86 assembly (clang, -O0):
<solve_linear_product_system>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    $0x72,%edi
call   1030 <_ada_use_c2phc@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<solve_linear_product_system>:
mov    $0x72,%edi
jmp    1030 <_ada_use_c2phc@plt>

LLVM IR (-O0):
define i32 @solve_linear_product_system() {
%1 = alloca i32
%2 = alloca i32*
%3 = alloca i32*
%4 = alloca double*
%5 = load i32*, i32** %2
%6 = load i32*, i32** %3
%7 = load double*, double** %4
%8 = call i32 @_ada_use_c2phc(i32 114, i32* %5, i32* %6, double* %7)
store i32 %8, i32* %1
%9 = load i32, i32* %1
ret i32 %9
}

LLVM IR (-O2):
define i32 @solve_linear_product_system() {
%1 = tail call i32 @_ada_use_c2phc(i32 114, i32* undef, i32* undef, double* undef)
ret i32 %1
}
int test_imm_D1int64_highword_reg(long long val) {
  return ((val >> 32) & (0xD1 << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_D1int64_highword_reg(i64 %0) {
%2 = and i64 %0, 897648164864
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  int same_screen;
};
typedef TYPE_1__ XKeyPressedEvent;

/* Variables and functions */
void set_XKeyPressedEvent_same_screen(void *_p, int _v) {
  ((XKeyPressedEvent *)_p)->same_screen = (int)_v;
}


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

x86 assembly (clang, -O2):
<set_XKeyPressedEvent_same_screen>:
mov    %esi,(%rdi)
ret

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

LLVM IR (-O2):
define void @set_XKeyPressedEvent_same_screen(i8* nocapture writeonly %0, i32 %1) {
%3 = bitcast i8* %0 to i32*
store i32 %1, i32* %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ put32(unsigned int);
int /*<<< orphan*/ put8(int);
void mov_reg32_preg64pimm32(int reg1, int reg2, unsigned int imm32) {
  put8(0x8B);
  put8(0x80 | (reg1 << 3) | reg2);
  put32(imm32);
}


x86 assembly (clang, -O0):
<mov_reg32_preg64pimm32>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    $0x8b,%edi
call   1030 <put8@plt>
mov    -0x4(%rbp),%edi
shl    $0x3,%edi
or     $0x80,%edi
or     -0x8(%rbp),%edi
call   1030 <put8@plt>
mov    -0xc(%rbp),%edi
call   1040 <put32@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mov_reg32_preg64pimm32>:
push   %rbp
push   %r14
push   %rbx
mov    %edx,%r14d
mov    %esi,%ebp
mov    %edi,%ebx
mov    $0x8b,%edi
call   1030 <put8@plt>
shl    $0x3,%ebx
or     %ebp,%ebx
or     $0x80,%ebx
mov    %ebx,%edi
call   1030 <put8@plt>
mov    %r14d,%edi
pop    %rbx
pop    %r14
pop    %rbp
jmp    1040 <put32@plt>

LLVM IR (-O0):
define void @mov_reg32_preg64pimm32(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 = call i32 @put8(i32 139)
%8 = load i32, i32* %4
%9 = shl i32 %8, 3
%10 = or i32 128, %9
%11 = load i32, i32* %5
%12 = or i32 %10, %11
%13 = call i32 @put8(i32 %12)
%14 = load i32, i32* %6
%15 = call i32 @put32(i32 %14)
ret void
}

LLVM IR (-O2):
define void @mov_reg32_preg64pimm32(i32 %0, i32 %1, i32 %2) {
%4 = tail call i32 @put8(i32 139)
%5 = shl i32 %0, 3
%6 = or i32 %5, %1
%7 = or i32 %6, 128
%8 = tail call i32 @put8(i32 %7)
%9 = tail call i32 @put32(i32 %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ log_err(int /*<<< orphan*/, char *, ...);
void log_errn_write(char *fname) {
  if (fname != NULL)
    log_err(0, "Could not write to %s", fname);
  else
    log_err(0, "Could not write output.");
}


x86 assembly (clang, -O0):
<log_errn_write>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1140 <log_errn_write+0x30>
mov    -0x8(%rbp),%rdx
xor    %edi,%edi
lea    0xecc(%rip),%rsi
mov    $0x0,%al
call   1030 <log_err@plt>
jmp    1150 <log_errn_write+0x40>
xor    %edi,%edi
lea    0xecd(%rip),%rsi
mov    $0x0,%al
call   1030 <log_err@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<log_errn_write>:
test   %rdi,%rdi
je     1128 <log_errn_write+0x18>
mov    %rdi,%rdx
lea    0xee1(%rip),%rsi
xor    %edi,%edi
xor    %eax,%eax
jmp    1030 <log_err@plt>
lea    0xee7(%rip),%rsi
xor    %edi,%edi
xor    %eax,%eax
jmp    1030 <log_err@plt>

LLVM IR (-O0):
@.str = [22 x i8] c"Could not write to %s\00"
@.str.1 = [24 x i8] c"Could not write output.\00"
define void @log_errn_write(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = icmp ne i8* %3, null
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i8*, i8** %2
%7 = call i32 (i32, i8*, ...) @log_err(i32 0, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i8* %6)
br label %10
8: ; preds = %1
%9 = call i32 (i32, i8*, ...) @log_err(i32 0, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.1, i64 0, i64 0))
br label %10
10: ; preds = %8, %5
ret void
}

LLVM IR (-O2):
@.str = [22 x i8] c"Could not write to %s\00"
@.str.1 = [24 x i8] c"Could not write output.\00"
define void @log_errn_write(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 (i32, i8*, ...) @log_err(i32 0, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i8* %0)
br label %7
5: ; preds = %1
%6 = tail call i32 (i32, i8*, ...) @log_err(i32 0, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.1, i64 0, i64 0))
br label %7
7: ; preds = %5, %3
ret void
}
void pmu_set_clk_init() {}


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

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

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

LLVM IR (-O2):
define void @pmu_set_clk_init() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ uart_can_tx_byte();
void uart_wait_to_tx_byte(void) {
  while (!uart_can_tx_byte())
    ;
}


x86 assembly (clang, -O0):
<uart_wait_to_tx_byte>:
push   %rbp
mov    %rsp,%rbp
jmp    1119 <uart_wait_to_tx_byte+0x9>
mov    $0x0,%al
call   1030 <uart_can_tx_byte@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
test   $0x1,%al
jne    1135 <uart_wait_to_tx_byte+0x25>
jmp    113a <uart_wait_to_tx_byte+0x2a>
jmp    1119 <uart_wait_to_tx_byte+0x9>
pop    %rbp
ret

x86 assembly (clang, -O2):
<uart_wait_to_tx_byte>:
push   %rax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1030 <uart_can_tx_byte@plt>
test   %eax,%eax
je     1120 <uart_wait_to_tx_byte+0x10>
pop    %rax
ret

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

LLVM IR (-O2):
define void @uart_wait_to_tx_byte() {
br label %1
1: ; preds = %1, %0
%2 = tail call i32 (...) @uart_can_tx_byte()
%3 = icmp eq i32 %2, 0
br i1 %3, label %1, label %4
4: ; preds = %1
ret void
}
int rl_delete_signal(const char *signal_name) { return 7; }


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

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

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

LLVM IR (-O2):
define i32 @rl_delete_signal(i8* nocapture readnone %0) {
ret i32 7
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
struct idhash_h256 {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ sha3_256(int /*<<< orphan*/ *, int,
                            int /*<<< orphan*/ const *, size_t const);
void SHA3_256(struct idhash_h256 const *ret, uint8_t const *data,
              size_t const size) {
  sha3_256((uint8_t *)ret, 32, data, size);
}


x86 assembly (clang, -O0):
<SHA3_256>:
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),%rdx
mov    -0x18(%rbp),%rcx
mov    $0x20,%esi
call   1030 <sha3_256@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<SHA3_256>:
mov    %rdx,%rcx
mov    %rsi,%rdx
mov    $0x20,%esi
jmp    1030 <sha3_256@plt>

LLVM IR (-O0):
%struct.idhash_h256 = type { i32 }
define void @SHA3_256(%struct.idhash_h256* %0, i32* %1, i64 %2) {
%4 = alloca %struct.idhash_h256*
%5 = alloca i32*
%6 = alloca i64
store %struct.idhash_h256* %0, %struct.idhash_h256** %4
store i32* %1, i32** %5
store i64 %2, i64* %6
%7 = load %struct.idhash_h256*, %struct.idhash_h256** %4
%8 = bitcast %struct.idhash_h256* %7 to i32*
%9 = load i32*, i32** %5
%10 = load i64, i64* %6
%11 = call i32 @sha3_256(i32* %8, i32 32, i32* %9, i64 %10)
ret void
}

LLVM IR (-O2):
%struct.idhash_h256 = type { i32 }
define void @SHA3_256(%struct.idhash_h256* %0, i32* %1, i64 %2) {
%4 = getelementptr %struct.idhash_h256, %struct.idhash_h256* %0, i64 0, i32 0
%5 = tail call i32 @sha3_256(i32* %4, i32 32, i32* %1, i64 %2)
ret void
}
int is_comment(char *line) {
  if (line[0] == '#')
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<is_comment>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x23,%eax
jne    1124 <is_comment+0x24>
movl   $0x1,-0x4(%rbp)
jmp    112b <is_comment+0x2b>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_comment>:
xor    %eax,%eax
cmpb   $0x23,(%rdi)
sete   %al
ret

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

LLVM IR (-O2):
define i32 @is_comment(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 35
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
scalar_t__ ps_ldrexw(unsigned long volatile *);
unsigned int ps_strexw(unsigned long, unsigned long volatile *);
int ps_faa(unsigned long *var, long value) {
  unsigned int res;
  long oldval;
  do {
    oldval = (int)ps_ldrexw((volatile unsigned long *)var);
    res = ps_strexw((unsigned long)(oldval + value),
                    (volatile unsigned long *)var);
  } while (res);
  return oldval;
}


x86 assembly (clang, -O0):
<ps_faa>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <ps_ldrexw@plt>
cltq
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rdi
add    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1030 <ps_strexw@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
jne    1130 <ps_faa+0x10>
mov    -0x20(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ps_faa>:
push   %r15
push   %r14
push   %rbx
mov    %rsi,%r14
mov    %rdi,%r15
nopl   0x0(%rax,%rax,1)
mov    %r15,%rdi
call   1040 <ps_ldrexw@plt>
mov    %rax,%rbx
movslq %ebx,%rdi
add    %r14,%rdi
mov    %r15,%rsi
call   1030 <ps_strexw@plt>
test   %eax,%eax
jne    1130 <ps_faa+0x10>
mov    %ebx,%eax
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define i32 @ps_faa(i64* %0, i64 %1) {
br label %3
3: ; preds = %3, %2
%4 = tail call i64 @ps_ldrexw(i64* %0)
%5 = shl i64 %4, 32
%6 = ashr exact i64 %5, 32
%7 = add nsw i64 %6, %1
%8 = tail call i32 @ps_strexw(i64 %7, i64* %0)
%9 = icmp eq i32 %8, 0
br i1 %9, label %10, label %3
10: ; preds = %3
%11 = trunc i64 %4 to i32
ret i32 %11
}
/* Variables and functions */
scalar_t__ malloc(unsigned int);
int /*<<< orphan*/ show_error(char *);
double *vector(int nl, int nh) {
  double *v;
  v = (double *)malloc((unsigned)(nh - nl + 1) * sizeof(double));
  if (!v)
    show_error("allocation failure in vector()");
  return v - nl;
}


x86 assembly (clang, -O0):
<vector>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
sub    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,%eax
shl    $0x3,%rax
mov    %eax,%edi
call   1030 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    115f <vector+0x3f>
lea    0xea6(%rip),%rdi
call   1040 <show_error@plt>
mov    -0x10(%rbp),%rax
movslq -0x4(%rbp),%rdx
xor    %ecx,%ecx
sub    %rdx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<vector>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebp
sub    %edi,%esi
lea    0x8(,%rsi,8),%edi
call   1030 <malloc@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    1147 <vector+0x27>
lea    0xebe(%rip),%rdi
call   1040 <show_error@plt>
movslq %ebp,%rax
shl    $0x3,%rax
sub    %rax,%rbx
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [31 x i8] c"allocation failure in vector()\00"
define double* @vector(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca double*
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = load i32, i32* %4
%7 = load i32, i32* %3
%8 = sub nsw i32 %6, %7
%9 = add nsw i32 %8, 1
%10 = zext i32 %9 to i64
%11 = mul i64 %10, 8
%12 = trunc i64 %11 to i32
%13 = call i64 @malloc(i32 %12)
%14 = inttoptr i64 %13 to double*
store double* %14, double** %5
%15 = load double*, double** %5
%16 = icmp ne double* %15, null
br i1 %16, label %19, label %17
17: ; preds = %2
%18 = call i32 @show_error(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0))
br label %19
19: ; preds = %17, %2
%20 = load double*, double** %5
%21 = load i32, i32* %3
%22 = sext i32 %21 to i64
%23 = sub i64 0, %22
%24 = getelementptr inbounds double, double* %20, i64 %23
ret double* %24
}

LLVM IR (-O2):
@.str = [31 x i8] c"allocation failure in vector()\00"
define double* @vector(i32 %0, i32 %1) {
%3 = sub nsw i32 %1, %0
%4 = shl i32 %3, 3
%5 = add i32 %4, 8
%6 = tail call i64 @malloc(i32 %5)
%7 = icmp eq i64 %6, 0
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = tail call i32 @show_error(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0))
br label %10
10: ; preds = %8, %2
%11 = inttoptr i64 %6 to double*
%12 = sext i32 %0 to i64
%13 = sub nsw i64 0, %12
%14 = getelementptr inbounds double, double* %11, i64 %13
ret double* %14
}
double quadraticEaseOutd(double p) { return -(p * (p - 2)); }


x86 assembly (clang, -O0):
<quadraticEaseOutd>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x8(%rbp),%xmm1
movsd  0xee5(%rip),%xmm2
subsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<quadraticEaseOutd>:
movsd  0xef8(%rip),%xmm1
addsd  %xmm0,%xmm1
xorpd  0xefc(%rip),%xmm1
mulsd  %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @quadraticEaseOutd(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = load double, double* %2
%5 = fsub double %4, 2.000000e+00
%6 = fmul double %3, %5
%7 = fneg double %6
ret double %7
}

LLVM IR (-O2):
define double @quadraticEaseOutd(double %0) {
%2 = fadd double %0, -2.000000e+00
%3 = fneg double %2
%4 = fmul double %3, %0
ret double %4
}
/* Variables and functions */
int /*<<< orphan*/ display_message();
int /*<<< orphan*/ set_message(char *);
void gui_set_message(char *message) {
  set_message(message);
  display_message();
}


x86 assembly (clang, -O0):
<gui_set_message>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <set_message@plt>
mov    $0x0,%al
call   1030 <display_message@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define void @gui_set_message(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @set_message(i8* %3)
%5 = call i32 (...) @display_message()
ret void
}

LLVM IR (-O2):
define void @gui_set_message(i8* %0) {
%2 = tail call i32 @set_message(i8* %0)
%3 = tail call i32 (...) @display_message()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void print(int val) { printf("\t%d\n", val); }


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

x86 assembly (clang, -O2):
<print>:
mov    %edi,%esi
lea    0xee7(%rip),%rdi
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [5 x i8] c"\09%d\0A\00"
define void @print(i32 %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %0)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int uint32_t;
typedef int /*<<< orphan*/ tmp;
typedef int /*<<< orphan*/ int16_t;

/* Variables and functions */
int /*<<< orphan*/ ivory_serialize_pack_prim_2_be(int /*<<< orphan*/ *,
                                                  int /*<<< orphan*/ *);
int /*<<< orphan*/ memcpy(int /*<<< orphan*/ **, int /*<<< orphan*/ const *,
                          int);
void ivory_serialize_pack_int16_be(uint8_t *dst, uint32_t offs,
                                   const int16_t *src) {
  uint8_t tmp[2] = {0};
  memcpy(&tmp, src, sizeof(tmp));
  ivory_serialize_pack_prim_2_be(dst + offs, tmp);
}


x86 assembly (clang, -O0):
<ivory_serialize_pack_int16_be>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
lea    -0x20(%rbp),%rdi
xor    %esi,%esi
mov    $0x8,%edx
call   1030 <memset@plt>
lea    -0x20(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    $0x8,%edx
call   1040 <memcpy@plt>
mov    -0x8(%rbp),%rdi
movslq -0xc(%rbp),%rax
shl    $0x2,%rax
add    %rax,%rdi
lea    -0x20(%rbp),%rsi
call   1050 <ivory_serialize_pack_prim_2_be@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ivory_serialize_pack_int16_be>:
push   %r15
push   %r14
push   %rbx
sub    $0x10,%rsp
mov    %esi,%ebx
mov    %rdi,%r14
movq   $0x0,0x8(%rsp)
lea    0x8(%rsp),%r15
mov    %r15,%rdi
mov    %rdx,%rsi
mov    $0x8,%edx
call   1030 <memcpy@plt>
movslq %ebx,%rax
lea    (%r14,%rax,4),%rdi
mov    %r15,%rsi
call   1040 <ivory_serialize_pack_prim_2_be@plt>
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define void @ivory_serialize_pack_int16_be(i32* %0, i32 %1, i32* %2) {
%4 = alloca i32*
%5 = alloca i32
%6 = alloca i32*
%7 = alloca [2 x i32]
store i32* %0, i32** %4
store i32 %1, i32* %5
store i32* %2, i32** %6
%8 = bitcast [2 x i32]* %7 to i8*
%9 = bitcast [2 x i32]* %7 to i32**
%10 = load i32*, i32** %6
%11 = call i32 @memcpy(i32** %9, i32* %10, i32 8)
%12 = load i32*, i32** %4
%13 = load i32, i32* %5
%14 = sext i32 %13 to i64
%15 = getelementptr inbounds i32, i32* %12, i64 %14
%16 = getelementptr inbounds [2 x i32], [2 x i32]* %7, i64 0, i64 0
%17 = call i32 @ivory_serialize_pack_prim_2_be(i32* %15, i32* %16)
ret void
}

LLVM IR (-O2):
define void @ivory_serialize_pack_int16_be(i32* %0, i32 %1, i32* %2) {
%4 = alloca i64
%5 = bitcast i64* %4 to i8*
store i64 0, i64* %4
%6 = bitcast i64* %4 to i32**
%7 = call i32 @memcpy(i32** %6, i32* %2, i32 8)
%8 = sext i32 %1 to i64
%9 = getelementptr inbounds i32, i32* %0, i64 %8
%10 = bitcast i64* %4 to i32*
%11 = call i32 @ivory_serialize_pack_prim_2_be(i32* %9, i32* %10)
ret void
}
void av_opt_get_pixel_fmt() {}


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

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

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

LLVM IR (-O2):
define void @av_opt_get_pixel_fmt() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ error(char const *);
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ write_err(char *);
void usage(const char *msg) {
  if (msg)
    error(msg);
  write_err("Usage: sysloglread [-g GID] [-u UID] [-U] [-m MASK] PATH ...\n");
  exit(1);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1150 <usage+0x20>
mov    -0x8(%rbp),%rdi
call   1030 <error@plt>
lea    0xea9(%rip),%rdi
call   1050 <write_err@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rax
test   %rdi,%rdi
je     113b <usage+0xb>
call   1030 <error@plt>
lea    0xebe(%rip),%rdi
call   1050 <write_err@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [62 x i8] c"Usage: sysloglread [-g GID] [-u UID] [-U] [-m MASK] PATH ...\0A\00"
define void @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = icmp ne i8* %3, null
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i8*, i8** %2
%7 = call i32 @error(i8* %6)
br label %8
8: ; preds = %5, %1
%9 = call i32 @write_err(i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str, i64 0, i64 0))
%10 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@.str = [62 x i8] c"Usage: sysloglread [-g GID] [-u UID] [-U] [-m MASK] PATH ...\0A\00"
define void @usage(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 @error(i8* %0)
br label %5
5: ; preds = %3, %1
%6 = tail call i32 @write_err(i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str, i64 0, i64 0))
%7 = tail call i32 @exit(i32 1)
unreachable
}
int rightIntY(int currentY, int currentDir) {
  if (currentDir == 1)
    return currentY + 1;
  else if (currentDir == 3)
    return currentY - 1;
  else
    return currentY;
}


x86 assembly (clang, -O0):
<rightIntY>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpl   $0x1,-0xc(%rbp)
jne    1122 <rightIntY+0x22>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    1140 <rightIntY+0x40>
cmpl   $0x3,-0xc(%rbp)
jne    113a <rightIntY+0x3a>
mov    -0x8(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    1140 <rightIntY+0x40>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<rightIntY>:
mov    %edi,%eax
cmp    $0x3,%esi
je     1110 <rightIntY+0x10>
cmp    $0x1,%esi
jne    1113 <rightIntY+0x13>
add    $0x1,%eax
ret
add    $0xffffffff,%eax
ret

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

LLVM IR (-O2):
define i32 @rightIntY(i32 %0, i32 %1) {
switch i32 %1, label %7 [
i32 1, label %3
i32 3, label %5
]
3: ; preds = %2
%4 = add nsw i32 %0, 1
br label %7
5: ; preds = %2
%6 = add nsw i32 %0, -1
br label %7
7: ; preds = %2, %5, %3
%8 = phi i32 [ %4, %3 ], [ %6, %5 ], [ %0, %2 ]
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ U_WMRNOTIMPLEMENTED_swap(char *, int);
void U_WMR9A_swap(char *record, int torev) {
  U_WMRNOTIMPLEMENTED_swap(record, torev);
}


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

x86 assembly (clang, -O2):
<U_WMR9A_swap>:
jmp    1030 <U_WMRNOTIMPLEMENTED_swap@plt>

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

LLVM IR (-O2):
define void @U_WMR9A_swap(i8* %0, i32 %1) {
%3 = tail call i32 @U_WMRNOTIMPLEMENTED_swap(i8* %0, i32 %1)
ret void
}
void rop3_179_0_0(unsigned char *D, unsigned char S, unsigned char T) {
  unsigned char stk1;
  unsigned char stk2;
  stk2 = *D & T;
  stk2 = ~stk2;
  stk1 = S & stk2;
  stk1 = ~stk1;
  *D = stk1;
}


x86 assembly (clang, -O0):
<rop3_179_0_0>:
push   %rbp
mov    %rsp,%rbp
mov    %dl,%al
mov    %sil,%cl
mov    %rdi,-0x8(%rbp)
mov    %cl,-0x9(%rbp)
mov    %al,-0xa(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
movzbl -0xa(%rbp),%ecx
and    %ecx,%eax
mov    %al,-0xc(%rbp)
movzbl -0xc(%rbp),%eax
xor    $0xffffffff,%eax
mov    %al,-0xc(%rbp)
movzbl -0x9(%rbp),%eax
movzbl -0xc(%rbp),%ecx
and    %ecx,%eax
mov    %al,-0xb(%rbp)
movzbl -0xb(%rbp),%eax
xor    $0xffffffff,%eax
mov    %al,-0xb(%rbp)
mov    -0xb(%rbp),%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<rop3_179_0_0>:
and    (%rdi),%dl
not    %sil
or     %dl,%sil
mov    %sil,(%rdi)
ret

LLVM IR (-O0):
define void @rop3_179_0_0(i8* %0, i8 zeroext %1, i8 zeroext %2) {
%4 = alloca i8*
%5 = alloca i8
%6 = alloca i8
%7 = alloca i8
%8 = alloca i8
store i8* %0, i8** %4
store i8 %1, i8* %5
store i8 %2, i8* %6
%9 = load i8*, i8** %4
%10 = load i8, i8* %9
%11 = zext i8 %10 to i32
%12 = load i8, i8* %6
%13 = zext i8 %12 to i32
%14 = and i32 %11, %13
%15 = trunc i32 %14 to i8
store i8 %15, i8* %8
%16 = load i8, i8* %8
%17 = zext i8 %16 to i32
%18 = xor i32 %17, -1
%19 = trunc i32 %18 to i8
store i8 %19, i8* %8
%20 = load i8, i8* %5
%21 = zext i8 %20 to i32
%22 = load i8, i8* %8
%23 = zext i8 %22 to i32
%24 = and i32 %21, %23
%25 = trunc i32 %24 to i8
store i8 %25, i8* %7
%26 = load i8, i8* %7
%27 = zext i8 %26 to i32
%28 = xor i32 %27, -1
%29 = trunc i32 %28 to i8
store i8 %29, i8* %7
%30 = load i8, i8* %7
%31 = load i8*, i8** %4
store i8 %30, i8* %31
ret void
}

LLVM IR (-O2):
define void @rop3_179_0_0(i8* nocapture %0, i8 zeroext %1, i8 zeroext %2) {
%4 = load i8, i8* %0
%5 = and i8 %4, %2
%6 = xor i8 %1, -1
%7 = or i8 %5, %6
store i8 %7, i8* %0
ret void
}
/* Variables and functions */
int /*<<< orphan*/ func_0();
int main(void) {
  int var_main = -1;
  func_0();
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @func_0()
ret i32 0
}
int pointer_subtraction() {
  char a[10];
  char b[10];
  return b - a;
}


x86 assembly (clang, -O0):
<pointer_subtraction>:
push   %rbp
mov    %rsp,%rbp
lea    -0x14(%rbp),%rax
lea    -0xa(%rbp),%rcx
sub    %rcx,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<pointer_subtraction>:
lea    -0xa(%rsp),%rcx
lea    -0x14(%rsp),%rax
sub    %ecx,%eax
ret

LLVM IR (-O0):
define i32 @pointer_subtraction() {
%1 = alloca [10 x i8]
%2 = alloca [10 x i8]
%3 = getelementptr inbounds [10 x i8], [10 x i8]* %2, i64 0, i64 0
%4 = getelementptr inbounds [10 x i8], [10 x i8]* %1, i64 0, i64 0
%5 = ptrtoint i8* %3 to i64
%6 = ptrtoint i8* %4 to i64
%7 = sub i64 %5, %6
%8 = trunc i64 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
define i32 @pointer_subtraction() {
%1 = alloca [10 x i8]
%2 = alloca [10 x i8]
%3 = getelementptr inbounds [10 x i8], [10 x i8]* %1, i64 0, i64 0
%4 = getelementptr inbounds [10 x i8], [10 x i8]* %2, i64 0, i64 0
%5 = ptrtoint [10 x i8]* %2 to i64
%6 = ptrtoint [10 x i8]* %1 to i64
%7 = sub i64 %5, %6
%8 = trunc i64 %7 to i32
ret i32 %8
}
double rate_He(t)
double t;
{
  if (t == 0.0) {
    return 0.0;
  }
  return 9.38e-22 * sqrt(t) * exp(-285335.4 / t) / (1.0 + sqrt(t / 1e5));
}


x86 assembly (clang, -O0):
<rate_He>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    1152 <rate_He+0x32>
jp     1152 <rate_He+0x32>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    11c6 <rate_He+0xa6>
movsd  -0x10(%rbp),%xmm0
call   1040 <sqrt@plt>
movaps %xmm0,%xmm1
movsd  0xeb1(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  0xe98(%rip),%xmm0
divsd  -0x10(%rbp),%xmm0
call   1030 <exp@plt>
movaps %xmm0,%xmm1
movsd  -0x20(%rbp),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  0xe68(%rip),%xmm1
divsd  %xmm1,%xmm0
call   1040 <sqrt@plt>
movaps %xmm0,%xmm2
movsd  -0x18(%rbp),%xmm0
movsd  0xe47(%rip),%xmm1
addsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rate_He>:
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    1131 <rate_He+0x11>
jp     1131 <rate_He+0x11>
movapd %xmm1,%xmm0
ret
sub    $0x18,%rsp
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
movsd  %xmm0,0x8(%rsp)
jb     114b <rate_He+0x2b>
sqrtsd %xmm0,%xmm0
jmp    1150 <rate_He+0x30>
call   1040 <sqrt@plt>
mulsd  0xea8(%rip),%xmm0
movsd  %xmm0,0x10(%rsp)
movsd  0xea2(%rip),%xmm0
divsd  0x8(%rsp),%xmm0
call   1030 <exp@plt>
movapd %xmm0,%xmm1
movsd  0x8(%rsp),%xmm0
mulsd  0x10(%rsp),%xmm1
divsd  0xe87(%rip),%xmm0
ucomisd 0xe8f(%rip),%xmm0
jb     1199 <rate_He+0x79>
sqrtsd %xmm0,%xmm0
jmp    11aa <rate_He+0x8a>
movsd  %xmm1,0x8(%rsp)
call   1040 <sqrt@plt>
movsd  0x8(%rsp),%xmm1
addsd  0xe66(%rip),%xmm0
divsd  %xmm0,%xmm1
add    $0x18,%rsp
movapd %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @rate_He(double %0) {
%2 = alloca double
%3 = alloca double
store double %0, double* %3
%4 = load double, double* %3
%5 = fcmp oeq double %4, 0.000000e+00
br i1 %5, label %6, label %7
6: ; preds = %1
store double 0.000000e+00, double* %2
br label %20
7: ; preds = %1
%8 = load double, double* %3
%9 = call double @sqrt(double %8)
%10 = fmul double 0x3B91B7E3C1C0E6AC, %9
%11 = load double, double* %3
%12 = fdiv double 0xC1116A5D9999999A, %11
%13 = call double @exp(double %12)
%14 = fmul double %10, %13
%15 = load double, double* %3
%16 = fdiv double %15, 1.000000e+05
%17 = call double @sqrt(double %16)
%18 = fadd double 1.000000e+00, %17
%19 = fdiv double %14, %18
store double %19, double* %2
br label %20
20: ; preds = %7, %6
%21 = load double, double* %2
ret double %21
}

LLVM IR (-O2):
define double @rate_He(double %0) {
%2 = fcmp oeq double %0, 0.000000e+00
br i1 %2, label %13, label %3
3: ; preds = %1
%4 = tail call double @sqrt(double %0)
%5 = fmul double %4, 0x3B91B7E3C1C0E6AC
%6 = fdiv double 0xC1116A5D9999999A, %0
%7 = tail call double @exp(double %6)
%8 = fmul double %5, %7
%9 = fdiv double %0, 1.000000e+05
%10 = tail call double @sqrt(double %9)
%11 = fadd double %10, 1.000000e+00
%12 = fdiv double %8, %11
br label %13
13: ; preds = %1, %3
%14 = phi double [ %12, %3 ], [ 0.000000e+00, %1 ]
ret double %14
}
void XCirculateSubwindowsUp() {}


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

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

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

LLVM IR (-O2):
define void @XCirculateSubwindowsUp() {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ a;

/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main() {
  char a[] = {'1', '2', '3', '4'};
  int len;
  { len = (sizeof(a) / sizeof(a[0])); };
  printf("%d\n", len);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xedb(%rip),%eax
mov    %eax,-0x8(%rbp)
movl   $0x4,-0xc(%rbp)
mov    -0xc(%rbp),%esi
lea    0xecb(%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
mov    $0x4,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 4)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ cpuinfo_destroy(void *);
char *cpuinfo_get_option(void *);
void *cpuinfo_init(char *);
int /*<<< orphan*/ printf(char *, char *);
int main(void) {
  void *ptr = cpuinfo_init("model name");
  char *temp = cpuinfo_get_option(ptr);
  printf("%s\n", temp);
  cpuinfo_destroy(ptr);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xeb1(%rip),%rdi
call   1030 <cpuinfo_init@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1060 <cpuinfo_get_option@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rsi
lea    0xe9b(%rip),%rdi
call   1040 <printf@plt>
mov    -0x8(%rbp),%rdi
call   1050 <cpuinfo_destroy@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xeb8(%rip),%rdi
call   1030 <cpuinfo_init@plt>
mov    %rax,%rbx
mov    %rax,%rdi
call   1060 <cpuinfo_get_option@plt>
lea    0xeac(%rip),%rdi
mov    %rax,%rsi
call   1040 <printf@plt>
mov    %rbx,%rdi
call   1050 <cpuinfo_destroy@plt>
xor    %eax,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [11 x i8] c"model name\00"
@.str.1 = [4 x i8] c"%s\0A\00"
define i32 @main() {
%1 = tail call i8* @cpuinfo_init(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
%2 = tail call i8* @cpuinfo_get_option(i8* %1)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %2)
%4 = tail call i32 @cpuinfo_destroy(i8* %1)
ret i32 0
}
void odph_pause(void) { __asm__ __volatile__("pause"); }


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

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

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

LLVM IR (-O2):
define void @odph_pause() {
tail call void asm sideeffect "pause", "~{dirflag},~{fpsr},~{flags}"()
ret void
}