xunge/DecIR huggingface dataset:
/* Variables and functions */
float cblas_scnrm2(int const, void const *, int const);
void acc_scnrm2_(const int *N, const void *X, const int *incX, float *result) {
  *result = cblas_scnrm2(*N, X, *incX);
}


x86 assembly (clang, -O0):
<acc_scnrm2_>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rax
mov    (%rax),%edx
call   1030 <cblas_scnrm2@plt>
mov    -0x20(%rbp),%rax
movss  %xmm0,(%rax)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<acc_scnrm2_>:
push   %rbx
mov    %rcx,%rbx
mov    (%rdi),%edi
mov    (%rdx),%edx
call   1030 <cblas_scnrm2@plt>
movss  %xmm0,(%rbx)
pop    %rbx
ret

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

LLVM IR (-O2):
define void @acc_scnrm2_(i32* nocapture %0, i8* %1, i32* nocapture %2, float* nocapture writeonly %3) {
%5 = load i32, i32* %0
%6 = load i32, i32* %2
%7 = tail call float @cblas_scnrm2(i32 %5, i8* %1, i32 %6)
store float %7, float* %3
ret void
}
/* Variables and functions */
int add(int, int);
int /*<<< orphan*/ printf(char *, int, int, int);
int main() {
  int a, b;
  a = 10;
  b = 15;
  int c = add(a, b);
  printf("add(%d,%d)=%d \n", a, b, c);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0xa,-0x8(%rbp)
movl   $0xf,-0xc(%rbp)
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
call   1030 <add@plt>
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
mov    -0x10(%rbp),%ecx
lea    0xea5(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0xa,%edi
mov    $0xf,%esi
call   1030 <add@plt>
lea    0xec9(%rip),%rdi
mov    $0xa,%esi
mov    $0xf,%edx
mov    %eax,%ecx
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [16 x i8] c"add(%d,%d)=%d \0A\00"
define i32 @main() {
%1 = tail call i32 @add(i32 10, i32 15)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i32 10, i32 15, i32 %1)
ret i32 0
}
int test_imm_6Fuint16_reg(unsigned short val) {
  return ((val) & (-0x6F << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_6Fuint16_reg(i16 zeroext %0) {
%2 = and i16 %0, -111
%3 = icmp eq i16 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Type definitions */
typedef int wint_t;

/* Variables and functions */
int iswascii(wint_t wc) { return ((wc & ~0x7F) == 0); }


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

x86 assembly (clang, -O2):
<iswascii>:
xor    %eax,%eax
cmp    $0x80,%edi
setb   %al
ret

LLVM IR (-O0):
define i32 @iswascii(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = and i32 %3, -128
%5 = icmp eq i32 %4, 0
%6 = zext i1 %5 to i32
ret i32 %6
}

LLVM IR (-O2):
define i32 @iswascii(i32 %0) {
%2 = icmp ult i32 %0, 128
%3 = zext i1 %2 to i32
ret i32 %3
}
/* Variables and functions */
int xnor(int, int);
int iff(int a, int b) { return xnor(a, b); }


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

x86 assembly (clang, -O2):
<iff>:
jmp    1030 <xnor@plt>

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

LLVM IR (-O2):
define i32 @iff(i32 %0, i32 %1) {
%3 = tail call i32 @xnor(i32 %0, i32 %1)
ret i32 %3
}
double quadToTriJac(double xi, double eta) { return 0.125e0 * (1.0e0 - eta); }


x86 assembly (clang, -O0):
<quadToTriJac>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  0xef2(%rip),%xmm1
subsd  -0x10(%rbp),%xmm1
movsd  0xedd(%rip),%xmm0
mulsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<quadToTriJac>:
movsd  0xef8(%rip),%xmm0
subsd  %xmm1,%xmm0
mulsd  0xef4(%rip),%xmm0
ret

LLVM IR (-O0):
define double @quadToTriJac(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = load double, double* %4
%6 = fsub double 1.000000e+00, %5
%7 = fmul double 1.250000e-01, %6
ret double %7
}

LLVM IR (-O2):
define double @quadToTriJac(double %0, double %1) {
%3 = fsub double 1.000000e+00, %1
%4 = fmul double %3, 1.250000e-01
ret double %4
}
/* Variables and functions */
int /*<<< orphan*/ outstr(char *);
col() { outstr("=.\n"); }


x86 assembly (clang, -O0):
<col>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xee1(%rip),%rdi
call   1030 <outstr@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [4 x i8] c"=.\0A\00"
define i32 @col() {
%1 = alloca i32
%2 = call i32 @outstr(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
@.str = [4 x i8] c"=.\0A\00"
define i32 @col() {
%1 = tail call i32 @outstr(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ test_selfDefined_systemCall(int, char **);
int main(int argc, char **argv) {
  test_selfDefined_systemCall(argc, argv);
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** %1) {
%3 = tail call i32 @test_selfDefined_systemCall(i32 %0, i8** %1)
ret i32 0
}
void bar(void) { int c[2000]; }


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

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

LLVM IR (-O0):
define void @bar() {
%1 = alloca [2000 x i32]
ret void
}

LLVM IR (-O2):
define void @bar() {
ret void
}
unsigned char read_u8(const unsigned char *b) { return *(unsigned char *)(b); }


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

x86 assembly (clang, -O2):
<read_u8>:
mov    (%rdi),%al
ret

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

LLVM IR (-O2):
define zeroext i8 @read_u8(i8* nocapture %0) {
%2 = load i8, i8* %0
ret i8 %2
}
/* Variables and functions */
float simplex_noise_2d(int /*<<< orphan*/);
int /*<<< orphan*/ vec2f(float, float);
float call_snoise1(float x) { return simplex_noise_2d(vec2f(x, 0.0f)); }


x86 assembly (clang, -O0):
<call_snoise1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
xorps  %xmm1,%xmm1
call   1030 <vec2f@plt>
mov    %eax,%edi
call   1040 <simplex_noise_2d@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<call_snoise1>:
push   %rax
xorps  %xmm1,%xmm1
call   1030 <vec2f@plt>
mov    %eax,%edi
pop    %rax
jmp    1040 <simplex_noise_2d@plt>

LLVM IR (-O0):
define float @call_snoise1(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = call i32 @vec2f(float %3, float 0.000000e+00)
%5 = call float @simplex_noise_2d(i32 %4)
ret float %5
}

LLVM IR (-O2):
define float @call_snoise1(float %0) {
%2 = tail call i32 @vec2f(float %0, float 0.000000e+00)
%3 = tail call float @simplex_noise_2d(i32 %2)
ret float %3
}
int trn_grid_pop_first_complete_rows_block() {
  int number_of_poped_rows = 0;
  return number_of_poped_rows;
}


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

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

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

LLVM IR (-O2):
define i32 @trn_grid_pop_first_complete_rows_block() {
ret i32 0
}
void nic_outb(unsigned char reg, unsigned char val) {
  (*((volatile unsigned char *)(0x20000000)) = (reg));
  (*((volatile unsigned char *)((0x20000000 + 4))) = (val));
}


x86 assembly (clang, -O0):
<nic_outb>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
mov    -0x1(%rbp),%cl
mov    $0x20000000,%eax
mov    %cl,(%rax)
mov    -0x2(%rbp),%cl
mov    $0x20000004,%eax
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<nic_outb>:
mov    %dil,0x20000000
20
mov    %sil,0x20000004
20
ret

LLVM IR (-O0):
define void @nic_outb(i8 zeroext %0, i8 zeroext %1) {
%3 = alloca i8
%4 = alloca i8
store i8 %0, i8* %3
store i8 %1, i8* %4
%5 = load i8, i8* %3
store volatile i8 %5, i8* inttoptr (i64 536870912 to i8*)
%6 = load i8, i8* %4
store volatile i8 %6, i8* inttoptr (i64 536870916 to i8*)
ret void
}

LLVM IR (-O2):
define void @nic_outb(i8 zeroext %0, i8 zeroext %1) {
store volatile i8 %0, i8* inttoptr (i64 536870912 to i8*)
store volatile i8 %1, i8* inttoptr (i64 536870916 to i8*)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ DiagnosticX(int, char *, char const *);
void ErrorX(const char *s) { DiagnosticX(1, "%s", s); }


x86 assembly (clang, -O0):
<ErrorX>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdx
mov    $0x1,%edi
lea    0xed4(%rip),%rsi
call   1030 <DiagnosticX@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ErrorX>:
mov    %rdi,%rdx
lea    0xee6(%rip),%rsi
mov    $0x1,%edi
jmp    1030 <DiagnosticX@plt>

LLVM IR (-O0):
@.str = [3 x i8] c"%s\00"
define void @ErrorX(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @DiagnosticX(i32 1, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %3)
ret void
}

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
define void @ErrorX(i8* %0) {
%2 = tail call i32 @DiagnosticX(i32 1, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ hw_delay_ms(int);
void si5351_startup_delay(void) { hw_delay_ms(10); }


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

x86 assembly (clang, -O2):
<si5351_startup_delay>:
mov    $0xa,%edi
jmp    1030 <hw_delay_ms@plt>

LLVM IR (-O0):
define void @si5351_startup_delay() {
%1 = call i32 @hw_delay_ms(i32 10)
ret void
}

LLVM IR (-O2):
define void @si5351_startup_delay() {
%1 = tail call i32 @hw_delay_ms(i32 10)
ret void
}
/* Type definitions */
typedef int uint64_t;

/* Variables and functions */
uint64_t clr_xlow_1(uint64_t u) { return -u & u; }


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

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

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

LLVM IR (-O2):
define i32 @clr_xlow_1(i32 %0) {
%2 = sub nsw i32 0, %0
%3 = and i32 %2, %0
ret i32 %3
}
regx0regx1_set(r0, r1, x0, x1, p0, p1) float r0, r1;
float *p0, *p1;
{ (p0[x0]) = (p1[x1]); }


x86 assembly (clang, -O0):
<regx0regx1_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)
mov    -0x28(%rbp),%rax
movslq -0x14(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm0
mov    -0x20(%rbp),%rax
movslq -0x10(%rbp),%rcx
movss  %xmm0,(%rax,%rcx,4)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<regx0regx1_set>:
movslq %esi,%rax
movss  (%rcx,%rax,4),%xmm0
movslq %edi,%rax
movss  %xmm0,(%rdx,%rax,4)
ret

LLVM IR (-O0):
define i32 @regx0regx1_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** %13
%17 = load i32, i32* %11
%18 = sext i32 %17 to i64
%19 = getelementptr inbounds float, float* %16, i64 %18
%20 = load float, float* %19
%21 = load float*, float** %12
%22 = load i32, i32* %10
%23 = sext i32 %22 to i64
%24 = getelementptr inbounds float, float* %21, i64 %23
store float %20, float* %24
%25 = load i32, i32* %7
ret i32 %25
}

LLVM IR (-O2):
define i32 @regx0regx1_set(double %0, double %1, i32 %2, i32 %3, float* nocapture writeonly %4, float* nocapture %5) {
%7 = sext i32 %3 to i64
%8 = getelementptr inbounds float, float* %5, i64 %7
%9 = load float, float* %8
%10 = sext i32 %2 to i64
%11 = getelementptr inbounds float, float* %4, i64 %10
store float %9, float* %11
ret i32 undef
}
void loop_underrun_Bad_FN(int length) {
  int i;
  char a[length];
  for (i = length - 1; i >= 0; i--) {
    a[i - 1] = 'U';
  }
}


x86 assembly (clang, -O0):
<loop_underrun_Bad_FN>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %rsp,%rcx
mov    %rcx,-0x10(%rbp)
mov    %rax,%rdx
add    $0xf,%rdx
and    $0xfffffffffffffff0,%rdx
mov    %rsp,%rcx
sub    %rdx,%rcx
mov    %rcx,-0x20(%rbp)
mov    %rcx,%rsp
mov    %rax,-0x18(%rbp)
mov    -0x4(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jl     1163 <loop_underrun_Bad_FN+0x63>
mov    -0x20(%rbp),%rax
mov    -0x8(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
movb   $0x55,(%rax,%rcx,1)
mov    -0x8(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x8(%rbp)
jmp    113a <loop_underrun_Bad_FN+0x3a>
mov    -0x10(%rbp),%rax
mov    %rax,%rsp
mov    %rbp,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define void @loop_underrun_Bad_FN(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i64
store i32 %0, i32* %2
%6 = load i32, i32* %2
%7 = zext i32 %6 to i64
%8 = call i8* @llvm.stacksave()
store i8* %8, i8** %4
%9 = alloca i8, i64 %7
store i64 %7, i64* %5
%10 = load i32, i32* %2
%11 = sub nsw i32 %10, 1
store i32 %11, i32* %3
br label %12
12: ; preds = %20, %1
%13 = load i32, i32* %3
%14 = icmp sge i32 %13, 0
br i1 %14, label %15, label %23
15: ; preds = %12
%16 = load i32, i32* %3
%17 = sub nsw i32 %16, 1
%18 = sext i32 %17 to i64
%19 = getelementptr inbounds i8, i8* %9, i64 %18
store i8 85, i8* %19
br label %20
20: ; preds = %15
%21 = load i32, i32* %3
%22 = add nsw i32 %21, -1
store i32 %22, i32* %3
br label %12
23: ; preds = %12
%24 = load i8*, i8** %4
ret void
}

LLVM IR (-O2):
define void @loop_underrun_Bad_FN(i32 %0) {
ret void
}
void wifi_rsp_hardware_rtc_set_alarm(
    const struct wifi_msg_hardware_rtc_set_alarm_rsp_t *msg) {}


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

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

LLVM IR (-O0):
%struct.wifi_msg_hardware_rtc_set_alarm_rsp_t = type opaque
define void @wifi_rsp_hardware_rtc_set_alarm(%struct.wifi_msg_hardware_rtc_set_alarm_rsp_t* %0) {
%2 = alloca %struct.wifi_msg_hardware_rtc_set_alarm_rsp_t*
store %struct.wifi_msg_hardware_rtc_set_alarm_rsp_t* %0, %struct.wifi_msg_hardware_rtc_set_alarm_rsp_t** %2
ret void
}

LLVM IR (-O2):
%struct.wifi_msg_hardware_rtc_set_alarm_rsp_t = type opaque
define void @wifi_rsp_hardware_rtc_set_alarm(%struct.wifi_msg_hardware_rtc_set_alarm_rsp_t* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, float);
void label_printFloat(void *e) {
  float *f = e;
  printf("%f", *f);
}


x86 assembly (clang, -O0):
<label_printFloat>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movss  (%rax),%xmm0
lea    0xecd(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<label_printFloat>:
movss  (%rdi),%xmm0
lea    0xee5(%rip),%rdi
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [3 x i8] c"%f\00"
define void @label_printFloat(i8* nocapture %0) {
%2 = bitcast i8* %0 to float*
%3 = load float, float* %2
%4 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), float %3)
ret void
}
int read(int fd, unsigned char *buf, int b_size) {
  int int_num = 5;
  int tmp;
  __asm__("int $0x80"
          : "=a"(tmp)
          : "a"(int_num), "b"(fd), "c"(buf), "d"(b_size));
  return tmp;
}


x86 assembly (clang, -O0):
<read>:
push   %rbp
mov    %rsp,%rbp
push   %rbx
mov    %edi,-0xc(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %edx,-0x1c(%rbp)
movl   $0x5,-0x20(%rbp)
mov    -0x20(%rbp),%eax
mov    -0xc(%rbp),%ebx
mov    -0x18(%rbp),%rcx
mov    -0x1c(%rbp),%edx
int    $0x80
mov    %eax,-0x24(%rbp)
mov    -0x24(%rbp),%eax
pop    %rbx
pop    %rbp
ret

x86 assembly (clang, -O2):
<read>:
push   %rbx
mov    %rsi,%rcx
mov    %edi,%ebx
mov    $0x5,%eax
int    $0x80
pop    %rbx
ret

LLVM IR (-O0):
define i32 @read(i32 %0, i8* %1, i32 %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32 %0, i32* %4
store i8* %1, i8** %5
store i32 %2, i32* %6
store i32 5, i32* %7
%9 = load i32, i32* %7
%10 = load i32, i32* %4
%11 = load i8*, i8** %5
%12 = load i32, i32* %6
%13 = call i32 asm "int $$0x80", "={ax},{ax},{bx},{cx},{dx},~{dirflag},~{fpsr},~{flags}"(i32 %9, i32 %10, i8* %11, i32 %12)
store i32 %13, i32* %8
%14 = load i32, i32* %8
ret i32 %14
}

LLVM IR (-O2):
define i32 @read(i32 %0, i8* readnone %1, i32 %2) {
%4 = tail call i32 asm "int $$0x80", "={ax},{ax},{bx},{cx},{dx},~{dirflag},~{fpsr},~{flags}"(i32 5, i32 %0, i8* %1, i32 %2)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ isalpha(int);
void uninitvar_isalpha(void) {
  int i;
  (void)isalpha(i);
}


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

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

LLVM IR (-O0):
define void @uninitvar_isalpha() {
%1 = alloca i32
%2 = load i32, i32* %1
%3 = call i32 @isalpha(i32 %2)
ret void
}

LLVM IR (-O2):
define void @uninitvar_isalpha() {
ret void
}
/* Variables and functions */
int __VERIFIER_nondet_int();
int main() {
  int i;
  i = __VERIFIER_nondet_int();
  while (i > 0) {
    if (i != 5) {
      i = i - 1;
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jle    114b <main+0x3b>
cmpl   $0x5,-0x8(%rbp)
je     1146 <main+0x36>
mov    -0x8(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1129 <main+0x19>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <__VERIFIER_nondet_int@plt>
test   %eax,%eax
jle    112f <main+0x1f>
nopl   0x0(%rax)
lea    -0x1(%rax),%ecx
cmp    $0x5,%eax
cmove  %eax,%ecx
mov    %ecx,%eax
test   %ecx,%ecx
jne    1120 <main+0x10>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 (...) @__VERIFIER_nondet_int()
store i32 %3, i32* %2
br label %4
4: ; preds = %13, %0
%5 = load i32, i32* %2
%6 = icmp sgt i32 %5, 0
br i1 %6, label %7, label %14
7: ; preds = %4
%8 = load i32, i32* %2
%9 = icmp ne i32 %8, 5
br i1 %9, label %10, label %13
10: ; preds = %7
%11 = load i32, i32* %2
%12 = sub nsw i32 %11, 1
store i32 %12, i32* %2
br label %13
13: ; preds = %10, %7
br label %4
14: ; preds = %4
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @__VERIFIER_nondet_int()
%2 = icmp sgt i32 %1, 0
br i1 %2, label %3, label %9
3: ; preds = %0, %3
%4 = phi i32 [ %7, %3 ], [ %1, %0 ]
%5 = icmp eq i32 %4, 5
%6 = add nsw i32 %4, -1
%7 = select i1 %5, i32 5, i32 %6
%8 = icmp eq i32 %7, 0
br i1 %8, label %9, label %3
9: ; preds = %3, %0
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void ALCnullBackend_Delete(void *ptr) { free(ptr); }


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

x86 assembly (clang, -O2):
<ALCnullBackend_Delete>:
jmp    1030 <free@plt>

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

LLVM IR (-O2):
define void @ALCnullBackend_Delete(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
/* Variables and functions */
int GLUT_VISIBLE;
int /*<<< orphan*/ decide_animation();
int /*<<< orphan*/ glutIdleFunc(int /*<<< orphan*/ *);
void visible(int state) {
  if (state == GLUT_VISIBLE) {
    decide_animation();
  } else {
    glutIdleFunc(NULL);
  }
}


x86 assembly (clang, -O0):
<visible>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    0x2eb3(%rip),%rcx
cmp    (%rcx),%eax
jne    1149 <visible+0x29>
mov    $0x0,%al
call   1030 <decide_animation@plt>
jmp    1152 <visible+0x32>
xor    %eax,%eax
mov    %eax,%edi
call   1040 <glutIdleFunc@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<visible>:
mov    0x2ec1(%rip),%rax
cmp    %edi,(%rax)
jne    1132 <visible+0x12>
xor    %eax,%eax
jmp    1030 <decide_animation@plt>
xor    %edi,%edi
jmp    1040 <glutIdleFunc@plt>

LLVM IR (-O0):
@GLUT_VISIBLE = global i32 0
define void @visible(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = load i32, i32* @GLUT_VISIBLE
%5 = icmp eq i32 %3, %4
br i1 %5, label %6, label %8
6: ; preds = %1
%7 = call i32 (...) @decide_animation()
br label %10
8: ; preds = %1
%9 = call i32 @glutIdleFunc(i32* null)
br label %10
10: ; preds = %8, %6
ret void
}

LLVM IR (-O2):
@GLUT_VISIBLE = global i32 0
define void @visible(i32 %0) {
%2 = load i32, i32* @GLUT_VISIBLE
%3 = icmp eq i32 %2, %0
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 (...) @decide_animation()
br label %8
6: ; preds = %1
%7 = tail call i32 @glutIdleFunc(i32* null)
br label %8
8: ; preds = %6, %4
ret void
}
void fn_test2(int *pa[2]) {
  int i;
  for (i = 0; i < 2; i++)
    printf("%d(%X), ", *pa[i], pa[i]);
  printf("\n");
}


x86 assembly (clang, -O0):
<fn_test2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x2,-0xc(%rbp)
jge    1163 <fn_test2+0x53>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
mov    (%rax),%esi
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    (%rax,%rcx,8),%rdx
lea    0xeb2(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1123 <fn_test2+0x13>
lea    0xe9f(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fn_test2>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
mov    (%rdi),%rdx
mov    (%rdx),%esi
lea    0xecd(%rip),%r14
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x8(%rbx),%rdx
mov    (%rdx),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0xa,%edi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <putchar@plt>

LLVM IR (-O0):
@.str = [9 x i8] c"%d(%X), \00"
@.str.1 = [2 x i8] c"\0A\00"
define void @fn_test2(i32** %0) {
%2 = alloca i32**
%3 = alloca i32
store i32** %0, i32*** %2
store i32 0, i32* %3
br label %4
4: ; preds = %20, %1
%5 = load i32, i32* %3
%6 = icmp slt i32 %5, 2
br i1 %6, label %7, label %23
7: ; preds = %4
%8 = load i32**, i32*** %2
%9 = load i32, i32* %3
%10 = sext i32 %9 to i64
%11 = getelementptr inbounds i32*, i32** %8, i64 %10
%12 = load i32*, i32** %11
%13 = load i32, i32* %12
%14 = load i32**, i32*** %2
%15 = load i32, i32* %3
%16 = sext i32 %15 to i64
%17 = getelementptr inbounds i32*, i32** %14, i64 %16
%18 = load i32*, i32** %17
%19 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 %13, i32* %18)
br label %20
20: ; preds = %7
%21 = load i32, i32* %3
%22 = add nsw i32 %21, 1
store i32 %22, i32* %3
br label %4
23: ; preds = %4
%24 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [9 x i8] c"%d(%X), \00"
define void @fn_test2(i32** nocapture %0) {
%2 = load i32*, i32** %0
%3 = load i32, i32* %2
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 %3, i32* %2)
%5 = getelementptr inbounds i32*, i32** %0, i64 1
%6 = load i32*, i32** %5
%7 = load i32, i32* %6
%8 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 %7, i32* %6)
%9 = tail call i32 @putchar(i32 10)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main() {
  printf("[BEGIN] dylib-static-link missing\n");
  printf(
      "[FAIL] dylib-static-link missing, program should not have launched\n");
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [35 x i8] c"[BEGIN] dylib-static-link missing\0A\00"
@.str.1 = [68 x i8] c"[FAIL] dylib-static-link missing, program should not have launched\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([68 x i8], [68 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [34 x i8] c"[BEGIN] dylib-static-link missing\00"
@str.2 = [67 x i8] c"[FAIL] dylib-static-link missing, program should not have launched\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([67 x i8], [67 x i8]* @str.2, i64 0, i64 0))
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ writelong(int /*<<< orphan*/ *, unsigned long);
unsigned long endchunk(FILE *fp, unsigned long crc) {
  writelong(fp, crc);
  return crc;
}


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

x86 assembly (clang, -O2):
<endchunk>:
push   %rbx
mov    %rsi,%rbx
call   1030 <writelong@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i64 @endchunk(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 = load i64, i64* %4
%7 = call i32 @writelong(i32* %5, i64 %6)
%8 = load i64, i64* %4
ret i64 %8
}

LLVM IR (-O2):
define i64 @endchunk(i32* %0, i64 returned %1) {
%3 = tail call i32 @writelong(i32* %0, i64 %1)
ret i64 %1
}
void null_doall(void) {}


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

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

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

LLVM IR (-O2):
define void @null_doall() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *, char *);
void usage(int argc, char **argv) {
  printf("invalid args, usage: %s <process id>\n", argv[1]);
  exit(-1);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rsi
lea    0xec2(%rip),%rdi
call   1030 <printf@plt>
mov    $0xffffffff,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rax
mov    0x8(%rsi),%rsi
lea    0xed4(%rip),%rdi
call   1030 <printf@plt>
mov    $0xffffffff,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [38 x i8] c"invalid args, usage: %s <process id>\0A\00"
define void @usage(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
store i32 %0, i32* %3
store i8** %1, i8*** %4
%5 = load i8**, i8*** %4
%6 = getelementptr inbounds i8*, i8** %5, i64 1
%7 = load i8*, i8** %6
%8 = call i32 @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0), i8* %7)
%9 = call i32 @exit(i32 -1)
unreachable
}

LLVM IR (-O2):
@.str = [38 x i8] c"invalid args, usage: %s <process id>\0A\00"
define void @usage(i32 %0, i8** nocapture %1) {
%3 = getelementptr inbounds i8*, i8** %1, i64 1
%4 = load i8*, i8** %3
%5 = tail call i32 @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = tail call i32 @exit(i32 -1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ fixnegzero(char *);
int hputc(char *, char const *, char *);
int /*<<< orphan*/ sprintf(char *, char *, double const);
int hputr8(char *hstring, const char *keyword, const const double dval) {
  char value[30];
  sprintf(value, "%g", dval);
  fixnegzero(value);
  return (hputc(hstring, keyword, value));
}


x86 assembly (clang, -O0):
<hputr8>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movsd  %xmm0,-0x18(%rbp)
lea    -0x40(%rbp),%rdi
movsd  -0x18(%rbp),%xmm0
lea    0xeab(%rip),%rsi
call   1050 <sprintf@plt>
lea    -0x40(%rbp),%rdi
call   1040 <fixnegzero@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
lea    -0x40(%rbp),%rdx
call   1030 <hputc@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<hputr8>:
push   %r15
push   %r14
push   %rbx
sub    $0x20,%rsp
mov    %rsi,%r14
mov    %rdi,%r15
lea    0xeba(%rip),%rsi
mov    %rsp,%rbx
mov    %rbx,%rdi
call   1050 <sprintf@plt>
mov    %rbx,%rdi
call   1040 <fixnegzero@plt>
mov    %r15,%rdi
mov    %r14,%rsi
mov    %rbx,%rdx
call   1030 <hputc@plt>
add    $0x20,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%g\00"
define i32 @hputr8(i8* %0, i8* %1, double %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca double
%7 = alloca [30 x i8]
store i8* %0, i8** %4
store i8* %1, i8** %5
store double %2, double* %6
%8 = getelementptr inbounds [30 x i8], [30 x i8]* %7, i64 0, i64 0
%9 = load double, double* %6
%10 = call i32 @sprintf(i8* %8, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), double %9)
%11 = getelementptr inbounds [30 x i8], [30 x i8]* %7, i64 0, i64 0
%12 = call i32 @fixnegzero(i8* %11)
%13 = load i8*, i8** %4
%14 = load i8*, i8** %5
%15 = getelementptr inbounds [30 x i8], [30 x i8]* %7, i64 0, i64 0
%16 = call i32 @hputc(i8* %13, i8* %14, i8* %15)
ret i32 %16
}

LLVM IR (-O2):
@.str = [3 x i8] c"%g\00"
define i32 @hputr8(i8* %0, i8* %1, double %2) {
%4 = alloca [30 x i8]
%5 = getelementptr inbounds [30 x i8], [30 x i8]* %4, i64 0, i64 0
%6 = call i32 @sprintf(i8* %5, i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), double %2)
%7 = call i32 @fixnegzero(i8* %5)
%8 = call i32 @hputc(i8* %0, i8* %1, i8* %5)
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ OPLinkStatusHandle();
int /*<<< orphan*/ UAVObjLogging(int /*<<< orphan*/);
void OPLinkStatusLogging() { UAVObjLogging(OPLinkStatusHandle()); }


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

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

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

LLVM IR (-O2):
define void @OPLinkStatusLogging() {
%1 = tail call i32 (...) @OPLinkStatusHandle()
%2 = tail call i32 @UAVObjLogging(i32 %1)
ret void
}
int shr(int x, int y, int z) {
  int s = y & 63;
  if (s >= 32)
    return 0;
  else
    return (unsigned)x >> s;
}


x86 assembly (clang, -O0):
<shr>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0xc(%rbp),%eax
and    $0x3f,%eax
mov    %eax,-0x14(%rbp)
cmpl   $0x20,-0x14(%rbp)
jl     112c <shr+0x2c>
movl   $0x0,-0x4(%rbp)
jmp    1137 <shr+0x37>
mov    -0x8(%rbp),%eax
mov    -0x14(%rbp),%ecx
shr    %cl,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<shr>:
mov    %esi,%ecx
and    $0x3f,%ecx
shr    %cl,%edi
xor    %eax,%eax
cmp    $0x20,%ecx
cmovb  %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @shr(i32 %0, i32 %1, i32 %2) {
%4 = and i32 %1, 63
%5 = icmp ugt i32 %4, 31
%6 = lshr i32 %0, %4
%7 = select i1 %5, i32 0, i32 %6
ret i32 %7
}
/* Variables and functions */
scalar_t__ INT_MIN;
unsigned int test9u(unsigned int x) {
  unsigned int y = (unsigned int)INT_MIN;
  unsigned int z = 0x1234;
  return (x + y) ^ z;
}


x86 assembly (clang, -O0):
<test9u>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    0x2eda(%rip),%rax
mov    (%rax),%rax
mov    %eax,-0x8(%rbp)
movl   $0x1234,-0xc(%rbp)
mov    -0x4(%rbp),%eax
add    -0x8(%rbp),%eax
xor    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test9u>:
mov    %edi,%eax
mov    0x2edf(%rip),%rcx
add    (%rcx),%eax
xor    $0x1234,%eax
ret

LLVM IR (-O0):
@INT_MIN = global i64 0
define i32 @test9u(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %2
%5 = load i64, i64* @INT_MIN
%6 = trunc i64 %5 to i32
store i32 %6, i32* %3
store i32 4660, i32* %4
%7 = load i32, i32* %2
%8 = load i32, i32* %3
%9 = add i32 %7, %8
%10 = load i32, i32* %4
%11 = xor i32 %9, %10
ret i32 %11
}

LLVM IR (-O2):
@INT_MIN = global i64 0
define i32 @test9u(i32 %0) {
%2 = load i64, i64* @INT_MIN
%3 = trunc i64 %2 to i32
%4 = add i32 %3, %0
%5 = xor i32 %4, 4660
ret i32 %5
}
/* Variables and functions */
scalar_t__ sm750_hw_i2c_read_reg(int, int);
unsigned short sii164GetDeviceID(void) {
  unsigned short deviceID;
  deviceID = ((unsigned short)sm750_hw_i2c_read_reg(0x70, 0x03) << 8) |
             (unsigned short)sm750_hw_i2c_read_reg(0x70, 0x02);
  return deviceID;
}


x86 assembly (clang, -O0):
<sii164GetDeviceID>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x70,%edi
mov    $0x3,%esi
call   1030 <sm750_hw_i2c_read_reg@plt>
movzwl %ax,%eax
shl    $0x8,%eax
mov    %eax,-0x8(%rbp)
mov    $0x70,%edi
mov    $0x2,%esi
call   1030 <sm750_hw_i2c_read_reg@plt>
mov    %rax,%rcx
mov    -0x8(%rbp),%eax
movzwl %cx,%ecx
or     %ecx,%eax
mov    %ax,-0x2(%rbp)
movzwl -0x2(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sii164GetDeviceID>:
push   %rbx
mov    $0x70,%edi
mov    $0x3,%esi
call   1030 <sm750_hw_i2c_read_reg@plt>
mov    %rax,%rbx
shl    $0x8,%ebx
mov    $0x70,%edi
mov    $0x2,%esi
call   1030 <sm750_hw_i2c_read_reg@plt>
or     %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define zeroext i16 @sii164GetDeviceID() {
%1 = alloca i16
%2 = call i64 @sm750_hw_i2c_read_reg(i32 112, i32 3)
%3 = trunc i64 %2 to i16
%4 = zext i16 %3 to i32
%5 = shl i32 %4, 8
%6 = call i64 @sm750_hw_i2c_read_reg(i32 112, i32 2)
%7 = trunc i64 %6 to i16
%8 = zext i16 %7 to i32
%9 = or i32 %5, %8
%10 = trunc i32 %9 to i16
store i16 %10, i16* %1
%11 = load i16, i16* %1
ret i16 %11
}

LLVM IR (-O2):
define zeroext i16 @sii164GetDeviceID() {
%1 = tail call i64 @sm750_hw_i2c_read_reg(i32 112, i32 3)
%2 = trunc i64 %1 to i16
%3 = shl i16 %2, 8
%4 = tail call i64 @sm750_hw_i2c_read_reg(i32 112, i32 2)
%5 = trunc i64 %4 to i16
%6 = or i16 %3, %5
ret i16 %6
}
void X509_CRL_digest(void) {}


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

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

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

LLVM IR (-O2):
define void @X509_CRL_digest() {
ret void
}
int getNTasks() { return 1; }


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

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

LLVM IR (-O0):
define i32 @getNTasks() {
ret i32 1
}

LLVM IR (-O2):
define i32 @getNTasks() {
ret i32 1
}
int test_imm_D8int64_lowword_mem(long long *val) {
  return ((*val) & (0xD8 << 0)) ? -20 : -40;
}


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

x86 assembly (clang, -O2):
<test_imm_D8int64_lowword_mem>:
testb  $0xd8,(%rdi)
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_D8int64_lowword_mem(i64* %0) {
%2 = alloca i64*
store i64* %0, i64** %2
%3 = load i64*, i64** %2
%4 = load i64, i64* %3
%5 = and i64 %4, 216
%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_D8int64_lowword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 216
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main() {
  int x, y, z;
  y = 0;
  x = 1;
  z = x + y;
  printf("19 s=%2d\n", z);
}


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

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

LLVM IR (-O2):
@.str = [10 x i8] c"19 s=%2d\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 1)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void *malloc(int);
int /*<<< orphan*/ printf(char *, void *);
int main(void) {
  void *foo = malloc(8192);
  printf("%p\n", foo);
  free(foo);
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    $0x2000,%edi
call   1050 <malloc@plt>
mov    %rax,%rbx
lea    0xebb(%rip),%rdi
mov    %rax,%rsi
call   1040 <printf@plt>
mov    %rbx,%rdi
call   1030 <free@plt>
xor    %eax,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%p\0A\00"
define i32 @main() {
%1 = tail call dereferenceable_or_null(8192) i8* @malloc(i32 8192)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %1)
%3 = tail call i32 @free(i8* %1)
ret i32 0
}
void ARGBLumaColorTable() {}


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

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

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

LLVM IR (-O2):
define void @ARGBLumaColorTable() {
ret void
}
OP(dd, f6) { op_f6(); }


x86 assembly (clang, -O0):
<OP>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    $0x0,%al
call   1030 <op_f6@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @OP(i32 %0, i32 %1) {
%3 = tail call i32 (...) @op_f6()
ret i32 undef
}
int maximum(int left_ht, int right_ht) {
  return (left_ht > right_ht ? left_ht : right_ht);
}


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

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

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

LLVM IR (-O2):
define i32 @maximum(i32 %0, i32 %1) {
%3 = icmp sgt i32 %0, %1
%4 = select i1 %3, i32 %0, i32 %1
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ search_replace_string(char *, char *, char *);
void javascript_replace_state(char *post_change_javascript, char *state) {
  search_replace_string(post_change_javascript, "$state", state);
}


x86 assembly (clang, -O0):
<javascript_replace_state>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rdx
lea    0xed1(%rip),%rsi
call   1030 <search_replace_string@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<javascript_replace_state>:
mov    %rsi,%rdx
lea    0xee6(%rip),%rsi
jmp    1030 <search_replace_string@plt>

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

LLVM IR (-O2):
@.str = [7 x i8] c"$state\00"
define void @javascript_replace_state(i8* %0, i8* %1) {
%3 = tail call i32 @search_replace_string(i8* %0, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* %1)
ret void
}