xunge/DecIR huggingface dataset:
int SetSockOpt(fd, level, option, yesno)
int fd, level, option, yesno;
{ return setsockopt(fd, level, option, (char *)&yesno, sizeof yesno); }


x86 assembly (clang, -O0):
<SetSockOpt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
lea    -0x10(%rbp),%rcx
mov    $0x4,%r8d
mov    $0x0,%al
call   1030 <setsockopt@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<SetSockOpt>:
push   %rax
mov    %ecx,0x4(%rsp)
lea    0x4(%rsp),%rcx
mov    $0x4,%r8d
xor    %eax,%eax
call   1030 <setsockopt@plt>
pop    %rcx
ret

LLVM IR (-O0):
define i32 @SetSockOpt(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i32 %3, i32* %8
%9 = load i32, i32* %5
%10 = load i32, i32* %6
%11 = load i32, i32* %7
%12 = bitcast i32* %8 to i8*
%13 = call i32 (i32, i32, i32, i8*, i64, ...) bitcast (i32 (...)* @setsockopt to i32 (i32, i32, i32, i8*, i64, ...)*)(i32 %9, i32 %10, i32 %11, i8* %12, i64 4)
ret i32 %13
}

LLVM IR (-O2):
define i32 @SetSockOpt(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca i32
store i32 %3, i32* %5
%6 = bitcast i32* %5 to i8*
%7 = call i32 (i32, i32, i32, i8*, i64, ...) bitcast (i32 (...)* @setsockopt to i32 (i32, i32, i32, i8*, i64, ...)*)(i32 %0, i32 %1, i32 %2, i8* %6, i64 4)
ret i32 %7
}
/* Variables and functions */
unsigned long i2c_SetSpeed(int /*<<< orphan*/, int, unsigned long);
unsigned long i2c0_SetSpeed(int mode, unsigned long bps) {
  return i2c_SetSpeed(0, mode, bps);
}


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

x86 assembly (clang, -O2):
<i2c0_SetSpeed>:
mov    %rsi,%rdx
mov    %edi,%esi
xor    %edi,%edi
jmp    1030 <i2c_SetSpeed@plt>

LLVM IR (-O0):
define i64 @i2c0_SetSpeed(i32 %0, i64 %1) {
%3 = alloca i32
%4 = alloca i64
store i32 %0, i32* %3
store i64 %1, i64* %4
%5 = load i32, i32* %3
%6 = load i64, i64* %4
%7 = call i64 @i2c_SetSpeed(i32 0, i32 %5, i64 %6)
ret i64 %7
}

LLVM IR (-O2):
define i64 @i2c0_SetSpeed(i32 %0, i64 %1) {
%3 = tail call i64 @i2c_SetSpeed(i32 0, i32 %0, i64 %1)
ret i64 %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *, int);
void lcd_write_byte(char c) {
  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",
         22);
}


x86 assembly (clang, -O0):
<lcd_write_byte>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
lea    0xedb(%rip),%rdi
lea    0xedb(%rip),%rsi
mov    $0x16,%edx
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<lcd_write_byte>:
lea    0xee9(%rip),%rdi
lea    0xee9(%rip),%rsi
mov    $0x16,%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_byte(i8 signext %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 22)
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_byte(i8 signext %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 22)
ret void
}
void OPENSSL_cleanse(void) {}


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

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

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

LLVM IR (-O2):
define void @OPENSSL_cleanse() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ popNarray(char *, unsigned int);
void poppointer8array(void *x, int n) {
  popNarray((char *)x, (unsigned int)(n * 8));
}


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

x86 assembly (clang, -O2):
<poppointer8array>:
shl    $0x3,%esi
jmp    1030 <popNarray@plt>

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

