xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ fail(char *);
void assert(int truth, char *complaint) {
  if (!truth)
    fail(complaint);
}


x86 assembly (clang, -O0):
<assert>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x0,-0x4(%rbp)
jne    1132 <assert+0x22>
mov    -0x10(%rbp),%rdi
call   1030 <fail@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<assert>:
test   %edi,%edi
je     1115 <assert+0x5>
ret
mov    %rsi,%rdi
jmp    1030 <fail@plt>

LLVM IR (-O0):
define void @assert(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
store i32 %0, i32* %3
store i8* %1, i8** %4
%5 = load i32, i32* %3
%6 = icmp ne i32 %5, 0
br i1 %6, label %10, label %7
7: ; preds = %2
%8 = load i8*, i8** %4
%9 = call i32 @fail(i8* %8)
br label %10
10: ; preds = %7, %2
ret void
}

LLVM IR (-O2):
define void @assert(i32 %0, i8* %1) {
%3 = icmp eq i32 %0, 0
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = tail call i32 @fail(i8* %1)
br label %6
6: ; preds = %4, %2
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ time_t;

/* Variables and functions */
int /*<<< orphan*/ memcpy(unsigned char *, int /*<<< orphan*/ *, int);
int /*<<< orphan*/ time(int /*<<< orphan*/ *);
void addBootSignature(unsigned char *newBootsect) {
  time_t t = 0;
  do {
  } while (0);
  time(&t);
  memcpy((newBootsect + 498), &t, 4);
}


x86 assembly (clang, -O0):
<addBootSignature>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
jmp    1138 <addBootSignature+0x18>
lea    -0xc(%rbp),%rdi
call   1040 <time@plt>
mov    -0x8(%rbp),%rdi
add    $0x1f2,%rdi
lea    -0xc(%rbp),%rsi
mov    $0x4,%edx
call   1030 <memcpy@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<addBootSignature>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
movl   $0x0,0x4(%rsp)
lea    0x4(%rsp),%r14
mov    %r14,%rdi
call   1040 <time@plt>
add    $0x1f2,%rbx
mov    %rbx,%rdi
mov    %r14,%rsi
mov    $0x4,%edx
call   1030 <memcpy@plt>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @addBootSignature(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
store i32 0, i32* %3
br label %4
4: ; preds = %1
br label %5
5: ; preds = %4
%6 = call i32 @time(i32* %3)
%7 = load i8*, i8** %2
%8 = getelementptr inbounds i8, i8* %7, i64 498
%9 = call i32 @memcpy(i8* %8, i32* %3, i32 4)
ret void
}

LLVM IR (-O2):
define void @addBootSignature(i8* %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
store i32 0, i32* %2
%4 = call i32 @time(i32* %2)
%5 = getelementptr inbounds i8, i8* %0, i64 498
%6 = call i32 @memcpy(i8* %5, i32* %2, i32 4)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ puts(char *);
void warning(void) {
  puts("you can use by :");
  puts("bf2c </path/to/file>");
}


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

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

LLVM IR (-O0):
@.str = [17 x i8] c"you can use by :\00"
@.str.1 = [21 x i8] c"bf2c </path/to/file>\00"
define void @warning() {
%1 = call i32 @puts(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @puts(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [17 x i8] c"you can use by :\00"
@.str.1 = [21 x i8] c"bf2c </path/to/file>\00"
define void @warning() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0))
ret void
}
void init_io() {
  *(int *)0xd4051024 = 0xffffffff;
  *(int *)0xD4015064 = 0x7;
  *(int *)0xD4015064 = 0x3;
  *(int *)0xD4015034 = 0x13;
  *(int *)0xd401e120 = 0xc1;
  *(int *)0xd401e124 = 0xc1;
  ((unsigned int volatile *)0xd4018000)[1] = 0x40;
  ((unsigned int volatile *)0xd4018000)[3] = 0x83;
  ((unsigned int volatile *)0xd4018000)[0] = 42;
  ((unsigned int volatile *)0xd4018000)[1] = 00;
  ((unsigned int volatile *)0xd4018000)[3] = 0x03;
  ((unsigned int volatile *)0xd4018000)[2] = 0x07;
}


x86 assembly (clang, -O0):
<init_io>:
push   %rbp
mov    %rsp,%rbp
mov    $0xd4051024,%eax
movl   $0xffffffff,(%rax)
mov    $0xd4015064,%eax
movl   $0x7,(%rax)
mov    $0xd4015064,%eax
movl   $0x3,(%rax)
mov    $0xd4015034,%eax
movl   $0x13,(%rax)
mov    $0xd401e120,%eax
movl   $0xc1,(%rax)
mov    $0xd401e124,%eax
movl   $0xc1,(%rax)
mov    $0xd4018000,%eax
movl   $0x40,0x4(%rax)
mov    $0xd4018000,%eax
movl   $0x83,0xc(%rax)
mov    $0xd4018000,%eax
movl   $0x2a,(%rax)
mov    $0xd4018000,%eax
movl   $0x0,0x4(%rax)
mov    $0xd4018000,%eax
movl   $0x3,0xc(%rax)
mov    $0xd4018000,%eax
movl   $0x7,0x8(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<init_io>:
mov    $0xd4018004,%eax
movl   $0xffffffff,0x39020(%rax)
ff ff ff
movl   $0x3,-0x2fa0(%rax)
movl   $0x13,-0x2fd0(%rax)
movabs $0xc1000000c1,%rcx
mov    %rcx,0x611c(%rax)
movl   $0x40,(%rax)
movl   $0x83,0x8(%rax)
movl   $0x2a,-0x4(%rax)
movl   $0x0,(%rax)
movl   $0x3,0x8(%rax)
movl   $0x7,0x4(%rax)
ret

LLVM IR (-O0):
define void @init_io() {
store i32 -1, i32* inttoptr (i64 3557101604 to i32*)
store i32 7, i32* inttoptr (i64 3556855908 to i32*)
store i32 3, i32* inttoptr (i64 3556855908 to i32*)
store i32 19, i32* inttoptr (i64 3556855860 to i32*)
store i32 193, i32* inttoptr (i64 3556892960 to i32*)
store i32 193, i32* inttoptr (i64 3556892964 to i32*)
store volatile i32 64, i32* getelementptr inbounds (i32, i32* inttoptr (i64 3556868096 to i32*), i64 1)
store volatile i32 131, i32* getelementptr inbounds (i32, i32* inttoptr (i64 3556868096 to i32*), i64 3)
store volatile i32 42, i32* inttoptr (i64 3556868096 to i32*)
store volatile i32 0, i32* getelementptr inbounds (i32, i32* inttoptr (i64 3556868096 to i32*), i64 1)
store volatile i32 3, i32* getelementptr inbounds (i32, i32* inttoptr (i64 3556868096 to i32*), i64 3)
store volatile i32 7, i32* getelementptr inbounds (i32, i32* inttoptr (i64 3556868096 to i32*), i64 2)
ret void
}

LLVM IR (-O2):
define void @init_io() {
store i32 -1, i32* inttoptr (i64 3557101604 to i32*)
store i32 3, i32* inttoptr (i64 3556855908 to i32*)
store i32 19, i32* inttoptr (i64 3556855860 to i32*)
store i32 193, i32* inttoptr (i64 3556892960 to i32*)
store i32 193, i32* inttoptr (i64 3556892964 to i32*)
store volatile i32 64, i32* inttoptr (i64 3556868100 to i32*)
store volatile i32 131, i32* inttoptr (i64 3556868108 to i32*)
store volatile i32 42, i32* inttoptr (i64 3556868096 to i32*)
store volatile i32 0, i32* inttoptr (i64 3556868100 to i32*)
store volatile i32 3, i32* inttoptr (i64 3556868108 to i32*)
store volatile i32 7, i32* inttoptr (i64 3556868104 to i32*)
ret void
}
/* Type definitions */
typedef int int16_t;

/* Variables and functions */
int16_t FIX_MPY(int16_t a, int16_t b) {
  int c = ((int)a * (int)b) >> 14;
  b = c & 0x01;
  a = (c >> 1) + b;
  return a;
}


x86 assembly (clang, -O0):
<FIX_MPY>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
imul   -0x8(%rbp),%eax
sar    $0xe,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
and    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0xc(%rbp),%eax
sar    $0x1,%eax
add    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<FIX_MPY>:
imul   %esi,%edi
mov    %edi,%eax
shr    $0xe,%eax
and    $0x1,%eax
sar    $0xf,%edi
add    %edi,%eax
ret

LLVM IR (-O0):
define i32 @FIX_MPY(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* %3
%7 = load i32, i32* %4
%8 = mul nsw i32 %6, %7
%9 = ashr i32 %8, 14
store i32 %9, i32* %5
%10 = load i32, i32* %5
%11 = and i32 %10, 1
store i32 %11, i32* %4
%12 = load i32, i32* %5
%13 = ashr i32 %12, 1
%14 = load i32, i32* %4
%15 = add nsw i32 %13, %14
store i32 %15, i32* %3
%16 = load i32, i32* %3
ret i32 %16
}

LLVM IR (-O2):
define i32 @FIX_MPY(i32 %0, i32 %1) {
%3 = mul nsw i32 %1, %0
%4 = lshr i32 %3, 14
%5 = and i32 %4, 1
%6 = ashr i32 %3, 15
%7 = add nsw i32 %5, %6
ret i32 %7
}
/* Type definitions */
typedef int /*<<< orphan*/ SHA256_CTX;

/* Variables and functions */
int /*<<< orphan*/ SHA256_Final(unsigned char *, int /*<<< orphan*/ *);
int /*<<< orphan*/ SHA256_Init(int /*<<< orphan*/ *);
int /*<<< orphan*/ SHA256_Update(int /*<<< orphan*/ *, unsigned char *, size_t);
unsigned char *malloc(int);
unsigned char *csha256_sum(unsigned char *input, size_t len) {
  unsigned char *rv = malloc(65);
  if (rv != NULL) {
    SHA256_CTX ctx;
    SHA256_Init(&ctx);
    SHA256_Update(&ctx, input, len);
    SHA256_Final(rv, &ctx);
  }
  return rv;
}


x86 assembly (clang, -O0):
<csha256_sum>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x41,%edi
call   1040 <malloc@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     1190 <csha256_sum+0x50>
lea    -0x1c(%rbp),%rdi
call   1030 <SHA256_Init@plt>
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
lea    -0x1c(%rbp),%rdi
call   1060 <SHA256_Update@plt>
mov    -0x18(%rbp),%rdi
lea    -0x1c(%rbp),%rsi
call   1050 <SHA256_Final@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<csha256_sum>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%r15
mov    $0x41,%edi
call   1040 <malloc@plt>
mov    %rax,%rbx
test   %rax,%rax
je     1186 <csha256_sum+0x46>
lea    0x4(%rsp),%r12
mov    %r12,%rdi
call   1030 <SHA256_Init@plt>
mov    %r12,%rdi
mov    %r15,%rsi
mov    %r14,%rdx
call   1060 <SHA256_Update@plt>
mov    %rbx,%rdi
mov    %r12,%rsi
call   1050 <SHA256_Final@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define i8* @csha256_sum(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
%5 = alloca i8*
%6 = alloca i32
store i8* %0, i8** %3
store i64 %1, i64* %4
%7 = call i8* @malloc(i32 65)
store i8* %7, i8** %5
%8 = load i8*, i8** %5
%9 = icmp ne i8* %8, null
br i1 %9, label %10, label %17
10: ; preds = %2
%11 = call i32 @SHA256_Init(i32* %6)
%12 = load i8*, i8** %3
%13 = load i64, i64* %4
%14 = call i32 @SHA256_Update(i32* %6, i8* %12, i64 %13)
%15 = load i8*, i8** %5
%16 = call i32 @SHA256_Final(i8* %15, i32* %6)
br label %17
17: ; preds = %10, %2
%18 = load i8*, i8** %5
ret i8* %18
}

LLVM IR (-O2):
define i8* @csha256_sum(i8* %0, i64 %1) {
%3 = alloca i32
%4 = tail call dereferenceable_or_null(65) i8* @malloc(i32 65)
%5 = icmp eq i8* %4, null
br i1 %5, label %11, label %6
6: ; preds = %2
%7 = bitcast i32* %3 to i8*
%8 = call i32 @SHA256_Init(i32* %3)
%9 = call i32 @SHA256_Update(i32* %3, i8* %0, i64 %1)
%10 = call i32 @SHA256_Final(i8* %4, i32* %3)
br label %11
11: ; preds = %6, %2
ret i8* %4
}
/* Variables and functions */
int /*<<< orphan*/ smp_test_sys_reset_pname(int, char **);
void smp_test_sys_main(int argc, char *argv[]) {
  smp_test_sys_reset_pname(argc, argv);
}


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

x86 assembly (clang, -O2):
<smp_test_sys_main>:
jmp    1030 <smp_test_sys_reset_pname@plt>

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

LLVM IR (-O2):
define void @smp_test_sys_main(i32 %0, i8** %1) {
%3 = tail call i32 @smp_test_sys_reset_pname(i32 %0, i8** %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main() {
  int age = 10;
  int height = 72;
  printf("I am %d years old.\n", age);
  printf("I am %d inches tall.\n", height);
  return 0;
}


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

LLVM IR (-O0):
@.str = [20 x i8] c"I am %d years old.\0A\00"
@.str.1 = [22 x i8] c"I am %d inches tall.\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
store i32 10, i32* %2
store i32 72, i32* %3
%4 = load i32, i32* %2
%5 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i32 %4)
%6 = load i32, i32* %3
%7 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0), i32 %6)
ret i32 0
}

LLVM IR (-O2):
@.str = [20 x i8] c"I am %d years old.\0A\00"
@.str.1 = [22 x i8] c"I am %d inches tall.\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i32 10)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0), i32 72)
ret i32 0
}
void overflow_1() {
  char buf[20];
  int i;
  for (i = 0; i < 40; ++i) {
    buf[i] = (char)(i * 20);
  }
}


