xunge/DecIR huggingface dataset:
/* Variables and functions */
int is_set(int, int);
int contains(int *set, int x) {
  int d = x >> 5;
  return is_set(set[d], x - (d << 5));
}


x86 assembly (clang, -O0):
<contains>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
sar    $0x5,%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,4),%edi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%eax
shl    $0x5,%eax
sub    %eax,%esi
call   1030 <is_set@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<contains>:
mov    %esi,%eax
sar    $0x5,%eax
cltq
mov    (%rdi,%rax,4),%edi
and    $0x1f,%esi
jmp    1030 <is_set@plt>

LLVM IR (-O0):
define i32 @contains(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
%5 = alloca i32
store i32* %0, i32** %3
store i32 %1, i32* %4
%6 = load i32, i32* %4
%7 = ashr i32 %6, 5
store i32 %7, i32* %5
%8 = load i32*, i32** %3
%9 = load i32, i32* %5
%10 = sext i32 %9 to i64
%11 = getelementptr inbounds i32, i32* %8, i64 %10
%12 = load i32, i32* %11
%13 = load i32, i32* %4
%14 = load i32, i32* %5
%15 = shl i32 %14, 5
%16 = sub nsw i32 %13, %15
%17 = call i32 @is_set(i32 %12, i32 %16)
ret i32 %17
}

LLVM IR (-O2):
define i32 @contains(i32* nocapture %0, i32 %1) {
%3 = ashr i32 %1, 5
%4 = sext i32 %3 to i64
%5 = getelementptr inbounds i32, i32* %0, i64 %4
%6 = load i32, i32* %5
%7 = and i32 %1, 31
%8 = tail call i32 @is_set(i32 %6, i32 %7)
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ register_hdrv_function_list();
void hdrv_init() { register_hdrv_function_list(); }


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

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

LLVM IR (-O0):
define void @hdrv_init() {
%1 = call i32 (...) @register_hdrv_function_list()
ret void
}

LLVM IR (-O2):
define void @hdrv_init() {
%1 = tail call i32 (...) @register_hdrv_function_list()
ret void
}
/* Type definitions */
struct user_info {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ response_xcgi_get(struct user_info *);
void response_xcgi_post(struct user_info *new_user) {
  response_xcgi_get(new_user);
  return;
}


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

x86 assembly (clang, -O2):
<response_xcgi_post>:
jmp    1030 <response_xcgi_get@plt>

LLVM IR (-O0):
%struct.user_info = type { i32 }
define void @response_xcgi_post(%struct.user_info* %0) {
%2 = alloca %struct.user_info*
store %struct.user_info* %0, %struct.user_info** %2
%3 = load %struct.user_info*, %struct.user_info** %2
%4 = call i32 @response_xcgi_get(%struct.user_info* %3)
ret void
}

LLVM IR (-O2):
%struct.user_info = type { i32 }
define void @response_xcgi_post(%struct.user_info* %0) {
%2 = tail call i32 @response_xcgi_get(%struct.user_info* %0)
ret void
}
int check_prime(int num) {
  for (int i = 2; i <= num; i++) {
    if ((num % i == 0) && (i != num)) {
      return 0;
    }
    if (i == num) {
      return 1;
    }
  }
}


x86 assembly (clang, -O0):
<check_prime>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
movl   $0x2,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
jg     116d <check_prime+0x6d>
mov    -0x8(%rbp),%eax
cltd
idivl  -0xc(%rbp)
cmp    $0x0,%edx
jne    1142 <check_prime+0x42>
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
je     1142 <check_prime+0x42>
movl   $0x0,-0x4(%rbp)
jmp    116d <check_prime+0x6d>
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
jne    115a <check_prime+0x5a>
movl   $0x1,-0x4(%rbp)
jmp    116d <check_prime+0x6d>
jmp    115f <check_prime+0x5f>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    110e <check_prime+0xe>
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<check_prime>:
cmp    $0x2,%edi
jl     1131 <check_prime+0x31>
mov    $0x2,%eax
nopw   0x0(%rax,%rax,1)
mov    %eax,%ecx
mov    %edi,%eax
cltd
idiv   %ecx
cmp    %ecx,%edi
je     1122 <check_prime+0x22>
lea    0x1(%rcx),%eax
test   %edx,%edx
jne    1110 <check_prime+0x10>
cmp    %ecx,%edi
sete   %al
test   %edx,%edx
setne  %cl
or     %al,%cl
movzbl %cl,%eax
ret

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

LLVM IR (-O2):
define i32 @check_prime(i32 %0) {
%2 = icmp slt i32 %0, 2
br i1 %2, label %14, label %3
3: ; preds = %1, %3
%4 = phi i32 [ %10, %3 ], [ 2, %1 ]
%5 = srem i32 %0, %4
%6 = icmp ne i32 %5, 0
%7 = icmp eq i32 %4, %0
%8 = xor i1 %6, true
%9 = or i1 %7, %8
%10 = add nuw i32 %4, 1
br i1 %9, label %11, label %3
11: ; preds = %3
%12 = or i1 %7, %6
%13 = zext i1 %12 to i32
br label %14
14: ; preds = %1, %11
%15 = phi i32 [ %13, %11 ], [ undef, %1 ]
ret i32 %15
}
/* Variables and functions */
int /*<<< orphan*/ japi_show(int);
void j_show(int arg0) { japi_show(arg0); }


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

x86 assembly (clang, -O2):
<j_show>:
jmp    1030 <japi_show@plt>

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

LLVM IR (-O2):
define void @j_show(i32 %0) {
%2 = tail call i32 @japi_show(i32 %0)
ret void
}
/* Variables and functions */
int add_nums32(unsigned int, unsigned int);
int add_nums64(unsigned long long, unsigned long long);
int /*<<< orphan*/ printf(char *, unsigned long long, unsigned long long, int);
int main() {
  printf("%u + %u = %u\n", 12U, 30U, add_nums32(12U, 30U));
  printf("%llu + %llu = %llu\n", 12ULL, 30ULL, add_nums64(12ULL, 30ULL));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0xc,%edi
mov    $0x1e,%esi
call   1040 <add_nums32@plt>
mov    %eax,%ecx
lea    0xea9(%rip),%rdi
mov    $0xc,%esi
mov    $0x1e,%edx
call   1030 <printf@plt>
mov    $0xc,%edi
mov    $0x1e,%esi
call   1050 <add_nums64@plt>
mov    %eax,%ecx
lea    0xe90(%rip),%rdi
mov    $0xc,%esi
mov    $0x1e,%edx
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0xc,%edi
mov    $0x1e,%esi
call   1040 <add_nums32@plt>
lea    0xeb9(%rip),%rdi
mov    $0xc,%esi
mov    $0x1e,%edx
mov    %eax,%ecx
call   1030 <printf@plt>
mov    $0xc,%edi
mov    $0x1e,%esi
call   1050 <add_nums64@plt>
lea    0xea0(%rip),%rdi
mov    $0xc,%esi
mov    $0x1e,%edx
mov    %eax,%ecx
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [14 x i8] c"%u + %u = %u\0A\00"
@.str.1 = [20 x i8] c"%llu + %llu = %llu\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @add_nums32(i32 12, i32 30)
%3 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i64 12, i64 30, i32 %2)
%4 = call i32 @add_nums64(i64 12, i64 30)
%5 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0), i64 12, i64 30, i32 %4)
ret i32 0
}

