xunge/DecIR huggingface dataset:
__attribute__((__no__)) void
do_nothing_trailing_hole_none(struct test_trailing_hole *ptr) {
  if ((unsigned long)ptr > 0x2)
    return;
  else
    return;
}


x86 assembly (clang, -O0):
<do_nothing_trailing_hole_none>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
cmp    $0x2,%rax
jbe    111b <do_nothing_trailing_hole_none+0x1b>
jmp    1120 <do_nothing_trailing_hole_none+0x20>
jmp    1120 <do_nothing_trailing_hole_none+0x20>
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.test_trailing_hole = type opaque
define void @do_nothing_trailing_hole_none(%struct.test_trailing_hole* %0) {
%2 = alloca %struct.test_trailing_hole*
store %struct.test_trailing_hole* %0, %struct.test_trailing_hole** %2
%3 = load %struct.test_trailing_hole*, %struct.test_trailing_hole** %2
%4 = ptrtoint %struct.test_trailing_hole* %3 to i64
%5 = icmp ugt i64 %4, 2
br i1 %5, label %6, label %7
6: ; preds = %1
br label %8
7: ; preds = %1
br label %8
8: ; preds = %7, %6
ret void
}

LLVM IR (-O2):
%struct.test_trailing_hole = type opaque
define void @do_nothing_trailing_hole_none(%struct.test_trailing_hole* nocapture %0) {
ret void
}
/* Variables and functions */
float sqrtf(float);
float fsqrt(float _a) { return sqrtf(_a); }


x86 assembly (clang, -O0):
<fsqrt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
call   1030 <sqrtf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fsqrt>:
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jb     111d <fsqrt+0xd>
sqrtss %xmm0,%xmm0
ret
jmp    1030 <sqrtf@plt>

LLVM IR (-O0):
define float @fsqrt(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = call float @sqrtf(float %3)
ret float %4
}

LLVM IR (-O2):
define float @fsqrt(float %0) {
%2 = tail call float @sqrtf(float %0)
ret float %2
}
/* Variables and functions */
int /*<<< orphan*/ enable_interrupt(int /*<<< orphan*/);
void pit_enable(void) { enable_interrupt(0); }


x86 assembly (clang, -O0):
<pit_enable>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
call   1030 <enable_interrupt@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<pit_enable>:
xor    %edi,%edi
jmp    1030 <enable_interrupt@plt>

LLVM IR (-O0):
define void @pit_enable() {
%1 = call i32 @enable_interrupt(i32 0)
ret void
}

