xunge/DecIR huggingface dataset:
unsigned test(unsigned n, unsigned p) {
  static struct { char __attribute__((__aligned__(64))) c; } s;
  unsigned x;
  assert(__alignof__(s) == 64);
  asm("" : "=g"(x), "+m"(s) : "0"(&x));
  return n ? test(n - 1, x) : (x ^ p);
}


x86 assembly (clang, -O0):
<test>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    $0x1,%edi
mov    $0x0,%al
call   1030 <assert@plt>
lea    -0xc(%rbp),%rax
mov    %eax,-0xc(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     1161 <test+0x41>
mov    -0x4(%rbp),%edi
sub    $0x1,%edi
mov    -0xc(%rbp),%esi
call   1040 <test@plt>
mov    %eax,-0x10(%rbp)
jmp    116a <test+0x4a>
mov    -0xc(%rbp),%eax
xor    -0x8(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
mov    $0x1,%edi
xor    %eax,%eax
call   1030 <assert@plt>
lea    0x4(%rsp),%rax
mov    %eax,0x4(%rsp)
test   %ebp,%ebp
je     1152 <test+0x32>
add    $0xffffffff,%ebp
mov    0x4(%rsp),%esi
mov    %ebp,%edi
call   1040 <test@plt>
mov    %eax,%ebx
jmp    1156 <test+0x36>
xor    0x4(%rsp),%ebx
mov    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
%struct.anon = type { i8, [63 x i8] }
@test.s = internal global %struct.anon zeroinitializer
define i32 @test(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = call i32 (i32, ...) bitcast (i32 (...)* @assert to i32 (i32, ...)*)(i32 1)
%7 = load i32, i32* %3
%8 = icmp ne i32 %7, 0
br i1 %8, label %9, label %14
9: ; preds = %2
%10 = load i32, i32* %3
%11 = sub i32 %10, 1
%12 = load i32, i32* %5
%13 = call i32 @test(i32 %11, i32 %12)
br label %18
14: ; preds = %2
%15 = load i32, i32* %5
%16 = load i32, i32* %4
%17 = xor i32 %15, %16
br label %18
18: ; preds = %14, %9
%19 = phi i32 [ %13, %9 ], [ %17, %14 ]
ret i32 %19
}

LLVM IR (-O2):
%struct.anon = type { i8, [63 x i8] }
@test.s = internal global %struct.anon zeroinitializer
define i32 @test(i32 %0, i32 %1) {
%3 = alloca i32
%4 = bitcast i32* %3 to i8*
%5 = tail call i32 (i32, ...) bitcast (i32 (...)* @assert to i32 (i32, ...)*)(i32 1)
%6 = icmp eq i32 %0, 0
br i1 %6, label %11, label %7
7: ; preds = %2
%8 = add i32 %0, -1
%9 = load i32, i32* %3
%10 = call i32 @test(i32 %8, i32 %9)
br label %14
11: ; preds = %2
%12 = load i32, i32* %3
%13 = xor i32 %12, %1
br label %14
14: ; preds = %11, %7
%15 = phi i32 [ %10, %7 ], [ %13, %11 ]
ret i32 %15
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void colorReset() { printf("\e[m"); }


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

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

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

LLVM IR (-O2):
@.str = [4 x i8] c"\1B[m\00"
define void @colorReset() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ __free(void *);
void cfree(void *mem) { __free(mem); }


x86 assembly (clang, -O0):
<cfree>:
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):
<cfree>:
jmp    1030 <__free@plt>

LLVM IR (-O0):
define void @cfree(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 @cfree(i8* %0) {
%2 = tail call i32 @__free(i8* %0)
ret void
}
void convert_nth_position(int *number, int position) {
  *number ^= (1 << position);
}


x86 assembly (clang, -O0):
<convert_nth_position>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%ecx
mov    $0x1,%eax
shl    %cl,%eax
mov    %eax,%ecx
mov    -0x8(%rbp),%rax
xor    (%rax),%ecx
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<convert_nth_position>:
mov    %esi,%ecx
mov    $0x1,%eax
shl    %cl,%eax
xor    %eax,(%rdi)
ret

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

LLVM IR (-O2):
define void @convert_nth_position(i32* nocapture %0, i32 %1) {
%3 = shl nuw i32 1, %1
%4 = load i32, i32* %0
%5 = xor i32 %4, %3
store i32 %5, i32* %0
ret void
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ free(int *);
int *malloc(int);
int /*<<< orphan*/ merge_sort_core(int *, int *, int);
void merge_sort(int *pxs, int n) {
  int *pys = malloc(n * sizeof(int));
  if (pys == 0)
    abort();
  merge_sort_core(pxs, pys, n);
  free(pys);
}


x86 assembly (clang, -O0):
<merge_sort>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movslq -0xc(%rbp),%rax
shl    $0x2,%rax
mov    %eax,%edi
call   1060 <malloc@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    1174 <merge_sort+0x34>
mov    $0x0,%al
call   1040 <abort@plt>
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0xc(%rbp),%edx
call   1050 <merge_sort_core@plt>
mov    -0x18(%rbp),%rdi
call   1030 <free@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<merge_sort>:
push   %r15
push   %r14
push   %rbx
mov    %esi,%r15d
mov    %rdi,%r14
lea    0x0(,%r15,4),%edi
call   1060 <malloc@plt>
test   %rax,%rax
je     117b <merge_sort+0x3b>
mov    %rax,%rbx
mov    %r14,%rdi
mov    %rax,%rsi
mov    %r15d,%edx
call   1050 <merge_sort_core@plt>
mov    %rbx,%rdi
pop    %rbx
pop    %r14
pop    %r15
jmp    1030 <free@plt>
xor    %eax,%eax
call   1040 <abort@plt>

LLVM IR (-O0):
define void @merge_sort(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
%5 = alloca i32*
store i32* %0, i32** %3
store i32 %1, i32* %4
%6 = load i32, i32* %4
%7 = sext i32 %6 to i64
%8 = mul i64 %7, 4
%9 = trunc i64 %8 to i32
%10 = call i32* @malloc(i32 %9)
store i32* %10, i32** %5
%11 = load i32*, i32** %5
%12 = icmp eq i32* %11, null
br i1 %12, label %13, label %15
13: ; preds = %2
%14 = call i32 (...) @abort()
unreachable
15: ; preds = %2
%16 = load i32*, i32** %3
%17 = load i32*, i32** %5
%18 = load i32, i32* %4
%19 = call i32 @merge_sort_core(i32* %16, i32* %17, i32 %18)
%20 = load i32*, i32** %5
%21 = call i32 @free(i32* %20)
ret void
}

LLVM IR (-O2):
define void @merge_sort(i32* %0, i32 %1) {
%3 = shl i32 %1, 2
%4 = tail call i32* @malloc(i32 %3)
%5 = icmp eq i32* %4, null
br i1 %5, label %6, label %8
6: ; preds = %2
%7 = tail call i32 (...) @abort()
unreachable
8: ; preds = %2
%9 = tail call i32 @merge_sort_core(i32* %0, i32* %4, i32 %1)
%10 = tail call i32 @free(i32* %4)
ret void
}
/* Variables and functions */
scalar_t__ listen(int, int);
int /*<<< orphan*/ perror(char *);
int Listen(int sockfd, int backlog) {
  if (listen(sockfd, backlog) < 0) {
    perror("Listen() error");
    return -1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<Listen>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
call   1030 <listen@plt>
cmp    $0x0,%rax
jge    115b <Listen+0x3b>
lea    0xeb6(%rip),%rdi
call   1040 <perror@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    1162 <Listen+0x42>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Listen>:
push   %rax
call   1030 <listen@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
js     1132 <Listen+0x12>
pop    %rcx
ret
lea    0xec7(%rip),%rdi
call   1040 <perror@plt>
mov    $0xffffffff,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [15 x i8] c"Listen() error\00"
define i32 @Listen(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 = load i32, i32* %5
%8 = call i64 @listen(i32 %6, i32 %7)
%9 = icmp slt i64 %8, 0
br i1 %9, label %10, label %12
10: ; preds = %2
%11 = call i32 @perror(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
store i32 -1, i32* %3
br label %13
12: ; preds = %2
store i32 0, i32* %3
br label %13
13: ; preds = %12, %10
%14 = load i32, i32* %3
ret i32 %14
}

LLVM IR (-O2):
@.str = [15 x i8] c"Listen() error\00"
define i32 @Listen(i32 %0, i32 %1) {
%3 = tail call i64 @listen(i32 %0, i32 %1)
%4 = icmp slt i64 %3, 0
br i1 %4, label %5, label %7
5: ; preds = %2
%6 = tail call i32 @perror(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
br label %7
7: ; preds = %2, %5
%8 = phi i32 [ -1, %5 ], [ 0, %2 ]
ret i32 %8
}
short ldint(p)
register char *p;
{
  register unsigned int val;
  val = *((unsigned char *)p++);
  val = (val << 8) + *((unsigned char *)p++);
  return ((short)val);
}


x86 assembly (clang, -O0):
<ldint>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movzbl (%rax),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
shl    $0x8,%eax
mov    -0x8(%rbp),%rcx
mov    %rcx,%rdx
add    $0x1,%rdx
mov    %rdx,-0x8(%rbp)
movzbl (%rcx),%ecx
add    %ecx,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cwtl
pop    %rbp
ret

x86 assembly (clang, -O2):
<ldint>:
movzwl (%rdi),%eax
rol    $0x8,%ax
ret

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

LLVM IR (-O2):
define signext i16 @ldint(i8* nocapture %0) {
%2 = getelementptr inbounds i8, i8* %0, i64 1
%3 = load i8, i8* %0
%4 = zext i8 %3 to i16
%5 = shl nuw i16 %4, 8
%6 = load i8, i8* %2
%7 = zext i8 %6 to i16
%8 = or i16 %5, %7
ret i16 %8
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main(void) {
  register int a = 20;
  printf("%d\n", a);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x14,-0x8(%rbp)
mov    -0x8(%rbp),%esi
lea    0xed0(%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
mov    $0x14,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 20)
ret i32 0
}
/* Type definitions */
typedef scalar_t__ uint8_t;

/* Variables and functions */
void uint8Clear(uint8_t *data) { *data = 0; }


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

x86 assembly (clang, -O2):
<uint8Clear>:
movq   $0x0,(%rdi)
ret

LLVM IR (-O0):
define void @uint8Clear(i64* %0) {
%2 = alloca i64*
store i64* %0, i64** %2
%3 = load i64*, i64** %2
store i64 0, i64* %3
ret void
}

LLVM IR (-O2):
define void @uint8Clear(i64* nocapture writeonly %0) {
store i64 0, i64* %0
ret void
}
/* Type definitions */
typedef float uint16_t;

/* Variables and functions */
double mlx90614_reg_to_temp(uint16_t reg) { return reg * 0.02f - 273.15f; }


x86 assembly (clang, -O0):
<mlx90614_reg_to_temp>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
movss  0xeea(%rip),%xmm1
mulss  %xmm1,%xmm0
movss  0xee2(%rip),%xmm1
addss  %xmm1,%xmm0
cvtss2sd %xmm0,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<mlx90614_reg_to_temp>:
mulss  0xef8(%rip),%xmm0
addss  0xef4(%rip),%xmm0
cvtss2sd %xmm0,%xmm0
ret

LLVM IR (-O0):
define double @mlx90614_reg_to_temp(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = call float @llvm.fmuladd.f32(float %3, float 0x3F947AE140000000, float 0xC071126660000000)
%5 = fpext float %4 to double
ret double %5
}

LLVM IR (-O2):
define double @mlx90614_reg_to_temp(float %0) {
%2 = tail call float @llvm.fmuladd.f32(float %0, float 0x3F947AE140000000, float 0xC071126660000000)
%3 = fpext float %2 to double
ret double %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void print_plain_text_format(void) {
  printf(
      "\n /****************************  				\n "
      "plaintext_struct  				\n "
      "****************************/  				\n "
      "plaintext_head[3] 				\n "
      "plaintext_pid[5]:ocean 				\n "
      "plaintext_request_owner[8]:fatcory/custom/tool 			"
      "	\n plaintext_sale_country[5]:china/usa 				\n "
      "plaintext_lock_auth[8];				\n 		"
      "->bit7-6 head: AU 				\n 		"
      "->bit5-4 ff(flash forever)				\n 	"
      "	->bit3-2 critical partion 				\n 	"
      "	->bit1-0 normal partion auth 				\n "
      "plaintext_sn[8] 				\n plaintext_imei1[16] 	"
      "			\n plaintext_imei2[16] 				\n "
      "reserved_data[24] 				\n");
}


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

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

LLVM IR (-O0):
@.str = [506 x i8] c"\0A /**************************** \09\09\09\09\0A plaintext_struct \09\09\09\09\0A ****************************/ \09\09\09\09\0A plaintext_head[3] \09\09\09\09\0A plaintext_pid[5]:ocean \09\09\09\09\0A plaintext_request_owner[8]:fatcory/custom/tool \09\09\09\09\0A plaintext_sale_country[5]:china/usa \09\09\09\09\0A plaintext_lock_auth[8];\09\09\09\09\0A \09\09->bit7-6 head: AU \09\09\09\09\0A \09\09->bit5-4 ff(flash forever)\09\09\09\09\0A \09\09->bit3-2 critical partion \09\09\09\09\0A \09\09->bit1-0 normal partion auth \09\09\09\09\0A plaintext_sn[8] \09\09\09\09\0A plaintext_imei1[16] \09\09\09\09\0A plaintext_imei2[16] \09\09\09\09\0A reserved_data[24] \09\09\09\09\0A\00"
define void @print_plain_text_format() {
%1 = call i32 @printf(i8* getelementptr inbounds ([506 x i8], [506 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [505 x i8] c"\0A /**************************** \09\09\09\09\0A plaintext_struct \09\09\09\09\0A ****************************/ \09\09\09\09\0A plaintext_head[3] \09\09\09\09\0A plaintext_pid[5]:ocean \09\09\09\09\0A plaintext_request_owner[8]:fatcory/custom/tool \09\09\09\09\0A plaintext_sale_country[5]:china/usa \09\09\09\09\0A plaintext_lock_auth[8];\09\09\09\09\0A \09\09->bit7-6 head: AU \09\09\09\09\0A \09\09->bit5-4 ff(flash forever)\09\09\09\09\0A \09\09->bit3-2 critical partion \09\09\09\09\0A \09\09->bit1-0 normal partion auth \09\09\09\09\0A plaintext_sn[8] \09\09\09\09\0A plaintext_imei1[16] \09\09\09\09\0A plaintext_imei2[16] \09\09\09\09\0A reserved_data[24] \09\09\09\09\00"
define void @print_plain_text_format() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([505 x i8], [505 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ aty();
int /*<<< orphan*/ pushNumber(int /*<<< orphan*/);
void basAty() { pushNumber(aty()); }


x86 assembly (clang, -O0):
<basAty>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <aty@plt>
mov    %eax,%edi
call   1040 <pushNumber@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<basAty>:
push   %rax
xor    %eax,%eax
call   1030 <aty@plt>
mov    %eax,%edi
pop    %rax
jmp    1040 <pushNumber@plt>

LLVM IR (-O0):
define void @basAty() {
%1 = call i32 (...) @aty()
%2 = call i32 @pushNumber(i32 %1)
ret void
}

LLVM IR (-O2):
define void @basAty() {
%1 = tail call i32 (...) @aty()
%2 = tail call i32 @pushNumber(i32 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ putc(int, int /*<<< orphan*/);
int /*<<< orphan*/ stdout;
int putchar(int c) { putc(c, stdout); }


x86 assembly (clang, -O0):
<putchar>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%edi
mov    0x2ebb(%rip),%rax
mov    (%rax),%esi
call   1030 <putc@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<putchar>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%esi
jmp    1030 <putc@plt>

LLVM IR (-O0):
@stdout = global i32 0
define i32 @putchar(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = load i32, i32* @stdout
%6 = call i32 @putc(i32 %4, i32 %5)
%7 = load i32, i32* %2
ret i32 %7
}

LLVM IR (-O2):
@stdout = global i32 0
define i32 @putchar(i32 %0) {
%2 = load i32, i32* @stdout
%3 = tail call i32 @putc(i32 %0, i32 %2)
ret i32 undef
}
void pci_p2pmem_free_sgl(struct pci_dev *pdev, struct scatterlist *sgl) {}


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

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

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

LLVM IR (-O2):
%struct.pci_dev = type opaque
%struct.scatterlist = type opaque
define void @pci_p2pmem_free_sgl(%struct.pci_dev* nocapture %0, %struct.scatterlist* nocapture %1) {
ret void
}
/* Variables and functions */
int dup2(int, int);
int dup(int old) { return dup2(old, -1); }


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

x86 assembly (clang, -O2):
<dup>:
mov    $0xffffffff,%esi
jmp    1030 <dup2@plt>

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

LLVM IR (-O2):
define i32 @dup(i32 %0) {
%2 = tail call i32 @dup2(i32 %0, i32 -1)
ret i32 %2
}
/* Variables and functions */
double _suntime_get_time(double, double, double, int, int, int, int);
double suntime_get_sunrise_utc(double latitude, double longitude, double zenith,
                               int year, int month, int day) {
  return _suntime_get_time(latitude, longitude, zenith, year, month, day, 1);
}


x86 assembly (clang, -O0):
<suntime_get_sunrise_utc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
mov    %edi,-0x1c(%rbp)
mov    %esi,-0x20(%rbp)
mov    %edx,-0x24(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
movsd  -0x18(%rbp),%xmm2
mov    -0x1c(%rbp),%edi
mov    -0x20(%rbp),%esi
mov    -0x24(%rbp),%edx
mov    $0x1,%ecx
call   1030 <_suntime_get_time@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<suntime_get_sunrise_utc>:
mov    $0x1,%ecx
jmp    1030 <_suntime_get_time@plt>

LLVM IR (-O0):
define double @suntime_get_sunrise_utc(double %0, double %1, double %2, i32 %3, i32 %4, i32 %5) {
%7 = alloca double
%8 = alloca double
%9 = alloca double
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
store double %0, double* %7
store double %1, double* %8
store double %2, double* %9
store i32 %3, i32* %10
store i32 %4, i32* %11
store i32 %5, i32* %12
%13 = load double, double* %7
%14 = load double, double* %8
%15 = load double, double* %9
%16 = load i32, i32* %10
%17 = load i32, i32* %11
%18 = load i32, i32* %12
%19 = call double @_suntime_get_time(double %13, double %14, double %15, i32 %16, i32 %17, i32 %18, i32 1)
ret double %19
}

LLVM IR (-O2):
define double @suntime_get_sunrise_utc(double %0, double %1, double %2, i32 %3, i32 %4, i32 %5) {
%7 = tail call double @_suntime_get_time(double %0, double %1, double %2, i32 %3, i32 %4, i32 %5, i32 1)
ret double %7
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_SUCCESS;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ myMapLines();
int main(int argc, const char *argv[]) {
  myMapLines();
  exit(EXIT_SUCCESS);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1030 <myMapLines@plt>
mov    0x2e9c(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <myMapLines@plt>
mov    0x2eb1(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 (...) @myMapLines()
%7 = load i32, i32* @EXIT_SUCCESS
%8 = call i32 @exit(i32 %7)
unreachable
}

LLVM IR (-O2):
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @myMapLines()
%4 = load i32, i32* @EXIT_SUCCESS
%5 = tail call i32 @exit(i32 %4)
unreachable
}
void d2i_SXNETID(void) {}


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

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

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

LLVM IR (-O2):
define void @d2i_SXNETID() {
ret void
}
/* Type definitions */
struct bitmask {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ numa_bitmask_free(struct bitmask *);
void numa_free_cpumask(struct bitmask *b) { numa_bitmask_free(b); }


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

x86 assembly (clang, -O2):
<numa_free_cpumask>:
jmp    1030 <numa_bitmask_free@plt>

LLVM IR (-O0):
%struct.bitmask = type { i32 }
define void @numa_free_cpumask(%struct.bitmask* %0) {
%2 = alloca %struct.bitmask*
store %struct.bitmask* %0, %struct.bitmask** %2
%3 = load %struct.bitmask*, %struct.bitmask** %2
%4 = call i32 @numa_bitmask_free(%struct.bitmask* %3)
ret void
}

LLVM IR (-O2):
%struct.bitmask = type { i32 }
define void @numa_free_cpumask(%struct.bitmask* %0) {
%2 = tail call i32 @numa_bitmask_free(%struct.bitmask* %0)
ret void
}
char *__stpcpy(dest, src)
char *dest;
const char *src;
{
  register char *d = dest;
  register const char *s = src;
  do
    *d++ = *s;
  while (*s++ != '\0');
  return d - 1;
}


x86 assembly (clang, -O0):
<__stpcpy>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
mov    (%rax),%cl
mov    -0x18(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x18(%rbp)
mov    %cl,(%rax)
mov    -0x20(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x20(%rbp)
movsbl (%rax),%eax
cmp    $0x0,%eax
jne    111c <__stpcpy+0x1c>
mov    -0x18(%rbp),%rax
add    $0xffffffffffffffff,%rax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i8* @__stpcpy(i8* writeonly %0, i8* nocapture %1) {
br label %3
3: ; preds = %3, %2
%4 = phi i8* [ %0, %2 ], [ %7, %3 ]
%5 = phi i8* [ %1, %2 ], [ %8, %3 ]
%6 = load i8, i8* %5
%7 = getelementptr inbounds i8, i8* %4, i64 1
store i8 %6, i8* %4
%8 = getelementptr inbounds i8, i8* %5, i64 1
%9 = load i8, i8* %5
%10 = icmp eq i8 %9, 0
br i1 %10, label %11, label %3
11: ; preds = %3
ret i8* %4
}
int aa_pro_ctr_a0e(int chan, unsigned char *buf, int len) {
  hu_log(6, "hu_aap", __func__, "!!!!!!!!");
  return (-1);
}


x86 assembly (clang, -O0):
<aa_pro_ctr_a0e>:
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_a0e>:
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_a0e = [15 x i8] c"aa_pro_ctr_a0e\00"
@.str.1 = [9 x i8] c"!!!!!!!!\00"
define i32 @aa_pro_ctr_a0e(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_a0e, 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_a0e = [15 x i8] c"aa_pro_ctr_a0e\00"
@.str.1 = [9 x i8] c"!!!!!!!!\00"
define i32 @aa_pro_ctr_a0e(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_a0e, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0))
ret i32 -1
}
/* Variables and functions */
char *make_scalar(char *, char *);
char *max(char *field) { return make_scalar("MAX", field); }


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

x86 assembly (clang, -O2):
<max>:
mov    %rdi,%rsi
lea    0xee6(%rip),%rdi
jmp    1030 <make_scalar@plt>

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

LLVM IR (-O2):
@.str = [4 x i8] c"MAX\00"
define i8* @max(i8* %0) {
%2 = tail call i8* @make_scalar(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %0)
ret i8* %2
}
void FlashLeavePump(void) {
  (*((volatile unsigned long *)(0x400FB700 + 0x000000048))) = 0xA5937EC0 | 0x0;
}


x86 assembly (clang, -O0):
<FlashLeavePump>:
push   %rbp
mov    %rsp,%rbp
mov    $0x400fb748,%eax
mov    $0xa5937ec0,%ecx
mov    %rcx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<FlashLeavePump>:
mov    $0xa5937ec0,%eax
mov    %rax,0x400fb748
40
ret

LLVM IR (-O0):
define void @FlashLeavePump() {
store volatile i64 2777906880, i64* inttoptr (i64 1074771784 to i64*)
ret void
}

LLVM IR (-O2):
define void @FlashLeavePump() {
store volatile i64 2777906880, i64* inttoptr (i64 1074771784 to i64*)
ret void
}
void miami_start_instrumentation_() {}


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

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

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

LLVM IR (-O2):
define void @miami_start_instrumentation_() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ sleep(int);
void recursion(int i) {
  if (i == 0)
    return;
  sleep(1);
  printf("%d\n", i);
  recursion(i - 1);
}


x86 assembly (clang, -O0):
<recursion>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jne    114a <recursion+0x1a>
jmp    116e <recursion+0x3e>
mov    $0x1,%edi
call   1050 <sleep@plt>
mov    -0x4(%rbp),%esi
lea    0xea2(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%edi
sub    $0x1,%edi
call   1040 <recursion@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<recursion>:
push   %r14
push   %rbx
push   %rax
test   %edi,%edi
je     1159 <recursion+0x39>
mov    %edi,%ebx
lea    0xecf(%rip),%r14
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    $0x1,%edi
call   1040 <sleep@plt>
mov    %r14,%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
add    $0xffffffff,%ebx
jne    1140 <recursion+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define void @recursion(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %9, label %3
3: ; preds = %1, %3
%4 = phi i32 [ %7, %3 ], [ %0, %1 ]
%5 = tail call i32 @sleep(i32 1)
%6 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %4)
%7 = add nsw i32 %4, -1
%8 = icmp eq i32 %7, 0
br i1 %8, label %9, label %3
9: ; preds = %3, %1
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ pthread_mutex_t;

/* Variables and functions */
int pthread_mutex_lock(int /*<<< orphan*/ *);
int /*<<< orphan*/ syserr(int, char *);
void lock(pthread_mutex_t *l) {
  int err;
  if ((err = pthread_mutex_lock(l)) != 0)
    syserr(err, "lock failed");
}


x86 assembly (clang, -O0):
<lock>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <pthread_mutex_lock@plt>
mov    %eax,-0xc(%rbp)
cmp    $0x0,%eax
je     1150 <lock+0x30>
mov    -0xc(%rbp),%edi
lea    0xeb5(%rip),%rsi
call   1030 <syserr@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<lock>:
push   %rax
call   1040 <pthread_mutex_lock@plt>
test   %eax,%eax
je     1139 <lock+0x19>
lea    0xecf(%rip),%rsi
mov    %eax,%edi
pop    %rax
jmp    1030 <syserr@plt>
pop    %rax
ret

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

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

/* Variables and functions */
struct ebmb_node *__ebst_insert(struct eb_root *, struct ebmb_node *);
struct ebmb_node *ebst_insert(struct eb_root *root, struct ebmb_node *new) {
  return __ebst_insert(root, new);
}


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

x86 assembly (clang, -O2):
<ebst_insert>:
jmp    1030 <__ebst_insert@plt>

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

LLVM IR (-O2):
%struct.eb_root = type { i32 }
%struct.ebmb_node = type { i32 }
define %struct.ebmb_node* @ebst_insert(%struct.eb_root* %0, %struct.ebmb_node* %1) {
%3 = tail call %struct.ebmb_node* @__ebst_insert(%struct.eb_root* %0, %struct.ebmb_node* %1)
ret %struct.ebmb_node* %3
}
/* Type definitions */
typedef int /*<<< orphan*/ int32_t;

/* Variables and functions */
int32_t dds_phase_ratef(float frequency) {
  return (int32_t)(frequency * 65536.0f * 65536.0f / 8000);
}


x86 assembly (clang, -O0):
<dds_phase_ratef>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  0xef3(%rip),%xmm0
mulss  -0x4(%rbp),%xmm0
movss  0xee6(%rip),%xmm1
mulss  %xmm1,%xmm0
movss  0xed6(%rip),%xmm1
divss  %xmm1,%xmm0
cvttss2si %xmm0,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<dds_phase_ratef>:
movss  0xef8(%rip),%xmm1
mulss  %xmm1,%xmm0
mulss  %xmm1,%xmm0
divss  0xeec(%rip),%xmm0
cvttss2si %xmm0,%eax
ret

LLVM IR (-O0):
define i32 @dds_phase_ratef(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = fmul float %3, 6.553600e+04
%5 = fmul float %4, 6.553600e+04
%6 = fdiv float %5, 8.000000e+03
%7 = fptosi float %6 to i32
ret i32 %7
}

LLVM IR (-O2):
define i32 @dds_phase_ratef(float %0) {
%2 = fmul float %0, 6.553600e+04
%3 = fmul float %2, 6.553600e+04
%4 = fdiv float %3, 8.000000e+03
%5 = fptosi float %4 to i32
ret i32 %5
}
/* Type definitions */
typedef double time_t;
typedef int /*<<< orphan*/ sqlite3_vfs;

/* Variables and functions */
int SQLITE_OK;
double time(int /*<<< orphan*/);
int scmCurrentTime(sqlite3_vfs *pVfs, double *pTime) {
  time_t t = time(0);
  *pTime = t / 86400.0 + 2440587.5;
  return SQLITE_OK;
}


x86 assembly (clang, -O0):
<scmCurrentTime>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
xor    %edi,%edi
call   1030 <time@plt>
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  0xecf(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  0xebb(%rip),%xmm1
addsd  %xmm1,%xmm0
mov    -0x10(%rbp),%rax
movsd  %xmm0,(%rax)
mov    0x2e90(%rip),%rax
mov    (%rax),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<scmCurrentTime>:
push   %rbx
mov    %rsi,%rbx
xor    %edi,%edi
call   1030 <time@plt>
divsd  0xedd(%rip),%xmm0
addsd  0xedd(%rip),%xmm0
movsd  %xmm0,(%rbx)
mov    0x2eb2(%rip),%rax
mov    (%rax),%eax
pop    %rbx
ret

LLVM IR (-O0):
@SQLITE_OK = global i32 0
define i32 @scmCurrentTime(i32* %0, double* %1) {
%3 = alloca i32*
%4 = alloca double*
%5 = alloca double
store i32* %0, i32** %3
store double* %1, double** %4
%6 = call double @time(i32 0)
store double %6, double* %5
%7 = load double, double* %5
%8 = fdiv double %7, 8.640000e+04
%9 = fadd double %8, 0x41429EC5C0000000
%10 = load double*, double** %4
store double %9, double* %10
%11 = load i32, i32* @SQLITE_OK
ret i32 %11
}

LLVM IR (-O2):
@SQLITE_OK = global i32 0
define i32 @scmCurrentTime(i32* nocapture readnone %0, double* nocapture writeonly %1) {
%3 = tail call double @time(i32 0)
%4 = fdiv double %3, 8.640000e+04
%5 = fadd double %4, 0x41429EC5C0000000
store double %5, double* %1
%6 = load i32, i32* @SQLITE_OK
ret i32 %6
}
/* Type definitions */
typedef int /*<<< orphan*/ WINDOW;

/* Variables and functions */
int /*<<< orphan*/ box(int /*<<< orphan*/ *, int /*<<< orphan*/,
                       int /*<<< orphan*/);
int /*<<< orphan*/ wclear(int /*<<< orphan*/ *);
int /*<<< orphan*/ wrefresh(int /*<<< orphan*/ *);
void clear_input(WINDOW *w) {
  wclear(w);
  box(w, 0, 0);
  wrefresh(w);
}


x86 assembly (clang, -O0):
<clear_input>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1050 <wclear@plt>
mov    -0x8(%rbp),%rdi
xor    %edx,%edx
mov    %edx,%esi
call   1040 <box@plt>
mov    -0x8(%rbp),%rdi
call   1030 <wrefresh@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<clear_input>:
push   %rbx
mov    %rdi,%rbx
call   1050 <wclear@plt>
mov    %rbx,%rdi
xor    %esi,%esi
xor    %edx,%edx
call   1040 <box@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <wrefresh@plt>

LLVM IR (-O0):
define void @clear_input(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = call i32 @wclear(i32* %3)
%5 = load i32*, i32** %2
%6 = call i32 @box(i32* %5, i32 0, i32 0)
%7 = load i32*, i32** %2
%8 = call i32 @wrefresh(i32* %7)
ret void
}

LLVM IR (-O2):
define void @clear_input(i32* %0) {
%2 = tail call i32 @wclear(i32* %0)
%3 = tail call i32 @box(i32* %0, i32 0, i32 0)
%4 = tail call i32 @wrefresh(i32* %0)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ mpfr_srcptr;

/* Variables and functions */
int /*<<< orphan*/ MPFR_RNDN;
int /*<<< orphan*/ fputs(char *, int /*<<< orphan*/);
int /*<<< orphan*/ mpfr_out_str(int /*<<< orphan*/, int, int,
                                int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ stderr;
void debug(mpfr_srcptr x) {
  mpfr_out_str(stderr, 10, 80, x, MPFR_RNDN);
  fputs("\n", stderr);
}


x86 assembly (clang, -O0):
<debug>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    0x2ea6(%rip),%rax
mov    (%rax),%edi
mov    -0x4(%rbp),%ecx
mov    0x2eaa(%rip),%rax
mov    (%rax),%r8d
mov    $0xa,%esi
mov    $0x50,%edx
call   1040 <mpfr_out_str@plt>
mov    0x2e81(%rip),%rax
mov    (%rax),%esi
lea    0xea0(%rip),%rdi
call   1030 <fputs@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<debug>:
push   %rbx
mov    %edi,%ecx
mov    0x2eae(%rip),%rbx
mov    (%rbx),%edi
mov    0x2eb5(%rip),%rax
mov    (%rax),%r8d
mov    $0xa,%esi
mov    $0x50,%edx
call   1040 <mpfr_out_str@plt>
mov    (%rbx),%esi
lea    0xeb2(%rip),%rdi
pop    %rbx
jmp    1030 <fputs@plt>

LLVM IR (-O0):
@stderr = global i32 0
@MPFR_RNDN = global i32 0
@.str = [2 x i8] c"\0A\00"
define void @debug(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* @stderr
%4 = load i32, i32* %2
%5 = load i32, i32* @MPFR_RNDN
%6 = call i32 @mpfr_out_str(i32 %3, i32 10, i32 80, i32 %4, i32 %5)
%7 = load i32, i32* @stderr
%8 = call i32 @fputs(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i32 %7)
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@MPFR_RNDN = global i32 0
@.str = [2 x i8] c"\0A\00"
define void @debug(i32 %0) {
%2 = load i32, i32* @stderr
%3 = load i32, i32* @MPFR_RNDN
%4 = tail call i32 @mpfr_out_str(i32 %2, i32 10, i32 80, i32 %0, i32 %3)
%5 = load i32, i32* @stderr
%6 = tail call i32 @fputs(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i32 %5)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ installKernelModule(char *, unsigned char *);
void enableBeeps(void) {
  static unsigned char status = 0;
  installKernelModule("pcspkr", &status);
}


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

x86 assembly (clang, -O2):
<enableBeeps>:
lea    0xee9(%rip),%rdi
lea    0x2f0b(%rip),%rsi
jmp    1030 <installKernelModule@plt>

LLVM IR (-O0):
@enableBeeps.status = internal global i8 0
@.str = [7 x i8] c"pcspkr\00"
define void @enableBeeps() {
%1 = call i32 @installKernelModule(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* @enableBeeps.status)
ret void
}

LLVM IR (-O2):
@enableBeeps.status = internal global i8 0
@.str = [7 x i8] c"pcspkr\00"
define void @enableBeeps() {
%1 = tail call i32 @installKernelModule(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* @enableBeeps.status)
ret void
}
int main(void) { return 3 + 5; }


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

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 8
}
/* Variables and functions */
int /*<<< orphan*/ __VERIFIER_assert(int);
int main(void) {
  unsigned int x = 0x0ffffff0;
  while (x > 0) {
    x -= 2;
  }
  __VERIFIER_assert(!(x % 2));
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0xffffff0,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jbe    113e <main+0x2e>
mov    -0x8(%rbp),%eax
sub    $0x2,%eax
mov    %eax,-0x8(%rbp)
jmp    1126 <main+0x16>
mov    -0x8(%rbp),%eax
and    $0x1,%eax
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%edi
call   1030 <__VERIFIER_assert@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 268435440, i32* %2
br label %3
3: ; preds = %6, %0
%4 = load i32, i32* %2
%5 = icmp ugt i32 %4, 0
br i1 %5, label %6, label %9
6: ; preds = %3
%7 = load i32, i32* %2
%8 = sub i32 %7, 2
store i32 %8, i32* %2
br label %3
9: ; preds = %3
%10 = load i32, i32* %2
%11 = urem i32 %10, 2
%12 = icmp ne i32 %11, 0
%13 = xor i1 %12, true
%14 = zext i1 %13 to i32
%15 = call i32 @__VERIFIER_assert(i32 %14)
%16 = load i32, i32* %1
ret i32 %16
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @__VERIFIER_assert(i32 1)
ret i32 0
}
__priv_free_info() { printf("proc-stub:%s\n", __func__); }


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

x86 assembly (clang, -O2):
<__priv_free_info>:
lea    0xee9(%rip),%rdi
lea    0xef0(%rip),%rsi
xor    %eax,%eax
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [14 x i8] c"proc-stub:%s\0A\00"
@__func__.__priv_free_info = [17 x i8] c"__priv_free_info\00"
define i32 @__priv_free_info() {
%1 = alloca i32
%2 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([17 x i8], [17 x i8]* @__func__.__priv_free_info, i64 0, i64 0))
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
@.str = [14 x i8] c"proc-stub:%s\0A\00"
@__func__.__priv_free_info = [17 x i8] c"__priv_free_info\00"
define i32 @__priv_free_info() {
%1 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([17 x i8], [17 x i8]* @__func__.__priv_free_info, i64 0, i64 0))
ret i32 undef
}
unsigned short mod_N(unsigned short a) {
  if (a > 624 - 1)
    return a - 624;
  else
    return a;
}


x86 assembly (clang, -O0):
<mod_N>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x4(%rbp)
movzwl -0x4(%rbp),%eax
cmp    $0x26f,%eax
jle    112c <mod_N+0x2c>
movzwl -0x4(%rbp),%eax
sub    $0x270,%eax
mov    %ax,-0x2(%rbp)
jmp    1134 <mod_N+0x34>
mov    -0x4(%rbp),%ax
mov    %ax,-0x2(%rbp)
movzwl -0x2(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<mod_N>:
lea    -0x270(%rdi),%eax
cmp    $0x270,%edi
cmovb  %edi,%eax
ret

LLVM IR (-O0):
define zeroext i16 @mod_N(i16 zeroext %0) {
%2 = alloca i16
%3 = alloca i16
store i16 %0, i16* %3
%4 = load i16, i16* %3
%5 = zext i16 %4 to i32
%6 = icmp sgt i32 %5, 623
br i1 %6, label %7, label %12
7: ; preds = %1
%8 = load i16, i16* %3
%9 = zext i16 %8 to i32
%10 = sub nsw i32 %9, 624
%11 = trunc i32 %10 to i16
store i16 %11, i16* %2
br label %14
12: ; preds = %1
%13 = load i16, i16* %3
store i16 %13, i16* %2
br label %14
14: ; preds = %12, %7
%15 = load i16, i16* %2
ret i16 %15
}

LLVM IR (-O2):
define zeroext i16 @mod_N(i16 zeroext %0) {
%2 = icmp ugt i16 %0, 623
%3 = add i16 %0, -624
%4 = select i1 %2, i16 %3, i16 %0
ret i16 %4
}
short search_init() {}


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

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

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

LLVM IR (-O2):
define signext i16 @search_init() {
ret i16 undef
}
void i2d_X509_ATTRIBUTE(void) {}


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

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

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

LLVM IR (-O2):
define void @i2d_X509_ATTRIBUTE() {
ret void
}
/* Type definitions */
typedef scalar_t__ uint32_t;

/* Variables and functions */
void UARTFIFOEnable(uint32_t ui32Base) {
  ;
  (*((volatile unsigned long *)(ui32Base + 0x0000002C))) |= 0x00000010;
}


x86 assembly (clang, -O0):
<UARTFIFOEnable>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    0x2c(%rax),%rcx
or     $0x10,%rcx
mov    %rcx,0x2c(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<UARTFIFOEnable>:
orq    $0x10,0x2c(%rdi)
ret

LLVM IR (-O0):
define void @UARTFIFOEnable(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = add nsw i64 %3, 44
%5 = inttoptr i64 %4 to i64*
%6 = load volatile i64, i64* %5
%7 = or i64 %6, 16
store volatile i64 %7, i64* %5
ret void
}

LLVM IR (-O2):
define void @UARTFIFOEnable(i64 %0) {
%2 = add nsw i64 %0, 44
%3 = inttoptr i64 %2 to i64*
%4 = load volatile i64, i64* %3
%5 = or i64 %4, 16
store volatile i64 %5, i64* %3
ret void
}
extern unsigned int __inw_p(unsigned short port) {
  unsigned int _v;
  __asm__ __volatile__("in"
                       "w"
                       " %"
                       "w"
                       "1,%"
                       "w"
                       "0"
                       : "=a"(_v)
                       : "d"(port), "0"(0));
  __asm__ __volatile__("outb %al,$0x80");
  return _v;
}


x86 assembly (clang, -O0):
<__inw_p>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
mov    -0x2(%rbp),%dx
xor    %eax,%eax
in     (%dx),%ax
mov    %eax,-0x8(%rbp)
out    %al,$0x80
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<__inw_p>:
mov    %edi,%edx
xor    %eax,%eax
in     (%dx),%ax
out    %al,$0x80
ret

LLVM IR (-O0):
define i32 @__inw_p(i16 zeroext %0) {
%2 = alloca i16
%3 = alloca i32
store i16 %0, i16* %2
%4 = load i16, i16* %2
%5 = call i32 asm sideeffect "inw ${1:w},${0:w}", "={ax},{dx},0,~{dirflag},~{fpsr},~{flags}"(i16 %4, i32 0)
store i32 %5, i32* %3
%6 = load i32, i32* %3
ret i32 %6
}

LLVM IR (-O2):
define i32 @__inw_p(i16 zeroext %0) {
%2 = tail call i32 asm sideeffect "inw ${1:w},${0:w}", "={ax},{dx},0,~{dirflag},~{fpsr},~{flags}"(i16 %0, i32 0)
tail call void asm sideeffect "outb %al,$$0x80", "~{dirflag},~{fpsr},~{flags}"()
ret i32 %2
}