xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ tone(int, int);
void high() { tone(1, 2); }


x86 assembly (clang, -O0):
<high>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%edi
mov    $0x2,%esi
call   1030 <tone@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<high>:
mov    $0x1,%edi
mov    $0x2,%esi
jmp    1030 <tone@plt>

LLVM IR (-O0):
define void @high() {
%1 = call i32 @tone(i32 1, i32 2)
ret void
}

LLVM IR (-O2):
define void @high() {
%1 = tail call i32 @tone(i32 1, i32 2)
ret void
}
int main() {
  unsigned long long in = 3;
  unsigned long long out;
  asm volatile("movq %1, %%xmm0\n\t"
               "movq %%xmm0, %0\n\t"
               : "=m"(out)
               : "m"(in));
  printf("Output is %llu (expected 3)\n", out);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movq   $0x3,-0x10(%rbp)
movq   -0x10(%rbp),%xmm0
movq   %xmm0,-0x18(%rbp)
mov    -0x18(%rbp),%rsi
lea    0xec4(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
movq   $0x3,0x10(%rsp)
movq   0x10(%rsp),%xmm0
movq   %xmm0,0x8(%rsp)
mov    0x8(%rsp),%rsi
lea    0xecb(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

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

LLVM IR (-O2):
@.str = [29 x i8] c"Output is %llu (expected 3)\0A\00"
define i32 @main() {
%1 = alloca i64
%2 = alloca i64
%3 = bitcast i64* %1 to i8*
store i64 3, i64* %1
%4 = bitcast i64* %2 to i8*
%5 = load i64, i64* %2
%6 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0), i64 %5)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ mtx_t;

/* Variables and functions */
int mutex_lock(int /*<<< orphan*/ *);
int mtx_lock(mtx_t *mtx) { return mutex_lock(mtx); }


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

x86 assembly (clang, -O2):
<mtx_lock>:
jmp    1030 <mutex_lock@plt>

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

LLVM IR (-O2):
define i32 @mtx_lock(i32* %0) {
%2 = tail call i32 @mutex_lock(i32* %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ eri1_irq();
void uart_enable_rx() {
  (*(volatile unsigned char *)(0xffff8a)) |= (1 << 6) | (1 << 4);
  eri1_irq();
}


x86 assembly (clang, -O0):
<uart_enable_rx>:
push   %rbp
mov    %rsp,%rbp
mov    $0xffff8a,%eax
mov    (%rax),%al
movzbl %al,%eax
or     $0x50,%eax
mov    %al,%cl
mov    $0xffff8a,%eax
mov    %cl,(%rax)
mov    $0x0,%al
call   1030 <eri1_irq@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<uart_enable_rx>:
orb    $0x50,0xffff8a
50
xor    %eax,%eax
jmp    1030 <eri1_irq@plt>

LLVM IR (-O0):
define void @uart_enable_rx() {
%1 = load volatile i8, i8* inttoptr (i64 16777098 to i8*)
%2 = zext i8 %1 to i32
%3 = or i32 %2, 80
%4 = trunc i32 %3 to i8
store volatile i8 %4, i8* inttoptr (i64 16777098 to i8*)
%5 = call i32 (...) @eri1_irq()
ret void
}

LLVM IR (-O2):
define void @uart_enable_rx() {
%1 = load volatile i8, i8* inttoptr (i64 16777098 to i8*)
%2 = or i8 %1, 80
store volatile i8 %2, i8* inttoptr (i64 16777098 to i8*)
%3 = tail call i32 (...) @eri1_irq()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ memcmp(void const *, void const *, size_t);
bool memstarts(void const *data, size_t data_len, void const *prefix,
               size_t prefix_len) {
  if (prefix_len > data_len)
    return false;
  return !memcmp(data, prefix, prefix_len);
}


x86 assembly (clang, -O0):
<memstarts>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    %rcx,-0x28(%rbp)
mov    -0x28(%rbp),%rax
cmp    -0x18(%rbp),%rax
jbe    1142 <memstarts+0x32>
movl   $0x0,-0x4(%rbp)
jmp    1163 <memstarts+0x53>
mov    -0x10(%rbp),%rdi
mov    -0x20(%rbp),%rsi
mov    -0x28(%rbp),%rdx
call   1030 <memcmp@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<memstarts>:
xor    %eax,%eax
cmp    %rsi,%rcx
ja     1130 <memstarts+0x20>
push   %rax
mov    %rdx,%rsi
mov    %rcx,%rdx
call   1030 <bcmp@plt>
mov    %eax,%ecx
xor    %eax,%eax
test   %ecx,%ecx
sete   %al
add    $0x8,%rsp
ret

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

LLVM IR (-O2):
define i32 @memstarts(i8* nocapture %0, i64 %1, i8* nocapture %2, i64 %3) {
%5 = icmp ugt i64 %3, %1
br i1 %5, label %10, label %6
6: ; preds = %4
%7 = tail call i32 @bcmp(i8* %0, i8* %2, i64 %3)
%8 = icmp eq i32 %7, 0
%9 = zext i1 %8 to i32
br label %10
10: ; preds = %4, %6
%11 = phi i32 [ %9, %6 ], [ 0, %4 ]
ret i32 %11
}
int fun718() { return 718; }


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

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

LLVM IR (-O0):
define i32 @fun718() {
ret i32 718
}

LLVM IR (-O2):
define i32 @fun718() {
ret i32 718
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
void uDMAIntClear(uint32_t ui32ChanMask) {
  (*((volatile uint32_t *)(0x400FF504))) = ui32ChanMask;
}


x86 assembly (clang, -O0):
<uDMAIntClear>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%ecx
mov    $0x400ff504,%eax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<uDMAIntClear>:
mov    %edi,0x400ff504
ret

LLVM IR (-O0):
define void @uDMAIntClear(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
store volatile i32 %3, i32* inttoptr (i64 1074787588 to i32*)
ret void
}

LLVM IR (-O2):
define void @uDMAIntClear(i32 %0) {
store volatile i32 %0, i32* inttoptr (i64 1074787588 to i32*)
ret void
}
a() { return 'a'; }


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

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

LLVM IR (-O0):
define i32 @a() {
ret i32 97
}

LLVM IR (-O2):
define i32 @a() {
ret i32 97
}
/* Variables and functions */
int /*<<< orphan*/ sleep(int);
main() { sleep(5 * 60); }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    $0x12c,%edi
call   1030 <sleep@plt>
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = call i32 @sleep(i32 300)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @sleep(i32 300)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
funct(char *str) { printf("%s\n", str); }


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

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

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

LLVM IR (-O2):
@.str = [4 x i8] c"%s\0A\00"
define i32 @funct(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %0)
ret i32 undef
}
/* Variables and functions */
int const cos(float const);
int const sin(float const);
int LineLen2Point(const int x, const int y, const float angle) {
  return (int)(cos(angle) * x + sin(angle) * y);
}


x86 assembly (clang, -O0):
<LineLen2Point>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
movss  %xmm0,-0xc(%rbp)
movss  -0xc(%rbp),%xmm0
call   1040 <cos@plt>
imul   -0x4(%rbp),%eax
mov    %eax,-0x10(%rbp)
movss  -0xc(%rbp),%xmm0
call   1030 <sin@plt>
mov    %eax,%ecx
mov    -0x10(%rbp),%eax
imul   -0x8(%rbp),%ecx
add    %ecx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<LineLen2Point>:
push   %rbp
push   %r14
push   %rbx
sub    $0x10,%rsp
movss  %xmm0,0xc(%rsp)
mov    %esi,%r14d
mov    %edi,%ebp
call   1040 <cos@plt>
mov    %eax,%ebx
imul   %ebp,%ebx
movss  0xc(%rsp),%xmm0
call   1030 <sin@plt>
imul   %r14d,%eax
add    %ebx,%eax
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define i32 @LineLen2Point(i32 %0, i32 %1, float %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca float
store i32 %0, i32* %4
store i32 %1, i32* %5
store float %2, float* %6
%7 = load float, float* %6
%8 = call i32 @cos(float %7)
%9 = load i32, i32* %4
%10 = mul nsw i32 %8, %9
%11 = load float, float* %6
%12 = call i32 @sin(float %11)
%13 = load i32, i32* %5
%14 = mul nsw i32 %12, %13
%15 = add nsw i32 %10, %14
ret i32 %15
}

LLVM IR (-O2):
define i32 @LineLen2Point(i32 %0, i32 %1, float %2) {
%4 = tail call i32 @cos(float %2)
%5 = mul nsw i32 %4, %0
%6 = tail call i32 @sin(float %2)
%7 = mul nsw i32 %6, %1
%8 = add nsw i32 %7, %5
ret i32 %8
}
char *expand_argument(str, end)
char *str, *end;
{
  char *tmp = savestring(str, end - str);
  char *value = allocated_variable_expand(tmp);
  free(tmp);
  return value;
}


x86 assembly (clang, -O0):
<expand_argument>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x8(%rbp),%rax
sub    %rax,%rsi
mov    $0x0,%al
call   1040 <savestring@plt>
cltq
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    $0x0,%al
call   1050 <allocated_variable_expand@plt>
cltq
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rdi
call   1030 <free@plt>
mov    -0x20(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<expand_argument>:
push   %r14
push   %rbx
push   %rax
sub    %rdi,%rsi
xor    %eax,%eax
call   1040 <savestring@plt>
movslq %eax,%rbx
mov    %rbx,%rdi
xor    %eax,%eax
call   1050 <allocated_variable_expand@plt>
movslq %eax,%r14
mov    %rbx,%rdi
call   1030 <free@plt>
mov    %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i8* @expand_argument(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%7 = load i8*, i8** %3
%8 = load i8*, i8** %4
%9 = load i8*, i8** %3
%10 = ptrtoint i8* %8 to i64
%11 = ptrtoint i8* %9 to i64
%12 = sub i64 %10, %11
%13 = call i32 (i8*, i64, ...) bitcast (i32 (...)* @savestring to i32 (i8*, i64, ...)*)(i8* %7, i64 %12)
%14 = sext i32 %13 to i64
%15 = inttoptr i64 %14 to i8*
store i8* %15, i8** %5
%16 = load i8*, i8** %5
%17 = call i32 (i8*, ...) bitcast (i32 (...)* @allocated_variable_expand to i32 (i8*, ...)*)(i8* %16)
%18 = sext i32 %17 to i64
%19 = inttoptr i64 %18 to i8*
store i8* %19, i8** %6
%20 = load i8*, i8** %5
%21 = load i8*, i8** %6
ret i8* %21
}

LLVM IR (-O2):
define i8* @expand_argument(i8* %0, i8* %1) {
%3 = ptrtoint i8* %1 to i64
%4 = ptrtoint i8* %0 to i64
%5 = sub i64 %3, %4
%6 = tail call i32 (i8*, i64, ...) bitcast (i32 (...)* @savestring to i32 (i8*, i64, ...)*)(i8* %0, i64 %5)
%7 = sext i32 %6 to i64
%8 = inttoptr i64 %7 to i8*
%9 = tail call i32 (i8*, ...) bitcast (i32 (...)* @allocated_variable_expand to i32 (i8*, ...)*)(i8* %8)
%10 = sext i32 %9 to i64
%11 = inttoptr i64 %10 to i8*
tail call void @free(i8* %8)
ret i8* %11
}
/* Variables and functions */
int /*<<< orphan*/ SysTick_Wait(int);
void SysTick_Wait_ms(unsigned long delay) {
  unsigned long i;
  for (i = 0; i < delay; i++) {
    SysTick_Wait(80000);
  }
}


x86 assembly (clang, -O0):
<SysTick_Wait_ms>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movq   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%rax
cmp    -0x8(%rbp),%rax
jae    114d <SysTick_Wait_ms+0x3d>
mov    $0x13880,%edi
call   1030 <SysTick_Wait@plt>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1124 <SysTick_Wait_ms+0x14>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<SysTick_Wait_ms>:
push   %rbx
test   %rdi,%rdi
je     1130 <SysTick_Wait_ms+0x20>
mov    %rdi,%rbx
nopl   0x0(%rax)
mov    $0x13880,%edi
call   1030 <SysTick_Wait@plt>
add    $0xffffffffffffffff,%rbx
jne    1120 <SysTick_Wait_ms+0x10>
pop    %rbx
ret

LLVM IR (-O0):
define void @SysTick_Wait_ms(i64 %0) {
%2 = alloca i64
%3 = alloca i64
store i64 %0, i64* %2
store i64 0, i64* %3
br label %4
4: ; preds = %10, %1
%5 = load i64, i64* %3
%6 = load i64, i64* %2
%7 = icmp ult i64 %5, %6
br i1 %7, label %8, label %13
8: ; preds = %4
%9 = call i32 @SysTick_Wait(i32 80000)
br label %10
10: ; preds = %8
%11 = load i64, i64* %3
%12 = add i64 %11, 1
store i64 %12, i64* %3
br label %4
13: ; preds = %4
ret void
}

LLVM IR (-O2):
define void @SysTick_Wait_ms(i64 %0) {
%2 = icmp eq i64 %0, 0
br i1 %2, label %8, label %3
3: ; preds = %1, %3
%4 = phi i64 [ %6, %3 ], [ 0, %1 ]
%5 = tail call i32 @SysTick_Wait(i32 80000)
%6 = add nuw i64 %4, 1
%7 = icmp eq i64 %6, %0
br i1 %7, label %8, label %3
8: ; preds = %3, %1
ret void
}
int bitXor(int x, int y) { return ~((~(x & (~y))) & (~((~x) & y))); }


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

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

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

LLVM IR (-O2):
define i32 @bitXor(i32 %0, i32 %1) {
%3 = xor i32 %1, %0
ret i32 %3
}
/* Type definitions */
typedef int /*<<< orphan*/ va_list;

/* Variables and functions */
int /*<<< orphan*/ stderr;
int vfprintf(int /*<<< orphan*/, char const *, int /*<<< orphan*/);
int vprintf_stderr(const char *fmt, va_list args) {
  return vfprintf(stderr, fmt, args);
}


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

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

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

LLVM IR (-O2):
@stderr = global i32 0
define i32 @vprintf_stderr(i8* %0, i32 %1) {
%3 = load i32, i32* @stderr
%4 = tail call i32 @vfprintf(i32 %3, i8* %0, i32 %1)
ret i32 %4
}
/* Type definitions */
struct sched_param {
  int dummy;
};
typedef int /*<<< orphan*/ pthread_attr_t;

/* Variables and functions */
int pthread_attr_setschedparam(int /*<<< orphan*/ *,
                               struct sched_param const *);
int my_pthread_attr_setschedparam(pthread_attr_t *__attr,
                                  struct sched_param const *param) {
  pthread_attr_t *realattr = (pthread_attr_t *)*(int *)__attr;
  return pthread_attr_setschedparam(realattr, param);
}


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

x86 assembly (clang, -O2):
<my_pthread_attr_setschedparam>:
movslq (%rdi),%rdi
jmp    1030 <pthread_attr_setschedparam@plt>

LLVM IR (-O0):
%struct.sched_param = type { i32 }
define i32 @my_pthread_attr_setschedparam(i32* %0, %struct.sched_param* %1) {
%3 = alloca i32*
%4 = alloca %struct.sched_param*
%5 = alloca i32*
store i32* %0, i32** %3
store %struct.sched_param* %1, %struct.sched_param** %4
%6 = load i32*, i32** %3
%7 = load i32, i32* %6
%8 = sext i32 %7 to i64
%9 = inttoptr i64 %8 to i32*
store i32* %9, i32** %5
%10 = load i32*, i32** %5
%11 = load %struct.sched_param*, %struct.sched_param** %4
%12 = call i32 @pthread_attr_setschedparam(i32* %10, %struct.sched_param* %11)
ret i32 %12
}

LLVM IR (-O2):
%struct.sched_param = type { i32 }
define i32 @my_pthread_attr_setschedparam(i32* nocapture %0, %struct.sched_param* %1) {
%3 = load i32, i32* %0
%4 = sext i32 %3 to i64
%5 = inttoptr i64 %4 to i32*
%6 = tail call i32 @pthread_attr_setschedparam(i32* %5, %struct.sched_param* %1)
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ SIG_DFL;
int diminuto_daemon_install(int, int /*<<< orphan*/);
int diminuto_daemon_default(int signum) {
  return diminuto_daemon_install(signum, SIG_DFL);
}


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

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

LLVM IR (-O0):
@SIG_DFL = global i32 0
define i32 @diminuto_daemon_default(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = load i32, i32* @SIG_DFL
%5 = call i32 @diminuto_daemon_install(i32 %3, i32 %4)
ret i32 %5
}

LLVM IR (-O2):
@SIG_DFL = global i32 0
define i32 @diminuto_daemon_default(i32 %0) {
%2 = load i32, i32* @SIG_DFL
%3 = tail call i32 @diminuto_daemon_install(i32 %0, i32 %2)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int, int);
void special(int key, int x, int y) {
  printf("sDN: %d @ (%d,%d)\n", key, x, y);
}


x86 assembly (clang, -O0):
<special>:
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
lea    0xecf(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [19 x i8] c"sDN: %d @ (%d,%d)\0A\00"
define void @special(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 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i32 %7, i32 %8, i32 %9)
ret void
}

LLVM IR (-O2):
@.str = [19 x i8] c"sDN: %d @ (%d,%d)\0A\00"
define void @special(i32 %0, i32 %1, i32 %2) {
%4 = tail call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i32 %0, i32 %1, i32 %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void printstring(char *str) { printf("String: %s\n", str); }


x86 assembly (clang, -O0):
<printstring>:
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):
<printstring>:
mov    %rdi,%rsi
lea    0xee6(%rip),%rdi
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [12 x i8] c"String: %s\0A\00"
define void @printstring(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
void emit_nat8(struct processor_explicatory_state *process_state,
               struct modern_stream *stream, void *stream_state,
               struct modern_vfile *vfile, void *vfile_state) {}


x86 assembly (clang, -O0):
<emit_nat8>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.processor_explicatory_state = type opaque
%struct.modern_stream = type opaque
%struct.modern_vfile = type opaque
define void @emit_nat8(%struct.processor_explicatory_state* %0, %struct.modern_stream* %1, i8* %2, %struct.modern_vfile* %3, i8* %4) {
%6 = alloca %struct.processor_explicatory_state*
%7 = alloca %struct.modern_stream*
%8 = alloca i8*
%9 = alloca %struct.modern_vfile*
%10 = alloca i8*
store %struct.processor_explicatory_state* %0, %struct.processor_explicatory_state** %6
store %struct.modern_stream* %1, %struct.modern_stream** %7
store i8* %2, i8** %8
store %struct.modern_vfile* %3, %struct.modern_vfile** %9
store i8* %4, i8** %10
ret void
}

LLVM IR (-O2):
%struct.processor_explicatory_state = type opaque
%struct.modern_stream = type opaque
%struct.modern_vfile = type opaque
define void @emit_nat8(%struct.processor_explicatory_state* nocapture %0, %struct.modern_stream* nocapture %1, i8* nocapture %2, %struct.modern_vfile* nocapture %3, i8* nocapture %4) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void print_star(int i) {
  int j;
  for (j = 1; j <= i; j++) {
    printf("*");
  }
  printf("\n");
}


x86 assembly (clang, -O0):
<print_star>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x4(%rbp),%eax
jg     1148 <print_star+0x38>
lea    0xecb(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1122 <print_star+0x12>
lea    0xeb3(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_star>:
push   %rbx
test   %edi,%edi
jle    112f <print_star+0x1f>
mov    %edi,%ebx
nopw   0x0(%rax,%rax,1)
mov    $0x2a,%edi
call   1030 <putchar@plt>
add    $0xffffffff,%ebx
jne    1120 <print_star+0x10>
mov    $0xa,%edi
pop    %rbx
jmp    1030 <putchar@plt>

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

LLVM IR (-O2):
define void @print_star(i32 %0) {
%2 = icmp slt i32 %0, 1
br i1 %2, label %8, label %3
3: ; preds = %1, %3
%4 = phi i32 [ %6, %3 ], [ 1, %1 ]
%5 = tail call i32 @putchar(i32 42)
%6 = add nuw i32 %4, 1
%7 = icmp eq i32 %4, %0
br i1 %7, label %8, label %3
8: ; preds = %3, %1
%9 = tail call i32 @putchar(i32 10)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ RSA;

/* Variables and functions */
int /*<<< orphan*/ *d2i_RSA_NET(int /*<<< orphan*/ **, unsigned char const **,
                                long, int (*)(char *, int, char const *, int),
                                int /*<<< orphan*/);
RSA *d2i_Netscape_RSA(RSA **a, const unsigned char **pp, long length,
                      int (*cb)(char *buf, int len, const char *prompt,
                                int verify)) {
  return d2i_RSA_NET(a, pp, length, cb, 0);
}


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

x86 assembly (clang, -O2):
<d2i_Netscape_RSA>:
xor    %r8d,%r8d
jmp    1030 <d2i_RSA_NET@plt>

LLVM IR (-O0):
define i32* @d2i_Netscape_RSA(i32** %0, i8** %1, i64 %2, i32 (i8*, i32, i8*, i32)* %3) {
%5 = alloca i32**
%6 = alloca i8**
%7 = alloca i64
%8 = alloca i32 (i8*, i32, i8*, i32)*
store i32** %0, i32*** %5
store i8** %1, i8*** %6
store i64 %2, i64* %7
store i32 (i8*, i32, i8*, i32)* %3, i32 (i8*, i32, i8*, i32)** %8
%9 = load i32**, i32*** %5
%10 = load i8**, i8*** %6
%11 = load i64, i64* %7
%12 = load i32 (i8*, i32, i8*, i32)*, i32 (i8*, i32, i8*, i32)** %8
%13 = call i32* @d2i_RSA_NET(i32** %9, i8** %10, i64 %11, i32 (i8*, i32, i8*, i32)* %12, i32 0)
ret i32* %13
}

LLVM IR (-O2):
define i32* @d2i_Netscape_RSA(i32** %0, i8** %1, i64 %2, i32 (i8*, i32, i8*, i32)* %3) {
%5 = tail call i32* @d2i_RSA_NET(i32** %0, i8** %1, i64 %2, i32 (i8*, i32, i8*, i32)* %3, i32 0)
ret i32* %5
}
void SteamAPI_ISteamScreenshots_TriggerScreenshot(void *self) {
  xlogf("%s(self = %p)\n", __func__, self);
}


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

x86 assembly (clang, -O2):
<SteamAPI_ISteamScreenshots_TriggerScreenshot>:
mov    %rdi,%rdx
lea    0xee6(%rip),%rdi
lea    0xeee(%rip),%rsi
xor    %eax,%eax
jmp    1030 <xlogf@plt>

LLVM IR (-O0):
@.str = [15 x i8] c"%s(self = %p)\0A\00"
@__func__.SteamAPI_ISteamScreenshots_TriggerScreenshot = [45 x i8] c"SteamAPI_ISteamScreenshots_TriggerScreenshot\00"
define void @SteamAPI_ISteamScreenshots_TriggerScreenshot(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 (i8*, i8*, i8*, ...) bitcast (i32 (...)* @xlogf to i32 (i8*, i8*, i8*, ...)*)(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([45 x i8], [45 x i8]* @__func__.SteamAPI_ISteamScreenshots_TriggerScreenshot, i64 0, i64 0), i8* %3)
ret void
}

LLVM IR (-O2):
@.str = [15 x i8] c"%s(self = %p)\0A\00"
@__func__.SteamAPI_ISteamScreenshots_TriggerScreenshot = [45 x i8] c"SteamAPI_ISteamScreenshots_TriggerScreenshot\00"
define void @SteamAPI_ISteamScreenshots_TriggerScreenshot(i8* %0) {
%2 = tail call i32 (i8*, i8*, i8*, ...) bitcast (i32 (...)* @xlogf to i32 (i8*, i8*, i8*, ...)*)(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([45 x i8], [45 x i8]* @__func__.SteamAPI_ISteamScreenshots_TriggerScreenshot, i64 0, i64 0), i8* %0)
ret void
}
void ScaleRowDown4_Any_SSSE3() {}


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

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

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

LLVM IR (-O2):
define void @ScaleRowDown4_Any_SSSE3() {
ret void
}
void gtk_cell_renderer_toggle_new() {}


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

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

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

LLVM IR (-O2):
define void @gtk_cell_renderer_toggle_new() {
ret void
}
void isr_int_debug() {}


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

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

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

LLVM IR (-O2):
define void @isr_int_debug() {
ret void
}
void cacheex_init(void) {}


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

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

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

LLVM IR (-O2):
define void @cacheex_init() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ test_chrfn();
int /*<<< orphan*/ test_dmem();
int /*<<< orphan*/ test_memfn();
int /*<<< orphan*/ test_search();
int /*<<< orphan*/ test_sort();
void test_mem(void) {
  test_memfn();
  test_chrfn();
  test_dmem();
  test_sort();
  test_search();
}


x86 assembly (clang, -O0):
<test_mem>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <test_memfn@plt>
mov    $0x0,%al
call   1060 <test_chrfn@plt>
mov    $0x0,%al
call   1070 <test_dmem@plt>
mov    $0x0,%al
call   1040 <test_sort@plt>
mov    $0x0,%al
call   1050 <test_search@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_mem>:
push   %rax
xor    %eax,%eax
call   1030 <test_memfn@plt>
xor    %eax,%eax
call   1060 <test_chrfn@plt>
xor    %eax,%eax
call   1070 <test_dmem@plt>
xor    %eax,%eax
call   1040 <test_sort@plt>
xor    %eax,%eax
pop    %rcx
jmp    1050 <test_search@plt>

LLVM IR (-O0):
define void @test_mem() {
%1 = call i32 (...) @test_memfn()
%2 = call i32 (...) @test_chrfn()
%3 = call i32 (...) @test_dmem()
%4 = call i32 (...) @test_sort()
%5 = call i32 (...) @test_search()
ret void
}

LLVM IR (-O2):
define void @test_mem() {
%1 = tail call i32 (...) @test_memfn()
%2 = tail call i32 (...) @test_chrfn()
%3 = tail call i32 (...) @test_dmem()
%4 = tail call i32 (...) @test_sort()
%5 = tail call i32 (...) @test_search()
ret void
}
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
int nmea_valid_checksum(char const *);
int /*<<< orphan*/ *strstr(char const *, char *);
uint8_t nmea_get_message_type(const char *message) {
  uint8_t checksum = 0;
  if ((checksum = nmea_valid_checksum(message)) != 0x00) {
    return checksum;
  }
  if (strstr(message, "$GPRMC") != NULL) {
    return 0x01;
  }
  return 0x00;
}


x86 assembly (clang, -O0):
<nmea_get_message_type>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <nmea_valid_checksum@plt>
mov    %eax,-0x14(%rbp)
cmp    $0x0,%eax
je     1153 <nmea_get_message_type+0x33>
mov    -0x14(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1180 <nmea_get_message_type+0x60>
mov    -0x10(%rbp),%rdi
lea    0xea2(%rip),%rsi
call   1040 <strstr@plt>
cmp    $0x0,%rax
je     1179 <nmea_get_message_type+0x59>
movl   $0x1,-0x4(%rbp)
jmp    1180 <nmea_get_message_type+0x60>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<nmea_get_message_type>:
push   %rbx
mov    %rdi,%rbx
call   1030 <nmea_valid_checksum@plt>
test   %eax,%eax
je     112f <nmea_get_message_type+0xf>
pop    %rbx
ret
lea    0xeca(%rip),%rsi
mov    %rbx,%rdi
call   1040 <strstr@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
setne  %al
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [7 x i8] c"$GPRMC\00"
define i32 @nmea_get_message_type(i8* %0) {
%2 = tail call i32 @nmea_valid_checksum(i8* %0)
%3 = icmp eq i32 %2, 0
br i1 %3, label %4, label %8
4: ; preds = %1
%5 = tail call i32* @strstr(i8* dereferenceable(1) %0, i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%6 = icmp ne i32* %5, null
%7 = zext i1 %6 to i32
br label %8
8: ; preds = %4, %1
%9 = phi i32 [ %2, %1 ], [ %7, %4 ]
ret i32 %9
}
int NumberOfOperations(long long i) { return 40000; }


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

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

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

LLVM IR (-O2):
define i32 @NumberOfOperations(i64 %0) {
ret i32 40000
}
/* Variables and functions */
int /*<<< orphan*/ fputs(char *, int /*<<< orphan*/);
int /*<<< orphan*/ h_puts(char const *);
int /*<<< orphan*/ puts(char *);
int /*<<< orphan*/ stdout;
void h_form_start(const char *method, const char *action) {
  fputs("<form method=\"", stdout);
  h_puts(method);
  fputs("\" action=\"", stdout);
  h_puts(action);
  puts("\">");
}


x86 assembly (clang, -O0):
<h_form_start>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2e99(%rip),%rax
mov    (%rax),%esi
lea    0xeb0(%rip),%rdi
call   1050 <fputs@plt>
mov    -0x8(%rbp),%rdi
call   1030 <h_puts@plt>
mov    0x2e7b(%rip),%rax
mov    (%rax),%esi
lea    0xea1(%rip),%rdi
call   1050 <fputs@plt>
mov    -0x10(%rbp),%rdi
call   1030 <h_puts@plt>
lea    0xe97(%rip),%rdi
call   1040 <puts@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<h_form_start>:
push   %r15
push   %r14
push   %rbx
mov    %rsi,%r14
mov    %rdi,%rbx
mov    0x2e9e(%rip),%r15
mov    (%r15),%esi
lea    0xeb4(%rip),%rdi
call   1050 <fputs@plt>
mov    %rbx,%rdi
call   1030 <h_puts@plt>
mov    (%r15),%esi
lea    0xeac(%rip),%rdi
call   1050 <fputs@plt>
mov    %r14,%rdi
call   1030 <h_puts@plt>
lea    0xea3(%rip),%rdi
pop    %rbx
pop    %r14
pop    %r15
jmp    1040 <puts@plt>

LLVM IR (-O0):
@.str = [15 x i8] c"<form method=\22\00"
@stdout = global i32 0
@.str.1 = [11 x i8] c"\22 action=\22\00"
@.str.2 = [3 x i8] c"\22>\00"
define void @h_form_start(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i32, i32* @stdout
%6 = call i32 @fputs(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 %5)
%7 = load i8*, i8** %3
%8 = call i32 @h_puts(i8* %7)
%9 = load i32, i32* @stdout
%10 = call i32 @fputs(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i32 %9)
%11 = load i8*, i8** %4
%12 = call i32 @h_puts(i8* %11)
%13 = call i32 @puts(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [15 x i8] c"<form method=\22\00"
@stdout = global i32 0
@.str.1 = [11 x i8] c"\22 action=\22\00"
@.str.2 = [3 x i8] c"\22>\00"
define void @h_form_start(i8* %0, i8* %1) {
%3 = load i32, i32* @stdout
%4 = tail call i32 @fputs(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 %3)
%5 = tail call i32 @h_puts(i8* %0)
%6 = load i32, i32* @stdout
%7 = tail call i32 @fputs(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i32 %6)
%8 = tail call i32 @h_puts(i8* %1)
%9 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
ret void
}
/* Variables and functions */
scalar_t__ RAND_bytes(void *, int);
int /*<<< orphan*/ assert(int);
void tglt_secure_random(void *s, int l) {
  if (RAND_bytes(s, l) <= 0) {
    assert(0 && "End of random. If you want, you can start with -w");
  } else {
  }
}


x86 assembly (clang, -O0):
<tglt_secure_random>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1030 <RAND_bytes@plt>
cmp    $0x0,%rax
jg     1151 <tglt_secure_random+0x31>
xor    %edi,%edi
call   1040 <assert@plt>
jmp    1156 <tglt_secure_random+0x36>
jmp    1156 <tglt_secure_random+0x36>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tglt_secure_random>:
push   %rax
call   1030 <RAND_bytes@plt>
test   %rax,%rax
jle    112d <tglt_secure_random+0xd>
pop    %rax
ret
xor    %edi,%edi
pop    %rax
jmp    1040 <assert@plt>

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

LLVM IR (-O2):
define void @tglt_secure_random(i8* %0, i32 %1) {
%3 = tail call i64 @RAND_bytes(i8* %0, i32 %1)
%4 = icmp slt i64 %3, 1
br i1 %4, label %5, label %7
5: ; preds = %2
%6 = tail call i32 @assert(i32 0)
br label %7
7: ; preds = %2, %5
ret void
}
/* Variables and functions */
int atoi(char *);
int integrity_match_slot(char *slot_name, int slot_num) {
  return !(atoi(slot_name) == slot_num);
}


x86 assembly (clang, -O0):
<integrity_match_slot>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <atoi@plt>
cmp    -0xc(%rbp),%eax
sete   %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<integrity_match_slot>:
push   %rbx
mov    %esi,%ebx
call   1030 <atoi@plt>
xor    %ecx,%ecx
cmp    %ebx,%eax
setne  %cl
mov    %ecx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @integrity_match_slot(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i8*, i8** %3
%6 = call i32 @atoi(i8* %5)
%7 = load i32, i32* %4
%8 = icmp eq i32 %6, %7
%9 = xor i1 %8, true
%10 = zext i1 %9 to i32
ret i32 %10
}

LLVM IR (-O2):
define i32 @integrity_match_slot(i8* nocapture %0, i32 %1) {
%3 = tail call i32 @atoi(i8* %0)
%4 = icmp ne i32 %3, %1
%5 = zext i1 %4 to i32
ret i32 %5
}
/* Variables and functions */
int EINVAL;
__attribute__((visibility("default"))) int
sd_bus_track_remove_name(void *track, const char *name) {
  return -EINVAL;
}


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

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

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

LLVM IR (-O2):
@EINVAL = global i32 0
define i32 @sd_bus_track_remove_name(i8* nocapture readnone %0, i8* nocapture readnone %1) {
%3 = load i32, i32* @EINVAL
%4 = sub nsw i32 0, %3
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ SIGINT;
int /*<<< orphan*/ error(char *);
int /*<<< orphan*/ signal(int /*<<< orphan*/, void (*)(int));
void sigintr(int n) {
  signal(SIGINT, sigintr);
  error("interrupt");
}


x86 assembly (clang, -O0):
<sigintr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    0x2eb6(%rip),%rax
mov    (%rax),%edi
mov    0x2e9d(%rip),%rsi
call   1030 <signal@plt>
lea    0xeb9(%rip),%rdi
call   1040 <error@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sigintr>:
push   %rax
mov    0x2ec0(%rip),%rax
mov    (%rax),%edi
mov    0x2ea7(%rip),%rsi
call   1030 <signal@plt>
lea    0xec3(%rip),%rdi
pop    %rax
jmp    1040 <error@plt>

LLVM IR (-O0):
@SIGINT = global i32 0
@.str = [10 x i8] c"interrupt\00"
define void @sigintr(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* @SIGINT
%4 = call i32 @signal(i32 %3, void (i32)* @sigintr)
%5 = call i32 @error(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@SIGINT = global i32 0
@.str = [10 x i8] c"interrupt\00"
define void @sigintr(i32 %0) {
%2 = load i32, i32* @SIGINT
%3 = tail call i32 @signal(i32 %2, void (i32)* @sigintr)
%4 = tail call i32 @error(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int f119(int *);
int f120(int *p) { return f119(p); }


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

x86 assembly (clang, -O2):
<f120>:
jmp    1030 <f119@plt>

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

LLVM IR (-O2):
define i32 @f120(i32* %0) {
%2 = tail call i32 @f119(i32* %0)
ret i32 %2
}
/* Type definitions */
typedef scalar_t__ int64_t;

/* Variables and functions */
void c_func_5_(int64_t *i) {
  int *pointer = (int *)*i;
  *pointer = 4;
}


x86 assembly (clang, -O0):
<c_func_5_>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movl   $0x4,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<c_func_5_>:
mov    (%rdi),%rax
movl   $0x4,(%rax)
ret

LLVM IR (-O0):
define void @c_func_5_(i64* %0) {
%2 = alloca i64*
%3 = alloca i32*
store i64* %0, i64** %2
%4 = load i64*, i64** %2
%5 = load i64, i64* %4
%6 = inttoptr i64 %5 to i32*
store i32* %6, i32** %3
%7 = load i32*, i32** %3
store i32 4, i32* %7
ret void
}

LLVM IR (-O2):
define void @c_func_5_(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = inttoptr i64 %2 to i32*
store i32 4, i32* %3
ret void
}
/* Variables and functions */
char *getenv(char *);
int /*<<< orphan*/ printf(char *, char *);
int main(int argc, char *argv[]) {
  char *server_name = getenv("SERVER_NAME");
  if (server_name == NULL) {
    server_name = "default_server_name.test.com";
  }
  printf("Connecting to server %s...\n", server_name);
  return 0;
}


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)
lea    0xec3(%rip),%rdi
call   1030 <getenv@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    115c <main+0x3c>
lea    0xeb4(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rsi
lea    0xec2(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <getenv@plt>
test   %rax,%rax
lea    0xed5(%rip),%rsi
cmovne %rax,%rsi
lea    0xee7(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [12 x i8] c"SERVER_NAME\00"
@.str.1 = [29 x i8] c"default_server_name.test.com\00"
@.str.2 = [28 x i8] c"Connecting to server %s...\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
%7 = call i8* @getenv(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
store i8* %7, i8** %6
%8 = load i8*, i8** %6
%9 = icmp eq i8* %8, null
br i1 %9, label %10, label %11
10: ; preds = %2
store i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0), i8** %6
br label %11
11: ; preds = %10, %2
%12 = load i8*, i8** %6
%13 = call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.2, i64 0, i64 0), i8* %12)
ret i32 0
}

LLVM IR (-O2):
@.str = [12 x i8] c"SERVER_NAME\00"
@.str.1 = [29 x i8] c"default_server_name.test.com\00"
@.str.2 = [28 x i8] c"Connecting to server %s...\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i8* @getenv(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%4 = icmp eq i8* %3, null
%5 = select i1 %4, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0), i8* %3
%6 = tail call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.2, i64 0, i64 0), i8* %5)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ acos(int);
int glmComputeVectorLength2d(double const *);
double glmDegd(int /*<<< orphan*/);
int glmDotProduct2d(double const *, double const *);
double glmComputeVectorAngle2dDeg(const double v1[2], const double v2[2]) {
  return glmDegd(
      acos(glmDotProduct2d(v1, v2) /
           (glmComputeVectorLength2d(v1) * glmComputeVectorLength2d(v2))));
}


x86 assembly (clang, -O0):
<glmComputeVectorAngle2dDeg>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1060 <glmDotProduct2d@plt>
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <glmComputeVectorLength2d@plt>
mov    %eax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <glmComputeVectorLength2d@plt>
mov    -0x18(%rbp),%ecx
mov    %eax,%edx
mov    -0x14(%rbp),%eax
imul   %edx,%ecx
cltd
idiv   %ecx
mov    %eax,%edi
call   1030 <acos@plt>
mov    %eax,%edi
call   1050 <glmDegd@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<glmComputeVectorAngle2dDeg>:
push   %rbp
push   %r14
push   %rbx
mov    %rsi,%r14
mov    %rdi,%rbx
call   1060 <glmDotProduct2d@plt>
mov    %eax,%ebp
mov    %rbx,%rdi
call   1040 <glmComputeVectorLength2d@plt>
mov    %eax,%ebx
mov    %r14,%rdi
call   1040 <glmComputeVectorLength2d@plt>
mov    %eax,%ecx
imul   %ebx,%ecx
mov    %ebp,%eax
cltd
idiv   %ecx
mov    %eax,%edi
call   1030 <acos@plt>
mov    %eax,%edi
pop    %rbx
pop    %r14
pop    %rbp
jmp    1050 <glmDegd@plt>

LLVM IR (-O0):
define double @glmComputeVectorAngle2dDeg(double* %0, double* %1) {
%3 = alloca double*
%4 = alloca double*
store double* %0, double** %3
store double* %1, double** %4
%5 = load double*, double** %3
%6 = load double*, double** %4
%7 = call i32 @glmDotProduct2d(double* %5, double* %6)
%8 = load double*, double** %3
%9 = call i32 @glmComputeVectorLength2d(double* %8)
%10 = load double*, double** %4
%11 = call i32 @glmComputeVectorLength2d(double* %10)
%12 = mul nsw i32 %9, %11
%13 = sdiv i32 %7, %12
%14 = call i32 @acos(i32 %13)
%15 = call double @glmDegd(i32 %14)
ret double %15
}

LLVM IR (-O2):
define double @glmComputeVectorAngle2dDeg(double* %0, double* %1) {
%3 = tail call i32 @glmDotProduct2d(double* %0, double* %1)
%4 = tail call i32 @glmComputeVectorLength2d(double* %0)
%5 = tail call i32 @glmComputeVectorLength2d(double* %1)
%6 = mul nsw i32 %5, %4
%7 = sdiv i32 %3, %6
%8 = tail call i32 @acos(i32 %7)
%9 = tail call double @glmDegd(i32 %8)
ret double %9
}
void no_display(int x_pos, int y_pos, int style) { return; }


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

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

LLVM IR (-O0):
define void @no_display(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
ret void
}

LLVM IR (-O2):
define void @no_display(i32 %0, i32 %1, i32 %2) {
ret void
}