LLVM IR (-O2):
@.str = [14 x i8] c"%u + %u = %u\0A\00"
@.str.1 = [20 x i8] c"%llu + %llu = %llu\0A\00"
define i32 @main() {
%1 = tail call i32 @add_nums32(i32 12, i32 30)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i64 12, i64 30, i32 %1)
%3 = tail call i32 @add_nums64(i64 12, i64 30)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0), i64 12, i64 30, i32 %3)
ret i32 0
}
/* Variables and functions */
int BUFSIZ;
int /*<<< orphan*/ fflush(int /*<<< orphan*/);
int /*<<< orphan*/ puts(char *);
int /*<<< orphan*/ setbuf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stdout;
void setbuf_t() {
  char buf[BUFSIZ];
  setbuf(stdout, buf);
  puts("This is tutorialspoint from setbuf");
  fflush(stdout);
}


x86 assembly (clang, -O0):
<setbuf_t>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0x2ea1(%rip),%rax
mov    (%rax),%eax
mov    %rsp,%rcx
mov    %rcx,-0x8(%rbp)
mov    %rax,%rcx
add    $0xf,%rcx
and    $0xfffffffffffffff0,%rcx
mov    %rsp,%rsi
sub    %rcx,%rsi
mov    %rsi,%rsp
mov    %rax,-0x10(%rbp)
mov    0x2e71(%rip),%rax
mov    (%rax),%edi
call   1040 <setbuf@plt>
lea    0xe8b(%rip),%rdi
call   1030 <puts@plt>
mov    0x2e57(%rip),%rax
mov    (%rax),%edi
call   1050 <fflush@plt>
mov    -0x8(%rbp),%rax
mov    %rax,%rsp
mov    %rbp,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<setbuf_t>:
push   %rbp
mov    %rsp,%rbp
push   %rbx
push   %rax
mov    0x2ea3(%rip),%rax
mov    (%rax),%eax
mov    %rsp,%rsi
add    $0xf,%rax
and    $0xfffffffffffffff0,%rax
sub    %rax,%rsi
mov    %rsi,%rsp
mov    0x2e81(%rip),%rbx
mov    (%rbx),%edi
call   1040 <setbuf@plt>
lea    0xe9b(%rip),%rdi
call   1030 <puts@plt>
mov    (%rbx),%edi
call   1050 <fflush@plt>
lea    -0x8(%rbp),%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@BUFSIZ = global i32 0
@stdout = global i32 0
@.str = [35 x i8] c"This is tutorialspoint from setbuf\00"
define void @setbuf_t() {
%1 = alloca i8*
%2 = alloca i64
%3 = load i32, i32* @BUFSIZ
%4 = zext i32 %3 to i64
%5 = call i8* @llvm.stacksave()
store i8* %5, i8** %1
%6 = alloca i8, i64 %4
store i64 %4, i64* %2
%7 = load i32, i32* @stdout
%8 = call i32 @setbuf(i32 %7, i8* %6)
%9 = call i32 @puts(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0))
%10 = load i32, i32* @stdout
%11 = call i32 @fflush(i32 %10)
%12 = load i8*, i8** %1
ret void
}

LLVM IR (-O2):
@BUFSIZ = global i32 0
@stdout = global i32 0
@.str = [35 x i8] c"This is tutorialspoint from setbuf\00"
define void @setbuf_t() {
%1 = load i32, i32* @BUFSIZ
%2 = zext i32 %1 to i64
%3 = alloca i8, i64 %2
%4 = load i32, i32* @stdout
%5 = call i32 @setbuf(i32 %4, i8* %3)
%6 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0))
%7 = load i32, i32* @stdout
%8 = call i32 @fflush(i32 %7)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
void main_term(int sig) {
  exit(0);
  return;
}


