xunge/DecIR huggingface dataset:
/* Variables and functions */
int EXIT_SUCCESS;
int /*<<< orphan*/ test1();
int main(void) {
  test1();
  return EXIT_SUCCESS;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <test1@plt>
mov    0x2eb3(%rip),%rax
mov    (%rax),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <test1@plt>
mov    0x2ec1(%rip),%rax
mov    (%rax),%eax
pop    %rcx
ret

LLVM IR (-O0):
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @test1()
%3 = load i32, i32* @EXIT_SUCCESS
ret i32 %3
}

LLVM IR (-O2):
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = tail call i32 (...) @test1()
%2 = load i32, i32* @EXIT_SUCCESS
ret i32 %2
}
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
void set_stage_in_tweak(uint8_t *tweak, uint8_t value) {
  tweak[0] = (tweak[0] & 0x0f) ^ value;
}


x86 assembly (clang, -O0):
<set_stage_in_tweak>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%ecx
and    $0xf,%ecx
xor    -0xc(%rbp),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_stage_in_tweak>:
mov    (%rdi),%eax
and    $0xf,%eax
xor    %esi,%eax
mov    %eax,(%rdi)
ret

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

LLVM IR (-O2):
define void @set_stage_in_tweak(i32* nocapture %0, i32 %1) {
%3 = load i32, i32* %0
%4 = and i32 %3, 15
%5 = xor i32 %4, %1
store i32 %5, i32* %0
ret void
}
/* Variables and functions */
int /*<<< orphan*/ endswap_int_copy(int *, int const *, int);
void endswap_float_copy(float *dest, const float *src, int len) {
  endswap_int_copy((int *)dest, (const int *)src, len);
}


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

x86 assembly (clang, -O2):
<endswap_float_copy>:
jmp    1030 <endswap_int_copy@plt>

LLVM IR (-O0):
define void @endswap_float_copy(float* %0, float* %1, i32 %2) {
%4 = alloca float*
%5 = alloca float*
%6 = alloca i32
store float* %0, float** %4
store float* %1, float** %5
store i32 %2, i32* %6
%7 = load float*, float** %4
%8 = bitcast float* %7 to i32*
%9 = load float*, float** %5
%10 = bitcast float* %9 to i32*
%11 = load i32, i32* %6
%12 = call i32 @endswap_int_copy(i32* %8, i32* %10, i32 %11)
ret void
}

LLVM IR (-O2):
define void @endswap_float_copy(float* %0, float* %1, i32 %2) {
%4 = bitcast float* %0 to i32*
%5 = bitcast float* %1 to i32*
%6 = tail call i32 @endswap_int_copy(i32* %4, i32* %5, i32 %2)
ret void
}
/* Variables and functions */
unsigned int _user_numusers_set(int /*<<< orphan*/);
unsigned int _user_numusers_create() { return _user_numusers_set(0); }


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

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

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

LLVM IR (-O2):
define i32 @_user_numusers_create() {
%1 = tail call i32 @_user_numusers_set(i32 0)
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ EX_USAGE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ puts(char *);
void usage(void) {
  puts("prettykey");
  puts("  This program has no defined options yet.");
  exit(EX_USAGE);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1030 <puts@plt>
lea    0xed3(%rip),%rdi
call   1030 <puts@plt>
mov    0x2ea5(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

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

LLVM IR (-O0):
@.str = [10 x i8] c"prettykey\00"
@.str.1 = [43 x i8] c" This program has no defined options yet.\00"
@EX_USAGE = global i32 0
define void @usage() {
%1 = call i32 @puts(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @puts(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.1, i64 0, i64 0))
%3 = load i32, i32* @EX_USAGE
%4 = call i32 @exit(i32 %3)
unreachable
}

LLVM IR (-O2):
@.str = [10 x i8] c"prettykey\00"
@.str.1 = [43 x i8] c" This program has no defined options yet.\00"
@EX_USAGE = global i32 0
define void @usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([43 x i8], [43 x i8]* @.str.1, i64 0, i64 0))
%3 = load i32, i32* @EX_USAGE
%4 = tail call i32 @exit(i32 %3)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(int argc, char *argv[]) {
  int a;
  int b = a;
  printf("Hello, World!\n");
  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)
mov    -0x14(%rbp),%eax
mov    %eax,-0x18(%rbp)
lea    0xecd(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [15 x i8] c"Hello, World!\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
%8 = load i32, i32* %6
store i32 %8, i32* %7
%9 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [14 x i8] c"Hello, World!\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ FAIL(char *);
int /*<<< orphan*/ PASS(char *);
int /*<<< orphan*/ RTLD_NOLOAD;
void *dlopen(char const *, int /*<<< orphan*/);
int main(int argc, const char *argv[]) {
  void *handle = dlopen(argv[1], RTLD_NOLOAD);
  if (handle != NULL)
    PASS("dlopen-RTLD_NOLOAD-symlink");
  else
    FAIL("dlopen-RTLD_NOLOAD-symlink");
  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)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
mov    0x2e8b(%rip),%rax
mov    (%rax),%esi
call   1030 <dlopen@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     117c <main+0x4c>
lea    0xe8e(%rip),%rdi
call   1040 <PASS@plt>
jmp    1188 <main+0x58>
lea    0xe7d(%rip),%rdi
call   1050 <FAIL@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    0x8(%rsi),%rdi
mov    0x2ea4(%rip),%rax
mov    (%rax),%esi
call   1030 <dlopen@plt>
lea    0xeb6(%rip),%rdi
test   %rax,%rax
je     1156 <main+0x26>
call   1040 <PASS@plt>
jmp    115b <main+0x2b>
call   1050 <FAIL@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@RTLD_NOLOAD = global i32 0
@.str = [27 x i8] c"dlopen-RTLD_NOLOAD-symlink\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i8*
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = load i8**, i8*** %5
%8 = getelementptr inbounds i8*, i8** %7, i64 1
%9 = load i8*, i8** %8
%10 = load i32, i32* @RTLD_NOLOAD
%11 = call i8* @dlopen(i8* %9, i32 %10)
store i8* %11, i8** %6
%12 = load i8*, i8** %6
%13 = icmp ne i8* %12, null
br i1 %13, label %14, label %16
14: ; preds = %2
%15 = call i32 @PASS(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0))
br label %18
16: ; preds = %2
%17 = call i32 @FAIL(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0))
br label %18
18: ; preds = %16, %14
ret i32 0
}

