xunge/DecIR huggingface dataset:
void flip_page(void) {}


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

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

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

LLVM IR (-O2):
define void @flip_page() {
ret void
}
void platform_terminate(void) {}


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

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

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

LLVM IR (-O2):
define void @platform_terminate() {
ret void
}
int modify(int *ip) { return *ip + 4; }


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

x86 assembly (clang, -O2):
<modify>:
mov    (%rdi),%eax
add    $0x4,%eax
ret

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

LLVM IR (-O2):
define i32 @modify(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = add nsw i32 %2, 4
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ out0(char *);
int /*<<< orphan*/ outih0(char);
void pdat(char *msg, char data) {
  out0("Dat = ");
  outih0(data);
  out0("  ");
  out0(msg);
  out0("\n");
}


x86 assembly (clang, -O0):
<pdat>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %sil,%al
mov    %rdi,-0x8(%rbp)
mov    %al,-0x9(%rbp)
lea    0xec7(%rip),%rdi
call   1030 <out0@plt>
movsbl -0x9(%rbp),%edi
call   1040 <outih0@plt>
lea    0xeb9(%rip),%rdi
call   1030 <out0@plt>
mov    -0x8(%rbp),%rdi
call   1030 <out0@plt>
lea    0xea7(%rip),%rdi
call   1030 <out0@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pdat>:
push   %r14
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %rdi,%r14
lea    0xed0(%rip),%rdi
call   1030 <out0@plt>
mov    %ebx,%edi
call   1040 <outih0@plt>
lea    0xec4(%rip),%rdi
call   1030 <out0@plt>
mov    %r14,%rdi
call   1030 <out0@plt>
lea    0xeb3(%rip),%rdi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <out0@plt>

LLVM IR (-O0):
@.str = [7 x i8] c"Dat = \00"
@.str.1 = [3 x i8] c" \00"
@.str.2 = [2 x i8] c"\0A\00"
define void @pdat(i8* %0, i8 signext %1) {
%3 = alloca i8*
%4 = alloca i8
store i8* %0, i8** %3
store i8 %1, i8* %4
%5 = call i32 @out0(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%6 = load i8, i8* %4
%7 = call i32 @outih0(i8 signext %6)
%8 = call i32 @out0(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%9 = load i8*, i8** %3
%10 = call i32 @out0(i8* %9)
%11 = call i32 @out0(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [7 x i8] c"Dat = \00"
@.str.1 = [3 x i8] c" \00"
@.str.2 = [2 x i8] c"\0A\00"
define void @pdat(i8* %0, i8 signext %1) {
%3 = tail call i32 @out0(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%4 = tail call i32 @outih0(i8 signext %1)
%5 = tail call i32 @out0(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%6 = tail call i32 @out0(i8* %0)
%7 = tail call i32 @out0(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
ret void
}
int ft_tolower(int c) { return (c += (('A' <= c && c <= 'Z') ? 32 : 0)); }


x86 assembly (clang, -O0):
<ft_tolower>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
xor    %eax,%eax
mov    $0x41,%ecx
cmp    -0x4(%rbp),%ecx
mov    %al,-0x5(%rbp)
jg     1124 <ft_tolower+0x24>
cmpl   $0x5a,-0x4(%rbp)
setle  %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%dl
xor    %eax,%eax
mov    $0x20,%ecx
test   $0x1,%dl
cmovne %ecx,%eax
add    -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_tolower>:
lea    -0x41(%rdi),%ecx
xor    %eax,%eax
cmp    $0x1a,%ecx
setb   %al
shl    $0x5,%eax
add    %edi,%eax
ret

LLVM IR (-O0):
define i32 @ft_tolower(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp sle i32 65, %3
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i32, i32* %2
%7 = icmp sle i32 %6, 90
br label %8
8: ; preds = %5, %1
%9 = phi i1 [ false, %1 ], [ %7, %5 ]
%10 = zext i1 %9 to i64
%11 = select i1 %9, i32 32, i32 0
%12 = load i32, i32* %2
%13 = add nsw i32 %12, %11
store i32 %13, i32* %2
ret i32 %13
}

LLVM IR (-O2):
define i32 @ft_tolower(i32 %0) {
%2 = add i32 %0, -65
%3 = icmp ult i32 %2, 26
%4 = select i1 %3, i32 32, i32 0
%5 = add nsw i32 %4, %0
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void my_exit2() { printf("second registered atexit func!\n"); }


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

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

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

LLVM IR (-O2):
@str = [31 x i8] c"second registered atexit func!\00"
define void @my_exit2() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @str, i64 0, i64 0))
ret void
}
void foo47() {}


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

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

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

LLVM IR (-O2):
define void @foo47() {
ret void
}
/* Type definitions */
struct cl_tree {
  int dummy;
};
struct cl_node {
  int dummy;
};

/* Variables and functions */
void const *cl_node_key(struct cl_node *);
struct cl_node *cl_tree_search(struct cl_tree *, void const *);
const void *cl_tree_get_key(struct cl_tree *tree, const void *key) {
  struct cl_node *n = cl_tree_search(tree, key);
  return cl_node_key(n);
}


x86 assembly (clang, -O0):
<cl_tree_get_key>:
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   1030 <cl_tree_search@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
call   1040 <cl_node_key@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cl_tree_get_key>:
push   %rax
call   1030 <cl_tree_search@plt>
mov    %rax,%rdi
pop    %rax
jmp    1040 <cl_node_key@plt>

LLVM IR (-O0):
%struct.cl_tree = type { i32 }
%struct.cl_node = type { i32 }
define i8* @cl_tree_get_key(%struct.cl_tree* %0, i8* %1) {
%3 = alloca %struct.cl_tree*
%4 = alloca i8*
%5 = alloca %struct.cl_node*
store %struct.cl_tree* %0, %struct.cl_tree** %3
store i8* %1, i8** %4
%6 = load %struct.cl_tree*, %struct.cl_tree** %3
%7 = load i8*, i8** %4
%8 = call %struct.cl_node* @cl_tree_search(%struct.cl_tree* %6, i8* %7)
store %struct.cl_node* %8, %struct.cl_node** %5
%9 = load %struct.cl_node*, %struct.cl_node** %5
%10 = call i8* @cl_node_key(%struct.cl_node* %9)
ret i8* %10
}

LLVM IR (-O2):
%struct.cl_tree = type { i32 }
%struct.cl_node = type { i32 }
define i8* @cl_tree_get_key(%struct.cl_tree* %0, i8* %1) {
%3 = tail call %struct.cl_node* @cl_tree_search(%struct.cl_tree* %0, i8* %1)
%4 = tail call i8* @cl_node_key(%struct.cl_node* %3)
ret i8* %4
}
long scale_yes(string, flag)
char *string[];
long *flag;
{
  *flag = 1L;
  return (1);
}


x86 assembly (clang, -O0):
<scale_yes>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movq   $0x1,(%rax)
mov    $0x1,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<scale_yes>:
movq   $0x1,(%rsi)
mov    $0x1,%eax
ret

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

LLVM IR (-O2):
define i64 @scale_yes(i8** nocapture readnone %0, i64* nocapture writeonly %1) {
store i64 1, i64* %1
ret i64 1
}
/* Variables and functions */
int __VERIFIER_nondet_int();
int main() {
  int y = __VERIFIER_nondet_int();
  while (y > 1) {
    if (y % 2 == 0) {
      y = y / 2;
    } else {
      y = 3 * y + 1;
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,-0x8(%rbp)
cmpl   $0x1,-0x8(%rbp)
jle    1169 <main+0x59>
mov    -0x8(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    115a <main+0x4a>
mov    -0x8(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,-0x8(%rbp)
jmp    1164 <main+0x54>
imul   $0x3,-0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1129 <main+0x19>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 (...) @__VERIFIER_nondet_int()
store i32 %3, i32* %2
br label %4
4: ; preds = %18, %0
%5 = load i32, i32* %2
%6 = icmp sgt i32 %5, 1
br i1 %6, label %7, label %19
7: ; preds = %4
%8 = load i32, i32* %2
%9 = srem i32 %8, 2
%10 = icmp eq i32 %9, 0
br i1 %10, label %11, label %14
11: ; preds = %7
%12 = load i32, i32* %2
%13 = sdiv i32 %12, 2
store i32 %13, i32* %2
br label %18
14: ; preds = %7
%15 = load i32, i32* %2
%16 = mul nsw i32 3, %15
%17 = add nsw i32 %16, 1
store i32 %17, i32* %2
br label %18
18: ; preds = %14, %11
br label %4
19: ; preds = %4
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @__VERIFIER_nondet_int()
ret i32 0
}
/* Variables and functions */
bool nrf53_errata_81(void) { return false; }


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

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

LLVM IR (-O0):
define i32 @nrf53_errata_81() {
ret i32 0
}

LLVM IR (-O2):
define i32 @nrf53_errata_81() {
ret i32 0
}
float fp_div(float a, float b) { return a / b; }


x86 assembly (clang, -O0):
<fp_div>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
divss  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<fp_div>:
divss  %xmm1,%xmm0
ret

LLVM IR (-O0):
define float @fp_div(float %0, float %1) {
%3 = alloca float
%4 = alloca float
store float %0, float* %3
store float %1, float* %4
%5 = load float, float* %3
%6 = load float, float* %4
%7 = fdiv float %5, %6
ret float %7
}

LLVM IR (-O2):
define float @fp_div(float %0, float %1) {
%3 = fdiv float %0, %1
ret float %3
}
/* Type definitions */
typedef int uint8_t;
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
uint8_t nsfGet_456A(uint16_t addr) {
  (void)addr;
  return 0x4C;
}


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

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

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

LLVM IR (-O2):
define i32 @nsfGet_456A(i32 %0) {
ret i32 76
}
int npfs_aio_init(int n) {
  int ret = 0;
  return ret;
}


x86 assembly (clang, -O0):
<npfs_aio_init>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @npfs_aio_init(i32 %0) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void format_string(void) {
  char *str = "MarcoMerli";
  printf("%s\n", str);
  printf("<%20s>\n", str);
  printf("%.5s\n", str);
}


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

x86 assembly (clang, -O2):
<format_string>:
push   %rbx
lea    0xef3(%rip),%rdi
lea    0xee1(%rip),%rbx
mov    %rbx,%rsi
call   1030 <printf@plt>
lea    0xee1(%rip),%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
lea    0xeda(%rip),%rdi
mov    %rbx,%rsi
pop    %rbx
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [11 x i8] c"MarcoMerli\00"
@.str.1 = [4 x i8] c"%s\0A\00"
@.str.2 = [8 x i8] c"<%20s>\0A\00"
@.str.3 = [6 x i8] c"%.5s\0A\00"
define void @format_string() {
%1 = alloca i8*
store i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8** %1
%2 = load i8*, i8** %1
%3 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %2)
%4 = load i8*, i8** %1
%5 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0), i8* %4)
%6 = load i8*, i8** %1
%7 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0), i8* %6)
ret void
}

LLVM IR (-O2):
@.str = [11 x i8] c"MarcoMerli\00"
@.str.1 = [4 x i8] c"%s\0A\00"
@.str.2 = [8 x i8] c"<%20s>\0A\00"
@.str.3 = [6 x i8] c"%.5s\0A\00"
define void @format_string() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Type definitions */
struct timeval {
  scalar_t__ tv_sec;
  int tv_usec;
};

/* Variables and functions */
int _tvdiff(struct timeval old, struct timeval new) {
  int udiff = 0;
  if (old.tv_sec != new.tv_sec)
    udiff = (new.tv_sec - old.tv_sec) * 1000000;
  return (new.tv_usec - old.tv_usec) + udiff;
}


x86 assembly (clang, -O0):
<_tvdiff>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x20(%rbp)
mov    %ecx,-0x18(%rbp)
movl   $0x0,-0x24(%rbp)
mov    -0x10(%rbp),%rax
cmp    -0x20(%rbp),%rax
je     1139 <_tvdiff+0x39>
mov    -0x20(%rbp),%rax
sub    -0x10(%rbp),%rax
imul   $0xf4240,%rax,%rax
mov    %eax,-0x24(%rbp)
mov    -0x18(%rbp),%eax
sub    -0x8(%rbp),%eax
add    -0x24(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_tvdiff>:
mov    %edx,%eax
sub    %edi,%eax
imul   $0xf4240,%eax,%r8d
xor    %eax,%eax
cmp    %rdi,%rdx
cmovne %r8d,%eax
sub    %esi,%ecx
add    %ecx,%eax
ret

LLVM IR (-O0):
%struct.timeval = type { i64, i32 }
define i32 @_tvdiff(i64 %0, i32 %1, i64 %2, i32 %3) {
%5 = alloca %struct.timeval
%6 = alloca %struct.timeval
%7 = alloca i32
%8 = bitcast %struct.timeval* %5 to { i64, i32 }*
%9 = getelementptr inbounds { i64, i32 }, { i64, i32 }* %8, i32 0, i32 0
store i64 %0, i64* %9
%10 = getelementptr inbounds { i64, i32 }, { i64, i32 }* %8, i32 0, i32 1
store i32 %1, i32* %10
%11 = bitcast %struct.timeval* %6 to { i64, i32 }*
%12 = getelementptr inbounds { i64, i32 }, { i64, i32 }* %11, i32 0, i32 0
store i64 %2, i64* %12
%13 = getelementptr inbounds { i64, i32 }, { i64, i32 }* %11, i32 0, i32 1
store i32 %3, i32* %13
store i32 0, i32* %7
%14 = getelementptr inbounds %struct.timeval, %struct.timeval* %5, i32 0, i32 0
%15 = load i64, i64* %14
%16 = getelementptr inbounds %struct.timeval, %struct.timeval* %6, i32 0, i32 0
%17 = load i64, i64* %16
%18 = icmp ne i64 %15, %17
br i1 %18, label %19, label %27
19: ; preds = %4
%20 = getelementptr inbounds %struct.timeval, %struct.timeval* %6, i32 0, i32 0
%21 = load i64, i64* %20
%22 = getelementptr inbounds %struct.timeval, %struct.timeval* %5, i32 0, i32 0
%23 = load i64, i64* %22
%24 = sub nsw i64 %21, %23
%25 = mul nsw i64 %24, 1000000
%26 = trunc i64 %25 to i32
store i32 %26, i32* %7
br label %27
27: ; preds = %19, %4
%28 = getelementptr inbounds %struct.timeval, %struct.timeval* %6, i32 0, i32 1
%29 = load i32, i32* %28
%30 = getelementptr inbounds %struct.timeval, %struct.timeval* %5, i32 0, i32 1
%31 = load i32, i32* %30
%32 = sub nsw i32 %29, %31
%33 = load i32, i32* %7
%34 = add nsw i32 %32, %33
ret i32 %34
}

LLVM IR (-O2):
define i32 @_tvdiff(i64 %0, i32 %1, i64 %2, i32 %3) {
%5 = icmp eq i64 %2, %0
%6 = sub nsw i64 %2, %0
%7 = trunc i64 %6 to i32
%8 = mul i32 %7, 1000000
%9 = select i1 %5, i32 0, i32 %8
%10 = sub i32 %3, %1
%11 = add nsw i32 %10, %9
ret i32 %11
}
void null_space(int n) {}


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

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

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

LLVM IR (-O2):
define void @null_space(i32 %0) {
ret void
}
void XtDirectConvert() {}


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

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

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

LLVM IR (-O2):
define void @XtDirectConvert() {
ret void
}
/* Type definitions */
struct expr_node {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ expr_destroy(struct expr_node *);
int /*<<< orphan*/ free(struct expr_node *);
void release_expr(struct expr_node *node, int own) {
  if (own) {
    expr_destroy(node);
    free(node);
  }
}


x86 assembly (clang, -O0):
<release_expr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
je     114b <release_expr+0x2b>
mov    -0x8(%rbp),%rdi
call   1040 <expr_destroy@plt>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<release_expr>:
test   %esi,%esi
je     1136 <release_expr+0x16>
push   %rbx
mov    %rdi,%rbx
call   1040 <expr_destroy@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <free@plt>
ret

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

LLVM IR (-O2):
%struct.expr_node = type { i32 }
define void @release_expr(%struct.expr_node* %0, i32 %1) {
%3 = icmp eq i32 %1, 0
br i1 %3, label %7, label %4
4: ; preds = %2
%5 = tail call i32 @expr_destroy(%struct.expr_node* %0)
%6 = tail call i32 @free(%struct.expr_node* %0)
br label %7
7: ; preds = %4, %2
ret void
}
int SuggestSrcRGB8Palette(int nColors, unsigned int *lpRGBVals) { return -1; }


x86 assembly (clang, -O0):
<SuggestSrcRGB8Palette>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0xffffffff,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @SuggestSrcRGB8Palette(i32 %0, i32* %1) {
%3 = alloca i32
%4 = alloca i32*
store i32 %0, i32* %3
store i32* %1, i32** %4
ret i32 -1
}

LLVM IR (-O2):
define i32 @SuggestSrcRGB8Palette(i32 %0, i32* nocapture readnone %1) {
ret i32 -1
}
int main() {
  int a = 30;
  int b = 9;
  int c;
  c = b * a;
  if (c > 10) {
    c = c - 10;
  }
  return c * (60 / a);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movl   $0x1e,-0x8(%rbp)
movl   $0x9,-0xc(%rbp)
mov    -0xc(%rbp),%eax
imul   -0x8(%rbp),%eax
mov    %eax,-0x10(%rbp)
cmpl   $0xa,-0x10(%rbp)
jle    1136 <main+0x36>
mov    -0x10(%rbp),%eax
sub    $0xa,%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    $0x3c,%eax
cltd
idivl  -0x8(%rbp)
mov    %eax,%ecx
mov    -0x14(%rbp),%eax
imul   %ecx,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 0, i32* %1
store i32 30, i32* %2
store i32 9, i32* %3
%5 = load i32, i32* %3
%6 = load i32, i32* %2
%7 = mul nsw i32 %5, %6
store i32 %7, i32* %4
%8 = load i32, i32* %4
%9 = icmp sgt i32 %8, 10
br i1 %9, label %10, label %13
10: ; preds = %0
%11 = load i32, i32* %4
%12 = sub nsw i32 %11, 10
store i32 %12, i32* %4
br label %13
13: ; preds = %10, %0
%14 = load i32, i32* %4
%15 = load i32, i32* %2
%16 = sdiv i32 60, %15
%17 = mul nsw i32 %14, %16
ret i32 %17
}

LLVM IR (-O2):
define i32 @main() {
ret i32 520
}
void exitFromChild(void) {
  _serverPanic("/scratch/repos/new/home/jordi_armengol_estape/c-scraper/"
               "outputs/2022-01-22/02-19-57/repos/CodisLabs/redis-port/refs/"
               "heads/redis-4.x-cgo/pkg/rdb/cgo_glue_meow.c",
               69, "Function '%s' is disabled.", __func__);
}


x86 assembly (clang, -O0):
<exitFromChild>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
mov    $0x45,%esi
lea    0xf79(%rip),%rdx
lea    0xf8d(%rip),%rcx
mov    $0x0,%al
call   1030 <_serverPanic@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<exitFromChild>:
lea    0xee9(%rip),%rdi
lea    0xf82(%rip),%rdx
lea    0xf96(%rip),%rcx
mov    $0x45,%esi
xor    %eax,%eax
jmp    1030 <_serverPanic@plt>

LLVM IR (-O0):
@.str = [160 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/CodisLabs/redis-port/refs/heads/redis-4.x-cgo/pkg/rdb/cgo_glue_meow.c\00"
@.str.1 = [27 x i8] c"Function '%s' is disabled.\00"
@__func__.exitFromChild = [14 x i8] c"exitFromChild\00"
define void @exitFromChild() {
%1 = call i32 (i8*, i32, i8*, i8*, ...) bitcast (i32 (...)* @_serverPanic to i32 (i8*, i32, i8*, i8*, ...)*)(i8* getelementptr inbounds ([160 x i8], [160 x i8]* @.str, i64 0, i64 0), i32 69, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @__func__.exitFromChild, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [160 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/CodisLabs/redis-port/refs/heads/redis-4.x-cgo/pkg/rdb/cgo_glue_meow.c\00"
@.str.1 = [27 x i8] c"Function '%s' is disabled.\00"
@__func__.exitFromChild = [14 x i8] c"exitFromChild\00"
define void @exitFromChild() {
%1 = tail call i32 (i8*, i32, i8*, i8*, ...) bitcast (i32 (...)* @_serverPanic to i32 (i8*, i32, i8*, i8*, ...)*)(i8* getelementptr inbounds ([160 x i8], [160 x i8]* @.str, i64 0, i64 0), i32 69, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @__func__.exitFromChild, i64 0, i64 0))
ret void
}
/* Variables and functions */
int d86f_get_sides(int);
int d86f_get_track_table_size(int drive) {
  int temp = 2048;
  if (d86f_get_sides(drive) == 1)
    temp >>= 1;
  return temp;
}


x86 assembly (clang, -O0):
<d86f_get_track_table_size>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movl   $0x800,-0x8(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <d86f_get_sides@plt>
cmp    $0x1,%eax
jne    113c <d86f_get_track_table_size+0x2c>
mov    -0x8(%rbp),%eax
sar    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<d86f_get_track_table_size>:
push   %rax
call   1030 <d86f_get_sides@plt>
xor    %ecx,%ecx
cmp    $0x1,%eax
setne  %cl
shl    $0xa,%ecx
add    $0x400,%ecx
mov    %ecx,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @d86f_get_track_table_size(i32 %0) {
%2 = tail call i32 @d86f_get_sides(i32 %0)
%3 = icmp eq i32 %2, 1
%4 = select i1 %3, i32 1024, i32 2048
ret i32 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ time_t;

/* Variables and functions */
char *copy_string(char *);
char *gettime() {
  time_t t, time();
  char *result, *ctime(), *copy_string();
  t = time((long *)0);
  result = copy_string(ctime(&t));
  result[24] = '\0';
  return (result);
}


x86 assembly (clang, -O0):
<gettime>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
xor    %eax,%eax
mov    %eax,%edi
mov    $0x0,%al
call   1050 <time@plt>
mov    %eax,-0x4(%rbp)
lea    -0x4(%rbp),%rdi
mov    $0x0,%al
call   1040 <ctime@plt>
mov    %rax,%rdi
call   1030 <copy_string@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movb   $0x0,0x18(%rax)
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gettime>:
push   %rax
xor    %edi,%edi
xor    %eax,%eax
call   1050 <time@plt>
mov    %eax,0x4(%rsp)
lea    0x4(%rsp),%rdi
xor    %eax,%eax
call   1040 <ctime@plt>
mov    %rax,%rdi
call   1030 <copy_string@plt>
movb   $0x0,0x18(%rax)
pop    %rcx
ret

LLVM IR (-O0):
define i8* @gettime() {
%1 = alloca i32
%2 = alloca i8*
%3 = call i32 (i64*, ...) bitcast (i32 (...)* @time to i32 (i64*, ...)*)(i64* null)
store i32 %3, i32* %1
%4 = call i8* (i32*, ...) bitcast (i8* (...)* @ctime to i8* (i32*, ...)*)(i32* %1)
%5 = call i8* @copy_string(i8* %4)
store i8* %5, i8** %2
%6 = load i8*, i8** %2
%7 = getelementptr inbounds i8, i8* %6, i64 24
store i8 0, i8* %7
%8 = load i8*, i8** %2
ret i8* %8
}

LLVM IR (-O2):
define i8* @gettime() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = tail call i32 (i64*, ...) bitcast (i32 (...)* @time to i32 (i64*, ...)*)(i64* null)
store i32 %3, i32* %1
%4 = call i8* (i32*, ...) bitcast (i8* (...)* @ctime to i8* (i32*, ...)*)(i32* %1)
%5 = call i8* @copy_string(i8* %4)
%6 = getelementptr inbounds i8, i8* %5, i64 24
store i8 0, i8* %6
ret i8* %5
}
/* Variables and functions */
int memcmp(char const *, char const *, scalar_t__);
scalar_t__ strlen(char const *);
int strcmp(const char *s1, const char *s2) {
  return memcmp(s1, s2, strlen(s2) + 1);
}


x86 assembly (clang, -O0):
<strcmp>:
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    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
mov    -0x20(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    %rax,%rdx
add    $0x1,%rdx
call   1040 <memcmp@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strcmp>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rdi,%r14
mov    %rsi,%rdi
call   1030 <strlen@plt>
lea    0x1(%rax),%rdx
mov    %r14,%rdi
mov    %rbx,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <memcmp@plt>

LLVM IR (-O0):
define i32 @strcmp(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 = load i8*, i8** %4
%8 = call i64 @strlen(i8* %7)
%9 = add nsw i64 %8, 1
%10 = call i32 @memcmp(i8* %5, i8* %6, i64 %9)
ret i32 %10
}

LLVM IR (-O2):
define i32 @strcmp(i8* nocapture %0, i8* nocapture %1) {
%3 = tail call i64 @strlen(i8* dereferenceable(1) %1)
%4 = add nsw i64 %3, 1
%5 = tail call i32 @memcmp(i8* %0, i8* %1, i64 %4)
ret i32 %5
}
void newThread(int *pkglstHndler, int connection_fd, struct paket *message) {}


x86 assembly (clang, -O0):
<newThread>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.paket = type opaque
define void @newThread(i32* %0, i32 %1, %struct.paket* %2) {
%4 = alloca i32*
%5 = alloca i32
%6 = alloca %struct.paket*
store i32* %0, i32** %4
store i32 %1, i32* %5
store %struct.paket* %2, %struct.paket** %6
ret void
}

LLVM IR (-O2):
%struct.paket = type opaque
define void @newThread(i32* nocapture %0, i32 %1, %struct.paket* nocapture %2) {
ret void
}
/* Variables and functions */
int *malloc(int);
int /*<<< orphan*/ merge_sort(int *, int /*<<< orphan*/, int);
int /*<<< orphan*/ populate_array(int *, int *, int);
int /*<<< orphan*/ print_array(int *, int);
int main() {
  int *A = malloc(100 * sizeof(int *));
  int num_elements = 0;
  populate_array(A, &num_elements, 100);
  merge_sort(A, 0, num_elements - 1);
  print_array(A, num_elements);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x320,%edi
call   1040 <malloc@plt>
mov    %rax,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0xc(%rbp),%rsi
mov    $0x64,%edx
call   1060 <populate_array@plt>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%edx
sub    $0x1,%edx
xor    %esi,%esi
call   1050 <merge_sort@plt>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1030 <print_array@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
mov    $0x320,%edi
call   1040 <malloc@plt>
mov    %rax,%rbx
movl   $0x0,0xc(%rsp)
lea    0xc(%rsp),%rsi
mov    %rax,%rdi
mov    $0x64,%edx
call   1060 <populate_array@plt>
mov    0xc(%rsp),%edx
add    $0xffffffff,%edx
mov    %rbx,%rdi
xor    %esi,%esi
call   1050 <merge_sort@plt>
mov    0xc(%rsp),%esi
mov    %rbx,%rdi
call   1030 <print_array@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32*
%2 = alloca i32
%3 = call i32* @malloc(i32 800)
store i32* %3, i32** %1
store i32 0, i32* %2
%4 = load i32*, i32** %1
%5 = call i32 @populate_array(i32* %4, i32* %2, i32 100)
%6 = load i32*, i32** %1
%7 = load i32, i32* %2
%8 = sub nsw i32 %7, 1
%9 = call i32 @merge_sort(i32* %6, i32 0, i32 %8)
%10 = load i32*, i32** %1
%11 = load i32, i32* %2
%12 = call i32 @print_array(i32* %10, i32 %11)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = alloca i32
%2 = tail call i32* @malloc(i32 800)
%3 = bitcast i32* %1 to i8*
store i32 0, i32* %1
%4 = call i32 @populate_array(i32* %2, i32* %1, i32 100)
%5 = load i32, i32* %1
%6 = add nsw i32 %5, -1
%7 = call i32 @merge_sort(i32* %2, i32 0, i32 %6)
%8 = load i32, i32* %1
%9 = call i32 @print_array(i32* %2, i32 %8)
ret i32 0
}
/* Type definitions */
struct lineFile {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ lineFileAbort(struct lineFile *, char *, char *);
scalar_t__ strcmp(char *, char *);
void checkBigBedSupport(struct lineFile *lf, char *where) {
  if ((strcmp(where, "lineFileSeek") == 0))
    lineFileAbort(lf, "%s: not supported for lineFile on BigBed.", where);
}


x86 assembly (clang, -O0):
<checkBigBedSupport>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xec5(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%rax
jne    115e <checkBigBedSupport+0x3e>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rdx
lea    0xeb4(%rip),%rsi
call   1030 <lineFileAbort@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<checkBigBedSupport>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rdi,%r14
lea    0xecf(%rip),%rsi
mov    %rbx,%rdi
call   1040 <strcmp@plt>
test   %rax,%rax
je     1146 <checkBigBedSupport+0x26>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret
lea    0xec0(%rip),%rsi
mov    %r14,%rdi
mov    %rbx,%rdx
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <lineFileAbort@plt>

LLVM IR (-O0):
%struct.lineFile = type { i32 }
@.str = [13 x i8] c"lineFileSeek\00"
@.str.1 = [42 x i8] c"%s: not supported for lineFile on BigBed.\00"
define void @checkBigBedSupport(%struct.lineFile* %0, i8* %1) {
%3 = alloca %struct.lineFile*
%4 = alloca i8*
store %struct.lineFile* %0, %struct.lineFile** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %4
%6 = call i64 @strcmp(i8* %5, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
%7 = icmp eq i64 %6, 0
br i1 %7, label %8, label %12
8: ; preds = %2
%9 = load %struct.lineFile*, %struct.lineFile** %3
%10 = load i8*, i8** %4
%11 = call i32 @lineFileAbort(%struct.lineFile* %9, i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.1, i64 0, i64 0), i8* %10)
br label %12
12: ; preds = %8, %2
ret void
}

LLVM IR (-O2):
%struct.lineFile = type { i32 }
@.str = [13 x i8] c"lineFileSeek\00"
@.str.1 = [42 x i8] c"%s: not supported for lineFile on BigBed.\00"
define void @checkBigBedSupport(%struct.lineFile* %0, i8* %1) {
%3 = tail call i64 @strcmp(i8* %1, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
%4 = icmp eq i64 %3, 0
br i1 %4, label %5, label %7
5: ; preds = %2
%6 = tail call i32 @lineFileAbort(%struct.lineFile* %0, i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.1, i64 0, i64 0), i8* %1)
br label %7
7: ; preds = %5, %2
ret void
}
/* Variables and functions */
double cosh(double);
double ECcosh(double x) {
  double y;
  double r;
  y = x;
  r = cosh(y);
  return (r);
}


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

x86 assembly (clang, -O2):
<ECcosh>:
jmp    1030 <cosh@plt>

LLVM IR (-O0):
define double @ECcosh(double %0) {
%2 = alloca double
%3 = alloca double
%4 = alloca double
store double %0, double* %2
%5 = load double, double* %2
store double %5, double* %3
%6 = load double, double* %3
%7 = call double @cosh(double %6)
store double %7, double* %4
%8 = load double, double* %4
ret double %8
}

LLVM IR (-O2):
define double @ECcosh(double %0) {
%2 = tail call double @cosh(double %0)
ret double %2
}
/* Variables and functions */
int /*<<< orphan*/ firc_send(char *, char *);
char *strtok(int /*<<< orphan*/, char *);
void join() {
  char *chan = strtok(0, " \r\n");
  if (chan)
    firc_send("JOIN %s", chan);
}


x86 assembly (clang, -O0):
<join>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
xor    %edi,%edi
lea    0xecf(%rip),%rsi
call   1040 <strtok@plt>
mov    %rax,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1155 <join+0x35>
mov    -0x8(%rbp),%rsi
lea    0xeb4(%rip),%rdi
call   1030 <firc_send@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<join>:
push   %rax
lea    0xed8(%rip),%rsi
xor    %edi,%edi
call   1040 <strtok@plt>
test   %rax,%rax
je     1144 <join+0x24>
lea    0xec9(%rip),%rdi
mov    %rax,%rsi
pop    %rax
jmp    1030 <firc_send@plt>
pop    %rax
ret

LLVM IR (-O0):
@.str = [4 x i8] c" \0D\0A\00"
@.str.1 = [8 x i8] c"JOIN %s\00"
define void @join() {
%1 = alloca i8*
%2 = call i8* @strtok(i32 0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
store i8* %2, i8** %1
%3 = load i8*, i8** %1
%4 = icmp ne i8* %3, null
br i1 %4, label %5, label %8
5: ; preds = %0
%6 = load i8*, i8** %1
%7 = call i32 @firc_send(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i8* %6)
br label %8
8: ; preds = %5, %0
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c" \0D\0A\00"
@.str.1 = [8 x i8] c"JOIN %s\00"
define void @join() {
%1 = tail call i8* @strtok(i32 0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%2 = icmp eq i8* %1, null
br i1 %2, label %5, label %3
3: ; preds = %0
%4 = tail call i32 @firc_send(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i8* %1)
br label %5
5: ; preds = %3, %0
ret void
}
void ARGBToRGB24Row_AVX2() {}


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

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

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

LLVM IR (-O2):
define void @ARGBToRGB24Row_AVX2() {
ret void
}
/* Variables and functions */
bool is_range_valid(unsigned int from, unsigned int to) {
  return from <= to && (from > 0 && from <= 14) && (to > 0 && to <= 14);
}


x86 assembly (clang, -O0):
<is_range_valid>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%ecx
xor    %eax,%eax
cmp    -0x8(%rbp),%ecx
mov    %al,-0x9(%rbp)
ja     1158 <is_range_valid+0x58>
xor    %eax,%eax
cmpl   $0x0,-0x4(%rbp)
mov    %al,-0x9(%rbp)
jbe    1158 <is_range_valid+0x58>
xor    %eax,%eax
cmpl   $0xe,-0x4(%rbp)
mov    %al,-0x9(%rbp)
ja     1158 <is_range_valid+0x58>
xor    %eax,%eax
cmpl   $0x0,-0x8(%rbp)
mov    %al,-0xa(%rbp)
jbe    1152 <is_range_valid+0x52>
cmpl   $0xe,-0x8(%rbp)
setbe  %al
mov    %al,-0xa(%rbp)
mov    -0xa(%rbp),%al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_range_valid>:
cmp    %esi,%edi
setbe  %al
add    $0xffffffff,%edi
cmp    $0xe,%edi
setb   %cl
and    %al,%cl
add    $0xffffffff,%esi
cmp    $0xe,%esi
setb   %al
and    %cl,%al
movzbl %al,%eax
ret

LLVM IR (-O0):
define i32 @is_range_valid(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = load i32, i32* %4
%7 = icmp ule i32 %5, %6
br i1 %7, label %8, label %22
8: ; preds = %2
%9 = load i32, i32* %3
%10 = icmp ugt i32 %9, 0
br i1 %10, label %11, label %22
11: ; preds = %8
%12 = load i32, i32* %3
%13 = icmp ule i32 %12, 14
br i1 %13, label %14, label %22
14: ; preds = %11
%15 = load i32, i32* %4
%16 = icmp ugt i32 %15, 0
br i1 %16, label %17, label %20
17: ; preds = %14
%18 = load i32, i32* %4
%19 = icmp ule i32 %18, 14
br label %20
20: ; preds = %17, %14
%21 = phi i1 [ false, %14 ], [ %19, %17 ]
br label %22
22: ; preds = %20, %11, %8, %2
%23 = phi i1 [ false, %11 ], [ false, %8 ], [ false, %2 ], [ %21, %20 ]
%24 = zext i1 %23 to i32
ret i32 %24
}

LLVM IR (-O2):
define i32 @is_range_valid(i32 %0, i32 %1) {
%3 = icmp ule i32 %0, %1
%4 = add i32 %0, -1
%5 = icmp ult i32 %4, 14
%6 = and i1 %5, %3
%7 = add i32 %1, -1
%8 = icmp ult i32 %7, 14
%9 = and i1 %6, %8
%10 = zext i1 %9 to i32
ret i32 %10
}
void add(int *a, int *b) { *a += *b; }


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

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

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

LLVM IR (-O2):
define void @add(i32* nocapture %0, i32* nocapture %1) {
%3 = load i32, i32* %1
%4 = load i32, i32* %0
%5 = add nsw i32 %4, %3
store i32 %5, i32* %0
ret void
}
/* Variables and functions */
int __kbdreset();
int /*<<< orphan*/ printf(char *, int);
void kbdreset(void) {
  int ret = __kbdreset();
  if (ret)
    printf("__kbdreset failed: %x", ret);
}


x86 assembly (clang, -O0):
<kbdreset>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <__kbdreset@plt>
mov    %eax,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     114b <kbdreset+0x2b>
mov    -0x4(%rbp),%esi
lea    0xeba(%rip),%rdi
call   1040 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<kbdreset>:
push   %rax
xor    %eax,%eax
call   1030 <__kbdreset@plt>
test   %eax,%eax
je     113b <kbdreset+0x1b>
lea    0xecd(%rip),%rdi
mov    %eax,%esi
pop    %rax
jmp    1040 <printf@plt>
pop    %rax
ret

LLVM IR (-O0):
@.str = [22 x i8] c"__kbdreset failed: %x\00"
define void @kbdreset() {
%1 = alloca i32
%2 = call i32 (...) @__kbdreset()
store i32 %2, i32* %1
%3 = load i32, i32* %1
%4 = icmp ne i32 %3, 0
br i1 %4, label %5, label %8
5: ; preds = %0
%6 = load i32, i32* %1
%7 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i32 %6)
br label %8
8: ; preds = %5, %0
ret void
}

LLVM IR (-O2):
@.str = [22 x i8] c"__kbdreset failed: %x\00"
define void @kbdreset() {
%1 = tail call i32 (...) @__kbdreset()
%2 = icmp eq i32 %1, 0
br i1 %2, label %5, label %3
3: ; preds = %0
%4 = tail call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i32 %1)
br label %5
5: ; preds = %3, %0
ret void
}
/* Type definitions */
typedef double uint32_t;

/* Variables and functions */
double sfmt_to_real1(uint32_t v) { return v * (1.0 / 4294967295.0); }


x86 assembly (clang, -O0):
<sfmt_to_real1>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  0xeef(%rip),%xmm0
mulsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<sfmt_to_real1>:
mulsd  0xef8(%rip),%xmm0
ret

LLVM IR (-O0):
define double @sfmt_to_real1(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fmul double %3, 0x3DF0000000100000
ret double %4
}

LLVM IR (-O2):
define double @sfmt_to_real1(double %0) {
%2 = fmul double %0, 0x3DF0000000100000
ret double %2
}
/* Variables and functions */
int /*<<< orphan*/ get_entropy(unsigned char *, int);
void mk_challenge(unsigned char *c, int length) { get_entropy(c, length); }


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

x86 assembly (clang, -O2):
<mk_challenge>:
jmp    1030 <get_entropy@plt>

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

LLVM IR (-O2):
define void @mk_challenge(i8* %0, i32 %1) {
%3 = tail call i32 @get_entropy(i8* %0, i32 %1)
ret void
}
double i0_(x)
double *x;
{
  double result;
  result = cephes_i0(*x);
  return result;
}


x86 assembly (clang, -O0):
<i0_>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm0
mov    $0x1,%al
call   1030 <cephes_i0@plt>
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<i0_>:
push   %rax
movsd  (%rdi),%xmm0
mov    $0x1,%al
call   1030 <cephes_i0@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @i0_(double* %0) {
%2 = alloca double*
%3 = alloca double
store double* %0, double** %2
%4 = load double*, double** %2
%5 = load double, double* %4
%6 = call i32 (double, ...) bitcast (i32 (...)* @cephes_i0 to i32 (double, ...)*)(double %5)
%7 = sitofp i32 %6 to double
store double %7, double* %3
%8 = load double, double* %3
ret double %8
}

LLVM IR (-O2):
define double @i0_(double* nocapture %0) {
%2 = load double, double* %0
%3 = tail call i32 (double, ...) bitcast (i32 (...)* @cephes_i0 to i32 (double, ...)*)(double %2)
%4 = sitofp i32 %3 to double
ret double %4
}
intrEXIT(inter) { exit(inter); }


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

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

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

LLVM IR (-O2):
define i32 @intrEXIT(i32 %0) {
tail call void @exit(i32 %0)
unreachable
}
void toc_debug_printf(char *fmt, ...) {}


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

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

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

LLVM IR (-O2):
define void @toc_debug_printf(i8* nocapture %0, ...) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ display_clear();
int /*<<< orphan*/ display_init();
int /*<<< orphan*/ sceKernelExitGame();
int /*<<< orphan*/ sceKernelSleepThread();
int /*<<< orphan*/ setup_callbacks();
int _main(int args, void *argp) {
  setup_callbacks();
  display_init();
  display_clear();
  sceKernelSleepThread();
  sceKernelExitGame();
  return 0;
}


x86 assembly (clang, -O0):
<_main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1070 <setup_callbacks@plt>
mov    $0x0,%al
call   1030 <display_init@plt>
mov    $0x0,%al
call   1050 <display_clear@plt>
mov    $0x0,%al
call   1060 <sceKernelSleepThread@plt>
mov    $0x0,%al
call   1040 <sceKernelExitGame@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_main>:
push   %rax
xor    %eax,%eax
call   1070 <setup_callbacks@plt>
xor    %eax,%eax
call   1030 <display_init@plt>
xor    %eax,%eax
call   1050 <display_clear@plt>
xor    %eax,%eax
call   1060 <sceKernelSleepThread@plt>
xor    %eax,%eax
call   1040 <sceKernelExitGame@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @_main(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
store i32 %0, i32* %3
store i8* %1, i8** %4
%5 = call i32 (...) @setup_callbacks()
%6 = call i32 (...) @display_init()
%7 = call i32 (...) @display_clear()
%8 = call i32 (...) @sceKernelSleepThread()
%9 = call i32 (...) @sceKernelExitGame()
ret i32 0
}

LLVM IR (-O2):
define i32 @_main(i32 %0, i8* nocapture readnone %1) {
%3 = tail call i32 (...) @setup_callbacks()
%4 = tail call i32 (...) @display_init()
%5 = tail call i32 (...) @display_clear()
%6 = tail call i32 (...) @sceKernelSleepThread()
%7 = tail call i32 (...) @sceKernelExitGame()
ret i32 0
}
void up_smp_finish(void) {}


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

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

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

LLVM IR (-O2):
define void @up_smp_finish() {
ret void
}
int isupper(int c) { return (c >= 'A' && c <= 'Z'); }


x86 assembly (clang, -O0):
<isupper>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
xor    %eax,%eax
cmpl   $0x41,-0x4(%rbp)
mov    %al,-0x5(%rbp)
jl     1120 <isupper+0x20>
cmpl   $0x5a,-0x4(%rbp)
setle  %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isupper>:
add    $0xffffffbf,%edi
xor    %eax,%eax
cmp    $0x1a,%edi
setb   %al
ret

LLVM IR (-O0):
define i32 @isupper(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp sge i32 %3, 65
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i32, i32* %2
%7 = icmp sle i32 %6, 90
br label %8
8: ; preds = %5, %1
%9 = phi i1 [ false, %1 ], [ %7, %5 ]
%10 = zext i1 %9 to i32
ret i32 %10
}

LLVM IR (-O2):
define i32 @isupper(i32 %0) {
%2 = add i32 %0, -65
%3 = icmp ult i32 %2, 26
%4 = zext i1 %3 to i32
ret i32 %4
}