xunge/DecIR huggingface dataset:
void DMA_ERR_IRQHandler(void) {
  while (1) {
  }
}


x86 assembly (clang, -O0):
<DMA_ERR_IRQHandler>:
push   %rbp
mov    %rsp,%rbp
jmp    1109 <DMA_ERR_IRQHandler+0x9>
jmp    1109 <DMA_ERR_IRQHandler+0x9>

x86 assembly (clang, -O2):
<DMA_ERR_IRQHandler>:
jmp    1100 <DMA_ERR_IRQHandler>

LLVM IR (-O0):
define void @DMA_ERR_IRQHandler() {
br label %1
1: ; preds = %0, %1
br label %1
}

LLVM IR (-O2):
define void @DMA_ERR_IRQHandler() {
br label %1
1: ; preds = %0, %1
br label %1
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isdigit(int);
void t_isdigit_0xb0() {
  Assert_real((isdigit(176) == 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_isdigit.c",
              885, ("isdigit should be 0 for 0xb0"));
}


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

x86 assembly (clang, -O2):
<t_isdigit_0xb0>:
push   %rax
mov    $0xb0,%edi
call   1030 <isdigit@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x375,%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_isdigit.c\00"
@.str.1 = [29 x i8] c"isdigit should be 0 for 0xb0\00"
define void @t_isdigit_0xb0() {
%1 = call i64 @isdigit(i32 176)
%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 885, 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_isdigit.c\00"
@.str.1 = [29 x i8] c"isdigit should be 0 for 0xb0\00"
define void @t_isdigit_0xb0() {
%1 = tail call i64 @isdigit(i32 176)
%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 885, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int getWidth();
int getCoord(int h, int w) { return h * getWidth() + w; }


x86 assembly (clang, -O0):
<getCoord>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    $0x0,%al
call   1030 <getWidth@plt>
mov    %eax,%ecx
mov    -0xc(%rbp),%eax
imul   %ecx,%eax
add    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @getCoord(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 = call i32 (...) @getWidth()
%7 = mul nsw i32 %5, %6
%8 = load i32, i32* %4
%9 = add nsw i32 %7, %8
ret i32 %9
}

LLVM IR (-O2):
define i32 @getCoord(i32 %0, i32 %1) {
%3 = tail call i32 (...) @getWidth()
%4 = mul nsw i32 %3, %0
%5 = add nsw i32 %4, %1
ret i32 %5
}
void hypre_BigSwapLoc(int *v, int *w, int i, int j) {
  int big_temp;
  big_temp = v[i];
  v[i] = v[j];
  v[j] = big_temp;
  w[i] = j;
  w[j] = i;
}


x86 assembly (clang, -O0):
<hypre_BigSwapLoc>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %ecx,-0x18(%rbp)
mov    -0x8(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x8(%rbp),%rax
movslq -0x18(%rbp),%rcx
mov    (%rax,%rcx,4),%edx
mov    -0x8(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x1c(%rbp),%edx
mov    -0x8(%rbp),%rax
movslq -0x18(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x18(%rbp),%edx
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x14(%rbp),%edx
mov    -0x10(%rbp),%rax
movslq -0x18(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
pop    %rbp
ret

x86 assembly (clang, -O2):
<hypre_BigSwapLoc>:
movslq %edx,%rax
mov    (%rdi,%rax,4),%r8d
movslq %ecx,%rcx
mov    (%rdi,%rcx,4),%edx
mov    %edx,(%rdi,%rax,4)
mov    %r8d,(%rdi,%rcx,4)
mov    %ecx,(%rsi,%rax,4)
mov    %eax,(%rsi,%rcx,4)
ret

LLVM IR (-O0):
define void @hypre_BigSwapLoc(i32* %0, i32* %1, i32 %2, i32 %3) {
%5 = alloca i32*
%6 = alloca i32*
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
store i32* %0, i32** %5
store i32* %1, i32** %6
store i32 %2, i32* %7
store i32 %3, i32* %8
%10 = load i32*, i32** %5
%11 = load i32, i32* %7
%12 = sext i32 %11 to i64
%13 = getelementptr inbounds i32, i32* %10, i64 %12
%14 = load i32, i32* %13
store i32 %14, i32* %9
%15 = load i32*, i32** %5
%16 = load i32, i32* %8
%17 = sext i32 %16 to i64
%18 = getelementptr inbounds i32, i32* %15, i64 %17
%19 = load i32, i32* %18
%20 = load i32*, i32** %5
%21 = load i32, i32* %7
%22 = sext i32 %21 to i64
%23 = getelementptr inbounds i32, i32* %20, i64 %22
store i32 %19, i32* %23
%24 = load i32, i32* %9
%25 = load i32*, i32** %5
%26 = load i32, i32* %8
%27 = sext i32 %26 to i64
%28 = getelementptr inbounds i32, i32* %25, i64 %27
store i32 %24, i32* %28
%29 = load i32, i32* %8
%30 = load i32*, i32** %6
%31 = load i32, i32* %7
%32 = sext i32 %31 to i64
%33 = getelementptr inbounds i32, i32* %30, i64 %32
store i32 %29, i32* %33
%34 = load i32, i32* %7
%35 = load i32*, i32** %6
%36 = load i32, i32* %8
%37 = sext i32 %36 to i64
%38 = getelementptr inbounds i32, i32* %35, i64 %37
store i32 %34, i32* %38
ret void
}

LLVM IR (-O2):
define void @hypre_BigSwapLoc(i32* nocapture %0, i32* nocapture writeonly %1, i32 %2, i32 %3) {
%5 = sext i32 %2 to i64
%6 = getelementptr inbounds i32, i32* %0, i64 %5
%7 = load i32, i32* %6
%8 = sext i32 %3 to i64
%9 = getelementptr inbounds i32, i32* %0, i64 %8
%10 = load i32, i32* %9
store i32 %10, i32* %6
store i32 %7, i32* %9
%11 = getelementptr inbounds i32, i32* %1, i64 %5
store i32 %3, i32* %11
%12 = getelementptr inbounds i32, i32* %1, i64 %8
store i32 %2, i32* %12
ret void
}
/* Variables and functions */
int /*<<< orphan*/ port_byte_out(int, int);
void timer_phase(int hz) {
  int divisor = 1193180 / hz;
  port_byte_out(0x43, 0x36);
  port_byte_out(0x40, divisor & 0xFF);
  port_byte_out(0x40, divisor >> 8);
}


x86 assembly (clang, -O0):
<timer_phase>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x1234dc,%eax
cltd
idivl  -0x4(%rbp)
mov    %eax,-0x8(%rbp)
mov    $0x43,%edi
mov    $0x36,%esi
call   1030 <port_byte_out@plt>
mov    -0x8(%rbp),%esi
and    $0xff,%esi
mov    $0x40,%edi
call   1030 <port_byte_out@plt>
mov    -0x8(%rbp),%esi
sar    $0x8,%esi
mov    $0x40,%edi
call   1030 <port_byte_out@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<timer_phase>:
push   %rbx
mov    $0x1234dc,%eax
xor    %edx,%edx
idiv   %edi
mov    %eax,%ebx
mov    $0x43,%edi
mov    $0x36,%esi
call   1030 <port_byte_out@plt>
movzbl %bl,%esi
mov    $0x40,%edi
call   1030 <port_byte_out@plt>
sar    $0x8,%ebx
mov    $0x40,%edi
mov    %ebx,%esi
pop    %rbx
jmp    1030 <port_byte_out@plt>

LLVM IR (-O0):
define void @timer_phase(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = sdiv i32 1193180, %4
store i32 %5, i32* %3
%6 = call i32 @port_byte_out(i32 67, i32 54)
%7 = load i32, i32* %3
%8 = and i32 %7, 255
%9 = call i32 @port_byte_out(i32 64, i32 %8)
%10 = load i32, i32* %3
%11 = ashr i32 %10, 8
%12 = call i32 @port_byte_out(i32 64, i32 %11)
ret void
}

LLVM IR (-O2):
define void @timer_phase(i32 %0) {
%2 = sdiv i32 1193180, %0
%3 = tail call i32 @port_byte_out(i32 67, i32 54)
%4 = and i32 %2, 255
%5 = tail call i32 @port_byte_out(i32 64, i32 %4)
%6 = ashr i32 %2, 8
%7 = tail call i32 @port_byte_out(i32 64, i32 %6)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ send_message(char *);
void test_failed(char *message) {
  send_message(message);
  exit(1);
}


x86 assembly (clang, -O0):
<test_failed>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <send_message@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<test_failed>:
push   %rax
call   1030 <send_message@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
define void @test_failed(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @send_message(i8* %3)
%5 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
define void @test_failed(i8* %0) {
%2 = tail call i32 @send_message(i8* %0)
%3 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isalnum(int);
void t_isalnum_0xf5() {
  Assert_real((isalnum(245) == 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_isalnum.c",
              1230, ("isalnum should be 0 for 0xf5"));
}


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

x86 assembly (clang, -O2):
<t_isalnum_0xf5>:
push   %rax
mov    $0xf5,%edi
call   1030 <isalnum@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x4ce,%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_isalnum.c\00"
@.str.1 = [29 x i8] c"isalnum should be 0 for 0xf5\00"
define void @t_isalnum_0xf5() {
%1 = call i64 @isalnum(i32 245)
%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 1230, 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_isalnum.c\00"
@.str.1 = [29 x i8] c"isalnum should be 0 for 0xf5\00"
define void @t_isalnum_0xf5() {
%1 = tail call i64 @isalnum(i32 245)
%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 1230, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int uint32_t;

/* Variables and functions */
int /*<<< orphan*/ _SC_PAGESIZE;
int /*<<< orphan*/ munmap(int /*<<< orphan*/ *, int);
size_t sysconf(int /*<<< orphan*/);
void helper_unmmap(uint8_t *addr, size_t length) {
  uint32_t page_offset = (size_t)addr % sysconf(_SC_PAGESIZE);
  munmap(addr - page_offset, length + page_offset);
}


x86 assembly (clang, -O0):
<helper_unmmap>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    0x2ea9(%rip),%rax
mov    (%rax),%edi
call   1040 <sysconf@plt>
mov    %rax,%rcx
mov    -0x20(%rbp),%rax
xor    %edx,%edx
div    %rcx
mov    %edx,%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
movslq -0x14(%rbp),%rcx
xor    %eax,%eax
sub    %rcx,%rax
shl    $0x2,%rax
add    %rax,%rdi
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
add    %rcx,%rax
mov    %eax,%esi
call   1030 <munmap@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<helper_unmmap>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
mov    0x2eb7(%rip),%rax
mov    (%rax),%edi
call   1040 <sysconf@plt>
mov    %rax,%rcx
or     %rbx,%rax
shr    $0x20,%rax
je     114e <helper_unmmap+0x2e>
mov    %rbx,%rax
xor    %edx,%edx
div    %rcx
jmp    1154 <helper_unmmap+0x34>
mov    %ebx,%eax
xor    %edx,%edx
div    %ecx
movslq %edx,%rsi
lea    0x0(,%rsi,4),%rax
sub    %rax,%rbx
add    %r14d,%esi
mov    %rbx,%rdi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <munmap@plt>

LLVM IR (-O0):
@_SC_PAGESIZE = global i32 0
define void @helper_unmmap(i32* %0, i64 %1) {
%3 = alloca i32*
%4 = alloca i64
%5 = alloca i32
store i32* %0, i32** %3
store i64 %1, i64* %4
%6 = load i32*, i32** %3
%7 = ptrtoint i32* %6 to i64
%8 = load i32, i32* @_SC_PAGESIZE
%9 = call i64 @sysconf(i32 %8)
%10 = urem i64 %7, %9
%11 = trunc i64 %10 to i32
store i32 %11, i32* %5
%12 = load i32*, i32** %3
%13 = load i32, i32* %5
%14 = sext i32 %13 to i64
%15 = sub i64 0, %14
%16 = getelementptr inbounds i32, i32* %12, i64 %15
%17 = load i64, i64* %4
%18 = load i32, i32* %5
%19 = sext i32 %18 to i64
%20 = add i64 %17, %19
%21 = trunc i64 %20 to i32
%22 = call i32 @munmap(i32* %16, i32 %21)
ret void
}

LLVM IR (-O2):
@_SC_PAGESIZE = global i32 0
define void @helper_unmmap(i32* %0, i64 %1) {
%3 = ptrtoint i32* %0 to i64
%4 = load i32, i32* @_SC_PAGESIZE
%5 = tail call i64 @sysconf(i32 %4)
%6 = urem i64 %3, %5
%7 = shl i64 %6, 32
%8 = ashr exact i64 %7, 32
%9 = sub nsw i64 0, %8
%10 = getelementptr inbounds i32, i32* %0, i64 %9
%11 = add i64 %6, %1
%12 = trunc i64 %11 to i32
%13 = tail call i32 @munmap(i32* %10, i32 %12)
ret void
}
int kobject_register(struct kobject *x) {
  int a;
  return a;
}


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

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

LLVM IR (-O0):
%struct.kobject = type opaque
define i32 @kobject_register(%struct.kobject* %0) {
%2 = alloca %struct.kobject*
%3 = alloca i32
store %struct.kobject* %0, %struct.kobject** %2
%4 = load i32, i32* %3
ret i32 %4
}

LLVM IR (-O2):
%struct.kobject = type opaque
define i32 @kobject_register(%struct.kobject* nocapture readnone %0) {
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ hello();
int /*<<< orphan*/ world();
int main(void) {
  hello();
  world();
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @hello()
%2 = tail call i32 (...) @world()
ret i32 0
}
int sprintf(char *str, const char *format, ...) {}


x86 assembly (clang, -O0):
<sprintf>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @sprintf(i8* %0, i8* %1, ...) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i8*
store i8* %0, i8** %4
store i8* %1, i8** %5
%6 = load i32, i32* %3
ret i32 %6
}

LLVM IR (-O2):
define i32 @sprintf(i8* nocapture readnone %0, i8* nocapture readnone %1, ...) {
ret i32 undef
}
void foo764() {}


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

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

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

LLVM IR (-O2):
define void @foo764() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ lowered_privilege_function(char *);
int main(int argc, char *argv[]) {
  if (argc > 1)
    lowered_privilege_function(argv[1]);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x1,-0x8(%rbp)
jle    113d <main+0x2d>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1030 <lowered_privilege_function@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
cmp    $0x2,%edi
jl     1123 <main+0x13>
push   %rax
mov    0x8(%rsi),%rdi
call   1030 <lowered_privilege_function@plt>
add    $0x8,%rsp
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp sgt i32 %0, 1
br i1 %3, label %4, label %8
4: ; preds = %2
%5 = getelementptr inbounds i8*, i8** %1, i64 1
%6 = load i8*, i8** %5
%7 = tail call i32 @lowered_privilege_function(i8* %6)
br label %8
8: ; preds = %4, %2
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ f(int, int, int, int);
int g(int x, int y, int z) {
  f(100, x, y, z);
  return -1;
}


x86 assembly (clang, -O0):
<g>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
mov    -0xc(%rbp),%ecx
mov    $0x64,%edi
call   1030 <f@plt>
mov    $0xffffffff,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<g>:
push   %rax
mov    %edx,%ecx
mov    %esi,%edx
mov    %edi,%esi
mov    $0x64,%edi
call   1030 <f@plt>
mov    $0xffffffff,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @g(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* %4
%8 = load i32, i32* %5
%9 = load i32, i32* %6
%10 = call i32 @f(i32 100, i32 %7, i32 %8, i32 %9)
ret i32 -1
}

LLVM IR (-O2):
define i32 @g(i32 %0, i32 %1, i32 %2) {
%4 = tail call i32 @f(i32 100, i32 %0, i32 %1, i32 %2)
ret i32 -1
}
/* Variables and functions */
char getch();
int /*<<< orphan*/ printf(char *, char);
int main(int argc, char *argv[]) {
  char n;
  for (;;) {
    n = getch();
    printf("%d\n", n);
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1040 <getch@plt>
mov    %al,-0x11(%rbp)
lea    0xeb9(%rip),%rdi
movsbl -0x11(%rbp),%esi
call   1030 <printf@plt>
jmp    1136 <main+0x16>

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xed8(%rip),%rbx
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1040 <getch@plt>
movsbl %al,%esi
mov    %rbx,%rdi
call   1030 <printf@plt>
jmp    1130 <main+0x10>

LLVM IR (-O0):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i8
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
br label %7
7: ; preds = %7, %2
%8 = call signext i8 (...) @getch()
store i8 %8, i8* %6
%9 = load i8, i8* %6
%10 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8 signext %9)
br label %7
}

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
br label %3
3: ; preds = %3, %2
%4 = tail call signext i8 (...) @getch()
%5 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8 signext %4)
br label %3
}
int get_default_proc_prio(void) { return -20; }


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

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

LLVM IR (-O0):
define i32 @get_default_proc_prio() {
ret i32 -20
}

LLVM IR (-O2):
define i32 @get_default_proc_prio() {
ret i32 -20
}
/* Variables and functions */
int _nx_round_up_to_multiple(int, int);
int _nx_upper_power_of_two(int);
int _nx_extend_capacity(int size) {
  if (size < 20)
    return _nx_round_up_to_multiple(size, 4);
  if (size < 4084)
    return _nx_upper_power_of_two(size);
  return _nx_round_up_to_multiple(size, 4096);
}


x86 assembly (clang, -O0):
<_nx_extend_capacity>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
cmpl   $0x14,-0x8(%rbp)
jge    114a <_nx_extend_capacity+0x2a>
mov    -0x8(%rbp),%edi
mov    $0x4,%esi
call   1040 <_nx_round_up_to_multiple@plt>
mov    %eax,-0x4(%rbp)
jmp    1177 <_nx_extend_capacity+0x57>
cmpl   $0xff4,-0x8(%rbp)
jge    1167 <_nx_extend_capacity+0x47>
mov    -0x8(%rbp),%edi
call   1030 <_nx_upper_power_of_two@plt>
mov    %eax,-0x4(%rbp)
jmp    1177 <_nx_extend_capacity+0x57>
mov    -0x8(%rbp),%edi
mov    $0x1000,%esi
call   1040 <_nx_round_up_to_multiple@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_nx_extend_capacity>:
cmp    $0x13,%edi
jg     112f <_nx_extend_capacity+0xf>
mov    $0x4,%esi
jmp    1040 <_nx_round_up_to_multiple@plt>
cmp    $0xff3,%edi
ja     113c <_nx_extend_capacity+0x1c>
jmp    1030 <_nx_upper_power_of_two@plt>
mov    $0x1000,%esi
jmp    1040 <_nx_round_up_to_multiple@plt>

LLVM IR (-O0):
define i32 @_nx_extend_capacity(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp slt i32 %4, 20
br i1 %5, label %6, label %9
6: ; preds = %1
%7 = load i32, i32* %3
%8 = call i32 @_nx_round_up_to_multiple(i32 %7, i32 4)
store i32 %8, i32* %2
br label %18
9: ; preds = %1
%10 = load i32, i32* %3
%11 = icmp slt i32 %10, 4084
br i1 %11, label %12, label %15
12: ; preds = %9
%13 = load i32, i32* %3
%14 = call i32 @_nx_upper_power_of_two(i32 %13)
store i32 %14, i32* %2
br label %18
15: ; preds = %9
%16 = load i32, i32* %3
%17 = call i32 @_nx_round_up_to_multiple(i32 %16, i32 4096)
store i32 %17, i32* %2
br label %18
18: ; preds = %15, %12, %6
%19 = load i32, i32* %2
ret i32 %19
}

LLVM IR (-O2):
define i32 @_nx_extend_capacity(i32 %0) {
%2 = icmp slt i32 %0, 20
br i1 %2, label %3, label %5
3: ; preds = %1
%4 = tail call i32 @_nx_round_up_to_multiple(i32 %0, i32 4)
br label %11
5: ; preds = %1
%6 = icmp ult i32 %0, 4084
br i1 %6, label %7, label %9
7: ; preds = %5
%8 = tail call i32 @_nx_upper_power_of_two(i32 %0)
br label %11
9: ; preds = %5
%10 = tail call i32 @_nx_round_up_to_multiple(i32 %0, i32 4096)
br label %11
11: ; preds = %9, %7, %3
%12 = phi i32 [ %4, %3 ], [ %8, %7 ], [ %10, %9 ]
ret i32 %12
}
long double G_force_massMass(long double mass1, long double mass2,
                             long double radius) {
  return (6.67300e-11 * mass1 * mass2) / (radius * radius);
}


x86 assembly (clang, -O0):
<G_force_massMass>:
push   %rbp
mov    %rsp,%rbp
fldt   0x30(%rbp)
fldt   0x20(%rbp)
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
fstpt  -0x20(%rbp)
fstpt  -0x30(%rbp)
fldt   -0x10(%rbp)
fldl   0xee1(%rip)
fmulp  %st,%st(1)
fldt   -0x20(%rbp)
fmulp  %st,%st(1)
fldt   -0x30(%rbp)
fmul   %st,%st(0)
fdivrp %st,%st(1)
pop    %rbp
ret

x86 assembly (clang, -O2):
<G_force_massMass>:
fldt   0x28(%rsp)
fldt   0x8(%rsp)
fmull  0xef2(%rip)
fldt   0x18(%rsp)
fmulp  %st,%st(1)
fxch   %st(1)
fmul   %st,%st(0)
fdivrp %st,%st(1)
ret

LLVM IR (-O0):
define x86_fp80 @G_force_massMass(x86_fp80 %0, x86_fp80 %1, x86_fp80 %2) {
%4 = alloca x86_fp80
%5 = alloca x86_fp80
%6 = alloca x86_fp80
store x86_fp80 %0, x86_fp80* %4
store x86_fp80 %1, x86_fp80* %5
store x86_fp80 %2, x86_fp80* %6
%7 = load x86_fp80, x86_fp80* %4
%8 = fmul x86_fp80 0xK3FDD92BDA68013C86800, %7
%9 = load x86_fp80, x86_fp80* %5
%10 = fmul x86_fp80 %8, %9
%11 = load x86_fp80, x86_fp80* %6
%12 = load x86_fp80, x86_fp80* %6
%13 = fmul x86_fp80 %11, %12
%14 = fdiv x86_fp80 %10, %13
ret x86_fp80 %14
}

LLVM IR (-O2):
define x86_fp80 @G_force_massMass(x86_fp80 %0, x86_fp80 %1, x86_fp80 %2) {
%4 = fmul x86_fp80 %0, 0xK3FDD92BDA68013C86800
%5 = fmul x86_fp80 %4, %1
%6 = fmul x86_fp80 %2, %2
%7 = fdiv x86_fp80 %5, %6
ret x86_fp80 %7
}
/* Variables and functions */
int /*<<< orphan*/ tst_module_load_(void (*)(), char const *, char *const *);
void tst_module_load(void(cleanup_fn)(void), const char *mod_name,
                     char *const argv[]) {
  tst_module_load_(cleanup_fn, mod_name, argv);
}


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

x86 assembly (clang, -O2):
<tst_module_load>:
jmp    1030 <tst_module_load_@plt>

LLVM IR (-O0):
define void @tst_module_load(void ()* %0, i8* %1, i8** %2) {
%4 = alloca void ()*
%5 = alloca i8*
%6 = alloca i8**
store void ()* %0, void ()** %4
store i8* %1, i8** %5
store i8** %2, i8*** %6
%7 = load void ()*, void ()** %4
%8 = bitcast void ()* %7 to void (...)*
%9 = load i8*, i8** %5
%10 = load i8**, i8*** %6
%11 = call i32 @tst_module_load_(void (...)* %8, i8* %9, i8** %10)
ret void
}

LLVM IR (-O2):
define void @tst_module_load(void ()* %0, i8* %1, i8** %2) {
%4 = bitcast void ()* %0 to void (...)*
%5 = tail call i32 @tst_module_load_(void (...)* %4, i8* %1, i8** %2)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ time_t;

/* Variables and functions */
int syscall(int, void *);
int stime(time_t *t) { return syscall(25, (void *)t); }


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

x86 assembly (clang, -O2):
<stime>:
mov    %rdi,%rsi
mov    $0x19,%edi
jmp    1030 <syscall@plt>

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

LLVM IR (-O2):
define i32 @stime(i32* %0) {
%2 = bitcast i32* %0 to i8*
%3 = tail call i32 @syscall(i32 25, i8* %2)
ret i32 %3
}
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
uint8_t s337_get_data_type_dep(const uint8_t *p_s337) {
  return p_s337[4] & 0x1f;
}


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

x86 assembly (clang, -O2):
<s337_get_data_type_dep>:
mov    0x10(%rdi),%eax
and    $0x1f,%eax
ret

LLVM IR (-O0):
define i32 @s337_get_data_type_dep(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = getelementptr inbounds i32, i32* %3, i64 4
%5 = load i32, i32* %4
%6 = and i32 %5, 31
ret i32 %6
}

LLVM IR (-O2):
define i32 @s337_get_data_type_dep(i32* nocapture %0) {
%2 = getelementptr inbounds i32, i32* %0, i64 4
%3 = load i32, i32* %2
%4 = and i32 %3, 31
ret i32 %4
}
void swap(int items[], int x, int y) {
  int temp = items[x];
  items[x] = items[y];
  items[y] = temp;
}


x86 assembly (clang, -O0):
<swap>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,4),%edx
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x14(%rbp),%edx
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
pop    %rbp
ret

x86 assembly (clang, -O2):
<swap>:
movslq %esi,%rax
mov    (%rdi,%rax,4),%ecx
movslq %edx,%rdx
mov    (%rdi,%rdx,4),%esi
mov    %esi,(%rdi,%rax,4)
mov    %ecx,(%rdi,%rdx,4)
ret

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

LLVM IR (-O2):
define void @swap(i32* nocapture %0, i32 %1, i32 %2) {
%4 = sext i32 %1 to i64
%5 = getelementptr inbounds i32, i32* %0, i64 %4
%6 = load i32, i32* %5
%7 = sext i32 %2 to i64
%8 = getelementptr inbounds i32, i32* %0, i64 %7
%9 = load i32, i32* %8
store i32 %9, i32* %5
store i32 %6, i32* %8
ret void
}
double my_round(d1)
double d1;
{
  if (d1 >= 0.0) {
    modf(d1 + 0.5, &d1);
  } else {
    modf(d1 - 0.5, &d1);
  }
  return d1;
}


x86 assembly (clang, -O0):
<my_round>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jb     114a <my_round+0x3a>
movsd  0xec9(%rip),%xmm0
addsd  -0x8(%rbp),%xmm0
lea    -0x8(%rbp),%rdi
call   1030 <modf@plt>
jmp    1164 <my_round+0x54>
movsd  -0x8(%rbp),%xmm0
movsd  0xea9(%rip),%xmm1
subsd  %xmm1,%xmm0
lea    -0x8(%rbp),%rdi
call   1030 <modf@plt>
movsd  -0x8(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<my_round>:
push   %rax
xorpd  %xmm1,%xmm1
xor    %eax,%eax
ucomisd %xmm1,%xmm0
setb   %al
movsd  %xmm0,(%rsp)
lea    0xed6(%rip),%rcx
addsd  (%rcx,%rax,8),%xmm0
mov    %rsp,%rdi
call   1030 <modf@plt>
movsd  (%rsp),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @my_round(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fcmp oge double %3, 0.000000e+00
br i1 %4, label %5, label %9
5: ; preds = %1
%6 = load double, double* %2
%7 = fadd double %6, 5.000000e-01
%8 = call double @modf(double %7, double* %2)
br label %13
9: ; preds = %1
%10 = load double, double* %2
%11 = fsub double %10, 5.000000e-01
%12 = call double @modf(double %11, double* %2)
br label %13
13: ; preds = %9, %5
%14 = load double, double* %2
ret double %14
}

LLVM IR (-O2):
define double @my_round(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = fcmp ult double %0, 0.000000e+00
%4 = select i1 %3, double -5.000000e-01, double 5.000000e-01
%5 = fadd double %4, %0
%6 = call double @modf(double %5, double* %2)
%7 = load double, double* %2
ret double %7
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char const *);
void _speak(const char *msg) { printf("%s\n", msg); }


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

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

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

LLVM IR (-O2):
@.str = [4 x i8] c"%s\0A\00"
define void @_speak(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ syscall(int, int, int /*<<< orphan*/);
int exit(int value) { syscall(9, value, 0); }


x86 assembly (clang, -O0):
<exit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%esi
mov    $0x9,%edi
xor    %edx,%edx
call   1030 <syscall@plt>

x86 assembly (clang, -O2):
<exit>:
push   %rax
mov    %edi,%esi
mov    $0x9,%edi
xor    %edx,%edx
call   1030 <syscall@plt>

LLVM IR (-O0):
define i32 @exit(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @syscall(i32 9, i32 %3, i32 0)
unreachable
}

LLVM IR (-O2):
define i32 @exit(i32 %0) {
%2 = tail call i32 @syscall(i32 9, i32 %0, i32 0)
unreachable
}
int lockup_init(void) {
  for (;;)
    ;
  return 0;
}


x86 assembly (clang, -O0):
<lockup_init>:
push   %rbp
mov    %rsp,%rbp
jmp    1109 <lockup_init+0x9>
jmp    1109 <lockup_init+0x9>

x86 assembly (clang, -O2):
<lockup_init>:
jmp    1100 <lockup_init>

LLVM IR (-O0):
define i32 @lockup_init() {
br label %1
1: ; preds = %1, %0
br label %1
}

LLVM IR (-O2):
define i32 @lockup_init() {
br label %1
1: ; preds = %1, %0
br label %1
}
/* Variables and functions */
void const *GppcFinfoV1();
const void *pg_finfo_timestampfunc1(void) { return GppcFinfoV1(); }


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

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

LLVM IR (-O0):
define i8* @pg_finfo_timestampfunc1() {
%1 = call i8* (...) @GppcFinfoV1()
ret i8* %1
}

LLVM IR (-O2):
define i8* @pg_finfo_timestampfunc1() {
%1 = tail call i8* (...) @GppcFinfoV1()
ret i8* %1
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
const char *menu_hash_to_str_eo(uint32_t hash) {
  switch (hash) {
  case 0:
  default:
    break;
  }
  return "null";
}


x86 assembly (clang, -O0):
<menu_hash_to_str_eo>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
test   %eax,%eax
jne    111c <menu_hash_to_str_eo+0x1c>
jmp    1117 <menu_hash_to_str_eo+0x17>
jmp    111c <menu_hash_to_str_eo+0x1c>
jmp    1121 <menu_hash_to_str_eo+0x21>
lea    0xed8(%rip),%rax
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [5 x i8] c"null\00"
define i8* @menu_hash_to_str_eo(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
switch i32 %3, label %5 [
i32 0, label %4
]
4: ; preds = %1
br label %5
5: ; preds = %1, %4
br label %6
6: ; preds = %5
ret i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [5 x i8] c"null\00"
define i8* @menu_hash_to_str_eo(i32 %0) {
ret i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0)
}
int parse_query(char *query) {}


x86 assembly (clang, -O0):
<parse_query>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @parse_query(i8* nocapture readnone %0) {
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ yield();
void f_ping(void) {
  while (1) {
    printf("A");
    printf("B");
    printf("C");
    yield();
  }
}


x86 assembly (clang, -O0):
<f_ping>:
push   %rbp
mov    %rsp,%rbp
jmp    1129 <f_ping+0x9>
lea    0xed0(%rip),%rdi
call   1040 <printf@plt>
lea    0xec6(%rip),%rdi
call   1040 <printf@plt>
lea    0xebc(%rip),%rdi
call   1040 <printf@plt>
mov    $0x0,%al
call   1030 <yield@plt>
jmp    1129 <f_ping+0x9>

x86 assembly (clang, -O2):
<f_ping>:
push   %rax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    $0x41,%edi
call   1030 <putchar@plt>
mov    $0x42,%edi
call   1030 <putchar@plt>
mov    $0x43,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
call   1040 <yield@plt>
jmp    1130 <f_ping+0x10>

LLVM IR (-O0):
@.str = [2 x i8] c"A\00"
@.str.1 = [2 x i8] c"B\00"
@.str.2 = [2 x i8] c"C\00"
define void @f_ping() {
br label %1
1: ; preds = %0, %1
%2 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%4 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%5 = call i32 (...) @yield()
br label %1
}

LLVM IR (-O2):
define void @f_ping() {
br label %1
1: ; preds = %0, %1
%2 = tail call i32 @putchar(i32 65)
%3 = tail call i32 @putchar(i32 66)
%4 = tail call i32 @putchar(i32 67)
%5 = tail call i32 (...) @yield()
br label %1
}
/* Variables and functions */
double strtold(char const *, char **);
double strtod(const char *nptr, char **endptr) { return strtold(nptr, endptr); }


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

x86 assembly (clang, -O2):
<strtod>:
jmp    1030 <strtold@plt>

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

LLVM IR (-O2):
define double @strtod(i8* %0, i8** nocapture %1) {
%3 = tail call double @strtold(i8* %0, i8** %1)
ret double %3
}
/* Type definitions */
typedef int uid_t;

/* Variables and functions */
int /*<<< orphan*/ check(int);
int main(void) {
  uid_t uid;
  for (uid = 0; uid < 2000; ++uid)
    check(uid);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x7d0,-0x8(%rbp)
jge    1149 <main+0x39>
mov    -0x8(%rbp),%edi
call   1030 <check@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1126 <main+0x16>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %ebx,%edi
call   1030 <check@plt>
add    $0x1,%ebx
cmp    $0x7d0,%ebx
jne    1120 <main+0x10>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
br label %3
3: ; preds = %9, %0
%4 = load i32, i32* %2
%5 = icmp slt i32 %4, 2000
br i1 %5, label %6, label %12
6: ; preds = %3
%7 = load i32, i32* %2
%8 = call i32 @check(i32 %7)
br label %9
9: ; preds = %6
%10 = load i32, i32* %2
%11 = add nsw i32 %10, 1
store i32 %11, i32* %2
br label %3
12: ; preds = %3
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
br label %1
1: ; preds = %0, %1
%2 = phi i32 [ 0, %0 ], [ %4, %1 ]
%3 = tail call i32 @check(i32 %2)
%4 = add nuw nsw i32 %2, 1
%5 = icmp eq i32 %4, 2000
br i1 %5, label %6, label %1
6: ; preds = %1
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ codemode(int, int, int);
int /*<<< orphan*/ error(char *);
int findmode(char *, int *);
int standard2(int code, char *label, char *mnemo, char *oper) {
  register int add;
  int value;
  add = findmode(oper, &value);
  codemode(code, add, value);
  if (add == 0)
    error("Bad addressing mode");
  return 0;
}


x86 assembly (clang, -O0):
<standard2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x20(%rbp),%rdi
lea    -0x28(%rbp),%rsi
call   1040 <findmode@plt>
mov    %eax,-0x24(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x24(%rbp),%esi
mov    -0x28(%rbp),%edx
call   1030 <codemode@plt>
cmpl   $0x0,-0x24(%rbp)
jne    117b <standard2+0x4b>
lea    0xe8a(%rip),%rdi
call   1050 <error@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<standard2>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebx
lea    0x4(%rsp),%rsi
mov    %rcx,%rdi
call   1040 <findmode@plt>
mov    %eax,%ebp
mov    0x4(%rsp),%edx
mov    %ebx,%edi
mov    %eax,%esi
call   1030 <codemode@plt>
test   %ebp,%ebp
jne    1161 <standard2+0x31>
lea    0xea4(%rip),%rdi
call   1050 <error@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [20 x i8] c"Bad addressing mode\00"
define i32 @standard2(i32 %0, i8* %1, i8* %2, i8* %3) {
%5 = alloca i32
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i8*
%9 = alloca i32
%10 = alloca i32
store i32 %0, i32* %5
store i8* %1, i8** %6
store i8* %2, i8** %7
store i8* %3, i8** %8
%11 = load i8*, i8** %8
%12 = call i32 @findmode(i8* %11, i32* %10)
store i32 %12, i32* %9
%13 = load i32, i32* %5
%14 = load i32, i32* %9
%15 = load i32, i32* %10
%16 = call i32 @codemode(i32 %13, i32 %14, i32 %15)
%17 = load i32, i32* %9
%18 = icmp eq i32 %17, 0
br i1 %18, label %19, label %21
19: ; preds = %4
%20 = call i32 @error(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
br label %21
21: ; preds = %19, %4
ret i32 0
}

LLVM IR (-O2):
@.str = [20 x i8] c"Bad addressing mode\00"
define i32 @standard2(i32 %0, i8* nocapture readnone %1, i8* nocapture readnone %2, i8* %3) {
%5 = alloca i32
%6 = bitcast i32* %5 to i8*
%7 = call i32 @findmode(i8* %3, i32* %5)
%8 = load i32, i32* %5
%9 = call i32 @codemode(i32 %0, i32 %7, i32 %8)
%10 = icmp eq i32 %7, 0
br i1 %10, label %11, label %13
11: ; preds = %4
%12 = call i32 @error(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
br label %13
13: ; preds = %11, %4
ret i32 0
}
int longitud_string(char s[]) {
  int i;
  i = 0;
  while (s[i] != '\0')
    i++;
  return i;
}


x86 assembly (clang, -O0):
<longitud_string>:
push   %rbp
mov    %rsp,%rbp
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     1132 <longitud_string+0x32>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    110f <longitud_string+0xf>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<longitud_string>:
mov    $0xffffffff,%eax
cs nopw 0x0(%rax,%rax,1)
nop
add    $0x1,%eax
cmpb   $0x0,(%rdi)
lea    0x1(%rdi),%rdi
jne    1110 <longitud_string+0x10>
ret

LLVM IR (-O0):
define i32 @longitud_string(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
store i32 0, i32* %3
br label %4
4: ; preds = %12, %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 %15
12: ; preds = %4
%13 = load i32, i32* %3
%14 = add nsw i32 %13, 1
store i32 %14, i32* %3
br label %4
15: ; preds = %4
%16 = load i32, i32* %3
ret i32 %16
}

LLVM IR (-O2):
define i32 @longitud_string(i8* nocapture %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i64 [ %7, %2 ], [ 0, %1 ]
%4 = getelementptr inbounds i8, i8* %0, i64 %3
%5 = load i8, i8* %4
%6 = icmp eq i8 %5, 0
%7 = add nuw i64 %3, 1
br i1 %6, label %8, label %2
8: ; preds = %2
%9 = trunc i64 %3 to i32
ret i32 %9
}
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
void curve25519_prepare_secret_key(uint8_t s[32]) {
  s[0] &= 248;
  s[31] &= 127;
  s[31] |= 64;
}


x86 assembly (clang, -O0):
<curve25519_prepare_secret_key>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%ecx
and    $0xf8,%ecx
mov    %ecx,(%rax)
mov    -0x8(%rbp),%rax
mov    0x7c(%rax),%ecx
and    $0x7f,%ecx
mov    %ecx,0x7c(%rax)
mov    -0x8(%rbp),%rax
mov    0x7c(%rax),%ecx
or     $0x40,%ecx
mov    %ecx,0x7c(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<curve25519_prepare_secret_key>:
andl   $0xf8,(%rdi)
mov    0x7c(%rdi),%eax
and    $0x3f,%eax
or     $0x40,%eax
mov    %eax,0x7c(%rdi)
ret

LLVM IR (-O0):
define void @curve25519_prepare_secret_key(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = getelementptr inbounds i32, i32* %3, i64 0
%5 = load i32, i32* %4
%6 = and i32 %5, 248
store i32 %6, i32* %4
%7 = load i32*, i32** %2
%8 = getelementptr inbounds i32, i32* %7, i64 31
%9 = load i32, i32* %8
%10 = and i32 %9, 127
store i32 %10, i32* %8
%11 = load i32*, i32** %2
%12 = getelementptr inbounds i32, i32* %11, i64 31
%13 = load i32, i32* %12
%14 = or i32 %13, 64
store i32 %14, i32* %12
ret void
}

LLVM IR (-O2):
define void @curve25519_prepare_secret_key(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = and i32 %2, 248
store i32 %3, i32* %0
%4 = getelementptr inbounds i32, i32* %0, i64 31
%5 = load i32, i32* %4
%6 = and i32 %5, 63
%7 = or i32 %6, 64
store i32 %7, i32* %4
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void print_nl() { printf("\n"); }


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

x86 assembly (clang, -O2):
<print_nl>:
mov    $0xa,%edi
jmp    1030 <putchar@plt>

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

LLVM IR (-O2):
define void @print_nl() {
%1 = tail call i32 @putchar(i32 10)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ __floatsidf(long);
long __truncdfsf2(int /*<<< orphan*/);
long __floatsisf(register long a1) { return __truncdfsf2(__floatsidf(a1)); }


x86 assembly (clang, -O0):
<__floatsisf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <__floatsidf@plt>
mov    %eax,%edi
call   1140 <__truncdfsf2>
add    $0x10,%rsp
pop    %rbp
ret
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)

x86 assembly (clang, -O2):
<__floatsisf>:
push   %rax
call   1030 <__floatsidf@plt>
mov    %eax,%edi
pop    %rax
jmp    1120 <__truncdfsf2>
xchg   %ax,%ax

LLVM IR (-O0):
define i64 @__floatsisf(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = call i32 @__floatsidf(i64 %3)
%5 = call i64 @__truncdfsf2(i32 %4)
ret i64 %5
}

LLVM IR (-O2):
define i64 @__floatsisf(i64 %0) {
%2 = tail call i32 @__floatsidf(i64 %0)
%3 = tail call i64 @__truncdfsf2(i32 %2)
ret i64 %3
}
int hash(int key) { return (key); }


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

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

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

LLVM IR (-O2):
define i32 @hash(i32 returned %0) {
ret i32 %0
}
void debugx32_directive(const char *directive, const char *params) {
  (void)directive;
  (void)params;
}


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

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

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

LLVM IR (-O2):
define void @debugx32_directive(i8* nocapture %0, i8* nocapture %1) {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ va_list;

/* Variables and functions */
int /*<<< orphan*/ stdin;
int vfscanf(int /*<<< orphan*/, char const *, int /*<<< orphan*/);
int vscanf(const char *restrict format, va_list ap) {
  return vfscanf(stdin, format, ap);
}


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

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

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

LLVM IR (-O2):
@stdin = global i32 0
define i32 @vscanf(i8* noalias %0, i32 %1) {
%3 = load i32, i32* @stdin
%4 = tail call i32 @vfscanf(i32 %3, i8* %0, i32 %1)
ret i32 %4
}