xunge/DecIR huggingface dataset:
unsigned int add(unsigned int i, unsigned int j) {
  unsigned int carry;
  do {
    carry = j;
    j &= i;
    i ^= carry;
  } while ((j <<= 1) != 0);
  return i;
}


x86 assembly (clang, -O0):
<add>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%eax
and    -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0xc(%rbp),%eax
xor    -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x8(%rbp),%eax
shl    $0x1,%eax
mov    %eax,-0x8(%rbp)
cmp    $0x0,%eax
jne    110a <add+0xa>
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<add>:
mov    %edi,%eax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %eax,%ecx
and    %esi,%ecx
xor    %esi,%eax
add    %ecx,%ecx
mov    %ecx,%esi
jne    1110 <add+0x10>
ret

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

LLVM IR (-O2):
define i32 @add(i32 %0, i32 %1) {
br label %3
3: ; preds = %3, %2
%4 = phi i32 [ %1, %2 ], [ %8, %3 ]
%5 = phi i32 [ %0, %2 ], [ %7, %3 ]
%6 = and i32 %5, %4
%7 = xor i32 %5, %4
%8 = shl i32 %6, 1
%9 = icmp eq i32 %8, 0
br i1 %9, label %10, label %3
10: ; preds = %3
ret i32 %7
}
/* Variables and functions */
int EINVAL;
__attribute__((visibility("default"))) int sd_is_fifo(int fd,
                                                      const char *path) {
  return -EINVAL;
}


x86 assembly (clang, -O0):
<sd_is_fifo>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
xor    %eax,%eax
mov    0x2ecc(%rip),%rcx
sub    (%rcx),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<sd_is_fifo>:
mov    0x2ed9(%rip),%rcx
xor    %eax,%eax
sub    (%rcx),%eax
ret

LLVM IR (-O0):
@EINVAL = global i32 0
define i32 @sd_is_fifo(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
store i32 %0, i32* %3
store i8* %1, i8** %4
%5 = load i32, i32* @EINVAL
%6 = sub nsw i32 0, %5
ret i32 %6
}

LLVM IR (-O2):
@EINVAL = global i32 0
define i32 @sd_is_fifo(i32 %0, i8* nocapture readnone %1) {
%3 = load i32, i32* @EINVAL
%4 = sub nsw i32 0, %3
ret i32 %4
}
long f6(long a) { return a & ~0x0000ffffL; }


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

x86 assembly (clang, -O2):
<f6>:
mov    %rdi,%rax
and    $0xffffffffffff0000,%rax
ret

LLVM IR (-O0):
define i64 @f6(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = and i64 %3, -65536
ret i64 %4
}

LLVM IR (-O2):
define i64 @f6(i64 %0) {
%2 = and i64 %0, -65536
ret i64 %2
}
unsigned umax(const unsigned a, const unsigned b) { return a > b ? a : b; }


x86 assembly (clang, -O0):
<umax>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
jbe    1121 <umax+0x21>
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
jmp    1127 <umax+0x27>
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<umax>:
mov    %esi,%eax
cmp    %esi,%edi
cmova  %edi,%eax
ret

LLVM IR (-O0):
define i32 @umax(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 = icmp ugt i32 %5, %6
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = load i32, i32* %3
br label %12
10: ; preds = %2
%11 = load i32, i32* %4
br label %12
12: ; preds = %10, %8
%13 = phi i32 [ %9, %8 ], [ %11, %10 ]
ret i32 %13
}

LLVM IR (-O2):
define i32 @umax(i32 %0, i32 %1) {
%3 = icmp ugt i32 %0, %1
%4 = select i1 %3, i32 %0, i32 %1
ret i32 %4
}
void InitialiseArrayToZero(int a[], int size) {
  int i;
  for (i = 0; i < size; i++)
    a[i] = 0;
}


x86 assembly (clang, -O0):
<InitialiseArrayToZero>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    113b <InitialiseArrayToZero+0x3b>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
movl   $0x0,(%rax,%rcx,4)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1112 <InitialiseArrayToZero+0x12>
pop    %rbp
ret

x86 assembly (clang, -O2):
<InitialiseArrayToZero>:
test   %esi,%esi
jle    1126 <InitialiseArrayToZero+0x16>
push   %rax
mov    %esi,%edx
shl    $0x2,%rdx
xor    %esi,%esi
call   1030 <memset@plt>
add    $0x8,%rsp
ret

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

LLVM IR (-O2):
define void @InitialiseArrayToZero(i32* nocapture writeonly %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %8
4: ; preds = %2
%5 = bitcast i32* %0 to i8*
%6 = zext i32 %1 to i64
%7 = shl nuw nsw i64 %6, 2
br label %8
8: ; preds = %4, %2
ret void
}
void I422ToARGB1555Row_Any_NEON() {}


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

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

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

LLVM IR (-O2):
define void @I422ToARGB1555Row_Any_NEON() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ roadmap_city_write_file(int /*<<< orphan*/, char *,
                                           int /*<<< orphan*/);
int /*<<< orphan*/ roadmap_db_map_path();
int /*<<< orphan*/ roadmap_file_remove(int /*<<< orphan*/, char *);
int /*<<< orphan*/ roadmap_square_load_index();
void roadmap_square_rebuild_index(void) {
  roadmap_file_remove(roadmap_db_map_path(), "city_index");
  roadmap_square_load_index();
  roadmap_city_write_file(roadmap_db_map_path(), "city_index", 0);
}


