xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ func_3(int, char *, unsigned long);
void func_2(int a, char *b, unsigned long c) { func_3(a, b, c); }


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

x86 assembly (clang, -O2):
<func_2>:
jmp    1030 <func_3@plt>

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

LLVM IR (-O2):
define void @func_2(i32 %0, i8* %1, i64 %2) {
%4 = tail call i32 @func_3(i32 %0, i8* %1, i64 %2)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *, char *);
void lib_error(int code, char *s) {
  FILE *f;
  printf("%s\n", s);
  exit(code);
}


x86 assembly (clang, -O0):
<lib_error>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rsi
lea    0xec6(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<lib_error>:
push   %rbx
mov    %edi,%ebx
lea    0xed6(%rip),%rdi
call   1030 <printf@plt>
mov    %ebx,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"%s\0A\00"
define void @lib_error(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i32*
store i32 %0, i32* %3
store i8* %1, i8** %4
%6 = load i8*, i8** %4
%7 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %6)
%8 = load i32, i32* %3
%9 = call i32 @exit(i32 %8)
unreachable
}

LLVM IR (-O2):
@.str = [4 x i8] c"%s\0A\00"
define void @lib_error(i32 %0, i8* %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %1)
%4 = tail call i32 @exit(i32 %0)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
main() {
  int yas;
  yas = 10;
  printf("\n %d", yas);
}


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

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

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

LLVM IR (-O2):
@.str = [5 x i8] c"\0A %d\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 10)
ret i32 0
}
/* Variables and functions */
double floor(double);
double Double_floor(double x) { return floor(x); }


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

x86 assembly (clang, -O2):
<Double_floor>:
jmp    1030 <floor@plt>

LLVM IR (-O0):
define double @Double_floor(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = call double @llvm.floor.f64(double %3)
ret double %4
}

LLVM IR (-O2):
define double @Double_floor(double %0) {
%2 = tail call double @llvm.floor.f64(double %0)
ret double %2
}
int security_inode_create(struct inode *dir, struct dentry *dentry, int mode) {
  return 0;
}


x86 assembly (clang, -O0):
<security_inode_create>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.inode = type opaque
%struct.dentry = type opaque
define i32 @security_inode_create(%struct.inode* %0, %struct.dentry* %1, i32 %2) {
%4 = alloca %struct.inode*
%5 = alloca %struct.dentry*
%6 = alloca i32
store %struct.inode* %0, %struct.inode** %4
store %struct.dentry* %1, %struct.dentry** %5
store i32 %2, i32* %6
ret i32 0
}

LLVM IR (-O2):
%struct.inode = type opaque
%struct.dentry = type opaque
define i32 @security_inode_create(%struct.inode* nocapture readnone %0, %struct.dentry* nocapture readnone %1, i32 %2) {
ret i32 0
}
unsigned idx_left(unsigned idx) { return 2 * idx + 1; }


x86 assembly (clang, -O0):
<idx_left>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shl    $0x1,%eax
add    $0x1,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<idx_left>:
lea    (%rdi,%rdi,1),%eax
add    $0x1,%eax
ret

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

LLVM IR (-O2):
define i32 @idx_left(i32 %0) {
%2 = shl i32 %0, 1
%3 = or i32 %2, 1
ret i32 %3
}
int double_cmp(const void *a, const void *b) {
  const double *fa = a, *fb = b;
  const double ret = *fa - *fb;
  return (ret > 0) - (ret < 0);
}