x86 assembly (clang, -O0):
<main_term>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
xor    %edi,%edi
call   1030 <exit@plt>

x86 assembly (clang, -O2):
<main_term>:
push   %rax
xor    %edi,%edi
call   1030 <exit@plt>

LLVM IR (-O0):
define void @main_term(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
define void @main_term(i32 %0) {
%2 = tail call i32 @exit(i32 0)
unreachable
}
int function_with_really_long_name(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @function_with_really_long_name() {
ret i32 0
}
void symbolmap_nuke(const void *k, const void *v, void *d) {}


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

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

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

LLVM IR (-O2):
define void @symbolmap_nuke(i8* nocapture %0, i8* nocapture %1, i8* nocapture %2) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, int *, int *);
int somar(int, int);
int main() {
  int x, y;
  printf("Informe os valores: ");
  scanf("%d%d", &x, &y);
  int s = somar(x, y);
  printf("%d\n", s);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xec1(%rip),%rdi
lea    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdx
call   1040 <scanf@plt>
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
call   1050 <somar@plt>
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%esi
lea    0xea1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xec8(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xecf(%rip),%rdi
lea    0x4(%rsp),%rsi
mov    %rsp,%rdx
call   1040 <scanf@plt>
mov    0x4(%rsp),%edi
mov    (%rsp),%esi
call   1050 <somar@plt>
lea    0xeb4(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [21 x i8] c"Informe os valores: \00"
@.str.1 = [5 x i8] c"%d%d\00"
@.str.2 = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 0, i32* %1
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
%6 = call i32 @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32* %2, i32* %3)
%7 = load i32, i32* %2
%8 = load i32, i32* %3
%9 = call i32 @somar(i32 %7, i32 %8)
store i32 %9, i32* %4
%10 = load i32, i32* %4
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 %10)
ret i32 0
}

LLVM IR (-O2):
@.str = [21 x i8] c"Informe os valores: \00"
@.str.1 = [5 x i8] c"%d%d\00"
@.str.2 = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = bitcast i32* %1 to i8*
%4 = bitcast i32* %2 to i8*
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
%6 = call i32 @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32* %1, i32* %2)
%7 = load i32, i32* %1
%8 = load i32, i32* %2
%9 = call i32 @somar(i32 %7, i32 %8)
%10 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 %9)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ test_generate_cardinality_sequence_function_helper(int);
void test_generate_cardinality_sequence_function(void) {
  int i = 0;
  for (i = 1; i <= 6; i++) {
    test_generate_cardinality_sequence_function_helper(i);
  }
  return;
}


x86 assembly (clang, -O0):
<test_generate_cardinality_sequence_function>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x4(%rbp)
cmpl   $0x6,-0x4(%rbp)
jg     1146 <test_generate_cardinality_sequence_function+0x36>
mov    -0x4(%rbp),%edi
call   1030 <test_generate_cardinality_sequence_function_helper@plt>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    1126 <test_generate_cardinality_sequence_function+0x16>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_generate_cardinality_sequence_function>:
push   %rax
mov    $0x1,%edi
call   1030 <test_generate_cardinality_sequence_function_helper@plt>
mov    $0x2,%edi
call   1030 <test_generate_cardinality_sequence_function_helper@plt>
mov    $0x3,%edi
call   1030 <test_generate_cardinality_sequence_function_helper@plt>
mov    $0x4,%edi
call   1030 <test_generate_cardinality_sequence_function_helper@plt>
mov    $0x5,%edi
call   1030 <test_generate_cardinality_sequence_function_helper@plt>
mov    $0x6,%edi
pop    %rax
jmp    1030 <test_generate_cardinality_sequence_function_helper@plt>

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

LLVM IR (-O2):
define void @test_generate_cardinality_sequence_function() {
%1 = tail call i32 @test_generate_cardinality_sequence_function_helper(i32 1)
%2 = tail call i32 @test_generate_cardinality_sequence_function_helper(i32 2)
%3 = tail call i32 @test_generate_cardinality_sequence_function_helper(i32 3)
%4 = tail call i32 @test_generate_cardinality_sequence_function_helper(i32 4)
%5 = tail call i32 @test_generate_cardinality_sequence_function_helper(i32 5)
%6 = tail call i32 @test_generate_cardinality_sequence_function_helper(i32 6)
ret void
}
char encoderfn_pet(char byte) {
  if ((byte >= 'A') && (byte <= 'Z'))
    return (char)(byte | 0x80);
  if ((byte >= 'a') && (byte <= 'z'))
    return (char)(byte - 32);
  return byte;
}


