xunge/DecIR huggingface dataset:
long double _Complex div_long_double_cc(long double _Complex a,
                                        long double _Complex b) {
  return a / b;
}


x86 assembly (clang, -O0):
<div_long_double_cc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
lea    0x30(%rbp),%rax
lea    0x10(%rbp),%rcx
fldt   (%rcx)
fldt   0x10(%rcx)
fldt   (%rax)
fldt   0x10(%rax)
mov    %rsp,%rax
fstpt  0x30(%rax)
fstpt  0x20(%rax)
fstpt  0x10(%rax)
fstpt  (%rax)
call   1140 <__divxc3>
fstpt  -0x20(%rbp)
fstpt  -0x10(%rbp)
fldt   -0x10(%rbp)
fldt   -0x20(%rbp)
add    $0x60,%rsp
pop    %rbp
ret
nop

x86 assembly (clang, -O2):
<div_long_double_cc>:
sub    $0x48,%rsp
fldt   0x50(%rsp)
fldt   0x60(%rsp)
fldt   0x70(%rsp)
fldt   0x80(%rsp)
fstpt  0x30(%rsp)
fstpt  0x20(%rsp)
fstpt  0x10(%rsp)
fstpt  (%rsp)
call   1130 <__divxc3>
add    $0x48,%rsp
ret

LLVM IR (-O0):
define { x86_fp80, x86_fp80 } @div_long_double_cc({ x86_fp80, x86_fp80 }* byval({ x86_fp80, x86_fp80 }) align 16 %0, { x86_fp80, x86_fp80 }* byval({ x86_fp80, x86_fp80 }) align 16 %1) {
%3 = alloca { x86_fp80, x86_fp80 }
%4 = getelementptr inbounds { x86_fp80, x86_fp80 }, { x86_fp80, x86_fp80 }* %0, i32 0, i32 0
%5 = load x86_fp80, x86_fp80* %4
%6 = getelementptr inbounds { x86_fp80, x86_fp80 }, { x86_fp80, x86_fp80 }* %0, i32 0, i32 1
%7 = load x86_fp80, x86_fp80* %6
%8 = getelementptr inbounds { x86_fp80, x86_fp80 }, { x86_fp80, x86_fp80 }* %1, i32 0, i32 0
%9 = load x86_fp80, x86_fp80* %8
%10 = getelementptr inbounds { x86_fp80, x86_fp80 }, { x86_fp80, x86_fp80 }* %1, i32 0, i32 1
%11 = load x86_fp80, x86_fp80* %10
%12 = call { x86_fp80, x86_fp80 } @__divxc3(x86_fp80 %5, x86_fp80 %7, x86_fp80 %9, x86_fp80 %11)
%13 = extractvalue { x86_fp80, x86_fp80 } %12, 0
%14 = extractvalue { x86_fp80, x86_fp80 } %12, 1
%15 = getelementptr inbounds { x86_fp80, x86_fp80 }, { x86_fp80, x86_fp80 }* %3, i32 0, i32 0
%16 = getelementptr inbounds { x86_fp80, x86_fp80 }, { x86_fp80, x86_fp80 }* %3, i32 0, i32 1
store x86_fp80 %13, x86_fp80* %15
store x86_fp80 %14, x86_fp80* %16
%17 = load { x86_fp80, x86_fp80 }, { x86_fp80, x86_fp80 }* %3
ret { x86_fp80, x86_fp80 } %17
}

LLVM IR (-O2):
define { x86_fp80, x86_fp80 } @div_long_double_cc({ x86_fp80, x86_fp80 }* nocapture byval({ x86_fp80, x86_fp80 }) align 16 %0, { x86_fp80, x86_fp80 }* nocapture byval({ x86_fp80, x86_fp80 }) align 16 %1) {
%3 = getelementptr inbounds { x86_fp80, x86_fp80 }, { x86_fp80, x86_fp80 }* %0, i64 0, i32 0
%4 = load x86_fp80, x86_fp80* %3
%5 = getelementptr inbounds { x86_fp80, x86_fp80 }, { x86_fp80, x86_fp80 }* %0, i64 0, i32 1
%6 = load x86_fp80, x86_fp80* %5
%7 = getelementptr inbounds { x86_fp80, x86_fp80 }, { x86_fp80, x86_fp80 }* %1, i64 0, i32 0
%8 = load x86_fp80, x86_fp80* %7
%9 = getelementptr inbounds { x86_fp80, x86_fp80 }, { x86_fp80, x86_fp80 }* %1, i64 0, i32 1
%10 = load x86_fp80, x86_fp80* %9
%11 = tail call { x86_fp80, x86_fp80 } @__divxc3(x86_fp80 %4, x86_fp80 %6, x86_fp80 %8, x86_fp80 %10)
ret { x86_fp80, x86_fp80 } %11
}
unsigned int hashtbl_int_hash(const void *k) { return *(unsigned int *)k; }


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

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

LLVM IR (-O0):
define i32 @hashtbl_int_hash(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = bitcast i8* %3 to i32*
%5 = load i32, i32* %4
ret i32 %5
}

LLVM IR (-O2):
define i32 @hashtbl_int_hash(i8* nocapture %0) {
%2 = bitcast i8* %0 to i32*
%3 = load i32, i32* %2
ret i32 %3
}
int fun473() { return 473; }


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

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

LLVM IR (-O0):
define i32 @fun473() {
ret i32 473
}

LLVM IR (-O2):
define i32 @fun473() {
ret i32 473
}
int ld_blg_rm1(long double a1, long double *a2) {
  return (__builtin_islessgreater(a1, *a2));
}


