xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *, ...);
void quota_print_heading(char *name) {
  printf("Disk quotas for %s:\n", name);
  printf("%s%s\n", "Filesystem     used   quota  limit    timeleft  ",
         "files  quota  limit    timeleft");
}


x86 assembly (clang, -O0):
<quota_print_heading>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xed9(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xee0(%rip),%rdi
lea    0xedf(%rip),%rsi
lea    0xf09(%rip),%rdx
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<quota_print_heading>:
push   %rax
mov    %rdi,%rsi
lea    0xee5(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xeec(%rip),%rdi
lea    0xeeb(%rip),%rsi
lea    0xf15(%rip),%rdx
xor    %eax,%eax
pop    %rcx
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [21 x i8] c"Disk quotas for %s:\0A\00"
@.str.1 = [6 x i8] c"%s%s\0A\00"
@.str.2 = [49 x i8] c"Filesystem used quota limit timeleft \00"
@.str.3 = [32 x i8] c"files quota limit timeleft\00"
define void @quota_print_heading(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.3, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [21 x i8] c"Disk quotas for %s:\0A\00"
@.str.1 = [6 x i8] c"%s%s\0A\00"
@.str.2 = [49 x i8] c"Filesystem used quota limit timeleft \00"
@.str.3 = [32 x i8] c"files quota limit timeleft\00"
define void @quota_print_heading(i8* %0) {
%2 = tail call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = tail call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.3, i64 0, i64 0))
ret void
}
__attribute__((always_)) void init_call_single_data(void) {}


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

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

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

LLVM IR (-O2):
define void @init_call_single_data() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ esc(char *);
int /*<<< orphan*/ padding(int);
void decbi(void) {
  esc("6");
  padding(40);
}


x86 assembly (clang, -O0):
<decbi>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1040 <esc@plt>
mov    $0x28,%edi
call   1030 <padding@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<decbi>:
push   %rax
lea    0xed8(%rip),%rdi
call   1040 <esc@plt>
mov    $0x28,%edi
pop    %rax
jmp    1030 <padding@plt>

LLVM IR (-O0):
@.str = [2 x i8] c"6\00"
define void @decbi() {
%1 = call i32 @esc(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @padding(i32 40)
ret void
}

LLVM IR (-O2):
@.str = [2 x i8] c"6\00"
define void @decbi() {
%1 = tail call i32 @esc(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @padding(i32 40)
ret void
}
int test_lineend(unsigned char *s) {
  if ((s[0] == '\r') && (s[1] == '\n')) {
    return 2;
  } else if (s[0] == '\n') {
    return 1;
  } else if (s[0] == '\r') {
    return 1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<test_lineend>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movzbl (%rax),%eax
cmp    $0xd,%eax
jne    1135 <test_lineend+0x35>
mov    -0x10(%rbp),%rax
movzbl 0x1(%rax),%eax
cmp    $0xa,%eax
jne    1135 <test_lineend+0x35>
movl   $0x2,-0x4(%rbp)
jmp    117e <test_lineend+0x7e>
mov    -0x10(%rbp),%rax
movzbl (%rax),%eax
cmp    $0xa,%eax
jne    1151 <test_lineend+0x51>
movl   $0x1,-0x4(%rbp)
jmp    117e <test_lineend+0x7e>
mov    -0x10(%rbp),%rax
movzbl (%rax),%eax
cmp    $0xd,%eax
jne    116d <test_lineend+0x6d>
movl   $0x1,-0x4(%rbp)
jmp    117e <test_lineend+0x7e>
jmp    1172 <test_lineend+0x72>
jmp    1177 <test_lineend+0x77>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_lineend>:
mov    (%rdi),%cl
cmp    $0xd,%cl
jne    1112 <test_lineend+0x12>
mov    $0x2,%eax
cmpb   $0xa,0x1(%rdi)
je     1123 <test_lineend+0x23>
cmp    $0xd,%cl
sete   %al
cmp    $0xa,%cl
sete   %cl
or     %al,%cl
movzbl %cl,%eax
ret

LLVM IR (-O0):
define i32 @test_lineend(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
store i8* %0, i8** %3
%4 = load i8*, i8** %3
%5 = getelementptr inbounds i8, i8* %4, i64 0
%6 = load i8, i8* %5
%7 = zext i8 %6 to i32
%8 = icmp eq i32 %7, 13
br i1 %8, label %9, label %16
9: ; preds = %1
%10 = load i8*, i8** %3
%11 = getelementptr inbounds i8, i8* %10, i64 1
%12 = load i8, i8* %11
%13 = zext i8 %12 to i32
%14 = icmp eq i32 %13, 10
br i1 %14, label %15, label %16
15: ; preds = %9
store i32 2, i32* %2
br label %33
16: ; preds = %9, %1
%17 = load i8*, i8** %3
%18 = getelementptr inbounds i8, i8* %17, i64 0
%19 = load i8, i8* %18
%20 = zext i8 %19 to i32
%21 = icmp eq i32 %20, 10
br i1 %21, label %22, label %23
22: ; preds = %16
store i32 1, i32* %2
br label %33
23: ; preds = %16
%24 = load i8*, i8** %3
%25 = getelementptr inbounds i8, i8* %24, i64 0
%26 = load i8, i8* %25
%27 = zext i8 %26 to i32
%28 = icmp eq i32 %27, 13
br i1 %28, label %29, label %30
29: ; preds = %23
store i32 1, i32* %2
br label %33
30: ; preds = %23
br label %31
31: ; preds = %30
br label %32
32: ; preds = %31
store i32 0, i32* %2
br label %33
33: ; preds = %32, %29, %22, %15
%34 = load i32, i32* %2
ret i32 %34
}

LLVM IR (-O2):
define i32 @test_lineend(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 13
br i1 %3, label %4, label %8
4: ; preds = %1
%5 = getelementptr inbounds i8, i8* %0, i64 1
%6 = load i8, i8* %5
%7 = icmp eq i8 %6, 10
br i1 %7, label %12, label %8
8: ; preds = %4, %1
%9 = icmp eq i8 %2, 10
%10 = or i1 %9, %3
%11 = zext i1 %10 to i32
br label %12
12: ; preds = %8, %4
%13 = phi i32 [ 2, %4 ], [ %11, %8 ]
ret i32 %13
}
int argsok(int na, int nf) { return na == nf || nf < 0 && na >= -nf - 1; }


x86 assembly (clang, -O0):
<argsok>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%ecx
mov    $0x1,%al
cmp    -0x8(%rbp),%ecx
mov    %al,-0x9(%rbp)
je     1143 <argsok+0x43>
xor    %eax,%eax
cmpl   $0x0,-0x8(%rbp)
mov    %al,-0xa(%rbp)
jge    113d <argsok+0x3d>
mov    -0x4(%rbp),%eax
xor    %ecx,%ecx
sub    -0x8(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
setge  %al
mov    %al,-0xa(%rbp)
mov    -0xa(%rbp),%al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<argsok>:
mov    $0x1,%eax
cmp    %esi,%edi
je     110f <argsok+0xf>
xor    %eax,%eax
test   %esi,%esi
js     1110 <argsok+0x10>
ret
not    %esi
xor    %eax,%eax
cmp    %edi,%esi
setle  %al
ret

LLVM IR (-O0):
define i32 @argsok(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = load i32, i32* %4
%7 = icmp eq i32 %5, %6
br i1 %7, label %19, label %8
8: ; preds = %2
%9 = load i32, i32* %4
%10 = icmp slt i32 %9, 0
br i1 %10, label %11, label %17
11: ; preds = %8
%12 = load i32, i32* %3
%13 = load i32, i32* %4
%14 = sub nsw i32 0, %13
%15 = sub nsw i32 %14, 1
%16 = icmp sge i32 %12, %15
br label %17
17: ; preds = %11, %8
%18 = phi i1 [ false, %8 ], [ %16, %11 ]
br label %19
19: ; preds = %17, %2
%20 = phi i1 [ true, %2 ], [ %18, %17 ]
%21 = zext i1 %20 to i32
ret i32 %21
}

LLVM IR (-O2):
define i32 @argsok(i32 %0, i32 %1) {
%3 = icmp eq i32 %0, %1
br i1 %3, label %10, label %4
4: ; preds = %2
%5 = icmp slt i32 %1, 0
br i1 %5, label %6, label %10
6: ; preds = %4
%7 = xor i32 %1, -1
%8 = icmp sle i32 %7, %0
%9 = zext i1 %8 to i32
br label %10
10: ; preds = %4, %6, %2
%11 = phi i32 [ 1, %2 ], [ 0, %4 ], [ %9, %6 ]
ret i32 %11
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int pa_pstream_send_tagstruct_with_creds() {
  printf("NOT IMPLEMENTED:"
         "pa_pstream_send_tagstruct_with_creds"
         "\n");
}


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

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

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

LLVM IR (-O2):
@str = [53 x i8] c"NOT IMPLEMENTED:pa_pstream_send_tagstruct_with_creds\00"
define i32 @pa_pstream_send_tagstruct_with_creds() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([53 x i8], [53 x i8]* @str, i64 0, i64 0))
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ exxit(int);
int /*<<< orphan*/ printf(char *);
void memerror() {
  printf("Error allocating memory\n");
  exxit(-1);
}


x86 assembly (clang, -O0):
<memerror>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
mov    $0xffffffff,%edi
call   1040 <exxit@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<memerror>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
mov    $0xffffffff,%edi
pop    %rax
jmp    1040 <exxit@plt>

LLVM IR (-O0):
@.str = [25 x i8] c"Error allocating memory\0A\00"
define void @memerror() {
%1 = call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @exxit(i32 -1)
ret void
}

LLVM IR (-O2):
@str = [24 x i8] c"Error allocating memory\00"
define void @memerror() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @exxit(i32 -1)
ret void
}
extern void outb_p(unsigned char value, unsigned short port) {
  __asm__ __volatile__("out"
                       "b"
                       " %"
                       "b"
                       "0,%"
                       "w"
                       "1"
                       "\noutb %%al,$0x80"
                       :
                       : "a"(value), "Nd"(port));
}


x86 assembly (clang, -O0):
<outb_p>:
push   %rbp
mov    %rsp,%rbp
mov    %si,%ax
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %ax,-0x4(%rbp)
mov    -0x1(%rbp),%al
mov    -0x4(%rbp),%dx
out    %al,(%dx)
out    %al,$0x80
pop    %rbp
ret

x86 assembly (clang, -O2):
<outb_p>:
mov    %esi,%edx
mov    %edi,%eax
out    %al,(%dx)
out    %al,$0x80
ret

LLVM IR (-O0):
define void @outb_p(i8 zeroext %0, i16 zeroext %1) {
%3 = alloca i8
%4 = alloca i16
store i8 %0, i8* %3
store i16 %1, i16* %4
%5 = load i8, i8* %3
%6 = load i16, i16* %4
ret void
}

LLVM IR (-O2):
define void @outb_p(i8 zeroext %0, i16 zeroext %1) {
tail call void asm sideeffect "outb ${0:b},${1:w}\0Aoutb %al,$$0x80", "{ax},N{dx},~{dirflag},~{fpsr},~{flags}"(i8 %0, i16 %1)
ret void
}
void foo_1_2_2_2_2_1_1_2_2() {}


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

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

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

LLVM IR (-O2):
define void @foo_1_2_2_2_2_1_1_2_2() {
ret void
}
void Keyboard_Cleanup() {}


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

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

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

LLVM IR (-O2):
define void @Keyboard_Cleanup() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ atanl(long double);
long double tanl(int /*<<< orphan*/);
long double tanatanl(long double x) { return (tanl(atanl(x))); }


x86 assembly (clang, -O0):
<tanatanl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
fldt   -0x10(%rbp)
mov    %rsp,%rax
fstpt  (%rax)
call   1030 <atanl@plt>
mov    %eax,%edi
call   1040 <tanl@plt>
fld    %st(0)
fstp   %st(0)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tanatanl>:
sub    $0x18,%rsp
fldt   0x20(%rsp)
fstpt  (%rsp)
call   1030 <atanl@plt>
mov    %eax,%edi
add    $0x18,%rsp
jmp    1040 <tanl@plt>

LLVM IR (-O0):
define x86_fp80 @tanatanl(x86_fp80 %0) {
%2 = alloca x86_fp80
store x86_fp80 %0, x86_fp80* %2
%3 = load x86_fp80, x86_fp80* %2
%4 = call i32 @atanl(x86_fp80 %3)
%5 = call x86_fp80 @tanl(i32 %4)
ret x86_fp80 %5
}

LLVM IR (-O2):
define x86_fp80 @tanatanl(x86_fp80 %0) {
%2 = tail call i32 @atanl(x86_fp80 %0)
%3 = tail call x86_fp80 @tanl(i32 %2)
ret x86_fp80 %3
}
long double acosl(long double x) {
  long double res = 0.0L;
  asm("fld	%%st\n\t"
      "fmul	%%st(0)\n\t"
      "fld1\n\t"
      "fsubp\n\t"
      "fsqrt\n\t"
      "fxch	%%st(1)\n\t"
      "fpatan"
      : "=t"(res)
      : "0"(x)
      : "st(1)");
  return res;
}


x86 assembly (clang, -O0):
<acosl>:
push   %rbp
mov    %rsp,%rbp
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
fldz
fstpt  -0x20(%rbp)
fldt   -0x10(%rbp)
fld    %st(0)
fmul   %st(0),%st
fld1
fsubp  %st,%st(1)
fsqrt
fxch   %st(1)
fpatan
fstpt  -0x20(%rbp)
fldt   -0x20(%rbp)
pop    %rbp
ret

x86 assembly (clang, -O2):
<acosl>:
fldt   0x8(%rsp)
fld    %st(0)
fmul   %st(0),%st
fld1
fsubp  %st,%st(1)
fsqrt
fxch   %st(1)
fpatan
ret

LLVM IR (-O0):
define x86_fp80 @acosl(x86_fp80 %0) {
%2 = alloca x86_fp80
%3 = alloca x86_fp80
store x86_fp80 %0, x86_fp80* %2
store x86_fp80 0xK00000000000000000000, x86_fp80* %3
%4 = load x86_fp80, x86_fp80* %2
%5 = call x86_fp80 asm "fld\09%st\0A\09fmul\09%st(0)\0A\09fld1\0A\09fsubp\0A\09fsqrt\0A\09fxch\09%st(1)\0A\09fpatan", "={st},0,~{st(1)},~{dirflag},~{fpsr},~{flags}"(x86_fp80 %4)
store x86_fp80 %5, x86_fp80* %3
%6 = load x86_fp80, x86_fp80* %3
ret x86_fp80 %6
}

LLVM IR (-O2):
define x86_fp80 @acosl(x86_fp80 %0) {
%2 = tail call x86_fp80 asm "fld\09%st\0A\09fmul\09%st(0)\0A\09fld1\0A\09fsubp\0A\09fsqrt\0A\09fxch\09%st(1)\0A\09fpatan", "={st},0,~{st(1)},~{dirflag},~{fpsr},~{flags}"(x86_fp80 %0)
ret x86_fp80 %2
}
/* Variables and functions */
int /*<<< orphan*/ s2diskyz(float, float, float, float, float);
void s2diskyz_(float *px, float *py, float *pz, float *r1, float *r2) {
  s2diskyz(*px, *py, *pz, *r1, *r2);
}


x86 assembly (clang, -O0):
<s2diskyz_>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    -0x8(%rbp),%rax
movss  (%rax),%xmm0
mov    -0x10(%rbp),%rax
movss  (%rax),%xmm1
mov    -0x18(%rbp),%rax
movss  (%rax),%xmm2
mov    -0x20(%rbp),%rax
movss  (%rax),%xmm3
mov    -0x28(%rbp),%rax
movss  (%rax),%xmm4
call   1030 <s2diskyz@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<s2diskyz_>:
movss  (%rdi),%xmm0
movss  (%rsi),%xmm1
movss  (%rdx),%xmm2
movss  (%rcx),%xmm3
movss  (%r8),%xmm4
jmp    1030 <s2diskyz@plt>

LLVM IR (-O0):
define void @s2diskyz_(float* %0, float* %1, float* %2, float* %3, float* %4) {
%6 = alloca float*
%7 = alloca float*
%8 = alloca float*
%9 = alloca float*
%10 = alloca float*
store float* %0, float** %6
store float* %1, float** %7
store float* %2, float** %8
store float* %3, float** %9
store float* %4, float** %10
%11 = load float*, float** %6
%12 = load float, float* %11
%13 = load float*, float** %7
%14 = load float, float* %13
%15 = load float*, float** %8
%16 = load float, float* %15
%17 = load float*, float** %9
%18 = load float, float* %17
%19 = load float*, float** %10
%20 = load float, float* %19
%21 = call i32 @s2diskyz(float %12, float %14, float %16, float %18, float %20)
ret void
}

LLVM IR (-O2):
define void @s2diskyz_(float* nocapture %0, float* nocapture %1, float* nocapture %2, float* nocapture %3, float* nocapture %4) {
%6 = load float, float* %0
%7 = load float, float* %1
%8 = load float, float* %2
%9 = load float, float* %3
%10 = load float, float* %4
%11 = tail call i32 @s2diskyz(float %6, float %7, float %8, float %9, float %10)
ret void
}
tio(a, f) char *a;
int f;
{
  if (access(a, f) == 0)
    return (1);
  else
    return (0);
}


x86 assembly (clang, -O0):
<tio>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%esi
mov    $0x0,%al
call   1030 <access@plt>
cmp    $0x0,%eax
jne    1142 <tio+0x32>
movl   $0x1,-0x4(%rbp)
jmp    1149 <tio+0x39>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @tio(i8* %0, i32 %1) {
%3 = tail call i32 (i8*, i32, ...) bitcast (i32 (...)* @access to i32 (i8*, i32, ...)*)(i8* %0, i32 %1)
%4 = icmp eq i32 %3, 0
%5 = zext i1 %4 to i32
ret i32 %5
}
void foo(void) {
  unsigned int a[2];
  unsigned int *p = &a[0];
#pragma acc kernels pcopyin(a, p [0:2])
  {
    a[0] = 0;
    *p = 1;
  }
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
lea    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x10(%rbp),%rax
movl   $0x1,(%rax)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @foo() {
%1 = alloca [2 x i32]
%2 = alloca i32*
%3 = getelementptr inbounds [2 x i32], [2 x i32]* %1, i64 0, i64 0
store i32* %3, i32** %2
%4 = getelementptr inbounds [2 x i32], [2 x i32]* %1, i64 0, i64 0
store i32 0, i32* %4
%5 = load i32*, i32** %2
store i32 1, i32* %5
ret void
}

LLVM IR (-O2):
define void @foo() {
ret void
}
/* Variables and functions */
scalar_t__ printf(char *, int);
int main(int num, char *argv[]) {
  while (num <= 10 && printf("%d ", num) && num++) {
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
xor    %eax,%eax
cmpl   $0xa,-0x8(%rbp)
mov    %al,-0x11(%rbp)
jg     116a <main+0x5a>
mov    -0x8(%rbp),%esi
lea    0xec1(%rip),%rdi
call   1030 <printf@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    $0x0,%rcx
mov    %al,-0x11(%rbp)
je     116a <main+0x5a>
mov    -0x8(%rbp),%eax
mov    %eax,%ecx
add    $0x1,%ecx
mov    %ecx,-0x8(%rbp)
cmp    $0x0,%eax
setne  %al
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%al
test   $0x1,%al
jne    117a <main+0x6a>
jmp    117f <main+0x6f>
jmp    1126 <main+0x16>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
cmp    $0xa,%edi
jg     114d <main+0x3d>
mov    %edi,%ebx
lea    0xede(%rip),%r14
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %r14,%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
test   %rax,%rax
je     114d <main+0x3d>
test   %ebx,%ebx
je     114d <main+0x3d>
lea    0x1(%rbx),%eax
cmp    $0xa,%ebx
mov    %eax,%ebx
jl     1130 <main+0x20>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%d \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
br label %6
6: ; preds = %19, %2
%7 = load i32, i32* %4
%8 = icmp sle i32 %7, 10
br i1 %8, label %9, label %17
9: ; preds = %6
%10 = load i32, i32* %4
%11 = call i64 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %10)
%12 = icmp ne i64 %11, 0
br i1 %12, label %13, label %17
13: ; preds = %9
%14 = load i32, i32* %4
%15 = add nsw i32 %14, 1
store i32 %15, i32* %4
%16 = icmp ne i32 %14, 0
br label %17
17: ; preds = %13, %9, %6
%18 = phi i1 [ false, %9 ], [ false, %6 ], [ %16, %13 ]
br i1 %18, label %19, label %20
19: ; preds = %17
br label %6
20: ; preds = %17
%21 = load i32, i32* %3
ret i32 %21
}

LLVM IR (-O2):
@.str = [4 x i8] c"%d \00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = icmp slt i32 %0, 11
br i1 %3, label %4, label %13
4: ; preds = %2, %8
%5 = phi i32 [ %9, %8 ], [ %0, %2 ]
%6 = tail call i64 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %5)
%7 = icmp eq i64 %6, 0
br i1 %7, label %13, label %8
8: ; preds = %4
%9 = add nsw i32 %5, 1
%10 = icmp ne i32 %5, 0
%11 = icmp slt i32 %5, 10
%12 = and i1 %10, %11
br i1 %12, label %4, label %13
13: ; preds = %4, %8, %2
ret i32 0
}
void gdk_event_set_screen() {}


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

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

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

LLVM IR (-O2):
define void @gdk_event_set_screen() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ f0();
__attribute__((noipa)) void f3(int x) {
  if (x % 16 == 13)
    f0();
}


x86 assembly (clang, -O0):
<f3>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x10,%ecx
cltd
idiv   %ecx
cmp    $0xd,%edx
jne    1136 <f3+0x26>
mov    $0x0,%al
call   1030 <f0@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f3>:
lea    0xf(%rdi),%eax
test   %edi,%edi
cmovns %edi,%eax
and    $0xfffffff0,%eax
sub    %eax,%edi
cmp    $0xd,%edi
jne    1129 <f3+0x19>
xor    %eax,%eax
jmp    1030 <f0@plt>
ret

LLVM IR (-O0):
define void @f3(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = srem i32 %3, 16
%5 = icmp eq i32 %4, 13
br i1 %5, label %6, label %8
6: ; preds = %1
%7 = call i32 (...) @f0()
br label %8
8: ; preds = %6, %1
ret void
}

LLVM IR (-O2):
define void @f3(i32 %0) {
%2 = srem i32 %0, 16
%3 = icmp eq i32 %2, 13
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 (...) @f0()
br label %6
6: ; preds = %4, %1
ret void
}
void remot2local(const char *remot, const char *dir, char *local) {
  char *p;
  if ((p = strrchr(remot, '/')))
    p++;
  else
    p = (char *)remot;
  sprintf(local, "%s%c%s", dir, '/', p);
}


x86 assembly (clang, -O0):
<remot2local>:
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    $0x2f,%esi
call   1030 <strrchr@plt>
mov    %rax,-0x20(%rbp)
cmp    $0x0,%rax
je     1161 <remot2local+0x41>
mov    -0x20(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x20(%rbp)
jmp    1169 <remot2local+0x49>
mov    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x10(%rbp),%rdx
mov    -0x20(%rbp),%r8
lea    0xe84(%rip),%rsi
mov    $0x2f,%ecx
mov    $0x0,%al
call   1040 <sprintf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<remot2local>:
push   %r15
push   %r14
push   %rbx
mov    %rdx,%r15
mov    %rsi,%r14
mov    %rdi,%rbx
mov    $0x2f,%esi
call   1030 <strrchr@plt>
lea    0x1(%rax),%r8
test   %rax,%rax
cmove  %rbx,%r8
lea    0xeb6(%rip),%rsi
mov    %r15,%rdi
mov    %r14,%rdx
mov    $0x2f,%ecx
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %r15
jmp    1040 <sprintf@plt>

LLVM IR (-O0):
@.str = [7 x i8] c"%s%c%s\00"
define void @remot2local(i8* %0, i8* %1, i8* %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i8*
store i8* %0, i8** %4
store i8* %1, i8** %5
store i8* %2, i8** %6
%8 = load i8*, i8** %4
%9 = call i8* @strrchr(i8* %8, i32 47)
store i8* %9, i8** %7
%10 = icmp ne i8* %9, null
br i1 %10, label %11, label %14
11: ; preds = %3
%12 = load i8*, i8** %7
%13 = getelementptr inbounds i8, i8* %12, i32 1
store i8* %13, i8** %7
br label %16
14: ; preds = %3
%15 = load i8*, i8** %4
store i8* %15, i8** %7
br label %16
16: ; preds = %14, %11
%17 = load i8*, i8** %6
%18 = load i8*, i8** %5
%19 = load i8*, i8** %7
%20 = call i32 (i8*, i8*, ...) @sprintf(i8* %17, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* %18, i32 47, i8* %19)
ret void
}

LLVM IR (-O2):
@.str = [7 x i8] c"%s%c%s\00"
define void @remot2local(i8* %0, i8* %1, i8* nocapture writeonly %2) {
%4 = tail call i8* @strrchr(i8* dereferenceable(1) %0, i32 47)
%5 = icmp eq i8* %4, null
%6 = getelementptr inbounds i8, i8* %4, i64 1
%7 = select i1 %5, i8* %0, i8* %6
%8 = tail call i32 (i8*, i8*, ...) @sprintf(i8* dereferenceable(1) %2, i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* %1, i32 47, i8* %7)
ret void
}
/* Variables and functions */
int close(int);
int /*<<< orphan*/ debugPrintInt(char *, int);
int closeConnection(int streamID) {
  debugPrintInt("connection : connetion closed: ", streamID);
  return close(streamID);
}


x86 assembly (clang, -O0):
<closeConnection>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%esi
lea    0xecb(%rip),%rdi
call   1040 <debugPrintInt@plt>
mov    -0x4(%rbp),%edi
call   1030 <close@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<closeConnection>:
push   %rbx
mov    %edi,%ebx
lea    0xed6(%rip),%rdi
mov    %ebx,%esi
call   1040 <debugPrintInt@plt>
mov    %ebx,%edi
pop    %rbx
jmp    1030 <close@plt>

LLVM IR (-O0):
@.str = [32 x i8] c"connection : connetion closed: \00"
define i32 @closeConnection(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @debugPrintInt(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), i32 %3)
%5 = load i32, i32* %2
%6 = call i32 @close(i32 %5)
ret i32 %6
}

LLVM IR (-O2):
@.str = [32 x i8] c"connection : connetion closed: \00"
define i32 @closeConnection(i32 %0) {
%2 = tail call i32 @debugPrintInt(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), i32 %0)
%3 = tail call i32 @close(i32 %0)
ret i32 %3
}
/* Variables and functions */
int omp_get_num_threads();
int omp_get_thread_num();
int /*<<< orphan*/ printf(char *, int, int);
int main() {
#pragma omp parallel
  { printf("%d of %d\n", omp_get_thread_num() + 1, omp_get_num_threads()); }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <omp_get_thread_num@plt>
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    $0x0,%al
call   1050 <omp_get_num_threads@plt>
mov    -0x8(%rbp),%esi
mov    %eax,%edx
lea    0xea1(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %eax,%eax
call   1030 <omp_get_thread_num@plt>
lea    0x1(%rax),%ebx
xor    %eax,%eax
call   1050 <omp_get_num_threads@plt>
lea    0xeb7(%rip),%rdi
mov    %ebx,%esi
mov    %eax,%edx
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [10 x i8] c"%d of %d\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @omp_get_thread_num()
%3 = add nsw i32 %2, 1
%4 = call i32 (...) @omp_get_num_threads()
%5 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 %3, i32 %4)
ret i32 0
}

LLVM IR (-O2):
@.str = [10 x i8] c"%d of %d\0A\00"
define i32 @main() {
%1 = tail call i32 (...) @omp_get_thread_num()
%2 = add nsw i32 %1, 1
%3 = tail call i32 (...) @omp_get_num_threads()
%4 = tail call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 %2, i32 %3)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ ft_putchar(char);
void ft_print_middle(int x) {
  ft_putchar('B');
  while (x > 2) {
    ft_putchar(' ');
    x--;
  }
  if (x > 1) {
    ft_putchar('B');
  }
  ft_putchar('\n');
}


x86 assembly (clang, -O0):
<ft_print_middle>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x42,%edi
call   1030 <ft_putchar@plt>
cmpl   $0x2,-0x4(%rbp)
jle    1147 <ft_print_middle+0x37>
mov    $0x20,%edi
call   1030 <ft_putchar@plt>
mov    -0x4(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x4(%rbp)
jmp    1125 <ft_print_middle+0x15>
cmpl   $0x1,-0x4(%rbp)
jle    115b <ft_print_middle+0x4b>
mov    $0x42,%edi
call   1030 <ft_putchar@plt>
mov    $0xa,%edi
call   1030 <ft_putchar@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_print_middle>:
push   %rbx
mov    %edi,%ebx
mov    $0x42,%edi
call   1030 <ft_putchar@plt>
cmp    $0x3,%ebx
jl     1144 <ft_print_middle+0x34>
add    $0x1,%ebx
cs nopw 0x0(%rax,%rax,1)
nop
mov    $0x20,%edi
call   1030 <ft_putchar@plt>
add    $0xffffffff,%ebx
cmp    $0x3,%ebx
ja     1130 <ft_print_middle+0x20>
jmp    1149 <ft_print_middle+0x39>
cmp    $0x2,%ebx
jne    1153 <ft_print_middle+0x43>
mov    $0x42,%edi
call   1030 <ft_putchar@plt>
mov    $0xa,%edi
pop    %rbx
jmp    1030 <ft_putchar@plt>

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

LLVM IR (-O2):
define void @ft_print_middle(i32 %0) {
%2 = tail call i32 @ft_putchar(i8 signext 66)
%3 = icmp sgt i32 %0, 2
br i1 %3, label %4, label %9
4: ; preds = %1, %4
%5 = phi i32 [ %7, %4 ], [ %0, %1 ]
%6 = tail call i32 @ft_putchar(i8 signext 32)
%7 = add nsw i32 %5, -1
%8 = icmp ugt i32 %5, 3
br i1 %8, label %4, label %11
9: ; preds = %1
%10 = icmp eq i32 %0, 2
br i1 %10, label %11, label %13
11: ; preds = %4, %9
%12 = tail call i32 @ft_putchar(i8 signext 66)
br label %13
13: ; preds = %11, %9
%14 = tail call i32 @ft_putchar(i8 signext 10)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ yy_create_buffer(int /*<<< orphan*/ *, int /*<<< orphan*/);
int /*<<< orphan*/ yy_scan_string(char *);
int yyparse();
int /*<<< orphan*/ yypop_buffer_state();
int /*<<< orphan*/ yypush_buffer_state(int /*<<< orphan*/);
int yyparse_string(char *s) {
  yypush_buffer_state(yy_create_buffer(NULL, 0));
  yy_scan_string(s);
  int ret = yyparse();
  yypop_buffer_state();
  return ret;
}


x86 assembly (clang, -O0):
<yyparse_string>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
xor    %eax,%eax
mov    %eax,%edi
xor    %esi,%esi
call   1040 <yy_create_buffer@plt>
mov    %eax,%edi
call   1060 <yypush_buffer_state@plt>
mov    -0x8(%rbp),%rdi
call   1050 <yy_scan_string@plt>
mov    $0x0,%al
call   1030 <yyparse@plt>
mov    %eax,-0xc(%rbp)
mov    $0x0,%al
call   1070 <yypop_buffer_state@plt>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<yyparse_string>:
push   %rbx
mov    %rdi,%rbx
xor    %edi,%edi
xor    %esi,%esi
call   1040 <yy_create_buffer@plt>
mov    %eax,%edi
call   1060 <yypush_buffer_state@plt>
mov    %rbx,%rdi
call   1050 <yy_scan_string@plt>
xor    %eax,%eax
call   1030 <yyparse@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1070 <yypop_buffer_state@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @yyparse_string(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
%4 = call i32 @yy_create_buffer(i32* null, i32 0)
%5 = call i32 @yypush_buffer_state(i32 %4)
%6 = load i8*, i8** %2
%7 = call i32 @yy_scan_string(i8* %6)
%8 = call i32 (...) @yyparse()
store i32 %8, i32* %3
%9 = call i32 (...) @yypop_buffer_state()
%10 = load i32, i32* %3
ret i32 %10
}

LLVM IR (-O2):
define i32 @yyparse_string(i8* %0) {
%2 = tail call i32 @yy_create_buffer(i32* null, i32 0)
%3 = tail call i32 @yypush_buffer_state(i32 %2)
%4 = tail call i32 @yy_scan_string(i8* %0)
%5 = tail call i32 (...) @yyparse()
%6 = tail call i32 (...) @yypop_buffer_state()
ret i32 %5
}
void fill_vram(unsigned int adr, const unsigned char value, unsigned int size) {
  *((unsigned short *)0x2116) = (adr);
  ;
  *((unsigned short *)(0x4300 | ((7) << 4))) = (0x1809);
  ;
  *((void **)(0x4302 | ((7) << 4))) = (&value);
  ;
  *((unsigned short *)(0x4305 | ((7) << 4))) = (size);
  ;
  *((unsigned char *)0x420b) = (1 << 7);
  ;
}


x86 assembly (clang, -O0):
<fill_vram>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %edi,-0x4(%rbp)
mov    %al,-0x5(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%eax
mov    %ax,%cx
mov    $0x2116,%eax
mov    %cx,(%rax)
mov    $0x4370,%eax
movw   $0x1809,(%rax)
mov    $0x4372,%eax
lea    -0x5(%rbp),%rcx
mov    %rcx,(%rax)
mov    -0xc(%rbp),%eax
mov    %ax,%cx
mov    $0x4375,%eax
mov    %cx,(%rax)
mov    $0x420b,%eax
movb   $0x80,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<fill_vram>:
mov    %di,0x2116
movw   $0x1809,0x4370
lea    -0x1(%rsp),%rax
mov    %rax,0x4372
mov    %dx,0x4375
movb   $0x80,0x420b
80
ret

LLVM IR (-O0):
define void @fill_vram(i32 %0, i8 zeroext %1, i32 %2) {
%4 = alloca i32
%5 = alloca i8
%6 = alloca i32
store i32 %0, i32* %4
store i8 %1, i8* %5
store i32 %2, i32* %6
%7 = load i32, i32* %4
%8 = trunc i32 %7 to i16
store i16 %8, i16* inttoptr (i64 8470 to i16*)
store i16 6153, i16* inttoptr (i64 17264 to i16*)
store i8* %5, i8** inttoptr (i64 17266 to i8**)
%9 = load i32, i32* %6
%10 = trunc i32 %9 to i16
store i16 %10, i16* inttoptr (i64 17269 to i16*)
store i8 -128, i8* inttoptr (i64 16907 to i8*)
ret void
}

LLVM IR (-O2):
define void @fill_vram(i32 %0, i8 zeroext %1, i32 %2) {
%4 = alloca i8
%5 = trunc i32 %0 to i16
store i16 %5, i16* inttoptr (i64 8470 to i16*)
store i16 6153, i16* inttoptr (i64 17264 to i16*)
store i8* %4, i8** inttoptr (i64 17266 to i8**)
%6 = trunc i32 %2 to i16
store i16 %6, i16* inttoptr (i64 17269 to i16*)
store i8 -128, i8* inttoptr (i64 16907 to i8*)
ret void
}
int test_imm_59uint8_reg(unsigned char val) {
  return ((val) & (-0x59 << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_59uint8_reg(i8 zeroext %0) {
%2 = and i8 %0, -89
%3 = icmp eq i8 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
int ar_ffs(unsigned int x) {}


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

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

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

LLVM IR (-O2):
define i32 @ar_ffs(i32 %0) {
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ Ask();
int /*<<< orphan*/ Check();
int /*<<< orphan*/ printf(char *);
int main() {
  Ask();
  Check();
  printf("\n\n");
  return 0;
}


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

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

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

LLVM IR (-O2):
@str = [2 x i8] c"\0A\00"
define i32 @main() {
%1 = tail call i32 (...) @Ask()
%2 = tail call i32 (...) @Check()
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([2 x i8], [2 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
unsigned long crc32_c(unsigned char const *, size_t, int /*<<< orphan*/);
void apply_crc(const unsigned char *sbuf, size_t size) {
  unsigned long crc;
  crc = crc32_c(sbuf, size, 0);
  *((unsigned long *)(sbuf + size)) = crc;
}


x86 assembly (clang, -O0):
<apply_crc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
xor    %edx,%edx
call   1030 <crc32_c@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdx
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%rcx
mov    %rdx,(%rax,%rcx,1)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<apply_crc>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
xor    %edx,%edx
call   1030 <crc32_c@plt>
mov    %rax,(%rbx,%r14,1)
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define void @apply_crc(i8* %0, i64 %1) {
%3 = tail call i64 @crc32_c(i8* %0, i64 %1, i32 0)
%4 = getelementptr inbounds i8, i8* %0, i64 %1
%5 = bitcast i8* %4 to i64*
store i64 %3, i64* %5
ret void
}
void netclear() {}


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

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

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

LLVM IR (-O2):
define void @netclear() {
ret void
}
void XtIsWMShell() {}


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

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

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

LLVM IR (-O2):
define void @XtIsWMShell() {
ret void
}
void gtk_spin_button_get_value_as_int() {}


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

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

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

LLVM IR (-O2):
define void @gtk_spin_button_get_value_as_int() {
ret void
}
/* Variables and functions */
double sigmoid(double);
double ACT(double X) {
  return sigmoid(X);
  if (sigmoid(X) < 0.5)
    return 0.0;
  else
    return 1.0;
}


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

x86 assembly (clang, -O2):
<ACT>:
jmp    1030 <sigmoid@plt>

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

LLVM IR (-O2):
define double @ACT(double %0) {
%2 = tail call double @sigmoid(double %0)
ret double %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int strend(char *, char *);
int main() {
  char *s = "abcdefg";
  char *t = "efgfs";
  int ret = strend(s, t);
  printf("%d\n", ret);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rax
mov    %rax,-0x10(%rbp)
lea    0xec7(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1040 <strend@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%esi
lea    0xeaf(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0xed9(%rip),%rsi
call   1040 <strend@plt>
lea    0xed3(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [8 x i8] c"abcdefg\00"
@.str.1 = [6 x i8] c"efgfs\00"
@.str.2 = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i32
store i32 0, i32* %1
store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8** %2
store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8** %3
%5 = load i8*, i8** %2
%6 = load i8*, i8** %3
%7 = call i32 @strend(i8* %5, i8* %6)
store i32 %7, i32* %4
%8 = load i32, i32* %4
%9 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 %8)
ret i32 0
}

LLVM IR (-O2):
@.str = [8 x i8] c"abcdefg\00"
@.str.1 = [6 x i8] c"efgfs\00"
@.str.2 = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = tail call i32 @strend(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 %1)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ do_report(char *, int, int);
int /*<<< orphan*/ erl_init(int /*<<< orphan*/ *, int /*<<< orphan*/);
int /*<<< orphan*/ erl_mk_ref(char *, int, int);
int /*<<< orphan*/ send_term(int /*<<< orphan*/);
void t_erl_mk_ref(void) {
  erl_init(NULL, 0);
  send_term(erl_mk_ref("kalle@localhost", 6, 1));
  do_report("/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
            "2022-01-22/02-19-57/repos/RaimoNiskanen/otp/refs/heads/basho/lib/"
            "erl_interface/test/erl_eterm_SUITE_data/eterm_test.c",
            560, 1);
}


x86 assembly (clang, -O0):
<t_erl_mk_ref>:
push   %rbp
mov    %rsp,%rbp
xor    %eax,%eax
mov    %eax,%edi
xor    %esi,%esi
call   1060 <erl_init@plt>
lea    0xeaa(%rip),%rdi
mov    $0x6,%esi
mov    $0x1,%edx
call   1050 <erl_mk_ref@plt>
mov    %eax,%edi
call   1040 <send_term@plt>
lea    0xe9d(%rip),%rdi
mov    $0x230,%esi
mov    $0x1,%edx
call   1030 <do_report@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_erl_mk_ref>:
push   %rax
xor    %edi,%edi
xor    %esi,%esi
call   1060 <erl_init@plt>
lea    0xeaf(%rip),%rdi
mov    $0x6,%esi
mov    $0x1,%edx
call   1050 <erl_mk_ref@plt>
mov    %eax,%edi
call   1040 <send_term@plt>
lea    0xea2(%rip),%rdi
mov    $0x230,%esi
mov    $0x1,%edx
pop    %rax
jmp    1030 <do_report@plt>

LLVM IR (-O0):
@.str = [16 x i8] c"kalle@localhost\00"
@.str.1 = [182 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/RaimoNiskanen/otp/refs/heads/basho/lib/erl_interface/test/erl_eterm_SUITE_data/eterm_test.c\00"
define void @t_erl_mk_ref() {
%1 = call i32 @erl_init(i32* null, i32 0)
%2 = call i32 @erl_mk_ref(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i32 6, i32 1)
%3 = call i32 @send_term(i32 %2)
%4 = call i32 @do_report(i8* getelementptr inbounds ([182 x i8], [182 x i8]* @.str.1, i64 0, i64 0), i32 560, i32 1)
ret void
}

LLVM IR (-O2):
@.str = [16 x i8] c"kalle@localhost\00"
@.str.1 = [182 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/RaimoNiskanen/otp/refs/heads/basho/lib/erl_interface/test/erl_eterm_SUITE_data/eterm_test.c\00"
define void @t_erl_mk_ref() {
%1 = tail call i32 @erl_init(i32* null, i32 0)
%2 = tail call i32 @erl_mk_ref(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i32 6, i32 1)
%3 = tail call i32 @send_term(i32 %2)
%4 = tail call i32 @do_report(i8* getelementptr inbounds ([182 x i8], [182 x i8]* @.str.1, i64 0, i64 0), i32 560, i32 1)
ret void
}
/* Variables and functions */
int lookup_host(char *);
int main(int argc, char *argv[]) { return lookup_host(argv[1]); }


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
mov    0x8(%rax),%rdi
call   1030 <lookup_host@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
mov    0x8(%rsi),%rdi
jmp    1030 <lookup_host@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 i8**, i8*** %5
%7 = getelementptr inbounds i8*, i8** %6, i64 1
%8 = load i8*, i8** %7
%9 = call i32 @lookup_host(i8* %8)
ret i32 %9
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = getelementptr inbounds i8*, i8** %1, i64 1
%4 = load i8*, i8** %3
%5 = tail call i32 @lookup_host(i8* %4)
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
int compare_int(void *leftp, void *rightp) {
  int left = (int)leftp;
  int right = (int)rightp;
  if (left < right)
    return -1;
  else if (left > right)
    return 1;
  else {
    assert(left == right);
    return 0;
  }
}


x86 assembly (clang, -O0):
<compare_int>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    %eax,-0x1c(%rbp)
mov    -0x18(%rbp),%rax
mov    %eax,-0x20(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0x20(%rbp),%eax
jge    1146 <compare_int+0x36>
movl   $0xffffffff,-0x4(%rbp)
jmp    1178 <compare_int+0x68>
mov    -0x1c(%rbp),%eax
cmp    -0x20(%rbp),%eax
jle    115e <compare_int+0x4e>
movl   $0x1,-0x4(%rbp)
jmp    1178 <compare_int+0x68>
mov    -0x1c(%rbp),%eax
cmp    -0x20(%rbp),%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<compare_int>:
mov    $0xffffffff,%eax
cmp    %esi,%edi
jl     1132 <compare_int+0x22>
mov    $0x1,%eax
jg     1132 <compare_int+0x22>
push   %rax
sete   %al
movzbl %al,%edi
call   1030 <assert@plt>
xor    %eax,%eax
add    $0x8,%rsp
ret

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

LLVM IR (-O2):
define i32 @compare_int(i8* %0, i8* %1) {
%3 = ptrtoint i8* %0 to i64
%4 = trunc i64 %3 to i32
%5 = ptrtoint i8* %1 to i64
%6 = trunc i64 %5 to i32
%7 = icmp slt i32 %4, %6
br i1 %7, label %14, label %8
8: ; preds = %2
%9 = icmp sgt i32 %4, %6
br i1 %9, label %14, label %10
10: ; preds = %8
%11 = icmp eq i32 %4, %6
%12 = zext i1 %11 to i32
%13 = tail call i32 @assert(i32 %12)
br label %14
14: ; preds = %8, %2, %10
%15 = phi i32 [ 0, %10 ], [ -1, %2 ], [ 1, %8 ]
ret i32 %15
}