xunge/DecIR huggingface dataset:
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef scalar_t__ uint16_t;
struct rat_mod_instance {
  int dummy;
};
struct rat_mod_functions {
  int dummy;
};

/* Variables and functions */
int rat_mod_generic_set_dummy(struct rat_mod_functions *mf,
                              struct rat_mod_instance *mi, uint8_t *argdata,
                              uint16_t arglen) {
  do {
  } while (0);
  ((void)(mf));
  ((void)(mi));
  ((void)(argdata));
  ((void)(arglen));
  return 0;
}


x86 assembly (clang, -O0):
<rat_mod_generic_set_dummy>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
jmp    1119 <rat_mod_generic_set_dummy+0x19>
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.rat_mod_functions = type { i32 }
%struct.rat_mod_instance = type { i32 }
define i32 @rat_mod_generic_set_dummy(%struct.rat_mod_functions* %0, %struct.rat_mod_instance* %1, i32* %2, i64 %3) {
%5 = alloca %struct.rat_mod_functions*
%6 = alloca %struct.rat_mod_instance*
%7 = alloca i32*
%8 = alloca i64
store %struct.rat_mod_functions* %0, %struct.rat_mod_functions** %5
store %struct.rat_mod_instance* %1, %struct.rat_mod_instance** %6
store i32* %2, i32** %7
store i64 %3, i64* %8
br label %9
9: ; preds = %4
br label %10
10: ; preds = %9
%11 = load %struct.rat_mod_functions*, %struct.rat_mod_functions** %5
%12 = load %struct.rat_mod_instance*, %struct.rat_mod_instance** %6
%13 = load i32*, i32** %7
%14 = load i64, i64* %8
ret i32 0
}

LLVM IR (-O2):
%struct.rat_mod_functions = type { i32 }
%struct.rat_mod_instance = type { i32 }
define i32 @rat_mod_generic_set_dummy(%struct.rat_mod_functions* nocapture readnone %0, %struct.rat_mod_instance* nocapture readnone %1, i32* nocapture readnone %2, i64 %3) {
ret i32 0
}
/* Variables and functions */
long double sqrt(long double);
long double hypotl(long double x, long double y) { return sqrt(x * x + y * y); }


x86 assembly (clang, -O0):
<hypotl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
fldt   0x20(%rbp)
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
fstpt  -0x20(%rbp)
fldt   -0x10(%rbp)
fldt   -0x20(%rbp)
fmul   %st,%st(0)
fxch   %st(1)
fmul   %st,%st(0)
faddp  %st,%st(1)
mov    %rsp,%rax
fstpt  (%rax)
call   1030 <sqrt@plt>
fld    %st(0)
fstp   %st(0)
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<hypotl>:
sub    $0x18,%rsp
fldt   0x20(%rsp)
fldt   0x30(%rsp)
fmul   %st,%st(0)
fxch   %st(1)
fmul   %st,%st(0)
faddp  %st,%st(1)
fld    %st(0)
fsqrt
fldz
fxch   %st(2)
fucomi %st(2),%st
fstp   %st(2)
jb     1139 <hypotl+0x29>
fstp   %st(1)
add    $0x18,%rsp
ret
fstp   %st(0)
fstpt  (%rsp)
call   1030 <sqrt@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
define x86_fp80 @hypotl(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* %3
%7 = load x86_fp80, x86_fp80* %4
%8 = load x86_fp80, x86_fp80* %4
%9 = fmul x86_fp80 %7, %8
%10 = call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %5, x86_fp80 %6, x86_fp80 %9)
%11 = call x86_fp80 @sqrt(x86_fp80 %10)
ret x86_fp80 %11
}

LLVM IR (-O2):
define x86_fp80 @hypotl(x86_fp80 %0, x86_fp80 %1) {
%3 = fmul x86_fp80 %1, %1
%4 = tail call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %0, x86_fp80 %0, x86_fp80 %3)
%5 = tail call x86_fp80 @sqrt(x86_fp80 %4)
ret x86_fp80 %5
}
/* Type definitions */
typedef int uint8_t;
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
int /*<<< orphan*/ prg8setBank1(int);
void vrc7setParams8010(uint16_t addr, uint8_t val) {
  (void)addr;
  prg8setBank1((val & 0x3F) << 13);
}


x86 assembly (clang, -O0):
<vrc7setParams8010>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%edi
and    $0x3f,%edi
shl    $0xd,%edi
call   1030 <prg8setBank1@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<vrc7setParams8010>:
mov    %esi,%edi
and    $0x3f,%edi
shl    $0xd,%edi
jmp    1030 <prg8setBank1@plt>

LLVM IR (-O0):
define void @vrc7setParams8010(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = load i32, i32* %4
%7 = and i32 %6, 63
%8 = shl i32 %7, 13
%9 = call i32 @prg8setBank1(i32 %8)
ret void
}

