xunge/DecIR huggingface dataset:
char *RCSid() {
  return RCSid("$Id: history.c,v 1.28.2.1 2011/12/28 19:30:43 sfeam Exp $");
}


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

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

LLVM IR (-O0):
@.str = [58 x i8] c"$Id: history.c,v 1.28.2.1 2011/12/28 19:30:43 sfeam Exp $\00"
define i8* @RCSid() {
%1 = call i8* (i8*, ...) bitcast (i8* ()* @RCSid to i8* (i8*, ...)*)(i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str, i64 0, i64 0))
ret i8* %1
}

LLVM IR (-O2):
define noalias i8* @RCSid() {
br label %1
1: ; preds = %1, %0
br label %1
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
int /*<<< orphan*/ printf(char *, int /*<<< orphan*/);
void dump_hex(uint8_t *ptr, int len) {
  while (len--) {
    printf("%02x ", *ptr++);
  }
}


x86 assembly (clang, -O0):
<dump_hex>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0xc(%rbp)
cmp    $0x0,%eax
je     1155 <dump_hex+0x45>
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x4,%rcx
mov    %rcx,-0x8(%rbp)
mov    (%rax),%esi
lea    0xeb5(%rip),%rdi
call   1030 <printf@plt>
jmp    111f <dump_hex+0xf>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dump_hex>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
test   %esi,%esi
je     1145 <dump_hex+0x35>
mov    %rdi,%r15
mov    %esi,%r12d
xor    %ebx,%ebx
lea    0xed5(%rip),%r14
nopl   0x0(%rax,%rax,1)
mov    (%r15,%rbx,4),%esi
mov    %r14,%rdi
call   1030 <printf@plt>
add    $0x1,%rbx
cmp    %ebx,%r12d
jne    1130 <dump_hex+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
@.str = [6 x i8] c"%02x \00"
define void @dump_hex(i32* nocapture %0, i32 %1) {
%3 = icmp eq i32 %1, 0
br i1 %3, label %12, label %4
4: ; preds = %2, %4
%5 = phi i32 [ %7, %4 ], [ %1, %2 ]
%6 = phi i32* [ %8, %4 ], [ %0, %2 ]
%7 = add nsw i32 %5, -1
%8 = getelementptr inbounds i32, i32* %6, i64 1
%9 = load i32, i32* %6
%10 = tail call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 %9)
%11 = icmp eq i32 %7, 0
br i1 %11, label %12, label %4
12: ; preds = %4, %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ gui_mouse_event_end();
int gui_mouse_event_timer_cb(const void *pointer, void *data,
                             int remaining_calls) {
  (void)pointer;
  (void)data;
  (void)remaining_calls;
  gui_mouse_event_end();
  return 0;
}


x86 assembly (clang, -O0):
<gui_mouse_event_timer_cb>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    $0x0,%al
call   1030 <gui_mouse_event_end@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @gui_mouse_event_timer_cb(i8* nocapture readnone %0, i8* nocapture readnone %1, i32 %2) {
%4 = tail call i32 (...) @gui_mouse_event_end()
ret i32 0
}
/* Variables and functions */
int f();
int main() {
  int x = 0;
  int a;
  a = f();
  if (a != 2) {
    f();
  ERROR:
    x = -1;
  }
  return x;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    $0x0,%al
call   1030 <f@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0x2,-0xc(%rbp)
je     1148 <main+0x38>
mov    $0x0,%al
call   1030 <f@plt>
movl   $0xffffffff,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %ebx,%ebx
xor    %eax,%eax
call   1030 <f@plt>
cmp    $0x2,%eax
je     112b <main+0x1b>
xor    %eax,%eax
call   1030 <f@plt>
mov    $0xffffffff,%ebx
mov    %ebx,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @f()
%2 = icmp eq i32 %1, 2
br i1 %2, label %5, label %3
3: ; preds = %0
%4 = tail call i32 (...) @f()
br label %5
5: ; preds = %3, %0
%6 = phi i32 [ -1, %3 ], [ 0, %0 ]
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ StabilizationBankHandle();
int /*<<< orphan*/ UAVObjLogging(int /*<<< orphan*/);
void StabilizationBankLogging() { UAVObjLogging(StabilizationBankHandle()); }


x86 assembly (clang, -O0):
<StabilizationBankLogging>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <StabilizationBankHandle@plt>
mov    %eax,%edi
call   1030 <UAVObjLogging@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<StabilizationBankLogging>:
push   %rax
xor    %eax,%eax
call   1040 <StabilizationBankHandle@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <UAVObjLogging@plt>

LLVM IR (-O0):
define void @StabilizationBankLogging() {
%1 = call i32 (...) @StabilizationBankHandle()
%2 = call i32 @UAVObjLogging(i32 %1)
ret void
}

LLVM IR (-O2):
define void @StabilizationBankLogging() {
%1 = tail call i32 (...) @StabilizationBankHandle()
%2 = tail call i32 @UAVObjLogging(i32 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ debug(char *, ...);
int M206_f(char *s) {
  debug("M206_f(const char *s) is not yet implemented!\n");
  debug("%s\n", s);
  return 1;
}


x86 assembly (clang, -O0):
<M206_f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xedd(%rip),%rdi
mov    $0x0,%al
call   1030 <debug@plt>
mov    -0x8(%rbp),%rsi
lea    0xefa(%rip),%rdi
mov    $0x0,%al
call   1030 <debug@plt>
mov    $0x1,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<M206_f>:
push   %rbx
mov    %rdi,%rbx
lea    0xee5(%rip),%rdi
xor    %eax,%eax
call   1030 <debug@plt>
lea    0xf06(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1030 <debug@plt>
mov    $0x1,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [47 x i8] c"M206_f(const char *s) is not yet implemented!\0A\00"
@.str.1 = [4 x i8] c"%s\0A\00"
define i32 @M206_f(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 (i8*, ...) @debug(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0))
%4 = load i8*, i8** %2
%5 = call i32 (i8*, ...) @debug(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %4)
ret i32 1
}

LLVM IR (-O2):
@.str = [47 x i8] c"M206_f(const char *s) is not yet implemented!\0A\00"
@.str.1 = [4 x i8] c"%s\0A\00"
define i32 @M206_f(i8* %0) {
%2 = tail call i32 (i8*, ...) @debug(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 (i8*, ...) @debug(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %0)
ret i32 1
}
/* Variables and functions */
int omp_get_thread_num();
int /*<<< orphan*/ printf(char *, ...);
int main(void) {
  int sum = 0;
#pragma omp parallel
  {
    int id = omp_get_thread_num();
    printf("Hey, I'm thread #%d\n", id);
#pragma omp atomic
    sum += 1;
  }
  printf("Final value of sum is: %d.\n", sum);
  printf("Done!\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    $0x0,%al
call   1030 <omp_get_thread_num@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%esi
lea    0xeb6(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%esi
lea    0xeb1(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xebf(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1040 <omp_get_thread_num@plt>
lea    0xec1(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xec6(%rip),%rdi
mov    $0x1,%esi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xecf(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [21 x i8] c"Hey, I'm thread #%d\0A\00"
@.str.1 = [28 x i8] c"Final value of sum is: %d.\0A\00"
@.str.2 = [7 x i8] c"Done!\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
%4 = call i32 (...) @omp_get_thread_num()
store i32 %4, i32* %3
%5 = load i32, i32* %3
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i32 %5)
%7 = load i32, i32* %2
%8 = add nsw i32 %7, 1
store i32 %8, i32* %2
%9 = load i32, i32* %2
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.1, i64 0, i64 0), i32 %9)
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [21 x i8] c"Hey, I'm thread #%d\0A\00"
@.str.1 = [28 x i8] c"Final value of sum is: %d.\0A\00"
@str = [6 x i8] c"Done!\00"
define i32 @main() {
%1 = tail call i32 (...) @omp_get_thread_num()
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i32 %1)
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @.str.1, i64 0, i64 0), i32 1)
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isdigit(int);
void t_isdigit_0x0b() {
  Assert_real((isdigit(11) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isdigit.c",
              60, ("isdigit should be 0 for 0x0b"));
}


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

x86 assembly (clang, -O2):
<t_isdigit_0x0b>:
push   %rax
mov    $0xb,%edi
call   1030 <isdigit@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x3c,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isdigit.c\00"
@.str.1 = [29 x i8] c"isdigit should be 0 for 0x0b\00"
define void @t_isdigit_0x0b() {
%1 = call i64 @isdigit(i32 11)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 60, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isdigit.c\00"
@.str.1 = [29 x i8] c"isdigit should be 0 for 0x0b\00"
define void @t_isdigit_0x0b() {
%1 = tail call i64 @isdigit(i32 11)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 60, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int uint8_t;
typedef int uint32_t;

/* Variables and functions */
void configurePatchLrm(void) {
  uint8_t *pPatchTab = (uint8_t *)0x21000340;
  uint32_t *pIrqPatch = (uint32_t *)0x210003BC;
  pPatchTab[80] = 0;
  pPatchTab[53] = 1;
  pPatchTab[57] = 2;
  pPatchTab[55] = 3;
  pPatchTab[110] = 4;
  pPatchTab[107] = 5;
  pIrqPatch[1] = 0x210005dd;
}


x86 assembly (clang, -O0):
<configurePatchLrm>:
push   %rbp
mov    %rsp,%rbp
mov    $0x21000340,%eax
mov    %rax,-0x8(%rbp)
mov    $0x210003bc,%eax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movl   $0x0,0x140(%rax)
mov    -0x8(%rbp),%rax
movl   $0x1,0xd4(%rax)
mov    -0x8(%rbp),%rax
movl   $0x2,0xe4(%rax)
mov    -0x8(%rbp),%rax
movl   $0x3,0xdc(%rax)
mov    -0x8(%rbp),%rax
movl   $0x4,0x1b8(%rax)
mov    -0x8(%rbp),%rax
movl   $0x5,0x1ac(%rax)
mov    -0x10(%rbp),%rax
movl   $0x210005dd,0x4(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<configurePatchLrm>:
movl   $0x0,0x21000480
movl   $0x1,0x21000414
movl   $0x2,0x21000424
movl   $0x3,0x2100041c
movl   $0x4,0x210004f8
movl   $0x5,0x210004ec
movl   $0x210005dd,0x210003c0
ret

LLVM IR (-O0):
define void @configurePatchLrm() {
%1 = alloca i32*
%2 = alloca i32*
store i32* inttoptr (i64 553648960 to i32*), i32** %1
store i32* inttoptr (i64 553649084 to i32*), i32** %2
%3 = load i32*, i32** %1
%4 = getelementptr inbounds i32, i32* %3, i64 80
store i32 0, i32* %4
%5 = load i32*, i32** %1
%6 = getelementptr inbounds i32, i32* %5, i64 53
store i32 1, i32* %6
%7 = load i32*, i32** %1
%8 = getelementptr inbounds i32, i32* %7, i64 57
store i32 2, i32* %8
%9 = load i32*, i32** %1
%10 = getelementptr inbounds i32, i32* %9, i64 55
store i32 3, i32* %10
%11 = load i32*, i32** %1
%12 = getelementptr inbounds i32, i32* %11, i64 110
store i32 4, i32* %12
%13 = load i32*, i32** %1
%14 = getelementptr inbounds i32, i32* %13, i64 107
store i32 5, i32* %14
%15 = load i32*, i32** %2
%16 = getelementptr inbounds i32, i32* %15, i64 1
store i32 553649629, i32* %16
ret void
}

LLVM IR (-O2):
define void @configurePatchLrm() {
store i32 0, i32* inttoptr (i64 553649280 to i32*)
store i32 1, i32* inttoptr (i64 553649172 to i32*)
store i32 2, i32* inttoptr (i64 553649188 to i32*)
store i32 3, i32* inttoptr (i64 553649180 to i32*)
store i32 4, i32* inttoptr (i64 553649400 to i32*)
store i32 5, i32* inttoptr (i64 553649388 to i32*)
store i32 553649629, i32* inttoptr (i64 553649088 to i32*)
ret void
}
void categorize(struct parse *p, struct re_guts *g) {}


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

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

LLVM IR (-O0):
%struct.parse = type opaque
%struct.re_guts = type opaque
define void @categorize(%struct.parse* %0, %struct.re_guts* %1) {
%3 = alloca %struct.parse*
%4 = alloca %struct.re_guts*
store %struct.parse* %0, %struct.parse** %3
store %struct.re_guts* %1, %struct.re_guts** %4
ret void
}

LLVM IR (-O2):
%struct.parse = type opaque
%struct.re_guts = type opaque
define void @categorize(%struct.parse* nocapture %0, %struct.re_guts* nocapture %1) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ outportb(int, size_t);
void terminal_movecursor(size_t x, size_t y) {
  size_t index;
  index = y * 80 + x;
  outportb(0x3D4, 14);
  outportb(0x3D5, index >> 8);
  outportb(0x3D4, 15);
  outportb(0x3D5, index);
}


x86 assembly (clang, -O0):
<terminal_movecursor>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
imul   $0x50,-0x10(%rbp),%rax
add    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    $0x3d4,%edi
mov    $0xe,%esi
call   1030 <outportb@plt>
mov    -0x18(%rbp),%rsi
shr    $0x8,%rsi
mov    $0x3d5,%edi
call   1030 <outportb@plt>
mov    $0x3d4,%edi
mov    $0xf,%esi
call   1030 <outportb@plt>
mov    -0x18(%rbp),%rsi
mov    $0x3d5,%edi
call   1030 <outportb@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<terminal_movecursor>:
push   %rbx
lea    (%rsi,%rsi,4),%rbx
shl    $0x4,%rbx
add    %rdi,%rbx
mov    $0xe,%esi
mov    $0x3d4,%edi
call   1030 <outportb@plt>
mov    %rbx,%rsi
shr    $0x8,%rsi
mov    $0x3d5,%edi
call   1030 <outportb@plt>
mov    $0xf,%esi
mov    $0x3d4,%edi
call   1030 <outportb@plt>
mov    $0x3d5,%edi
mov    %rbx,%rsi
pop    %rbx
jmp    1030 <outportb@plt>

LLVM IR (-O0):
define void @terminal_movecursor(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
%5 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%6 = load i64, i64* %4
%7 = mul i64 %6, 80
%8 = load i64, i64* %3
%9 = add i64 %7, %8
store i64 %9, i64* %5
%10 = call i32 @outportb(i32 980, i64 14)
%11 = load i64, i64* %5
%12 = lshr i64 %11, 8
%13 = call i32 @outportb(i32 981, i64 %12)
%14 = call i32 @outportb(i32 980, i64 15)
%15 = load i64, i64* %5
%16 = call i32 @outportb(i32 981, i64 %15)
ret void
}

LLVM IR (-O2):
define void @terminal_movecursor(i64 %0, i64 %1) {
%3 = mul i64 %1, 80
%4 = add i64 %3, %0
%5 = tail call i32 @outportb(i32 980, i64 14)
%6 = lshr i64 %4, 8
%7 = tail call i32 @outportb(i32 981, i64 %6)
%8 = tail call i32 @outportb(i32 980, i64 15)
%9 = tail call i32 @outportb(i32 981, i64 %4)
ret void
}
void gtk_widget_get_no_show_all() {}


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

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

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

LLVM IR (-O2):
define void @gtk_widget_get_no_show_all() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
unsigned int atoi_gen(char const *);
int /*<<< orphan*/ errx(int /*<<< orphan*/, char *, char const *, unsigned int);
unsigned int load_uint(const char *s, unsigned int max) {
  unsigned int v = atoi_gen(s);
  if (v > max)
    errx(EXIT_FAILURE, "'%s' is too large (max: %d)", s, max);
  return v;
}


x86 assembly (clang, -O0):
<load_uint>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <atoi_gen@plt>
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jbe    1163 <load_uint+0x43>
mov    0x2e92(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
mov    -0xc(%rbp),%ecx
lea    0xea2(%rip),%rsi
call   1030 <errx@plt>
mov    -0x10(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<load_uint>:
push   %rbp
push   %r14
push   %rbx
mov    %esi,%r14d
mov    %rdi,%rbx
call   1040 <atoi_gen@plt>
mov    %eax,%ebp
cmp    %r14d,%eax
jbe    1151 <load_uint+0x31>
mov    0x2ea3(%rip),%rax
mov    (%rax),%edi
lea    0xeba(%rip),%rsi
mov    %rbx,%rdx
mov    %r14d,%ecx
call   1030 <errx@plt>
mov    %ebp,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
@EXIT_FAILURE = global i32 0
@.str = [28 x i8] c"'%s' is too large (max: %d)\00"
define i32 @load_uint(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%6 = load i8*, i8** %3
%7 = call i32 @atoi_gen(i8* %6)
store i32 %7, i32* %5
%8 = load i32, i32* %5
%9 = load i32, i32* %4
%10 = icmp ugt i32 %8, %9
br i1 %10, label %11, label %16
11: ; preds = %2
%12 = load i32, i32* @EXIT_FAILURE
%13 = load i8*, i8** %3
%14 = load i32, i32* %4
%15 = call i32 @errx(i32 %12, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i8* %13, i32 %14)
br label %16
16: ; preds = %11, %2
%17 = load i32, i32* %5
ret i32 %17
}

LLVM IR (-O2):
@EXIT_FAILURE = global i32 0
@.str = [28 x i8] c"'%s' is too large (max: %d)\00"
define i32 @load_uint(i8* %0, i32 %1) {
%3 = tail call i32 @atoi_gen(i8* %0)
%4 = icmp ugt i32 %3, %1
br i1 %4, label %5, label %8
5: ; preds = %2
%6 = load i32, i32* @EXIT_FAILURE
%7 = tail call i32 @errx(i32 %6, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i8* %0, i32 %1)
br label %8
8: ; preds = %5, %2
ret i32 %3
}
/* Variables and functions */
scalar_t__ create(int, int);
int /*<<< orphan*/ sleep(int);
int main(void) {
  if (create(3, 1) < 0)
    return 1;
  if (create(5, 2) < 0)
    return 1;
  for (;;) {
    sleep(10);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x3,%edi
mov    $0x1,%esi
call   1030 <create@plt>
cmp    $0x0,%rax
jge    1154 <main+0x34>
movl   $0x1,-0x4(%rbp)
jmp    118d <main+0x6d>
mov    $0x5,%edi
mov    $0x2,%esi
call   1030 <create@plt>
cmp    $0x0,%rax
jge    1179 <main+0x59>
movl   $0x1,-0x4(%rbp)
jmp    118d <main+0x6d>
jmp    117e <main+0x5e>
mov    $0xa,%edi
call   1040 <sleep@plt>
jmp    117e <main+0x5e>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x3,%edi
mov    $0x1,%esi
call   1030 <create@plt>
test   %rax,%rax
js     115c <main+0x3c>
mov    $0x5,%edi
mov    $0x2,%esi
call   1030 <create@plt>
test   %rax,%rax
js     115c <main+0x3c>
nopl   0x0(%rax)
mov    $0xa,%edi
call   1040 <sleep@plt>
jmp    1150 <main+0x30>
mov    $0x1,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i64 @create(i32 3, i32 1)
%2 = icmp slt i64 %1, 0
br i1 %2, label %8, label %3
3: ; preds = %0
%4 = tail call i64 @create(i32 5, i32 2)
%5 = icmp slt i64 %4, 0
br i1 %5, label %8, label %6
6: ; preds = %3, %6
%7 = tail call i32 @sleep(i32 10)
br label %6
8: ; preds = %3, %0
ret i32 1
}
/* Type definitions */
struct statistics {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(struct statistics *);
void stats_free(struct statistics *stats) { free(stats); }


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

LLVM IR (-O0):
%struct.statistics = type { i32 }
define void @stats_free(%struct.statistics* %0) {
%2 = alloca %struct.statistics*
store %struct.statistics* %0, %struct.statistics** %2
%3 = load %struct.statistics*, %struct.statistics** %2
%4 = call i32 @free(%struct.statistics* %3)
ret void
}

LLVM IR (-O2):
%struct.statistics = type { i32 }
define void @stats_free(%struct.statistics* nocapture %0) {
%2 = tail call i32 @free(%struct.statistics* %0)
ret void
}
x() { return 4; }


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

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

LLVM IR (-O0):
define i32 @x() {
ret i32 4
}

LLVM IR (-O2):
define i32 @x() {
ret i32 4
}
/* Variables and functions */
int sched_yield();
int quark_yield() { return sched_yield(); }


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

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

LLVM IR (-O0):
define i32 @quark_yield() {
%1 = call i32 (...) @sched_yield()
ret i32 %1
}

LLVM IR (-O2):
define i32 @quark_yield() {
%1 = tail call i32 (...) @sched_yield()
ret i32 %1
}
void ff_hevc_put_hevc_qpel_hv32_10_sse4() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_qpel_hv32_10_sse4() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
void usage(char *progname) {
  fprintf(stderr,
          "Usage: %s [-d] "
          "[-s server] [-p port] [-k keyfile] [-l logfile] -e pid/eid\n",
          progname);
  exit(-1);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ead(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xec0(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0xffffffff,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rax
mov    %rdi,%rdx
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0xffffffff,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [75 x i8] c"Usage: %s [-d] [-s server] [-p port] [-k keyfile] [-l logfile] -e pid/eid\0A\00"
define void @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([75 x i8], [75 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = call i32 @exit(i32 -1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [75 x i8] c"Usage: %s [-d] [-s server] [-p port] [-k keyfile] [-l logfile] -e pid/eid\0A\00"
define void @usage(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([75 x i8], [75 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = tail call i32 @exit(i32 -1)
unreachable
}
void _M2_ChanConsts_init(__attribute__((unused)) int argc,
                         __attribute__((unused)) char *argv[]) {}


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

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

LLVM IR (-O0):
define void @_M2_ChanConsts_init(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 @_M2_ChanConsts_init(i32 %0, i8** nocapture %1) {
ret void
}
/* Variables and functions */
long double abs(long double);
long double fun_abs(long double a) { return abs(a); }


x86 assembly (clang, -O0):
<fun_abs>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
fldt   -0x10(%rbp)
mov    %rsp,%rax
fstpt  (%rax)
call   1030 <abs@plt>
fld    %st(0)
fstp   %st(0)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fun_abs>:
jmp    1030 <abs@plt>

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

LLVM IR (-O2):
define x86_fp80 @fun_abs(x86_fp80 %0) {
%2 = tail call x86_fp80 @abs(x86_fp80 %0)
ret x86_fp80 %2
}
/* Variables and functions */
int /*<<< orphan*/ O_CREAT;
int /*<<< orphan*/ close(int);
int openat(int, char const *, int /*<<< orphan*/, int);
int touchat(int dfd, const char *path) {
  int fd = openat(dfd, path, O_CREAT, 0700);
  if (fd >= 0)
    close(fd);
  return fd;
}


x86 assembly (clang, -O0):
<touchat>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    0x2ebb(%rip),%rax
mov    (%rax),%edx
mov    $0x1c0,%ecx
call   1030 <openat@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
jl     115e <touchat+0x3e>
mov    -0x14(%rbp),%edi
call   1040 <close@plt>
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<touchat>:
push   %rbx
mov    0x2ed0(%rip),%rax
mov    (%rax),%edx
mov    $0x1c0,%ecx
call   1030 <openat@plt>
mov    %eax,%ebx
test   %eax,%eax
js     1141 <touchat+0x21>
mov    %ebx,%edi
call   1040 <close@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
@O_CREAT = global i32 0
define i32 @touchat(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i32
store i32 %0, i32* %3
store i8* %1, i8** %4
%6 = load i32, i32* %3
%7 = load i8*, i8** %4
%8 = load i32, i32* @O_CREAT
%9 = call i32 @openat(i32 %6, i8* %7, i32 %8, i32 448)
store i32 %9, i32* %5
%10 = load i32, i32* %5
%11 = icmp sge i32 %10, 0
br i1 %11, label %12, label %15
12: ; preds = %2
%13 = load i32, i32* %5
%14 = call i32 @close(i32 %13)
br label %15
15: ; preds = %12, %2
%16 = load i32, i32* %5
ret i32 %16
}

LLVM IR (-O2):
@O_CREAT = global i32 0
define i32 @touchat(i32 %0, i8* %1) {
%3 = load i32, i32* @O_CREAT
%4 = tail call i32 @openat(i32 %0, i8* %1, i32 %3, i32 448)
%5 = icmp sgt i32 %4, -1
br i1 %5, label %6, label %8
6: ; preds = %2
%7 = tail call i32 @close(i32 %4)
br label %8
8: ; preds = %6, %2
ret i32 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ pid_t;

/* Variables and functions */
int countlist(void **);
int /*<<< orphan*/ free(int /*<<< orphan*/ *);
int /*<<< orphan*/ *pids_of_my_exe();
int num_procs_of_my_exe(void) {
  pid_t *pids = pids_of_my_exe();
  int ret;
  ret = countlist((void **)pids);
  if (pids)
    free(pids);
  return ret;
}


x86 assembly (clang, -O0):
<num_procs_of_my_exe>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1050 <pids_of_my_exe@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <countlist@plt>
mov    %eax,-0xc(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1163 <num_procs_of_my_exe+0x33>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<num_procs_of_my_exe>:
push   %rbp
push   %rbx
push   %rax
xor    %eax,%eax
call   1050 <pids_of_my_exe@plt>
mov    %rax,%rbx
mov    %rax,%rdi
call   1040 <countlist@plt>
mov    %eax,%ebp
test   %rbx,%rbx
je     1154 <num_procs_of_my_exe+0x24>
mov    %rbx,%rdi
call   1030 <free@plt>
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @num_procs_of_my_exe() {
%1 = alloca i32*
%2 = alloca i32
%3 = call i32* (...) @pids_of_my_exe()
store i32* %3, i32** %1
%4 = load i32*, i32** %1
%5 = bitcast i32* %4 to i8**
%6 = call i32 @countlist(i8** %5)
store i32 %6, i32* %2
%7 = load i32*, i32** %1
%8 = icmp ne i32* %7, null
br i1 %8, label %9, label %12
9: ; preds = %0
%10 = load i32*, i32** %1
%11 = call i32 @free(i32* %10)
br label %12
12: ; preds = %9, %0
%13 = load i32, i32* %2
ret i32 %13
}

LLVM IR (-O2):
define i32 @num_procs_of_my_exe() {
%1 = tail call i32* (...) @pids_of_my_exe()
%2 = bitcast i32* %1 to i8**
%3 = tail call i32 @countlist(i8** %2)
%4 = icmp eq i32* %1, null
br i1 %4, label %7, label %5
5: ; preds = %0
%6 = tail call i32 @free(i32* %1)
br label %7
7: ; preds = %5, %0
ret i32 %3
}
int asciiCmp(const void *elem1, const void *elem2) {
  return (int)(*((char *)elem1) - *((char *)elem2));
}


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

x86 assembly (clang, -O2):
<asciiCmp>:
movsbl (%rdi),%eax
movsbl (%rsi),%ecx
sub    %ecx,%eax
ret

LLVM IR (-O0):
define i32 @asciiCmp(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = load i8, i8* %5
%7 = sext i8 %6 to i32
%8 = load i8*, i8** %4
%9 = load i8, i8* %8
%10 = sext i8 %9 to i32
%11 = sub nsw i32 %7, %10
ret i32 %11
}

LLVM IR (-O2):
define i32 @asciiCmp(i8* nocapture %0, i8* nocapture %1) {
%3 = load i8, i8* %0
%4 = sext i8 %3 to i32
%5 = load i8, i8* %1
%6 = sext i8 %5 to i32
%7 = sub nsw i32 %4, %6
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ CMP0_DriverIRQHandler();
__attribute__((weak)) void CMP0_IRQHandler(void) { CMP0_DriverIRQHandler(); }


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

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

LLVM IR (-O0):
define weak void @CMP0_IRQHandler() {
%1 = call i32 (...) @CMP0_DriverIRQHandler()
ret void
}

LLVM IR (-O2):
define weak void @CMP0_IRQHandler() {
%1 = tail call i32 (...) @CMP0_DriverIRQHandler()
ret void
}
/* Variables and functions */
double __nv_fma_ru(double, double, double);
double __fma_ru(double __a, double __b, double __c) {
  return __nv_fma_ru(__a, __b, __c);
}


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

x86 assembly (clang, -O2):
<__fma_ru>:
jmp    1030 <__nv_fma_ru@plt>

LLVM IR (-O0):
define double @__fma_ru(double %0, double %1, double %2) {
%4 = alloca double
%5 = alloca double
%6 = alloca double
store double %0, double* %4
store double %1, double* %5
store double %2, double* %6
%7 = load double, double* %4
%8 = load double, double* %5
%9 = load double, double* %6
%10 = call double @__nv_fma_ru(double %7, double %8, double %9)
ret double %10
}

LLVM IR (-O2):
define double @__fma_ru(double %0, double %1, double %2) {
%4 = tail call double @__nv_fma_ru(double %0, double %1, double %2)
ret double %4
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *);
int close_the_file(FILE *fp) {
  fprintf(fp, "!ENDOFREGISTRYGENERATEDINCLUDE\n");
  fclose(fp);
  return 0;
}


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

x86 assembly (clang, -O2):
<close_the_file>:
push   %rbx
mov    %rdi,%rbx
lea    0xed5(%rip),%rdi
mov    $0x1f,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1040 <fwrite@plt>
mov    %rbx,%rdi
call   1030 <fclose@plt>
xor    %eax,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [32 x i8] c"!ENDOFREGISTRYGENERATEDINCLUDE\0A\00"
define i32 @close_the_file(i32* nocapture %0) {
%2 = tail call i64 @fwrite(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), i64 31, i64 1, i32* %0)
%3 = tail call i32 @fclose(i32* %0)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ SOMAXCONN;
int listen(int, int /*<<< orphan*/);
int setSocketListening(int socket) { return listen(socket, SOMAXCONN); }


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

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

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

LLVM IR (-O2):
@SOMAXCONN = global i32 0
define i32 @setSocketListening(i32 %0) {
%2 = load i32, i32* @SOMAXCONN
%3 = tail call i32 @listen(i32 %0, i32 %2)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ __exeptions_enable_board();
int /*<<< orphan*/ __init_board();
void __init() {
  __init_board();
  __exeptions_enable_board();
}


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

x86 assembly (clang, -O2):
<__init>:
push   %rax
xor    %eax,%eax
call   1040 <__init_board@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <__exeptions_enable_board@plt>

LLVM IR (-O0):
define void @__init() {
%1 = call i32 (...) @__init_board()
%2 = call i32 (...) @__exeptions_enable_board()
ret void
}

LLVM IR (-O2):
define void @__init() {
%1 = tail call i32 (...) @__init_board()
%2 = tail call i32 (...) @__exeptions_enable_board()
ret void
}
int musbgm_play(int no, int time, int vol) {
  printf("%s not implemented\n", __func__);
  return (-1);
}


x86 assembly (clang, -O0):
<musbgm_play>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
lea    0xed8(%rip),%rdi
lea    0xee5(%rip),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
mov    $0xffffffff,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [20 x i8] c"%s not implemented\0A\00"
@__func__.musbgm_play = [12 x i8] c"musbgm_play\00"
define i32 @musbgm_play(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([12 x i8], [12 x i8]* @__func__.musbgm_play, i64 0, i64 0))
ret i32 -1
}

LLVM IR (-O2):
@.str = [20 x i8] c"%s not implemented\0A\00"
@__func__.musbgm_play = [12 x i8] c"musbgm_play\00"
define i32 @musbgm_play(i32 %0, i32 %1, i32 %2) {
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([12 x i8], [12 x i8]* @__func__.musbgm_play, i64 0, i64 0))
ret i32 -1
}
void f1(int *p, unsigned int i) {
  p += i;
  do {
    *p = 0;
    p += 1;
    i++;
  } while (i < 100);
}


x86 assembly (clang, -O0):
<f1>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,%ecx
shl    $0x2,%rcx
add    %rcx,%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movl   $0x0,(%rax)
mov    -0x8(%rbp),%rax
add    $0x4,%rax
mov    %rax,-0x8(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
cmpl   $0x64,-0xc(%rbp)
jb     111f <f1+0x1f>
pop    %rbp
ret

x86 assembly (clang, -O2):
<f1>:
push   %rax
lea    0x1(%rsi),%eax
cmp    $0x65,%eax
mov    $0x64,%ecx
cmovae %eax,%ecx
mov    %esi,%eax
lea    (%rdi,%rax,4),%rdi
not    %esi
add    %ecx,%esi
lea    0x4(,%rsi,4),%rdx
xor    %esi,%esi
call   1030 <memset@plt>
pop    %rax
ret

LLVM IR (-O0):
define void @f1(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** %3
%7 = zext i32 %5 to i64
%8 = getelementptr inbounds i32, i32* %6, i64 %7
store i32* %8, i32** %3
br label %9
9: ; preds = %15, %2
%10 = load i32*, i32** %3
store i32 0, i32* %10
%11 = load i32*, i32** %3
%12 = getelementptr inbounds i32, i32* %11, i64 1
store i32* %12, i32** %3
%13 = load i32, i32* %4
%14 = add i32 %13, 1
store i32 %14, i32* %4
br label %15
15: ; preds = %9
%16 = load i32, i32* %4
%17 = icmp ult i32 %16, 100
br i1 %17, label %9, label %18
18: ; preds = %15
ret void
}

LLVM IR (-O2):
define void @f1(i32* nocapture writeonly %0, i32 %1) {
%3 = zext i32 %1 to i64
%4 = getelementptr i32, i32* %0, i64 %3
%5 = bitcast i32* %4 to i8*
%6 = add i32 %1, 1
%7 = call i32 @llvm.umax.i32(i32 %6, i32 100)
%8 = xor i32 %1, -1
%9 = add i32 %7, %8
%10 = zext i32 %9 to i64
%11 = shl nuw nsw i64 %10, 2
%12 = add nuw nsw i64 %11, 4
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void usage(char *program_name) {
  printf("\nUsage : %s pubkey-file psec-param-file out-file rand_file \n",
         program_name);
}


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

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

LLVM IR (-O2):
@.str = [61 x i8] c"\0AUsage : %s pubkey-file psec-param-file out-file rand_file \0A\00"
define void @usage(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([61 x i8], [61 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
int exists(toFilePath)
char *toFilePath;
{ return (access(toFilePath, 0) == 0); }


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

x86 assembly (clang, -O2):
<exists>:
push   %rax
xor    %esi,%esi
xor    %eax,%eax
call   1030 <access@plt>
xor    %ecx,%ecx
test   %eax,%eax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @exists(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 (i8*, i32, ...) bitcast (i32 (...)* @access to i32 (i8*, i32, ...)*)(i8* %3, i32 0)
%5 = icmp eq i32 %4, 0
%6 = zext i1 %5 to i32
ret i32 %6
}

LLVM IR (-O2):
define i32 @exists(i8* %0) {
%2 = tail call i32 (i8*, i32, ...) bitcast (i32 (...)* @access to i32 (i8*, i32, ...)*)(i8* %0, i32 0)
%3 = icmp eq i32 %2, 0
%4 = zext i1 %3 to i32
ret i32 %4
}
int show_function_if_1() {}


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

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

LLVM IR (-O0):
define i32 @show_function_if_1() {
%1 = alloca i32
%2 = load i32, i32* %1
ret i32 %2
}

LLVM IR (-O2):
define i32 @show_function_if_1() {
ret i32 undef
}
void mem_freefp(p) void *p;
{ mem_free(p); }


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

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

LLVM IR (-O0):
define void @mem_freefp(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 (i8*, ...) bitcast (i32 (...)* @mem_free to i32 (i8*, ...)*)(i8* %3)
ret void
}

LLVM IR (-O2):
define void @mem_freefp(i8* %0) {
%2 = tail call i32 (i8*, ...) bitcast (i32 (...)* @mem_free to i32 (i8*, ...)*)(i8* %0)
ret void
}
int main(void) {
  int x = 0;
  x;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
int convert2percent(unsigned long val, unsigned long total) {
  return (val * 100) / total;
}


x86 assembly (clang, -O0):
<convert2percent>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
imul   $0x64,-0x8(%rbp),%rax
xor    %ecx,%ecx
mov    %ecx,%edx
divq   -0x10(%rbp)
pop    %rbp
ret

x86 assembly (clang, -O2):
<convert2percent>:
imul   $0x64,%rdi,%rax
mov    %rax,%rcx
or     %rsi,%rcx
shr    $0x20,%rcx
je     1116 <convert2percent+0x16>
xor    %edx,%edx
div    %rsi
ret
xor    %edx,%edx
div    %esi
ret

LLVM IR (-O0):
define i32 @convert2percent(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %3
%6 = mul i64 %5, 100
%7 = load i64, i64* %4
%8 = udiv i64 %6, %7
%9 = trunc i64 %8 to i32
ret i32 %9
}

LLVM IR (-O2):
define i32 @convert2percent(i64 %0, i64 %1) {
%3 = mul i64 %0, 100
%4 = udiv i64 %3, %1
%5 = trunc i64 %4 to i32
ret i32 %5
}
/* Variables and functions */
int _ada_use_c2phc4c(int, int *, int *, double *, int /*<<< orphan*/);
int padcon_get_dobldobl_step_size(double *step) {
  int fail;
  int precision = 1;
  int *b;
  fail = _ada_use_c2phc4c(868, &precision, b, step, 0);
  return fail;
}


x86 assembly (clang, -O0):
<padcon_get_dobldobl_step_size>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x1,-0x10(%rbp)
mov    -0x18(%rbp),%rdx
mov    -0x8(%rbp),%rcx
mov    $0x364,%edi
lea    -0x10(%rbp),%rsi
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc4c@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<padcon_get_dobldobl_step_size>:
push   %rax
mov    %rdi,%rcx
movl   $0x1,0x4(%rsp)
lea    0x4(%rsp),%rsi
mov    $0x364,%edi
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc4c@plt>
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @padcon_get_dobldobl_step_size(double* %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
store i32 1, i32* %2
%4 = call i32 @_ada_use_c2phc4c(i32 868, i32* %2, i32* undef, double* %0, i32 0)
ret i32 %4
}
/* Variables and functions */
int fc_strcoll(char const *const, char const *const);
int compare_strings_strvec(const char *const *first,
                           const char *const *second) {
  return fc_strcoll(*first, *second);
}


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

x86 assembly (clang, -O2):
<compare_strings_strvec>:
mov    (%rdi),%rdi
mov    (%rsi),%rsi
jmp    1030 <fc_strcoll@plt>

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

LLVM IR (-O2):
define i32 @compare_strings_strvec(i8** nocapture %0, i8** nocapture %1) {
%3 = load i8*, i8** %0
%4 = load i8*, i8** %1
%5 = tail call i32 @fc_strcoll(i8* %3, i8* %4)
ret i32 %5
}
int alignof_long_double() {
  struct s {
    char x;
    long double y;
  };
  return sizeof(char) +
         (sizeof(struct s) - (sizeof(char) + sizeof(long double)));
}


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

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

LLVM IR (-O0):
define i32 @alignof_long_double() {
ret i32 16
}

LLVM IR (-O2):
define i32 @alignof_long_double() {
ret i32 16
}
int recvTCP() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @recvTCP() {
ret i32 0
}