xunge/DecIR huggingface dataset:
void s2e_codext_fini() {
  __asm__ __volatile__(".byte 0x0f, 0x3f\n"
                       ".byte 0x00, 0xFA, 0x06, 0x00\n"
                       ".byte 0x00, 0x00, 0x00, 0x00\n");
}


x86 assembly (clang, -O0):
<s2e_codext_fini>:
push   %rbp
mov    %rsp,%rbp
(bad)
add    %bh,%dl
(bad)
add    %al,(%rax)
add    %al,(%rax)
add    %bl,-0x3d(%rbp)

x86 assembly (clang, -O2):
<s2e_codext_fini>:
(bad)
add    %bh,%dl
(bad)
add    %al,(%rax)
add    %al,(%rax)
add    %al,%bl

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

LLVM IR (-O2):
define void @s2e_codext_fini() {
tail call void asm sideeffect ".byte 0x0f, 0x3f\0A.byte 0x00, 0xFA, 0x06, 0x00\0A.byte 0x00, 0x00, 0x00, 0x00\0A", "~{dirflag},~{fpsr},~{flags}"()
ret void
}
int aa_pro_ctr_a1b(int chan, unsigned char *buf, int len) {
  hu_log(6, "hu_aap", __func__, "!!!!!!!!");
  return (-1);
}


x86 assembly (clang, -O0):
<aa_pro_ctr_a1b>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    $0x6,%edi
lea    0xed2(%rip),%rsi
lea    0xed2(%rip),%rdx
lea    0xeda(%rip),%rcx
mov    $0x0,%al
call   1030 <hu_log@plt>
mov    $0xffffffff,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<aa_pro_ctr_a1b>:
push   %rax
lea    0xee8(%rip),%rsi
lea    0xee8(%rip),%rdx
lea    0xef0(%rip),%rcx
mov    $0x6,%edi
xor    %eax,%eax
call   1030 <hu_log@plt>
mov    $0xffffffff,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [7 x i8] c"hu_aap\00"
@__func__.aa_pro_ctr_a1b = [15 x i8] c"aa_pro_ctr_a1b\00"
@.str.1 = [9 x i8] c"!!!!!!!!\00"
define i32 @aa_pro_ctr_a1b(i32 %0, i8* %1, i32 %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i32
store i32 %0, i32* %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%7 = call i32 (i32, i8*, i8*, i8*, ...) bitcast (i32 (...)* @hu_log to i32 (i32, i8*, i8*, i8*, ...)*)(i32 6, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([15 x i8], [15 x i8]* @__func__.aa_pro_ctr_a1b, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0))
ret i32 -1
}

LLVM IR (-O2):
@.str = [7 x i8] c"hu_aap\00"
@__func__.aa_pro_ctr_a1b = [15 x i8] c"aa_pro_ctr_a1b\00"
@.str.1 = [9 x i8] c"!!!!!!!!\00"
define i32 @aa_pro_ctr_a1b(i32 %0, i8* nocapture readnone %1, i32 %2) {
%4 = tail call i32 (i32, i8*, i8*, i8*, ...) bitcast (i32 (...)* @hu_log to i32 (i32, i8*, i8*, i8*, ...)*)(i32 6, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([15 x i8], [15 x i8]* @__func__.aa_pro_ctr_a1b, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0))
ret i32 -1
}
void *atomic_ptr_get(void **ptr) { return *ptr; }


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

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

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

LLVM IR (-O2):
define i8* @atomic_ptr_get(i8** nocapture %0) {
%2 = load i8*, i8** %0
ret i8* %2
}
int t(int i) {
  _Bool g = i == 4;
  int h = g;
  _Bool j = h;
  int k = j;
  _Bool l = k == 0;
  _Bool o = !l;
  int m = o;
  if (m)
    if (i != 4)
      return link_error();
  return 0;
}


