xunge/DecIR huggingface dataset:
/* Type definitions */
typedef int /*<<< orphan*/ wchar_t;
typedef int /*<<< orphan*/ va_list;

/* Variables and functions */
int __ms_vfwscanf(int /*<<< orphan*/, int /*<<< orphan*/ const *,
                  int /*<<< orphan*/);
int /*<<< orphan*/ stdin;
int __ms_vwscanf(const wchar_t *__restrict__ format, va_list arg) {
  return __ms_vfwscanf(stdin, format, arg);
}


x86 assembly (clang, -O0):
<__ms_vwscanf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    0x2ec2(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rsi
mov    -0xc(%rbp),%edx
call   1030 <__ms_vfwscanf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__ms_vwscanf>:
mov    %esi,%edx
mov    %rdi,%rsi
mov    0x2ecc(%rip),%rax
mov    (%rax),%edi
jmp    1030 <__ms_vfwscanf@plt>

LLVM IR (-O0):
@stdin = global i32 0
define i32 @__ms_vwscanf(i32* noalias %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
store i32* %0, i32** %3
store i32 %1, i32* %4
%5 = load i32, i32* @stdin
%6 = load i32*, i32** %3
%7 = load i32, i32* %4
%8 = call i32 @__ms_vfwscanf(i32 %5, i32* %6, i32 %7)
ret i32 %8
}

LLVM IR (-O2):
@stdin = global i32 0
define i32 @__ms_vwscanf(i32* noalias %0, i32 %1) {
%3 = load i32, i32* @stdin
%4 = tail call i32 @__ms_vfwscanf(i32 %3, i32* %0, i32 %1)
ret i32 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fputs(char *, int /*<<< orphan*/ *);
int /*<<< orphan*/ print_special(unsigned char const *, char *,
                                 int /*<<< orphan*/ *);
void print_entry_name(const unsigned char *s, FILE *out) {
  print_special(s, "\"=[] \f\n\r\t\v", out);
  fputs(" =", out);
}


x86 assembly (clang, -O0):
<print_entry_name>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rdx
lea    0xec1(%rip),%rsi
call   1040 <print_special@plt>
mov    -0x10(%rbp),%rsi
lea    0xebc(%rip),%rdi
call   1030 <fputs@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_entry_name>:
push   %rbx
mov    %rsi,%rbx
lea    0xed5(%rip),%rsi
mov    %rbx,%rdx
call   1030 <print_special@plt>
lea    0xed1(%rip),%rdi
mov    $0x2,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
pop    %rbx
jmp    1040 <fwrite@plt>

LLVM IR (-O0):
@.str = [11 x i8] c"\22=[] \0C\0A\0D\09\0B\00"
@.str.1 = [3 x i8] c" =\00"
define void @print_entry_name(i8* %0, i32* %1) {
%3 = alloca i8*
%4 = alloca i32*
store i8* %0, i8** %3
store i32* %1, i32** %4
%5 = load i8*, i8** %3
%6 = load i32*, i32** %4
%7 = call i32 @print_special(i8* %5, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32* %6)
%8 = load i32*, i32** %4
%9 = call i32 @fputs(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %8)
ret void
}

LLVM IR (-O2):
@.str = [11 x i8] c"\22=[] \0C\0A\0D\09\0B\00"
@.str.1 = [3 x i8] c" =\00"
define void @print_entry_name(i8* %0, i32* %1) {
%3 = tail call i32 @print_special(i8* %0, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32* %1)
%4 = tail call i64 @fwrite(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i64 2, i64 1, i32* %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ CInit();
int /*<<< orphan*/ runTransition(int /*<<< orphan*/);
int main() {
  CInit();
  runTransition(0);
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @CInit()
%2 = tail call i32 @runTransition(i32 0)
ret i32 0
}
int do_684() { return 684; }


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

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

LLVM IR (-O0):
define i32 @do_684() {
ret i32 684
}

LLVM IR (-O2):
define i32 @do_684() {
ret i32 684
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
double calculate_tax(int);
void test3(void) { assert(112.0 == calculate_tax(3000)); }


x86 assembly (clang, -O0):
<test3>:
push   %rbp
mov    %rsp,%rbp
mov    $0xbb8,%edi
call   1030 <calculate_tax@plt>
movaps %xmm0,%xmm1
movsd  0xec7(%rip),%xmm0
ucomisd %xmm1,%xmm0
sete   %al
setnp  %cl
and    %cl,%al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<test3>:
push   %rax
mov    $0xbb8,%edi
call   1030 <calculate_tax@plt>
cmpeqsd 0xecc(%rip),%xmm0
movq   %xmm0,%rdi
and    $0x1,%edi
pop    %rax
jmp    1040 <assert@plt>

LLVM IR (-O0):
define void @test3() {
%1 = call double @calculate_tax(i32 3000)
%2 = fcmp oeq double 1.120000e+02, %1
%3 = zext i1 %2 to i32
%4 = call i32 @assert(i32 %3)
ret void
}

LLVM IR (-O2):
define void @test3() {
%1 = tail call double @calculate_tax(i32 3000)
%2 = fcmp oeq double %1, 1.120000e+02
%3 = zext i1 %2 to i32
%4 = tail call i32 @assert(i32 %3)
ret void
}
int ft_modulo(int a, int b) { return (a % b); }


x86 assembly (clang, -O0):
<ft_modulo>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cltd
idivl  -0x8(%rbp)
mov    %edx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_modulo>:
mov    %edi,%eax
cltd
idiv   %esi
mov    %edx,%eax
ret

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

LLVM IR (-O2):
define i32 @ft_modulo(i32 %0, i32 %1) {
%3 = srem i32 %0, %1
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ usleep(int);
void brush_motor_set_pwm(void *brushmotor_address, unsigned int pwm) {
  *((volatile int *)brushmotor_address + 2) = pwm;
  usleep(50);
}


x86 assembly (clang, -O0):
<brush_motor_set_pwm>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,0x8(%rax)
mov    $0x32,%edi
call   1030 <usleep@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<brush_motor_set_pwm>:
mov    %esi,0x8(%rdi)
mov    $0x32,%edi
jmp    1030 <usleep@plt>

LLVM IR (-O0):
define void @brush_motor_set_pwm(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = load i8*, i8** %3
%7 = bitcast i8* %6 to i32*
%8 = getelementptr inbounds i32, i32* %7, i64 2
store volatile i32 %5, i32* %8
%9 = call i32 @usleep(i32 50)
ret void
}

LLVM IR (-O2):
define void @brush_motor_set_pwm(i8* %0, i32 %1) {
%3 = getelementptr inbounds i8, i8* %0, i64 8
%4 = bitcast i8* %3 to i32*
store volatile i32 %1, i32* %4
%5 = tail call i32 @usleep(i32 50)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ check_button_press();
int /*<<< orphan*/ check_button_release();
int /*<<< orphan*/ usleep(int);
void main() {
  for (;;) {
    check_button_release();
    check_button_press();
    usleep(25 * 1000);
    ;
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
jmp    1139 <main+0x9>
mov    $0x0,%al
call   1040 <check_button_release@plt>
mov    $0x0,%al
call   1030 <check_button_press@plt>
mov    $0x61a8,%edi
call   1050 <usleep@plt>
jmp    1139 <main+0x9>

x86 assembly (clang, -O2):
<main>:
push   %rax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1040 <check_button_release@plt>
xor    %eax,%eax
call   1030 <check_button_press@plt>
mov    $0x61a8,%edi
call   1050 <usleep@plt>
jmp    1140 <main+0x10>

LLVM IR (-O0):
define void @main() {
br label %1
1: ; preds = %1, %0
%2 = call i32 (...) @check_button_release()
%3 = call i32 (...) @check_button_press()
%4 = call i32 @usleep(i32 25000)
br label %1
}

LLVM IR (-O2):
define void @main() {
br label %1
1: ; preds = %1, %0
%2 = tail call i32 (...) @check_button_release()
%3 = tail call i32 (...) @check_button_press()
%4 = tail call i32 @usleep(i32 25000)
br label %1
}
/* Variables and functions */
int fatfs_rmdir(char const *);
int rmdir(const char *path) { return fatfs_rmdir(path); }


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

x86 assembly (clang, -O2):
<rmdir>:
jmp    1030 <fatfs_rmdir@plt>

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

LLVM IR (-O2):
define i32 @rmdir(i8* %0) {
%2 = tail call i32 @fatfs_rmdir(i8* %0)
ret i32 %2
}
int test_imm_AEuint64_highword_reg(unsigned long long val) {
  return ((val >> 32) & (0xAE << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_AEuint64_highword_reg(i64 %0) {
%2 = and i64 %0, 747324309504
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
void jiffies_to_clock_t(void) { nsc_assert(0, __func__); }


x86 assembly (clang, -O0):
<jiffies_to_clock_t>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
lea    0xee3(%rip),%rsi
mov    $0x0,%al
call   1030 <nsc_assert@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<jiffies_to_clock_t>:
lea    0xee9(%rip),%rsi
xor    %edi,%edi
xor    %eax,%eax
jmp    1030 <nsc_assert@plt>

LLVM IR (-O0):
@__func__.jiffies_to_clock_t = [19 x i8] c"jiffies_to_clock_t\00"
define void @jiffies_to_clock_t() {
%1 = call i32 (i32, i8*, ...) bitcast (i32 (...)* @nsc_assert to i32 (i32, i8*, ...)*)(i32 0, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @__func__.jiffies_to_clock_t, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@__func__.jiffies_to_clock_t = [19 x i8] c"jiffies_to_clock_t\00"
define void @jiffies_to_clock_t() {
%1 = tail call i32 (i32, i8*, ...) bitcast (i32 (...)* @nsc_assert to i32 (i32, i8*, ...)*)(i32 0, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @__func__.jiffies_to_clock_t, i64 0, i64 0))
ret void
}
/* Variables and functions */
int z_arc_v2_aux_reg_read(int);
int /*<<< orphan*/ z_arc_v2_aux_reg_write(int, int);
void arc_core_mpu_enable(void) {
  z_arc_v2_aux_reg_write((0x409),
                         z_arc_v2_aux_reg_read((0x409)) | (0x40000000));
}


x86 assembly (clang, -O0):
<arc_core_mpu_enable>:
push   %rbp
mov    %rsp,%rbp
mov    $0x409,%edi
call   1040 <z_arc_v2_aux_reg_read@plt>
mov    %eax,%esi
or     $0x40000000,%esi
mov    $0x409,%edi
call   1030 <z_arc_v2_aux_reg_write@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<arc_core_mpu_enable>:
push   %rax
mov    $0x409,%edi
call   1040 <z_arc_v2_aux_reg_read@plt>
or     $0x40000000,%eax
mov    $0x409,%edi
mov    %eax,%esi
pop    %rax
jmp    1030 <z_arc_v2_aux_reg_write@plt>

LLVM IR (-O0):
define void @arc_core_mpu_enable() {
%1 = call i32 @z_arc_v2_aux_reg_read(i32 1033)
%2 = or i32 %1, 1073741824
%3 = call i32 @z_arc_v2_aux_reg_write(i32 1033, i32 %2)
ret void
}

LLVM IR (-O2):
define void @arc_core_mpu_enable() {
%1 = tail call i32 @z_arc_v2_aux_reg_read(i32 1033)
%2 = or i32 %1, 1073741824
%3 = tail call i32 @z_arc_v2_aux_reg_write(i32 1033, i32 %2)
ret void
}
void set_value(volatile unsigned *gpio, int pin, int value) {
  if (value == 1) {
    *(gpio + 7) = 1 << pin;
  }
}


x86 assembly (clang, -O0):
<set_value>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
cmpl   $0x1,-0x10(%rbp)
jne    112b <set_value+0x2b>
mov    -0xc(%rbp),%ecx
mov    $0x1,%eax
shl    %cl,%eax
mov    %eax,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,0x1c(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_value>:
cmp    $0x1,%edx
jne    1111 <set_value+0x11>
mov    $0x1,%eax
mov    %esi,%ecx
shl    %cl,%eax
mov    %eax,0x1c(%rdi)
ret

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

LLVM IR (-O2):
define void @set_value(i32* %0, i32 %1, i32 %2) {
%4 = icmp eq i32 %2, 1
br i1 %4, label %5, label %8
5: ; preds = %3
%6 = shl nuw i32 1, %1
%7 = getelementptr inbounds i32, i32* %0, i64 7
store volatile i32 %6, i32* %7
br label %8
8: ; preds = %5, %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, float);
int /*<<< orphan*/ scanf(char *, float *);
main() {
  float num;
  scanf("%f", &num);
  printf("%0.2f", num * num);
  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>
movss  -0x8(%rbp),%xmm0
mulss  -0x8(%rbp),%xmm0
lea    0xeb3(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1040 <scanf@plt>
movss  0x4(%rsp),%xmm0
mulss  %xmm0,%xmm0
lea    0xec0(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%f\00"
@.str.1 = [6 x i8] c"%0.2f\00"
define i32 @main() {
%1 = alloca float
%2 = bitcast float* %1 to i8*
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), float* %1)
%4 = load float, float* %1
%5 = fmul float %4, %4
%6 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), float %5)
ret i32 0
}
struct kmem_cache *memcg_root_cache(struct kmem_cache *s) {
  return s;
}


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

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

LLVM IR (-O0):
%struct.kmem_cache = type opaque
define %struct.kmem_cache* @memcg_root_cache(%struct.kmem_cache* %0) {
%2 = alloca %struct.kmem_cache*
store %struct.kmem_cache* %0, %struct.kmem_cache** %2
%3 = load %struct.kmem_cache*, %struct.kmem_cache** %2
ret %struct.kmem_cache* %3
}

LLVM IR (-O2):
%struct.kmem_cache = type opaque
define %struct.kmem_cache* @memcg_root_cache(%struct.kmem_cache* readnone returned %0) {
ret %struct.kmem_cache* %0
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ foo(char *, int);
int main(void) {
  foo("bar\n", 4);
  exit(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
mov    $0x4,%esi
call   1030 <foo@plt>
xor    %edi,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
mov    $0x4,%esi
call   1030 <foo@plt>
xor    %edi,%edi
call   1040 <exit@plt>

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

LLVM IR (-O2):
@.str = [5 x i8] c"bar\0A\00"
define i32 @main() {
%1 = tail call i32 @foo(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 4)
%2 = tail call i32 @exit(i32 0)
unreachable
}
/* Type definitions */
struct gg_http {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ EINVAL;
int /*<<< orphan*/ errno;
int gg_userlist_get_watch_fd(struct gg_http *h) {
  errno = EINVAL;
  return -1;
}


x86 assembly (clang, -O0):
<gg_userlist_get_watch_fd>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    0x2ec9(%rip),%rax
mov    (%rax),%ecx
mov    0x2ec8(%rip),%rax
mov    %ecx,(%rax)
mov    $0xffffffff,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<gg_userlist_get_watch_fd>:
mov    0x2ed1(%rip),%rax
mov    (%rax),%eax
mov    0x2ed0(%rip),%rcx
mov    %eax,(%rcx)
mov    $0xffffffff,%eax
ret

LLVM IR (-O0):
%struct.gg_http = type { i32 }
@EINVAL = global i32 0
@errno = global i32 0
define i32 @gg_userlist_get_watch_fd(%struct.gg_http* %0) {
%2 = alloca %struct.gg_http*
store %struct.gg_http* %0, %struct.gg_http** %2
%3 = load i32, i32* @EINVAL
store i32 %3, i32* @errno
ret i32 -1
}

LLVM IR (-O2):
%struct.gg_http = type { i32 }
@EINVAL = global i32 0
@errno = global i32 0
define i32 @gg_userlist_get_watch_fd(%struct.gg_http* nocapture readnone %0) {
%2 = load i32, i32* @EINVAL
store i32 %2, i32* @errno
ret i32 -1
}
/* Variables and functions */
bool ts_toggle_allocation_recording(bool value) { return false; }


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

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

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

LLVM IR (-O2):
define i32 @ts_toggle_allocation_recording(i32 %0) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ fread(char *, int, int, int /*<<< orphan*/);
int /*<<< orphan*/ puts(char *);
int /*<<< orphan*/ stdin;
int main() {
  char foo[10];
  fread(foo, 1, 9, stdin);
  foo[9] = '\0';
  puts(foo);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0xe(%rbp),%rdi
mov    0x2eae(%rip),%rax
mov    (%rax),%ecx
mov    $0x1,%esi
mov    $0x9,%edx
call   1040 <fread@plt>
movb   $0x0,-0x5(%rbp)
lea    -0xe(%rbp),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
mov    0x2ebc(%rip),%rax
mov    (%rax),%ecx
lea    0x6(%rsp),%rbx
mov    %rbx,%rdi
mov    $0x1,%esi
mov    $0x9,%edx
call   1040 <fread@plt>
movb   $0x0,0xf(%rsp)
mov    %rbx,%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@stdin = global i32 0
define i32 @main() {
%1 = alloca i32
%2 = alloca [10 x i8]
store i32 0, i32* %1
%3 = getelementptr inbounds [10 x i8], [10 x i8]* %2, i64 0, i64 0
%4 = load i32, i32* @stdin
%5 = call i32 @fread(i8* %3, i32 1, i32 9, i32 %4)
%6 = getelementptr inbounds [10 x i8], [10 x i8]* %2, i64 0, i64 9
store i8 0, i8* %6
%7 = getelementptr inbounds [10 x i8], [10 x i8]* %2, i64 0, i64 0
%8 = call i32 @puts(i8* %7)
ret i32 0
}

LLVM IR (-O2):
@stdin = global i32 0
define i32 @main() {
%1 = alloca [10 x i8]
%2 = getelementptr inbounds [10 x i8], [10 x i8]* %1, i64 0, i64 0
%3 = load i32, i32* @stdin
%4 = call i32 @fread(i8* %2, i32 1, i32 9, i32 %3)
%5 = getelementptr inbounds [10 x i8], [10 x i8]* %1, i64 0, i64 9
store i8 0, i8* %5
%6 = call i32 @puts(i8* %2)
ret i32 0
}
unsigned long long get_IEEE_mantissa(double d) {
  return (*(unsigned long long *)&d & 0x000fffffffffffffULL);
}


x86 assembly (clang, -O0):
<get_IEEE_mantissa>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movabs $0xfffffffffffff,%rax
and    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_IEEE_mantissa>:
movq   %xmm0,%rcx
movabs $0xfffffffffffff,%rax
and    %rcx,%rax
ret

LLVM IR (-O0):
define i64 @get_IEEE_mantissa(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = bitcast double* %2 to i64*
%4 = load i64, i64* %3
%5 = and i64 %4, 4503599627370495
ret i64 %5
}

LLVM IR (-O2):
define i64 @get_IEEE_mantissa(double %0) {
%2 = bitcast double %0 to i64
%3 = and i64 %2, 4503599627370495
ret i64 %3
}
/* Variables and functions */
int /*<<< orphan*/ InitCStars();
int /*<<< orphan*/ InitCracks();
int /*<<< orphan*/ InitFlippers();
int /*<<< orphan*/ InitFloatingScores();
int /*<<< orphan*/ InitFuseBalls();
int /*<<< orphan*/ InitPlayer();
int /*<<< orphan*/ InitPulsars();
int /*<<< orphan*/ InitShots();
int /*<<< orphan*/ InitSpikes();
int /*<<< orphan*/ InitTankers();
void STInitialize() {
  InitCStars();
  InitPlayer();
  InitSpikes();
  InitShots();
  InitPlayer();
  InitFlippers();
  InitPulsars();
  InitFuseBalls();
  InitTankers();
  InitCracks();
  InitFloatingScores();
}


x86 assembly (clang, -O0):
<STInitialize>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   10b0 <InitCStars@plt>
mov    $0x0,%al
call   1050 <InitPlayer@plt>
mov    $0x0,%al
call   1070 <InitSpikes@plt>
mov    $0x0,%al
call   1040 <InitShots@plt>
mov    $0x0,%al
call   1050 <InitPlayer@plt>
mov    $0x0,%al
call   1030 <InitFlippers@plt>
mov    $0x0,%al
call   10a0 <InitPulsars@plt>
mov    $0x0,%al
call   1090 <InitFuseBalls@plt>
mov    $0x0,%al
call   10c0 <InitTankers@plt>
mov    $0x0,%al
call   1080 <InitCracks@plt>
mov    $0x0,%al
call   1060 <InitFloatingScores@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<STInitialize>:
push   %rax
xor    %eax,%eax
call   10b0 <InitCStars@plt>
xor    %eax,%eax
call   1050 <InitPlayer@plt>
xor    %eax,%eax
call   1070 <InitSpikes@plt>
xor    %eax,%eax
call   1040 <InitShots@plt>
xor    %eax,%eax
call   1050 <InitPlayer@plt>
xor    %eax,%eax
call   1030 <InitFlippers@plt>
xor    %eax,%eax
call   10a0 <InitPulsars@plt>
xor    %eax,%eax
call   1090 <InitFuseBalls@plt>
xor    %eax,%eax
call   10c0 <InitTankers@plt>
xor    %eax,%eax
call   1080 <InitCracks@plt>
xor    %eax,%eax
pop    %rcx
jmp    1060 <InitFloatingScores@plt>

LLVM IR (-O0):
define void @STInitialize() {
%1 = call i32 (...) @InitCStars()
%2 = call i32 (...) @InitPlayer()
%3 = call i32 (...) @InitSpikes()
%4 = call i32 (...) @InitShots()
%5 = call i32 (...) @InitPlayer()
%6 = call i32 (...) @InitFlippers()
%7 = call i32 (...) @InitPulsars()
%8 = call i32 (...) @InitFuseBalls()
%9 = call i32 (...) @InitTankers()
%10 = call i32 (...) @InitCracks()
%11 = call i32 (...) @InitFloatingScores()
ret void
}

LLVM IR (-O2):
define void @STInitialize() {
%1 = tail call i32 (...) @InitCStars()
%2 = tail call i32 (...) @InitPlayer()
%3 = tail call i32 (...) @InitSpikes()
%4 = tail call i32 (...) @InitShots()
%5 = tail call i32 (...) @InitPlayer()
%6 = tail call i32 (...) @InitFlippers()
%7 = tail call i32 (...) @InitPulsars()
%8 = tail call i32 (...) @InitFuseBalls()
%9 = tail call i32 (...) @InitTankers()
%10 = tail call i32 (...) @InitCracks()
%11 = tail call i32 (...) @InitFloatingScores()
ret void
}
void RandomFunc(unsigned short input[1], unsigned short output[1]) {
  unsigned short state[1];
  unsigned short local1;
  {
    state[0UL] = input[0UL] + (unsigned short)2885;
    local1 = 0UL;
    while (local1 < 1UL) {
      if (state[0UL] > local1) {
      }
      local1 += 2UL;
    }
    output[0UL] = state[0UL] + 371143069UL;
  }
}


x86 assembly (clang, -O0):
<RandomFunc>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movzwl (%rax),%eax
add    $0xb45,%eax
mov    %ax,-0x12(%rbp)
movw   $0x0,-0x14(%rbp)
movzwl -0x14(%rbp),%eax
cmp    $0x1,%rax
jae    1156 <RandomFunc+0x56>
movzwl -0x12(%rbp),%eax
movzwl -0x14(%rbp),%ecx
cmp    %ecx,%eax
jle    1145 <RandomFunc+0x45>
jmp    1145 <RandomFunc+0x45>
movzwl -0x14(%rbp),%eax
add    $0x2,%rax
mov    %ax,-0x14(%rbp)
jmp    1122 <RandomFunc+0x22>
movzwl -0x12(%rbp),%eax
add    $0x161f319d,%rax
mov    %ax,%cx
mov    -0x10(%rbp),%rax
mov    %cx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<RandomFunc>:
movzwl (%rdi),%eax
add    $0x3ce2,%eax
mov    %ax,(%rsi)
ret

LLVM IR (-O0):
define void @RandomFunc(i16* %0, i16* %1) {
%3 = alloca i16*
%4 = alloca i16*
%5 = alloca [1 x i16]
%6 = alloca i16
store i16* %0, i16** %3
store i16* %1, i16** %4
%7 = load i16*, i16** %3
%8 = getelementptr inbounds i16, i16* %7, i64 0
%9 = load i16, i16* %8
%10 = zext i16 %9 to i32
%11 = add nsw i32 %10, 2885
%12 = trunc i32 %11 to i16
%13 = getelementptr inbounds [1 x i16], [1 x i16]* %5, i64 0, i64 0
store i16 %12, i16* %13
store i16 0, i16* %6
br label %14
14: ; preds = %26, %2
%15 = load i16, i16* %6
%16 = zext i16 %15 to i64
%17 = icmp ult i64 %16, 1
br i1 %17, label %18, label %31
18: ; preds = %14
%19 = getelementptr inbounds [1 x i16], [1 x i16]* %5, i64 0, i64 0
%20 = load i16, i16* %19
%21 = zext i16 %20 to i32
%22 = load i16, i16* %6
%23 = zext i16 %22 to i32
%24 = icmp sgt i32 %21, %23
br i1 %24, label %25, label %26
25: ; preds = %18
br label %26
26: ; preds = %25, %18
%27 = load i16, i16* %6
%28 = zext i16 %27 to i64
%29 = add i64 %28, 2
%30 = trunc i64 %29 to i16
store i16 %30, i16* %6
br label %14
31: ; preds = %14
%32 = getelementptr inbounds [1 x i16], [1 x i16]* %5, i64 0, i64 0
%33 = load i16, i16* %32
%34 = zext i16 %33 to i64
%35 = add i64 %34, 371143069
%36 = trunc i64 %35 to i16
%37 = load i16*, i16** %4
%38 = getelementptr inbounds i16, i16* %37, i64 0
store i16 %36, i16* %38
ret void
}

LLVM IR (-O2):
define void @RandomFunc(i16* nocapture %0, i16* nocapture writeonly %1) {
%3 = load i16, i16* %0
%4 = add i16 %3, 15586
store i16 %4, i16* %1
ret void
}
unsigned xrop3_33_0_1(unsigned char s, unsigned char t) {
  unsigned D = 0x00ff;
  unsigned S = ((unsigned)s << 8) | s;
  unsigned T = ((unsigned)t << 8) | t;
  unsigned stk1;
  unsigned stk2;
  stk2 = D ^ T;
  stk1 = S | stk2;
  stk1 = ~stk1;
  return (stk1 & S) | (stk1 & (~T)) | (T & (~S) & D);
}


x86 assembly (clang, -O0):
<xrop3_33_0_1>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
movl   $0xff,-0x8(%rbp)
movzbl -0x1(%rbp),%eax
shl    $0x8,%eax
movzbl -0x1(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0xc(%rbp)
movzbl -0x2(%rbp),%eax
shl    $0x8,%eax
movzbl -0x2(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%eax
xor    -0x10(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0xc(%rbp),%eax
or     -0x18(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
xor    $0xffffffff,%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
and    -0xc(%rbp),%eax
mov    -0x14(%rbp),%ecx
mov    -0x10(%rbp),%edx
xor    $0xffffffff,%edx
and    %edx,%ecx
or     %ecx,%eax
mov    -0x10(%rbp),%ecx
mov    -0xc(%rbp),%edx
xor    $0xffffffff,%edx
and    %edx,%ecx
and    -0x8(%rbp),%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<xrop3_33_0_1>:
mov    %edi,%eax
shl    $0x8,%eax
or     %edi,%eax
mov    %esi,%ecx
shl    $0x8,%ecx
or     %esi,%ecx
mov    %ecx,%edx
xor    $0xff,%edx
or     %eax,%ecx
or     %edx,%ecx
not    %ecx
not    %eax
and    %esi,%eax
or     %ecx,%eax
ret

LLVM IR (-O0):
define i32 @xrop3_33_0_1(i8 zeroext %0, i8 zeroext %1) {
%3 = alloca i8
%4 = alloca i8
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
store i8 %0, i8* %3
store i8 %1, i8* %4
store i32 255, i32* %5
%10 = load i8, i8* %3
%11 = zext i8 %10 to i32
%12 = shl i32 %11, 8
%13 = load i8, i8* %3
%14 = zext i8 %13 to i32
%15 = or i32 %12, %14
store i32 %15, i32* %6
%16 = load i8, i8* %4
%17 = zext i8 %16 to i32
%18 = shl i32 %17, 8
%19 = load i8, i8* %4
%20 = zext i8 %19 to i32
%21 = or i32 %18, %20
store i32 %21, i32* %7
%22 = load i32, i32* %5
%23 = load i32, i32* %7
%24 = xor i32 %22, %23
store i32 %24, i32* %9
%25 = load i32, i32* %6
%26 = load i32, i32* %9
%27 = or i32 %25, %26
store i32 %27, i32* %8
%28 = load i32, i32* %8
%29 = xor i32 %28, -1
store i32 %29, i32* %8
%30 = load i32, i32* %8
%31 = load i32, i32* %6
%32 = and i32 %30, %31
%33 = load i32, i32* %8
%34 = load i32, i32* %7
%35 = xor i32 %34, -1
%36 = and i32 %33, %35
%37 = or i32 %32, %36
%38 = load i32, i32* %7
%39 = load i32, i32* %6
%40 = xor i32 %39, -1
%41 = and i32 %38, %40
%42 = load i32, i32* %5
%43 = and i32 %41, %42
%44 = or i32 %37, %43
ret i32 %44
}

LLVM IR (-O2):
define i32 @xrop3_33_0_1(i8 zeroext %0, i8 zeroext %1) {
%3 = zext i8 %0 to i32
%4 = mul nuw nsw i32 %3, 257
%5 = zext i8 %1 to i32
%6 = mul nuw nsw i32 %5, 257
%7 = xor i32 %6, 255
%8 = or i32 %6, %4
%9 = or i32 %8, %7
%10 = xor i32 %9, -1
%11 = xor i32 %4, -1
%12 = and i32 %11, %5
%13 = or i32 %12, %10
ret i32 %13
}
__attribute__((always_)) const int xispinf(double x) {
  return x == __builtin_inf();
}


x86 assembly (clang, -O0):
<xispinf>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  0xeea(%rip),%xmm1
ucomisd %xmm1,%xmm0
sete   %al
setnp  %cl
and    %cl,%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<xispinf>:
xor    %eax,%eax
ucomisd 0xef6(%rip),%xmm0
setae  %al
ret

LLVM IR (-O0):
define i32 @xispinf(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fcmp oeq double %3, 0x7FF0000000000000
%5 = zext i1 %4 to i32
ret i32 %5
}

LLVM IR (-O2):
define i32 @xispinf(double %0) {
%2 = fcmp oeq double %0, 0x7FF0000000000000
%3 = zext i1 %2 to i32
ret i32 %3
}
/* Variables and functions */
size_t page_id(const void *addr) {
  size_t offset =
      (unsigned char *)addr - (unsigned char *)(void *)0x2130051300000000UL;
  return offset / (1 << 10);
}


x86 assembly (clang, -O0):
<page_id>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movabs $0x2130051300000000,%rcx
05 30 21
sub    %rcx,%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
shr    $0xa,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<page_id>:
movabs $0xdecffaed00000000,%rax
fa cf de
add    %rdi,%rax
shr    $0xa,%rax
ret

LLVM IR (-O0):
define i64 @page_id(i8* %0) {
%2 = alloca i8*
%3 = alloca i64
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = ptrtoint i8* %4 to i64
%6 = sub i64 %5, 2391416981296250880
store i64 %6, i64* %3
%7 = load i64, i64* %3
%8 = udiv i64 %7, 1024
ret i64 %8
}

LLVM IR (-O2):
define i64 @page_id(i8* %0) {
%2 = ptrtoint i8* %0 to i64
%3 = add i64 %2, -2391416981296250880
%4 = lshr i64 %3, 10
ret i64 %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void f5(int x) {
#pragma GCC optimization_level 0
  printf("%d\n", x);
}


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

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

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define void @f5(i32 %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %0)
ret void
}
/* Variables and functions */
scalar_t__ gets(char *);
int /*<<< orphan*/ puts(char *);
int main() {
  char a[1000];
  while (gets(a)) {
    puts(a);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x3f0,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x3f0(%rbp),%rdi
call   1040 <gets@plt>
cmp    $0x0,%rax
je     1159 <main+0x39>
lea    -0x3f0(%rbp),%rdi
call   1030 <puts@plt>
jmp    1132 <main+0x12>
xor    %eax,%eax
add    $0x3f0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x3f0,%rsp
mov    %rsp,%rdi
call   1040 <gets@plt>
test   %rax,%rax
je     1155 <main+0x35>
mov    %rsp,%rbx
nopl   0x0(%rax,%rax,1)
mov    %rbx,%rdi
call   1030 <puts@plt>
mov    %rbx,%rdi
call   1040 <gets@plt>
test   %rax,%rax
jne    1140 <main+0x20>
xor    %eax,%eax
add    $0x3f0,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca [1000 x i8]
store i32 0, i32* %1
br label %3
3: ; preds = %7, %0
%4 = getelementptr inbounds [1000 x i8], [1000 x i8]* %2, i64 0, i64 0
%5 = call i64 @gets(i8* %4)
%6 = icmp ne i64 %5, 0
br i1 %6, label %7, label %10
7: ; preds = %3
%8 = getelementptr inbounds [1000 x i8], [1000 x i8]* %2, i64 0, i64 0
%9 = call i32 @puts(i8* %8)
br label %3
10: ; preds = %3
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = alloca [1000 x i8]
%2 = getelementptr inbounds [1000 x i8], [1000 x i8]* %1, i64 0, i64 0
%3 = call i64 @gets(i8* %2)
%4 = icmp eq i64 %3, 0
br i1 %4, label %9, label %5
5: ; preds = %0, %5
%6 = call i32 @puts(i8* %2)
%7 = call i64 @gets(i8* %2)
%8 = icmp eq i64 %7, 0
br i1 %8, label %9, label %5
9: ; preds = %5, %0
ret i32 0
}
void mus_ubshort_to_char(unsigned char *j, unsigned short x) {
  unsigned char *ox = (unsigned char *)&x;
  j[0] = ox[1];
  j[1] = ox[0];
}


x86 assembly (clang, -O0):
<mus_ubshort_to_char>:
push   %rbp
mov    %rsp,%rbp
mov    %si,%ax
mov    %rdi,-0x8(%rbp)
mov    %ax,-0xa(%rbp)
lea    -0xa(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    0x1(%rax),%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
mov    -0x18(%rbp),%rax
mov    (%rax),%cl
mov    -0x8(%rbp),%rax
mov    %cl,0x1(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<mus_ubshort_to_char>:
rol    $0x8,%si
mov    %si,(%rdi)
ret

LLVM IR (-O0):
define void @mus_ubshort_to_char(i8* %0, i16 zeroext %1) {
%3 = alloca i8*
%4 = alloca i16
%5 = alloca i8*
store i8* %0, i8** %3
store i16 %1, i16* %4
%6 = bitcast i16* %4 to i8*
store i8* %6, i8** %5
%7 = load i8*, i8** %5
%8 = getelementptr inbounds i8, i8* %7, i64 1
%9 = load i8, i8* %8
%10 = load i8*, i8** %3
%11 = getelementptr inbounds i8, i8* %10, i64 0
store i8 %9, i8* %11
%12 = load i8*, i8** %5
%13 = getelementptr inbounds i8, i8* %12, i64 0
%14 = load i8, i8* %13
%15 = load i8*, i8** %3
%16 = getelementptr inbounds i8, i8* %15, i64 1
store i8 %14, i8* %16
ret void
}

LLVM IR (-O2):
define void @mus_ubshort_to_char(i8* nocapture writeonly %0, i16 zeroext %1) {
%3 = trunc i16 %1 to i8
%4 = lshr i16 %1, 8
%5 = trunc i16 %4 to i8
store i8 %5, i8* %0
%6 = getelementptr inbounds i8, i8* %0, i64 1
store i8 %3, i8* %6
ret void
}
/* Variables and functions */
int /*<<< orphan*/ sprintf(char *, char *, int);
void mostrar_valor(void *valor, char *buffer) {
  sprintf(buffer, "%i", *((int *)valor));
}


x86 assembly (clang, -O0):
<mostrar_valor>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rax
mov    (%rax),%edx
lea    0xecf(%rip),%rsi
call   1030 <sprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mostrar_valor>:
mov    %rsi,%rax
mov    (%rdi),%edx
lea    0xee4(%rip),%rsi
mov    %rax,%rdi
jmp    1030 <sprintf@plt>

LLVM IR (-O0):
@.str = [3 x i8] c"%i\00"
define void @mostrar_valor(i8* %0, i8* %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 i32*
%8 = load i32, i32* %7
%9 = call i32 @sprintf(i8* %5, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %8)
ret void
}

LLVM IR (-O2):
@.str = [3 x i8] c"%i\00"
define void @mostrar_valor(i8* nocapture %0, i8* nocapture writeonly %1) {
%3 = bitcast i8* %0 to i32*
%4 = load i32, i32* %3
%5 = tail call i32 @sprintf(i8* dereferenceable(1) %1, i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %4)
ret void
}
/* Type definitions */
struct sk_measurement {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ sk_m_print_const(struct sk_measurement *, int /*<<< orphan*/,
                                    int);
void sk_m_print(struct sk_measurement *m, int tid) {
  sk_m_print_const(m, 0, tid);
}


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

x86 assembly (clang, -O2):
<sk_m_print>:
mov    %esi,%edx
xor    %esi,%esi
jmp    1030 <sk_m_print_const@plt>

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

LLVM IR (-O2):
%struct.sk_measurement = type { i32 }
define void @sk_m_print(%struct.sk_measurement* %0, i32 %1) {
%3 = tail call i32 @sk_m_print_const(%struct.sk_measurement* %0, i32 0, i32 %1)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, unsigned char);
void fprint_inc_Rn(FILE *stream, unsigned char n) {
  fprintf(stream, "INC   R%X                        ", n);
}


x86 assembly (clang, -O0):
<fprint_inc_Rn>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %sil,%al
mov    %rdi,-0x8(%rbp)
mov    %al,-0x9(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xed3(%rip),%rsi
movzbl -0x9(%rbp),%edx
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fprint_inc_Rn>:
mov    %esi,%edx
lea    0xee7(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@.str = [34 x i8] c"INC R%X \00"
define void @fprint_inc_Rn(i32* %0, i8 zeroext %1) {
%3 = alloca i32*
%4 = alloca i8
store i32* %0, i32** %3
store i8 %1, i8* %4
%5 = load i32*, i32** %3
%6 = load i8, i8* %4
%7 = call i32 @fprintf(i32* %5, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0), i8 zeroext %6)
ret void
}

LLVM IR (-O2):
@.str = [34 x i8] c"INC R%X \00"
define void @fprint_inc_Rn(i32* nocapture %0, i8 zeroext %1) {
%3 = tail call i32 @fprintf(i32* %0, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0), i8 zeroext %1)
ret void
}
/* Type definitions */
struct mg_server {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ elog(int, char *, char const *, char const *);
char *mg_set_option(struct mg_server *, char const *, char const *);
void setopt(struct mg_server *s, const char *opt, const char *val) {
  const char *err_msg = mg_set_option(s, opt, val);
  if (err_msg != NULL) {
    elog(1, "Error setting [%s]: [%s]", opt, err_msg);
  }
}


x86 assembly (clang, -O0):
<setopt>:
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
call   1030 <mg_set_option@plt>
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
je     116d <setopt+0x4d>
mov    -0x10(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    $0x1,%edi
lea    0xe98(%rip),%rsi
call   1040 <elog@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<setopt>:
push   %rbx
mov    %rsi,%rbx
call   1030 <mg_set_option@plt>
test   %rax,%rax
je     1146 <setopt+0x26>
lea    0xecb(%rip),%rsi
mov    $0x1,%edi
mov    %rbx,%rdx
mov    %rax,%rcx
pop    %rbx
jmp    1040 <elog@plt>
pop    %rbx
ret

LLVM IR (-O0):
%struct.mg_server = type { i32 }
@.str = [25 x i8] c"Error setting [%s]: [%s]\00"
define void @setopt(%struct.mg_server* %0, i8* %1, i8* %2) {
%4 = alloca %struct.mg_server*
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i8*
store %struct.mg_server* %0, %struct.mg_server** %4
store i8* %1, i8** %5
store i8* %2, i8** %6
%8 = load %struct.mg_server*, %struct.mg_server** %4
%9 = load i8*, i8** %5
%10 = load i8*, i8** %6
%11 = call i8* @mg_set_option(%struct.mg_server* %8, i8* %9, i8* %10)
store i8* %11, i8** %7
%12 = load i8*, i8** %7
%13 = icmp ne i8* %12, null
br i1 %13, label %14, label %18
14: ; preds = %3
%15 = load i8*, i8** %5
%16 = load i8*, i8** %7
%17 = call i32 @elog(i32 1, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i8* %15, i8* %16)
br label %18
18: ; preds = %14, %3
ret void
}

LLVM IR (-O2):
%struct.mg_server = type { i32 }
@.str = [25 x i8] c"Error setting [%s]: [%s]\00"
define void @setopt(%struct.mg_server* %0, i8* %1, i8* %2) {
%4 = tail call i8* @mg_set_option(%struct.mg_server* %0, i8* %1, i8* %2)
%5 = icmp eq i8* %4, null
br i1 %5, label %8, label %6
6: ; preds = %3
%7 = tail call i32 @elog(i32 1, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i8* %1, i8* %4)
br label %8
8: ; preds = %6, %3
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ config_file_name;

/* Variables and functions */
int /*<<< orphan*/ restart_apache();
int /*<<< orphan*/ snprintf(char *, int, char *, char const *);
scalar_t__ unlink(char *);
void remove_proxy(const char *host) {
  char config_file_name[1024];
  snprintf(config_file_name, sizeof(config_file_name),
           "/etc/apache2/other/localghost.%s.conf", host);
  if (unlink(config_file_name) == 0) {
    restart_apache();
  }
}


x86 assembly (clang, -O0):
<remove_proxy>:
push   %rbp
mov    %rsp,%rbp
sub    $0x410,%rsp
mov    %rdi,-0x8(%rbp)
lea    -0x410(%rbp),%rdi
mov    -0x8(%rbp),%rcx
mov    $0x400,%esi
lea    0xeaa(%rip),%rdx
call   1040 <snprintf@plt>
lea    -0x410(%rbp),%rdi
call   1030 <unlink@plt>
cmp    $0x0,%rax
jne    1178 <remove_proxy+0x48>
mov    $0x0,%al
call   1050 <restart_apache@plt>
add    $0x410,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<remove_proxy>:
push   %rbx
sub    $0x400,%rsp
mov    %rdi,%rcx
lea    0xebe(%rip),%rdx
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    $0x400,%esi
call   1040 <snprintf@plt>
mov    %rbx,%rdi
call   1030 <unlink@plt>
test   %rax,%rax
jne    1166 <remove_proxy+0x36>
xor    %eax,%eax
call   1050 <restart_apache@plt>
add    $0x400,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [38 x i8] c"/etc/apache2/other/localghost.%s.conf\00"
define void @remove_proxy(i8* %0) {
%2 = alloca i8*
%3 = alloca [1024 x i8]
store i8* %0, i8** %2
%4 = getelementptr inbounds [1024 x i8], [1024 x i8]* %3, i64 0, i64 0
%5 = load i8*, i8** %2
%6 = call i32 @snprintf(i8* %4, i32 1024, i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0), i8* %5)
%7 = getelementptr inbounds [1024 x i8], [1024 x i8]* %3, i64 0, i64 0
%8 = call i64 @unlink(i8* %7)
%9 = icmp eq i64 %8, 0
br i1 %9, label %10, label %12
10: ; preds = %1
%11 = call i32 (...) @restart_apache()
br label %12
12: ; preds = %10, %1
ret void
}

LLVM IR (-O2):
@.str = [38 x i8] c"/etc/apache2/other/localghost.%s.conf\00"
define void @remove_proxy(i8* %0) {
%2 = alloca [1024 x i8]
%3 = getelementptr inbounds [1024 x i8], [1024 x i8]* %2, i64 0, i64 0
%4 = call i32 @snprintf(i8* %3, i32 1024, i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0), i8* %0)
%5 = call i64 @unlink(i8* %3)
%6 = icmp eq i64 %5, 0
br i1 %6, label %7, label %9
7: ; preds = %1
%8 = call i32 (...) @restart_apache()
br label %9
9: ; preds = %7, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int rand();
int /*<<< orphan*/ srand(int /*<<< orphan*/);
int /*<<< orphan*/ time(int /*<<< orphan*/ *);
int main(void) {
  srand(time(NULL));
  for (int i = 0; i < 1; i++) {
    printf("%d", rand() % 2);
  }
  printf("\n");
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
xor    %eax,%eax
mov    %eax,%edi
call   1050 <time@plt>
mov    %eax,%edi
call   1040 <srand@plt>
movl   $0x0,-0x8(%rbp)
cmpl   $0x1,-0x8(%rbp)
jge    119d <main+0x5d>
mov    $0x0,%al
call   1060 <rand@plt>
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %edx,%esi
lea    0xe78(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1166 <main+0x26>
lea    0xe5f(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %edi,%edi
call   1060 <time@plt>
mov    %eax,%edi
call   1050 <srand@plt>
xor    %eax,%eax
call   1070 <rand@plt>
mov    %eax,%ecx
shr    $0x1f,%ecx
add    %eax,%ecx
and    $0xfffffffe,%ecx
sub    %ecx,%eax
lea    0xe87(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
@.str.1 = [2 x i8] c"\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 @time(i32* null)
%4 = call i32 @srand(i32 %3)
store i32 0, i32* %2
br label %5
5: ; preds = %12, %0
%6 = load i32, i32* %2
%7 = icmp slt i32 %6, 1
br i1 %7, label %8, label %15
8: ; preds = %5
%9 = call i32 (...) @rand()
%10 = srem i32 %9, 2
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %10)
br label %12
12: ; preds = %8
%13 = load i32, i32* %2
%14 = add nsw i32 %13, 1
store i32 %14, i32* %2
br label %5
15: ; preds = %5
%16 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%17 = load i32, i32* %1
ret i32 %17
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define i32 @main() {
%1 = tail call i32 @time(i32* null)
%2 = tail call i32 @srand(i32 %1)
%3 = tail call i32 (...) @rand()
%4 = srem i32 %3, 2
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %4)
%6 = tail call i32 @putchar(i32 10)
ret i32 0
}
/* Variables and functions */
char *malloc(int);
int /*<<< orphan*/ printPrompt(char *);
void handle_signal(int signo) {
  char *prompt = malloc(1024 * sizeof(char));
  *prompt = '\n';
  *(prompt + 1) = '\0';
  printPrompt(prompt);
}


x86 assembly (clang, -O0):
<handle_signal>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x400,%edi
call   1040 <malloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movb   $0xa,(%rax)
mov    -0x10(%rbp),%rax
movb   $0x0,0x1(%rax)
mov    -0x10(%rbp),%rdi
call   1030 <printPrompt@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<handle_signal>:
push   %rax
mov    $0x400,%edi
call   1040 <malloc@plt>
movw   $0xa,(%rax)
mov    %rax,%rdi
pop    %rax
jmp    1030 <printPrompt@plt>

LLVM IR (-O0):
define void @handle_signal(i32 %0) {
%2 = alloca i32
%3 = alloca i8*
store i32 %0, i32* %2
%4 = call i8* @malloc(i32 1024)
store i8* %4, i8** %3
%5 = load i8*, i8** %3
store i8 10, i8* %5
%6 = load i8*, i8** %3
%7 = getelementptr inbounds i8, i8* %6, i64 1
store i8 0, i8* %7
%8 = load i8*, i8** %3
%9 = call i32 @printPrompt(i8* %8)
ret void
}

LLVM IR (-O2):
define void @handle_signal(i32 %0) {
%2 = tail call dereferenceable_or_null(1024) i8* @malloc(i32 1024)
store i8 10, i8* %2
%3 = getelementptr inbounds i8, i8* %2, i64 1
store i8 0, i8* %3
%4 = tail call i32 @printPrompt(i8* %2)
ret void
}