x86 assembly (clang, -O0):
<ld_blg_rm1>:
push   %rbp
mov    %rsp,%rbp
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
mov    %rdi,-0x18(%rbp)
fldt   -0x10(%rbp)
mov    -0x18(%rbp),%rax
fldt   (%rax)
fxch   %st(1)
fucomip %st(1),%st
fstp   %st(0)
setne  %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ld_blg_rm1>:
fldt   0x8(%rsp)
fldt   (%rdi)
xor    %eax,%eax
fucomip %st(1),%st
fstp   %st(0)
setne  %al
ret

LLVM IR (-O0):
define i32 @ld_blg_rm1(x86_fp80 %0, x86_fp80* %1) {
%3 = alloca x86_fp80
%4 = alloca x86_fp80*
store x86_fp80 %0, x86_fp80* %3
store x86_fp80* %1, x86_fp80** %4
%5 = load x86_fp80, x86_fp80* %3
%6 = load x86_fp80*, x86_fp80** %4
%7 = load x86_fp80, x86_fp80* %6
%8 = fcmp one x86_fp80 %5, %7
%9 = zext i1 %8 to i32
ret i32 %9
}

LLVM IR (-O2):
define i32 @ld_blg_rm1(x86_fp80 %0, x86_fp80* nocapture %1) {
%3 = load x86_fp80, x86_fp80* %1
%4 = fcmp one x86_fp80 %3, %0
%5 = zext i1 %4 to i32
ret i32 %5
}
/* Variables and functions */
int MDECODE_decode_quoted_printable(char *, int /*<<< orphan*/, char);
int MDECODE_decode_qp_ISO(char *line) {
  return MDECODE_decode_quoted_printable(line, 0, '=');
}


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

x86 assembly (clang, -O2):
<MDECODE_decode_qp_ISO>:
xor    %esi,%esi
mov    $0x3d,%edx
jmp    1030 <MDECODE_decode_quoted_printable@plt>

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

LLVM IR (-O2):
define i32 @MDECODE_decode_qp_ISO(i8* %0) {
%2 = tail call i32 @MDECODE_decode_quoted_printable(i8* %0, i32 0, i8 signext 61)
ret i32 %2
}
int f1(int x) { return (x * 2); }


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

x86 assembly (clang, -O2):
<f1>:
lea    (%rdi,%rdi,1),%eax
ret

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

