xunge/DecIR huggingface dataset:
void RandomFunc(unsigned long input[1], unsigned long output[1]) {
  unsigned long state[1];
  unsigned long local1;
  {
    state[0UL] = (input[0UL] - 51238316UL) - 339126204UL;
    local1 = 0UL;
    while (local1 < 1UL) {
      local1++;
    }
    output[0UL] =
        ((state[0UL] << 1UL) | (state[0UL] >> 63UL)) ^ 105059837885669120UL;
  }
}


x86 assembly (clang, -O0):
<RandomFunc>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
sub    $0x30dd5ac,%rax
sub    $0x1436a7bc,%rax
mov    %rax,-0x18(%rbp)
movq   $0x0,-0x20(%rbp)
cmpq   $0x1,-0x20(%rbp)
jae    1147 <RandomFunc+0x47>
mov    -0x20(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x20(%rbp)
jmp    112b <RandomFunc+0x2b>
mov    -0x18(%rbp),%rcx
shl    $0x1,%rcx
mov    -0x18(%rbp),%rax
shr    $0x3f,%rax
or     %rax,%rcx
movabs $0x1753f5dad55df00,%rax
3f 75 01
xor    %rax,%rcx
mov    -0x10(%rbp),%rax
mov    %rcx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<RandomFunc>:
mov    $0xffffffffe8bb8298,%rax
add    (%rdi),%rax
rol    %rax
movabs $0x1753f5dad55df00,%rcx
3f 75 01
xor    %rax,%rcx
mov    %rcx,(%rsi)
ret

LLVM IR (-O0):
define void @RandomFunc(i64* %0, i64* %1) {
%3 = alloca i64*
%4 = alloca i64*
%5 = alloca [1 x i64]
%6 = alloca i64
store i64* %0, i64** %3
store i64* %1, i64** %4
%7 = load i64*, i64** %3
%8 = getelementptr inbounds i64, i64* %7, i64 0
%9 = load i64, i64* %8
%10 = sub i64 %9, 51238316
%11 = sub i64 %10, 339126204
%12 = getelementptr inbounds [1 x i64], [1 x i64]* %5, i64 0, i64 0
store i64 %11, i64* %12
store i64 0, i64* %6
br label %13
13: ; preds = %16, %2
%14 = load i64, i64* %6
%15 = icmp ult i64 %14, 1
br i1 %15, label %16, label %19
16: ; preds = %13
%17 = load i64, i64* %6
%18 = add i64 %17, 1
store i64 %18, i64* %6
br label %13
19: ; preds = %13
%20 = getelementptr inbounds [1 x i64], [1 x i64]* %5, i64 0, i64 0
%21 = load i64, i64* %20
%22 = shl i64 %21, 1
%23 = getelementptr inbounds [1 x i64], [1 x i64]* %5, i64 0, i64 0
%24 = load i64, i64* %23
%25 = lshr i64 %24, 63
%26 = or i64 %22, %25
%27 = xor i64 %26, 105059837885669120
%28 = load i64*, i64** %4
%29 = getelementptr inbounds i64, i64* %28, i64 0
store i64 %27, i64* %29
ret void
}

LLVM IR (-O2):
define void @RandomFunc(i64* nocapture %0, i64* nocapture writeonly %1) {
%3 = load i64, i64* %0
%4 = add i64 %3, -390364520
%5 = tail call i64 @llvm.fshl.i64(i64 %4, i64 %4, i64 1)
%6 = xor i64 %5, 105059837885669120
store i64 %6, i64* %1
ret void
}
int main(int argc, char *argv[], char *envp[]) { return 100 >> 6 & 0x7ffffff; }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    $0x1,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1, i8** %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i8**
%7 = alloca i8**
store i32 0, i32* %4
store i32 %0, i32* %5
store i8** %1, i8*** %6
store i8** %2, i8*** %7
ret i32 1
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1, i8** nocapture readnone %2) {
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ clrtoeol();
int /*<<< orphan*/ move(int, int /*<<< orphan*/);
int /*<<< orphan*/ mvprintw(int, int, char *, char *);
int strlen(char *);
void printCentered(int row, int totalcols, char *string2print) {
  move(row, 0);
  clrtoeol();
  mvprintw(row, (totalcols - strlen(string2print)) / 2, "%s\n", string2print);
}


x86 assembly (clang, -O0):
<printCentered>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    -0x4(%rbp),%edi
xor    %esi,%esi
call   1060 <move@plt>
mov    $0x0,%al
call   1040 <clrtoeol@plt>
mov    -0x4(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
mov    -0x18(%rbp),%edi
mov    %eax,%ecx
mov    -0x14(%rbp),%eax
sub    %ecx,%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,%esi
mov    -0x10(%rbp),%rcx
lea    0xe69(%rip),%rdx
call   1050 <mvprintw@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printCentered>:
push   %rbp
push   %r14
push   %rbx
mov    %rdx,%r14
mov    %esi,%ebp
mov    %edi,%ebx
xor    %esi,%esi
call   1060 <move@plt>
xor    %eax,%eax
call   1040 <clrtoeol@plt>
mov    %r14,%rdi
call   1030 <strlen@plt>
sub    %eax,%ebp
mov    %ebp,%esi
shr    $0x1f,%esi
add    %ebp,%esi
sar    %esi
lea    0xe8d(%rip),%rdx
mov    %ebx,%edi
mov    %r14,%rcx
pop    %rbx
pop    %r14
pop    %rbp
jmp    1050 <mvprintw@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"%s\0A\00"
define void @printCentered(i32 %0, i32 %1, i8* %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i8*
store i32 %0, i32* %4
store i32 %1, i32* %5
store i8* %2, i8** %6
%7 = load i32, i32* %4
%8 = call i32 @move(i32 %7, i32 0)
%9 = call i32 (...) @clrtoeol()
%10 = load i32, i32* %4
%11 = load i32, i32* %5
%12 = load i8*, i8** %6
%13 = call i32 @strlen(i8* %12)
%14 = sub nsw i32 %11, %13
%15 = sdiv i32 %14, 2
%16 = load i8*, i8** %6
%17 = call i32 @mvprintw(i32 %10, i32 %15, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %16)
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"%s\0A\00"
define void @printCentered(i32 %0, i32 %1, i8* %2) {
%4 = tail call i32 @move(i32 %0, i32 0)
%5 = tail call i32 (...) @clrtoeol()
%6 = tail call i32 @strlen(i8* %2)
%7 = sub nsw i32 %1, %6
%8 = sdiv i32 %7, 2
%9 = tail call i32 @mvprintw(i32 %0, i32 %8, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ japi_delete(int, int, int);
void j_delete(int arg0, int arg1, int arg2) { japi_delete(arg0, arg1, arg2); }


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

x86 assembly (clang, -O2):
<j_delete>:
jmp    1030 <japi_delete@plt>

LLVM IR (-O0):
define void @j_delete(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 @japi_delete(i32 %7, i32 %8, i32 %9)
ret void
}

LLVM IR (-O2):
define void @j_delete(i32 %0, i32 %1, i32 %2) {
%4 = tail call i32 @japi_delete(i32 %0, i32 %1, i32 %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, ...);
int /*<<< orphan*/ stderr;
int sperror(const char error_text[]) {
  fprintf(stderr, "\nError: ");
  fprintf(stderr, "%s\n\n", error_text);
  exit(1);
}


x86 assembly (clang, -O0):
<sperror>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ead(%rip),%rax
mov    (%rax),%edi
lea    0xec4(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2e96(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xeb2(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<sperror>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
mov    0x2eb2(%rip),%r14
mov    (%r14),%edi
lea    0xec8(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%r14),%edi
lea    0xec0(%rip),%rsi
mov    %rbx,%rdx
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [9 x i8] c"\0AError: \00"
@.str.1 = [5 x i8] c"%s\0A\0A\00"
define i32 @sperror(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = call i32 (i32, i8*, ...) @fprintf(i32 %3, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
%5 = load i32, i32* @stderr
%6 = load i8*, i8** %2
%7 = call i32 (i32, i8*, ...) @fprintf(i32 %5, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i8* %6)
%8 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [9 x i8] c"\0AError: \00"
@.str.1 = [5 x i8] c"%s\0A\0A\00"
define i32 @sperror(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 (i32, i8*, ...) @fprintf(i32 %2, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
%4 = load i32, i32* @stderr
%5 = tail call i32 (i32, i8*, ...) @fprintf(i32 %4, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i8* %0)
%6 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
int syscall(int, char const *, unsigned int, char *, unsigned int);
int kifs(const char *entry_name, unsigned int op_mode, char *user_buffer,
         unsigned int maxchars) {
  return syscall(316, entry_name, op_mode, user_buffer, maxchars);
}


x86 assembly (clang, -O0):
<kifs>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0xc(%rbp),%edx
mov    -0x18(%rbp),%rcx
mov    -0x1c(%rbp),%r8d
mov    $0x13c,%edi
call   1030 <syscall@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<kifs>:
mov    %ecx,%r8d
mov    %rdx,%rcx
mov    %esi,%edx
mov    %rdi,%rsi
mov    $0x13c,%edi
jmp    1030 <syscall@plt>

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

LLVM IR (-O2):
define i32 @kifs(i8* %0, i32 %1, i8* %2, i32 %3) {
%5 = tail call i32 @syscall(i32 316, i8* %0, i32 %1, i8* %2, i32 %3)
ret i32 %5
}
int test_imm_AAint8_reg(signed char val) {
  return ((val) & (0xAA << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_AAint8_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%edx
and    $0xaa,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @test_imm_AAint8_reg(i8 signext %0) {
%2 = and i8 %0, -86
%3 = icmp eq i8 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
int math_smaller(int a, int b) { return (a < b ? a : b); }


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

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

LLVM IR (-O0):
define i32 @math_smaller(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 slt 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 @math_smaller(i32 %0, i32 %1) {
%3 = icmp slt i32 %0, %1
%4 = select i1 %3, i32 %0, i32 %1
ret i32 %4
}
int noecho() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @noecho() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ end_curses();
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ save_score(int);
int /*<<< orphan*/ show_highscore();
void end_game(int level) {
  save_score(level);
  show_highscore();
  exit(end_curses());
}


x86 assembly (clang, -O0):
<end_game>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1060 <save_score@plt>
mov    $0x0,%al
call   1040 <show_highscore@plt>
mov    $0x0,%al
call   1030 <end_curses@plt>
mov    %eax,%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<end_game>:
push   %rax
call   1060 <save_score@plt>
xor    %eax,%eax
call   1040 <show_highscore@plt>
xor    %eax,%eax
call   1030 <end_curses@plt>
mov    %eax,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
define void @end_game(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @save_score(i32 %3)
%5 = call i32 (...) @show_highscore()
%6 = call i32 (...) @end_curses()
%7 = call i32 @exit(i32 %6)
unreachable
}

LLVM IR (-O2):
define void @end_game(i32 %0) {
%2 = tail call i32 @save_score(i32 %0)
%3 = tail call i32 (...) @show_highscore()
%4 = tail call i32 (...) @end_curses()
%5 = tail call i32 @exit(i32 %4)
unreachable
}
void setval_239(unsigned *p) { *p = 3281017045U; }


x86 assembly (clang, -O0):
<setval_239>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movl   $0xc39058d5,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<setval_239>:
movl   $0xc39058d5,(%rdi)
ret

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

LLVM IR (-O2):
define void @setval_239(i32* nocapture writeonly %0) {
store i32 -1013950251, i32* %0
ret void
}
void write_asdf_(void) {}


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

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

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

LLVM IR (-O2):
define void @write_asdf_() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ puts(char *);
int main(void) {
  puts("Hello Friends !!");
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [17 x i8] c"Hello Friends !!\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @puts(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [17 x i8] c"Hello Friends !!\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
scalar_t__ luhn_digit(char const *);
int luhn_valid(const char *data) { return luhn_digit(data) == 0; }


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

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

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

LLVM IR (-O2):
define i32 @luhn_valid(i8* %0) {
%2 = tail call i64 @luhn_digit(i8* %0)
%3 = icmp eq i64 %2, 0
%4 = zext i1 %3 to i32
ret i32 %4
}
void fc_shutdown_network(void) {}


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

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

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

LLVM IR (-O2):
define void @fc_shutdown_network() {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint16_t;
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int fread(int /*<<< orphan*/ *, int, int, int /*<<< orphan*/ *);
uint16_t imm16(FILE *file) {
  uint16_t word;
  if (fread(&word, sizeof(uint16_t), 1, file) == 1)
    return word;
  return 0;
}


x86 assembly (clang, -O0):
<imm16>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rcx
lea    -0x14(%rbp),%rdi
mov    $0x4,%esi
mov    $0x1,%edx
call   1030 <fread@plt>
cmp    $0x1,%eax
jne    1147 <imm16+0x37>
mov    -0x14(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    114e <imm16+0x3e>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<imm16>:
push   %rax
mov    %rdi,%rcx
lea    0x4(%rsp),%rdi
mov    $0x4,%esi
mov    $0x1,%edx
call   1030 <fread@plt>
mov    %eax,%ecx
xor    %eax,%eax
cmp    $0x1,%ecx
jne    1135 <imm16+0x25>
mov    0x4(%rsp),%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @imm16(i32* nocapture %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
%4 = call i32 @fread(i32* %2, i32 4, i32 1, i32* %0)
%5 = icmp eq i32 %4, 1
%6 = load i32, i32* %2
%7 = select i1 %5, i32 %6, i32 0
ret i32 %7
}
void rb_fast_mark_table_finalize() {}


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

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

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

LLVM IR (-O2):
define void @rb_fast_mark_table_finalize() {
ret void
}
/* Variables and functions */
void *__builtin_wasm_tls_base();
void *tls_base() { return __builtin_wasm_tls_base(); }


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

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

LLVM IR (-O0):
define i8* @tls_base() {
%1 = call i8* (...) @__builtin_wasm_tls_base()
ret i8* %1
}

LLVM IR (-O2):
define i8* @tls_base() {
%1 = tail call i8* (...) @__builtin_wasm_tls_base()
ret i8* %1
}
/* Variables and functions */
int /*<<< orphan*/ ch_screen_refresh();
int ch_cmd_ref(int crpt, int cidx, int eidx, const char **s_r) {
  ch_screen_refresh();
  return (1);
}


x86 assembly (clang, -O0):
<ch_cmd_ref>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %rcx,-0x18(%rbp)
mov    $0x0,%al
call   1030 <ch_screen_refresh@plt>
mov    $0x1,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ch_cmd_ref>:
push   %rax
xor    %eax,%eax
call   1030 <ch_screen_refresh@plt>
mov    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @ch_cmd_ref(i32 %0, i32 %1, i32 %2, i8** %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i8**
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i8** %3, i8*** %8
%9 = call i32 (...) @ch_screen_refresh()
ret i32 1
}

LLVM IR (-O2):
define i32 @ch_cmd_ref(i32 %0, i32 %1, i32 %2, i8** nocapture readnone %3) {
%5 = tail call i32 (...) @ch_screen_refresh()
ret i32 1
}
/* Variables and functions */
int INT_MIN;
int /*<<< orphan*/ this_comparison_is_not_decidable();
void bla2eq(int var) {
  if (var + 10 == INT_MIN + 10)
    this_comparison_is_not_decidable();
}


x86 assembly (clang, -O0):
<bla2eq>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0xa,%eax
mov    0x2ec0(%rip),%rcx
mov    (%rcx),%ecx
add    $0xa,%ecx
cmp    %ecx,%eax
jne    113c <bla2eq+0x2c>
mov    $0x0,%al
call   1030 <this_comparison_is_not_decidable@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bla2eq>:
mov    0x2ed1(%rip),%rax
cmp    %edi,(%rax)
jne    1122 <bla2eq+0x12>
xor    %eax,%eax
jmp    1030 <this_comparison_is_not_decidable@plt>
ret

LLVM IR (-O0):
@INT_MIN = global i32 0
define void @bla2eq(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = add nsw i32 %3, 10
%5 = load i32, i32* @INT_MIN
%6 = add nsw i32 %5, 10
%7 = icmp eq i32 %4, %6
br i1 %7, label %8, label %10
8: ; preds = %1
%9 = call i32 (...) @this_comparison_is_not_decidable()
br label %10
10: ; preds = %8, %1
ret void
}

LLVM IR (-O2):
@INT_MIN = global i32 0
define void @bla2eq(i32 %0) {
%2 = load i32, i32* @INT_MIN
%3 = icmp eq i32 %2, %0
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 (...) @this_comparison_is_not_decidable()
br label %6
6: ; preds = %4, %1
ret void
}
/* Type definitions */
struct roff_node {
  int dummy;
};
struct roff_meta {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ font_push(char);
int pre_em(const struct roff_meta *meta, struct roff_node *n) {
  font_push('I');
  return 1;
}


x86 assembly (clang, -O0):
<pre_em>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x49,%edi
call   1030 <font_push@plt>
mov    $0x1,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pre_em>:
push   %rax
mov    $0x49,%edi
call   1030 <font_push@plt>
mov    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.roff_meta = type { i32 }
%struct.roff_node = type { i32 }
define i32 @pre_em(%struct.roff_meta* %0, %struct.roff_node* %1) {
%3 = alloca %struct.roff_meta*
%4 = alloca %struct.roff_node*
store %struct.roff_meta* %0, %struct.roff_meta** %3
store %struct.roff_node* %1, %struct.roff_node** %4
%5 = call i32 @font_push(i8 signext 73)
ret i32 1
}

LLVM IR (-O2):
%struct.roff_meta = type { i32 }
%struct.roff_node = type { i32 }
define i32 @pre_em(%struct.roff_meta* nocapture readnone %0, %struct.roff_node* nocapture readnone %1) {
%3 = tail call i32 @font_push(i8 signext 73)
ret i32 1
}
double interp_2(double phi, double phip1) { return 0.5 * (phi + phip1); }


x86 assembly (clang, -O0):
<interp_2>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm1
addsd  -0x10(%rbp),%xmm1
movsd  0xee0(%rip),%xmm0
mulsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<interp_2>:
addsd  %xmm1,%xmm0
mulsd  0xef4(%rip),%xmm0
ret

LLVM IR (-O0):
define double @interp_2(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = load double, double* %3
%6 = load double, double* %4
%7 = fadd double %5, %6
%8 = fmul double 5.000000e-01, %7
ret double %8
}

LLVM IR (-O2):
define double @interp_2(double %0, double %1) {
%3 = fadd double %0, %1
%4 = fmul double %3, 5.000000e-01
ret double %4
}
/* Variables and functions */
int /*<<< orphan*/ write(char *, char *, int /*<<< orphan*/ *);
void end_task_section() { write("ganttproject.gan", "\t</tasks>\n", NULL); }


x86 assembly (clang, -O0):
<end_task_section>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
lea    0xeef(%rip),%rsi
xor    %eax,%eax
mov    %eax,%edx
call   1030 <write@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<end_task_section>:
lea    0xee9(%rip),%rdi
lea    0xef3(%rip),%rsi
xor    %edx,%edx
jmp    1030 <write@plt>

LLVM IR (-O0):
@.str = [17 x i8] c"ganttproject.gan\00"
@.str.1 = [11 x i8] c"\09</tasks>\0A\00"
define void @end_task_section() {
%1 = call i32 @write(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i32* null)
ret void
}

LLVM IR (-O2):
@.str = [17 x i8] c"ganttproject.gan\00"
@.str.1 = [11 x i8] c"\09</tasks>\0A\00"
define void @end_task_section() {
%1 = tail call i32 @write(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i32* null)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
void displayAddress(char *address, uint8_t num_sigs, uint8_t num_pubkeys) {}


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

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

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

LLVM IR (-O2):
define void @displayAddress(i8* nocapture %0, i32 %1, i32 %2) {
ret void
}
double dlange(char norm, int m, int n, double *a, int lda, double *work) {
  extern double dlange_(char *norm, int *m, int *n, double *a, int *lda,
                        double *work);
  return dlange_(&norm, &m, &n, a, &lda, work);
}


x86 assembly (clang, -O0):
<dlange>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %rcx,-0x18(%rbp)
mov    %r8d,-0x1c(%rbp)
mov    %r9,-0x28(%rbp)
mov    -0x18(%rbp),%rcx
mov    -0x28(%rbp),%r9
lea    -0x1(%rbp),%rdi
lea    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdx
lea    -0x1c(%rbp),%r8
call   1030 <dlange_@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dlange>:
sub    $0x18,%rsp
mov    %dil,0xb(%rsp)
mov    %esi,0x14(%rsp)
mov    %edx,0x10(%rsp)
mov    %r8d,0xc(%rsp)
lea    0xb(%rsp),%rdi
lea    0x14(%rsp),%rsi
lea    0x10(%rsp),%rdx
lea    0xc(%rsp),%r8
call   1030 <dlange_@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
define double @dlange(i8 signext %0, i32 %1, i32 %2, double* %3, i32 %4, double* %5) {
%7 = alloca i8
%8 = alloca i32
%9 = alloca i32
%10 = alloca double*
%11 = alloca i32
%12 = alloca double*
store i8 %0, i8* %7
store i32 %1, i32* %8
store i32 %2, i32* %9
store double* %3, double** %10
store i32 %4, i32* %11
store double* %5, double** %12
%13 = load double*, double** %10
%14 = load double*, double** %12
%15 = call double @dlange_(i8* %7, i32* %8, i32* %9, double* %13, i32* %11, double* %14)
ret double %15
}

LLVM IR (-O2):
define double @dlange(i8 signext %0, i32 %1, i32 %2, double* %3, i32 %4, double* %5) {
%7 = alloca i8
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
store i8 %0, i8* %7
store i32 %1, i32* %8
store i32 %2, i32* %9
store i32 %4, i32* %10
%11 = call double @dlange_(i8* %7, i32* %8, i32* %9, double* %3, i32* %10, double* %5)
ret double %11
}
ES_IRQ_HANDLER(myIRQ) {
  ES_IRQ_PROLOGUE();
  ES_IRQ_ENTER_CRITICAL();
  ES_IRQ_EXIT_CRITICAL();
  ES_IRQ_EPILOGUE();
}


x86 assembly (clang, -O0):
<ES_IRQ_HANDLER>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    $0x0,%al
call   1030 <ES_IRQ_PROLOGUE@plt>
mov    $0x0,%al
call   1050 <ES_IRQ_ENTER_CRITICAL@plt>
mov    $0x0,%al
call   1060 <ES_IRQ_EXIT_CRITICAL@plt>
mov    $0x0,%al
call   1040 <ES_IRQ_EPILOGUE@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ES_IRQ_HANDLER>:
push   %rax
xor    %eax,%eax
call   1030 <ES_IRQ_PROLOGUE@plt>
xor    %eax,%eax
call   1050 <ES_IRQ_ENTER_CRITICAL@plt>
xor    %eax,%eax
call   1060 <ES_IRQ_EXIT_CRITICAL@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <ES_IRQ_EPILOGUE@plt>

LLVM IR (-O0):
define i32 @ES_IRQ_HANDLER(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = call i32 (...) @ES_IRQ_PROLOGUE()
%5 = call i32 (...) @ES_IRQ_ENTER_CRITICAL()
%6 = call i32 (...) @ES_IRQ_EXIT_CRITICAL()
%7 = call i32 (...) @ES_IRQ_EPILOGUE()
%8 = load i32, i32* %2
ret i32 %8
}

LLVM IR (-O2):
define i32 @ES_IRQ_HANDLER(i32 %0) {
%2 = tail call i32 (...) @ES_IRQ_PROLOGUE()
%3 = tail call i32 (...) @ES_IRQ_ENTER_CRITICAL()
%4 = tail call i32 (...) @ES_IRQ_EXIT_CRITICAL()
%5 = tail call i32 (...) @ES_IRQ_EPILOGUE()
ret i32 undef
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ dfs_alloc(int);
uint32_t new_sector(void) { return dfs_alloc(256); }


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

x86 assembly (clang, -O2):
<new_sector>:
mov    $0x100,%edi
jmp    1030 <dfs_alloc@plt>

LLVM IR (-O0):
define i32 @new_sector() {
%1 = call i32 @dfs_alloc(i32 256)
ret i32 %1
}

LLVM IR (-O2):
define i32 @new_sector() {
%1 = tail call i32 @dfs_alloc(i32 256)
ret i32 %1
}
downshift(s) char *s;
{
  for (; *s; s++)
    if (isupper(*s))
      *s = tolower(*s);
}


x86 assembly (clang, -O0):
<downshift>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
cmpb   $0x0,(%rax)
je     1178 <downshift+0x58>
mov    -0x10(%rbp),%rax
movsbl (%rax),%edi
call   1040 <isupper@plt>
cmp    $0x0,%eax
je     1162 <downshift+0x42>
mov    -0x10(%rbp),%rax
movsbl (%rax),%edi
call   1030 <tolower@plt>
mov    %al,%cl
mov    -0x10(%rbp),%rax
mov    %cl,(%rax)
jmp    1167 <downshift+0x47>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    112c <downshift+0xc>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<downshift>:
push   %rbp
push   %rbx
push   %rax
mov    (%rdi),%al
test   %al,%al
je     1165 <downshift+0x45>
mov    %rdi,%rbx
add    $0x1,%rbx
jmp    114b <downshift+0x2b>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movzbl (%rbx),%eax
add    $0x1,%rbx
test   %al,%al
je     1165 <downshift+0x45>
movsbl %al,%ebp
mov    %ebp,%edi
call   1040 <isupper@plt>
test   %eax,%eax
je     1140 <downshift+0x20>
mov    %ebp,%edi
call   1030 <tolower@plt>
mov    %al,-0x1(%rbx)
jmp    1140 <downshift+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @downshift(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %17, label %4
4: ; preds = %1, %13
%5 = phi i8 [ %15, %13 ], [ %2, %1 ]
%6 = phi i8* [ %14, %13 ], [ %0, %1 ]
%7 = sext i8 %5 to i32
%8 = tail call i32 @isupper(i32 %7)
%9 = icmp eq i32 %8, 0
br i1 %9, label %13, label %10
10: ; preds = %4
%11 = tail call i32 @tolower(i32 %7)
%12 = trunc i32 %11 to i8
store i8 %12, i8* %6
br label %13
13: ; preds = %4, %10
%14 = getelementptr inbounds i8, i8* %6, i64 1
%15 = load i8, i8* %14
%16 = icmp eq i8 %15, 0
br i1 %16, label %17, label %4
17: ; preds = %13, %1
ret i32 undef
}
int isreturn(const char *reply) { return (*reply == '\r' || *reply == '\n'); }


x86 assembly (clang, -O0):
<isreturn>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%ecx
mov    $0x1,%al
cmp    $0xd,%ecx
mov    %al,-0x9(%rbp)
je     112d <isreturn+0x2d>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0xa,%eax
sete   %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isreturn>:
mov    (%rdi),%al
cmp    $0xd,%al
sete   %cl
cmp    $0xa,%al
sete   %al
or     %cl,%al
movzbl %al,%eax
ret

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

LLVM IR (-O2):
define i32 @isreturn(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 13
%4 = icmp eq i8 %2, 10
%5 = or i1 %3, %4
%6 = zext i1 %5 to i32
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ cgincstat(char *, int, int);
void cgdecsw(int a) { cgincstat("sub", a, 1); }


x86 assembly (clang, -O0):
<cgdecsw>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%esi
lea    0xedb(%rip),%rdi
mov    $0x1,%edx
call   1030 <cgincstat@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cgdecsw>:
mov    %edi,%esi
lea    0xee7(%rip),%rdi
mov    $0x1,%edx
jmp    1030 <cgincstat@plt>

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

LLVM IR (-O2):
@.str = [4 x i8] c"sub\00"
define void @cgdecsw(i32 %0) {
%2 = tail call i32 @cgincstat(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %0, i32 1)
ret void
}
double f1(double y) { return (1.2 * __builtin_copysign(1.1, y)); }


x86 assembly (clang, -O0):
<f1>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm1
movaps 0xefb(%rip),%xmm0
pand   %xmm0,%xmm1
movaps 0xf00(%rip),%xmm0
por    %xmm0,%xmm1
movsd  0xed4(%rip),%xmm0
mulsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<f1>:
andpd  0xef8(%rip),%xmm0
orpd   0xf00(%rip),%xmm0
mulsd  0xf08(%rip),%xmm0
ret

LLVM IR (-O0):
define double @f1(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = call double @llvm.copysign.f64(double 1.100000e+00, double %3)
%5 = fmul double 1.200000e+00, %4
ret double %5
}

LLVM IR (-O2):
define double @f1(double %0) {
%2 = tail call double @llvm.copysign.f64(double 1.100000e+00, double %0)
%3 = fmul double %2, 1.200000e+00
ret double %3
}
/* Variables and functions */
int is_big_endian();
int main(void) {
  int is_be_check = is_big_endian();
  int is_be;
  is_be = 0;
  if (is_be_check && is_be)
    return 0;
  if (!is_be_check && !is_be)
    return 0;
  return 1;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <is_big_endian@plt>
mov    %eax,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x0,-0x8(%rbp)
je     1150 <main+0x40>
cmpl   $0x0,-0xc(%rbp)
je     1150 <main+0x40>
movl   $0x0,-0x4(%rbp)
jmp    1177 <main+0x67>
cmpl   $0x0,-0x8(%rbp)
jne    1170 <main+0x60>
cmpl   $0x0,-0xc(%rbp)
jne    1170 <main+0x60>
movl   $0x0,-0x4(%rbp)
jmp    1177 <main+0x67>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <is_big_endian@plt>
xor    %ecx,%ecx
test   %eax,%eax
setne  %cl
mov    %ecx,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @is_big_endian()
%2 = icmp ne i32 %1, 0
%3 = zext i1 %2 to i32
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ setjmp();
void test_3(void) { setjmp(); }


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

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

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

LLVM IR (-O2):
define void @test_3() {
%1 = call i32 (...) @setjmp()
ret void
}
/* Type definitions */
struct ns_connection {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ ns_call(struct ns_connection *, int, int /*<<< orphan*/ *);
int /*<<< orphan*/ ns_destroy_conn(struct ns_connection *);
int /*<<< orphan*/ ns_remove_conn(struct ns_connection *);
void ns_close_conn(struct ns_connection *conn) {
  ;
  ns_call(conn, 5, NULL);
  ns_remove_conn(conn);
  ns_destroy_conn(conn);
}


x86 assembly (clang, -O0):
<ns_close_conn>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x5,%esi
xor    %eax,%eax
mov    %eax,%edx
call   1030 <ns_call@plt>
mov    -0x8(%rbp),%rdi
call   1050 <ns_remove_conn@plt>
mov    -0x8(%rbp),%rdi
call   1040 <ns_destroy_conn@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ns_close_conn>:
push   %rbx
mov    %rdi,%rbx
mov    $0x5,%esi
xor    %edx,%edx
call   1030 <ns_call@plt>
mov    %rbx,%rdi
call   1050 <ns_remove_conn@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1040 <ns_destroy_conn@plt>

LLVM IR (-O0):
%struct.ns_connection = type { i32 }
define void @ns_close_conn(%struct.ns_connection* %0) {
%2 = alloca %struct.ns_connection*
store %struct.ns_connection* %0, %struct.ns_connection** %2
%3 = load %struct.ns_connection*, %struct.ns_connection** %2
%4 = call i32 @ns_call(%struct.ns_connection* %3, i32 5, i32* null)
%5 = load %struct.ns_connection*, %struct.ns_connection** %2
%6 = call i32 @ns_remove_conn(%struct.ns_connection* %5)
%7 = load %struct.ns_connection*, %struct.ns_connection** %2
%8 = call i32 @ns_destroy_conn(%struct.ns_connection* %7)
ret void
}

LLVM IR (-O2):
%struct.ns_connection = type { i32 }
define void @ns_close_conn(%struct.ns_connection* %0) {
%2 = tail call i32 @ns_call(%struct.ns_connection* %0, i32 5, i32* null)
%3 = tail call i32 @ns_remove_conn(%struct.ns_connection* %0)
%4 = tail call i32 @ns_destroy_conn(%struct.ns_connection* %0)
ret void
}
double ATMtoPSI(double ATM) {
  double PSI = 14.6960 * ATM;
  return PSI;
}


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

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

LLVM IR (-O0):
define double @ATMtoPSI(double %0) {
%2 = alloca double
%3 = alloca double
store double %0, double* %2
%4 = load double, double* %2
%5 = fmul double 1.469600e+01, %4
store double %5, double* %3
%6 = load double, double* %3
ret double %6
}

LLVM IR (-O2):
define double @ATMtoPSI(double %0) {
%2 = fmul double %0, 1.469600e+01
ret double %2
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ int8_t;

/* Variables and functions */
int /*<<< orphan*/ nrf_drv_radio802154_swi_notify_transmitted(
    int /*<<< orphan*/ *, int /*<<< orphan*/, int /*<<< orphan*/);
void nrf_drv_radio802154_notify_transmitted(uint8_t *p_ack, int8_t power,
                                            int8_t lqi) {
  nrf_drv_radio802154_swi_notify_transmitted(p_ack, power, lqi);
}


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

x86 assembly (clang, -O2):
<nrf_drv_radio802154_notify_transmitted>:
jmp    1030 <nrf_drv_radio802154_swi_notify_transmitted@plt>

LLVM IR (-O0):
define void @nrf_drv_radio802154_notify_transmitted(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 @nrf_drv_radio802154_swi_notify_transmitted(i32* %7, i32 %8, i32 %9)
ret void
}

LLVM IR (-O2):
define void @nrf_drv_radio802154_notify_transmitted(i32* %0, i32 %1, i32 %2) {
%4 = tail call i32 @nrf_drv_radio802154_swi_notify_transmitted(i32* %0, i32 %1, i32 %2)
ret void
}
/* Variables and functions */
bool equalChar(const char c1, const char c2) { return c1 == c2; }


x86 assembly (clang, -O0):
<equalChar>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
movsbl -0x1(%rbp),%eax
movsbl -0x2(%rbp),%ecx
cmp    %ecx,%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<equalChar>:
xor    %eax,%eax
cmp    %sil,%dil
sete   %al
ret

LLVM IR (-O0):
define i32 @equalChar(i8 signext %0, i8 signext %1) {
%3 = alloca i8
%4 = alloca i8
store i8 %0, i8* %3
store i8 %1, i8* %4
%5 = load i8, i8* %3
%6 = sext i8 %5 to i32
%7 = load i8, i8* %4
%8 = sext i8 %7 to i32
%9 = icmp eq i32 %6, %8
%10 = zext i1 %9 to i32
ret i32 %10
}

LLVM IR (-O2):
define i32 @equalChar(i8 signext %0, i8 signext %1) {
%3 = icmp eq i8 %0, %1
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ assert_int_equal(int /*<<< orphan*/, int);
int /*<<< orphan*/ north_fill(unsigned long);
void north_fill_test(void **state) {
  assert_int_equal(north_fill(1ul), 0x0101010101010101ul);
}


x86 assembly (clang, -O0):
<north_fill_test>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x1,%edi
call   1040 <north_fill@plt>
mov    %eax,%edi
mov    $0x1010101,%esi
call   1030 <assert_int_equal@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<north_fill_test>:
push   %rax
mov    $0x1,%edi
call   1040 <north_fill@plt>
mov    %eax,%edi
mov    $0x1010101,%esi
pop    %rax
jmp    1030 <assert_int_equal@plt>

LLVM IR (-O0):
define void @north_fill_test(i8** %0) {
%2 = alloca i8**
store i8** %0, i8*** %2
%3 = call i32 @north_fill(i64 1)
%4 = call i32 @assert_int_equal(i32 %3, i32 16843009)
ret void
}

LLVM IR (-O2):
define void @north_fill_test(i8** nocapture readnone %0) {
%2 = tail call i32 @north_fill(i64 1)
%3 = tail call i32 @assert_int_equal(i32 %2, i32 16843009)
ret void
}
void sys_execute(void (*func)()) {}


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

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

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

LLVM IR (-O2):
define void @sys_execute(void (...)* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, double);
void print_result(double t) { printf("Hashing requires %.2fs\n", t); }


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

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

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

LLVM IR (-O2):
@.str = [24 x i8] c"Hashing requires %.2fs\0A\00"
define void @print_result(double %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), double %0)
ret void
}
/* Variables and functions */
double rand_uniform(int /*<<< orphan*/, int);
int rand_uniform_int(int /*<<< orphan*/, int const);
int random_connection(const int n_nodes, const int n_inputs) {
  if (rand_uniform(0, 1) < 0.5) {
    return rand_uniform_int(0, n_nodes) + n_inputs;
  }
  return rand_uniform_int(0, n_inputs);
}


x86 assembly (clang, -O0):
<random_connection>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
xor    %edi,%edi
mov    $0x1,%esi
call   1040 <rand_uniform@plt>
movaps %xmm0,%xmm1
movsd  0xebb(%rip),%xmm0
ucomisd %xmm1,%xmm0
jbe    1164 <random_connection+0x44>
mov    -0x8(%rbp),%esi
xor    %edi,%edi
call   1030 <rand_uniform_int@plt>
add    -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1171 <random_connection+0x51>
mov    -0xc(%rbp),%esi
xor    %edi,%edi
call   1030 <rand_uniform_int@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<random_connection>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
xor    %edi,%edi
mov    $0x1,%esi
call   1040 <rand_uniform@plt>
movsd  0xec5(%rip),%xmm1
xor    %edi,%edi
ucomisd %xmm0,%xmm1
jbe    1153 <random_connection+0x33>
mov    %ebp,%esi
call   1030 <rand_uniform_int@plt>
add    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret
mov    %ebx,%esi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <rand_uniform_int@plt>

LLVM IR (-O0):
define i32 @random_connection(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
%6 = call double @rand_uniform(i32 0, i32 1)
%7 = fcmp olt double %6, 5.000000e-01
br i1 %7, label %8, label %13
8: ; preds = %2
%9 = load i32, i32* %4
%10 = call i32 @rand_uniform_int(i32 0, i32 %9)
%11 = load i32, i32* %5
%12 = add nsw i32 %10, %11
store i32 %12, i32* %3
br label %16
13: ; preds = %2
%14 = load i32, i32* %5
%15 = call i32 @rand_uniform_int(i32 0, i32 %14)
store i32 %15, i32* %3
br label %16
16: ; preds = %13, %8
%17 = load i32, i32* %3
ret i32 %17
}

LLVM IR (-O2):
define i32 @random_connection(i32 %0, i32 %1) {
%3 = tail call double @rand_uniform(i32 0, i32 1)
%4 = fcmp olt double %3, 5.000000e-01
br i1 %4, label %5, label %8
5: ; preds = %2
%6 = tail call i32 @rand_uniform_int(i32 0, i32 %0)
%7 = add nsw i32 %6, %1
br label %10
8: ; preds = %2
%9 = tail call i32 @rand_uniform_int(i32 0, i32 %1)
br label %10
10: ; preds = %8, %5
%11 = phi i32 [ %7, %5 ], [ %9, %8 ]
ret i32 %11
}
int __gthrw_foo(int arg1) {}


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

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

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

LLVM IR (-O2):
define i32 @__gthrw_foo(i32 %0) {
ret i32 undef
}