LLVM IR (-O2):
define void @vrc7setParams8010(i32 %0, i32 %1) {
%3 = shl i32 %1, 13
%4 = and i32 %3, 516096
%5 = tail call i32 @prg8setBank1(i32 %4)
ret void
}
int main() {
  int i;
  long l;
  float f;
  __builtin_fabs(i);
  __builtin_fabsf(f);
  __builtin_fabsl(l);
  __builtin_constant_p(i);
  return (1);
}


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

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i64
%4 = alloca float
store i32 0, i32* %1
%5 = load i32, i32* %2
%6 = sitofp i32 %5 to double
%7 = call double @llvm.fabs.f64(double %6)
%8 = load float, float* %4
%9 = call float @llvm.fabs.f32(float %8)
%10 = load i64, i64* %3
%11 = sitofp i64 %10 to x86_fp80
%12 = call x86_fp80 @llvm.fabs.f80(x86_fp80 %11)
%13 = load i32, i32* %2
%14 = call i1 @llvm.is.constant.i32(i32 %13)
%15 = zext i1 %14 to i32
ret i32 1
}

LLVM IR (-O2):
define i32 @main() {
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ set_io_bit(int, int);
void TOSH_SET_INC_PIN() { set_io_bit(0x34, 2); }


x86 assembly (clang, -O0):
<TOSH_SET_INC_PIN>:
push   %rbp
mov    %rsp,%rbp
mov    $0x34,%edi
mov    $0x2,%esi
call   1030 <set_io_bit@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<TOSH_SET_INC_PIN>:
mov    $0x34,%edi
mov    $0x2,%esi
jmp    1030 <set_io_bit@plt>

LLVM IR (-O0):
define void @TOSH_SET_INC_PIN() {
%1 = call i32 @set_io_bit(i32 52, i32 2)
ret void
}

LLVM IR (-O2):
define void @TOSH_SET_INC_PIN() {
%1 = tail call i32 @set_io_bit(i32 52, i32 2)
ret void
}
int execute_ugetrlimit() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @execute_ugetrlimit() {
ret i32 0
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  scalar_t__ y;
};
typedef TYPE_1__ XButtonPressedEvent;

/* Variables and functions */
int get_XButtonPressedEvent_y(void *_p) {
  return (int)((XButtonPressedEvent *)_p)->y;
}


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

x86 assembly (clang, -O2):
<get_XButtonPressedEvent_y>:
mov    (%rdi),%eax
ret

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

LLVM IR (-O2):
define i32 @get_XButtonPressedEvent_y(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
%4 = trunc i64 %3 to i32
ret i32 %4
}
/* Variables and functions */
int EXIT_FAILURE;
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ fputs(char *, int /*<<< orphan*/);
int /*<<< orphan*/ stderr;
int invokation(char *prg_name) {
  fprintf(stderr, "%s file ar-line\n", prg_name);
  fputs("\tfile\t- the .a to save\n", stderr);
  fputs("\tar-line\t- the complete ar comandline\n", stderr);
  return EXIT_FAILURE;
}


x86 assembly (clang, -O0):
<invokation>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ead(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xec0(%rip),%rsi
call   1040 <fprintf@plt>
mov    0x2e94(%rip),%rax
mov    (%rax),%esi
lea    0xebc(%rip),%rdi
call   1030 <fputs@plt>
mov    0x2e7f(%rip),%rax
mov    (%rax),%esi
lea    0xebf(%rip),%rdi
call   1030 <fputs@plt>
mov    0x2e62(%rip),%rax
mov    (%rax),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<invokation>:
push   %rbx
mov    %rdi,%rdx
mov    0x2eb5(%rip),%rbx
mov    (%rbx),%edi
lea    0xecc(%rip),%rsi
call   1040 <fprintf@plt>
mov    (%rbx),%esi
lea    0xecf(%rip),%rdi
call   1030 <fputs@plt>
mov    (%rbx),%esi
lea    0xed9(%rip),%rdi
call   1030 <fputs@plt>
mov    0x2e7c(%rip),%rax
mov    (%rax),%eax
pop    %rbx
ret

LLVM IR (-O0):
@stderr = global i32 0
@.str = [17 x i8] c"%s file ar-line\0A\00"
@.str.1 = [24 x i8] c"\09file\09- the .a to save\0A\00"
@.str.2 = [39 x i8] c"\09ar-line\09- the complete ar comandline\0A\00"
@EXIT_FAILURE = global i32 0
define i32 @invokation(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = load i32, i32* @stderr
%7 = call i32 @fputs(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.1, i64 0, i64 0), i32 %6)
%8 = load i32, i32* @stderr
%9 = call i32 @fputs(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.2, i64 0, i64 0), i32 %8)
%10 = load i32, i32* @EXIT_FAILURE
ret i32 %10
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [17 x i8] c"%s file ar-line\0A\00"
@.str.1 = [24 x i8] c"\09file\09- the .a to save\0A\00"
@.str.2 = [39 x i8] c"\09ar-line\09- the complete ar comandline\0A\00"
@EXIT_FAILURE = global i32 0
define i32 @invokation(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = load i32, i32* @stderr
%5 = tail call i32 @fputs(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.1, i64 0, i64 0), i32 %4)
%6 = load i32, i32* @stderr
%7 = tail call i32 @fputs(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.2, i64 0, i64 0), i32 %6)
%8 = load i32, i32* @EXIT_FAILURE
ret i32 %8
}
void foo5a() {}


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

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

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

