xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *, int);
void lcd_write_string(const char *x) {
  printf("%s:%d\n",
         "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
         "2022-01-22/02-19-57/repos/beerriot/blockgame/refs/heads/master/test/"
         "mock/lcd.c",
         16);
}


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

x86 assembly (clang, -O2):
<lcd_write_string>:
lea    0xee9(%rip),%rdi
lea    0xee9(%rip),%rsi
mov    $0x10,%edx
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [7 x i8] c"%s:%d\0A\00"
@.str.1 = [143 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/beerriot/blockgame/refs/heads/master/test/mock/lcd.c\00"
define void @lcd_write_string(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([143 x i8], [143 x i8]* @.str.1, i64 0, i64 0), i32 16)
ret void
}

LLVM IR (-O2):
@.str = [7 x i8] c"%s:%d\0A\00"
@.str.1 = [143 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/beerriot/blockgame/refs/heads/master/test/mock/lcd.c\00"
define void @lcd_write_string(i8* nocapture readnone %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([143 x i8], [143 x i8]* @.str.1, i64 0, i64 0), i32 16)
ret void
}
int foo(int a, int b) {
  if (a > 50)
    return 19;
  if (a > 63 && b < 50)
    return 17;
  return 31;
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpl   $0x32,-0x8(%rbp)
jle    1120 <foo+0x20>
movl   $0x13,-0x4(%rbp)
jmp    1147 <foo+0x47>
cmpl   $0x3f,-0x8(%rbp)
jle    1140 <foo+0x40>
cmpl   $0x32,-0xc(%rbp)
jge    1140 <foo+0x40>
movl   $0x11,-0x4(%rbp)
jmp    1147 <foo+0x47>
movl   $0x1f,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo>:
cmp    $0x33,%edi
mov    $0x13,%ecx
mov    $0x1f,%eax
cmovge %ecx,%eax
ret

LLVM IR (-O0):
define i32 @foo(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
%6 = load i32, i32* %4
%7 = icmp sgt i32 %6, 50
br i1 %7, label %8, label %9
8: ; preds = %2
store i32 19, i32* %3
br label %17
9: ; preds = %2
%10 = load i32, i32* %4
%11 = icmp sgt i32 %10, 63
br i1 %11, label %12, label %16
12: ; preds = %9
%13 = load i32, i32* %5
%14 = icmp slt i32 %13, 50
br i1 %14, label %15, label %16
15: ; preds = %12
store i32 17, i32* %3
br label %17
16: ; preds = %12, %9
store i32 31, i32* %3
br label %17
17: ; preds = %16, %15, %8
%18 = load i32, i32* %3
ret i32 %18
}

LLVM IR (-O2):
define i32 @foo(i32 %0, i32 %1) {
%3 = icmp sgt i32 %0, 50
%4 = select i1 %3, i32 19, i32 31
ret i32 %4
}
void test_safelen_simdlen() {
  int i;
#pragma omp target
#pragma omp teams
#pragma omp distribute parallel for simd simdlen(6) safelen(5)
  for (i = 0; i < 16; ++i)
    ;
#pragma omp target
#pragma omp teams
#pragma omp distribute parallel for simd safelen(5) simdlen(6)
  for (i = 0; i < 16; ++i)
    ;
}


x86 assembly (clang, -O0):
<test_safelen_simdlen>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
cmpl   $0x10,-0x4(%rbp)
jge    1128 <test_safelen_simdlen+0x28>
jmp    111a <test_safelen_simdlen+0x1a>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    110b <test_safelen_simdlen+0xb>
movl   $0x0,-0x4(%rbp)
cmpl   $0x10,-0x4(%rbp)
jge    114c <test_safelen_simdlen+0x4c>
jmp    113e <test_safelen_simdlen+0x3e>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    112f <test_safelen_simdlen+0x2f>
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @test_safelen_simdlen() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ THAtomicCompareAndSwapLong(long volatile *, long, long);
long THAtomicGetLong(long volatile *a) {
  long value;
  do {
    value = *a;
  } while (!THAtomicCompareAndSwapLong(a, value, value));
  return value;
}


x86 assembly (clang, -O0):
<THAtomicGetLong>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x10(%rbp),%rdx
call   1030 <THAtomicCompareAndSwapLong@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
test   $0x1,%al
jne    111c <THAtomicGetLong+0xc>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<THAtomicGetLong>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
nopw   0x0(%rax,%rax,1)
mov    (%r14),%rbx
mov    %r14,%rdi
mov    %rbx,%rsi
mov    %rbx,%rdx
call   1030 <THAtomicCompareAndSwapLong@plt>
test   %eax,%eax
je     1120 <THAtomicGetLong+0x10>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define i64 @THAtomicGetLong(i64* %0) {
br label %2
2: ; preds = %2, %1
%3 = load volatile i64, i64* %0
%4 = tail call i32 @THAtomicCompareAndSwapLong(i64* %0, i64 %3, i64 %3)
%5 = icmp eq i32 %4, 0
br i1 %5, label %2, label %6
6: ; preds = %2
ret i64 %3
}
/* Variables and functions */
int /*<<< orphan*/ add_c_escaped_char(char, char **, char *);
void c_escape_char(char ch, char buffer[5]) {
  char *buffer_end = buffer + sizeof(char[5]) - sizeof(char);
  add_c_escaped_char(ch, &buffer, buffer_end);
  *buffer = '\0';
}


x86 assembly (clang, -O0):
<c_escape_char>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
add    $0x5,%rax
add    $0xffffffffffffffff,%rax
mov    %rax,-0x18(%rbp)
mov    -0x1(%rbp),%al
mov    -0x18(%rbp),%rdx
lea    -0x10(%rbp),%rsi
movsbl %al,%edi
call   1030 <add_c_escaped_char@plt>
mov    -0x10(%rbp),%rax
movb   $0x0,(%rax)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<c_escape_char>:
push   %rax
mov    %rsi,(%rsp)
lea    0x4(%rsi),%rdx
mov    %rsp,%rsi
call   1030 <add_c_escaped_char@plt>
mov    (%rsp),%rax
movb   $0x0,(%rax)
pop    %rax
ret

LLVM IR (-O0):
define void @c_escape_char(i8 signext %0, i8* %1) {
%3 = alloca i8
%4 = alloca i8*
%5 = alloca i8*
store i8 %0, i8* %3
store i8* %1, i8** %4
%6 = load i8*, i8** %4
%7 = getelementptr inbounds i8, i8* %6, i64 5
%8 = getelementptr inbounds i8, i8* %7, i64 -1
store i8* %8, i8** %5
%9 = load i8, i8* %3
%10 = load i8*, i8** %5
%11 = call i32 @add_c_escaped_char(i8 signext %9, i8** %4, i8* %10)
%12 = load i8*, i8** %4
store i8 0, i8* %12
ret void
}

LLVM IR (-O2):
define void @c_escape_char(i8 signext %0, i8* %1) {
%3 = alloca i8*
store i8* %1, i8** %3
%4 = getelementptr inbounds i8, i8* %1, i64 4
%5 = call i32 @add_c_escaped_char(i8 signext %0, i8** %3, i8* %4)
%6 = load i8*, i8** %3
store i8 0, i8* %6
ret void
}
/* Variables and functions */
int /*<<< orphan*/ allocator_sys_alloc_register();
void liballoc_register_modules() { allocator_sys_alloc_register(); }


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

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

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

LLVM IR (-O2):
define void @liballoc_register_modules() {
%1 = tail call i32 (...) @allocator_sys_alloc_register()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ writeLog(int, char *, char *);
int main() {
  writeLog(1, "log here:%s", "abc");
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rsi
lea    0xeed(%rip),%rdx
mov    $0x1,%edi
call   1030 <writeLog@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [12 x i8] c"log here:%s\00"
@.str.1 = [4 x i8] c"abc\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @writeLog(i32 1, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [12 x i8] c"log here:%s\00"
@.str.1 = [4 x i8] c"abc\00"
define i32 @main() {
%1 = tail call i32 @writeLog(i32 1, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ CONS_Debug(int, char *);
int /*<<< orphan*/ R_FreeAllRotSprite();
void Z_PreparePatchFlush(void) {
  CONS_Debug(0x0008, "Z_PreparePatchFlush()...\n");
  R_FreeAllRotSprite();
}


x86 assembly (clang, -O0):
<Z_PreparePatchFlush>:
push   %rbp
mov    %rsp,%rbp
mov    $0x8,%edi
lea    0xed0(%rip),%rsi
call   1040 <CONS_Debug@plt>
mov    $0x0,%al
call   1030 <R_FreeAllRotSprite@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<Z_PreparePatchFlush>:
push   %rax
lea    0xed8(%rip),%rsi
mov    $0x8,%edi
call   1040 <CONS_Debug@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <R_FreeAllRotSprite@plt>

LLVM IR (-O0):
@.str = [26 x i8] c"Z_PreparePatchFlush()...\0A\00"
define void @Z_PreparePatchFlush() {
%1 = call i32 @CONS_Debug(i32 8, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
%2 = call i32 (...) @R_FreeAllRotSprite()
ret void
}

LLVM IR (-O2):
@.str = [26 x i8] c"Z_PreparePatchFlush()...\0A\00"
define void @Z_PreparePatchFlush() {
%1 = tail call i32 @CONS_Debug(i32 8, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 (...) @R_FreeAllRotSprite()
ret void
}
/* Type definitions */
struct virtual_item {
  int dummy;
};

/* Variables and functions */
int direct_check_left(struct virtual_item *, int, int /*<<< orphan*/,
                      int /*<<< orphan*/);
int direct_check_right(struct virtual_item *vi, int free) {
  return direct_check_left(vi, free, 0, 0);
}


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

x86 assembly (clang, -O2):
<direct_check_right>:
xor    %edx,%edx
xor    %ecx,%ecx
jmp    1030 <direct_check_left@plt>

LLVM IR (-O0):
%struct.virtual_item = type { i32 }
define i32 @direct_check_right(%struct.virtual_item* %0, i32 %1) {
%3 = alloca %struct.virtual_item*
%4 = alloca i32
store %struct.virtual_item* %0, %struct.virtual_item** %3
store i32 %1, i32* %4
%5 = load %struct.virtual_item*, %struct.virtual_item** %3
%6 = load i32, i32* %4
%7 = call i32 @direct_check_left(%struct.virtual_item* %5, i32 %6, i32 0, i32 0)
ret i32 %7
}

LLVM IR (-O2):
%struct.virtual_item = type { i32 }
define i32 @direct_check_right(%struct.virtual_item* %0, i32 %1) {
%3 = tail call i32 @direct_check_left(%struct.virtual_item* %0, i32 %1, i32 0, i32 0)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ chk_err(char *);
void chkparam() {
  if ((4 != 2) && (4 != 4))
    chk_err("chkparam: Width parameter is illegal.");
  if ((4 == 2) && (0x8001801BL & 0xFFFF0000L))
    chk_err("chkparam: Poly parameter is too wide.");
  if ((1 != 0) && (1 != 1))
    chk_err("chkparam: Reverse parameter is not boolean.");
}


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

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

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

LLVM IR (-O2):
define void @chkparam() {
ret void
}
/* Variables and functions */
int _ada_use_c2phc(int, int *, int *, double *);
int celcon_read_dobldobl_random_coefficient_system(void) {
  int *a, *b, fail;
  double *c;
  fail = _ada_use_c2phc(461, a, b, c);
  return fail;
}


x86 assembly (clang, -O0):
<celcon_read_dobldobl_random_coefficient_system>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    $0x1cd,%edi
call   1030 <_ada_use_c2phc@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<celcon_read_dobldobl_random_coefficient_system>:
mov    $0x1cd,%edi
jmp    1030 <_ada_use_c2phc@plt>

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

LLVM IR (-O2):
define i32 @celcon_read_dobldobl_random_coefficient_system() {
%1 = tail call i32 @_ada_use_c2phc(i32 461, i32* undef, i32* undef, double* undef)
ret i32 %1
}
void pnfs_roc_release(struct inode *ino) {}


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

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

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

LLVM IR (-O2):
%struct.inode = type opaque
define void @pnfs_roc_release(%struct.inode* nocapture %0) {
ret void
}
double r14(void *x) { return *(double *)(x + 32754); }


x86 assembly (clang, -O0):
<r14>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsd  0x7ff2(%rax),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<r14>:
movsd  0x7ff2(%rdi),%xmm0
ret

LLVM IR (-O0):
define double @r14(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = getelementptr i8, i8* %3, i64 32754
%5 = bitcast i8* %4 to double*
%6 = load double, double* %5
ret double %6
}

LLVM IR (-O2):
define double @r14(i8* nocapture %0) {
%2 = getelementptr i8, i8* %0, i64 32754
%3 = bitcast i8* %2 to double*
%4 = load double, double* %3
ret double %4
}
/* Variables and functions */
int /*<<< orphan*/ resetHardA7GPSModule(int);
void startRecoveryForA7GPSNimeaDataFailed(int n) { resetHardA7GPSModule(2); }


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

x86 assembly (clang, -O2):
<startRecoveryForA7GPSNimeaDataFailed>:
mov    $0x2,%edi
jmp    1030 <resetHardA7GPSModule@plt>

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

LLVM IR (-O2):
define void @startRecoveryForA7GPSNimeaDataFailed(i32 %0) {
%2 = tail call i32 @resetHardA7GPSModule(i32 2)
ret void
}
/* Variables and functions */
double interp2_k_sinc(double);
double interp2_k_tsinc5(double x) {
  double result = 0.0;
  if ((x >= 0.0) && (x < 2.5)) {
    result = interp2_k_sinc(x);
  }
  return result;
}


x86 assembly (clang, -O0):
<interp2_k_tsinc5>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jb     1159 <interp2_k_tsinc5+0x49>
movsd  0xec1(%rip),%xmm0
ucomisd -0x8(%rbp),%xmm0
jbe    1159 <interp2_k_tsinc5+0x49>
movsd  -0x8(%rbp),%xmm0
call   1030 <interp2_k_sinc@plt>
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<interp2_k_tsinc5>:
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jb     112d <interp2_k_tsinc5+0x1d>
movsd  0xede(%rip),%xmm1
ucomisd %xmm0,%xmm1
jbe    112d <interp2_k_tsinc5+0x1d>
jmp    1030 <interp2_k_sinc@plt>
xorpd  %xmm0,%xmm0
ret

LLVM IR (-O0):
define double @interp2_k_tsinc5(double %0) {
%2 = alloca double
%3 = alloca double
store double %0, double* %2
store double 0.000000e+00, double* %3
%4 = load double, double* %2
%5 = fcmp oge double %4, 0.000000e+00
br i1 %5, label %6, label %12
6: ; preds = %1
%7 = load double, double* %2
%8 = fcmp olt double %7, 2.500000e+00
br i1 %8, label %9, label %12
9: ; preds = %6
%10 = load double, double* %2
%11 = call double @interp2_k_sinc(double %10)
store double %11, double* %3
br label %12
12: ; preds = %9, %6, %1
%13 = load double, double* %3
ret double %13
}

LLVM IR (-O2):
define double @interp2_k_tsinc5(double %0) {
%2 = fcmp oge double %0, 0.000000e+00
%3 = fcmp olt double %0, 2.500000e+00
%4 = and i1 %2, %3
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = tail call double @interp2_k_sinc(double %0)
br label %7
7: ; preds = %5, %1
%8 = phi double [ %6, %5 ], [ 0.000000e+00, %1 ]
ret double %8
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void rpi_car_accelerate() { printf("### RPi Car Accelerate ###\n"); }


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

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

LLVM IR (-O0):
@.str = [28 x i8] c"### RPi Car Accelerate ###\0A\00"
define void @rpi_car_accelerate() {
%1 = call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [27 x i8] c"### RPi Car Accelerate ###\00"
define void @rpi_car_accelerate() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
float SrgbGammaToLinear(float);
float X360LinearToGamma(float);
float SrgbGammaTo360Gamma(float flSrgbGammaValue) {
  float flLinearValue = SrgbGammaToLinear(flSrgbGammaValue);
  float fl360GammaValue = X360LinearToGamma(flLinearValue);
  return fl360GammaValue;
}


x86 assembly (clang, -O0):
<SrgbGammaTo360Gamma>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
call   1040 <SrgbGammaToLinear@plt>
movss  %xmm0,-0x8(%rbp)
movss  -0x8(%rbp),%xmm0
call   1030 <X360LinearToGamma@plt>
movss  %xmm0,-0xc(%rbp)
movss  -0xc(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<SrgbGammaTo360Gamma>:
push   %rax
call   1040 <SrgbGammaToLinear@plt>
pop    %rax
jmp    1030 <X360LinearToGamma@plt>

LLVM IR (-O0):
define float @SrgbGammaTo360Gamma(float %0) {
%2 = alloca float
%3 = alloca float
%4 = alloca float
store float %0, float* %2
%5 = load float, float* %2
%6 = call float @SrgbGammaToLinear(float %5)
store float %6, float* %3
%7 = load float, float* %3
%8 = call float @X360LinearToGamma(float %7)
store float %8, float* %4
%9 = load float, float* %4
ret float %9
}

LLVM IR (-O2):
define float @SrgbGammaTo360Gamma(float %0) {
%2 = tail call float @SrgbGammaToLinear(float %0)
%3 = tail call float @X360LinearToGamma(float %2)
ret float %3
}
int cmp_long_gt(const void *a, const void *b) {
  long a_ = *(long *)a;
  long b_ = *(long *)b;
  if (a_ > b_)
    return -1;
  if (a_ < b_)
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<cmp_long_gt>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x28(%rbp)
mov    -0x20(%rbp),%rax
cmp    -0x28(%rbp),%rax
jle    113c <cmp_long_gt+0x3c>
movl   $0xffffffff,-0x4(%rbp)
jmp    115d <cmp_long_gt+0x5d>
mov    -0x20(%rbp),%rax
cmp    -0x28(%rbp),%rax
jge    1156 <cmp_long_gt+0x56>
movl   $0x1,-0x4(%rbp)
jmp    115d <cmp_long_gt+0x5d>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<cmp_long_gt>:
mov    (%rdi),%rax
xor    %ecx,%ecx
cmp    (%rsi),%rax
setl   %cl
mov    $0xffffffff,%eax
cmovle %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @cmp_long_gt(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i64*
%4 = load i64, i64* %3
%5 = bitcast i8* %1 to i64*
%6 = load i64, i64* %5
%7 = icmp sgt i64 %4, %6
%8 = icmp slt i64 %4, %6
%9 = zext i1 %8 to i32
%10 = select i1 %7, i32 -1, i32 %9
ret i32 %10
}
int tst_si_test1(int a, int b, int c) {
  int d = a & b;
  if (d == 0)
    return 12;
  else
    return 18;
}


x86 assembly (clang, -O0):
<tst_si_test1>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%eax
and    -0xc(%rbp),%eax
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
jne    112c <tst_si_test1+0x2c>
movl   $0xc,-0x4(%rbp)
jmp    1133 <tst_si_test1+0x33>
movl   $0x12,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<tst_si_test1>:
test   %edi,%esi
mov    $0xc,%ecx
mov    $0x12,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @tst_si_test1(i32 %0, i32 %1, i32 %2) {
%4 = and i32 %1, %0
%5 = icmp eq i32 %4, 0
%6 = select i1 %5, i32 12, i32 18
ret i32 %6
}
void vararg2_test() {
  vararg2(0);
  vararg2(1, (void *)0);
  vararg2(2, (void *)0, (void *)0);
}


x86 assembly (clang, -O0):
<vararg2_test>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
mov    $0x0,%al
call   1030 <vararg2@plt>
mov    $0x1,%edi
xor    %eax,%eax
mov    %eax,%esi
mov    $0x0,%al
call   1030 <vararg2@plt>
mov    $0x2,%edi
xor    %eax,%eax
mov    %eax,%edx
mov    %rdx,%rsi
mov    $0x0,%al
call   1030 <vararg2@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<vararg2_test>:
push   %rax
xor    %edi,%edi
xor    %eax,%eax
call   1030 <vararg2@plt>
mov    $0x1,%edi
xor    %esi,%esi
xor    %eax,%eax
call   1030 <vararg2@plt>
mov    $0x2,%edi
xor    %esi,%esi
xor    %edx,%edx
xor    %eax,%eax
pop    %rcx
jmp    1030 <vararg2@plt>

LLVM IR (-O0):
define void @vararg2_test() {
%1 = call i32 (i32, ...) bitcast (i32 (...)* @vararg2 to i32 (i32, ...)*)(i32 0)
%2 = call i32 (i32, i8*, ...) bitcast (i32 (...)* @vararg2 to i32 (i32, i8*, ...)*)(i32 1, i8* null)
%3 = call i32 (i32, i8*, i8*, ...) bitcast (i32 (...)* @vararg2 to i32 (i32, i8*, i8*, ...)*)(i32 2, i8* null, i8* null)
ret void
}

LLVM IR (-O2):
define void @vararg2_test() {
%1 = tail call i32 (i32, ...) bitcast (i32 (...)* @vararg2 to i32 (i32, ...)*)(i32 0)
%2 = tail call i32 (i32, i8*, ...) bitcast (i32 (...)* @vararg2 to i32 (i32, i8*, ...)*)(i32 1, i8* null)
%3 = tail call i32 (i32, i8*, i8*, ...) bitcast (i32 (...)* @vararg2 to i32 (i32, i8*, i8*, ...)*)(i32 2, i8* null, i8* null)
ret void
}
/* Type definitions */
struct stat {
  int dummy;
};

/* Variables and functions */
int fstat(int, struct stat *);
int __gnat_florist_fstat(int fd, struct stat *buf) { return fstat(fd, buf); }


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

x86 assembly (clang, -O2):
<__gnat_florist_fstat>:
jmp    1030 <fstat@plt>

LLVM IR (-O0):
%struct.stat = type { i32 }
define i32 @__gnat_florist_fstat(i32 %0, %struct.stat* %1) {
%3 = alloca i32
%4 = alloca %struct.stat*
store i32 %0, i32* %3
store %struct.stat* %1, %struct.stat** %4
%5 = load i32, i32* %3
%6 = load %struct.stat*, %struct.stat** %4
%7 = call i32 @fstat(i32 %5, %struct.stat* %6)
ret i32 %7
}

LLVM IR (-O2):
%struct.stat = type { i32 }
define i32 @__gnat_florist_fstat(i32 %0, %struct.stat* nocapture %1) {
%3 = tail call i32 @fstat(i32 %0, %struct.stat* %1)
ret i32 %3
}
int f8(int *p) {
  extern int *baz();
  if ((p = baz()))
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<f8>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    $0x0,%al
call   1030 <baz@plt>
mov    %rax,-0x10(%rbp)
cmp    $0x0,%rax
je     113d <f8+0x2d>
movl   $0x1,-0x4(%rbp)
jmp    1144 <f8+0x34>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @f8(i32* nocapture readnone %0) {
%2 = tail call i32* (...) @baz()
%3 = icmp ne i32* %2, null
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ SEEK_END;
int /*<<< orphan*/ fseek(int /*<<< orphan*/, int /*<<< orphan*/,
                         int /*<<< orphan*/);
char getchar();
int /*<<< orphan*/ stdin;
char ReadInput() {
  char input = getchar();
  fseek(stdin, 0, SEEK_END);
  return input;
}


x86 assembly (clang, -O0):
<ReadInput>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <getchar@plt>
mov    %al,-0x1(%rbp)
mov    0x2ea7(%rip),%rax
mov    (%rax),%edi
mov    0x2ea6(%rip),%rax
mov    (%rax),%edx
xor    %esi,%esi
call   1040 <fseek@plt>
movsbl -0x1(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ReadInput>:
push   %rbx
xor    %eax,%eax
call   1030 <getchar@plt>
mov    %eax,%ebx
mov    0x2eaf(%rip),%rax
mov    (%rax),%edi
mov    0x2eae(%rip),%rax
mov    (%rax),%edx
xor    %esi,%esi
call   1040 <fseek@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
@stdin = global i32 0
@SEEK_END = global i32 0
define signext i8 @ReadInput() {
%1 = alloca i8
%2 = call signext i8 (...) @getchar()
store i8 %2, i8* %1
%3 = load i32, i32* @stdin
%4 = load i32, i32* @SEEK_END
%5 = call i32 @fseek(i32 %3, i32 0, i32 %4)
%6 = load i8, i8* %1
ret i8 %6
}

LLVM IR (-O2):
@stdin = global i32 0
@SEEK_END = global i32 0
define signext i8 @ReadInput() {
%1 = tail call signext i8 (...) @getchar()
%2 = load i32, i32* @stdin
%3 = load i32, i32* @SEEK_END
%4 = tail call i32 @fseek(i32 %2, i32 0, i32 %3)
ret i8 %1
}
void H010ToABGR() {}


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

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

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

LLVM IR (-O2):
define void @H010ToABGR() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ eval_expr(char *);
int /*<<< orphan*/ my_put_nbr(int /*<<< orphan*/);
int /*<<< orphan*/ my_putchar(char);
int main(int ac, char **av) {
  if (ac > 1) {
    my_put_nbr(eval_expr(av[1]));
    my_putchar('\n');
  }
  return (0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x1,-0x8(%rbp)
jle    116e <main+0x3e>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1050 <eval_expr@plt>
mov    %eax,%edi
call   1030 <my_put_nbr@plt>
mov    $0xa,%edi
call   1040 <my_putchar@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
cmp    $0x2,%edi
jl     1154 <main+0x24>
push   %rax
mov    0x8(%rsi),%rdi
call   1050 <eval_expr@plt>
mov    %eax,%edi
call   1030 <my_put_nbr@plt>
mov    $0xa,%edi
call   1040 <my_putchar@plt>
add    $0x8,%rsp
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = load i32, i32* %4
%7 = icmp sgt i32 %6, 1
br i1 %7, label %8, label %15
8: ; preds = %2
%9 = load i8**, i8*** %5
%10 = getelementptr inbounds i8*, i8** %9, i64 1
%11 = load i8*, i8** %10
%12 = call i32 @eval_expr(i8* %11)
%13 = call i32 @my_put_nbr(i32 %12)
%14 = call i32 @my_putchar(i8 signext 10)
br label %15
15: ; preds = %8, %2
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp sgt i32 %0, 1
br i1 %3, label %4, label %10
4: ; preds = %2
%5 = getelementptr inbounds i8*, i8** %1, i64 1
%6 = load i8*, i8** %5
%7 = tail call i32 @eval_expr(i8* %6)
%8 = tail call i32 @my_put_nbr(i32 %7)
%9 = tail call i32 @my_putchar(i8 signext 10)
br label %10
10: ; preds = %4, %2
ret i32 0
}
void set_rounding_mode(uae_u32) {}


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

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

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

LLVM IR (-O2):
define void @set_rounding_mode(i32 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ delay_ms(int);
int /*<<< orphan*/ keydown(unsigned char);
int /*<<< orphan*/ keyup(unsigned char);
void keypress(unsigned char keycode) {
  keydown(keycode);
  delay_ms(50);
  keyup(keycode);
}


x86 assembly (clang, -O0):
<keypress>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%edi
call   1030 <keydown@plt>
mov    $0x32,%edi
call   1040 <delay_ms@plt>
movzbl -0x1(%rbp),%edi
call   1050 <keyup@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<keypress>:
push   %rbx
mov    %edi,%ebx
call   1030 <keydown@plt>
mov    $0x32,%edi
call   1040 <delay_ms@plt>
mov    %ebx,%edi
pop    %rbx
jmp    1050 <keyup@plt>

LLVM IR (-O0):
define void @keypress(i8 zeroext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = call i32 @keydown(i8 zeroext %3)
%5 = call i32 @delay_ms(i32 50)
%6 = load i8, i8* %2
%7 = call i32 @keyup(i8 zeroext %6)
ret void
}

LLVM IR (-O2):
define void @keypress(i8 zeroext %0) {
%2 = tail call i32 @keydown(i8 zeroext %0)
%3 = tail call i32 @delay_ms(i32 50)
%4 = tail call i32 @keyup(i8 zeroext %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fputc(char, int /*<<< orphan*/);
int fputs(char const *, int /*<<< orphan*/);
int /*<<< orphan*/ stdout;
int puts(const char *s) {
  int ret = fputs(s, stdout);
  fputc('\n', stdout);
  return ret + 1;
}


x86 assembly (clang, -O0):
<puts>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    0x2ea9(%rip),%rax
mov    (%rax),%esi
call   1030 <fputs@plt>
mov    %eax,-0xc(%rbp)
mov    0x2e98(%rip),%rax
mov    (%rax),%esi
mov    $0xa,%edi
call   1040 <fputc@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<puts>:
push   %r14
push   %rbx
push   %rax
mov    0x2eb5(%rip),%r14
mov    (%r14),%esi
call   1030 <fputs@plt>
mov    %eax,%ebx
mov    (%r14),%esi
mov    $0xa,%edi
call   1040 <fputc@plt>
add    $0x1,%ebx
mov    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@stdout = global i32 0
define i32 @puts(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = load i32, i32* @stdout
%6 = call i32 @fputs(i8* %4, i32 %5)
store i32 %6, i32* %3
%7 = load i32, i32* @stdout
%8 = call i32 @fputc(i8 signext 10, i32 %7)
%9 = load i32, i32* %3
%10 = add nsw i32 %9, 1
ret i32 %10
}

LLVM IR (-O2):
@stdout = global i32 0
define i32 @puts(i8* %0) {
%2 = load i32, i32* @stdout
%3 = tail call i32 @fputs(i8* %0, i32 %2)
%4 = load i32, i32* @stdout
%5 = tail call i32 @fputc(i8 signext 10, i32 %4)
%6 = add nsw i32 %3, 1
ret i32 %6
}
float truncf(float x) { return 0.0; }


x86 assembly (clang, -O0):
<truncf>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
xorps  %xmm0,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<truncf>:
xorps  %xmm0,%xmm0
ret

LLVM IR (-O0):
define float @truncf(float %0) {
%2 = alloca float
store float %0, float* %2
ret float 0.000000e+00
}

LLVM IR (-O2):
define float @truncf(float %0) {
ret float 0.000000e+00
}
long round_(long double value) {
  long intpart;
  intpart = value;
  value = value - intpart;
  if (value >= 0.5)
    intpart++;
  return intpart;
}


x86 assembly (clang, -O0):
<round_>:
push   %rbp
mov    %rsp,%rbp
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
fldt   -0x10(%rbp)
fnstcw -0x2a(%rbp)
movzwl -0x2a(%rbp),%eax
or     $0xc00,%eax
mov    %ax,-0x2c(%rbp)
fldcw  -0x2c(%rbp)
fistpll -0x28(%rbp)
fldcw  -0x2a(%rbp)
mov    -0x28(%rbp),%rax
mov    %rax,-0x18(%rbp)
fldt   -0x10(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x20(%rbp)
fildll -0x20(%rbp)
fsubrp %st,%st(1)
fstpt  -0x10(%rbp)
fldt   -0x10(%rbp)
flds   0xeb6(%rip)
fxch   %st(1)
fucomip %st(1),%st
fstp   %st(0)
jb     1167 <round_+0x67>
jmp    115b <round_+0x5b>
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<round_>:
fldt   0x8(%rsp)
fnstcw -0x14(%rsp)
movzwl -0x14(%rsp),%eax
or     $0xc00,%eax
mov    %ax,-0x12(%rsp)
fldcw  -0x12(%rsp)
fld    %st(0)
fistpll -0x10(%rsp)
fldcw  -0x14(%rsp)
mov    -0x10(%rsp),%rax
mov    %rax,-0x8(%rsp)
fildll -0x8(%rsp)
fsubrp %st,%st(1)
flds   0xec5(%rip)
fxch   %st(1)
fucomip %st(1),%st
fstp   %st(0)
sbb    $0xffffffffffffffff,%rax
ret

LLVM IR (-O0):
define i64 @round_(x86_fp80 %0) {
%2 = alloca x86_fp80
%3 = alloca i64
store x86_fp80 %0, x86_fp80* %2
%4 = load x86_fp80, x86_fp80* %2
%5 = fptosi x86_fp80 %4 to i64
store i64 %5, i64* %3
%6 = load x86_fp80, x86_fp80* %2
%7 = load i64, i64* %3
%8 = sitofp i64 %7 to x86_fp80
%9 = fsub x86_fp80 %6, %8
store x86_fp80 %9, x86_fp80* %2
%10 = load x86_fp80, x86_fp80* %2
%11 = fcmp oge x86_fp80 %10, 0xK3FFE8000000000000000
br i1 %11, label %12, label %15
12: ; preds = %1
%13 = load i64, i64* %3
%14 = add nsw i64 %13, 1
store i64 %14, i64* %3
br label %15
15: ; preds = %12, %1
%16 = load i64, i64* %3
ret i64 %16
}

LLVM IR (-O2):
define i64 @round_(x86_fp80 %0) {
%2 = fptosi x86_fp80 %0 to i64
%3 = sitofp i64 %2 to x86_fp80
%4 = fsub x86_fp80 %0, %3
%5 = fcmp oge x86_fp80 %4, 0xK3FFE8000000000000000
%6 = zext i1 %5 to i64
%7 = add nsw i64 %6, %2
ret i64 %7
}
/* Type definitions */
struct noacq_workspace {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int start_acq(struct noacq_workspace *ws) {
  printf("noacq_start_acq\n");
  return 1;
}


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

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

LLVM IR (-O0):
%struct.noacq_workspace = type { i32 }
@.str = [17 x i8] c"noacq_start_acq\0A\00"
define i32 @start_acq(%struct.noacq_workspace* %0) {
%2 = alloca %struct.noacq_workspace*
store %struct.noacq_workspace* %0, %struct.noacq_workspace** %2
%3 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
ret i32 1
}

LLVM IR (-O2):
%struct.noacq_workspace = type { i32 }
@str = [16 x i8] c"noacq_start_acq\00"
define i32 @start_acq(%struct.noacq_workspace* nocapture readnone %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @str, i64 0, i64 0))
ret i32 1
}
/* Type definitions */
typedef int /*<<< orphan*/ fexcept_t;

/* Variables and functions */
int fegetexceptflag(fexcept_t *flagp, int excepts) { return -1; }


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

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

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

LLVM IR (-O2):
define i32 @fegetexceptflag(i32* nocapture readnone %0, i32 %1) {
ret i32 -1
}
void filter_ff(char *ptr) {
  while (*ptr) {
    if (*(unsigned char *)ptr == 0xff)
      *ptr = ' ';
    ptr++;
  }
  return;
}


x86 assembly (clang, -O0):
<filter_ff>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     113f <filter_ff+0x3f>
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
cmp    $0xff,%eax
jne    112e <filter_ff+0x2e>
mov    -0x8(%rbp),%rax
movb   $0x20,(%rax)
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1108 <filter_ff+0x8>
pop    %rbp
ret

x86 assembly (clang, -O2):
<filter_ff>:
jmp    1117 <filter_ff+0x17>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movb   $0x20,(%rdi)
add    $0x1,%rdi
movzbl (%rdi),%eax
cmp    $0xff,%al
je     1110 <filter_ff+0x10>
test   %al,%al
jne    1113 <filter_ff+0x13>
ret

LLVM IR (-O0):
define void @filter_ff(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
br label %3
3: ; preds = %14, %1
%4 = load i8*, i8** %2
%5 = load i8, i8* %4
%6 = icmp ne i8 %5, 0
br i1 %6, label %7, label %17
7: ; preds = %3
%8 = load i8*, i8** %2
%9 = load i8, i8* %8
%10 = zext i8 %9 to i32
%11 = icmp eq i32 %10, 255
br i1 %11, label %12, label %14
12: ; preds = %7
%13 = load i8*, i8** %2
store i8 32, i8* %13
br label %14
14: ; preds = %12, %7
%15 = load i8*, i8** %2
%16 = getelementptr inbounds i8, i8* %15, i32 1
store i8* %16, i8** %2
br label %3
17: ; preds = %3
ret void
}

LLVM IR (-O2):
define void @filter_ff(i8* nocapture %0) {
br label %2
2: ; preds = %6, %1
%3 = phi i8* [ %0, %1 ], [ %7, %6 ]
%4 = load i8, i8* %3
switch i8 %4, label %6 [
i8 0, label %8
i8 -1, label %5
]
5: ; preds = %2
store i8 32, i8* %3
br label %6
6: ; preds = %2, %5
%7 = getelementptr inbounds i8, i8* %3, i64 1
br label %2
8: ; preds = %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void hello(void) { printf("Hello world.\n"); }


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

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

LLVM IR (-O0):
@.str = [14 x i8] c"Hello world.\0A\00"
define void @hello() {
%1 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [13 x i8] c"Hello world.\00"
define void @hello() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int foo(int);
int fn_22(void) {
  int err = 0;
  do {
    err = foo(0);
    if (err)
      goto out;
  } while (0);
  do {
    err = foo(1);
    if (err)
      foo(2);
    else
      foo(3);
    foo(4);
  } while (0);
out:
  return err;
}


x86 assembly (clang, -O0):
<fn_22>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
xor    %edi,%edi
call   1030 <foo@plt>
mov    %eax,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     1138 <fn_22+0x28>
jmp    1181 <fn_22+0x71>
jmp    113d <fn_22+0x2d>
jmp    1142 <fn_22+0x32>
mov    $0x1,%edi
call   1030 <foo@plt>
mov    %eax,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     1168 <fn_22+0x58>
mov    $0x2,%edi
call   1030 <foo@plt>
jmp    1172 <fn_22+0x62>
mov    $0x3,%edi
call   1030 <foo@plt>
mov    $0x4,%edi
call   1030 <foo@plt>
jmp    1181 <fn_22+0x71>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fn_22>:
push   %rbx
xor    %edi,%edi
call   1030 <foo@plt>
mov    %eax,%ebx
test   %eax,%eax
jne    1144 <fn_22+0x34>
mov    $0x1,%edi
call   1030 <foo@plt>
mov    %eax,%ebx
xor    %edi,%edi
test   %eax,%eax
sete   %dil
or     $0x2,%edi
call   1030 <foo@plt>
mov    $0x4,%edi
call   1030 <foo@plt>
mov    %ebx,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @fn_22() {
%1 = tail call i32 @foo(i32 0)
%2 = icmp eq i32 %1, 0
br i1 %2, label %3, label %9
3: ; preds = %0
%4 = tail call i32 @foo(i32 1)
%5 = icmp eq i32 %4, 0
%6 = select i1 %5, i32 3, i32 2
%7 = tail call i32 @foo(i32 %6)
%8 = tail call i32 @foo(i32 4)
br label %9
9: ; preds = %0, %3
%10 = phi i32 [ %1, %0 ], [ %4, %3 ]
ret i32 %10
}
int calPontos(int numGanhoM, int numGanhoJ) {
  int max = numGanhoJ > numGanhoM ? numGanhoJ : numGanhoM;
  if (max == 5) {
    return 5;
  } else if (max == 4) {
    return 3;
  } else if (max == 3) {
    return 1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<calPontos>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
jle    1121 <calPontos+0x21>
mov    -0xc(%rbp),%eax
mov    %eax,-0x14(%rbp)
jmp    1127 <calPontos+0x27>
mov    -0x8(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,-0x10(%rbp)
cmpl   $0x5,-0x10(%rbp)
jne    1143 <calPontos+0x43>
movl   $0x5,-0x4(%rbp)
jmp    1180 <calPontos+0x80>
cmpl   $0x4,-0x10(%rbp)
jne    1159 <calPontos+0x59>
movl   $0x3,-0x4(%rbp)
jmp    1180 <calPontos+0x80>
cmpl   $0x3,-0x10(%rbp)
jne    116f <calPontos+0x6f>
movl   $0x1,-0x4(%rbp)
jmp    1180 <calPontos+0x80>
jmp    1174 <calPontos+0x74>
jmp    1179 <calPontos+0x79>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<calPontos>:
cmp    %edi,%esi
cmovg  %esi,%edi
lea    -0x3(%rdi),%eax
xor    %ecx,%ecx
cmp    $0x3,%eax
lea    -0x5(%rdi,%rdi,1),%eax
cmovae %ecx,%eax
ret

LLVM IR (-O0):
define i32 @calPontos(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
%7 = load i32, i32* %5
%8 = load i32, i32* %4
%9 = icmp sgt i32 %7, %8
br i1 %9, label %10, label %12
10: ; preds = %2
%11 = load i32, i32* %5
br label %14
12: ; preds = %2
%13 = load i32, i32* %4
br label %14
14: ; preds = %12, %10
%15 = phi i32 [ %11, %10 ], [ %13, %12 ]
store i32 %15, i32* %6
%16 = load i32, i32* %6
%17 = icmp eq i32 %16, 5
br i1 %17, label %18, label %19
18: ; preds = %14
store i32 5, i32* %3
br label %30
19: ; preds = %14
%20 = load i32, i32* %6
%21 = icmp eq i32 %20, 4
br i1 %21, label %22, label %23
22: ; preds = %19
store i32 3, i32* %3
br label %30
23: ; preds = %19
%24 = load i32, i32* %6
%25 = icmp eq i32 %24, 3
br i1 %25, label %26, label %27
26: ; preds = %23
store i32 1, i32* %3
br label %30
27: ; preds = %23
br label %28
28: ; preds = %27
br label %29
29: ; preds = %28
store i32 0, i32* %3
br label %30
30: ; preds = %29, %26, %22, %18
%31 = load i32, i32* %3
ret i32 %31
}

LLVM IR (-O2):
define i32 @calPontos(i32 %0, i32 %1) {
%3 = icmp sgt i32 %1, %0
%4 = select i1 %3, i32 %1, i32 %0
%5 = add i32 %4, -3
%6 = icmp ult i32 %5, 3
%7 = shl i32 %5, 1
%8 = or i32 %7, 1
%9 = select i1 %6, i32 %8, i32 0
ret i32 %9
}
void bl1_arch_setup(void) {}


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

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

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

LLVM IR (-O2):
define void @bl1_arch_setup() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fatal(char *);
scalar_t__ options_get_int(char *);
void options_sanity_check() {
  if (options_get_int("Prebuffering") > options_get_int("InputBuffer"))
    fatal("Prebuffering is set to a value greater than "
          "InputBuffer.");
}


x86 assembly (clang, -O0):
<options_sanity_check>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xed1(%rip),%rdi
call   1030 <options_get_int@plt>
mov    %rax,-0x8(%rbp)
lea    0xece(%rip),%rdi
call   1030 <options_get_int@plt>
mov    %rax,%rcx
mov    -0x8(%rbp),%rax
cmp    %rcx,%rax
jle    1160 <options_sanity_check+0x40>
lea    0xebe(%rip),%rdi
call   1040 <fatal@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<options_sanity_check>:
push   %rbx
lea    0xed8(%rip),%rdi
call   1030 <options_get_int@plt>
mov    %rax,%rbx
lea    0xed6(%rip),%rdi
call   1030 <options_get_int@plt>
cmp    %rax,%rbx
jle    114e <options_sanity_check+0x2e>
lea    0xed1(%rip),%rdi
pop    %rbx
jmp    1040 <fatal@plt>
pop    %rbx
ret

LLVM IR (-O0):
@.str = [13 x i8] c"Prebuffering\00"
@.str.1 = [12 x i8] c"InputBuffer\00"
@.str.2 = [57 x i8] c"Prebuffering is set to a value greater than InputBuffer.\00"
define void @options_sanity_check() {
%1 = call i64 @options_get_int(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
%2 = call i64 @options_get_int(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0))
%3 = icmp sgt i64 %1, %2
br i1 %3, label %4, label %6
4: ; preds = %0
%5 = call i32 @fatal(i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str.2, i64 0, i64 0))
br label %6
6: ; preds = %4, %0
ret void
}

LLVM IR (-O2):
@.str = [13 x i8] c"Prebuffering\00"
@.str.1 = [12 x i8] c"InputBuffer\00"
@.str.2 = [57 x i8] c"Prebuffering is set to a value greater than InputBuffer.\00"
define void @options_sanity_check() {
%1 = tail call i64 @options_get_int(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
%2 = tail call i64 @options_get_int(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0))
%3 = icmp sgt i64 %1, %2
br i1 %3, label %4, label %6
4: ; preds = %0
%5 = tail call i32 @fatal(i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str.2, i64 0, i64 0))
br label %6
6: ; preds = %4, %0
ret void
}
void dstacktrace_fd(int fd) {}


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

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

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

LLVM IR (-O2):
define void @dstacktrace_fd(i32 %0) {
ret void
}