x86 assembly (clang, -O0):
<roadmap_square_rebuild_index>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1060 <roadmap_db_map_path@plt>
mov    %eax,%edi
lea    0xeac(%rip),%rsi
call   1050 <roadmap_file_remove@plt>
mov    $0x0,%al
call   1040 <roadmap_square_load_index@plt>
mov    $0x0,%al
call   1060 <roadmap_db_map_path@plt>
mov    %eax,%edi
lea    0xe90(%rip),%rsi
xor    %edx,%edx
call   1030 <roadmap_city_write_file@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<roadmap_square_rebuild_index>:
push   %rbx
xor    %eax,%eax
call   1060 <roadmap_db_map_path@plt>
lea    0xeb1(%rip),%rbx
mov    %eax,%edi
mov    %rbx,%rsi
call   1050 <roadmap_file_remove@plt>
xor    %eax,%eax
call   1040 <roadmap_square_load_index@plt>
xor    %eax,%eax
call   1060 <roadmap_db_map_path@plt>
mov    %eax,%edi
mov    %rbx,%rsi
xor    %edx,%edx
pop    %rbx
jmp    1030 <roadmap_city_write_file@plt>

LLVM IR (-O0):
@.str = [11 x i8] c"city_index\00"
define void @roadmap_square_rebuild_index() {
%1 = call i32 (...) @roadmap_db_map_path()
%2 = call i32 @roadmap_file_remove(i32 %1, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
%3 = call i32 (...) @roadmap_square_load_index()
%4 = call i32 (...) @roadmap_db_map_path()
%5 = call i32 @roadmap_city_write_file(i32 %4, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 0)
ret void
}

LLVM IR (-O2):
@.str = [11 x i8] c"city_index\00"
define void @roadmap_square_rebuild_index() {
%1 = tail call i32 (...) @roadmap_db_map_path()
%2 = tail call i32 @roadmap_file_remove(i32 %1, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 (...) @roadmap_square_load_index()
%4 = tail call i32 (...) @roadmap_db_map_path()
%5 = tail call i32 @roadmap_city_write_file(i32 %4, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char);
void vprintf(char s[]) {
  int i;
  for (i = 0; s[i] != '\0'; ++i)
    printf("[%c]\n", s[i]);
}


x86 assembly (clang, -O0):
<vprintf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
je     115e <vprintf+0x4e>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
lea    0xeb9(%rip),%rdi
movsbl (%rax,%rcx,1),%esi
call   1030 <printf@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1123 <vprintf+0x13>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<vprintf>:
push   %r14
push   %rbx
push   %rax
mov    (%rdi),%al
test   %al,%al
je     1146 <vprintf+0x36>
mov    %rdi,%rbx
add    $0x1,%rbx
lea    0xed8(%rip),%r14
nopl   0x0(%rax,%rax,1)
movsbl %al,%esi
mov    %r14,%rdi
call   1030 <printf@plt>
movzbl (%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1130 <vprintf+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [6 x i8] c"[%c]\0A\00"
define void @vprintf(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
store i32 0, i32* %3
br label %4
4: ; preds = %19, %1
%5 = load i8*, i8** %2
%6 = load i32, i32* %3
%7 = sext i32 %6 to i64
%8 = getelementptr inbounds i8, i8* %5, i64 %7
%9 = load i8, i8* %8
%10 = sext i8 %9 to i32
%11 = icmp ne i32 %10, 0
br i1 %11, label %12, label %22
12: ; preds = %4
%13 = load i8*, i8** %2
%14 = load i32, i32* %3
%15 = sext i32 %14 to i64
%16 = getelementptr inbounds i8, i8* %13, i64 %15
%17 = load i8, i8* %16
%18 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8 signext %17)
br label %19
19: ; preds = %12
%20 = load i32, i32* %3
%21 = add nsw i32 %20, 1
store i32 %21, i32* %3
br label %4
22: ; preds = %4
ret void
}

LLVM IR (-O2):
@.str = [6 x i8] c"[%c]\0A\00"
define void @vprintf(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %12, label %4
4: ; preds = %1, %4
%5 = phi i64 [ %8, %4 ], [ 0, %1 ]
%6 = phi i8 [ %10, %4 ], [ %2, %1 ]
%7 = tail call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8 signext %6)
%8 = add nuw i64 %5, 1
%9 = getelementptr inbounds i8, i8* %0, i64 %8
%10 = load i8, i8* %9
%11 = icmp eq i8 %10, 0
br i1 %11, label %12, label %4
12: ; preds = %4, %1
ret void
}
/* Type definitions */
typedef int int32_t;

/* Variables and functions */
int get_random_existing_file_index();
int read_verify_file(int);
bool test_read_verify_file() {
  int32_t index = get_random_existing_file_index();
  if (index == -1) {
    return true;
  }
  return read_verify_file(index);
}


x86 assembly (clang, -O0):
<test_read_verify_file>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1040 <get_random_existing_file_index@plt>
mov    %eax,-0x8(%rbp)
cmpl   $0xffffffff,-0x8(%rbp)
jne    1148 <test_read_verify_file+0x28>
movl   $0x1,-0x4(%rbp)
jmp    1153 <test_read_verify_file+0x33>
mov    -0x8(%rbp),%edi
call   1030 <read_verify_file@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_read_verify_file>:
push   %rax
xor    %eax,%eax
call   1040 <get_random_existing_file_index@plt>
cmp    $0xffffffff,%eax
je     1135 <test_read_verify_file+0x15>
mov    %eax,%edi
pop    %rax
jmp    1030 <read_verify_file@plt>
mov    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @test_read_verify_file() {
%1 = alloca i32
%2 = alloca i32
%3 = call i32 (...) @get_random_existing_file_index()
store i32 %3, i32* %2
%4 = load i32, i32* %2
%5 = icmp eq i32 %4, -1
br i1 %5, label %6, label %7
6: ; preds = %0
store i32 1, i32* %1
br label %10
7: ; preds = %0
%8 = load i32, i32* %2
%9 = call i32 @read_verify_file(i32 %8)
store i32 %9, i32* %1
br label %10
10: ; preds = %7, %6
%11 = load i32, i32* %1
ret i32 %11
}

LLVM IR (-O2):
define i32 @test_read_verify_file() {
%1 = tail call i32 (...) @get_random_existing_file_index()
%2 = icmp eq i32 %1, -1
br i1 %2, label %5, label %3
3: ; preds = %0
%4 = tail call i32 @read_verify_file(i32 %1)
br label %5
5: ; preds = %0, %3
%6 = phi i32 [ %4, %3 ], [ 1, %0 ]
ret i32 %6
}
/* Type definitions */
typedef int /*<<< orphan*/ uint64_t;

/* Variables and functions */
int /*<<< orphan*/ internal_fiat_p384_from_montgomery(uintptr_t, uintptr_t);
void fiat_p384_from_montgomery(uint64_t out1[6], const uint64_t arg1[6]) {
  internal_fiat_p384_from_montgomery((uintptr_t)out1, (uintptr_t)arg1);
}


x86 assembly (clang, -O0):
<fiat_p384_from_montgomery>:
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 <internal_fiat_p384_from_montgomery@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fiat_p384_from_montgomery>:
jmp    1030 <internal_fiat_p384_from_montgomery@plt>

LLVM IR (-O0):
define void @fiat_p384_from_montgomery(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 = ptrtoint i32* %5 to i64
%7 = load i32*, i32** %4
%8 = ptrtoint i32* %7 to i64
%9 = call i32 @internal_fiat_p384_from_montgomery(i64 %6, i64 %8)
ret void
}

LLVM IR (-O2):
define void @fiat_p384_from_montgomery(i32* %0, i32* %1) {
%3 = ptrtoint i32* %0 to i64
%4 = ptrtoint i32* %1 to i64
%5 = tail call i32 @internal_fiat_p384_from_montgomery(i64 %3, i64 %4)
ret void
}
__attribute__((always_)) unsigned long
module_kallsyms_lookup_name(const char *name) {
  return 0;
}


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

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

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

LLVM IR (-O2):
define i64 @module_kallsyms_lookup_name(i8* nocapture readnone %0) {
ret i64 0
}
void uart_init(void) {
  *(volatile unsigned int *)((void *)((char *)(0x04000040 << 2) + (2 << 2))) =
      1 | 2;
}


x86 assembly (clang, -O0):
<uart_init>:
push   %rbp
mov    %rsp,%rbp
mov    $0x10000100,%eax
movl   $0x3,0x8(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<uart_init>:
movl   $0x3,0x10000108
ret

LLVM IR (-O0):
define void @uart_init() {
store volatile i32 3, i32* bitcast (i8* getelementptr inbounds (i8, i8* inttoptr (i64 268435712 to i8*), i64 8) to i32*)
ret void
}

LLVM IR (-O2):
define void @uart_init() {
store volatile i32 3, i32* inttoptr (i64 268435720 to i32*)
ret void
}
/* Variables and functions */
double sqrt(double);
double computeOtherSide(double hypotenuse, double side) {
  return sqrt(hypotenuse * hypotenuse - side * side);
}


x86 assembly (clang, -O0):
<computeOtherSide>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x8(%rbp),%xmm2
movsd  -0x10(%rbp),%xmm1
mulsd  -0x10(%rbp),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
call   1030 <sqrt@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<computeOtherSide>:
mulsd  %xmm1,%xmm1
mulsd  %xmm0,%xmm0
subsd  %xmm1,%xmm0
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jb     112b <computeOtherSide+0x1b>
sqrtsd %xmm0,%xmm0
ret
jmp    1030 <sqrt@plt>

LLVM IR (-O0):
define double @computeOtherSide(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = load double, double* %3
%6 = load double, double* %3
%7 = load double, double* %4
%8 = load double, double* %4
%9 = fmul double %7, %8
%10 = fneg double %9
%11 = call double @llvm.fmuladd.f64(double %5, double %6, double %10)
%12 = call double @sqrt(double %11)
ret double %12
}

LLVM IR (-O2):
define double @computeOtherSide(double %0, double %1) {
%3 = fneg double %1
%4 = fmul double %3, %1
%5 = tail call double @llvm.fmuladd.f64(double %0, double %0, double %4)
%6 = tail call double @sqrt(double %5)
ret double %6
}
int mem_cgroup_prepare_migration(struct page *page, struct page *newpage) {
  return 0;
}


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

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

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

LLVM IR (-O2):
%struct.page = type opaque
define i32 @mem_cgroup_prepare_migration(%struct.page* nocapture readnone %0, %struct.page* nocapture readnone %1) {
ret i32 0
}
char *fd2lst(string)
char *string;
{
  double dj, date, time, lst;
  dj = fd2jd(string);
  lst = jd2lst(dj);
  ts2dt(lst, &date, &time);
  date = 0.0;
  return (dt2fd(date, time));
}


x86 assembly (clang, -O0):
<fd2lst>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x0,%al
call   1040 <fd2jd@plt>
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
mov    $0x1,%al
call   1050 <jd2lst@plt>
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x28(%rbp),%xmm0
lea    -0x18(%rbp),%rdi
lea    -0x20(%rbp),%rsi
mov    $0x1,%al
call   1030 <ts2dt@plt>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  -0x20(%rbp),%xmm1
mov    $0x2,%al
call   1060 <dt2fd@plt>
cltq
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fd2lst>:
sub    $0x18,%rsp
xor    %eax,%eax
call   1040 <fd2jd@plt>
cvtsi2sd %eax,%xmm0
mov    $0x1,%al
call   1050 <jd2lst@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
lea    0x10(%rsp),%rdi
lea    0x8(%rsp),%rsi
mov    $0x1,%al
call   1030 <ts2dt@plt>
movq   $0x0,0x10(%rsp)
movsd  0x8(%rsp),%xmm1
xorpd  %xmm0,%xmm0
mov    $0x2,%al
call   1060 <dt2fd@plt>
cltq
add    $0x18,%rsp
ret

LLVM IR (-O0):
define i8* @fd2lst(i8* %0) {
%2 = alloca i8*
%3 = alloca double
%4 = alloca double
%5 = alloca double
%6 = alloca double
store i8* %0, i8** %2
%7 = load i8*, i8** %2
%8 = call i32 (i8*, ...) bitcast (i32 (...)* @fd2jd to i32 (i8*, ...)*)(i8* %7)
%9 = sitofp i32 %8 to double
store double %9, double* %3
%10 = load double, double* %3
%11 = call i32 (double, ...) bitcast (i32 (...)* @jd2lst to i32 (double, ...)*)(double %10)
%12 = sitofp i32 %11 to double
store double %12, double* %6
%13 = load double, double* %6
%14 = call i32 (double, double*, double*, ...) bitcast (i32 (...)* @ts2dt to i32 (double, double*, double*, ...)*)(double %13, double* %4, double* %5)
store double 0.000000e+00, double* %4
%15 = load double, double* %4
%16 = load double, double* %5
%17 = call i32 (double, double, ...) bitcast (i32 (...)* @dt2fd to i32 (double, double, ...)*)(double %15, double %16)
%18 = sext i32 %17 to i64
%19 = inttoptr i64 %18 to i8*
ret i8* %19
}

LLVM IR (-O2):
define i8* @fd2lst(i8* %0) {
%2 = alloca double
%3 = alloca double
%4 = bitcast double* %2 to i8*
%5 = bitcast double* %3 to i8*
%6 = tail call i32 (i8*, ...) bitcast (i32 (...)* @fd2jd to i32 (i8*, ...)*)(i8* %0)
%7 = sitofp i32 %6 to double
%8 = tail call i32 (double, ...) bitcast (i32 (...)* @jd2lst to i32 (double, ...)*)(double %7)
%9 = sitofp i32 %8 to double
%10 = call i32 (double, double*, double*, ...) bitcast (i32 (...)* @ts2dt to i32 (double, double*, double*, ...)*)(double %9, double* %2, double* %3)
store double 0.000000e+00, double* %2
%11 = load double, double* %3
%12 = call i32 (double, double, ...) bitcast (i32 (...)* @dt2fd to i32 (double, double, ...)*)(double 0.000000e+00, double %11)
%13 = sext i32 %12 to i64
%14 = inttoptr i64 %13 to i8*
ret i8* %14
}
int is_space(char c) { return (c == '\n' || c == '\t' || c == ' '); }


x86 assembly (clang, -O0):
<is_space>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0xa,%ecx
mov    %al,-0x2(%rbp)
je     113b <is_space+0x3b>
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x9,%ecx
mov    %al,-0x2(%rbp)
je     113b <is_space+0x3b>
movsbl -0x1(%rbp),%eax
cmp    $0x20,%eax
sete   %al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_space>:
lea    -0x9(%rdi),%eax
cmp    $0x2,%al
setb   %al
cmp    $0x20,%dil
sete   %cl
or     %al,%cl
movzbl %cl,%eax
ret

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

LLVM IR (-O2):
define i32 @is_space(i8 signext %0) {
%2 = add i8 %0, -9
%3 = icmp ult i8 %2, 2
%4 = icmp eq i8 %0, 32
%5 = or i1 %4, %3
%6 = zext i1 %5 to i32
ret i32 %6
}
/* Variables and functions */
void *realloc(void *, size_t);
void *sys_realloc(void *ptr, size_t size) { return realloc(ptr, size); }


x86 assembly (clang, -O0):
<sys_realloc>:
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 <realloc@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sys_realloc>:
jmp    1030 <realloc@plt>

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

LLVM IR (-O2):
define noalias i8* @sys_realloc(i8* nocapture %0, i64 %1) {
%3 = tail call i8* @realloc(i8* %0, i64 %1)
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_SUCCESS;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
int main(int argc, char *argv[]) {
  printf("main\n");
  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)
lea    0xec3(%rip),%rdi
call   1030 <printf@plt>
mov    0x2e97(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

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

LLVM IR (-O0):
@.str = [6 x i8] c"main\0A\00"
@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 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%7 = load i32, i32* @EXIT_SUCCESS
%8 = call i32 @exit(i32 %7)
unreachable
}

LLVM IR (-O2):
@EXIT_SUCCESS = global i32 0
@str = [5 x i8] c"main\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @str, i64 0, i64 0))
%4 = load i32, i32* @EXIT_SUCCESS
%5 = tail call i32 @exit(i32 %4)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ S();
int /*<<< orphan*/ lex();
void syntactic() {
  lex();
  S();
}


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

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

LLVM IR (-O0):
define void @syntactic() {
%1 = call i32 (...) @lex()
%2 = call i32 (...) @S()
ret void
}

LLVM IR (-O2):
define void @syntactic() {
%1 = tail call i32 (...) @lex()
%2 = tail call i32 (...) @S()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int, int);
int main(void) {
  int value1, value2, difference;
  value1 = 87;
  value2 = 15;
  difference = value1 - value2;
  printf("%i minus %i is %i\n", value1, value2, difference);
  return 0;
}


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

LLVM IR (-O0):
@.str = [19 x i8] c"%i minus %i is %i\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 0, i32* %1
store i32 87, i32* %2
store i32 15, i32* %3
%5 = load i32, i32* %2
%6 = load i32, i32* %3
%7 = sub nsw i32 %5, %6
store i32 %7, i32* %4
%8 = load i32, i32* %2
%9 = load i32, i32* %3
%10 = load i32, i32* %4
%11 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i32 %8, i32 %9, i32 %10)
ret i32 0
}

LLVM IR (-O2):
@.str = [19 x i8] c"%i minus %i is %i\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i32 87, i32 15, i32 72)
ret i32 0
}
void PECIIntDisable(unsigned long ulBase, unsigned long ulIntFlags) {
  ;
  (*((volatile unsigned long *)(ulBase + 0x00000080))) &= ~ulIntFlags;
}


x86 assembly (clang, -O0):
<PECIIntDisable>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdx
xor    $0xffffffffffffffff,%rdx
mov    -0x8(%rbp),%rax
mov    0x80(%rax),%rcx
and    %rdx,%rcx
mov    %rcx,0x80(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<PECIIntDisable>:
not    %rsi
and    %rsi,0x80(%rdi)
ret

LLVM IR (-O0):
define void @PECIIntDisable(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 = xor i64 %5, -1
%7 = load i64, i64* %3
%8 = add i64 %7, 128
%9 = inttoptr i64 %8 to i64*
%10 = load volatile i64, i64* %9
%11 = and i64 %10, %6
store volatile i64 %11, i64* %9
ret void
}

LLVM IR (-O2):
define void @PECIIntDisable(i64 %0, i64 %1) {
%3 = xor i64 %1, -1
%4 = add i64 %0, 128
%5 = inttoptr i64 %4 to i64*
%6 = load volatile i64, i64* %5
%7 = and i64 %6, %3
store volatile i64 %7, i64* %5
ret void
}
/* Variables and functions */
char *CuStrAlloc(int);
int /*<<< orphan*/ strcpy(char *, char *);
int strlen(char *);
char *CuStrCopy(char *old) {
  int len = strlen(old);
  char *new = CuStrAlloc(len + 1);
  strcpy(new, old);
  return new;
}


x86 assembly (clang, -O0):
<CuStrCopy>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%edi
add    $0x1,%edi
call   1050 <CuStrAlloc@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1030 <strcpy@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<CuStrCopy>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
call   1040 <strlen@plt>
lea    0x1(%rax),%edi
call   1050 <CuStrAlloc@plt>
mov    %rax,%rbx
mov    %rax,%rdi
mov    %r14,%rsi
call   1030 <strcpy@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i8* @CuStrCopy(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
%4 = alloca i8*
store i8* %0, i8** %2
%5 = load i8*, i8** %2
%6 = call i32 @strlen(i8* %5)
store i32 %6, i32* %3
%7 = load i32, i32* %3
%8 = add nsw i32 %7, 1
%9 = call i8* @CuStrAlloc(i32 %8)
store i8* %9, i8** %4
%10 = load i8*, i8** %4
%11 = load i8*, i8** %2
%12 = call i32 @strcpy(i8* %10, i8* %11)
%13 = load i8*, i8** %4
ret i8* %13
}

LLVM IR (-O2):
define i8* @CuStrCopy(i8* %0) {
%2 = tail call i32 @strlen(i8* %0)
%3 = add nsw i32 %2, 1
%4 = tail call i8* @CuStrAlloc(i32 %3)
%5 = tail call i32 @strcpy(i8* %4, i8* %0)
ret i8* %4
}
/* Variables and functions */
int M_PI;
float img_radi(float v) { return (-M_PI / 2 - M_PI / 4) + v * M_PI / 2; }


x86 assembly (clang, -O0):
<img_radi>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
xor    %eax,%eax
mov    0x2ed6(%rip),%rcx
sub    (%rcx),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,-0x8(%rbp)
mov    0x2ec2(%rip),%rax
mov    (%rax),%eax
mov    $0x4,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    -0x8(%rbp),%eax
sub    %ecx,%eax
cvtsi2ss %eax,%xmm0
movss  -0x4(%rbp),%xmm1
mov    0x2ea1(%rip),%rax
cvtsi2ssl (%rax),%xmm2
mulss  %xmm2,%xmm1
movss  0xea9(%rip),%xmm2
divss  %xmm2,%xmm1
addss  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<img_radi>:
mov    0x2ee1(%rip),%rax
mov    (%rax),%eax
mov    %eax,%ecx
shr    $0x1f,%ecx
add    %eax,%ecx
sar    %ecx
lea    0x3(%rax),%edx
test   %eax,%eax
cmovns %eax,%edx
sar    $0x2,%edx
add    %ecx,%edx
neg    %edx
cvtsi2ss %edx,%xmm1
cvtsi2ss %eax,%xmm2
mulss  %xmm2,%xmm0
mulss  0xecb(%rip),%xmm0
addss  %xmm1,%xmm0
ret

LLVM IR (-O0):
@M_PI = global i32 0
define float @img_radi(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load i32, i32* @M_PI
%4 = sub nsw i32 0, %3
%5 = sdiv i32 %4, 2
%6 = load i32, i32* @M_PI
%7 = sdiv i32 %6, 4
%8 = sub nsw i32 %5, %7
%9 = sitofp i32 %8 to float
%10 = load float, float* %2
%11 = load i32, i32* @M_PI
%12 = sitofp i32 %11 to float
%13 = fmul float %10, %12
%14 = fdiv float %13, 2.000000e+00
%15 = fadd float %9, %14
ret float %15
}

LLVM IR (-O2):
@M_PI = global i32 0
define float @img_radi(float %0) {
%2 = load i32, i32* @M_PI
%3 = sdiv i32 %2, -2
%4 = sdiv i32 %2, -4
%5 = add nsw i32 %4, %3
%6 = sitofp i32 %5 to float
%7 = sitofp i32 %2 to float
%8 = fmul float %7, %0
%9 = fmul float %8, 5.000000e-01
%10 = fadd float %9, %6
ret float %10
}
/* Type definitions */
typedef int /*<<< orphan*/ va_list;

/* Variables and functions */
int /*<<< orphan*/ stdout;
int vfprintf(int /*<<< orphan*/, char const *, int /*<<< orphan*/);
int test_vprintf_stdout(const char *fmt, va_list ap) {
  return vfprintf(stdout, fmt, ap);
}


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

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

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

LLVM IR (-O2):
@stdout = global i32 0
define i32 @test_vprintf_stdout(i8* %0, i32 %1) {
%3 = load i32, i32* @stdout
%4 = tail call i32 @vfprintf(i32 %3, i8* %0, i32 %1)
ret i32 %4
}
void foo153(int p) {}


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

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

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

LLVM IR (-O2):
define void @foo153(i32 %0) {
ret void
}
const char *opus_get_version_string(void) {
  return "libopus "
         "unknown";
}


x86 assembly (clang, -O0):
<opus_get_version_string>:
push   %rbp
mov    %rsp,%rbp
lea    0xef5(%rip),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<opus_get_version_string>:
lea    0xef9(%rip),%rax
ret

LLVM IR (-O0):
@.str = [16 x i8] c"libopus unknown\00"
define i8* @opus_get_version_string() {
ret i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [16 x i8] c"libopus unknown\00"
define i8* @opus_get_version_string() {
ret i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
int /*<<< orphan*/ ft_memdel(void *);
void ft_strdel(char **as) { ft_memdel((void *)as); }


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

x86 assembly (clang, -O2):
<ft_strdel>:
jmp    1030 <ft_memdel@plt>

LLVM IR (-O0):
define void @ft_strdel(i8** %0) {
%2 = alloca i8**
store i8** %0, i8*** %2
%3 = load i8**, i8*** %2
%4 = bitcast i8** %3 to i8*
%5 = call i32 @ft_memdel(i8* %4)
ret void
}

LLVM IR (-O2):
define void @ft_strdel(i8** %0) {
%2 = bitcast i8** %0 to i8*
%3 = tail call i32 @ft_memdel(i8* %2)
ret void
}
/* Type definitions */
typedef scalar_t__ uint32_t;

/* Variables and functions */
void QEIVelocityDisable(uint32_t ui32Base) {
  ;
  (*((volatile unsigned long *)(ui32Base + 0x00000000))) &= ~(0x00000020);
}


x86 assembly (clang, -O0):
<QEIVelocityDisable>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rcx
and    $0xffffffffffffffdf,%rcx
mov    %rcx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<QEIVelocityDisable>:
andq   $0xffffffffffffffdf,(%rdi)
ret

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

LLVM IR (-O2):
define void @QEIVelocityDisable(i64 %0) {
%2 = inttoptr i64 %0 to i64*
%3 = load volatile i64, i64* %2
%4 = and i64 %3, -33
store volatile i64 %4, i64* %2
ret void
}
/* Type definitions */
struct sip_msg {
  int dummy;
};
struct lump_rpl {
  int dummy;
};

/* Variables and functions */
struct lump_rpl **add_lump_rpl2(struct sip_msg *, char *, int, int);
struct lump_rpl *add_lump_rpl(struct sip_msg *msg, char *s, int len,
                              int flags) {
  struct lump_rpl **l;
  l = add_lump_rpl2(msg, s, len, flags);
  return l ? (*l) : 0;
}


x86 assembly (clang, -O0):
<add_lump_rpl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %ecx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
mov    -0x18(%rbp),%ecx
call   1030 <add_lump_rpl2@plt>
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
je     1158 <add_lump_rpl+0x48>
mov    -0x20(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x28(%rbp)
jmp    1163 <add_lump_rpl+0x53>
xor    %eax,%eax
mov    %rax,-0x28(%rbp)
jmp    1163 <add_lump_rpl+0x53>
mov    -0x28(%rbp),%rax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<add_lump_rpl>:
push   %rax
call   1030 <add_lump_rpl2@plt>
test   %rax,%rax
je     1120 <add_lump_rpl+0x10>
mov    (%rax),%rax
pop    %rcx
ret
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.lump_rpl = type { i32 }
%struct.sip_msg = type { i32 }
define %struct.lump_rpl* @add_lump_rpl(%struct.sip_msg* %0, i8* %1, i32 %2, i32 %3) {
%5 = alloca %struct.sip_msg*
%6 = alloca i8*
%7 = alloca i32
%8 = alloca i32
%9 = alloca %struct.lump_rpl**
store %struct.sip_msg* %0, %struct.sip_msg** %5
store i8* %1, i8** %6
store i32 %2, i32* %7
store i32 %3, i32* %8
%10 = load %struct.sip_msg*, %struct.sip_msg** %5
%11 = load i8*, i8** %6
%12 = load i32, i32* %7
%13 = load i32, i32* %8
%14 = call %struct.lump_rpl** @add_lump_rpl2(%struct.sip_msg* %10, i8* %11, i32 %12, i32 %13)
store %struct.lump_rpl** %14, %struct.lump_rpl*** %9
%15 = load %struct.lump_rpl**, %struct.lump_rpl*** %9
%16 = icmp ne %struct.lump_rpl** %15, null
br i1 %16, label %17, label %20
17: ; preds = %4
%18 = load %struct.lump_rpl**, %struct.lump_rpl*** %9
%19 = load %struct.lump_rpl*, %struct.lump_rpl** %18
br label %21
20: ; preds = %4
br label %21
21: ; preds = %20, %17
%22 = phi %struct.lump_rpl* [ %19, %17 ], [ null, %20 ]
ret %struct.lump_rpl* %22
}

LLVM IR (-O2):
%struct.lump_rpl = type { i32 }
%struct.sip_msg = type { i32 }
define %struct.lump_rpl* @add_lump_rpl(%struct.sip_msg* %0, i8* %1, i32 %2, i32 %3) {
%5 = tail call %struct.lump_rpl** @add_lump_rpl2(%struct.sip_msg* %0, i8* %1, i32 %2, i32 %3)
%6 = icmp eq %struct.lump_rpl** %5, null
br i1 %6, label %9, label %7
7: ; preds = %4
%8 = load %struct.lump_rpl*, %struct.lump_rpl** %5
br label %9
9: ; preds = %4, %7
%10 = phi %struct.lump_rpl* [ %8, %7 ], [ null, %4 ]
ret %struct.lump_rpl* %10
}
/* Type definitions */
typedef int /*<<< orphan*/ time_t;
struct sysinfo {
  int /*<<< orphan*/ uptime;
};

/* Variables and functions */
int /*<<< orphan*/ sysinfo(struct sysinfo *);
time_t get_time(time_t *t) {
  struct sysinfo info;
  sysinfo(&info);
  return info.uptime;
}


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

x86 assembly (clang, -O2):
<get_time>:
push   %rax
mov    %rsp,%rdi
call   1030 <sysinfo@plt>
mov    (%rsp),%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.sysinfo = type { i32 }
define i32 @get_time(i32* %0) {
%2 = alloca i32*
%3 = alloca %struct.sysinfo
store i32* %0, i32** %2
%4 = call i32 @sysinfo(%struct.sysinfo* %3)
%5 = getelementptr inbounds %struct.sysinfo, %struct.sysinfo* %3, i32 0, i32 0
%6 = load i32, i32* %5
ret i32 %6
}

LLVM IR (-O2):
%struct.sysinfo = type { i32 }
define i32 @get_time(i32* nocapture readnone %0) {
%2 = alloca %struct.sysinfo
%3 = bitcast %struct.sysinfo* %2 to i8*
%4 = call i32 @sysinfo(%struct.sysinfo* %2)
%5 = getelementptr inbounds %struct.sysinfo, %struct.sysinfo* %2, i64 0, i32 0
%6 = load i32, i32* %5
ret i32 %6
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
uint32_t gcd(uint32_t a, uint32_t b) {
  uint32_t c;
  while (a != 0) {
    c = a;
    a = b % a;
    b = c;
  }
  return b;
}


x86 assembly (clang, -O0):
<gcd>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     112f <gcd+0x2f>
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
cltd
idivl  -0x4(%rbp)
mov    %edx,-0x4(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x8(%rbp)
jmp    110a <gcd+0xa>
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<gcd>:
mov    %esi,%eax
test   %edi,%edi
je     111d <gcd+0x1d>
mov    %edi,%edx
nopl   0x0(%rax,%rax,1)
mov    %edx,%ecx
cltd
idiv   %ecx
mov    %ecx,%eax
test   %edx,%edx
jne    1110 <gcd+0x10>
mov    %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @gcd(i32 %0, i32 %1) {
%3 = icmp eq i32 %0, 0
br i1 %3, label %9, label %4
4: ; preds = %2, %4
%5 = phi i32 [ %7, %4 ], [ %0, %2 ]
%6 = phi i32 [ %5, %4 ], [ %1, %2 ]
%7 = srem i32 %6, %5
%8 = icmp eq i32 %7, 0
br i1 %8, label %9, label %4
9: ; preds = %4, %2
%10 = phi i32 [ %1, %2 ], [ %5, %4 ]
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isalpha(int);
void t_isalpha_0xbb() {
  Assert_real((isalpha(187) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isalpha.c",
              940, ("isalpha should be 0 for 0xbb"));
}


x86 assembly (clang, -O0):
<t_isalpha_0xbb>:
push   %rbp
mov    %rsp,%rbp
mov    $0xbb,%edi
call   1030 <isalpha@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xebf(%rip),%rsi
mov    $0x3ac,%edx
lea    0xf5b(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_isalpha_0xbb>:
push   %rax
mov    $0xbb,%edi
call   1030 <isalpha@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x3ac,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isalpha.c\00"
@.str.1 = [29 x i8] c"isalpha should be 0 for 0xbb\00"
define void @t_isalpha_0xbb() {
%1 = call i64 @isalpha(i32 187)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 940, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isalpha.c\00"
@.str.1 = [29 x i8] c"isalpha should be 0 for 0xbb\00"
define void @t_isalpha_0xbb() {
%1 = tail call i64 @isalpha(i32 187)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 940, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint64_t;

/* Variables and functions */
int /*<<< orphan*/ printf(char *, int /*<<< orphan*/);
void mark(uint64_t n) { printf("MARK %3llu\n", n); }


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

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

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

LLVM IR (-O2):
@.str = [12 x i8] c"MARK %3llu\0A\00"
define void @mark(i32 %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ ft_putchar_fd(char const, int);
void ft_putstr_fd(char const *s, int fd) {
  int i;
  i = 0;
  while (s[i]) {
    ft_putchar_fd(s[i], fd);
    i++;
  }
}


x86 assembly (clang, -O0):
<ft_putstr_fd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
cmpb   $0x0,(%rax,%rcx,1)
je     115c <ft_putstr_fd+0x4c>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,1),%al
mov    -0xc(%rbp),%esi
movsbl %al,%edi
call   1030 <ft_putchar_fd@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1126 <ft_putstr_fd+0x16>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_putstr_fd>:
push   %rbp
push   %rbx
push   %rax
mov    (%rdi),%al
test   %al,%al
je     1145 <ft_putstr_fd+0x35>
mov    %esi,%ebp
mov    %rdi,%rbx
add    $0x1,%rbx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movsbl %al,%edi
mov    %ebp,%esi
call   1030 <ft_putchar_fd@plt>
movzbl (%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1130 <ft_putstr_fd+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define void @ft_putstr_fd(i8* nocapture %0, i32 %1) {
%3 = load i8, i8* %0
%4 = icmp eq i8 %3, 0
br i1 %4, label %13, label %5
5: ; preds = %2, %5
%6 = phi i64 [ %9, %5 ], [ 0, %2 ]
%7 = phi i8 [ %11, %5 ], [ %3, %2 ]
%8 = tail call i32 @ft_putchar_fd(i8 signext %7, i32 %1)
%9 = add nuw i64 %6, 1
%10 = getelementptr inbounds i8, i8* %0, i64 %9
%11 = load i8, i8* %10
%12 = icmp eq i8 %11, 0
br i1 %12, label %13, label %5
13: ; preds = %5, %2
ret void
}
short fix_mpy(short a, short b) {
  a = ((long)(a) * (long)(b)) >> 15;
  return a;
}


x86 assembly (clang, -O0):
<fix_mpy>:
push   %rbp
mov    %rsp,%rbp
mov    %si,%ax
mov    %di,%cx
mov    %cx,-0x2(%rbp)
mov    %ax,-0x4(%rbp)
movswq -0x2(%rbp),%rax
movswq -0x4(%rbp),%rcx
imul   %rcx,%rax
sar    $0xf,%rax
mov    %ax,-0x2(%rbp)
movswl -0x2(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<fix_mpy>:
mov    %edi,%eax
imul   %esi,%eax
shr    $0xf,%eax
ret

LLVM IR (-O0):
define signext i16 @fix_mpy(i16 signext %0, i16 signext %1) {
%3 = alloca i16
%4 = alloca i16
store i16 %0, i16* %3
store i16 %1, i16* %4
%5 = load i16, i16* %3
%6 = sext i16 %5 to i64
%7 = load i16, i16* %4
%8 = sext i16 %7 to i64
%9 = mul nsw i64 %6, %8
%10 = ashr i64 %9, 15
%11 = trunc i64 %10 to i16
store i16 %11, i16* %3
%12 = load i16, i16* %3
ret i16 %12
}

LLVM IR (-O2):
define signext i16 @fix_mpy(i16 signext %0, i16 signext %1) {
%3 = sext i16 %0 to i32
%4 = sext i16 %1 to i32
%5 = mul nsw i32 %4, %3
%6 = lshr i32 %5, 15
%7 = trunc i32 %6 to i16
ret i16 %7
}
void itoa_dropins() {}


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

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

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

LLVM IR (-O2):
define void @itoa_dropins() {
ret void
}
/* Type definitions */
typedef int uint64_t;

/* Variables and functions */
uint64_t clr_xlow_0(uint64_t u) { return (u + 1) & ~u; }


x86 assembly (clang, -O0):
<clr_xlow_0>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    -0x4(%rbp),%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<clr_xlow_0>:
lea    0x1(%rdi),%eax
not    %edi
and    %edi,%eax
ret

LLVM IR (-O0):
define i32 @clr_xlow_0(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = add nsw i32 %3, 1
%5 = load i32, i32* %2
%6 = xor i32 %5, -1
%7 = and i32 %4, %6
ret i32 %7
}

LLVM IR (-O2):
define i32 @clr_xlow_0(i32 %0) {
%2 = add nsw i32 %0, 1
%3 = xor i32 %0, -1
%4 = and i32 %2, %3
ret i32 %4
}