LLVM IR (-O2):
@RTLD_NOLOAD = global i32 0
@.str = [27 x i8] c"dlopen-RTLD_NOLOAD-symlink\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = getelementptr inbounds i8*, i8** %1, i64 1
%4 = load i8*, i8** %3
%5 = load i32, i32* @RTLD_NOLOAD
%6 = tail call i8* @dlopen(i8* %4, i32 %5)
%7 = icmp eq i8* %6, null
br i1 %7, label %10, label %8
8: ; preds = %2
%9 = tail call i32 @PASS(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0))
br label %12
10: ; preds = %2
%11 = tail call i32 @FAIL(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0))
br label %12
12: ; preds = %10, %8
ret i32 0
}
unsigned long mb_ver(void) {
  return ((1 * 0x01000000) + (2 * 0x00010000) + (0));
}


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

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

LLVM IR (-O0):
define i64 @mb_ver() {
ret i64 16908288
}

LLVM IR (-O2):
define i64 @mb_ver() {
ret i64 16908288
}
int test_imm_20int64_midword_reg(long long val) {
  return ((val >> 16) & (0x20 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_20int64_midword_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdx
sar    $0x10,%rdx
and    $0x20,%rdx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_20int64_midword_reg>:
test   $0x200000,%edi
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_20int64_midword_reg(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = ashr i64 %3, 16
%5 = and i64 %4, 32
%6 = icmp ne i64 %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_20int64_midword_reg(i64 %0) {
%2 = and i64 %0, 2097152
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char);
void print_sized_string(char *str, int size) {
  int x;
  for (x = 0; x < size; x++)
    printf("%c", str[x]);
}


x86 assembly (clang, -O0):
<print_sized_string>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1158 <print_sized_string+0x48>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
lea    0xebf(%rip),%rdi
movsbl (%rax,%rcx,1),%esi
call   1030 <printf@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1126 <print_sized_string+0x16>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_sized_string>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
test   %esi,%esi
jle    1146 <print_sized_string+0x36>
mov    %rdi,%r15
mov    %esi,%r12d
xor    %ebx,%ebx
lea    0xed5(%rip),%r14
nopl   0x0(%rax,%rax,1)
movsbl (%r15,%rbx,1),%esi
mov    %r14,%rdi
call   1030 <printf@plt>
add    $0x1,%rbx
cmp    %rbx,%r12
jne    1130 <print_sized_string+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%c\00"
define void @print_sized_string(i8* nocapture %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %13
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %6
6: ; preds = %4, %6
%7 = phi i64 [ 0, %4 ], [ %11, %6 ]
%8 = getelementptr inbounds i8, i8* %0, i64 %7
%9 = load i8, i8* %8
%10 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8 signext %9)
%11 = add nuw nsw i64 %7, 1
%12 = icmp eq i64 %11, %5
br i1 %12, label %13, label %6
13: ; preds = %6, %2
ret void
}
int tegra_powergate_debugfs_init(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @tegra_powergate_debugfs_init() {
ret i32 0
}
int push_triangle_face(int vertex0, int vertex1, int vertex2, int *out_faces,
                       int out_offset) {
  *(out_faces + out_offset++) = vertex0;
  *(out_faces + out_offset++) = vertex1;
  *(out_faces + out_offset++) = vertex2;
  return out_offset;
}


x86 assembly (clang, -O0):
<push_triangle_face>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %rcx,-0x18(%rbp)
mov    %r8d,-0x1c(%rbp)
mov    -0x4(%rbp),%edx
mov    -0x18(%rbp),%rax
mov    -0x1c(%rbp),%ecx
mov    %ecx,%esi
add    $0x1,%esi
mov    %esi,-0x1c(%rbp)
movslq %ecx,%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x8(%rbp),%edx
mov    -0x18(%rbp),%rax
mov    -0x1c(%rbp),%ecx
mov    %ecx,%esi
add    $0x1,%esi
mov    %esi,-0x1c(%rbp)
movslq %ecx,%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0xc(%rbp),%edx
mov    -0x18(%rbp),%rax
mov    -0x1c(%rbp),%ecx
mov    %ecx,%esi
add    $0x1,%esi
mov    %esi,-0x1c(%rbp)
movslq %ecx,%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x1c(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<push_triangle_face>:
movslq %r8d,%r8
mov    %edi,(%rcx,%r8,4)
mov    %esi,0x4(%rcx,%r8,4)
lea    0x3(%r8),%eax
mov    %edx,0x8(%rcx,%r8,4)
ret

LLVM IR (-O0):
define i32 @push_triangle_face(i32 %0, i32 %1, i32 %2, i32* %3, i32 %4) {
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32*
%10 = alloca i32
store i32 %0, i32* %6
store i32 %1, i32* %7
store i32 %2, i32* %8
store i32* %3, i32** %9
store i32 %4, i32* %10
%11 = load i32, i32* %6
%12 = load i32*, i32** %9
%13 = load i32, i32* %10
%14 = add nsw i32 %13, 1
store i32 %14, i32* %10
%15 = sext i32 %13 to i64
%16 = getelementptr inbounds i32, i32* %12, i64 %15
store i32 %11, i32* %16
%17 = load i32, i32* %7
%18 = load i32*, i32** %9
%19 = load i32, i32* %10
%20 = add nsw i32 %19, 1
store i32 %20, i32* %10
%21 = sext i32 %19 to i64
%22 = getelementptr inbounds i32, i32* %18, i64 %21
store i32 %17, i32* %22
%23 = load i32, i32* %8
%24 = load i32*, i32** %9
%25 = load i32, i32* %10
%26 = add nsw i32 %25, 1
store i32 %26, i32* %10
%27 = sext i32 %25 to i64
%28 = getelementptr inbounds i32, i32* %24, i64 %27
store i32 %23, i32* %28
%29 = load i32, i32* %10
ret i32 %29
}

LLVM IR (-O2):
define i32 @push_triangle_face(i32 %0, i32 %1, i32 %2, i32* nocapture writeonly %3, i32 %4) {
%6 = add nsw i32 %4, 1
%7 = sext i32 %4 to i64
%8 = getelementptr inbounds i32, i32* %3, i64 %7
store i32 %0, i32* %8
%9 = add nsw i32 %4, 2
%10 = sext i32 %6 to i64
%11 = getelementptr inbounds i32, i32* %3, i64 %10
store i32 %1, i32* %11
%12 = add nsw i32 %4, 3
%13 = sext i32 %9 to i64
%14 = getelementptr inbounds i32, i32* %3, i64 %13
store i32 %2, i32* %14
ret i32 %12
}
/* Variables and functions */
int /*<<< orphan*/ cBreak();
int /*<<< orphan*/ dash();
int /*<<< orphan*/ dot();
void sP() {
  dot();
  dash();
  dash();
  dot();
  cBreak();
}


x86 assembly (clang, -O0):
<sP>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <dot@plt>
mov    $0x0,%al
call   1040 <dash@plt>
mov    $0x0,%al
call   1040 <dash@plt>
mov    $0x0,%al
call   1030 <dot@plt>
mov    $0x0,%al
call   1050 <cBreak@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<sP>:
push   %rax
xor    %eax,%eax
call   1030 <dot@plt>
xor    %eax,%eax
call   1040 <dash@plt>
xor    %eax,%eax
call   1040 <dash@plt>
xor    %eax,%eax
call   1030 <dot@plt>
xor    %eax,%eax
pop    %rcx
jmp    1050 <cBreak@plt>

LLVM IR (-O0):
define void @sP() {
%1 = call i32 (...) @dot()
%2 = call i32 (...) @dash()
%3 = call i32 (...) @dash()
%4 = call i32 (...) @dot()
%5 = call i32 (...) @cBreak()
ret void
}

LLVM IR (-O2):
define void @sP() {
%1 = tail call i32 (...) @dot()
%2 = tail call i32 (...) @dash()
%3 = tail call i32 (...) @dash()
%4 = tail call i32 (...) @dot()
%5 = tail call i32 (...) @cBreak()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void *prodP(void *x) {
  int k = 10;
  int prod, i;
  i = 0;
  while (i < k) {
    i++;
    prod *= i;
  }
  printf("%d\n", prod);
}


x86 assembly (clang, -O0):
<prodP>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
movl   $0xa,-0x14(%rbp)
movl   $0x0,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    114e <prodP+0x3e>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
imul   -0x18(%rbp),%eax
mov    %eax,-0x18(%rbp)
jmp    112a <prodP+0x1a>
mov    -0x18(%rbp),%esi
lea    0xea8(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<prodP>:
lea    0xee9(%rip),%rdi
xor    %esi,%esi
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define noalias i8* @prodP(i8* nocapture readnone %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 0)
ret i8* undef
}
int zero_test(char accumulator[]) {
  int i;
  for (i = 0; accumulator[i] != '\0'; i++) {
    if (accumulator[i] != '0')
      return 0;
  }
  return 1;
}


x86 assembly (clang, -O0):
<zero_test>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
je     1158 <zero_test+0x58>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x30,%eax
je     1145 <zero_test+0x45>
movl   $0x0,-0x4(%rbp)
jmp    115f <zero_test+0x5f>
jmp    114a <zero_test+0x4a>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    110f <zero_test+0xf>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<zero_test>:
movzbl (%rdi),%eax
cmp    $0x30,%al
jne    110d <zero_test+0xd>
add    $0x1,%rdi
jmp    1100 <zero_test>
test   %al,%al
jne    1117 <zero_test+0x17>
mov    $0x1,%eax
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @zero_test(i8* nocapture %0) {
br label %2
2: ; preds = %6, %1
%3 = phi i64 [ %7, %6 ], [ 0, %1 ]
%4 = getelementptr inbounds i8, i8* %0, i64 %3
%5 = load i8, i8* %4
switch i8 %5, label %8 [
i8 0, label %9
i8 48, label %6
]
6: ; preds = %2
%7 = add nuw i64 %3, 1
br label %2
8: ; preds = %2
br label %9
9: ; preds = %2, %8
%10 = phi i32 [ 0, %8 ], [ 1, %2 ]
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void usage(char *argv[]) {
  printf("Usage: %s  [n_bins] [directory] [ext] \n\n", argv[0]);
}


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

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

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

LLVM IR (-O2):
@.str = [41 x i8] c"Usage: %s [n_bins] [directory] [ext] \0A\0A\00"
define void @usage(i8** nocapture %0) {
%2 = load i8*, i8** %0
%3 = tail call i32 @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0), i8* %2)
ret void
}
void aic23_power_up(void) {}


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

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

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

LLVM IR (-O2):
define void @aic23_power_up() {
ret void
}
/* Type definitions */
typedef unsigned long long uint64_t;

/* Variables and functions */
void set_cpus(uint64_t *cpu_mask, int cpus) {
  int idx;
  for (idx = 0; idx < (cpus >> 6); idx++) {
    *(cpu_mask + idx) = -1ULL;
  }
  *(cpu_mask) = (1ULL << (cpus & ((1ULL << 6) - 1))) - 1;
}


x86 assembly (clang, -O0):
<set_cpus>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
mov    -0xc(%rbp),%ecx
sar    $0x6,%ecx
cmp    %ecx,%eax
jge    1141 <set_cpus+0x41>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
movq   $0xffffffffffffffff,(%rax,%rcx,8)
ff
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1112 <set_cpus+0x12>
movslq -0xc(%rbp),%rcx
and    $0x3f,%rcx
mov    $0x1,%eax
shl    %cl,%rax
mov    %rax,%rcx
sub    $0x1,%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_cpus>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %rdi,%rbx
cmp    $0x40,%esi
jl     1132 <set_cpus+0x22>
mov    %ebp,%edx
shr    $0x3,%edx
and    $0xfffffff8,%edx
mov    %rbx,%rdi
mov    $0xff,%esi
call   1030 <memset@plt>
mov    $0xffffffffffffffff,%rax
mov    %ebp,%ecx
shl    %cl,%rax
not    %rax
mov    %rax,(%rbx)
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define void @set_cpus(i64* nocapture writeonly %0, i32 %1) {
%3 = icmp sgt i32 %1, 63
br i1 %3, label %4, label %9
4: ; preds = %2
%5 = bitcast i64* %0 to i8*
%6 = lshr i32 %1, 3
%7 = and i32 %6, 536870904
%8 = zext i32 %7 to i64
br label %9
9: ; preds = %4, %2
%10 = and i32 %1, 63
%11 = zext i32 %10 to i64
%12 = shl nsw i64 -1, %11
%13 = xor i64 %12, -1
store i64 %13, i64* %0
ret void
}
float max(float a, float b) { return a >= b ? a : b; }


x86 assembly (clang, -O0):
<max>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
ucomiss -0x8(%rbp),%xmm0
jb     112c <max+0x2c>
movss  -0x4(%rbp),%xmm0
movss  %xmm0,-0xc(%rbp)
jmp    1136 <max+0x36>
movss  -0x8(%rbp),%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0xc(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<max>:
movaps %xmm1,%xmm2
cmpless %xmm0,%xmm2
andps  %xmm2,%xmm0
andnps %xmm1,%xmm2
orps   %xmm2,%xmm0
ret

LLVM IR (-O0):
define float @max(float %0, float %1) {
%3 = alloca float
%4 = alloca float
store float %0, float* %3
store float %1, float* %4
%5 = load float, float* %3
%6 = load float, float* %4
%7 = fcmp oge float %5, %6
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = load float, float* %3
br label %12
10: ; preds = %2
%11 = load float, float* %4
br label %12
12: ; preds = %10, %8
%13 = phi float [ %9, %8 ], [ %11, %10 ]
ret float %13
}

LLVM IR (-O2):
define float @max(float %0, float %1) {
%3 = fcmp oge float %0, %1
%4 = select i1 %3, float %0, float %1
ret float %4
}
/* Variables and functions */
int _ada_use_c2phc4c(int, int *, int *, double *, int /*<<< orphan*/);
int copy_multprec_container_to_target_system(void) {
  int *a, *b, fail;
  double *c;
  fail = _ada_use_c2phc4c(282, a, b, c, 0);
  return fail;
}


x86 assembly (clang, -O0):
<copy_multprec_container_to_target_system>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    $0x11a,%edi
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc4c@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<copy_multprec_container_to_target_system>:
mov    $0x11a,%edi
xor    %r8d,%r8d
jmp    1030 <_ada_use_c2phc4c@plt>

LLVM IR (-O0):
define i32 @copy_multprec_container_to_target_system() {
%1 = alloca i32*
%2 = alloca i32*
%3 = alloca i32
%4 = alloca double*
%5 = load i32*, i32** %1
%6 = load i32*, i32** %2
%7 = load double*, double** %4
%8 = call i32 @_ada_use_c2phc4c(i32 282, i32* %5, i32* %6, double* %7, i32 0)
store i32 %8, i32* %3
%9 = load i32, i32* %3
ret i32 %9
}

LLVM IR (-O2):
define i32 @copy_multprec_container_to_target_system() {
%1 = tail call i32 @_ada_use_c2phc4c(i32 282, i32* undef, i32* undef, double* undef, i32 0)
ret i32 %1
}
/* Type definitions */
struct const_Multiarray_T {
  int dummy;
};
struct const_Matrix_R {
  int dummy;
};
struct Multiarray_T {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ mm_NNC_Multiarray_T(double, double,
                                       struct const_Matrix_R const *const,
                                       struct const_Multiarray_T const *const,
                                       struct Multiarray_T *const);
void mm_NN1C_Multiarray_T(const struct const_Matrix_R *const a,
                          const struct const_Multiarray_T *const b,
                          struct Multiarray_T *const c) {
  mm_NNC_Multiarray_T(1.0, 0.0, a, b, c);
}


x86 assembly (clang, -O0):
<mm_NN1C_Multiarray_T>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
movsd  0xec8(%rip),%xmm0
xorps  %xmm1,%xmm1
call   1030 <mm_NNC_Multiarray_T@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mm_NN1C_Multiarray_T>:
movsd  0xee8(%rip),%xmm0
xorps  %xmm1,%xmm1
jmp    1030 <mm_NNC_Multiarray_T@plt>

LLVM IR (-O0):
%struct.const_Matrix_R = type { i32 }
%struct.const_Multiarray_T = type { i32 }
%struct.Multiarray_T = type { i32 }
define void @mm_NN1C_Multiarray_T(%struct.const_Matrix_R* %0, %struct.const_Multiarray_T* %1, %struct.Multiarray_T* %2) {
%4 = alloca %struct.const_Matrix_R*
%5 = alloca %struct.const_Multiarray_T*
%6 = alloca %struct.Multiarray_T*
store %struct.const_Matrix_R* %0, %struct.const_Matrix_R** %4
store %struct.const_Multiarray_T* %1, %struct.const_Multiarray_T** %5
store %struct.Multiarray_T* %2, %struct.Multiarray_T** %6
%7 = load %struct.const_Matrix_R*, %struct.const_Matrix_R** %4
%8 = load %struct.const_Multiarray_T*, %struct.const_Multiarray_T** %5
%9 = load %struct.Multiarray_T*, %struct.Multiarray_T** %6
%10 = call i32 @mm_NNC_Multiarray_T(double 1.000000e+00, double 0.000000e+00, %struct.const_Matrix_R* %7, %struct.const_Multiarray_T* %8, %struct.Multiarray_T* %9)
ret void
}

LLVM IR (-O2):
%struct.const_Matrix_R = type { i32 }
%struct.const_Multiarray_T = type { i32 }
%struct.Multiarray_T = type { i32 }
define void @mm_NN1C_Multiarray_T(%struct.const_Matrix_R* %0, %struct.const_Multiarray_T* %1, %struct.Multiarray_T* %2) {
%4 = tail call i32 @mm_NNC_Multiarray_T(double 1.000000e+00, double 0.000000e+00, %struct.const_Matrix_R* %0, %struct.const_Multiarray_T* %1, %struct.Multiarray_T* %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char);
void makeLowerCase(char *stephenCharacter) {
  *stephenCharacter += 32;
  printf("Lower Case version is: %c\n", *stephenCharacter);
  return;
}


x86 assembly (clang, -O0):
<makeLowerCase>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%ecx
add    $0x20,%ecx
mov    %cl,(%rax)
mov    -0x8(%rbp),%rax
lea    0xecd(%rip),%rdi
movsbl (%rax),%esi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<makeLowerCase>:
mov    (%rdi),%al
add    $0x20,%al
mov    %al,(%rdi)
movsbl %al,%esi
lea    0xee0(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [27 x i8] c"Lower Case version is: %c\0A\00"
define void @makeLowerCase(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
%6 = add nsw i32 %5, 32
%7 = trunc i32 %6 to i8
store i8 %7, i8* %3
%8 = load i8*, i8** %2
%9 = load i8, i8* %8
%10 = call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), i8 signext %9)
ret void
}

LLVM IR (-O2):
@.str = [27 x i8] c"Lower Case version is: %c\0A\00"
define void @makeLowerCase(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = add i8 %2, 32
store i8 %3, i8* %0
%4 = tail call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), i8 signext %3)
ret void
}
/* Type definitions */
struct timeval {
  double tv_usec;
  scalar_t__ tv_sec;
};

/* Variables and functions */
double timeDiff(struct timeval *pStart, struct timeval *pEnd) {
  return (pEnd->tv_usec - pStart->tv_usec) * 0.000001 +
         (double)(pEnd->tv_sec - pStart->tv_sec);
}


x86 assembly (clang, -O0):
<timeDiff>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x8(%rbp),%rax
subsd  (%rax),%xmm0
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rax
mov    -0x8(%rbp),%rcx
sub    0x8(%rcx),%rax
cvtsi2sd %rax,%xmm1
movsd  0xec7(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<timeDiff>:
movsd  (%rsi),%xmm0
subsd  (%rdi),%xmm0
mov    0x8(%rsi),%rax
sub    0x8(%rdi),%rax
cvtsi2sd %rax,%xmm1
mulsd  0xee3(%rip),%xmm0
addsd  %xmm1,%xmm0
ret

LLVM IR (-O0):
%struct.timeval = type { double, i64 }
define double @timeDiff(%struct.timeval* %0, %struct.timeval* %1) {
%3 = alloca %struct.timeval*
%4 = alloca %struct.timeval*
store %struct.timeval* %0, %struct.timeval** %3
store %struct.timeval* %1, %struct.timeval** %4
%5 = load %struct.timeval*, %struct.timeval** %4
%6 = getelementptr inbounds %struct.timeval, %struct.timeval* %5, i32 0, i32 0
%7 = load double, double* %6
%8 = load %struct.timeval*, %struct.timeval** %3
%9 = getelementptr inbounds %struct.timeval, %struct.timeval* %8, i32 0, i32 0
%10 = load double, double* %9
%11 = fsub double %7, %10
%12 = load %struct.timeval*, %struct.timeval** %4
%13 = getelementptr inbounds %struct.timeval, %struct.timeval* %12, i32 0, i32 1
%14 = load i64, i64* %13
%15 = load %struct.timeval*, %struct.timeval** %3
%16 = getelementptr inbounds %struct.timeval, %struct.timeval* %15, i32 0, i32 1
%17 = load i64, i64* %16
%18 = sub nsw i64 %14, %17
%19 = sitofp i64 %18 to double
%20 = call double @llvm.fmuladd.f64(double %11, double 0x3EB0C6F7A0B5ED8D, double %19)
ret double %20
}

LLVM IR (-O2):
%struct.timeval = type { double, i64 }
define double @timeDiff(%struct.timeval* nocapture %0, %struct.timeval* nocapture %1) {
%3 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 0
%4 = load double, double* %3
%5 = getelementptr inbounds %struct.timeval, %struct.timeval* %0, i64 0, i32 0
%6 = load double, double* %5
%7 = fsub double %4, %6
%8 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 1
%9 = load i64, i64* %8
%10 = getelementptr inbounds %struct.timeval, %struct.timeval* %0, i64 0, i32 1
%11 = load i64, i64* %10
%12 = sub nsw i64 %9, %11
%13 = sitofp i64 %12 to double
%14 = tail call double @llvm.fmuladd.f64(double %7, double 0x3EB0C6F7A0B5ED8D, double %13)
ret double %14
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
uint32_t ror32_8(uint32_t v) { return ((v & 0xffu) << 24) | (v >> 8); }


x86 assembly (clang, -O0):
<ror32_8>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0xff,%eax
shl    $0x18,%eax
mov    -0x4(%rbp),%ecx
sar    $0x8,%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ror32_8>:
mov    %edi,%eax
shl    $0x18,%eax
sar    $0x8,%edi
or     %edi,%eax
ret

LLVM IR (-O0):
define i32 @ror32_8(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = and i32 %3, 255
%5 = shl i32 %4, 24
%6 = load i32, i32* %2
%7 = ashr i32 %6, 8
%8 = or i32 %5, %7
ret i32 %8
}

LLVM IR (-O2):
define i32 @ror32_8(i32 %0) {
%2 = shl i32 %0, 24
%3 = ashr i32 %0, 8
%4 = or i32 %2, %3
ret i32 %4
}
int bit_TRE(unsigned short reg_value) { return (reg_value & 0x1000) == 0x1000; }


x86 assembly (clang, -O0):
<bit_TRE>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
movzwl -0x2(%rbp),%eax
and    $0x1000,%eax
cmp    $0x1000,%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<bit_TRE>:
mov    %edi,%eax
shr    $0xc,%eax
and    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @bit_TRE(i16 zeroext %0) {
%2 = alloca i16
store i16 %0, i16* %2
%3 = load i16, i16* %2
%4 = zext i16 %3 to i32
%5 = and i32 %4, 4096
%6 = icmp eq i32 %5, 4096
%7 = zext i1 %6 to i32
ret i32 %7
}

LLVM IR (-O2):
define i32 @bit_TRE(i16 zeroext %0) {
%2 = lshr i16 %0, 12
%3 = and i16 %2, 1
%4 = zext i16 %3 to i32
ret i32 %4
}
/* Variables and functions */
int ibv_fork_init();
int mlx4_glue_fork_init(void) { return ibv_fork_init(); }


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

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

LLVM IR (-O0):
define i32 @mlx4_glue_fork_init() {
%1 = call i32 (...) @ibv_fork_init()
ret i32 %1
}

LLVM IR (-O2):
define i32 @mlx4_glue_fork_init() {
%1 = tail call i32 (...) @ibv_fork_init()
ret i32 %1
}
/* Type definitions */
struct ndm_stracc_t {
  int dummy;
};

/* Variables and functions */
scalar_t__ ndm_stracc_size(struct ndm_stracc_t const *);
bool ndm_stracc_is_empty(const struct ndm_stracc_t *a) {
  return ndm_stracc_size(a) == 0;
}


x86 assembly (clang, -O0):
<ndm_stracc_is_empty>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <ndm_stracc_size@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.ndm_stracc_t = type { i32 }
define i32 @ndm_stracc_is_empty(%struct.ndm_stracc_t* %0) {
%2 = alloca %struct.ndm_stracc_t*
store %struct.ndm_stracc_t* %0, %struct.ndm_stracc_t** %2
%3 = load %struct.ndm_stracc_t*, %struct.ndm_stracc_t** %2
%4 = call i64 @ndm_stracc_size(%struct.ndm_stracc_t* %3)
%5 = icmp eq i64 %4, 0
%6 = zext i1 %5 to i32
ret i32 %6
}

LLVM IR (-O2):
%struct.ndm_stracc_t = type { i32 }
define i32 @ndm_stracc_is_empty(%struct.ndm_stracc_t* %0) {
%2 = tail call i64 @ndm_stracc_size(%struct.ndm_stracc_t* %0)
%3 = icmp eq i64 %2, 0
%4 = zext i1 %3 to i32
ret i32 %4
}
unsigned long mult(unsigned long p, unsigned long q) {
  unsigned long p1, p0, q1, q0;
  p1 = p / 10000;
  p0 = p % 10000;
  q1 = q / 10000;
  q0 = q % 10000;
  return ((((p0 * q1 + p1 * q0) % 10000) * 10000 + p0 * q0) % 100000000);
}


x86 assembly (clang, -O0):
<mult>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    $0x2710,%ecx
xor    %edx,%edx
div    %rcx
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    $0x2710,%ecx
xor    %edx,%edx
div    %rcx
mov    %rdx,-0x20(%rbp)
mov    -0x10(%rbp),%rax
mov    $0x2710,%ecx
xor    %edx,%edx
div    %rcx
mov    %rax,-0x28(%rbp)
mov    -0x10(%rbp),%rax
mov    $0x2710,%ecx
xor    %edx,%edx
div    %rcx
mov    %rdx,-0x30(%rbp)
mov    -0x20(%rbp),%rax
imul   -0x28(%rbp),%rax
mov    -0x18(%rbp),%rcx
imul   -0x30(%rbp),%rcx
add    %rcx,%rax
mov    $0x2710,%ecx
xor    %edx,%edx
div    %rcx
imul   $0x2710,%rdx,%rax
mov    -0x20(%rbp),%rcx
imul   -0x30(%rbp),%rcx
add    %rcx,%rax
mov    $0x5f5e100,%ecx
xor    %edx,%edx
div    %rcx
mov    %rdx,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<mult>:
movabs $0x346dc5d63886594b,%r8
c5 6d 34
mov    %rdi,%rax
mul    %r8
mov    %rdx,%rcx
shr    $0xb,%rcx
imul   $0x2710,%rcx,%rax
sub    %rax,%rdi
mov    %rsi,%rax
mul    %r8
shr    $0xb,%rdx
imul   $0x2710,%rdx,%rax
sub    %rax,%rsi
imul   %rdi,%rdx
imul   %rsi,%rcx
add    %rdx,%rcx
mov    %rcx,%rax
mul    %r8
shr    $0xb,%rdx
imul   $0x2710,%rdx,%rax
sub    %rax,%rcx
imul   $0x2710,%rcx,%rax
imul   %rdi,%rsi
add    %rax,%rsi
imul   $0x55e63b89,%rsi,%rax
shr    $0x39,%rax
imul   $0x5f5e100,%eax,%eax
sub    %eax,%esi
mov    %rsi,%rax
ret

LLVM IR (-O0):
define i64 @mult(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
%5 = alloca i64
%6 = alloca i64
%7 = alloca i64
%8 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%9 = load i64, i64* %3
%10 = udiv i64 %9, 10000
store i64 %10, i64* %5
%11 = load i64, i64* %3
%12 = urem i64 %11, 10000
store i64 %12, i64* %6
%13 = load i64, i64* %4
%14 = udiv i64 %13, 10000
store i64 %14, i64* %7
%15 = load i64, i64* %4
%16 = urem i64 %15, 10000
store i64 %16, i64* %8
%17 = load i64, i64* %6
%18 = load i64, i64* %7
%19 = mul i64 %17, %18
%20 = load i64, i64* %5
%21 = load i64, i64* %8
%22 = mul i64 %20, %21
%23 = add i64 %19, %22
%24 = urem i64 %23, 10000
%25 = mul i64 %24, 10000
%26 = load i64, i64* %6
%27 = load i64, i64* %8
%28 = mul i64 %26, %27
%29 = add i64 %25, %28
%30 = urem i64 %29, 100000000
ret i64 %30
}

LLVM IR (-O2):
define i64 @mult(i64 %0, i64 %1) {
%3 = udiv i64 %0, 10000
%4 = urem i64 %0, 10000
%5 = udiv i64 %1, 10000
%6 = urem i64 %1, 10000
%7 = mul nuw i64 %5, %4
%8 = mul nuw i64 %6, %3
%9 = add i64 %7, %8
%10 = urem i64 %9, 10000
%11 = mul nuw nsw i64 %10, 10000
%12 = mul nuw nsw i64 %6, %4
%13 = add nuw nsw i64 %11, %12
%14 = trunc i64 %13 to i32
%15 = urem i32 %14, 100000000
%16 = zext i32 %15 to i64
ret i64 %16
}
/* Variables and functions */
bool push(int value) { return false; }


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

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

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

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

/* Variables and functions */
int32_t ntt32_sqrn(int32_t x, int32_t n) {
  return (((int64_t)x) * ((int64_t)x)) % ((int64_t)n);
}


x86 assembly (clang, -O0):
<ntt32_sqrn>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
imul   -0x4(%rbp),%eax
cltd
idivl  -0x8(%rbp)
mov    %edx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ntt32_sqrn>:
mov    %edi,%eax
imul   %edi,%eax
cltd
idiv   %esi
mov    %edx,%eax
ret

LLVM IR (-O0):
define i32 @ntt32_sqrn(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = load i32, i32* %3
%7 = mul nsw i32 %5, %6
%8 = load i32, i32* %4
%9 = srem i32 %7, %8
ret i32 %9
}

LLVM IR (-O2):
define i32 @ntt32_sqrn(i32 %0, i32 %1) {
%3 = mul nsw i32 %0, %0
%4 = srem i32 %3, %1
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ puts(char *);
int main(void) {
  puts("Hello World!\n");
  while (1)
    ;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeda(%rip),%rdi
call   1030 <puts@plt>
jmp    112b <main+0x1b>

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
nopl   (%rax)
jmp    1120 <main+0x10>

LLVM IR (-O0):
@.str = [14 x i8] c"Hello World!\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @puts(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
br label %3
3: ; preds = %0, %3
br label %3
}

LLVM IR (-O2):
@.str = [14 x i8] c"Hello World!\0A\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
br label %2
2: ; preds = %0, %2
br label %2
}
int simple_is_plus_or_minus(char c) {
  int result = 0;
  if (c == '+' || c == '-')
    result = 1;
  return result;
}


x86 assembly (clang, -O0):
<simple_is_plus_or_minus>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movl   $0x0,-0x8(%rbp)
movsbl -0x1(%rbp),%eax
cmp    $0x2b,%eax
je     112b <simple_is_plus_or_minus+0x2b>
movsbl -0x1(%rbp),%eax
cmp    $0x2d,%eax
jne    1132 <simple_is_plus_or_minus+0x32>
movl   $0x1,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<simple_is_plus_or_minus>:
add    $0xd5,%dil
xor    %eax,%eax
test   $0xfd,%dil
sete   %al
ret

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

LLVM IR (-O2):
define i32 @simple_is_plus_or_minus(i8 signext %0) {
%2 = icmp eq i8 %0, 43
%3 = icmp eq i8 %0, 45
%4 = or i1 %2, %3
%5 = zext i1 %4 to i32
ret i32 %5
}
int test_imm_A8int64_midword_reg(long long val) {
  return ((val >> 16) & (0xA8 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_A8int64_midword_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdx
sar    $0x10,%rdx
and    $0xa8,%rdx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_A8int64_midword_reg>:
test   $0xa80000,%edi
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_A8int64_midword_reg(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = ashr i64 %3, 16
%5 = and i64 %4, 168
%6 = icmp ne i64 %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_A8int64_midword_reg(i64 %0) {
%2 = and i64 %0, 11010048
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
unsigned hashFunFinal(unsigned oldHash) {
  unsigned newHash = oldHash;
  newHash += (newHash << 3);
  newHash ^= (newHash >> 11);
  newHash += (newHash << 15);
  return newHash;
}


x86 assembly (clang, -O0):
<hashFunFinal>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
shl    $0x3,%eax
add    -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
shr    $0xb,%eax
xor    -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
shl    $0xf,%eax
add    -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<hashFunFinal>:
lea    (%rdi,%rdi,8),%eax
mov    %eax,%ecx
shr    $0xb,%ecx
xor    %eax,%ecx
mov    %ecx,%eax
shl    $0xf,%eax
add    %ecx,%eax
ret

LLVM IR (-O0):
define i32 @hashFunFinal(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
store i32 %4, i32* %3
%5 = load i32, i32* %3
%6 = shl i32 %5, 3
%7 = load i32, i32* %3
%8 = add i32 %7, %6
store i32 %8, i32* %3
%9 = load i32, i32* %3
%10 = lshr i32 %9, 11
%11 = load i32, i32* %3
%12 = xor i32 %11, %10
store i32 %12, i32* %3
%13 = load i32, i32* %3
%14 = shl i32 %13, 15
%15 = load i32, i32* %3
%16 = add i32 %15, %14
store i32 %16, i32* %3
%17 = load i32, i32* %3
ret i32 %17
}

LLVM IR (-O2):
define i32 @hashFunFinal(i32 %0) {
%2 = mul i32 %0, 9
%3 = lshr i32 %2, 11
%4 = xor i32 %3, %2
%5 = mul i32 %4, 32769
ret i32 %5
}
void CoolingUpdate(void) {}


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

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

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

LLVM IR (-O2):
define void @CoolingUpdate() {
ret void
}
void fa48(void) {
P0A:
  goto P0A;
  ({
    P01A:
      goto P01A;
      ({
        P012A:
          goto P012A;
          0;
      });
    p01B:
      goto p01B;
      goto a;
    P01B:
      goto P01B;
      ({
        P013A:
          goto P013A;
          0;
      });
    P01C:
      goto P01C;
      0;
  });
a:
  ({
    P02A:
      goto P02A;
      ({
        P024A:
          goto P024A;
          0;
      });
    P02B:
      goto P02B;
      ({
        P025A:
          goto P025A;
          0;
      });
    P02C:
      goto P02C;
      0;
  });
P0C:
  goto P0C;
  0;
P0D:
  goto P0D;
}


x86 assembly (clang, -O0):
<fa48>:
push   %rbp
mov    %rsp,%rbp
jmp    1104 <fa48+0x4>

x86 assembly (clang, -O2):
<fa48>:
jmp    1100 <fa48>

LLVM IR (-O0):
define void @fa48() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
br label %7
7: ; preds = %7, %0
br label %7
8: ; No predecessors!
br label %9
9: ; preds = %9, %8
br label %9
10: ; No predecessors!
br label %11
11: ; preds = %11, %10
br label %11
12: ; preds = %12
br label %12
13: ; preds = %13
br label %13
14: ; No predecessors!
br label %15
15: ; preds = %15, %14
br label %15
16: ; preds = %16
br label %16
17: ; No predecessors!
br label %18
18: ; preds = %18, %17
br label %18
19: ; No predecessors!
br label %20
20: ; preds = %20, %19
br label %20
21: ; preds = %21
br label %21
22: ; No predecessors!
br label %23
23: ; preds = %23, %22
br label %23
24: ; preds = %24
br label %24
25: ; preds = %25
br label %25
26: ; preds = %26
br label %26
}

LLVM IR (-O2):
define void @fa48() {
br label %1
1: ; preds = %1, %0
br label %1
}