xunge/DecIR huggingface dataset:
void testClosureLLSLLrV(void (*closure)(long long, short, long long),
                        long long a1, short a2, long long a3) {
  (*closure)(a1, a2, a3);
}


x86 assembly (clang, -O0):
<testClosureLLSLLrV>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %dx,%ax
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %ax,-0x12(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%rdi
mov    -0x12(%rbp),%cx
mov    -0x20(%rbp),%rdx
movswl %cx,%esi
call   *%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<testClosureLLSLLrV>:
mov    %rdi,%rax
mov    %rsi,%rdi
mov    %edx,%esi
mov    %rcx,%rdx
jmp    *%rax

LLVM IR (-O0):
define void @testClosureLLSLLrV(void (i64, i16, i64)* %0, i64 %1, i16 signext %2, i64 %3) {
%5 = alloca void (i64, i16, i64)*
%6 = alloca i64
%7 = alloca i16
%8 = alloca i64
store void (i64, i16, i64)* %0, void (i64, i16, i64)** %5
store i64 %1, i64* %6
store i16 %2, i16* %7
store i64 %3, i64* %8
%9 = load void (i64, i16, i64)*, void (i64, i16, i64)** %5
%10 = load i64, i64* %6
%11 = load i16, i16* %7
%12 = load i64, i64* %8
ret void
}

LLVM IR (-O2):
define void @testClosureLLSLLrV(void (i64, i16, i64)* nocapture %0, i64 %1, i16 signext %2, i64 %3) {
tail call void %0(i64 %1, i16 signext %2, i64 %3)
ret void
}
int iter_range_end(int start, int end) { return (end > start) ? ++end : --end; }


x86 assembly (clang, -O0):
<iter_range_end>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x4(%rbp),%eax
jle    1127 <iter_range_end+0x27>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    %eax,-0xc(%rbp)
jmp    1133 <iter_range_end+0x33>
mov    -0x8(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x8(%rbp)
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<iter_range_end>:
xor    %eax,%eax
cmp    %edi,%esi
setg   %al
lea    (%rsi,%rax,2),%eax
add    $0xffffffff,%eax
ret

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

LLVM IR (-O2):
define i32 @iter_range_end(i32 %0, i32 %1) {
%3 = icmp sgt i32 %1, %0
%4 = select i1 %3, i32 1, i32 -1
%5 = add nsw i32 %4, %1
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main() {
  printf("dmdfdfdfj\n");
  return 13;
}


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

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

LLVM IR (-O0):
@.str = [11 x i8] c"dmdfdfdfj\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
ret i32 13
}

LLVM IR (-O2):
@str = [10 x i8] c"dmdfdfdfj\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @str, i64 0, i64 0))
ret i32 13
}
void g_value_set_instance() {}


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

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

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

LLVM IR (-O2):
define void @g_value_set_instance() {
ret void
}
void gtk_text_iter_get_text() {}


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

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

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

LLVM IR (-O2):
define void @gtk_text_iter_get_text() {
ret void
}
void main() { ; }


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

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

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

LLVM IR (-O2):
define void @main() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, unsigned int, char const *);
void print_osc(unsigned int code, const char *string) {
  printf("\x1b\x5d"
         "%d;%s\a",
         code, string);
}