LLVM IR (-O2):
define void @foo5a() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void janus_version(const char *pname) { printf("Janus %s\n", "0.3"); }


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

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

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

LLVM IR (-O2):
@.str = [10 x i8] c"Janus %s\0A\00"
@.str.1 = [4 x i8] c"0.3\00"
define void @janus_version(i8* nocapture readnone %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
ret void
}
main() {
  if (!(_Bool)1.1 == 1)
    return 1;
  if (!(char)1.1 == 1)
    return 2;
  if (!(short)1.1 == 1)
    return 3;
  if (!(int)1.1 == 1)
    return 4;
  if (!(long)1.1 == 1)
    return 5;
  if (!(long long)1.1 == 1)
    return 6;
  if ((float)1.1 == 1)
    return 7;
  if ((double)1.1 == 1)
    return 8;
  if ((long double)1.1 == 1)
    return 9;
  if ((_Bool)0.1 == 0)
    return 10;
  if (!(char)0.1 == 0)
    return 11;
  if (!(short)0.1 == 0)
    return 12;
  if (!(int)0.1 == 0)
    return 13;
  if (!(long)0.1 == 0)
    return 14;
  if (!(long long)0.1 == 0)
    return 15;
  if ((float)0.1 == 0)
    return 16;
  if ((double)0.1 == 0)
    return 17;
  if ((long double)0.1 == 0)
    return 18;
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
void f(int *a) {
  int i;
  for (i = 0; i < 100; i++)
    a[i] = 0;
}


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x64,-0xc(%rbp)
jge    1136 <f+0x36>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movl   $0x0,(%rax,%rcx,4)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    110f <f+0xf>
pop    %rbp
ret

x86 assembly (clang, -O2):
<f>:
push   %rax
mov    $0x190,%edx
xor    %esi,%esi
call   1030 <memset@plt>
pop    %rax
ret

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

LLVM IR (-O2):
define void @f(i32* nocapture writeonly %0) {
%2 = bitcast i32* %0 to i8*
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ wint_t;

/* Variables and functions */
int /*<<< orphan*/ fgetwc(int /*<<< orphan*/);
int /*<<< orphan*/ stdin;
wint_t getwchar() { return fgetwc(stdin); }


x86 assembly (clang, -O0):
<getwchar>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ecd(%rip),%rax
mov    (%rax),%edi
call   1030 <fgetwc@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<getwchar>:
mov    0x2ed1(%rip),%rax
mov    (%rax),%edi
jmp    1030 <fgetwc@plt>

LLVM IR (-O0):
@stdin = global i32 0
define i32 @getwchar() {
%1 = load i32, i32* @stdin
%2 = call i32 @fgetwc(i32 %1)
ret i32 %2
}

LLVM IR (-O2):
@stdin = global i32 0
define i32 @getwchar() {
%1 = load i32, i32* @stdin
%2 = tail call i32 @fgetwc(i32 %1)
ret i32 %2
}
int main(argc, argv)
int argc;
char *argv[];
{ return diffMain(argc, argv); }


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)
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    $0x0,%al
call   1030 <diffMain@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

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 = load i8**, i8*** %5
%8 = call i32 (i32, i8**, ...) bitcast (i32 (...)* @diffMain to i32 (i32, i8**, ...)*)(i32 %6, i8** %7)
ret i32 %8
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** %1) {
%3 = tail call i32 (i32, i8**, ...) bitcast (i32 (...)* @diffMain to i32 (i32, i8**, ...)*)(i32 %0, i8** %1)
ret i32 %3
}
/* Variables and functions */
char *getcwd(char *, int);
char *fs_getcwd(char *buffer, int buffer_size) {
  if (buffer == 0)
    return 0;
  return getcwd(buffer, buffer_size);
}


x86 assembly (clang, -O0):
<fs_getcwd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1137 <fs_getcwd+0x27>
movq   $0x0,-0x8(%rbp)
jmp    1147 <fs_getcwd+0x37>
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%esi
call   1030 <getcwd@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fs_getcwd>:
test   %rdi,%rdi
je     111a <fs_getcwd+0xa>
jmp    1030 <getcwd@plt>
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i8* @fs_getcwd(i8* %0, i32 %1) {
%3 = icmp eq i8* %0, null
br i1 %3, label %6, label %4
4: ; preds = %2
%5 = tail call i8* @getcwd(i8* %0, i32 %1)
br label %6
6: ; preds = %2, %4
%7 = phi i8* [ %5, %4 ], [ null, %2 ]
ret i8* %7
}
/* Variables and functions */
int /*<<< orphan*/ Lcd_Out(int, int, char *);
void LCD_sum_reset() { Lcd_Out(2, 1, "x+y =    "); }


x86 assembly (clang, -O0):
<LCD_sum_reset>:
push   %rbp
mov    %rsp,%rbp
mov    $0x2,%edi
mov    $0x1,%esi
lea    0xedb(%rip),%rdx
call   1030 <Lcd_Out@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<LCD_sum_reset>:
lea    0xee9(%rip),%rdx
mov    $0x2,%edi
mov    $0x1,%esi
jmp    1030 <Lcd_Out@plt>

