xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isalpha(int);
void t_isalpha_0xfb() {
  Assert_real((isalpha(251) == 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_isalpha.c",
              1260, ("isalpha should be 0 for 0xfb"));
}


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

x86 assembly (clang, -O2):
<t_isalpha_0xfb>:
push   %rax
mov    $0xfb,%edi
call   1030 <isalpha@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x4ec,%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_isalpha.c\00"
@.str.1 = [29 x i8] c"isalpha should be 0 for 0xfb\00"
define void @t_isalpha_0xfb() {
%1 = call i64 @isalpha(i32 251)
%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 1260, 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_isalpha.c\00"
@.str.1 = [29 x i8] c"isalpha should be 0 for 0xfb\00"
define void @t_isalpha_0xfb() {
%1 = tail call i64 @isalpha(i32 251)
%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 1260, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
char *or_getvowel(char *t) {
  if (t[0] == 'c') {
    return (++t);
  } else {
    return (t);
  }
}


x86 assembly (clang, -O0):
<or_getvowel>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x63,%eax
jne    112d <or_getvowel+0x2d>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
mov    %rax,-0x8(%rbp)
jmp    1135 <or_getvowel+0x35>
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<or_getvowel>:
xor    %eax,%eax
cmpb   $0x63,(%rdi)
sete   %al
add    %rdi,%rax
ret

LLVM IR (-O0):
define i8* @or_getvowel(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %3
%4 = load i8*, i8** %3
%5 = getelementptr inbounds i8, i8* %4, i64 0
%6 = load i8, i8* %5
%7 = sext i8 %6 to i32
%8 = icmp eq i32 %7, 99
br i1 %8, label %9, label %12
9: ; preds = %1
%10 = load i8*, i8** %3
%11 = getelementptr inbounds i8, i8* %10, i32 1
store i8* %11, i8** %3
store i8* %11, i8** %2
br label %14
12: ; preds = %1
%13 = load i8*, i8** %3
store i8* %13, i8** %2
br label %14
14: ; preds = %12, %9
%15 = load i8*, i8** %2
ret i8* %15
}

LLVM IR (-O2):
define i8* @or_getvowel(i8* %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 99
%4 = zext i1 %3 to i64
%5 = getelementptr i8, i8* %0, i64 %4
ret i8* %5
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void printstring(char *c) { printf("%s", c); }


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

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

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

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
define void @printstring(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
void dummy_func() {
  int i;
  i++;
}


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

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

LLVM IR (-O0):
define void @dummy_func() {
%1 = alloca i32
%2 = load i32, i32* %1
%3 = add nsw i32 %2, 1
store i32 %3, i32* %1
ret void
}

LLVM IR (-O2):
define void @dummy_func() {
ret void
}
int Arith_max(int x, int y) { return x > y ? x : y; }


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

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

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

LLVM IR (-O2):
define i32 @Arith_max(i32 %0, i32 %1) {
%3 = icmp sgt i32 %0, %1
%4 = select i1 %3, i32 %0, i32 %1
ret i32 %4
}
/* Variables and functions */
int squareSum(int);
int isHappy1(int n) {
  int slow = n, fast = n;
  do {
    slow = squareSum(slow);
    fast = squareSum(fast);
    fast = squareSum(fast);
  } while (slow != fast);
  if (slow == 1)
    return 1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<isHappy1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%edi
call   1030 <squareSum@plt>
mov    %eax,-0xc(%rbp)
mov    -0x10(%rbp),%edi
call   1030 <squareSum@plt>
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%edi
call   1030 <squareSum@plt>
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
jne    1127 <isHappy1+0x17>
cmpl   $0x1,-0xc(%rbp)
jne    116a <isHappy1+0x5a>
movl   $0x1,-0x4(%rbp)
jmp    1171 <isHappy1+0x61>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<isHappy1>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebx
mov    %edi,%ebp
nopw   0x0(%rax,%rax,1)
mov    %ebx,%edi
call   1030 <squareSum@plt>
mov    %eax,%ebx
mov    %ebp,%edi
call   1030 <squareSum@plt>
mov    %eax,%edi
call   1030 <squareSum@plt>
mov    %eax,%ebp
cmp    %eax,%ebx
jne    1120 <isHappy1+0x10>
xor    %eax,%eax
cmp    $0x1,%ebx
sete   %al
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @isHappy1(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %3
%6 = load i32, i32* %3
store i32 %6, i32* %4
%7 = load i32, i32* %3
store i32 %7, i32* %5
br label %8
8: ; preds = %15, %1
%9 = load i32, i32* %4
%10 = call i32 @squareSum(i32 %9)
store i32 %10, i32* %4
%11 = load i32, i32* %5
%12 = call i32 @squareSum(i32 %11)
store i32 %12, i32* %5
%13 = load i32, i32* %5
%14 = call i32 @squareSum(i32 %13)
store i32 %14, i32* %5
br label %15
15: ; preds = %8
%16 = load i32, i32* %4
%17 = load i32, i32* %5
%18 = icmp ne i32 %16, %17
br i1 %18, label %8, label %19
19: ; preds = %15
%20 = load i32, i32* %4
%21 = icmp eq i32 %20, 1
br i1 %21, label %22, label %23
22: ; preds = %19
store i32 1, i32* %2
br label %24
23: ; preds = %19
store i32 0, i32* %2
br label %24
24: ; preds = %23, %22
%25 = load i32, i32* %2
ret i32 %25
}

LLVM IR (-O2):
define i32 @isHappy1(i32 %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i32 [ %0, %1 ], [ %5, %2 ]
%4 = phi i32 [ %0, %1 ], [ %7, %2 ]
%5 = tail call i32 @squareSum(i32 %3)
%6 = tail call i32 @squareSum(i32 %4)
%7 = tail call i32 @squareSum(i32 %6)
%8 = icmp eq i32 %5, %7
br i1 %8, label %9, label %2
9: ; preds = %2
%10 = icmp eq i32 %5, 1
%11 = zext i1 %10 to i32
ret i32 %11
}
/* Variables and functions */
int /*<<< orphan*/ TRUE;
int /*<<< orphan*/ cbreak();
int /*<<< orphan*/ curs_set(int);
int /*<<< orphan*/ initscr();
int /*<<< orphan*/ nodelay(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ noecho();
int /*<<< orphan*/ printw(char *);
int /*<<< orphan*/ stdscr;
void initConsoleInterface() {
  initscr();
  noecho();
  cbreak();
  nodelay(stdscr, TRUE);
  curs_set(false);
  printw("fds");
}


x86 assembly (clang, -O0):
<initConsoleInterface>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <initscr@plt>
mov    $0x0,%al
call   1070 <noecho@plt>
mov    $0x0,%al
call   1030 <cbreak@plt>
mov    0x2e68(%rip),%rax
mov    (%rax),%edi
mov    0x2e57(%rip),%rax
mov    (%rax),%esi
call   1060 <nodelay@plt>
xor    %edi,%edi
call   1080 <curs_set@plt>
lea    0xe62(%rip),%rdi
call   1050 <printw@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<initConsoleInterface>:
push   %rax
xor    %eax,%eax
call   1040 <initscr@plt>
xor    %eax,%eax
call   1070 <noecho@plt>
xor    %eax,%eax
call   1030 <cbreak@plt>
mov    0x2e6b(%rip),%rax
mov    (%rax),%edi
mov    0x2e5a(%rip),%rax
mov    (%rax),%esi
call   1060 <nodelay@plt>
xor    %edi,%edi
call   1080 <curs_set@plt>
lea    0xe65(%rip),%rdi
pop    %rax
jmp    1050 <printw@plt>

LLVM IR (-O0):
@stdscr = global i32 0
@TRUE = global i32 0
@.str = [4 x i8] c"fds\00"
define void @initConsoleInterface() {
%1 = call i32 (...) @initscr()
%2 = call i32 (...) @noecho()
%3 = call i32 (...) @cbreak()
%4 = load i32, i32* @stdscr
%5 = load i32, i32* @TRUE
%6 = call i32 @nodelay(i32 %4, i32 %5)
%7 = call i32 @curs_set(i32 0)
%8 = call i32 @printw(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@stdscr = global i32 0
@TRUE = global i32 0
@.str = [4 x i8] c"fds\00"
define void @initConsoleInterface() {
%1 = tail call i32 (...) @initscr()
%2 = tail call i32 (...) @noecho()
%3 = tail call i32 (...) @cbreak()
%4 = load i32, i32* @stdscr
%5 = load i32, i32* @TRUE
%6 = tail call i32 @nodelay(i32 %4, i32 %5)
%7 = tail call i32 @curs_set(i32 0)
%8 = tail call i32 @printw(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
ret void
}
void stack_segement_fault_handler(struct exception_info *info) {
  asm volatile("" : : :);
  asm volatile("hlt");
}


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

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

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

LLVM IR (-O2):
%struct.exception_info = type opaque
define void @stack_segement_fault_handler(%struct.exception_info* nocapture readnone %0) {
tail call void asm sideeffect "", "~{dirflag},~{fpsr},~{flags}"()
tail call void asm sideeffect "hlt", "~{dirflag},~{fpsr},~{flags}"()
ret void
}
/* Variables and functions */
scalar_t__ fork();
int /*<<< orphan*/ malloc(int);
int main() {
  int parent = 1;
  int a = 0;
  while (parent) {
    if (fork() == 0) {
      parent = 0;
      malloc(1);
    }
  }
  while (1)
    a++;
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x0,-0x8(%rbp)
je     116e <main+0x4e>
mov    $0x0,%al
call   1040 <fork@plt>
cmp    $0x0,%rax
jne    1169 <main+0x49>
movl   $0x0,-0x8(%rbp)
mov    $0x1,%edi
call   1030 <malloc@plt>
jmp    113d <main+0x1d>
jmp    1173 <main+0x53>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
mov    %eax,-0xc(%rbp)
jmp    1173 <main+0x53>

x86 assembly (clang, -O2):
<main>:
push   %rax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1040 <fork@plt>
test   %rax,%rax
jne    1130 <main+0x10>
mov    $0x1,%edi
call   1030 <malloc@plt>
cs nopw 0x0(%rax,%rax,1)
jmp    1150 <main+0x30>

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

LLVM IR (-O2):
define i32 @main() {
br label %1
1: ; preds = %1, %0
%2 = tail call i64 (...) @fork()
%3 = icmp eq i64 %2, 0
br i1 %3, label %4, label %1
4: ; preds = %1
%5 = tail call i32 @malloc(i32 1)
br label %6
6: ; preds = %4, %6
br label %6
}
void RTAvlrU64DoWithAll(void) {}


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

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

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

LLVM IR (-O2):
define void @RTAvlrU64DoWithAll() {
ret void
}
void dummyLocal() {}


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

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

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

LLVM IR (-O2):
define void @dummyLocal() {
ret void
}
long long int _f_llrintl(long double x) {
  long long int _result;
  asm("fistpll %0" : "=m"(_result) : "t"(x) : "st");
  return _result;
}


x86 assembly (clang, -O0):
<_f_llrintl>:
push   %rbp
mov    %rsp,%rbp
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
fldt   -0x10(%rbp)
fistpll -0x18(%rbp)
mov    -0x18(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_f_llrintl>:
fldt   0x8(%rsp)
fistpll -0x8(%rsp)
mov    -0x8(%rsp),%rax
ret

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

LLVM IR (-O2):
define i64 @_f_llrintl(x86_fp80 %0) {
%2 = alloca i64
%3 = bitcast i64* %2 to i8*
%4 = load i64, i64* %2
ret i64 %4
}
/* Type definitions */
typedef unsigned int uint8_t;

/* Variables and functions */
void bf_unset(uint8_t field[], size_t idx) {
  field[idx / 8] &= ~(1u << (idx % 8));
}


x86 assembly (clang, -O0):
<bf_unset>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
and    $0x7,%rax
mov    %eax,%ecx
mov    $0x1,%edx
shl    %cl,%edx
xor    $0xffffffff,%edx
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%rcx
shr    $0x3,%rcx
and    (%rax,%rcx,4),%edx
mov    %edx,(%rax,%rcx,4)
pop    %rbp
ret

x86 assembly (clang, -O2):
<bf_unset>:
mov    %esi,%ecx
and    $0x7,%cl
mov    $0xfffffffe,%eax
rol    %cl,%eax
shr    $0x3,%rsi
and    %eax,(%rdi,%rsi,4)
ret

LLVM IR (-O0):
define void @bf_unset(i32* %0, i64 %1) {
%3 = alloca i32*
%4 = alloca i64
store i32* %0, i32** %3
store i64 %1, i64* %4
%5 = load i64, i64* %4
%6 = urem i64 %5, 8
%7 = trunc i64 %6 to i32
%8 = shl i32 1, %7
%9 = xor i32 %8, -1
%10 = load i32*, i32** %3
%11 = load i64, i64* %4
%12 = udiv i64 %11, 8
%13 = getelementptr inbounds i32, i32* %10, i64 %12
%14 = load i32, i32* %13
%15 = and i32 %14, %9
store i32 %15, i32* %13
ret void
}

LLVM IR (-O2):
define void @bf_unset(i32* nocapture %0, i64 %1) {
%3 = trunc i64 %1 to i32
%4 = and i32 %3, 7
%5 = shl nuw nsw i32 1, %4
%6 = xor i32 %5, -1
%7 = lshr i64 %1, 3
%8 = getelementptr inbounds i32, i32* %0, i64 %7
%9 = load i32, i32* %8
%10 = and i32 %9, %6
store i32 %10, i32* %8
ret void
}
signed int f7(signed int v_a, signed int v_b) {
  signed int v_anda = v_a & -16777216;
  signed int v_shrb = ((unsigned int)v_b) >> 8;
  signed int v_or = v_anda | v_shrb;
  return v_or;
}


x86 assembly (clang, -O0):
<f7>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
and    $0xff000000,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
shr    $0x8,%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
or     -0x10(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f7>:
and    $0xff000000,%edi
shr    $0x8,%esi
lea    (%rsi,%rdi,1),%eax
ret

LLVM IR (-O0):
define i32 @f7(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%8 = load i32, i32* %3
%9 = and i32 %8, -16777216
store i32 %9, i32* %5
%10 = load i32, i32* %4
%11 = lshr i32 %10, 8
store i32 %11, i32* %6
%12 = load i32, i32* %5
%13 = load i32, i32* %6
%14 = or i32 %12, %13
store i32 %14, i32* %7
%15 = load i32, i32* %7
ret i32 %15
}

LLVM IR (-O2):
define i32 @f7(i32 %0, i32 %1) {
%3 = and i32 %0, -16777216
%4 = lshr i32 %1, 8
%5 = or i32 %4, %3
ret i32 %5
}
signed char v_signed_char_func() { return (0); }


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

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

LLVM IR (-O0):
define signext i8 @v_signed_char_func() {
ret i8 0
}

LLVM IR (-O2):
define signext i8 @v_signed_char_func() {
ret i8 0
}
/* Variables and functions */
char *ap_cvt(double, int, int *, int *, int /*<<< orphan*/);
char *ap_fcvt(double arg, int ndigits, int *decpt, int *sign) {
  return (ap_cvt(arg, ndigits, decpt, sign, 0));
}


x86 assembly (clang, -O0):
<ap_fcvt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
mov    %edi,-0xc(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
movsd  -0x8(%rbp),%xmm0
mov    -0xc(%rbp),%edi
mov    -0x18(%rbp),%rsi
mov    -0x20(%rbp),%rdx
xor    %ecx,%ecx
call   1030 <ap_cvt@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ap_fcvt>:
xor    %ecx,%ecx
jmp    1030 <ap_cvt@plt>

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

LLVM IR (-O2):
define i8* @ap_fcvt(double %0, i32 %1, i32* %2, i32* %3) {
%5 = tail call i8* @ap_cvt(double %0, i32 %1, i32* %2, i32* %3, i32 0)
ret i8* %5
}
int born() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @born() {
ret i32 0
}
/* Type definitions */
typedef void mem_block;

/* Variables and functions */
int mem_block_size(void const *);
void *mem_block_end(const struct mem_block *block) {
  return (struct mem_block *)((char *)block + mem_block_size(block));
}


x86 assembly (clang, -O0):
<mem_block_end>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <mem_block_size@plt>
mov    %eax,%ecx
mov    -0x10(%rbp),%rax
movslq %ecx,%rcx
add    %rcx,%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mem_block_end>:
push   %rbx
mov    %rdi,%rbx
call   1030 <mem_block_size@plt>
cltq
add    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
%struct.mem_block = type opaque
define i8* @mem_block_end(%struct.mem_block* %0) {
%2 = alloca %struct.mem_block*
store %struct.mem_block* %0, %struct.mem_block** %2
%3 = load %struct.mem_block*, %struct.mem_block** %2
%4 = bitcast %struct.mem_block* %3 to i8*
%5 = load %struct.mem_block*, %struct.mem_block** %2
%6 = bitcast %struct.mem_block* %5 to i8*
%7 = call i32 @mem_block_size(i8* %6)
%8 = sext i32 %7 to i64
%9 = getelementptr inbounds i8, i8* %4, i64 %8
%10 = bitcast i8* %9 to %struct.mem_block*
%11 = bitcast %struct.mem_block* %10 to i8*
ret i8* %11
}

LLVM IR (-O2):
%struct.mem_block = type opaque
define i8* @mem_block_end(%struct.mem_block* %0) {
%2 = bitcast %struct.mem_block* %0 to i8*
%3 = tail call i32 @mem_block_size(i8* %2)
%4 = sext i32 %3 to i64
%5 = getelementptr inbounds i8, i8* %2, i64 %4
ret i8* %5
}
unsigned int _hrt_log2i(unsigned int x) {
  unsigned int t = 0;
  x >>= 1;
  while (x) {
    x >>= 1;
    t++;
  }
  return t;
}


x86 assembly (clang, -O0):
<_hrt_log2i>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x4(%rbp),%eax
shr    $0x1,%eax
mov    %eax,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     1138 <_hrt_log2i+0x38>
mov    -0x4(%rbp),%eax
shr    $0x1,%eax
mov    %eax,-0x4(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1117 <_hrt_log2i+0x17>
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_hrt_log2i>:
xor    %eax,%eax
cmp    $0x2,%edi
jb     111c <_hrt_log2i+0x1c>
xor    %eax,%eax
mov    %edi,%ecx
nopl   0x0(%rax,%rax,1)
shr    %ecx
add    $0x1,%eax
cmp    $0x3,%edi
mov    %ecx,%edi
ja     1110 <_hrt_log2i+0x10>
ret

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

LLVM IR (-O2):
define i32 @_hrt_log2i(i32 %0) {
%2 = icmp ult i32 %0, 2
br i1 %2, label %9, label %3
3: ; preds = %1, %3
%4 = phi i32 [ %7, %3 ], [ 0, %1 ]
%5 = phi i32 [ %6, %3 ], [ %0, %1 ]
%6 = lshr i32 %5, 1
%7 = add nuw nsw i32 %4, 1
%8 = icmp ult i32 %5, 4
br i1 %8, label %9, label %3
9: ; preds = %3, %1
%10 = phi i32 [ 0, %1 ], [ %7, %3 ]
ret i32 %10
}
__attribute__((always_)) void
debug_object_activate(void *addr, struct debug_obj_descr *descr) {}


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

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

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

LLVM IR (-O2):
%struct.debug_obj_descr = type opaque
define void @debug_object_activate(i8* nocapture %0, %struct.debug_obj_descr* nocapture %1) {
ret void
}
/* Type definitions */
struct rq_asset_base_correlation {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/
rq_asset_base_correlation_free(struct rq_asset_base_correlation *);
void rq_asset_base_correlation_freefunc(void *asset_data) {
  rq_asset_base_correlation_free(
      (struct rq_asset_base_correlation *)asset_data);
}


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

x86 assembly (clang, -O2):
<rq_asset_base_correlation_freefunc>:
jmp    1030 <rq_asset_base_correlation_free@plt>

LLVM IR (-O0):
%struct.rq_asset_base_correlation = type { i32 }
define void @rq_asset_base_correlation_freefunc(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = bitcast i8* %3 to %struct.rq_asset_base_correlation*
%5 = call i32 @rq_asset_base_correlation_free(%struct.rq_asset_base_correlation* %4)
ret void
}

LLVM IR (-O2):
%struct.rq_asset_base_correlation = type { i32 }
define void @rq_asset_base_correlation_freefunc(i8* %0) {
%2 = bitcast i8* %0 to %struct.rq_asset_base_correlation*
%3 = tail call i32 @rq_asset_base_correlation_free(%struct.rq_asset_base_correlation* %2)
ret void
}
/* Type definitions */
struct rq_asset_equityvol {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ rq_asset_equityvol_free(struct rq_asset_equityvol *);
void rq_asset_equityvol_freefunc(void *asset_data) {
  rq_asset_equityvol_free((struct rq_asset_equityvol *)asset_data);
}


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

x86 assembly (clang, -O2):
<rq_asset_equityvol_freefunc>:
jmp    1030 <rq_asset_equityvol_free@plt>

LLVM IR (-O0):
%struct.rq_asset_equityvol = type { i32 }
define void @rq_asset_equityvol_freefunc(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = bitcast i8* %3 to %struct.rq_asset_equityvol*
%5 = call i32 @rq_asset_equityvol_free(%struct.rq_asset_equityvol* %4)
ret void
}

LLVM IR (-O2):
%struct.rq_asset_equityvol = type { i32 }
define void @rq_asset_equityvol_freefunc(i8* %0) {
%2 = bitcast i8* %0 to %struct.rq_asset_equityvol*
%3 = tail call i32 @rq_asset_equityvol_free(%struct.rq_asset_equityvol* %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ default_handler();
__attribute__((weak)) void DMA2_Stream7_IRQHandler() { default_handler(); }


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

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

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

LLVM IR (-O2):
define weak void @DMA2_Stream7_IRQHandler() {
%1 = tail call i32 (...) @default_handler()
ret void
}
void run_unwind_protects_internal(ignore1, ignore2) char *ignore1, *ignore2;
{ unwind_frame_run_internal((char *)((void *)0), (char *)((void *)0)); }


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

x86 assembly (clang, -O2):
<run_unwind_protects_internal>:
xor    %edi,%edi
xor    %esi,%esi
xor    %eax,%eax
jmp    1030 <unwind_frame_run_internal@plt>

LLVM IR (-O0):
define void @run_unwind_protects_internal(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = call i32 (i8*, i8*, ...) bitcast (i32 (...)* @unwind_frame_run_internal to i32 (i8*, i8*, ...)*)(i8* null, i8* null)
ret void
}

LLVM IR (-O2):
define void @run_unwind_protects_internal(i8* nocapture readnone %0, i8* nocapture readnone %1) {
%3 = tail call i32 (i8*, i8*, ...) bitcast (i32 (...)* @unwind_frame_run_internal to i32 (i8*, i8*, ...)*)(i8* null, i8* null)
ret void
}
char **cdio_get_devices_bsdi(void) { return ((void *)0); }


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

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

LLVM IR (-O0):
define i8** @cdio_get_devices_bsdi() {
ret i8** null
}

LLVM IR (-O2):
define noalias i8** @cdio_get_devices_bsdi() {
ret i8** null
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
int /*<<< orphan*/ set_port(int /*<<< orphan*/, int /*<<< orphan*/,
                            int /*<<< orphan*/, int, int);
void set_port_pullups(uint8_t address, uint8_t port, uint8_t value) {
  set_port(address, port, value, 0x0C, 0x0D);
}


x86 assembly (clang, -O0):
<set_port_pullups>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
mov    $0xc,%ecx
mov    $0xd,%r8d
call   1030 <set_port@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_port_pullups>:
mov    $0xc,%ecx
mov    $0xd,%r8d
jmp    1030 <set_port@plt>

LLVM IR (-O0):
define void @set_port_pullups(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i32, i32* %4
%8 = load i32, i32* %5
%9 = load i32, i32* %6
%10 = call i32 @set_port(i32 %7, i32 %8, i32 %9, i32 12, i32 13)
ret void
}

LLVM IR (-O2):
define void @set_port_pullups(i32 %0, i32 %1, i32 %2) {
%4 = tail call i32 @set_port(i32 %0, i32 %1, i32 %2, i32 12, i32 13)
ret void
}
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
bool rdd08sdpa_get_field(uint8_t i_rdd08a) { return i_rdd08a & 0x80; }


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

x86 assembly (clang, -O2):
<rdd08sdpa_get_field>:
mov    %edi,%eax
and    $0x80,%eax
ret

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

LLVM IR (-O2):
define i32 @rdd08sdpa_get_field(i32 %0) {
%2 = and i32 %0, 128
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ convUint2doub();
void convUlong2doub(void) { convUint2doub(); }


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

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

LLVM IR (-O0):
define void @convUlong2doub() {
%1 = call i32 (...) @convUint2doub()
ret void
}

LLVM IR (-O2):
define void @convUlong2doub() {
%1 = tail call i32 (...) @convUint2doub()
ret void
}
/* Type definitions */
struct msghdr {
  int dummy;
};
typedef int ssize_t;

/* Variables and functions */
int /*<<< orphan*/ ENOSYS;
int /*<<< orphan*/ __set_errno(int /*<<< orphan*/);
ssize_t __sendmsg(int fd, const struct msghdr *message, int flags) {
  __set_errno(ENOSYS);
  return -1;
}


x86 assembly (clang, -O0):
<__sendmsg>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    0x2ebf(%rip),%rax
mov    (%rax),%edi
call   1030 <__set_errno@plt>
mov    $0xffffffff,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__sendmsg>:
push   %rax
mov    0x2ed0(%rip),%rax
mov    (%rax),%edi
call   1030 <__set_errno@plt>
mov    $0xffffffff,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.msghdr = type { i32 }
@ENOSYS = global i32 0
define i32 @__sendmsg(i32 %0, %struct.msghdr* %1, i32 %2) {
%4 = alloca i32
%5 = alloca %struct.msghdr*
%6 = alloca i32
store i32 %0, i32* %4
store %struct.msghdr* %1, %struct.msghdr** %5
store i32 %2, i32* %6
%7 = load i32, i32* @ENOSYS
%8 = call i32 @__set_errno(i32 %7)
ret i32 -1
}

LLVM IR (-O2):
%struct.msghdr = type { i32 }
@ENOSYS = global i32 0
define i32 @__sendmsg(i32 %0, %struct.msghdr* nocapture readnone %1, i32 %2) {
%4 = load i32, i32* @ENOSYS
%5 = tail call i32 @__set_errno(i32 %4)
ret i32 -1
}
int test_imm_4Dint32_reg(int val) { return ((val) & (0x4D << 0)) ? -20 : -40; }


x86 assembly (clang, -O0):
<test_imm_4Dint32_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edx
and    $0x4d,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_4Dint32_reg>:
test   $0x4d,%dil
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_4Dint32_reg(i32 %0) {
%2 = and i32 %0, 77
%3 = icmp eq i32 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ chdir(char *);
int /*<<< orphan*/ close(int);
int creat(char *, int);
int /*<<< orphan*/ write(int, char *, int);
void GPF_init(char *f) {
  int fd;
  chdir(".nife");
  if ((fd = creat(f, 0600)) != -1) {
    write(fd, "# Nife auto-generated GNUplot file !\n", 37);
    close(fd);
  }
  chdir("..");
}


x86 assembly (clang, -O0):
<GPF_init>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xead(%rip),%rdi
call   1040 <chdir@plt>
mov    -0x8(%rbp),%rdi
mov    $0x180,%esi
call   1060 <creat@plt>
mov    %eax,-0xc(%rbp)
cmp    $0xffffffff,%eax
je     118e <GPF_init+0x4e>
mov    -0xc(%rbp),%edi
lea    0xe8a(%rip),%rsi
mov    $0x25,%edx
call   1030 <write@plt>
mov    -0xc(%rbp),%edi
call   1050 <close@plt>
lea    0xe97(%rip),%rdi
call   1040 <chdir@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<GPF_init>:
push   %rbx
mov    %rdi,%rbx
lea    0xeb5(%rip),%rdi
call   1040 <chdir@plt>
mov    %rbx,%rdi
mov    $0x180,%esi
call   1060 <creat@plt>
cmp    $0xffffffff,%eax
je     117e <GPF_init+0x3e>
mov    %eax,%ebx
lea    0xe9b(%rip),%rsi
mov    %eax,%edi
mov    $0x25,%edx
call   1030 <write@plt>
mov    %ebx,%edi
call   1050 <close@plt>
lea    0xea7(%rip),%rdi
pop    %rbx
jmp    1040 <chdir@plt>

LLVM IR (-O0):
@.str = [6 x i8] c".nife\00"
@.str.1 = [38 x i8] c"# Nife auto-generated GNUplot file !\0A\00"
@.str.2 = [3 x i8] c"..\00"
define void @GPF_init(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
%4 = call i32 @chdir(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%5 = load i8*, i8** %2
%6 = call i32 @creat(i8* %5, i32 384)
store i32 %6, i32* %3
%7 = icmp ne i32 %6, -1
br i1 %7, label %8, label %13
8: ; preds = %1
%9 = load i32, i32* %3
%10 = call i32 @write(i32 %9, i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.1, i64 0, i64 0), i32 37)
%11 = load i32, i32* %3
%12 = call i32 @close(i32 %11)
br label %13
13: ; preds = %8, %1
%14 = call i32 @chdir(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [6 x i8] c".nife\00"
@.str.1 = [38 x i8] c"# Nife auto-generated GNUplot file !\0A\00"
@.str.2 = [3 x i8] c"..\00"
define void @GPF_init(i8* %0) {
%2 = tail call i32 @chdir(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @creat(i8* %0, i32 384)
%4 = icmp eq i32 %3, -1
br i1 %4, label %8, label %5
5: ; preds = %1
%6 = tail call i32 @write(i32 %3, i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.1, i64 0, i64 0), i32 37)
%7 = tail call i32 @close(i32 %3)
br label %8
8: ; preds = %5, %1
%9 = tail call i32 @chdir(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
ret void
}
void IntRegister(unsigned long ulInterrupt, void (*pfnHandler)(void)) {
  unsigned long *ulNvicTbl;
  ;
  ulNvicTbl = (unsigned long *)(*((volatile unsigned long *)(0xE000ED08)));
  ulNvicTbl[ulInterrupt] = (unsigned long)pfnHandler;
}


x86 assembly (clang, -O0):
<IntRegister>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0xe000ed08,%eax
mov    (%rax),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdx
mov    -0x18(%rbp),%rax
mov    -0x8(%rbp),%rcx
mov    %rdx,(%rax,%rcx,8)
pop    %rbp
ret

x86 assembly (clang, -O2):
<IntRegister>:
mov    $0xe000ed08,%eax
mov    (%rax),%rax
mov    %rsi,(%rax,%rdi,8)
ret

LLVM IR (-O0):
define void @IntRegister(i64 %0, void ()* %1) {
%3 = alloca i64
%4 = alloca void ()*
%5 = alloca i64*
store i64 %0, i64* %3
store void ()* %1, void ()** %4
%6 = load volatile i64, i64* inttoptr (i64 3758157064 to i64*)
%7 = inttoptr i64 %6 to i64*
store i64* %7, i64** %5
%8 = load void ()*, void ()** %4
%9 = ptrtoint void ()* %8 to i64
%10 = load i64*, i64** %5
%11 = load i64, i64* %3
%12 = getelementptr inbounds i64, i64* %10, i64 %11
store i64 %9, i64* %12
ret void
}

LLVM IR (-O2):
define void @IntRegister(i64 %0, void ()* %1) {
%3 = load volatile i64, i64* inttoptr (i64 3758157064 to i64*)
%4 = inttoptr i64 %3 to i64*
%5 = ptrtoint void ()* %1 to i64
%6 = getelementptr inbounds i64, i64* %4, i64 %0
store i64 %5, i64* %6
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ CheckedCommand(int /*<<< orphan*/ *, int /*<<< orphan*/ *,
                                  char *, int, int);
void SetAlpha(FILE *p_cmd, FILE *p_res, int i_overlay, int i_alpha) {
  CheckedCommand(p_cmd, p_res, "SetAlpha %d %d\n", i_overlay, i_alpha);
}


x86 assembly (clang, -O0):
<SetAlpha>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %ecx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%ecx
mov    -0x18(%rbp),%r8d
lea    0xec4(%rip),%rdx
call   1030 <CheckedCommand@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<SetAlpha>:
mov    %ecx,%r8d
mov    %edx,%ecx
lea    0xee4(%rip),%rdx
jmp    1030 <CheckedCommand@plt>

LLVM IR (-O0):
@.str = [16 x i8] c"SetAlpha %d %d\0A\00"
define void @SetAlpha(i32* %0, i32* %1, i32 %2, i32 %3) {
%5 = alloca i32*
%6 = alloca i32*
%7 = alloca i32
%8 = alloca i32
store i32* %0, i32** %5
store i32* %1, i32** %6
store i32 %2, i32* %7
store i32 %3, i32* %8
%9 = load i32*, i32** %5
%10 = load i32*, i32** %6
%11 = load i32, i32* %7
%12 = load i32, i32* %8
%13 = call i32 @CheckedCommand(i32* %9, i32* %10, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i32 %11, i32 %12)
ret void
}

LLVM IR (-O2):
@.str = [16 x i8] c"SetAlpha %d %d\0A\00"
define void @SetAlpha(i32* %0, i32* %1, i32 %2, i32 %3) {
%5 = tail call i32 @CheckedCommand(i32* %0, i32* %1, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i32 %2, i32 %3)
ret void
}
void rop3_78_0_0(unsigned char *D, unsigned char S, unsigned char T) {
  unsigned char stk1;
  unsigned char stk2;
  unsigned char stk3;
  stk3 = S ^ T;
  stk2 = *D | stk3;
  stk1 = T ^ stk2;
  *D = stk1;
}


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

x86 assembly (clang, -O2):
<rop3_78_0_0>:
xor    %edx,%esi
or     (%rdi),%sil
xor    %dl,%sil
mov    %sil,(%rdi)
ret

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

LLVM IR (-O2):
define void @rop3_78_0_0(i8* nocapture %0, i8 zeroext %1, i8 zeroext %2) {
%4 = xor i8 %2, %1
%5 = load i8, i8* %0
%6 = or i8 %5, %4
%7 = xor i8 %6, %2
store i8 %7, i8* %0
ret void
}
char read_sprite(char *file_name, struct Image *image) { return 0; }


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

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

LLVM IR (-O0):
%struct.Image = type opaque
define signext i8 @read_sprite(i8* %0, %struct.Image* %1) {
%3 = alloca i8*
%4 = alloca %struct.Image*
store i8* %0, i8** %3
store %struct.Image* %1, %struct.Image** %4
ret i8 0
}

LLVM IR (-O2):
%struct.Image = type opaque
define signext i8 @read_sprite(i8* nocapture readnone %0, %struct.Image* nocapture readnone %1) {
ret i8 0
}
/* Variables and functions */
int /*<<< orphan*/ err_sys(char *);
int socket(int, int, int);
int Socket(int family, int type, int protocol) {
  int filedes;
  if ((filedes = socket(family, type, protocol)) < 0)
    err_sys("socket error");
  return filedes;
}


x86 assembly (clang, -O0):
<Socket>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
call   1040 <socket@plt>
mov    %eax,-0x10(%rbp)
cmp    $0x0,%eax
jge    1157 <Socket+0x37>
lea    0xeae(%rip),%rdi
call   1030 <err_sys@plt>
mov    -0x10(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Socket>:
push   %rbx
call   1040 <socket@plt>
mov    %eax,%ebx
test   %eax,%eax
jns    1138 <Socket+0x18>
lea    0xecd(%rip),%rdi
call   1030 <err_sys@plt>
mov    %ebx,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [13 x i8] c"socket error\00"
define i32 @Socket(i32 %0, i32 %1, i32 %2) {
%4 = tail call i32 @socket(i32 %0, i32 %1, i32 %2)
%5 = icmp slt i32 %4, 0
br i1 %5, label %6, label %8
6: ; preds = %3
%7 = tail call i32 @err_sys(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
br label %8
8: ; preds = %6, %3
ret i32 %4
}
void log_printf(const char *fmt, ...) {}


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

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

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

LLVM IR (-O2):
define void @log_printf(i8* nocapture %0, ...) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
void killOthers(int x) {
  (void)x;
  exit(2);
}


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

x86 assembly (clang, -O2):
<killOthers>:
push   %rax
mov    $0x2,%edi
call   1030 <exit@plt>

LLVM IR (-O0):
define void @killOthers(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @exit(i32 2)
unreachable
}

LLVM IR (-O2):
define void @killOthers(i32 %0) {
%2 = tail call i32 @exit(i32 2)
unreachable
}
unsigned int my_hardware_concurrency() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @my_hardware_concurrency() {
ret i32 0
}
/* Variables and functions */
scalar_t__ pow(double, double);
float sqrt(scalar_t__);
float earth_get_hop_radius(float height) {
  height /= 6371.0;
  return sqrt(1.0 - pow(1.0 + height, -2.0));
}


x86 assembly (clang, -O0):
<earth_get_hop_radius>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xed2(%rip),%xmm1
divsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xea4(%rip),%xmm0
addsd  %xmm1,%xmm0
movsd  0xea0(%rip),%xmm1
call   1030 <pow@plt>
cvtsi2sd %rax,%xmm1
movsd  0xe86(%rip),%xmm0
subsd  %xmm1,%xmm0
cvttsd2si %xmm0,%rdi
call   1040 <sqrt@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<earth_get_hop_radius>:
push   %rax
divss  0xed7(%rip),%xmm0
cvtss2sd %xmm0,%xmm0
addsd  0xed3(%rip),%xmm0
movsd  0xed3(%rip),%xmm1
call   1030 <pow@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %rax,%xmm0
movsd  0xeb6(%rip),%xmm1
subsd  %xmm0,%xmm1
cvttsd2si %xmm1,%rdi
pop    %rax
jmp    1040 <sqrt@plt>

LLVM IR (-O0):
define float @earth_get_hop_radius(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = fpext float %3 to double
%5 = fdiv double %4, 6.371000e+03
%6 = fptrunc double %5 to float
store float %6, float* %2
%7 = load float, float* %2
%8 = fpext float %7 to double
%9 = fadd double 1.000000e+00, %8
%10 = call i64 @pow(double %9, double -2.000000e+00)
%11 = sitofp i64 %10 to double
%12 = fsub double 1.000000e+00, %11
%13 = fptosi double %12 to i64
%14 = call float @sqrt(i64 %13)
ret float %14
}

LLVM IR (-O2):
define float @earth_get_hop_radius(float %0) {
%2 = fdiv float %0, 6.371000e+03
%3 = fpext float %2 to double
%4 = fadd double %3, 1.000000e+00
%5 = tail call i64 @pow(double %4, double -2.000000e+00)
%6 = sitofp i64 %5 to double
%7 = fsub double 1.000000e+00, %6
%8 = fptosi double %7 to i64
%9 = tail call float @sqrt(i64 %8)
ret float %9
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  unsigned long font;
};
typedef TYPE_1__ XGCValues;

/* Variables and functions */
void set_XGCValues_font(void *_p, unsigned long _v) {
  ((XGCValues *)_p)->font = (unsigned long)_v;
}


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

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

LLVM IR (-O0):
%struct.TYPE_2__ = type { i64 }
define void @set_XGCValues_font(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
store i8* %0, i8** %3
store i64 %1, i64* %4
%5 = load i64, i64* %4
%6 = load i8*, i8** %3
%7 = bitcast i8* %6 to %struct.TYPE_2__*
%8 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %7, i32 0, i32 0
store i64 %5, i64* %8
ret void
}

LLVM IR (-O2):
define void @set_XGCValues_font(i8* nocapture writeonly %0, i64 %1) {
%3 = bitcast i8* %0 to i64*
store i64 %1, i64* %3
ret void
}
/* Type definitions */
struct btf_type {
  int dummy;
};

/* Variables and functions */
scalar_t__ BTF_KIND_STRUCT;
scalar_t__ btf_kind(struct btf_type const *);
bool btf_is_struct(const struct btf_type *t) {
  return btf_kind(t) == BTF_KIND_STRUCT;
}


x86 assembly (clang, -O0):
<btf_is_struct>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <btf_kind@plt>
mov    0x2eb4(%rip),%rcx
cmp    (%rcx),%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<btf_is_struct>:
push   %rax
call   1030 <btf_kind@plt>
mov    0x2ec3(%rip),%rdx
xor    %ecx,%ecx
cmp    (%rdx),%rax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.btf_type = type { i32 }
@BTF_KIND_STRUCT = global i64 0
define i32 @btf_is_struct(%struct.btf_type* %0) {
%2 = alloca %struct.btf_type*
store %struct.btf_type* %0, %struct.btf_type** %2
%3 = load %struct.btf_type*, %struct.btf_type** %2
%4 = call i64 @btf_kind(%struct.btf_type* %3)
%5 = load i64, i64* @BTF_KIND_STRUCT
%6 = icmp eq i64 %4, %5
%7 = zext i1 %6 to i32
ret i32 %7
}

LLVM IR (-O2):
%struct.btf_type = type { i32 }
@BTF_KIND_STRUCT = global i64 0
define i32 @btf_is_struct(%struct.btf_type* %0) {
%2 = tail call i64 @btf_kind(%struct.btf_type* %0)
%3 = load i64, i64* @BTF_KIND_STRUCT
%4 = icmp eq i64 %2, %3
%5 = zext i1 %4 to i32
ret i32 %5
}