x86 assembly (clang, -O0):
<double_cmp>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x20(%rbp),%rax
subsd  (%rax),%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x28(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
seta   %al
and    $0x1,%al
movzbl %al,%eax
xorps  %xmm0,%xmm0
ucomisd -0x28(%rbp),%xmm0
seta   %cl
and    $0x1,%cl
movzbl %cl,%ecx
sub    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<double_cmp>:
movsd  (%rdi),%xmm0
subsd  (%rsi),%xmm0
xorpd  %xmm1,%xmm1
xor    %eax,%eax
ucomisd %xmm1,%xmm0
seta   %al
xor    %ecx,%ecx
ucomisd %xmm0,%xmm1
seta   %cl
sub    %ecx,%eax
ret

LLVM IR (-O0):
define i32 @double_cmp(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca double*
%6 = alloca double*
%7 = alloca double
store i8* %0, i8** %3
store i8* %1, i8** %4
%8 = load i8*, i8** %3
%9 = bitcast i8* %8 to double*
store double* %9, double** %5
%10 = load i8*, i8** %4
%11 = bitcast i8* %10 to double*
store double* %11, double** %6
%12 = load double*, double** %5
%13 = load double, double* %12
%14 = load double*, double** %6
%15 = load double, double* %14
%16 = fsub double %13, %15
store double %16, double* %7
%17 = load double, double* %7
%18 = fcmp ogt double %17, 0.000000e+00
%19 = zext i1 %18 to i32
%20 = load double, double* %7
%21 = fcmp olt double %20, 0.000000e+00
%22 = zext i1 %21 to i32
%23 = sub nsw i32 %19, %22
ret i32 %23
}

LLVM IR (-O2):
define i32 @double_cmp(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to double*
%4 = bitcast i8* %1 to double*
%5 = load double, double* %3
%6 = load double, double* %4
%7 = fsub double %5, %6
%8 = fcmp ogt double %7, 0.000000e+00
%9 = zext i1 %8 to i32
%10 = fcmp olt double %7, 0.000000e+00
%11 = sext i1 %10 to i32
%12 = add nsw i32 %11, %9
ret i32 %12
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ bit_set(int /*<<< orphan*/ *, int, int);
void bit_ones(uint32_t *bitmap, int bits) {
  int i;
  for (i = 0; i < bits; i++)
    bit_set(bitmap, i, 1);
}


x86 assembly (clang, -O0):
<bit_ones>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1151 <bit_ones+0x41>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%esi
mov    $0x1,%edx
call   1030 <bit_set@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1126 <bit_ones+0x16>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bit_ones>:
push   %rbp
push   %r14
push   %rbx
test   %esi,%esi
jle    1136 <bit_ones+0x26>
mov    %esi,%ebx
mov    %rdi,%r14
xor    %ebp,%ebp
nop
mov    %r14,%rdi
mov    %ebp,%esi
mov    $0x1,%edx
call   1030 <bit_set@plt>
add    $0x1,%ebp
cmp    %ebp,%ebx
jne    1120 <bit_ones+0x10>
pop    %rbx
pop    %r14
pop    %rbp
ret

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

LLVM IR (-O2):
define void @bit_ones(i32* %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %9
4: ; preds = %2, %4
%5 = phi i32 [ %7, %4 ], [ 0, %2 ]
%6 = tail call i32 @bit_set(i32* %0, i32 %5, i32 1)
%7 = add nuw nsw i32 %5, 1
%8 = icmp eq i32 %7, %1
br i1 %8, label %9, label %4
9: ; preds = %4, %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ assert(int /*<<< orphan*/);
int yesno(const char *fmt, ...) {
  assert(0);
  return 0;
}


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

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

LLVM IR (-O0):
define i32 @yesno(i8* %0, ...) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 @assert(i32 0)
ret i32 0
}

LLVM IR (-O2):
define i32 @yesno(i8* nocapture readnone %0, ...) {
%2 = tail call i32 @assert(i32 0)
ret i32 0
}
/* Variables and functions */
scalar_t__ RAND_MAX;
scalar_t__ rand();
double RandomReal(double low, double high) {
  double d;
  d = (double)rand() / ((double)RAND_MAX + 1);
  return (low + d * (high - low));
}


x86 assembly (clang, -O0):
<RandomReal>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
mov    $0x0,%al
call   1030 <rand@plt>
cvtsi2sd %rax,%xmm0
mov    0x2eb3(%rip),%rax
cvtsi2sdq (%rax),%xmm1
movsd  0xebe(%rip),%xmm2
addsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x8(%rbp),%xmm1
movsd  -0x18(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm2
subsd  -0x8(%rbp),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<RandomReal>:
sub    $0x18,%rsp
movsd  %xmm1,0x10(%rsp)
movsd  %xmm0,0x8(%rsp)
xor    %eax,%eax
call   1030 <rand@plt>
cvtsi2sd %rax,%xmm2
mov    0x2eb5(%rip),%rax
xorps  %xmm1,%xmm1
cvtsi2sdq (%rax),%xmm1
addsd  0xebd(%rip),%xmm1
divsd  %xmm1,%xmm2
movsd  0x10(%rsp),%xmm0
movsd  0x8(%rsp),%xmm1
subsd  %xmm1,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
@RAND_MAX = global i64 0
define double @RandomReal(double %0, double %1) {
%3 = alloca double
%4 = alloca double
%5 = alloca double
store double %0, double* %3
store double %1, double* %4
%6 = call i64 (...) @rand()
%7 = sitofp i64 %6 to double
%8 = load i64, i64* @RAND_MAX
%9 = sitofp i64 %8 to double
%10 = fadd double %9, 1.000000e+00
%11 = fdiv double %7, %10
store double %11, double* %5
%12 = load double, double* %3
%13 = load double, double* %5
%14 = load double, double* %4
%15 = load double, double* %3
%16 = fsub double %14, %15
%17 = call double @llvm.fmuladd.f64(double %13, double %16, double %12)
ret double %17
}

LLVM IR (-O2):
@RAND_MAX = global i64 0
define double @RandomReal(double %0, double %1) {
%3 = tail call i64 (...) @rand()
%4 = sitofp i64 %3 to double
%5 = load i64, i64* @RAND_MAX
%6 = sitofp i64 %5 to double
%7 = fadd double %6, 1.000000e+00
%8 = fdiv double %4, %7
%9 = fsub double %1, %0
%10 = tail call double @llvm.fmuladd.f64(double %8, double %9, double %0)
ret double %10
}
void time_it_cleanup(void) {}


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

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

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

LLVM IR (-O2):
define void @time_it_cleanup() {
ret void
}
/* Variables and functions */
char *realpath(char const *, char *);
char *get_absolute_path_with_fallback(char *buffer, const char *supplied_path,
                                      const char *fallback_path) {
  const char *path;
  if (supplied_path != NULL) {
    path = supplied_path;
  } else {
    path = fallback_path;
  }
  return realpath(path, buffer);
}


x86 assembly (clang, -O0):
<get_absolute_path_with_fallback>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     113c <get_absolute_path_with_fallback+0x2c>
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
jmp    1144 <get_absolute_path_with_fallback+0x34>
mov    -0x18(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1030 <realpath@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_absolute_path_with_fallback>:
mov    %rdi,%rax
test   %rsi,%rsi
cmovne %rsi,%rdx
mov    %rdx,%rdi
mov    %rax,%rsi
jmp    1030 <realpath@plt>

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

LLVM IR (-O2):
define i8* @get_absolute_path_with_fallback(i8* %0, i8* %1, i8* nocapture %2) {
%4 = icmp eq i8* %1, null
%5 = select i1 %4, i8* %2, i8* %1
%6 = tail call i8* @realpath(i8* %5, i8* %0)
ret i8* %6
}
void wifi_evt_sme_connect_retry(
    const struct wifi_msg_sme_connect_retry_evt_t *msg) {}


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

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

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

LLVM IR (-O2):
%struct.wifi_msg_sme_connect_retry_evt_t = type opaque
define void @wifi_evt_sme_connect_retry(%struct.wifi_msg_sme_connect_retry_evt_t* nocapture %0) {
ret void
}
void __DELETE_java_util_Hashtable_Entry(void *me, void *client_data) {}


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

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

LLVM IR (-O0):
define void @__DELETE_java_util_Hashtable_Entry(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
ret void
}

LLVM IR (-O2):
define void @__DELETE_java_util_Hashtable_Entry(i8* nocapture %0, i8* nocapture %1) {
ret void
}
int execute_mq_notify() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @execute_mq_notify() {
ret i32 0
}
/* Variables and functions */
int foo(int);
int bar() { return foo(1); }


x86 assembly (clang, -O0):
<bar>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%edi
call   1030 <foo@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<bar>:
mov    $0x1,%edi
jmp    1030 <foo@plt>

LLVM IR (-O0):
define i32 @bar() {
%1 = call i32 @foo(i32 1)
ret i32 %1
}

LLVM IR (-O2):
define i32 @bar() {
%1 = tail call i32 @foo(i32 1)
ret i32 %1
}
/* Type definitions */
struct RNAheat_args_info {
  int dummy;
};

/* Variables and functions */
int EXIT_SUCCESS;
int RNAheat_cmdline_parser_required(struct RNAheat_args_info *args_info,
                                    const char *prog_name) {
  (void)(args_info);
  (void)(prog_name);
  return EXIT_SUCCESS;
}


x86 assembly (clang, -O0):
<RNAheat_cmdline_parser_required>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2ecd(%rip),%rax
mov    (%rax),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<RNAheat_cmdline_parser_required>:
mov    0x2ed9(%rip),%rax
mov    (%rax),%eax
ret

LLVM IR (-O0):
%struct.RNAheat_args_info = type { i32 }
@EXIT_SUCCESS = global i32 0
define i32 @RNAheat_cmdline_parser_required(%struct.RNAheat_args_info* %0, i8* %1) {
%3 = alloca %struct.RNAheat_args_info*
%4 = alloca i8*
store %struct.RNAheat_args_info* %0, %struct.RNAheat_args_info** %3
store i8* %1, i8** %4
%5 = load %struct.RNAheat_args_info*, %struct.RNAheat_args_info** %3
%6 = load i8*, i8** %4
%7 = load i32, i32* @EXIT_SUCCESS
ret i32 %7
}

LLVM IR (-O2):
%struct.RNAheat_args_info = type { i32 }
@EXIT_SUCCESS = global i32 0
define i32 @RNAheat_cmdline_parser_required(%struct.RNAheat_args_info* nocapture readnone %0, i8* nocapture readnone %1) {
%3 = load i32, i32* @EXIT_SUCCESS
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
void sig_term_h(int sno) { exit(0); }


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

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

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

LLVM IR (-O2):
define void @sig_term_h(i32 %0) {
%2 = tail call i32 @exit(i32 0)
unreachable
}
int __attribute__((visibility("default"))) func2(void) { return 42; }


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

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

LLVM IR (-O0):
define i32 @func2() {
ret i32 42
}

LLVM IR (-O2):
define i32 @func2() {
ret i32 42
}
/* Variables and functions */
int /*<<< orphan*/ _llprint(char *);
int _kill(int pid, int sig) {
  _llprint("\nKill called! This is bad situation!");
  (void)pid;
  (void)sig;
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [37 x i8] c"\0AKill called! This is bad situation!\00"
define i32 @_kill(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = call i32 @_llprint(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0))
%6 = load i32, i32* %3
%7 = load i32, i32* %4
ret i32 0
}

LLVM IR (-O2):
@.str = [37 x i8] c"\0AKill called! This is bad situation!\00"
define i32 @_kill(i32 %0, i32 %1) {
%3 = tail call i32 @_llprint(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
char *strchr(char *, char);
void delnewline(char *string) {
  char *p = strchr(string, '\r');
  if (p)
    *p = 0;
  else
    p = strchr(string, '\n');
  if (p)
    *p = 0;
}


x86 assembly (clang, -O0):
<delnewline>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0xd,%esi
call   1030 <strchr@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     1145 <delnewline+0x35>
mov    -0x10(%rbp),%rax
movb   $0x0,(%rax)
jmp    1157 <delnewline+0x47>
mov    -0x8(%rbp),%rdi
mov    $0xa,%esi
call   1030 <strchr@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     1169 <delnewline+0x59>
mov    -0x10(%rbp),%rax
movb   $0x0,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<delnewline>:
push   %rbx
mov    %rdi,%rbx
mov    $0xd,%esi
call   1030 <strchr@plt>
test   %rax,%rax
je     1128 <delnewline+0x18>
movb   $0x0,(%rax)
jmp    113a <delnewline+0x2a>
mov    %rbx,%rdi
mov    $0xa,%esi
call   1030 <strchr@plt>
test   %rax,%rax
je     113d <delnewline+0x2d>
movb   $0x0,(%rax)
pop    %rbx
ret

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

LLVM IR (-O2):
define void @delnewline(i8* %0) {
%2 = tail call i8* @strchr(i8* dereferenceable(1) %0, i8 signext 13)
%3 = icmp eq i8* %2, null
br i1 %3, label %5, label %4
4: ; preds = %1
store i8 0, i8* %2
br label %8
5: ; preds = %1
%6 = tail call i8* @strchr(i8* dereferenceable(1) %0, i8 signext 10)
%7 = icmp eq i8* %6, null
br i1 %7, label %10, label %8
8: ; preds = %4, %5
%9 = phi i8* [ %2, %4 ], [ %6, %5 ]
store i8 0, i8* %9
br label %10
10: ; preds = %8, %5
ret void
}
void av_register_bitstream_filter() {}


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

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

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

LLVM IR (-O2):
define void @av_register_bitstream_filter() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ set_io_bit(int, int /*<<< orphan*/);
void TOSH_MAKE_RADIO_CCA_OUTPUT() { set_io_bit(-6, 0); }


x86 assembly (clang, -O0):
<TOSH_MAKE_RADIO_CCA_OUTPUT>:
push   %rbp
mov    %rsp,%rbp
mov    $0xfffffffa,%edi
xor    %esi,%esi
call   1030 <set_io_bit@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<TOSH_MAKE_RADIO_CCA_OUTPUT>:
mov    $0xfffffffa,%edi
xor    %esi,%esi
jmp    1030 <set_io_bit@plt>

LLVM IR (-O0):
define void @TOSH_MAKE_RADIO_CCA_OUTPUT() {
%1 = call i32 @set_io_bit(i32 -6, i32 0)
ret void
}

LLVM IR (-O2):
define void @TOSH_MAKE_RADIO_CCA_OUTPUT() {
%1 = tail call i32 @set_io_bit(i32 -6, i32 0)
ret void
}
/* Type definitions */
struct testbench_time_unit {
  int dummy;
};
struct testbench_statistics {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/
fprint_testbench_statistics(int /*<<< orphan*/, char const *,
                            struct testbench_statistics const *,
                            struct testbench_time_unit const *);
int /*<<< orphan*/ stdout;
void print_testbench_statistics(const char *title,
                                const struct testbench_statistics *stat,
                                const struct testbench_time_unit *unit) {
  fprint_testbench_statistics(stdout, title, stat, unit);
}


x86 assembly (clang, -O0):
<print_testbench_statistics>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    -0x18(%rbp),%rcx
call   1030 <fprint_testbench_statistics@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_testbench_statistics>:
mov    %rdx,%rcx
mov    %rsi,%rdx
mov    %rdi,%rsi
mov    0x2ec0(%rip),%rax
mov    (%rax),%edi
jmp    1030 <fprint_testbench_statistics@plt>

LLVM IR (-O0):
%struct.testbench_statistics = type { i32 }
%struct.testbench_time_unit = type { i32 }
@stdout = global i32 0
define void @print_testbench_statistics(i8* %0, %struct.testbench_statistics* %1, %struct.testbench_time_unit* %2) {
%4 = alloca i8*
%5 = alloca %struct.testbench_statistics*
%6 = alloca %struct.testbench_time_unit*
store i8* %0, i8** %4
store %struct.testbench_statistics* %1, %struct.testbench_statistics** %5
store %struct.testbench_time_unit* %2, %struct.testbench_time_unit** %6
%7 = load i32, i32* @stdout
%8 = load i8*, i8** %4
%9 = load %struct.testbench_statistics*, %struct.testbench_statistics** %5
%10 = load %struct.testbench_time_unit*, %struct.testbench_time_unit** %6
%11 = call i32 @fprint_testbench_statistics(i32 %7, i8* %8, %struct.testbench_statistics* %9, %struct.testbench_time_unit* %10)
ret void
}

LLVM IR (-O2):
%struct.testbench_statistics = type { i32 }
%struct.testbench_time_unit = type { i32 }
@stdout = global i32 0
define void @print_testbench_statistics(i8* %0, %struct.testbench_statistics* %1, %struct.testbench_time_unit* %2) {
%4 = load i32, i32* @stdout
%5 = tail call i32 @fprint_testbench_statistics(i32 %4, i8* %0, %struct.testbench_statistics* %1, %struct.testbench_time_unit* %2)
ret void
}
int up_smp_call_function(void (*func)(void *), void *info) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @up_smp_call_function(void (i8*)* nocapture readnone %0, i8* nocapture readnone %1) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isalpha(int);
void t_isalpha_0x03() {
  Assert_real((isalpha(3) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isalpha.c",
              20, ("isalpha should be 0 for 0x03"));
}


x86 assembly (clang, -O0):
<t_isalpha_0x03>:
push   %rbp
mov    %rsp,%rbp
mov    $0x3,%edi
call   1030 <isalpha@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xebf(%rip),%rsi
mov    $0x14,%edx
lea    0xf5b(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_isalpha_0x03>:
push   %rax
mov    $0x3,%edi
call   1030 <isalpha@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x14,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isalpha.c\00"
@.str.1 = [29 x i8] c"isalpha should be 0 for 0x03\00"
define void @t_isalpha_0x03() {
%1 = call i64 @isalpha(i32 3)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 20, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isalpha.c\00"
@.str.1 = [29 x i8] c"isalpha should be 0 for 0x03\00"
define void @t_isalpha_0x03() {
%1 = tail call i64 @isalpha(i32 3)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 20, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
int /*<<< orphan*/ sync();
void dprint(char *msg) {
  fprintf(stderr, "%s\n", msg);
  sync();
}


x86 assembly (clang, -O0):
<dprint>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ead(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xec0(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x0,%al
call   1040 <sync@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dprint>:
push   %rax
mov    %rdi,%rdx
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <sync@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [4 x i8] c"%s\0A\00"
define void @dprint(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 ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = call i32 (...) @sync()
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [4 x i8] c"%s\0A\00"
define void @dprint(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = tail call i32 (...) @sync()
ret void
}
void w_quick_sort_int_assign(void *data, int i, int j) {
  int *ints = (int *)data;
  ints[i] = ints[j];
}


x86 assembly (clang, -O0):
<w_quick_sort_int_assign>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,4),%edx
mov    -0x18(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
pop    %rbp
ret

x86 assembly (clang, -O2):
<w_quick_sort_int_assign>:
movslq %edx,%rax
mov    (%rdi,%rax,4),%eax
movslq %esi,%rcx
mov    %eax,(%rdi,%rcx,4)
ret

LLVM IR (-O0):
define void @w_quick_sort_int_assign(i8* %0, i32 %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32*
store i8* %0, i8** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%8 = load i8*, i8** %4
%9 = bitcast i8* %8 to i32*
store i32* %9, i32** %7
%10 = load i32*, i32** %7
%11 = load i32, i32* %6
%12 = sext i32 %11 to i64
%13 = getelementptr inbounds i32, i32* %10, i64 %12
%14 = load i32, i32* %13
%15 = load i32*, i32** %7
%16 = load i32, i32* %5
%17 = sext i32 %16 to i64
%18 = getelementptr inbounds i32, i32* %15, i64 %17
store i32 %14, i32* %18
ret void
}

LLVM IR (-O2):
define void @w_quick_sort_int_assign(i8* nocapture %0, i32 %1, i32 %2) {
%4 = bitcast i8* %0 to i32*
%5 = sext i32 %2 to i64
%6 = getelementptr inbounds i32, i32* %4, i64 %5
%7 = load i32, i32* %6
%8 = sext i32 %1 to i64
%9 = getelementptr inbounds i32, i32* %4, i64 %8
store i32 %7, i32* %9
ret void
}
/* Type definitions */
struct frequency_limit {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(struct frequency_limit *);
void frequency_limit_free(struct frequency_limit *f) { free(f); }


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

x86 assembly (clang, -O2):
<frequency_limit_free>:
jmp    1030 <free@plt>

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

LLVM IR (-O2):
%struct.frequency_limit = type { i32 }
define void @frequency_limit_free(%struct.frequency_limit* nocapture %0) {
%2 = tail call i32 @free(%struct.frequency_limit* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
char *world();
int main() {
  printf("hello, %s\n", world());
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <world@plt>
mov    %rax,%rsi
lea    0xec0(%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 <world@plt>
lea    0xed1(%rip),%rdi
mov    %rax,%rsi
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [11 x i8] c"hello, %s\0A\00"
define i32 @main() {
%1 = tail call i8* (...) @world()
%2 = tail call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %1)
ret i32 0
}
/* Type definitions */
struct timespec {
  int dummy;
};
typedef int /*<<< orphan*/ clockid_t;

/* Variables and functions */
int /*<<< orphan*/ __NR_clock_gettime;
int syscall(int /*<<< orphan*/, int /*<<< orphan*/, struct timespec *);
int sys_clock_gettime(clockid_t id, struct timespec *ts) {
  return syscall(__NR_clock_gettime, id, ts);
}


x86 assembly (clang, -O0):
<sys_clock_gettime>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2eca(%rip),%rax
mov    (%rax),%edi
mov    -0x4(%rbp),%esi
mov    -0x10(%rbp),%rdx
call   1030 <syscall@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sys_clock_gettime>:
mov    %rsi,%rdx
mov    %edi,%esi
mov    0x2ed4(%rip),%rax
mov    (%rax),%edi
jmp    1030 <syscall@plt>

LLVM IR (-O0):
%struct.timespec = type { i32 }
@__NR_clock_gettime = global i32 0
define i32 @sys_clock_gettime(i32 %0, %struct.timespec* %1) {
%3 = alloca i32
%4 = alloca %struct.timespec*
store i32 %0, i32* %3
store %struct.timespec* %1, %struct.timespec** %4
%5 = load i32, i32* @__NR_clock_gettime
%6 = load i32, i32* %3
%7 = load %struct.timespec*, %struct.timespec** %4
%8 = call i32 @syscall(i32 %5, i32 %6, %struct.timespec* %7)
ret i32 %8
}

LLVM IR (-O2):
%struct.timespec = type { i32 }
@__NR_clock_gettime = global i32 0
define i32 @sys_clock_gettime(i32 %0, %struct.timespec* %1) {
%3 = load i32, i32* @__NR_clock_gettime
%4 = tail call i32 @syscall(i32 %3, i32 %0, %struct.timespec* %1)
ret i32 %4
}
int disparos(int a) {
  if (a == 0)
    return 0;
  else
    return 1;
}


x86 assembly (clang, -O0):
<disparos>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jne    111d <disparos+0x1d>
movl   $0x0,-0x4(%rbp)
jmp    1124 <disparos+0x24>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<disparos>:
xor    %eax,%eax
test   %edi,%edi
setne  %al
ret

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

LLVM IR (-O2):
define i32 @disparos(i32 %0) {
%2 = icmp ne i32 %0, 0
%3 = zext i1 %2 to i32
ret i32 %3
}
void swap_int_4(int *tni4) {
  *tni4 = (((*tni4 >> 24) & 0xff) | ((*tni4 & 0xff) << 24) |
           ((*tni4 >> 8) & 0xff00) | ((*tni4 & 0xff00) << 8));
}


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

x86 assembly (clang, -O2):
<swap_int_4>:
mov    (%rdi),%eax
bswap  %eax
mov    %eax,(%rdi)
ret

LLVM IR (-O0):
define void @swap_int_4(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = load i32, i32* %3
%5 = ashr i32 %4, 24
%6 = and i32 %5, 255
%7 = load i32*, i32** %2
%8 = load i32, i32* %7
%9 = and i32 %8, 255
%10 = shl i32 %9, 24
%11 = or i32 %6, %10
%12 = load i32*, i32** %2
%13 = load i32, i32* %12
%14 = ashr i32 %13, 8
%15 = and i32 %14, 65280
%16 = or i32 %11, %15
%17 = load i32*, i32** %2
%18 = load i32, i32* %17
%19 = and i32 %18, 65280
%20 = shl i32 %19, 8
%21 = or i32 %16, %20
%22 = load i32*, i32** %2
store i32 %21, i32* %22
ret void
}

LLVM IR (-O2):
define void @swap_int_4(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = tail call i32 @llvm.bswap.i32(i32 %2)
store i32 %3, i32* %0
ret void
}
void PySCLang_VM_sendMain(const char *cstr) {}


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

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

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

LLVM IR (-O2):
define void @PySCLang_VM_sendMain(i8* nocapture %0) {
ret void
}
/* Variables and functions */
int syscall(int, unsigned int);
unsigned alarm(unsigned seconds) { return syscall(27, seconds); }


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

x86 assembly (clang, -O2):
<alarm>:
mov    %edi,%esi
mov    $0x1b,%edi
jmp    1030 <syscall@plt>

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

LLVM IR (-O2):
define i32 @alarm(i32 %0) {
%2 = tail call i32 @syscall(i32 27, i32 %0)
ret i32 %2
}
/* Type definitions */
typedef int pid_t;

/* Variables and functions */
bool ignore_proc(pid_t pid) {
  if (pid == 1)
    return true;
  return false;
}


x86 assembly (clang, -O0):
<ignore_proc>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x1,-0x8(%rbp)
jne    111d <ignore_proc+0x1d>
movl   $0x1,-0x4(%rbp)
jmp    1124 <ignore_proc+0x24>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ignore_proc>:
xor    %eax,%eax
cmp    $0x1,%edi
sete   %al
ret

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

LLVM IR (-O2):
define i32 @ignore_proc(i32 %0) {
%2 = icmp eq i32 %0, 1
%3 = zext i1 %2 to i32
ret i32 %3
}
/* Type definitions */
typedef int /*<<< orphan*/ pthread_condattr_t;

/* Variables and functions */
int /*<<< orphan*/ pthread_noop_access(int /*<<< orphan*/ *);
extern int pthread_condattr_destroy(pthread_condattr_t *pcondattr) {
  pthread_noop_access(pcondattr);
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @pthread_condattr_destroy(i32* %0) {
%2 = tail call i32 @pthread_noop_access(i32* %0)
ret i32 0
}
/* Variables and functions */
size_t inserirAlgarismNumericoInt(char **, size_t, unsigned short);
size_t inserirAlgarismNumericoChar(char **string, size_t alloc, char algarism) {
  return inserirAlgarismNumericoInt(string, alloc,
                                    (unsigned short)(algarism - 0x30));
}


x86 assembly (clang, -O0):
<inserirAlgarismNumericoChar>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %dl,%al
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %al,-0x11(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
movsbl -0x11(%rbp),%eax
sub    $0x30,%eax
movzwl %ax,%edx
call   1030 <inserirAlgarismNumericoInt@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<inserirAlgarismNumericoChar>:
add    $0xffffffd0,%edx
movzwl %dx,%edx
jmp    1030 <inserirAlgarismNumericoInt@plt>

LLVM IR (-O0):
define i64 @inserirAlgarismNumericoChar(i8** %0, i64 %1, i8 signext %2) {
%4 = alloca i8**
%5 = alloca i64
%6 = alloca i8
store i8** %0, i8*** %4
store i64 %1, i64* %5
store i8 %2, i8* %6
%7 = load i8**, i8*** %4
%8 = load i64, i64* %5
%9 = load i8, i8* %6
%10 = sext i8 %9 to i32
%11 = sub nsw i32 %10, 48
%12 = trunc i32 %11 to i16
%13 = call i64 @inserirAlgarismNumericoInt(i8** %7, i64 %8, i16 zeroext %12)
ret i64 %13
}

LLVM IR (-O2):
define i64 @inserirAlgarismNumericoChar(i8** %0, i64 %1, i8 signext %2) {
%4 = sext i8 %2 to i16
%5 = add nsw i16 %4, -48
%6 = tail call i64 @inserirAlgarismNumericoInt(i8** %0, i64 %1, i16 zeroext %5)
ret i64 %6
}
unsigned long long f2(__attribute__((vector_size(16))) unsigned int a) {
  return a[(1234 == 4321 ? 3 : 0)];
}


x86 assembly (clang, -O0):
<f2>:
push   %rbp
mov    %rsp,%rbp
movaps %xmm0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
mov    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f2>:
movd   %xmm0,%eax
ret

LLVM IR (-O0):
define i64 @f2(<4 x i32> %0) {
%2 = alloca <4 x i32>
store <4 x i32> %0, <4 x i32>* %2
%3 = load <4 x i32>, <4 x i32>* %2
%4 = extractelement <4 x i32> %3, i32 0
%5 = zext i32 %4 to i64
ret i64 %5
}

LLVM IR (-O2):
define i64 @f2(<4 x i32> %0) {
%2 = extractelement <4 x i32> %0, i64 0
%3 = zext i32 %2 to i64
ret i64 %3
}
/* Variables and functions */
int /*<<< orphan*/ err_log(int, int, char *, char *);
void main_io_errhandler(int level, char *msg) {
  err_log(level, 0x00000400, "%s", msg);
}


x86 assembly (clang, -O0):
<main_io_errhandler>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rcx
mov    $0x400,%esi
lea    0xece(%rip),%rdx
call   1030 <err_log@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main_io_errhandler>:
mov    %rsi,%rcx
lea    0xee6(%rip),%rdx
mov    $0x400,%esi
jmp    1030 <err_log@plt>

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

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
define void @main_io_errhandler(i32 %0, i8* %1) {
%3 = tail call i32 @err_log(i32 %0, i32 1024, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %1)
ret void
}
/* Variables and functions */
long long __ocml_round_f32(float);
long long int llroundf(float x) { return __ocml_round_f32(x); }


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

x86 assembly (clang, -O2):
<llroundf>:
jmp    1030 <__ocml_round_f32@plt>

LLVM IR (-O0):
define i64 @llroundf(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = call i64 @__ocml_round_f32(float %3)
ret i64 %4
}

LLVM IR (-O2):
define i64 @llroundf(float %0) {
%2 = tail call i64 @__ocml_round_f32(float %0)
ret i64 %2
}
/* Variables and functions */
int strlen(char *);
int verificaPais(char *pais) {
  int tamPais = strlen(pais);
  if (pais == NULL || tamPais == 0 || tamPais >= 80)
    return 0;
  return 1;
}


x86 assembly (clang, -O0):
<verificaPais>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,-0x14(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     1147 <verificaPais+0x37>
cmpl   $0x0,-0x14(%rbp)
je     1147 <verificaPais+0x37>
cmpl   $0x50,-0x14(%rbp)
jl     1153 <verificaPais+0x43>
movl   $0x0,-0x4(%rbp)
jmp    115a <verificaPais+0x4a>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<verificaPais>:
push   %rbx
mov    %rdi,%rbx
call   1030 <strlen@plt>
test   %rbx,%rbx
setne  %cl
test   %eax,%eax
setne  %dl
and    %cl,%dl
cmp    $0x50,%eax
setl   %al
and    %dl,%al
movzbl %al,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @verificaPais(i8* %0) {
%2 = tail call i32 @strlen(i8* %0)
%3 = icmp ne i8* %0, null
%4 = icmp ne i32 %2, 0
%5 = select i1 %3, i1 %4, i1 false
%6 = icmp slt i32 %2, 80
%7 = select i1 %5, i1 %6, i1 false
%8 = zext i1 %7 to i32
ret i32 %8
}
void EchoP$Leds$led2Toggle(void) { LedsP$Leds$led2Toggle(); }


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

x86 assembly (clang, -O2):
<EchoP$Leds$led2Toggle>:
xor    %eax,%eax
jmp    1030 <LedsP$Leds$led2Toggle@plt>

LLVM IR (-O0):
define void @"EchoP$Leds$led2Toggle"() {
%1 = call i32 (...) @"LedsP$Leds$led2Toggle"()
ret void
}

LLVM IR (-O2):
define void @"EchoP$Leds$led2Toggle"() {
%1 = tail call i32 (...) @"LedsP$Leds$led2Toggle"()
ret void
}