x86 assembly (clang, -O0):
<encoderfn_pet>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x2(%rbp)
movsbl -0x2(%rbp),%eax
cmp    $0x41,%eax
jl     1135 <encoderfn_pet+0x35>
movsbl -0x2(%rbp),%eax
cmp    $0x5a,%eax
jg     1135 <encoderfn_pet+0x35>
movsbl -0x2(%rbp),%eax
or     $0x80,%eax
mov    %al,-0x1(%rbp)
jmp    1164 <encoderfn_pet+0x64>
movsbl -0x2(%rbp),%eax
cmp    $0x61,%eax
jl     115e <encoderfn_pet+0x5e>
movsbl -0x2(%rbp),%eax
cmp    $0x7a,%eax
jg     115e <encoderfn_pet+0x5e>
movsbl -0x2(%rbp),%eax
sub    $0x20,%eax
mov    %al,-0x1(%rbp)
jmp    1164 <encoderfn_pet+0x64>
mov    -0x2(%rbp),%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<encoderfn_pet>:
mov    %edi,%eax
lea    -0x41(%rax),%ecx
cmp    $0x19,%cl
ja     110d <encoderfn_pet+0xd>
or     $0x80,%al
ret
lea    -0x61(%rax),%ecx
lea    -0x20(%rax),%edx
cmp    $0x1a,%cl
movzbl %al,%ecx
movzbl %dl,%eax
cmovae %ecx,%eax
ret

LLVM IR (-O0):
define signext i8 @encoderfn_pet(i8 signext %0) {
%2 = alloca i8
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
%6 = icmp sge i32 %5, 65
br i1 %6, label %7, label %16
7: ; preds = %1
%8 = load i8, i8* %3
%9 = sext i8 %8 to i32
%10 = icmp sle i32 %9, 90
br i1 %10, label %11, label %16
11: ; preds = %7
%12 = load i8, i8* %3
%13 = sext i8 %12 to i32
%14 = or i32 %13, 128
%15 = trunc i32 %14 to i8
store i8 %15, i8* %2
br label %31
16: ; preds = %7, %1
%17 = load i8, i8* %3
%18 = sext i8 %17 to i32
%19 = icmp sge i32 %18, 97
br i1 %19, label %20, label %29
20: ; preds = %16
%21 = load i8, i8* %3
%22 = sext i8 %21 to i32
%23 = icmp sle i32 %22, 122
br i1 %23, label %24, label %29
24: ; preds = %20
%25 = load i8, i8* %3
%26 = sext i8 %25 to i32
%27 = sub nsw i32 %26, 32
%28 = trunc i32 %27 to i8
store i8 %28, i8* %2
br label %31
29: ; preds = %20, %16
%30 = load i8, i8* %3
store i8 %30, i8* %2
br label %31
31: ; preds = %29, %24, %11
%32 = load i8, i8* %2
ret i8 %32
}

LLVM IR (-O2):
define signext i8 @encoderfn_pet(i8 signext %0) {
%2 = add i8 %0, -65
%3 = icmp ult i8 %2, 26
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = or i8 %0, -128
br label %11
6: ; preds = %1
%7 = add i8 %0, -97
%8 = icmp ult i8 %7, 26
%9 = add i8 %0, -32
%10 = select i1 %8, i8 %9, i8 %0
br label %11
11: ; preds = %6, %4
%12 = phi i8 [ %5, %4 ], [ %10, %6 ]
ret i8 %12
}
/* Variables and functions */
int /*<<< orphan*/ free(char *);
char *jfs_realpath(char *);
int /*<<< orphan*/ printf(char *);
int main() {
  char *jfs_path;
  printf("Started joinFS realpath test.\n");
  jfs_path = jfs_realpath("/");
  free(jfs_path);
  jfs_path = jfs_realpath("");
  free(jfs_path);
  printf("Finished joinFS realpath tests.\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
call   1050 <printf@plt>
lea    0xecd(%rip),%rdi
call   1040 <jfs_realpath@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <free@plt>
lea    0xed6(%rip),%rdi
call   1040 <jfs_realpath@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <free@plt>
lea    0xe9d(%rip),%rdi
call   1050 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xeca(%rip),%rdi
call   1050 <puts@plt>
lea    0xebc(%rip),%rdi
call   1040 <jfs_realpath@plt>
mov    %rax,%rdi
call   1030 <free@plt>
lea    0xee7(%rip),%rdi
call   1040 <jfs_realpath@plt>
mov    %rax,%rdi
call   1030 <free@plt>
lea    0xeb4(%rip),%rdi
call   1050 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [31 x i8] c"Started joinFS realpath test.\0A\00"
@.str.1 = [2 x i8] c"/\00"
@.str.2 = [1 x i8] zeroinitializer
@.str.3 = [33 x i8] c"Finished joinFS realpath tests.\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8*
store i32 0, i32* %1
%3 = call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0))
%4 = call i8* @jfs_realpath(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
store i8* %4, i8** %2
%5 = load i8*, i8** %2
%6 = call i32 @free(i8* %5)
%7 = call i8* @jfs_realpath(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0))
store i8* %7, i8** %2
%8 = load i8*, i8** %2
%9 = call i32 @free(i8* %8)
%10 = call i32 @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.3, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [2 x i8] c"/\00"
@.str.2 = [1 x i8] zeroinitializer
@str = [30 x i8] c"Started joinFS realpath test.\00"
@str.4 = [32 x i8] c"Finished joinFS realpath tests.\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @str, i64 0, i64 0))
%2 = tail call i8* @jfs_realpath(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%3 = tail call i32 @free(i8* %2)
%4 = tail call i8* @jfs_realpath(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0))
%5 = tail call i32 @free(i8* %4)
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @str.4, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void h1(char *str) { printf("<H1>%s</H1>\n", str); }


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

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

LLVM IR (-O0):
@.str = [13 x i8] c"<H1>%s</H1>\0A\00"
define void @h1(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* %3)
ret void
}