x86 assembly (clang, -O0):
<overflow_1>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x24(%rbp)
cmpl   $0x28,-0x24(%rbp)
jge    1131 <overflow_1+0x31>
imul   $0x14,-0x24(%rbp),%eax
mov    %al,%cl
movslq -0x24(%rbp),%rax
mov    %cl,-0x20(%rbp,%rax,1)
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    110b <overflow_1+0xb>
pop    %rbp
ret

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

LLVM IR (-O0):
define void @overflow_1() {
%1 = alloca [20 x i8]
%2 = alloca i32
store i32 0, i32* %2
br label %3
3: ; preds = %13, %0
%4 = load i32, i32* %2
%5 = icmp slt i32 %4, 40
br i1 %5, label %6, label %16
6: ; preds = %3
%7 = load i32, i32* %2
%8 = mul nsw i32 %7, 20
%9 = trunc i32 %8 to i8
%10 = load i32, i32* %2
%11 = sext i32 %10 to i64
%12 = getelementptr inbounds [20 x i8], [20 x i8]* %1, i64 0, i64 %11
store i8 %9, i8* %12
br label %13
13: ; preds = %6
%14 = load i32, i32* %2
%15 = add nsw i32 %14, 1
store i32 %15, i32* %2
br label %3
16: ; preds = %3
ret void
}

