xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ puts(char *);
void pro_dmdata_help() {
  puts("-------------------------------------------");
  puts(" This program to get the .dm file and then ");
  puts(" use baseline the data and output the file as .smd");
  puts(" -h help print this");
  puts("-------------------------------------------");
}


x86 assembly (clang, -O0):
<pro_dmdata_help>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
call   1030 <puts@plt>
lea    0xf05(%rip),%rdi
call   1030 <puts@plt>
lea    0xf25(%rip),%rdi
call   1030 <puts@plt>
lea    0xf4c(%rip),%rdi
call   1030 <puts@plt>
lea    0xeb5(%rip),%rdi
call   1030 <puts@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<pro_dmdata_help>:
push   %rbx
lea    0xee8(%rip),%rbx
mov    %rbx,%rdi
call   1030 <puts@plt>
lea    0xf05(%rip),%rdi
call   1030 <puts@plt>
lea    0xf25(%rip),%rdi
call   1030 <puts@plt>
lea    0xf4c(%rip),%rdi
call   1030 <puts@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [44 x i8] c"-------------------------------------------\00"
@.str.1 = [44 x i8] c" This program to get the .dm file and then \00"
@.str.2 = [51 x i8] c" use baseline the data and output the file as .smd\00"
@.str.3 = [20 x i8] c" -h help print this\00"
define void @pro_dmdata_help() {
%1 = call i32 @puts(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @puts(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @puts(i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str.2, i64 0, i64 0))
%4 = call i32 @puts(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.3, i64 0, i64 0))
%5 = call i32 @puts(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [44 x i8] c"-------------------------------------------\00"
@.str.1 = [44 x i8] c" This program to get the .dm file and then \00"
@.str.2 = [51 x i8] c" use baseline the data and output the file as .smd\00"
@.str.3 = [20 x i8] c" -h help print this\00"
define void @pro_dmdata_help() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([44 x i8], [44 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([44 x i8], [44 x i8]* @.str.1, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([51 x i8], [51 x i8]* @.str.2, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str.3, i64 0, i64 0))
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([44 x i8], [44 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Type definitions */
struct cstate {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ addrange(struct cstate *, char, char);
void addranges_w(struct cstate *g) {
  addrange(g, '0', '9');
  addrange(g, 'A', 'Z');
  addrange(g, '_', '_');
  addrange(g, 'a', 'z');
}


x86 assembly (clang, -O0):
<addranges_w>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x30,%esi
mov    $0x39,%edx
call   1030 <addrange@plt>
mov    -0x8(%rbp),%rdi
mov    $0x41,%esi
mov    $0x5a,%edx
call   1030 <addrange@plt>
mov    -0x8(%rbp),%rdi
mov    $0x5f,%edx
mov    %edx,%esi
call   1030 <addrange@plt>
mov    -0x8(%rbp),%rdi
mov    $0x61,%esi
mov    $0x7a,%edx
call   1030 <addrange@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<addranges_w>:
push   %rbx
mov    %rdi,%rbx
mov    $0x30,%esi
mov    $0x39,%edx
call   1030 <addrange@plt>
mov    %rbx,%rdi
mov    $0x41,%esi
mov    $0x5a,%edx
call   1030 <addrange@plt>
mov    %rbx,%rdi
mov    $0x5f,%esi
mov    $0x5f,%edx
call   1030 <addrange@plt>
mov    %rbx,%rdi
mov    $0x61,%esi
mov    $0x7a,%edx
pop    %rbx
jmp    1030 <addrange@plt>

LLVM IR (-O0):
%struct.cstate = type { i32 }
define void @addranges_w(%struct.cstate* %0) {
%2 = alloca %struct.cstate*
store %struct.cstate* %0, %struct.cstate** %2
%3 = load %struct.cstate*, %struct.cstate** %2
%4 = call i32 @addrange(%struct.cstate* %3, i8 signext 48, i8 signext 57)
%5 = load %struct.cstate*, %struct.cstate** %2
%6 = call i32 @addrange(%struct.cstate* %5, i8 signext 65, i8 signext 90)
%7 = load %struct.cstate*, %struct.cstate** %2
%8 = call i32 @addrange(%struct.cstate* %7, i8 signext 95, i8 signext 95)
%9 = load %struct.cstate*, %struct.cstate** %2
%10 = call i32 @addrange(%struct.cstate* %9, i8 signext 97, i8 signext 122)
ret void
}

LLVM IR (-O2):
%struct.cstate = type { i32 }
define void @addranges_w(%struct.cstate* %0) {
%2 = tail call i32 @addrange(%struct.cstate* %0, i8 signext 48, i8 signext 57)
%3 = tail call i32 @addrange(%struct.cstate* %0, i8 signext 65, i8 signext 90)
%4 = tail call i32 @addrange(%struct.cstate* %0, i8 signext 95, i8 signext 95)
%5 = tail call i32 @addrange(%struct.cstate* %0, i8 signext 97, i8 signext 122)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ malloc(int);
void another_func() { malloc(1024 * 1024); }


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

x86 assembly (clang, -O2):
<another_func>:
mov    $0x100000,%edi
jmp    1030 <malloc@plt>

LLVM IR (-O0):
define void @another_func() {
%1 = call i32 @malloc(i32 1048576)
ret void
}

LLVM IR (-O2):
define void @another_func() {
%1 = tail call i32 @malloc(i32 1048576)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ mult_matrix(int, int, int, double *, double *, double *);
void mult_square_matrix(int n, double *a, double *b, double *r) {
  mult_matrix(n, n, n, a, b, r);
}


x86 assembly (clang, -O0):
<mult_square_matrix>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x4(%rbp),%esi
mov    -0x4(%rbp),%edx
mov    -0x10(%rbp),%rcx
mov    -0x18(%rbp),%r8
mov    -0x20(%rbp),%r9
call   1030 <mult_matrix@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mult_square_matrix>:
mov    %rcx,%r9
mov    %rdx,%r8
mov    %rsi,%rcx
mov    %edi,%esi
mov    %edi,%edx
jmp    1030 <mult_matrix@plt>

LLVM IR (-O0):
define void @mult_square_matrix(i32 %0, double* %1, double* %2, double* %3) {
%5 = alloca i32
%6 = alloca double*
%7 = alloca double*
%8 = alloca double*
store i32 %0, i32* %5
store double* %1, double** %6
store double* %2, double** %7
store double* %3, double** %8
%9 = load i32, i32* %5
%10 = load i32, i32* %5
%11 = load i32, i32* %5
%12 = load double*, double** %6
%13 = load double*, double** %7
%14 = load double*, double** %8
%15 = call i32 @mult_matrix(i32 %9, i32 %10, i32 %11, double* %12, double* %13, double* %14)
ret void
}

LLVM IR (-O2):
define void @mult_square_matrix(i32 %0, double* %1, double* %2, double* %3) {
%5 = tail call i32 @mult_matrix(i32 %0, i32 %0, i32 %0, double* %1, double* %2, double* %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ engine_thread();
void *engine_thread_wrapper(void *ptr) {
  engine_thread();
  return 0;
}


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

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

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

LLVM IR (-O2):
define noalias i8* @engine_thread_wrapper(i8* nocapture readnone %0) {
%2 = tail call i32 (...) @engine_thread()
ret i8* null
}
/* Variables and functions */
unsigned int sad_mx_n_c(unsigned char const *, int, unsigned char const *, int,
                        int, int);
unsigned int vp8_sad4x4_c(const unsigned char *src_ptr, int src_stride,
                          const unsigned char *ref_ptr, int ref_stride,
                          int max_sad) {
  return sad_mx_n_c(src_ptr, src_stride, ref_ptr, ref_stride, 4, 4);
}


x86 assembly (clang, -O0):
<vp8_sad4x4_c>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    %r8d,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x18(%rbp),%rdx
mov    -0x1c(%rbp),%ecx
mov    $0x4,%r9d
mov    %r9d,%r8d
call   1030 <sad_mx_n_c@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<vp8_sad4x4_c>:
mov    $0x4,%r8d
mov    $0x4,%r9d
jmp    1030 <sad_mx_n_c@plt>

LLVM IR (-O0):
define i32 @vp8_sad4x4_c(i8* %0, i32 %1, i8* %2, i32 %3, i32 %4) {
%6 = alloca i8*
%7 = alloca i32
%8 = alloca i8*
%9 = alloca i32
%10 = alloca i32
store i8* %0, i8** %6
store i32 %1, i32* %7
store i8* %2, i8** %8
store i32 %3, i32* %9
store i32 %4, i32* %10
%11 = load i8*, i8** %6
%12 = load i32, i32* %7
%13 = load i8*, i8** %8
%14 = load i32, i32* %9
%15 = call i32 @sad_mx_n_c(i8* %11, i32 %12, i8* %13, i32 %14, i32 4, i32 4)
ret i32 %15
}

LLVM IR (-O2):
define i32 @vp8_sad4x4_c(i8* %0, i32 %1, i8* %2, i32 %3, i32 %4) {
%6 = tail call i32 @sad_mx_n_c(i8* %0, i32 %1, i8* %2, i32 %3, i32 4, i32 4)
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ CreatePath(char const *);
int LoadFile(char const *, void **);
int /*<<< orphan*/ SaveFile(char const *, void *, int);
int /*<<< orphan*/ free(void *);
void QCopyFile(const char *from, const char *to) {
  void *buffer;
  int length;
  length = LoadFile(from, &buffer);
  CreatePath(to);
  SaveFile(to, buffer, length);
  free(buffer);
}


x86 assembly (clang, -O0):
<QCopyFile>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0x18(%rbp),%rsi
call   1060 <LoadFile@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <CreatePath@plt>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x1c(%rbp),%edx
call   1050 <SaveFile@plt>
mov    -0x18(%rbp),%rdi
call   1030 <free@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<QCopyFile>:
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rsp,%rsi
call   1060 <LoadFile@plt>
mov    %eax,%ebp
mov    %rbx,%rdi
call   1040 <CreatePath@plt>
mov    (%rsp),%rsi
mov    %rbx,%rdi
mov    %ebp,%edx
call   1050 <SaveFile@plt>
mov    (%rsp),%rdi
call   1030 <free@plt>
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define void @QCopyFile(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i32
store i8* %0, i8** %3
store i8* %1, i8** %4
%7 = load i8*, i8** %3
%8 = call i32 @LoadFile(i8* %7, i8** %5)
store i32 %8, i32* %6
%9 = load i8*, i8** %4
%10 = call i32 @CreatePath(i8* %9)
%11 = load i8*, i8** %4
%12 = load i8*, i8** %5
%13 = load i32, i32* %6
%14 = call i32 @SaveFile(i8* %11, i8* %12, i32 %13)
%15 = load i8*, i8** %5
%16 = call i32 @free(i8* %15)
ret void
}

LLVM IR (-O2):
define void @QCopyFile(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = bitcast i8** %3 to i8*
%5 = call i32 @LoadFile(i8* %0, i8** %3)
%6 = call i32 @CreatePath(i8* %1)
%7 = load i8*, i8** %3
%8 = call i32 @SaveFile(i8* %1, i8* %7, i32 %5)
%9 = load i8*, i8** %3
%10 = call i32 @free(i8* %9)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ scc_entry(int);
main() {
  int sum;
  int i;
  for (i = 0; i < 10; i++)
    scc_entry(i);
  if (sum < 0)
    abort();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0xa,-0xc(%rbp)
jge    1156 <main+0x36>
mov    -0xc(%rbp),%edi
call   1040 <scc_entry@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1136 <main+0x16>
cmpl   $0x0,-0x8(%rbp)
jge    1167 <main+0x47>
mov    $0x0,%al
call   1030 <abort@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %edi,%edi
call   1030 <scc_entry@plt>
mov    $0x1,%edi
call   1030 <scc_entry@plt>
mov    $0x2,%edi
call   1030 <scc_entry@plt>
mov    $0x3,%edi
call   1030 <scc_entry@plt>
mov    $0x4,%edi
call   1030 <scc_entry@plt>
mov    $0x5,%edi
call   1030 <scc_entry@plt>
mov    $0x6,%edi
call   1030 <scc_entry@plt>
mov    $0x7,%edi
call   1030 <scc_entry@plt>
mov    $0x8,%edi
call   1030 <scc_entry@plt>
mov    $0x9,%edi
call   1030 <scc_entry@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %3
br label %4
4: ; preds = %10, %0
%5 = load i32, i32* %3
%6 = icmp slt i32 %5, 10
br i1 %6, label %7, label %13
7: ; preds = %4
%8 = load i32, i32* %3
%9 = call i32 @scc_entry(i32 %8)
br label %10
10: ; preds = %7
%11 = load i32, i32* %3
%12 = add nsw i32 %11, 1
store i32 %12, i32* %3
br label %4
13: ; preds = %4
%14 = load i32, i32* %2
%15 = icmp slt i32 %14, 0
br i1 %15, label %16, label %18
16: ; preds = %13
%17 = call i32 (...) @abort()
unreachable
18: ; preds = %13
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @scc_entry(i32 0)
%2 = tail call i32 @scc_entry(i32 1)
%3 = tail call i32 @scc_entry(i32 2)
%4 = tail call i32 @scc_entry(i32 3)
%5 = tail call i32 @scc_entry(i32 4)
%6 = tail call i32 @scc_entry(i32 5)
%7 = tail call i32 @scc_entry(i32 6)
%8 = tail call i32 @scc_entry(i32 7)
%9 = tail call i32 @scc_entry(i32 8)
%10 = tail call i32 @scc_entry(i32 9)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ outportb(int, unsigned char);
void SetCursor(int row, int column) {
  unsigned short position = (row * 80) + column;
  outportb(0x3D4, 0x0F);
  outportb(0x3D5, (unsigned char)(position & 0xFF));
  outportb(0x3D4, 0x0E);
  outportb(0x3D5, (unsigned char)((position >> 8) & 0xFF));
}


x86 assembly (clang, -O0):
<SetCursor>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
imul   $0x50,-0x4(%rbp),%eax
add    -0x8(%rbp),%eax
mov    %ax,-0xa(%rbp)
mov    $0x3d4,%edi
mov    $0xf,%esi
call   1030 <outportb@plt>
movzwl -0xa(%rbp),%eax
and    $0xff,%eax
mov    $0x3d5,%edi
movzbl %al,%esi
call   1030 <outportb@plt>
mov    $0x3d4,%edi
mov    $0xe,%esi
call   1030 <outportb@plt>
movzwl -0xa(%rbp),%eax
sar    $0x8,%eax
and    $0xff,%eax
mov    $0x3d5,%edi
movzbl %al,%esi
call   1030 <outportb@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<SetCursor>:
push   %rbx
lea    (%rdi,%rdi,4),%ebx
shl    $0x4,%ebx
add    %esi,%ebx
mov    $0x3d4,%edi
mov    $0xf,%esi
call   1030 <outportb@plt>
movzbl %bl,%esi
mov    $0x3d5,%edi
call   1030 <outportb@plt>
mov    $0x3d4,%edi
mov    $0xe,%esi
call   1030 <outportb@plt>
movzbl %bh,%esi
mov    $0x3d5,%edi
pop    %rbx
jmp    1030 <outportb@plt>

LLVM IR (-O0):
define void @SetCursor(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i16
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = load i32, i32* %3
%7 = mul nsw i32 %6, 80
%8 = load i32, i32* %4
%9 = add nsw i32 %7, %8
%10 = trunc i32 %9 to i16
store i16 %10, i16* %5
%11 = call i32 @outportb(i32 980, i8 zeroext 15)
%12 = load i16, i16* %5
%13 = zext i16 %12 to i32
%14 = and i32 %13, 255
%15 = trunc i32 %14 to i8
%16 = call i32 @outportb(i32 981, i8 zeroext %15)
%17 = call i32 @outportb(i32 980, i8 zeroext 14)
%18 = load i16, i16* %5
%19 = zext i16 %18 to i32
%20 = ashr i32 %19, 8
%21 = and i32 %20, 255
%22 = trunc i32 %21 to i8
%23 = call i32 @outportb(i32 981, i8 zeroext %22)
ret void
}

LLVM IR (-O2):
define void @SetCursor(i32 %0, i32 %1) {
%3 = mul nsw i32 %0, 80
%4 = add nsw i32 %3, %1
%5 = tail call i32 @outportb(i32 980, i8 zeroext 15)
%6 = trunc i32 %4 to i8
%7 = tail call i32 @outportb(i32 981, i8 zeroext %6)
%8 = tail call i32 @outportb(i32 980, i8 zeroext 14)
%9 = lshr i32 %4, 8
%10 = trunc i32 %9 to i8
%11 = tail call i32 @outportb(i32 981, i8 zeroext %10)
ret void
}
void initv(float *r, const float x, const float y, const float z) {
  r[0] = x;
  r[1] = y;
  r[2] = z;
}


x86 assembly (clang, -O0):
<initv>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movss  %xmm0,-0xc(%rbp)
movss  %xmm1,-0x10(%rbp)
movss  %xmm2,-0x14(%rbp)
movss  -0xc(%rbp),%xmm0
mov    -0x8(%rbp),%rax
movss  %xmm0,(%rax)
movss  -0x10(%rbp),%xmm0
mov    -0x8(%rbp),%rax
movss  %xmm0,0x4(%rax)
movss  -0x14(%rbp),%xmm0
mov    -0x8(%rbp),%rax
movss  %xmm0,0x8(%rax)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @initv(float* %0, float %1, float %2, float %3) {
%5 = alloca float*
%6 = alloca float
%7 = alloca float
%8 = alloca float
store float* %0, float** %5
store float %1, float* %6
store float %2, float* %7
store float %3, float* %8
%9 = load float, float* %6
%10 = load float*, float** %5
%11 = getelementptr inbounds float, float* %10, i64 0
store float %9, float* %11
%12 = load float, float* %7
%13 = load float*, float** %5
%14 = getelementptr inbounds float, float* %13, i64 1
store float %12, float* %14
%15 = load float, float* %8
%16 = load float*, float** %5
%17 = getelementptr inbounds float, float* %16, i64 2
store float %15, float* %17
ret void
}

LLVM IR (-O2):
define void @initv(float* nocapture writeonly %0, float %1, float %2, float %3) {
store float %1, float* %0
%5 = getelementptr inbounds float, float* %0, i64 1
store float %2, float* %5
%6 = getelementptr inbounds float, float* %0, i64 2
store float %3, float* %6
ret void
}
/* Variables and functions */
double quaexp_(double *, double *);
double cquaexp(double *f, double *para) { return quaexp_(f, para); }


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

x86 assembly (clang, -O2):
<cquaexp>:
jmp    1030 <quaexp_@plt>

LLVM IR (-O0):
define double @cquaexp(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 @quaexp_(double* %5, double* %6)
ret double %7
}

LLVM IR (-O2):
define double @cquaexp(double* %0, double* %1) {
%3 = tail call double @quaexp_(double* %0, double* %1)
ret double %3
}
int aes_decrypt(char *data, char *key) {}


x86 assembly (clang, -O0):
<aes_decrypt>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @aes_decrypt(i8* nocapture readnone %0, i8* nocapture readnone %1) {
ret i32 undef
}
/* Variables and functions */
int F(int);
int /*<<< orphan*/ log_fail();
int /*<<< orphan*/ log_pass();
int main() {
  if (F(5) == 141)
    log_pass();
  else
    log_fail();
  return -1;
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x5,%edi
call   1030 <F@plt>
cmp    $0x8d,%eax
jne    1160 <main+0x30>
mov    $0x0,%al
call   1040 <log_pass@plt>
jmp    1167 <main+0x37>
mov    $0x0,%al
call   1050 <log_fail@plt>
mov    $0xffffffff,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x5,%edi
call   1030 <F@plt>
cmp    $0x8d,%eax
jne    114b <main+0x1b>
xor    %eax,%eax
call   1040 <log_pass@plt>
jmp    1152 <main+0x22>
xor    %eax,%eax
call   1050 <log_fail@plt>
mov    $0xffffffff,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @F(i32 5)
%3 = icmp eq i32 %2, 141
br i1 %3, label %4, label %6
4: ; preds = %0
%5 = call i32 (...) @log_pass()
br label %8
6: ; preds = %0
%7 = call i32 (...) @log_fail()
br label %8
8: ; preds = %6, %4
ret i32 -1
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @F(i32 5)
%2 = icmp eq i32 %1, 141
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = tail call i32 (...) @log_pass()
br label %7
5: ; preds = %0
%6 = tail call i32 (...) @log_fail()
br label %7
7: ; preds = %5, %3
ret i32 -1
}
int test_imm_3Fuint8_reg(unsigned char val) {
  return ((val) & (-0x3F << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_3Fuint8_reg(i8 zeroext %0) {
%2 = and i8 %0, -63
%3 = icmp eq i8 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
void post_fpga_config() {}


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

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

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

LLVM IR (-O2):
define void @post_fpga_config() {
ret void
}
void testClosureSFrV(void (*closure)(short, float), short a1, float a2) {
  (*closure)(a1, a2);
}


x86 assembly (clang, -O0):
<testClosureSFrV>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %si,%ax
mov    %rdi,-0x8(%rbp)
mov    %ax,-0xa(%rbp)
movss  %xmm0,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    -0xa(%rbp),%cx
movss  -0x10(%rbp),%xmm0
movswl %cx,%edi
call   *%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<testClosureSFrV>:
mov    %rdi,%rax
mov    %esi,%edi
jmp    *%rax

LLVM IR (-O0):
define void @testClosureSFrV(void (i16, float)* %0, i16 signext %1, float %2) {
%4 = alloca void (i16, float)*
%5 = alloca i16
%6 = alloca float
store void (i16, float)* %0, void (i16, float)** %4
store i16 %1, i16* %5
store float %2, float* %6
%7 = load void (i16, float)*, void (i16, float)** %4
%8 = load i16, i16* %5
%9 = load float, float* %6
ret void
}

LLVM IR (-O2):
define void @testClosureSFrV(void (i16, float)* nocapture %0, i16 signext %1, float %2) {
tail call void %0(i16 signext %1, float %2)
ret void
}
void foo296(int p) {}


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

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

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

LLVM IR (-O2):
define void @foo296(i32 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printBlank(int);
int /*<<< orphan*/ printChar(char, int);
int /*<<< orphan*/ putchar(char);
void printLine() {
  printBlank(20 + 5);
  printChar('C', 5 + 2);
  putchar('\n');
}


x86 assembly (clang, -O0):
<printLine>:
push   %rbp
mov    %rsp,%rbp
mov    $0x19,%edi
call   1040 <printBlank@plt>
mov    $0x43,%edi
mov    $0x7,%esi
call   1050 <printChar@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<printLine>:
push   %rax
mov    $0x19,%edi
call   1040 <printBlank@plt>
mov    $0x43,%edi
mov    $0x7,%esi
call   1050 <printChar@plt>
mov    $0xa,%edi
pop    %rax
jmp    1030 <putchar@plt>

LLVM IR (-O0):
define void @printLine() {
%1 = call i32 @printBlank(i32 25)
%2 = call i32 @printChar(i8 signext 67, i32 7)
%3 = call i32 @putchar(i8 signext 10)
ret void
}

LLVM IR (-O2):
define void @printLine() {
%1 = tail call i32 @printBlank(i32 25)
%2 = tail call i32 @printChar(i8 signext 67, i32 7)
%3 = tail call i32 @putchar(i8 signext 10)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ write_instr(int);
void eval_exp(void) { write_instr(0x11); }


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

x86 assembly (clang, -O2):
<eval_exp>:
mov    $0x11,%edi
jmp    1030 <write_instr@plt>

LLVM IR (-O0):
define void @eval_exp() {
%1 = call i32 @write_instr(i32 17)
ret void
}

LLVM IR (-O2):
define void @eval_exp() {
%1 = tail call i32 @write_instr(i32 17)
ret void
}
void c_source_minus_foo_a_decode_inner(struct decoder_t *decoder_p,
                                       struct c_source_minus_foo_a_t *dst_p) {
  (void)decoder_p;
  (void)dst_p;
}


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

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

LLVM IR (-O0):
%struct.decoder_t = type opaque
%struct.c_source_minus_foo_a_t = type opaque
define void @c_source_minus_foo_a_decode_inner(%struct.decoder_t* %0, %struct.c_source_minus_foo_a_t* %1) {
%3 = alloca %struct.decoder_t*
%4 = alloca %struct.c_source_minus_foo_a_t*
store %struct.decoder_t* %0, %struct.decoder_t** %3
store %struct.c_source_minus_foo_a_t* %1, %struct.c_source_minus_foo_a_t** %4
%5 = load %struct.decoder_t*, %struct.decoder_t** %3
%6 = load %struct.c_source_minus_foo_a_t*, %struct.c_source_minus_foo_a_t** %4
ret void
}

LLVM IR (-O2):
%struct.decoder_t = type opaque
%struct.c_source_minus_foo_a_t = type opaque
define void @c_source_minus_foo_a_decode_inner(%struct.decoder_t* nocapture %0, %struct.c_source_minus_foo_a_t* nocapture %1) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void free_1d_array(void *m) { free(m); }


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

x86 assembly (clang, -O2):
<free_1d_array>:
jmp    1030 <free@plt>

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

LLVM IR (-O2):
define void @free_1d_array(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
unsigned int inl(unsigned short port) {
  unsigned int value;
  __asm__ __volatile__("inl %w1, %0" : "=a"(value) : "Nd"(port));
  return value;
}


x86 assembly (clang, -O0):
<inl>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
mov    -0x2(%rbp),%dx
in     (%dx),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<inl>:
mov    %edi,%edx
in     (%dx),%eax
ret

LLVM IR (-O0):
define i32 @inl(i16 zeroext %0) {
%2 = alloca i16
%3 = alloca i32
store i16 %0, i16* %2
%4 = load i16, i16* %2
%5 = call i32 asm sideeffect "inl ${1:w}, $0", "={ax},N{dx},~{dirflag},~{fpsr},~{flags}"(i16 %4)
store i32 %5, i32* %3
%6 = load i32, i32* %3
ret i32 %6
}

LLVM IR (-O2):
define i32 @inl(i16 zeroext %0) {
%2 = tail call i32 asm sideeffect "inl ${1:w}, $0", "={ax},N{dx},~{dirflag},~{fpsr},~{flags}"(i16 %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ SetMotor(int, int);
void SetTime(int v) { SetMotor(3, v); }


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

x86 assembly (clang, -O2):
<SetTime>:
mov    %edi,%esi
mov    $0x3,%edi
jmp    1030 <SetMotor@plt>

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

LLVM IR (-O2):
define void @SetTime(i32 %0) {
%2 = tail call i32 @SetMotor(i32 3, i32 %0)
ret void
}
/* Variables and functions */
int ObjectSize0(void *const);
int IndirectDynamicObjectSize0(void *const p
                               __attribute__((pass_dynamic_object_size(0)))) {
  return ObjectSize0(p);
}


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

x86 assembly (clang, -O2):
<IndirectDynamicObjectSize0>:
jmp    1030 <ObjectSize0@plt>

LLVM IR (-O0):
define i32 @IndirectDynamicObjectSize0(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
store i8* %0, i8** %3
store i64 %1, i64* %4
%5 = load i8*, i8** %3
%6 = call i32 @ObjectSize0(i8* %5)
ret i32 %6
}

LLVM IR (-O2):
define i32 @IndirectDynamicObjectSize0(i8* %0, i64 %1) {
%3 = tail call i32 @ObjectSize0(i8* %0)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ ft_putchar(char);
void ft_putstr(char *str) {
  while (*str != '\0') {
    ft_putchar(*str);
    str++;
  }
}


x86 assembly (clang, -O0):
<ft_putstr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     1149 <ft_putstr+0x39>
mov    -0x8(%rbp),%rax
movsbl (%rax),%edi
call   1030 <ft_putchar@plt>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    111c <ft_putstr+0xc>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_putstr>:
push   %rbx
mov    (%rdi),%al
test   %al,%al
je     1133 <ft_putstr+0x23>
mov    %rdi,%rbx
add    $0x1,%rbx
xchg   %ax,%ax
movsbl %al,%edi
call   1030 <ft_putchar@plt>
movzbl (%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1120 <ft_putstr+0x10>
pop    %rbx
ret

LLVM IR (-O0):
define void @ft_putstr(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
br label %3
3: ; preds = %8, %1
%4 = load i8*, i8** %2
%5 = load i8, i8* %4
%6 = sext i8 %5 to i32
%7 = icmp ne i32 %6, 0
br i1 %7, label %8, label %14
8: ; preds = %3
%9 = load i8*, i8** %2
%10 = load i8, i8* %9
%11 = call i32 @ft_putchar(i8 signext %10)
%12 = load i8*, i8** %2
%13 = getelementptr inbounds i8, i8* %12, i32 1
store i8* %13, i8** %2
br label %3
14: ; preds = %3
ret void
}

LLVM IR (-O2):
define void @ft_putstr(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %11, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %9, %4 ], [ %2, %1 ]
%6 = phi i8* [ %8, %4 ], [ %0, %1 ]
%7 = tail call i32 @ft_putchar(i8 signext %5)
%8 = getelementptr inbounds i8, i8* %6, i64 1
%9 = load i8, i8* %8
%10 = icmp eq i8 %9, 0
br i1 %10, label %11, label %4
11: ; preds = %4, %1
ret void
}
/* Variables and functions */
int getInputUint(char *, unsigned int *, int *, int *);
int /*<<< orphan*/ sprintf(char *, char *, int, int);
int getInputOption(unsigned int *rv, unsigned int min0, unsigned int max0) {
  char buf[32];
  int min = min0, max = max0;
  sprintf(buf, "Enter the option(%d-%d): ", min, max);
  return (getInputUint(buf, rv, &min, &max));
}


x86 assembly (clang, -O0):
<getInputOption>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x34(%rbp)
mov    -0x10(%rbp),%eax
mov    %eax,-0x38(%rbp)
lea    -0x30(%rbp),%rdi
mov    -0x34(%rbp),%edx
mov    -0x38(%rbp),%ecx
lea    0xeb1(%rip),%rsi
call   1040 <sprintf@plt>
lea    -0x30(%rbp),%rdi
mov    -0x8(%rbp),%rsi
lea    -0x34(%rbp),%rdx
lea    -0x38(%rbp),%rcx
call   1030 <getInputUint@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getInputOption>:
push   %r14
push   %rbx
sub    $0x38,%rsp
mov    %edx,%ecx
mov    %esi,%edx
mov    %rdi,%rbx
mov    %esi,0xc(%rsp)
mov    %ecx,0x8(%rsp)
lea    0xec3(%rip),%rsi
lea    0x10(%rsp),%r14
mov    %r14,%rdi
call   1040 <sprintf@plt>
lea    0xc(%rsp),%rdx
lea    0x8(%rsp),%rcx
mov    %r14,%rdi
mov    %rbx,%rsi
call   1030 <getInputUint@plt>
add    $0x38,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [26 x i8] c"Enter the option(%d-%d): \00"
define i32 @getInputOption(i32* %0, i32 %1, i32 %2) {
%4 = alloca i32*
%5 = alloca i32
%6 = alloca i32
%7 = alloca [32 x i8]
%8 = alloca i32
%9 = alloca i32
store i32* %0, i32** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%10 = load i32, i32* %5
store i32 %10, i32* %8
%11 = load i32, i32* %6
store i32 %11, i32* %9
%12 = getelementptr inbounds [32 x i8], [32 x i8]* %7, i64 0, i64 0
%13 = load i32, i32* %8
%14 = load i32, i32* %9
%15 = call i32 @sprintf(i8* %12, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i32 %13, i32 %14)
%16 = getelementptr inbounds [32 x i8], [32 x i8]* %7, i64 0, i64 0
%17 = load i32*, i32** %4
%18 = call i32 @getInputUint(i8* %16, i32* %17, i32* %8, i32* %9)
ret i32 %18
}

LLVM IR (-O2):
@.str = [26 x i8] c"Enter the option(%d-%d): \00"
define i32 @getInputOption(i32* %0, i32 %1, i32 %2) {
%4 = alloca [32 x i8]
%5 = alloca i32
%6 = alloca i32
%7 = getelementptr inbounds [32 x i8], [32 x i8]* %4, i64 0, i64 0
%8 = bitcast i32* %5 to i8*
store i32 %1, i32* %5
%9 = bitcast i32* %6 to i8*
store i32 %2, i32* %6
%10 = call i32 @sprintf(i8* %7, i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i32 %1, i32 %2)
%11 = call i32 @getInputUint(i8* %7, i32* %0, i32* %5, i32* %6)
ret i32 %11
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *);
int /*<<< orphan*/ stderr;
void usage(const char *progname) {
  fprintf(stderr, "usage: %s [-r] file\n", progname);
  exit(1);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ead(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xec0(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rax
mov    %rdi,%rdx
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [21 x i8] c"usage: %s [-r] file\0A\00"
define void @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [21 x i8] c"usage: %s [-r] file\0A\00"
define void @usage(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ cleanup_printout();
int /*<<< orphan*/ mc_print_composed();
int /*<<< orphan*/ setup_printout(char const *, int, char *);
int /*<<< orphan*/ test_printout();
int tst_print_display(const char *the_title) {
  setup_printout(the_title, (1), "whole display");
  test_printout();
  mc_print_composed();
  cleanup_printout();
  return 1;
}


x86 assembly (clang, -O0):
<tst_print_display>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x1,%esi
lea    0xea4(%rip),%rdx
call   1030 <setup_printout@plt>
mov    $0x0,%al
call   1060 <test_printout@plt>
mov    $0x0,%al
call   1050 <mc_print_composed@plt>
mov    $0x0,%al
call   1040 <cleanup_printout@plt>
mov    $0x1,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tst_print_display>:
push   %rax
lea    0xeb8(%rip),%rdx
mov    $0x1,%esi
call   1030 <setup_printout@plt>
xor    %eax,%eax
call   1060 <test_printout@plt>
xor    %eax,%eax
call   1050 <mc_print_composed@plt>
xor    %eax,%eax
call   1040 <cleanup_printout@plt>
mov    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [14 x i8] c"whole display\00"
define i32 @tst_print_display(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @setup_printout(i8* %3, i32 1, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%5 = call i32 (...) @test_printout()
%6 = call i32 (...) @mc_print_composed()
%7 = call i32 (...) @cleanup_printout()
ret i32 1
}

LLVM IR (-O2):
@.str = [14 x i8] c"whole display\00"
define i32 @tst_print_display(i8* %0) {
%2 = tail call i32 @setup_printout(i8* %0, i32 1, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 (...) @test_printout()
%4 = tail call i32 (...) @mc_print_composed()
%5 = tail call i32 (...) @cleanup_printout()
ret i32 1
}
void step_warn() {}


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

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

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

LLVM IR (-O2):
define void @step_warn() {
ret void
}
int globus_hashtable_string_hash(void *string, int limit) {
  unsigned long h = 0;
  char *key;
  key = (char *)string;
  while (*key) {
    h = 131 * h + *key++;
  }
  return h % limit;
}


x86 assembly (clang, -O0):
<globus_hashtable_string_hash>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movq   $0x0,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
cmpb   $0x0,(%rax)
je     114f <globus_hashtable_string_hash+0x4f>
imul   $0x83,-0x18(%rbp),%rax
mov    -0x20(%rbp),%rcx
mov    %rcx,%rdx
add    $0x1,%rdx
mov    %rdx,-0x20(%rbp)
movsbq (%rcx),%rcx
add    %rcx,%rax
mov    %rax,-0x18(%rbp)
jmp    111b <globus_hashtable_string_hash+0x1b>
mov    -0x18(%rbp),%rax
movslq -0xc(%rbp),%rcx
xor    %edx,%edx
div    %rcx
mov    %edx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<globus_hashtable_string_hash>:
mov    (%rdi),%cl
test   %cl,%cl
je     112b <globus_hashtable_string_hash+0x2b>
add    $0x1,%rdi
xor    %eax,%eax
nopl   0x0(%rax)
imul   $0x83,%rax,%rdx
movsbq %cl,%rax
add    %rdx,%rax
movzbl (%rdi),%ecx
add    $0x1,%rdi
test   %cl,%cl
jne    1110 <globus_hashtable_string_hash+0x10>
jmp    112d <globus_hashtable_string_hash+0x2d>
xor    %eax,%eax
movslq %esi,%rcx
mov    %rax,%rdx
or     %rcx,%rdx
shr    $0x20,%rdx
je     1145 <globus_hashtable_string_hash+0x45>
xor    %edx,%edx
div    %rcx
mov    %rdx,%rax
ret
xor    %edx,%edx
div    %esi
mov    %edx,%eax
ret

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

LLVM IR (-O2):
define i32 @globus_hashtable_string_hash(i8* nocapture %0, i32 %1) {
%3 = load i8, i8* %0
%4 = icmp eq i8 %3, 0
br i1 %4, label %15, label %5
5: ; preds = %2, %5
%6 = phi i8 [ %13, %5 ], [ %3, %2 ]
%7 = phi i8* [ %10, %5 ], [ %0, %2 ]
%8 = phi i64 [ %12, %5 ], [ 0, %2 ]
%9 = mul i64 %8, 131
%10 = getelementptr inbounds i8, i8* %7, i64 1
%11 = sext i8 %6 to i64
%12 = add i64 %9, %11
%13 = load i8, i8* %10
%14 = icmp eq i8 %13, 0
br i1 %14, label %15, label %5
15: ; preds = %5, %2
%16 = phi i64 [ 0, %2 ], [ %12, %5 ]
%17 = sext i32 %1 to i64
%18 = urem i64 %16, %17
%19 = trunc i64 %18 to i32
ret i32 %19
}
void cdd_change_track(int index, int lba) {}


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

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

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

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

/* Variables and functions */
int64_t rotateL_fun_int64_t(int64_t x, int32_t i) {
  if ((i %= 64) == 0)
    return x;
  return (x << i) | ((0x7fffffffffffffffll >> (63 - i)) & (x >> (64 - i)));
}


x86 assembly (clang, -O0):
<rotateL_fun_int64_t>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    $0x40,%ecx
cltd
idiv   %ecx
mov    %edx,-0xc(%rbp)
cmp    $0x0,%edx
jne    112c <rotateL_fun_int64_t+0x2c>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    116e <rotateL_fun_int64_t+0x6e>
mov    -0x8(%rbp),%eax
mov    -0xc(%rbp),%ecx
shl    %cl,%eax
cltq
mov    $0x3f,%ecx
sub    -0xc(%rbp),%ecx
mov    %ecx,%ecx
movabs $0x7fffffffffffffff,%rdx
ff ff 7f
sar    %cl,%rdx
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%edx
mov    $0x40,%ecx
sub    -0xc(%rbp),%ecx
sar    %cl,%edx
mov    -0x18(%rbp),%rcx
movslq %edx,%rdx
and    %rdx,%rcx
or     %rcx,%rax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<rotateL_fun_int64_t>:
mov    %edi,%eax
lea    0x3f(%rsi),%ecx
test   %esi,%esi
cmovns %esi,%ecx
and    $0xffffffc0,%ecx
sub    %ecx,%esi
je     1136 <rotateL_fun_int64_t+0x36>
mov    %eax,%edx
mov    %esi,%ecx
shl    %cl,%edx
mov    $0x3f,%cl
sub    %sil,%cl
movabs $0x7fffffffffffffff,%rdi
ff ff 7f
shr    %cl,%rdi
neg    %sil
mov    %esi,%ecx
sar    %cl,%eax
and    %eax,%edi
or     %edx,%edi
mov    %edi,%eax
ret

LLVM IR (-O0):
define i32 @rotateL_fun_int64_t(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
%6 = load i32, i32* %5
%7 = srem i32 %6, 64
store i32 %7, i32* %5
%8 = icmp eq i32 %7, 0
br i1 %8, label %9, label %11
9: ; preds = %2
%10 = load i32, i32* %4
store i32 %10, i32* %3
br label %28
11: ; preds = %2
%12 = load i32, i32* %4
%13 = load i32, i32* %5
%14 = shl i32 %12, %13
%15 = sext i32 %14 to i64
%16 = load i32, i32* %5
%17 = sub nsw i32 63, %16
%18 = zext i32 %17 to i64
%19 = ashr i64 9223372036854775807, %18
%20 = load i32, i32* %4
%21 = load i32, i32* %5
%22 = sub nsw i32 64, %21
%23 = ashr i32 %20, %22
%24 = sext i32 %23 to i64
%25 = and i64 %19, %24
%26 = or i64 %15, %25
%27 = trunc i64 %26 to i32
store i32 %27, i32* %3
br label %28
28: ; preds = %11, %9
%29 = load i32, i32* %3
ret i32 %29
}

LLVM IR (-O2):
define i32 @rotateL_fun_int64_t(i32 %0, i32 %1) {
%3 = srem i32 %1, 64
%4 = icmp eq i32 %3, 0
br i1 %4, label %15, label %5
5: ; preds = %2
%6 = shl i32 %0, %3
%7 = sub nsw i32 63, %3
%8 = zext i32 %7 to i64
%9 = lshr i64 9223372036854775807, %8
%10 = sub nsw i32 64, %3
%11 = ashr i32 %0, %10
%12 = trunc i64 %9 to i32
%13 = and i32 %11, %12
%14 = or i32 %13, %6
br label %15
15: ; preds = %2, %5
%16 = phi i32 [ %14, %5 ], [ %0, %2 ]
ret i32 %16
}
int main() {
  char c[4];
  int i;
  for (i = 0; i < 4; ++i) {
    printf("Address of c[%d]=%x\n", i, &c[i]);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x4,-0xc(%rbp)
jge    115a <main+0x4a>
mov    -0xc(%rbp),%esi
movslq -0xc(%rbp),%rax
lea    -0x8(%rbp),%rdx
add    %rax,%rdx
lea    0xebb(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1126 <main+0x16>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
lea    0xee4(%rip),%rbx
lea    0xc(%rsp),%rdx
mov    %rbx,%rdi
xor    %esi,%esi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xd(%rsp),%rdx
mov    %rbx,%rdi
mov    $0x1,%esi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xe(%rsp),%rdx
mov    %rbx,%rdi
mov    $0x2,%esi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xf(%rsp),%rdx
mov    %rbx,%rdi
mov    $0x3,%esi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [21 x i8] c"Address of c[%d]=%x\0A\00"
define i32 @main() {
%1 = alloca [4 x i8]
%2 = getelementptr inbounds [4 x i8], [4 x i8]* %1, i64 0, i64 0
%3 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i32 0, i8* %2)
%4 = getelementptr inbounds [4 x i8], [4 x i8]* %1, i64 0, i64 1
%5 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i32 1, i8* %4)
%6 = getelementptr inbounds [4 x i8], [4 x i8]* %1, i64 0, i64 2
%7 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i32 2, i8* %6)
%8 = getelementptr inbounds [4 x i8], [4 x i8]* %1, i64 0, i64 3
%9 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i32 3, i8* %8)
ret i32 0
}
void dd_pbl_ios_chartboost_show_interstitial() {}


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

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

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

LLVM IR (-O2):
define void @dd_pbl_ios_chartboost_show_interstitial() {
ret void
}
int decompressor_impl_buffer_copy_nominally_utilizepage(
    struct microfs_sb_info *sbi, void *data, struct page *page) {
  (void)sbi;
  (void)data;
  (void)page;
  return 0;
}


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

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

LLVM IR (-O0):
%struct.microfs_sb_info = type opaque
%struct.page = type opaque
define i32 @decompressor_impl_buffer_copy_nominally_utilizepage(%struct.microfs_sb_info* %0, i8* %1, %struct.page* %2) {
%4 = alloca %struct.microfs_sb_info*
%5 = alloca i8*
%6 = alloca %struct.page*
store %struct.microfs_sb_info* %0, %struct.microfs_sb_info** %4
store i8* %1, i8** %5
store %struct.page* %2, %struct.page** %6
%7 = load %struct.microfs_sb_info*, %struct.microfs_sb_info** %4
%8 = load i8*, i8** %5
%9 = load %struct.page*, %struct.page** %6
ret i32 0
}

LLVM IR (-O2):
%struct.microfs_sb_info = type opaque
%struct.page = type opaque
define i32 @decompressor_impl_buffer_copy_nominally_utilizepage(%struct.microfs_sb_info* nocapture readnone %0, i8* nocapture readnone %1, %struct.page* nocapture readnone %2) {
ret i32 0
}
void hpgParticlesPreRender(void *data) {}


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

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

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

LLVM IR (-O2):
define void @hpgParticlesPreRender(i8* nocapture %0) {
ret void
}