LLVM IR (-O2):
@.str = [13 x i8] c"<H1>%s</H1>\0A\00"
define void @h1(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
unsigned long int unsignedlongint_ignoring_unsignedint(unsigned long int x,
                                                       unsigned int y) {
  return x;
}


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

x86 assembly (clang, -O2):
<unsignedlongint_ignoring_unsignedint>:
mov    %rdi,%rax
ret

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

LLVM IR (-O2):
define i64 @unsignedlongint_ignoring_unsignedint(i64 returned %0, i32 %1) {
ret i64 %0
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *, char *);
int /*<<< orphan*/ stderr;
void usage(char *a0) {
  fprintf(stderr, "Usage:\n\t%s phase_type codec\n\t%s phase_type/codec\n", a0,
          a0);
  exit(1);
}


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

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

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

LLVM IR (-O2):
@stderr = global i32 0
@.str = [50 x i8] c"Usage:\0A\09%s phase_type codec\0A\09%s phase_type/codec\0A\00"
define void @usage(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %0)
%4 = tail call i32 @exit(i32 1)
unreachable
}
void getstdin(pip) const int pip;
{
  rclose(0);
  rdup(pip);
  rclose(pip);
}


x86 assembly (clang, -O0):
<getstdin>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
xor    %edi,%edi
mov    $0x0,%al
call   1040 <rclose@plt>
mov    -0x4(%rbp),%edi
mov    $0x0,%al
call   1030 <rdup@plt>
mov    -0x4(%rbp),%edi
mov    $0x0,%al
call   1040 <rclose@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getstdin>:
push   %rbx
mov    %edi,%ebx
xor    %edi,%edi
xor    %eax,%eax
call   1040 <rclose@plt>
mov    %ebx,%edi
xor    %eax,%eax
call   1030 <rdup@plt>
mov    %ebx,%edi
xor    %eax,%eax
pop    %rbx
jmp    1040 <rclose@plt>

LLVM IR (-O0):
define void @getstdin(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 (i32, ...) bitcast (i32 (...)* @rclose to i32 (i32, ...)*)(i32 0)
%4 = load i32, i32* %2
%5 = call i32 (i32, ...) bitcast (i32 (...)* @rdup to i32 (i32, ...)*)(i32 %4)
%6 = load i32, i32* %2
%7 = call i32 (i32, ...) bitcast (i32 (...)* @rclose to i32 (i32, ...)*)(i32 %6)
ret void
}