x86 assembly (clang, -O0):
<t>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x8(%rbp)
cmpl   $0x4,-0x8(%rbp)
sete   %al
and    $0x1,%al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x10(%rbp)
cmpl   $0x0,-0x10(%rbp)
setne  %al
and    $0x1,%al
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x18(%rbp)
cmpl   $0x0,-0x18(%rbp)
sete   %al
and    $0x1,%al
mov    %al,-0x19(%rbp)
mov    -0x19(%rbp),%al
xor    $0xff,%al
and    $0x1,%al
mov    %al,-0x1a(%rbp)
mov    -0x1a(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x20(%rbp)
cmpl   $0x0,-0x20(%rbp)
je     1192 <t+0x82>
cmpl   $0x4,-0x8(%rbp)
je     118d <t+0x7d>
mov    $0x0,%al
call   1030 <link_error@plt>
mov    %eax,-0x4(%rbp)
jmp    1199 <t+0x89>
jmp    1192 <t+0x82>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @t(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i8
%5 = alloca i32
%6 = alloca i8
%7 = alloca i32
%8 = alloca i8
%9 = alloca i8
%10 = alloca i32
store i32 %0, i32* %3
%11 = load i32, i32* %3
%12 = icmp eq i32 %11, 4
%13 = zext i1 %12 to i8
store i8 %13, i8* %4
%14 = load i8, i8* %4
%15 = trunc i8 %14 to i1
%16 = zext i1 %15 to i32
store i32 %16, i32* %5
%17 = load i32, i32* %5
%18 = icmp ne i32 %17, 0
%19 = zext i1 %18 to i8
store i8 %19, i8* %6
%20 = load i8, i8* %6
%21 = trunc i8 %20 to i1
%22 = zext i1 %21 to i32
store i32 %22, i32* %7
%23 = load i32, i32* %7
%24 = icmp eq i32 %23, 0
%25 = zext i1 %24 to i8
store i8 %25, i8* %8
%26 = load i8, i8* %8
%27 = trunc i8 %26 to i1
%28 = xor i1 %27, true
%29 = zext i1 %28 to i8
store i8 %29, i8* %9
%30 = load i8, i8* %9
%31 = trunc i8 %30 to i1
%32 = zext i1 %31 to i32
store i32 %32, i32* %10
%33 = load i32, i32* %10
%34 = icmp ne i32 %33, 0
br i1 %34, label %35, label %41
35: ; preds = %1
%36 = load i32, i32* %3
%37 = icmp ne i32 %36, 4
br i1 %37, label %38, label %40
38: ; preds = %35
%39 = call i32 (...) @link_error()
store i32 %39, i32* %2
br label %42
40: ; preds = %35
br label %41
41: ; preds = %40, %1
store i32 0, i32* %2
br label %42
42: ; preds = %41, %38
%43 = load i32, i32* %2
ret i32 %43
}

LLVM IR (-O2):
define i32 @t(i32 %0) {
ret i32 0
}
double nmea_radian2degree(double val) {
  return (val / ((3.141592653589793) / 180));
}


x86 assembly (clang, -O0):
<nmea_radian2degree>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  0xeea(%rip),%xmm1
divsd  %xmm1,%xmm0
pop    %rbp
ret

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

LLVM IR (-O0):
define double @nmea_radian2degree(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fdiv double %3, 0x3F91DF46A2529D39
ret double %4
}

LLVM IR (-O2):
define double @nmea_radian2degree(double %0) {
%2 = fdiv double %0, 0x3F91DF46A2529D39
ret double %2
}
void Aig_InfoXorBit(unsigned *p, int i) { p[(i) >> 5] ^= (1 << ((i)&31)); }


x86 assembly (clang, -O0):
<Aig_InfoXorBit>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%ecx
and    $0x1f,%ecx
mov    $0x1,%edx
shl    %cl,%edx
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
sar    $0x5,%ecx
movslq %ecx,%rcx
xor    (%rax,%rcx,4),%edx
mov    %edx,(%rax,%rcx,4)
pop    %rbp
ret

x86 assembly (clang, -O2):
<Aig_InfoXorBit>:
mov    %esi,%ecx
mov    $0x1,%eax
shl    %cl,%eax
sar    $0x5,%ecx
movslq %ecx,%rcx
xor    %eax,(%rdi,%rcx,4)
ret

LLVM IR (-O0):
define void @Aig_InfoXorBit(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
store i32* %0, i32** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = and i32 %5, 31
%7 = shl i32 1, %6
%8 = load i32*, i32** %3
%9 = load i32, i32* %4
%10 = ashr i32 %9, 5
%11 = sext i32 %10 to i64
%12 = getelementptr inbounds i32, i32* %8, i64 %11
%13 = load i32, i32* %12
%14 = xor i32 %13, %7
store i32 %14, i32* %12
ret void
}

LLVM IR (-O2):
define void @Aig_InfoXorBit(i32* nocapture %0, i32 %1) {
%3 = and i32 %1, 31
%4 = shl nuw i32 1, %3
%5 = ashr i32 %1, 5
%6 = sext i32 %5 to i64
%7 = getelementptr inbounds i32, i32* %0, i64 %6
%8 = load i32, i32* %7
%9 = xor i32 %8, %4
store i32 %9, i32* %7
ret void
}
double KPHtoMPS(double KPH) {
  double MPS = 0.277778 * KPH;
  return MPS;
}


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

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

LLVM IR (-O0):
define double @KPHtoMPS(double %0) {
%2 = alloca double
%3 = alloca double
store double %0, double* %2
%4 = load double, double* %2
%5 = fmul double 2.777780e-01, %4
store double %5, double* %3
%6 = load double, double* %3
ret double %6
}

LLVM IR (-O2):
define double @KPHtoMPS(double %0) {
%2 = fmul double %0, 2.777780e-01
ret double %2
}
/* Variables and functions */
int check_arg_count(int, int);
int /*<<< orphan*/ report_count(int);
int /*<<< orphan*/ report_error(char *);
void cmd_winwstr(int nargs, char **args) {
  if (check_arg_count(nargs, 1) == 1)
    return;
  report_count(1);
  report_error("UNSUPPORTED");
}


x86 assembly (clang, -O0):
<cmd_winwstr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    $0x1,%esi
call   1030 <check_arg_count@plt>
cmp    $0x1,%eax
jne    115a <cmd_winwstr+0x2a>
jmp    1170 <cmd_winwstr+0x40>
mov    $0x1,%edi
call   1040 <report_count@plt>
lea    0xe95(%rip),%rdi
call   1050 <report_error@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cmd_winwstr>:
push   %rax
mov    $0x1,%esi
call   1030 <check_arg_count@plt>
cmp    $0x1,%eax
jne    1142 <cmd_winwstr+0x12>
pop    %rax
ret
mov    $0x1,%edi
call   1040 <report_count@plt>
lea    0xead(%rip),%rdi
pop    %rax
jmp    1050 <report_error@plt>

LLVM IR (-O0):
@.str = [12 x i8] c"UNSUPPORTED\00"
define void @cmd_winwstr(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
store i32 %0, i32* %3
store i8** %1, i8*** %4
%5 = load i32, i32* %3
%6 = call i32 @check_arg_count(i32 %5, i32 1)
%7 = icmp eq i32 %6, 1
br i1 %7, label %8, label %9
8: ; preds = %2
br label %12
9: ; preds = %2
%10 = call i32 @report_count(i32 1)
%11 = call i32 @report_error(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
br label %12
12: ; preds = %9, %8
ret void
}

LLVM IR (-O2):
@.str = [12 x i8] c"UNSUPPORTED\00"
define void @cmd_winwstr(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @check_arg_count(i32 %0, i32 1)
%4 = icmp eq i32 %3, 1
br i1 %4, label %8, label %5
5: ; preds = %2
%6 = tail call i32 @report_count(i32 1)
%7 = tail call i32 @report_error(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
br label %8
8: ; preds = %2, %5
ret void
}
int test_00(volatile char *x) { return *x; }


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

x86 assembly (clang, -O2):
movsbl (%rdi),%eax
ret

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

LLVM IR (-O2):
define i32 @test_00(i8* %0) {
%2 = load volatile i8, i8* %0
%3 = sext i8 %2 to i32
ret i32 %3
}
double grib_op_add_d(double a, double b) { return a + b; }


x86 assembly (clang, -O0):
<grib_op_add_d>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
addsd  -0x10(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<grib_op_add_d>:
addsd  %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @grib_op_add_d(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 = fadd double %5, %6
ret double %7
}

LLVM IR (-O2):
define double @grib_op_add_d(double %0, double %1) {
%3 = fadd double %0, %1
ret double %3
}
void empty_stack(char stack[][10]) {
  for (int y = 0; y < 22 - 2; y++) {
    for (int x = 0; x < 22 - 2; x++) {
      stack[y][x] = 0;
    }
  }
}


x86 assembly (clang, -O0):
<empty_stack>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x14,-0xc(%rbp)
jge    1162 <empty_stack+0x62>
movl   $0x0,-0x10(%rbp)
cmpl   $0x14,-0x10(%rbp)
jge    114f <empty_stack+0x4f>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
imul   $0xa,%rcx,%rcx
add    %rcx,%rax
movslq -0x10(%rbp),%rcx
movb   $0x0,(%rax,%rcx,1)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1120 <empty_stack+0x20>
jmp    1154 <empty_stack+0x54>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    110f <empty_stack+0xf>
pop    %rbp
ret

x86 assembly (clang, -O2):
<empty_stack>:
xorps  %xmm0,%xmm0
movups %xmm0,0xc0(%rdi)
movups %xmm0,0xb0(%rdi)
movups %xmm0,0xa0(%rdi)
movups %xmm0,0x90(%rdi)
movups %xmm0,0x80(%rdi)
movups %xmm0,0x70(%rdi)
movups %xmm0,0x60(%rdi)
movups %xmm0,0x50(%rdi)
movups %xmm0,0x40(%rdi)
movups %xmm0,0x30(%rdi)
movups %xmm0,0x20(%rdi)
movups %xmm0,0x10(%rdi)
movups %xmm0,(%rdi)
movw   $0x0,0xd0(%rdi)
ret

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

LLVM IR (-O2):
define void @empty_stack([10 x i8]* nocapture writeonly %0) {
%2 = getelementptr [10 x i8], [10 x i8]* %0, i64 0, i64 0
ret void
}
/* Variables and functions */
scalar_t__ check_cd(char *);
int /*<<< orphan*/ run_cd(char *);
int /*<<< orphan*/ run_exec(char *);
int run(char *cmd) {
  if (check_cd(cmd)) {
    run_cd(cmd);
  } else {
    run_exec(cmd);
  }
}


x86 assembly (clang, -O0):
<run>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <check_cd@plt>
cmp    $0x0,%rax
je     115d <run+0x2d>
mov    -0x10(%rbp),%rdi
call   1050 <run_cd@plt>
jmp    1166 <run+0x36>
mov    -0x10(%rbp),%rdi
call   1030 <run_exec@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<run>:
push   %rbx
mov    %rdi,%rbx
call   1040 <check_cd@plt>
mov    %rbx,%rdi
test   %rax,%rax
je     1148 <run+0x18>
call   1050 <run_cd@plt>
pop    %rbx
ret
call   1030 <run_exec@plt>
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @run(i8* %0) {
%2 = tail call i64 @check_cd(i8* %0)
%3 = icmp eq i64 %2, 0
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i32 @run_cd(i8* %0)
br label %8
6: ; preds = %1
%7 = tail call i32 @run_exec(i8* %0)
br label %8
8: ; preds = %6, %4
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void hp2(void) { printf("hello, world!\n"); }


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

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

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

LLVM IR (-O2):
@str = [14 x i8] c"hello, world!\00"
define void @hp2() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @str, i64 0, i64 0))
ret void
}
unsigned supertwoxsai_generic_input_fmts(void) { return (1 << 0) | (1 << 1); }


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

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

LLVM IR (-O0):
define i32 @supertwoxsai_generic_input_fmts() {
ret i32 3
}

LLVM IR (-O2):
define i32 @supertwoxsai_generic_input_fmts() {
ret i32 3
}
/* Variables and functions */
int /*<<< orphan*/ pppoat_free(void *);
void if_module_pppd_fini(void *userdata) { pppoat_free(userdata); }


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

x86 assembly (clang, -O2):
<if_module_pppd_fini>:
jmp    1030 <pppoat_free@plt>

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

LLVM IR (-O2):
define void @if_module_pppd_fini(i8* %0) {
%2 = tail call i32 @pppoat_free(i8* %0)
ret void
}
int test_imm_E9int32_reg(int val) { return ((val) & (0xE9 << 0)) ? -20 : -40; }


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

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

LLVM IR (-O0):
define i32 @test_imm_E9int32_reg(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = and i32 %3, 233
%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_E9int32_reg(i32 %0) {
%2 = and i32 %0, 233
%3 = icmp eq i32 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
void g_array_sized_new() {}


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

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

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

LLVM IR (-O2):
define void @g_array_sized_new() {
ret void
}
void set_bot_2_sim(void) {}


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

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

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

LLVM IR (-O2):
define void @set_bot_2_sim() {
ret void
}
void __attribute__((weak)) rtc_wkup_isr() { debug_handler(__FUNCTION__); }


x86 assembly (clang, -O0):
<rtc_wkup_isr>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
mov    $0x0,%al
call   1030 <debug_handler@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<rtc_wkup_isr>:
lea    0xee9(%rip),%rdi
xor    %eax,%eax
jmp    1030 <debug_handler@plt>

LLVM IR (-O0):
@__FUNCTION__.rtc_wkup_isr = [13 x i8] c"rtc_wkup_isr\00"
define weak void @rtc_wkup_isr() {
%1 = call i32 (i8*, ...) bitcast (i32 (...)* @debug_handler to i32 (i8*, ...)*)(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @__FUNCTION__.rtc_wkup_isr, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@__FUNCTION__.rtc_wkup_isr = [13 x i8] c"rtc_wkup_isr\00"
define weak void @rtc_wkup_isr() {
%1 = tail call i32 (i8*, ...) bitcast (i32 (...)* @debug_handler to i32 (i8*, ...)*)(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @__FUNCTION__.rtc_wkup_isr, i64 0, i64 0))
ret void
}
/* Variables and functions */
int __peek_char();
int pevent_peek_char(void) { return __peek_char(); }


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

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

LLVM IR (-O0):
define i32 @pevent_peek_char() {
%1 = call i32 (...) @__peek_char()
ret i32 %1
}

LLVM IR (-O2):
define i32 @pevent_peek_char() {
%1 = tail call i32 (...) @__peek_char()
ret i32 %1
}
/* Variables and functions */
bool isnottab(int pos, char *tabstop) {
  return (pos < (250 + 1)) && (tabstop[pos] == 0);
}


x86 assembly (clang, -O0):
<isnottab>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
xor    %eax,%eax
cmpl   $0xfb,-0x4(%rbp)
mov    %al,-0x11(%rbp)
jge    1132 <isnottab+0x32>
mov    -0x10(%rbp),%rax
movslq -0x4(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
sete   %al
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isnottab>:
xor    %eax,%eax
cmp    $0xfa,%edi
jg     1116 <isnottab+0x16>
movslq %edi,%rcx
xor    %eax,%eax
cmpb   $0x0,(%rsi,%rcx,1)
sete   %al
ret

LLVM IR (-O0):
define i32 @isnottab(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
store i32 %0, i32* %3
store i8* %1, i8** %4
%5 = load i32, i32* %3
%6 = icmp slt i32 %5, 251
br i1 %6, label %7, label %15
7: ; preds = %2
%8 = load i8*, i8** %4
%9 = load i32, i32* %3
%10 = sext i32 %9 to i64
%11 = getelementptr inbounds i8, i8* %8, i64 %10
%12 = load i8, i8* %11
%13 = sext i8 %12 to i32
%14 = icmp eq i32 %13, 0
br label %15
15: ; preds = %7, %2
%16 = phi i1 [ false, %2 ], [ %14, %7 ]
%17 = zext i1 %16 to i32
ret i32 %17
}

LLVM IR (-O2):
define i32 @isnottab(i32 %0, i8* nocapture %1) {
%3 = icmp slt i32 %0, 251
br i1 %3, label %4, label %10
4: ; preds = %2
%5 = sext i32 %0 to i64
%6 = getelementptr inbounds i8, i8* %1, i64 %5
%7 = load i8, i8* %6
%8 = icmp eq i8 %7, 0
%9 = zext i1 %8 to i32
br label %10
10: ; preds = %4, %2
%11 = phi i32 [ 0, %2 ], [ %9, %4 ]
ret i32 %11
}
int g(int *p, int n) {
  int(*a)[n] = (int(*)[n])p;
  int *q = &(*a)[2];
  return q[-1];
}


x86 assembly (clang, -O0):
<g>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
mov    -0x4(%rax),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @g(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
%5 = alloca i32*
%6 = alloca i32*
store i32* %0, i32** %3
store i32 %1, i32* %4
%7 = load i32, i32* %4
%8 = zext i32 %7 to i64
%9 = load i32, i32* %4
%10 = zext i32 %9 to i64
%11 = load i32*, i32** %3
store i32* %11, i32** %5
%12 = load i32*, i32** %5
%13 = getelementptr inbounds i32, i32* %12, i64 2
store i32* %13, i32** %6
%14 = load i32*, i32** %6
%15 = getelementptr inbounds i32, i32* %14, i64 -1
%16 = load i32, i32* %15
ret i32 %16
}

LLVM IR (-O2):
define i32 @g(i32* nocapture %0, i32 %1) {
%3 = getelementptr inbounds i32, i32* %0, i64 1
%4 = load i32, i32* %3
ret i32 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ time_t;

/* Variables and functions */
int /*<<< orphan*/ ctime(int /*<<< orphan*/ *);
int /*<<< orphan*/ strlcpy(char *, int /*<<< orphan*/, int);
char *lctime(time_t lclock) {
  static char buf[25];
  strlcpy(buf, ctime(&lclock), 25);
  return buf;
}


x86 assembly (clang, -O0):
<lctime>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    -0x4(%rbp),%rdi
call   1030 <ctime@plt>
mov    %eax,%esi
lea    0x2f03(%rip),%rdi
mov    $0x19,%edx
call   1040 <strlcpy@plt>
lea    0x2ef2(%rip),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<lctime>:
push   %rbx
sub    $0x10,%rsp
mov    %edi,0xc(%rsp)
lea    0xc(%rsp),%rdi
call   1030 <ctime@plt>
lea    0x2f06(%rip),%rbx
mov    %rbx,%rdi
mov    %eax,%esi
mov    $0x19,%edx
call   1040 <strlcpy@plt>
mov    %rbx,%rax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@lctime.buf = internal global [25 x i8] zeroinitializer
define i8* @lctime(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @ctime(i32* %2)
%4 = call i32 @strlcpy(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @lctime.buf, i64 0, i64 0), i32 %3, i32 25)
ret i8* getelementptr inbounds ([25 x i8], [25 x i8]* @lctime.buf, i64 0, i64 0)
}

LLVM IR (-O2):
@lctime.buf = internal global [25 x i8] zeroinitializer
define i8* @lctime(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @ctime(i32* %2)
%4 = call i32 @strlcpy(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @lctime.buf, i64 0, i64 0), i32 %3, i32 25)
ret i8* getelementptr inbounds ([25 x i8], [25 x i8]* @lctime.buf, i64 0, i64 0)
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(void) {
  goto label1;
  goto end;
  {
  label1:
    printf("Inside {}'s\n");
  }
end:
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeda(%rip),%rdi
call   1030 <printf@plt>
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 = [13 x i8] c"Inside {}'s\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
br label %2
2: ; preds = %0
%3 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
br label %4
4: ; preds = %2
ret i32 0
}

LLVM IR (-O2):
@str = [12 x i8] c"Inside {}'s\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Type definitions */
typedef int uint16_t;
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
scalar_t__ fgetc(int /*<<< orphan*/ *);
uint16_t readShort(FILE *fp) {
  uint16_t c1 = ((uint16_t)fgetc(fp)) & 0xFF;
  uint16_t c2 = ((uint16_t)fgetc(fp)) & 0xFF;
  return (uint16_t)((c1 << 8) | c2);
}


x86 assembly (clang, -O0):
<readShort>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <fgetc@plt>
and    $0xff,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <fgetc@plt>
and    $0xff,%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
shl    $0x8,%eax
or     -0x10(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<readShort>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
call   1030 <fgetc@plt>
mov    %rax,%rbx
mov    %r14,%rdi
call   1030 <fgetc@plt>
movzbl %al,%ecx
shl    $0x8,%ebx
movzwl %bx,%eax
or     %ecx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i32 @readShort(i32* %0) {
%2 = alloca i32*
%3 = alloca i32
%4 = alloca i32
store i32* %0, i32** %2
%5 = load i32*, i32** %2
%6 = call i64 @fgetc(i32* %5)
%7 = trunc i64 %6 to i32
%8 = and i32 %7, 255
store i32 %8, i32* %3
%9 = load i32*, i32** %2
%10 = call i64 @fgetc(i32* %9)
%11 = trunc i64 %10 to i32
%12 = and i32 %11, 255
store i32 %12, i32* %4
%13 = load i32, i32* %3
%14 = shl i32 %13, 8
%15 = load i32, i32* %4
%16 = or i32 %14, %15
ret i32 %16
}

LLVM IR (-O2):
define i32 @readShort(i32* nocapture %0) {
%2 = tail call i64 @fgetc(i32* %0)
%3 = trunc i64 %2 to i32
%4 = tail call i64 @fgetc(i32* %0)
%5 = trunc i64 %4 to i32
%6 = and i32 %5, 255
%7 = shl i32 %3, 8
%8 = and i32 %7, 65280
%9 = or i32 %8, %6
ret i32 %9
}
int isbar(char c) {
  switch (c) {
  case '|':
  case ']':
  case ':':
    return 1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<isbar>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
mov    %eax,-0xc(%rbp)
sub    $0x3a,%eax
je     1141 <isbar+0x41>
jmp    111f <isbar+0x1f>
mov    -0xc(%rbp),%eax
sub    $0x5d,%eax
je     1141 <isbar+0x41>
jmp    1130 <isbar+0x30>
mov    -0xc(%rbp),%eax
sub    $0x7c,%eax
jne    114d <isbar+0x4d>
jmp    1141 <isbar+0x41>
movl   $0x1,-0x4(%rbp)
jmp    1154 <isbar+0x54>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isbar>:
mov    $0x1,%eax
cmp    $0x3a,%edi
je     1116 <isbar+0x16>
cmp    $0x5d,%edi
je     1116 <isbar+0x16>
cmp    $0x7c,%edi
je     1116 <isbar+0x16>
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @isbar(i8 signext %0) {
%2 = alloca i32
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
switch i32 %5, label %7 [
i32 124, label %6
i32 93, label %6
i32 58, label %6
]
6: ; preds = %1, %1, %1
store i32 1, i32* %2
br label %8
7: ; preds = %1
store i32 0, i32* %2
br label %8
8: ; preds = %7, %6
%9 = load i32, i32* %2
ret i32 %9
}

LLVM IR (-O2):
define i32 @isbar(i8 signext %0) {
%2 = sext i8 %0 to i32
switch i32 %2, label %3 [
i32 124, label %4
i32 93, label %4
i32 58, label %4
]
3: ; preds = %1
br label %4
4: ; preds = %1, %1, %1, %3
%5 = phi i32 [ 0, %3 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ]
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ yahoo_send_im(int, char const *, char const *, char *, int,
                                 int /*<<< orphan*/);
void yahoo_send_buzz(int id, const char *from, const char *who) {
  yahoo_send_im(id, from, who, "<ding>", 1, 0);
}


x86 assembly (clang, -O0):
<yahoo_send_buzz>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
lea    0xecb(%rip),%rcx
mov    $0x1,%r8d
xor    %r9d,%r9d
call   1030 <yahoo_send_im@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<yahoo_send_buzz>:
lea    0xee9(%rip),%rcx
mov    $0x1,%r8d
xor    %r9d,%r9d
jmp    1030 <yahoo_send_im@plt>

LLVM IR (-O0):
@.str = [7 x i8] c"<ding>\00"
define void @yahoo_send_buzz(i32 %0, i8* %1, i8* %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i8*
store i32 %0, i32* %4
store i8* %1, i8** %5
store i8* %2, i8** %6
%7 = load i32, i32* %4
%8 = load i8*, i8** %5
%9 = load i8*, i8** %6
%10 = call i32 @yahoo_send_im(i32 %7, i8* %8, i8* %9, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 1, i32 0)
ret void
}

LLVM IR (-O2):
@.str = [7 x i8] c"<ding>\00"
define void @yahoo_send_buzz(i32 %0, i8* %1, i8* %2) {
%4 = tail call i32 @yahoo_send_im(i32 %0, i8* %1, i8* %2, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 1, i32 0)
ret void
}
/* Variables and functions */
scalar_t__ chars_is_lower(char);
char chars_to_upper(char c) {
  if (chars_is_lower(c))
    return c - ('a' - 'A');
  else
    return c;
}


x86 assembly (clang, -O0):
<chars_to_upper>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x2(%rbp)
movsbl -0x2(%rbp),%edi
call   1030 <chars_is_lower@plt>
cmp    $0x0,%rax
je     1140 <chars_to_upper+0x30>
movsbl -0x2(%rbp),%eax
sub    $0x20,%eax
mov    %al,-0x1(%rbp)
jmp    1146 <chars_to_upper+0x36>
mov    -0x2(%rbp),%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<chars_to_upper>:
push   %rbx
mov    %edi,%ebx
call   1030 <chars_is_lower@plt>
lea    -0x20(%rbx),%ecx
test   %rax,%rax
movzbl %cl,%eax
cmove  %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define signext i8 @chars_to_upper(i8 signext %0) {
%2 = alloca i8
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = call i64 @chars_is_lower(i8 signext %4)
%6 = icmp ne i64 %5, 0
br i1 %6, label %7, label %12
7: ; preds = %1
%8 = load i8, i8* %3
%9 = sext i8 %8 to i32
%10 = sub nsw i32 %9, 32
%11 = trunc i32 %10 to i8
store i8 %11, i8* %2
br label %14
12: ; preds = %1
%13 = load i8, i8* %3
store i8 %13, i8* %2
br label %14
14: ; preds = %12, %7
%15 = load i8, i8* %2
ret i8 %15
}

LLVM IR (-O2):
define signext i8 @chars_to_upper(i8 signext %0) {
%2 = tail call i64 @chars_is_lower(i8 signext %0)
%3 = icmp eq i64 %2, 0
%4 = add i8 %0, -32
%5 = select i1 %3, i8 %0, i8 %4
ret i8 %5
}
void main() {
  int n = 1;
  for (; n; n++) {
  }
  return;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x1,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     1128 <main+0x28>
jmp    111a <main+0x1a>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    110b <main+0xb>
pop    %rbp
ret

x86 assembly (clang, -O2):
LLVM IR (-O0):
define void @main() {
%1 = alloca i32
store i32 1, i32* %1
br label %2
2: ; preds = %6, %0
%3 = load i32, i32* %1
%4 = icmp ne i32 %3, 0
br i1 %4, label %5, label %9
5: ; preds = %2
br label %6
6: ; preds = %5
%7 = load i32, i32* %1
%8 = add nsw i32 %7, 1
store i32 %8, i32* %1
br label %2
9: ; preds = %2
ret void
}

LLVM IR (-O2):
/* Variables and functions */
int /*<<< orphan*/ putchar(char);
void print_binary(unsigned int v) {
  unsigned int mask = ~(~(unsigned int)0 >> 1U);
  while (mask) {
    putchar('0' + !!(v & mask));
    mask >>= 1U;
  }
  putchar('\n');
}


x86 assembly (clang, -O0):
<print_binary>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movl   $0x80000000,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
je     115a <print_binary+0x4a>
mov    -0x4(%rbp),%eax
and    -0x8(%rbp),%eax
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
add    $0x30,%eax
movsbl %al,%edi
call   1030 <putchar@plt>
mov    -0x8(%rbp),%eax
shr    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1122 <print_binary+0x12>
mov    $0xa,%edi
call   1030 <putchar@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_binary>:
push   %rbp
push   %r14
push   %rbx
mov    %edi,%r14d
mov    $0x80000000,%ebx
mov    $0x80000000,%ebp
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    %ebx,%eax
and    %r14d,%eax
cmp    $0x1,%eax
mov    $0x31,%edi
sbb    $0x0,%edi
call   1030 <putchar@plt>
shr    %ebp
cmp    $0x1,%ebx
mov    %ebp,%ebx
ja     1130 <print_binary+0x20>
mov    $0xa,%edi
pop    %rbx
pop    %r14
pop    %rbp
jmp    1030 <putchar@plt>

LLVM IR (-O0):
define void @print_binary(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
store i32 -2147483648, i32* %3
br label %4
4: ; preds = %7, %1
%5 = load i32, i32* %3
%6 = icmp ne i32 %5, 0
br i1 %6, label %7, label %20
7: ; preds = %4
%8 = load i32, i32* %2
%9 = load i32, i32* %3
%10 = and i32 %8, %9
%11 = icmp ne i32 %10, 0
%12 = xor i1 %11, true
%13 = xor i1 %12, true
%14 = zext i1 %13 to i32
%15 = add nsw i32 48, %14
%16 = trunc i32 %15 to i8
%17 = call i32 @putchar(i8 signext %16)
%18 = load i32, i32* %3
%19 = lshr i32 %18, 1
store i32 %19, i32* %3
br label %4
20: ; preds = %4
%21 = call i32 @putchar(i8 signext 10)
ret void
}

LLVM IR (-O2):
define void @print_binary(i32 %0) {
br label %2
2: ; preds = %1, %2
%3 = phi i32 [ -2147483648, %1 ], [ %8, %2 ]
%4 = and i32 %3, %0
%5 = icmp eq i32 %4, 0
%6 = select i1 %5, i8 48, i8 49
%7 = tail call i32 @putchar(i8 signext %6)
%8 = lshr i32 %3, 1
%9 = icmp ult i32 %3, 2
br i1 %9, label %10, label %2
10: ; preds = %2
%11 = tail call i32 @putchar(i8 signext 10)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(void **);
void free_2D_memory(void **str, size_t size) {
  int i;
  for (i = 0; i < size; i++) {
    free(str[i]);
  }
  free(str);
}


x86 assembly (clang, -O0):
<free_2D_memory>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
movslq -0x14(%rbp),%rax
cmp    -0x10(%rbp),%rax
jae    1154 <free_2D_memory+0x44>
mov    -0x8(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1030 <free@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1127 <free_2D_memory+0x17>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<free_2D_memory>:
push   %r15
push   %r14
push   %rbx
mov    %rdi,%r14
test   %rsi,%rsi
je     1142 <free_2D_memory+0x32>
mov    %rsi,%r15
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    (%r14,%rbx,8),%rdi
call   1030 <free@plt>
add    $0x1,%rbx
cmp    %rbx,%r15
jne    1130 <free_2D_memory+0x20>
mov    %r14,%rdi
pop    %rbx
pop    %r14
pop    %r15
jmp    1030 <free@plt>

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

LLVM IR (-O2):
define void @free_2D_memory(i8** nocapture %0, i64 %1) {
%3 = icmp eq i64 %1, 0
br i1 %3, label %12, label %4
4: ; preds = %2, %4
%5 = phi i64 [ %10, %4 ], [ 0, %2 ]
%6 = getelementptr inbounds i8*, i8** %0, i64 %5
%7 = bitcast i8** %6 to i8***
%8 = load i8**, i8*** %7
%9 = tail call i32 @free(i8** %8)
%10 = add nuw nsw i64 %5, 1
%11 = icmp eq i64 %10, %1
br i1 %11, label %12, label %4
12: ; preds = %4, %2
%13 = tail call i32 @free(i8** %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ ngen(char *, char *, int /*<<< orphan*/);
void cgpublic(char *s) { ngen(".globl\t%s", s, 0); }


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

x86 assembly (clang, -O2):
<cgpublic>:
mov    %rdi,%rsi
lea    0xee6(%rip),%rdi
xor    %edx,%edx
jmp    1030 <ngen@plt>

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

LLVM IR (-O2):
@.str = [10 x i8] c".globl\09%s\00"
define void @cgpublic(i8* %0) {
%2 = tail call i32 @ngen(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* %0, i32 0)
ret void
}
/* Variables and functions */
void *getbytes(size_t);
int /*<<< orphan*/ memcpy(void *, void const *, size_t);
void *copybytes(const void *src, size_t nbytes) {
  void *ret;
  ret = getbytes(nbytes);
  if (nbytes)
    memcpy(ret, src, nbytes);
  return (ret);
}


x86 assembly (clang, -O0):
<copybytes>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <getbytes@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     1159 <copybytes+0x39>
mov    -0x18(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
call   1040 <memcpy@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<copybytes>:
push   %r15
push   %r14
push   %rbx
mov    %rsi,%rbx
mov    %rdi,%r15
mov    %rsi,%rdi
call   1030 <getbytes@plt>
mov    %rax,%r14
test   %rbx,%rbx
je     1149 <copybytes+0x29>
mov    %r14,%rdi
mov    %r15,%rsi
mov    %rbx,%rdx
call   1040 <memcpy@plt>
mov    %r14,%rax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define i8* @copybytes(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
%5 = alloca i8*
store i8* %0, i8** %3
store i64 %1, i64* %4
%6 = load i64, i64* %4
%7 = call i8* @getbytes(i64 %6)
store i8* %7, i8** %5
%8 = load i64, i64* %4
%9 = icmp ne i64 %8, 0
br i1 %9, label %10, label %15
10: ; preds = %2
%11 = load i8*, i8** %5
%12 = load i8*, i8** %3
%13 = load i64, i64* %4
%14 = call i32 @memcpy(i8* %11, i8* %12, i64 %13)
br label %15
15: ; preds = %10, %2
%16 = load i8*, i8** %5
ret i8* %16
}

LLVM IR (-O2):
define i8* @copybytes(i8* %0, i64 %1) {
%3 = tail call i8* @getbytes(i64 %1)
%4 = icmp eq i64 %1, 0
br i1 %4, label %7, label %5
5: ; preds = %2
%6 = tail call i32 @memcpy(i8* %3, i8* %0, i64 %1)
br label %7
7: ; preds = %5, %2
ret i8* %3
}
/* Type definitions */
struct timeval {
  double tv_sec;
  int tv_usec;
};

/* Variables and functions */
double NAN;
int gettimeofday(struct timeval *, int /*<<< orphan*/ *);
double timestamp() {
  struct timeval tv;
  if (gettimeofday(&tv, NULL) == -1)
    return NAN;
  return tv.tv_sec + tv.tv_usec * 1e-6;
}


x86 assembly (clang, -O0):
<timestamp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
lea    -0x18(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1030 <gettimeofday@plt>
cmp    $0xffffffff,%eax
jne    1143 <timestamp+0x33>
mov    0x2ec3(%rip),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1162 <timestamp+0x52>
movsd  -0x18(%rbp),%xmm1
cvtsi2sdl -0x10(%rbp),%xmm0
movsd  0xeab(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<timestamp>:
sub    $0x18,%rsp
lea    0x8(%rsp),%rdi
xor    %esi,%esi
call   1030 <gettimeofday@plt>
cmp    $0xffffffff,%eax
je     113e <timestamp+0x2e>
cvtsi2sdl 0x10(%rsp),%xmm0
mulsd  0xecd(%rip),%xmm0
addsd  0x8(%rsp),%xmm0
add    $0x18,%rsp
ret
mov    0x2eb3(%rip),%rax
movsd  (%rax),%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
%struct.timeval = type { double, i32 }
@NAN = global double 0.000000e+00
define double @timestamp() {
%1 = alloca double
%2 = alloca %struct.timeval
%3 = call i32 @gettimeofday(%struct.timeval* %2, i32* null)
%4 = icmp eq i32 %3, -1
br i1 %4, label %5, label %7
5: ; preds = %0
%6 = load double, double* @NAN
store double %6, double* %1
br label %14
7: ; preds = %0
%8 = getelementptr inbounds %struct.timeval, %struct.timeval* %2, i32 0, i32 0
%9 = load double, double* %8
%10 = getelementptr inbounds %struct.timeval, %struct.timeval* %2, i32 0, i32 1
%11 = load i32, i32* %10
%12 = sitofp i32 %11 to double
%13 = call double @llvm.fmuladd.f64(double %12, double 0x3EB0C6F7A0B5ED8D, double %9)
store double %13, double* %1
br label %14
14: ; preds = %7, %5
%15 = load double, double* %1
ret double %15
}

LLVM IR (-O2):
%struct.timeval = type { double, i32 }
@NAN = global double 0.000000e+00
define double @timestamp() {
%1 = alloca %struct.timeval
%2 = bitcast %struct.timeval* %1 to i8*
%3 = call i32 @gettimeofday(%struct.timeval* %1, i32* null)
%4 = icmp eq i32 %3, -1
br i1 %4, label %5, label %7
5: ; preds = %0
%6 = load double, double* @NAN
br label %14
7: ; preds = %0
%8 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 0
%9 = load double, double* %8
%10 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 1
%11 = load i32, i32* %10
%12 = sitofp i32 %11 to double
%13 = tail call double @llvm.fmuladd.f64(double %12, double 0x3EB0C6F7A0B5ED8D, double %9)
br label %14
14: ; preds = %7, %5
%15 = phi double [ %6, %5 ], [ %13, %7 ]
ret double %15
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
uint32_t backf32_t(uint32_t number) {
  if (number >> 31)
    return number ^ 0x80000000;
  return number ^ 0xffffffff;
}


x86 assembly (clang, -O0):
<backf32_t>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
sar    $0x1f,%eax
cmp    $0x0,%eax
je     1126 <backf32_t+0x26>
mov    -0x8(%rbp),%eax
xor    $0x80000000,%eax
mov    %eax,-0x4(%rbp)
jmp    112f <backf32_t+0x2f>
mov    -0x8(%rbp),%eax
xor    $0xffffffff,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<backf32_t>:
test   %edi,%edi
mov    $0xffffffff,%ecx
mov    $0x80000000,%eax
cmovns %ecx,%eax
xor    %edi,%eax
ret

LLVM IR (-O0):
define i32 @backf32_t(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = ashr i32 %4, 31
%6 = icmp ne i32 %5, 0
br i1 %6, label %7, label %10
7: ; preds = %1
%8 = load i32, i32* %3
%9 = xor i32 %8, -2147483648
store i32 %9, i32* %2
br label %13
10: ; preds = %1
%11 = load i32, i32* %3
%12 = xor i32 %11, -1
store i32 %12, i32* %2
br label %13
13: ; preds = %10, %7
%14 = load i32, i32* %2
ret i32 %14
}

LLVM IR (-O2):
define i32 @backf32_t(i32 %0) {
%2 = icmp sgt i32 %0, -1
%3 = select i1 %2, i32 -1, i32 -2147483648
%4 = xor i32 %3, %0
ret i32 %4
}
/* Variables and functions */
unsigned char get_char2();
int /*<<< orphan*/ put_char2(unsigned char);
unsigned char write_8051(unsigned char c) {
  put_char2(c);
  return get_char2();
}


x86 assembly (clang, -O0):
<write_8051>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%edi
call   1040 <put_char2@plt>
mov    $0x0,%al
call   1030 <get_char2@plt>
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define zeroext i8 @write_8051(i8 zeroext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = call i32 @put_char2(i8 zeroext %3)
%5 = call zeroext i8 (...) @get_char2()
ret i8 %5
}

LLVM IR (-O2):
define zeroext i8 @write_8051(i8 zeroext %0) {
%2 = tail call i32 @put_char2(i8 zeroext %0)
%3 = tail call zeroext i8 (...) @get_char2()
ret i8 %3
}
/* Variables and functions */
int /*<<< orphan*/ abort();
void f(unsigned short ad) {
  if (ad >= 0x4000 && ad < 0xc000)
    abort();
}


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
movzwl -0x2(%rbp),%eax
cmp    $0x4000,%eax
jl     1144 <f+0x34>
movzwl -0x2(%rbp),%eax
cmp    $0xc000,%eax
jge    1144 <f+0x34>
mov    $0x0,%al
call   1030 <abort@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f>:
add    $0xc000,%di
jns    1118 <f+0x8>
ret
push   %rax
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
define void @f(i16 zeroext %0) {
%2 = alloca i16
store i16 %0, i16* %2
%3 = load i16, i16* %2
%4 = zext i16 %3 to i32
%5 = icmp sge i32 %4, 16384
br i1 %5, label %6, label %12
6: ; preds = %1
%7 = load i16, i16* %2
%8 = zext i16 %7 to i32
%9 = icmp slt i32 %8, 49152
br i1 %9, label %10, label %12
10: ; preds = %6
%11 = call i32 (...) @abort()
unreachable
12: ; preds = %6, %1
ret void
}

LLVM IR (-O2):
define void @f(i16 zeroext %0) {
%2 = add i16 %0, -16384
%3 = icmp sgt i16 %2, -1
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 (...) @abort()
unreachable
6: ; preds = %1
ret void
}
/* Variables and functions */
void VIDSoftVdp1DrawEnd(void) {}


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

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

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

LLVM IR (-O2):
define void @VIDSoftVdp1DrawEnd() {
ret void
}
OP(fd, d6) { op_d6(); }


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

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

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

LLVM IR (-O2):
define i32 @OP(i32 %0, i32 %1) {
%3 = tail call i32 (...) @op_d6()
ret i32 undef
}