xunge/DecIR huggingface dataset:
/* Variables and functions */
int strcmp(char *, char *);
char *fun(char *p1, char *p2) {
  int i = 0;
  i = strcmp(p1, p2);
  if (0 == i)
    return p1;
  else
    return p2;
}


x86 assembly (clang, -O0):
<fun>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1030 <strcmp@plt>
mov    %eax,-0x1c(%rbp)
xor    %eax,%eax
cmp    -0x1c(%rbp),%eax
jne    114f <fun+0x3f>
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    1157 <fun+0x47>
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fun>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rdi,%r14
call   1030 <strcmp@plt>
test   %eax,%eax
cmove  %r14,%rbx
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define i8* @fun(i8* %0, i8* %1) {
%3 = tail call i32 @strcmp(i8* dereferenceable(1) %0, i8* dereferenceable(1) %1)
%4 = icmp eq i32 %3, 0
%5 = select i1 %4, i8* %0, i8* %1
ret i8* %5
}
const char *str_expr_struct() { return "member-access"; }


x86 assembly (clang, -O0):
<str_expr_struct>:
push   %rbp
mov    %rsp,%rbp
lea    0xef5(%rip),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<str_expr_struct>:
lea    0xef9(%rip),%rax
ret

LLVM IR (-O0):
@.str = [14 x i8] c"member-access\00"
define i8* @str_expr_struct() {
ret i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [14 x i8] c"member-access\00"
define i8* @str_expr_struct() {
ret i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
unsigned char *hmac_sha224(unsigned char *, unsigned char const *, size_t,
                           unsigned char const *, size_t);
unsigned char *mac_hmac_sha224(unsigned char *out, const unsigned char *key,
                               size_t key_len, const unsigned char *msg,
                               size_t msg_len) {
  return hmac_sha224(out, key, key_len, msg, msg_len);
}


x86 assembly (clang, -O0):
<mac_hmac_sha224>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    -0x28(%rbp),%r8
call   1030 <hmac_sha224@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mac_hmac_sha224>:
jmp    1030 <hmac_sha224@plt>

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

LLVM IR (-O2):
define i8* @mac_hmac_sha224(i8* %0, i8* %1, i64 %2, i8* %3, i64 %4) {
%6 = tail call i8* @hmac_sha224(i8* %0, i8* %1, i64 %2, i8* %3, i64 %4)
ret i8* %6
}
/* Type definitions */
typedef int /*<<< orphan*/ enum_t;
typedef enum sizecheck { ____Placeholder_sizecheck } sizecheck;
typedef int /*<<< orphan*/ bool_t;
typedef int /*<<< orphan*/ XDR;

/* Variables and functions */
int /*<<< orphan*/ FALSE;
int /*<<< orphan*/ xdr_int(int /*<<< orphan*/ *, int *);
int /*<<< orphan*/ xdr_long(int /*<<< orphan*/ *, long *);
int /*<<< orphan*/ xdr_short(int /*<<< orphan*/ *, short *);
bool_t xdr_enum(XDR *xdrs, enum_t *ep) {
  enum sizecheck { SIZEVAL };
  if (sizeof(enum sizecheck) == sizeof(long)) {
    return (xdr_long(xdrs, (long *)ep));
  } else if (sizeof(enum sizecheck) == sizeof(int)) {
    return (xdr_int(xdrs, (int *)ep));
  } else if (sizeof(enum sizecheck) == sizeof(short)) {
    return (xdr_short(xdrs, (short *)ep));
  } else {
    return (FALSE);
  }
}


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

x86 assembly (clang, -O2):
<xdr_enum>:
jmp    1030 <xdr_int@plt>

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

LLVM IR (-O2):
@FALSE = global i32 0
define i32 @xdr_enum(i32* %0, i32* %1) {
%3 = tail call i32 @xdr_int(i32* %0, i32* %1)
ret i32 %3
}
/* Variables and functions */
int prime(int);
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int num;
  scanf("%d", &num);
  printf("%d\n", prime(num));
  return 0;
}


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

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

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%4 = load i32, i32* %1
%5 = call i32 @prime(i32 %4)
%6 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %5)
ret i32 0
}
int factorial2(int i) {
  if (i == 0)
    return 1;
  int tmp_result;
  tmp_result = factorial2(0);
  return tmp_result;
}


