xunge/DecIR huggingface dataset:
/* Type definitions */
typedef int /*<<< orphan*/ EC_KEY;

/* Variables and functions */
int /*<<< orphan*/ *ec_key_new_method_int(int /*<<< orphan*/ *,
                                          int /*<<< orphan*/ *);
EC_KEY *EC_KEY_new(void) { return ec_key_new_method_int(NULL, NULL); }


x86 assembly (clang, -O0):
<EC_KEY_new>:
push   %rbp
mov    %rsp,%rbp
xor    %eax,%eax
mov    %eax,%esi
mov    %rsi,%rdi
call   1030 <ec_key_new_method_int@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<EC_KEY_new>:
xor    %edi,%edi
xor    %esi,%esi
jmp    1030 <ec_key_new_method_int@plt>

LLVM IR (-O0):
define i32* @EC_KEY_new() {
%1 = call i32* @ec_key_new_method_int(i32* null, i32* null)
ret i32* %1
}

LLVM IR (-O2):
define i32* @EC_KEY_new() {
%1 = tail call i32* @ec_key_new_method_int(i32* null, i32* null)
ret i32* %1
}
void rtc_dev_prepare(struct rtc_device *rtc) {}


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

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

LLVM IR (-O0):
%struct.rtc_device = type opaque
define void @rtc_dev_prepare(%struct.rtc_device* %0) {
%2 = alloca %struct.rtc_device*
store %struct.rtc_device* %0, %struct.rtc_device** %2
ret void
}