LLVM IR (-O2):
define void @getstdin(i32 %0) {
%2 = tail call i32 (i32, ...) bitcast (i32 (...)* @rclose to i32 (i32, ...)*)(i32 0)
%3 = tail call i32 (i32, ...) bitcast (i32 (...)* @rdup to i32 (i32, ...)*)(i32 %0)
%4 = tail call i32 (i32, ...) bitcast (i32 (...)* @rclose to i32 (i32, ...)*)(i32 %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ F_GETFD;
int /*<<< orphan*/ F_SETFL;
int O_NONBLOCK;
int fcntl(int, int /*<<< orphan*/, int);
int set_nonblock(int sockfd) {
  if (fcntl(sockfd, F_SETFL, fcntl(sockfd, F_GETFD, 0) | O_NONBLOCK) == -1)
    return -1;
  return 0;
}


x86 assembly (clang, -O0):
<set_nonblock>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    0x2eb0(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%edi
mov    0x2e99(%rip),%rax
mov    (%rax),%esi
xor    %edx,%edx
call   1030 <fcntl@plt>
mov    -0x10(%rbp),%edi
mov    -0xc(%rbp),%esi
mov    %eax,%edx
mov    0x2e99(%rip),%rax
or     (%rax),%edx
call   1030 <fcntl@plt>
cmp    $0xffffffff,%eax
jne    116b <set_nonblock+0x5b>
movl   $0xffffffff,-0x4(%rbp)
jmp    1172 <set_nonblock+0x62>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_nonblock>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebx
mov    0x2ebc(%rip),%rax
mov    (%rax),%ebp
mov    0x2eab(%rip),%rax
mov    (%rax),%esi
xor    %edx,%edx
call   1030 <fcntl@plt>
mov    0x2eb3(%rip),%rcx
or     (%rcx),%eax
mov    %ebx,%edi
mov    %ebp,%esi
mov    %eax,%edx
call   1030 <fcntl@plt>
xor    %ecx,%ecx
cmp    $0xffffffff,%eax
sete   %cl
neg    %ecx
mov    %ecx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@F_SETFL = global i32 0
@F_GETFD = global i32 0
@O_NONBLOCK = global i32 0
define i32 @set_nonblock(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = load i32, i32* @F_SETFL
%6 = load i32, i32* %3
%7 = load i32, i32* @F_GETFD
%8 = call i32 @fcntl(i32 %6, i32 %7, i32 0)
%9 = load i32, i32* @O_NONBLOCK
%10 = or i32 %8, %9
%11 = call i32 @fcntl(i32 %4, i32 %5, i32 %10)
%12 = icmp eq i32 %11, -1
br i1 %12, label %13, label %14
13: ; preds = %1
store i32 -1, i32* %2
br label %15
14: ; preds = %1
store i32 0, i32* %2
br label %15
15: ; preds = %14, %13
%16 = load i32, i32* %2
ret i32 %16
}

LLVM IR (-O2):
@F_SETFL = global i32 0
@F_GETFD = global i32 0
@O_NONBLOCK = global i32 0
define i32 @set_nonblock(i32 %0) {
%2 = load i32, i32* @F_SETFL
%3 = load i32, i32* @F_GETFD
%4 = tail call i32 @fcntl(i32 %0, i32 %3, i32 0)
%5 = load i32, i32* @O_NONBLOCK
%6 = or i32 %5, %4
%7 = tail call i32 @fcntl(i32 %0, i32 %2, i32 %6)
%8 = icmp eq i32 %7, -1
%9 = sext i1 %8 to i32
ret i32 %9
}
void BN_get0_nist_prime_256(void) {}


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

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

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

LLVM IR (-O2):
define void @BN_get0_nist_prime_256() {
ret void
}
int ev3_battery_current_mA(void) { return 100; }


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

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

LLVM IR (-O0):
define i32 @ev3_battery_current_mA() {
ret i32 100
}

LLVM IR (-O2):
define i32 @ev3_battery_current_mA() {
ret i32 100
}
/* Type definitions */
typedef int /*<<< orphan*/ time_t;
struct timespec {
  double tv_nsec;
  int /*<<< orphan*/ tv_sec;
};

/* Variables and functions */
int /*<<< orphan*/ CLOCK_REALTIME;
int /*<<< orphan*/ clock_gettime(int /*<<< orphan*/, struct timespec *);
long round(double);
long get_millis() {
  long ms;
  time_t s;
  struct timespec spec;
  clock_gettime(CLOCK_REALTIME, &spec);
  s = spec.tv_sec;
  ms = round(spec.tv_nsec / 1.0e6);
}


x86 assembly (clang, -O0):
<get_millis>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    0x2eb1(%rip),%rax
mov    (%rax),%edi
lea    -0x28(%rbp),%rsi
call   1030 <clock_gettime@plt>
mov    -0x20(%rbp),%eax
mov    %eax,-0x14(%rbp)
movsd  -0x28(%rbp),%xmm0
movsd  0xeb3(%rip),%xmm1
divsd  %xmm1,%xmm0
call   1040 <round@plt>
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_millis>:
sub    $0x18,%rsp
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0x8(%rsp),%rsi
call   1030 <clock_gettime@plt>
movsd  0x8(%rsp),%xmm0
divsd  0xebb(%rip),%xmm0
call   1040 <round@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
%struct.timespec = type { double, i32 }
@CLOCK_REALTIME = global i32 0
define i64 @get_millis() {
%1 = alloca i64
%2 = alloca i64
%3 = alloca i32
%4 = alloca %struct.timespec
%5 = load i32, i32* @CLOCK_REALTIME
%6 = call i32 @clock_gettime(i32 %5, %struct.timespec* %4)
%7 = getelementptr inbounds %struct.timespec, %struct.timespec* %4, i32 0, i32 1
%8 = load i32, i32* %7
store i32 %8, i32* %3
%9 = getelementptr inbounds %struct.timespec, %struct.timespec* %4, i32 0, i32 0
%10 = load double, double* %9
%11 = fdiv double %10, 1.000000e+06
%12 = call i64 @round(double %11)
store i64 %12, i64* %2
%13 = load i64, i64* %1
ret i64 %13
}

LLVM IR (-O2):
%struct.timespec = type { double, i32 }
@CLOCK_REALTIME = global i32 0
define i64 @get_millis() {
%1 = alloca %struct.timespec
%2 = bitcast %struct.timespec* %1 to i8*
%3 = load i32, i32* @CLOCK_REALTIME
%4 = call i32 @clock_gettime(i32 %3, %struct.timespec* %1)
%5 = getelementptr inbounds %struct.timespec, %struct.timespec* %1, i64 0, i32 0
%6 = load double, double* %5
%7 = fdiv double %6, 1.000000e+06
%8 = call i64 @round(double %7)
ret i64 undef
}
int Memcmp(a, b, count)
register char *a, *b;
int count;
{
  while (count--)
    if (*a++ != *b++)
      return (0);
  return (1);
}


x86 assembly (clang, -O0):
<Memcmp>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %edx,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
mov    %eax,%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0x1c(%rbp)
cmp    $0x0,%eax
je     1160 <Memcmp+0x60>
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
movsbl (%rax),%eax
mov    -0x18(%rbp),%rcx
mov    %rcx,%rdx
add    $0x1,%rdx
mov    %rdx,-0x18(%rbp)
movsbl (%rcx),%ecx
cmp    %ecx,%eax
je     115b <Memcmp+0x5b>
movl   $0x0,-0x4(%rbp)
jmp    1167 <Memcmp+0x67>
jmp    110f <Memcmp+0xf>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<Memcmp>:
mov    %edx,%r8d
xor    %ecx,%ecx
cs nopw 0x0(%rax,%rax,1)
nop
cmp    %ecx,%r8d
je     1128 <Memcmp+0x28>
movzbl (%rdi,%rcx,1),%edx
lea    0x1(%rcx),%rax
cmp    (%rsi,%rcx,1),%dl
mov    %rax,%rcx
je     1110 <Memcmp+0x10>
xor    %eax,%eax
ret
mov    $0x1,%eax
ret

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

LLVM IR (-O2):
define i32 @Memcmp(i8* nocapture %0, i8* nocapture %1, i32 %2) {
br label %4
4: ; preds = %9, %3
%5 = phi i8* [ %0, %3 ], [ %11, %9 ]
%6 = phi i8* [ %1, %3 ], [ %13, %9 ]
%7 = phi i32 [ %2, %3 ], [ %10, %9 ]
%8 = icmp eq i32 %7, 0
br i1 %8, label %16, label %9
9: ; preds = %4
%10 = add nsw i32 %7, -1
%11 = getelementptr inbounds i8, i8* %5, i64 1
%12 = load i8, i8* %5
%13 = getelementptr inbounds i8, i8* %6, i64 1
%14 = load i8, i8* %6
%15 = icmp eq i8 %12, %14
br i1 %15, label %4, label %16
16: ; preds = %4, %9
%17 = phi i32 [ 0, %9 ], [ 1, %4 ]
ret i32 %17
}
/* Variables and functions */
void a_test() {
  int *s = NULL;
  *s = 42 + 1;
}


x86 assembly (clang, -O0):
<a_test>:
push   %rbp
mov    %rsp,%rbp
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movl   $0x2b,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
LLVM IR (-O0):
define void @a_test() {
%1 = alloca i32*
store i32* null, i32** %1
%2 = load i32*, i32** %1
store i32 43, i32* %2
ret void
}

LLVM IR (-O2):
/* Variables and functions */
int /*<<< orphan*/ step_hash(int);
int func_45(short p_46, unsigned p_47, int *p_48, unsigned char p_49) {
  step_hash(38);
  return (*p_48);
}


x86 assembly (clang, -O0):
<func_45>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %cl,%al
mov    %di,%cx
mov    %cx,-0x2(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    %al,-0x11(%rbp)
mov    $0x26,%edi
call   1030 <step_hash@plt>
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<func_45>:
push   %rbx
mov    %rdx,%rbx
mov    $0x26,%edi
call   1030 <step_hash@plt>
mov    (%rbx),%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @func_45(i16 signext %0, i32 %1, i32* %2, i8 zeroext %3) {
%5 = alloca i16
%6 = alloca i32
%7 = alloca i32*
%8 = alloca i8
store i16 %0, i16* %5
store i32 %1, i32* %6
store i32* %2, i32** %7
store i8 %3, i8* %8
%9 = call i32 @step_hash(i32 38)
%10 = load i32*, i32** %7
%11 = load i32, i32* %10
ret i32 %11
}

LLVM IR (-O2):
define i32 @func_45(i16 signext %0, i32 %1, i32* nocapture %2, i8 zeroext %3) {
%5 = tail call i32 @step_hash(i32 38)
%6 = load i32, i32* %2
ret i32 %6
}
void startqsort() {}


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

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

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

LLVM IR (-O2):
define void @startqsort() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
void show_err(char *msg) {
  fprintf(stderr, "This is error print, msg=%s\n", msg);
}


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

x86 assembly (clang, -O2):
<show_err>:
mov    %rdi,%rdx
mov    0x2ec6(%rip),%rax
mov    (%rax),%edi
lea    0xedd(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [29 x i8] c"This is error print, msg=%s\0A\00"
define void @show_err(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0), i8* %4)
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [29 x i8] c"This is error print, msg=%s\0A\00"
define void @show_err(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
void slab_Assert() {
  while (1)
    ;
}


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

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

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

LLVM IR (-O2):
define void @slab_Assert() {
br label %1
1: ; preds = %0, %1
br label %1
}
/* Variables and functions */
int /*<<< orphan*/ fun();
int /*<<< orphan*/ printf(char *, int);
int main() {
  int x;
  x = 1;
  fun();
  x = 2;
  printf("%d\n", x);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
mov    $0x0,%al
call   1030 <fun@plt>
movl   $0x2,-0x8(%rbp)
mov    -0x8(%rbp),%esi
lea    0xeb2(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <fun@plt>
lea    0xed1(%rip),%rdi
mov    $0x2,%esi
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = tail call i32 (...) @fun()
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 2)
ret i32 0
}
/* Type definitions */
typedef scalar_t__ uint_fast32_t;

/* Variables and functions */
bool SHAREMIND_SET_KEY_LESS_THAN_uint_fast32_t(uint_fast32_t const k1,
                                               uint_fast32_t const k2) {
  return k1 < k2;
}


x86 assembly (clang, -O0):
<SHAREMIND_SET_KEY_LESS_THAN_uint_fast32_t>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cmp    -0x10(%rbp),%rax
setl   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<SHAREMIND_SET_KEY_LESS_THAN_uint_fast32_t>:
xor    %eax,%eax
cmp    %rsi,%rdi
setl   %al
ret

LLVM IR (-O0):
define i32 @SHAREMIND_SET_KEY_LESS_THAN_uint_fast32_t(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %3
%6 = load i64, i64* %4
%7 = icmp slt i64 %5, %6
%8 = zext i1 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
define i32 @SHAREMIND_SET_KEY_LESS_THAN_uint_fast32_t(i64 %0, i64 %1) {
%3 = icmp slt i64 %0, %1
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ rec_inv_str(char *);
char *invert_string(char *c) {
  rec_inv_str(c);
  return c;
}


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

x86 assembly (clang, -O2):
<invert_string>:
push   %rbx
mov    %rdi,%rbx
call   1030 <rec_inv_str@plt>
mov    %rbx,%rax
pop    %rbx
ret

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

LLVM IR (-O2):
define i8* @invert_string(i8* returned %0) {
%2 = tail call i32 @rec_inv_str(i8* %0)
ret i8* %0
}
/* Variables and functions */
char *emalloc(int);
int /*<<< orphan*/ strcpy(char *, char *);
char *get_libexec(void) {
  char *fn;
  fn = emalloc(2);
  strcpy(fn, ".");
  return (fn);
}


x86 assembly (clang, -O0):
<get_libexec>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x2,%edi
call   1040 <emalloc@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xebf(%rip),%rsi
call   1030 <strcpy@plt>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_libexec>:
push   %rbx
mov    $0x2,%edi
call   1040 <emalloc@plt>
mov    %rax,%rbx
lea    0xecb(%rip),%rsi
mov    %rax,%rdi
call   1030 <strcpy@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [2 x i8] c".\00"
define i8* @get_libexec() {
%1 = alloca i8*
%2 = call i8* @emalloc(i32 2)
store i8* %2, i8** %1
%3 = load i8*, i8** %1
%4 = call i32 @strcpy(i8* %3, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%5 = load i8*, i8** %1
ret i8* %5
}

LLVM IR (-O2):
@.str = [2 x i8] c".\00"
define i8* @get_libexec() {
%1 = tail call i8* @emalloc(i32 2)
%2 = tail call i32 @strcpy(i8* %1, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
ret i8* %1
}
int kgdb_skipexception(int exception, struct pt_regs *regs) { return 0; }


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

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

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

LLVM IR (-O2):
%struct.pt_regs = type opaque
define i32 @kgdb_skipexception(i32 %0, %struct.pt_regs* nocapture readnone %1) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ make_argument_test();
int /*<<< orphan*/ task_create_test();
int /*<<< orphan*/ task_exec_test();
int /*<<< orphan*/ tasklist_clear_test();
int /*<<< orphan*/ tasklist_create_test();
int /*<<< orphan*/ tasklist_insert_test();
int /*<<< orphan*/ tasklist_pop_test();
int /*<<< orphan*/ tasklist_remove_test();
void task_h_runTests() {
  make_argument_test();
  task_create_test();
  task_exec_test();
  tasklist_create_test();
  tasklist_insert_test();
  tasklist_pop_test();
  tasklist_remove_test();
  tasklist_clear_test();
}


x86 assembly (clang, -O0):
<task_h_runTests>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1050 <make_argument_test@plt>
mov    $0x0,%al
call   1060 <task_create_test@plt>
mov    $0x0,%al
call   1070 <task_exec_test@plt>
mov    $0x0,%al
call   1090 <tasklist_create_test@plt>
mov    $0x0,%al
call   1030 <tasklist_insert_test@plt>
mov    $0x0,%al
call   1040 <tasklist_pop_test@plt>
mov    $0x0,%al
call   1080 <tasklist_remove_test@plt>
mov    $0x0,%al
call   10a0 <tasklist_clear_test@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<task_h_runTests>:
push   %rax
xor    %eax,%eax
call   1050 <make_argument_test@plt>
xor    %eax,%eax
call   1060 <task_create_test@plt>
xor    %eax,%eax
call   1070 <task_exec_test@plt>
xor    %eax,%eax
call   1090 <tasklist_create_test@plt>
xor    %eax,%eax
call   1030 <tasklist_insert_test@plt>
xor    %eax,%eax
call   1040 <tasklist_pop_test@plt>
xor    %eax,%eax
call   1080 <tasklist_remove_test@plt>
xor    %eax,%eax
pop    %rcx
jmp    10a0 <tasklist_clear_test@plt>

LLVM IR (-O0):
define void @task_h_runTests() {
%1 = call i32 (...) @make_argument_test()
%2 = call i32 (...) @task_create_test()
%3 = call i32 (...) @task_exec_test()
%4 = call i32 (...) @tasklist_create_test()
%5 = call i32 (...) @tasklist_insert_test()
%6 = call i32 (...) @tasklist_pop_test()
%7 = call i32 (...) @tasklist_remove_test()
%8 = call i32 (...) @tasklist_clear_test()
ret void
}

LLVM IR (-O2):
define void @task_h_runTests() {
%1 = tail call i32 (...) @make_argument_test()
%2 = tail call i32 (...) @task_create_test()
%3 = tail call i32 (...) @task_exec_test()
%4 = tail call i32 (...) @tasklist_create_test()
%5 = tail call i32 (...) @tasklist_insert_test()
%6 = tail call i32 (...) @tasklist_pop_test()
%7 = tail call i32 (...) @tasklist_remove_test()
%8 = tail call i32 (...) @tasklist_clear_test()
ret void
}
void vde_chain_nm4_decref(void) {}


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

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

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

LLVM IR (-O2):
define void @vde_chain_nm4_decref() {
ret void
}
/* Type definitions */
struct mutex {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ mutex_lock(struct mutex *);
int mutex_lock_interruptible(struct mutex *lock) {
  mutex_lock(lock);
  return 0;
}


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

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

LLVM IR (-O0):
%struct.mutex = type { i32 }
define i32 @mutex_lock_interruptible(%struct.mutex* %0) {
%2 = alloca %struct.mutex*
store %struct.mutex* %0, %struct.mutex** %2
%3 = load %struct.mutex*, %struct.mutex** %2
%4 = call i32 @mutex_lock(%struct.mutex* %3)
ret i32 0
}

LLVM IR (-O2):
%struct.mutex = type { i32 }
define i32 @mutex_lock_interruptible(%struct.mutex* %0) {
%2 = tail call i32 @mutex_lock(%struct.mutex* %0)
ret i32 0
}
void finalize_callback_invocation(
    struct callback_invocation *callback_invocation) {}


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

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

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

LLVM IR (-O2):
%struct.callback_invocation = type opaque
define void @finalize_callback_invocation(%struct.callback_invocation* nocapture %0) {
ret void
}
int msm8953_unclamp_secondary_arm_cpu(unsigned int cpu) { return 0; }


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

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

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

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