xunge/DecIR huggingface dataset:
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
void TimerEnable(uint32_t ui32Base, uint32_t ui32Timer) {
  ;

  ;
  (*((volatile unsigned long *)(ui32Base + 0x0000000C))) |=
      ui32Timer & (0x00000001 | 0x00000100);
}


x86 assembly (clang, -O0):
<TimerEnable>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
and    $0x101,%eax
movslq %eax,%rdx
mov    -0x4(%rbp),%eax
add    $0xc,%eax
cltq
mov    (%rax),%rcx
or     %rdx,%rcx
mov    %rcx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<TimerEnable>:
and    $0x101,%esi
movslq %edi,%rax
or     %rsi,0xc(%rax)
ret

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

LLVM IR (-O2):
define void @TimerEnable(i32 %0, i32 %1) {
%3 = and i32 %1, 257
%4 = zext i32 %3 to i64
%5 = add nsw i32 %0, 12
%6 = sext i32 %5 to i64
%7 = inttoptr i64 %6 to i64*
%8 = load volatile i64, i64* %7
%9 = or i64 %8, %4
store volatile i64 %9, i64* %7
ret void
}
void rop3_163_0_0(unsigned char *D, unsigned char S, unsigned char T) {
  unsigned char stk1;
  unsigned char stk2;
  unsigned char stk3;
  stk3 = S ^ *D;
  stk2 = T | stk3;
  stk1 = *D ^ stk2;
  stk1 = ~stk1;
  *D = stk1;
}


x86 assembly (clang, -O0):
<rop3_163_0_0>:
push   %rbp
mov    %rsp,%rbp
mov    %dl,%al
mov    %sil,%cl
mov    %rdi,-0x8(%rbp)
mov    %cl,-0x9(%rbp)
mov    %al,-0xa(%rbp)
movzbl -0x9(%rbp),%eax
mov    -0x8(%rbp),%rcx
movzbl (%rcx),%ecx
xor    %ecx,%eax
mov    %al,-0xd(%rbp)
movzbl -0xa(%rbp),%eax
movzbl -0xd(%rbp),%ecx
or     %ecx,%eax
mov    %al,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
movzbl -0xc(%rbp),%ecx
xor    %ecx,%eax
mov    %al,-0xb(%rbp)
movzbl -0xb(%rbp),%eax
xor    $0xffffffff,%eax
mov    %al,-0xb(%rbp)
mov    -0xb(%rbp),%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<rop3_163_0_0>:
mov    (%rdi),%al
xor    %al,%sil
or     %dl,%sil
xor    %al,%sil
not    %sil
mov    %sil,(%rdi)
ret

LLVM IR (-O0):
define void @rop3_163_0_0(i8* %0, i8 zeroext %1, i8 zeroext %2) {
%4 = alloca i8*
%5 = alloca i8
%6 = alloca i8
%7 = alloca i8
%8 = alloca i8
%9 = alloca i8
store i8* %0, i8** %4
store i8 %1, i8* %5
store i8 %2, i8* %6
%10 = load i8, i8* %5
%11 = zext i8 %10 to i32
%12 = load i8*, i8** %4
%13 = load i8, i8* %12
%14 = zext i8 %13 to i32
%15 = xor i32 %11, %14
%16 = trunc i32 %15 to i8
store i8 %16, i8* %9
%17 = load i8, i8* %6
%18 = zext i8 %17 to i32
%19 = load i8, i8* %9
%20 = zext i8 %19 to i32
%21 = or i32 %18, %20
%22 = trunc i32 %21 to i8
store i8 %22, i8* %8
%23 = load i8*, i8** %4
%24 = load i8, i8* %23
%25 = zext i8 %24 to i32
%26 = load i8, i8* %8
%27 = zext i8 %26 to i32
%28 = xor i32 %25, %27
%29 = trunc i32 %28 to i8
store i8 %29, i8* %7
%30 = load i8, i8* %7
%31 = zext i8 %30 to i32
%32 = xor i32 %31, -1
%33 = trunc i32 %32 to i8
store i8 %33, i8* %7
%34 = load i8, i8* %7
%35 = load i8*, i8** %4
store i8 %34, i8* %35
ret void
}

LLVM IR (-O2):
define void @rop3_163_0_0(i8* nocapture %0, i8 zeroext %1, i8 zeroext %2) {
%4 = load i8, i8* %0
%5 = xor i8 %4, %1
%6 = or i8 %5, %2
%7 = xor i8 %4, %6
%8 = xor i8 %7, -1
store i8 %8, i8* %0
ret void
}
void RT_ASSERT(int exp, const char *fmt, ...) {}


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

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

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

LLVM IR (-O2):
define void @RT_ASSERT(i32 %0, i8* nocapture %1, ...) {
ret void
}
void prefetchw(const void __attribute__((unused)) * x) { ; }


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

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

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