LLVM IR (-O2):
define void @overflow_1() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fig07_28();
int main(void) {
  fig07_28();
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @fig07_28()
ret i32 0
}
void GB_ONE_f_FP32(float *z, const float *x) { (*z) = 1; }


x86 assembly (clang, -O0):
<GB_ONE_f_FP32>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movss  0xee8(%rip),%xmm0
movss  %xmm0,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<GB_ONE_f_FP32>:
movl   $0x3f800000,(%rdi)
ret

LLVM IR (-O0):
define void @GB_ONE_f_FP32(float* %0, float* %1) {
%3 = alloca float*
%4 = alloca float*
store float* %0, float** %3
store float* %1, float** %4
%5 = load float*, float** %3
store float 1.000000e+00, float* %5
ret void
}

LLVM IR (-O2):
define void @GB_ONE_f_FP32(float* nocapture writeonly %0, float* nocapture readnone %1) {
store float 1.000000e+00, float* %0
ret void
}
int test_imm_E8uint64_highword_mem(unsigned long long *val) {
  return ((*val >> 32) & (0xE8 << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_E8uint64_highword_mem(i64* %0) {
%2 = alloca i64*
store i64* %0, i64** %2
%3 = load i64*, i64** %2
%4 = load i64, i64* %3
%5 = lshr i64 %4, 32
%6 = and i64 %5, 232
%7 = icmp ne i64 %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_E8uint64_highword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 996432412672
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ dtoi(float);
int /*<<< orphan*/ g2_set_font_size(int /*<<< orphan*/, float);
void g2_set_font_size_(float *dev, float *size) {
  g2_set_font_size(dtoi(*dev), *size);
}


x86 assembly (clang, -O0):
<g2_set_font_size_>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movss  (%rax),%xmm0
call   1040 <dtoi@plt>
mov    %eax,%edi
mov    -0x10(%rbp),%rax
movss  (%rax),%xmm0
call   1030 <g2_set_font_size@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<g2_set_font_size_>:
push   %rbx
mov    %rsi,%rbx
movss  (%rdi),%xmm0
call   1040 <dtoi@plt>
movss  (%rbx),%xmm0
mov    %eax,%edi
pop    %rbx
jmp    1030 <g2_set_font_size@plt>

LLVM IR (-O0):
define void @g2_set_font_size_(float* %0, float* %1) {
%3 = alloca float*
%4 = alloca float*
store float* %0, float** %3
store float* %1, float** %4
%5 = load float*, float** %3
%6 = load float, float* %5
%7 = call i32 @dtoi(float %6)
%8 = load float*, float** %4
%9 = load float, float* %8
%10 = call i32 @g2_set_font_size(i32 %7, float %9)
ret void
}

LLVM IR (-O2):
define void @g2_set_font_size_(float* nocapture %0, float* nocapture %1) {
%3 = load float, float* %0
%4 = tail call i32 @dtoi(float %3)
%5 = load float, float* %1
%6 = tail call i32 @g2_set_font_size(i32 %4, float %5)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ test_sample_snap_dog_files(char *);
int main() { test_sample_snap_dog_files("../benchmark_files/"); }


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

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

LLVM IR (-O0):
@.str = [20 x i8] c"../benchmark_files/\00"
define i32 @main() {
%1 = call i32 @test_sample_snap_dog_files(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [20 x i8] c"../benchmark_files/\00"
define i32 @main() {
%1 = tail call i32 @test_sample_snap_dog_files(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_SUCCESS;
int /*<<< orphan*/ cd_stop();
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int sigterm_handler(int sig) {
  cd_stop();
  exit(EXIT_SUCCESS);
}


x86 assembly (clang, -O0):
<sigterm_handler>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x0,%al
call   1030 <cd_stop@plt>
mov    0x2ea7(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

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

LLVM IR (-O0):
@EXIT_SUCCESS = global i32 0
define i32 @sigterm_handler(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 (...) @cd_stop()
%4 = load i32, i32* @EXIT_SUCCESS
%5 = call i32 @exit(i32 %4)
unreachable
}

LLVM IR (-O2):
@EXIT_SUCCESS = global i32 0
define i32 @sigterm_handler(i32 %0) {
%2 = tail call i32 (...) @cd_stop()
%3 = load i32, i32* @EXIT_SUCCESS
%4 = tail call i32 @exit(i32 %3)
unreachable
}
/* Forward declarations */
typedef struct TYPE_3__ TYPE_1__;

/* Type definitions */
struct TYPE_3__ {
  int length;
  void *data;
};
typedef TYPE_1__ ASN1_STRING;

/* Variables and functions */
int /*<<< orphan*/ OPENSSL_free(void *);
void ASN1_STRING_set0(ASN1_STRING *str, void *data, int len) {
  OPENSSL_free(str->data);
  str->data = data;
  str->length = len;
}


x86 assembly (clang, -O0):
<ASN1_STRING_set0>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%rax
mov    0x8(%rax),%rdi
call   1030 <OPENSSL_free@plt>
mov    -0x10(%rbp),%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,0x8(%rax)
mov    -0x14(%rbp),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ASN1_STRING_set0>:
push   %rbp
push   %r14
push   %rbx
mov    %edx,%r14d
mov    %rsi,%rbx
mov    %rdi,%rbp
mov    0x8(%rdi),%rdi
call   1030 <OPENSSL_free@plt>
mov    %rbx,0x8(%rbp)
mov    %r14d,0x0(%rbp)
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
%struct.TYPE_3__ = type { i32, i8* }
define void @ASN1_STRING_set0(%struct.TYPE_3__* %0, i8* %1, i32 %2) {
%4 = alloca %struct.TYPE_3__*
%5 = alloca i8*
%6 = alloca i32
store %struct.TYPE_3__* %0, %struct.TYPE_3__** %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%7 = load %struct.TYPE_3__*, %struct.TYPE_3__** %4
%8 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %7, i32 0, i32 1
%9 = load i8*, i8** %8
%10 = call i32 @OPENSSL_free(i8* %9)
%11 = load i8*, i8** %5
%12 = load %struct.TYPE_3__*, %struct.TYPE_3__** %4
%13 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %12, i32 0, i32 1
store i8* %11, i8** %13
%14 = load i32, i32* %6
%15 = load %struct.TYPE_3__*, %struct.TYPE_3__** %4
%16 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %15, i32 0, i32 0
store i32 %14, i32* %16
ret void
}

LLVM IR (-O2):
%struct.TYPE_3__ = type { i32, i8* }
define void @ASN1_STRING_set0(%struct.TYPE_3__* nocapture %0, i8* %1, i32 %2) {
%4 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %0, i64 0, i32 1
%5 = load i8*, i8** %4
%6 = tail call i32 @OPENSSL_free(i8* %5)
store i8* %1, i8** %4
%7 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %0, i64 0, i32 0
store i32 %2, i32* %7
ret void
}
int myround(float x) {
  if (x > 0)
    return x + 0.5;
  else
    return x - 0.5;
}


x86 assembly (clang, -O0):
<myround>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x8(%rbp)
movss  -0x8(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jbe    113b <myround+0x3b>
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xed5(%rip),%xmm1
addsd  %xmm1,%xmm0
cvttsd2si %xmm0,%eax
mov    %eax,-0x4(%rbp)
jmp    1157 <myround+0x57>
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xeb4(%rip),%xmm1
subsd  %xmm1,%xmm0
cvttsd2si %xmm0,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<myround>:
xorps  %xmm1,%xmm1
xor    %eax,%eax
ucomiss %xmm1,%xmm0
seta   %al
cvtss2sd %xmm0,%xmm0
lea    0xeea(%rip),%rcx
addsd  (%rcx,%rax,8),%xmm0
cvttsd2si %xmm0,%eax
ret

LLVM IR (-O0):
define i32 @myround(float %0) {
%2 = alloca i32
%3 = alloca float
store float %0, float* %3
%4 = load float, float* %3
%5 = fcmp ogt float %4, 0.000000e+00
br i1 %5, label %6, label %11
6: ; preds = %1
%7 = load float, float* %3
%8 = fpext float %7 to double
%9 = fadd double %8, 5.000000e-01
%10 = fptosi double %9 to i32
store i32 %10, i32* %2
br label %16
11: ; preds = %1
%12 = load float, float* %3
%13 = fpext float %12 to double
%14 = fsub double %13, 5.000000e-01
%15 = fptosi double %14 to i32
store i32 %15, i32* %2
br label %16
16: ; preds = %11, %6
%17 = load i32, i32* %2
ret i32 %17
}

LLVM IR (-O2):
define i32 @myround(float %0) {
%2 = fcmp ogt float %0, 0.000000e+00
%3 = fpext float %0 to double
%4 = select i1 %2, double 5.000000e-01, double -5.000000e-01
%5 = fadd double %4, %3
%6 = fptosi double %5 to i32
ret i32 %6
}
void rlu_finish(void) {}


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

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

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

LLVM IR (-O2):
define void @rlu_finish() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
char fn_test3(int ia) {
  printf("fn_test3: %d\n", ia);
  return 'C';
}


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

x86 assembly (clang, -O2):
<fn_test3>:
push   %rax
mov    %edi,%esi
lea    0xee6(%rip),%rdi
call   1030 <printf@plt>
mov    $0x43,%al
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [14 x i8] c"fn_test3: %d\0A\00"
define signext i8 @fn_test3(i32 %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 %0)
ret i8 67
}
/* Type definitions */
typedef unsigned long uint32_t;

/* Variables and functions */
void EPIIntErrorClear(uint32_t ui32Base, uint32_t ui32ErrFlags) {
  ;
  ;
  (*((volatile unsigned long *)(ui32Base + 0x0000021C))) = ui32ErrFlags;
}


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

x86 assembly (clang, -O2):
<EPIIntErrorClear>:
mov    %rsi,0x21c(%rdi)
ret

LLVM IR (-O0):
define void @EPIIntErrorClear(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %4
%6 = load i64, i64* %3
%7 = add i64 %6, 540
%8 = inttoptr i64 %7 to i64*
store volatile i64 %5, i64* %8
ret void
}

LLVM IR (-O2):
define void @EPIIntErrorClear(i64 %0, i64 %1) {
%3 = add i64 %0, 540
%4 = inttoptr i64 %3 to i64*
store volatile i64 %1, i64* %4
ret void
}
/* Variables and functions */
int /*<<< orphan*/ eval_expr(char *);
int /*<<< orphan*/ ft_putchar(char);
int /*<<< orphan*/ ft_putnbr(int /*<<< orphan*/);
int main(int ac, char **av) {
  if (ac > 1) {
    ft_putnbr(eval_expr(av[1]));
    ft_putchar('\n');
  }
  return (0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x1,-0x8(%rbp)
jle    116e <main+0x3e>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1050 <eval_expr@plt>
mov    %eax,%edi
call   1040 <ft_putnbr@plt>
mov    $0xa,%edi
call   1030 <ft_putchar@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
cmp    $0x2,%edi
jl     1154 <main+0x24>
push   %rax
mov    0x8(%rsi),%rdi
call   1050 <eval_expr@plt>
mov    %eax,%edi
call   1040 <ft_putnbr@plt>
mov    $0xa,%edi
call   1030 <ft_putchar@plt>
add    $0x8,%rsp
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = load i32, i32* %4
%7 = icmp sgt i32 %6, 1
br i1 %7, label %8, label %15
8: ; preds = %2
%9 = load i8**, i8*** %5
%10 = getelementptr inbounds i8*, i8** %9, i64 1
%11 = load i8*, i8** %10
%12 = call i32 @eval_expr(i8* %11)
%13 = call i32 @ft_putnbr(i32 %12)
%14 = call i32 @ft_putchar(i8 signext 10)
br label %15
15: ; preds = %8, %2
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp sgt i32 %0, 1
br i1 %3, label %4, label %10
4: ; preds = %2
%5 = getelementptr inbounds i8*, i8** %1, i64 1
%6 = load i8*, i8** %5
%7 = tail call i32 @eval_expr(i8* %6)
%8 = tail call i32 @ft_putnbr(i32 %7)
%9 = tail call i32 @ft_putchar(i8 signext 10)
br label %10
10: ; preds = %4, %2
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
int len_char(char c) {
  int len = 0;
  if ((c & 0x80) == 0) {
    len = 1;
  } else {
    if ((c & 0xC0) == 1) {
      if ((c & 0xE0) == 1) {
        if ((c & 0xF0) == 1) {
          len = 4;
        } else {
          len = 3;
        }
      } else {
        len = 2;
      }
    } else {
      assert(1 == 0);
    }
  }
  return len;
}


x86 assembly (clang, -O0):
<len_char>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movl   $0x0,-0x8(%rbp)
movsbl -0x1(%rbp),%eax
and    $0x80,%eax
cmp    $0x0,%eax
jne    1143 <len_char+0x33>
movl   $0x1,-0x8(%rbp)
jmp    11a9 <len_char+0x99>
movsbl -0x1(%rbp),%eax
and    $0xc0,%eax
cmp    $0x1,%eax
jne    119d <len_char+0x8d>
movsbl -0x1(%rbp),%eax
and    $0xe0,%eax
cmp    $0x1,%eax
jne    1191 <len_char+0x81>
movsbl -0x1(%rbp),%eax
and    $0xf0,%eax
cmp    $0x1,%eax
jne    1185 <len_char+0x75>
movl   $0x4,-0x8(%rbp)
jmp    118c <len_char+0x7c>
movl   $0x3,-0x8(%rbp)
jmp    1198 <len_char+0x88>
movl   $0x2,-0x8(%rbp)
jmp    11a4 <len_char+0x94>
xor    %edi,%edi
call   1030 <assert@plt>
jmp    11a9 <len_char+0x99>
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<len_char>:
push   %rbx
mov    $0x1,%ebx
test   %dil,%dil
jns    1124 <len_char+0x14>
xor    %ebx,%ebx
xor    %edi,%edi
call   1030 <assert@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @len_char(i8 signext %0) {
%2 = alloca i8
%3 = alloca i32
store i8 %0, i8* %2
store i32 0, i32* %3
%4 = load i8, i8* %2
%5 = sext i8 %4 to i32
%6 = and i32 %5, 128
%7 = icmp eq i32 %6, 0
br i1 %7, label %8, label %9
8: ; preds = %1
store i32 1, i32* %3
br label %32
9: ; preds = %1
%10 = load i8, i8* %2
%11 = sext i8 %10 to i32
%12 = and i32 %11, 192
%13 = icmp eq i32 %12, 1
br i1 %13, label %14, label %29
14: ; preds = %9
%15 = load i8, i8* %2
%16 = sext i8 %15 to i32
%17 = and i32 %16, 224
%18 = icmp eq i32 %17, 1
br i1 %18, label %19, label %27
19: ; preds = %14
%20 = load i8, i8* %2
%21 = sext i8 %20 to i32
%22 = and i32 %21, 240
%23 = icmp eq i32 %22, 1
br i1 %23, label %24, label %25
24: ; preds = %19
store i32 4, i32* %3
br label %26
25: ; preds = %19
store i32 3, i32* %3
br label %26
26: ; preds = %25, %24
br label %28
27: ; preds = %14
store i32 2, i32* %3
br label %28
28: ; preds = %27, %26
br label %31
29: ; preds = %9
%30 = call i32 @assert(i32 0)
br label %31
31: ; preds = %29, %28
br label %32
32: ; preds = %31, %8
%33 = load i32, i32* %3
ret i32 %33
}

LLVM IR (-O2):
define i32 @len_char(i8 signext %0) {
%2 = icmp sgt i8 %0, -1
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 @assert(i32 0)
br label %5
5: ; preds = %1, %3
%6 = phi i32 [ 0, %3 ], [ 1, %1 ]
ret i32 %6
}
double read_PCSXYZ16Number(char *p) {
  unsigned long o32;
  o32 = 256 * (unsigned long)((unsigned char *)p)[0] +
        (unsigned long)((unsigned char *)p)[1];
  return (double)o32 / 32768.0;
}


x86 assembly (clang, -O0):
<read_PCSXYZ16Number>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movzwl (%rax),%eax
shl    $0x30,%rax
bswap  %rax
mov    %rax,-0x10(%rbp)
movaps 0xeef(%rip),%xmm1
movq   -0x10(%rbp),%xmm0
punpckldq %xmm1,%xmm0
movapd 0xeee(%rip),%xmm1
subpd  %xmm1,%xmm0
movaps %xmm0,%xmm1
unpckhpd %xmm0,%xmm0
addsd  %xmm1,%xmm0
movsd  0xeb7(%rip),%xmm1
divsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<read_PCSXYZ16Number>:
movzwl (%rdi),%eax
shl    $0x10,%eax
bswap  %eax
cvtsi2sd %eax,%xmm0
mulsd  0xeec(%rip),%xmm0
ret

LLVM IR (-O0):
define double @read_PCSXYZ16Number(i8* %0) {
%2 = alloca i8*
%3 = alloca i64
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = getelementptr inbounds i8, i8* %4, i64 0
%6 = load i8, i8* %5
%7 = zext i8 %6 to i64
%8 = mul i64 256, %7
%9 = load i8*, i8** %2
%10 = getelementptr inbounds i8, i8* %9, i64 1
%11 = load i8, i8* %10
%12 = zext i8 %11 to i64
%13 = add i64 %8, %12
store i64 %13, i64* %3
%14 = load i64, i64* %3
%15 = uitofp i64 %14 to double
%16 = fdiv double %15, 3.276800e+04
ret double %16
}

LLVM IR (-O2):
define double @read_PCSXYZ16Number(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = zext i8 %2 to i64
%4 = shl nuw nsw i64 %3, 8
%5 = getelementptr inbounds i8, i8* %0, i64 1
%6 = load i8, i8* %5
%7 = zext i8 %6 to i64
%8 = or i64 %4, %7
%9 = uitofp i64 %8 to double
%10 = fmul double %9, 0x3F00000000000000
ret double %10
}
/* Type definitions */
struct dump978_reader {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(struct dump978_reader *);
void dump978_reader_free(struct dump978_reader *reader) {
  if (!reader)
    return;
  free(reader);
}


x86 assembly (clang, -O0):
<dump978_reader_free>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    112c <dump978_reader_free+0x1c>
jmp    1135 <dump978_reader_free+0x25>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dump978_reader_free>:
test   %rdi,%rdi
je     111a <dump978_reader_free+0xa>
jmp    1030 <free@plt>
ret

LLVM IR (-O0):
%struct.dump978_reader = type { i32 }
define void @dump978_reader_free(%struct.dump978_reader* %0) {
%2 = alloca %struct.dump978_reader*
store %struct.dump978_reader* %0, %struct.dump978_reader** %2
%3 = load %struct.dump978_reader*, %struct.dump978_reader** %2
%4 = icmp ne %struct.dump978_reader* %3, null
br i1 %4, label %6, label %5
5: ; preds = %1
br label %9
6: ; preds = %1
%7 = load %struct.dump978_reader*, %struct.dump978_reader** %2
%8 = call i32 @free(%struct.dump978_reader* %7)
br label %9
9: ; preds = %6, %5
ret void
}

LLVM IR (-O2):
%struct.dump978_reader = type { i32 }
define void @dump978_reader_free(%struct.dump978_reader* %0) {
%2 = icmp eq %struct.dump978_reader* %0, null
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 @free(%struct.dump978_reader* %0)
br label %5
5: ; preds = %1, %3
ret void
}
int clusterSize(int sectorSize, int sectorsPerCluster) {
  int b = sectorSize * sectorsPerCluster;
  return b;
}


x86 assembly (clang, -O0):
<clusterSize>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
imul   -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<clusterSize>:
mov    %edi,%eax
imul   %esi,%eax
ret

LLVM IR (-O0):
define i32 @clusterSize(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* %3
%7 = load i32, i32* %4
%8 = mul nsw i32 %6, %7
store i32 %8, i32* %5
%9 = load i32, i32* %5
ret i32 %9
}

LLVM IR (-O2):
define i32 @clusterSize(i32 %0, i32 %1) {
%3 = mul nsw i32 %1, %0
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ print_in_middle(int /*<<< orphan*/, int /*<<< orphan*/,
                                   int /*<<< orphan*/, char *,
                                   int /*<<< orphan*/ *);
int /*<<< orphan*/ printw(char *);
int /*<<< orphan*/ refresh();
void print_byebye() {
  printw("\n");
  print_in_middle(0, 0, 0, "Thank you for using my typing tutor\n", NULL);
  print_in_middle(0, 0, 0, "Bye Bye ! ! !\n", NULL);
  refresh();
}


x86 assembly (clang, -O0):
<print_byebye>:
push   %rbp
mov    %rsp,%rbp
lea    0xef7(%rip),%rdi
call   1030 <printw@plt>
xor    %edx,%edx
lea    0xeb7(%rip),%rcx
xor    %eax,%eax
mov    %eax,%r8d
mov    %edx,%edi
mov    %edx,%esi
call   1050 <print_in_middle@plt>
xor    %edx,%edx
lea    0xec5(%rip),%rcx
xor    %eax,%eax
mov    %eax,%r8d
mov    %edx,%edi
mov    %edx,%esi
call   1050 <print_in_middle@plt>
mov    $0x0,%al
call   1040 <refresh@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_byebye>:
push   %rax
lea    0xefa(%rip),%rdi
call   1030 <printw@plt>
lea    0xebc(%rip),%rcx
xor    %edi,%edi
xor    %esi,%esi
xor    %edx,%edx
xor    %r8d,%r8d
call   1050 <print_in_middle@plt>
lea    0xecc(%rip),%rcx
xor    %edi,%edi
xor    %esi,%esi
xor    %edx,%edx
xor    %r8d,%r8d
call   1050 <print_in_middle@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <refresh@plt>

LLVM IR (-O0):
@.str = [2 x i8] c"\0A\00"
@.str.1 = [37 x i8] c"Thank you for using my typing tutor\0A\00"
@.str.2 = [15 x i8] c"Bye Bye ! ! !\0A\00"
define void @print_byebye() {
%1 = call i32 @printw(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @print_in_middle(i32 0, i32 0, i32 0, i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.1, i64 0, i64 0), i32* null)
%3 = call i32 @print_in_middle(i32 0, i32 0, i32 0, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.2, i64 0, i64 0), i32* null)
%4 = call i32 (...) @refresh()
ret void
}

LLVM IR (-O2):
@.str = [2 x i8] c"\0A\00"
@.str.1 = [37 x i8] c"Thank you for using my typing tutor\0A\00"
@.str.2 = [15 x i8] c"Bye Bye ! ! !\0A\00"
define void @print_byebye() {
%1 = tail call i32 @printw(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @print_in_middle(i32 0, i32 0, i32 0, i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.1, i64 0, i64 0), i32* null)
%3 = tail call i32 @print_in_middle(i32 0, i32 0, i32 0, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.2, i64 0, i64 0), i32* null)
%4 = tail call i32 (...) @refresh()
ret void
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
int /*<<< orphan*/ ASSERT(int);
void CRCDataWrite(uint32_t ui32Base, uint32_t ui32Data) {
  ASSERT(ui32Base == 0x44030000);
  (*((volatile uint32_t *)(ui32Base + 0x00000414))) = ui32Data;
}


x86 assembly (clang, -O0):
<CRCDataWrite>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
cmpl   $0x44030000,-0x4(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <ASSERT@plt>
mov    -0x8(%rbp),%ecx
mov    -0x4(%rbp),%eax
add    $0x414,%eax
cltq
mov    %ecx,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<CRCDataWrite>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
xor    %edi,%edi
cmp    $0x44030000,%ebp
sete   %dil
call   1030 <ASSERT@plt>
movslq %ebp,%rax
mov    %ebx,0x414(%rax)
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define void @CRCDataWrite(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = icmp eq i32 %5, 1141047296
%7 = zext i1 %6 to i32
%8 = call i32 @ASSERT(i32 %7)
%9 = load i32, i32* %4
%10 = load i32, i32* %3
%11 = add nsw i32 %10, 1044
%12 = sext i32 %11 to i64
%13 = inttoptr i64 %12 to i32*
store volatile i32 %9, i32* %13
ret void
}

LLVM IR (-O2):
define void @CRCDataWrite(i32 %0, i32 %1) {
%3 = icmp eq i32 %0, 1141047296
%4 = zext i1 %3 to i32
%5 = tail call i32 @ASSERT(i32 %4)
%6 = add nsw i32 %0, 1044
%7 = sext i32 %6 to i64
%8 = inttoptr i64 %7 to i32*
store volatile i32 %1, i32* %8
ret void
}
/* Variables and functions */
int /*<<< orphan*/ unlink(char *);
void GPF_del(char *f) { unlink(f); }


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

x86 assembly (clang, -O2):
<GPF_del>:
jmp    1030 <unlink@plt>

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

LLVM IR (-O2):
define void @GPF_del(i8* nocapture %0) {
%2 = tail call i32 @unlink(i8* %0)
ret void
}
/* Variables and functions */
int __builtin_divweo(int, int);
int div_weo(int a, int b) { return __builtin_divweo(a, b); }


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

x86 assembly (clang, -O2):
<div_weo>:
jmp    1030 <__builtin_divweo@plt>

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

LLVM IR (-O2):
define i32 @div_weo(i32 %0, i32 %1) {
%3 = tail call i32 @__builtin_divweo(i32 %0, i32 %1)
ret i32 %3
}
int test_imm_43uint64_midword_mem(unsigned long long *val) {
  return ((*val >> 16) & (0x43 << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_43uint64_midword_mem(i64* %0) {
%2 = alloca i64*
store i64* %0, i64** %2
%3 = load i64*, i64** %2
%4 = load i64, i64* %3
%5 = lshr i64 %4, 16
%6 = and i64 %5, 67
%7 = icmp ne i64 %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_43uint64_midword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 4390912
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ dup_noinherit(int);
int fd_safer_noinherit(int /*<<< orphan*/);
int dup_safer_noinherit(int fd) {
  return fd_safer_noinherit(dup_noinherit(fd));
}


x86 assembly (clang, -O0):
<dup_safer_noinherit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <dup_noinherit@plt>
mov    %eax,%edi
call   1040 <fd_safer_noinherit@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dup_safer_noinherit>:
push   %rax
call   1030 <dup_noinherit@plt>
mov    %eax,%edi
pop    %rax
jmp    1040 <fd_safer_noinherit@plt>

LLVM IR (-O0):
define i32 @dup_safer_noinherit(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @dup_noinherit(i32 %3)
%5 = call i32 @fd_safer_noinherit(i32 %4)
ret i32 %5
}

LLVM IR (-O2):
define i32 @dup_safer_noinherit(i32 %0) {
%2 = tail call i32 @dup_noinherit(i32 %0)
%3 = tail call i32 @fd_safer_noinherit(i32 %2)
ret i32 %3
}
/* Forward declarations */
typedef struct TYPE_4__ TYPE_2__;
typedef struct TYPE_3__ TYPE_1__;

/* Type definitions */
struct TYPE_3__ {
  scalar_t__ resourceid;
};
struct TYPE_4__ {
  TYPE_1__ xerror;
};
typedef TYPE_2__ XEvent;

/* Variables and functions */
unsigned long get_XEvent_xerror_resourceid(void *_p) {
  return (unsigned long)((XEvent *)_p)->xerror.resourceid;
}


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

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

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

LLVM IR (-O2):
define i64 @get_XEvent_xerror_resourceid(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
ret i64 %3
}
void crash_setup_regs(struct pt_regs *newregs, struct pt_regs *oldregs) {}


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

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

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

LLVM IR (-O2):
%struct.pt_regs = type opaque
define void @crash_setup_regs(%struct.pt_regs* nocapture %0, %struct.pt_regs* nocapture %1) {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ PKCS7_DIGEST;
typedef int /*<<< orphan*/ ASN1_VALUE;

/* Variables and functions */
int ASN1_item_i2d(int /*<<< orphan*/ *, unsigned char **, int /*<<< orphan*/ *);
int /*<<< orphan*/ PKCS7_DIGEST_it;
int i2d_PKCS7_DIGEST(PKCS7_DIGEST *a, unsigned char **out) {
  return ASN1_item_i2d((ASN1_VALUE *)a, out, &PKCS7_DIGEST_it);
}


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

x86 assembly (clang, -O2):
<i2d_PKCS7_DIGEST>:
mov    0x2ed1(%rip),%rdx
jmp    1030 <ASN1_item_i2d@plt>

LLVM IR (-O0):
@PKCS7_DIGEST_it = global i32 0
define i32 @i2d_PKCS7_DIGEST(i32* %0, i8** %1) {
%3 = alloca i32*
%4 = alloca i8**
store i32* %0, i32** %3
store i8** %1, i8*** %4
%5 = load i32*, i32** %3
%6 = load i8**, i8*** %4
%7 = call i32 @ASN1_item_i2d(i32* %5, i8** %6, i32* @PKCS7_DIGEST_it)
ret i32 %7
}

LLVM IR (-O2):
@PKCS7_DIGEST_it = global i32 0
define i32 @i2d_PKCS7_DIGEST(i32* %0, i8** %1) {
%3 = tail call i32 @ASN1_item_i2d(i32* %0, i8** %1, i32* @PKCS7_DIGEST_it)
ret i32 %3
}
void g_swap_p(void **x, void **y) {
  void *z = *x;
  *x = *y;
  *y = z;
}


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

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

LLVM IR (-O0):
define void @g_swap_p(i8** %0, i8** %1) {
%3 = alloca i8**
%4 = alloca i8**
%5 = alloca i8*
store i8** %0, i8*** %3
store i8** %1, i8*** %4
%6 = load i8**, i8*** %3
%7 = load i8*, i8** %6
store i8* %7, i8** %5
%8 = load i8**, i8*** %4
%9 = load i8*, i8** %8
%10 = load i8**, i8*** %3
store i8* %9, i8** %10
%11 = load i8*, i8** %5
%12 = load i8**, i8*** %4
store i8* %11, i8** %12
ret void
}

LLVM IR (-O2):
define void @g_swap_p(i8** nocapture %0, i8** nocapture %1) {
%3 = load i8*, i8** %0
%4 = load i8*, i8** %1
store i8* %4, i8** %0
store i8* %3, i8** %1
ret void
}