x86 assembly (clang, -O0):
<print_osc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%esi
mov    -0x10(%rbp),%rdx
lea    0xed3(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_osc>:
mov    %rsi,%rdx
mov    %edi,%esi
lea    0xee4(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [9 x i8] c"\1B]%d;%s\07\00"
define void @print_osc(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
store i32 %0, i32* %3
store i8* %1, i8** %4
%5 = load i32, i32* %3
%6 = load i8*, i8** %4
%7 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 %5, i8* %6)
ret void
}

LLVM IR (-O2):
@.str = [9 x i8] c"\1B]%d;%s\07\00"
define void @print_osc(i32 %0, i8* %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 %0, i8* %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ test_fsync_fd();
void test_fsync(void) { test_fsync_fd(); }


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

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

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

LLVM IR (-O2):
define void @test_fsync() {
%1 = tail call i32 (...) @test_fsync_fd()
ret void
}
int foo(int number) {
  printf("foo %s %s",
         "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
         "2022-01-22/02-19-57/repos/epatel/qt-mac-free-3.3.8/refs/heads/master/"
         "src/3rdparty/dlcompat/test/dlsymtest.c",
         49);
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
lea    0xede(%rip),%rdi
lea    0xee1(%rip),%rsi
mov    $0x31,%edx
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo>:
lea    0xee9(%rip),%rdi
lea    0xeec(%rip),%rsi
mov    $0x31,%edx
xor    %eax,%eax
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [10 x i8] c"foo %s %s\00"
@.str.1 = [172 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/epatel/qt-mac-free-3.3.8/refs/heads/master/src/3rdparty/dlcompat/test/dlsymtest.c\00"
define i32 @foo(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([172 x i8], [172 x i8]* @.str.1, i64 0, i64 0), i32 49)
%5 = load i32, i32* %2
ret i32 %5
}

LLVM IR (-O2):
@.str = [10 x i8] c"foo %s %s\00"
@.str.1 = [172 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/epatel/qt-mac-free-3.3.8/refs/heads/master/src/3rdparty/dlcompat/test/dlsymtest.c\00"
define i32 @foo(i32 %0) {
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([172 x i8], [172 x i8]* @.str.1, i64 0, i64 0), i32 49)
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int sleep(int);
int main() {
  while (sleep(1), 1)
    ;
  exit(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x1,%edi
call   1030 <sleep@plt>
jmp    111f <main+0xf>

x86 assembly (clang, -O2):
<main>:
push   %rax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    $0x1,%edi
call   1030 <sleep@plt>
jmp    1120 <main+0x10>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
br label %2
2: ; preds = %4, %0
%3 = call i32 @sleep(i32 1)
br label %4
4: ; preds = %2
br label %2
}

LLVM IR (-O2):
define i32 @main() {
br label %1
1: ; preds = %1, %0
%2 = tail call i32 @sleep(i32 1)
br label %1
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isgraph(int);
void t_isgraph_0xff() {
  Assert_real((isgraph(255) == 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_isgraph.c",
              1280, ("isgraph should be 0 for 0xff"));
}


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

x86 assembly (clang, -O2):
<t_isgraph_0xff>:
push   %rax
mov    $0xff,%edi
call   1040 <isgraph@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x500,%edx
pop    %rax
jmp    1030 <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_isgraph.c\00"
@.str.1 = [29 x i8] c"isgraph should be 0 for 0xff\00"
define void @t_isgraph_0xff() {
%1 = call i64 @isgraph(i32 255)
%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 1280, 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_isgraph.c\00"
@.str.1 = [29 x i8] c"isgraph should be 0 for 0xff\00"
define void @t_isgraph_0xff() {
%1 = tail call i64 @isgraph(i32 255)
%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 1280, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
uint8_t IntToHexChar(uint8_t val) {
  if (val < 10)
    return '0' + val;
  else
    return 'a' + (val - 10);
}


x86 assembly (clang, -O0):
<IntToHexChar>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0xa,-0x8(%rbp)
jge    111f <IntToHexChar+0x1f>
mov    -0x8(%rbp),%eax
add    $0x30,%eax
mov    %eax,-0x4(%rbp)
jmp    112b <IntToHexChar+0x2b>
mov    -0x8(%rbp),%eax
sub    $0xa,%eax
add    $0x61,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<IntToHexChar>:
lea    0x57(%rdi),%ecx
lea    0x30(%rdi),%eax
cmp    $0xa,%edi
cmovge %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @IntToHexChar(i32 %0) {
%2 = icmp slt i32 %0, 10
%3 = select i1 %2, i32 48, i32 87
%4 = add nsw i32 %3, %0
ret i32 %4
}
void NOR_SPI_DisableTxInt(void) {}


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

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

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

LLVM IR (-O2):
define void @NOR_SPI_DisableTxInt() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ putchar(char);
void printstr(char *ptr, int len) {
  int index;
  for (index = 0; index < len; index++) {
    putchar(ptr[index]);
  }
  return;
}


x86 assembly (clang, -O0):
<printstr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1151 <printstr+0x41>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
movsbl (%rax,%rcx,1),%edi
call   1030 <putchar@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1126 <printstr+0x16>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printstr>:
push   %r15
push   %r14
push   %rbx
test   %esi,%esi
jle    1143 <printstr+0x33>
mov    %rdi,%r14
mov    %esi,%r15d
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
movsbl (%r14,%rbx,1),%edi
call   1030 <putchar@plt>
add    $0x1,%rbx
cmp    %rbx,%r15
jne    1130 <printstr+0x20>
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define void @printstr(i8* nocapture %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %13
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %6
6: ; preds = %4, %6
%7 = phi i64 [ 0, %4 ], [ %11, %6 ]
%8 = getelementptr inbounds i8, i8* %0, i64 %7
%9 = load i8, i8* %8
%10 = tail call i32 @putchar(i8 signext %9)
%11 = add nuw nsw i64 %7, 1
%12 = icmp eq i64 %11, %5
br i1 %12, label %13, label %6
13: ; preds = %6, %2
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ dll_flockfile(int /*<<< orphan*/ *);
void __wrap_flockfile(FILE *file) { dll_flockfile(file); }


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

x86 assembly (clang, -O2):
<__wrap_flockfile>:
jmp    1030 <dll_flockfile@plt>

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

LLVM IR (-O2):
define void @__wrap_flockfile(i32* %0) {
%2 = tail call i32 @dll_flockfile(i32* %0)
ret void
}
int test_imm_52uint8_reg(unsigned char val) {
  return ((val) & (-0x52 << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_52uint8_reg(i8 zeroext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = zext i8 %3 to i32
%5 = and i32 %4, -82
%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_52uint8_reg(i8 zeroext %0) {
%2 = and i8 %0, -82
%3 = icmp eq i8 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
bool test_case_1(void) {
  if (2 + 2 == 4)
    return true;
  else
    return false;
}


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

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

LLVM IR (-O0):
define i32 @test_case_1() {
ret i32 1
}

LLVM IR (-O2):
define i32 @test_case_1() {
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void clear() { printf("\x1b[2J"); }


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

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

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

LLVM IR (-O2):
@.str = [5 x i8] c"\1B[2J\00"
define void @clear() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
uint32_t ror(uint32_t v, uint32_t s) { return (v >> s) | (v << (32 - s)); }


x86 assembly (clang, -O0):
<ror>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x8(%rbp),%ecx
sar    %cl,%eax
mov    -0x4(%rbp),%edx
mov    $0x20,%ecx
sub    -0x8(%rbp),%ecx
shl    %cl,%edx
mov    %edx,%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ror>:
mov    %esi,%ecx
mov    %edi,%eax
sar    %cl,%eax
neg    %cl
shl    %cl,%edi
or     %edi,%eax
ret

LLVM IR (-O0):
define i32 @ror(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 = ashr i32 %5, %6
%8 = load i32, i32* %3
%9 = load i32, i32* %4
%10 = sub nsw i32 32, %9
%11 = shl i32 %8, %10
%12 = or i32 %7, %11
ret i32 %12
}

LLVM IR (-O2):
define i32 @ror(i32 %0, i32 %1) {
%3 = ashr i32 %0, %1
%4 = sub nsw i32 32, %1
%5 = shl i32 %0, %4
%6 = or i32 %5, %3
ret i32 %6
}
int isspace(int x) {
  if (x == ' ' || x == '\t' || x == '\n' || x == '\f' || x == '\b' || x == '\r')
    return 1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<isspace>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x20,-0x8(%rbp)
je     1143 <isspace+0x43>
cmpl   $0x9,-0x8(%rbp)
je     1143 <isspace+0x43>
cmpl   $0xa,-0x8(%rbp)
je     1143 <isspace+0x43>
cmpl   $0xc,-0x8(%rbp)
je     1143 <isspace+0x43>
cmpl   $0x8,-0x8(%rbp)
je     1143 <isspace+0x43>
cmpl   $0xd,-0x8(%rbp)
jne    114f <isspace+0x4f>
movl   $0x1,-0x4(%rbp)
jmp    1156 <isspace+0x56>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isspace>:
cmp    $0x20,%edi
ja     111d <isspace+0x1d>
mov    $0x1,%eax
mov    %edi,%ecx
movabs $0x100003700,%rdx
bt     %rcx,%rdx
jae    111d <isspace+0x1d>
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @isspace(i32 %0) {
switch i32 %0, label %2 [
i32 32, label %3
i32 13, label %3
i32 12, label %3
i32 10, label %3
i32 9, label %3
i32 8, label %3
]
2: ; preds = %1
br label %3
3: ; preds = %1, %1, %1, %1, %1, %1, %2
%4 = phi i32 [ 0, %2 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ]
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main() {
  int value = 1;
  while (value < 10) {
    printf("%d\n", value);
    value += 1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
cmpl   $0xa,-0x8(%rbp)
jge    114d <main+0x3d>
mov    -0x8(%rbp),%esi
lea    0xec6(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1126 <main+0x16>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xee8(%rip),%rbx
mov    %rbx,%rdi
mov    $0x1,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x2,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x3,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x4,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x5,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x6,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x7,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x8,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x9,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 1)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 2)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 3)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 4)
%5 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 5)
%6 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 6)
%7 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 7)
%8 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 8)
%9 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 9)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
int /*<<< orphan*/ se_out(char *, int /*<<< orphan*/ *, int /*<<< orphan*/ *);
void do_DrSP(uint8_t *p, uint8_t *max, int is_up) {
  se_out("RDPDR: Server Capability: ", p + 4, max);
}


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

x86 assembly (clang, -O2):
<do_DrSP>:
mov    %rsi,%rdx
lea    0x10(%rdi),%rsi
lea    0xee2(%rip),%rdi
jmp    1030 <se_out@plt>

LLVM IR (-O0):
@.str = [27 x i8] c"RDPDR: Server Capability: \00"
define void @do_DrSP(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 = getelementptr inbounds i32, i32* %7, i64 4
%9 = load i32*, i32** %5
%10 = call i32 @se_out(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), i32* %8, i32* %9)
ret void
}

LLVM IR (-O2):
@.str = [27 x i8] c"RDPDR: Server Capability: \00"
define void @do_DrSP(i32* %0, i32* %1, i32 %2) {
%4 = getelementptr inbounds i32, i32* %0, i64 4
%5 = tail call i32 @se_out(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), i32* %4, i32* %1)
ret void
}
void ARGBCopyAlphaRow_SSE2() {}


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

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

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

LLVM IR (-O2):
define void @ARGBCopyAlphaRow_SSE2() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ _hmt_count_cover(char *, int);
float HMM_Clamp(float Min, float Value, float Max) {
  { _hmt_count_cover("HMM_Clamp", 597); };
  float Result = Value;
  if (Result < Min) {
    Result = Min;
  }
  if (Result > Max) {
    Result = Max;
  }
  return (Result);
}


x86 assembly (clang, -O0):
<HMM_Clamp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  %xmm2,-0xc(%rbp)
lea    0xed2(%rip),%rdi
mov    $0x255,%esi
call   1030 <_hmt_count_cover@plt>
movss  -0x8(%rbp),%xmm0
movss  %xmm0,-0x10(%rbp)
movss  -0x10(%rbp),%xmm1
movss  -0x4(%rbp),%xmm0
ucomiss %xmm1,%xmm0
jbe    115f <HMM_Clamp+0x4f>
movss  -0x4(%rbp),%xmm0
movss  %xmm0,-0x10(%rbp)
movss  -0x10(%rbp),%xmm0
ucomiss -0xc(%rbp),%xmm0
jbe    1178 <HMM_Clamp+0x68>
movss  -0xc(%rbp),%xmm0
movss  %xmm0,-0x10(%rbp)
movss  -0x10(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<HMM_Clamp>:
sub    $0x18,%rsp
movss  %xmm2,0x14(%rsp)
movss  %xmm1,0x10(%rsp)
movss  %xmm0,0xc(%rsp)
lea    0xed3(%rip),%rdi
mov    $0x255,%esi
call   1030 <_hmt_count_cover@plt>
movss  0xc(%rsp),%xmm1
maxss  0x10(%rsp),%xmm1
movss  0x14(%rsp),%xmm0
minss  %xmm1,%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
@.str = [10 x i8] c"HMM_Clamp\00"
define float @HMM_Clamp(float %0, float %1, float %2) {
%4 = alloca float
%5 = alloca float
%6 = alloca float
%7 = alloca float
store float %0, float* %4
store float %1, float* %5
store float %2, float* %6
%8 = call i32 @_hmt_count_cover(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 597)
%9 = load float, float* %5
store float %9, float* %7
%10 = load float, float* %7
%11 = load float, float* %4
%12 = fcmp olt float %10, %11
br i1 %12, label %13, label %15
13: ; preds = %3
%14 = load float, float* %4
store float %14, float* %7
br label %15
15: ; preds = %13, %3
%16 = load float, float* %7
%17 = load float, float* %6
%18 = fcmp ogt float %16, %17
br i1 %18, label %19, label %21
19: ; preds = %15
%20 = load float, float* %6
store float %20, float* %7
br label %21
21: ; preds = %19, %15
%22 = load float, float* %7
ret float %22
}

LLVM IR (-O2):
@.str = [10 x i8] c"HMM_Clamp\00"
define float @HMM_Clamp(float %0, float %1, float %2) {
%4 = tail call i32 @_hmt_count_cover(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 597)
%5 = fcmp olt float %1, %0
%6 = select i1 %5, float %0, float %1
%7 = fcmp ogt float %6, %2
%8 = select i1 %7, float %2, float %6
ret float %8
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main() {
  int i;
  for (i = 0; i <= 100; i++) {
    printf("%d -", i);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x64,-0x8(%rbp)
jg     114d <main+0x3d>
mov    -0x8(%rbp),%esi
lea    0xec6(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1126 <main+0x16>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
xor    %ebx,%ebx
lea    0xee3(%rip),%r14
nopl   (%rax)
mov    %r14,%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
add    $0x1,%ebx
cmp    $0x65,%ebx
jne    1120 <main+0x10>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
@.str = [5 x i8] c"%d -\00"
define i32 @main() {
br label %1
1: ; preds = %0, %1
%2 = phi i32 [ 0, %0 ], [ %4, %1 ]
%3 = tail call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %2)
%4 = add nuw nsw i32 %2, 1
%5 = icmp eq i32 %4, 101
br i1 %5, label %6, label %1
6: ; preds = %1
ret i32 0
}
/* Variables and functions */
int SIGINT;
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *);
void sighandler(int signo) {
  if (signo == SIGINT) {
    printf("Nice try.\n");
    exit(3);
  }
}


x86 assembly (clang, -O0):
<sighandler>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    0x2eb3(%rip),%rcx
cmp    (%rcx),%eax
jne    1153 <sighandler+0x33>
lea    0xebc(%rip),%rdi
call   1030 <printf@plt>
mov    $0x3,%edi
call   1040 <exit@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sighandler>:
push   %rax
mov    0x2ec0(%rip),%rax
cmp    %edi,(%rax)
je     112e <sighandler+0xe>
pop    %rax
ret
lea    0xecb(%rip),%rdi
call   1030 <puts@plt>
mov    $0x3,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@SIGINT = global i32 0
@.str = [11 x i8] c"Nice try.\0A\00"
define void @sighandler(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = load i32, i32* @SIGINT
%5 = icmp eq i32 %3, %4
br i1 %5, label %6, label %9
6: ; preds = %1
%7 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
%8 = call i32 @exit(i32 3)
unreachable
9: ; preds = %1
ret void
}

LLVM IR (-O2):
@SIGINT = global i32 0
@str = [10 x i8] c"Nice try.\00"
define void @sighandler(i32 %0) {
%2 = load i32, i32* @SIGINT
%3 = icmp eq i32 %2, %0
br i1 %3, label %4, label %7
4: ; preds = %1
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @str, i64 0, i64 0))
%6 = tail call i32 @exit(i32 3)
unreachable
7: ; preds = %1
ret void
}
int pathconN_nm7_f0(const double **arg, double **res, int *iw, double *w,
                    int mem) {
  return 0;
}


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

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

LLVM IR (-O0):
define i32 @pathconN_nm7_f0(double** %0, double** %1, i32* %2, double* %3, i32 %4) {
%6 = alloca double**
%7 = alloca double**
%8 = alloca i32*
%9 = alloca double*
%10 = alloca i32
store double** %0, double*** %6
store double** %1, double*** %7
store i32* %2, i32** %8
store double* %3, double** %9
store i32 %4, i32* %10
ret i32 0
}

LLVM IR (-O2):
define i32 @pathconN_nm7_f0(double** nocapture readnone %0, double** nocapture readnone %1, i32* nocapture readnone %2, double* nocapture readnone %3, i32 %4) {
ret i32 0
}
__attribute__((visibility("hidden"))) void
destroy_wait_event(struct wait_event *wait_event) {}


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

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

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

LLVM IR (-O2):
%struct.wait_event = type opaque
define hidden void @destroy_wait_event(%struct.wait_event* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void __cleanup_free_func(void *p) { free(*(void **)p); }


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

x86 assembly (clang, -O2):
<__cleanup_free_func>:
mov    (%rdi),%rdi
jmp    1030 <free@plt>

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

LLVM IR (-O2):
define void @__cleanup_free_func(i8* nocapture %0) {
%2 = bitcast i8* %0 to i8**
%3 = load i8*, i8** %2
%4 = tail call i32 @free(i8* %3)
ret void
}
/* Variables and functions */
int asm_syscall(char const *, int /*<<< orphan*/ *, int /*<<< orphan*/ *, int);
int __attribute__((section("libgloss_epiphany"))) _unlink(const char *name) {
  return asm_syscall(name, NULL, NULL, 0x407);
}


x86 assembly (clang, -O0):
<_unlink>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%edx
mov    $0x407,%ecx
mov    %rdx,%rsi
call   1030 <asm_syscall@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_unlink>:
xor    %esi,%esi
xor    %edx,%edx
mov    $0x407,%ecx
jmp    1030 <asm_syscall@plt>

LLVM IR (-O0):
define i32 @_unlink(i8* %0) section "libgloss_epiphany" {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @asm_syscall(i8* %3, i32* null, i32* null, i32 1031)
ret i32 %4
}

LLVM IR (-O2):
define i32 @_unlink(i8* %0) section "libgloss_epiphany" {
%2 = tail call i32 @asm_syscall(i8* %0, i32* null, i32* null, i32 1031)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ FUTEX_WAKE;
int /*<<< orphan*/ sys_futex0(int *, int /*<<< orphan*/, int);
void futex_wake(int *addr, int count) { sys_futex0(addr, FUTEX_WAKE, count); }


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

x86 assembly (clang, -O2):
<futex_wake>:
mov    %esi,%edx
mov    0x2ebf(%rip),%rax
mov    (%rax),%esi
jmp    1030 <sys_futex0@plt>

LLVM IR (-O0):
@FUTEX_WAKE = global i32 0
define void @futex_wake(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* @FUTEX_WAKE
%7 = load i32, i32* %4
%8 = call i32 @sys_futex0(i32* %5, i32 %6, i32 %7)
ret void
}

LLVM IR (-O2):
@FUTEX_WAKE = global i32 0
define void @futex_wake(i32* %0, i32 %1) {
%3 = load i32, i32* @FUTEX_WAKE
%4 = tail call i32 @sys_futex0(i32* %0, i32 %3, i32 %1)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ sqlite3_file;

/* Variables and functions */
int SQLITE_OK;
int memLock(sqlite3_file *pFile, int eLock) { return SQLITE_OK; }


x86 assembly (clang, -O0):
<memLock>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    0x2ed6(%rip),%rax
mov    (%rax),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
@SQLITE_OK = global i32 0
define i32 @memLock(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
store i32* %0, i32** %3
store i32 %1, i32* %4
%5 = load i32, i32* @SQLITE_OK
ret i32 %5
}

LLVM IR (-O2):
@SQLITE_OK = global i32 0
define i32 @memLock(i32* nocapture readnone %0, i32 %1) {
%3 = load i32, i32* @SQLITE_OK
ret i32 %3
}
/* Variables and functions */
int fc8080_data_select(void *, unsigned char, unsigned char);
int bbm_com_data_select(void *handle, unsigned char subch_id,
                        unsigned char buf_id) {
  int res;
  res = fc8080_data_select(handle, subch_id, buf_id);
  return res;
}


x86 assembly (clang, -O0):
<bbm_com_data_select>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dl,%al
mov    %sil,%cl
mov    %rdi,-0x8(%rbp)
mov    %cl,-0x9(%rbp)
mov    %al,-0xa(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x9(%rbp),%al
movzbl %al,%esi
movzbl -0xa(%rbp),%edx
call   1030 <fc8080_data_select@plt>
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bbm_com_data_select>:
jmp    1030 <fc8080_data_select@plt>

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

LLVM IR (-O2):
define i32 @bbm_com_data_select(i8* %0, i8 zeroext %1, i8 zeroext %2) {
%4 = tail call i32 @fc8080_data_select(i8* %0, i8 zeroext %1, i8 zeroext %2)
ret i32 %4
}
/* Variables and functions */
char *iupStrGetSmallMem();
int /*<<< orphan*/ sprintf(char *, char *, double);
char *iupStrReturnDouble(double d) {
  char *str = iupStrGetSmallMem();
  sprintf(str, "%.18f", d);
  return str;
}


x86 assembly (clang, -O0):
<iupStrReturnDouble>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
mov    $0x0,%al
call   1030 <iupStrGetSmallMem@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
movsd  -0x8(%rbp),%xmm0
lea    0xeb8(%rip),%rsi
call   1040 <sprintf@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<iupStrReturnDouble>:
push   %rbx
sub    $0x10,%rsp
movsd  %xmm0,0x8(%rsp)
xor    %eax,%eax
call   1030 <iupStrGetSmallMem@plt>
mov    %rax,%rbx
lea    0xec4(%rip),%rsi
mov    %rax,%rdi
movsd  0x8(%rsp),%xmm0
call   1040 <sprintf@plt>
mov    %rbx,%rax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [6 x i8] c"%.18f\00"
define i8* @iupStrReturnDouble(double %0) {
%2 = alloca double
%3 = alloca i8*
store double %0, double* %2
%4 = call i8* (...) @iupStrGetSmallMem()
store i8* %4, i8** %3
%5 = load i8*, i8** %3
%6 = load double, double* %2
%7 = call i32 @sprintf(i8* %5, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), double %6)
%8 = load i8*, i8** %3
ret i8* %8
}

LLVM IR (-O2):
@.str = [6 x i8] c"%.18f\00"
define i8* @iupStrReturnDouble(double %0) {
%2 = tail call i8* (...) @iupStrGetSmallMem()
%3 = tail call i32 @sprintf(i8* dereferenceable(1) %2, i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), double %0)
ret i8* %2
}
int global_f(void) { return 42; }


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

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

LLVM IR (-O0):
define i32 @global_f() {
ret i32 42
}

LLVM IR (-O2):
define i32 @global_f() {
ret i32 42
}
void FUNC_LINEAR_DRAW_SPRITE_END(void) {}


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

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

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

LLVM IR (-O2):
define void @FUNC_LINEAR_DRAW_SPRITE_END() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ __ESBMC_check_stability(float *, float *);
int /*<<< orphan*/ assert(int /*<<< orphan*/);
int main() {
  float a[] = {1.000000000000000, 1.968750000000000, 1.968750000000000,
               1.562500000000000, 0.312500000000000};
  float b[] = {0, 0, 0, 0, 0};
  assert(__ESBMC_check_stability(a, b));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xeba(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xeb7(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0xeb5(%rip),%eax
mov    %eax,-0x10(%rbp)
lea    -0x40(%rbp),%rdi
xor    %esi,%esi
mov    $0x14,%edx
call   1040 <memset@plt>
lea    -0x20(%rbp),%rdi
lea    -0x40(%rbp),%rsi
call   1030 <__ESBMC_check_stability@plt>
mov    %eax,%edi
call   1050 <assert@plt>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x38,%rsp
mov    0xee6(%rip),%eax
mov    %eax,0x30(%rsp)
movaps 0xecb(%rip),%xmm0
movaps %xmm0,0x20(%rsp)
xorps  %xmm0,%xmm0
movaps %xmm0,(%rsp)
movl   $0x0,0x10(%rsp)
lea    0x20(%rsp),%rdi
mov    %rsp,%rsi
call   1030 <__ESBMC_check_stability@plt>
mov    %eax,%edi
call   1040 <assert@plt>
xor    %eax,%eax
add    $0x38,%rsp
ret

LLVM IR (-O0):
@__const.main.a = [5 x float] [float 1.000000e+00, float 1.968750e+00, float 1.968750e+00, float 1.562500e+00, float 3.125000e-01]
define i32 @main() {
%1 = alloca i32
%2 = alloca [5 x float]
%3 = alloca [5 x float]
store i32 0, i32* %1
%4 = bitcast [5 x float]* %2 to i8*
%5 = bitcast [5 x float]* %3 to i8*
%6 = getelementptr inbounds [5 x float], [5 x float]* %2, i64 0, i64 0
%7 = getelementptr inbounds [5 x float], [5 x float]* %3, i64 0, i64 0
%8 = call i32 @__ESBMC_check_stability(float* %6, float* %7)
%9 = call i32 @assert(i32 %8)
ret i32 0
}

LLVM IR (-O2):
@__const.main.a = [5 x float] [float 1.000000e+00, float 1.968750e+00, float 1.968750e+00, float 1.562500e+00, float 3.125000e-01]
define i32 @main() {
%1 = alloca [5 x float]
%2 = alloca [5 x float]
%3 = bitcast [5 x float]* %1 to i8*
%4 = bitcast [5 x float]* %2 to i8*
%5 = getelementptr inbounds [5 x float], [5 x float]* %1, i64 0, i64 0
%6 = getelementptr inbounds [5 x float], [5 x float]* %2, i64 0, i64 0
%7 = call i32 @__ESBMC_check_stability(float* %5, float* %6)
%8 = call i32 @assert(i32 %7)
ret i32 0
}
/* Type definitions */
typedef int uint32_t;
typedef int /*<<< orphan*/ uint16_t;
struct fb_bitfield {
  int length;
  int offset;
};

/* Variables and functions */
uint32_t putfbcolor(uint32_t color, const struct fb_bitfield *bitfield,
                    const uint16_t *colormap) {
  color >>= (8 - bitfield->length);
  return color << bitfield->offset;
}


x86 assembly (clang, -O0):
<putfbcolor>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    $0x8,%ecx
sub    (%rax),%ecx
mov    -0x4(%rbp),%eax
sar    %cl,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x10(%rbp),%rcx
mov    0x4(%rcx),%ecx
shl    %cl,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<putfbcolor>:
mov    $0x8,%cl
sub    (%rsi),%cl
mov    %edi,%eax
sar    %cl,%eax
mov    0x4(%rsi),%cl
shl    %cl,%eax
ret

LLVM IR (-O0):
%struct.fb_bitfield = type { i32, i32 }
define i32 @putfbcolor(i32 %0, %struct.fb_bitfield* %1, i32* %2) {
%4 = alloca i32
%5 = alloca %struct.fb_bitfield*
%6 = alloca i32*
store i32 %0, i32* %4
store %struct.fb_bitfield* %1, %struct.fb_bitfield** %5
store i32* %2, i32** %6
%7 = load %struct.fb_bitfield*, %struct.fb_bitfield** %5
%8 = getelementptr inbounds %struct.fb_bitfield, %struct.fb_bitfield* %7, i32 0, i32 0
%9 = load i32, i32* %8
%10 = sub nsw i32 8, %9
%11 = load i32, i32* %4
%12 = ashr i32 %11, %10
store i32 %12, i32* %4
%13 = load i32, i32* %4
%14 = load %struct.fb_bitfield*, %struct.fb_bitfield** %5
%15 = getelementptr inbounds %struct.fb_bitfield, %struct.fb_bitfield* %14, i32 0, i32 1
%16 = load i32, i32* %15
%17 = shl i32 %13, %16
ret i32 %17
}

LLVM IR (-O2):
%struct.fb_bitfield = type { i32, i32 }
define i32 @putfbcolor(i32 %0, %struct.fb_bitfield* nocapture %1, i32* nocapture readnone %2) {
%4 = getelementptr inbounds %struct.fb_bitfield, %struct.fb_bitfield* %1, i64 0, i32 0
%5 = load i32, i32* %4
%6 = sub nsw i32 8, %5
%7 = ashr i32 %0, %6
%8 = getelementptr inbounds %struct.fb_bitfield, %struct.fb_bitfield* %1, i64 0, i32 1
%9 = load i32, i32* %8
%10 = shl i32 %7, %9
ret i32 %10
}
int compare(const void *a, const void *b) {
  int int_a = *((int *)a);
  int int_b = *((int *)b);
  if (int_a == int_b)
    return 0;
  else if (int_a < int_b)
    return -1;
  else
    return 1;
}


x86 assembly (clang, -O0):
<compare>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x18(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x20(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0x20(%rbp),%eax
jne    1136 <compare+0x36>
movl   $0x0,-0x4(%rbp)
jmp    1155 <compare+0x55>
mov    -0x1c(%rbp),%eax
cmp    -0x20(%rbp),%eax
jge    114e <compare+0x4e>
movl   $0xffffffff,-0x4(%rbp)
jmp    1155 <compare+0x55>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<compare>:
mov    (%rdi),%eax
xor    %ecx,%ecx
xor    %edx,%edx
cmp    (%rsi),%eax
setge  %dl
lea    -0x1(%rdx,%rdx,1),%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @compare(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i32*
%4 = load i32, i32* %3
%5 = bitcast i8* %1 to i32*
%6 = load i32, i32* %5
%7 = icmp eq i32 %4, %6
%8 = icmp slt i32 %4, %6
%9 = select i1 %8, i32 -1, i32 1
%10 = select i1 %7, i32 0, i32 %9
ret i32 %10
}
double Difference(float a, float b) { return (double)(a - b) / (a * b); }


x86 assembly (clang, -O0):
<Difference>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
subss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movss  -0x4(%rbp),%xmm1
mulss  -0x8(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
divsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<Difference>:
movaps %xmm0,%xmm2
subss  %xmm1,%xmm2
cvtss2sd %xmm2,%xmm2
mulss  %xmm1,%xmm0
cvtss2sd %xmm0,%xmm0
divsd  %xmm0,%xmm2
movapd %xmm2,%xmm0
ret

LLVM IR (-O0):
define double @Difference(float %0, float %1) {
%3 = alloca float
%4 = alloca float
store float %0, float* %3
store float %1, float* %4
%5 = load float, float* %3
%6 = load float, float* %4
%7 = fsub float %5, %6
%8 = fpext float %7 to double
%9 = load float, float* %3
%10 = load float, float* %4
%11 = fmul float %9, %10
%12 = fpext float %11 to double
%13 = fdiv double %8, %12
ret double %13
}

LLVM IR (-O2):
define double @Difference(float %0, float %1) {
%3 = fsub float %0, %1
%4 = fpext float %3 to double
%5 = fmul float %0, %1
%6 = fpext float %5 to double
%7 = fdiv double %4, %6
ret double %7
}
/* Variables and functions */
int /*<<< orphan*/ errnoThrow(int /*<<< orphan*/);
int /*<<< orphan*/ rename(char const *, char const *);
void Sys_FileRen(const char *old, const char *new) {
  errnoThrow(rename(old, new));
}


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

x86 assembly (clang, -O2):
<Sys_FileRen>:
push   %rax
call   1030 <rename@plt>
mov    %eax,%edi
pop    %rax
jmp    1040 <errnoThrow@plt>

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

LLVM IR (-O2):
define void @Sys_FileRen(i8* nocapture %0, i8* nocapture %1) {
%3 = tail call i32 @rename(i8* %0, i8* %1)
%4 = tail call i32 @errnoThrow(i32 %3)
ret void
}