x86 assembly (clang, -O0):
<factorial2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jne    1131 <factorial2+0x21>
movl   $0x1,-0x4(%rbp)
jmp    1141 <factorial2+0x31>
xor    %edi,%edi
call   1030 <factorial2@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @factorial2(i32 %0) {
ret i32 1
}
f(int i0, int i1, int i2, int i3, int i4, int i5, int i6, int i7, int i8,
  int i9) {
  return i0 + i1 - i2 + i3 - i4 + i5 - i6 + i7 - i8 + i9;
}


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
mov    0x28(%rbp),%eax
mov    0x20(%rbp),%eax
mov    0x18(%rbp),%eax
mov    0x10(%rbp),%eax
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    %r8d,-0x14(%rbp)
mov    %r9d,-0x18(%rbp)
mov    -0x4(%rbp),%eax
add    -0x8(%rbp),%eax
sub    -0xc(%rbp),%eax
add    -0x10(%rbp),%eax
sub    -0x14(%rbp),%eax
add    -0x18(%rbp),%eax
sub    0x10(%rbp),%eax
add    0x18(%rbp),%eax
sub    0x20(%rbp),%eax
add    0x28(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f>:
lea    (%rdi,%rsi,1),%eax
add    %ecx,%eax
add    %r8d,%edx
add    %r9d,%eax
add    0x8(%rsp),%edx
add    0x10(%rsp),%eax
add    0x18(%rsp),%edx
sub    %edx,%eax
add    0x20(%rsp),%eax
ret

LLVM IR (-O0):
define i32 @f(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5, i32 %6, i32 %7, i32 %8, i32 %9) {
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
%15 = alloca i32
%16 = alloca i32
%17 = alloca i32
%18 = alloca i32
%19 = alloca i32
%20 = alloca i32
store i32 %0, i32* %11
store i32 %1, i32* %12
store i32 %2, i32* %13
store i32 %3, i32* %14
store i32 %4, i32* %15
store i32 %5, i32* %16
store i32 %6, i32* %17
store i32 %7, i32* %18
store i32 %8, i32* %19
store i32 %9, i32* %20
%21 = load i32, i32* %11
%22 = load i32, i32* %12
%23 = add nsw i32 %21, %22
%24 = load i32, i32* %13
%25 = sub nsw i32 %23, %24
%26 = load i32, i32* %14
%27 = add nsw i32 %25, %26
%28 = load i32, i32* %15
%29 = sub nsw i32 %27, %28
%30 = load i32, i32* %16
%31 = add nsw i32 %29, %30
%32 = load i32, i32* %17
%33 = sub nsw i32 %31, %32
%34 = load i32, i32* %18
%35 = add nsw i32 %33, %34
%36 = load i32, i32* %19
%37 = sub nsw i32 %35, %36
%38 = load i32, i32* %20
%39 = add nsw i32 %37, %38
ret i32 %39
}

LLVM IR (-O2):
define i32 @f(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5, i32 %6, i32 %7, i32 %8, i32 %9) {
%11 = add i32 %1, %0
%12 = add i32 %11, %3
%13 = add i32 %2, %4
%14 = add i32 %12, %5
%15 = add i32 %13, %6
%16 = add i32 %14, %7
%17 = add i32 %15, %8
%18 = sub i32 %16, %17
%19 = add i32 %18, %9
ret i32 %19
}
void foo786() {}


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

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

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

LLVM IR (-O2):
define void @foo786() {
ret void
}
float addimmsf3(float a) { return a + 50; }


x86 assembly (clang, -O0):
<addimmsf3>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  0xeef(%rip),%xmm0
addss  -0x4(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<addimmsf3>:
addss  0xef8(%rip),%xmm0
ret

LLVM IR (-O0):
define float @addimmsf3(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = fadd float %3, 5.000000e+01
ret float %4
}

LLVM IR (-O2):
define float @addimmsf3(float %0) {
%2 = fadd float %0, 5.000000e+01
ret float %2
}
/* Type definitions */
struct nlattr {
  int nla_len;
};
struct libbpf_nla_req {
  int dummy;
};

/* Variables and functions */
scalar_t__ req_tail(struct libbpf_nla_req *);
void nlattr_end_nested(struct libbpf_nla_req *req, struct nlattr *tail) {
  tail->nla_len = (void *)req_tail(req) - (void *)tail;
}


x86 assembly (clang, -O0):
<nlattr_end_nested>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <req_tail@plt>
mov    -0x10(%rbp),%rcx
sub    %rcx,%rax
mov    %eax,%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<nlattr_end_nested>:
push   %rbx
mov    %rsi,%rbx
call   1030 <req_tail@plt>
sub    %ebx,%eax
mov    %eax,(%rbx)
pop    %rbx
ret

LLVM IR (-O0):
%struct.libbpf_nla_req = type { i32 }
%struct.nlattr = type { i32 }
define void @nlattr_end_nested(%struct.libbpf_nla_req* %0, %struct.nlattr* %1) {
%3 = alloca %struct.libbpf_nla_req*
%4 = alloca %struct.nlattr*
store %struct.libbpf_nla_req* %0, %struct.libbpf_nla_req** %3
store %struct.nlattr* %1, %struct.nlattr** %4
%5 = load %struct.libbpf_nla_req*, %struct.libbpf_nla_req** %3
%6 = call i64 @req_tail(%struct.libbpf_nla_req* %5)
%7 = inttoptr i64 %6 to i8*
%8 = load %struct.nlattr*, %struct.nlattr** %4
%9 = bitcast %struct.nlattr* %8 to i8*
%10 = ptrtoint i8* %7 to i64
%11 = ptrtoint i8* %9 to i64
%12 = sub i64 %10, %11
%13 = trunc i64 %12 to i32
%14 = load %struct.nlattr*, %struct.nlattr** %4
%15 = getelementptr inbounds %struct.nlattr, %struct.nlattr* %14, i32 0, i32 0
store i32 %13, i32* %15
ret void
}

LLVM IR (-O2):
%struct.libbpf_nla_req = type { i32 }
%struct.nlattr = type { i32 }
define void @nlattr_end_nested(%struct.libbpf_nla_req* %0, %struct.nlattr* %1) {
%3 = tail call i64 @req_tail(%struct.libbpf_nla_req* %0)
%4 = ptrtoint %struct.nlattr* %1 to i64
%5 = sub i64 %3, %4
%6 = trunc i64 %5 to i32
%7 = getelementptr inbounds %struct.nlattr, %struct.nlattr* %1, i64 0, i32 0
store i32 %6, i32* %7
ret void
}
/* Variables and functions */
double getminimum_double(int, double *);
double getminimum(int n, double *data) { return getminimum_double(n, data); }


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

x86 assembly (clang, -O2):
<getminimum>:
jmp    1030 <getminimum_double@plt>

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

LLVM IR (-O2):
define double @getminimum(i32 %0, double* %1) {
%3 = tail call double @getminimum_double(i32 %0, double* %1)
ret double %3
}
/* Variables and functions */
int /*<<< orphan*/ matNf_copy(float *, float const *, int);
void mat3f_copy(float dest[9], const float src[9]) { matNf_copy(dest, src, 3); }


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

x86 assembly (clang, -O2):
<mat3f_copy>:
mov    $0x3,%edx
jmp    1030 <matNf_copy@plt>

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

LLVM IR (-O2):
define void @mat3f_copy(float* %0, float* %1) {
%3 = tail call i32 @matNf_copy(float* %0, float* %1, i32 3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ arguments(int, char **);
int /*<<< orphan*/ printf(char *);
int main(int argc, char **argv) {
  arguments(argc, argv);
  printf("Hello, world!\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1030 <arguments@plt>
lea    0xeb7(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [15 x i8] c"Hello, world!\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = load i32, i32* %4
%7 = load i8**, i8*** %5
%8 = call i32 @arguments(i32 %6, i8** %7)
%9 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [14 x i8] c"Hello, world!\00"
define i32 @main(i32 %0, i8** %1) {
%3 = tail call i32 @arguments(i32 %0, i8** %1)
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ test_gpio();
int iotbus_gpio_test() {
  test_gpio();
  return 0;
}


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

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

LLVM IR (-O0):
define i32 @iotbus_gpio_test() {
%1 = call i32 (...) @test_gpio()
ret i32 0
}

LLVM IR (-O2):
define i32 @iotbus_gpio_test() {
%1 = tail call i32 (...) @test_gpio()
ret i32 0
}
int clear_mce_nospec(unsigned long pfn) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @clear_mce_nospec(i64 %0) {
ret i32 0
}
/* Variables and functions */
int cel_is_overlap(double const *, double const *, double **, double const);
int cel_is_overlap_with_same_type(const double a[3], const double b[3],
                                  const int type_a, const int type_b,
                                  double lattice[3][3], const double symprec) {
  if (type_a == type_b) {
    return cel_is_overlap(a, b, lattice, symprec);
  } else {
    return 0;
  }
}


x86 assembly (clang, -O0):
<cel_is_overlap_with_same_type>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %edx,-0x1c(%rbp)
mov    %ecx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
movsd  %xmm0,-0x30(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0x20(%rbp),%eax
jne    1159 <cel_is_overlap_with_same_type+0x49>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x28(%rbp),%rdx
movsd  -0x30(%rbp),%xmm0
call   1030 <cel_is_overlap@plt>
mov    %eax,-0x4(%rbp)
jmp    1160 <cel_is_overlap_with_same_type+0x50>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cel_is_overlap_with_same_type>:
cmp    %ecx,%edx
jne    111c <cel_is_overlap_with_same_type+0xc>
mov    %r8,%rdx
jmp    1030 <cel_is_overlap@plt>
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @cel_is_overlap_with_same_type(double* %0, double* %1, i32 %2, i32 %3, [3 x double]* %4, double %5) {
%7 = alloca i32
%8 = alloca double*
%9 = alloca double*
%10 = alloca i32
%11 = alloca i32
%12 = alloca [3 x 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 [3 x double]* %4, [3 x double]** %12
store double %5, double* %13
%14 = load i32, i32* %10
%15 = load i32, i32* %11
%16 = icmp eq i32 %14, %15
br i1 %16, label %17, label %24
17: ; preds = %6
%18 = load double*, double** %8
%19 = load double*, double** %9
%20 = load [3 x double]*, [3 x double]** %12
%21 = bitcast [3 x double]* %20 to double**
%22 = load double, double* %13
%23 = call i32 @cel_is_overlap(double* %18, double* %19, double** %21, double %22)
store i32 %23, i32* %7
br label %25
24: ; preds = %6
store i32 0, i32* %7
br label %25
25: ; preds = %24, %17
%26 = load i32, i32* %7
ret i32 %26
}

LLVM IR (-O2):
define i32 @cel_is_overlap_with_same_type(double* %0, double* %1, i32 %2, i32 %3, [3 x double]* %4, double %5) {
%7 = icmp eq i32 %2, %3
br i1 %7, label %8, label %11
8: ; preds = %6
%9 = bitcast [3 x double]* %4 to double**
%10 = tail call i32 @cel_is_overlap(double* %0, double* %1, double** %9, double %5)
br label %11
11: ; preds = %6, %8
%12 = phi i32 [ %10, %8 ], [ 0, %6 ]
ret i32 %12
}
double geom_J_cart_xyz(double x[]) { return 1.0; }


x86 assembly (clang, -O0):
<geom_J_cart_xyz>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movsd  0xef0(%rip),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<geom_J_cart_xyz>:
movsd  0xef8(%rip),%xmm0
ret

LLVM IR (-O0):
define double @geom_J_cart_xyz(double* %0) {
%2 = alloca double*
store double* %0, double** %2
ret double 1.000000e+00
}

LLVM IR (-O2):
define double @geom_J_cart_xyz(double* nocapture readnone %0) {
ret double 1.000000e+00
}
/* Type definitions */
struct percpu_counter {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ percpu_counter_add(struct percpu_counter *, int);
__attribute__((always_)) void percpu_counter_inc(struct percpu_counter *fbc) {
  percpu_counter_add(fbc, 1);
}


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

x86 assembly (clang, -O2):
<percpu_counter_inc>:
mov    $0x1,%esi
jmp    1030 <percpu_counter_add@plt>

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

LLVM IR (-O2):
%struct.percpu_counter = type { i32 }
define void @percpu_counter_inc(%struct.percpu_counter* %0) {
%2 = tail call i32 @percpu_counter_add(%struct.percpu_counter* %0, i32 1)
ret void
}
int omp_get_num_procs() { return 1; }


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

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

LLVM IR (-O0):
define i32 @omp_get_num_procs() {
ret i32 1
}

LLVM IR (-O2):
define i32 @omp_get_num_procs() {
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ exit(int /*<<< orphan*/);
char *f(char *, int);
main() {
  char *str = "abcdefghijkl";
  char *x2 = f(str, 12);
  if (str + 14 != x2)
    abort();
  exit(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    $0xc,%esi
call   1040 <f@plt>
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
add    $0xe,%rax
cmp    -0x18(%rbp),%rax
je     1175 <main+0x45>
mov    $0x0,%al
call   1030 <abort@plt>
xor    %edi,%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xec8(%rip),%rdi
mov    $0xc,%esi
call   1040 <f@plt>
lea    0xec5(%rip),%rcx
cmp    %rcx,%rax
jne    1155 <main+0x25>
xor    %edi,%edi
call   1050 <exit@plt>
xor    %eax,%eax
call   1030 <abort@plt>

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

LLVM IR (-O2):
@.str = [13 x i8] c"abcdefghijkl\00"
define i32 @main() {
%1 = tail call i8* @f(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32 12)
%2 = icmp eq i8* %1, getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 1, i64 1)
br i1 %2, label %5, label %3
3: ; preds = %0
%4 = tail call i32 (...) @abort()
unreachable
5: ; preds = %0
%6 = tail call i32 @exit(i32 0)
unreachable
}
/* Variables and functions */
int atoi(char *);
int main(int argc, char **argv) {
  int a, b, i;
  float c;
  a = atoi(argv[1]);
  b = atoi(argv[2]);
  c = (float)a / b;
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1030 <atoi@plt>
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rdi
call   1030 <atoi@plt>
mov    %eax,-0x18(%rbp)
cvtsi2ssl -0x14(%rbp),%xmm0
cvtsi2ssl -0x18(%rbp),%xmm1
divss  %xmm1,%xmm0
movss  %xmm0,-0x20(%rbp)
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca float
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%10 = load i8**, i8*** %5
%11 = getelementptr inbounds i8*, i8** %10, i64 1
%12 = load i8*, i8** %11
%13 = call i32 @atoi(i8* %12)
store i32 %13, i32* %6
%14 = load i8**, i8*** %5
%15 = getelementptr inbounds i8*, i8** %14, i64 2
%16 = load i8*, i8** %15
%17 = call i32 @atoi(i8* %16)
store i32 %17, i32* %7
%18 = load i32, i32* %6
%19 = sitofp i32 %18 to float
%20 = load i32, i32* %7
%21 = sitofp i32 %20 to float
%22 = fdiv float %19, %21
store float %22, float* %9
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ regtestNew();
extern int main() {
  regtestNew();
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @regtestNew()
ret i32 0
}
void uart_list_devices() {}


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

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

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

LLVM IR (-O2):
define void @uart_list_devices() {
ret void
}
int darm_bit_count_16(int bit_string) {
  int bitCount = 0;
  int i = 0;
  for (; i < 16; i++) {
    if ((bit_string & (0b1 << i)) == 1) {
      bitCount++;
    }
  }
  return bitCount;
}


x86 assembly (clang, -O0):
<darm_bit_count_16>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x10,-0xc(%rbp)
jge    1155 <darm_bit_count_16+0x55>
mov    -0x4(%rbp),%eax
mov    -0xc(%rbp),%ecx
mov    $0x1,%edx
shl    %cl,%edx
mov    %edx,%ecx
and    %ecx,%eax
cmp    $0x1,%eax
jne    1142 <darm_bit_count_16+0x42>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1147 <darm_bit_count_16+0x47>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1115 <darm_bit_count_16+0x15>
mov    -0x8(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @darm_bit_count_16(i32 %0) {
%2 = and i32 %0, 1
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ f(int);
int /*<<< orphan*/ g(int);
int mult(int /*<<< orphan*/, int /*<<< orphan*/);
int something(void) {
  int r;
  r = mult(f(7), g(7));
  return r;
}


x86 assembly (clang, -O0):
<something>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x7,%edi
call   1030 <f@plt>
mov    %eax,-0x8(%rbp)
mov    $0x7,%edi
call   1050 <g@plt>
mov    -0x8(%rbp),%edi
mov    %eax,%esi
call   1040 <mult@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<something>:
push   %rbx
mov    $0x7,%edi
call   1030 <f@plt>
mov    %eax,%ebx
mov    $0x7,%edi
call   1050 <g@plt>
mov    %ebx,%edi
mov    %eax,%esi
pop    %rbx
jmp    1040 <mult@plt>

LLVM IR (-O0):
define i32 @something() {
%1 = alloca i32
%2 = call i32 @f(i32 7)
%3 = call i32 @g(i32 7)
%4 = call i32 @mult(i32 %2, i32 %3)
store i32 %4, i32* %1
%5 = load i32, i32* %1
ret i32 %5
}

LLVM IR (-O2):
define i32 @something() {
%1 = tail call i32 @f(i32 7)
%2 = tail call i32 @g(i32 7)
%3 = tail call i32 @mult(i32 %1, i32 %2)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ funcion1(int);
int /*<<< orphan*/ printf(char *);
int main() {
  printf("Inicio\n");
  funcion1(3);
  printf("Fin\n");
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
mov    $0x3,%edi
call   1040 <funcion1@plt>
lea    0xec7(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
mov    $0x3,%edi
call   1040 <funcion1@plt>
lea    0xec9(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [8 x i8] c"Inicio\0A\00"
@.str.1 = [5 x i8] c"Fin\0A\00"
define i32 @main() {
%1 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @funcion1(i32 3)
%3 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [7 x i8] c"Inicio\00"
@str.2 = [4 x i8] c"Fin\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @funcion1(i32 3)
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @str.2, i64 0, i64 0))
ret i32 0
}
int startup_LOCK(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @startup_LOCK() {
ret i32 0
}
/* Type definitions */
struct char_data {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ send_to_char(char *, struct char_data *);
void do_not_here(struct char_data *ch, char *argument, int cmd) {
  send_to_char("Sorry, but you cannot do that here!\r\n", ch);
}


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

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

LLVM IR (-O0):
%struct.char_data = type { i32 }
@.str = [38 x i8] c"Sorry, but you cannot do that here!\0D\0A\00"
define void @do_not_here(%struct.char_data* %0, i8* %1, i32 %2) {
%4 = alloca %struct.char_data*
%5 = alloca i8*
%6 = alloca i32
store %struct.char_data* %0, %struct.char_data** %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%7 = load %struct.char_data*, %struct.char_data** %4
%8 = call i32 @send_to_char(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0), %struct.char_data* %7)
ret void
}

LLVM IR (-O2):
%struct.char_data = type { i32 }
@.str = [38 x i8] c"Sorry, but you cannot do that here!\0D\0A\00"
define void @do_not_here(%struct.char_data* %0, i8* nocapture readnone %1, i32 %2) {
%4 = tail call i32 @send_to_char(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0), %struct.char_data* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void testPrint(int testGroup) {
  printf("Group %d has passed - you're awesome!\n", testGroup);
}


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

x86 assembly (clang, -O2):
<testPrint>:
mov    %edi,%esi
lea    0xee7(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [39 x i8] c"Group %d has passed - you're awesome!\0A\00"
define void @testPrint(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0), i32 %3)
ret void
}

LLVM IR (-O2):
@.str = [39 x i8] c"Group %d has passed - you're awesome!\0A\00"
define void @testPrint(i32 %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0), i32 %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ dump_map();
int /*<<< orphan*/ load_symbols(int /*<<< orphan*/);
int /*<<< orphan*/ sort_symbols();
int /*<<< orphan*/ stdin;
int main(int argc, char *argv[]) {
  load_symbols(stdin);
  sort_symbols();
  dump_map();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2e9b(%rip),%rax
mov    (%rax),%edi
call   1050 <load_symbols@plt>
mov    $0x0,%al
call   1040 <sort_symbols@plt>
mov    $0x0,%al
call   1030 <dump_map@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    0x2eb0(%rip),%rax
mov    (%rax),%edi
call   1050 <load_symbols@plt>
xor    %eax,%eax
call   1040 <sort_symbols@plt>
xor    %eax,%eax
call   1030 <dump_map@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@stdin = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = load i32, i32* @stdin
%7 = call i32 @load_symbols(i32 %6)
%8 = call i32 (...) @sort_symbols()
%9 = call i32 (...) @dump_map()
ret i32 0
}

LLVM IR (-O2):
@stdin = global i32 0
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = load i32, i32* @stdin
%4 = tail call i32 @load_symbols(i32 %3)
%5 = tail call i32 (...) @sort_symbols()
%6 = tail call i32 (...) @dump_map()
ret i32 0
}
double radDeg(double ang) {
  return ang / (3.14159265358979323846264338327950288 / 180.0);
}


x86 assembly (clang, -O0):
<radDeg>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  0xeea(%rip),%xmm1
divsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<radDeg>:
divsd  0xef8(%rip),%xmm0
ret

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

LLVM IR (-O2):
define double @radDeg(double %0) {
%2 = fdiv double %0, 0x3F91DF46A2529D39
ret double %2
}
/* Variables and functions */
int rand();
int randint(int low, int high, int seed) {
  int value = rand() % (high + 1 - low) + low;
  return value;
}


x86 assembly (clang, -O0):
<randint>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    $0x0,%al
call   1030 <rand@plt>
mov    -0x8(%rbp),%ecx
add    $0x1,%ecx
sub    -0x4(%rbp),%ecx
cltd
idiv   %ecx
add    -0x4(%rbp),%edx
mov    %edx,-0x10(%rbp)
mov    -0x10(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<randint>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
xor    %eax,%eax
call   1030 <rand@plt>
sub    %ebp,%ebx
add    $0x1,%ebx
cltd
idiv   %ebx
add    %edx,%ebp
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @randint(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%8 = call i32 (...) @rand()
%9 = load i32, i32* %5
%10 = add nsw i32 %9, 1
%11 = load i32, i32* %4
%12 = sub nsw i32 %10, %11
%13 = srem i32 %8, %12
%14 = load i32, i32* %4
%15 = add nsw i32 %13, %14
store i32 %15, i32* %7
%16 = load i32, i32* %7
ret i32 %16
}

LLVM IR (-O2):
define i32 @randint(i32 %0, i32 %1, i32 %2) {
%4 = tail call i32 (...) @rand()
%5 = sub i32 1, %0
%6 = add i32 %5, %1
%7 = srem i32 %4, %6
%8 = add nsw i32 %7, %0
ret i32 %8
}
/* Variables and functions */
int EXIT_SUCCESS;
int /*<<< orphan*/ printf(char *);
int main(int argc, char *argv[]) {
  printf("Hello!\n");
  return EXIT_SUCCESS;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xed3(%rip),%rdi
call   1030 <printf@plt>
mov    0x2ea7(%rip),%rax
mov    (%rax),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@EXIT_SUCCESS = global i32 0
@str = [7 x i8] c"Hello!\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @str, i64 0, i64 0))
%4 = load i32, i32* @EXIT_SUCCESS
ret i32 %4
}
int fibo(int num) {
  if (num < 2) {
    return num;
  }
  return (fibo(num - 1) + fibo(num - 2));
}


x86 assembly (clang, -O0):
<fibo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
cmpl   $0x2,-0x8(%rbp)
jge    1130 <fibo+0x20>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1153 <fibo+0x43>
mov    -0x8(%rbp),%edi
sub    $0x1,%edi
call   1030 <fibo@plt>
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%edi
sub    $0x2,%edi
call   1030 <fibo@plt>
mov    %eax,%ecx
mov    -0xc(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fibo>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebx
xor    %ebp,%ebp
cmp    $0x2,%edi
jge    1120 <fibo+0x10>
mov    %ebx,%ecx
jmp    1144 <fibo+0x34>
xor    %ebp,%ebp
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
lea    -0x1(%rbx),%edi
call   1030 <fibo@plt>
lea    -0x2(%rbx),%ecx
add    %eax,%ebp
cmp    $0x3,%ebx
mov    %ecx,%ebx
ja     1130 <fibo+0x20>
add    %ecx,%ebp
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @fibo(i32 %0) {
%2 = icmp slt i32 %0, 2
br i1 %2, label %11, label %3
3: ; preds = %1, %3
%4 = phi i32 [ %8, %3 ], [ %0, %1 ]
%5 = phi i32 [ %9, %3 ], [ 0, %1 ]
%6 = add nsw i32 %4, -1
%7 = tail call i32 @fibo(i32 %6)
%8 = add nsw i32 %4, -2
%9 = add nsw i32 %7, %5
%10 = icmp ult i32 %4, 4
br i1 %10, label %11, label %3
11: ; preds = %3, %1
%12 = phi i32 [ 0, %1 ], [ %9, %3 ]
%13 = phi i32 [ %0, %1 ], [ %8, %3 ]
%14 = add nsw i32 %13, %12
ret i32 %14
}
int compareAsc(const void *a, const void *b) { return *(int *)a > *(int *)b; }


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

x86 assembly (clang, -O2):
<compareAsc>:
mov    (%rdi),%ecx
xor    %eax,%eax
cmp    (%rsi),%ecx
setg   %al
ret

LLVM IR (-O0):
define i32 @compareAsc(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 = bitcast i8* %5 to i32*
%7 = load i32, i32* %6
%8 = load i8*, i8** %4
%9 = bitcast i8* %8 to i32*
%10 = load i32, i32* %9
%11 = icmp sgt i32 %7, %10
%12 = zext i1 %11 to i32
ret i32 %12
}

LLVM IR (-O2):
define i32 @compareAsc(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i32*
%4 = load i32, i32* %3
%5 = bitcast i8* %1 to i32*
%6 = load i32, i32* %5
%7 = icmp sgt i32 %4, %6
%8 = zext i1 %7 to i32
ret i32 %8
}
void pacemaker_to_heart_diastolic_pace() {}


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

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

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

LLVM IR (-O2):
define void @pacemaker_to_heart_diastolic_pace() {
ret void
}
/* Variables and functions */
scalar_t__ stdlib_base_is_nan(double const);
double stdlib_base_signum(const double x) {
  if (x == 0.0 || stdlib_base_is_nan(x)) {
    return x;
  }
  return (x < 0.0) ? -1.0 : 1.0;
}


x86 assembly (clang, -O0):
<stdlib_base_signum>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    113a <stdlib_base_signum+0x2a>
jp     113a <stdlib_base_signum+0x2a>
jmp    114e <stdlib_base_signum+0x3e>
movsd  -0x10(%rbp),%xmm0
call   1030 <stdlib_base_is_nan@plt>
cmp    $0x0,%rax
je     115d <stdlib_base_signum+0x4d>
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    118e <stdlib_base_signum+0x7e>
movsd  -0x10(%rbp),%xmm0
movsd  0xe96(%rip),%xmm3
movsd  0xe96(%rip),%xmm2
xorps  %xmm1,%xmm1
cmpltsd %xmm1,%xmm0
movaps %xmm0,%xmm1
andpd  %xmm3,%xmm1
andnpd %xmm2,%xmm0
orpd   %xmm1,%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<stdlib_base_signum>:
push   %rax
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    111f <stdlib_base_signum+0xf>
jp     111f <stdlib_base_signum+0xf>
pop    %rax
ret
movsd  %xmm0,(%rsp)
call   1030 <stdlib_base_is_nan@plt>
test   %rax,%rax
je     1135 <stdlib_base_signum+0x25>
movsd  (%rsp),%xmm0
pop    %rax
ret
xorpd  %xmm0,%xmm0
xor    %eax,%eax
ucomisd (%rsp),%xmm0
seta   %al
lea    0xeb6(%rip),%rcx
movsd  (%rcx,%rax,8),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @stdlib_base_signum(double %0) {
%2 = alloca double
%3 = alloca double
store double %0, double* %3
%4 = load double, double* %3
%5 = fcmp oeq double %4, 0.000000e+00
br i1 %5, label %10, label %6
6: ; preds = %1
%7 = load double, double* %3
%8 = call i64 @stdlib_base_is_nan(double %7)
%9 = icmp ne i64 %8, 0
br i1 %9, label %10, label %12
10: ; preds = %6, %1
%11 = load double, double* %3
store double %11, double* %2
br label %17
12: ; preds = %6
%13 = load double, double* %3
%14 = fcmp olt double %13, 0.000000e+00
%15 = zext i1 %14 to i64
%16 = select i1 %14, double -1.000000e+00, double 1.000000e+00
store double %16, double* %2
br label %17
17: ; preds = %12, %10
%18 = load double, double* %2
ret double %18
}

LLVM IR (-O2):
define double @stdlib_base_signum(double %0) {
%2 = fcmp oeq double %0, 0.000000e+00
br i1 %2, label %9, label %3
3: ; preds = %1
%4 = tail call i64 @stdlib_base_is_nan(double %0)
%5 = icmp eq i64 %4, 0
br i1 %5, label %6, label %9
6: ; preds = %3
%7 = fcmp olt double %0, 0.000000e+00
%8 = select i1 %7, double -1.000000e+00, double 1.000000e+00
br label %9
9: ; preds = %1, %3, %6
%10 = phi double [ %8, %6 ], [ %0, %3 ], [ %0, %1 ]
ret double %10
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char const *);
void HandleContent(void *cookie, const char *szString) {
  printf("contentHandler: '%s'\n", szString);
}


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

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

LLVM IR (-O0):
@.str = [22 x i8] c"contentHandler: '%s'\0A\00"
define void @HandleContent(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %4
%6 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i8* %5)
ret void
}

LLVM IR (-O2):
@.str = [22 x i8] c"contentHandler: '%s'\0A\00"
define void @HandleContent(i8* nocapture readnone %0, i8* %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i8* %1)
ret void
}
int soma(int a, int b) { return a + b; }


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

x86 assembly (clang, -O2):
<soma>:
lea    (%rdi,%rsi,1),%eax
ret

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

LLVM IR (-O2):
define i32 @soma(i32 %0, i32 %1) {
%3 = add nsw i32 %1, %0
ret i32 %3
}
void ff_hevc_put_hevc_uni_epel_hv32_8_sse4() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_uni_epel_hv32_8_sse4() {
ret void
}
/* Variables and functions */
double atof(char *);
int /*<<< orphan*/ printf(char *, double);
int main(void) {
  printf("%f\n", atof("123.45e-2"));
  printf("%f\n", atof("0.1e-2"));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xece(%rip),%rdi
call   1030 <atof@plt>
lea    0xebe(%rip),%rdi
call   1040 <printf@plt>
lea    0xec0(%rip),%rdi
call   1030 <atof@plt>
lea    0xea6(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xedc(%rip),%rdi
call   1030 <atof@plt>
lea    0xecc(%rip),%rbx
mov    %rbx,%rdi
call   1040 <printf@plt>
lea    0xecb(%rip),%rdi
call   1030 <atof@plt>
mov    %rbx,%rdi
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%f\0A\00"
@.str.1 = [10 x i8] c"123.45e-2\00"
@.str.2 = [7 x i8] c"0.1e-2\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call double @atof(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double %2)
%4 = call double @atof(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0))
%5 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double %4)
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%f\0A\00"
@.str.1 = [10 x i8] c"123.45e-2\00"
@.str.2 = [7 x i8] c"0.1e-2\00"
define i32 @main() {
%1 = tail call double @atof(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0))
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double %1)
%3 = tail call double @atof(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0))
%4 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double %3)
ret i32 0
}