xunge/DecIR huggingface dataset:
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ internal_fiat_25519_carry_square(uintptr_t, uintptr_t);
void fiat_25519_carry_square(uint32_t out1[10], const uint32_t arg1[10]) {
  internal_fiat_25519_carry_square((uintptr_t)out1, (uintptr_t)arg1);
}


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

x86 assembly (clang, -O2):
<fiat_25519_carry_square>:
jmp    1030 <internal_fiat_25519_carry_square@plt>

LLVM IR (-O0):
define void @fiat_25519_carry_square(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 = ptrtoint i32* %5 to i64
%7 = load i32*, i32** %4
%8 = ptrtoint i32* %7 to i64
%9 = call i32 @internal_fiat_25519_carry_square(i64 %6, i64 %8)
ret void
}

LLVM IR (-O2):
define void @fiat_25519_carry_square(i32* %0, i32* %1) {
%3 = ptrtoint i32* %0 to i64
%4 = ptrtoint i32* %1 to i64
%5 = tail call i32 @internal_fiat_25519_carry_square(i64 %3, i64 %4)
ret void
}
int DUMMY_update_bitmap(long a, long b, long c, int d, unsigned char *e,
                        int f) {
  return (0);
}


x86 assembly (clang, -O0):
<DUMMY_update_bitmap>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9d,-0x2c(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @DUMMY_update_bitmap(i64 %0, i64 %1, i64 %2, i32 %3, i8* %4, i32 %5) {
%7 = alloca i64
%8 = alloca i64
%9 = alloca i64
%10 = alloca i32
%11 = alloca i8*
%12 = alloca i32
store i64 %0, i64* %7
store i64 %1, i64* %8
store i64 %2, i64* %9
store i32 %3, i32* %10
store i8* %4, i8** %11
store i32 %5, i32* %12
ret i32 0
}

LLVM IR (-O2):
define i32 @DUMMY_update_bitmap(i64 %0, i64 %1, i64 %2, i32 %3, i8* nocapture readnone %4, i32 %5) {
ret i32 0
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
uint32_t murmurhash3_32bit(uint32_t i) {
  i ^= i >> 16;
  i *= 0x85ebca6b;
  i ^= i >> 13;
  i *= 0xc2b2ae35;
  i ^= i >> 16;
  return i;
}


x86 assembly (clang, -O0):
<murmurhash3_32bit>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x10,%eax
xor    -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
imul   $0x85ebca6b,-0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
sar    $0xd,%eax
xor    -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
imul   $0xc2b2ae35,-0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x10,%eax
xor    -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<murmurhash3_32bit>:
mov    %edi,%eax
sar    $0x10,%eax
xor    %edi,%eax
imul   $0x85ebca6b,%eax,%eax
mov    %eax,%ecx
sar    $0xd,%ecx
xor    %eax,%ecx
imul   $0xc2b2ae35,%ecx,%ecx
mov    %ecx,%eax
sar    $0x10,%eax
xor    %ecx,%eax
ret

LLVM IR (-O0):
define i32 @murmurhash3_32bit(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = ashr i32 %3, 16
%5 = load i32, i32* %2
%6 = xor i32 %5, %4
store i32 %6, i32* %2
%7 = load i32, i32* %2
%8 = mul i32 %7, -2048144789
store i32 %8, i32* %2
%9 = load i32, i32* %2
%10 = ashr i32 %9, 13
%11 = load i32, i32* %2
%12 = xor i32 %11, %10
store i32 %12, i32* %2
%13 = load i32, i32* %2
%14 = mul i32 %13, -1028477387
store i32 %14, i32* %2
%15 = load i32, i32* %2
%16 = ashr i32 %15, 16
%17 = load i32, i32* %2
%18 = xor i32 %17, %16
store i32 %18, i32* %2
%19 = load i32, i32* %2
ret i32 %19
}

LLVM IR (-O2):
define i32 @murmurhash3_32bit(i32 %0) {
%2 = ashr i32 %0, 16
%3 = xor i32 %2, %0
%4 = mul i32 %3, -2048144789
%5 = ashr i32 %4, 13
%6 = xor i32 %5, %4
%7 = mul i32 %6, -1028477387
%8 = ashr i32 %7, 16
%9 = xor i32 %8, %7
ret i32 %9
}
/* Type definitions */
struct configuration {
  int dummy;
};

/* Variables and functions */
char **extract_values_delim(char *, char *);
char *get_value(char const *, struct configuration *);
char **get_values(const char *key, struct configuration *cfg) {
  char *value = get_value(key, cfg);
  return extract_values_delim(value, ",");
}


x86 assembly (clang, -O0):
<get_values>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <get_value@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
lea    0xeb4(%rip),%rsi
call   1030 <extract_values_delim@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_values>:
push   %rax
call   1040 <get_value@plt>
lea    0xed3(%rip),%rsi
mov    %rax,%rdi
pop    %rax
jmp    1030 <extract_values_delim@plt>

LLVM IR (-O0):
%struct.configuration = type { i32 }
@.str = [2 x i8] c",\00"
define i8** @get_values(i8* %0, %struct.configuration* %1) {
%3 = alloca i8*
%4 = alloca %struct.configuration*
%5 = alloca i8*
store i8* %0, i8** %3
store %struct.configuration* %1, %struct.configuration** %4
%6 = load i8*, i8** %3
%7 = load %struct.configuration*, %struct.configuration** %4
%8 = call i8* @get_value(i8* %6, %struct.configuration* %7)
store i8* %8, i8** %5
%9 = load i8*, i8** %5
%10 = call i8** @extract_values_delim(i8* %9, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
ret i8** %10
}

LLVM IR (-O2):
%struct.configuration = type { i32 }
@.str = [2 x i8] c",\00"
define i8** @get_values(i8* %0, %struct.configuration* %1) {
%3 = tail call i8* @get_value(i8* %0, %struct.configuration* %1)
%4 = tail call i8** @extract_values_delim(i8* %3, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
ret i8** %4
}
/* Variables and functions */
int get_group_column_index(int, int);
int get_group_row_index(int, int);
int get_current_group_left_bound(int row_index, int column_index,
                                 int group_size) {
  int group_row_index = get_group_row_index(row_index, group_size);
  int group_column_index = get_group_column_index(column_index, group_size);
  if (group_row_index == group_column_index) {
    return row_index;
  } else {
    return group_column_index * group_size;
  }
}


x86 assembly (clang, -O0):
<get_current_group_left_bound>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%esi
call   1030 <get_group_row_index@plt>
mov    %eax,-0x14(%rbp)
mov    -0xc(%rbp),%edi
mov    -0x10(%rbp),%esi
call   1040 <get_group_column_index@plt>
mov    %eax,-0x18(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x18(%rbp),%eax
jne    1164 <get_current_group_left_bound+0x44>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    116e <get_current_group_left_bound+0x4e>
mov    -0x18(%rbp),%eax
imul   -0x10(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_current_group_left_bound>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %edx,%ebx
mov    %esi,%r14d
mov    %edi,%ebp
mov    %edx,%esi
call   1030 <get_group_row_index@plt>
mov    %eax,%r15d
mov    %r14d,%edi
mov    %ebx,%esi
call   1040 <get_group_column_index@plt>
imul   %eax,%ebx
cmp    %eax,%r15d
cmove  %ebp,%ebx
mov    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @get_current_group_left_bound(i32 %0, i32 %1, i32 %2) {
%4 = tail call i32 @get_group_row_index(i32 %0, i32 %2)
%5 = tail call i32 @get_group_column_index(i32 %1, i32 %2)
%6 = icmp eq i32 %4, %5
%7 = mul nsw i32 %5, %2
%8 = select i1 %6, i32 %0, i32 %7
ret i32 %8
}
int kdt_heap_sort_cost(long len, long buflen) {
  int m = 1;
  while (len > buflen) {
    m *= 2;
    len /= 2;
  }
  return m;
}


x86 assembly (clang, -O0):
<kdt_heap_sort_cost>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x1,-0x14(%rbp)
mov    -0x8(%rbp),%rax
cmp    -0x10(%rbp),%rax
jle    1141 <kdt_heap_sort_cost+0x41>
mov    -0x14(%rbp),%eax
shl    $0x1,%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rax
mov    $0x2,%ecx
cqto
idiv   %rcx
mov    %rax,-0x8(%rbp)
jmp    1113 <kdt_heap_sort_cost+0x13>
mov    -0x14(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<kdt_heap_sort_cost>:
mov    $0x1,%eax
cmp    %rsi,%rdi
jle    1134 <kdt_heap_sort_cost+0x34>
mov    $0x1,%eax
mov    %rdi,%rcx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
add    %eax,%eax
shr    $0x3f,%rcx
add    %rdi,%rcx
sar    %rcx
mov    %rcx,%rdi
cmp    %rsi,%rcx
jg     1120 <kdt_heap_sort_cost+0x20>
ret

LLVM IR (-O0):
define i32 @kdt_heap_sort_cost(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
%5 = alloca i32
store i64 %0, i64* %3
store i64 %1, i64* %4
store i32 1, i32* %5
br label %6
6: ; preds = %10, %2
%7 = load i64, i64* %3
%8 = load i64, i64* %4
%9 = icmp sgt i64 %7, %8
br i1 %9, label %10, label %15
10: ; preds = %6
%11 = load i32, i32* %5
%12 = mul nsw i32 %11, 2
store i32 %12, i32* %5
%13 = load i64, i64* %3
%14 = sdiv i64 %13, 2
store i64 %14, i64* %3
br label %6
15: ; preds = %6
%16 = load i32, i32* %5
ret i32 %16
}

LLVM IR (-O2):
define i32 @kdt_heap_sort_cost(i64 %0, i64 %1) {
%3 = icmp sgt i64 %0, %1
br i1 %3, label %4, label %10
4: ; preds = %2, %4
%5 = phi i32 [ %7, %4 ], [ 1, %2 ]
%6 = phi i64 [ %8, %4 ], [ %0, %2 ]
%7 = shl nsw i32 %5, 1
%8 = sdiv i64 %6, 2
%9 = icmp sgt i64 %8, %1
br i1 %9, label %4, label %10
10: ; preds = %4, %2
%11 = phi i32 [ 1, %2 ], [ %7, %4 ]
ret i32 %11
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void a() { printf("a1.c\n"); }


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

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

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

LLVM IR (-O2):
@str = [5 x i8] c"a1.c\00"
define void @a() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @str, i64 0, i64 0))
ret void
}
void eglQuerySurface(void) { return; }


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

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

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

LLVM IR (-O2):
define void @eglQuerySurface() {
ret void
}
void pwrite64() {}


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

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

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

LLVM IR (-O2):
define void @pwrite64() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ scenestack_empty();
int /*<<< orphan*/ scenestack_pop();
void scenestack_release() {
  while (!scenestack_empty())
    scenestack_pop();
}


x86 assembly (clang, -O0):
<scenestack_release>:
push   %rbp
mov    %rsp,%rbp
jmp    1129 <scenestack_release+0x9>
mov    $0x0,%al
call   1030 <scenestack_empty@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
test   $0x1,%al
jne    1145 <scenestack_release+0x25>
jmp    1151 <scenestack_release+0x31>
mov    $0x0,%al
call   1040 <scenestack_pop@plt>
jmp    1129 <scenestack_release+0x9>
pop    %rbp
ret

x86 assembly (clang, -O2):
<scenestack_release>:
push   %rax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1030 <scenestack_empty@plt>
test   %eax,%eax
jne    1144 <scenestack_release+0x24>
xor    %eax,%eax
call   1040 <scenestack_pop@plt>
jmp    1130 <scenestack_release+0x10>
pop    %rax
ret

LLVM IR (-O0):
define void @scenestack_release() {
br label %1
1: ; preds = %5, %0
%2 = call i32 (...) @scenestack_empty()
%3 = icmp ne i32 %2, 0
%4 = xor i1 %3, true
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = call i32 (...) @scenestack_pop()
br label %1
7: ; preds = %1
ret void
}

LLVM IR (-O2):
define void @scenestack_release() {
%1 = tail call i32 (...) @scenestack_empty()
%2 = icmp eq i32 %1, 0
br i1 %2, label %3, label %7
3: ; preds = %0, %3
%4 = tail call i32 (...) @scenestack_pop()
%5 = tail call i32 (...) @scenestack_empty()
%6 = icmp eq i32 %5, 0
br i1 %6, label %3, label %7
7: ; preds = %3, %0
ret void
}
char *extend_re(s)
char *s;
{
  char *s1;
  s1 = malloc((unsigned)strlen(s) + 4 + 1);
  return strcat(strcat(strcpy(s1, ".*("), s), ")");
}


x86 assembly (clang, -O0):
<extend_re>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
add    $0x4,%eax
add    $0x1,%eax
mov    %eax,%eax
mov    %eax,%edi
call   1050 <malloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xe8d(%rip),%rsi
call   1030 <strcpy@plt>
mov    %rax,%rdi
mov    -0x8(%rbp),%rsi
call   1060 <strcat@plt>
mov    %rax,%rdi
lea    0xe76(%rip),%rsi
call   1060 <strcat@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<extend_re>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
call   1030 <strlen@plt>
lea    0x5(%rax),%edi
call   1040 <malloc@plt>
mov    %rax,%rbx
movl   $0x282a2e,(%rax)
mov    %rax,%rdi
mov    %r14,%rsi
call   1050 <strcat@plt>
mov    %rbx,%rdi
call   1030 <strlen@plt>
movw   $0x29,(%rbx,%rax,1)
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [4 x i8] c".*(\00"
@.str.1 = [2 x i8] c")\00"
define i8* @extend_re(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i64 @strlen(i8* %4)
%6 = trunc i64 %5 to i32
%7 = add i32 %6, 4
%8 = add i32 %7, 1
%9 = zext i32 %8 to i64
%10 = call i8* @malloc(i64 %9)
store i8* %10, i8** %3
%11 = load i8*, i8** %3
%12 = call i8* @strcpy(i8* %11, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%13 = load i8*, i8** %2
%14 = call i8* @strcat(i8* %12, i8* %13)
%15 = call i8* @strcat(i8* %14, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
ret i8* %15
}

LLVM IR (-O2):
define i8* @extend_re(i8* nocapture %0) {
%2 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%3 = add i64 %2, 5
%4 = and i64 %3, 4294967295
%5 = tail call i8* @malloc(i64 %4)
%6 = bitcast i8* %5 to i32*
store i32 2632238, i32* %6
%7 = tail call i8* @strcat(i8* dereferenceable(1) %5, i8* dereferenceable(1) %0)
%8 = tail call i64 @strlen(i8* dereferenceable(1) %5)
%9 = getelementptr i8, i8* %5, i64 %8
%10 = bitcast i8* %9 to i16*
store i16 41, i16* %10
ret i8* %5
}
/* Variables and functions */
int proc_modify_policy_min(unsigned int, unsigned long);
int sysfs_modify_policy_min(unsigned int, unsigned long);
int cpufreq_modify_policy_min(unsigned int cpu, unsigned long min_freq) {
  int ret;
  ret = sysfs_modify_policy_min(cpu, min_freq);
  if (ret)
    ret = proc_modify_policy_min(cpu, min_freq);
  return (ret);
}


x86 assembly (clang, -O0):
<cpufreq_modify_policy_min>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1040 <sysfs_modify_policy_min@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
je     1157 <cpufreq_modify_policy_min+0x37>
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1030 <proc_modify_policy_min@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cpufreq_modify_policy_min>:
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %edi,%ebp
call   1040 <sysfs_modify_policy_min@plt>
test   %eax,%eax
je     1141 <cpufreq_modify_policy_min+0x21>
mov    %ebp,%edi
mov    %rbx,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <proc_modify_policy_min@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @cpufreq_modify_policy_min(i32 %0, i64 %1) {
%3 = tail call i32 @sysfs_modify_policy_min(i32 %0, i64 %1)
%4 = icmp eq i32 %3, 0
br i1 %4, label %7, label %5
5: ; preds = %2
%6 = tail call i32 @proc_modify_policy_min(i32 %0, i64 %1)
br label %7
7: ; preds = %5, %2
%8 = phi i32 [ %6, %5 ], [ 0, %2 ]
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ fatal(char *);
void *malloc(size_t);
int /*<<< orphan*/ memset(void *, int /*<<< orphan*/, size_t);
void *xcmalloc(size_t size) {
  register void *ptr = malloc(size);
  if (ptr == NULL)
    fatal("c_mkdir: virtual memory exhausted");
  else
    memset(ptr, 0, size);
  return ptr;
}


x86 assembly (clang, -O0):
<xcmalloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1165 <xcmalloc+0x35>
lea    0xea5(%rip),%rdi
call   1050 <fatal@plt>
jmp    1174 <xcmalloc+0x44>
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):
<xcmalloc>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
call   1040 <malloc@plt>
mov    %rax,%rbx
test   %rax,%rax
je     1153 <xcmalloc+0x23>
mov    %rbx,%rdi
xor    %esi,%esi
mov    %r14,%rdx
call   1030 <memset@plt>
jmp    115f <xcmalloc+0x2f>
lea    0xea6(%rip),%rdi
call   1050 <fatal@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [34 x i8] c"c_mkdir: virtual memory exhausted\00"
define i8* @xcmalloc(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 = load i8*, i8** %3
%7 = icmp eq i8* %6, null
br i1 %7, label %8, label %10
8: ; preds = %1
%9 = call i32 @fatal(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0))
br label %14
10: ; preds = %1
%11 = load i8*, i8** %3
%12 = load i64, i64* %2
%13 = call i32 @memset(i8* %11, i32 0, i64 %12)
br label %14
14: ; preds = %10, %8
%15 = load i8*, i8** %3
ret i8* %15
}

LLVM IR (-O2):
@.str = [34 x i8] c"c_mkdir: virtual memory exhausted\00"
define i8* @xcmalloc(i64 %0) {
%2 = tail call i8* @malloc(i64 %0)
%3 = icmp eq i8* %2, null
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 @fatal(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0))
br label %8
6: ; preds = %1
%7 = tail call i32 @memset(i8* %2, i32 0, i64 %0)
br label %8
8: ; preds = %6, %4
ret i8* %2
}
/* Variables and functions */
int redirect_stdout_to_file(char *);
int csv_open_report_file(char *path,
                         __attribute__((unused)) void *report_data) {
  return redirect_stdout_to_file(path);
}


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

x86 assembly (clang, -O2):
<csv_open_report_file>:
jmp    1030 <redirect_stdout_to_file@plt>

LLVM IR (-O0):
define i32 @csv_open_report_file(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 = call i32 @redirect_stdout_to_file(i8* %5)
ret i32 %6
}

LLVM IR (-O2):
define i32 @csv_open_report_file(i8* %0, i8* nocapture readnone %1) {
%3 = tail call i32 @redirect_stdout_to_file(i8* %0)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ bounce_east();
int /*<<< orphan*/ bounce_north();
scalar_t__ get_south_penetration();
scalar_t__ get_west_penetration();
void do_south_west(void) {
  if (get_south_penetration() < get_west_penetration())
    bounce_north();
  else
    bounce_east();
}


x86 assembly (clang, -O0):
<do_south_west>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1060 <get_south_penetration@plt>
mov    %rax,-0x8(%rbp)
mov    $0x0,%al
call   1040 <get_west_penetration@plt>
mov    %rax,%rcx
mov    -0x8(%rbp),%rax
cmp    %rcx,%rax
jge    1176 <do_south_west+0x36>
mov    $0x0,%al
call   1030 <bounce_north@plt>
jmp    117d <do_south_west+0x3d>
mov    $0x0,%al
call   1050 <bounce_east@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<do_south_west>:
push   %rbx
xor    %eax,%eax
call   1060 <get_south_penetration@plt>
mov    %rax,%rbx
xor    %eax,%eax
call   1040 <get_west_penetration@plt>
cmp    %rax,%rbx
jge    115f <do_south_west+0x1f>
xor    %eax,%eax
pop    %rbx
jmp    1030 <bounce_north@plt>
xor    %eax,%eax
pop    %rbx
jmp    1050 <bounce_east@plt>

LLVM IR (-O0):
define void @do_south_west() {
%1 = call i64 (...) @get_south_penetration()
%2 = call i64 (...) @get_west_penetration()
%3 = icmp slt i64 %1, %2
br i1 %3, label %4, label %6
4: ; preds = %0
%5 = call i32 (...) @bounce_north()
br label %8
6: ; preds = %0
%7 = call i32 (...) @bounce_east()
br label %8
8: ; preds = %6, %4
ret void
}

LLVM IR (-O2):
define void @do_south_west() {
%1 = tail call i64 (...) @get_south_penetration()
%2 = tail call i64 (...) @get_west_penetration()
%3 = icmp slt i64 %1, %2
br i1 %3, label %4, label %6
4: ; preds = %0
%5 = tail call i32 (...) @bounce_north()
br label %8
6: ; preds = %0
%7 = tail call i32 (...) @bounce_east()
br label %8
8: ; preds = %6, %4
ret void
}
unsigned short int f14(unsigned short int x, unsigned long int y) {
  return (x << y) | (x >> ((-y) & (8 * sizeof(unsigned short) - 1)));
}


x86 assembly (clang, -O0):
<f14>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
mov    %rsi,-0x10(%rbp)
movzwl -0x2(%rbp),%eax
mov    -0x10(%rbp),%rcx
shl    %cl,%eax
movzwl -0x2(%rbp),%edx
xor    %ecx,%ecx
sub    -0x10(%rbp),%rcx
and    $0xf,%rcx
sar    %cl,%edx
mov    %edx,%ecx
or     %ecx,%eax
movzwl %ax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f14>:
mov    %rsi,%rcx
mov    %edi,%eax
shl    %cl,%eax
neg    %cl
and    $0xf,%cl
shr    %cl,%edi
or     %edi,%eax
ret

LLVM IR (-O0):
define zeroext i16 @f14(i16 zeroext %0, i64 %1) {
%3 = alloca i16
%4 = alloca i64
store i16 %0, i16* %3
store i64 %1, i64* %4
%5 = load i16, i16* %3
%6 = zext i16 %5 to i32
%7 = load i64, i64* %4
%8 = trunc i64 %7 to i32
%9 = shl i32 %6, %8
%10 = load i16, i16* %3
%11 = zext i16 %10 to i32
%12 = load i64, i64* %4
%13 = sub i64 0, %12
%14 = and i64 %13, 15
%15 = trunc i64 %14 to i32
%16 = ashr i32 %11, %15
%17 = or i32 %9, %16
%18 = trunc i32 %17 to i16
ret i16 %18
}

LLVM IR (-O2):
define zeroext i16 @f14(i16 zeroext %0, i64 %1) {
%3 = zext i16 %0 to i32
%4 = trunc i64 %1 to i32
%5 = shl i32 %3, %4
%6 = sub i32 0, %4
%7 = and i32 %6, 15
%8 = lshr i32 %3, %7
%9 = or i32 %8, %5
%10 = trunc i32 %9 to i16
ret i16 %10
}
void display_gplnotice(void) {}


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

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

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

LLVM IR (-O2):
define void @display_gplnotice() {
ret void
}
int bnxt_dl_register(struct bnxt *bp) { return 0; }


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

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

LLVM IR (-O0):
%struct.bnxt = type opaque
define i32 @bnxt_dl_register(%struct.bnxt* %0) {
%2 = alloca %struct.bnxt*
store %struct.bnxt* %0, %struct.bnxt** %2
ret i32 0
}

LLVM IR (-O2):
%struct.bnxt = type opaque
define i32 @bnxt_dl_register(%struct.bnxt* nocapture readnone %0) {
ret i32 0
}
double _Complex sub_double_rr(double a, double b) { return a - b; }


x86 assembly (clang, -O0):
<sub_double_rr>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x18(%rbp)
movsd  %xmm1,-0x20(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  -0x20(%rbp),%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x10(%rbp)
movq   $0x0,-0x8(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  -0x8(%rbp),%xmm1
pop    %rbp
ret

x86 assembly (clang, -O2):
<sub_double_rr>:
subsd  %xmm1,%xmm0
xorpd  %xmm1,%xmm1
ret

LLVM IR (-O0):
define { double, double } @sub_double_rr(double %0, double %1) {
%3 = alloca { double, double }
%4 = alloca double
%5 = alloca double
store double %0, double* %4
store double %1, double* %5
%6 = load double, double* %4
%7 = load double, double* %5
%8 = fsub double %6, %7
%9 = getelementptr inbounds { double, double }, { double, double }* %3, i32 0, i32 0
%10 = getelementptr inbounds { double, double }, { double, double }* %3, i32 0, i32 1
store double %8, double* %9
store double 0.000000e+00, double* %10
%11 = load { double, double }, { double, double }* %3
ret { double, double } %11
}

LLVM IR (-O2):
define { double, double } @sub_double_rr(double %0, double %1) {
%3 = fsub double %0, %1
%4 = insertvalue { double, double } poison, double %3, 0
%5 = insertvalue { double, double } %4, double 0.000000e+00, 1
ret { double, double } %5
}
unsigned short intel_cpu_model() {
  unsigned long eax, unused;
  unsigned short model;
  __asm__("cpuid"
          : "=a"(eax), "=b"(unused), "=c"(unused), "=d"(unused)
          : "a"(1));
  ;
  model = (eax >> 4) & 0xf;
  return model;
}


x86 assembly (clang, -O0):
<intel_cpu_model>:
push   %rbp
mov    %rsp,%rbp
push   %rbx
mov    $0x1,%eax
cpuid
mov    %rax,-0x10(%rbp)
mov    %rbx,-0x18(%rbp)
mov    %rcx,-0x18(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x10(%rbp),%rax
shr    $0x4,%rax
and    $0xf,%rax
mov    %ax,-0x1a(%rbp)
movzwl -0x1a(%rbp),%eax
pop    %rbx
pop    %rbp
ret

x86 assembly (clang, -O2):
<intel_cpu_model>:
push   %rbx
mov    $0x1,%eax
cpuid
shr    $0x4,%eax
and    $0xf,%eax
pop    %rbx
ret

LLVM IR (-O0):
define zeroext i16 @intel_cpu_model() {
%1 = alloca i64
%2 = alloca i64
%3 = alloca i16
%4 = call { i64, i64, i64, i64 } asm "cpuid", "={ax},={bx},={cx},={dx},{ax},~{dirflag},~{fpsr},~{flags}"(i32 1)
%5 = extractvalue { i64, i64, i64, i64 } %4, 0
%6 = extractvalue { i64, i64, i64, i64 } %4, 1
%7 = extractvalue { i64, i64, i64, i64 } %4, 2
%8 = extractvalue { i64, i64, i64, i64 } %4, 3
store i64 %5, i64* %1
store i64 %6, i64* %2
store i64 %7, i64* %2
store i64 %8, i64* %2
%9 = load i64, i64* %1
%10 = lshr i64 %9, 4
%11 = and i64 %10, 15
%12 = trunc i64 %11 to i16
store i16 %12, i16* %3
%13 = load i16, i16* %3
ret i16 %13
}

LLVM IR (-O2):
define zeroext i16 @intel_cpu_model() {
%1 = tail call { i64, i64, i64, i64 } asm "cpuid", "={ax},={bx},={cx},={dx},{ax},~{dirflag},~{fpsr},~{flags}"(i32 1)
%2 = extractvalue { i64, i64, i64, i64 } %1, 0
%3 = trunc i64 %2 to i16
%4 = lshr i16 %3, 4
%5 = and i16 %4, 15
ret i16 %5
}
int negate(int orinNub) { return -orinNub; }


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

x86 assembly (clang, -O2):
<negate>:
mov    %edi,%eax
neg    %eax
ret

LLVM IR (-O0):
define i32 @negate(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = sub nsw i32 0, %3
ret i32 %4
}

LLVM IR (-O2):
define i32 @negate(i32 %0) {
%2 = sub nsw i32 0, %0
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *, char *);
void ok() { printf("%s [ OK ]%s\n", "\033[1;32m", "\033[0m"); }


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

x86 assembly (clang, -O2):
<ok>:
lea    0xee9(%rip),%rdi
lea    0xeef(%rip),%rsi
lea    0xef0(%rip),%rdx
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [13 x i8] c"%s [ OK ]%s\0A\00"
@.str.1 = [8 x i8] c"\1B[1;32m\00"
@.str.2 = [5 x i8] c"\1B[0m\00"
define void @ok() {
%1 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [13 x i8] c"%s [ OK ]%s\0A\00"
@.str.1 = [8 x i8] c"\1B[1;32m\00"
@.str.2 = [5 x i8] c"\1B[0m\00"
define void @ok() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ test_str_split();
void test_utils() {
  printf("\n");
  printf("######################\n");
  printf("### Testing utils/ ###\n");
  printf("######################\n\n");
  test_str_split();
}


x86 assembly (clang, -O0):
<test_utils>:
push   %rbp
mov    %rsp,%rbp
lea    0xf1c(%rip),%rdi
call   1030 <printf@plt>
lea    0xec9(%rip),%rdi
call   1030 <printf@plt>
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
lea    0xee1(%rip),%rdi
call   1030 <printf@plt>
mov    $0x0,%al
call   1040 <test_str_split@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_utils>:
push   %rax
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xebe(%rip),%rdi
call   1040 <puts@plt>
lea    0xec9(%rip),%rdi
call   1040 <puts@plt>
lea    0xed4(%rip),%rdi
call   1040 <puts@plt>
xor    %eax,%eax
pop    %rcx
jmp    1050 <test_str_split@plt>

LLVM IR (-O0):
@.str = [2 x i8] c"\0A\00"
@.str.1 = [24 x i8] c"######################\0A\00"
@.str.2 = [24 x i8] c"### Testing utils/ ###\0A\00"
@.str.3 = [25 x i8] c"######################\0A\0A\00"
define void @test_utils() {
%1 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.2, i64 0, i64 0))
%4 = call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.3, i64 0, i64 0))
%5 = call i32 (...) @test_str_split()
ret void
}

LLVM IR (-O2):
@str = [23 x i8] c"######################\00"
@str.4 = [23 x i8] c"### Testing utils/ ###\00"
@str.5 = [24 x i8] c"######################\0A\00"
define void @test_utils() {
%1 = tail call i32 @putchar(i32 10)
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @str, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @str.4, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @str.5, i64 0, i64 0))
%5 = tail call i32 (...) @test_str_split()
ret void
}
void WRMSR() {}


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

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

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

LLVM IR (-O2):
define void @WRMSR() {
ret void
}
XDestroyRegion() {}


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

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

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

LLVM IR (-O2):
define i32 @XDestroyRegion() {
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ ass_tk(int);
int /*<<< orphan*/ pr_token(int);
int /*<<< orphan*/ sendtype(int);
void pr_tocs() {
  ass_tk(20);
  sendtype(7);
  pr_token(20);
}


x86 assembly (clang, -O0):
<pr_tocs>:
push   %rbp
mov    %rsp,%rbp
mov    $0x14,%edi
call   1030 <ass_tk@plt>
mov    $0x7,%edi
call   1050 <sendtype@plt>
mov    $0x14,%edi
call   1040 <pr_token@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<pr_tocs>:
push   %rax
mov    $0x14,%edi
call   1030 <ass_tk@plt>
mov    $0x7,%edi
call   1050 <sendtype@plt>
mov    $0x14,%edi
pop    %rax
jmp    1040 <pr_token@plt>

LLVM IR (-O0):
define void @pr_tocs() {
%1 = call i32 @ass_tk(i32 20)
%2 = call i32 @sendtype(i32 7)
%3 = call i32 @pr_token(i32 20)
ret void
}

LLVM IR (-O2):
define void @pr_tocs() {
%1 = tail call i32 @ass_tk(i32 20)
%2 = tail call i32 @sendtype(i32 7)
%3 = tail call i32 @pr_token(i32 20)
ret void
}
void x87_reset() {}


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

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

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

LLVM IR (-O2):
define void @x87_reset() {
ret void
}
/* Variables and functions */
scalar_t__ foo();
int fn10(void) {
  if (foo())
    return 1732984;
  else if (foo())
    return 18409;
  return 0;
}


x86 assembly (clang, -O0):
<fn10>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <foo@plt>
cmp    $0x0,%rax
je     1135 <fn10+0x25>
movl   $0x1a7178,-0x4(%rbp)
jmp    115e <fn10+0x4e>
mov    $0x0,%al
call   1030 <foo@plt>
cmp    $0x0,%rax
je     1152 <fn10+0x42>
movl   $0x47e9,-0x4(%rbp)
jmp    115e <fn10+0x4e>
jmp    1157 <fn10+0x47>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fn10>:
push   %rbx
xor    %ebx,%ebx
xor    %eax,%eax
call   1030 <foo@plt>
mov    %rax,%rcx
mov    $0x1a7178,%eax
test   %rcx,%rcx
je     1129 <fn10+0x19>
pop    %rbx
ret
xor    %eax,%eax
call   1030 <foo@plt>
test   %rax,%rax
mov    $0x47e9,%eax
cmove  %ebx,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @fn10() {
%1 = tail call i64 (...) @foo()
%2 = icmp eq i64 %1, 0
br i1 %2, label %3, label %7
3: ; preds = %0
%4 = tail call i64 (...) @foo()
%5 = icmp eq i64 %4, 0
%6 = select i1 %5, i32 0, i32 18409
br label %7
7: ; preds = %3, %0
%8 = phi i32 [ 1732984, %0 ], [ %6, %3 ]
ret i32 %8
}
unsigned short U2(unsigned char *p) {
  unsigned char b[2];
  b[0] = p[1];
  b[1] = p[0];
  return *(unsigned short *)b;
}


x86 assembly (clang, -O0):
<U2>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    0x1(%rax),%al
mov    %al,-0xa(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%al
mov    %al,-0x9(%rbp)
movzwl -0xa(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<U2>:
movzwl (%rdi),%eax
rol    $0x8,%ax
ret

LLVM IR (-O0):
define zeroext i16 @U2(i8* %0) {
%2 = alloca i8*
%3 = alloca [2 x i8]
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = getelementptr inbounds i8, i8* %4, i64 1
%6 = load i8, i8* %5
%7 = getelementptr inbounds [2 x i8], [2 x i8]* %3, i64 0, i64 0
store i8 %6, i8* %7
%8 = load i8*, i8** %2
%9 = getelementptr inbounds i8, i8* %8, i64 0
%10 = load i8, i8* %9
%11 = getelementptr inbounds [2 x i8], [2 x i8]* %3, i64 0, i64 1
store i8 %10, i8* %11
%12 = getelementptr inbounds [2 x i8], [2 x i8]* %3, i64 0, i64 0
%13 = bitcast i8* %12 to i16*
%14 = load i16, i16* %13
ret i16 %14
}

LLVM IR (-O2):
define zeroext i16 @U2(i8* nocapture %0) {
%2 = getelementptr inbounds i8, i8* %0, i64 1
%3 = load i8, i8* %2
%4 = load i8, i8* %0
%5 = zext i8 %4 to i16
%6 = shl nuw i16 %5, 8
%7 = zext i8 %3 to i16
%8 = or i16 %6, %7
ret i16 %8
}
adr0reg1(r0, r1, x0, x1, p0, p1) double r0, r1;
double *p0, *p1;
{
  if ((*((double *)10000000)) <= r1)
    return 1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<adr0reg1>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x10(%rbp)
movsd  %xmm1,-0x18(%rbp)
mov    %edi,-0x1c(%rbp)
mov    %esi,-0x20(%rbp)
mov    %rdx,-0x28(%rbp)
mov    %rcx,-0x30(%rbp)
mov    $0x989680,%eax
movsd  (%rax),%xmm1
movsd  -0x18(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jb     1140 <adr0reg1+0x40>
movl   $0x1,-0x4(%rbp)
jmp    1147 <adr0reg1+0x47>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<adr0reg1>:
xor    %eax,%eax
ucomisd 0x989680,%xmm1
setae  %al
ret

LLVM IR (-O0):
define i32 @adr0reg1(double %0, double %1, i32 %2, i32 %3, double* %4, double* %5) {
%7 = alloca i32
%8 = alloca double
%9 = alloca double
%10 = alloca i32
%11 = alloca i32
%12 = alloca double*
%13 = alloca double*
store double %0, double* %8
store double %1, double* %9
store i32 %2, i32* %10
store i32 %3, i32* %11
store double* %4, double** %12
store double* %5, double** %13
%14 = load double, double* inttoptr (i64 10000000 to double*)
%15 = load double, double* %9
%16 = fcmp ole double %14, %15
br i1 %16, label %17, label %18
17: ; preds = %6
store i32 1, i32* %7
br label %19
18: ; preds = %6
store i32 0, i32* %7
br label %19
19: ; preds = %18, %17
%20 = load i32, i32* %7
ret i32 %20
}

LLVM IR (-O2):
define i32 @adr0reg1(double %0, double %1, i32 %2, i32 %3, double* nocapture readnone %4, double* nocapture readnone %5) {
%7 = load double, double* inttoptr (i64 10000000 to double*)
%8 = fcmp ole double %7, %1
%9 = zext i1 %8 to i32
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ Encoder_Reset();
int /*<<< orphan*/ TIM4_Init(int);
void Encoder_Init(void) {
  TIM4_Init(360);
  Encoder_Reset();
}


x86 assembly (clang, -O0):
<Encoder_Init>:
push   %rbp
mov    %rsp,%rbp
mov    $0x168,%edi
call   1030 <TIM4_Init@plt>
mov    $0x0,%al
call   1040 <Encoder_Reset@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<Encoder_Init>:
push   %rax
mov    $0x168,%edi
call   1030 <TIM4_Init@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <Encoder_Reset@plt>

LLVM IR (-O0):
define void @Encoder_Init() {
%1 = call i32 @TIM4_Init(i32 360)
%2 = call i32 (...) @Encoder_Reset()
ret void
}

LLVM IR (-O2):
define void @Encoder_Init() {
%1 = tail call i32 @TIM4_Init(i32 360)
%2 = tail call i32 (...) @Encoder_Reset()
ret void
}
int f(int d, int e) {
  if (e > 0)
    return f(d, e - 1) + f(d, e - 1);
  else
    return d;
}


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jle    1156 <f+0x46>
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
sub    $0x1,%esi
call   1030 <f@plt>
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
sub    $0x1,%esi
call   1030 <f@plt>
mov    %eax,%ecx
mov    -0x10(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x4(%rbp)
jmp    115c <f+0x4c>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f>:
mov    %edi,%eax
test   %esi,%esi
jle    1127 <f+0x17>
push   %rax
add    $0xffffffff,%esi
mov    %eax,%edi
call   1030 <f@plt>
add    %eax,%eax
add    $0x8,%rsp
ret

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

LLVM IR (-O2):
define i32 @f(i32 %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %6, label %4
4: ; preds = %2, %6
%5 = phi i32 [ %9, %6 ], [ %0, %2 ]
ret i32 %5
6: ; preds = %2
%7 = add nsw i32 %1, -1
%8 = tail call i32 @f(i32 %0, i32 %7)
%9 = shl nsw i32 %8, 1
br label %4
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
scalar_t__ strcmp(char *, char *);
unsigned long strtoul(char *, char **, int);
int main() {
  char *e;
  unsigned long v = strtoul("DEADFACEgibberish", &e, 16);
  if (v != 0xDEADFACEL || strcmp(e, "gibberish"))
    exit(1);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
lea    -0x10(%rbp),%rsi
mov    $0x10,%edx
call   1040 <strtoul@plt>
mov    %rax,-0x18(%rbp)
mov    $0xdeadface,%eax
cmp    %rax,-0x18(%rbp)
jne    1181 <main+0x51>
mov    -0x10(%rbp),%rdi
lea    0xe96(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
je     118b <main+0x5b>
mov    $0x1,%edi
call   1050 <exit@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xec8(%rip),%rdi
mov    %rsp,%rsi
mov    $0x10,%edx
call   1040 <strtoul@plt>
mov    $0xdeadface,%ecx
cmp    %rcx,%rax
jne    1168 <main+0x38>
mov    (%rsp),%rdi
lea    0xeae(%rip),%rsi
call   1030 <strcmp@plt>
test   %rax,%rax
jne    1168 <main+0x38>
xor    %eax,%eax
pop    %rcx
ret
mov    $0x1,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [18 x i8] c"DEADFACEgibberish\00"
@.str.1 = [10 x i8] c"gibberish\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8*
%3 = alloca i64
store i32 0, i32* %1
%4 = call i64 @strtoul(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i8** %2, i32 16)
store i64 %4, i64* %3
%5 = load i64, i64* %3
%6 = icmp ne i64 %5, 3735943886
br i1 %6, label %11, label %7
7: ; preds = %0
%8 = load i8*, i8** %2
%9 = call i64 @strcmp(i8* %8, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0))
%10 = icmp ne i64 %9, 0
br i1 %10, label %11, label %13
11: ; preds = %7, %0
%12 = call i32 @exit(i32 1)
unreachable
13: ; preds = %7
ret i32 0
}

LLVM IR (-O2):
@.str = [18 x i8] c"DEADFACEgibberish\00"
@.str.1 = [10 x i8] c"gibberish\00"
define i32 @main() {
%1 = alloca i8*
%2 = bitcast i8** %1 to i8*
%3 = call i64 @strtoul(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i8** %1, i32 16)
%4 = icmp eq i64 %3, 3735943886
br i1 %4, label %5, label %9
5: ; preds = %0
%6 = load i8*, i8** %1
%7 = tail call i64 @strcmp(i8* %6, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0))
%8 = icmp eq i64 %7, 0
br i1 %8, label %11, label %9
9: ; preds = %5, %0
%10 = tail call i32 @exit(i32 1)
unreachable
11: ; preds = %5
ret i32 0
}
/* Type definitions */
typedef int u_int32_t;
typedef int u_char;

/* Variables and functions */
u_int32_t sum_hash(u_char c, u_int32_t h) {
  h *= 0x01000193;
  h ^= c;
  return h;
}


x86 assembly (clang, -O0):
<sum_hash>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
imul   $0x1000193,-0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
xor    -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<sum_hash>:
imul   $0x1000193,%esi,%eax
xor    %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @sum_hash(i32 %0, i32 %1) {
%3 = mul nsw i32 %1, 16777619
%4 = xor i32 %3, %0
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ delay(int);
int /*<<< orphan*/ mbus_remote_register_write(int, int, int);
void pmu_adc_reset_setting() {
  mbus_remote_register_write(0x8, 0x3C,
                             ((1 << 0) | (1 << 1) | (1 << 2) | (1 << 3) |
                              (1 << 4) | (1 << 5) | (1 << 6) | (1 << 7) |
                              (1 << 8) | (1 << 9) | (1 << 10) | (0 << 11) |
                              (0 << 12) | (0 << 13) | (1 << 14) | (1 << 15) |
                              (1 << 16) | (1 << 17) | (1 << 18) | (1 << 19)));
  delay(200);
}


x86 assembly (clang, -O0):
<pmu_adc_reset_setting>:
push   %rbp
mov    %rsp,%rbp
mov    $0x8,%edi
mov    $0x3c,%esi
mov    $0xfc7ff,%edx
call   1040 <mbus_remote_register_write@plt>
mov    $0xc8,%edi
call   1030 <delay@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<pmu_adc_reset_setting>:
push   %rax
mov    $0x8,%edi
mov    $0x3c,%esi
mov    $0xfc7ff,%edx
call   1040 <mbus_remote_register_write@plt>
mov    $0xc8,%edi
pop    %rax
jmp    1030 <delay@plt>

LLVM IR (-O0):
define void @pmu_adc_reset_setting() {
%1 = call i32 @mbus_remote_register_write(i32 8, i32 60, i32 1034239)
%2 = call i32 @delay(i32 200)
ret void
}

LLVM IR (-O2):
define void @pmu_adc_reset_setting() {
%1 = tail call i32 @mbus_remote_register_write(i32 8, i32 60, i32 1034239)
%2 = tail call i32 @delay(i32 200)
ret void
}
int test_imm_B3uint8_reg(unsigned char val) {
  return ((val) & (0xB3 << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_B3uint8_reg(i8 zeroext %0) {
%2 = and i8 %0, -77
%3 = icmp eq i8 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Type definitions */
struct request {
  int dummy;
};
typedef int /*<<< orphan*/ pthread_mutex_t;
typedef int /*<<< orphan*/ pthread_cond_t;

/* Variables and functions */
void add_request(int request_num, pthread_mutex_t *p_mutex,
                 pthread_cond_t *p_cond_var) {
  int rc;
  struct request *a_request;
}


x86 assembly (clang, -O0):
<add_request>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.request = type { i32 }
define void @add_request(i32 %0, i32* %1, i32* %2) {
%4 = alloca i32
%5 = alloca i32*
%6 = alloca i32*
%7 = alloca i32
%8 = alloca %struct.request*
store i32 %0, i32* %4
store i32* %1, i32** %5
store i32* %2, i32** %6
ret void
}

LLVM IR (-O2):
%struct.request = type { i32 }
define void @add_request(i32 %0, i32* nocapture %1, i32* nocapture %2) {
ret void
}
int b_twist_d_on_midperm(mperm)
int mperm;
{ return mperm; }


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

x86 assembly (clang, -O2):
<b_twist_d_on_midperm>:
mov    %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @b_twist_d_on_midperm(i32 returned %0) {
ret i32 %0
}