LLVM IR (-O2):
define void @poppointer8array(i8* %0, i32 %1) {
%3 = shl nsw i32 %1, 3
%4 = tail call i32 @popNarray(i8* %0, i32 %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isprint(int);
void t_isprint_0xce() {
  Assert_real((isprint(206) == 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_isprint.c",
              1035, ("isprint should be 0 for 0xce"));
}


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

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

LLVM IR (-O0):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isprint.c\00"
@.str.1 = [29 x i8] c"isprint should be 0 for 0xce\00"
define void @t_isprint_0xce() {
%1 = call i64 @isprint(i32 206)
%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 1035, 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_isprint.c\00"
@.str.1 = [29 x i8] c"isprint should be 0 for 0xce\00"
define void @t_isprint_0xce() {
%1 = tail call i64 @isprint(i32 206)
%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 1035, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
char const *event_get_version();
const char *tor_libevent_get_version_str(void) { return event_get_version(); }


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

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

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

LLVM IR (-O2):
define i8* @tor_libevent_get_version_str() {
%1 = tail call i8* (...) @event_get_version()
ret i8* %1
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ perror(char *);
void __attribute__((noreturn)) sp_die(char *msg) {
  perror(msg);
  exit(1);
}


x86 assembly (clang, -O0):
<sp_die>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <perror@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<sp_die>:
push   %rax
call   1030 <perror@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

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

LLVM IR (-O2):
define void @sp_die(i8* nocapture %0) {
%2 = tail call i32 @perror(i8* %0)
%3 = tail call i32 @exit(i32 1)
unreachable
}
void save_state(vec, a, b, c, d, e) int vec[5];
int a, b, c, d, e;
{
  vec[0] = a;
  vec[1] = b;
  vec[2] = c;
  vec[3] = d;
  vec[4] = e;
}


x86 assembly (clang, -O0):
<save_state>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    %r8d,-0x18(%rbp)
mov    %r9d,-0x1c(%rbp)
mov    -0xc(%rbp),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x10(%rbp),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,0x4(%rax)
mov    -0x14(%rbp),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,0x8(%rax)
mov    -0x18(%rbp),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,0xc(%rax)
mov    -0x1c(%rbp),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,0x10(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<save_state>:
mov    %esi,(%rdi)
mov    %edx,0x4(%rdi)
mov    %ecx,0x8(%rdi)
mov    %r8d,0xc(%rdi)
mov    %r9d,0x10(%rdi)
ret

LLVM IR (-O0):
define void @save_state(i32* %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5) {
%7 = alloca i32*
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
store i32* %0, i32** %7
store i32 %1, i32* %8
store i32 %2, i32* %9
store i32 %3, i32* %10
store i32 %4, i32* %11
store i32 %5, i32* %12
%13 = load i32, i32* %8
%14 = load i32*, i32** %7
%15 = getelementptr inbounds i32, i32* %14, i64 0
store i32 %13, i32* %15
%16 = load i32, i32* %9
%17 = load i32*, i32** %7
%18 = getelementptr inbounds i32, i32* %17, i64 1
store i32 %16, i32* %18
%19 = load i32, i32* %10
%20 = load i32*, i32** %7
%21 = getelementptr inbounds i32, i32* %20, i64 2
store i32 %19, i32* %21
%22 = load i32, i32* %11
%23 = load i32*, i32** %7
%24 = getelementptr inbounds i32, i32* %23, i64 3
store i32 %22, i32* %24
%25 = load i32, i32* %12
%26 = load i32*, i32** %7
%27 = getelementptr inbounds i32, i32* %26, i64 4
store i32 %25, i32* %27
ret void
}

LLVM IR (-O2):
define void @save_state(i32* nocapture writeonly %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5) {
store i32 %1, i32* %0
%7 = getelementptr inbounds i32, i32* %0, i64 1
store i32 %2, i32* %7
%8 = getelementptr inbounds i32, i32* %0, i64 2
store i32 %3, i32* %8
%9 = getelementptr inbounds i32, i32* %0, i64 3
store i32 %4, i32* %9
%10 = getelementptr inbounds i32, i32* %0, i64 4
store i32 %5, i32* %10
ret void
}
/* Variables and functions */
double rand_beebs();
long TestingMostlyAscending(long index, long total) {
  return index + rand_beebs() * 1.0 / ((1U << 15) - 1) * 5 - 2.5;
}


x86 assembly (clang, -O0):
<TestingMostlyAscending>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cvtsi2sdq -0x8(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
mov    $0x0,%al
call   1030 <rand_beebs@plt>
movsd  -0x18(%rbp),%xmm1
movsd  0xed9(%rip),%xmm2
mulsd  %xmm2,%xmm0
movsd  0xec5(%rip),%xmm2
divsd  %xmm2,%xmm0
movsd  0xeb1(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  0xe99(%rip),%xmm1
subsd  %xmm1,%xmm0
cvttsd2si %xmm0,%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<TestingMostlyAscending>:
push   %rax
cvtsi2sd %rdi,%xmm0
movsd  %xmm0,(%rsp)
xor    %eax,%eax
call   1030 <rand_beebs@plt>
divsd  0xed6(%rip),%xmm0
mulsd  0xed6(%rip),%xmm0
addsd  (%rsp),%xmm0
addsd  0xed1(%rip),%xmm0
cvttsd2si %xmm0,%rax
pop    %rcx
ret

LLVM IR (-O0):
define i64 @TestingMostlyAscending(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %3
%6 = sitofp i64 %5 to double
%7 = call double (...) @rand_beebs()
%8 = fmul double %7, 1.000000e+00
%9 = fdiv double %8, 3.276700e+04
%10 = call double @llvm.fmuladd.f64(double %9, double 5.000000e+00, double %6)
%11 = fsub double %10, 2.500000e+00
%12 = fptosi double %11 to i64
ret i64 %12
}

LLVM IR (-O2):
define i64 @TestingMostlyAscending(i64 %0, i64 %1) {
%3 = sitofp i64 %0 to double
%4 = tail call double (...) @rand_beebs()
%5 = fdiv double %4, 3.276700e+04
%6 = tail call double @llvm.fmuladd.f64(double %5, double 5.000000e+00, double %3)
%7 = fadd double %6, -2.500000e+00
%8 = fptosi double %7 to i64
ret i64 %8
}
/* Variables and functions */
char *getenv(char const *);
char *g_getenv(const char *name) { return getenv(name); }


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

x86 assembly (clang, -O2):
<g_getenv>:
jmp    1030 <getenv@plt>

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

LLVM IR (-O2):
define i8* @g_getenv(i8* nocapture %0) {
%2 = tail call i8* @getenv(i8* %0)
ret i8* %2
}
/* Variables and functions */
int /*<<< orphan*/ debug_print(char *, char *, int);
int read(int /*<<< orphan*/, char *, int);
int layer1_read(char *b) {
  if (read(0, b, 1) != 1) {
    return -1;
  } else {
    debug_print("layer1_read", b, 1);
    return 1;
  }
}


x86 assembly (clang, -O0):
<layer1_read>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rsi
xor    %edi,%edi
mov    $0x1,%edx
call   1030 <read@plt>
cmp    $0x1,%eax
je     1151 <layer1_read+0x31>
movl   $0xffffffff,-0x4(%rbp)
jmp    116d <layer1_read+0x4d>
mov    -0x10(%rbp),%rsi
lea    0xea4(%rip),%rdi
mov    $0x1,%edx
call   1040 <debug_print@plt>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<layer1_read>:
push   %rbx
mov    %rdi,%rbx
xor    %edi,%edi
mov    %rbx,%rsi
mov    $0x1,%edx
call   1030 <read@plt>
mov    %eax,%ecx
mov    $0xffffffff,%eax
cmp    $0x1,%ecx
jne    1158 <layer1_read+0x38>
lea    0xeba(%rip),%rdi
mov    %rbx,%rsi
mov    $0x1,%edx
call   1040 <debug_print@plt>
mov    $0x1,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [12 x i8] c"layer1_read\00"
define i32 @layer1_read(i8* %0) {
%2 = tail call i32 @read(i32 0, i8* %0, i32 1)
%3 = icmp eq i32 %2, 1
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 @debug_print(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* %0, i32 1)
br label %6
6: ; preds = %1, %4
%7 = phi i32 [ 1, %4 ], [ -1, %1 ]
ret i32 %7
}
double mu_Ven(double x) { return ((x * x + 2 * x) / (x * x + x + 2)); }


x86 assembly (clang, -O0):
<mu_Ven>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x8(%rbp),%xmm2
movsd  0xee5(%rip),%xmm1
mulsd  -0x8(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  -0x8(%rbp),%xmm1
movsd  -0x8(%rbp),%xmm3
movsd  -0x8(%rbp),%xmm2
mulsd  %xmm3,%xmm1
addsd  %xmm2,%xmm1
movsd  0xeb9(%rip),%xmm2
addsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<mu_Ven>:
movapd %xmm0,%xmm1
addsd  %xmm0,%xmm1
movapd %xmm0,%xmm2
mulsd  %xmm0,%xmm2
addsd  %xmm2,%xmm1
addsd  %xmm0,%xmm2
addsd  0xee0(%rip),%xmm2
divsd  %xmm2,%xmm1
movapd %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @mu_Ven(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = load double, double* %2
%5 = load double, double* %2
%6 = fmul double 2.000000e+00, %5
%7 = call double @llvm.fmuladd.f64(double %3, double %4, double %6)
%8 = load double, double* %2
%9 = load double, double* %2
%10 = load double, double* %2
%11 = call double @llvm.fmuladd.f64(double %8, double %9, double %10)
%12 = fadd double %11, 2.000000e+00
%13 = fdiv double %7, %12
ret double %13
}

LLVM IR (-O2):
define double @mu_Ven(double %0) {
%2 = fmul double %0, 2.000000e+00
%3 = tail call double @llvm.fmuladd.f64(double %0, double %0, double %2)
%4 = tail call double @llvm.fmuladd.f64(double %0, double %0, double %0)
%5 = fadd double %4, 2.000000e+00
%6 = fdiv double %3, %5
ret double %6
}
void call2i(char c1, float f1, char c2, char c3, double d1, char c4, char c5,
            char c6, float f2, short s, char c7, double d2) {
  c1 = 'a';
  f1 = 0.0;
  c2 = 5;
  d1 = 0.0;
  c3 = 6;
  f2 = 0.1;
  c4 = 7;
  d2 = 0.2;
  c5 = 's';
  c6 = 'f';
  c7 = 'z';
  s = 77;
}


x86 assembly (clang, -O0):
<call2i>:
push   %rbp
mov    %rsp,%rbp
mov    %r8d,-0x38(%rbp)
mov    %ecx,%eax
mov    -0x38(%rbp),%ecx
mov    %eax,-0x34(%rbp)
mov    %edx,%eax
mov    -0x34(%rbp),%edx
mov    %eax,-0x30(%rbp)
mov    %esi,%eax
mov    -0x30(%rbp),%esi
mov    %eax,-0x2c(%rbp)
mov    %edi,%r8d
mov    -0x2c(%rbp),%edi
mov    %r9b,%al
mov    0x18(%rbp),%r9b
mov    0x10(%rbp),%r9w
mov    %r8b,-0x1(%rbp)
movss  %xmm0,-0x8(%rbp)
mov    %dil,-0x9(%rbp)
mov    %sil,-0xa(%rbp)
movsd  %xmm1,-0x18(%rbp)
mov    %dl,-0x19(%rbp)
mov    %cl,-0x1a(%rbp)
mov    %al,-0x1b(%rbp)
movss  %xmm2,-0x20(%rbp)
movsd  %xmm3,-0x28(%rbp)
movb   $0x61,-0x1(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0x8(%rbp)
movb   $0x5,-0x9(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x18(%rbp)
movb   $0x6,-0xa(%rbp)
movss  0xe89(%rip),%xmm0
movss  %xmm0,-0x20(%rbp)
movb   $0x7,-0x19(%rbp)
movsd  0xe70(%rip),%xmm0
movsd  %xmm0,-0x28(%rbp)
movb   $0x73,-0x1a(%rbp)
movb   $0x66,-0x1b(%rbp)
movb   $0x7a,0x18(%rbp)
movw   $0x4d,0x10(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @call2i(i8 signext %0, float %1, i8 signext %2, i8 signext %3, double %4, i8 signext %5, i8 signext %6, i8 signext %7, float %8, i16 signext %9, i8 signext %10, double %11) {
%13 = alloca i8
%14 = alloca float
%15 = alloca i8
%16 = alloca i8
%17 = alloca double
%18 = alloca i8
%19 = alloca i8
%20 = alloca i8
%21 = alloca float
%22 = alloca i16
%23 = alloca i8
%24 = alloca double
store i8 %0, i8* %13
store float %1, float* %14
store i8 %2, i8* %15
store i8 %3, i8* %16
store double %4, double* %17
store i8 %5, i8* %18
store i8 %6, i8* %19
store i8 %7, i8* %20
store float %8, float* %21
store i16 %9, i16* %22
store i8 %10, i8* %23
store double %11, double* %24
store i8 97, i8* %13
store float 0.000000e+00, float* %14
store i8 5, i8* %15
store double 0.000000e+00, double* %17
store i8 6, i8* %16
store float 0x3FB99999A0000000, float* %21
store i8 7, i8* %18
store double 2.000000e-01, double* %24
store i8 115, i8* %19
store i8 102, i8* %20
store i8 122, i8* %23
store i16 77, i16* %22
ret void
}

LLVM IR (-O2):
define void @call2i(i8 signext %0, float %1, i8 signext %2, i8 signext %3, double %4, i8 signext %5, i8 signext %6, i8 signext %7, float %8, i16 signext %9, i8 signext %10, double %11) {
ret void
}
void hashCheckUndeclared(void) {}


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

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

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

LLVM IR (-O2):
define void @hashCheckUndeclared() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ srand(int /*<<< orphan*/);
int /*<<< orphan*/ time(int /*<<< orphan*/ *);
int /*<<< orphan*/ trainNN();
int main() {
  srand(time(NULL));
  trainNN();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
xor    %eax,%eax
mov    %eax,%edi
call   1040 <time@plt>
mov    %eax,%edi
call   1030 <srand@plt>
mov    $0x0,%al
call   1050 <trainNN@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %edi,%edi
call   1040 <time@plt>
mov    %eax,%edi
call   1030 <srand@plt>
xor    %eax,%eax
call   1050 <trainNN@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @time(i32* null)
%3 = call i32 @srand(i32 %2)
%4 = call i32 (...) @trainNN()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @time(i32* null)
%2 = tail call i32 @srand(i32 %1)
%3 = tail call i32 (...) @trainNN()
ret i32 0
}
unsigned short int f54(unsigned short int x, unsigned long int y) {
  return (x << ((-y) & (8 * 2 - 1))) ^ (x >> y);
}


x86 assembly (clang, -O0):
<f54>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
mov    %rsi,-0x10(%rbp)
movzwl -0x2(%rbp),%eax
xor    %ecx,%ecx
sub    -0x10(%rbp),%rcx
and    $0xf,%rcx
shl    %cl,%eax
movzwl -0x2(%rbp),%edx
mov    -0x10(%rbp),%rcx
sar    %cl,%edx
mov    %edx,%ecx
xor    %ecx,%eax
movzwl %ax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f54>:
mov    %esi,%ecx
neg    %cl
and    $0xf,%cl
mov    %edi,%eax
shl    %cl,%eax
mov    %esi,%ecx
shr    %cl,%edi
xor    %edi,%eax
ret

LLVM IR (-O0):
define zeroext i16 @f54(i16 zeroext %0, i64 %1) {
%3 = alloca i16
%4 = alloca i64
store i16 %0, i16* %3
store i64 %1, i64* %4
%5 = load i16, i16* %3
%6 = zext i16 %5 to i32
%7 = load i64, i64* %4
%8 = sub i64 0, %7
%9 = and i64 %8, 15
%10 = trunc i64 %9 to i32
%11 = shl i32 %6, %10
%12 = load i16, i16* %3
%13 = zext i16 %12 to i32
%14 = load i64, i64* %4
%15 = trunc i64 %14 to i32
%16 = ashr i32 %13, %15
%17 = xor i32 %11, %16
%18 = trunc i32 %17 to i16
ret i16 %18
}

LLVM IR (-O2):
define zeroext i16 @f54(i16 zeroext %0, i64 %1) {
%3 = zext i16 %0 to i32
%4 = trunc i64 %1 to i32
%5 = sub i32 0, %4
%6 = and i32 %5, 15
%7 = shl nuw nsw i32 %3, %6
%8 = lshr i32 %3, %4
%9 = xor i32 %7, %8
%10 = trunc i32 %9 to i16
ret i16 %10
}
void f(void) {
  long int li1 = 3L;
  int i1 = 7;
  short int si1 = 3;
  i1 = li1;
  li1 = i1;
  i1 = si1;
  si1 = i1;
  li1 = si1;
  si1 = li1;
}


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
movq   $0x3,-0x8(%rbp)
movl   $0x7,-0xc(%rbp)
movw   $0x3,-0xe(%rbp)
mov    -0x8(%rbp),%rax
mov    %eax,-0xc(%rbp)
movslq -0xc(%rbp),%rax
mov    %rax,-0x8(%rbp)
movswl -0xe(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %ax,-0xe(%rbp)
movswq -0xe(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %ax,-0xe(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @f() {
%1 = alloca i64
%2 = alloca i32
%3 = alloca i16
store i64 3, i64* %1
store i32 7, i32* %2
store i16 3, i16* %3
%4 = load i64, i64* %1
%5 = trunc i64 %4 to i32
store i32 %5, i32* %2
%6 = load i32, i32* %2
%7 = sext i32 %6 to i64
store i64 %7, i64* %1
%8 = load i16, i16* %3
%9 = sext i16 %8 to i32
store i32 %9, i32* %2
%10 = load i32, i32* %2
%11 = trunc i32 %10 to i16
store i16 %11, i16* %3
%12 = load i16, i16* %3
%13 = sext i16 %12 to i64
store i64 %13, i64* %1
%14 = load i64, i64* %1
%15 = trunc i64 %14 to i16
store i16 %15, i16* %3
ret void
}

LLVM IR (-O2):
define void @f() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ memset(void *, unsigned char, int);
void *append_byte(void *buffer_ptr, unsigned char byte) {
  memset(buffer_ptr, byte, 1);
  return buffer_ptr + 1;
}


x86 assembly (clang, -O0):
<append_byte>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %sil,%al
mov    %rdi,-0x8(%rbp)
mov    %al,-0x9(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x9(%rbp),%al
movzbl %al,%esi
mov    $0x1,%edx
call   1030 <memset@plt>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<append_byte>:
push   %rbx
mov    %rdi,%rbx
mov    $0x1,%edx
call   1030 <memset@plt>
add    $0x1,%rbx
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i8* @append_byte(i8* %0, i8 zeroext %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 @memset(i8* %5, i8 zeroext %6, i32 1)
%8 = load i8*, i8** %3
%9 = getelementptr i8, i8* %8, i64 1
ret i8* %9
}

LLVM IR (-O2):
define i8* @append_byte(i8* %0, i8 zeroext %1) {
%3 = tail call i32 @memset(i8* %0, i8 zeroext %1, i32 1)
%4 = getelementptr i8, i8* %0, i64 1
ret i8* %4
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ fflush(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, unsigned int);
void *malloc(unsigned int);
int /*<<< orphan*/ stderr;
void *Malloc(unsigned n) {
  void *p;
  if (!(p = malloc(n))) {
    fprintf(stderr, "Malloc(%d) failed.\n", n);
    fflush(stderr);
    abort();
  }
  return p;
}


x86 assembly (clang, -O0):
<Malloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1050 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmp    $0x0,%rax
jne    118e <Malloc+0x4e>
mov    0x2e78(%rip),%rax
mov    (%rax),%edi
mov    -0x4(%rbp),%edx
lea    0xe8c(%rip),%rsi
call   1040 <fprintf@plt>
mov    0x2e60(%rip),%rax
mov    (%rax),%edi
call   1060 <fflush@plt>
mov    $0x0,%al
call   1030 <abort@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Malloc>:
push   %r14
push   %rbx
push   %rax
mov    %edi,%ebx
call   1050 <malloc@plt>
test   %rax,%rax
je     1158 <Malloc+0x18>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret
mov    0x2e81(%rip),%r14
mov    (%r14),%edi
lea    0xe97(%rip),%rsi
mov    %ebx,%edx
call   1040 <fprintf@plt>
mov    (%r14),%edi
call   1060 <fflush@plt>
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [20 x i8] c"Malloc(%d) failed.\0A\00"
define i8* @Malloc(i32 %0) {
%2 = alloca i32
%3 = alloca i8*
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = call i8* @malloc(i32 %4)
store i8* %5, i8** %3
%6 = icmp ne i8* %5, null
br i1 %6, label %14, label %7
7: ; preds = %1
%8 = load i32, i32* @stderr
%9 = load i32, i32* %2
%10 = call i32 @fprintf(i32 %8, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i32 %9)
%11 = load i32, i32* @stderr
%12 = call i32 @fflush(i32 %11)
%13 = call i32 (...) @abort()
unreachable
14: ; preds = %1
%15 = load i8*, i8** %3
ret i8* %15
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [20 x i8] c"Malloc(%d) failed.\0A\00"
define noalias i8* @Malloc(i32 %0) {
%2 = tail call i8* @malloc(i32 %0)
%3 = icmp eq i8* %2, null
br i1 %3, label %4, label %10
4: ; preds = %1
%5 = load i32, i32* @stderr
%6 = tail call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i32 %0)
%7 = load i32, i32* @stderr
%8 = tail call i32 @fflush(i32 %7)
%9 = tail call i32 (...) @abort()
unreachable
10: ; preds = %1
ret i8* %2
}
/* Type definitions */
struct MPSegment {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ FreeMPSegment(struct MPSegment *);
void free_mp(struct MPSegment *handle) { FreeMPSegment(handle); }


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

x86 assembly (clang, -O2):
<free_mp>:
jmp    1030 <FreeMPSegment@plt>

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

LLVM IR (-O2):
%struct.MPSegment = type { i32 }
define void @free_mp(%struct.MPSegment* %0) {
%2 = tail call i32 @FreeMPSegment(%struct.MPSegment* %0)
ret void
}
int ld_blt_mr2(long double *a1, long double a2) {
  return !(__builtin_isless(*a1, a2));
}


x86 assembly (clang, -O0):
<ld_blt_mr2>:
push   %rbp
mov    %rsp,%rbp
fldt   0x10(%rbp)
mov    %rdi,-0x8(%rbp)
fstpt  -0x20(%rbp)
mov    -0x8(%rbp),%rax
fldt   (%rax)
fldt   -0x20(%rbp)
fucomip %st(1),%st
fstp   %st(0)
seta   %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ld_blt_mr2>:
fldt   0x8(%rsp)
fldt   (%rdi)
xor    %eax,%eax
fxch   %st(1)
fucomip %st(1),%st
fstp   %st(0)
setbe  %al
ret

LLVM IR (-O0):
define i32 @ld_blt_mr2(x86_fp80* %0, x86_fp80 %1) {
%3 = alloca x86_fp80*
%4 = alloca x86_fp80
store x86_fp80* %0, x86_fp80** %3
store x86_fp80 %1, x86_fp80* %4
%5 = load x86_fp80*, x86_fp80** %3
%6 = load x86_fp80, x86_fp80* %5
%7 = load x86_fp80, x86_fp80* %4
%8 = fcmp olt x86_fp80 %6, %7
%9 = xor i1 %8, true
%10 = zext i1 %9 to i32
ret i32 %10
}

LLVM IR (-O2):
define i32 @ld_blt_mr2(x86_fp80* nocapture %0, x86_fp80 %1) {
%3 = load x86_fp80, x86_fp80* %0
%4 = fcmp uge x86_fp80 %3, %1
%5 = zext i1 %4 to i32
ret i32 %5
}
/* Type definitions */
struct p9_handle {
  int dummy;
};

/* Variables and functions */
int p9l_cd(struct p9_handle *, char *);
int /*<<< orphan*/ printf(char *, char *, char *, int);
char *strerror(int);
int p9s_cd(struct p9_handle *p9_handle, char *arg) {
  int rc;
  rc = p9l_cd(p9_handle, arg);
  if (rc)
    printf("cd to %s failed, error: %s (%d)\n", arg, strerror(rc), rc);
  return rc;
}


x86 assembly (clang, -O0):
<p9s_cd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <p9l_cd@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
je     1180 <p9s_cd+0x50>
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x14(%rbp),%edi
call   1050 <strerror@plt>
mov    -0x20(%rbp),%rsi
mov    %rax,%rdx
mov    -0x14(%rbp),%ecx
lea    0xe85(%rip),%rdi
call   1040 <printf@plt>
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<p9s_cd>:
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rbx
call   1030 <p9l_cd@plt>
mov    %eax,%ebp
test   %eax,%eax
je     115c <p9s_cd+0x2c>
mov    %ebp,%edi
call   1050 <strerror@plt>
lea    0xeb1(%rip),%rdi
mov    %rbx,%rsi
mov    %rax,%rdx
mov    %ebp,%ecx
call   1040 <printf@plt>
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
%struct.p9_handle = type { i32 }
@.str = [33 x i8] c"cd to %s failed, error: %s (%d)\0A\00"
define i32 @p9s_cd(%struct.p9_handle* %0, i8* %1) {
%3 = alloca %struct.p9_handle*
%4 = alloca i8*
%5 = alloca i32
store %struct.p9_handle* %0, %struct.p9_handle** %3
store i8* %1, i8** %4
%6 = load %struct.p9_handle*, %struct.p9_handle** %3
%7 = load i8*, i8** %4
%8 = call i32 @p9l_cd(%struct.p9_handle* %6, i8* %7)
store i32 %8, i32* %5
%9 = load i32, i32* %5
%10 = icmp ne i32 %9, 0
br i1 %10, label %11, label %17
11: ; preds = %2
%12 = load i8*, i8** %4
%13 = load i32, i32* %5
%14 = call i8* @strerror(i32 %13)
%15 = load i32, i32* %5
%16 = call i32 @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0), i8* %12, i8* %14, i32 %15)
br label %17
17: ; preds = %11, %2
%18 = load i32, i32* %5
ret i32 %18
}

LLVM IR (-O2):
%struct.p9_handle = type { i32 }
@.str = [33 x i8] c"cd to %s failed, error: %s (%d)\0A\00"
define i32 @p9s_cd(%struct.p9_handle* %0, i8* %1) {
%3 = tail call i32 @p9l_cd(%struct.p9_handle* %0, i8* %1)
%4 = icmp eq i32 %3, 0
br i1 %4, label %8, label %5
5: ; preds = %2
%6 = tail call i8* @strerror(i32 %3)
%7 = tail call i32 @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0), i8* %1, i8* %6, i32 %3)
br label %8
8: ; preds = %5, %2
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ DeinitFields();
void SwitchFrom_87C800(void) { DeinitFields(); }


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

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

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

LLVM IR (-O2):
define void @SwitchFrom_87C800() {
%1 = tail call i32 (...) @DeinitFields()
ret void
}
int contrib_pixels(double scale) {
  return (int)(2.0 /
                   (scale >= 1.0
                        ? 1.0
                        : (((scale) > (((2.0 * 2) / ((1 << 3) - 1.01))))
                               ? (scale)
                               : (((2.0 * 2) / ((1 << 3) - 1.01))))) *
                   2 +
               1);
}


x86 assembly (clang, -O0):
<contrib_pixels>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  0xeea(%rip),%xmm1
ucomisd %xmm1,%xmm0
jb     1132 <contrib_pixels+0x32>
movsd  0xed8(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
jmp    1174 <contrib_pixels+0x74>
movsd  -0x8(%rbp),%xmm0
movsd  0xec9(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    1158 <contrib_pixels+0x58>
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
jmp    116a <contrib_pixels+0x6a>
movsd  0xea8(%rip),%xmm0
movsd  %xmm0,-0x18(%rbp)
jmp    116a <contrib_pixels+0x6a>
movsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm1
movsd  0xe8f(%rip),%xmm0
divsd  %xmm1,%xmm0
addsd  %xmm0,%xmm0
movsd  0xe6f(%rip),%xmm1
addsd  %xmm1,%xmm0
cvttsd2si %xmm0,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<contrib_pixels>:
ucomisd 0xef8(%rip),%xmm0
jb     1114 <contrib_pixels+0x14>
movsd  0xefe(%rip),%xmm1
jmp    1128 <contrib_pixels+0x28>
maxsd  0xeec(%rip),%xmm0
movsd  0xeec(%rip),%xmm1
divsd  %xmm0,%xmm1
addsd  %xmm1,%xmm1
addsd  0xecc(%rip),%xmm1
cvttsd2si %xmm1,%eax
ret

LLVM IR (-O0):
define i32 @contrib_pixels(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fcmp oge double %3, 1.000000e+00
br i1 %4, label %5, label %6
5: ; preds = %1
br label %14
6: ; preds = %1
%7 = load double, double* %2
%8 = fcmp ogt double %7, 0x3FE24FD6FB3D2962
br i1 %8, label %9, label %11
9: ; preds = %6
%10 = load double, double* %2
br label %12
11: ; preds = %6
br label %12
12: ; preds = %11, %9
%13 = phi double [ %10, %9 ], [ 0x3FE24FD6FB3D2962, %11 ]
br label %14
14: ; preds = %12, %5
%15 = phi double [ 1.000000e+00, %5 ], [ %13, %12 ]
%16 = fdiv double 2.000000e+00, %15
%17 = call double @llvm.fmuladd.f64(double %16, double 2.000000e+00, double 1.000000e+00)
%18 = fptosi double %17 to i32
ret i32 %18
}

LLVM IR (-O2):
define i32 @contrib_pixels(double %0) {
%2 = fcmp oge double %0, 1.000000e+00
%3 = fcmp ogt double %0, 0x3FE24FD6FB3D2962
%4 = select i1 %3, double %0, double 0x3FE24FD6FB3D2962
%5 = fdiv double 2.000000e+00, %4
%6 = select i1 %2, double 2.000000e+00, double %5
%7 = tail call double @llvm.fmuladd.f64(double %6, double 2.000000e+00, double 1.000000e+00)
%8 = fptosi double %7 to i32
ret i32 %8
}
void wrmsr(unsigned index, unsigned long long val) {
  unsigned a = val, d = val >> 32;
  asm volatile("wrmsr" : : "a"(a), "d"(d), "c"(index));
}


x86 assembly (clang, -O0):
<wrmsr>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rax
shr    $0x20,%rax
mov    %eax,-0x18(%rbp)
mov    -0x14(%rbp),%eax
mov    -0x18(%rbp),%edx
mov    -0x4(%rbp),%ecx
wrmsr
pop    %rbp
ret

x86 assembly (clang, -O2):
<wrmsr>:
mov    %rsi,%rax
mov    %edi,%ecx
mov    %rsi,%rdx
shr    $0x20,%rdx
wrmsr
ret

LLVM IR (-O0):
define void @wrmsr(i32 %0, i64 %1) {
%3 = alloca i32
%4 = alloca i64
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %3
store i64 %1, i64* %4
%7 = load i64, i64* %4
%8 = trunc i64 %7 to i32
store i32 %8, i32* %5
%9 = load i64, i64* %4
%10 = lshr i64 %9, 32
%11 = trunc i64 %10 to i32
store i32 %11, i32* %6
%12 = load i32, i32* %5
%13 = load i32, i32* %6
%14 = load i32, i32* %3
ret void
}

LLVM IR (-O2):
define void @wrmsr(i32 %0, i64 %1) {
%3 = trunc i64 %1 to i32
%4 = lshr i64 %1, 32
%5 = trunc i64 %4 to i32
tail call void asm sideeffect "wrmsr", "{ax},{dx},{cx},~{dirflag},~{fpsr},~{flags}"(i32 %3, i32 %5, i32 %0)
ret void
}
adrx0adr1(r0, r1, x0, x1, p0, p1) int r0, r1;
int *p0, *p1;
{
  if ((((int *)10000000)[x0]) <= (*((int *)11111111)))
    return 1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<adrx0adr1>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    %r8,-0x20(%rbp)
mov    %r9,-0x28(%rbp)
movslq -0x10(%rbp),%rcx
mov    $0x989680,%eax
mov    (%rax,%rcx,4),%eax
mov    $0xa98ac7,%ecx
cmp    (%rcx),%eax
jg     113d <adrx0adr1+0x3d>
movl   $0x1,-0x4(%rbp)
jmp    1144 <adrx0adr1+0x44>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<adrx0adr1>:
movslq %edx,%rax
mov    0x989680(,%rax,4),%ecx
xor    %eax,%eax
cmp    0xa98ac7,%ecx
setle  %al
ret

LLVM IR (-O0):
define i32 @adrx0adr1(i32 %0, i32 %1, i32 %2, i32 %3, i32* %4, i32* %5) {
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32*
%13 = alloca i32*
store i32 %0, i32* %8
store i32 %1, i32* %9
store i32 %2, i32* %10
store i32 %3, i32* %11
store i32* %4, i32** %12
store i32* %5, i32** %13
%14 = load i32, i32* %10
%15 = sext i32 %14 to i64
%16 = getelementptr inbounds i32, i32* inttoptr (i64 10000000 to i32*), i64 %15
%17 = load i32, i32* %16
%18 = load i32, i32* inttoptr (i64 11111111 to i32*)
%19 = icmp sle i32 %17, %18
br i1 %19, label %20, label %21
20: ; preds = %6
store i32 1, i32* %7
br label %22
21: ; preds = %6
store i32 0, i32* %7
br label %22
22: ; preds = %21, %20
%23 = load i32, i32* %7
ret i32 %23
}

LLVM IR (-O2):
define i32 @adrx0adr1(i32 %0, i32 %1, i32 %2, i32 %3, i32* nocapture readnone %4, i32* nocapture readnone %5) {
%7 = sext i32 %2 to i64
%8 = getelementptr inbounds i32, i32* inttoptr (i64 10000000 to i32*), i64 %7
%9 = load i32, i32* %8
%10 = load i32, i32* inttoptr (i64 11111111 to i32*)
%11 = icmp sle i32 %9, %10
%12 = zext i1 %11 to i32
ret i32 %12
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, long);
int /*<<< orphan*/ srpc_dump();
void *srpc_malloc(int);
int main() {
  void *p;
  long i;
  for (i = 0; (p = srpc_malloc(1000)) != NULL; i++)
    ;
  printf("allocated %ld kB\n", i);
  srpc_dump();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movq   $0x0,-0x18(%rbp)
mov    $0x3e8,%edi
call   1050 <srpc_malloc@plt>
mov    %rax,-0x10(%rbp)
cmp    $0x0,%rax
je     1175 <main+0x45>
jmp    1164 <main+0x34>
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    1147 <main+0x17>
mov    -0x18(%rbp),%rsi
lea    0xe80(%rip),%rdi
call   1040 <printf@plt>
mov    $0x0,%al
call   1030 <srpc_dump@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    $0xffffffffffffffff,%rbx
nopl   0x0(%rax,%rax,1)
mov    $0x3e8,%edi
call   1050 <srpc_malloc@plt>
add    $0x1,%rbx
test   %rax,%rax
jne    1140 <main+0x10>
lea    0xea6(%rip),%rdi
mov    %rbx,%rsi
call   1040 <printf@plt>
xor    %eax,%eax
call   1030 <srpc_dump@plt>
xor    %eax,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [18 x i8] c"allocated %ld kB\0A\00"
define i32 @main() {
br label %1
1: ; preds = %1, %0
%2 = phi i64 [ 0, %0 ], [ %5, %1 ]
%3 = tail call i8* @srpc_malloc(i32 1000)
%4 = icmp eq i8* %3, null
%5 = add nuw nsw i64 %2, 1
br i1 %4, label %6, label %1
6: ; preds = %1
%7 = tail call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i64 %2)
%8 = tail call i32 (...) @srpc_dump()
ret i32 0
}
void INT_Excep_EXDMAC_EXDMAC0I(void) {}


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

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

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

LLVM IR (-O2):
define void @INT_Excep_EXDMAC_EXDMAC0I() {
ret void
}
void clockevents_notify(unsigned long reason, void *arg) {}


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

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

LLVM IR (-O0):
define void @clockevents_notify(i64 %0, i8* %1) {
%3 = alloca i64
%4 = alloca i8*
store i64 %0, i64* %3
store i8* %1, i8** %4
ret void
}

LLVM IR (-O2):
define void @clockevents_notify(i64 %0, i8* nocapture %1) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ init_cond();
int /*<<< orphan*/ lax_wendroff();
int system(char *);
int main() {
  int ret_codes = 0;
  init_cond();
  lax_wendroff();
  ret_codes = system("../bin/plot_LW");
  ret_codes = system("../bin/plot_LW_last");
  return ret_codes;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    $0x0,%al
call   1050 <init_cond@plt>
mov    $0x0,%al
call   1040 <lax_wendroff@plt>
lea    0xea5(%rip),%rdi
call   1030 <system@plt>
mov    %eax,-0x8(%rbp)
lea    0xea5(%rip),%rdi
call   1030 <system@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1050 <init_cond@plt>
xor    %eax,%eax
call   1040 <lax_wendroff@plt>
lea    0xeba(%rip),%rdi
call   1030 <system@plt>
lea    0xebd(%rip),%rdi
pop    %rax
jmp    1030 <system@plt>

LLVM IR (-O0):
@.str = [15 x i8] c"../bin/plot_LW\00"
@.str.1 = [20 x i8] c"../bin/plot_LW_last\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
%3 = call i32 (...) @init_cond()
%4 = call i32 (...) @lax_wendroff()
%5 = call i32 @system(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
store i32 %5, i32* %2
%6 = call i32 @system(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0))
store i32 %6, i32* %2
%7 = load i32, i32* %2
ret i32 %7
}

LLVM IR (-O2):
@.str = [15 x i8] c"../bin/plot_LW\00"
@.str.1 = [20 x i8] c"../bin/plot_LW_last\00"
define i32 @main() {
%1 = tail call i32 (...) @init_cond()
%2 = tail call i32 (...) @lax_wendroff()
%3 = tail call i32 @system(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%4 = tail call i32 @system(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0))
ret i32 %4
}
void swr_get_delay() {}


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

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

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

LLVM IR (-O2):
define void @swr_get_delay() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ prnlog(char *);
int testBitStream();
int testReversedBitstream();
int testCipherUtils(void) {
  prnlog("[+] Testing some internals...");
  int retval = 0;
  retval |= testBitStream();
  retval |= testReversedBitstream();
  return retval;
}


x86 assembly (clang, -O0):
<testCipherUtils>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xec1(%rip),%rdi
call   1030 <prnlog@plt>
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1040 <testBitStream@plt>
or     -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    $0x0,%al
call   1050 <testReversedBitstream@plt>
or     -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<testCipherUtils>:
push   %rbx
lea    0xec8(%rip),%rdi
call   1030 <prnlog@plt>
xor    %eax,%eax
call   1040 <testBitStream@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1050 <testReversedBitstream@plt>
or     %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [30 x i8] c"[+] Testing some internals...\00"
define i32 @testCipherUtils() {
%1 = alloca i32
%2 = call i32 @prnlog(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0))
store i32 0, i32* %1
%3 = call i32 (...) @testBitStream()
%4 = load i32, i32* %1
%5 = or i32 %4, %3
store i32 %5, i32* %1
%6 = call i32 (...) @testReversedBitstream()
%7 = load i32, i32* %1
%8 = or i32 %7, %6
store i32 %8, i32* %1
%9 = load i32, i32* %1
ret i32 %9
}

LLVM IR (-O2):
@.str = [30 x i8] c"[+] Testing some internals...\00"
define i32 @testCipherUtils() {
%1 = tail call i32 @prnlog(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 (...) @testBitStream()
%3 = tail call i32 (...) @testReversedBitstream()
%4 = or i32 %3, %2
ret i32 %4
}
/* Variables and functions */
scalar_t__ malloc(int);
int /*<<< orphan*/ sprintf(char *, char *, double);
char *numToCString(double num) {
  char *temp = (char *)malloc(sizeof(char) * 1000);
  sprintf(temp, "%f", num);
  return temp;
}


x86 assembly (clang, -O0):
<numToCString>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
mov    $0x3e8,%edi
call   1030 <malloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
movsd  -0x8(%rbp),%xmm0
lea    0xeb5(%rip),%rsi
call   1040 <sprintf@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<numToCString>:
push   %rbx
sub    $0x10,%rsp
movsd  %xmm0,0x8(%rsp)
mov    $0x3e8,%edi
call   1030 <malloc@plt>
mov    %rax,%rbx
lea    0xec1(%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 = [3 x i8] c"%f\00"
define i8* @numToCString(double %0) {
%2 = alloca double
%3 = alloca i8*
store double %0, double* %2
%4 = call i64 @malloc(i32 1000)
%5 = inttoptr i64 %4 to i8*
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = load double, double* %2
%8 = call i32 @sprintf(i8* %6, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), double %7)
%9 = load i8*, i8** %3
ret i8* %9
}

LLVM IR (-O2):
@.str = [3 x i8] c"%f\00"
define i8* @numToCString(double %0) {
%2 = tail call i64 @malloc(i32 1000)
%3 = inttoptr i64 %2 to i8*
%4 = tail call i32 @sprintf(i8* dereferenceable(1) %3, i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), double %0)
ret i8* %3
}