LLVM IR (-O0):
@.str = [10 x i8] c"x+y = \00"
define void @LCD_sum_reset() {
%1 = call i32 @Lcd_Out(i32 2, i32 1, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [10 x i8] c"x+y = \00"
define void @LCD_sum_reset() {
%1 = tail call i32 @Lcd_Out(i32 2, i32 1, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Type definitions */
struct timeval {
  double tv_sec;
  double tv_usec;
};

/* Variables and functions */
int /*<<< orphan*/ gettimeofday(struct timeval *, int /*<<< orphan*/ *);
double esNow(void) {
  struct timeval tv;
  (void)gettimeofday(&tv, NULL);
  return tv.tv_sec * 1.0 + tv.tv_usec / 1000000.0;
}


x86 assembly (clang, -O0):
<esNow>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    -0x10(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1030 <gettimeofday@plt>
movsd  -0x10(%rbp),%xmm0
movsd  -0x8(%rbp),%xmm1
movsd  0xec9(%rip),%xmm2
divsd  %xmm2,%xmm1
addsd  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<esNow>:
sub    $0x18,%rsp
lea    0x8(%rsp),%rdi
xor    %esi,%esi
call   1030 <gettimeofday@plt>
movsd  0x10(%rsp),%xmm0
divsd  0xed2(%rip),%xmm0
addsd  0x8(%rsp),%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
%struct.timeval = type { double, double }
define double @esNow() {
%1 = alloca %struct.timeval
%2 = call i32 @gettimeofday(%struct.timeval* %1, i32* null)
%3 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i32 0, i32 0
%4 = load double, double* %3
%5 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i32 0, i32 1
%6 = load double, double* %5
%7 = fdiv double %6, 1.000000e+06
%8 = call double @llvm.fmuladd.f64(double %4, double 1.000000e+00, double %7)
ret double %8
}

LLVM IR (-O2):
%struct.timeval = type { double, double }
define double @esNow() {
%1 = alloca %struct.timeval
%2 = bitcast %struct.timeval* %1 to i8*
%3 = call i32 @gettimeofday(%struct.timeval* %1, i32* null)
%4 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 0
%5 = load double, double* %4
%6 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 1
%7 = load double, double* %6
%8 = fdiv double %7, 1.000000e+06
%9 = fadd double %5, %8
ret double %9
}
void local_irq_disable() {}


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

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

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

LLVM IR (-O2):
define void @local_irq_disable() {
ret void
}
void Mali_ReadPerfCounters() {}


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

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

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

LLVM IR (-O2):
define void @Mali_ReadPerfCounters() {
ret void
}
void INT_Excep_SCI12_SCIX3(void) {}


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

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

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

LLVM IR (-O2):
define void @INT_Excep_SCI12_SCIX3() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void print_usage(void) {
  printf("./csim: Missing required command line argument\n"
         "Usage: ./csim [-hv] -s 
 -E <E> -b <b> -t <file>\n"
         "Options:\n"
         "  -h         Print this help message.\n"
         "  -v         Optional verbose flag.\n"
         "  -s 
     Number of set index bits.\n"
         "  -E <E>     Number of lines per set.\n"
         "  -b <b>     Number of blocks offset bits.\n"
         "  -t <file>  Trace file.\n\n"
         "Examples:\n"
         "  linux>  ./csim -s 4 -E 1 -b 4 -t traces/yi.trace\n"
         "  linux>  ./csim -v -s 8 -E 2 -b 4 -t traces/yi.trace\n");
}


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

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

LLVM IR (-O0):
@.str = [443 x i8] c"./csim: Missing required command line argument\0AUsage: ./csim [-hv] -s 
 -E <E> -b <b> -t <file>\0AOptions:\0A -h Print this help message.\0A -v Optional verbose flag.\0A -s 
 Number of set index bits.\0A -E <E> Number of lines per set.\0A -b <b> Number of blocks offset bits.\0A -t <file> Trace file.\0A\0AExamples:\0A linux> ./csim -s 4 -E 1 -b 4 -t traces/yi.trace\0A linux> ./csim -v -s 8 -E 2 -b 4 -t traces/yi.trace\0A\00"
define void @print_usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([443 x i8], [443 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [442 x i8] c"./csim: Missing required command line argument\0AUsage: ./csim [-hv] -s 
 -E <E> -b <b> -t <file>\0AOptions:\0A -h Print this help message.\0A -v Optional verbose flag.\0A -s 
 Number of set index bits.\0A -E <E> Number of lines per set.\0A -b <b> Number of blocks offset bits.\0A -t <file> Trace file.\0A\0AExamples:\0A linux> ./csim -s 4 -E 1 -b 4 -t traces/yi.trace\0A linux> ./csim -v -s 8 -E 2 -b 4 -t traces/yi.trace\00"
define void @print_usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([442 x i8], [442 x i8]* @str, i64 0, i64 0))
ret void
}
/* Type definitions */
struct hostent {
  int dummy;
};

/* Variables and functions */
struct hostent *gethostbyname(char *);
int main(void) {
  struct hostent *host;
  while (1) {
    host = gethostbyname("MacBook.local");
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeda(%rip),%rdi
call   1030 <gethostbyname@plt>
mov    %rax,-0x10(%rbp)
jmp    111f <main+0xf>

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xee8(%rip),%rbx
nopl   0x0(%rax,%rax,1)
mov    %rbx,%rdi
call   1030 <gethostbyname@plt>
jmp    1120 <main+0x10>

LLVM IR (-O0):
%struct.hostent = type { i32 }
@.str = [14 x i8] c"MacBook.local\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca %struct.hostent*
store i32 0, i32* %1
br label %3
3: ; preds = %0, %3
%4 = call %struct.hostent* @gethostbyname(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
store %struct.hostent* %4, %struct.hostent** %2
br label %3
}

LLVM IR (-O2):
%struct.hostent = type { i32 }
@.str = [14 x i8] c"MacBook.local\00"
define i32 @main() {
br label %1
1: ; preds = %1, %0
%2 = tail call %struct.hostent* @gethostbyname(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
br label %1
}
/* Variables and functions */
double sin(double);
double c4(double x) { return 3.14 + sin(x); }


x86 assembly (clang, -O0):
<c4>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1030 <sin@plt>
movaps %xmm0,%xmm1
movsd  0xece(%rip),%xmm0
addsd  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<c4>:
push   %rax
call   1030 <sin@plt>
addsd  0xee2(%rip),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @c4(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = call double @sin(double %3)
%5 = fadd double 3.140000e+00, %4
ret double %5
}

LLVM IR (-O2):
define double @c4(double %0) {
%2 = tail call double @sin(double %0)
%3 = fadd double %2, 3.140000e+00
ret double %3
}
/* Variables and functions */
int /*<<< orphan*/ rcd_timer_setup();
void _setup(void) { rcd_timer_setup(); }


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

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

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

LLVM IR (-O2):
define void @_setup() {
%1 = tail call i32 (...) @rcd_timer_setup()
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int fwrite(int *, size_t, size_t, int /*<<< orphan*/ *);
int c_fwrite_int_(int *i, int *ni, FILE **fp) {
  return fwrite(i, (size_t)sizeof(int), (size_t)*ni, *fp);
}


x86 assembly (clang, -O0):
<c_fwrite_int_>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rax
movslq (%rax),%rdx
mov    -0x18(%rbp),%rax
mov    (%rax),%rcx
mov    $0x4,%esi
call   1030 <fwrite@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<c_fwrite_int_>:
movslq (%rsi),%rax
mov    (%rdx),%rcx
mov    $0x4,%esi
mov    %rax,%rdx
jmp    1030 <fwrite@plt>

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

LLVM IR (-O2):
define i32 @c_fwrite_int_(i32* nocapture %0, i32* nocapture %1, i32** nocapture %2) {
%4 = load i32, i32* %1
%5 = sext i32 %4 to i64
%6 = load i32*, i32** %2
%7 = tail call i32 @fwrite(i32* %0, i64 4, i64 %5, i32* %6)
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *, ...);
void usage(char *progname) {
  printf("\nVersion:0.1, 2006/06/22\n");
  printf("Usage:\n%s <host ip> <host mac> <user name> <password>\n\n",
         progname);
  exit(-1);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xecd(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%rsi
lea    0xed5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    $0xffffffff,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rbx
mov    %rdi,%rbx
lea    0xefd(%rip),%rdi
call   1030 <puts@plt>
lea    0xeb9(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0xffffffff,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [26 x i8] c"\0AVersion:0.1, 2006/06/22\0A\00"
@.str.1 = [56 x i8] c"Usage:\0A%s <host ip> <host mac> <user name> <password>\0A\0A\00"
define void @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
%4 = load i8*, i8** %2
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str.1, i64 0, i64 0), i8* %4)
%6 = call i32 @exit(i32 -1)
unreachable
}

LLVM IR (-O2):
@.str.1 = [56 x i8] c"Usage:\0A%s <host ip> <host mac> <user name> <password>\0A\0A\00"
@str = [25 x i8] c"\0AVersion:0.1, 2006/06/22\00"
define void @usage(i8* %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @str, i64 0, i64 0))
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([56 x i8], [56 x i8]* @.str.1, i64 0, i64 0), i8* %0)
%4 = tail call i32 @exit(i32 -1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ strlen(char *);
int /*<<< orphan*/ write(int, char *, int /*<<< orphan*/);
void write_str(int fd, char *s) { write(fd, s, strlen(s)); }


x86 assembly (clang, -O0):
<write_str>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <strlen@plt>
mov    -0x1c(%rbp),%edi
mov    -0x18(%rbp),%rsi
mov    %eax,%edx
call   1030 <write@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<write_str>:
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %edi,%ebp
mov    %rsi,%rdi
call   1040 <strlen@plt>
mov    %ebp,%edi
mov    %rbx,%rsi
mov    %eax,%edx
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <write@plt>

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

LLVM IR (-O2):
define void @write_str(i32 %0, i8* %1) {
%3 = tail call i32 @strlen(i8* %1)
%4 = tail call i32 @write(i32 %0, i8* %1, i32 %3)
ret void
}
unsigned long long ldata(unsigned int ldata_high, unsigned int ldata_low) {
  unsigned long long ret = ldata_high;
  return (ret << 32) | ldata_low;
}


x86 assembly (clang, -O0):
<ldata>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
shl    $0x20,%rax
mov    -0x8(%rbp),%ecx
or     %rcx,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ldata>:
shl    $0x20,%rdi
mov    %esi,%eax
or     %rdi,%rax
ret

LLVM IR (-O0):
define i64 @ldata(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i64
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = load i32, i32* %3
%7 = zext i32 %6 to i64
store i64 %7, i64* %5
%8 = load i64, i64* %5
%9 = shl i64 %8, 32
%10 = load i32, i32* %4
%11 = zext i32 %10 to i64
%12 = or i64 %9, %11
ret i64 %12
}

LLVM IR (-O2):
define i64 @ldata(i32 %0, i32 %1) {
%3 = zext i32 %0 to i64
%4 = shl nuw i64 %3, 32
%5 = zext i32 %1 to i64
%6 = or i64 %4, %5
ret i64 %6
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, ...);
int /*<<< orphan*/ stderr;
usage() {
  fprintf(stderr, "usage: %s [-dhms] file\n", "age");
  fprintf(stderr, "return age of a file in days, hour, minutes or seconds\n");
  exit(1);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
lea    0xedd(%rip),%rdx
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2e97(%rip),%rax
mov    (%rax),%edi
lea    0xeca(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rbx
mov    0x2eb8(%rip),%rbx
mov    (%rbx),%edi
lea    0xecf(%rip),%rsi
lea    0xee0(%rip),%rdx
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0xed4(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [24 x i8] c"usage: %s [-dhms] file\0A\00"
@.str.1 = [4 x i8] c"age\00"
@.str.2 = [56 x i8] c"return age of a file in days, hour, minutes or seconds\0A\00"
define i32 @usage() {
%1 = load i32, i32* @stderr
%2 = call i32 (i32, i8*, ...) @fprintf(i32 %1, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
%3 = load i32, i32* @stderr
%4 = call i32 (i32, i8*, ...) @fprintf(i32 %3, i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str.2, i64 0, i64 0))
%5 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [24 x i8] c"usage: %s [-dhms] file\0A\00"
@.str.1 = [4 x i8] c"age\00"
@.str.2 = [56 x i8] c"return age of a file in days, hour, minutes or seconds\0A\00"
define i32 @usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 (i32, i8*, ...) @fprintf(i32 %1, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
%3 = load i32, i32* @stderr
%4 = tail call i32 (i32, i8*, ...) @fprintf(i32 %3, i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str.2, i64 0, i64 0))
%5 = tail call i32 @exit(i32 1)
unreachable
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ watch_log(char *);
FILE *_IO_file_open(const char *path, const char *mode) {
  watch_log("io_open\n");
  return NULL;
}


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

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

LLVM IR (-O0):
@.str = [9 x i8] c"io_open\0A\00"
define i32* @_IO_file_open(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = call i32 @watch_log(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
ret i32* null
}

LLVM IR (-O2):
@.str = [9 x i8] c"io_open\0A\00"
define noalias i32* @_IO_file_open(i8* nocapture readnone %0, i8* nocapture readnone %1) {
%3 = tail call i32 @watch_log(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
ret i32* null
}
/* Type definitions */
struct itimerspec {
  int dummy;
};

/* Variables and functions */
int TFD_TIMER_ABSTIME;
int timerfd_settime(int, int, struct itimerspec *, int /*<<< orphan*/ *);
int libtimechange_arm(int fd) {
  struct itimerspec spec = {};
  return timerfd_settime(fd, TFD_TIMER_ABSTIME | (1 << 1), &spec, NULL);
}


x86 assembly (clang, -O0):
<libtimechange_arm>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    -0x8(%rbp),%rdi
xor    %esi,%esi
mov    $0x4,%edx
call   1030 <memset@plt>
mov    -0x4(%rbp),%edi
mov    0x2eab(%rip),%rax
mov    (%rax),%esi
or     $0x2,%esi
lea    -0x8(%rbp),%rdx
xor    %eax,%eax
mov    %eax,%ecx
call   1040 <timerfd_settime@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<libtimechange_arm>:
push   %rax
movl   $0x0,(%rsp)
mov    0x2ed1(%rip),%rax
mov    (%rax),%esi
or     $0x2,%esi
mov    %rsp,%rdx
xor    %ecx,%ecx
call   1030 <timerfd_settime@plt>
pop    %rcx
ret

LLVM IR (-O0):
%struct.itimerspec = type { i32 }
@TFD_TIMER_ABSTIME = global i32 0
define i32 @libtimechange_arm(i32 %0) {
%2 = alloca i32
%3 = alloca %struct.itimerspec
store i32 %0, i32* %2
%4 = bitcast %struct.itimerspec* %3 to i8*
%5 = load i32, i32* %2
%6 = load i32, i32* @TFD_TIMER_ABSTIME
%7 = or i32 %6, 2
%8 = call i32 @timerfd_settime(i32 %5, i32 %7, %struct.itimerspec* %3, i32* null)
ret i32 %8
}

LLVM IR (-O2):
%struct.itimerspec = type { i32 }
@TFD_TIMER_ABSTIME = global i32 0
define i32 @libtimechange_arm(i32 %0) {
%2 = alloca %struct.itimerspec
%3 = bitcast %struct.itimerspec* %2 to i8*
%4 = getelementptr inbounds %struct.itimerspec, %struct.itimerspec* %2, i64 0, i32 0
store i32 0, i32* %4
%5 = load i32, i32* @TFD_TIMER_ABSTIME
%6 = or i32 %5, 2
%7 = call i32 @timerfd_settime(i32 %0, i32 %6, %struct.itimerspec* %2, i32* null)
ret i32 %7
}
/* Type definitions */
typedef int uint64_t;

/* Variables and functions */
uint64_t pixel64_get_b16(uint64_t pixel) {
  return (pixel & 0xFFFF00000000) >> 32;
}


x86 assembly (clang, -O0):
<pixel64_get_b16>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movslq -0x4(%rbp),%rax
movabs $0xffff00000000,%rcx
and    %rcx,%rax
sar    $0x20,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<pixel64_get_b16>:
sar    $0x1f,%edi
movzwl %di,%eax
ret

LLVM IR (-O0):
define i32 @pixel64_get_b16(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = sext i32 %3 to i64
%5 = and i64 %4, 281470681743360
%6 = ashr i64 %5, 32
%7 = trunc i64 %6 to i32
ret i32 %7
}

LLVM IR (-O2):
define i32 @pixel64_get_b16(i32 %0) {
%2 = icmp slt i32 %0, 0
%3 = select i1 %2, i32 65535, i32 0
ret i32 %3
}
brcstr(ps, c) char *ps, c;
{ printf("%c[%s%c", 27, ps, c); }


x86 assembly (clang, -O0):
<brcstr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %sil,%al
mov    %rdi,-0x10(%rbp)
mov    %al,-0x11(%rbp)
mov    -0x10(%rbp),%rdx
movsbl -0x11(%rbp),%ecx
lea    0xecf(%rip),%rdi
mov    $0x1b,%esi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<brcstr>:
mov    %rdi,%rdx
movsbl %sil,%ecx
lea    0xee2(%rip),%rdi
mov    $0x1b,%esi
xor    %eax,%eax
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [8 x i8] c"%c[%s%c\00"
define i32 @brcstr(i8* %0, i32 %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i8
%6 = trunc i32 %1 to i8
store i8* %0, i8** %4
store i8 %6, i8* %5
%7 = load i8*, i8** %4
%8 = load i8, i8* %5
%9 = sext i8 %8 to i32
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 27, i8* %7, i32 %9)
%11 = load i32, i32* %3
ret i32 %11
}

LLVM IR (-O2):
@.str = [8 x i8] c"%c[%s%c\00"
define i32 @brcstr(i8* %0, i32 %1) {
%3 = shl i32 %1, 24
%4 = ashr exact i32 %3, 24
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 27, i8* %0, i32 %4)
ret i32 undef
}
/* Variables and functions */
int gt(float, float);
main() {
  float a = 2, b = 1;
  return gt(a, b);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movss  0xedd(%rip),%xmm0
movss  %xmm0,-0x8(%rbp)
movss  0xecc(%rip),%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0x8(%rbp),%xmm0
movss  -0xc(%rbp),%xmm1
call   1030 <gt@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
movss  0xee8(%rip),%xmm0
movss  0xee4(%rip),%xmm1
jmp    1030 <gt@plt>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca float
%3 = alloca float
store i32 0, i32* %1
store float 2.000000e+00, float* %2
store float 1.000000e+00, float* %3
%4 = load float, float* %2
%5 = load float, float* %3
%6 = call i32 @gt(float %4, float %5)
ret i32 %6
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @gt(float 2.000000e+00, float 1.000000e+00)
ret i32 %1
}
void __mp_fini(void) {}


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

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

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

LLVM IR (-O2):
define void @__mp_fini() {
ret void
}
float bipolar_step_activation(float output) {
  if (output > 0)
    return 1;
  else
    return -1;
}


x86 assembly (clang, -O0):
<bipolar_step_activation>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x8(%rbp)
movss  -0x8(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jbe    112c <bipolar_step_activation+0x2c>
movss  0xee2(%rip),%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    1139 <bipolar_step_activation+0x39>
movss  0xecc(%rip),%xmm0
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<bipolar_step_activation>:
xorps  %xmm1,%xmm1
xor    %eax,%eax
ucomiss %xmm1,%xmm0
seta   %al
lea    0xeee(%rip),%rcx
movss  (%rcx,%rax,4),%xmm0
ret

LLVM IR (-O0):
define float @bipolar_step_activation(float %0) {
%2 = alloca float
%3 = alloca float
store float %0, float* %3
%4 = load float, float* %3
%5 = fcmp ogt float %4, 0.000000e+00
br i1 %5, label %6, label %7
6: ; preds = %1
store float 1.000000e+00, float* %2
br label %8
7: ; preds = %1
store float -1.000000e+00, float* %2
br label %8
8: ; preds = %7, %6
%9 = load float, float* %2
ret float %9
}

LLVM IR (-O2):
define float @bipolar_step_activation(float %0) {
%2 = fcmp ogt float %0, 0.000000e+00
%3 = select i1 %2, float 1.000000e+00, float -1.000000e+00
ret float %3
}
int main(void) {
  struct bar {
    int a : 8;
    char b;
  };
  union foo {
    char **test;
    int a;
  };
  struct bar a;
  union foo b;
  a.b = 0;
  a.a = 4;
  b.test = &a;
  return b.a;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movb   $0x0,-0x7(%rbp)
movb   $0x4,-0x8(%rbp)
lea    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
lea    -0x8(%rsp),%rax
ret

LLVM IR (-O0):
%struct.bar = type { i8, i8, [2 x i8] }
%union.foo = type { i8** }
define i32 @main() {
%1 = alloca i32
%2 = alloca %struct.bar
%3 = alloca %union.foo
store i32 0, i32* %1
%4 = getelementptr inbounds %struct.bar, %struct.bar* %2, i32 0, i32 1
store i8 0, i8* %4
%5 = bitcast %struct.bar* %2 to i8*
store i8 4, i8* %5
%6 = bitcast %struct.bar* %2 to i8**
%7 = bitcast %union.foo* %3 to i8***
store i8** %6, i8*** %7
%8 = bitcast %union.foo* %3 to i32*
%9 = load i32, i32* %8
ret i32 %9
}

LLVM IR (-O2):
%struct.bar = type { i8, i8, [2 x i8] }
define i32 @main() {
%1 = alloca %struct.bar
%2 = getelementptr inbounds %struct.bar, %struct.bar* %1, i64 0, i32 0
%3 = ptrtoint %struct.bar* %1 to i64
%4 = trunc i64 %3 to i32
ret i32 %4
}
/* Variables and functions */
int spawn(int, char **);
int main(int argc, char *argv[]) {
  argv[0] = "/usr/local/bin/mc";
  return (spawn(argc, argv));
}


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)
mov    -0x10(%rbp),%rax
lea    0xecf(%rip),%rcx
mov    %rcx,(%rax)
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1030 <spawn@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
lea    0xee9(%rip),%rax
mov    %rax,(%rsi)
jmp    1030 <spawn@plt>

LLVM IR (-O0):
@.str = [18 x i8] c"/usr/local/bin/mc\00"
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 i8**, i8*** %5
%7 = getelementptr inbounds i8*, i8** %6, i64 0
store i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i8** %7
%8 = load i32, i32* %4
%9 = load i8**, i8*** %5
%10 = call i32 @spawn(i32 %8, i8** %9)
ret i32 %10
}

LLVM IR (-O2):
@.str = [18 x i8] c"/usr/local/bin/mc\00"
define i32 @main(i32 %0, i8** %1) {
store i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i8** %1
%3 = tail call i32 @spawn(i32 %0, i8** %1)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isprint(int);
void t_isprint_0xe5() {
  Assert_real((isprint(229) == 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",
              1150, ("isprint should be 0 for 0xe5"));
}


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

x86 assembly (clang, -O2):
<t_isprint_0xe5>:
push   %rax
mov    $0xe5,%edi
call   1030 <isprint@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x47e,%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 0xe5\00"
define void @t_isprint_0xe5() {
%1 = call i64 @isprint(i32 229)
%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 1150, 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 0xe5\00"
define void @t_isprint_0xe5() {
%1 = tail call i64 @isprint(i32 229)
%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 1150, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
int do_242() { return 242; }


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

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

LLVM IR (-O0):
define i32 @do_242() {
ret i32 242
}

LLVM IR (-O2):
define i32 @do_242() {
ret i32 242
}
int intel_setup_io(void) { return 1; }


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

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

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

LLVM IR (-O2):
define i32 @intel_setup_io() {
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isspace(int);
void t_isspace_0x2c() {
  Assert_real((isspace(44) == 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_isspace.c",
              225, ("isspace should be 0 for ,"));
}


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

x86 assembly (clang, -O2):
<t_isspace_0x2c>:
push   %rax
mov    $0x2c,%edi
call   1030 <isspace@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0xe1,%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_isspace.c\00"
@.str.1 = [26 x i8] c"isspace should be 0 for ,\00"
define void @t_isspace_0x2c() {
%1 = call i64 @isspace(i32 44)
%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 225, i8* getelementptr inbounds ([26 x i8], [26 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_isspace.c\00"
@.str.1 = [26 x i8] c"isspace should be 0 for ,\00"
define void @t_isspace_0x2c() {
%1 = tail call i64 @isspace(i32 44)
%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 225, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ call(char *);
neg() { call("ccneg"); }


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

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

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

LLVM IR (-O2):
@.str = [6 x i8] c"ccneg\00"
define i32 @neg() {
%1 = tail call i32 @call(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
ret i32 undef
}