xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
int SetSlewRate(int slewRate) {
  fprintf(stderr, "NexStar does not support remote setting of slew rate.\n");
  return 0;
}


x86 assembly (clang, -O0):
<SetSlewRate>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    0x2ebe(%rip),%rax
mov    (%rax),%edi
lea    0xed5(%rip),%rsi
call   1030 <fprintf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<SetSlewRate>:
push   %rax
mov    0x2ec8(%rip),%rax
mov    (%rax),%edi
lea    0xedf(%rip),%rsi
call   1030 <fprintf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@stderr = global i32 0
@.str = [55 x i8] c"NexStar does not support remote setting of slew rate.\0A\00"
define i32 @SetSlewRate(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* @stderr
%4 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [55 x i8] c"NexStar does not support remote setting of slew rate.\0A\00"
define i32 @SetSlewRate(i32 %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
int default_layout(const char *the_title) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @default_layout(i8* nocapture readnone %0) {
ret i32 0
}
void WcAllowDuplicateClassPtrReg(ignored) int ignored;
{ return; }


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

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

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

LLVM IR (-O2):
define void @WcAllowDuplicateClassPtrReg(i32 %0) {
ret void
}
/* Variables and functions */
int basepick_with_errors(double, int);
double uniform();
int pick_a_base(double errate, int genotype[2]) {
  if (uniform() < 0.5)
    return basepick_with_errors(errate, genotype[0]);
  else
    return basepick_with_errors(errate, genotype[1]);
}


x86 assembly (clang, -O0):
<pick_a_base>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x10(%rbp)
mov    %rdi,-0x18(%rbp)
mov    $0x0,%al
call   1030 <uniform@plt>
movaps %xmm0,%xmm1
movsd  0xebd(%rip),%xmm0
ucomisd %xmm1,%xmm0
jbe    1165 <pick_a_base+0x45>
movsd  -0x10(%rbp),%xmm0
mov    -0x18(%rbp),%rax
mov    (%rax),%edi
call   1040 <basepick_with_errors@plt>
mov    %eax,-0x4(%rbp)
jmp    1179 <pick_a_base+0x59>
movsd  -0x10(%rbp),%xmm0
mov    -0x18(%rbp),%rax
mov    0x4(%rax),%edi
call   1040 <basepick_with_errors@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pick_a_base>:
push   %rbx
sub    $0x10,%rsp
mov    %rdi,%rbx
movsd  %xmm0,0x8(%rsp)
xor    %eax,%eax
call   1030 <uniform@plt>
movsd  0xec3(%rip),%xmm1
xor    %eax,%eax
ucomisd %xmm0,%xmm1
setbe  %al
mov    (%rbx,%rax,4),%edi
movsd  0x8(%rsp),%xmm0
add    $0x10,%rsp
pop    %rbx
jmp    1040 <basepick_with_errors@plt>

LLVM IR (-O0):
define i32 @pick_a_base(double %0, i32* %1) {
%3 = alloca i32
%4 = alloca double
%5 = alloca i32*
store double %0, double* %4
store i32* %1, i32** %5
%6 = call double (...) @uniform()
%7 = fcmp olt double %6, 5.000000e-01
br i1 %7, label %8, label %14
8: ; preds = %2
%9 = load double, double* %4
%10 = load i32*, i32** %5
%11 = getelementptr inbounds i32, i32* %10, i64 0
%12 = load i32, i32* %11
%13 = call i32 @basepick_with_errors(double %9, i32 %12)
store i32 %13, i32* %3
br label %20
14: ; preds = %2
%15 = load double, double* %4
%16 = load i32*, i32** %5
%17 = getelementptr inbounds i32, i32* %16, i64 1
%18 = load i32, i32* %17
%19 = call i32 @basepick_with_errors(double %15, i32 %18)
store i32 %19, i32* %3
br label %20
20: ; preds = %14, %8
%21 = load i32, i32* %3
ret i32 %21
}

LLVM IR (-O2):
define i32 @pick_a_base(double %0, i32* nocapture %1) {
%3 = tail call double (...) @uniform()
%4 = fcmp uge double %3, 5.000000e-01
%5 = zext i1 %4 to i64
%6 = getelementptr i32, i32* %1, i64 %5
%7 = load i32, i32* %6
%8 = tail call i32 @basepick_with_errors(double %0, i32 %7)
ret i32 %8
}
void baz(void) {
  register int xyzzy asm("0") = 1;
  asm volatile("" : : "r"(xyzzy));
}


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

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

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

LLVM IR (-O2):
define void @baz() {
tail call void asm sideeffect "", "{ax},~{dirflag},~{fpsr},~{flags}"(i32 1)
ret void
}
/* Variables and functions */
long syscall(int, int);
long int auditsec_answer(int answer) { return syscall(301, answer); }


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

x86 assembly (clang, -O2):
<auditsec_answer>:
mov    %edi,%esi
mov    $0x12d,%edi
jmp    1030 <syscall@plt>

LLVM IR (-O0):
define i64 @auditsec_answer(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i64 @syscall(i32 301, i32 %3)
ret i64 %4
}

LLVM IR (-O2):
define i64 @auditsec_answer(i32 %0) {
%2 = tail call i64 @syscall(i32 301, i32 %0)
ret i64 %2
}
int PDC_get_cur_col() {}


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

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

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

LLVM IR (-O2):
define i32 @PDC_get_cur_col() {
ret i32 undef
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  scalar_t__ font;
};
typedef TYPE_1__ XGCValues;

/* Variables and functions */
unsigned long get_XGCValues_font(void *_p) {
  return (unsigned long)((XGCValues *)_p)->font;
}


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

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

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

LLVM IR (-O2):
define i64 @get_XGCValues_font(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
ret i64 %3
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  char flags;
};
typedef TYPE_1__ XColor;

/* Variables and functions */
void set_XColor_flags(void *_p, char _v) { ((XColor *)_p)->flags = (char)_v; }


x86 assembly (clang, -O0):
<set_XColor_flags>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %rdi,-0x8(%rbp)
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_XColor_flags>:
mov    %sil,(%rdi)
ret

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

LLVM IR (-O2):
define void @set_XColor_flags(i8* nocapture writeonly %0, i8 signext %1) {
store i8 %1, i8* %0
ret void
}
/* Variables and functions */
int i2c_write_data_command(int, int);
void hdmi_write_reg(int i2c_addr, int i2c_data_byte) {
  int sr;
  sr = i2c_write_data_command(0x98, 0x90);
  sr = i2c_write_data_command(i2c_addr, 0x10);
  sr = i2c_write_data_command(i2c_data_byte & 0xff, 0x50);
}


x86 assembly (clang, -O0):
<hdmi_write_reg>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    $0x98,%edi
mov    $0x90,%esi
call   1030 <i2c_write_data_command@plt>
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%edi
mov    $0x10,%esi
call   1030 <i2c_write_data_command@plt>
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%edi
and    $0xff,%edi
mov    $0x50,%esi
call   1030 <i2c_write_data_command@plt>
mov    %eax,-0xc(%rbp)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<hdmi_write_reg>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
mov    $0x98,%edi
mov    $0x90,%esi
call   1030 <i2c_write_data_command@plt>
mov    %ebp,%edi
mov    $0x10,%esi
call   1030 <i2c_write_data_command@plt>
movzbl %bl,%edi
mov    $0x50,%esi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <i2c_write_data_command@plt>

LLVM IR (-O0):
define void @hdmi_write_reg(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = call i32 @i2c_write_data_command(i32 152, i32 144)
store i32 %6, i32* %5
%7 = load i32, i32* %3
%8 = call i32 @i2c_write_data_command(i32 %7, i32 16)
store i32 %8, i32* %5
%9 = load i32, i32* %4
%10 = and i32 %9, 255
%11 = call i32 @i2c_write_data_command(i32 %10, i32 80)
store i32 %11, i32* %5
ret void
}

LLVM IR (-O2):
define void @hdmi_write_reg(i32 %0, i32 %1) {
%3 = tail call i32 @i2c_write_data_command(i32 152, i32 144)
%4 = tail call i32 @i2c_write_data_command(i32 %0, i32 16)
%5 = and i32 %1, 255
%6 = tail call i32 @i2c_write_data_command(i32 %5, i32 80)
ret void
}
int test_imm_2Aint32_reg(int val) { return ((val) & (0x2A << 0)) ? -20 : -40; }


x86 assembly (clang, -O0):
<test_imm_2Aint32_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edx
and    $0x2a,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_2Aint32_reg>:
test   $0x2a,%dil
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_2Aint32_reg(i32 %0) {
%2 = and i32 %0, 42
%3 = icmp eq i32 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int Lambert3DBallToCube(double *, double *);
int ho2cu(double *ho, double *cu, int p) {
  int trash;
  double epsijk;
  epsijk = (double)p;
  trash = Lambert3DBallToCube(ho, cu);
  return 1;
}


x86 assembly (clang, -O0):
<ho2cu>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
cvtsi2sdl -0x14(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <Lambert3DBallToCube@plt>
mov    %eax,-0x18(%rbp)
mov    $0x1,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ho2cu>:
push   %rax
call   1030 <Lambert3DBallToCube@plt>
mov    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @ho2cu(double* %0, double* %1, i32 %2) {
%4 = alloca double*
%5 = alloca double*
%6 = alloca i32
%7 = alloca i32
%8 = alloca double
store double* %0, double** %4
store double* %1, double** %5
store i32 %2, i32* %6
%9 = load i32, i32* %6
%10 = sitofp i32 %9 to double
store double %10, double* %8
%11 = load double*, double** %4
%12 = load double*, double** %5
%13 = call i32 @Lambert3DBallToCube(double* %11, double* %12)
store i32 %13, i32* %7
ret i32 1
}

LLVM IR (-O2):
define i32 @ho2cu(double* %0, double* %1, i32 %2) {
%4 = tail call i32 @Lambert3DBallToCube(double* %0, double* %1)
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ test2_internal();
void test2() { test2_internal(); }


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

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

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

LLVM IR (-O2):
define void @test2() {
%1 = tail call i32 (...) @test2_internal()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int position;
  int number;
  int result;
  scanf("%d", &position);
  scanf("%d", &number);
  number = number >> position;
  result = number & 1;
  printf("%d", result);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
lea    0xeba(%rip),%rdi
lea    -0xc(%rbp),%rsi
call   1040 <scanf@plt>
mov    -0xc(%rbp),%eax
mov    -0x8(%rbp),%ecx
sar    %cl,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
and    $0x1,%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%esi
lea    0xe93(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
lea    0xed4(%rip),%rbx
lea    0xc(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
lea    0x8(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
mov    0x8(%rsp),%esi
mov    0xc(%rsp),%cl
sar    %cl,%esi
mov    %esi,0x8(%rsp)
and    $0x1,%esi
mov    %rbx,%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = bitcast i32* %1 to i8*
%4 = bitcast i32* %2 to i8*
%5 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%6 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
%7 = load i32, i32* %2
%8 = load i32, i32* %1
%9 = ashr i32 %7, %8
store i32 %9, i32* %2
%10 = and i32 %9, 1
%11 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %10)
ret i32 0
}
/* Variables and functions */
scalar_t__ qtMainSimple(char const *);
__attribute__((visibility("default"))) int CSharp_qtMainSimple(char *jarg1) {
  int jresult;
  char *arg1 = (char *)0;
  int result;
  arg1 = (char *)jarg1;
  result = (int)qtMainSimple((char const *)arg1);
  jresult = result;
  return jresult;
}


x86 assembly (clang, -O0):
<CSharp_qtMainSimple>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
movq   $0x0,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
call   1030 <qtMainSimple@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<CSharp_qtMainSimple>:
jmp    1030 <qtMainSimple@plt>

LLVM IR (-O0):
define i32 @CSharp_qtMainSimple(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i32
store i8* %0, i8** %2
store i8* null, i8** %4
%6 = load i8*, i8** %2
store i8* %6, i8** %4
%7 = load i8*, i8** %4
%8 = call i64 @qtMainSimple(i8* %7)
%9 = trunc i64 %8 to i32
store i32 %9, i32* %5
%10 = load i32, i32* %5
store i32 %10, i32* %3
%11 = load i32, i32* %3
ret i32 %11
}

LLVM IR (-O2):
define i32 @CSharp_qtMainSimple(i8* %0) {
%2 = tail call i64 @qtMainSimple(i8* %0)
%3 = trunc i64 %2 to i32
ret i32 %3
}
double sinh(x)
double x;
{
  x = exp(x);
  return 0.5 * (x - 1.0 / x);
}


x86 assembly (clang, -O0):
<sinh>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1030 <exp@plt>
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm1
movsd  0xecf(%rip),%xmm0
divsd  -0x8(%rbp),%xmm0
subsd  %xmm0,%xmm1
movsd  0xeb6(%rip),%xmm0
mulsd  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sinh>:
push   %rax
call   1030 <exp@plt>
movsd  0xee2(%rip),%xmm1
divsd  %xmm0,%xmm1
addsd  %xmm1,%xmm0
mulsd  0xeda(%rip),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @sinh(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = call double @exp(double %3)
store double %4, double* %2
%5 = load double, double* %2
%6 = load double, double* %2
%7 = fdiv double 1.000000e+00, %6
%8 = fsub double %5, %7
%9 = fmul double 5.000000e-01, %8
ret double %9
}

LLVM IR (-O2):
define double @sinh(double %0) {
%2 = tail call double @exp(double %0)
%3 = fdiv double 1.000000e+00, %2
%4 = fsub double %2, %3
%5 = fmul double %4, 5.000000e-01
ret double %5
}
double dist(double V, double t) { return V * t + 9.81 * t * t / 2; }


x86 assembly (clang, -O0):
<dist>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm2
movsd  0xee8(%rip),%xmm1
mulsd  -0x10(%rbp),%xmm1
mulsd  -0x10(%rbp),%xmm1
movsd  0xece(%rip),%xmm3
divsd  %xmm3,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<dist>:
movsd  0xef8(%rip),%xmm2
mulsd  %xmm1,%xmm2
mulsd  %xmm1,%xmm2
mulsd  0xef0(%rip),%xmm2
mulsd  %xmm1,%xmm0
addsd  %xmm2,%xmm0
ret

LLVM IR (-O0):
define double @dist(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = load double, double* %3
%6 = load double, double* %4
%7 = load double, double* %4
%8 = fmul double 9.810000e+00, %7
%9 = load double, double* %4
%10 = fmul double %8, %9
%11 = fdiv double %10, 2.000000e+00
%12 = call double @llvm.fmuladd.f64(double %5, double %6, double %11)
ret double %12
}

LLVM IR (-O2):
define double @dist(double %0, double %1) {
%3 = fmul double %1, 9.810000e+00
%4 = fmul double %3, %1
%5 = fmul double %4, 5.000000e-01
%6 = tail call double @llvm.fmuladd.f64(double %0, double %1, double %5)
ret double %6
}
int HelpItem59(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @HelpItem59() {
ret i32 0
}
int do_203() { return 203; }


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

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

LLVM IR (-O0):
define i32 @do_203() {
ret i32 203
}

LLVM IR (-O2):
define i32 @do_203() {
ret i32 203
}
/* Variables and functions */
int /*<<< orphan*/ puts(char *);
void foo() { puts("This is a shared lib"); }


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

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

LLVM IR (-O0):
@.str = [21 x i8] c"This is a shared lib\00"
define void @foo() {
%1 = call i32 @puts(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [21 x i8] c"This is a shared lib\00"
define void @foo() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
struct tlv_iterator {
  int dummy;
};

/* Variables and functions */
int tlv_iter_decode_u8(struct tlv_iterator *, int /*<<< orphan*/ *);
int tlv_iter_decode_client_cert_required(struct tlv_iterator *tlv_iter,
                                         uint8_t *client_cert_required) {
  return (tlv_iter_decode_u8(tlv_iter, client_cert_required));
}


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

x86 assembly (clang, -O2):
<tlv_iter_decode_client_cert_required>:
jmp    1030 <tlv_iter_decode_u8@plt>

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

LLVM IR (-O2):
%struct.tlv_iterator = type { i32 }
define i32 @tlv_iter_decode_client_cert_required(%struct.tlv_iterator* %0, i32* %1) {
%3 = tail call i32 @tlv_iter_decode_u8(%struct.tlv_iterator* %0, i32* %1)
ret i32 %3
}
unsigned addval_384(unsigned x) { return x + 3526938281U; }


x86 assembly (clang, -O0):
<addval_384>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0xd238cea9,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<addval_384>:
lea    -0x2dc73157(%rdi),%eax
ret

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

LLVM IR (-O2):
define i32 @addval_384(i32 %0) {
%2 = add i32 %0, -768029015
ret i32 %2
}
int do_496() { return 496; }


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

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

LLVM IR (-O0):
define i32 @do_496() {
ret i32 496
}

LLVM IR (-O2):
define i32 @do_496() {
ret i32 496
}
/* Variables and functions */
int /*<<< orphan*/ netserverinit(char const *);
int /*<<< orphan*/ printf(char *, char *);
int main(int argc, char const *argv[]) {
  if (argc != 1) {
    printf("%s\n", "Not enough arguments!!\nPlease run: \"./server [hostname] "
                   "[filemode]\"");
  }
  netserverinit(argv[1]);
  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)
cmpl   $0x1,-0x8(%rbp)
je     1153 <main+0x33>
lea    0xeb9(%rip),%rdi
lea    0xeb6(%rip),%rsi
call   1040 <printf@plt>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1030 <netserverinit@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    %rsi,%rbx
cmp    $0x1,%edi
je     113c <main+0x1c>
lea    0xed0(%rip),%rdi
lea    0xecd(%rip),%rsi
call   1040 <printf@plt>
mov    0x8(%rbx),%rdi
call   1030 <netserverinit@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%s\0A\00"
@.str.1 = [68 x i8] c"Not enough arguments!!\0APlease run: \22./server [hostname] [filemode]\22\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = load i32, i32* %4
%7 = icmp ne i32 %6, 1
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([68 x i8], [68 x i8]* @.str.1, i64 0, i64 0))
br label %10
10: ; preds = %8, %2
%11 = load i8**, i8*** %5
%12 = getelementptr inbounds i8*, i8** %11, i64 1
%13 = load i8*, i8** %12
%14 = call i32 @netserverinit(i8* %13)
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%s\0A\00"
@.str.1 = [68 x i8] c"Not enough arguments!!\0APlease run: \22./server [hostname] [filemode]\22\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp eq i32 %0, 1
br i1 %3, label %6, label %4
4: ; preds = %2
%5 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([68 x i8], [68 x i8]* @.str.1, i64 0, i64 0))
br label %6
6: ; preds = %4, %2
%7 = getelementptr inbounds i8*, i8** %1, i64 1
%8 = load i8*, i8** %7
%9 = tail call i32 @netserverinit(i8* %8)
ret i32 0
}
/* Type definitions */
struct ringbuf {
  int dummy;
};

/* Variables and functions */
size_t ringbuf_capacity(struct ringbuf const *);
size_t ringbuf_size(struct ringbuf const *);
size_t ringbuf_room(const struct ringbuf *rb) {
  return ringbuf_capacity(rb) - ringbuf_size(rb);
}


x86 assembly (clang, -O0):
<ringbuf_room>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <ringbuf_capacity@plt>
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <ringbuf_size@plt>
mov    %rax,%rcx
mov    -0x10(%rbp),%rax
sub    %rcx,%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ringbuf_room>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
call   1040 <ringbuf_capacity@plt>
mov    %rax,%rbx
mov    %r14,%rdi
call   1030 <ringbuf_size@plt>
sub    %rax,%rbx
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
%struct.ringbuf = type { i32 }
define i64 @ringbuf_room(%struct.ringbuf* %0) {
%2 = alloca %struct.ringbuf*
store %struct.ringbuf* %0, %struct.ringbuf** %2
%3 = load %struct.ringbuf*, %struct.ringbuf** %2
%4 = call i64 @ringbuf_capacity(%struct.ringbuf* %3)
%5 = load %struct.ringbuf*, %struct.ringbuf** %2
%6 = call i64 @ringbuf_size(%struct.ringbuf* %5)
%7 = sub i64 %4, %6
ret i64 %7
}

LLVM IR (-O2):
%struct.ringbuf = type { i32 }
define i64 @ringbuf_room(%struct.ringbuf* %0) {
%2 = tail call i64 @ringbuf_capacity(%struct.ringbuf* %0)
%3 = tail call i64 @ringbuf_size(%struct.ringbuf* %0)
%4 = sub i64 %2, %3
ret i64 %4
}
void music_sheet_remove_note_at(struct music_sheet *self,
                                struct music_sheet_iter *iter) {}


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

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

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

LLVM IR (-O2):
%struct.music_sheet = type opaque
%struct.music_sheet_iter = type opaque
define void @music_sheet_remove_note_at(%struct.music_sheet* nocapture %0, %struct.music_sheet_iter* nocapture %1) {
ret void
}
/* Type definitions */
struct sockaddr_un {
  int /*<<< orphan*/ sun_path;
  int /*<<< orphan*/ sun_family;
};

/* Variables and functions */
int /*<<< orphan*/ AF_UNIX;
int /*<<< orphan*/ snprintf(int /*<<< orphan*/, int, char *, char const *);
void un_initaddr(struct sockaddr_un *sa, const char *guid) {
  sa->sun_family = AF_UNIX;
  snprintf(sa->sun_path, sizeof(sa->sun_path), "/tmp/fssh-%s", guid);
}


x86 assembly (clang, -O0):
<un_initaddr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2ec1(%rip),%rax
mov    (%rax),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,0x4(%rax)
mov    -0x8(%rbp),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rcx
mov    $0x4,%esi
lea    0xeba(%rip),%rdx
call   1030 <snprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<un_initaddr>:
mov    %rsi,%rcx
mov    0x2ece(%rip),%rax
mov    (%rax),%eax
mov    %eax,0x4(%rdi)
mov    (%rdi),%edi
lea    0xed8(%rip),%rdx
mov    $0x4,%esi
jmp    1030 <snprintf@plt>

LLVM IR (-O0):
%struct.sockaddr_un = type { i32, i32 }
@AF_UNIX = global i32 0
@.str = [13 x i8] c"/tmp/fssh-%s\00"
define void @un_initaddr(%struct.sockaddr_un* %0, i8* %1) {
%3 = alloca %struct.sockaddr_un*
%4 = alloca i8*
store %struct.sockaddr_un* %0, %struct.sockaddr_un** %3
store i8* %1, i8** %4
%5 = load i32, i32* @AF_UNIX
%6 = load %struct.sockaddr_un*, %struct.sockaddr_un** %3
%7 = getelementptr inbounds %struct.sockaddr_un, %struct.sockaddr_un* %6, i32 0, i32 1
store i32 %5, i32* %7
%8 = load %struct.sockaddr_un*, %struct.sockaddr_un** %3
%9 = getelementptr inbounds %struct.sockaddr_un, %struct.sockaddr_un* %8, i32 0, i32 0
%10 = load i32, i32* %9
%11 = load i8*, i8** %4
%12 = call i32 @snprintf(i32 %10, i32 4, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* %11)
ret void
}

LLVM IR (-O2):
%struct.sockaddr_un = type { i32, i32 }
@AF_UNIX = global i32 0
@.str = [13 x i8] c"/tmp/fssh-%s\00"
define void @un_initaddr(%struct.sockaddr_un* nocapture %0, i8* %1) {
%3 = load i32, i32* @AF_UNIX
%4 = getelementptr inbounds %struct.sockaddr_un, %struct.sockaddr_un* %0, i64 0, i32 1
store i32 %3, i32* %4
%5 = getelementptr inbounds %struct.sockaddr_un, %struct.sockaddr_un* %0, i64 0, i32 0
%6 = load i32, i32* %5
%7 = tail call i32 @snprintf(i32 %6, i32 4, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* %1)
ret void
}
unsigned long kattach_hash(char *str) {
  unsigned long hash = 5381;
  int c;
  while ((c = *str++))
    hash = ((hash << 5) + hash) + c;
  return hash;
}


x86 assembly (clang, -O0):
<kattach_hash>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movq   $0x1505,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movsbl (%rax),%eax
mov    %eax,-0x14(%rbp)
cmp    $0x0,%eax
je     114a <kattach_hash+0x4a>
mov    -0x10(%rbp),%rax
shl    $0x5,%rax
add    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
add    %rcx,%rax
mov    %rax,-0x10(%rbp)
jmp    1110 <kattach_hash+0x10>
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<kattach_hash>:
mov    (%rdi),%cl
test   %cl,%cl
je     112d <kattach_hash+0x2d>
add    $0x1,%rdi
mov    $0x1505,%eax
nop
mov    %rax,%rdx
shl    $0x5,%rdx
add    %rax,%rdx
movsbq %cl,%rax
add    %rdx,%rax
movzbl (%rdi),%ecx
add    $0x1,%rdi
test   %cl,%cl
jne    1110 <kattach_hash+0x10>
ret
mov    $0x1505,%eax
ret

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

LLVM IR (-O2):
define i64 @kattach_hash(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %14, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %12, %4 ], [ %2, %1 ]
%6 = phi i8* [ %8, %4 ], [ %0, %1 ]
%7 = phi i64 [ %11, %4 ], [ 5381, %1 ]
%8 = getelementptr inbounds i8, i8* %6, i64 1
%9 = mul i64 %7, 33
%10 = sext i8 %5 to i64
%11 = add i64 %9, %10
%12 = load i8, i8* %8
%13 = icmp eq i8 %12, 0
br i1 %13, label %14, label %4
14: ; preds = %4, %1
%15 = phi i64 [ 5381, %1 ], [ %11, %4 ]
ret i64 %15
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
int isqrt(int);
void t_sqrt_168() {
  Assert_real((isqrt(168) == 12),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/stdlib/isqrt.c",
              845, ("Integer square root of 168 should be 12"));
}


x86 assembly (clang, -O0):
<t_sqrt_168>:
push   %rbp
mov    %rsp,%rbp
mov    $0xa8,%edi
call   1030 <isqrt@plt>
cmp    $0xc,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xec0(%rip),%rsi
mov    $0x34d,%edx
lea    0xf56(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_sqrt_168>:
push   %rax
mov    $0xa8,%edi
call   1030 <isqrt@plt>
xor    %edi,%edi
cmp    $0xc,%eax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf60(%rip),%rcx
mov    $0x34d,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [162 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/stdlib/isqrt.c\00"
@.str.1 = [40 x i8] c"Integer square root of 168 should be 12\00"
define void @t_sqrt_168() {
%1 = call i32 @isqrt(i32 168)
%2 = icmp eq i32 %1, 12
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([162 x i8], [162 x i8]* @.str, i64 0, i64 0), i32 845, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [162 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/stdlib/isqrt.c\00"
@.str.1 = [40 x i8] c"Integer square root of 168 should be 12\00"
define void @t_sqrt_168() {
%1 = tail call i32 @isqrt(i32 168)
%2 = icmp eq i32 %1, 12
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([162 x i8], [162 x i8]* @.str, i64 0, i64 0), i32 845, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.1, i64 0, i64 0))
ret void
}
int prost(int n) {
  int i;
  for (i = 2; i * i <= n; ++i) {
    if (n % i == 0) {
      return 0;
    }
  }
  return 1;
}


x86 assembly (clang, -O0):
<prost>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
movl   $0x2,-0xc(%rbp)
mov    -0xc(%rbp),%eax
imul   -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
jg     114d <prost+0x4d>
mov    -0x8(%rbp),%eax
cltd
idivl  -0xc(%rbp)
cmp    $0x0,%edx
jne    113a <prost+0x3a>
movl   $0x0,-0x4(%rbp)
jmp    1154 <prost+0x54>
jmp    113f <prost+0x3f>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    110e <prost+0xe>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<prost>:
mov    $0x1,%ecx
cmp    $0x4,%edi
jl     1125 <prost+0x25>
mov    $0x2,%esi
nop
mov    %edi,%eax
cltd
idiv   %esi
test   %edx,%edx
je     1128 <prost+0x28>
add    $0x1,%esi
mov    %esi,%eax
imul   %esi,%eax
cmp    %edi,%eax
jle    1110 <prost+0x10>
mov    %ecx,%eax
ret
xor    %ecx,%ecx
mov    %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @prost(i32 %0) {
%2 = icmp slt i32 %0, 4
br i1 %2, label %11, label %6
3: ; preds = %6
%4 = mul nsw i32 %10, %10
%5 = icmp sgt i32 %4, %0
br i1 %5, label %11, label %6
6: ; preds = %1, %3
%7 = phi i32 [ %10, %3 ], [ 2, %1 ]
%8 = srem i32 %0, %7
%9 = icmp eq i32 %8, 0
%10 = add nuw nsw i32 %7, 1
br i1 %9, label %11, label %3
11: ; preds = %6, %3, %1
%12 = phi i32 [ 1, %1 ], [ 1, %3 ], [ 0, %6 ]
ret i32 %12
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(int argc, char const *argv[]) {
  printf("Hello, World!\c\n");
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [16 x i8] c"Hello, World!c\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [15 x i8] c"Hello, World!c\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @str, i64 0, i64 0))
ret i32 0
}
moo() { return "abc" + 1; }


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

x86 assembly (clang, -O2):
<moo>:
lea    0xef9(%rip),%rax
add    $0x1,%eax
ret

LLVM IR (-O0):
@.str = [4 x i8] c"abc\00"
define i32 @moo() {
ret i32 ptrtoint (i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 1) to i32)
}

LLVM IR (-O2):
@.str = [4 x i8] c"abc\00"
define i32 @moo() {
ret i32 ptrtoint (i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 1) to i32)
}
/* Type definitions */
typedef int /*<<< orphan*/ wchar_t;

/* Variables and functions */
scalar_t__ memcpy(char *, char *, size_t);
wchar_t *__wmemcpy(wchar_t *s1, const wchar_t *s2, size_t n) {
  return (wchar_t *)memcpy((char *)s1, (char *)s2, n * sizeof(wchar_t));
}


x86 assembly (clang, -O0):
<__wmemcpy>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
shl    $0x2,%rdx
call   1030 <memcpy@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__wmemcpy>:
shl    $0x2,%rdx
jmp    1030 <memcpy@plt>

LLVM IR (-O0):
define i32* @__wmemcpy(i32* %0, i32* %1, i64 %2) {
%4 = alloca i32*
%5 = alloca i32*
%6 = alloca i64
store i32* %0, i32** %4
store i32* %1, i32** %5
store i64 %2, i64* %6
%7 = load i32*, i32** %4
%8 = bitcast i32* %7 to i8*
%9 = load i32*, i32** %5
%10 = bitcast i32* %9 to i8*
%11 = load i64, i64* %6
%12 = mul i64 %11, 4
%13 = call i64 @memcpy(i8* %8, i8* %10, i64 %12)
%14 = inttoptr i64 %13 to i32*
ret i32* %14
}

LLVM IR (-O2):
define i32* @__wmemcpy(i32* %0, i32* %1, i64 %2) {
%4 = bitcast i32* %0 to i8*
%5 = bitcast i32* %1 to i8*
%6 = shl i64 %2, 2
%7 = tail call i64 @memcpy(i8* %4, i8* %5, i64 %6)
%8 = inttoptr i64 %7 to i32*
ret i32* %8
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void triangle() {
  printf("\n    /\\     ");
  printf("\n   /  \\    ");
  printf("\n  /    \\     ");
  printf("\n /      \\    ");
}


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

x86 assembly (clang, -O2):
<triangle>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <printf@plt>
lea    0xee9(%rip),%rdi
call   1030 <printf@plt>
lea    0xeea(%rip),%rdi
call   1030 <printf@plt>
lea    0xeed(%rip),%rdi
pop    %rax
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [13 x i8] c"\0A /\\ \00"
@.str.1 = [13 x i8] c"\0A / \\ \00"
@.str.2 = [15 x i8] c"\0A / \\ \00"
@.str.3 = [15 x i8] c"\0A / \\ \00"
define void @triangle() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0))
%3 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str.2, i64 0, i64 0))
%4 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str.3, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef unsigned int uint8_t;

/* Variables and functions */
unsigned _wyr24(const uint8_t *p, unsigned k) {
  return (((unsigned)p[0]) << 16) | (((unsigned)p[k >> 1]) << 8) | p[k - 1];
}


x86 assembly (clang, -O0):
<_wyr24>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
shl    $0x10,%eax
mov    -0x8(%rbp),%rcx
mov    -0xc(%rbp),%edx
shr    $0x1,%edx
mov    %edx,%edx
mov    (%rcx,%rdx,4),%ecx
shl    $0x8,%ecx
or     %ecx,%eax
mov    -0x8(%rbp),%rcx
mov    -0xc(%rbp),%edx
sub    $0x1,%edx
mov    %edx,%edx
or     (%rcx,%rdx,4),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_wyr24>:
mov    (%rdi),%ecx
shl    $0x10,%ecx
mov    %esi,%eax
shr    %eax
mov    (%rdi,%rax,4),%eax
shl    $0x8,%eax
or     %ecx,%eax
add    $0xffffffff,%esi
or     (%rdi,%rsi,4),%eax
ret

LLVM IR (-O0):
define i32 @_wyr24(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 = getelementptr inbounds i32, i32* %5, i64 0
%7 = load i32, i32* %6
%8 = shl i32 %7, 16
%9 = load i32*, i32** %3
%10 = load i32, i32* %4
%11 = lshr i32 %10, 1
%12 = zext i32 %11 to i64
%13 = getelementptr inbounds i32, i32* %9, i64 %12
%14 = load i32, i32* %13
%15 = shl i32 %14, 8
%16 = or i32 %8, %15
%17 = load i32*, i32** %3
%18 = load i32, i32* %4
%19 = sub i32 %18, 1
%20 = zext i32 %19 to i64
%21 = getelementptr inbounds i32, i32* %17, i64 %20
%22 = load i32, i32* %21
%23 = or i32 %16, %22
ret i32 %23
}

LLVM IR (-O2):
define i32 @_wyr24(i32* nocapture %0, i32 %1) {
%3 = load i32, i32* %0
%4 = shl i32 %3, 16
%5 = lshr i32 %1, 1
%6 = zext i32 %5 to i64
%7 = getelementptr inbounds i32, i32* %0, i64 %6
%8 = load i32, i32* %7
%9 = shl i32 %8, 8
%10 = or i32 %9, %4
%11 = add i32 %1, -1
%12 = zext i32 %11 to i64
%13 = getelementptr inbounds i32, i32* %0, i64 %12
%14 = load i32, i32* %13
%15 = or i32 %10, %14
ret i32 %15
}
/* Variables and functions */
int getchar();
int read_char(void) {
  int ch = getchar();
  if (ch == '\n' || ch == '\t')
    return ' ';
  return ch;
}


x86 assembly (clang, -O0):
<read_char>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <getchar@plt>
mov    %eax,-0x8(%rbp)
cmpl   $0xa,-0x8(%rbp)
je     1136 <read_char+0x26>
cmpl   $0x9,-0x8(%rbp)
jne    1142 <read_char+0x32>
movl   $0x20,-0x4(%rbp)
jmp    1148 <read_char+0x38>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<read_char>:
push   %rax
xor    %eax,%eax
call   1030 <getchar@plt>
lea    -0x9(%rax),%ecx
cmp    $0x2,%ecx
mov    $0x20,%ecx
cmovb  %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @read_char() {
%1 = alloca i32
%2 = alloca i32
%3 = call i32 (...) @getchar()
store i32 %3, i32* %2
%4 = load i32, i32* %2
%5 = icmp eq i32 %4, 10
br i1 %5, label %9, label %6
6: ; preds = %0
%7 = load i32, i32* %2
%8 = icmp eq i32 %7, 9
br i1 %8, label %9, label %10
9: ; preds = %6, %0
store i32 32, i32* %1
br label %12
10: ; preds = %6
%11 = load i32, i32* %2
store i32 %11, i32* %1
br label %12
12: ; preds = %10, %9
%13 = load i32, i32* %1
ret i32 %13
}

LLVM IR (-O2):
define i32 @read_char() {
%1 = tail call i32 (...) @getchar()
%2 = add i32 %1, -9
%3 = icmp ult i32 %2, 2
%4 = select i1 %3, i32 32, i32 %1
ret i32 %4
}
void deleteOpTreeValue(void *value, int children_count) {}


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

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

LLVM IR (-O0):
define void @deleteOpTreeValue(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
ret void
}

LLVM IR (-O2):
define void @deleteOpTreeValue(i8* nocapture %0, i32 %1) {
ret void
}
/* Type definitions */
struct cop_strdict_node {
  int dummy;
};

/* Variables and functions */
__attribute__((unused)) struct cop_strdict_node *cop_strdict_init(void) {
  return NULL;
}


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

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

LLVM IR (-O0):
%struct.cop_strdict_node = type { i32 }
define %struct.cop_strdict_node* @cop_strdict_init() {
ret %struct.cop_strdict_node* null
}

LLVM IR (-O2):
%struct.cop_strdict_node = type { i32 }
define noalias %struct.cop_strdict_node* @cop_strdict_init() {
ret %struct.cop_strdict_node* null
}
/* Variables and functions */
int /*<<< orphan*/ pool_cleanup(int /*<<< orphan*/);
void _ensure_pool_cleanup_gracefully_handles_null_pool(void) {
  pool_cleanup(0);
}


x86 assembly (clang, -O0):
<_ensure_pool_cleanup_gracefully_handles_null_pool>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
call   1030 <pool_cleanup@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<_ensure_pool_cleanup_gracefully_handles_null_pool>:
xor    %edi,%edi
jmp    1030 <pool_cleanup@plt>

LLVM IR (-O0):
define void @_ensure_pool_cleanup_gracefully_handles_null_pool() {
%1 = call i32 @pool_cleanup(i32 0)
ret void
}

LLVM IR (-O2):
define void @_ensure_pool_cleanup_gracefully_handles_null_pool() {
%1 = tail call i32 @pool_cleanup(i32 0)
ret void
}
/* Variables and functions */
int atoi(char *);
int int_val(char pT[]) { return atoi(pT); }


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

x86 assembly (clang, -O2):
<int_val>:
jmp    1030 <atoi@plt>

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

LLVM IR (-O2):
define i32 @int_val(i8* nocapture %0) {
%2 = tail call i32 @atoi(i8* %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ panic(char *, char *, int /*<<< orphan*/);
void int_00(void) { panic("Divide By Zero Error", "#00", 0); }


x86 assembly (clang, -O0):
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
lea    0xef3(%rip),%rsi
xor    %edx,%edx
call   1030 <panic@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
lea    0xee9(%rip),%rdi
lea    0xef7(%rip),%rsi
xor    %edx,%edx
jmp    1030 <panic@plt>

LLVM IR (-O0):
@.str = [21 x i8] c"Divide By Zero Error\00"
@.str.1 = [4 x i8] c"\00"
define void @int_00() {
%1 = call i32 @panic(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 0)
ret void
}

LLVM IR (-O2):
@.str = [21 x i8] c"Divide By Zero Error\00"
@.str.1 = [4 x i8] c"\00"
define void @int_00() {
%1 = tail call i32 @panic(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 0)
ret void
}
/* Variables and functions */
float atanf(float);
float intr_wrap_014(float p1) { return atanf(p1); }


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

x86 assembly (clang, -O2):
<intr_wrap_014>:
jmp    1030 <atanf@plt>

LLVM IR (-O0):
define float @intr_wrap_014(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = call float @atanf(float %3)
ret float %4
}

LLVM IR (-O2):
define float @intr_wrap_014(float %0) {
%2 = tail call float @atanf(float %0)
ret float %2
}