xunge/DecIR huggingface dataset:
void bar2(void (*foo6)()) {
  void (*foo7)() = 0;
  void (*foo8[2])() = {0};
}


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

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

LLVM IR (-O0):
define void @bar2(void (...)* %0) {
%2 = alloca void (...)*
%3 = alloca void (...)*
%4 = alloca [2 x void (...)*]
store void (...)* %0, void (...)** %2
store void (...)* null, void (...)** %3
%5 = bitcast [2 x void (...)*]* %4 to i8*
ret void
}

LLVM IR (-O2):
define void @bar2(void (...)* nocapture %0) {
ret void
}
int pathconN_nm3_f0(const double **arg, double **res, int *iw, double *w,
                    int mem) {
  return 0;
}


x86 assembly (clang, -O0):
<pathconN_nm3_f0>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8d,-0x24(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @pathconN_nm3_f0(double** %0, double** %1, i32* %2, double* %3, i32 %4) {
%6 = alloca double**
%7 = alloca double**
%8 = alloca i32*
%9 = alloca double*
%10 = alloca i32
store double** %0, double*** %6
store double** %1, double*** %7
store i32* %2, i32** %8
store double* %3, double** %9
store i32 %4, i32* %10
ret i32 0
}

LLVM IR (-O2):
define i32 @pathconN_nm3_f0(double** nocapture readnone %0, double** nocapture readnone %1, i32* nocapture readnone %2, double* nocapture readnone %3, i32 %4) {
ret i32 0
}
/* Variables and functions */
double __remainder(double, double);
double __drem(double x, double y) { return __remainder(x, y); }


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

x86 assembly (clang, -O2):
<__drem>:
jmp    1030 <__remainder@plt>

LLVM IR (-O0):
define double @__drem(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = load double, double* %3
%6 = load double, double* %4
%7 = call double @__remainder(double %5, double %6)
ret double %7
}

LLVM IR (-O2):
define double @__drem(double %0, double %1) {
%3 = tail call double @__remainder(double %0, double %1)
ret double %3
}
/* Type definitions */
typedef scalar_t__ int32_t;

/* Variables and functions */
int cmp_int(const void *p1, const void *p2) {
  int32_t v1 = *(int32_t *)p1;
  int32_t v2 = *(int32_t *)p2;
  if (v1 < v2)
    return -1;
  else if (v1 == v2)
    return 0;
  else
    return 1;
}


x86 assembly (clang, -O0):
<cmp_int>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x28(%rbp)
mov    -0x20(%rbp),%rax
cmp    -0x28(%rbp),%rax
jge    113c <cmp_int+0x3c>
movl   $0xffffffff,-0x4(%rbp)
jmp    115d <cmp_int+0x5d>
mov    -0x20(%rbp),%rax
cmp    -0x28(%rbp),%rax
jne    1156 <cmp_int+0x56>
movl   $0x0,-0x4(%rbp)
jmp    115d <cmp_int+0x5d>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<cmp_int>:
mov    (%rdi),%rax
xor    %ecx,%ecx
cmp    (%rsi),%rax
setne  %cl
mov    $0xffffffff,%eax
cmovge %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @cmp_int(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 slt i64 %4, %6
%8 = icmp ne i64 %4, %6
%9 = zext i1 %8 to i32
%10 = select i1 %7, i32 -1, i32 %9
ret i32 %10
}
/* Variables and functions */
unsigned short __gnu_f2h_internal(unsigned int, int);
unsigned short __gnu_f2h_ieee(unsigned int a) {
  return __gnu_f2h_internal(a, 1);
}


x86 assembly (clang, -O0):
<__gnu_f2h_ieee>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    $0x1,%esi
call   1030 <__gnu_f2h_internal@plt>
movzwl %ax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__gnu_f2h_ieee>:
mov    $0x1,%esi
jmp    1030 <__gnu_f2h_internal@plt>

LLVM IR (-O0):
define zeroext i16 @__gnu_f2h_ieee(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call zeroext i16 @__gnu_f2h_internal(i32 %3, i32 1)
ret i16 %4
}

LLVM IR (-O2):
define zeroext i16 @__gnu_f2h_ieee(i32 %0) {
%2 = tail call zeroext i16 @__gnu_f2h_internal(i32 %0, i32 1)
ret i16 %2
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *,
                           char const *, int);
int /*<<< orphan*/ stderr;
void test_assert_print(const char *msg, const char *file, int line) {
  fprintf(stderr, "Assertion %s failed, file %s, line %d\n", msg, file, line);
  exit(1);
}


x86 assembly (clang, -O0):
<test_assert_print>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    0x2ea6(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
mov    -0x10(%rbp),%rcx
mov    -0x14(%rbp),%r8d
lea    0xeb1(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<test_assert_print>:
push   %rax
mov    %edx,%r8d
mov    %rsi,%rcx
mov    %rdi,%rdx
mov    0x2eaf(%rip),%rax
mov    (%rax),%edi
lea    0xec6(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [39 x i8] c"Assertion %s failed, file %s, line %d\0A\00"
define void @test_assert_print(i8* %0, i8* %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i32
store i8* %0, i8** %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%7 = load i32, i32* @stderr
%8 = load i8*, i8** %4
%9 = load i8*, i8** %5
%10 = load i32, i32* %6
%11 = call i32 @fprintf(i32 %7, i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0), i8* %8, i8* %9, i32 %10)
%12 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [39 x i8] c"Assertion %s failed, file %s, line %d\0A\00"
define void @test_assert_print(i8* %0, i8* %1, i32 %2) {
%4 = load i32, i32* @stderr
%5 = tail call i32 @fprintf(i32 %4, i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %1, i32 %2)
%6 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
long makeNumber(long);
long runtime_makeNumber(long n) { return makeNumber(n); }


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

x86 assembly (clang, -O2):
<runtime_makeNumber>:
jmp    1030 <makeNumber@plt>

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

LLVM IR (-O2):
define i64 @runtime_makeNumber(i64 %0) {
%2 = tail call i64 @makeNumber(i64 %0)
ret i64 %2
}
void test_array(int *a __attribute__((unused))) {}


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

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

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

LLVM IR (-O2):
define void @test_array(i32* nocapture %0) {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ val;

/* Variables and functions */
unsigned long long byteSwap64(unsigned long long);
int /*<<< orphan*/ memcpy(unsigned long long *, char *, int);
unsigned long long memReadBits64(char **pPt, int isSwapped) {
  unsigned long long val;
  memcpy(&val, *pPt, sizeof(val));
  if (isSwapped)
    val = byteSwap64(val);
  *pPt += sizeof(val);
  return val;
}


x86 assembly (clang, -O0):
<memReadBits64>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rsi
lea    -0x18(%rbp),%rdi
mov    $0x8,%edx
call   1040 <memcpy@plt>
cmpl   $0x0,-0xc(%rbp)
je     115b <memReadBits64+0x3b>
mov    -0x18(%rbp),%rdi
call   1030 <byteSwap64@plt>
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rcx
add    $0x8,%rcx
mov    %rcx,(%rax)
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<memReadBits64>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %rdi,%rbx
mov    (%rdi),%rsi
mov    %rsp,%rdi
mov    $0x8,%edx
call   1040 <memcpy@plt>
mov    (%rsp),%rax
test   %ebp,%ebp
je     1148 <memReadBits64+0x28>
mov    %rax,%rdi
call   1030 <byteSwap64@plt>
addq   $0x8,(%rbx)
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i64 @memReadBits64(i8** %0, i32 %1) {
%3 = alloca i8**
%4 = alloca i32
%5 = alloca i64
store i8** %0, i8*** %3
store i32 %1, i32* %4
%6 = load i8**, i8*** %3
%7 = load i8*, i8** %6
%8 = call i32 @memcpy(i64* %5, i8* %7, i32 8)
%9 = load i32, i32* %4
%10 = icmp ne i32 %9, 0
br i1 %10, label %11, label %14
11: ; preds = %2
%12 = load i64, i64* %5
%13 = call i64 @byteSwap64(i64 %12)
store i64 %13, i64* %5
br label %14
14: ; preds = %11, %2
%15 = load i8**, i8*** %3
%16 = load i8*, i8** %15
%17 = getelementptr inbounds i8, i8* %16, i64 8
store i8* %17, i8** %15
%18 = load i64, i64* %5
ret i64 %18
}

LLVM IR (-O2):
define i64 @memReadBits64(i8** nocapture %0, i32 %1) {
%3 = alloca i64
%4 = bitcast i64* %3 to i8*
%5 = load i8*, i8** %0
%6 = call i32 @memcpy(i64* %3, i8* %5, i32 8)
%7 = icmp eq i32 %1, 0
%8 = load i64, i64* %3
br i1 %7, label %11, label %9
9: ; preds = %2
%10 = call i64 @byteSwap64(i64 %8)
br label %11
11: ; preds = %2, %9
%12 = phi i64 [ %10, %9 ], [ %8, %2 ]
%13 = load i8*, i8** %0
%14 = getelementptr inbounds i8, i8* %13, i64 8
store i8* %14, i8** %0
ret i64 %12
}
OP(ed, bf) { illegal_2(); }


x86 assembly (clang, -O0):
<OP>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    $0x0,%al
call   1030 <illegal_2@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @OP(i32 %0, i32 %1) {
%3 = tail call i32 (...) @illegal_2()
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *, int);
int /*<<< orphan*/ puts(char *);
int main(void) {
  int i;
  puts("This should print \"wow = I\" for I from 0 to 39 inclusive.");
  for (i = 0; i < 40; i++)
    printf("%s = %d\n", "wow", i);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
call   1030 <puts@plt>
movl   $0x0,-0x8(%rbp)
cmpl   $0x28,-0x8(%rbp)
jge    1170 <main+0x50>
mov    -0x8(%rbp),%edx
lea    0xee4(%rip),%rdi
lea    0xee6(%rip),%rsi
call   1040 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1142 <main+0x22>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
lea    0xed4(%rip),%rdi
call   1030 <puts@plt>
xor    %ebx,%ebx
lea    0xf00(%rip),%r14
lea    0xf02(%rip),%r15
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    %r14,%rdi
mov    %r15,%rsi
mov    %ebx,%edx
call   1040 <printf@plt>
add    $0x1,%ebx
cmp    $0x28,%ebx
jne    1150 <main+0x30>
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [58 x i8] c"This should print \22wow = I\22 for I from 0 to 39 inclusive.\00"
@.str.1 = [9 x i8] c"%s = %d\0A\00"
@.str.2 = [4 x i8] c"wow\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 @puts(i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str, i64 0, i64 0))
store i32 0, i32* %2
br label %4
4: ; preds = %10, %0
%5 = load i32, i32* %2
%6 = icmp slt i32 %5, 40
br i1 %6, label %7, label %13
7: ; preds = %4
%8 = load i32, i32* %2
%9 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 %8)
br label %10
10: ; preds = %7
%11 = load i32, i32* %2
%12 = add nsw i32 %11, 1
store i32 %12, i32* %2
br label %4
13: ; preds = %4
ret i32 0
}

LLVM IR (-O2):
@.str = [58 x i8] c"This should print \22wow = I\22 for I from 0 to 39 inclusive.\00"
@.str.1 = [9 x i8] c"%s = %d\0A\00"
@.str.2 = [4 x i8] c"wow\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([58 x i8], [58 x i8]* @.str, i64 0, i64 0))
br label %2
2: ; preds = %0, %2
%3 = phi i32 [ 0, %0 ], [ %5, %2 ]
%4 = tail call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 %3)
%5 = add nuw nsw i32 %3, 1
%6 = icmp eq i32 %5, 40
br i1 %6, label %7, label %2
7: ; preds = %2
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ pid_t;

/* Variables and functions */
int /*<<< orphan*/ appaserver_link_get_pid_filename(char **, char **, char *,
                                                    char *, int /*<<< orphan*/,
                                                    char *, char *);
void appaserver_link_pid_filename(char **output_filename,
                                  char **prompt_filename,
                                  char *application_name,
                                  char *document_root_directory, pid_t pid,
                                  char *process_name, char *extension) {
  appaserver_link_get_pid_filename(output_filename, prompt_filename,
                                   application_name, document_root_directory,
                                   pid, process_name, extension);
}


x86 assembly (clang, -O0):
<appaserver_link_pid_filename>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    0x10(%rbp),%rax
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8d,-0x24(%rbp)
mov    %r9,-0x30(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    -0x24(%rbp),%r8d
mov    -0x30(%rbp),%r9
mov    0x10(%rbp),%rax
mov    %rax,(%rsp)
call   1030 <appaserver_link_get_pid_filename@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<appaserver_link_pid_filename>:
jmp    1030 <appaserver_link_get_pid_filename@plt>

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

LLVM IR (-O2):
define void @appaserver_link_pid_filename(i8** %0, i8** %1, i8* %2, i8* %3, i32 %4, i8* %5, i8* %6) {
%8 = tail call i32 @appaserver_link_get_pid_filename(i8** %0, i8** %1, i8* %2, i8* %3, i32 %4, i8* %5, i8* %6)
ret void
}
/* Variables and functions */
int rand();
void init(int *begin, int *end) {
  int *p;
  for (p = begin; p != end; ++p)
    *p = rand() & ((1 << (3 * 4)) - 1);
}


x86 assembly (clang, -O0):
<init>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
cmp    -0x10(%rbp),%rax
je     115c <init+0x4c>
mov    $0x0,%al
call   1030 <rand@plt>
mov    %eax,%ecx
and    $0xfff,%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x18(%rbp),%rax
add    $0x4,%rax
mov    %rax,-0x18(%rbp)
jmp    1128 <init+0x18>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<init>:
push   %r14
push   %rbx
push   %rax
cmp    %rsi,%rdi
je     1137 <init+0x27>
mov    %rsi,%r14
mov    %rdi,%rbx
nop
xor    %eax,%eax
call   1030 <rand@plt>
and    $0xfff,%eax
mov    %eax,(%rbx)
add    $0x4,%rbx
cmp    %r14,%rbx
jne    1120 <init+0x10>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @init(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
store i32* %6, i32** %5
br label %7
7: ; preds = %15, %2
%8 = load i32*, i32** %5
%9 = load i32*, i32** %4
%10 = icmp ne i32* %8, %9
br i1 %10, label %11, label %18
11: ; preds = %7
%12 = call i32 (...) @rand()
%13 = and i32 %12, 4095
%14 = load i32*, i32** %5
store i32 %13, i32* %14
br label %15
15: ; preds = %11
%16 = load i32*, i32** %5
%17 = getelementptr inbounds i32, i32* %16, i32 1
store i32* %17, i32** %5
br label %7
18: ; preds = %7
ret void
}

LLVM IR (-O2):
define void @init(i32* writeonly %0, i32* readnone %1) {
%3 = icmp eq i32* %0, %1
br i1 %3, label %10, label %4
4: ; preds = %2, %4
%5 = phi i32* [ %8, %4 ], [ %0, %2 ]
%6 = tail call i32 (...) @rand()
%7 = and i32 %6, 4095
store i32 %7, i32* %5
%8 = getelementptr inbounds i32, i32* %5, i64 1
%9 = icmp eq i32* %8, %1
br i1 %9, label %10, label %4
10: ; preds = %4, %2
ret void
}
int f(int i) { return 0x6e00; }


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

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

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

LLVM IR (-O2):
define i32 @f(i32 %0) {
ret i32 28160
}
/* Variables and functions */
int /*<<< orphan*/ _hmt_register_covercase(char *, char *);
void _hmt_covercase_HMM_SinF_init(void) {
  _hmt_register_covercase("HMM_SinF", "1");
}


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

x86 assembly (clang, -O2):
<_hmt_covercase_HMM_SinF_init>:
lea    0xee9(%rip),%rdi
lea    0xeeb(%rip),%rsi
jmp    1030 <_hmt_register_covercase@plt>

LLVM IR (-O0):
@.str = [9 x i8] c"HMM_SinF\00"
@.str.1 = [2 x i8] c"1\00"
define void @_hmt_covercase_HMM_SinF_init() {
%1 = call i32 @_hmt_register_covercase(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [9 x i8] c"HMM_SinF\00"
@.str.1 = [2 x i8] c"1\00"
define void @_hmt_covercase_HMM_SinF_init() {
%1 = tail call i32 @_hmt_register_covercase(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
scalar_t__ malloc(int);
int /*<<< orphan*/ printf(char *, double, char *);
int /*<<< orphan*/ sprintf(char *, char *, double);
char *doubleToString(double thing) {
  char *str = (char *)malloc(sizeof(char) * 30);
  sprintf(str, "%lf", thing);
  printf("\nConverted double %lf to string %s", thing, str);
  return str;
}


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

x86 assembly (clang, -O2):
<doubleToString>:
push   %rbx
sub    $0x10,%rsp
movsd  %xmm0,0x8(%rsp)
mov    $0x1e,%edi
call   1040 <malloc@plt>
mov    %rax,%rbx
lea    0xeb1(%rip),%rsi
mov    %rax,%rdi
movsd  0x8(%rsp),%xmm0
call   1050 <sprintf@plt>
lea    0xea0(%rip),%rdi
movsd  0x8(%rsp),%xmm0
mov    %rbx,%rsi
call   1030 <printf@plt>
mov    %rbx,%rax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%lf\00"
@.str.1 = [35 x i8] c"\0AConverted double %lf to string %s\00"
define i8* @doubleToString(double %0) {
%2 = alloca double
%3 = alloca i8*
store double %0, double* %2
%4 = call i64 @malloc(i32 30)
%5 = inttoptr i64 %4 to i8*
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = load double, double* %2
%8 = call i32 @sprintf(i8* %6, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double %7)
%9 = load double, double* %2
%10 = load i8*, i8** %3
%11 = call i32 @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.1, i64 0, i64 0), double %9, i8* %10)
%12 = load i8*, i8** %3
ret i8* %12
}

LLVM IR (-O2):
@.str = [4 x i8] c"%lf\00"
@.str.1 = [35 x i8] c"\0AConverted double %lf to string %s\00"
define i8* @doubleToString(double %0) {
%2 = tail call i64 @malloc(i32 30)
%3 = inttoptr i64 %2 to i8*
%4 = tail call i32 @sprintf(i8* dereferenceable(1) %3, i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double %0)
%5 = tail call i32 @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.1, i64 0, i64 0), double %0, i8* %3)
ret i8* %3
}
/* Variables and functions */
int setenv(char const *, char const *, int);
int aeron_env_set(const char *key, const char *val) {
  return setenv(key, val, 1);
}


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

x86 assembly (clang, -O2):
<aeron_env_set>:
mov    $0x1,%edx
jmp    1030 <setenv@plt>

LLVM IR (-O0):
define i32 @aeron_env_set(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 = load i8*, i8** %4
%7 = call i32 @setenv(i8* %5, i8* %6, i32 1)
ret i32 %7
}

LLVM IR (-O2):
define i32 @aeron_env_set(i8* %0, i8* %1) {
%3 = tail call i32 @setenv(i8* %0, i8* %1, i32 1)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void abc(void) {
  void xyz(void);
  printf("abc() calling xyz()\n");
  xyz();
}


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

x86 assembly (clang, -O2):
<abc>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
pop    %rax
jmp    1040 <xyz@plt>

LLVM IR (-O0):
@.str = [21 x i8] c"abc() calling xyz()\0A\00"
define void @abc() {
%1 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [20 x i8] c"abc() calling xyz()\00"
define void @abc() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @str, i64 0, i64 0))
tail call void @xyz()
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint64_t;
struct inode_type {
  int dummy;
};
typedef int int32_t;

/* Variables and functions */
int32_t romfs_truncate_inode(struct inode_type *inode, uint64_t size) {
  return -30;
}


x86 assembly (clang, -O0):
<romfs_truncate_inode>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    $0xffffffe2,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.inode_type = type { i32 }
define i32 @romfs_truncate_inode(%struct.inode_type* %0, i32 %1) {
%3 = alloca %struct.inode_type*
%4 = alloca i32
store %struct.inode_type* %0, %struct.inode_type** %3
store i32 %1, i32* %4
ret i32 -30
}

LLVM IR (-O2):
%struct.inode_type = type { i32 }
define i32 @romfs_truncate_inode(%struct.inode_type* nocapture readnone %0, i32 %1) {
ret i32 -30
}
unsigned long xSysTickPeriodGet(void) {
  return ((*((volatile unsigned long *)(0xE000E014))) + 1);
}


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

x86 assembly (clang, -O2):
<xSysTickPeriodGet>:
mov    $0xe000e014,%eax
mov    (%rax),%rax
add    $0x1,%rax
ret

LLVM IR (-O0):
define i64 @xSysTickPeriodGet() {
%1 = load volatile i64, i64* inttoptr (i64 3758153748 to i64*)
%2 = add i64 %1, 1
ret i64 %2
}

LLVM IR (-O2):
define i64 @xSysTickPeriodGet() {
%1 = load volatile i64, i64* inttoptr (i64 3758153748 to i64*)
%2 = add i64 %1, 1
ret i64 %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main() {
  printf("This is to test github working\n");
  printf("This is another test for checking the versions of the git\n");
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
call   1030 <printf@plt>
lea    0xef9(%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>
lea    0xefb(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [32 x i8] c"This is to test github working\0A\00"
@.str.1 = [59 x i8] c"This is another test for checking the versions of the git\0A\00"
define i32 @main() {
%1 = call i32 @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([59 x i8], [59 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [31 x i8] c"This is to test github working\00"
@str.2 = [58 x i8] c"This is another test for checking the versions of the git\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([58 x i8], [58 x i8]* @str.2, i64 0, i64 0))
ret i32 0
}
long double gdtrcl(a, b, x)
long double a, b, x;
{
  if (x < 0.0L) {
    mtherr("gdtrcl", 1);
    return (0.0L);
  }
  return (igamcl(b, a * x));
}


x86 assembly (clang, -O0):
<gdtrcl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
fldt   0x30(%rbp)
fldt   0x20(%rbp)
fldt   0x10(%rbp)
fstpt  -0x20(%rbp)
fstpt  -0x30(%rbp)
fstpt  -0x40(%rbp)
fldt   -0x40(%rbp)
fldz
fucomip %st(1),%st
fstp   %st(0)
jbe    116b <gdtrcl+0x4b>
jmp    114e <gdtrcl+0x2e>
lea    0xeab(%rip),%rdi
xor    %eax,%eax
mov    $0x1,%esi
call   1040 <mtherr@plt>
fldz
fstpt  -0x10(%rbp)
jmp    118e <gdtrcl+0x6e>
fldt   -0x30(%rbp)
fldt   -0x20(%rbp)
fldt   -0x40(%rbp)
fmulp  %st,%st(1)
mov    %rsp,%rax
fstpt  0x10(%rax)
fstpt  (%rax)
xor    %eax,%eax
call   1030 <igamcl@plt>
mov    %eax,-0x44(%rbp)
fildl  -0x44(%rbp)
fstpt  -0x10(%rbp)
fldt   -0x10(%rbp)
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gdtrcl>:
sub    $0x38,%rsp
fldt   0x60(%rsp)
fldt   0x50(%rsp)
fldt   0x40(%rsp)
fldz
fucomi %st(3),%st
jbe    115c <gdtrcl+0x3c>
fstp   %st(2)
fstp   %st(2)
fstp   %st(1)
lea    0xebd(%rip),%rdi
mov    $0x1,%esi
xor    %eax,%eax
fstpt  0x2c(%rsp)
call   1040 <mtherr@plt>
fldt   0x2c(%rsp)
add    $0x38,%rsp
ret
fstp   %st(0)
fmulp  %st,%st(2)
fxch   %st(1)
fstpt  0x10(%rsp)
fstpt  (%rsp)
xor    %eax,%eax
call   1030 <igamcl@plt>
mov    %eax,0x28(%rsp)
fildl  0x28(%rsp)
add    $0x38,%rsp
ret

LLVM IR (-O0):
@.str = [7 x i8] c"gdtrcl\00"
define x86_fp80 @gdtrcl(x86_fp80 %0, x86_fp80 %1, x86_fp80 %2) {
%4 = alloca x86_fp80
%5 = alloca x86_fp80
%6 = alloca x86_fp80
%7 = alloca x86_fp80
store x86_fp80 %0, x86_fp80* %5
store x86_fp80 %1, x86_fp80* %6
store x86_fp80 %2, x86_fp80* %7
%8 = load x86_fp80, x86_fp80* %7
%9 = fcmp olt x86_fp80 %8, 0xK00000000000000000000
br i1 %9, label %10, label %12
10: ; preds = %3
%11 = call i32 (i8*, i32, ...) bitcast (i32 (...)* @mtherr to i32 (i8*, i32, ...)*)(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 1)
store x86_fp80 0xK00000000000000000000, x86_fp80* %4
br label %19
12: ; preds = %3
%13 = load x86_fp80, x86_fp80* %6
%14 = load x86_fp80, x86_fp80* %5
%15 = load x86_fp80, x86_fp80* %7
%16 = fmul x86_fp80 %14, %15
%17 = call i32 (x86_fp80, x86_fp80, ...) bitcast (i32 (...)* @igamcl to i32 (x86_fp80, x86_fp80, ...)*)(x86_fp80 %13, x86_fp80 %16)
%18 = sitofp i32 %17 to x86_fp80
store x86_fp80 %18, x86_fp80* %4
br label %19
19: ; preds = %12, %10
%20 = load x86_fp80, x86_fp80* %4
ret x86_fp80 %20
}

LLVM IR (-O2):
@.str = [7 x i8] c"gdtrcl\00"
define x86_fp80 @gdtrcl(x86_fp80 %0, x86_fp80 %1, x86_fp80 %2) {
%4 = fcmp olt x86_fp80 %2, 0xK00000000000000000000
br i1 %4, label %5, label %7
5: ; preds = %3
%6 = tail call i32 (i8*, i32, ...) bitcast (i32 (...)* @mtherr to i32 (i8*, i32, ...)*)(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 1)
br label %11
7: ; preds = %3
%8 = fmul x86_fp80 %0, %2
%9 = tail call i32 (x86_fp80, x86_fp80, ...) bitcast (i32 (...)* @igamcl to i32 (x86_fp80, x86_fp80, ...)*)(x86_fp80 %1, x86_fp80 %8)
%10 = sitofp i32 %9 to x86_fp80
br label %11
11: ; preds = %7, %5
%12 = phi x86_fp80 [ 0xK00000000000000000000, %5 ], [ %10, %7 ]
ret x86_fp80 %12
}
void adjust_priority_a2dp(int start) {
  (void)start;
  return;
}


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

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

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

LLVM IR (-O2):
define void @adjust_priority_a2dp(i32 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ addbyte(int);
void MMX_PMULLW(int dst_reg, int src_reg) {
  addbyte(0x66);
  addbyte(0x0f);
  addbyte(0xd5);
  addbyte(0xc0 | (dst_reg << 3) | src_reg);
}


x86 assembly (clang, -O0):
<MMX_PMULLW>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    $0x66,%edi
call   1030 <addbyte@plt>
mov    $0xf,%edi
call   1030 <addbyte@plt>
mov    $0xd5,%edi
call   1030 <addbyte@plt>
mov    -0x4(%rbp),%edi
shl    $0x3,%edi
or     $0xc0,%edi
or     -0x8(%rbp),%edi
call   1030 <addbyte@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<MMX_PMULLW>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
mov    $0x66,%edi
call   1030 <addbyte@plt>
mov    $0xf,%edi
call   1030 <addbyte@plt>
mov    $0xd5,%edi
call   1030 <addbyte@plt>
shl    $0x3,%ebp
or     %ebx,%ebp
or     $0xc0,%ebp
mov    %ebp,%edi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <addbyte@plt>

LLVM IR (-O0):
define void @MMX_PMULLW(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = call i32 @addbyte(i32 102)
%6 = call i32 @addbyte(i32 15)
%7 = call i32 @addbyte(i32 213)
%8 = load i32, i32* %3
%9 = shl i32 %8, 3
%10 = or i32 192, %9
%11 = load i32, i32* %4
%12 = or i32 %10, %11
%13 = call i32 @addbyte(i32 %12)
ret void
}

LLVM IR (-O2):
define void @MMX_PMULLW(i32 %0, i32 %1) {
%3 = tail call i32 @addbyte(i32 102)
%4 = tail call i32 @addbyte(i32 15)
%5 = tail call i32 @addbyte(i32 213)
%6 = shl i32 %0, 3
%7 = or i32 %6, %1
%8 = or i32 %7, 192
%9 = tail call i32 @addbyte(i32 %8)
ret void
}
void foo_1_2_2_1_2_2_1_1_2() {}


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

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

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

LLVM IR (-O2):
define void @foo_1_2_2_1_2_2_1_1_2() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ SLsmg_set_color(int);
void SLsmg_reverse_video(void) { SLsmg_set_color(1); }


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

x86 assembly (clang, -O2):
<SLsmg_reverse_video>:
mov    $0x1,%edi
jmp    1030 <SLsmg_set_color@plt>

LLVM IR (-O0):
define void @SLsmg_reverse_video() {
%1 = call i32 @SLsmg_set_color(i32 1)
ret void
}

LLVM IR (-O2):
define void @SLsmg_reverse_video() {
%1 = tail call i32 @SLsmg_set_color(i32 1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ findFactor(long long);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, long long *);
int main(void) {
  long long int num;
  printf("Enter a number: ");
  scanf("%lli", &num);
  findFactor(num);
  printf("\n");
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xeb8(%rip),%rdi
call   1040 <printf@plt>
lea    0xebd(%rip),%rdi
mov    %rsp,%rsi
call   1050 <scanf@plt>
mov    (%rsp),%rdi
call   1060 <findFactor@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [17 x i8] c"Enter a number: \00"
@.str.1 = [5 x i8] c"%lli\00"
define i32 @main() {
%1 = alloca i64
%2 = bitcast i64* %1 to i8*
%3 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i64* %1)
%5 = load i64, i64* %1
%6 = call i32 @findFactor(i64 %5)
%7 = call i32 @putchar(i32 10)
ret i32 0
}
void foo(int *p, int b) {
  if (b)
    *p = 1;
  *p = 0;
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
je     111f <foo+0x1f>
mov    -0x8(%rbp),%rax
movl   $0x1,(%rax)
mov    -0x8(%rbp),%rax
movl   $0x0,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo>:
movl   $0x0,(%rdi)
ret

LLVM IR (-O0):
define void @foo(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
store i32* %0, i32** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = icmp ne i32 %5, 0
br i1 %6, label %7, label %9
7: ; preds = %2
%8 = load i32*, i32** %3
store i32 1, i32* %8
br label %9
9: ; preds = %7, %2
%10 = load i32*, i32** %3
store i32 0, i32* %10
ret void
}

LLVM IR (-O2):
define void @foo(i32* nocapture writeonly %0, i32 %1) {
store i32 0, i32* %0
ret void
}
/* Variables and functions */
unsigned int gencookie(char *);
int /*<<< orphan*/ printf(char *, unsigned int);
int main(int argc, char *argv[]) {
  int i;
  for (i = 1; i < argc; i++) {
    unsigned c = gencookie(argv[i]);
    printf("0x%x\n", c);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x1,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    117a <main+0x5a>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1040 <gencookie@plt>
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%esi
lea    0xe99(%rip),%rdi
call   1030 <printf@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    113d <main+0x1d>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
cmp    $0x2,%edi
jl     115c <main+0x3c>
mov    %rsi,%r15
mov    %edi,%r12d
mov    $0x1,%ebx
lea    0xec1(%rip),%r14
nop
mov    (%r15,%rbx,8),%rdi
call   1040 <gencookie@plt>
mov    %r14,%rdi
mov    %eax,%esi
call   1030 <printf@plt>
add    $0x1,%rbx
cmp    %rbx,%r12
jne    1140 <main+0x20>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
@.str = [6 x i8] c"0x%x\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp sgt i32 %0, 1
br i1 %3, label %4, label %14
4: ; preds = %2
%5 = zext i32 %0 to i64
br label %6
6: ; preds = %4, %6
%7 = phi i64 [ 1, %4 ], [ %12, %6 ]
%8 = getelementptr inbounds i8*, i8** %1, i64 %7
%9 = load i8*, i8** %8
%10 = tail call i32 @gencookie(i8* %9)
%11 = tail call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 %10)
%12 = add nuw nsw i64 %7, 1
%13 = icmp eq i64 %12, %5
br i1 %13, label %14, label %6
14: ; preds = %6, %2
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ memcpy(void *, void *, int);
void __attribute__((regparm(3))) memcpy_11(void *dest, void *src) {
  memcpy(dest, src, 11);
}


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

x86 assembly (clang, -O2):
<memcpy_11>:
mov    $0xb,%edx
jmp    1030 <memcpy@plt>

LLVM IR (-O0):
define void @memcpy_11(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 = load i8*, i8** %4
%7 = call i32 @memcpy(i8* %5, i8* %6, i32 11)
ret void
}

LLVM IR (-O2):
define void @memcpy_11(i8* %0, i8* %1) {
%3 = tail call i32 @memcpy(i8* %0, i8* %1, i32 11)
ret void
}
void handle_58(int sig) {}


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

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

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

LLVM IR (-O2):
define void @handle_58(i32 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ parse_bool(char const *, int *);
int /*<<< orphan*/ set_auto_expand_albums_selcur_int(int);
void set_auto_expand_albums_selcur(unsigned int id, const char *buf) {
  int tmp;
  parse_bool(buf, &tmp);
  set_auto_expand_albums_selcur_int(tmp);
}


x86 assembly (clang, -O0):
<set_auto_expand_albums_selcur>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    -0x14(%rbp),%rsi
call   1040 <parse_bool@plt>
mov    -0x14(%rbp),%edi
call   1030 <set_auto_expand_albums_selcur_int@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_auto_expand_albums_selcur>:
push   %rax
mov    %rsi,%rdi
lea    0x4(%rsp),%rsi
call   1040 <parse_bool@plt>
mov    0x4(%rsp),%edi
call   1030 <set_auto_expand_albums_selcur_int@plt>
pop    %rax
ret

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

LLVM IR (-O2):
define void @set_auto_expand_albums_selcur(i32 %0, i8* %1) {
%3 = alloca i32
%4 = bitcast i32* %3 to i8*
%5 = call i32 @parse_bool(i8* %1, i32* %3)
%6 = load i32, i32* %3
%7 = call i32 @set_auto_expand_albums_selcur_int(i32 %6)
ret void
}
int is_operator(char c) { return (c == '!' || c == '&' || c == '|'); }


x86 assembly (clang, -O0):
<is_operator>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x21,%ecx
mov    %al,-0x2(%rbp)
je     113b <is_operator+0x3b>
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x26,%ecx
mov    %al,-0x2(%rbp)
je     113b <is_operator+0x3b>
movsbl -0x1(%rbp),%eax
cmp    $0x7c,%eax
sete   %al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_operator>:
mov    $0x1,%eax
cmp    $0x21,%dil
je     1111 <is_operator+0x11>
cmp    $0x26,%dil
jne    1112 <is_operator+0x12>
ret
xor    %eax,%eax
cmp    $0x7c,%dil
sete   %al
ret

LLVM IR (-O0):
define i32 @is_operator(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = icmp eq i32 %4, 33
br i1 %5, label %14, label %6
6: ; preds = %1
%7 = load i8, i8* %2
%8 = sext i8 %7 to i32
%9 = icmp eq i32 %8, 38
br i1 %9, label %14, label %10
10: ; preds = %6
%11 = load i8, i8* %2
%12 = sext i8 %11 to i32
%13 = icmp eq i32 %12, 124
br label %14
14: ; preds = %10, %6, %1
%15 = phi i1 [ true, %6 ], [ true, %1 ], [ %13, %10 ]
%16 = zext i1 %15 to i32
ret i32 %16
}

LLVM IR (-O2):
define i32 @is_operator(i8 signext %0) {
switch i8 %0, label %2 [
i8 38, label %5
i8 33, label %5
]
2: ; preds = %1
%3 = icmp eq i8 %0, 124
%4 = zext i1 %3 to i32
br label %5
5: ; preds = %1, %1, %2
%6 = phi i32 [ 1, %1 ], [ %4, %2 ], [ 1, %1 ]
ret i32 %6
}
judge_vowel(char c) {
  if (c == 'A' || c == 'E' || c == 'I' || c == 'O' || c == 'U')
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<judge_vowel>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
cmp    $0x41,%eax
je     114b <judge_vowel+0x4b>
movsbl -0x5(%rbp),%eax
cmp    $0x45,%eax
je     114b <judge_vowel+0x4b>
movsbl -0x5(%rbp),%eax
cmp    $0x49,%eax
je     114b <judge_vowel+0x4b>
movsbl -0x5(%rbp),%eax
cmp    $0x4f,%eax
je     114b <judge_vowel+0x4b>
movsbl -0x5(%rbp),%eax
cmp    $0x55,%eax
jne    1157 <judge_vowel+0x57>
movl   $0x1,-0x4(%rbp)
jmp    115e <judge_vowel+0x5e>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<judge_vowel>:
add    $0xbf,%dil
ror    %dil
xor    %eax,%eax
cmp    $0xa,%dil
ja     111d <judge_vowel+0x1d>
movsbq %dil,%rax
lea    0xee6(%rip),%rcx
mov    (%rcx,%rax,4),%eax
ret

LLVM IR (-O0):
define i32 @judge_vowel(i8 signext %0) {
%2 = alloca i32
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
%6 = icmp eq i32 %5, 65
br i1 %6, label %23, label %7
7: ; preds = %1
%8 = load i8, i8* %3
%9 = sext i8 %8 to i32
%10 = icmp eq i32 %9, 69
br i1 %10, label %23, label %11
11: ; preds = %7
%12 = load i8, i8* %3
%13 = sext i8 %12 to i32
%14 = icmp eq i32 %13, 73
br i1 %14, label %23, label %15
15: ; preds = %11
%16 = load i8, i8* %3
%17 = sext i8 %16 to i32
%18 = icmp eq i32 %17, 79
br i1 %18, label %23, label %19
19: ; preds = %15
%20 = load i8, i8* %3
%21 = sext i8 %20 to i32
%22 = icmp eq i32 %21, 85
br i1 %22, label %23, label %24
23: ; preds = %19, %15, %11, %7, %1
store i32 1, i32* %2
br label %25
24: ; preds = %19
store i32 0, i32* %2
br label %25
25: ; preds = %24, %23
%26 = load i32, i32* %2
ret i32 %26
}

LLVM IR (-O2):
@switch.table.judge_vowel = [11 x i32] [i32 1, i32 0, i32 1, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 0, i32 1]
define i32 @judge_vowel(i8 signext %0) {
%2 = add i8 %0, -65
%3 = tail call i8 @llvm.fshl.i8(i8 %2, i8 %2, i8 7)
%4 = icmp ult i8 %3, 11
br i1 %4, label %5, label %9
5: ; preds = %1
%6 = sext i8 %3 to i64
%7 = getelementptr inbounds [11 x i32], [11 x i32]* @switch.table.judge_vowel, i64 0, i64 %6
%8 = load i32, i32* %7
br label %9
9: ; preds = %1, %5
%10 = phi i32 [ %8, %5 ], [ 0, %1 ]
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int foo();
int main(void) {
  if (foo() != 9)
    abort();
  exit(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1040 <foo@plt>
cmp    $0x9,%eax
je     1156 <main+0x26>
mov    $0x0,%al
call   1030 <abort@plt>
xor    %edi,%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1040 <foo@plt>
cmp    $0x9,%eax
jne    1144 <main+0x14>
xor    %edi,%edi
call   1050 <exit@plt>
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @foo()
%3 = icmp ne i32 %2, 9
br i1 %3, label %4, label %6
4: ; preds = %0
%5 = call i32 (...) @abort()
unreachable
6: ; preds = %0
%7 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @foo()
%2 = icmp eq i32 %1, 9
br i1 %2, label %5, label %3
3: ; preds = %0
%4 = tail call i32 (...) @abort()
unreachable
5: ; preds = %0
%6 = tail call i32 @exit(i32 0)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ g(double, double);
int f(double a) {
  if (a > 0)
    g(a, 3.1);
  else
    g(a, 3.1);
}


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jbe    1146 <f+0x36>
movsd  -0x10(%rbp),%xmm0
movsd  0xec4(%rip),%xmm1
call   1030 <g@plt>
jmp    1158 <f+0x48>
movsd  -0x10(%rbp),%xmm0
movsd  0xead(%rip),%xmm1
call   1030 <g@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f>:
movsd  0xee8(%rip),%xmm1
jmp    1030 <g@plt>

LLVM IR (-O0):
define i32 @f(double %0) {
%2 = alloca i32
%3 = alloca double
store double %0, double* %3
%4 = load double, double* %3
%5 = fcmp ogt double %4, 0.000000e+00
br i1 %5, label %6, label %9
6: ; preds = %1
%7 = load double, double* %3
%8 = call i32 @g(double %7, double 3.100000e+00)
br label %12
9: ; preds = %1
%10 = load double, double* %3
%11 = call i32 @g(double %10, double 3.100000e+00)
br label %12
12: ; preds = %9, %6
%13 = load i32, i32* %2
ret i32 %13
}

LLVM IR (-O2):
define i32 @f(double %0) {
%2 = tail call i32 @g(double %0, double 3.100000e+00)
ret i32 undef
}