xunge/DecIR huggingface dataset:
/* Variables and functions */
int fdc_get_bit_rate();
int /*<<< orphan*/ fdc_is_mfm();
int fdi_density() {
  if (!fdc_is_mfm()) {
    return 0;
  }
  switch (fdc_get_bit_rate()) {
  case 0:
    return 2;
  case 1:
    return 1;
  case 2:
    return 1;
  case 3:
  case 5:
    return 3;
  default:
    return 1;
  }
}


x86 assembly (clang, -O0):
<fdi_density>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <fdc_is_mfm@plt>
cmp    $0x0,%eax
jne    1144 <fdi_density+0x24>
movl   $0x0,-0x4(%rbp)
jmp    11a5 <fdi_density+0x85>
xor    %eax,%eax
call   1040 <fdc_get_bit_rate@plt>
mov    %eax,%ecx
mov    %rcx,-0x10(%rbp)
sub    $0x5,%eax
ja     119e <fdi_density+0x7e>
mov    -0x10(%rbp),%rax
lea    0xe9b(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
movl   $0x2,-0x4(%rbp)
jmp    11a5 <fdi_density+0x85>
movl   $0x1,-0x4(%rbp)
jmp    11a5 <fdi_density+0x85>
movl   $0x1,-0x4(%rbp)
jmp    11a5 <fdi_density+0x85>
movl   $0x3,-0x4(%rbp)
jmp    11a5 <fdi_density+0x85>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fdi_density>:
push   %rbx
xor    %ebx,%ebx
xor    %eax,%eax
call   1030 <fdc_is_mfm@plt>
test   %eax,%eax
je     114b <fdi_density+0x2b>
xor    %eax,%eax
call   1040 <fdc_get_bit_rate@plt>
mov    $0x1,%ebx
cmp    $0x5,%eax
ja     114b <fdi_density+0x2b>
cltq
lea    0xeb8(%rip),%rcx
mov    (%rcx,%rax,4),%ebx
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @fdi_density() {
%1 = alloca i32
%2 = call i32 (...) @fdc_is_mfm()
%3 = icmp ne i32 %2, 0
br i1 %3, label %5, label %4
4: ; preds = %0
store i32 0, i32* %1
br label %12
5: ; preds = %0
%6 = call i32 (...) @fdc_get_bit_rate()
switch i32 %6, label %11 [
i32 0, label %7
i32 1, label %8
i32 2, label %9
i32 3, label %10
i32 5, label %10
]
7: ; preds = %5
store i32 2, i32* %1
br label %12
8: ; preds = %5
store i32 1, i32* %1
br label %12
9: ; preds = %5
store i32 1, i32* %1
br label %12
10: ; preds = %5, %5
store i32 3, i32* %1
br label %12
11: ; preds = %5
store i32 1, i32* %1
br label %12
12: ; preds = %11, %10, %9, %8, %7, %4
%13 = load i32, i32* %1
ret i32 %13
}

LLVM IR (-O2):
@switch.table.fdi_density = [6 x i32] [i32 2, i32 1, i32 1, i32 3, i32 1, i32 3]
define i32 @fdi_density() {
%1 = tail call i32 (...) @fdc_is_mfm()
%2 = icmp eq i32 %1, 0
br i1 %2, label %10, label %3
3: ; preds = %0
%4 = tail call i32 (...) @fdc_get_bit_rate()
%5 = icmp ult i32 %4, 6
br i1 %5, label %6, label %10
6: ; preds = %3
%7 = sext i32 %4 to i64
%8 = getelementptr inbounds [6 x i32], [6 x i32]* @switch.table.fdi_density, i64 0, i64 %7
%9 = load i32, i32* %8
br label %10
10: ; preds = %3, %6, %0
%11 = phi i32 [ 0, %0 ], [ %9, %6 ], [ 1, %3 ]
ret i32 %11
}
/* Variables and functions */
int /*<<< orphan*/ kdump_failed(int);
scalar_t__ sclp_hsa_copy(void *, int, int);
int /*<<< orphan*/ sclp_hsa_copy_exit();
void copy_from_hsa(unsigned long dst, unsigned long src, int cnt) {
  if (cnt == 0)
    return;
  if (sclp_hsa_copy((void *)dst, 2 + src / 4096UL, cnt / 4096UL)) {
    sclp_hsa_copy_exit();
    kdump_failed(0x00004524);
  }
}


x86 assembly (clang, -O0):
<copy_from_hsa>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
jne    1152 <copy_from_hsa+0x22>
jmp    118e <copy_from_hsa+0x5e>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rax
shr    $0xc,%rax
add    $0x2,%rax
mov    %eax,%esi
movslq -0x14(%rbp),%rax
shr    $0xc,%rax
mov    %eax,%edx
call   1030 <sclp_hsa_copy@plt>
cmp    $0x0,%rax
je     118e <copy_from_hsa+0x5e>
mov    $0x0,%al
call   1050 <sclp_hsa_copy_exit@plt>
mov    $0x4524,%edi
call   1040 <kdump_failed@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<copy_from_hsa>:
push   %rax
test   %edx,%edx
je     115b <copy_from_hsa+0x2b>
shr    $0xc,%rsi
add    $0x2,%esi
sar    $0xc,%edx
call   1030 <sclp_hsa_copy@plt>
test   %rax,%rax
je     115b <copy_from_hsa+0x2b>
xor    %eax,%eax
call   1050 <sclp_hsa_copy_exit@plt>
mov    $0x4524,%edi
pop    %rax
jmp    1040 <kdump_failed@plt>
pop    %rax
ret

LLVM IR (-O0):
define void @copy_from_hsa(i64 %0, i64 %1, i32 %2) {
%4 = alloca i64
%5 = alloca i64
%6 = alloca i32
store i64 %0, i64* %4
store i64 %1, i64* %5
store i32 %2, i32* %6
%7 = load i32, i32* %6
%8 = icmp eq i32 %7, 0
br i1 %8, label %9, label %10
9: ; preds = %3
br label %26
10: ; preds = %3
%11 = load i64, i64* %4
%12 = inttoptr i64 %11 to i8*
%13 = load i64, i64* %5
%14 = udiv i64 %13, 4096
%15 = add i64 2, %14
%16 = trunc i64 %15 to i32
%17 = load i32, i32* %6
%18 = sext i32 %17 to i64
%19 = udiv i64 %18, 4096
%20 = trunc i64 %19 to i32
%21 = call i64 @sclp_hsa_copy(i8* %12, i32 %16, i32 %20)
%22 = icmp ne i64 %21, 0
br i1 %22, label %23, label %26
23: ; preds = %10
%24 = call i32 (...) @sclp_hsa_copy_exit()
%25 = call i32 @kdump_failed(i32 17700)
br label %26
26: ; preds = %9, %23, %10
ret void
}

LLVM IR (-O2):
define void @copy_from_hsa(i64 %0, i64 %1, i32 %2) {
%4 = icmp eq i32 %2, 0
br i1 %4, label %16, label %5
5: ; preds = %3
%6 = inttoptr i64 %0 to i8*
%7 = lshr i64 %1, 12
%8 = trunc i64 %7 to i32
%9 = add i32 %8, 2
%10 = ashr i32 %2, 12
%11 = tail call i64 @sclp_hsa_copy(i8* %6, i32 %9, i32 %10)
%12 = icmp eq i64 %11, 0
br i1 %12, label %16, label %13
13: ; preds = %5
%14 = tail call i32 (...) @sclp_hsa_copy_exit()
%15 = tail call i32 @kdump_failed(i32 17700)
br label %16
16: ; preds = %3, %13, %5
ret void
}
void Fault(void) {
  while (1)
    ;
}


x86 assembly (clang, -O0):
<Fault>:
push   %rbp
mov    %rsp,%rbp
jmp    1109 <Fault+0x9>
jmp    1109 <Fault+0x9>

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

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

LLVM IR (-O2):
define void @Fault() {
br label %1
1: ; preds = %0, %1
br label %1
}
/* Variables and functions */
void *memcpy(void *, void const *, size_t);
void *__memcpy(void *t1, const void *t2, size_t n) { return memcpy(t1, t2, n); }


x86 assembly (clang, -O0):
<__memcpy>:
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    %rdi,-0x20(%rbp)
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1030 <memcpy@plt>
mov    -0x20(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__memcpy>:
jmp    1030 <memcpy@plt>

LLVM IR (-O0):
define i8* @__memcpy(i8* %0, i8* %1, i64 %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i64
store i8* %0, i8** %4
store i8* %1, i8** %5
store i64 %2, i64* %6
%7 = load i8*, i8** %4
%8 = load i8*, i8** %5
%9 = load i64, i64* %6
ret i8* %7
}

LLVM IR (-O2):
define i8* @__memcpy(i8* returned writeonly %0, i8* nocapture %1, i64 %2) {
tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 1 %0, i8* align 1 %1, i64 %2, i1 false)
ret i8* %0
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, char const *);
void print_usage(FILE *stream, const char *name) {
  fprintf(stream,
          "Usage:\t%s [-v] [-4] [-6] [-n]"
          " [-f FAMILY] [-H HOST] [-p PORT]"
          " [-t TIMEOUT] [COMMAND]\n",
          name);
}


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

x86 assembly (clang, -O2):
<print_usage>:
mov    %rsi,%rdx
lea    0xee6(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@.str = [86 x i8] c"Usage:\09%s [-v] [-4] [-6] [-n] [-f FAMILY] [-H HOST] [-p PORT] [-t TIMEOUT] [COMMAND]\0A\00"
define void @print_usage(i32* %0, i8* %1) {
%3 = alloca i32*
%4 = alloca i8*
store i32* %0, i32** %3
store i8* %1, i8** %4
%5 = load i32*, i32** %3
%6 = load i8*, i8** %4
%7 = call i32 @fprintf(i32* %5, i8* getelementptr inbounds ([86 x i8], [86 x i8]* @.str, i64 0, i64 0), i8* %6)
ret void
}

LLVM IR (-O2):
@.str = [86 x i8] c"Usage:\09%s [-v] [-4] [-6] [-n] [-f FAMILY] [-H HOST] [-p PORT] [-t TIMEOUT] [COMMAND]\0A\00"
define void @print_usage(i32* nocapture %0, i8* %1) {
%3 = tail call i32 @fprintf(i32* %0, i8* getelementptr inbounds ([86 x i8], [86 x i8]* @.str, i64 0, i64 0), i8* %1)
ret void
}
/* Variables and functions */
void *malloc(size_t);
int /*<<< orphan*/ memset(void *, int /*<<< orphan*/, size_t);
void *smm_alloc(size_t size) {
  void *mem;
  if ((mem = malloc(size)) != NULL) {
    memset(mem, 0, size);
  }
  return mem;
}


x86 assembly (clang, -O0):
<smm_alloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmp    $0x0,%rax
je     1152 <smm_alloc+0x32>
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rdx
xor    %esi,%esi
call   1030 <memset@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<smm_alloc>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
call   1040 <malloc@plt>
mov    %rax,%rbx
test   %rax,%rax
je     1141 <smm_alloc+0x21>
mov    %rbx,%rdi
xor    %esi,%esi
mov    %r14,%rdx
call   1030 <memset@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define i8* @smm_alloc(i64 %0) {
%2 = tail call i8* @malloc(i64 %0)
%3 = icmp eq i8* %2, null
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i32 @memset(i8* %2, i32 0, i64 %0)
br label %6
6: ; preds = %4, %1
ret i8* %2
}
/* Variables and functions */
char *find(char *haystack, char needle) {
  while (*haystack != needle)
    if (!*haystack++)
      return NULL;
  return (char *)haystack;
}


x86 assembly (clang, -O0):
<find>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %rdi,-0x10(%rbp)
mov    %al,-0x11(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
movsbl -0x11(%rbp),%ecx
cmp    %ecx,%eax
je     114b <find+0x4b>
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
cmpb   $0x0,(%rax)
jne    1146 <find+0x46>
movq   $0x0,-0x8(%rbp)
jmp    1153 <find+0x53>
jmp    110e <find+0xe>
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<find>:
mov    %rdi,%rax
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
movzbl (%rax),%ecx
cmp    %sil,%cl
je     1122 <find+0x22>
add    $0x1,%rax
test   %cl,%cl
jne    1110 <find+0x10>
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i8* @find(i8* %0, i8 signext %1) {
br label %3
3: ; preds = %7, %2
%4 = phi i8* [ %0, %2 ], [ %8, %7 ]
%5 = load i8, i8* %4
%6 = icmp eq i8 %5, %1
br i1 %6, label %10, label %7
7: ; preds = %3
%8 = getelementptr inbounds i8, i8* %4, i64 1
%9 = icmp eq i8 %5, 0
br i1 %9, label %10, label %3
10: ; preds = %3, %7
%11 = phi i8* [ null, %7 ], [ %4, %3 ]
ret i8* %11
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
void cache_impossible(void) { exit(111); }


x86 assembly (clang, -O0):
<cache_impossible>:
push   %rbp
mov    %rsp,%rbp
mov    $0x6f,%edi
call   1030 <exit@plt>

x86 assembly (clang, -O2):
<cache_impossible>:
push   %rax
mov    $0x6f,%edi
call   1030 <exit@plt>

LLVM IR (-O0):
define void @cache_impossible() {
%1 = call i32 @exit(i32 111)
unreachable
}

LLVM IR (-O2):
define void @cache_impossible() {
%1 = tail call i32 @exit(i32 111)
unreachable
}
int min(int a, int b) { return (a >= b ? b : a); }


x86 assembly (clang, -O0):
<min>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
jl     1121 <min+0x21>
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
jmp    1127 <min+0x27>
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<min>:
mov    %esi,%eax
cmp    %esi,%edi
cmovl  %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @min(i32 %0, i32 %1) {
%3 = icmp slt i32 %0, %1
%4 = select i1 %3, i32 %0, i32 %1
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void print_null() { printf("()"); }


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

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

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

LLVM IR (-O2):
@.str = [3 x i8] c"()\00"
define void @print_null() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ atomic_bool;

/* Variables and functions */
int atomic_compare_exchange_strong(int /*<<< orphan*/ *, int *, int);
bool stdatomic_compare_exchange_bool(atomic_bool *b, bool expected,
                                     bool replacement) {
  return atomic_compare_exchange_strong(b, &expected, replacement);
}


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

x86 assembly (clang, -O2):
<stdatomic_compare_exchange_bool>:
push   %rax
mov    %esi,0x4(%rsp)
lea    0x4(%rsp),%rsi
call   1030 <atomic_compare_exchange_strong@plt>
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @stdatomic_compare_exchange_bool(i32* %0, i32 %1, i32 %2) {
%4 = alloca i32
store i32 %1, i32* %4
%5 = call i32 @atomic_compare_exchange_strong(i32* %0, i32* %4, i32 %2)
ret i32 %5
}
/* Variables and functions */
unsigned long ulA2L(unsigned char *, int);
int /*<<< orphan*/ vOneTwo(unsigned char const *, int, unsigned char *);
unsigned long ulBcd2L(const unsigned char *psBcdString, int iLength) {
  unsigned char sTmp[24];
  ;
  if (iLength > 12 || iLength < 0)
    return (0);
  vOneTwo(psBcdString, iLength, sTmp);
  return (ulA2L(sTmp, iLength * 2));
}


x86 assembly (clang, -O0):
<ulBcd2L>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
cmpl   $0xc,-0x14(%rbp)
jg     1143 <ulBcd2L+0x23>
cmpl   $0x0,-0x14(%rbp)
jge    1150 <ulBcd2L+0x30>
movq   $0x0,-0x8(%rbp)
jmp    1173 <ulBcd2L+0x53>
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%esi
lea    -0x30(%rbp),%rdx
call   1040 <vOneTwo@plt>
lea    -0x30(%rbp),%rdi
mov    -0x14(%rbp),%esi
shl    $0x1,%esi
call   1030 <ulA2L@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ulBcd2L>:
cmp    $0xc,%esi
jbe    1128 <ulBcd2L+0x8>
xor    %eax,%eax
ret
push   %r14
push   %rbx
sub    $0x18,%rsp
mov    %esi,%ebx
mov    %rsp,%r14
mov    %r14,%rdx
call   1040 <vOneTwo@plt>
add    %ebx,%ebx
mov    %r14,%rdi
mov    %ebx,%esi
call   1030 <ulA2L@plt>
add    $0x18,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i64 @ulBcd2L(i8* %0, i32 %1) {
%3 = alloca i64
%4 = alloca i8*
%5 = alloca i32
%6 = alloca [24 x i8]
store i8* %0, i8** %4
store i32 %1, i32* %5
%7 = load i32, i32* %5
%8 = icmp sgt i32 %7, 12
br i1 %8, label %12, label %9
9: ; preds = %2
%10 = load i32, i32* %5
%11 = icmp slt i32 %10, 0
br i1 %11, label %12, label %13
12: ; preds = %9, %2
store i64 0, i64* %3
br label %22
13: ; preds = %9
%14 = load i8*, i8** %4
%15 = load i32, i32* %5
%16 = getelementptr inbounds [24 x i8], [24 x i8]* %6, i64 0, i64 0
%17 = call i32 @vOneTwo(i8* %14, i32 %15, i8* %16)
%18 = getelementptr inbounds [24 x i8], [24 x i8]* %6, i64 0, i64 0
%19 = load i32, i32* %5
%20 = mul nsw i32 %19, 2
%21 = call i64 @ulA2L(i8* %18, i32 %20)
store i64 %21, i64* %3
br label %22
22: ; preds = %13, %12
%23 = load i64, i64* %3
ret i64 %23
}

LLVM IR (-O2):
define i64 @ulBcd2L(i8* %0, i32 %1) {
%3 = alloca [24 x i8]
%4 = getelementptr inbounds [24 x i8], [24 x i8]* %3, i64 0, i64 0
%5 = icmp ugt i32 %1, 12
br i1 %5, label %10, label %6
6: ; preds = %2
%7 = call i32 @vOneTwo(i8* %0, i32 %1, i8* %4)
%8 = shl nuw nsw i32 %1, 1
%9 = call i64 @ulA2L(i8* %4, i32 %8)
br label %10
10: ; preds = %2, %6
%11 = phi i64 [ %9, %6 ], [ 0, %2 ]
ret i64 %11
}
/* Type definitions */
typedef long int32_t;
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ SEEK_END;
int /*<<< orphan*/ SEEK_SET;
int /*<<< orphan*/ fseek(int /*<<< orphan*/ *, long, int /*<<< orphan*/);
long ftell(int /*<<< orphan*/ *);
int32_t BE_Cross_FileLengthFromHandle(FILE *fp) {
  long int origOffset = ftell(fp);
  fseek(fp, 0, SEEK_END);
  long int len = ftell(fp);
  fseek(fp, origOffset, SEEK_SET);
  return len;
}


x86 assembly (clang, -O0):
<BE_Cross_FileLengthFromHandle>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <ftell@plt>
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    0x2ea4(%rip),%rax
mov    (%rax),%edx
xor    %eax,%eax
mov    %eax,%esi
call   1040 <fseek@plt>
mov    -0x8(%rbp),%rdi
call   1030 <ftell@plt>
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    0x2e6d(%rip),%rax
mov    (%rax),%edx
call   1040 <fseek@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<BE_Cross_FileLengthFromHandle>:
push   %r15
push   %r14
push   %rbx
mov    %rdi,%rbx
call   1030 <ftell@plt>
mov    %rax,%r14
mov    0x2eb1(%rip),%rax
mov    (%rax),%edx
mov    %rbx,%rdi
xor    %esi,%esi
call   1040 <fseek@plt>
mov    %rbx,%rdi
call   1030 <ftell@plt>
mov    %rax,%r15
mov    0x2e83(%rip),%rax
mov    (%rax),%edx
mov    %rbx,%rdi
mov    %r14,%rsi
call   1040 <fseek@plt>
mov    %r15,%rax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@SEEK_END = global i32 0
@SEEK_SET = global i32 0
define i64 @BE_Cross_FileLengthFromHandle(i32* %0) {
%2 = alloca i32*
%3 = alloca i64
%4 = alloca i64
store i32* %0, i32** %2
%5 = load i32*, i32** %2
%6 = call i64 @ftell(i32* %5)
store i64 %6, i64* %3
%7 = load i32*, i32** %2
%8 = load i32, i32* @SEEK_END
%9 = call i32 @fseek(i32* %7, i64 0, i32 %8)
%10 = load i32*, i32** %2
%11 = call i64 @ftell(i32* %10)
store i64 %11, i64* %4
%12 = load i32*, i32** %2
%13 = load i64, i64* %3
%14 = load i32, i32* @SEEK_SET
%15 = call i32 @fseek(i32* %12, i64 %13, i32 %14)
%16 = load i64, i64* %4
ret i64 %16
}

LLVM IR (-O2):
@SEEK_END = global i32 0
@SEEK_SET = global i32 0
define i64 @BE_Cross_FileLengthFromHandle(i32* nocapture %0) {
%2 = tail call i64 @ftell(i32* %0)
%3 = load i32, i32* @SEEK_END
%4 = tail call i32 @fseek(i32* %0, i64 0, i32 %3)
%5 = tail call i64 @ftell(i32* %0)
%6 = load i32, i32* @SEEK_SET
%7 = tail call i32 @fseek(i32* %0, i64 %2, i32 %6)
ret i64 %5
}
void HSMMCSDBusVoltSet(unsigned int baseAddr, unsigned int volt) {
  (*((volatile unsigned int *)(baseAddr + (0x228)))) &= ~(0x00000E00u);
  (*((volatile unsigned int *)(baseAddr + (0x228)))) |= volt;
}


x86 assembly (clang, -O0):
<HSMMCSDBusVoltSet>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
add    $0x228,%eax
mov    %eax,%eax
mov    (%rax),%ecx
and    $0xfffff1ff,%ecx
mov    %ecx,(%rax)
mov    -0x8(%rbp),%edx
mov    -0x4(%rbp),%eax
add    $0x228,%eax
mov    %eax,%eax
mov    (%rax),%ecx
or     %edx,%ecx
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<HSMMCSDBusVoltSet>:
add    $0x228,%edi
andl   $0xfffff1ff,(%rdi)
or     %esi,(%rdi)
ret

LLVM IR (-O0):
define void @HSMMCSDBusVoltSet(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 = add i32 %5, 552
%7 = zext i32 %6 to i64
%8 = inttoptr i64 %7 to i32*
%9 = load volatile i32, i32* %8
%10 = and i32 %9, -3585
store volatile i32 %10, i32* %8
%11 = load i32, i32* %4
%12 = load i32, i32* %3
%13 = add i32 %12, 552
%14 = zext i32 %13 to i64
%15 = inttoptr i64 %14 to i32*
%16 = load volatile i32, i32* %15
%17 = or i32 %16, %11
store volatile i32 %17, i32* %15
ret void
}

LLVM IR (-O2):
define void @HSMMCSDBusVoltSet(i32 %0, i32 %1) {
%3 = add i32 %0, 552
%4 = zext i32 %3 to i64
%5 = inttoptr i64 %4 to i32*
%6 = load volatile i32, i32* %5
%7 = and i32 %6, -3585
store volatile i32 %7, i32* %5
%8 = load volatile i32, i32* %5
%9 = or i32 %8, %1
store volatile i32 %9, i32* %5
ret void
}
OP(ed, f6) { illegal_2(); }


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

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

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

LLVM IR (-O2):
define i32 @OP(i32 %0, i32 %1) {
%3 = tail call i32 (...) @illegal_2()
ret i32 undef
}
/* Variables and functions */
int fact(int);
int /*<<< orphan*/ test_assert(int);
int main() {
  int f = fact(3);
  test_assert(f == 6);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x3,%edi
call   1030 <fact@plt>
mov    %eax,-0x8(%rbp)
cmpl   $0x6,-0x8(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <test_assert@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x3,%edi
call   1030 <fact@plt>
xor    %edi,%edi
cmp    $0x6,%eax
sete   %dil
call   1040 <test_assert@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @fact(i32 3)
%2 = icmp eq i32 %1, 6
%3 = zext i1 %2 to i32
%4 = tail call i32 @test_assert(i32 %3)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ randk();
void randk_warmup(int rounds) {
  int i;
  for (i = 0; i < rounds; i++)
    randk();
}


x86 assembly (clang, -O0):
<randk_warmup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    1143 <randk_warmup+0x33>
mov    $0x0,%al
call   1030 <randk@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1122 <randk_warmup+0x12>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<randk_warmup>:
push   %rbx
test   %edi,%edi
jle    112c <randk_warmup+0x1c>
mov    %edi,%ebx
nopw   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1030 <randk@plt>
add    $0xffffffff,%ebx
jne    1120 <randk_warmup+0x10>
pop    %rbx
ret

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

LLVM IR (-O2):
define void @randk_warmup(i32 %0) {
%2 = icmp sgt i32 %0, 0
br i1 %2, label %3, label %8
3: ; preds = %1, %3
%4 = phi i32 [ %6, %3 ], [ 0, %1 ]
%5 = tail call i32 (...) @randk()
%6 = add nuw nsw i32 %4, 1
%7 = icmp eq i32 %6, %0
br i1 %7, label %8, label %3
8: ; preds = %3, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ testfork();
int main(int argc, char *argv[], char *envp[]) {
  testfork();
  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    %rdx,-0x18(%rbp)
mov    $0x0,%al
call   1030 <testfork@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1, i8** %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i8**
%7 = alloca i8**
store i32 0, i32* %4
store i32 %0, i32* %5
store i8** %1, i8*** %6
store i8** %2, i8*** %7
%8 = call i32 (...) @testfork()
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1, i8** nocapture readnone %2) {
%4 = tail call i32 (...) @testfork()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int pntstyl(int ip) {
  ip += 20;
  printf("Q%d\n", ip);
  return (0);
}


x86 assembly (clang, -O0):
<pntstyl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x14,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%esi
lea    0xed2(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pntstyl>:
push   %rax
lea    0x14(%rdi),%esi
lea    0xee5(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [5 x i8] c"Q%d\0A\00"
define i32 @pntstyl(i32 %0) {
%2 = add nsw i32 %0, 20
%3 = tail call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %2)
ret i32 0
}
/* Variables and functions */
int floatToRawIntBits(float);
float const intBitsToFloat(int);
__attribute__((always_)) const float copysignfk(float x, float y) {
  return intBitsToFloat((floatToRawIntBits(x) & ~(1 << 31)) ^
                        (floatToRawIntBits(y) & (1 << 31)));
}


x86 assembly (clang, -O0):
<copysignfk>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
call   1040 <floatToRawIntBits@plt>
and    $0x7fffffff,%eax
mov    %eax,-0xc(%rbp)
movss  -0x8(%rbp),%xmm0
call   1040 <floatToRawIntBits@plt>
mov    -0xc(%rbp),%edi
and    $0x80000000,%eax
xor    %eax,%edi
call   1030 <intBitsToFloat@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<copysignfk>:
push   %rbx
sub    $0x10,%rsp
movss  %xmm1,0xc(%rsp)
call   1040 <floatToRawIntBits@plt>
mov    %eax,%ebx
and    $0x7fffffff,%ebx
movss  0xc(%rsp),%xmm0
call   1040 <floatToRawIntBits@plt>
and    $0x80000000,%eax
or     %eax,%ebx
mov    %ebx,%edi
add    $0x10,%rsp
pop    %rbx
jmp    1030 <intBitsToFloat@plt>

LLVM IR (-O0):
define float @copysignfk(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 = call i32 @floatToRawIntBits(float %5)
%7 = and i32 %6, 2147483647
%8 = load float, float* %4
%9 = call i32 @floatToRawIntBits(float %8)
%10 = and i32 %9, -2147483648
%11 = xor i32 %7, %10
%12 = call float @intBitsToFloat(i32 %11)
ret float %12
}

LLVM IR (-O2):
define float @copysignfk(float %0, float %1) {
%3 = tail call i32 @floatToRawIntBits(float %0)
%4 = and i32 %3, 2147483647
%5 = tail call i32 @floatToRawIntBits(float %1)
%6 = and i32 %5, -2147483648
%7 = or i32 %6, %4
%8 = tail call float @intBitsToFloat(i32 %7)
ret float %8
}
/* Variables and functions */
int /*<<< orphan*/ roadmap_gui_maximize();
int /*<<< orphan*/ roadmap_main_remove_periodic(void (*)());
void on_timer__maximize(void) {
  roadmap_main_remove_periodic(on_timer__maximize);
  roadmap_gui_maximize();
}


x86 assembly (clang, -O0):
<on_timer__maximize>:
push   %rbp
mov    %rsp,%rbp
mov    0x2eb5(%rip),%rdi
call   1030 <roadmap_main_remove_periodic@plt>
mov    $0x0,%al
call   1040 <roadmap_gui_maximize@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<on_timer__maximize>:
push   %rax
mov    0x2eb8(%rip),%rdi
call   1030 <roadmap_main_remove_periodic@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <roadmap_gui_maximize@plt>

LLVM IR (-O0):
define void @on_timer__maximize() {
%1 = call i32 @roadmap_main_remove_periodic(void (...)* bitcast (void ()* @on_timer__maximize to void (...)*))
%2 = call i32 (...) @roadmap_gui_maximize()
ret void
}

LLVM IR (-O2):
define void @on_timer__maximize() {
%1 = tail call i32 @roadmap_main_remove_periodic(void (...)* bitcast (void ()* @on_timer__maximize to void (...)*))
%2 = tail call i32 (...) @roadmap_gui_maximize()
ret void
}
/* Type definitions */
struct __test_metadata {
  int dummy;
};
struct __fixture_variant_metadata {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ epoll43(struct __test_metadata *);
void wrapper_epoll43(struct __test_metadata *_metadata,
                     struct __fixture_variant_metadata *variant) {
  epoll43(_metadata);
}


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

x86 assembly (clang, -O2):
<wrapper_epoll43>:
jmp    1030 <epoll43@plt>

LLVM IR (-O0):
%struct.__test_metadata = type { i32 }
%struct.__fixture_variant_metadata = type { i32 }
define void @wrapper_epoll43(%struct.__test_metadata* %0, %struct.__fixture_variant_metadata* %1) {
%3 = alloca %struct.__test_metadata*
%4 = alloca %struct.__fixture_variant_metadata*
store %struct.__test_metadata* %0, %struct.__test_metadata** %3
store %struct.__fixture_variant_metadata* %1, %struct.__fixture_variant_metadata** %4
%5 = load %struct.__test_metadata*, %struct.__test_metadata** %3
%6 = call i32 @epoll43(%struct.__test_metadata* %5)
ret void
}

LLVM IR (-O2):
%struct.__test_metadata = type { i32 }
%struct.__fixture_variant_metadata = type { i32 }
define void @wrapper_epoll43(%struct.__test_metadata* %0, %struct.__fixture_variant_metadata* nocapture readnone %1) {
%3 = tail call i32 @epoll43(%struct.__test_metadata* %0)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ int64_t;

/* Variables and functions */
int gob_encode_int64(char *, size_t, int /*<<< orphan*/);
int gob_encode_long(char *buf, size_t buf_size, long v) {
  return gob_encode_int64(buf, buf_size, (int64_t)v);
}


x86 assembly (clang, -O0):
<gob_encode_long>:
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),%rax
mov    %eax,%edx
call   1030 <gob_encode_int64@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gob_encode_long>:
jmp    1030 <gob_encode_int64@plt>

LLVM IR (-O0):
define i32 @gob_encode_long(i8* %0, i64 %1, i64 %2) {
%4 = alloca i8*
%5 = alloca i64
%6 = alloca i64
store i8* %0, i8** %4
store i64 %1, i64* %5
store i64 %2, i64* %6
%7 = load i8*, i8** %4
%8 = load i64, i64* %5
%9 = load i64, i64* %6
%10 = trunc i64 %9 to i32
%11 = call i32 @gob_encode_int64(i8* %7, i64 %8, i32 %10)
ret i32 %11
}

LLVM IR (-O2):
define i32 @gob_encode_long(i8* %0, i64 %1, i64 %2) {
%4 = trunc i64 %2 to i32
%5 = tail call i32 @gob_encode_int64(i8* %0, i64 %1, i32 %4)
ret i32 %5
}
int test_imm_FEuint64_midword_mem(unsigned long long *val) {
  return ((*val >> 16) & (0xFE << 0)) ? -20 : -40;
}


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

x86 assembly (clang, -O2):
<test_imm_FEuint64_midword_mem>:
testb  $0xfe,0x2(%rdi)
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_FEuint64_midword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 16646144
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ put_char(char, int, int, unsigned int);
void put_string(char *string, int x, int y, unsigned color) {
  char *s;
  s = string;
  while (*s) {
    put_char(*s, x, y, color);
    s++;
    x += 8;
  }
}


x86 assembly (clang, -O0):
<put_string>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
cmpb   $0x0,(%rax)
je     116b <put_string+0x5b>
mov    -0x20(%rbp),%rax
mov    (%rax),%al
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
mov    -0x14(%rbp),%ecx
movsbl %al,%edi
call   1030 <put_char@plt>
mov    -0x20(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x20(%rbp)
mov    -0xc(%rbp),%eax
add    $0x8,%eax
mov    %eax,-0xc(%rbp)
jmp    112d <put_string+0x1d>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<put_string>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    (%rdi),%al
test   %al,%al
je     114f <put_string+0x3f>
mov    %ecx,%r14d
mov    %edx,%r15d
mov    %esi,%ebx
mov    %rdi,%rbp
add    $0x1,%rbp
nopl   0x0(%rax)
movsbl %al,%edi
mov    %ebx,%esi
mov    %r15d,%edx
mov    %r14d,%ecx
call   1030 <put_char@plt>
add    $0x8,%ebx
movzbl 0x0(%rbp),%eax
add    $0x1,%rbp
test   %al,%al
jne    1130 <put_string+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
define void @put_string(i8* nocapture %0, i32 %1, i32 %2, i32 %3) {
%5 = load i8, i8* %0
%6 = icmp eq i8 %5, 0
br i1 %6, label %16, label %7
7: ; preds = %4, %7
%8 = phi i8 [ %14, %7 ], [ %5, %4 ]
%9 = phi i8* [ %12, %7 ], [ %0, %4 ]
%10 = phi i32 [ %13, %7 ], [ %1, %4 ]
%11 = tail call i32 @put_char(i8 signext %8, i32 %10, i32 %2, i32 %3)
%12 = getelementptr inbounds i8, i8* %9, i64 1
%13 = add nsw i32 %10, 8
%14 = load i8, i8* %12
%15 = icmp eq i8 %14, 0
br i1 %15, label %16, label %7
16: ; preds = %7, %4
ret void
}
void pinconf_init_device_debugfs(struct dentry *devroot,
                                 struct pinctrl_dev *pctldev) {}


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

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

LLVM IR (-O0):
%struct.dentry = type opaque
%struct.pinctrl_dev = type opaque
define void @pinconf_init_device_debugfs(%struct.dentry* %0, %struct.pinctrl_dev* %1) {
%3 = alloca %struct.dentry*
%4 = alloca %struct.pinctrl_dev*
store %struct.dentry* %0, %struct.dentry** %3
store %struct.pinctrl_dev* %1, %struct.pinctrl_dev** %4
ret void
}

LLVM IR (-O2):
%struct.dentry = type opaque
%struct.pinctrl_dev = type opaque
define void @pinconf_init_device_debugfs(%struct.dentry* nocapture %0, %struct.pinctrl_dev* nocapture %1) {
ret void
}
/* Variables and functions */
int strcmp(char const *, char const *);
int compare_word(const char *desc, const char *src) {
  return strcmp(desc, src);
}


x86 assembly (clang, -O0):
<compare_word>:
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 <strcmp@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<compare_word>:
jmp    1030 <strcmp@plt>

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

LLVM IR (-O2):
define i32 @compare_word(i8* nocapture %0, i8* nocapture %1) {
%3 = tail call i32 @strcmp(i8* dereferenceable(1) %0, i8* dereferenceable(1) %1)
ret i32 %3
}
/* Type definitions */
typedef int /*<<< orphan*/ __m128;

/* Variables and functions */
int /*<<< orphan*/ _mm_stream_ps(float *, int /*<<< orphan*/);
void test_mm_stream_ps(float *A, __m128 B) { _mm_stream_ps(A, B); }


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

x86 assembly (clang, -O2):
<test_mm_stream_ps>:
jmp    1030 <_mm_stream_ps@plt>

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

LLVM IR (-O2):
define void @test_mm_stream_ps(float* %0, i32 %1) {
%3 = tail call i32 @_mm_stream_ps(float* %0, i32 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ SYS_getpid;
int syscall(int /*<<< orphan*/);
int my_getpid(void) { return syscall(SYS_getpid); }


x86 assembly (clang, -O0):
<my_getpid>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ed5(%rip),%rax
mov    (%rax),%edi
call   1030 <syscall@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<my_getpid>:
mov    0x2ed9(%rip),%rax
mov    (%rax),%edi
jmp    1030 <syscall@plt>

LLVM IR (-O0):
@SYS_getpid = global i32 0
define i32 @my_getpid() {
%1 = load i32, i32* @SYS_getpid
%2 = call i32 @syscall(i32 %1)
ret i32 %2
}

LLVM IR (-O2):
@SYS_getpid = global i32 0
define i32 @my_getpid() {
%1 = load i32, i32* @SYS_getpid
%2 = tail call i32 @syscall(i32 %1)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
void print(int a[], int size) {
  int i;
  for (i = 0; i < size; i++)
    printf("%d ", a[i]);
  printf("\n");
}


x86 assembly (clang, -O0):
<print>:
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    1159 <print+0x49>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,4),%esi
lea    0xebc(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1126 <print+0x16>
lea    0xea4(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
test   %esi,%esi
jle    1157 <print+0x37>
mov    %rdi,%r15
mov    %esi,%r12d
lea    0xec7(%rip),%r14
xor    %ebx,%ebx
nopl   0x0(%rax,%rax,1)
mov    (%r15,%rbx,4),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
add    $0x1,%rbx
cmp    %rbx,%r12
jne    1140 <print+0x20>
mov    $0xa,%edi
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
jmp    1030 <putchar@plt>

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d \00"
define void @print(i32* 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 i32, i32* %0, i64 %7
%9 = load i32, i32* %8
%10 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %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
%14 = tail call i32 @putchar(i32 10)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ reset_all_cache_counters();
int /*<<< orphan*/ reset_instruction_counters();
int /*<<< orphan*/ reset_memory_counters();
int /*<<< orphan*/ reset_nop_counters();
int /*<<< orphan*/ reset_register_access_counters();
int /*<<< orphan*/ reset_segments_access_counters();
int /*<<< orphan*/ reset_source_profile();
void reset_profiler() {
  reset_instruction_counters();
  reset_memory_counters();
  reset_nop_counters();
  reset_source_profile();
  reset_register_access_counters();
  reset_segments_access_counters();
  reset_all_cache_counters();
}


x86 assembly (clang, -O0):
<reset_profiler>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1070 <reset_instruction_counters@plt>
mov    $0x0,%al
call   1050 <reset_memory_counters@plt>
mov    $0x0,%al
call   1080 <reset_nop_counters@plt>
mov    $0x0,%al
call   1030 <reset_source_profile@plt>
mov    $0x0,%al
call   1090 <reset_register_access_counters@plt>
mov    $0x0,%al
call   1060 <reset_segments_access_counters@plt>
mov    $0x0,%al
call   1040 <reset_all_cache_counters@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<reset_profiler>:
push   %rax
xor    %eax,%eax
call   1070 <reset_instruction_counters@plt>
xor    %eax,%eax
call   1050 <reset_memory_counters@plt>
xor    %eax,%eax
call   1080 <reset_nop_counters@plt>
xor    %eax,%eax
call   1030 <reset_source_profile@plt>
xor    %eax,%eax
call   1090 <reset_register_access_counters@plt>
xor    %eax,%eax
call   1060 <reset_segments_access_counters@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <reset_all_cache_counters@plt>

LLVM IR (-O0):
define void @reset_profiler() {
%1 = call i32 (...) @reset_instruction_counters()
%2 = call i32 (...) @reset_memory_counters()
%3 = call i32 (...) @reset_nop_counters()
%4 = call i32 (...) @reset_source_profile()
%5 = call i32 (...) @reset_register_access_counters()
%6 = call i32 (...) @reset_segments_access_counters()
%7 = call i32 (...) @reset_all_cache_counters()
ret void
}

LLVM IR (-O2):
define void @reset_profiler() {
%1 = tail call i32 (...) @reset_instruction_counters()
%2 = tail call i32 (...) @reset_memory_counters()
%3 = tail call i32 (...) @reset_nop_counters()
%4 = tail call i32 (...) @reset_source_profile()
%5 = tail call i32 (...) @reset_register_access_counters()
%6 = tail call i32 (...) @reset_segments_access_counters()
%7 = tail call i32 (...) @reset_all_cache_counters()
ret void
}
void seq(char *stuff, int count, char *target) {}


x86 assembly (clang, -O0):
<seq>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @seq(i8* nocapture %0, i32 %1, i8* nocapture %2) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ close(int);
int /*<<< orphan*/ dup(int);
void redirect(int k, int pd[2]) {
  close(k);
  dup(pd[k]);
  close(pd[0]);
  close(pd[1]);
}


x86 assembly (clang, -O0):
<redirect>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%edi
call   1040 <close@plt>
mov    -0x10(%rbp),%rax
movslq -0x4(%rbp),%rcx
mov    (%rax,%rcx,4),%edi
call   1030 <dup@plt>
mov    -0x10(%rbp),%rax
mov    (%rax),%edi
call   1040 <close@plt>
mov    -0x10(%rbp),%rax
mov    0x4(%rax),%edi
call   1040 <close@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<redirect>:
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %edi,%ebp
call   1040 <close@plt>
movslq %ebp,%rax
mov    (%rbx,%rax,4),%edi
call   1030 <dup@plt>
mov    (%rbx),%edi
call   1040 <close@plt>
mov    0x4(%rbx),%edi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1040 <close@plt>

LLVM IR (-O0):
define void @redirect(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 = call i32 @close(i32 %5)
%7 = load i32*, i32** %4
%8 = load i32, i32* %3
%9 = sext i32 %8 to i64
%10 = getelementptr inbounds i32, i32* %7, i64 %9
%11 = load i32, i32* %10
%12 = call i32 @dup(i32 %11)
%13 = load i32*, i32** %4
%14 = getelementptr inbounds i32, i32* %13, i64 0
%15 = load i32, i32* %14
%16 = call i32 @close(i32 %15)
%17 = load i32*, i32** %4
%18 = getelementptr inbounds i32, i32* %17, i64 1
%19 = load i32, i32* %18
%20 = call i32 @close(i32 %19)
ret void
}

LLVM IR (-O2):
define void @redirect(i32 %0, i32* nocapture %1) {
%3 = tail call i32 @close(i32 %0)
%4 = sext i32 %0 to i64
%5 = getelementptr inbounds i32, i32* %1, i64 %4
%6 = load i32, i32* %5
%7 = tail call i32 @dup(i32 %6)
%8 = load i32, i32* %1
%9 = tail call i32 @close(i32 %8)
%10 = getelementptr inbounds i32, i32* %1, i64 1
%11 = load i32, i32* %10
%12 = tail call i32 @close(i32 %11)
ret void
}
double Sleef_sinh_u10(double x) { return __builtin_sinh(x); }


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

x86 assembly (clang, -O2):
<Sleef_sinh_u10>:
jmp    1030 <sinh@plt>

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

LLVM IR (-O2):
define double @Sleef_sinh_u10(double %0) {
%2 = tail call double @sinh(double %0)
ret double %2
}