LLVM IR (-O2):
define void @prefetchw(i8* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ echo(char *);
int /*<<< orphan*/ func_with_args(int, int, int);
main() {
  echo("Main, yo!");
  func_with_args(4, 5, 6);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1030 <echo@plt>
mov    $0x4,%edi
mov    $0x5,%esi
mov    $0x6,%edx
call   1040 <func_with_args@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <echo@plt>
mov    $0x4,%edi
mov    $0x5,%esi
mov    $0x6,%edx
call   1040 <func_with_args@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [10 x i8] c"Main, yo!\00"
define i32 @main() {
%1 = call i32 @echo(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @func_with_args(i32 4, i32 5, i32 6)
ret i32 0
}

LLVM IR (-O2):
@.str = [10 x i8] c"Main, yo!\00"
define i32 @main() {
%1 = tail call i32 @echo(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @func_with_args(i32 4, i32 5, i32 6)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ set_current_paper_index(int);
void clear_current_paper_index(void) { set_current_paper_index(1); }


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

x86 assembly (clang, -O2):
<clear_current_paper_index>:
mov    $0x1,%edi
jmp    1030 <set_current_paper_index@plt>

LLVM IR (-O0):
define void @clear_current_paper_index() {
%1 = call i32 @set_current_paper_index(i32 1)
ret void
}

LLVM IR (-O2):
define void @clear_current_paper_index() {
%1 = tail call i32 @set_current_paper_index(i32 1)
ret void
}
/* Type definitions */
typedef scalar_t__ time_t;
struct tm {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ fflush(int /*<<< orphan*/);
scalar_t__ mktime(struct tm *);
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ stdout;
void timestamp_display(struct tm *current_time) {
  time_t time = mktime(current_time);
  printf("\r%i", (int)time);
  fflush(stdout);
}


x86 assembly (clang, -O0):
<timestamp_display>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1050 <mktime@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %eax,%esi
lea    0xeaa(%rip),%rdi
call   1030 <printf@plt>
mov    0x2e7e(%rip),%rax
mov    (%rax),%edi
call   1040 <fflush@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<timestamp_display>:
push   %rax
call   1050 <mktime@plt>
lea    0xec3(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
mov    0x2e95(%rip),%rax
mov    (%rax),%edi
pop    %rax
jmp    1040 <fflush@plt>

LLVM IR (-O0):
%struct.tm = type { i32 }
@.str = [4 x i8] c"\0D%i\00"
@stdout = global i32 0
define void @timestamp_display(%struct.tm* %0) {
%2 = alloca %struct.tm*
%3 = alloca i64
store %struct.tm* %0, %struct.tm** %2
%4 = load %struct.tm*, %struct.tm** %2
%5 = call i64 @mktime(%struct.tm* %4)
store i64 %5, i64* %3
%6 = load i64, i64* %3
%7 = trunc i64 %6 to i32
%8 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %7)
%9 = load i32, i32* @stdout
%10 = call i32 @fflush(i32 %9)
ret void
}

LLVM IR (-O2):
%struct.tm = type { i32 }
@.str = [4 x i8] c"\0D%i\00"
@stdout = global i32 0
define void @timestamp_display(%struct.tm* nocapture %0) {
%2 = tail call i64 @mktime(%struct.tm* %0)
%3 = trunc i64 %2 to i32
%4 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %3)
%5 = load i32, i32* @stdout
%6 = tail call i32 @fflush(i32 %5)
ret void
}
/* Type definitions */
typedef scalar_t__ uint64_t;

/* Variables and functions */
int eq(uint64_t *pri_1, uint64_t *pri_2, int n_chunks) {
  n_chunks -= 1;
  while (n_chunks >= 0) {
    if (pri_1[n_chunks] != pri_2[n_chunks])
      return false;
    n_chunks--;
  }
  return true;
}


x86 assembly (clang, -O0):
<eq>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %edx,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x1c(%rbp)
cmpl   $0x0,-0x1c(%rbp)
jl     115a <eq+0x5a>
mov    -0x10(%rbp),%rax
movslq -0x1c(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
mov    -0x18(%rbp),%rcx
movslq -0x1c(%rbp),%rdx
cmp    (%rcx,%rdx,8),%rax
je     114c <eq+0x4c>
movl   $0x0,-0x4(%rbp)
jmp    1161 <eq+0x61>
mov    -0x1c(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x1c(%rbp)
jmp    1118 <eq+0x18>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<eq>:
mov    %edx,%eax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
test   %eax,%eax
jle    112a <eq+0x2a>
mov    -0x8(%rdi,%rax,8),%rcx
lea    -0x1(%rax),%rdx
cmp    -0x8(%rsi,%rax,8),%rcx
mov    %rdx,%rax
je     1110 <eq+0x10>
xor    %eax,%eax
ret
mov    $0x1,%eax
ret

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

LLVM IR (-O2):
define i32 @eq(i64* nocapture %0, i64* nocapture %1, i32 %2) {
%4 = zext i32 %2 to i64
br label %5
5: ; preds = %10, %3
%6 = phi i64 [ %7, %10 ], [ %4, %3 ]
%7 = add nsw i64 %6, -1
%8 = trunc i64 %6 to i32
%9 = icmp sgt i32 %8, 0
br i1 %9, label %10, label %16
10: ; preds = %5
%11 = getelementptr inbounds i64, i64* %0, i64 %7
%12 = load i64, i64* %11
%13 = getelementptr inbounds i64, i64* %1, i64 %7
%14 = load i64, i64* %13
%15 = icmp eq i64 %12, %14
br i1 %15, label %5, label %16
16: ; preds = %5, %10
%17 = phi i32 [ 0, %10 ], [ 1, %5 ]
ret i32 %17
}
void link_error6() {}


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

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

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

LLVM IR (-O2):
define void @link_error6() {
ret void
}
void unfreeze(int unused) { return; }


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

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

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

LLVM IR (-O2):
define void @unfreeze(i32 %0) {
ret void
}
int main(int argc, const char *argv[]) {
  struct nested_struct {
    double c;
  };
  struct my_struct {
    int a;
    struct nested_struct b[2][2];
  };
  struct my_struct array[2] = {{1, {{{3.5}, {3.6}}, {{3.7}, {3.8}}}},
                               {2, {{{4.5}, {4.6}}, {{18.9}, {18.95}}}}};
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0x60(%rbp),%rdi
lea    0xecf(%rip),%rsi
mov    $0x50,%edx
call   1030 <memcpy@plt>
xor    %eax,%eax
add    $0x60,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.my_struct = type { i32, [2 x [2 x %struct.nested_struct]] }
%struct.nested_struct = type { double }
@__const.main.array = [2 x %struct.my_struct] [%struct.my_struct { i32 1, [2 x [2 x %struct.nested_struct]] [[2 x %struct.nested_struct] [%struct.nested_struct { double 3.500000e+00 }, %struct.nested_struct { double 3.600000e+00 }], [2 x %struct.nested_struct] [%struct.nested_struct { double 3.700000e+00 }, %struct.nested_struct { double 3.800000e+00 }]] }, %struct.my_struct { i32 2, [2 x [2 x %struct.nested_struct]] [[2 x %struct.nested_struct] [%struct.nested_struct { double 4.500000e+00 }, %struct.nested_struct { double 4.600000e+00 }], [2 x %struct.nested_struct] [%struct.nested_struct { double 1.890000e+01 }, %struct.nested_struct { double 1.895000e+01 }]] }]
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [2 x %struct.my_struct]
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = bitcast [2 x %struct.my_struct]* %6 to i8*
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
ret i32 0
}
int test_imm_FFuint32_mem(unsigned int *val) {
  return ((*val) & (0xFF << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_FFuint32_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%edx
and    $0xff,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_FFuint32_mem>:
cmpb   $0x0,(%rdi)
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_FFuint32_mem(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = load i32, i32* %3
%5 = and i32 %4, 255
%6 = icmp ne i32 %5, 0
%7 = zext i1 %6 to i64
%8 = select i1 %6, i32 -20, i32 -40
ret i32 %8
}

LLVM IR (-O2):
define i32 @test_imm_FFuint32_mem(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = and i32 %2, 255
%4 = icmp eq i32 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
int cstring_length(char *cstring, int max_length) {
  int length = 0;
  while (cstring[length] != '\0' && length < max_length) {
    ++length;
  }
  return length;
}


x86 assembly (clang, -O0):
<cstring_length>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
movsbl (%rax,%rcx,1),%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x11(%rbp)
je     1138 <cstring_length+0x38>
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
setl   %al
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%al
test   $0x1,%al
jne    1148 <cstring_length+0x48>
jmp    1156 <cstring_length+0x56>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1112 <cstring_length+0x12>
mov    -0x10(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<cstring_length>:
movslq %esi,%rcx
xor    %edx,%edx
cs nopw 0x0(%rax,%rax,1)
nop
lea    0x1(%rdx),%rax
cmpb   $0x0,(%rdi,%rdx,1)
je     1122 <cstring_length+0x22>
cmp    %rcx,%rdx
mov    %rax,%rdx
jl     1110 <cstring_length+0x10>
add    $0xffffffff,%eax
ret

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

LLVM IR (-O2):
define i32 @cstring_length(i8* nocapture %0, i32 %1) {
%3 = sext i32 %1 to i64
br label %4
4: ; preds = %4, %2
%5 = phi i64 [ %11, %4 ], [ 0, %2 ]
%6 = getelementptr inbounds i8, i8* %0, i64 %5
%7 = load i8, i8* %6
%8 = icmp ne i8 %7, 0
%9 = icmp slt i64 %5, %3
%10 = select i1 %8, i1 %9, i1 false
%11 = add nuw nsw i64 %5, 1
br i1 %10, label %4, label %12
12: ; preds = %4
%13 = trunc i64 %5 to i32
ret i32 %13
}
float relu(float input) { return (input > 0) ? input : 0; }


x86 assembly (clang, -O0):
<relu>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jbe    1129 <relu+0x29>
movss  -0x4(%rbp),%xmm0
movss  %xmm0,-0x8(%rbp)
jmp    1136 <relu+0x36>
xorps  %xmm0,%xmm0
movss  %xmm0,-0x8(%rbp)
jmp    1136 <relu+0x36>
movss  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<relu>:
xorps  %xmm1,%xmm1
maxss  %xmm1,%xmm0
ret

LLVM IR (-O0):
define float @relu(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = fcmp ogt float %3, 0.000000e+00
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = load float, float* %2
br label %8
7: ; preds = %1
br label %8
8: ; preds = %7, %5
%9 = phi float [ %6, %5 ], [ 0.000000e+00, %7 ]
ret float %9
}

LLVM IR (-O2):
define float @relu(float %0) {
%2 = fcmp ogt float %0, 0.000000e+00
%3 = select i1 %2, float %0, float 0.000000e+00
ret float %3
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
int /*<<< orphan*/ NRF24_InsWrite(int /*<<< orphan*/, int /*<<< orphan*/ *,
                                  int /*<<< orphan*/);
void NRF24_Instruction(uint8_t ins) { NRF24_InsWrite(ins, NULL, 0); }


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

x86 assembly (clang, -O2):
<NRF24_Instruction>:
xor    %esi,%esi
xor    %edx,%edx
jmp    1030 <NRF24_InsWrite@plt>

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

LLVM IR (-O2):
define void @NRF24_Instruction(i32 %0) {
%2 = tail call i32 @NRF24_InsWrite(i32 %0, i32* null, i32 0)
ret void
}
int test_imm_8Buint64_highword_mem(unsigned long long *val) {
  return ((*val >> 32) & (0x8B << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_8Buint64_highword_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rdx
shr    $0x20,%rdx
and    $0x8b,%rdx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_8Buint64_highword_mem>:
testb  $0x8b,0x4(%rdi)
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_8Buint64_highword_mem(i64* %0) {
%2 = alloca i64*
store i64* %0, i64** %2
%3 = load i64*, i64** %2
%4 = load i64, i64* %3
%5 = lshr i64 %4, 32
%6 = and i64 %5, 139
%7 = icmp ne i64 %6, 0
%8 = zext i1 %7 to i64
%9 = select i1 %7, i32 -20, i32 -40
ret i32 %9
}

LLVM IR (-O2):
define i32 @test_imm_8Buint64_highword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 597000454144
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int _ada_use_c2phc4c(int, int *, int *, double *, int /*<<< orphan*/);
int syscon_number_of_dobldobl_Laurentials(int *length) {
  int *b, fail;
  double *c;
  fail = _ada_use_c2phc4c(552, length, b, c, 0);
  return fail;
}


x86 assembly (clang, -O0):
<syscon_number_of_dobldobl_Laurentials>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    $0x228,%edi
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc4c@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<syscon_number_of_dobldobl_Laurentials>:
mov    %rdi,%rsi
mov    $0x228,%edi
xor    %r8d,%r8d
jmp    1030 <_ada_use_c2phc4c@plt>

LLVM IR (-O0):
define i32 @syscon_number_of_dobldobl_Laurentials(i32* %0) {
%2 = alloca i32*
%3 = alloca i32*
%4 = alloca i32
%5 = alloca double*
store i32* %0, i32** %2
%6 = load i32*, i32** %2
%7 = load i32*, i32** %3
%8 = load double*, double** %5
%9 = call i32 @_ada_use_c2phc4c(i32 552, i32* %6, i32* %7, double* %8, i32 0)
store i32 %9, i32* %4
%10 = load i32, i32* %4
ret i32 %10
}

LLVM IR (-O2):
define i32 @syscon_number_of_dobldobl_Laurentials(i32* %0) {
%2 = tail call i32 @_ada_use_c2phc4c(i32 552, i32* %0, i32* undef, double* undef, i32 0)
ret i32 %2
}
int mlr_imax2(int a, int b) {
  if (a >= b)
    return a;
  else
    return b;
}


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

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

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

LLVM IR (-O2):
define i32 @mlr_imax2(i32 %0, i32 %1) {
%3 = icmp slt i32 %0, %1
%4 = select i1 %3, i32 %1, i32 %0
ret i32 %4
}
void prefetch(void *x) { return; }


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

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

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

LLVM IR (-O2):
define void @prefetch(i8* nocapture %0) {
ret void
}
/* Type definitions */
typedef int uint8_t;
struct pcg_state_setseq_16 {
  int dummy;
};

/* Variables and functions */
int pcg_setseq_16_xsh_rr_8_random_r(struct pcg_state_setseq_16 *);
uint8_t pcg_setseq_16_xsh_rr_8_boundedrand_r(struct pcg_state_setseq_16 *rng,
                                             uint8_t bound) {
  uint8_t threshold = ((uint8_t)(-bound)) % bound;
  for (;;) {
    uint8_t r = pcg_setseq_16_xsh_rr_8_random_r(rng);
    if (r >= threshold)
      return r % bound;
  }
}


x86 assembly (clang, -O0):
<pcg_setseq_16_xsh_rr_8_boundedrand_r>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
xor    %eax,%eax
sub    -0xc(%rbp),%eax
cltd
idivl  -0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <pcg_setseq_16_xsh_rr_8_random_r@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x10(%rbp),%eax
jl     1152 <pcg_setseq_16_xsh_rr_8_boundedrand_r+0x42>
mov    -0x14(%rbp),%eax
cltd
idivl  -0xc(%rbp)
mov    %edx,%eax
add    $0x20,%rsp
pop    %rbp
ret
jmp    112b <pcg_setseq_16_xsh_rr_8_boundedrand_r+0x1b>

x86 assembly (clang, -O2):
<pcg_setseq_16_xsh_rr_8_boundedrand_r>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %rdi,%rbx
nopl   0x0(%rax,%rax,1)
mov    %rbx,%rdi
call   1030 <pcg_setseq_16_xsh_rr_8_random_r@plt>
test   %eax,%eax
js     1120 <pcg_setseq_16_xsh_rr_8_boundedrand_r+0x10>
cltd
idiv   %ebp
mov    %edx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
%struct.pcg_state_setseq_16 = type { i32 }
define i32 @pcg_setseq_16_xsh_rr_8_boundedrand_r(%struct.pcg_state_setseq_16* %0, i32 %1) {
%3 = alloca %struct.pcg_state_setseq_16*
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store %struct.pcg_state_setseq_16* %0, %struct.pcg_state_setseq_16** %3
store i32 %1, i32* %4
%7 = load i32, i32* %4
%8 = sub nsw i32 0, %7
%9 = load i32, i32* %4
%10 = srem i32 %8, %9
store i32 %10, i32* %5
br label %11
11: ; preds = %21, %2
%12 = load %struct.pcg_state_setseq_16*, %struct.pcg_state_setseq_16** %3
%13 = call i32 @pcg_setseq_16_xsh_rr_8_random_r(%struct.pcg_state_setseq_16* %12)
store i32 %13, i32* %6
%14 = load i32, i32* %6
%15 = load i32, i32* %5
%16 = icmp sge i32 %14, %15
br i1 %16, label %17, label %21
17: ; preds = %11
%18 = load i32, i32* %6
%19 = load i32, i32* %4
%20 = srem i32 %18, %19
ret i32 %20
21: ; preds = %11
br label %11
}

LLVM IR (-O2):
%struct.pcg_state_setseq_16 = type { i32 }
define i32 @pcg_setseq_16_xsh_rr_8_boundedrand_r(%struct.pcg_state_setseq_16* %0, i32 %1) {
br label %3
3: ; preds = %3, %2
%4 = tail call i32 @pcg_setseq_16_xsh_rr_8_random_r(%struct.pcg_state_setseq_16* %0)
%5 = icmp sgt i32 %4, -1
br i1 %5, label %6, label %3
6: ; preds = %3
%7 = srem i32 %4, %1
ret i32 %7
}
void free_convert_matrix(b, nrl, nrh, ncl, nch) double **b;
int nrl, nrh, ncl, nch;
{ free((char *)(b + nrl)); }


x86 assembly (clang, -O0):
<free_convert_matrix>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    %r8d,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
movslq -0xc(%rbp),%rax
shl    $0x3,%rax
add    %rax,%rdi
call   1030 <free@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<free_convert_matrix>:
movslq %esi,%rax
lea    (%rdi,%rax,8),%rdi
jmp    1030 <free@plt>

LLVM IR (-O0):
define void @free_convert_matrix(double** %0, i32 %1, i32 %2, i32 %3, i32 %4) {
%6 = alloca double**
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
store double** %0, double*** %6
store i32 %1, i32* %7
store i32 %2, i32* %8
store i32 %3, i32* %9
store i32 %4, i32* %10
%11 = load double**, double*** %6
%12 = load i32, i32* %7
%13 = sext i32 %12 to i64
%14 = getelementptr inbounds double*, double** %11, i64 %13
%15 = bitcast double** %14 to i8*
ret void
}

LLVM IR (-O2):
define void @free_convert_matrix(double** nocapture %0, i32 %1, i32 %2, i32 %3, i32 %4) {
%6 = sext i32 %1 to i64
%7 = getelementptr inbounds double*, double** %0, i64 %6
%8 = bitcast double** %7 to i8*
tail call void @free(i8* %8)
ret void
}
unsigned long round_page(unsigned long page) {
  return ((page + 0x1000 - 1) & ~(0x1000 - 1));
}


x86 assembly (clang, -O0):
<round_page>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x1000,%rax
sub    $0x1,%rax
and    $0xfffffffffffff000,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<round_page>:
lea    0xfff(%rdi),%rax
and    $0xfffffffffffff000,%rax
ret

LLVM IR (-O0):
define i64 @round_page(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = add i64 %3, 4096
%5 = sub i64 %4, 1
%6 = and i64 %5, -4096
ret i64 %6
}

LLVM IR (-O2):
define i64 @round_page(i64 %0) {
%2 = add i64 %0, 4095
%3 = and i64 %2, -4096
ret i64 %3
}
/* Type definitions */
typedef int /*<<< orphan*/ __m64;
typedef int /*<<< orphan*/ __m128;

/* Variables and functions */
int /*<<< orphan*/ _mm_cvt_ps2pi(int /*<<< orphan*/);
__m64 test_mm_cvt_ps2pi(__m128 a) { return _mm_cvt_ps2pi(a); }


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

x86 assembly (clang, -O2):
<test_mm_cvt_ps2pi>:
jmp    1030 <_mm_cvt_ps2pi@plt>

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

LLVM IR (-O2):
define i32 @test_mm_cvt_ps2pi(i32 %0) {
%2 = tail call i32 @_mm_cvt_ps2pi(i32 %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *, char const *);
void printAndExit(const char *what) {
  printf("%.80s", what);
  exit(-1);
}


x86 assembly (clang, -O0):
<printAndExit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xec9(%rip),%rdi
call   1030 <printf@plt>
mov    $0xffffffff,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<printAndExit>:
push   %rax
mov    %rdi,%rsi
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
mov    $0xffffffff,%edi
call   1040 <exit@plt>

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

LLVM IR (-O2):
@.str = [6 x i8] c"%.80s\00"
define void @printAndExit(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = tail call i32 @exit(i32 -1)
unreachable
}
int execute_kill() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @execute_kill() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ memset(char *, char, int);
int /*<<< orphan*/ strcpy(char *, char *);
void function(char *str) {
  char buffer[16];
  memset(buffer, 'A', 16);
  strcpy(buffer, str);
}


x86 assembly (clang, -O0):
<function>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
lea    -0x20(%rbp),%rdi
mov    $0x41,%esi
mov    $0x10,%edx
call   1040 <memset@plt>
lea    -0x20(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1030 <strcpy@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<function>:
push   %r14
push   %rbx
sub    $0x18,%rsp
mov    %rdi,%rbx
mov    %rsp,%r14
mov    %r14,%rdi
mov    $0x41,%esi
mov    $0x10,%edx
call   1040 <memset@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
call   1030 <strcpy@plt>
add    $0x18,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @function(i8* %0) {
%2 = alloca i8*
%3 = alloca [16 x i8]
store i8* %0, i8** %2
%4 = getelementptr inbounds [16 x i8], [16 x i8]* %3, i64 0, i64 0
%5 = call i32 @memset(i8* %4, i8 signext 65, i32 16)
%6 = getelementptr inbounds [16 x i8], [16 x i8]* %3, i64 0, i64 0
%7 = load i8*, i8** %2
%8 = call i32 @strcpy(i8* %6, i8* %7)
ret void
}

LLVM IR (-O2):
define void @function(i8* %0) {
%2 = alloca [16 x i8]
%3 = getelementptr inbounds [16 x i8], [16 x i8]* %2, i64 0, i64 0
%4 = call i32 @memset(i8* %3, i8 signext 65, i32 16)
%5 = call i32 @strcpy(i8* %3, i8* %0)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *);
void fprint_da(FILE *stream) {
  fprintf(stream, "DA    A                         ");
}


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

x86 assembly (clang, -O2):
<fprint_da>:
mov    %rdi,%rcx
lea    0xee6(%rip),%rdi
mov    $0x20,%esi
mov    $0x1,%edx
jmp    1030 <fwrite@plt>

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

LLVM IR (-O2):
@.str = [33 x i8] c"DA A \00"
define void @fprint_da(i32* nocapture %0) {
%2 = tail call i64 @fwrite(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0), i64 32, i64 1, i32* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ clsrc();
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ txt_ctrd(char *, char);
void header() {
  clsrc();
  printf("\n\n");
  txt_ctrd("========================", '\n');
  txt_ctrd("|| + OR -, THE GAME ! ||", '\n');
  txt_ctrd("========================", '\n');
  printf("\n\n\n");
}


x86 assembly (clang, -O0):
<header>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <clsrc@plt>
lea    0xef1(%rip),%rdi
call   1030 <printf@plt>
lea    0xeb2(%rip),%rdi
mov    $0xa,%esi
call   1050 <txt_ctrd@plt>
lea    0xeba(%rip),%rdi
mov    $0xa,%esi
call   1050 <txt_ctrd@plt>
lea    0xe90(%rip),%rdi
mov    $0xa,%esi
call   1050 <txt_ctrd@plt>
lea    0xeb1(%rip),%rdi
call   1030 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<header>:
push   %rbx
xor    %eax,%eax
call   1040 <clsrc@plt>
lea    0xef4(%rip),%rdi
call   1030 <puts@plt>
lea    0xeb5(%rip),%rbx
mov    %rbx,%rdi
mov    $0xa,%esi
call   1050 <txt_ctrd@plt>
lea    0xeba(%rip),%rdi
mov    $0xa,%esi
call   1050 <txt_ctrd@plt>
mov    %rbx,%rdi
mov    $0xa,%esi
call   1050 <txt_ctrd@plt>
lea    0xeb5(%rip),%rdi
pop    %rbx
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [3 x i8] c"\0A\0A\00"
@.str.1 = [25 x i8] c"========================\00"
@.str.2 = [25 x i8] c"|| + OR -, THE GAME ! ||\00"
@.str.3 = [4 x i8] c"\0A\0A\0A\00"
define void @header() {
%1 = call i32 (...) @clsrc()
%2 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @txt_ctrd(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.1, i64 0, i64 0), i8 signext 10)
%4 = call i32 @txt_ctrd(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.2, i64 0, i64 0), i8 signext 10)
%5 = call i32 @txt_ctrd(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.1, i64 0, i64 0), i8 signext 10)
%6 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str.1 = [25 x i8] c"========================\00"
@.str.2 = [25 x i8] c"|| + OR -, THE GAME ! ||\00"
@str = [2 x i8] c"\0A\00"
@str.4 = [3 x i8] c"\0A\0A\00"
define void @header() {
%1 = tail call i32 (...) @clsrc()
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([2 x i8], [2 x i8]* @str, i64 0, i64 0))
%3 = tail call i32 @txt_ctrd(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.1, i64 0, i64 0), i8 signext 10)
%4 = tail call i32 @txt_ctrd(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.2, i64 0, i64 0), i8 signext 10)
%5 = tail call i32 @txt_ctrd(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.1, i64 0, i64 0), i8 signext 10)
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @str.4, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ libx2_f1();
int /*<<< orphan*/ printf(char *);
void libx1_f1(void) {
  printf("CALL libx1_f1\n");
  libx2_f1();
}


x86 assembly (clang, -O0):
<libx1_f1>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
mov    $0x0,%al
call   1040 <libx2_f1@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<libx1_f1>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <libx2_f1@plt>

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

LLVM IR (-O2):
@str = [14 x i8] c"CALL libx1_f1\00"
define void @libx1_f1() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 (...) @libx2_f1()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(char *);
void redlibfree(void *ptr) { free((char *)ptr); }


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

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

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

LLVM IR (-O2):
define void @redlibfree(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
void rec(int **u, int i) {
  *u = &i;
  if (i)
    return;
  else {
    int *a;
    i++;
    u = &a;
    rec(u, i);
    return;
  }
}


x86 assembly (clang, -O0):
<rec>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
lea    -0xc(%rbp),%rcx
mov    %rcx,(%rax)
cmpl   $0x0,-0xc(%rbp)
je     1139 <rec+0x29>
jmp    1156 <rec+0x46>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
lea    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1030 <rec@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rec>:
sub    $0x18,%rsp
lea    0xc(%rsp),%rax
mov    %rax,(%rdi)
test   %esi,%esi
je     1125 <rec+0x15>
add    $0x18,%rsp
ret
movl   $0x1,0xc(%rsp)
lea    0x10(%rsp),%rdi
mov    $0x1,%esi
call   1030 <rec@plt>
add    $0x18,%rsp
ret

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

LLVM IR (-O2):
define void @rec(i32** nocapture writeonly %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32*
store i32* %3, i32** %0
%5 = icmp eq i32 %1, 0
br i1 %5, label %6, label %8
6: ; preds = %2
%7 = bitcast i32** %4 to i8*
store i32 1, i32* %3
br label %8
8: ; preds = %2, %6
ret void
}
/* Variables and functions */
int /*<<< orphan*/ alarm(int);
int /*<<< orphan*/ printf(char *);
void sig_alarm(int signo) {
  printf("caughted alarm signal\n");
  alarm(3);
}


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

x86 assembly (clang, -O2):
<sig_alarm>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
mov    $0x3,%edi
pop    %rax
jmp    1040 <alarm@plt>

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

LLVM IR (-O2):
@str = [22 x i8] c"caughted alarm signal\00"
define void @sig_alarm(i32 %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @str, i64 0, i64 0))
%3 = tail call i32 @alarm(i32 3)
ret void
}
/* Variables and functions */
scalar_t__ isprime(int);
int /*<<< orphan*/ printf(char *, ...);
int main() {
  int num;
  printf("1\n");
  for (num = 2; num <= 100; num++) {
    if (isprime(num))
      printf("%d\n", num);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x2,-0x8(%rbp)
cmpl   $0x64,-0x8(%rbp)
jg     1184 <main+0x64>
mov    -0x8(%rbp),%edi
call   1040 <isprime@plt>
cmp    $0x0,%rax
je     1171 <main+0x51>
mov    -0x8(%rbp),%esi
lea    0xe99(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1176 <main+0x56>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1144 <main+0x24>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
lea    0xec9(%rip),%rdi
call   1030 <puts@plt>
mov    $0x2,%ebx
lea    0xeb4(%rip),%r14
jmp    1158 <main+0x28>
xchg   %ax,%ax
add    $0x1,%ebx
cmp    $0x65,%ebx
je     1172 <main+0x42>
mov    %ebx,%edi
call   1050 <isprime@plt>
test   %rax,%rax
je     1150 <main+0x20>
mov    %r14,%rdi
mov    %ebx,%esi
xor    %eax,%eax
call   1040 <printf@plt>
jmp    1150 <main+0x20>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
@.str.1 = [4 x i8] c"%d\0A\00"
@str = [2 x i8] c"1\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([2 x i8], [2 x i8]* @str, i64 0, i64 0))
br label %2
2: ; preds = %0, %8
%3 = phi i32 [ 2, %0 ], [ %9, %8 ]
%4 = tail call i64 @isprime(i32 %3)
%5 = icmp eq i64 %4, 0
br i1 %5, label %8, label %6
6: ; preds = %2
%7 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %3)
br label %8
8: ; preds = %2, %6
%9 = add nuw nsw i32 %3, 1
%10 = icmp eq i32 %9, 101
br i1 %10, label %11, label %2
11: ; preds = %8
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ exit(int /*<<< orphan*/);
unsigned int f(unsigned int);
main() {
  unsigned i;
  for (i = 0; i < 10000; i++)
    if (f(i) != i / 3)
      abort();
  exit(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x2710,-0x8(%rbp)
jae    1191 <main+0x61>
mov    -0x8(%rbp),%edi
call   1040 <f@plt>
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
mov    $0x3,%ecx
xor    %edx,%edx
div    %ecx
mov    %eax,%ecx
mov    -0xc(%rbp),%eax
cmp    %ecx,%eax
je     117e <main+0x4e>
mov    $0x0,%al
call   1030 <abort@plt>
jmp    1183 <main+0x53>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1146 <main+0x16>
xor    %edi,%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %ebx,%edi
call   1040 <f@plt>
movzwl %bx,%ecx
imul   $0xaaab,%ecx,%ecx
shr    $0x11,%ecx
cmp    %ecx,%eax
jne    1169 <main+0x39>
add    $0x1,%ebx
cmp    $0x2710,%ebx
jne    1140 <main+0x10>
xor    %edi,%edi
call   1050 <exit@plt>
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
br label %3
3: ; preds = %15, %0
%4 = load i32, i32* %2
%5 = icmp ult i32 %4, 10000
br i1 %5, label %6, label %18
6: ; preds = %3
%7 = load i32, i32* %2
%8 = call i32 @f(i32 %7)
%9 = load i32, i32* %2
%10 = udiv i32 %9, 3
%11 = icmp ne i32 %8, %10
br i1 %11, label %12, label %14
12: ; preds = %6
%13 = call i32 (...) @abort()
unreachable
14: ; preds = %6
br label %15
15: ; preds = %14
%16 = load i32, i32* %2
%17 = add i32 %16, 1
store i32 %17, i32* %2
br label %3
18: ; preds = %3
%19 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
define i32 @main() {
br label %4
1: ; preds = %4
%2 = add nuw nsw i32 %5, 1
%3 = icmp eq i32 %2, 10000
br i1 %3, label %13, label %4
4: ; preds = %0, %1
%5 = phi i32 [ 0, %0 ], [ %2, %1 ]
%6 = tail call i32 @f(i32 %5)
%7 = trunc i32 %5 to i16
%8 = udiv i16 %7, 3
%9 = zext i16 %8 to i32
%10 = icmp eq i32 %6, %9
br i1 %10, label %1, label %11
11: ; preds = %4
%12 = tail call i32 (...) @abort()
unreachable
13: ; preds = %1
%14 = tail call i32 @exit(i32 0)
unreachable
}
unsigned int tune2(unsigned int t) {
  return (t *
          (t >> 8 * (t >> 15 | t >> 8) & (20 | (t >> 19) * 5 >> t | t >> 3)));
}


x86 assembly (clang, -O0):
<tune2>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x4(%rbp),%edx
mov    -0x4(%rbp),%ecx
shr    $0xf,%ecx
mov    -0x4(%rbp),%esi
shr    $0x8,%esi
or     %esi,%ecx
shl    $0x3,%ecx
shr    %cl,%edx
mov    %edx,-0x8(%rbp)
mov    -0x4(%rbp),%ecx
shr    $0x13,%ecx
imul   $0x5,%ecx,%edx
mov    -0x4(%rbp),%ecx
shr    %cl,%edx
mov    -0x8(%rbp),%ecx
or     $0x14,%edx
mov    -0x4(%rbp),%esi
shr    $0x3,%esi
or     %esi,%edx
and    %edx,%ecx
imul   %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<tune2>:
mov    %edi,%eax
shr    $0xf,%eax
mov    %edi,%ecx
shr    $0x8,%ecx
or     %eax,%ecx
shl    $0x3,%ecx
mov    %edi,%edx
shr    %cl,%edx
mov    %edi,%eax
shr    $0x13,%eax
lea    (%rax,%rax,4),%esi
mov    %edi,%ecx
shr    %cl,%esi
mov    %edi,%eax
shr    $0x3,%eax
or     %esi,%eax
or     $0x14,%eax
and    %edx,%eax
imul   %edi,%eax
ret

LLVM IR (-O0):
define i32 @tune2(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = load i32, i32* %2
%5 = load i32, i32* %2
%6 = lshr i32 %5, 15
%7 = load i32, i32* %2
%8 = lshr i32 %7, 8
%9 = or i32 %6, %8
%10 = mul i32 8, %9
%11 = lshr i32 %4, %10
%12 = load i32, i32* %2
%13 = lshr i32 %12, 19
%14 = mul i32 %13, 5
%15 = load i32, i32* %2
%16 = lshr i32 %14, %15
%17 = or i32 20, %16
%18 = load i32, i32* %2
%19 = lshr i32 %18, 3
%20 = or i32 %17, %19
%21 = and i32 %11, %20
%22 = mul i32 %3, %21
ret i32 %22
}

LLVM IR (-O2):
define i32 @tune2(i32 %0) {
%2 = lshr i32 %0, 15
%3 = lshr i32 %0, 8
%4 = or i32 %2, %3
%5 = shl nuw nsw i32 %4, 3
%6 = lshr i32 %0, %5
%7 = lshr i32 %0, 19
%8 = mul nuw nsw i32 %7, 5
%9 = lshr i32 %8, %0
%10 = lshr i32 %0, 3
%11 = or i32 %10, %9
%12 = or i32 %11, 20
%13 = and i32 %6, %12
%14 = mul i32 %13, %0
ret i32 %14
}
void RandomFunc(unsigned short input[1], unsigned short output[1]) {
  unsigned short state[1];
  unsigned short local1;
  {
    state[0UL] = (input[0UL] + 51238316UL) + (unsigned short)8426;
    local1 = 0UL;
    while (local1 < 1UL) {
      local1 += 2UL;
    }
    output[0UL] = state[0UL] + (unsigned short)48993;
  }
}


x86 assembly (clang, -O0):
<RandomFunc>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movzwl (%rax),%eax
add    $0x30dd5ac,%rax
add    $0x20ea,%rax
mov    %ax,-0x12(%rbp)
movw   $0x0,-0x14(%rbp)
movzwl -0x14(%rbp),%eax
cmp    $0x1,%rax
jae    1148 <RandomFunc+0x48>
movzwl -0x14(%rbp),%eax
add    $0x2,%rax
mov    %ax,-0x14(%rbp)
jmp    1129 <RandomFunc+0x29>
movzwl -0x12(%rbp),%eax
add    $0xbf61,%eax
mov    %ax,%cx
mov    -0x10(%rbp),%rax
mov    %cx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<RandomFunc>:
movzwl (%rdi),%eax
add    $0xffffb5f7,%eax
mov    %ax,(%rsi)
ret

LLVM IR (-O0):
define void @RandomFunc(i16* %0, i16* %1) {
%3 = alloca i16*
%4 = alloca i16*
%5 = alloca [1 x i16]
%6 = alloca i16
store i16* %0, i16** %3
store i16* %1, i16** %4
%7 = load i16*, i16** %3
%8 = getelementptr inbounds i16, i16* %7, i64 0
%9 = load i16, i16* %8
%10 = zext i16 %9 to i64
%11 = add i64 %10, 51238316
%12 = add i64 %11, 8426
%13 = trunc i64 %12 to i16
%14 = getelementptr inbounds [1 x i16], [1 x i16]* %5, i64 0, i64 0
store i16 %13, i16* %14
store i16 0, i16* %6
br label %15
15: ; preds = %19, %2
%16 = load i16, i16* %6
%17 = zext i16 %16 to i64
%18 = icmp ult i64 %17, 1
br i1 %18, label %19, label %24
19: ; preds = %15
%20 = load i16, i16* %6
%21 = zext i16 %20 to i64
%22 = add i64 %21, 2
%23 = trunc i64 %22 to i16
store i16 %23, i16* %6
br label %15
24: ; preds = %15
%25 = getelementptr inbounds [1 x i16], [1 x i16]* %5, i64 0, i64 0
%26 = load i16, i16* %25
%27 = zext i16 %26 to i32
%28 = add nsw i32 %27, 48993
%29 = trunc i32 %28 to i16
%30 = load i16*, i16** %4
%31 = getelementptr inbounds i16, i16* %30, i64 0
store i16 %29, i16* %31
ret void
}

LLVM IR (-O2):
define void @RandomFunc(i16* nocapture %0, i16* nocapture writeonly %1) {
%3 = load i16, i16* %0
%4 = add i16 %3, -18953
store i16 %4, i16* %1
ret void
}