xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ _hmt_register_covercase(char *, char *);
void _hmt_covercase_HMM_Mat4ToQuaternion_init(void) {
  _hmt_register_covercase("HMM_Mat4ToQuaternion", "4");
}


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

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

LLVM IR (-O0):
@.str = [21 x i8] c"HMM_Mat4ToQuaternion\00"
@.str.1 = [2 x i8] c"4\00"
define void @_hmt_covercase_HMM_Mat4ToQuaternion_init() {
%1 = call i32 @_hmt_register_covercase(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [21 x i8] c"HMM_Mat4ToQuaternion\00"
@.str.1 = [2 x i8] c"4\00"
define void @_hmt_covercase_HMM_Mat4ToQuaternion_init() {
%1 = tail call i32 @_hmt_register_covercase(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int int16_t;

/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int16_t a, b;
  scanf("%d", &a);
  scanf("%d", &b);
  printf("X = %d\n", a + b);
  return 0;
}


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

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

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [8 x i8] c"X = %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = bitcast i32* %1 to i8*
%4 = bitcast i32* %2 to i8*
%5 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%6 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
%7 = load i32, i32* %1
%8 = load i32, i32* %2
%9 = add nsw i32 %8, %7
%10 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i32 %9)
ret i32 0
}
/* Variables and functions */
int round_up(int);
void clear_nfas(unsigned long *nfas, int N) {
  int i;
  for (i = 0; i < round_up(N); i++) {
    nfas[i] = 0;
  }
}


x86 assembly (clang, -O0):
<clear_nfas>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0xc(%rbp),%edi
call   1030 <round_up@plt>
mov    %eax,%ecx
mov    -0x14(%rbp),%eax
cmp    %ecx,%eax
jge    115f <clear_nfas+0x4f>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
movq   $0x0,(%rax,%rcx,8)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1126 <clear_nfas+0x16>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<clear_nfas>:
push   %rbp
push   %r14
push   %rbx
mov    %esi,%ebp
mov    %rdi,%r14
mov    %esi,%edi
call   1030 <round_up@plt>
test   %eax,%eax
jle    114a <clear_nfas+0x3a>
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
movq   $0x0,(%r14,%rbx,8)
add    $0x1,%rbx
mov    %ebp,%edi
call   1030 <round_up@plt>
cltq
cmp    %rax,%rbx
jl     1130 <clear_nfas+0x20>
pop    %rbx
pop    %r14
pop    %rbp
ret

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

LLVM IR (-O2):
define void @clear_nfas(i64* nocapture writeonly %0, i32 %1) {
%3 = tail call i32 @round_up(i32 %1)
%4 = icmp sgt i32 %3, 0
br i1 %4, label %5, label %12
5: ; preds = %2, %5
%6 = phi i64 [ %8, %5 ], [ 0, %2 ]
%7 = getelementptr inbounds i64, i64* %0, i64 %6
store i64 0, i64* %7
%8 = add nuw nsw i64 %6, 1
%9 = tail call i32 @round_up(i32 %1)
%10 = sext i32 %9 to i64
%11 = icmp slt i64 %8, %10
br i1 %11, label %5, label %12
12: ; preds = %5, %2
ret void
}
void kArmedBandit() {}


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

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

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

LLVM IR (-O2):
define void @kArmedBandit() {
ret void
}
int test_imm_61uint16_reg(unsigned short val) {
  return ((val) & (-0x61 << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_61uint16_reg(i16 zeroext %0) {
%2 = and i16 %0, -97
%3 = icmp eq i16 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
int test_imm_84uint8_mem(unsigned char *val) {
  return ((*val) & (0x84 << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_84uint8_mem(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = and i8 %2, -124
%4 = icmp eq i8 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
long long trunc(double);
void trunc_l_d(double *source, long long *dest) { *dest = trunc(*source); }


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

x86 assembly (clang, -O2):
<trunc_l_d>:
push   %rbx
mov    %rsi,%rbx
movsd  (%rdi),%xmm0
call   1030 <trunc@plt>
mov    %rax,(%rbx)
pop    %rbx
ret

LLVM IR (-O0):
define void @trunc_l_d(double* %0, i64* %1) {
%3 = alloca double*
%4 = alloca i64*
store double* %0, double** %3
store i64* %1, i64** %4
%5 = load double*, double** %3
%6 = load double, double* %5
%7 = call i64 @trunc(double %6)
%8 = load i64*, i64** %4
store i64 %7, i64* %8
ret void
}

LLVM IR (-O2):
define void @trunc_l_d(double* nocapture %0, i64* nocapture writeonly %1) {
%3 = load double, double* %0
%4 = tail call i64 @trunc(double %3)
store i64 %4, i64* %1
ret void
}
/* Type definitions */
struct des_bit64 {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ des_FP(struct des_bit64 *);
int /*<<< orphan*/ des_IP(struct des_bit64 *);
int /*<<< orphan*/ des_RoundFunction(struct des_bit64 *);
void des_decrypt_block(struct des_bit64 *block) {
  des_IP(block);
  des_RoundFunction(block);
  des_FP(block);
}


x86 assembly (clang, -O0):
<des_decrypt_block>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1050 <des_IP@plt>
mov    -0x8(%rbp),%rdi
call   1040 <des_RoundFunction@plt>
mov    -0x8(%rbp),%rdi
call   1030 <des_FP@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<des_decrypt_block>:
push   %rbx
mov    %rdi,%rbx
call   1050 <des_IP@plt>
mov    %rbx,%rdi
call   1040 <des_RoundFunction@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <des_FP@plt>

LLVM IR (-O0):
%struct.des_bit64 = type { i32 }
define void @des_decrypt_block(%struct.des_bit64* %0) {
%2 = alloca %struct.des_bit64*
store %struct.des_bit64* %0, %struct.des_bit64** %2
%3 = load %struct.des_bit64*, %struct.des_bit64** %2
%4 = call i32 @des_IP(%struct.des_bit64* %3)
%5 = load %struct.des_bit64*, %struct.des_bit64** %2
%6 = call i32 @des_RoundFunction(%struct.des_bit64* %5)
%7 = load %struct.des_bit64*, %struct.des_bit64** %2
%8 = call i32 @des_FP(%struct.des_bit64* %7)
ret void
}

LLVM IR (-O2):
%struct.des_bit64 = type { i32 }
define void @des_decrypt_block(%struct.des_bit64* %0) {
%2 = tail call i32 @des_IP(%struct.des_bit64* %0)
%3 = tail call i32 @des_RoundFunction(%struct.des_bit64* %0)
%4 = tail call i32 @des_FP(%struct.des_bit64* %0)
ret void
}
int main(int argc, char *argv[]) {
  int i = 1;
  int j;
  while (i < 10) {
    if (i > 5)
      break;
    j = i;
    ++i;
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x1,-0x14(%rbp)
cmpl   $0xa,-0x14(%rbp)
jge    1146 <main+0x46>
cmpl   $0x5,-0x14(%rbp)
jle    1132 <main+0x32>
jmp    1146 <main+0x46>
mov    -0x14(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1119 <main+0x19>
xor    %eax,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
ret i32 0
}
int do_183() { return 183; }


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

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

LLVM IR (-O0):
define i32 @do_183() {
ret i32 183
}

LLVM IR (-O2):
define i32 @do_183() {
ret i32 183
}
/* Variables and functions */
int /*<<< orphan*/ l3_set_addr(int);
int /*<<< orphan*/ l3_write_data(unsigned int);
void uda_volume(unsigned int volume) {
  if (volume > 63)
    volume = 63;
  l3_set_addr((0x14 | 0));
  l3_write_data(~volume & 0x3f);
}


x86 assembly (clang, -O0):
<uda_volume>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x3f,-0x4(%rbp)
jbe    113c <uda_volume+0x1c>
movl   $0x3f,-0x4(%rbp)
mov    $0x14,%edi
call   1040 <l3_set_addr@plt>
mov    -0x4(%rbp),%edi
xor    $0xffffffff,%edi
and    $0x3f,%edi
call   1030 <l3_write_data@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<uda_volume>:
push   %rbx
mov    %edi,%ebx
cmp    $0x3f,%edi
mov    $0x3f,%eax
cmovae %eax,%ebx
mov    $0x14,%edi
call   1040 <l3_set_addr@plt>
xor    $0x3f,%ebx
mov    %ebx,%edi
pop    %rbx
jmp    1030 <l3_write_data@plt>

LLVM IR (-O0):
define void @uda_volume(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp ugt i32 %3, 63
br i1 %4, label %5, label %6
5: ; preds = %1
store i32 63, i32* %2
br label %6
6: ; preds = %5, %1
%7 = call i32 @l3_set_addr(i32 20)
%8 = load i32, i32* %2
%9 = xor i32 %8, -1
%10 = and i32 %9, 63
%11 = call i32 @l3_write_data(i32 %10)
ret void
}

LLVM IR (-O2):
define void @uda_volume(i32 %0) {
%2 = icmp ult i32 %0, 63
%3 = select i1 %2, i32 %0, i32 63
%4 = tail call i32 @l3_set_addr(i32 20)
%5 = xor i32 %3, 63
%6 = tail call i32 @l3_write_data(i32 %5)
ret void
}
/* Variables and functions */
double sin(double);
double toY(double r, double theta, double phi) { return r * sin(phi); }


x86 assembly (clang, -O0):
<toY>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x18(%rbp),%xmm0
call   1030 <sin@plt>
movaps %xmm0,%xmm1
movsd  -0x20(%rbp),%xmm0
mulsd  %xmm1,%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<toY>:
push   %rax
movsd  %xmm0,(%rsp)
movapd %xmm2,%xmm0
call   1030 <sin@plt>
mulsd  (%rsp),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @toY(double %0, double %1, double %2) {
%4 = alloca double
%5 = alloca double
%6 = alloca double
store double %0, double* %4
store double %1, double* %5
store double %2, double* %6
%7 = load double, double* %4
%8 = load double, double* %6
%9 = call double @sin(double %8)
%10 = fmul double %7, %9
ret double %10
}

LLVM IR (-O2):
define double @toY(double %0, double %1, double %2) {
%4 = tail call double @sin(double %2)
%5 = fmul double %4, %0
ret double %5
}
void RTUuidCompare2Strs(void) {}


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

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

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

LLVM IR (-O2):
define void @RTUuidCompare2Strs() {
ret void
}
long double expl(long double x) {
  long double res;
  __asm__ __volatile__("fldl2e;"
                       "fmulp;"
                       "f2xm1;"
                       "fld1;"
                       "faddp"
                       : "=t"(res)
                       : "0"(x));
  return res;
}


x86 assembly (clang, -O0):
<expl>:
push   %rbp
mov    %rsp,%rbp
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
fldt   -0x10(%rbp)
fldl2e
fmulp  %st,%st(1)
f2xm1
fld1
faddp  %st,%st(1)
fstpt  -0x20(%rbp)
fldt   -0x20(%rbp)
pop    %rbp
ret

x86 assembly (clang, -O2):
<expl>:
fldt   0x8(%rsp)
fldl2e
fmulp  %st,%st(1)
f2xm1
fld1
faddp  %st,%st(1)
ret

LLVM IR (-O0):
define x86_fp80 @expl(x86_fp80 %0) {
%2 = alloca x86_fp80
%3 = alloca x86_fp80
store x86_fp80 %0, x86_fp80* %2
%4 = load x86_fp80, x86_fp80* %2
%5 = call x86_fp80 asm sideeffect "fldl2e;fmulp;f2xm1;fld1;faddp", "={st},0,~{dirflag},~{fpsr},~{flags}"(x86_fp80 %4)
store x86_fp80 %5, x86_fp80* %3
%6 = load x86_fp80, x86_fp80* %3
ret x86_fp80 %6
}

LLVM IR (-O2):
define x86_fp80 @expl(x86_fp80 %0) {
%2 = tail call x86_fp80 asm sideeffect "fldl2e;fmulp;f2xm1;fld1;faddp", "={st},0,~{dirflag},~{fpsr},~{flags}"(x86_fp80 %0)
ret x86_fp80 %2
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void param_string_clear(void *data) { free(data); }


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

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

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

LLVM IR (-O2):
define void @param_string_clear(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
int main() {
L:
  receivePtrs((void *[]){&&L, 0, 0});
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    0x2f02(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0x2eff(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0x2efc(%rip),%rax
mov    %rax,-0x10(%rbp)
lea    -0x20(%rbp),%rdi
mov    $0x0,%al
call   1030 <receivePtrs@plt>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
mov    0x2cfd(%rip),%rax
mov    %rax,0x10(%rsp)
movups 0x2ce1(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rdi
xor    %eax,%eax
call   1030 <receivePtrs@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
@constinit = private global [3 x i8*] [i8* blockaddress(@main, %3), i8* null, i8* null]
define i32 @main() {
%1 = alloca i32
%2 = alloca [3 x i8*]
store i32 0, i32* %1
br label %3
3: ; preds = %9, %0
%4 = getelementptr inbounds [3 x i8*], [3 x i8*]* %2, i64 0, i64 0
%5 = bitcast [3 x i8*]* %2 to i8*
%6 = getelementptr inbounds [3 x i8*], [3 x i8*]* %2, i64 0, i64 0
%7 = call i32 (i8**, ...) bitcast (i32 (...)* @receivePtrs to i32 (i8**, ...)*)(i8** %6)
%8 = load i32, i32* %1
ret i32 %8
9: ; No predecessors!
indirectbr i8* undef, [label %3]
}

LLVM IR (-O2):
@constinit = [3 x i8*] [i8* blockaddress(@main, %2), i8* null, i8* null]
define i32 @main() {
%1 = alloca [3 x i8*]
br label %2
2: ; preds = %0
%3 = bitcast [3 x i8*]* %1 to i8*
%4 = getelementptr inbounds [3 x i8*], [3 x i8*]* %1, i64 0, i64 0
%5 = call i32 (i8**, ...) bitcast (i32 (...)* @receivePtrs to i32 (i8**, ...)*)(i8** %4)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ output_line(char *);
gen_twos_complement() { output_line("sub\t$v0, $zero, $v0"); }


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

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

LLVM IR (-O0):
@.str = [20 x i8] c"sub\09$v0, $zero, $v0\00"
define i32 @gen_twos_complement() {
%1 = alloca i32
%2 = call i32 @output_line(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
@.str = [20 x i8] c"sub\09$v0, $zero, $v0\00"
define i32 @gen_twos_complement() {
%1 = tail call i32 @output_line(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
ret i32 undef
}
/* Variables and functions */
int EXIT_SUCCESS;
int INT_MAX;
int INT_MIN;
int /*<<< orphan*/ printf(char *, int);
int main() {
  printf("max int = %d\n", INT_MAX);
  printf("min int = %d\n", INT_MIN);
  return EXIT_SUCCESS;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    0x2ec2(%rip),%rax
mov    (%rax),%esi
lea    0xed1(%rip),%rdi
call   1030 <printf@plt>
mov    0x2ea5(%rip),%rax
mov    (%rax),%esi
lea    0xeca(%rip),%rdi
call   1030 <printf@plt>
mov    0x2e80(%rip),%rax
mov    (%rax),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    0x2ed0(%rip),%rax
mov    (%rax),%esi
lea    0xedf(%rip),%rdi
call   1030 <printf@plt>
mov    0x2eb3(%rip),%rax
mov    (%rax),%esi
lea    0xed8(%rip),%rdi
call   1030 <printf@plt>
mov    0x2e8e(%rip),%rax
mov    (%rax),%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [14 x i8] c"max int = %d\0A\00"
@INT_MAX = global i32 0
@.str.1 = [14 x i8] c"min int = %d\0A\00"
@INT_MIN = global i32 0
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = load i32, i32* @INT_MAX
%3 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 %2)
%4 = load i32, i32* @INT_MIN
%5 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), i32 %4)
%6 = load i32, i32* @EXIT_SUCCESS
ret i32 %6
}

LLVM IR (-O2):
@.str = [14 x i8] c"max int = %d\0A\00"
@INT_MAX = global i32 0
@.str.1 = [14 x i8] c"min int = %d\0A\00"
@INT_MIN = global i32 0
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = load i32, i32* @INT_MAX
%2 = tail call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 %1)
%3 = load i32, i32* @INT_MIN
%4 = tail call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), i32 %3)
%5 = load i32, i32* @EXIT_SUCCESS
ret i32 %5
}
int test_imm_97uint32_mem(unsigned int *val) {
  return ((*val) & (0x97 << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_97uint32_mem(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = and i32 %2, 151
%4 = icmp eq i32 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
void BN_mod_sub_quick(void) {}


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

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

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

LLVM IR (-O2):
define void @BN_mod_sub_quick() {
ret void
}
void glutSwapBuffers() {}


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

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

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

LLVM IR (-O2):
define void @glutSwapBuffers() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ abort();
void a_crash() { abort(); }


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

x86 assembly (clang, -O2):
<a_crash>:
push   %rax
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
define void @a_crash() {
%1 = call i32 (...) @abort()
unreachable
}

LLVM IR (-O2):
define void @a_crash() {
%1 = tail call i32 (...) @abort()
unreachable
}
/* Variables and functions */
scalar_t__ IsNumeric(char);
int IsDwDebugNumeric(char c) { return IsNumeric(c) || c == '$' || c == '#'; }


x86 assembly (clang, -O0):
<IsDwDebugNumeric>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%edi
call   1030 <IsNumeric@plt>
mov    %rax,%rcx
mov    $0x1,%al
cmp    $0x0,%rcx
mov    %al,-0x2(%rbp)
jne    1158 <IsDwDebugNumeric+0x48>
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x24,%ecx
mov    %al,-0x2(%rbp)
je     1158 <IsDwDebugNumeric+0x48>
movsbl -0x1(%rbp),%eax
cmp    $0x23,%eax
sete   %al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<IsDwDebugNumeric>:
push   %rbx
mov    %edi,%ebx
call   1030 <IsNumeric@plt>
test   %rax,%rax
setne  %al
lea    -0x23(%rbx),%ecx
cmp    $0x2,%cl
setb   %cl
or     %al,%cl
movzbl %cl,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @IsDwDebugNumeric(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = call i64 @IsNumeric(i8 signext %3)
%5 = icmp ne i64 %4, 0
br i1 %5, label %14, label %6
6: ; preds = %1
%7 = load i8, i8* %2
%8 = sext i8 %7 to i32
%9 = icmp eq i32 %8, 36
br i1 %9, label %14, label %10
10: ; preds = %6
%11 = load i8, i8* %2
%12 = sext i8 %11 to i32
%13 = icmp eq i32 %12, 35
br label %14
14: ; preds = %10, %6, %1
%15 = phi i1 [ true, %6 ], [ true, %1 ], [ %13, %10 ]
%16 = zext i1 %15 to i32
ret i32 %16
}

LLVM IR (-O2):
define i32 @IsDwDebugNumeric(i8 signext %0) {
%2 = tail call i64 @IsNumeric(i8 signext %0)
%3 = icmp ne i64 %2, 0
%4 = add i8 %0, -35
%5 = icmp ult i8 %4, 2
%6 = or i1 %5, %3
%7 = zext i1 %6 to i32
ret i32 %7
}
int xgetbv_eax(int op) {
  int eax, edx;
  __asm__(".byte 0x0f, 0x01, 0xd0" : "=a"(eax), "=d"(edx) : "c"(op));
  return eax;
}


x86 assembly (clang, -O0):
<xgetbv_eax>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%ecx
xgetbv
mov    %eax,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<xgetbv_eax>:
mov    %edi,%ecx
xgetbv
ret

LLVM IR (-O0):
define i32 @xgetbv_eax(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %2
%5 = load i32, i32* %2
%6 = call { i32, i32 } asm ".byte 0x0f, 0x01, 0xd0", "={ax},={dx},{cx},~{dirflag},~{fpsr},~{flags}"(i32 %5)
%7 = extractvalue { i32, i32 } %6, 0
%8 = extractvalue { i32, i32 } %6, 1
store i32 %7, i32* %3
store i32 %8, i32* %4
%9 = load i32, i32* %3
ret i32 %9
}

LLVM IR (-O2):
define i32 @xgetbv_eax(i32 %0) {
%2 = tail call { i32, i32 } asm ".byte 0x0f, 0x01, 0xd0", "={ax},={dx},{cx},~{dirflag},~{fpsr},~{flags}"(i32 %0)
%3 = extractvalue { i32, i32 } %2, 0
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ print_byte(char *);
char *strtok(int /*<<< orphan*/ *, char *);
void cmdPrintByte(void) {
  char *token = strtok(NULL, " ");
  if (token != NULL) {
    print_byte(token);
  }
}


x86 assembly (clang, -O0):
<cmdPrintByte>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
xor    %eax,%eax
mov    %eax,%edi
lea    0xecd(%rip),%rsi
call   1040 <strtok@plt>
mov    %rax,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1150 <cmdPrintByte+0x30>
mov    -0x8(%rbp),%rdi
call   1030 <print_byte@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cmdPrintByte>:
push   %rax
lea    0xed8(%rip),%rsi
xor    %edi,%edi
call   1040 <strtok@plt>
test   %rax,%rax
je     113d <cmdPrintByte+0x1d>
mov    %rax,%rdi
pop    %rax
jmp    1030 <print_byte@plt>
pop    %rax
ret

LLVM IR (-O0):
@.str = [2 x i8] c" \00"
define void @cmdPrintByte() {
%1 = alloca i8*
%2 = call i8* @strtok(i32* null, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
store i8* %2, i8** %1
%3 = load i8*, i8** %1
%4 = icmp ne i8* %3, null
br i1 %4, label %5, label %8
5: ; preds = %0
%6 = load i8*, i8** %1
%7 = call i32 @print_byte(i8* %6)
br label %8
8: ; preds = %5, %0
ret void
}

LLVM IR (-O2):
@.str = [2 x i8] c" \00"
define void @cmdPrintByte() {
%1 = tail call i8* @strtok(i32* null, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%2 = icmp eq i8* %1, null
br i1 %2, label %5, label %3
3: ; preds = %0
%4 = tail call i32 @print_byte(i8* %1)
br label %5
5: ; preds = %3, %0
ret void
}
/* Type definitions */
struct jslex {
  int dummy;
};

/* Variables and functions */
scalar_t__ my_colon(struct jslex *);
scalar_t__ my_junk_string(struct jslex *);
scalar_t__ my_junk_value(struct jslex *);
int my_junk_member(struct jslex *lexer) {
  return my_junk_string(lexer) && my_colon(lexer) && my_junk_value(lexer);
}


x86 assembly (clang, -O0):
<my_junk_member>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <my_junk_string@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    $0x0,%rcx
mov    %al,-0x9(%rbp)
je     1185 <my_junk_member+0x55>
mov    -0x8(%rbp),%rdi
call   1050 <my_colon@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    $0x0,%rcx
mov    %al,-0x9(%rbp)
je     1185 <my_junk_member+0x55>
mov    -0x8(%rbp),%rdi
call   1040 <my_junk_value@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<my_junk_member>:
push   %rbp
push   %rbx
push   %rax
mov    %rdi,%rbx
call   1030 <my_junk_string@plt>
xor    %ebp,%ebp
test   %rax,%rax
je     1160 <my_junk_member+0x30>
mov    %rbx,%rdi
call   1050 <my_colon@plt>
test   %rax,%rax
je     1160 <my_junk_member+0x30>
mov    %rbx,%rdi
call   1040 <my_junk_value@plt>
xor    %ebp,%ebp
test   %rax,%rax
setne  %bpl
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
%struct.jslex = type { i32 }
define i32 @my_junk_member(%struct.jslex* %0) {
%2 = alloca %struct.jslex*
store %struct.jslex* %0, %struct.jslex** %2
%3 = load %struct.jslex*, %struct.jslex** %2
%4 = call i64 @my_junk_string(%struct.jslex* %3)
%5 = icmp ne i64 %4, 0
br i1 %5, label %6, label %14
6: ; preds = %1
%7 = load %struct.jslex*, %struct.jslex** %2
%8 = call i64 @my_colon(%struct.jslex* %7)
%9 = icmp ne i64 %8, 0
br i1 %9, label %10, label %14
10: ; preds = %6
%11 = load %struct.jslex*, %struct.jslex** %2
%12 = call i64 @my_junk_value(%struct.jslex* %11)
%13 = icmp ne i64 %12, 0
br label %14
14: ; preds = %10, %6, %1
%15 = phi i1 [ false, %6 ], [ false, %1 ], [ %13, %10 ]
%16 = zext i1 %15 to i32
ret i32 %16
}

LLVM IR (-O2):
%struct.jslex = type { i32 }
define i32 @my_junk_member(%struct.jslex* %0) {
%2 = tail call i64 @my_junk_string(%struct.jslex* %0)
%3 = icmp eq i64 %2, 0
br i1 %3, label %11, label %4
4: ; preds = %1
%5 = tail call i64 @my_colon(%struct.jslex* %0)
%6 = icmp eq i64 %5, 0
br i1 %6, label %11, label %7
7: ; preds = %4
%8 = tail call i64 @my_junk_value(%struct.jslex* %0)
%9 = icmp ne i64 %8, 0
%10 = zext i1 %9 to i32
br label %11
11: ; preds = %7, %4, %1
%12 = phi i32 [ 0, %4 ], [ 0, %1 ], [ %10, %7 ]
ret i32 %12
}
/* Variables and functions */
int /*<<< orphan*/ iface_midi_router_set_bend_range(int);
int /*<<< orphan*/ iface_midi_router_set_clock_div(int);
int /*<<< orphan*/ iface_midi_router_set_program(int /*<<< orphan*/);
void iface_midi_router_clear_config(void) {
  iface_midi_router_set_program(0);
  iface_midi_router_set_bend_range(2);
  iface_midi_router_set_clock_div((1));
}


x86 assembly (clang, -O0):
<iface_midi_router_clear_config>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
call   1030 <iface_midi_router_set_program@plt>
mov    $0x2,%edi
call   1040 <iface_midi_router_set_bend_range@plt>
mov    $0x1,%edi
call   1050 <iface_midi_router_set_clock_div@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<iface_midi_router_clear_config>:
push   %rax
xor    %edi,%edi
call   1030 <iface_midi_router_set_program@plt>
mov    $0x2,%edi
call   1040 <iface_midi_router_set_bend_range@plt>
mov    $0x1,%edi
pop    %rax
jmp    1050 <iface_midi_router_set_clock_div@plt>

LLVM IR (-O0):
define void @iface_midi_router_clear_config() {
%1 = call i32 @iface_midi_router_set_program(i32 0)
%2 = call i32 @iface_midi_router_set_bend_range(i32 2)
%3 = call i32 @iface_midi_router_set_clock_div(i32 1)
ret void
}

LLVM IR (-O2):
define void @iface_midi_router_clear_config() {
%1 = tail call i32 @iface_midi_router_set_program(i32 0)
%2 = tail call i32 @iface_midi_router_set_bend_range(i32 2)
%3 = tail call i32 @iface_midi_router_set_clock_div(i32 1)
ret void
}
/* Type definitions */
struct list_head {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ INIT_LIST_HEAD(struct list_head *);
int /*<<< orphan*/ __list_del_entry(struct list_head *);
void list_del_init(struct list_head *entry) {
  __list_del_entry(entry);
  INIT_LIST_HEAD(entry);
}


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

x86 assembly (clang, -O2):
<list_del_init>:
push   %rbx
mov    %rdi,%rbx
call   1040 <__list_del_entry@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <INIT_LIST_HEAD@plt>

LLVM IR (-O0):
%struct.list_head = type { i32 }
define void @list_del_init(%struct.list_head* %0) {
%2 = alloca %struct.list_head*
store %struct.list_head* %0, %struct.list_head** %2
%3 = load %struct.list_head*, %struct.list_head** %2
%4 = call i32 @__list_del_entry(%struct.list_head* %3)
%5 = load %struct.list_head*, %struct.list_head** %2
%6 = call i32 @INIT_LIST_HEAD(%struct.list_head* %5)
ret void
}

LLVM IR (-O2):
%struct.list_head = type { i32 }
define void @list_del_init(%struct.list_head* %0) {
%2 = tail call i32 @__list_del_entry(%struct.list_head* %0)
%3 = tail call i32 @INIT_LIST_HEAD(%struct.list_head* %0)
ret void
}
unsigned long long pointer_hash(void *location) {
  return (unsigned long long)location;
}


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

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

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

LLVM IR (-O2):
define i64 @pointer_hash(i8* %0) {
%2 = ptrtoint i8* %0 to i64
ret i64 %2
}
/* Type definitions */
typedef int uint8_t;
typedef int uint16_t;

/* Variables and functions */
int is_divisible(uint16_t total, uint8_t what) {
  if ((total != 0) && (what != 0))
    return ((total % what) == 0);
  else
    return 0;
}


x86 assembly (clang, -O0):
<is_divisible>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpl   $0x0,-0x8(%rbp)
je     1138 <is_divisible+0x38>
cmpl   $0x0,-0xc(%rbp)
je     1138 <is_divisible+0x38>
mov    -0x8(%rbp),%eax
cltd
idivl  -0xc(%rbp)
cmp    $0x0,%edx
sete   %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x4(%rbp)
jmp    113f <is_divisible+0x3f>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_divisible>:
xor    %eax,%eax
test   %edi,%edi
je     1116 <is_divisible+0x16>
test   %esi,%esi
je     1116 <is_divisible+0x16>
mov    %edi,%eax
cltd
idiv   %esi
xor    %eax,%eax
test   %edx,%edx
sete   %al
ret

LLVM IR (-O0):
define i32 @is_divisible(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
%6 = load i32, i32* %4
%7 = icmp ne i32 %6, 0
br i1 %7, label %8, label %17
8: ; preds = %2
%9 = load i32, i32* %5
%10 = icmp ne i32 %9, 0
br i1 %10, label %11, label %17
11: ; preds = %8
%12 = load i32, i32* %4
%13 = load i32, i32* %5
%14 = srem i32 %12, %13
%15 = icmp eq i32 %14, 0
%16 = zext i1 %15 to i32
store i32 %16, i32* %3
br label %18
17: ; preds = %8, %2
store i32 0, i32* %3
br label %18
18: ; preds = %17, %11
%19 = load i32, i32* %3
ret i32 %19
}

LLVM IR (-O2):
define i32 @is_divisible(i32 %0, i32 %1) {
%3 = icmp ne i32 %0, 0
%4 = icmp ne i32 %1, 0
%5 = and i1 %3, %4
br i1 %5, label %6, label %10
6: ; preds = %2
%7 = srem i32 %0, %1
%8 = icmp eq i32 %7, 0
%9 = zext i1 %8 to i32
br label %10
10: ; preds = %2, %6
%11 = phi i32 [ %9, %6 ], [ 0, %2 ]
ret i32 %11
}
char to_upper(char c) { return (c & 0xdf); }


x86 assembly (clang, -O0):
<to_upper>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
and    $0xdf,%eax
movsbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<to_upper>:
mov    %edi,%eax
and    $0xdf,%al
ret

LLVM IR (-O0):
define signext i8 @to_upper(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = and i32 %4, 223
%6 = trunc i32 %5 to i8
ret i8 %6
}

LLVM IR (-O2):
define signext i8 @to_upper(i8 signext %0) {
%2 = and i8 %0, -33
ret i8 %2
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
int ioctl(int d, int request, ...) {
  assert(!"NYI");
  return -1;
}


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

x86 assembly (clang, -O2):
<ioctl>:
push   %rax
xor    %edi,%edi
call   1030 <assert@plt>
mov    $0xffffffff,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [4 x i8] c"NYI\00"
define i32 @ioctl(i32 %0, i32 %1, ...) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = call i32 @assert(i32 0)
ret i32 -1
}

LLVM IR (-O2):
define i32 @ioctl(i32 %0, i32 %1, ...) {
%3 = tail call i32 @assert(i32 0)
ret i32 -1
}
int isascii(int c) { return (unsigned)c < 128; }


x86 assembly (clang, -O0):
<isascii>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x80,-0x4(%rbp)
setb   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @isascii(i32 %0) {
%2 = icmp ult i32 %0, 128
%3 = zext i1 %2 to i32
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ comb(int, int, int);
int /*<<< orphan*/ scanf(char *, int *, int *);
int main() {
  int i, n, k;
  scanf("%d%d", &n, &k);
  for (i = 1; i <= n - 1; i++) {
    comb(i, n, k);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
lea    -0xc(%rbp),%rsi
lea    -0x10(%rbp),%rdx
call   1040 <scanf@plt>
movl   $0x1,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    -0xc(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jg     1177 <main+0x57>
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
call   1030 <comb@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    114a <main+0x2a>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
lea    0xed4(%rip),%rdi
lea    0x8(%rsp),%rsi
lea    0xc(%rsp),%rdx
call   1040 <scanf@plt>
mov    0x8(%rsp),%esi
cmp    $0x2,%esi
jl     1166 <main+0x46>
mov    $0x1,%ebx
nopl   0x0(%rax)
mov    0xc(%rsp),%edx
mov    %ebx,%edi
call   1030 <comb@plt>
add    $0x1,%ebx
mov    0x8(%rsp),%esi
cmp    %esi,%ebx
jl     1150 <main+0x30>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [5 x i8] c"%d%d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = bitcast i32* %1 to i8*
%4 = bitcast i32* %2 to i8*
%5 = call i32 @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32* %1, i32* %2)
%6 = load i32, i32* %1
%7 = icmp sgt i32 %6, 1
br i1 %7, label %8, label %16
8: ; preds = %0, %8
%9 = phi i32 [ %14, %8 ], [ %6, %0 ]
%10 = phi i32 [ %13, %8 ], [ 1, %0 ]
%11 = load i32, i32* %2
%12 = call i32 @comb(i32 %10, i32 %9, i32 %11)
%13 = add nuw nsw i32 %10, 1
%14 = load i32, i32* %1
%15 = icmp slt i32 %13, %14
br i1 %15, label %8, label %16
16: ; preds = %8, %0
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ CheckDouble(double, int *, int *);
int IsInfinity(double number) {
  int mantissa, exponent;
  CheckDouble(number, &mantissa, &exponent);
  return (!mantissa && exponent) ? (number < 0.0 ? -1 : 1) : 0;
}


x86 assembly (clang, -O0):
<IsInfinity>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
lea    -0xc(%rbp),%rdi
lea    -0x10(%rbp),%rsi
call   1030 <CheckDouble@plt>
cmpl   $0x0,-0xc(%rbp)
jne    1164 <IsInfinity+0x54>
cmpl   $0x0,-0x10(%rbp)
je     1164 <IsInfinity+0x54>
movsd  -0x8(%rbp),%xmm1
xorps  %xmm0,%xmm0
mov    $0x1,%eax
mov    $0xffffffff,%ecx
ucomisd %xmm1,%xmm0
cmova  %ecx,%eax
mov    %eax,-0x14(%rbp)
jmp    116e <IsInfinity+0x5e>
xor    %eax,%eax
mov    %eax,-0x14(%rbp)
jmp    116e <IsInfinity+0x5e>
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<IsInfinity>:
sub    $0x18,%rsp
movsd  %xmm0,0x10(%rsp)
lea    0xc(%rsp),%rdi
lea    0x8(%rsp),%rsi
call   1030 <CheckDouble@plt>
xorpd  %xmm0,%xmm0
xor    %eax,%eax
ucomisd 0x10(%rsp),%xmm0
mov    0x8(%rsp),%ecx
setbe  %al
test   %ecx,%ecx
lea    -0x1(%rax,%rax,1),%edx
cmove  %ecx,%edx
xor    %eax,%eax
cmpl   $0x0,0xc(%rsp)
cmove  %edx,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
define i32 @IsInfinity(double %0) {
%2 = alloca double
%3 = alloca i32
%4 = alloca i32
store double %0, double* %2
%5 = load double, double* %2
%6 = call i32 @CheckDouble(double %5, i32* %3, i32* %4)
%7 = load i32, i32* %3
%8 = icmp ne i32 %7, 0
br i1 %8, label %17, label %9
9: ; preds = %1
%10 = load i32, i32* %4
%11 = icmp ne i32 %10, 0
br i1 %11, label %12, label %17
12: ; preds = %9
%13 = load double, double* %2
%14 = fcmp olt double %13, 0.000000e+00
%15 = zext i1 %14 to i64
%16 = select i1 %14, i32 -1, i32 1
br label %18
17: ; preds = %9, %1
br label %18
18: ; preds = %17, %12
%19 = phi i32 [ %16, %12 ], [ 0, %17 ]
ret i32 %19
}

LLVM IR (-O2):
define i32 @IsInfinity(double %0) {
%2 = alloca i32
%3 = alloca i32
%4 = bitcast i32* %2 to i8*
%5 = bitcast i32* %3 to i8*
%6 = call i32 @CheckDouble(double %0, i32* %2, i32* %3)
%7 = load i32, i32* %2
%8 = icmp eq i32 %7, 0
%9 = load i32, i32* %3
%10 = icmp ne i32 %9, 0
%11 = select i1 %8, i1 %10, i1 false
%12 = fcmp olt double %0, 0.000000e+00
%13 = select i1 %12, i32 -1, i32 1
%14 = select i1 %11, i32 %13, i32 0
ret i32 %14
}
int char_cmp(const void *lhs, const void *rhs) {
  return *(const char *)lhs - *(const char *)rhs;
}


x86 assembly (clang, -O0):
<char_cmp>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
mov    -0x10(%rbp),%rcx
movsbl (%rcx),%ecx
sub    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<char_cmp>:
movsbl (%rdi),%eax
movsbl (%rsi),%ecx
sub    %ecx,%eax
ret

LLVM IR (-O0):
define i32 @char_cmp(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = load i8, i8* %5
%7 = sext i8 %6 to i32
%8 = load i8*, i8** %4
%9 = load i8, i8* %8
%10 = sext i8 %9 to i32
%11 = sub nsw i32 %7, %10
ret i32 %11
}

LLVM IR (-O2):
define i32 @char_cmp(i8* nocapture %0, i8* nocapture %1) {
%3 = load i8, i8* %0
%4 = sext i8 %3 to i32
%5 = load i8, i8* %1
%6 = sext i8 %5 to i32
%7 = sub nsw i32 %4, %6
ret i32 %7
}
/* Type definitions */
struct vp9_read_bit_buffer {
  int dummy;
};

/* Variables and functions */
scalar_t__ vp9_rb_read_bit(struct vp9_read_bit_buffer *);
int vp9_rb_read_literal(struct vp9_read_bit_buffer *, int);
int vp9_rb_read_signed_literal(struct vp9_read_bit_buffer *rb, int bits) {
  const int value = vp9_rb_read_literal(rb, bits);
  return vp9_rb_read_bit(rb) ? -value : value;
}


x86 assembly (clang, -O0):
<vp9_rb_read_signed_literal>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1040 <vp9_rb_read_literal@plt>
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <vp9_rb_read_bit@plt>
cmp    $0x0,%rax
je     115e <vp9_rb_read_signed_literal+0x3e>
xor    %eax,%eax
sub    -0x10(%rbp),%eax
mov    %eax,-0x14(%rbp)
jmp    1164 <vp9_rb_read_signed_literal+0x44>
mov    -0x10(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<vp9_rb_read_signed_literal>:
push   %rbp
push   %rbx
push   %rax
mov    %rdi,%rbx
call   1040 <vp9_rb_read_literal@plt>
mov    %eax,%ebp
mov    %rbx,%rdi
call   1030 <vp9_rb_read_bit@plt>
mov    %ebp,%ecx
neg    %ecx
test   %rax,%rax
cmove  %ebp,%ecx
mov    %ecx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
%struct.vp9_read_bit_buffer = type { i32 }
define i32 @vp9_rb_read_signed_literal(%struct.vp9_read_bit_buffer* %0, i32 %1) {
%3 = alloca %struct.vp9_read_bit_buffer*
%4 = alloca i32
%5 = alloca i32
store %struct.vp9_read_bit_buffer* %0, %struct.vp9_read_bit_buffer** %3
store i32 %1, i32* %4
%6 = load %struct.vp9_read_bit_buffer*, %struct.vp9_read_bit_buffer** %3
%7 = load i32, i32* %4
%8 = call i32 @vp9_rb_read_literal(%struct.vp9_read_bit_buffer* %6, i32 %7)
store i32 %8, i32* %5
%9 = load %struct.vp9_read_bit_buffer*, %struct.vp9_read_bit_buffer** %3
%10 = call i64 @vp9_rb_read_bit(%struct.vp9_read_bit_buffer* %9)
%11 = icmp ne i64 %10, 0
br i1 %11, label %12, label %15
12: ; preds = %2
%13 = load i32, i32* %5
%14 = sub nsw i32 0, %13
br label %17
15: ; preds = %2
%16 = load i32, i32* %5
br label %17
17: ; preds = %15, %12
%18 = phi i32 [ %14, %12 ], [ %16, %15 ]
ret i32 %18
}

LLVM IR (-O2):
%struct.vp9_read_bit_buffer = type { i32 }
define i32 @vp9_rb_read_signed_literal(%struct.vp9_read_bit_buffer* %0, i32 %1) {
%3 = tail call i32 @vp9_rb_read_literal(%struct.vp9_read_bit_buffer* %0, i32 %1)
%4 = tail call i64 @vp9_rb_read_bit(%struct.vp9_read_bit_buffer* %0)
%5 = icmp eq i64 %4, 0
%6 = sub nsw i32 0, %3
%7 = select i1 %5, i32 %3, i32 %6
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ CHexSymbol(char *, int *);
float Hex2DecMain(int *, float, int);
int /*<<< orphan*/ free(int *);
scalar_t__ xcalloc(int, int);
float Hex2Dec(char *symbol, float multi, int index) {
  int *target;
  float result;
  target = (int *)xcalloc(index, sizeof(int));
  CHexSymbol(symbol, target);
  result = Hex2DecMain(target, multi, index);
  free(target);
  return result;
}


x86 assembly (clang, -O0):
<Hex2Dec>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
movss  %xmm0,-0xc(%rbp)
mov    %esi,-0x10(%rbp)
mov    -0x10(%rbp),%edi
mov    $0x4,%esi
call   1060 <xcalloc@plt>
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1040 <CHexSymbol@plt>
mov    -0x18(%rbp),%rdi
movss  -0xc(%rbp),%xmm0
mov    -0x10(%rbp),%esi
call   1050 <Hex2DecMain@plt>
movss  %xmm0,-0x1c(%rbp)
mov    -0x18(%rbp),%rdi
call   1030 <free@plt>
movss  -0x1c(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Hex2Dec>:
push   %rbp
push   %r14
push   %rbx
sub    $0x10,%rsp
mov    %esi,%ebp
movss  %xmm0,0xc(%rsp)
mov    %rdi,%r14
mov    %esi,%edi
mov    $0x4,%esi
call   1060 <xcalloc@plt>
mov    %rax,%rbx
mov    %r14,%rdi
mov    %rax,%rsi
call   1040 <CHexSymbol@plt>
mov    %rbx,%rdi
movss  0xc(%rsp),%xmm0
mov    %ebp,%esi
call   1050 <Hex2DecMain@plt>
movss  %xmm0,0xc(%rsp)
mov    %rbx,%rdi
call   1030 <free@plt>
movss  0xc(%rsp),%xmm0
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define float @Hex2Dec(i8* %0, float %1, i32 %2) {
%4 = alloca i8*
%5 = alloca float
%6 = alloca i32
%7 = alloca i32*
%8 = alloca float
store i8* %0, i8** %4
store float %1, float* %5
store i32 %2, i32* %6
%9 = load i32, i32* %6
%10 = call i64 @xcalloc(i32 %9, i32 4)
%11 = inttoptr i64 %10 to i32*
store i32* %11, i32** %7
%12 = load i8*, i8** %4
%13 = load i32*, i32** %7
%14 = call i32 @CHexSymbol(i8* %12, i32* %13)
%15 = load i32*, i32** %7
%16 = load float, float* %5
%17 = load i32, i32* %6
%18 = call float @Hex2DecMain(i32* %15, float %16, i32 %17)
store float %18, float* %8
%19 = load i32*, i32** %7
%20 = call i32 @free(i32* %19)
%21 = load float, float* %8
ret float %21
}

LLVM IR (-O2):
define float @Hex2Dec(i8* %0, float %1, i32 %2) {
%4 = tail call i64 @xcalloc(i32 %2, i32 4)
%5 = inttoptr i64 %4 to i32*
%6 = tail call i32 @CHexSymbol(i8* %0, i32* %5)
%7 = tail call float @Hex2DecMain(i32* %5, float %1, i32 %2)
%8 = tail call i32 @free(i32* %5)
ret float %7
}