xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void usage(void) {
  (void)fprintf(
      stderr,
      "Usage: ifdef [-t] [-Dsymbol] [-dsymbol] [-Usymbol] [-Isymbol] <file>\n");
  exit(0);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
xor    %edi,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rax
mov    0x2eb8(%rip),%rax
mov    (%rax),%edi
lea    0xecf(%rip),%rsi
call   1030 <fprintf@plt>
xor    %edi,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [70 x i8] c"Usage: ifdef [-t] [-Dsymbol] [-dsymbol] [-Usymbol] [-Isymbol] <file>\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([70 x i8], [70 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [70 x i8] c"Usage: ifdef [-t] [-Dsymbol] [-dsymbol] [-Usymbol] [-Isymbol] <file>\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([70 x i8], [70 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @exit(i32 0)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ read_test();
int /*<<< orphan*/ write_test();
int main() {
  write_test();
  read_test();
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1040 <write_test@plt>
xor    %eax,%eax
call   1030 <read_test@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = call i32 (...) @write_test()
%2 = call i32 (...) @read_test()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @write_test()
%2 = tail call i32 (...) @read_test()
ret i32 0
}
void foo613() {}


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

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

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

LLVM IR (-O2):
define void @foo613() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ BSP_EnableIntIrqRestore();
int SpinUnlock(int);
int BSP_ReleaseSpinlockIrqRestore(int id) {
  BSP_EnableIntIrqRestore();
  return SpinUnlock(id);
}


x86 assembly (clang, -O0):
<BSP_ReleaseSpinlockIrqRestore>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x0,%al
call   1030 <BSP_EnableIntIrqRestore@plt>
mov    -0x4(%rbp),%edi
call   1040 <SpinUnlock@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<BSP_ReleaseSpinlockIrqRestore>:
push   %rbx
mov    %edi,%ebx
xor    %eax,%eax
call   1030 <BSP_EnableIntIrqRestore@plt>
mov    %ebx,%edi
pop    %rbx
jmp    1040 <SpinUnlock@plt>

LLVM IR (-O0):
define i32 @BSP_ReleaseSpinlockIrqRestore(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 (...) @BSP_EnableIntIrqRestore()
%4 = load i32, i32* %2
%5 = call i32 @SpinUnlock(i32 %4)
ret i32 %5
}

LLVM IR (-O2):
define i32 @BSP_ReleaseSpinlockIrqRestore(i32 %0) {
%2 = tail call i32 (...) @BSP_EnableIntIrqRestore()
%3 = tail call i32 @SpinUnlock(i32 %0)
ret i32 %3
}
void ASN1_GENERALIZEDTIME_free(void) {}


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

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

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

LLVM IR (-O2):
define void @ASN1_GENERALIZEDTIME_free() {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ puts(char *);
void b(void) {
  FILE *tfPtr;
  if ((tfPtr = fopen("trans.dat", "r")) == NULL) {
    puts("File trans.dat non trovato");
  } else {
    puts("file trans.dat letto");
  }
  fclose(tfPtr);
  return;
}


x86 assembly (clang, -O0):
<b>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xec1(%rip),%rdi
lea    0xec4(%rip),%rsi
call   1050 <fopen@plt>
mov    %rax,-0x8(%rbp)
cmp    $0x0,%rax
jne    116a <b+0x3a>
lea    0xeac(%rip),%rdi
call   1030 <puts@plt>
jmp    1176 <b+0x46>
lea    0xeb6(%rip),%rdi
call   1030 <puts@plt>
mov    -0x8(%rbp),%rdi
call   1040 <fclose@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<b>:
push   %rbx
lea    0xec8(%rip),%rdi
lea    0xecb(%rip),%rsi
call   1050 <fopen@plt>
mov    %rax,%rbx
test   %rax,%rax
lea    0xebb(%rip),%rax
lea    0xecf(%rip),%rdi
cmove  %rax,%rdi
call   1030 <puts@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1040 <fclose@plt>

LLVM IR (-O0):
@.str = [10 x i8] c"trans.dat\00"
@.str.1 = [2 x i8] c"r\00"
@.str.2 = [27 x i8] c"File trans.dat non trovato\00"
@.str.3 = [21 x i8] c"file trans.dat letto\00"
define void @b() {
%1 = alloca i32*
%2 = call i32* @fopen(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
store i32* %2, i32** %1
%3 = icmp eq i32* %2, null
br i1 %3, label %4, label %6
4: ; preds = %0
%5 = call i32 @puts(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.2, i64 0, i64 0))
br label %8
6: ; preds = %0
%7 = call i32 @puts(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.3, i64 0, i64 0))
br label %8
8: ; preds = %6, %4
%9 = load i32*, i32** %1
%10 = call i32 @fclose(i32* %9)
ret void
}

LLVM IR (-O2):
@.str = [10 x i8] c"trans.dat\00"
@.str.1 = [2 x i8] c"r\00"
@.str.2 = [27 x i8] c"File trans.dat non trovato\00"
@.str.3 = [21 x i8] c"file trans.dat letto\00"
define void @b() {
%1 = tail call i32* @fopen(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%2 = icmp eq i32* %1, null
%3 = select i1 %2, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.3, i64 0, i64 0)
%4 = tail call i32 @puts(i8* dereferenceable(1) %3)
%5 = tail call i32 @fclose(i32* %1)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ time_t;

/* Variables and functions */
char *ctime(int /*<<< orphan*/ const *);
char *strchr(char *, char);
char *ytht_ctime(const time_t clock) {
  char *tmp;
  char *ptr = ctime(&clock);
  tmp = strchr(ptr, '\n');
  if (NULL != tmp)
    *tmp = 0;
  return ptr;
}


x86 assembly (clang, -O0):
<ytht_ctime>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
lea    -0x4(%rbp),%rdi
call   1030 <ctime@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    $0xa,%esi
call   1040 <strchr@plt>
mov    %rax,-0x10(%rbp)
xor    %eax,%eax
cmp    -0x10(%rbp),%rax
je     115d <ytht_ctime+0x3d>
mov    -0x10(%rbp),%rax
movb   $0x0,(%rax)
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ytht_ctime>:
push   %rbx
sub    $0x10,%rsp
mov    %edi,0xc(%rsp)
lea    0xc(%rsp),%rdi
call   1030 <ctime@plt>
mov    %rax,%rbx
mov    %rax,%rdi
mov    $0xa,%esi
call   1040 <strchr@plt>
test   %rax,%rax
je     114b <ytht_ctime+0x2b>
movb   $0x0,(%rax)
mov    %rbx,%rax
add    $0x10,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
define i8* @ytht_ctime(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i8* @ctime(i32* %2)
%4 = call i8* @strchr(i8* dereferenceable(1) %3, i8 signext 10)
%5 = icmp eq i8* %4, null
br i1 %5, label %7, label %6
6: ; preds = %1
store i8 0, i8* %4
br label %7
7: ; preds = %6, %1
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ free(int /*<<< orphan*/);
int /*<<< orphan*/ malloc(int);
int main() {
  int i;
  for (i = 0; i < 100000; i++) {
    free(malloc(40960));
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x186a0,-0x8(%rbp)
jge    1162 <main+0x42>
mov    $0xa000,%edi
call   1040 <malloc@plt>
mov    %eax,%edi
call   1030 <free@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1136 <main+0x16>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    $0x186a0,%ebx
cs nopw 0x0(%rax,%rax,1)
mov    $0xa000,%edi
call   1040 <malloc@plt>
mov    %eax,%edi
call   1030 <free@plt>
add    $0xffffffff,%ebx
jne    1130 <main+0x10>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
br label %3
3: ; preds = %9, %0
%4 = load i32, i32* %2
%5 = icmp slt i32 %4, 100000
br i1 %5, label %6, label %12
6: ; preds = %3
%7 = call i32 @malloc(i32 40960)
%8 = call i32 @free(i32 %7)
br label %9
9: ; preds = %6
%10 = load i32, i32* %2
%11 = add nsw i32 %10, 1
store i32 %11, i32* %2
br label %3
12: ; preds = %3
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
br label %1
1: ; preds = %0, %1
%2 = phi i32 [ 0, %0 ], [ %5, %1 ]
%3 = tail call i32 @malloc(i32 40960)
%4 = tail call i32 @free(i32 %3)
%5 = add nuw nsw i32 %2, 1
%6 = icmp eq i32 %5, 100000
br i1 %6, label %7, label %1
7: ; preds = %1
ret i32 0
}
int test_1(int i, int j) { return i == j; }


x86 assembly (clang, -O0):
<test_1>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_1>:
xor    %eax,%eax
cmp    %esi,%edi
sete   %al
ret

LLVM IR (-O0):
define i32 @test_1(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
%8 = zext i1 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
define i32 @test_1(i32 %0, i32 %1) {
%3 = icmp eq i32 %0, %1
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
size_t base_encode_chunk_sz(int);
size_t base_encode_buffer_sz(int bits) {
  size_t tsz = 1;
  size_t csz = base_encode_chunk_sz(bits);
  size_t c = 1;
  while (tsz < 768) {
    tsz = c * csz;
    c++;
  }
  return tsz;
}


x86 assembly (clang, -O0):
<base_encode_buffer_sz>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
movq   $0x1,-0x10(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <base_encode_chunk_sz@plt>
mov    %rax,-0x18(%rbp)
movq   $0x1,-0x20(%rbp)
cmpq   $0x300,-0x10(%rbp)
jae    1163 <base_encode_buffer_sz+0x53>
mov    -0x20(%rbp),%rax
imul   -0x18(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x20(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x20(%rbp)
jmp    1137 <base_encode_buffer_sz+0x27>
mov    -0x10(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<base_encode_buffer_sz>:
push   %rax
call   1030 <base_encode_chunk_sz@plt>
mov    %rax,%rcx
xor    %eax,%eax
nopl   0x0(%rax,%rax,1)
add    %rcx,%rax
cmp    $0x300,%rax
jb     1120 <base_encode_buffer_sz+0x10>
pop    %rcx
ret

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

LLVM IR (-O2):
define i64 @base_encode_buffer_sz(i32 %0) {
%2 = tail call i64 @base_encode_chunk_sz(i32 %0)
br label %3
3: ; preds = %1, %3
%4 = phi i64 [ 1, %1 ], [ %6, %3 ]
%5 = mul i64 %4, %2
%6 = add i64 %4, 1
%7 = icmp ult i64 %5, 768
br i1 %7, label %3, label %8
8: ; preds = %3
ret i64 %5
}
void CAN2_TX_IRQHandler() {}


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

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

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

LLVM IR (-O2):
define void @CAN2_TX_IRQHandler() {
ret void
}
long labs(long x) {
  if (x < 0) {
    return -x;
  } else {
    return x;
  }
}


x86 assembly (clang, -O0):
<labs>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jge    1122 <labs+0x22>
xor    %eax,%eax
sub    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    112a <labs+0x2a>
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<labs>:
mov    %rdi,%rax
neg    %rax
cmovs  %rdi,%rax
ret

LLVM IR (-O0):
define i64 @labs(i64 %0) {
%2 = alloca i64
%3 = alloca i64
store i64 %0, i64* %3
%4 = load i64, i64* %3
%5 = icmp slt i64 %4, 0
br i1 %5, label %6, label %9
6: ; preds = %1
%7 = load i64, i64* %3
%8 = sub nsw i64 0, %7
store i64 %8, i64* %2
br label %11
9: ; preds = %1
%10 = load i64, i64* %3
store i64 %10, i64* %2
br label %11
11: ; preds = %9, %6
%12 = load i64, i64* %2
ret i64 %12
}

LLVM IR (-O2):
define i64 @labs(i64 %0) {
%2 = tail call i64 @llvm.abs.i64(i64 %0, i1 true)
ret i64 %2
}
void freeMem(int rows, int **array) {
  int i;
  for (i = 0; i < rows; i++)
    free(array[i]);
  free(array);
}


x86 assembly (clang, -O0):
<freeMem>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    1151 <freeMem+0x41>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1030 <free@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1126 <freeMem+0x16>
mov    -0x10(%rbp),%rdi
call   1030 <free@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<freeMem>:
push   %r15
push   %r14
push   %rbx
mov    %rsi,%r14
test   %edi,%edi
jle    1142 <freeMem+0x32>
mov    %edi,%r15d
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    (%r14,%rbx,8),%rdi
call   1030 <free@plt>
add    $0x1,%rbx
cmp    %rbx,%r15
jne    1130 <freeMem+0x20>
mov    %r14,%rdi
pop    %rbx
pop    %r14
pop    %r15
jmp    1030 <free@plt>

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

LLVM IR (-O2):
define void @freeMem(i32 %0, i32** nocapture %1) {
%3 = icmp sgt i32 %0, 0
br i1 %3, label %4, label %13
4: ; preds = %2
%5 = zext i32 %0 to i64
br label %6
6: ; preds = %4, %6
%7 = phi i64 [ 0, %4 ], [ %11, %6 ]
%8 = getelementptr inbounds i32*, i32** %1, i64 %7
%9 = bitcast i32** %8 to i8**
%10 = load i8*, i8** %9
tail call void @free(i8* %10)
%11 = add nuw nsw i64 %7, 1
%12 = icmp eq i64 %11, %5
br i1 %12, label %13, label %6
13: ; preds = %6, %2
%14 = bitcast i32** %1 to i8*
tail call void @free(i8* %14)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ steadystate(double *, double *);
void steadyMVS(double MVS[]) {
  double states[246];
  steadystate(MVS, states);
}


x86 assembly (clang, -O0):
<steadyMVS>:
push   %rbp
mov    %rsp,%rbp
sub    $0x7c0,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0x7c0(%rbp),%rsi
call   1030 <steadystate@plt>
add    $0x7c0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<steadyMVS>:
sub    $0x7b8,%rsp
mov    %rsp,%rsi
call   1030 <steadystate@plt>
add    $0x7b8,%rsp
ret

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

LLVM IR (-O2):
define void @steadyMVS(double* %0) {
%2 = alloca [246 x double]
%3 = bitcast [246 x double]* %2 to i8*
%4 = getelementptr inbounds [246 x double], [246 x double]* %2, i64 0, i64 0
%5 = call i32 @steadystate(double* %0, double* %4)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ __CrestInit();
void __globinit_arrayBinSearch(void) {
  { __CrestInit(); }
}


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

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

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

LLVM IR (-O2):
define void @__globinit_arrayBinSearch() {
%1 = tail call i32 (...) @__CrestInit()
ret void
}
/* Type definitions */
struct rlimit {
  scalar_t__ rlim_max;
  scalar_t__ rlim_cur;
};

/* Variables and functions */
int /*<<< orphan*/ RLIMIT_CORE;
int /*<<< orphan*/ RLIMIT_NOFILE;
int /*<<< orphan*/ RLIMIT_NPROC;
int /*<<< orphan*/ setrlimit(int /*<<< orphan*/, struct rlimit *);
void enforce_lifesavers() {
  struct rlimit r;
  r.rlim_cur = r.rlim_max = 0;
  setrlimit(RLIMIT_NOFILE, &r);
  setrlimit(RLIMIT_NPROC, &r);
  setrlimit(RLIMIT_CORE, &r);
}


x86 assembly (clang, -O0):
<enforce_lifesavers>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movq   $0x0,-0x10(%rbp)
movq   $0x0,-0x8(%rbp)
mov    0x2eb1(%rip),%rax
mov    (%rax),%edi
lea    -0x10(%rbp),%rsi
call   1030 <setrlimit@plt>
mov    0x2e97(%rip),%rax
mov    (%rax),%edi
lea    -0x10(%rbp),%rsi
call   1030 <setrlimit@plt>
mov    0x2e95(%rip),%rax
mov    (%rax),%edi
lea    -0x10(%rbp),%rsi
call   1030 <setrlimit@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<enforce_lifesavers>:
push   %rbx
sub    $0x10,%rsp
xorps  %xmm0,%xmm0
movaps %xmm0,(%rsp)
mov    0x2ebd(%rip),%rax
mov    (%rax),%edi
mov    %rsp,%rbx
mov    %rbx,%rsi
call   1030 <setrlimit@plt>
mov    0x2ea1(%rip),%rax
mov    (%rax),%edi
mov    %rbx,%rsi
call   1030 <setrlimit@plt>
mov    0x2ea0(%rip),%rax
mov    (%rax),%edi
mov    %rbx,%rsi
call   1030 <setrlimit@plt>
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
%struct.rlimit = type { i64, i64 }
@RLIMIT_NOFILE = global i32 0
@RLIMIT_NPROC = global i32 0
@RLIMIT_CORE = global i32 0
define void @enforce_lifesavers() {
%1 = alloca %struct.rlimit
%2 = getelementptr inbounds %struct.rlimit, %struct.rlimit* %1, i32 0, i32 0
store i64 0, i64* %2
%3 = getelementptr inbounds %struct.rlimit, %struct.rlimit* %1, i32 0, i32 1
store i64 0, i64* %3
%4 = load i32, i32* @RLIMIT_NOFILE
%5 = call i32 @setrlimit(i32 %4, %struct.rlimit* %1)
%6 = load i32, i32* @RLIMIT_NPROC
%7 = call i32 @setrlimit(i32 %6, %struct.rlimit* %1)
%8 = load i32, i32* @RLIMIT_CORE
%9 = call i32 @setrlimit(i32 %8, %struct.rlimit* %1)
ret void
}

LLVM IR (-O2):
%struct.rlimit = type { i64, i64 }
@RLIMIT_NOFILE = global i32 0
@RLIMIT_NPROC = global i32 0
@RLIMIT_CORE = global i32 0
define void @enforce_lifesavers() {
%1 = alloca %struct.rlimit
%2 = bitcast %struct.rlimit* %1 to i8*
%3 = bitcast %struct.rlimit* %1 to i8*
%4 = load i32, i32* @RLIMIT_NOFILE
%5 = call i32 @setrlimit(i32 %4, %struct.rlimit* %1)
%6 = load i32, i32* @RLIMIT_NPROC
%7 = call i32 @setrlimit(i32 %6, %struct.rlimit* %1)
%8 = load i32, i32* @RLIMIT_CORE
%9 = call i32 @setrlimit(i32 %8, %struct.rlimit* %1)
ret void
}
/* Type definitions */
struct task_struct {
  int dummy;
};
struct rq {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ inc_nr_running(struct rq *);
void enqueue_task_stop(struct rq *rq, struct task_struct *p, int flags) {
  inc_nr_running(rq);
}


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

x86 assembly (clang, -O2):
<enqueue_task_stop>:
jmp    1030 <inc_nr_running@plt>

LLVM IR (-O0):
%struct.rq = type { i32 }
%struct.task_struct = type { i32 }
define void @enqueue_task_stop(%struct.rq* %0, %struct.task_struct* %1, i32 %2) {
%4 = alloca %struct.rq*
%5 = alloca %struct.task_struct*
%6 = alloca i32
store %struct.rq* %0, %struct.rq** %4
store %struct.task_struct* %1, %struct.task_struct** %5
store i32 %2, i32* %6
%7 = load %struct.rq*, %struct.rq** %4
%8 = call i32 @inc_nr_running(%struct.rq* %7)
ret void
}

LLVM IR (-O2):
%struct.rq = type { i32 }
%struct.task_struct = type { i32 }
define void @enqueue_task_stop(%struct.rq* %0, %struct.task_struct* nocapture readnone %1, i32 %2) {
%4 = tail call i32 @inc_nr_running(%struct.rq* %0)
ret void
}
void preserce_ptr_sz_fn(long x) {}


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

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

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

LLVM IR (-O2):
define void @preserce_ptr_sz_fn(i64 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, double, int /*<<< orphan*/);
int /*<<< orphan*/ scanf(char *, double *);
int /*<<< orphan*/ sqrt(double);
int main() {
  double x;
  scanf("%lf", &x);
  printf("The square root of %lf is %lf.\n", x, sqrt(x));
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
lea    0xec5(%rip),%rdi
lea    0x10(%rsp),%rsi
call   1040 <scanf@plt>
movsd  0x10(%rsp),%xmm0
movsd  %xmm0,0x8(%rsp)
call   1050 <sqrt@plt>
lea    0xea7(%rip),%rdi
movsd  0x8(%rsp),%xmm0
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%lf\00"
@.str.1 = [32 x i8] c"The square root of %lf is %lf.\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca double
store i32 0, i32* %1
%3 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double* %2)
%4 = load double, double* %2
%5 = load double, double* %2
%6 = call i32 @sqrt(double %5)
%7 = call i32 @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.1, i64 0, i64 0), double %4, i32 %6)
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%lf\00"
@.str.1 = [32 x i8] c"The square root of %lf is %lf.\0A\00"
define i32 @main() {
%1 = alloca double
%2 = bitcast double* %1 to i8*
%3 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double* %1)
%4 = load double, double* %1
%5 = call i32 @sqrt(double %4)
%6 = call i32 @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.1, i64 0, i64 0), double %4, i32 %5)
ret i32 0
}
void user_device_emulated(int position_asked, int position_real) {
  (void)position_asked;
  (void)position_real;
}


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

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

LLVM IR (-O0):
define void @user_device_emulated(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
ret void
}

LLVM IR (-O2):
define void @user_device_emulated(i32 %0, i32 %1) {
ret void
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
uint32_t flp2(uint32_t x) {
  x = x | (x >> 1);
  x = x | (x >> 2);
  x = x | (x >> 4);
  x = x | (x >> 8);
  x = x | (x >> 16);
  return x - (x >> 1);
}


x86 assembly (clang, -O0):
<flp2>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x4(%rbp),%ecx
sar    $0x1,%ecx
or     %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x4(%rbp),%ecx
sar    $0x2,%ecx
or     %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x4(%rbp),%ecx
sar    $0x4,%ecx
or     %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x4(%rbp),%ecx
sar    $0x8,%ecx
or     %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x4(%rbp),%ecx
sar    $0x10,%ecx
or     %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x4(%rbp),%ecx
sar    $0x1,%ecx
sub    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<flp2>:
mov    %edi,%eax
sar    %eax
or     %edi,%eax
mov    %eax,%ecx
sar    $0x2,%ecx
or     %eax,%ecx
mov    %ecx,%eax
sar    $0x4,%eax
or     %ecx,%eax
mov    %eax,%ecx
sar    $0x8,%ecx
or     %eax,%ecx
mov    %ecx,%eax
sar    $0x10,%eax
or     %ecx,%eax
mov    %eax,%ecx
sar    %ecx
sub    %ecx,%eax
ret

LLVM IR (-O0):
define i32 @flp2(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = load i32, i32* %2
%5 = ashr i32 %4, 1
%6 = or i32 %3, %5
store i32 %6, i32* %2
%7 = load i32, i32* %2
%8 = load i32, i32* %2
%9 = ashr i32 %8, 2
%10 = or i32 %7, %9
store i32 %10, i32* %2
%11 = load i32, i32* %2
%12 = load i32, i32* %2
%13 = ashr i32 %12, 4
%14 = or i32 %11, %13
store i32 %14, i32* %2
%15 = load i32, i32* %2
%16 = load i32, i32* %2
%17 = ashr i32 %16, 8
%18 = or i32 %15, %17
store i32 %18, i32* %2
%19 = load i32, i32* %2
%20 = load i32, i32* %2
%21 = ashr i32 %20, 16
%22 = or i32 %19, %21
store i32 %22, i32* %2
%23 = load i32, i32* %2
%24 = load i32, i32* %2
%25 = ashr i32 %24, 1
%26 = sub nsw i32 %23, %25
ret i32 %26
}

LLVM IR (-O2):
define i32 @flp2(i32 %0) {
%2 = ashr i32 %0, 1
%3 = or i32 %2, %0
%4 = ashr i32 %3, 2
%5 = or i32 %4, %3
%6 = ashr i32 %5, 4
%7 = or i32 %6, %5
%8 = ashr i32 %7, 8
%9 = or i32 %8, %7
%10 = ashr i32 %9, 16
%11 = or i32 %10, %9
%12 = ashr i32 %11, 1
%13 = sub nsw i32 %11, %12
ret i32 %13
}
/* Type definitions */
typedef int /*<<< orphan*/ mpz_t;

/* Variables and functions */
int /*<<< orphan*/ mpz_init_set_ui(int /*<<< orphan*/, long);
int mpz_probab_prime_p(int /*<<< orphan*/, int);
bool is_prime(long n) {
  mpz_t p;
  mpz_init_set_ui(p, n);
  int result = mpz_probab_prime_p(p, 45);
  switch (result) {
  case 2:
    return true;
  case 0:
    return false;
  }
  return true;
}


x86 assembly (clang, -O0):
<is_prime>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x14(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1040 <mpz_init_set_ui@plt>
mov    -0x14(%rbp),%edi
mov    $0x2d,%esi
call   1030 <mpz_probab_prime_p@plt>
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%eax
mov    %eax,-0x1c(%rbp)
test   %eax,%eax
je     1178 <is_prime+0x58>
jmp    115b <is_prime+0x3b>
mov    -0x1c(%rbp),%eax
sub    $0x2,%eax
jne    1184 <is_prime+0x64>
jmp    116c <is_prime+0x4c>
movl   $0x1,-0x4(%rbp)
jmp    118b <is_prime+0x6b>
movl   $0x0,-0x4(%rbp)
jmp    118b <is_prime+0x6b>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_prime>:
push   %rax
mov    %rdi,%rsi
call   1040 <mpz_init_set_ui@plt>
mov    $0x2d,%esi
call   1030 <mpz_probab_prime_p@plt>
xor    %ecx,%ecx
test   %eax,%eax
setne  %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @is_prime(i64 %0) {
%2 = alloca i32
%3 = alloca i64
%4 = alloca i32
%5 = alloca i32
store i64 %0, i64* %3
%6 = load i32, i32* %4
%7 = load i64, i64* %3
%8 = call i32 @mpz_init_set_ui(i32 %6, i64 %7)
%9 = load i32, i32* %4
%10 = call i32 @mpz_probab_prime_p(i32 %9, i32 45)
store i32 %10, i32* %5
%11 = load i32, i32* %5
switch i32 %11, label %14 [
i32 2, label %12
i32 0, label %13
]
12: ; preds = %1
store i32 1, i32* %2
br label %15
13: ; preds = %1
store i32 0, i32* %2
br label %15
14: ; preds = %1
store i32 1, i32* %2
br label %15
15: ; preds = %14, %13, %12
%16 = load i32, i32* %2
ret i32 %16
}

LLVM IR (-O2):
define i32 @is_prime(i64 %0) {
%2 = tail call i32 @mpz_init_set_ui(i32 undef, i64 %0)
%3 = tail call i32 @mpz_probab_prime_p(i32 undef, i32 45)
%4 = icmp ne i32 %3, 0
%5 = zext i1 %4 to i32
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ YYMMDDHHMMSS2SECS(char *, double *);
int /*<<< orphan*/ strncat(char *, char *, int);
int /*<<< orphan*/ strncpy(char *, char *, int);
void YYMMDDHH2SECS(char *date, double *time) {
  char date2[12];
  strncpy(date2, date, 8);
  strncat(date2, "0000", 4);
  YYMMDDHHMMSS2SECS(date2, time);
}


x86 assembly (clang, -O0):
<YYMMDDHH2SECS>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0x1c(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    $0x8,%edx
call   1030 <strncpy@plt>
lea    -0x1c(%rbp),%rdi
lea    0xea3(%rip),%rsi
mov    $0x4,%edx
call   1040 <strncat@plt>
lea    -0x1c(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1050 <YYMMDDHHMMSS2SECS@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<YYMMDDHH2SECS>:
push   %r14
push   %rbx
sub    $0x18,%rsp
mov    %rsi,%r14
mov    %rdi,%rsi
lea    0xc(%rsp),%rbx
mov    %rbx,%rdi
mov    $0x8,%edx
call   1030 <strncpy@plt>
lea    0xeaa(%rip),%rsi
mov    %rbx,%rdi
mov    $0x4,%edx
call   1040 <strncat@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1050 <YYMMDDHHMMSS2SECS@plt>
add    $0x18,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [5 x i8] c"0000\00"
define void @YYMMDDHH2SECS(i8* %0, double* %1) {
%3 = alloca i8*
%4 = alloca double*
%5 = alloca [12 x i8]
store i8* %0, i8** %3
store double* %1, double** %4
%6 = getelementptr inbounds [12 x i8], [12 x i8]* %5, i64 0, i64 0
%7 = load i8*, i8** %3
%8 = call i32 @strncpy(i8* %6, i8* %7, i32 8)
%9 = getelementptr inbounds [12 x i8], [12 x i8]* %5, i64 0, i64 0
%10 = call i32 @strncat(i8* %9, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 4)
%11 = getelementptr inbounds [12 x i8], [12 x i8]* %5, i64 0, i64 0
%12 = load double*, double** %4
%13 = call i32 @YYMMDDHHMMSS2SECS(i8* %11, double* %12)
ret void
}

LLVM IR (-O2):
@.str = [5 x i8] c"0000\00"
define void @YYMMDDHH2SECS(i8* %0, double* %1) {
%3 = alloca [12 x i8]
%4 = getelementptr inbounds [12 x i8], [12 x i8]* %3, i64 0, i64 0
%5 = call i32 @strncpy(i8* %4, i8* %0, i32 8)
%6 = call i32 @strncat(i8* %4, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 4)
%7 = call i32 @YYMMDDHHMMSS2SECS(i8* %4, double* %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ print_str(char *, int, int);
void print(char *str) { print_str(str, -1, -1); }


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

x86 assembly (clang, -O2):
<print>:
mov    $0xffffffff,%esi
mov    $0xffffffff,%edx
jmp    1030 <print_str@plt>

LLVM IR (-O0):
define void @print(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @print_str(i8* %3, i32 -1, i32 -1)
ret void
}

LLVM IR (-O2):
define void @print(i8* %0) {
%2 = tail call i32 @print_str(i8* %0, i32 -1, i32 -1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void *thr_fn1(void *arg) {
  printf("thread 1 returning\n");
  return ((void *)1);
}


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

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

LLVM IR (-O0):
@.str = [20 x i8] c"thread 1 returning\0A\00"
define i8* @thr_fn1(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
ret i8* inttoptr (i64 1 to i8*)
}

LLVM IR (-O2):
@str = [19 x i8] c"thread 1 returning\00"
define i8* @thr_fn1(i8* nocapture readnone %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @str, i64 0, i64 0))
ret i8* inttoptr (i64 1 to i8*)
}
/* Type definitions */
struct Cyc_Lexing_lexbuf {
  int dummy;
};

/* Variables and functions */
int Cyc_suck_macroname_rec(struct Cyc_Lexing_lexbuf *, int);
int Cyc_suck_macroname(struct Cyc_Lexing_lexbuf *lexbuf) {
  int _T0;
  _T0 = Cyc_suck_macroname_rec(lexbuf, 11);
  return _T0;
}


x86 assembly (clang, -O0):
<Cyc_suck_macroname>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0xb,%esi
call   1030 <Cyc_suck_macroname_rec@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Cyc_suck_macroname>:
mov    $0xb,%esi
jmp    1030 <Cyc_suck_macroname_rec@plt>

LLVM IR (-O0):
%struct.Cyc_Lexing_lexbuf = type { i32 }
define i32 @Cyc_suck_macroname(%struct.Cyc_Lexing_lexbuf* %0) {
%2 = alloca %struct.Cyc_Lexing_lexbuf*
%3 = alloca i32
store %struct.Cyc_Lexing_lexbuf* %0, %struct.Cyc_Lexing_lexbuf** %2
%4 = load %struct.Cyc_Lexing_lexbuf*, %struct.Cyc_Lexing_lexbuf** %2
%5 = call i32 @Cyc_suck_macroname_rec(%struct.Cyc_Lexing_lexbuf* %4, i32 11)
store i32 %5, i32* %3
%6 = load i32, i32* %3
ret i32 %6
}

LLVM IR (-O2):
%struct.Cyc_Lexing_lexbuf = type { i32 }
define i32 @Cyc_suck_macroname(%struct.Cyc_Lexing_lexbuf* %0) {
%2 = tail call i32 @Cyc_suck_macroname_rec(%struct.Cyc_Lexing_lexbuf* %0, i32 11)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
__attribute__((__noreturn__)) void exitfunc17(void) {
  printf("Executing exitfunc"
         "17"
         ".\n");
  exit(0);
}


x86 assembly (clang, -O0):
<exitfunc17>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
xor    %edi,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<exitfunc17>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
xor    %edi,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [23 x i8] c"Executing exitfunc17.\0A\00"
define void @exitfunc17() {
%1 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@str = [22 x i8] c"Executing exitfunc17.\00"
define void @exitfunc17() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @exit(i32 0)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ tasks_shorter_foo1();
void *tasks_shorter_parFun_a0a1a1(void *voidArgs) {
  tasks_shorter_foo1();
  return 0;
}


x86 assembly (clang, -O0):
<tasks_shorter_parFun_a0a1a1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x0,%al
call   1030 <tasks_shorter_foo1@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i8* @tasks_shorter_parFun_a0a1a1(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 (...) @tasks_shorter_foo1()
ret i8* null
}

LLVM IR (-O2):
define noalias i8* @tasks_shorter_parFun_a0a1a1(i8* nocapture readnone %0) {
%2 = tail call i32 (...) @tasks_shorter_foo1()
ret i8* null
}
/* Variables and functions */
int /*<<< orphan*/ CompileConstant(int);
void DoDConstant(void) { CompileConstant(53); }


x86 assembly (clang, -O0):
<DoDConstant>:
push   %rbp
mov    %rsp,%rbp
mov    $0x35,%edi
call   1030 <CompileConstant@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<DoDConstant>:
mov    $0x35,%edi
jmp    1030 <CompileConstant@plt>

LLVM IR (-O0):
define void @DoDConstant() {
%1 = call i32 @CompileConstant(i32 53)
ret void
}

LLVM IR (-O2):
define void @DoDConstant() {
%1 = tail call i32 @CompileConstant(i32 53)
ret void
}
/* Variables and functions */
char *get_continent_name_and_code(char const *);
int /*<<< orphan*/ snprintf(char *, int, char *, char *);
void geoip_set_continent(const char *continent, char *loc) {
  if (continent)
    snprintf(loc, 47 + 1, "%s", get_continent_name_and_code(continent));
  else
    snprintf(loc, 47 + 1, "%s", "Unknown");
}


x86 assembly (clang, -O0):
<geoip_set_continent>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1169 <geoip_set_continent+0x49>
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <get_continent_name_and_code@plt>
mov    -0x18(%rbp),%rdi
mov    %rax,%rcx
mov    $0x30,%esi
lea    0xea1(%rip),%rdx
call   1030 <snprintf@plt>
jmp    1185 <geoip_set_continent+0x65>
mov    -0x10(%rbp),%rdi
mov    $0x30,%esi
lea    0xe87(%rip),%rdx
lea    0xe83(%rip),%rcx
call   1030 <snprintf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<geoip_set_continent>:
push   %rbx
mov    %rsi,%rbx
test   %rdi,%rdi
je     1133 <geoip_set_continent+0x13>
call   1040 <get_continent_name_and_code@plt>
mov    %rax,%rcx
jmp    113a <geoip_set_continent+0x1a>
lea    0xec9(%rip),%rcx
lea    0xebf(%rip),%rdx
mov    %rbx,%rdi
mov    $0x30,%esi
pop    %rbx
jmp    1030 <snprintf@plt>

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

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
@.str.1 = [8 x i8] c"Unknown\00"
define void @geoip_set_continent(i8* %0, i8* %1) {
%3 = icmp eq i8* %0, null
br i1 %3, label %6, label %4
4: ; preds = %2
%5 = tail call i8* @get_continent_name_and_code(i8* %0)
br label %6
6: ; preds = %2, %4
%7 = phi i8* [ %5, %4 ], [ getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), %2 ]
%8 = tail call i32 @snprintf(i8* %1, i32 48, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %7)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ time_t;

/* Variables and functions */
int /*<<< orphan*/ time(int /*<<< orphan*/);
time_t time_(void) { return time(0); }


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

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

LLVM IR (-O0):
define i32 @time_() {
%1 = call i32 @time(i32 0)
ret i32 %1
}

LLVM IR (-O2):
define i32 @time_() {
%1 = tail call i32 @time(i32 0)
ret i32 %1
}
double round(double value) {
  return (int)(value < 0 ? (value - 0.5) : (value + 0.5));
}


x86 assembly (clang, -O0):
<round>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
xorps  %xmm0,%xmm0
ucomisd -0x8(%rbp),%xmm0
jbe    1132 <round+0x32>
movsd  -0x8(%rbp),%xmm0
movsd  0xedc(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x10(%rbp)
jmp    1144 <round+0x44>
movsd  0xec6(%rip),%xmm0
addsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
cvttsd2si %xmm0,%eax
cvtsi2sd %eax,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<round>:
xorpd  %xmm1,%xmm1
xor    %eax,%eax
ucomisd %xmm0,%xmm1
seta   %al
lea    0xeec(%rip),%rcx
addsd  (%rcx,%rax,8),%xmm0
cvttpd2dq %xmm0,%xmm0
cvtdq2pd %xmm0,%xmm0
ret

LLVM IR (-O0):
define double @round(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fcmp olt double %3, 0.000000e+00
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load double, double* %2
%7 = fsub double %6, 5.000000e-01
br label %11
8: ; preds = %1
%9 = load double, double* %2
%10 = fadd double %9, 5.000000e-01
br label %11
11: ; preds = %8, %5
%12 = phi double [ %7, %5 ], [ %10, %8 ]
%13 = fptosi double %12 to i32
%14 = sitofp i32 %13 to double
ret double %14
}

LLVM IR (-O2):
define double @round(double %0) {
%2 = fcmp olt double %0, 0.000000e+00
%3 = select i1 %2, double -5.000000e-01, double 5.000000e-01
%4 = fadd double %3, %0
%5 = fptosi double %4 to i32
%6 = sitofp i32 %5 to double
ret double %6
}
int isnanl(long double x) { return __builtin_isnan(x); }


x86 assembly (clang, -O0):
<isnanl>:
push   %rbp
mov    %rsp,%rbp
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
fldt   -0x10(%rbp)
fucomip %st(0),%st
setp   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isnanl>:
fldt   0x8(%rsp)
xor    %eax,%eax
fucomip %st(0),%st
setp   %al
ret

LLVM IR (-O0):
define i32 @isnanl(x86_fp80 %0) {
%2 = alloca x86_fp80
store x86_fp80 %0, x86_fp80* %2
%3 = load x86_fp80, x86_fp80* %2
%4 = fcmp uno x86_fp80 %3, %3
%5 = zext i1 %4 to i32
ret i32 %5
}

LLVM IR (-O2):
define i32 @isnanl(x86_fp80 %0) {
%2 = fcmp uno x86_fp80 %0, 0xK00000000000000000000
%3 = zext i1 %2 to i32
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ g(int *);
int f(int *restrict p) {
  g(p);
  return *p;
}


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

x86 assembly (clang, -O2):
<f>:
push   %rbx
mov    %rdi,%rbx
call   1030 <g@plt>
mov    (%rbx),%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @f(i32* noalias %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = call i32 @g(i32* %3)
%5 = load i32*, i32** %2
%6 = load i32, i32* %5
ret i32 %6
}

LLVM IR (-O2):
define i32 @f(i32* noalias %0) {
%2 = tail call i32 @g(i32* %0)
%3 = load i32, i32* %0
ret i32 %3
}
void f17() {
  int x = 1;
  x = x;
}


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

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

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

LLVM IR (-O2):
define void @f17() {
ret void
}
int main(void) {
  int result = 1;
  return result ? 0 : 1;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
mov    -0x8(%rbp),%edx
mov    $0x1,%eax
xor    %ecx,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
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 1, i32* %2
%3 = load i32, i32* %2
%4 = icmp ne i32 %3, 0
%5 = zext i1 %4 to i64
%6 = select i1 %4, i32 0, i32 1
ret i32 %6
}

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
__attribute__((target("default"))) void foo_multi(int i, double d) {}


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

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

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

LLVM IR (-O2):
define void @foo_multi(i32 %0, double %1) {
ret void
}
void a(float *d, float *s) {
  d[0] -= s[0];
  d[1] -= s[1];
  d[2] -= s[2];
}


x86 assembly (clang, -O0):
<a>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movss  (%rax),%xmm1
mov    -0x8(%rbp),%rax
movss  (%rax),%xmm0
subss  %xmm1,%xmm0
movss  %xmm0,(%rax)
mov    -0x10(%rbp),%rax
movss  0x4(%rax),%xmm1
mov    -0x8(%rbp),%rax
movss  0x4(%rax),%xmm0
subss  %xmm1,%xmm0
movss  %xmm0,0x4(%rax)
mov    -0x10(%rbp),%rax
movss  0x8(%rax),%xmm1
mov    -0x8(%rbp),%rax
movss  0x8(%rax),%xmm0
subss  %xmm1,%xmm0
movss  %xmm0,0x8(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<a>:
movss  (%rdi),%xmm0
movss  0x4(%rdi),%xmm1
subss  (%rsi),%xmm0
movss  %xmm0,(%rdi)
subss  0x4(%rsi),%xmm1
movss  %xmm1,0x4(%rdi)
movss  0x8(%rdi),%xmm0
subss  0x8(%rsi),%xmm0
movss  %xmm0,0x8(%rdi)
ret

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

LLVM IR (-O2):
define void @a(float* nocapture %0, float* nocapture %1) {
%3 = load float, float* %1
%4 = load float, float* %0
%5 = fsub float %4, %3
store float %5, float* %0
%6 = getelementptr inbounds float, float* %1, i64 1
%7 = load float, float* %6
%8 = getelementptr inbounds float, float* %0, i64 1
%9 = load float, float* %8
%10 = fsub float %9, %7
store float %10, float* %8
%11 = getelementptr inbounds float, float* %1, i64 2
%12 = load float, float* %11
%13 = getelementptr inbounds float, float* %0, i64 2
%14 = load float, float* %13
%15 = fsub float %14, %12
store float %15, float* %13
ret void
}
float back_in(float step, float max_steps, float max_val) {
  float s = 1.70158f;
  float ratio = step / max_steps;
  return max_val * ratio * ratio * ((s + 1) * ratio - s);
}


x86 assembly (clang, -O0):
<back_in>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  %xmm2,-0xc(%rbp)
movss  0xee9(%rip),%xmm0
movss  %xmm0,-0x10(%rbp)
movss  -0x4(%rbp),%xmm0
divss  -0x8(%rbp),%xmm0
movss  %xmm0,-0x14(%rbp)
movss  -0xc(%rbp),%xmm0
mulss  -0x14(%rbp),%xmm0
mulss  -0x14(%rbp),%xmm0
movss  0xeba(%rip),%xmm1
addss  -0x10(%rbp),%xmm1
movss  -0x14(%rbp),%xmm3
movss  -0x10(%rbp),%xmm2
movd   %xmm2,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm2
mulss  %xmm3,%xmm1
addss  %xmm2,%xmm1
mulss  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<back_in>:
divss  %xmm1,%xmm0
mulss  %xmm0,%xmm2
mulss  %xmm0,%xmm2
mulss  0xeec(%rip),%xmm0
addss  0xee8(%rip),%xmm0
mulss  %xmm2,%xmm0
ret

LLVM IR (-O0):
define float @back_in(float %0, float %1, float %2) {
%4 = alloca float
%5 = alloca float
%6 = alloca float
%7 = alloca float
%8 = alloca float
store float %0, float* %4
store float %1, float* %5
store float %2, float* %6
store float 0x3FFB39AC00000000, float* %7
%9 = load float, float* %4
%10 = load float, float* %5
%11 = fdiv float %9, %10
store float %11, float* %8
%12 = load float, float* %6
%13 = load float, float* %8
%14 = fmul float %12, %13
%15 = load float, float* %8
%16 = fmul float %14, %15
%17 = load float, float* %7
%18 = fadd float %17, 1.000000e+00
%19 = load float, float* %8
%20 = load float, float* %7
%21 = fneg float %20
%22 = call float @llvm.fmuladd.f32(float %18, float %19, float %21)
%23 = fmul float %16, %22
ret float %23
}

LLVM IR (-O2):
define float @back_in(float %0, float %1, float %2) {
%4 = fdiv float %0, %1
%5 = fmul float %4, %2
%6 = fmul float %4, %5
%7 = tail call float @llvm.fmuladd.f32(float %4, float 0x40059CD600000000, float 0xBFFB39AC00000000)
%8 = fmul float %7, %6
ret float %8
}