LLVM IR (-O2):
define void @pit_enable() {
%1 = tail call i32 @enable_interrupt(i32 0)
ret void
}
int islink(char *path) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @islink(i8* nocapture readnone %0) {
ret i32 0
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
int dtls_int_to_uint24(unsigned char *field, uint32_t value) {
  field[0] = (value >> 16) & 0xff;
  field[1] = (value >> 8) & 0xff;
  field[2] = value & 0xff;
  return 3;
}


x86 assembly (clang, -O0):
<dtls_int_to_uint24>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
sar    $0x10,%eax
and    $0xff,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
mov    -0xc(%rbp),%eax
sar    $0x8,%eax
and    $0xff,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,0x1(%rax)
mov    -0xc(%rbp),%eax
and    $0xff,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,0x2(%rax)
mov    $0x3,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<dtls_int_to_uint24>:
mov    %esi,%eax
mov    %esi,%ecx
shr    $0x10,%ecx
mov    %cl,(%rdi)
mov    %ah,0x1(%rdi)
mov    %al,0x2(%rdi)
mov    $0x3,%eax
ret

LLVM IR (-O0):
define i32 @dtls_int_to_uint24(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = ashr i32 %5, 16
%7 = and i32 %6, 255
%8 = trunc i32 %7 to i8
%9 = load i8*, i8** %3
%10 = getelementptr inbounds i8, i8* %9, i64 0
store i8 %8, i8* %10
%11 = load i32, i32* %4
%12 = ashr i32 %11, 8
%13 = and i32 %12, 255
%14 = trunc i32 %13 to i8
%15 = load i8*, i8** %3
%16 = getelementptr inbounds i8, i8* %15, i64 1
store i8 %14, i8* %16
%17 = load i32, i32* %4
%18 = and i32 %17, 255
%19 = trunc i32 %18 to i8
%20 = load i8*, i8** %3
%21 = getelementptr inbounds i8, i8* %20, i64 2
store i8 %19, i8* %21
ret i32 3
}

LLVM IR (-O2):
define i32 @dtls_int_to_uint24(i8* nocapture writeonly %0, i32 %1) {
%3 = lshr i32 %1, 16
%4 = trunc i32 %3 to i8
store i8 %4, i8* %0
%5 = lshr i32 %1, 8
%6 = trunc i32 %5 to i8
%7 = getelementptr inbounds i8, i8* %0, i64 1
store i8 %6, i8* %7
%8 = trunc i32 %1 to i8
%9 = getelementptr inbounds i8, i8* %0, i64 2
store i8 %8, i8* %9
ret i32 3
}
int logicalShift(int x, int n) { return (x >> n) & ~(((0x1 << 31) >> n) << 1); }


x86 assembly (clang, -O0):
<logicalShift>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x8(%rbp),%ecx
sar    %cl,%eax
mov    -0x8(%rbp),%ecx
mov    $0x80000000,%edx
sar    %cl,%edx
mov    %edx,%ecx
shl    $0x1,%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<logicalShift>:
mov    %esi,%ecx
sar    %cl,%edi
mov    $0x80000000,%eax
sar    %cl,%eax
add    %eax,%eax
not    %eax
and    %edi,%eax
ret

LLVM IR (-O0):
define i32 @logicalShift(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 = ashr i32 %5, %6
%8 = load i32, i32* %4
%9 = ashr i32 -2147483648, %8
%10 = shl i32 %9, 1
%11 = xor i32 %10, -1
%12 = and i32 %7, %11
ret i32 %12
}

LLVM IR (-O2):
define i32 @logicalShift(i32 %0, i32 %1) {
%3 = ashr i32 %0, %1
%4 = ashr i32 -2147483648, %1
%5 = shl i32 %4, 1
%6 = xor i32 %5, -1
%7 = and i32 %3, %6
ret i32 %7
}
int f4(volatile int *a) {
  int b = a[1];
  int c = a[3];
  int d = a[2];
  int e = a[0];
  return b + c + d + e;
}


x86 assembly (clang, -O0):
<f4>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    0x4(%rax),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    0xc(%rax),%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    0x8(%rax),%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x18(%rbp)
mov    -0xc(%rbp),%eax
add    -0x10(%rbp),%eax
add    -0x14(%rbp),%eax
add    -0x18(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f4>:
mov    0x4(%rdi),%eax
add    0xc(%rdi),%eax
add    0x8(%rdi),%eax
add    (%rdi),%eax
ret

LLVM IR (-O0):
define i32 @f4(i32* %0) {
%2 = alloca i32*
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32* %0, i32** %2
%7 = load i32*, i32** %2
%8 = getelementptr inbounds i32, i32* %7, i64 1
%9 = load volatile i32, i32* %8
store i32 %9, i32* %3
%10 = load i32*, i32** %2
%11 = getelementptr inbounds i32, i32* %10, i64 3
%12 = load volatile i32, i32* %11
store i32 %12, i32* %4
%13 = load i32*, i32** %2
%14 = getelementptr inbounds i32, i32* %13, i64 2
%15 = load volatile i32, i32* %14
store i32 %15, i32* %5
%16 = load i32*, i32** %2
%17 = getelementptr inbounds i32, i32* %16, i64 0
%18 = load volatile i32, i32* %17
store i32 %18, i32* %6
%19 = load i32, i32* %3
%20 = load i32, i32* %4
%21 = add nsw i32 %19, %20
%22 = load i32, i32* %5
%23 = add nsw i32 %21, %22
%24 = load i32, i32* %6
%25 = add nsw i32 %23, %24
ret i32 %25
}

LLVM IR (-O2):
define i32 @f4(i32* %0) {
%2 = getelementptr inbounds i32, i32* %0, i64 1
%3 = load volatile i32, i32* %2
%4 = getelementptr inbounds i32, i32* %0, i64 3
%5 = load volatile i32, i32* %4
%6 = getelementptr inbounds i32, i32* %0, i64 2
%7 = load volatile i32, i32* %6
%8 = load volatile i32, i32* %0
%9 = add nsw i32 %5, %3
%10 = add nsw i32 %9, %7
%11 = add nsw i32 %10, %8
ret i32 %11
}
/* Variables and functions */
int i(int);
int h(int n) { return i(n) + i(n); }


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

x86 assembly (clang, -O2):
<h>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebx
call   1030 <i@plt>
mov    %eax,%ebp
mov    %ebx,%edi
call   1030 <i@plt>
add    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @h(i32 %0) {
%2 = tail call i32 @i(i32 %0)
%3 = tail call i32 @i(i32 %0)
%4 = add nsw i32 %3, %2
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ islower(int);
void t_islower_0x95() {
  Assert_real((islower(149) == 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_islower.c",
              750, ("islower should be 0 for 0x95"));
}


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

x86 assembly (clang, -O2):
<t_islower_0x95>:
push   %rax
mov    $0x95,%edi
call   1030 <islower@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x2ee,%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_islower.c\00"
@.str.1 = [29 x i8] c"islower should be 0 for 0x95\00"
define void @t_islower_0x95() {
%1 = call i64 @islower(i32 149)
%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 750, 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_islower.c\00"
@.str.1 = [29 x i8] c"islower should be 0 for 0x95\00"
define void @t_islower_0x95() {
%1 = tail call i64 @islower(i32 149)
%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 750, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
void EVP_aes_128_cbc(void) {}


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

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

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

LLVM IR (-O2):
define void @EVP_aes_128_cbc() {
ret void
}
void longestConsecutiveMain(void) {
  int nums[] = {100, 4, 200, 1, 3, 2};
  int numsSize = sizeof(nums) / sizeof(nums[0]);
}


x86 assembly (clang, -O0):
<longestConsecutiveMain>:
push   %rbp
mov    %rsp,%rbp
mov    0xef5(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xef2(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0xeef(%rip),%rax
mov    %rax,-0x10(%rbp)
movl   $0x6,-0x24(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
@__const.longestConsecutiveMain.nums = [6 x i32] [i32 100, i32 4, i32 200, i32 1, i32 3, i32 2]
define void @longestConsecutiveMain() {
%1 = alloca [6 x i32]
%2 = alloca i32
%3 = bitcast [6 x i32]* %1 to i8*
store i32 6, i32* %2
ret void
}

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


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @BITBOARD_init()
%2 = tail call i32 (...) @test_position_is_attacked()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void end_one() { printf("end func : [one]\n"); }


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

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

LLVM IR (-O0):
@.str = [18 x i8] c"end func : [one]\0A\00"
define void @end_one() {
%1 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [17 x i8] c"end func : [one]\00"
define void @end_one() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @str, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int uint32_t;
struct timespec {
  scalar_t__ tv_nsec;
  scalar_t__ tv_sec;
};

/* Variables and functions */
uint32_t timespec_to_ms(const struct timespec *tp) {
  return (uint32_t)tp->tv_sec * 1000 + (uint32_t)tp->tv_nsec / 10000000;
}


x86 assembly (clang, -O0):
<timespec_to_ms>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    0x8(%rax),%rax
imul   $0x3e8,%eax,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    $0x989680,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    -0xc(%rbp),%eax
add    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<timespec_to_ms>:
imul   $0x3e8,0x8(%rdi),%ecx
movslq (%rdi),%rax
imul   $0x6b5fca6b,%rax,%rax
mov    %rax,%rdx
shr    $0x3f,%rdx
sar    $0x36,%rax
add    %edx,%eax
add    %ecx,%eax
ret

LLVM IR (-O0):
%struct.timespec = type { i64, i64 }
define i32 @timespec_to_ms(%struct.timespec* %0) {
%2 = alloca %struct.timespec*
store %struct.timespec* %0, %struct.timespec** %2
%3 = load %struct.timespec*, %struct.timespec** %2
%4 = getelementptr inbounds %struct.timespec, %struct.timespec* %3, i32 0, i32 1
%5 = load i64, i64* %4
%6 = trunc i64 %5 to i32
%7 = mul nsw i32 %6, 1000
%8 = load %struct.timespec*, %struct.timespec** %2
%9 = getelementptr inbounds %struct.timespec, %struct.timespec* %8, i32 0, i32 0
%10 = load i64, i64* %9
%11 = trunc i64 %10 to i32
%12 = sdiv i32 %11, 10000000
%13 = add nsw i32 %7, %12
ret i32 %13
}

LLVM IR (-O2):
%struct.timespec = type { i64, i64 }
define i32 @timespec_to_ms(%struct.timespec* nocapture %0) {
%2 = getelementptr inbounds %struct.timespec, %struct.timespec* %0, i64 0, i32 1
%3 = load i64, i64* %2
%4 = trunc i64 %3 to i32
%5 = mul nsw i32 %4, 1000
%6 = getelementptr inbounds %struct.timespec, %struct.timespec* %0, i64 0, i32 0
%7 = load i64, i64* %6
%8 = trunc i64 %7 to i32
%9 = sdiv i32 %8, 10000000
%10 = add nsw i32 %9, %5
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ eI();
void gI() { eI(); }


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

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

LLVM IR (-O0):
define void @gI() {
%1 = call i32 (...) @eI()
ret void
}

LLVM IR (-O2):
define void @gI() {
%1 = tail call i32 (...) @eI()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ ant_log_err_init();
int /*<<< orphan*/ ant_log_url_all_init();
int /*<<< orphan*/ ant_log_url_init();
void ant_log_init() {
  ant_log_url_init();
  ant_log_url_all_init();
  ant_log_err_init();
}


x86 assembly (clang, -O0):
<ant_log_init>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1050 <ant_log_url_init@plt>
mov    $0x0,%al
call   1030 <ant_log_url_all_init@plt>
mov    $0x0,%al
call   1040 <ant_log_err_init@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<ant_log_init>:
push   %rax
xor    %eax,%eax
call   1050 <ant_log_url_init@plt>
xor    %eax,%eax
call   1030 <ant_log_url_all_init@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <ant_log_err_init@plt>

LLVM IR (-O0):
define void @ant_log_init() {
%1 = call i32 (...) @ant_log_url_init()
%2 = call i32 (...) @ant_log_url_all_init()
%3 = call i32 (...) @ant_log_err_init()
ret void
}

LLVM IR (-O2):
define void @ant_log_init() {
%1 = tail call i32 (...) @ant_log_url_init()
%2 = tail call i32 (...) @ant_log_url_all_init()
%3 = tail call i32 (...) @ant_log_err_init()
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fu_Close(int /*<<< orphan*/ *);
char *fu_Fread(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fu_Open(char const *, char *);
char *fu_Read(const char *path) {
  char *buffer;
  FILE *stream = fu_Open(path, "r");
  if (NULL == stream)
    return NULL;
  buffer = fu_Fread(stream);
  fu_Close(stream);
  return buffer;
}


x86 assembly (clang, -O0):
<fu_Read>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xeb9(%rip),%rsi
call   1050 <fu_Open@plt>
mov    %rax,-0x20(%rbp)
xor    %eax,%eax
cmp    -0x20(%rbp),%rax
jne    1169 <fu_Read+0x39>
movq   $0x0,-0x8(%rbp)
jmp    1187 <fu_Read+0x57>
mov    -0x20(%rbp),%rdi
call   1040 <fu_Fread@plt>
mov    %rax,-0x18(%rbp)
mov    -0x20(%rbp),%rdi
call   1030 <fu_Close@plt>
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fu_Read>:
push   %r14
push   %rbx
push   %rax
lea    0xec5(%rip),%rsi
call   1050 <fu_Open@plt>
test   %rax,%rax
je     1160 <fu_Read+0x30>
mov    %rax,%rbx
mov    %rax,%rdi
call   1040 <fu_Fread@plt>
mov    %rax,%r14
mov    %rbx,%rdi
call   1030 <fu_Close@plt>
mov    %r14,%rax
jmp    1162 <fu_Read+0x32>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [2 x i8] c"r\00"
define i8* @fu_Read(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i32*
store i8* %0, i8** %3
%6 = load i8*, i8** %3
%7 = call i32* @fu_Open(i8* %6, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
store i32* %7, i32** %5
%8 = load i32*, i32** %5
%9 = icmp eq i32* null, %8
br i1 %9, label %10, label %11
10: ; preds = %1
store i8* null, i8** %2
br label %17
11: ; preds = %1
%12 = load i32*, i32** %5
%13 = call i8* @fu_Fread(i32* %12)
store i8* %13, i8** %4
%14 = load i32*, i32** %5
%15 = call i32 @fu_Close(i32* %14)
%16 = load i8*, i8** %4
store i8* %16, i8** %2
br label %17
17: ; preds = %11, %10
%18 = load i8*, i8** %2
ret i8* %18
}

LLVM IR (-O2):
@.str = [2 x i8] c"r\00"
define i8* @fu_Read(i8* %0) {
%2 = tail call i32* @fu_Open(i8* %0, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%3 = icmp eq i32* %2, null
br i1 %3, label %7, label %4
4: ; preds = %1
%5 = tail call i8* @fu_Fread(i32* %2)
%6 = tail call i32 @fu_Close(i32* %2)
br label %7
7: ; preds = %1, %4
%8 = phi i8* [ %5, %4 ], [ null, %1 ]
ret i8* %8
}
/* Variables and functions */
int errno;
int /*<<< orphan*/ handle_error_myerrno(int, int, char *);
void handle_error(int return_code, char *msg) {
  if (return_code < 0) {
    int myerrno = errno;
    handle_error_myerrno(return_code, myerrno, msg);
  }
}


x86 assembly (clang, -O0):
<handle_error>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x0,-0x4(%rbp)
jge    1144 <handle_error+0x34>
mov    0x2eb0(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x14(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x14(%rbp),%esi
mov    -0x10(%rbp),%rdx
call   1030 <handle_error_myerrno@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<handle_error>:
test   %edi,%edi
js     1115 <handle_error+0x5>
ret
mov    %rsi,%rdx
mov    0x2ec1(%rip),%rax
mov    (%rax),%esi
jmp    1030 <handle_error_myerrno@plt>

LLVM IR (-O0):
@errno = global i32 0
define void @handle_error(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i32
store i32 %0, i32* %3
store i8* %1, i8** %4
%6 = load i32, i32* %3
%7 = icmp slt i32 %6, 0
br i1 %7, label %8, label %14
8: ; preds = %2
%9 = load i32, i32* @errno
store i32 %9, i32* %5
%10 = load i32, i32* %3
%11 = load i32, i32* %5
%12 = load i8*, i8** %4
%13 = call i32 @handle_error_myerrno(i32 %10, i32 %11, i8* %12)
br label %14
14: ; preds = %8, %2
ret void
}

LLVM IR (-O2):
@errno = global i32 0
define void @handle_error(i32 %0, i8* %1) {
%3 = icmp slt i32 %0, 0
br i1 %3, label %4, label %7
4: ; preds = %2
%5 = load i32, i32* @errno
%6 = tail call i32 @handle_error_myerrno(i32 %0, i32 %5, i8* %1)
br label %7
7: ; preds = %4, %2
ret void
}
char *test_myRand(const char **_ja_name) {
  do {
    *_ja_name = __func__;
    if (!(myRand() == 5))
      return "myRand() == 5";
  } while (0);
  return 0;
}


x86 assembly (clang, -O0):
<test_myRand>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
lea    0xed9(%rip),%rcx
mov    %rcx,(%rax)
mov    $0x0,%al
call   1030 <myRand@plt>
cmp    $0x5,%eax
je     114a <test_myRand+0x3a>
lea    0xecb(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1157 <test_myRand+0x47>
jmp    114f <test_myRand+0x3f>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_myRand>:
push   %rbx
lea    0xee8(%rip),%rax
mov    %rax,(%rdi)
xor    %ebx,%ebx
xor    %eax,%eax
call   1030 <myRand@plt>
cmp    $0x5,%eax
lea    0xede(%rip),%rax
cmovne %rax,%rbx
mov    %rbx,%rax
pop    %rbx
ret

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

LLVM IR (-O2):
@__func__.test_myRand = [12 x i8] c"test_myRand\00"
@.str = [14 x i8] c"myRand() == 5\00"
define i8* @test_myRand(i8** nocapture writeonly %0) {
store i8* getelementptr inbounds ([12 x i8], [12 x i8]* @__func__.test_myRand, i64 0, i64 0), i8** %0
%2 = tail call i32 (...) @myRand()
%3 = icmp eq i32 %2, 5
%4 = select i1 %3, i8* null, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0)
ret i8* %4
}
int memRead32(const unsigned char *p) {
  unsigned int r = 0;
  r |= (unsigned int)(*(p + 0));
  r |= (unsigned int)(*(p + 1)) << 8;
  r |= (unsigned int)(*(p + 2)) << 16;
  r |= (unsigned int)(*(p + 3)) << 24;
  return r;
}


x86 assembly (clang, -O0):
<memRead32>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
or     -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movzbl 0x1(%rax),%eax
shl    $0x8,%eax
or     -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movzbl 0x2(%rax),%eax
shl    $0x10,%eax
or     -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movzbl 0x3(%rax),%eax
shl    $0x18,%eax
or     -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @memRead32(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
store i32 0, i32* %3
%4 = load i8*, i8** %2
%5 = getelementptr inbounds i8, i8* %4, i64 0
%6 = load i8, i8* %5
%7 = zext i8 %6 to i32
%8 = load i32, i32* %3
%9 = or i32 %8, %7
store i32 %9, i32* %3
%10 = load i8*, i8** %2
%11 = getelementptr inbounds i8, i8* %10, i64 1
%12 = load i8, i8* %11
%13 = zext i8 %12 to i32
%14 = shl i32 %13, 8
%15 = load i32, i32* %3
%16 = or i32 %15, %14
store i32 %16, i32* %3
%17 = load i8*, i8** %2
%18 = getelementptr inbounds i8, i8* %17, i64 2
%19 = load i8, i8* %18
%20 = zext i8 %19 to i32
%21 = shl i32 %20, 16
%22 = load i32, i32* %3
%23 = or i32 %22, %21
store i32 %23, i32* %3
%24 = load i8*, i8** %2
%25 = getelementptr inbounds i8, i8* %24, i64 3
%26 = load i8, i8* %25
%27 = zext i8 %26 to i32
%28 = shl i32 %27, 24
%29 = load i32, i32* %3
%30 = or i32 %29, %28
store i32 %30, i32* %3
%31 = load i32, i32* %3
ret i32 %31
}

LLVM IR (-O2):
define i32 @memRead32(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = zext i8 %2 to i32
%4 = getelementptr inbounds i8, i8* %0, i64 1
%5 = load i8, i8* %4
%6 = zext i8 %5 to i32
%7 = shl nuw nsw i32 %6, 8
%8 = or i32 %7, %3
%9 = getelementptr inbounds i8, i8* %0, i64 2
%10 = load i8, i8* %9
%11 = zext i8 %10 to i32
%12 = shl nuw nsw i32 %11, 16
%13 = or i32 %8, %12
%14 = getelementptr inbounds i8, i8* %0, i64 3
%15 = load i8, i8* %14
%16 = zext i8 %15 to i32
%17 = shl nuw i32 %16, 24
%18 = or i32 %13, %17
ret i32 %18
}
void XkbFreeGeometry() {}


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

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

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

LLVM IR (-O2):
define void @XkbFreeGeometry() {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ ASN1_OBJECT;

/* Variables and functions */
int /*<<< orphan*/ ASN1_OBJECT_free(int /*<<< orphan*/ *);
int OBJ_obj2nid(int /*<<< orphan*/ *);
int /*<<< orphan*/ *OBJ_txt2obj(char const *, int /*<<< orphan*/);
int OBJ_txt2nid(const char *s) {
  ASN1_OBJECT *obj;
  int nid;
  obj = OBJ_txt2obj(s, 0);
  nid = OBJ_obj2nid(obj);
  ASN1_OBJECT_free(obj);
  return nid;
}


x86 assembly (clang, -O0):
<OBJ_txt2nid>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
xor    %esi,%esi
call   1030 <OBJ_txt2obj@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <OBJ_obj2nid@plt>
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
call   1050 <ASN1_OBJECT_free@plt>
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<OBJ_txt2nid>:
push   %rbp
push   %rbx
push   %rax
xor    %esi,%esi
call   1030 <OBJ_txt2obj@plt>
mov    %rax,%rbx
mov    %rax,%rdi
call   1040 <OBJ_obj2nid@plt>
mov    %eax,%ebp
mov    %rbx,%rdi
call   1050 <ASN1_OBJECT_free@plt>
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @OBJ_txt2nid(i8* %0) {
%2 = alloca i8*
%3 = alloca i32*
%4 = alloca i32
store i8* %0, i8** %2
%5 = load i8*, i8** %2
%6 = call i32* @OBJ_txt2obj(i8* %5, i32 0)
store i32* %6, i32** %3
%7 = load i32*, i32** %3
%8 = call i32 @OBJ_obj2nid(i32* %7)
store i32 %8, i32* %4
%9 = load i32*, i32** %3
%10 = call i32 @ASN1_OBJECT_free(i32* %9)
%11 = load i32, i32* %4
ret i32 %11
}

LLVM IR (-O2):
define i32 @OBJ_txt2nid(i8* %0) {
%2 = tail call i32* @OBJ_txt2obj(i8* %0, i32 0)
%3 = tail call i32 @OBJ_obj2nid(i32* %2)
%4 = tail call i32 @ASN1_OBJECT_free(i32* %2)
ret i32 %3
}
const char *Resize_Brief(void) { return "Object can be resized"; }


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

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

LLVM IR (-O0):
@.str = [22 x i8] c"Object can be resized\00"
define i8* @Resize_Brief() {
ret i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [22 x i8] c"Object can be resized\00"
define i8* @Resize_Brief() {
ret i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void glp_free(void *ptr) { free(ptr); }


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

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

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

LLVM IR (-O2):
define void @glp_free(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
/* Variables and functions */
float floor(double);
float q2(double a) { return floor(a); }


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

x86 assembly (clang, -O2):
<q2>:
jmp    1030 <floor@plt>

LLVM IR (-O0):
define float @q2(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = call float @floor(double %3)
ret float %4
}

LLVM IR (-O2):
define float @q2(double %0) {
%2 = tail call float @floor(double %0)
ret float %2
}
/* Variables and functions */
int /*<<< orphan*/ output_centroids();
void kmeans_finish() {
  output_centroids();
  return;
}


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

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

LLVM IR (-O0):
define void @kmeans_finish() {
%1 = call i32 (...) @output_centroids()
ret void
}

LLVM IR (-O2):
define void @kmeans_finish() {
%1 = tail call i32 (...) @output_centroids()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ attroff(int);
int /*<<< orphan*/ attron(int);
int /*<<< orphan*/ mvprintw(int, int, char *, int);
int /*<<< orphan*/ refresh();
void displayPosition(int x, int y, int attr) {
  attron(attr);
  mvprintw(y, x, "%lc", L'█');
  attroff(attr);
  refresh();
}


x86 assembly (clang, -O0):
<displayPosition>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0xc(%rbp),%edi
call   1040 <attron@plt>
mov    -0x8(%rbp),%edi
mov    -0x4(%rbp),%esi
lea    0xe9a(%rip),%rdx
mov    $0x2588,%ecx
call   1060 <mvprintw@plt>
mov    -0xc(%rbp),%edi
call   1030 <attroff@plt>
mov    $0x0,%al
call   1050 <refresh@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<displayPosition>:
push   %rbp
push   %r14
push   %rbx
mov    %edx,%ebx
mov    %esi,%ebp
mov    %edi,%r14d
mov    %edx,%edi
call   1040 <attron@plt>
lea    0xea7(%rip),%rdx
mov    %ebp,%edi
mov    %r14d,%esi
mov    $0x2588,%ecx
call   1060 <mvprintw@plt>
mov    %ebx,%edi
call   1030 <attroff@plt>
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %rbp
jmp    1050 <refresh@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"%lc\00"
define void @displayPosition(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i32, i32* %6
%8 = call i32 @attron(i32 %7)
%9 = load i32, i32* %5
%10 = load i32, i32* %4
%11 = call i32 @mvprintw(i32 %9, i32 %10, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 9608)
%12 = load i32, i32* %6
%13 = call i32 @attroff(i32 %12)
%14 = call i32 (...) @refresh()
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"%lc\00"
define void @displayPosition(i32 %0, i32 %1, i32 %2) {
%4 = tail call i32 @attron(i32 %2)
%5 = tail call i32 @mvprintw(i32 %1, i32 %0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 9608)
%6 = tail call i32 @attroff(i32 %2)
%7 = tail call i32 (...) @refresh()
ret void
}
/* Variables and functions */
int get_mdterm();
void md_draw_string_blue(int x, int y, char *str) {
  switch (get_mdterm()) {}
}


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

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

LLVM IR (-O0):
define void @md_draw_string_blue(i32 %0, i32 %1, i8* %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i8*
store i32 %0, i32* %4
store i32 %1, i32* %5
store i8* %2, i8** %6
%7 = call i32 (...) @get_mdterm()
switch i32 %7, label %8 [
]
8: ; preds = %3
ret void
}

LLVM IR (-O2):
define void @md_draw_string_blue(i32 %0, i32 %1, i8* nocapture readnone %2) {
%4 = tail call i32 (...) @get_mdterm()
ret void
}
/* Variables and functions */
uintptr_t coroutine_yield64(void *, uintptr_t);
uintptr_t subtask(void *self, uintptr_t data) {
  data = coroutine_yield64(self, data);
  data = coroutine_yield64(self, data);
  data = coroutine_yield64(self, data);
  data = coroutine_yield64(self, data);
  return data;
}


x86 assembly (clang, -O0):
<subtask>:
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 <coroutine_yield64@plt>
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <coroutine_yield64@plt>
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <coroutine_yield64@plt>
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <coroutine_yield64@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<subtask>:
push   %rbx
mov    %rdi,%rbx
call   1030 <coroutine_yield64@plt>
mov    %rbx,%rdi
mov    %rax,%rsi
call   1030 <coroutine_yield64@plt>
mov    %rbx,%rdi
mov    %rax,%rsi
call   1030 <coroutine_yield64@plt>
mov    %rbx,%rdi
mov    %rax,%rsi
pop    %rbx
jmp    1030 <coroutine_yield64@plt>

LLVM IR (-O0):
define i64 @subtask(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 i64 @coroutine_yield64(i8* %5, i64 %6)
store i64 %7, i64* %4
%8 = load i8*, i8** %3
%9 = load i64, i64* %4
%10 = call i64 @coroutine_yield64(i8* %8, i64 %9)
store i64 %10, i64* %4
%11 = load i8*, i8** %3
%12 = load i64, i64* %4
%13 = call i64 @coroutine_yield64(i8* %11, i64 %12)
store i64 %13, i64* %4
%14 = load i8*, i8** %3
%15 = load i64, i64* %4
%16 = call i64 @coroutine_yield64(i8* %14, i64 %15)
store i64 %16, i64* %4
%17 = load i64, i64* %4
ret i64 %17
}

LLVM IR (-O2):
define i64 @subtask(i8* %0, i64 %1) {
%3 = tail call i64 @coroutine_yield64(i8* %0, i64 %1)
%4 = tail call i64 @coroutine_yield64(i8* %0, i64 %3)
%5 = tail call i64 @coroutine_yield64(i8* %0, i64 %4)
%6 = tail call i64 @coroutine_yield64(i8* %0, i64 %5)
ret i64 %6
}
/* Variables and functions */
double exp(double);
double pow(double, int);
double qO2(double O2) {
  if (O2 == 140)
    return 47;
  double p = pow(O2 + -106, 2);
  return 100.8 * exp(p / -3745);
}


x86 assembly (clang, -O0):
<qO2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  0xec6(%rip),%xmm1
ucomisd %xmm1,%xmm0
jne    115c <qO2+0x3c>
jp     115c <qO2+0x3c>
movsd  0xece(%rip),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    11a2 <qO2+0x82>
movsd  0xeb4(%rip),%xmm0
addsd  -0x10(%rbp),%xmm0
mov    $0x2,%edi
call   1040 <pow@plt>
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  0xe8b(%rip),%xmm1
divsd  %xmm1,%xmm0
call   1030 <exp@plt>
movaps %xmm0,%xmm1
movsd  0xe6f(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<qO2>:
push   %rax
ucomisd 0xedf(%rip),%xmm0
jne    1137 <qO2+0x17>
jp     1137 <qO2+0x17>
movsd  0xecb(%rip),%xmm0
pop    %rax
ret
addsd  0xed1(%rip),%xmm0
mov    $0x2,%edi
call   1040 <pow@plt>
divsd  0xec7(%rip),%xmm0
call   1030 <exp@plt>
mulsd  0xec2(%rip),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @qO2(double %0) {
%2 = alloca double
%3 = alloca double
%4 = alloca double
store double %0, double* %3
%5 = load double, double* %3
%6 = fcmp oeq double %5, 1.400000e+02
br i1 %6, label %7, label %8
7: ; preds = %1
store double 4.700000e+01, double* %2
br label %16
8: ; preds = %1
%9 = load double, double* %3
%10 = fadd double %9, -1.060000e+02
%11 = call double @pow(double %10, i32 2)
store double %11, double* %4
%12 = load double, double* %4
%13 = fdiv double %12, -3.745000e+03
%14 = call double @exp(double %13)
%15 = fmul double 1.008000e+02, %14
store double %15, double* %2
br label %16
16: ; preds = %8, %7
%17 = load double, double* %2
ret double %17
}

LLVM IR (-O2):
define double @qO2(double %0) {
%2 = fcmp oeq double %0, 1.400000e+02
br i1 %2, label %9, label %3
3: ; preds = %1
%4 = fadd double %0, -1.060000e+02
%5 = tail call double @pow(double %4, i32 2)
%6 = fdiv double %5, -3.745000e+03
%7 = tail call double @exp(double %6)
%8 = fmul double %7, 1.008000e+02
br label %9
9: ; preds = %1, %3
%10 = phi double [ %8, %3 ], [ 4.700000e+01, %1 ]
ret double %10
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
char *xfread_name(int /*<<< orphan*/ *, char *, int);
char *xfread_string(FILE *fp, char *filename) {
  return xfread_name(fp, filename, 1);
}


x86 assembly (clang, -O0):
<xfread_string>:
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    $0x1,%edx
call   1030 <xfread_name@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xfread_string>:
mov    $0x1,%edx
jmp    1030 <xfread_name@plt>

LLVM IR (-O0):
define i8* @xfread_string(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 i8* @xfread_name(i32* %5, i8* %6, i32 1)
ret i8* %7
}

LLVM IR (-O2):
define i8* @xfread_string(i32* %0, i8* %1) {
%3 = tail call i8* @xfread_name(i32* %0, i8* %1, i32 1)
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ printLine1(char *);
int /*<<< orphan*/ sprintf(char *, char *, char const *, char const *,
                           char const *);
void printLine3(const char *begin, const char *content, const char *end) {
  char buffer[148] = "";
  sprintf(buffer, "               %s%s%s ", begin, content, end);
  printLine1(buffer);
}


x86 assembly (clang, -O0):
<printLine3>:
push   %rbp
mov    %rsp,%rbp
sub    $0xb0,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
lea    -0xb0(%rbp),%rdi
xor    %esi,%esi
mov    $0x94,%edx
call   1030 <memset@plt>
lea    -0xb0(%rbp),%rdi
mov    -0x8(%rbp),%rdx
mov    -0x10(%rbp),%rcx
mov    -0x18(%rbp),%r8
lea    0xe8c(%rip),%rsi
call   1050 <sprintf@plt>
lea    -0xb0(%rbp),%rdi
call   1040 <printLine1@plt>
add    $0xb0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printLine3>:
push   %rbx
sub    $0xa0,%rsp
mov    %rdx,%r8
mov    %rsi,%rcx
mov    %rdi,%rdx
xorps  %xmm0,%xmm0
movaps %xmm0,0x80(%rsp)
movaps %xmm0,0x70(%rsp)
movaps %xmm0,0x60(%rsp)
movaps %xmm0,0x50(%rsp)
movaps %xmm0,0x40(%rsp)
movaps %xmm0,0x30(%rsp)
movaps %xmm0,0x20(%rsp)
movaps %xmm0,0x10(%rsp)
movaps %xmm0,(%rsp)
movl   $0x0,0x90(%rsp)
lea    0xe8b(%rip),%rsi
mov    %rsp,%rbx
mov    %rbx,%rdi
call   1040 <sprintf@plt>
mov    %rbx,%rdi
call   1030 <printLine1@plt>
add    $0xa0,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [23 x i8] c" %s%s%s \00"
define void @printLine3(i8* %0, i8* %1, i8* %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca [148 x i8]
store i8* %0, i8** %4
store i8* %1, i8** %5
store i8* %2, i8** %6
%8 = bitcast [148 x i8]* %7 to i8*
%9 = getelementptr inbounds [148 x i8], [148 x i8]* %7, i64 0, i64 0
%10 = load i8*, i8** %4
%11 = load i8*, i8** %5
%12 = load i8*, i8** %6
%13 = call i32 @sprintf(i8* %9, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i8* %10, i8* %11, i8* %12)
%14 = getelementptr inbounds [148 x i8], [148 x i8]* %7, i64 0, i64 0
%15 = call i32 @printLine1(i8* %14)
ret void
}

LLVM IR (-O2):
@.str = [23 x i8] c" %s%s%s \00"
define void @printLine3(i8* %0, i8* %1, i8* %2) {
%4 = alloca [148 x i8]
%5 = getelementptr inbounds [148 x i8], [148 x i8]* %4, i64 0, i64 0
%6 = call i32 @sprintf(i8* %5, i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %1, i8* %2)
%7 = call i32 @printLine1(i8* %5)
ret void
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
void UARTFlowControlSet(uint32_t ui32Base, uint32_t ui32Mode) {
  ;
  ;
  (*((volatile uint32_t *)(ui32Base + 0x00000030))) =
      (((*((volatile uint32_t *)(ui32Base + 0x00000030))) &
        ~(0x00008000 | 0x00004000)) |
       ui32Mode);
}


x86 assembly (clang, -O0):
<UARTFlowControlSet>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%eax
cltq
mov    (%rax),%ecx
and    $0xffff3fff,%ecx
or     -0x8(%rbp),%ecx
mov    -0x4(%rbp),%eax
add    $0x30,%eax
cltq
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<UARTFlowControlSet>:
movslq %edi,%rax
mov    $0xffff3fff,%ecx
and    0x30(%rax),%ecx
or     %esi,%ecx
mov    %ecx,0x30(%rax)
ret

LLVM IR (-O0):
define void @UARTFlowControlSet(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 = add nsw i32 %5, 48
%7 = sext i32 %6 to i64
%8 = inttoptr i64 %7 to i32*
%9 = load volatile i32, i32* %8
%10 = and i32 %9, -49153
%11 = load i32, i32* %4
%12 = or i32 %10, %11
%13 = load i32, i32* %3
%14 = add nsw i32 %13, 48
%15 = sext i32 %14 to i64
%16 = inttoptr i64 %15 to i32*
store volatile i32 %12, i32* %16
ret void
}

LLVM IR (-O2):
define void @UARTFlowControlSet(i32 %0, i32 %1) {
%3 = add nsw i32 %0, 48
%4 = sext i32 %3 to i64
%5 = inttoptr i64 %4 to i32*
%6 = load volatile i32, i32* %5
%7 = and i32 %6, -49153
%8 = or i32 %7, %1
store volatile i32 %8, i32* %5
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
void Act_Abort(void) { exit(0); }


x86 assembly (clang, -O0):
<Act_Abort>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
call   1030 <exit@plt>

x86 assembly (clang, -O2):
<Act_Abort>:
push   %rax
xor    %edi,%edi
call   1030 <exit@plt>

LLVM IR (-O0):
define void @Act_Abort() {
%1 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
define void @Act_Abort() {
%1 = tail call i32 @exit(i32 0)
unreachable
}
/* Variables and functions */
int f28(int *);
int f29(int *p) { return f28(p); }


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

x86 assembly (clang, -O2):
<f29>:
jmp    1030 <f28@plt>

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

LLVM IR (-O2):
define i32 @f29(i32* %0) {
%2 = tail call i32 @f28(i32* %0)
ret i32 %2
}
void doubler(int *xp) { *xp = *xp * 2; }


x86 assembly (clang, -O0):
<doubler>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%ecx
shl    $0x1,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<doubler>:
shll   (%rdi)
ret

LLVM IR (-O0):
define void @doubler(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = load i32, i32* %3
%5 = mul nsw i32 %4, 2
%6 = load i32*, i32** %2
store i32 %5, i32* %6
ret void
}

LLVM IR (-O2):
define void @doubler(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = shl nsw i32 %2, 1
store i32 %3, i32* %0
ret void
}
int mDBi_msg_i(msg, n)
char *msg;
unsigned long n;
{
  char str[16];
  sprintf(str, "\t%ld", n);
  strcat(msg, str);
}


x86 assembly (clang, -O0):
<mDBi_msg_i>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
lea    -0x30(%rbp),%rdi
mov    -0x18(%rbp),%rdx
lea    0xec1(%rip),%rsi
mov    $0x0,%al
call   1040 <sprintf@plt>
mov    -0x10(%rbp),%rdi
lea    -0x30(%rbp),%rsi
call   1030 <strcat@plt>
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mDBi_msg_i>:
push   %r14
push   %rbx
sub    $0x18,%rsp
mov    %rsi,%rdx
mov    %rdi,%rbx
lea    0xecc(%rip),%rsi
mov    %rsp,%r14
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <sprintf@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1030 <strcat@plt>
add    $0x18,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [5 x i8] c"\09%ld\00"
define i32 @mDBi_msg_i(i8* %0, i64 %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i64
%6 = alloca [16 x i8]
store i8* %0, i8** %4
store i64 %1, i64* %5
%7 = getelementptr inbounds [16 x i8], [16 x i8]* %6, i64 0, i64 0
%8 = load i64, i64* %5
%9 = call i32 (i8*, i8*, ...) @sprintf(i8* %7, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i64 %8)
%10 = load i8*, i8** %4
%11 = getelementptr inbounds [16 x i8], [16 x i8]* %6, i64 0, i64 0
%12 = call i8* @strcat(i8* %10, i8* %11)
%13 = load i32, i32* %3
ret i32 %13
}

LLVM IR (-O2):
@.str = [5 x i8] c"\09%ld\00"
define i32 @mDBi_msg_i(i8* %0, i64 %1) {
%3 = alloca [16 x i8]
%4 = getelementptr inbounds [16 x i8], [16 x i8]* %3, i64 0, i64 0
%5 = call i32 (i8*, i8*, ...) @sprintf(i8* %4, i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i64 %1)
%6 = call i8* @strcat(i8* dereferenceable(1) %0, i8* %4)
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ xmlSAX2StartDocument(void *);
void startDocument(void *ctx) { xmlSAX2StartDocument(ctx); }


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

x86 assembly (clang, -O2):
<startDocument>:
jmp    1030 <xmlSAX2StartDocument@plt>

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

LLVM IR (-O2):
define void @startDocument(i8* %0) {
%2 = tail call i32 @xmlSAX2StartDocument(i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fillTransmitPacketBufferAndTransmit();
void ep1TransmitCallback(void) { fillTransmitPacketBufferAndTransmit(); }


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

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

LLVM IR (-O0):
define void @ep1TransmitCallback() {
%1 = call i32 (...) @fillTransmitPacketBufferAndTransmit()
ret void
}

LLVM IR (-O2):
define void @ep1TransmitCallback() {
%1 = tail call i32 (...) @fillTransmitPacketBufferAndTransmit()
ret void
}
int test_fiveeighths(int x) {
  long long llx = (long long)x;
  long long val = 5 * llx / 8;
  return (int)val;
}


x86 assembly (clang, -O0):
<test_fiveeighths>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movslq -0x4(%rbp),%rax
mov    %rax,-0x10(%rbp)
imul   $0x5,-0x10(%rbp),%rax
mov    $0x8,%ecx
cqto
idiv   %rcx
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_fiveeighths>:
movslq %edi,%rax
lea    (%rax,%rax,4),%rcx
lea    (%rax,%rax,4),%rax
add    $0x7,%rax
test   %rcx,%rcx
cmovns %rcx,%rax
shr    $0x3,%rax
ret

LLVM IR (-O0):
define i32 @test_fiveeighths(i32 %0) {
%2 = alloca i32
%3 = alloca i64
%4 = alloca i64
store i32 %0, i32* %2
%5 = load i32, i32* %2
%6 = sext i32 %5 to i64
store i64 %6, i64* %3
%7 = load i64, i64* %3
%8 = mul nsw i64 5, %7
%9 = sdiv i64 %8, 8
store i64 %9, i64* %4
%10 = load i64, i64* %4
%11 = trunc i64 %10 to i32
ret i32 %11
}

LLVM IR (-O2):
define i32 @test_fiveeighths(i32 %0) {
%2 = sext i32 %0 to i64
%3 = mul nsw i64 %2, 5
%4 = sdiv i64 %3, 8
%5 = trunc i64 %4 to i32
ret i32 %5
}