xunge/DecIR huggingface dataset:
/* Variables and functions */
long double foo(long double const);
int main(int argc, char *argv[]) {
  long double const zero = 0.0L;
  long double const zero_copy = foo(zero);
  long double const positive = 3.14159265358979323846264338328L;
  long double const positive_copy = foo(positive);
  long double const negative = -3.14159265358979323846264338328L;
  long double const negative_copy = foo(negative);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x80,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
fldz
fld    %st(0)
fstpt  -0x20(%rbp)
mov    %rsp,%rax
fstpt  (%rax)
call   1030 <foo@plt>
fstpt  -0x30(%rbp)
fldt   0xebd(%rip)
fld    %st(0)
fstpt  -0x40(%rbp)
mov    %rsp,%rax
fstpt  (%rax)
call   1030 <foo@plt>
fstpt  -0x50(%rbp)
fldt   0xeb5(%rip)
fld    %st(0)
fstpt  -0x60(%rbp)
mov    %rsp,%rax
fstpt  (%rax)
call   1030 <foo@plt>
fstpt  -0x70(%rbp)
xor    %eax,%eax
add    $0x80,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
fldz
fstpt  (%rsp)
call   1030 <foo@plt>
fstp   %st(0)
fldt   0xeda(%rip)
fstpt  (%rsp)
call   1030 <foo@plt>
fstp   %st(0)
fldt   0xeda(%rip)
fstpt  (%rsp)
call   1030 <foo@plt>
fstp   %st(0)
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca x86_fp80
%7 = alloca x86_fp80
%8 = alloca x86_fp80
%9 = alloca x86_fp80
%10 = alloca x86_fp80
%11 = alloca x86_fp80
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store x86_fp80 0xK00000000000000000000, x86_fp80* %6
%12 = call x86_fp80 @foo(x86_fp80 0xK00000000000000000000)
store x86_fp80 %12, x86_fp80* %7
store x86_fp80 0xK4000C90FDAA22168C235, x86_fp80* %8
%13 = call x86_fp80 @foo(x86_fp80 0xK4000C90FDAA22168C235)
store x86_fp80 %13, x86_fp80* %9
store x86_fp80 0xKC000C90FDAA22168C235, x86_fp80* %10
%14 = call x86_fp80 @foo(x86_fp80 0xKC000C90FDAA22168C235)
store x86_fp80 %14, x86_fp80* %11
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call x86_fp80 @foo(x86_fp80 0xK00000000000000000000)
%4 = tail call x86_fp80 @foo(x86_fp80 0xK4000C90FDAA22168C235)
%5 = tail call x86_fp80 @foo(x86_fp80 0xKC000C90FDAA22168C235)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ assert(int /*<<< orphan*/);
int main() {
  int x = 2;
  switch (x) {
  default:
    assert(0);
    break;
  case 2:
    break;
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x2,-0x8(%rbp)
mov    -0x8(%rbp),%eax
sub    $0x2,%eax
je     1143 <main+0x33>
jmp    1137 <main+0x27>
xor    %edi,%edi
call   1030 <assert@plt>
jmp    1148 <main+0x38>
jmp    1148 <main+0x38>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 2, i32* %2
%3 = load i32, i32* %2
switch i32 %3, label %4 [
i32 2, label %6
]
4: ; preds = %0
%5 = call i32 @assert(i32 0)
br label %7
6: ; preds = %0
br label %7
7: ; preds = %6, %4
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
int ands_si_test3(int a, int b, int c) {
  int d = a & (b << 3);
  if (d == 0)
    return a + c;
  else
    return b + d + c;
}


x86 assembly (clang, -O0):
<ands_si_test3>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%eax
mov    -0xc(%rbp),%ecx
shl    $0x3,%ecx
and    %ecx,%eax
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
jne    1133 <ands_si_test3+0x33>
mov    -0x8(%rbp),%eax
add    -0x10(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    113f <ands_si_test3+0x3f>
mov    -0xc(%rbp),%eax
add    -0x14(%rbp),%eax
add    -0x10(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ands_si_test3>:
lea    0x0(,%rsi,8),%ecx
and    %edi,%ecx
lea    (%rsi,%rcx,1),%eax
test   %ecx,%ecx
cmove  %edi,%eax
add    %edx,%eax
ret

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

LLVM IR (-O2):
define i32 @ands_si_test3(i32 %0, i32 %1, i32 %2) {
%4 = shl i32 %1, 3
%5 = and i32 %4, %0
%6 = icmp eq i32 %5, 0
%7 = add nsw i32 %5, %1
%8 = select i1 %6, i32 %0, i32 %7
%9 = add nsw i32 %8, %2
ret i32 %9
}
/* Variables and functions */
int EOF;
int getchar();
void purge(void) {
  int c;
  while ((c = getchar()) != '\n' && c != EOF) {
    ;
  }
}


x86 assembly (clang, -O0):
<purge>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <getchar@plt>
mov    %eax,%ecx
mov    %ecx,-0x4(%rbp)
xor    %eax,%eax
cmp    $0xa,%ecx
mov    %al,-0x5(%rbp)
je     1144 <purge+0x34>
mov    -0x4(%rbp),%eax
mov    0x2eac(%rip),%rcx
cmp    (%rcx),%eax
setne  %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
test   $0x1,%al
jne    1154 <purge+0x44>
jmp    1159 <purge+0x49>
jmp    1118 <purge+0x8>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<purge>:
push   %rbx
mov    0x2ed0(%rip),%rbx
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1030 <getchar@plt>
cmp    $0xa,%eax
je     1130 <purge+0x20>
cmp    (%rbx),%eax
jne    1120 <purge+0x10>
pop    %rbx
ret

LLVM IR (-O0):
@EOF = global i32 0
define void @purge() {
%1 = alloca i32
br label %2
2: ; preds = %11, %0
%3 = call i32 (...) @getchar()
store i32 %3, i32* %1
%4 = icmp ne i32 %3, 10
br i1 %4, label %5, label %9
5: ; preds = %2
%6 = load i32, i32* %1
%7 = load i32, i32* @EOF
%8 = icmp ne i32 %6, %7
br label %9
9: ; preds = %5, %2
%10 = phi i1 [ false, %2 ], [ %8, %5 ]
br i1 %10, label %11, label %12
11: ; preds = %9
br label %2
12: ; preds = %9
ret void
}

LLVM IR (-O2):
@EOF = global i32 0
define void @purge() {
br label %1
1: ; preds = %1, %0
%2 = tail call i32 (...) @getchar()
%3 = icmp ne i32 %2, 10
%4 = load i32, i32* @EOF
%5 = icmp ne i32 %2, %4
%6 = select i1 %3, i1 %5, i1 false
br i1 %6, label %1, label %7
7: ; preds = %1
ret void
}
float test_cbrtf(float x) { return __builtin_cbrtf(x); }


x86 assembly (clang, -O0):
<test_cbrtf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
call   1030 <cbrtf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_cbrtf>:
jmp    1030 <cbrtf@plt>

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

LLVM IR (-O2):
define float @test_cbrtf(float %0) {
%2 = tail call float @cbrtf(float %0)
ret float %2
}
int tmr_set_prescaler(int p, int value) {
  int offset = p * 8;
  value &= 0xFF;
  if (p < 0 || p > 3)
    return -1;
  (*(volatile unsigned *)0x1d50000) &= ~(0xFF << offset);
  (*(volatile unsigned *)0x1d50000) |= (value << offset);
  return 0;
}


x86 assembly (clang, -O0):
<tmr_set_prescaler>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%eax
shl    $0x3,%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
and    $0xff,%eax
mov    %eax,-0xc(%rbp)
cmpl   $0x0,-0x8(%rbp)
jl     1132 <tmr_set_prescaler+0x32>
cmpl   $0x3,-0x8(%rbp)
jle    113e <tmr_set_prescaler+0x3e>
movl   $0xffffffff,-0x4(%rbp)
jmp    117a <tmr_set_prescaler+0x7a>
mov    -0x10(%rbp),%ecx
mov    $0xff,%eax
shl    %cl,%eax
xor    $0xffffffff,%eax
mov    $0x1d50000,%ecx
mov    (%rcx),%ecx
and    %eax,%ecx
mov    $0x1d50000,%eax
mov    %ecx,(%rax)
mov    -0xc(%rbp),%eax
mov    -0x10(%rbp),%ecx
shl    %cl,%eax
mov    $0x1d50000,%ecx
mov    (%rcx),%ecx
or     %eax,%ecx
mov    $0x1d50000,%eax
mov    %ecx,(%rax)
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<tmr_set_prescaler>:
mov    $0xffffffff,%eax
cmp    $0x3,%edi
ja     112e <tmr_set_prescaler+0x2e>
mov    %edi,%ecx
shl    $0x3,%ecx
mov    $0xff,%eax
shl    %cl,%eax
not    %eax
and    %eax,0x1d50000
movzbl %sil,%eax
shl    %cl,%eax
or     %eax,0x1d50000
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @tmr_set_prescaler(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
%7 = load i32, i32* %4
%8 = mul nsw i32 %7, 8
store i32 %8, i32* %6
%9 = load i32, i32* %5
%10 = and i32 %9, 255
store i32 %10, i32* %5
%11 = load i32, i32* %4
%12 = icmp slt i32 %11, 0
br i1 %12, label %16, label %13
13: ; preds = %2
%14 = load i32, i32* %4
%15 = icmp sgt i32 %14, 3
br i1 %15, label %16, label %17
16: ; preds = %13, %2
store i32 -1, i32* %3
br label %28
17: ; preds = %13
%18 = load i32, i32* %6
%19 = shl i32 255, %18
%20 = xor i32 %19, -1
%21 = load volatile i32, i32* inttoptr (i64 30736384 to i32*)
%22 = and i32 %21, %20
store volatile i32 %22, i32* inttoptr (i64 30736384 to i32*)
%23 = load i32, i32* %5
%24 = load i32, i32* %6
%25 = shl i32 %23, %24
%26 = load volatile i32, i32* inttoptr (i64 30736384 to i32*)
%27 = or i32 %26, %25
store volatile i32 %27, i32* inttoptr (i64 30736384 to i32*)
store i32 0, i32* %3
br label %28
28: ; preds = %17, %16
%29 = load i32, i32* %3
ret i32 %29
}

LLVM IR (-O2):
define i32 @tmr_set_prescaler(i32 %0, i32 %1) {
%3 = shl nsw i32 %0, 3
%4 = icmp ugt i32 %0, 3
br i1 %4, label %14, label %5
5: ; preds = %2
%6 = and i32 %1, 255
%7 = shl i32 255, %3
%8 = xor i32 %7, -1
%9 = load volatile i32, i32* inttoptr (i64 30736384 to i32*)
%10 = and i32 %9, %8
store volatile i32 %10, i32* inttoptr (i64 30736384 to i32*)
%11 = shl i32 %6, %3
%12 = load volatile i32, i32* inttoptr (i64 30736384 to i32*)
%13 = or i32 %12, %11
store volatile i32 %13, i32* inttoptr (i64 30736384 to i32*)
br label %14
14: ; preds = %2, %5
%15 = phi i32 [ 0, %5 ], [ -1, %2 ]
ret i32 %15
}
int main(void) {
  char original[10 + 1] = "cadena";
  char copia[10 + 1];
  int i;
  for (i = 0; original[i] != '\0'; i++) {
    copia[i] = original[i];
  }
  copia[i] = '\0';
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
mov    0xeee(%rip),%rax
mov    %rax,-0xf(%rbp)
mov    0xeeb(%rip),%ax
mov    %ax,-0x7(%rbp)
mov    0xee3(%rip),%al
mov    %al,-0x5(%rbp)
movl   $0x0,-0x20(%rbp)
movslq -0x20(%rbp),%rax
movsbl -0xf(%rbp,%rax,1),%eax
cmp    $0x0,%eax
je     1161 <main+0x61>
movslq -0x20(%rbp),%rax
mov    -0xf(%rbp,%rax,1),%cl
movslq -0x20(%rbp),%rax
mov    %cl,-0x1a(%rbp,%rax,1)
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
jmp    1131 <main+0x31>
movslq -0x20(%rbp),%rax
movb   $0x0,-0x1a(%rbp,%rax,1)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
@__const.main.original = [11 x i8] c"cadena\00\00\00\00\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [11 x i8]
%3 = alloca [11 x i8]
%4 = alloca i32
store i32 0, i32* %1
%5 = bitcast [11 x i8]* %2 to i8*
store i32 0, i32* %4
br label %6
6: ; preds = %21, %0
%7 = load i32, i32* %4
%8 = sext i32 %7 to i64
%9 = getelementptr inbounds [11 x i8], [11 x i8]* %2, i64 0, i64 %8
%10 = load i8, i8* %9
%11 = sext i8 %10 to i32
%12 = icmp ne i32 %11, 0
br i1 %12, label %13, label %24
13: ; preds = %6
%14 = load i32, i32* %4
%15 = sext i32 %14 to i64
%16 = getelementptr inbounds [11 x i8], [11 x i8]* %2, i64 0, i64 %15
%17 = load i8, i8* %16
%18 = load i32, i32* %4
%19 = sext i32 %18 to i64
%20 = getelementptr inbounds [11 x i8], [11 x i8]* %3, i64 0, i64 %19
store i8 %17, i8* %20
br label %21
21: ; preds = %13
%22 = load i32, i32* %4
%23 = add nsw i32 %22, 1
store i32 %23, i32* %4
br label %6
24: ; preds = %6
%25 = load i32, i32* %4
%26 = sext i32 %25 to i64
%27 = getelementptr inbounds [11 x i8], [11 x i8]* %3, i64 0, i64 %26
store i8 0, i8* %27
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
void go_run_finalizer(void (*f)(void *), void *obj) { f(obj); }


x86 assembly (clang, -O0):
<go_run_finalizer>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%rdi
call   *%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<go_run_finalizer>:
mov    %rdi,%rax
mov    %rsi,%rdi
jmp    *%rax

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

LLVM IR (-O2):
define void @go_run_finalizer(void (i8*)* nocapture %0, i8* %1) {
tail call void %0(i8* %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char const *);
void printStatement(const char *statement) {
  printf("************************** %s **************************\n",
         statement);
}


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

x86 assembly (clang, -O2):
<printStatement>:
mov    %rdi,%rsi
lea    0xee6(%rip),%rdi
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [58 x i8] c"************************** %s **************************\0A\00"
define void @printStatement(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
scalar_t__ readline(char *, int);
int /*<<< orphan*/ reverse(char *);
int main() {
  int len, c;
  char line[1000];
  while ((readline(line, 1000)) > 0) {
    reverse(line);
    printf("%s", line);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x400,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x400(%rbp),%rdi
mov    $0x3e8,%esi
call   1050 <readline@plt>
cmp    $0x0,%rax
jle    1181 <main+0x51>
lea    -0x400(%rbp),%rdi
call   1030 <reverse@plt>
lea    -0x400(%rbp),%rsi
lea    0xe89(%rip),%rdi
call   1040 <printf@plt>
jmp    1142 <main+0x12>
xor    %eax,%eax
add    $0x400,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0x3e8,%rsp
mov    %rsp,%rdi
mov    $0x3e8,%esi
call   1050 <readline@plt>
test   %rax,%rax
jle    1185 <main+0x55>
mov    %rsp,%rbx
lea    0xeaa(%rip),%r14
cs nopw 0x0(%rax,%rax,1)
mov    %rbx,%rdi
call   1030 <reverse@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
call   1040 <printf@plt>
mov    %rbx,%rdi
mov    $0x3e8,%esi
call   1050 <readline@plt>
test   %rax,%rax
jg     1160 <main+0x30>
xor    %eax,%eax
add    $0x3e8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
define i32 @main() {
%1 = alloca [1000 x i8]
%2 = getelementptr inbounds [1000 x i8], [1000 x i8]* %1, i64 0, i64 0
%3 = call i64 @readline(i8* %2, i32 1000)
%4 = icmp sgt i64 %3, 0
br i1 %4, label %5, label %10
5: ; preds = %0, %5
%6 = call i32 @reverse(i8* %2)
%7 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %2)
%8 = call i64 @readline(i8* %2, i32 1000)
%9 = icmp sgt i64 %8, 0
br i1 %9, label %5, label %10
10: ; preds = %5, %0
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
main() { printf("hello,world\n"); }


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

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

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

LLVM IR (-O2):
@str = [12 x i8] c"hello,world\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int STC3115_ReadBytes(unsigned char *, int, int);
int STC3115_ReadRamData(unsigned char *RamData) {
  return STC3115_ReadBytes(RamData, 0x20, 16);
}


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

x86 assembly (clang, -O2):
<STC3115_ReadRamData>:
mov    $0x20,%esi
mov    $0x10,%edx
jmp    1030 <STC3115_ReadBytes@plt>

LLVM IR (-O0):
define i32 @STC3115_ReadRamData(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @STC3115_ReadBytes(i8* %3, i32 32, i32 16)
ret i32 %4
}

LLVM IR (-O2):
define i32 @STC3115_ReadRamData(i8* %0) {
%2 = tail call i32 @STC3115_ReadBytes(i8* %0, i32 32, i32 16)
ret i32 %2
}
int compact_nodes() { return 1; }


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

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

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

LLVM IR (-O2):
define i32 @compact_nodes() {
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void reverced_print(int *str, size_t size) {
  int i;
  for (i = size - 1; i >= 0; i--) {
    printf("%d ", *(str + i));
  }
}


x86 assembly (clang, -O0):
<reverced_print>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
sub    $0x1,%rax
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
jl     115a <reverced_print+0x4a>
mov    -0x8(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,4),%esi
lea    0xeb9(%rip),%rdi
call   1030 <printf@plt>
mov    -0x14(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x14(%rbp)
jmp    112b <reverced_print+0x1b>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<reverced_print>:
push   %r15
push   %r14
push   %rbx
mov    %rsi,%r15
mov    %r15d,%eax
add    $0xffffffff,%eax
js     1147 <reverced_print+0x37>
mov    %eax,%eax
lea    (%rdi,%rax,4),%rbx
lea    0xed3(%rip),%r14
nopl   (%rax)
mov    (%rbx),%esi
mov    %r14,%rdi
call   1030 <printf@plt>
add    $0xffffffff,%r15d
add    $0xfffffffffffffffc,%rbx
test   %r15d,%r15d
jg     1130 <reverced_print+0x20>
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%d \00"
define void @reverced_print(i32* %0, i64 %1) {
%3 = alloca i32*
%4 = alloca i64
%5 = alloca i32
store i32* %0, i32** %3
store i64 %1, i64* %4
%6 = load i64, i64* %4
%7 = sub i64 %6, 1
%8 = trunc i64 %7 to i32
store i32 %8, i32* %5
br label %9
9: ; preds = %19, %2
%10 = load i32, i32* %5
%11 = icmp sge i32 %10, 0
br i1 %11, label %12, label %22
12: ; preds = %9
%13 = load i32*, i32** %3
%14 = load i32, i32* %5
%15 = sext i32 %14 to i64
%16 = getelementptr inbounds i32, i32* %13, i64 %15
%17 = load i32, i32* %16
%18 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %17)
br label %19
19: ; preds = %12
%20 = load i32, i32* %5
%21 = add nsw i32 %20, -1
store i32 %21, i32* %5
br label %9
22: ; preds = %9
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"%d \00"
define void @reverced_print(i32* nocapture %0, i64 %1) {
%3 = trunc i64 %1 to i32
%4 = add i32 %3, -1
%5 = icmp sgt i32 %4, -1
br i1 %5, label %6, label %14
6: ; preds = %2, %6
%7 = phi i32 [ %12, %6 ], [ %4, %2 ]
%8 = zext i32 %7 to i64
%9 = getelementptr inbounds i32, i32* %0, i64 %8
%10 = load i32, i32* %9
%11 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %10)
%12 = add nsw i32 %7, -1
%13 = icmp sgt i32 %7, 0
br i1 %13, label %6, label %14
14: ; preds = %6, %2
ret void
}
testandmkdir(dir) char *dir;
{
  if (!isdir(dir)) {
    char path[1024 + 12];
    sprintf(path, "mkdir -p %s", dir);
    system(path);
  }
}


x86 assembly (clang, -O0):
<testandmkdir>:
push   %rbp
mov    %rsp,%rbp
sub    $0x420,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    $0x0,%al
call   1040 <isdir@plt>
cmp    $0x0,%eax
jne    117a <testandmkdir+0x4a>
lea    -0x420(%rbp),%rdi
mov    -0x10(%rbp),%rdx
lea    0xe9b(%rip),%rsi
mov    $0x0,%al
call   1050 <sprintf@plt>
lea    -0x420(%rbp),%rdi
mov    $0x0,%al
call   1030 <system@plt>
mov    -0x4(%rbp),%eax
add    $0x420,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<testandmkdir>:
push   %r14
push   %rbx
sub    $0x418,%rsp
mov    %rdi,%rbx
xor    %eax,%eax
call   1040 <isdir@plt>
test   %eax,%eax
jne    1169 <testandmkdir+0x39>
lea    0xeb1(%rip),%rsi
mov    %rsp,%r14
mov    %r14,%rdi
mov    %rbx,%rdx
xor    %eax,%eax
call   1050 <sprintf@plt>
mov    %r14,%rdi
xor    %eax,%eax
call   1030 <system@plt>
add    $0x418,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [12 x i8] c"mkdir -p %s\00"
define i32 @testandmkdir(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca [1036 x i8]
store i8* %0, i8** %3
%5 = load i8*, i8** %3
%6 = call i32 (i8*, ...) bitcast (i32 (...)* @isdir to i32 (i8*, ...)*)(i8* %5)
%7 = icmp ne i32 %6, 0
br i1 %7, label %14, label %8
8: ; preds = %1
%9 = getelementptr inbounds [1036 x i8], [1036 x i8]* %4, i64 0, i64 0
%10 = load i8*, i8** %3
%11 = call i32 (i8*, i8*, ...) @sprintf(i8* %9, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* %10)
%12 = getelementptr inbounds [1036 x i8], [1036 x i8]* %4, i64 0, i64 0
%13 = call i32 (i8*, ...) bitcast (i32 (...)* @system to i32 (i8*, ...)*)(i8* %12)
br label %14
14: ; preds = %8, %1
%15 = load i32, i32* %2
ret i32 %15
}

LLVM IR (-O2):
@.str = [12 x i8] c"mkdir -p %s\00"
define i32 @testandmkdir(i8* %0) {
%2 = alloca [1036 x i8]
%3 = tail call i32 (i8*, ...) bitcast (i32 (...)* @isdir to i32 (i8*, ...)*)(i8* %0)
%4 = icmp eq i32 %3, 0
br i1 %4, label %5, label %9
5: ; preds = %1
%6 = getelementptr inbounds [1036 x i8], [1036 x i8]* %2, i64 0, i64 0
%7 = call i32 (i8*, i8*, ...) @sprintf(i8* %6, i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* %0)
%8 = call i32 (i8*, ...) bitcast (i32 (...)* @system to i32 (i8*, ...)*)(i8* %6)
br label %9
9: ; preds = %5, %1
ret i32 undef
}
/* Type definitions */
struct qnode {
  int dummy;
};

/* Variables and functions */
int is_qempty(struct qnode *front) { return (front == NULL) ? 1 : 0; }


x86 assembly (clang, -O0):
<is_qempty>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdx
xor    %eax,%eax
mov    $0x1,%ecx
cmp    $0x0,%rdx
cmove  %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_qempty>:
xor    %eax,%eax
test   %rdi,%rdi
sete   %al
ret

LLVM IR (-O0):
%struct.qnode = type { i32 }
define i32 @is_qempty(%struct.qnode* %0) {
%2 = alloca %struct.qnode*
store %struct.qnode* %0, %struct.qnode** %2
%3 = load %struct.qnode*, %struct.qnode** %2
%4 = icmp eq %struct.qnode* %3, null
%5 = zext i1 %4 to i64
%6 = select i1 %4, i32 1, i32 0
ret i32 %6
}

LLVM IR (-O2):
%struct.qnode = type { i32 }
define i32 @is_qempty(%struct.qnode* readnone %0) {
%2 = icmp eq %struct.qnode* %0, null
%3 = zext i1 %2 to i32
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int pa_idxset_remove_by_index() {
  printf("NOT IMPLEMENTED:"
         "pa_idxset_remove_by_index"
         "\n");
}


x86 assembly (clang, -O0):
<pa_idxset_remove_by_index>:
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_idxset_remove_by_index>:
lea    0xee9(%rip),%rdi
jmp    1030 <puts@plt>

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

LLVM IR (-O2):
@str = [42 x i8] c"NOT IMPLEMENTED:pa_idxset_remove_by_index\00"
define i32 @pa_idxset_remove_by_index() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([42 x i8], [42 x i8]* @str, i64 0, i64 0))
ret i32 undef
}
__attribute__((no, noclone)) int f14(void *a, int b, int *c, int *d) {
  asm volatile("" : : "r"(a), "r"(b), "r"(c), "r"(d) : "memory");
  return 0;
}


x86 assembly (clang, -O0):
<f14>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rsi
xor    %eax,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @f14(i8* %0, i32 %1, i32* %2, i32* %3) {
tail call void asm sideeffect "", "r,r,r,r,~{memory},~{dirflag},~{fpsr},~{flags}"(i8* %0, i32 %1, i32* %2, i32* %3)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ ERR_free_strings();
int /*<<< orphan*/ EVP_cleanup();
void destroySSL() {
  ERR_free_strings();
  EVP_cleanup();
}


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

x86 assembly (clang, -O2):
<destroySSL>:
push   %rax
xor    %eax,%eax
call   1040 <ERR_free_strings@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <EVP_cleanup@plt>

LLVM IR (-O0):
define void @destroySSL() {
%1 = call i32 (...) @ERR_free_strings()
%2 = call i32 (...) @EVP_cleanup()
ret void
}

LLVM IR (-O2):
define void @destroySSL() {
%1 = tail call i32 (...) @ERR_free_strings()
%2 = tail call i32 (...) @EVP_cleanup()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ testBatchingTransmit(int /*<<< orphan*/);
void testServerBatchingTransmit() { testBatchingTransmit(0); }


x86 assembly (clang, -O0):
<testServerBatchingTransmit>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
call   1030 <testBatchingTransmit@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<testServerBatchingTransmit>:
xor    %edi,%edi
jmp    1030 <testBatchingTransmit@plt>

LLVM IR (-O0):
define void @testServerBatchingTransmit() {
%1 = call i32 @testBatchingTransmit(i32 0)
ret void
}

LLVM IR (-O2):
define void @testServerBatchingTransmit() {
%1 = tail call i32 @testBatchingTransmit(i32 0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ CG_ParseTagConnect(int);
void CG_ParseTagConnects(void) {
  int i;
  for (i = ((((((((((((64 + 256) + 256) + 32) + 1) + 64) + 16) + 64) + 16) +
               18) +
              18) +
             16) +
            8);
       i <
       ((((((((((((64 + 256) + 256) + 32) + 1) + 64) + 16) + 64) + 16) + 18) +
          18) +
         16) +
        8) +
           64;
       i++) {
    CG_ParseTagConnect(i);
  }
}


x86 assembly (clang, -O0):
<CG_ParseTagConnects>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x33d,-0x4(%rbp)
cmpl   $0x37d,-0x4(%rbp)
jge    1142 <CG_ParseTagConnects+0x32>
mov    -0x4(%rbp),%edi
call   1030 <CG_ParseTagConnect@plt>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    111f <CG_ParseTagConnects+0xf>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<CG_ParseTagConnects>:
push   %rbx
mov    $0x33d,%ebx
cs nopw 0x0(%rax,%rax,1)
mov    %ebx,%edi
call   1030 <CG_ParseTagConnect@plt>
add    $0x1,%ebx
cmp    $0x37d,%ebx
jne    1120 <CG_ParseTagConnects+0x10>
pop    %rbx
ret

LLVM IR (-O0):
define void @CG_ParseTagConnects() {
%1 = alloca i32
store i32 829, i32* %1
br label %2
2: ; preds = %8, %0
%3 = load i32, i32* %1
%4 = icmp slt i32 %3, 893
br i1 %4, label %5, label %11
5: ; preds = %2
%6 = load i32, i32* %1
%7 = call i32 @CG_ParseTagConnect(i32 %6)
br label %8
8: ; preds = %5
%9 = load i32, i32* %1
%10 = add nsw i32 %9, 1
store i32 %10, i32* %1
br label %2
11: ; preds = %2
ret void
}

LLVM IR (-O2):
define void @CG_ParseTagConnects() {
br label %1
1: ; preds = %0, %1
%2 = phi i32 [ 829, %0 ], [ %4, %1 ]
%3 = tail call i32 @CG_ParseTagConnect(i32 %2)
%4 = add nuw nsw i32 %2, 1
%5 = icmp eq i32 %4, 893
br i1 %5, label %6, label %1
6: ; preds = %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ NotToRemove2();
void foo() { NotToRemove2(); }


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

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

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

LLVM IR (-O2):
define void @foo() {
%1 = tail call i32 (...) @NotToRemove2()
ret void
}
/* Variables and functions */
int is_prime(int);
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int num;
  scanf("%d", &num);
  printf("%d", is_prime(num));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1050 <scanf@plt>
mov    -0x8(%rbp),%edi
call   1040 <is_prime@plt>
mov    %eax,%esi
lea    0xea0(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
lea    0xec4(%rip),%rbx
lea    0xc(%rsp),%rsi
mov    %rbx,%rdi
call   1050 <scanf@plt>
mov    0xc(%rsp),%edi
call   1040 <is_prime@plt>
mov    %rbx,%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%4 = load i32, i32* %1
%5 = call i32 @is_prime(i32 %4)
%6 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %5)
ret i32 0
}
/* Type definitions */
typedef int __m64;

/* Variables and functions */
__m64 __attribute__((__always___, __nodebug__))
_mm_or_si64(__m64 __m1, __m64 __m2) {
  return __m1 | __m2;
}


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

x86 assembly (clang, -O2):
<_mm_or_si64>:
mov    %edi,%eax
or     %esi,%eax
ret

LLVM IR (-O0):
define i32 @_mm_or_si64(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 = or i32 %5, %6
ret i32 %7
}

LLVM IR (-O2):
define i32 @_mm_or_si64(i32 %0, i32 %1) {
%3 = or i32 %1, %0
ret i32 %3
}
const char *DLL_GetArtist(void *mid) { return ""; }


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

x86 assembly (clang, -O2):
<DLL_GetArtist>:
lea    0xef9(%rip),%rax
ret

LLVM IR (-O0):
@.str = [1 x i8] zeroinitializer
define i8* @DLL_GetArtist(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
ret i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [1 x i8] zeroinitializer
define i8* @DLL_GetArtist(i8* nocapture readnone %0) {
ret i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
char isinf(double);
char futhark_isinf64(double x) { return isinf(x); }


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

x86 assembly (clang, -O2):
<futhark_isinf64>:
jmp    1030 <isinf@plt>

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

LLVM IR (-O2):
define signext i8 @futhark_isinf64(double %0) {
%2 = tail call signext i8 @isinf(double %0)
ret i8 %2
}
int mtk_bt_enable(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @mtk_bt_enable() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ _throw_null_fn(char *, int);
void *_check_null(void *ptr) {
  if (ptr == 0)
    (_throw_null_fn("/scratch/repos/new/home/jordi_armengol_estape/c-scraper/"
                    "outputs/2022-01-22/02-19-57/repos/pippijn/cyclone/refs/"
                    "heads/master/old/bin/cyc-lib/vc_cyc_include.h",
                    121));
  return ptr;
}


x86 assembly (clang, -O0):
<_check_null>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    1138 <_check_null+0x28>
lea    0xed2(%rip),%rdi
mov    $0x79,%esi
call   1030 <_throw_null_fn@plt>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_check_null>:
push   %rbx
mov    %rdi,%rbx
test   %rdi,%rdi
jne    112a <_check_null+0x1a>
lea    0xee0(%rip),%rdi
mov    $0x79,%esi
call   1030 <_throw_null_fn@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [157 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/pippijn/cyclone/refs/heads/master/old/bin/cyc-lib/vc_cyc_include.h\00"
define i8* @_check_null(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = icmp eq i8* %3, null
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = call i32 @_throw_null_fn(i8* getelementptr inbounds ([157 x i8], [157 x i8]* @.str, i64 0, i64 0), i32 121)
br label %7
7: ; preds = %5, %1
%8 = load i8*, i8** %2
ret i8* %8
}

LLVM IR (-O2):
@.str = [157 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/pippijn/cyclone/refs/heads/master/old/bin/cyc-lib/vc_cyc_include.h\00"
define i8* @_check_null(i8* readnone returned %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %3, label %5
3: ; preds = %1
%4 = tail call i32 @_throw_null_fn(i8* getelementptr inbounds ([157 x i8], [157 x i8]* @.str, i64 0, i64 0), i32 121)
br label %5
5: ; preds = %3, %1
ret i8* %0
}
/* Type definitions */
typedef scalar_t__ int16_t;

/* Variables and functions */
int gca_search_int16(const void *aa, void *bb) {
  const int16_t a = *(const int16_t *)aa;
  const int16_t b = *(int16_t *)bb;
  return (((a) > (b)) - ((b) > (a)));
}


x86 assembly (clang, -O0):
<gca_search_int16>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rax
cmp    -0x20(%rbp),%rax
setg   %al
and    $0x1,%al
movzbl %al,%eax
mov    -0x20(%rbp),%rcx
cmp    -0x18(%rbp),%rcx
setg   %cl
and    $0x1,%cl
movzbl %cl,%ecx
sub    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<gca_search_int16>:
mov    (%rdi),%rcx
mov    (%rsi),%rdx
xor    %eax,%eax
xor    %esi,%esi
cmp    %rdx,%rcx
setg   %al
setl   %sil
sub    %esi,%eax
ret

LLVM IR (-O0):
define i32 @gca_search_int16(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i64
%6 = alloca i64
store i8* %0, i8** %3
store i8* %1, i8** %4
%7 = load i8*, i8** %3
%8 = bitcast i8* %7 to i64*
%9 = load i64, i64* %8
store i64 %9, i64* %5
%10 = load i8*, i8** %4
%11 = bitcast i8* %10 to i64*
%12 = load i64, i64* %11
store i64 %12, i64* %6
%13 = load i64, i64* %5
%14 = load i64, i64* %6
%15 = icmp sgt i64 %13, %14
%16 = zext i1 %15 to i32
%17 = load i64, i64* %6
%18 = load i64, i64* %5
%19 = icmp sgt i64 %17, %18
%20 = zext i1 %19 to i32
%21 = sub nsw i32 %16, %20
ret i32 %21
}

LLVM IR (-O2):
define i32 @gca_search_int16(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i64*
%4 = load i64, i64* %3
%5 = bitcast i8* %1 to i64*
%6 = load i64, i64* %5
%7 = icmp sgt i64 %4, %6
%8 = zext i1 %7 to i32
%9 = icmp sgt i64 %6, %4
%10 = sext i1 %9 to i32
%11 = add nsw i32 %10, %8
ret i32 %11
}
/* Variables and functions */
int /*<<< orphan*/ __CPROVER_assume(int);
int /*<<< orphan*/ f(unsigned int);
int main() {
  unsigned int x;
  __CPROVER_assume(x <= 10);
  f(x);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
cmpl   $0xa,-0x4(%rbp)
setbe  %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <__CPROVER_assume@plt>
mov    -0x4(%rbp),%edi
call   1030 <f@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x1,%edi
call   1040 <__CPROVER_assume@plt>
call   1030 <f@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = load i32, i32* %1
%3 = icmp ule i32 %2, 10
%4 = zext i1 %3 to i32
%5 = call i32 @__CPROVER_assume(i32 %4)
%6 = load i32, i32* %1
%7 = call i32 @f(i32 %6)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @__CPROVER_assume(i32 1)
%2 = tail call i32 @f(i32 undef)
ret i32 0
}
void swap(int *element1Ptr, int *element2ptr) {
  int hold;
  hold = *element1Ptr;
  *element1Ptr = *element2ptr;
  *element2ptr = hold;
}


x86 assembly (clang, -O0):
<swap>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x14(%rbp),%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @swap(i32* %0, i32* %1) {
%3 = alloca i32*
%4 = alloca i32*
%5 = alloca i32
store i32* %0, i32** %3
store i32* %1, i32** %4
%6 = load i32*, i32** %3
%7 = load i32, i32* %6
store i32 %7, i32* %5
%8 = load i32*, i32** %4
%9 = load i32, i32* %8
%10 = load i32*, i32** %3
store i32 %9, i32* %10
%11 = load i32, i32* %5
%12 = load i32*, i32** %4
store i32 %11, i32* %12
ret void
}

LLVM IR (-O2):
define void @swap(i32* nocapture %0, i32* nocapture %1) {
%3 = load i32, i32* %0
%4 = load i32, i32* %1
store i32 %4, i32* %0
store i32 %3, i32* %1
ret void
}
int ltr_int_max_slave_fifos() { return 99; }


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

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

LLVM IR (-O0):
define i32 @ltr_int_max_slave_fifos() {
ret i32 99
}

LLVM IR (-O2):
define i32 @ltr_int_max_slave_fifos() {
ret i32 99
}
/* Type definitions */
typedef int /*<<< orphan*/ uint64_t;

/* Variables and functions */
int /*<<< orphan*/ __atomic_exchange_4(int /*<<< orphan*/ volatile *,
                                       int /*<<< orphan*/, int);
uint64_t rte_atomic64_exchange(volatile uint64_t *dst, uint64_t val) {
  return __atomic_exchange_4(dst, val, 5);
}


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

x86 assembly (clang, -O2):
<rte_atomic64_exchange>:
mov    $0x5,%edx
jmp    1030 <__atomic_exchange_4@plt>

LLVM IR (-O0):
define i32 @rte_atomic64_exchange(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 = call i32 @__atomic_exchange_4(i32* %5, i32 %6, i32 5)
ret i32 %7
}

LLVM IR (-O2):
define i32 @rte_atomic64_exchange(i32* %0, i32 %1) {
%3 = tail call i32 @__atomic_exchange_4(i32* %0, i32 %1, i32 5)
ret i32 %3
}
int test_imm_46int16_mem(short *val) {
  return ((*val) & (-0x46 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_46int16_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movswl (%rax),%edx
and    $0xffffffba,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_46int16_mem>:
movzwl (%rdi),%eax
test   $0xffba,%eax
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_46int16_mem(i16* nocapture %0) {
%2 = load i16, i16* %0
%3 = and i16 %2, -70
%4 = icmp eq i16 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ STC311x_ForceCC();
int STC31xx_ForceMixedMode(void) {
  STC311x_ForceCC();
  return (0);
}


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

x86 assembly (clang, -O2):
<STC31xx_ForceMixedMode>:
push   %rax
xor    %eax,%eax
call   1030 <STC311x_ForceCC@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @STC31xx_ForceMixedMode() {
%1 = call i32 (...) @STC311x_ForceCC()
ret i32 0
}

LLVM IR (-O2):
define i32 @STC31xx_ForceMixedMode() {
%1 = tail call i32 (...) @STC311x_ForceCC()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ errno;
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *, char *);
int /*<<< orphan*/ stderr;
char *strerror(int /*<<< orphan*/);
void error(char *msg, int exit_val) {
  fprintf(stderr, "%s: %s\n", msg, strerror(errno));
  if (exit_val)
    exit(exit_val);
}


x86 assembly (clang, -O0):
<error>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    0x2e9a(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    0x2e7e(%rip),%rax
mov    (%rax),%edi
call   1050 <strerror@plt>
mov    -0x1c(%rbp),%edi
mov    -0x18(%rbp),%rdx
mov    %rax,%rcx
lea    0xe8e(%rip),%rsi
call   1030 <fprintf@plt>
cmpl   $0x0,-0xc(%rbp)
je     1189 <error+0x59>
mov    -0xc(%rbp),%edi
call   1040 <exit@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<error>:
push   %rbp
push   %r14
push   %rbx
mov    %esi,%r14d
mov    %rdi,%rbx
mov    0x2e9f(%rip),%rax
mov    (%rax),%ebp
mov    0x2e8e(%rip),%rax
mov    (%rax),%edi
call   1050 <strerror@plt>
lea    0xea8(%rip),%rsi
mov    %ebp,%edi
mov    %rbx,%rdx
mov    %rax,%rcx
call   1030 <fprintf@plt>
test   %r14d,%r14d
jne    116f <error+0x3f>
pop    %rbx
pop    %r14
pop    %rbp
ret
mov    %r14d,%edi
call   1040 <exit@plt>

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

LLVM IR (-O2):
@stderr = global i32 0
@.str = [8 x i8] c"%s: %s\0A\00"
@errno = global i32 0
define void @error(i8* %0, i32 %1) {
%3 = load i32, i32* @stderr
%4 = load i32, i32* @errno
%5 = tail call i8* @strerror(i32 %4)
%6 = tail call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %5)
%7 = icmp eq i32 %1, 0
br i1 %7, label %10, label %8
8: ; preds = %2
%9 = tail call i32 @exit(i32 %1)
unreachable
10: ; preds = %2
ret void
}
int upse_r3000_cpu_init(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @upse_r3000_cpu_init() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ getPI();
int /*<<< orphan*/ printf(char *, int /*<<< orphan*/);
int main(int argc, char *argv[]) { printf("%lf\n", getPI()); }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1030 <getPI@plt>
mov    %eax,%esi
lea    0xec1(%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   1030 <getPI@plt>
lea    0xed1(%rip),%rdi
mov    %eax,%esi
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

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

/* Variables and functions */
int /*<<< orphan*/ _mm_andnot_si64(int /*<<< orphan*/, int /*<<< orphan*/);
__m64 test_mm_andnot_si64(__m64 a, __m64 b) { return _mm_andnot_si64(a, b); }


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

x86 assembly (clang, -O2):
<test_mm_andnot_si64>:
jmp    1030 <_mm_andnot_si64@plt>

LLVM IR (-O0):
define i32 @test_mm_andnot_si64(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 = call i32 @_mm_andnot_si64(i32 %5, i32 %6)
ret i32 %7
}

LLVM IR (-O2):
define i32 @test_mm_andnot_si64(i32 %0, i32 %1) {
%3 = tail call i32 @_mm_andnot_si64(i32 %0, i32 %1)
ret i32 %3
}