LLVM IR (-O2):
%struct.rtc_device = type opaque
define void @rtc_dev_prepare(%struct.rtc_device* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ strcmp(char const *, char *);
int main(int argc, const char *argv[]) {
  if (argc == 6) {
    if (!strcmp(argv[1], "checkmembership")) {
      printf("user is a member\n");
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x6,-0x8(%rbp)
jne    116e <main+0x4e>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xeb1(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%eax
jne    1169 <main+0x49>
lea    0xeac(%rip),%rdi
call   1030 <printf@plt>
jmp    116e <main+0x4e>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
cmp    $0x6,%edi
jne    1146 <main+0x26>
mov    0x8(%rsi),%rdi
lea    0xecf(%rip),%rsi
call   1040 <strcmp@plt>
test   %eax,%eax
jne    1146 <main+0x26>
lea    0xecf(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [16 x i8] c"checkmembership\00"
@str = [17 x i8] c"user is a member\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp eq i32 %0, 6
br i1 %3, label %4, label %11
4: ; preds = %2
%5 = getelementptr inbounds i8*, i8** %1, i64 1
%6 = load i8*, i8** %5
%7 = tail call i32 @strcmp(i8* dereferenceable(1) %6, i8* dereferenceable(16) getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
%8 = icmp eq i32 %7, 0
br i1 %8, label %9, label %11
9: ; preds = %4
%10 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @str, i64 0, i64 0))
br label %11
11: ; preds = %4, %9, %2
ret i32 0
}
int PyDTrace_INSTANCE_NEW_DONE_ENABLED(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @PyDTrace_INSTANCE_NEW_DONE_ENABLED() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *);
void Coro_UnsupportedPlatformError(void) {
  printf("Io Scheduler error: no Coro_setupJmpbuf entry for this platform\n.");
  exit(1);
}


x86 assembly (clang, -O0):
<Coro_UnsupportedPlatformError>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

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

LLVM IR (-O0):
@.str = [66 x i8] c"Io Scheduler error: no Coro_setupJmpbuf entry for this platform\0A.\00"
define void @Coro_UnsupportedPlatformError() {
%1 = call i32 @printf(i8* getelementptr inbounds ([66 x i8], [66 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@.str = [66 x i8] c"Io Scheduler error: no Coro_setupJmpbuf entry for this platform\0A.\00"
define void @Coro_UnsupportedPlatformError() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([66 x i8], [66 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ scheduleTasks();
int startKernel() { scheduleTasks(); }


x86 assembly (clang, -O0):
<startKernel>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <scheduleTasks@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @startKernel() {
%1 = alloca i32
%2 = call i32 (...) @scheduleTasks()
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
define i32 @startKernel() {
%1 = tail call i32 (...) @scheduleTasks()
ret i32 undef
}
int countPrintu(unsigned long n, unsigned long b) {
  unsigned long a;
  int res;
  res = 0;
  a = n / b;
  if (a != 0) {
    res += countPrintu(a, b);
  }
  return res + 1;
}


x86 assembly (clang, -O0):
<countPrintu>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x1c(%rbp)
mov    -0x8(%rbp),%rax
xor    %ecx,%ecx
mov    %ecx,%edx
divq   -0x10(%rbp)
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     1155 <countPrintu+0x45>
mov    -0x18(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <countPrintu@plt>
add    -0x1c(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<countPrintu>:
mov    $0x1,%ecx
cmp    %rdi,%rsi
jbe    110d <countPrintu+0xd>
mov    %ecx,%eax
ret
mov    %rdi,%rax
jmp    112d <countPrintu+0x2d>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
xor    %edx,%edx
div    %rsi
add    $0x1,%ecx
cmp    %rsi,%rax
jb     110a <countPrintu+0xa>
mov    %rax,%rdx
or     %rsi,%rdx
shr    $0x20,%rdx
jne    1120 <countPrintu+0x20>
xor    %edx,%edx
div    %esi
jmp    1125 <countPrintu+0x25>

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

LLVM IR (-O2):
define i32 @countPrintu(i64 %0, i64 %1) {
%3 = icmp ugt i64 %1, %0
br i1 %3, label %12, label %4
4: ; preds = %2, %4
%5 = phi i64 [ %7, %4 ], [ %0, %2 ]
%6 = phi i32 [ %8, %4 ], [ 0, %2 ]
%7 = udiv i64 %5, %1
%8 = add i32 %6, 1
%9 = icmp ult i64 %7, %1
br i1 %9, label %10, label %4
10: ; preds = %4
%11 = add i32 %6, 2
br label %12
12: ; preds = %10, %2
%13 = phi i32 [ 1, %2 ], [ %11, %10 ]
ret i32 %13
}
/* Variables and functions */
int /*<<< orphan*/ putchar(unsigned long);
void decode_tuple(unsigned long tuple, int count) {
  int i;
  for (i = 1; i < count; i++) {
    putchar(tuple >> ((4 - i) * 8));
  }
}


x86 assembly (clang, -O0):
<decode_tuple>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x1,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    115b <decode_tuple+0x4b>
mov    -0x8(%rbp),%rdi
mov    $0x4,%eax
sub    -0x10(%rbp),%eax
shl    $0x3,%eax
mov    %eax,%eax
mov    %eax,%ecx
shr    %cl,%rdi
call   1030 <putchar@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1126 <decode_tuple+0x16>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<decode_tuple>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
cmp    $0x2,%esi
jl     1159 <decode_tuple+0x49>
mov    %rdi,%r15
mov    $0xfffffff8,%r14d
mov    %esi,%r12d
add    $0xffffffffffffffff,%r12
lea    0x20(%r14),%rbx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    %ebx,%ecx
and    $0xf8,%cl
mov    %r15,%rdi
shr    %cl,%rdi
call   1030 <putchar@plt>
add    %r14,%rbx
add    $0xffffffffffffffff,%r12
jne    1140 <decode_tuple+0x30>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define void @decode_tuple(i64 %0, i32 %1) {
%3 = alloca i64
%4 = alloca i32
%5 = alloca i32
store i64 %0, i64* %3
store i32 %1, i32* %4
store i32 1, i32* %5
br label %6
6: ; preds = %18, %2
%7 = load i32, i32* %5
%8 = load i32, i32* %4
%9 = icmp slt i32 %7, %8
br i1 %9, label %10, label %21
10: ; preds = %6
%11 = load i64, i64* %3
%12 = load i32, i32* %5
%13 = sub nsw i32 4, %12
%14 = mul nsw i32 %13, 8
%15 = zext i32 %14 to i64
%16 = lshr i64 %11, %15
%17 = call i32 @putchar(i64 %16)
br label %18
18: ; preds = %10
%19 = load i32, i32* %5
%20 = add nsw i32 %19, 1
store i32 %20, i32* %5
br label %6
21: ; preds = %6
ret void
}

LLVM IR (-O2):
define void @decode_tuple(i64 %0, i32 %1) {
%3 = icmp sgt i32 %1, 1
br i1 %3, label %4, label %15
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %6
6: ; preds = %4, %6
%7 = phi i64 [ 1, %4 ], [ %13, %6 ]
%8 = mul i64 %7, 4294967288
%9 = add i64 %8, 32
%10 = and i64 %9, 4294967288
%11 = lshr i64 %0, %10
%12 = tail call i32 @putchar(i64 %11)
%13 = add nuw nsw i64 %7, 1
%14 = icmp eq i64 %13, %5
br i1 %14, label %15, label %6
15: ; preds = %6, %2
ret void
}
void Sdmmc_TraceHeapAlloc(const char *tag) {}


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

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

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

LLVM IR (-O2):
define void @Sdmmc_TraceHeapAlloc(i8* nocapture %0) {
ret void
}
void blink_orange(int duration) {
  int i;
  *((volatile long *)0xc0220080) = 0x46;
  for (i = 0; i < duration; i++) {
    asm volatile("nop\n");
  }
  *((volatile long *)0xc0220080) = 0x44;
  for (i = 0; i < duration; i++) {
    asm volatile("nop\n");
  }
}


x86 assembly (clang, -O0):
<blink_orange>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    $0xc0220080,%eax
movq   $0x46,(%rax)
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    1135 <blink_orange+0x35>
nop
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    111a <blink_orange+0x1a>
mov    $0xc0220080,%eax
movq   $0x44,(%rax)
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    1163 <blink_orange+0x63>
nop
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1148 <blink_orange+0x48>
pop    %rbp
ret

x86 assembly (clang, -O2):
<blink_orange>:
mov    $0xc0220080,%eax
movq   $0x46,(%rax)
test   %edi,%edi
jle    1147 <blink_orange+0x47>
mov    %edi,%ecx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
nop
add    $0xffffffff,%ecx
jne    1120 <blink_orange+0x20>
movq   $0x44,(%rax)
test   %edi,%edi
jle    1146 <blink_orange+0x46>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
nop
add    $0xffffffff,%edi
jne    1140 <blink_orange+0x40>
ret
movq   $0x44,(%rax)
ret

LLVM IR (-O0):
define void @blink_orange(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
store volatile i64 70, i64* inttoptr (i64 3223453824 to i64*)
store i32 0, i32* %3
br label %4
4: ; preds = %9, %1
%5 = load i32, i32* %3
%6 = load i32, i32* %2
%7 = icmp slt i32 %5, %6
br i1 %7, label %8, label %12
8: ; preds = %4
br label %9
9: ; preds = %8
%10 = load i32, i32* %3
%11 = add nsw i32 %10, 1
store i32 %11, i32* %3
br label %4
12: ; preds = %4
store volatile i64 68, i64* inttoptr (i64 3223453824 to i64*)
store i32 0, i32* %3
br label %13
13: ; preds = %18, %12
%14 = load i32, i32* %3
%15 = load i32, i32* %2
%16 = icmp slt i32 %14, %15
br i1 %16, label %17, label %21
17: ; preds = %13
br label %18
18: ; preds = %17
%19 = load i32, i32* %3
%20 = add nsw i32 %19, 1
store i32 %20, i32* %3
br label %13
21: ; preds = %13
ret void
}

LLVM IR (-O2):
define void @blink_orange(i32 %0) {
store volatile i64 70, i64* inttoptr (i64 3223453824 to i64*)
%2 = icmp sgt i32 %0, 0
br i1 %2, label %4, label %3
3: ; preds = %1
store volatile i64 68, i64* inttoptr (i64 3223453824 to i64*)
br label %13
4: ; preds = %1, %4
%5 = phi i32 [ %6, %4 ], [ 0, %1 ]
tail call void asm sideeffect "nop\0A", "~{dirflag},~{fpsr},~{flags}"()
%6 = add nuw nsw i32 %5, 1
%7 = icmp eq i32 %6, %0
br i1 %7, label %8, label %4
8: ; preds = %4
store volatile i64 68, i64* inttoptr (i64 3223453824 to i64*)
br i1 %2, label %9, label %13
9: ; preds = %8, %9
%10 = phi i32 [ %11, %9 ], [ 0, %8 ]
tail call void asm sideeffect "nop\0A", "~{dirflag},~{fpsr},~{flags}"()
%11 = add nuw nsw i32 %10, 1
%12 = icmp eq i32 %11, %0
br i1 %12, label %13, label %9
13: ; preds = %9, %3, %8
ret void
}
unsigned char *gHtonl(unsigned char tbuf[], unsigned char val[]) {
  long inpara, outpara;
  memcpy(&inpara, val, 4);
  outpara = htonl(inpara);
  memcpy(tbuf, &outpara, 4);
  return tbuf;
}


x86 assembly (clang, -O0):
<gHtonl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    $0x0,%al
call   1030 <htonl@plt>
cltq
mov    %rax,-0x20(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x20(%rbp),%ecx
mov    %ecx,(%rax)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gHtonl>:
push   %rbx
mov    %rdi,%rbx
mov    (%rsi),%edi
xor    %eax,%eax
call   1030 <htonl@plt>
mov    %eax,(%rbx)
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i8* @gHtonl(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i64
%6 = alloca i64
store i8* %0, i8** %3
store i8* %1, i8** %4
%7 = bitcast i64* %5 to i8*
%8 = load i8*, i8** %4
%9 = load i64, i64* %5
%10 = call i32 (i64, ...) bitcast (i32 (...)* @htonl to i32 (i64, ...)*)(i64 %9)
%11 = sext i32 %10 to i64
store i64 %11, i64* %6
%12 = load i8*, i8** %3
%13 = bitcast i64* %6 to i8*
%14 = load i8*, i8** %3
ret i8* %14
}

LLVM IR (-O2):
define i8* @gHtonl(i8* returned writeonly %0, i8* nocapture %1) {
%3 = bitcast i8* %1 to i32*
%4 = load i32, i32* %3
%5 = zext i32 %4 to i64
%6 = tail call i32 (i64, ...) bitcast (i32 (...)* @htonl to i32 (i64, ...)*)(i64 %5)
%7 = bitcast i8* %0 to i32*
store i32 %6, i32* %7
ret i8* %0
}
void zz_touch(long length, int falsedep[length], int data[length]) {
  long i;
  for (i = 0; i < length; i++) {
    data[i] = 0;
  }
}


x86 assembly (clang, -O0):
<zz_touch>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
movq   $0x0,-0x20(%rbp)
mov    -0x20(%rbp),%rax
cmp    -0x8(%rbp),%rax
jge    1146 <zz_touch+0x46>
mov    -0x18(%rbp),%rax
mov    -0x20(%rbp),%rcx
movl   $0x0,(%rax,%rcx,4)
mov    -0x20(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x20(%rbp)
jmp    1118 <zz_touch+0x18>
pop    %rbp
ret

x86 assembly (clang, -O2):
<zz_touch>:
test   %rdi,%rdi
jle    112e <zz_touch+0x1e>
push   %rax
mov    %rdi,%rax
shl    $0x2,%rax
mov    %rdx,%rdi
xor    %esi,%esi
mov    %rax,%rdx
call   1030 <memset@plt>
add    $0x8,%rsp
ret

LLVM IR (-O0):
define void @zz_touch(i64 %0, i32* %1, i32* %2) {
%4 = alloca i64
%5 = alloca i32*
%6 = alloca i32*
%7 = alloca i64
store i64 %0, i64* %4
store i32* %1, i32** %5
store i32* %2, i32** %6
%8 = load i64, i64* %4
%9 = load i64, i64* %4
store i64 0, i64* %7
br label %10
10: ; preds = %18, %3
%11 = load i64, i64* %7
%12 = load i64, i64* %4
%13 = icmp slt i64 %11, %12
br i1 %13, label %14, label %21
14: ; preds = %10
%15 = load i32*, i32** %6
%16 = load i64, i64* %7
%17 = getelementptr inbounds i32, i32* %15, i64 %16
store i32 0, i32* %17
br label %18
18: ; preds = %14
%19 = load i64, i64* %7
%20 = add nsw i64 %19, 1
store i64 %20, i64* %7
br label %10
21: ; preds = %10
ret void
}

LLVM IR (-O2):
define void @zz_touch(i64 %0, i32* nocapture readnone %1, i32* nocapture writeonly %2) {
%4 = icmp sgt i64 %0, 0
br i1 %4, label %5, label %8
5: ; preds = %3
%6 = bitcast i32* %2 to i8*
%7 = shl nuw i64 %0, 2
br label %8
8: ; preds = %5, %3
ret void
}
/* Type definitions */
typedef int pid_t;

/* Variables and functions */
int /*<<< orphan*/ WNOHANG;
int /*<<< orphan*/ printf(char *, int);
int waitpid(int, int *, int /*<<< orphan*/);
void sig_chid(int signo) {
  pid_t pid;
  int stat;
  while ((pid = waitpid(-1, &stat, WNOHANG)) > 0)
    ;
  printf("children %d died\n", pid);
  return;
}


x86 assembly (clang, -O0):
<sig_chid>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    0x2eb6(%rip),%rax
mov    (%rax),%edx
mov    $0xffffffff,%edi
lea    -0xc(%rbp),%rsi
call   1040 <waitpid@plt>
mov    %eax,-0x8(%rbp)
cmp    $0x0,%eax
jle    1153 <sig_chid+0x33>
jmp    112b <sig_chid+0xb>
mov    -0x8(%rbp),%esi
lea    0xea3(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sig_chid>:
push   %r14
push   %rbx
push   %rax
mov    0x2ebd(%rip),%r14
lea    0x4(%rsp),%rbx
mov    (%r14),%edx
mov    $0xffffffff,%edi
mov    %rbx,%rsi
call   1040 <waitpid@plt>
test   %eax,%eax
jg     1130 <sig_chid+0x10>
lea    0xeb5(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@WNOHANG = global i32 0
@.str = [18 x i8] c"children %d died\0A\00"
define void @sig_chid(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %2
br label %5
5: ; preds = %9, %1
%6 = load i32, i32* @WNOHANG
%7 = call i32 @waitpid(i32 -1, i32* %4, i32 %6)
store i32 %7, i32* %3
%8 = icmp sgt i32 %7, 0
br i1 %8, label %9, label %10
9: ; preds = %5
br label %5
10: ; preds = %5
%11 = load i32, i32* %3
%12 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i32 %11)
ret void
}

LLVM IR (-O2):
@WNOHANG = global i32 0
@.str = [18 x i8] c"children %d died\0A\00"
define void @sig_chid(i32 %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
br label %4
4: ; preds = %4, %1
%5 = load i32, i32* @WNOHANG
%6 = call i32 @waitpid(i32 -1, i32* %2, i32 %5)
%7 = icmp sgt i32 %6, 0
br i1 %7, label %4, label %8
8: ; preds = %4
%9 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i32 %6)
ret void
}
int fafafa(long a, long b) {
  if (a % b == 0)
    return b;
  return fafafa(b, a % b);
}


x86 assembly (clang, -O0):
<fafafa>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
cqto
idivq  -0x18(%rbp)
cmp    $0x0,%rdx
jne    1140 <fafafa+0x30>
mov    -0x18(%rbp),%rax
mov    %eax,-0x4(%rbp)
jmp    1159 <fafafa+0x49>
mov    -0x18(%rbp),%rdi
mov    -0x10(%rbp),%rax
cqto
idivq  -0x18(%rbp)
mov    %rdx,%rsi
call   1030 <fafafa@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fafafa>:
mov    %rsi,%rdx
mov    %rdi,%rax
jmp    111d <fafafa+0x1d>
nopl   0x0(%rax,%rax,1)
cqto
idiv   %rcx
mov    %rcx,%rax
test   %rdx,%rdx
je     1132 <fafafa+0x32>
mov    %rdx,%rcx
mov    %rax,%rdx
or     %rcx,%rdx
shr    $0x20,%rdx
jne    1110 <fafafa+0x10>
xor    %edx,%edx
div    %ecx
jmp    1115 <fafafa+0x15>
mov    %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @fafafa(i64 %0, i64 %1) {
br label %3
3: ; preds = %3, %2
%4 = phi i64 [ %0, %2 ], [ %5, %3 ]
%5 = phi i64 [ %1, %2 ], [ %6, %3 ]
%6 = srem i64 %4, %5
%7 = icmp eq i64 %6, 0
br i1 %7, label %8, label %3
8: ; preds = %3
%9 = trunc i64 %5 to i32
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ Comp(int);
int /*<<< orphan*/ Create();
int /*<<< orphan*/ GetWord();
int /*<<< orphan*/ Reveal();
void DoDefer() {
  GetWord();
  Create();
  Comp(5);
  Comp(0);
  Reveal();
}


x86 assembly (clang, -O0):
<DoDefer>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <GetWord@plt>
mov    $0x0,%al
call   1030 <Create@plt>
mov    $0x5,%edi
call   1050 <Comp@plt>
xor    %edi,%edi
call   1050 <Comp@plt>
mov    $0x0,%al
call   1060 <Reveal@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<DoDefer>:
push   %rax
xor    %eax,%eax
call   1040 <GetWord@plt>
xor    %eax,%eax
call   1030 <Create@plt>
mov    $0x5,%edi
call   1050 <Comp@plt>
xor    %edi,%edi
call   1050 <Comp@plt>
xor    %eax,%eax
pop    %rcx
jmp    1060 <Reveal@plt>

LLVM IR (-O0):
define void @DoDefer() {
%1 = call i32 (...) @GetWord()
%2 = call i32 (...) @Create()
%3 = call i32 @Comp(i32 5)
%4 = call i32 @Comp(i32 0)
%5 = call i32 (...) @Reveal()
ret void
}

LLVM IR (-O2):
define void @DoDefer() {
%1 = tail call i32 (...) @GetWord()
%2 = tail call i32 (...) @Create()
%3 = tail call i32 @Comp(i32 5)
%4 = tail call i32 @Comp(i32 0)
%5 = tail call i32 (...) @Reveal()
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int EOF;
int fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ printf(char *);
void closeFile(FILE *file) {
  int result = fclose(file);
  if (result == 0) {
    printf("file close success");
  } else if (result == EOF) {
    printf("file close error");
  }
}


x86 assembly (clang, -O0):
<closeFile>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <fclose@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jne    1153 <closeFile+0x33>
lea    0xeb7(%rip),%rdi
call   1040 <printf@plt>
jmp    1176 <closeFile+0x56>
mov    -0xc(%rbp),%eax
mov    0x2e8b(%rip),%rcx
cmp    (%rcx),%eax
jne    1171 <closeFile+0x51>
lea    0xea7(%rip),%rdi
call   1040 <printf@plt>
jmp    1176 <closeFile+0x56>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<closeFile>:
push   %rax
call   1030 <fclose@plt>
test   %eax,%eax
je     1142 <closeFile+0x22>
mov    0x2eb7(%rip),%rcx
cmp    (%rcx),%eax
jne    114f <closeFile+0x2f>
lea    0xed7(%rip),%rdi
pop    %rax
jmp    1040 <printf@plt>
lea    0xeb7(%rip),%rdi
pop    %rax
jmp    1040 <printf@plt>
pop    %rax
ret

LLVM IR (-O0):
@.str = [19 x i8] c"file close success\00"
@EOF = global i32 0
@.str.1 = [17 x i8] c"file close error\00"
define void @closeFile(i32* %0) {
%2 = alloca i32*
%3 = alloca i32
store i32* %0, i32** %2
%4 = load i32*, i32** %2
%5 = call i32 @fclose(i32* %4)
store i32 %5, i32* %3
%6 = load i32, i32* %3
%7 = icmp eq i32 %6, 0
br i1 %7, label %8, label %10
8: ; preds = %1
%9 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
br label %17
10: ; preds = %1
%11 = load i32, i32* %3
%12 = load i32, i32* @EOF
%13 = icmp eq i32 %11, %12
br i1 %13, label %14, label %16
14: ; preds = %10
%15 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0))
br label %16
16: ; preds = %14, %10
br label %17
17: ; preds = %16, %8
ret void
}

LLVM IR (-O2):
@.str = [19 x i8] c"file close success\00"
@EOF = global i32 0
@.str.1 = [17 x i8] c"file close error\00"
define void @closeFile(i32* nocapture %0) {
%2 = tail call i32 @fclose(i32* %0)
%3 = icmp eq i32 %2, 0
br i1 %3, label %7, label %4
4: ; preds = %1
%5 = load i32, i32* @EOF
%6 = icmp eq i32 %2, %5
br i1 %6, label %7, label %10
7: ; preds = %4, %1
%8 = phi i8* [ getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), %1 ], [ getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0), %4 ]
%9 = tail call i32 @printf(i8* dereferenceable(1) %8)
br label %10
10: ; preds = %7, %4
ret void
}
/* Variables and functions */
int /*<<< orphan*/ ft_bzero(void *, size_t);
void *malloc(int);
void *ft_memalloc(size_t size) {
  void *mem;
  mem = malloc(sizeof(void *) * size);
  if (mem)
    ft_bzero(mem, size);
  else
    return (NULL);
  return (mem);
}


x86 assembly (clang, -O0):
<ft_memalloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
shl    $0x3,%rax
mov    %eax,%edi
call   1040 <malloc@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     115c <ft_memalloc+0x3c>
mov    -0x18(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <ft_bzero@plt>
jmp    1169 <ft_memalloc+0x49>
movq   $0x0,-0x8(%rbp)
jmp    1171 <ft_memalloc+0x51>
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_memalloc>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
lea    0x0(,%rdi,8),%edi
call   1040 <malloc@plt>
mov    %rax,%rbx
test   %rax,%rax
je     1146 <ft_memalloc+0x26>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1030 <ft_bzero@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i8* @ft_memalloc(i64 %0) {
%2 = alloca i8*
%3 = alloca i64
%4 = alloca i8*
store i64 %0, i64* %3
%5 = load i64, i64* %3
%6 = mul i64 8, %5
%7 = trunc i64 %6 to i32
%8 = call i8* @malloc(i32 %7)
store i8* %8, i8** %4
%9 = load i8*, i8** %4
%10 = icmp ne i8* %9, null
br i1 %10, label %11, label %15
11: ; preds = %1
%12 = load i8*, i8** %4
%13 = load i64, i64* %3
%14 = call i32 @ft_bzero(i8* %12, i64 %13)
br label %16
15: ; preds = %1
store i8* null, i8** %2
br label %18
16: ; preds = %11
%17 = load i8*, i8** %4
store i8* %17, i8** %2
br label %18
18: ; preds = %16, %15
%19 = load i8*, i8** %2
ret i8* %19
}

LLVM IR (-O2):
define i8* @ft_memalloc(i64 %0) {
%2 = trunc i64 %0 to i32
%3 = shl i32 %2, 3
%4 = tail call i8* @malloc(i32 %3)
%5 = icmp eq i8* %4, null
br i1 %5, label %8, label %6
6: ; preds = %1
%7 = tail call i32 @ft_bzero(i8* %4, i64 %0)
br label %8
8: ; preds = %1, %6
ret i8* %4
}
/* Variables and functions */
int /*<<< orphan*/ close(int);
void closeServerSocket(int serverSocket) {
  if (serverSocket != -1) {
    close(serverSocket);
  }
}


x86 assembly (clang, -O0):
<closeServerSocket>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0xffffffff,-0x4(%rbp)
je     112d <closeServerSocket+0x1d>
mov    -0x4(%rbp),%edi
call   1030 <close@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<closeServerSocket>:
cmp    $0xffffffff,%edi
je     111a <closeServerSocket+0xa>
jmp    1030 <close@plt>
ret

LLVM IR (-O0):
define void @closeServerSocket(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp ne i32 %3, -1
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i32, i32* %2
%7 = call i32 @close(i32 %6)
br label %8
8: ; preds = %5, %1
ret void
}

LLVM IR (-O2):
define void @closeServerSocket(i32 %0) {
%2 = icmp eq i32 %0, -1
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 @close(i32 %0)
br label %5
5: ; preds = %3, %1
ret void
}
int test_imm_58uint16_mem(unsigned short *val) {
  return ((*val) & (-0x58 << 0)) ? -20 : -40;
}


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

x86 assembly (clang, -O2):
<test_imm_58uint16_mem>:
movzwl (%rdi),%eax
test   $0xffa8,%eax
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_58uint16_mem(i16* %0) {
%2 = alloca i16*
store i16* %0, i16** %2
%3 = load i16*, i16** %2
%4 = load i16, i16* %3
%5 = zext i16 %4 to i32
%6 = and i32 %5, -88
%7 = icmp ne i32 %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_58uint16_mem(i16* nocapture %0) {
%2 = load i16, i16* %0
%3 = and i16 %2, -88
%4 = icmp eq i16 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
int int_cube(int line, int value) { return value * value * value; }


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

x86 assembly (clang, -O2):
<int_cube>:
mov    %esi,%eax
imul   %esi,%eax
imul   %esi,%eax
ret

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

LLVM IR (-O2):
define i32 @int_cube(i32 %0, i32 %1) {
%3 = mul nsw i32 %1, %1
%4 = mul nsw i32 %3, %1
ret i32 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ GLboolean;

/* Variables and functions */
int /*<<< orphan*/ GL_FALSE;
int /*<<< orphan*/ GL_TRUE;
GLboolean fghChangeDisplayMode(GLboolean haveToTest) {
  GLboolean success = GL_FALSE;
  success = GL_TRUE;
  return success;
}


x86 assembly (clang, -O0):
<fghChangeDisplayMode>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    0x2eda(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x8(%rbp)
mov    0x2ebe(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<fghChangeDisplayMode>:
mov    0x2ed9(%rip),%rax
mov    (%rax),%eax
ret

LLVM IR (-O0):
@GL_FALSE = global i32 0
@GL_TRUE = global i32 0
define i32 @fghChangeDisplayMode(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* @GL_FALSE
store i32 %4, i32* %3
%5 = load i32, i32* @GL_TRUE
store i32 %5, i32* %3
%6 = load i32, i32* %3
ret i32 %6
}

LLVM IR (-O2):
@GL_FALSE = global i32 0
@GL_TRUE = global i32 0
define i32 @fghChangeDisplayMode(i32 %0) {
%2 = load i32, i32* @GL_TRUE
ret i32 %2
}
/* Variables and functions */
double asin_acos(double, int /*<<< orphan*/);
double asin(double x) { return asin_acos(x, 0); }


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

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

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

LLVM IR (-O2):
define double @asin(double %0) {
%2 = tail call double @asin_acos(double %0, i32 0)
ret double %2
}
void sol_http_server_shutdown(void) {}


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

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

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

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


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @hash_table_del_test2()
ret i32 0
}
double core___core__Float___Numeric__to_f(double self) {
  double var;
  var = self;
  goto RET_LABEL;
RET_LABEL:;
  return var;
}


x86 assembly (clang, -O0):
<core___core__Float___Numeric__to_f>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
pop    %rbp
ret

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

LLVM IR (-O0):
define double @core___core__Float___Numeric__to_f(double %0) {
%2 = alloca double
%3 = alloca double
store double %0, double* %2
%4 = load double, double* %2
store double %4, double* %3
br label %5
5: ; preds = %1
%6 = load double, double* %3
ret double %6
}

LLVM IR (-O2):
define double @core___core__Float___Numeric__to_f(double returned %0) {
ret double %0
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int fgetc(FILE *f) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @fgetc(i32* nocapture readnone %0) {
ret i32 0
}
unsigned int cpuid(unsigned int op) {
  unsigned int ret;
  unsigned dummy2, dummy3, dummy4;
  asm volatile("cpuid"
               : "=a"(ret), "=b"(dummy2), "=c"(dummy3), "=d"(dummy4)
               : "a"(op));
  return ret;
}


x86 assembly (clang, -O0):
<cpuid>:
push   %rbp
mov    %rsp,%rbp
push   %rbx
mov    %edi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cpuid
mov    %eax,-0x10(%rbp)
mov    %ebx,-0x14(%rbp)
mov    %ecx,-0x18(%rbp)
mov    %edx,-0x1c(%rbp)
mov    -0x10(%rbp),%eax
pop    %rbx
pop    %rbp
ret

x86 assembly (clang, -O2):
<cpuid>:
push   %rbx
mov    %edi,%eax
cpuid
pop    %rbx
ret

LLVM IR (-O0):
define i32 @cpuid(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %2
%7 = load i32, i32* %2
%8 = call { i32, i32, i32, i32 } asm sideeffect "cpuid", "={ax},={bx},={cx},={dx},{ax},~{dirflag},~{fpsr},~{flags}"(i32 %7)
%9 = extractvalue { i32, i32, i32, i32 } %8, 0
%10 = extractvalue { i32, i32, i32, i32 } %8, 1
%11 = extractvalue { i32, i32, i32, i32 } %8, 2
%12 = extractvalue { i32, i32, i32, i32 } %8, 3
store i32 %9, i32* %3
store i32 %10, i32* %4
store i32 %11, i32* %5
store i32 %12, i32* %6
%13 = load i32, i32* %3
ret i32 %13
}

LLVM IR (-O2):
define i32 @cpuid(i32 %0) {
%2 = tail call { i32, i32, i32, i32 } asm sideeffect "cpuid", "={ax},={bx},={cx},={dx},{ax},~{dirflag},~{fpsr},~{flags}"(i32 %0)
%3 = extractvalue { i32, i32, i32, i32 } %2, 0
ret i32 %3
}
int RAND_egd(const char *path) { return 255; }


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

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

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

LLVM IR (-O2):
define i32 @RAND_egd(i8* nocapture readnone %0) {
ret i32 255
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void msgErro(char *msgErro) { printf("\n%s\n", msgErro); }


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

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

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

LLVM IR (-O2):
@.str = [5 x i8] c"\0A%s\0A\00"
define void @msgErro(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
int rn_walktree(h, f, w)
struct radix_node_head *h;
register int (*f)();
void *w;
{ return 0; }


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

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

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

LLVM IR (-O2):
%struct.radix_node_head = type opaque
define i32 @rn_walktree(%struct.radix_node_head* nocapture readnone %0, i32 (...)* nocapture readnone %1, i8* nocapture readnone %2) {
ret i32 0
}
void XUngrabKeyboard() {}


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

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

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

LLVM IR (-O2):
define void @XUngrabKeyboard() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(char *);
void free_append_data(char *append_data) { free(append_data); }


x86 assembly (clang, -O0):
<free_append_data>:
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):
<free_append_data>:
jmp    1030 <free@plt>

LLVM IR (-O0):
define void @free_append_data(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 @free_append_data(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
void ResCreatePath(char *a, int b) {}


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

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

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

LLVM IR (-O2):
define void @ResCreatePath(i8* nocapture %0, i32 %1) {
ret void
}
void SteamAPI_ISteamGameServer_LogOnAnonymous(void *self) {
  xlogf("%s(self = %p)\n", __func__, self);
}


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

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

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

LLVM IR (-O2):
@.str = [15 x i8] c"%s(self = %p)\0A\00"
@__func__.SteamAPI_ISteamGameServer_LogOnAnonymous = [41 x i8] c"SteamAPI_ISteamGameServer_LogOnAnonymous\00"
define void @SteamAPI_ISteamGameServer_LogOnAnonymous(i8* %0) {
%2 = tail call i32 (i8*, i8*, i8*, ...) bitcast (i32 (...)* @xlogf to i32 (i8*, i8*, i8*, ...)*)(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([41 x i8], [41 x i8]* @__func__.SteamAPI_ISteamGameServer_LogOnAnonymous, i64 0, i64 0), i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main() {
  printf("The square of all the parts is %d\n", 7 + 5 * 7 + 5);
  return (0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeda(%rip),%rdi
mov    $0x2f,%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
mov    $0x2f,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [35 x i8] c"The square of all the parts is %d\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0), i32 47)
ret i32 0
}

LLVM IR (-O2):
@.str = [35 x i8] c"The square of all the parts is %d\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0), i32 47)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ test_parser_sourcefile(char *, char *);
int /*<<< orphan*/ test_parser_verify_parse(int /*<<< orphan*/, char *, char *,
                                            char *, int /*<<< orphan*/);
void test_boo_strings() {
  test_parser_verify_parse(
      test_parser_sourcefile("boo", "\"abc#not a 'comment\""), "boo",
      "\"abc#not a 'comment\"", "", 0);
}


x86 assembly (clang, -O0):
<test_boo_strings>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
lea    0xed2(%rip),%rsi
call   1030 <test_parser_sourcefile@plt>
mov    %eax,%edi
lea    0xec0(%rip),%rsi
lea    0xebd(%rip),%rdx
lea    0xeca(%rip),%rcx
xor    %r8d,%r8d
call   1040 <test_parser_verify_parse@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_boo_strings>:
push   %r14
push   %rbx
push   %rax
lea    0xed5(%rip),%rbx
lea    0xed2(%rip),%r14
mov    %rbx,%rdi
mov    %r14,%rsi
call   1030 <test_parser_sourcefile@plt>
lea    0xed4(%rip),%rcx
mov    %eax,%edi
mov    %rbx,%rsi
mov    %r14,%rdx
xor    %r8d,%r8d
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <test_parser_verify_parse@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"boo\00"
@.str.1 = [21 x i8] c"\22abc#not a 'comment\22\00"
@.str.2 = [1 x i8] zeroinitializer
define void @test_boo_strings() {
%1 = call i32 @test_parser_sourcefile(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0))
%2 = call i32 @test_parser_verify_parse(i32 %1, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0), i32 0)
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"boo\00"
@.str.1 = [21 x i8] c"\22abc#not a 'comment\22\00"
@.str.2 = [1 x i8] zeroinitializer
define void @test_boo_strings() {
%1 = tail call i32 @test_parser_sourcefile(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0))
%2 = tail call i32 @test_parser_verify_parse(i32 %1, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0), i32 0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ __CODEWARS__stdout__(char *, char const *, char *,
                                        int /*<<< orphan*/ *);
int /*<<< orphan*/ exit(int /*<<< orphan*/);
void __CODEWARS__fail__(const char *message) {
  __CODEWARS__stdout__("<FAILED::>", message, "\n", NULL);
  exit(EXIT_FAILURE);
}


x86 assembly (clang, -O0):
<__CODEWARS__fail__>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xec9(%rip),%rdi
lea    0xecd(%rip),%rdx
xor    %eax,%eax
mov    %eax,%ecx
call   1030 <__CODEWARS__stdout__@plt>
mov    0x2e92(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<__CODEWARS__fail__>:
push   %rax
mov    %rdi,%rsi
lea    0xed5(%rip),%rdi
lea    0xed9(%rip),%rdx
xor    %ecx,%ecx
call   1030 <__CODEWARS__stdout__@plt>
mov    0x2ea0(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [11 x i8] c"<FAILED::>\00"
@.str.1 = [2 x i8] c"\0A\00"
@EXIT_FAILURE = global i32 0
define void @__CODEWARS__fail__(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @__CODEWARS__stdout__(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %3, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), i32* null)
%5 = load i32, i32* @EXIT_FAILURE
%6 = call i32 @exit(i32 %5)
unreachable
}

LLVM IR (-O2):
@.str = [11 x i8] c"<FAILED::>\00"
@.str.1 = [2 x i8] c"\0A\00"
@EXIT_FAILURE = global i32 0
define void @__CODEWARS__fail__(i8* %0) {
%2 = tail call i32 @__CODEWARS__stdout__(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %0, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), i32* null)
%3 = load i32, i32* @EXIT_FAILURE
%4 = tail call i32 @exit(i32 %3)
unreachable
}
int decodeCell(char c) {
  switch (c) {
  case 'O':
    return 1;
  case '.':
    return 2;
  default:
    return 0;
  }
}


x86 assembly (clang, -O0):
<decodeCell>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
mov    %eax,-0xc(%rbp)
sub    $0x2e,%eax
je     113c <decodeCell+0x3c>
jmp    111f <decodeCell+0x1f>
mov    -0xc(%rbp),%eax
sub    $0x4f,%eax
jne    1148 <decodeCell+0x48>
jmp    1130 <decodeCell+0x30>
movl   $0x1,-0x4(%rbp)
jmp    114f <decodeCell+0x4f>
movl   $0x2,-0x4(%rbp)
jmp    114f <decodeCell+0x4f>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<decodeCell>:
xor    %ecx,%ecx
cmp    $0x2e,%dil
sete   %cl
add    %ecx,%ecx
cmp    $0x4f,%dil
mov    $0x1,%eax
cmovne %ecx,%eax
ret

LLVM IR (-O0):
define i32 @decodeCell(i8 signext %0) {
%2 = alloca i32
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
switch i32 %5, label %8 [
i32 79, label %6
i32 46, label %7
]
6: ; preds = %1
store i32 1, i32* %2
br label %9
7: ; preds = %1
store i32 2, i32* %2
br label %9
8: ; preds = %1
store i32 0, i32* %2
br label %9
9: ; preds = %8, %7, %6
%10 = load i32, i32* %2
ret i32 %10
}

LLVM IR (-O2):
define i32 @decodeCell(i8 signext %0) {
%2 = icmp eq i8 %0, 46
%3 = select i1 %2, i32 2, i32 0
%4 = icmp eq i8 %0, 79
%5 = select i1 %4, i32 1, i32 %3
ret i32 %5
}
/* Variables and functions */
unsigned int f29(unsigned int);
unsigned int f30(unsigned int a) { return f29(f29(a)); }


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

x86 assembly (clang, -O2):
<f30>:
push   %rax
call   1030 <f29@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <f29@plt>

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

LLVM IR (-O2):
define i32 @f30(i32 %0) {
%2 = tail call i32 @f29(i32 %0)
%3 = tail call i32 @f29(i32 %2)
ret i32 %3
}