LLVM IR (-O2):
define i32 @f1(i32 %0) {
%2 = shl nsw i32 %0, 1
ret i32 %2
}
int test_imm_B0uint64_midword_mem(unsigned long long *val) {
  return ((*val >> 16) & (0xB0 << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_B0uint64_midword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 11534336
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
scalar_t__ dCheck(int);
int /*<<< orphan*/ printf(char *, int);
int main() {
  int i = 90000000;
  while (dCheck(i) == 0) {
    printf("\n%i", i);
    i += 10;
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x55d4a80,-0x8(%rbp)
mov    -0x8(%rbp),%edi
call   1030 <dCheck@plt>
cmp    $0x0,%rax
jne    1165 <main+0x45>
mov    -0x8(%rbp),%esi
lea    0xeae(%rip),%rdi
call   1040 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0xa,%eax
mov    %eax,-0x8(%rbp)
jmp    1136 <main+0x16>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
mov    $0x55d4a80,%ebx
mov    $0x55d4a80,%edi
call   1030 <dCheck@plt>
test   %rax,%rax
jne    1159 <main+0x39>
lea    0xec1(%rip),%r14
nop
mov    %r14,%rdi
mov    %ebx,%esi
call   1040 <printf@plt>
add    $0xa,%ebx
mov    %ebx,%edi
call   1030 <dCheck@plt>
test   %rax,%rax
je     1140 <main+0x20>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [4 x i8] c"\0A%i\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 90000000, i32* %2
br label %3
3: ; preds = %7, %0
%4 = load i32, i32* %2
%5 = call i64 @dCheck(i32 %4)
%6 = icmp eq i64 %5, 0
br i1 %6, label %7, label %12
7: ; preds = %3
%8 = load i32, i32* %2
%9 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %8)
%10 = load i32, i32* %2
%11 = add nsw i32 %10, 10
store i32 %11, i32* %2
br label %3
12: ; preds = %3
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"\0A%i\00"
define i32 @main() {
%1 = tail call i64 @dCheck(i32 90000000)
%2 = icmp eq i64 %1, 0
br i1 %2, label %3, label %9
3: ; preds = %0, %3
%4 = phi i32 [ %6, %3 ], [ 90000000, %0 ]
%5 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %4)
%6 = add nuw nsw i32 %4, 10
%7 = tail call i64 @dCheck(i32 %6)
%8 = icmp eq i64 %7, 0
br i1 %8, label %3, label %9
9: ; preds = %3, %0
ret i32 0
}
char *_cgiDir() { return "../cgi-bin/"; }


x86 assembly (clang, -O0):
<_cgiDir>:
push   %rbp
mov    %rsp,%rbp
lea    0xef5(%rip),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_cgiDir>:
lea    0xef9(%rip),%rax
ret

LLVM IR (-O0):
@.str = [12 x i8] c"../cgi-bin/\00"
define i8* @_cgiDir() {
ret i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [12 x i8] c"../cgi-bin/\00"
define i8* @_cgiDir() {
ret i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0)
}
int HelpItem112(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @HelpItem112() {
ret i32 0
}
float f8(float x) {
  float tmp1 = 7.5f;
  float tmp2 = __builtin_copysignf(2.0f, x);
  return tmp1 * tmp2;
}


x86 assembly (clang, -O0):
<f8>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  0xf0f(%rip),%xmm0
movss  %xmm0,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
movaps 0xede(%rip),%xmm1
pand   %xmm1,%xmm0
movaps 0xee3(%rip),%xmm1
por    %xmm1,%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0x8(%rbp),%xmm0
mulss  -0xc(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<f8>:
andps  0xef9(%rip),%xmm0
orps   0xf02(%rip),%xmm0
mulss  0xf0a(%rip),%xmm0
ret

LLVM IR (-O0):
define float @f8(float %0) {
%2 = alloca float
%3 = alloca float
%4 = alloca float
store float %0, float* %2
store float 7.500000e+00, float* %3
%5 = load float, float* %2
%6 = call float @llvm.copysign.f32(float 2.000000e+00, float %5)
store float %6, float* %4
%7 = load float, float* %3
%8 = load float, float* %4
%9 = fmul float %7, %8
ret float %9
}

LLVM IR (-O2):
define float @f8(float %0) {
%2 = tail call float @llvm.copysign.f32(float 2.000000e+00, float %0)
%3 = fmul float %2, 7.500000e+00
ret float %3
}
int e_x_sys_end() { return (0); }


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

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

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

LLVM IR (-O2):
define i32 @e_x_sys_end() {
ret i32 0
}
assert2(file, line) char *file;
{ fatal("assertion failed (%s, %d)", file, line); }


x86 assembly (clang, -O0):
<assert2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
lea    0xed3(%rip),%rdi
mov    $0x0,%al
call   1030 <fatal@plt>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<assert2>:
mov    %esi,%edx
mov    %rdi,%rsi
lea    0xee4(%rip),%rdi
xor    %eax,%eax
jmp    1030 <fatal@plt>

LLVM IR (-O0):
@.str = [26 x i8] c"assertion failed (%s, %d)\00"
define i32 @assert2(i8* %0, i32 %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i32
store i8* %0, i8** %4
store i32 %1, i32* %5
%6 = load i8*, i8** %4
%7 = load i32, i32* %5
%8 = call i32 (i8*, i8*, i32, ...) bitcast (i32 (...)* @fatal to i32 (i8*, i8*, i32, ...)*)(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i8* %6, i32 %7)
%9 = load i32, i32* %3
ret i32 %9
}

LLVM IR (-O2):
@.str = [26 x i8] c"assertion failed (%s, %d)\00"
define i32 @assert2(i8* %0, i32 %1) {
%3 = tail call i32 (i8*, i8*, i32, ...) bitcast (i32 (...)* @fatal to i32 (i8*, i8*, i32, ...)*)(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i8* %0, i32 %1)
ret i32 undef
}
int mult2(int val) { return val * 2; }


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

x86 assembly (clang, -O2):
<mult2>:
lea    (%rdi,%rdi,1),%eax
ret

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

LLVM IR (-O2):
define i32 @mult2(i32 %0) {
%2 = shl nsw i32 %0, 1
ret i32 %2
}
void s3c24xx_spi_setname(char *name) {}


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

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

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

LLVM IR (-O2):
define void @s3c24xx_spi_setname(i8* nocapture %0) {
ret void
}
double transform_double(const double in) { return in * 3; }


x86 assembly (clang, -O0):
<transform_double>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  0xeef(%rip),%xmm0
mulsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<transform_double>:
mulsd  0xef8(%rip),%xmm0
ret

LLVM IR (-O0):
define double @transform_double(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fmul double %3, 3.000000e+00
ret double %4
}

LLVM IR (-O2):
define double @transform_double(double %0) {
%2 = fmul double %0, 3.000000e+00
ret double %2
}
/* Variables and functions */
int /*<<< orphan*/ nio_vram_pixel_putc(int const, int const, char const,
                                       unsigned char const,
                                       unsigned char const);
void nio_vram_grid_putc(const int offset_x, const int offset_y, const int x,
                        const int y, const char ch, const unsigned char bgColor,
                        const unsigned char textColor) {
  nio_vram_pixel_putc(offset_x + x * 6, offset_y + y * 8, ch, bgColor,
                      textColor);
}


x86 assembly (clang, -O0):
<nio_vram_grid_putc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %r8d,-0x24(%rbp)
mov    %ecx,%eax
mov    -0x24(%rbp),%ecx
mov    %eax,-0x20(%rbp)
mov    %edx,%eax
mov    -0x20(%rbp),%edx
mov    %eax,-0x1c(%rbp)
mov    %esi,%eax
mov    -0x1c(%rbp),%esi
mov    %eax,-0x18(%rbp)
mov    %edi,%r8d
mov    -0x18(%rbp),%edi
mov    %r9b,%al
mov    0x10(%rbp),%r9b
mov    %r8d,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %cl,-0x11(%rbp)
mov    %al,-0x12(%rbp)
mov    -0x4(%rbp),%edi
imul   $0x6,-0xc(%rbp),%eax
add    %eax,%edi
mov    -0x8(%rbp),%esi
mov    -0x10(%rbp),%eax
shl    $0x3,%eax
add    %eax,%esi
mov    -0x11(%rbp),%cl
mov    -0x12(%rbp),%al
movsbl %cl,%edx
movzbl %al,%ecx
movzbl 0x10(%rbp),%r8d
call   1030 <nio_vram_pixel_putc@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<nio_vram_grid_putc>:
mov    %r8d,%eax
movzbl 0x8(%rsp),%r8d
lea    (%rdx,%rdx,2),%edx
lea    (%rdi,%rdx,2),%edi
lea    (%rsi,%rcx,8),%esi
mov    %eax,%edx
mov    %r9d,%ecx
jmp    1030 <nio_vram_pixel_putc@plt>

LLVM IR (-O0):
define void @nio_vram_grid_putc(i32 %0, i32 %1, i32 %2, i32 %3, i8 signext %4, i8 zeroext %5, i8 zeroext %6) {
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i8
%13 = alloca i8
%14 = alloca i8
store i32 %0, i32* %8
store i32 %1, i32* %9
store i32 %2, i32* %10
store i32 %3, i32* %11
store i8 %4, i8* %12
store i8 %5, i8* %13
store i8 %6, i8* %14
%15 = load i32, i32* %8
%16 = load i32, i32* %10
%17 = mul nsw i32 %16, 6
%18 = add nsw i32 %15, %17
%19 = load i32, i32* %9
%20 = load i32, i32* %11
%21 = mul nsw i32 %20, 8
%22 = add nsw i32 %19, %21
%23 = load i8, i8* %12
%24 = load i8, i8* %13
%25 = load i8, i8* %14
%26 = call i32 @nio_vram_pixel_putc(i32 %18, i32 %22, i8 signext %23, i8 zeroext %24, i8 zeroext %25)
ret void
}

LLVM IR (-O2):
define void @nio_vram_grid_putc(i32 %0, i32 %1, i32 %2, i32 %3, i8 signext %4, i8 zeroext %5, i8 zeroext %6) {
%8 = mul nsw i32 %2, 6
%9 = add nsw i32 %8, %0
%10 = shl nsw i32 %3, 3
%11 = add nsw i32 %10, %1
%12 = tail call i32 @nio_vram_pixel_putc(i32 %9, i32 %11, i8 signext %4, i8 zeroext %5, i8 zeroext %6)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ clock_t;

/* Variables and functions */
clock_t clock(void) {
  ;
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @clock() {
ret i32 0
}
/* Variables and functions */
int printf(char *, int);
int bar(int *ptr) { return printf("%d\n", *ptr); }


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

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

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @bar(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %2)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void __acle_se_func() { printf("__acle_se_func\n"); }


x86 assembly (clang, -O0):
<__acle_se_func>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
call   1030 <printf@plt>
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [16 x i8] c"__acle_se_func\0A\00"
define void @__acle_se_func() {
%1 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [15 x i8] c"__acle_se_func\00"
define void @__acle_se_func() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @str, i64 0, i64 0))
ret void
}
int sample_printf_function() {
  return printf("%s:%d:%s: sample\n",
                "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/"
                "outputs/2022-01-22/02-19-57/repos/notogawa/libift/refs/heads/"
                "master/sample/sample.c",
                77, __FUNCTION__);
}


x86 assembly (clang, -O0):
<sample_printf_function>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
lea    0xef0(%rip),%rsi
mov    $0x4d,%edx
lea    0xf70(%rip),%rcx
mov    $0x0,%al
call   1030 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<sample_printf_function>:
lea    0xee9(%rip),%rdi
lea    0xef4(%rip),%rsi
lea    0xf79(%rip),%rcx
mov    $0x4d,%edx
xor    %eax,%eax
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [18 x i8] c"%s:%d:%s: sample\0A\00"
@.str.1 = [140 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/notogawa/libift/refs/heads/master/sample/sample.c\00"
@__FUNCTION__.sample_printf_function = [23 x i8] c"sample_printf_function\00"
define i32 @sample_printf_function() {
%1 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([140 x i8], [140 x i8]* @.str.1, i64 0, i64 0), i32 77, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @__FUNCTION__.sample_printf_function, i64 0, i64 0))
ret i32 %1
}

LLVM IR (-O2):
@.str = [18 x i8] c"%s:%d:%s: sample\0A\00"
@.str.1 = [140 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/notogawa/libift/refs/heads/master/sample/sample.c\00"
@__FUNCTION__.sample_printf_function = [23 x i8] c"sample_printf_function\00"
define i32 @sample_printf_function() {
%1 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([140 x i8], [140 x i8]* @.str.1, i64 0, i64 0), i32 77, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @__FUNCTION__.sample_printf_function, i64 0, i64 0))
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ f();
void test_calls(void) {
  int i, j;
  for (i = 0; i < 10; ++i) {
    for (j = 0; j < 15; ++j)
      ;
  }
  f();
}


x86 assembly (clang, -O0):
<test_calls>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
cmpl   $0xa,-0x4(%rbp)
jge    1160 <test_calls+0x50>
movl   $0x0,-0x8(%rbp)
cmpl   $0xf,-0x8(%rbp)
jge    114d <test_calls+0x3d>
jmp    113f <test_calls+0x2f>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1130 <test_calls+0x20>
jmp    1152 <test_calls+0x42>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    111f <test_calls+0xf>
mov    $0x0,%al
call   1030 <f@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @test_calls() {
%1 = tail call i32 (...) @f()
ret void
}
int slist_destroy(struct slist_info *info) { return 0; }


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

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

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

LLVM IR (-O2):
%struct.slist_info = type opaque
define i32 @slist_destroy(%struct.slist_info* nocapture readnone %0) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, void *);
int /*<<< orphan*/ stderr;
void rtpp_pcnt_strm_get_stats_fin(void *pub) {
  fprintf(stderr,
          "Method rtpp_pcnt_strm@%p::get_stats (rtpp_pcnt_strm_get_stats) is "
          "invoked after destruction\x0a",
          pub);
  abort();
}


x86 assembly (clang, -O0):
<rtpp_pcnt_strm_get_stats_fin>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ead(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xec0(%rip),%rsi
call   1040 <fprintf@plt>
mov    $0x0,%al
call   1030 <abort@plt>

x86 assembly (clang, -O2):
<rtpp_pcnt_strm_get_stats_fin>:
push   %rax
mov    %rdi,%rdx
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1040 <fprintf@plt>
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [93 x i8] c"Method rtpp_pcnt_strm@%p::get_stats (rtpp_pcnt_strm_get_stats) is invoked after destruction\0A\00"
define void @rtpp_pcnt_strm_get_stats_fin(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([93 x i8], [93 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = call i32 (...) @abort()
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [93 x i8] c"Method rtpp_pcnt_strm@%p::get_stats (rtpp_pcnt_strm_get_stats) is invoked after destruction\0A\00"
define void @rtpp_pcnt_strm_get_stats_fin(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([93 x i8], [93 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = tail call i32 (...) @abort()
unreachable
}
/* Variables and functions */
double READ_CHAR();
float READ_ANGLE(void) { return (float)(READ_CHAR() * (360.0 / 256)); }


x86 assembly (clang, -O0):
<READ_ANGLE>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <READ_CHAR@plt>
movsd  0xedd(%rip),%xmm1
mulsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<READ_ANGLE>:
push   %rax
xor    %eax,%eax
call   1030 <READ_CHAR@plt>
mulsd  0xee0(%rip),%xmm0
cvtsd2ss %xmm0,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @READ_ANGLE() {
%1 = call double (...) @READ_CHAR()
%2 = fmul double %1, 1.406250e+00
%3 = fptrunc double %2 to float
ret float %3
}

LLVM IR (-O2):
define float @READ_ANGLE() {
%1 = tail call double (...) @READ_CHAR()
%2 = fmul double %1, 1.406250e+00
%3 = fptrunc double %2 to float
ret float %3
}
/* Variables and functions */
int /*<<< orphan*/ foo(int);
int f1() { foo(12); }


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

x86 assembly (clang, -O2):
<f1>:
mov    $0xc,%edi
jmp    1030 <foo@plt>

LLVM IR (-O0):
define i32 @f1() {
%1 = alloca i32
%2 = call i32 @foo(i32 12)
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
define i32 @f1() {
%1 = tail call i32 @foo(i32 12)
ret i32 undef
}
/* Variables and functions */
char getPT();
int /*<<< orphan*/ putCMD(int);
int _dos_stat_console(void) {
  char c;
  putCMD(0x80);
  c = getPT();
  if (c == '\x1b') {
    int i;
    for (i = 0; i < 1000000; ++i)
      ;
    c = 0;
  }
  return c;
}


x86 assembly (clang, -O0):
<_dos_stat_console>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x80,%edi
call   1040 <putCMD@plt>
mov    $0x0,%al
call   1030 <getPT@plt>
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
cmp    $0x1b,%eax
jne    1174 <_dos_stat_console+0x54>
movl   $0x0,-0x8(%rbp)
cmpl   $0xf4240,-0x8(%rbp)
jge    1170 <_dos_stat_console+0x50>
jmp    1162 <_dos_stat_console+0x42>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1150 <_dos_stat_console+0x30>
movb   $0x0,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_dos_stat_console>:
push   %rbx
mov    $0x80,%edi
call   1040 <putCMD@plt>
xor    %ebx,%ebx
xor    %eax,%eax
call   1030 <getPT@plt>
cmp    $0x1b,%al
movzbl %al,%eax
cmove  %ebx,%eax
movsbl %al,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @_dos_stat_console() {
%1 = alloca i8
%2 = alloca i32
%3 = call i32 @putCMD(i32 128)
%4 = call signext i8 (...) @getPT()
store i8 %4, i8* %1
%5 = load i8, i8* %1
%6 = sext i8 %5 to i32
%7 = icmp eq i32 %6, 27
br i1 %7, label %8, label %17
8: ; preds = %0
store i32 0, i32* %2
br label %9
9: ; preds = %13, %8
%10 = load i32, i32* %2
%11 = icmp slt i32 %10, 1000000
br i1 %11, label %12, label %16
12: ; preds = %9
br label %13
13: ; preds = %12
%14 = load i32, i32* %2
%15 = add nsw i32 %14, 1
store i32 %15, i32* %2
br label %9
16: ; preds = %9
store i8 0, i8* %1
br label %17
17: ; preds = %16, %0
%18 = load i8, i8* %1
%19 = sext i8 %18 to i32
ret i32 %19
}

LLVM IR (-O2):
define i32 @_dos_stat_console() {
%1 = tail call i32 @putCMD(i32 128)
%2 = tail call signext i8 (...) @getPT()
%3 = icmp eq i8 %2, 27
%4 = select i1 %3, i8 0, i8 %2
%5 = sext i8 %4 to i32
ret i32 %5
}
/* Variables and functions */
float pow(float, int);
float cubic_in(float step, float max_steps, float max_val) {
  float ratio = step / max_steps;
  return max_val * pow(ratio, 3);
}


x86 assembly (clang, -O0):
<cubic_in>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  %xmm2,-0xc(%rbp)
movss  -0x4(%rbp),%xmm0
divss  -0x8(%rbp),%xmm0
movss  %xmm0,-0x10(%rbp)
movss  -0xc(%rbp),%xmm0
movss  %xmm0,-0x14(%rbp)
movss  -0x10(%rbp),%xmm0
mov    $0x3,%edi
call   1030 <pow@plt>
movaps %xmm0,%xmm1
movss  -0x14(%rbp),%xmm0
mulss  %xmm1,%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cubic_in>:
push   %rax
movss  %xmm2,0x4(%rsp)
divss  %xmm1,%xmm0
mov    $0x3,%edi
call   1030 <pow@plt>
mulss  0x4(%rsp),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @cubic_in(float %0, float %1, float %2) {
%4 = alloca float
%5 = alloca float
%6 = alloca float
%7 = alloca float
store float %0, float* %4
store float %1, float* %5
store float %2, float* %6
%8 = load float, float* %4
%9 = load float, float* %5
%10 = fdiv float %8, %9
store float %10, float* %7
%11 = load float, float* %6
%12 = load float, float* %7
%13 = call float @pow(float %12, i32 3)
%14 = fmul float %11, %13
ret float %14
}

LLVM IR (-O2):
define float @cubic_in(float %0, float %1, float %2) {
%4 = fdiv float %0, %1
%5 = tail call float @pow(float %4, i32 3)
%6 = fmul float %5, %2
ret float %6
}
/* Variables and functions */
size_t strlen(const char *string) {
  size_t i = 0;
  while (string[i]) {
    i++;
  }
  return i;
}


x86 assembly (clang, -O0):
<strlen>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movq   $0x0,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%rcx
cmpb   $0x0,(%rax,%rcx,1)
je     1133 <strlen+0x33>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1110 <strlen+0x10>
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strlen>:
mov    $0xffffffffffffffff,%rax
nopw   0x0(%rax,%rax,1)
cmpb   $0x0,0x1(%rdi,%rax,1)
lea    0x1(%rax),%rax
jne    1110 <strlen+0x10>
ret

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

LLVM IR (-O2):
define i64 @strlen(i8* nocapture %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i64 [ 0, %1 ], [ %7, %2 ]
%4 = getelementptr inbounds i8, i8* %0, i64 %3
%5 = load i8, i8* %4
%6 = icmp eq i8 %5, 0
%7 = add i64 %3, 1
br i1 %6, label %8, label %2
8: ; preds = %2
ret i64 %3
}
char *get_strerror(num)
int num;
{ return strerror(num); }


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

x86 assembly (clang, -O2):
<get_strerror>:
jmp    1030 <strerror@plt>

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

LLVM IR (-O2):
define i8* @get_strerror(i32 %0) {
%2 = tail call i8* @strerror(i32 %0)
ret i8* %2
}
int et_list_unlock(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @et_list_unlock() {
ret i32 0
}
unsigned int f20(unsigned int x, int y __attribute__((unused))) {
  return (x >> 1) ^ (x << (8 * 4 - 1));
}


x86 assembly (clang, -O0):
<f20>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
shr    $0x1,%eax
mov    -0x4(%rbp),%ecx
shl    $0x1f,%ecx
xor    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f20>:
mov    %edi,%eax
ror    %eax
ret

LLVM IR (-O0):
define i32 @f20(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 = lshr i32 %5, 1
%7 = load i32, i32* %3
%8 = shl i32 %7, 31
%9 = xor i32 %6, %8
ret i32 %9
}

LLVM IR (-O2):
define i32 @f20(i32 %0, i32 %1) {
%3 = tail call i32 @llvm.fshl.i32(i32 %0, i32 %0, i32 31)
ret i32 %3
}
void answer_ics(void) {}


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

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

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

LLVM IR (-O2):
define void @answer_ics() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ HplMsp430I2C0P__HplI2C__clearModeI2C();
void HplMsp430Usart0P__HplI2C__clearModeI2C(void) {
  HplMsp430I2C0P__HplI2C__clearModeI2C();
}


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

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

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

LLVM IR (-O2):
define void @HplMsp430Usart0P__HplI2C__clearModeI2C() {
%1 = tail call i32 (...) @HplMsp430I2C0P__HplI2C__clearModeI2C()
ret void
}
/* Type definitions */
struct flock {
  int /*<<< orphan*/ l_whence;
  scalar_t__ l_len;
  scalar_t__ l_start;
  int /*<<< orphan*/ l_type;
};

/* Variables and functions */
int /*<<< orphan*/ F_SETLK;
int /*<<< orphan*/ F_WRLCK;
int /*<<< orphan*/ SEEK_SET;
int fcntl(int, int /*<<< orphan*/, struct flock *);
int lockfile(int fd) {
  struct flock lock;
  lock.l_type = F_WRLCK;
  lock.l_start = 0;
  lock.l_len = 0;
  lock.l_whence = SEEK_SET;
  return fcntl(fd, F_SETLK, &lock);
}


x86 assembly (clang, -O0):
<lockfile>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    0x2eae(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x10(%rbp)
movq   $0x0,-0x18(%rbp)
movq   $0x0,-0x20(%rbp)
mov    0x2e9a(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x28(%rbp)
mov    -0x4(%rbp),%edi
mov    0x2e9b(%rip),%rax
mov    (%rax),%esi
lea    -0x28(%rbp),%rdx
call   1030 <fcntl@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<lockfile>:
sub    $0x28,%rsp
mov    0x2eb5(%rip),%rax
mov    (%rax),%eax
mov    %eax,0x20(%rsp)
xorps  %xmm0,%xmm0
movups %xmm0,0x10(%rsp)
mov    0x2ea8(%rip),%rax
mov    (%rax),%eax
mov    %eax,0x8(%rsp)
mov    0x2eab(%rip),%rax
mov    (%rax),%esi
lea    0x8(%rsp),%rdx
call   1030 <fcntl@plt>
add    $0x28,%rsp
ret

LLVM IR (-O0):
%struct.flock = type { i32, i64, i64, i32 }
@F_WRLCK = global i32 0
@SEEK_SET = global i32 0
@F_SETLK = global i32 0
define i32 @lockfile(i32 %0) {
%2 = alloca i32
%3 = alloca %struct.flock
store i32 %0, i32* %2
%4 = load i32, i32* @F_WRLCK
%5 = getelementptr inbounds %struct.flock, %struct.flock* %3, i32 0, i32 3
store i32 %4, i32* %5
%6 = getelementptr inbounds %struct.flock, %struct.flock* %3, i32 0, i32 2
store i64 0, i64* %6
%7 = getelementptr inbounds %struct.flock, %struct.flock* %3, i32 0, i32 1
store i64 0, i64* %7
%8 = load i32, i32* @SEEK_SET
%9 = getelementptr inbounds %struct.flock, %struct.flock* %3, i32 0, i32 0
store i32 %8, i32* %9
%10 = load i32, i32* %2
%11 = load i32, i32* @F_SETLK
%12 = call i32 @fcntl(i32 %10, i32 %11, %struct.flock* %3)
ret i32 %12
}

LLVM IR (-O2):
%struct.flock = type { i32, i64, i64, i32 }
@F_WRLCK = global i32 0
@SEEK_SET = global i32 0
@F_SETLK = global i32 0
define i32 @lockfile(i32 %0) {
%2 = alloca %struct.flock
%3 = bitcast %struct.flock* %2 to i8*
%4 = load i32, i32* @F_WRLCK
%5 = getelementptr inbounds %struct.flock, %struct.flock* %2, i64 0, i32 3
store i32 %4, i32* %5
%6 = getelementptr inbounds %struct.flock, %struct.flock* %2, i64 0, i32 1
%7 = bitcast i64* %6 to i8*
%8 = load i32, i32* @SEEK_SET
%9 = getelementptr inbounds %struct.flock, %struct.flock* %2, i64 0, i32 0
store i32 %8, i32* %9
%10 = load i32, i32* @F_SETLK
%11 = call i32 @fcntl(i32 %0, i32 %10, %struct.flock* %2)
ret i32 %11
}
void display_put(void *display_io, unsigned int x, unsigned int y,
                 unsigned int color) {
  register unsigned int *addr;
  addr = (unsigned int *)((char *)display_io + 0xc000);
  addr += x + (y * 640);
  *addr = color;
}


x86 assembly (clang, -O0):
<display_put>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    -0x8(%rbp),%rax
add    $0xc000,%rax
mov    %rax,-0x20(%rbp)
mov    -0xc(%rbp),%ecx
imul   $0x280,-0x10(%rbp),%eax
add    %eax,%ecx
mov    -0x20(%rbp),%rax
mov    %ecx,%ecx
shl    $0x2,%rcx
add    %rcx,%rax
mov    %rax,-0x20(%rbp)
mov    -0x14(%rbp),%ecx
mov    -0x20(%rbp),%rax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<display_put>:
lea    (%rdx,%rdx,4),%eax
shl    $0x7,%eax
add    %esi,%eax
mov    %ecx,0xc000(%rdi,%rax,4)
ret

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

LLVM IR (-O2):
define void @display_put(i8* nocapture writeonly %0, i32 %1, i32 %2, i32 %3) {
%5 = getelementptr inbounds i8, i8* %0, i64 49152
%6 = bitcast i8* %5 to i32*
%7 = mul i32 %2, 640
%8 = add i32 %7, %1
%9 = zext i32 %8 to i64
%10 = getelementptr inbounds i32, i32* %6, i64 %9
store i32 %3, i32* %10
ret void
}
int __attribute__((no, noclone)) get_c(void) { return 1; }


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

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

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

LLVM IR (-O2):
define i32 @get_c() {
ret i32 1
}
/* Variables and functions */
int doubleToRawLongBits(double);
double longBitsToDouble(int);
double upper(double d) {
  return longBitsToDouble(doubleToRawLongBits(d) & 0xfffffffff8000000LL);
}


x86 assembly (clang, -O0):
<upper>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1040 <doubleToRawLongBits@plt>
cltq
and    $0xfffffffff8000000,%rax
mov    %eax,%edi
call   1030 <longBitsToDouble@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<upper>:
push   %rax
call   1040 <doubleToRawLongBits@plt>
and    $0xf8000000,%eax
mov    %eax,%edi
pop    %rax
jmp    1030 <longBitsToDouble@plt>

LLVM IR (-O0):
define double @upper(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = call i32 @doubleToRawLongBits(double %3)
%5 = sext i32 %4 to i64
%6 = and i64 %5, -134217728
%7 = trunc i64 %6 to i32
%8 = call double @longBitsToDouble(i32 %7)
ret double %8
}

LLVM IR (-O2):
define double @upper(double %0) {
%2 = tail call i32 @doubleToRawLongBits(double %0)
%3 = and i32 %2, -134217728
%4 = tail call double @longBitsToDouble(i32 %3)
ret double %4
}
/* Variables and functions */
scalar_t__ dup2(int, int);
int /*<<< orphan*/ t_error(char *);
void xdup2(int fd1, int fd2) {
  if (dup2(fd1, fd2) < 0) {
    t_error("failed to dup2 file descriptor");
  }
}


x86 assembly (clang, -O0):
<xdup2>:
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 <dup2@plt>
cmp    $0x0,%rax
jge    114f <xdup2+0x2f>
lea    0xeb6(%rip),%rdi
call   1040 <t_error@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xdup2>:
push   %rax
call   1030 <dup2@plt>
test   %rax,%rax
js     112d <xdup2+0xd>
pop    %rax
ret
lea    0xecc(%rip),%rdi
pop    %rax
jmp    1040 <t_error@plt>

LLVM IR (-O0):
@.str = [31 x i8] c"failed to dup2 file descriptor\00"
define void @xdup2(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 i64 @dup2(i32 %5, i32 %6)
%8 = icmp slt i64 %7, 0
br i1 %8, label %9, label %11
9: ; preds = %2
%10 = call i32 @t_error(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0))
br label %11
11: ; preds = %9, %2
ret void
}

LLVM IR (-O2):
@.str = [31 x i8] c"failed to dup2 file descriptor\00"
define void @xdup2(i32 %0, i32 %1) {
%3 = tail call i64 @dup2(i32 %0, i32 %1)
%4 = icmp slt i64 %3, 0
br i1 %4, label %5, label %7
5: ; preds = %2
%6 = tail call i32 @t_error(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0))
br label %7
7: ; preds = %5, %2
ret void
}
void x264_emms(void) {}


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

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

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

LLVM IR (-O2):
define void @x264_emms() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main() {
  bool run = false;
  if (run == true)
    printf("Running...\n");
  else
    printf("Not running.\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x1,-0x8(%rbp)
jne    1141 <main+0x31>
lea    0xec9(%rip),%rdi
call   1030 <printf@plt>
jmp    114d <main+0x3d>
lea    0xec4(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [12 x i8] c"Running...\0A\00"
@.str.1 = [14 x i8] c"Not running.\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
%3 = load i32, i32* %2
%4 = icmp eq i32 %3, 1
br i1 %4, label %5, label %7
5: ; preds = %0
%6 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
br label %9
7: ; preds = %0
%8 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0))
br label %9
9: ; preds = %7, %5
ret i32 0
}

LLVM IR (-O2):
@str = [13 x i8] c"Not running.\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ print(char *);
int /*<<< orphan*/ test_and();
int /*<<< orphan*/ test_not();
int /*<<< orphan*/ test_or();
int /*<<< orphan*/ test_shift();
int /*<<< orphan*/ test_xor();
void testmain() {
  print("bitwise operators");
  test_or();
  test_and();
  test_not();
  test_xor();
  test_shift();
}


x86 assembly (clang, -O0):
<testmain>:
push   %rbp
mov    %rsp,%rbp
lea    0xe95(%rip),%rdi
call   1070 <print@plt>
mov    $0x0,%al
call   1050 <test_or@plt>
mov    $0x0,%al
call   1080 <test_and@plt>
mov    $0x0,%al
call   1060 <test_not@plt>
mov    $0x0,%al
call   1030 <test_xor@plt>
mov    $0x0,%al
call   1040 <test_shift@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<testmain>:
push   %rax
lea    0xe98(%rip),%rdi
call   1070 <print@plt>
xor    %eax,%eax
call   1050 <test_or@plt>
xor    %eax,%eax
call   1080 <test_and@plt>
xor    %eax,%eax
call   1060 <test_not@plt>
xor    %eax,%eax
call   1030 <test_xor@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <test_shift@plt>

LLVM IR (-O0):
@.str = [18 x i8] c"bitwise operators\00"
define void @testmain() {
%1 = call i32 @print(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
%2 = call i32 (...) @test_or()
%3 = call i32 (...) @test_and()
%4 = call i32 (...) @test_not()
%5 = call i32 (...) @test_xor()
%6 = call i32 (...) @test_shift()
ret void
}

LLVM IR (-O2):
@.str = [18 x i8] c"bitwise operators\00"
define void @testmain() {
%1 = tail call i32 @print(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 (...) @test_or()
%3 = tail call i32 (...) @test_and()
%4 = tail call i32 (...) @test_not()
%5 = tail call i32 (...) @test_xor()
%6 = tail call i32 (...) @test_shift()
ret void
}
/* Variables and functions */
float bar(char *s, char c, double d, void (*fp)(char *s)) {
  fp(NULL);
  return -1.0;
}


x86 assembly (clang, -O0):
<bar>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %sil,%al
mov    %rdi,-0x8(%rbp)
mov    %al,-0x9(%rbp)
movsd  %xmm0,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
xor    %eax,%eax
mov    %eax,%edi
call   *-0x20(%rbp)
movss  0xed6(%rip),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bar>:
push   %rax
xor    %edi,%edi
call   *%rdx
movss  0xef3(%rip),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @bar(i8* %0, i8 signext %1, double %2, void (i8*)* %3) {
%5 = alloca i8*
%6 = alloca i8
%7 = alloca double
%8 = alloca void (i8*)*
store i8* %0, i8** %5
store i8 %1, i8* %6
store double %2, double* %7
store void (i8*)* %3, void (i8*)** %8
%9 = load void (i8*)*, void (i8*)** %8
ret float -1.000000e+00
}

LLVM IR (-O2):
define float @bar(i8* nocapture readnone %0, i8 signext %1, double %2, void (i8*)* nocapture %3) {
tail call void %3(i8* null)
ret float -1.000000e+00
}
/* Type definitions */
typedef unsigned int int32_t;

/* Variables and functions */
signed int mem_get_sbe32_aligned_as_int(const void *vmem) {
  const int32_t *mem = (const int32_t *)vmem;
  unsigned int val, raw = *mem;
  do {
    val = ((raw >> 24) & 0x000000ff) | ((raw >> 8) & 0x0000ff00) |
          ((raw << 8) & 0x00ff0000) | ((raw << 24) & 0xff000000);
  } while (0);
  return val;
}


x86 assembly (clang, -O0):
<mem_get_sbe32_aligned_as_int>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%eax
shr    $0x18,%eax
and    $0xff,%eax
mov    -0x18(%rbp),%ecx
shr    $0x8,%ecx
and    $0xff00,%ecx
or     %ecx,%eax
mov    -0x18(%rbp),%ecx
shl    $0x8,%ecx
and    $0xff0000,%ecx
or     %ecx,%eax
mov    -0x18(%rbp),%ecx
shl    $0x18,%ecx
and    $0xff000000,%ecx
or     %ecx,%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @mem_get_sbe32_aligned_as_int(i8* %0) {
%2 = alloca i8*
%3 = alloca i32*
%4 = alloca i32
%5 = alloca i32
store i8* %0, i8** %2
%6 = load i8*, i8** %2
%7 = bitcast i8* %6 to i32*
store i32* %7, i32** %3
%8 = load i32*, i32** %3
%9 = load i32, i32* %8
store i32 %9, i32* %5
br label %10
10: ; preds = %1
%11 = load i32, i32* %5
%12 = lshr i32 %11, 24
%13 = and i32 %12, 255
%14 = load i32, i32* %5
%15 = lshr i32 %14, 8
%16 = and i32 %15, 65280
%17 = or i32 %13, %16
%18 = load i32, i32* %5
%19 = shl i32 %18, 8
%20 = and i32 %19, 16711680
%21 = or i32 %17, %20
%22 = load i32, i32* %5
%23 = shl i32 %22, 24
%24 = and i32 %23, -16777216
%25 = or i32 %21, %24
store i32 %25, i32* %4
br label %26
26: ; preds = %10
%27 = load i32, i32* %4
ret i32 %27
}

LLVM IR (-O2):
define i32 @mem_get_sbe32_aligned_as_int(i8* nocapture %0) {
%2 = bitcast i8* %0 to i32*
%3 = load i32, i32* %2
%4 = tail call i32 @llvm.bswap.i32(i32 %3)
ret i32 %4
}