xunge/DecIR huggingface dataset:
void rule_neural_act_print(const struct XCSF *xcsf, const struct Cl *c) {
  (void)xcsf;
  (void)c;
}


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

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

LLVM IR (-O0):
%struct.XCSF = type opaque
%struct.Cl = type opaque
define void @rule_neural_act_print(%struct.XCSF* %0, %struct.Cl* %1) {
%3 = alloca %struct.XCSF*
%4 = alloca %struct.Cl*
store %struct.XCSF* %0, %struct.XCSF** %3
store %struct.Cl* %1, %struct.Cl** %4
%5 = load %struct.XCSF*, %struct.XCSF** %3
%6 = load %struct.Cl*, %struct.Cl** %4
ret void
}

LLVM IR (-O2):
%struct.XCSF = type opaque
%struct.Cl = type opaque
define void @rule_neural_act_print(%struct.XCSF* nocapture %0, %struct.Cl* nocapture %1) {
ret void
}
/* Variables and functions */
char *hdate_string(int, int const, int const, int /*<<< orphan*/);
char *hdate_get_month_string(int const month, int const short_form) {
  return hdate_string(4, month, short_form, 0);
}


x86 assembly (clang, -O0):
<hdate_get_month_string>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
mov    $0x4,%edi
xor    %ecx,%ecx
call   1030 <hdate_string@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<hdate_get_month_string>:
mov    %esi,%edx
mov    %edi,%esi
mov    $0x4,%edi
xor    %ecx,%ecx
jmp    1030 <hdate_string@plt>

LLVM IR (-O0):
define i8* @hdate_get_month_string(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 i8* @hdate_string(i32 4, i32 %5, i32 %6, i32 0)
ret i8* %7
}

LLVM IR (-O2):
define i8* @hdate_get_month_string(i32 %0, i32 %1) {
%3 = tail call i8* @hdate_string(i32 4, i32 %0, i32 %1, i32 0)
ret i8* %3
}
int is_path_absolute(const char *path) { return (path[0] == '/'); }


x86 assembly (clang, -O0):
<is_path_absolute>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x2f,%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_path_absolute>:
xor    %eax,%eax
cmpb   $0x2f,(%rdi)
sete   %al
ret

LLVM IR (-O0):
define i32 @is_path_absolute(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = getelementptr inbounds i8, i8* %3, i64 0
%5 = load i8, i8* %4
%6 = sext i8 %5 to i32
%7 = icmp eq i32 %6, 47
%8 = zext i1 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
define i32 @is_path_absolute(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 47
%4 = zext i1 %3 to i32
ret i32 %4
}
int do_918() { return 918; }


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

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

LLVM IR (-O0):
define i32 @do_918() {
ret i32 918
}

LLVM IR (-O2):
define i32 @do_918() {
ret i32 918
}
void tempounits(t_num, t_denom) int *t_num, *t_denom;
{}


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

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

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

LLVM IR (-O2):
define void @tempounits(i32* nocapture %0, i32* nocapture %1) {
ret void
}
/* Variables and functions */
int wordBreak_recur(char *, char **, int);
bool word_break(char *s, char **wordDict, int wordDictSize) {
  return wordBreak_recur(s, wordDict, wordDictSize);
}


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

x86 assembly (clang, -O2):
<word_break>:
jmp    1030 <wordBreak_recur@plt>

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

LLVM IR (-O2):
define i32 @word_break(i8* %0, i8** %1, i32 %2) {
%4 = tail call i32 @wordBreak_recur(i8* %0, i8** %1, i32 %2)
ret i32 %4
}
/* Variables and functions */
char *malloc_wrapper_ret();
void use_ret() {
  char *v;
  v = malloc_wrapper_ret();
}


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

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

LLVM IR (-O0):
define void @use_ret() {
%1 = alloca i8*
%2 = call i8* (...) @malloc_wrapper_ret()
store i8* %2, i8** %1
ret void
}

LLVM IR (-O2):
define void @use_ret() {
%1 = tail call i8* (...) @malloc_wrapper_ret()
ret void
}
void ff_get_cpu_max_align_mips() {}


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

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

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

LLVM IR (-O2):
define void @ff_get_cpu_max_align_mips() {
ret void
}
void INT_Excep_ICU_IRQ12(void) {}


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

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

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

LLVM IR (-O2):
define void @INT_Excep_ICU_IRQ12() {
ret void
}
void set_count(void *array, int count) {
  *(int *)(array - sizeof(int)) = count;
}


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

x86 assembly (clang, -O2):
<set_count>:
mov    %esi,-0x4(%rdi)
ret

LLVM IR (-O0):
define void @set_count(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = load i8*, i8** %3
%7 = getelementptr i8, i8* %6, i64 -4
%8 = bitcast i8* %7 to i32*
store i32 %5, i32* %8
ret void
}

LLVM IR (-O2):
define void @set_count(i8* nocapture writeonly %0, i32 %1) {
%3 = getelementptr i8, i8* %0, i64 -4
%4 = bitcast i8* %3 to i32*
store i32 %1, i32* %4
ret void
}
float floorf(float x) { return 0.0; }


x86 assembly (clang, -O0):
<floorf>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
xorps  %xmm0,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<floorf>:
xorps  %xmm0,%xmm0
ret

LLVM IR (-O0):
define float @floorf(float %0) {
%2 = alloca float
store float %0, float* %2
ret float 0.000000e+00
}

LLVM IR (-O2):
define float @floorf(float %0) {
ret float 0.000000e+00
}
int main() {
  int valor = 13;
  int *ip;
  ip = &valor;
  printf("Endereco de valor (&): %x\n", &valor);
  printf("ip: %x\n", ip);
  printf("valor de *ip: %d\n", *ip);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0xd,-0x8(%rbp)
lea    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
lea    0xecb(%rip),%rdi
lea    -0x8(%rbp),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x10(%rbp),%rsi
lea    0xed0(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x10(%rbp),%rax
mov    (%rax),%esi
lea    0xec4(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
movl   $0xd,0xc(%rsp)
lea    0xedc(%rip),%rdi
lea    0xc(%rsp),%rbx
mov    %rbx,%rsi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xee1(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1030 <printf@plt>
mov    0xc(%rsp),%esi
lea    0xed4(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [27 x i8] c"Endereco de valor (&): %x\0A\00"
@.str.1 = [8 x i8] c"ip: %x\0A\00"
@.str.2 = [18 x i8] c"valor de *ip: %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32*
store i32 0, i32* %1
store i32 13, i32* %2
store i32* %2, i32** %3
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), i32* %2)
%5 = load i32*, i32** %3
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i32* %5)
%7 = load i32*, i32** %3
%8 = load i32, i32* %7
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.2, i64 0, i64 0), i32 %8)
ret i32 0
}

LLVM IR (-O2):
@.str = [27 x i8] c"Endereco de valor (&): %x\0A\00"
@.str.1 = [8 x i8] c"ip: %x\0A\00"
@.str.2 = [18 x i8] c"valor de *ip: %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
store i32 13, i32* %1
%3 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), i32* %1)
%4 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%5 = load i32, i32* %1
%6 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.2, i64 0, i64 0), i32 %5)
ret i32 0
}
/* Variables and functions */
int ERR_load_KDF_strings(void) { return 1; }


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

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

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

LLVM IR (-O2):
define i32 @ERR_load_KDF_strings() {
ret i32 1
}
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
uint8_t smpte_hbrmt_get_ext(const uint8_t *p_hbrmt) { return p_hbrmt[0] >> 4; }


x86 assembly (clang, -O0):
<smpte_hbrmt_get_ext>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
sar    $0x4,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<smpte_hbrmt_get_ext>:
mov    (%rdi),%eax
sar    $0x4,%eax
ret

LLVM IR (-O0):
define i32 @smpte_hbrmt_get_ext(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = getelementptr inbounds i32, i32* %3, i64 0
%5 = load i32, i32* %4
%6 = ashr i32 %5, 4
ret i32 %6
}

LLVM IR (-O2):
define i32 @smpte_hbrmt_get_ext(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = ashr i32 %2, 4
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ assert(char const *);
int hash(const char *str, int size) {
  int x = 0;
  assert(str);
  while (str[0]) {
    x = (x * 65599) + str[0];
    str++;
  }
  return x & (size - 1);
}


x86 assembly (clang, -O0):
<hash>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <assert@plt>
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     1160 <hash+0x50>
imul   $0x1003f,-0x10(%rbp),%eax
mov    -0x8(%rbp),%rcx
movsbl (%rcx),%ecx
add    %ecx,%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    112f <hash+0x1f>
mov    -0x10(%rbp),%eax
mov    -0xc(%rbp),%ecx
sub    $0x1,%ecx
and    %ecx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<hash>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %rdi,%rbx
call   1030 <assert@plt>
mov    (%rbx),%cl
test   %cl,%cl
je     1148 <hash+0x38>
add    $0x1,%rbx
xor    %eax,%eax
nopl   0x0(%rax)
imul   $0x1003f,%eax,%edx
movsbl %cl,%eax
add    %edx,%eax
movzbl (%rbx),%ecx
add    $0x1,%rbx
test   %cl,%cl
jne    1130 <hash+0x20>
jmp    114a <hash+0x3a>
xor    %eax,%eax
add    $0xffffffff,%ebp
and    %eax,%ebp
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @hash(i8* %0, i32 %1) {
%3 = tail call i32 @assert(i8* %0)
%4 = load i8, i8* %0
%5 = icmp eq i8 %4, 0
br i1 %5, label %16, label %6
6: ; preds = %2, %6
%7 = phi i8 [ %14, %6 ], [ %4, %2 ]
%8 = phi i32 [ %12, %6 ], [ 0, %2 ]
%9 = phi i8* [ %13, %6 ], [ %0, %2 ]
%10 = mul nsw i32 %8, 65599
%11 = sext i8 %7 to i32
%12 = add nsw i32 %10, %11
%13 = getelementptr inbounds i8, i8* %9, i64 1
%14 = load i8, i8* %13
%15 = icmp eq i8 %14, 0
br i1 %15, label %16, label %6
16: ; preds = %6, %2
%17 = phi i32 [ 0, %2 ], [ %12, %6 ]
%18 = add nsw i32 %1, -1
%19 = and i32 %17, %18
ret i32 %19
}
/* Variables and functions */
int /*<<< orphan*/ gettid();
int /*<<< orphan*/ printf(char *, int /*<<< orphan*/, int *, int);
int /*<<< orphan*/ pthread_exit(int /*<<< orphan*/ *);
int /*<<< orphan*/ sleep(int);
void *inc(void *arg) {
  int count = *(int *)arg;
  count++;
  printf("Thread : %lu, addr(count)=%p, count=%d\n", gettid(), &count, count);
  sleep(1);
  pthread_exit(NULL);
}


x86 assembly (clang, -O0):
<inc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
mov    $0x0,%al
call   1030 <gettid@plt>
mov    %eax,%esi
mov    -0x14(%rbp),%ecx
lea    0xe8f(%rip),%rdi
lea    -0x14(%rbp),%rdx
call   1040 <printf@plt>
mov    $0x1,%edi
call   1060 <sleep@plt>
xor    %eax,%eax
mov    %eax,%edi
call   1050 <pthread_exit@plt>
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<inc>:
push   %rbx
sub    $0x10,%rsp
mov    (%rdi),%ebx
add    $0x1,%ebx
mov    %ebx,0xc(%rsp)
xor    %eax,%eax
call   1030 <gettid@plt>
lea    0xea4(%rip),%rdi
lea    0xc(%rsp),%rdx
mov    %eax,%esi
mov    %ebx,%ecx
call   1040 <printf@plt>
mov    $0x1,%edi
call   1060 <sleep@plt>
xor    %edi,%edi
call   1050 <pthread_exit@plt>
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [40 x i8] c"Thread : %lu, addr(count)=%p, count=%d\0A\00"
define i8* @inc(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
%5 = load i8*, i8** %3
%6 = bitcast i8* %5 to i32*
%7 = load i32, i32* %6
store i32 %7, i32* %4
%8 = load i32, i32* %4
%9 = add nsw i32 %8, 1
store i32 %9, i32* %4
%10 = call i32 (...) @gettid()
%11 = load i32, i32* %4
%12 = call i32 @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0), i32 %10, i32* %4, i32 %11)
%13 = call i32 @sleep(i32 1)
%14 = call i32 @pthread_exit(i32* null)
%15 = load i8*, i8** %2
ret i8* %15
}

LLVM IR (-O2):
@.str = [40 x i8] c"Thread : %lu, addr(count)=%p, count=%d\0A\00"
define noalias i8* @inc(i8* nocapture %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
%4 = bitcast i8* %0 to i32*
%5 = load i32, i32* %4
%6 = add nsw i32 %5, 1
store i32 %6, i32* %2
%7 = tail call i32 (...) @gettid()
%8 = call i32 @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0), i32 %7, i32* %2, i32 %6)
%9 = call i32 @sleep(i32 1)
%10 = call i32 @pthread_exit(i32* null)
ret i8* undef
}
/* Type definitions */
typedef unsigned long volatile uint32_t;

/* Variables and functions */
uint32_t uDMAErrorStatusGet(void) {
  return ((*((volatile unsigned long *)(0x400FF04C))));
}


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

x86 assembly (clang, -O2):
<uDMAErrorStatusGet>:
mov    0x400ff04c,%rax
40
ret

LLVM IR (-O0):
define i64 @uDMAErrorStatusGet() {
%1 = load volatile i64, i64* inttoptr (i64 1074786380 to i64*)
ret i64 %1
}

LLVM IR (-O2):
define i64 @uDMAErrorStatusGet() {
%1 = load volatile i64, i64* inttoptr (i64 1074786380 to i64*)
ret i64 %1
}
/* Variables and functions */
int /*<<< orphan*/ returnValueFromMethod(int);
void interpretReturnNilFromMethod(int context) {
  returnValueFromMethod((0 << 2));
}


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

x86 assembly (clang, -O2):
<interpretReturnNilFromMethod>:
xor    %edi,%edi
jmp    1030 <returnValueFromMethod@plt>

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

LLVM IR (-O2):
define void @interpretReturnNilFromMethod(i32 %0) {
%2 = tail call i32 @returnValueFromMethod(i32 0)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ pthread_mutex_t;
typedef int /*<<< orphan*/ pthread_cond_t;

/* Variables and functions */
int /*<<< orphan*/ pthread_cond_destroy(int /*<<< orphan*/ *);
int /*<<< orphan*/ pthread_mutex_destroy(int /*<<< orphan*/ *);
void mutex_cond_fini(pthread_mutex_t *mutex, pthread_cond_t *cond) {
  pthread_mutex_destroy(mutex);
  pthread_cond_destroy(cond);
}


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

x86 assembly (clang, -O2):
<mutex_cond_fini>:
push   %rbx
mov    %rsi,%rbx
call   1030 <pthread_mutex_destroy@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1040 <pthread_cond_destroy@plt>

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

LLVM IR (-O2):
define void @mutex_cond_fini(i32* %0, i32* %1) {
%3 = tail call i32 @pthread_mutex_destroy(i32* %0)
%4 = tail call i32 @pthread_cond_destroy(i32* %1)
ret void
}
/* Variables and functions */
scalar_t__ exp(double);
double log(scalar_t__);
double logi_b(double x) {
  return x <= 0 ? log(1 + exp(x)) : x + log(1 + exp(-x));
}


x86 assembly (clang, -O0):
<logi_b>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
xorps  %xmm0,%xmm0
ucomisd -0x8(%rbp),%xmm0
jb     115b <logi_b+0x3b>
movsd  -0x8(%rbp),%xmm0
call   1030 <exp@plt>
mov    %rax,%rdi
add    $0x1,%rdi
call   1040 <log@plt>
movsd  %xmm0,-0x10(%rbp)
jmp    11a3 <logi_b+0x83>
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x8(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
call   1030 <exp@plt>
mov    %rax,%rdi
add    $0x1,%rdi
call   1040 <log@plt>
movaps %xmm0,%xmm1
movsd  -0x18(%rbp),%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<logi_b>:
sub    $0x18,%rsp
movapd %xmm0,%xmm1
xorpd  %xmm0,%xmm0
ucomisd %xmm1,%xmm0
jae    115b <logi_b+0x3b>
movapd 0xec6(%rip),%xmm0
xorpd  %xmm1,%xmm0
movapd %xmm1,(%rsp)
call   1030 <exp@plt>
lea    0x1(%rax),%rdi
call   1040 <log@plt>
addsd  (%rsp),%xmm0
add    $0x18,%rsp
ret
movapd %xmm1,%xmm0
call   1030 <exp@plt>
lea    0x1(%rax),%rdi
add    $0x18,%rsp
jmp    1040 <log@plt>

LLVM IR (-O0):
define double @logi_b(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fcmp ole double %3, 0.000000e+00
br i1 %4, label %5, label %10
5: ; preds = %1
%6 = load double, double* %2
%7 = call i64 @exp(double %6)
%8 = add nsw i64 1, %7
%9 = call double @log(i64 %8)
br label %18
10: ; preds = %1
%11 = load double, double* %2
%12 = load double, double* %2
%13 = fneg double %12
%14 = call i64 @exp(double %13)
%15 = add nsw i64 1, %14
%16 = call double @log(i64 %15)
%17 = fadd double %11, %16
br label %18
18: ; preds = %10, %5
%19 = phi double [ %9, %5 ], [ %17, %10 ]
ret double %19
}

LLVM IR (-O2):
define double @logi_b(double %0) {
%2 = fcmp ugt double %0, 0.000000e+00
br i1 %2, label %7, label %3
3: ; preds = %1
%4 = tail call i64 @exp(double %0)
%5 = add nsw i64 %4, 1
%6 = tail call double @log(i64 %5)
br label %13
7: ; preds = %1
%8 = fneg double %0
%9 = tail call i64 @exp(double %8)
%10 = add nsw i64 %9, 1
%11 = tail call double @log(i64 %10)
%12 = fadd double %11, %0
br label %13
13: ; preds = %7, %3
%14 = phi double [ %6, %3 ], [ %12, %7 ]
ret double %14
}
/* Type definitions */
struct uv__epoll_event {
  int dummy;
};

/* Variables and functions */
int syscall(int, int, int, int, struct uv__epoll_event *);
int uv__epoll_ctl(int epfd, int op, int fd, struct uv__epoll_event *events) {
  return syscall(233, epfd, op, fd, events);
}


x86 assembly (clang, -O0):
<uv__epoll_ctl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %rcx,-0x18(%rbp)
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
mov    -0xc(%rbp),%ecx
mov    -0x18(%rbp),%r8
mov    $0xe9,%edi
call   1030 <syscall@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<uv__epoll_ctl>:
mov    %rcx,%r8
mov    %edx,%ecx
mov    %esi,%edx
mov    %edi,%esi
mov    $0xe9,%edi
jmp    1030 <syscall@plt>

LLVM IR (-O0):
%struct.uv__epoll_event = type { i32 }
define i32 @uv__epoll_ctl(i32 %0, i32 %1, i32 %2, %struct.uv__epoll_event* %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca %struct.uv__epoll_event*
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store %struct.uv__epoll_event* %3, %struct.uv__epoll_event** %8
%9 = load i32, i32* %5
%10 = load i32, i32* %6
%11 = load i32, i32* %7
%12 = load %struct.uv__epoll_event*, %struct.uv__epoll_event** %8
%13 = call i32 @syscall(i32 233, i32 %9, i32 %10, i32 %11, %struct.uv__epoll_event* %12)
ret i32 %13
}

LLVM IR (-O2):
%struct.uv__epoll_event = type { i32 }
define i32 @uv__epoll_ctl(i32 %0, i32 %1, i32 %2, %struct.uv__epoll_event* %3) {
%5 = tail call i32 @syscall(i32 233, i32 %0, i32 %1, i32 %2, %struct.uv__epoll_event* %3)
ret i32 %5
}
void ARGB4444ToUVRow_NEON() {}


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

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

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

LLVM IR (-O2):
define void @ARGB4444ToUVRow_NEON() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ yogrt_set_interval2(int);
int iyogrt_set_interval2__(int *seconds) {
  yogrt_set_interval2(*seconds);
  return *seconds;
}


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

x86 assembly (clang, -O2):
<iyogrt_set_interval2__>:
push   %rbx
mov    %rdi,%rbx
mov    (%rdi),%edi
call   1030 <yogrt_set_interval2@plt>
mov    (%rbx),%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @iyogrt_set_interval2__(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = load i32, i32* %3
%5 = call i32 @yogrt_set_interval2(i32 %4)
%6 = load i32*, i32** %2
%7 = load i32, i32* %6
ret i32 %7
}

LLVM IR (-O2):
define i32 @iyogrt_set_interval2__(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = tail call i32 @yogrt_set_interval2(i32 %2)
%4 = load i32, i32* %0
ret i32 %4
}
/* Variables and functions */
bool chk_square(const double x, const double y) {
  if (y > 0.25 && y < 0.75 && x < 2.5 && x > 0.5) {
    return true;
  } else {
    return false;
  }
}


x86 assembly (clang, -O0):
<chk_square>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x10(%rbp)
movsd  %xmm1,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  0xee5(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    116e <chk_square+0x6e>
movsd  0xedb(%rip),%xmm0
ucomisd -0x18(%rbp),%xmm0
jbe    116e <chk_square+0x6e>
movsd  0xed0(%rip),%xmm0
ucomisd -0x10(%rbp),%xmm0
jbe    116e <chk_square+0x6e>
movsd  -0x10(%rbp),%xmm0
movsd  0xec0(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    116e <chk_square+0x6e>
movl   $0x1,-0x4(%rbp)
jmp    1175 <chk_square+0x75>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<chk_square>:
ucomisd 0xef8(%rip),%xmm1
seta   %al
movsd  0xef5(%rip),%xmm2
ucomisd %xmm1,%xmm2
seta   %cl
and    %al,%cl
movsd  0xeec(%rip),%xmm1
ucomisd %xmm0,%xmm1
seta   %al
ucomisd 0xee5(%rip),%xmm0
seta   %dl
and    %al,%dl
and    %cl,%dl
movzbl %dl,%eax
ret

LLVM IR (-O0):
define i32 @chk_square(double %0, double %1) {
%3 = alloca i32
%4 = alloca double
%5 = alloca double
store double %0, double* %4
store double %1, double* %5
%6 = load double, double* %5
%7 = fcmp ogt double %6, 2.500000e-01
br i1 %7, label %8, label %18
8: ; preds = %2
%9 = load double, double* %5
%10 = fcmp olt double %9, 7.500000e-01
br i1 %10, label %11, label %18
11: ; preds = %8
%12 = load double, double* %4
%13 = fcmp olt double %12, 2.500000e+00
br i1 %13, label %14, label %18
14: ; preds = %11
%15 = load double, double* %4
%16 = fcmp ogt double %15, 5.000000e-01
br i1 %16, label %17, label %18
17: ; preds = %14
store i32 1, i32* %3
br label %19
18: ; preds = %14, %11, %8, %2
store i32 0, i32* %3
br label %19
19: ; preds = %18, %17
%20 = load i32, i32* %3
ret i32 %20
}

LLVM IR (-O2):
define i32 @chk_square(double %0, double %1) {
%3 = fcmp ogt double %1, 2.500000e-01
%4 = fcmp olt double %1, 7.500000e-01
%5 = and i1 %3, %4
%6 = fcmp olt double %0, 2.500000e+00
%7 = and i1 %6, %5
%8 = fcmp ogt double %0, 5.000000e-01
%9 = and i1 %8, %7
%10 = zext i1 %9 to i32
ret i32 %10
}
int main(int argc, char **argv) {
  int sum = 0;
#pragma omp parallel for
  for (int i = 0; i < 100; i++)
    sum += i;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
cmpl   $0x64,-0x18(%rbp)
jge    1141 <main+0x41>
mov    -0x18(%rbp),%eax
add    -0x14(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    1120 <main+0x20>
mov    -0x4(%rbp),%eax
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
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 0, i32* %6
store i32 0, i32* %7
br label %8
8: ; preds = %15, %2
%9 = load i32, i32* %7
%10 = icmp slt i32 %9, 100
br i1 %10, label %11, label %18
11: ; preds = %8
%12 = load i32, i32* %7
%13 = load i32, i32* %6
%14 = add nsw i32 %13, %12
store i32 %14, i32* %6
br label %15
15: ; preds = %11
%16 = load i32, i32* %7
%17 = add nsw i32 %16, 1
store i32 %17, i32* %7
br label %8
18: ; preds = %8
%19 = load i32, i32* %3
ret i32 %19
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
ret i32 0
}
void btrfs_destroy_test_fs(void) {}


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

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

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

LLVM IR (-O2):
define void @btrfs_destroy_test_fs() {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ arr;

/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void f(int const arr[]) { printf("%zu\n", sizeof(arr)); }


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

x86 assembly (clang, -O2):
<f>:
lea    0xee9(%rip),%rdi
mov    $0x8,%esi
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [5 x i8] c"%zu\0A\00"
define void @f(i32* nocapture readnone %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 8)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Emit1(int);
void Emit4(int v) {
  Emit1(v & 0xFF);
  Emit1((v >> 8) & 0xFF);
  Emit1((v >> 16) & 0xFF);
  Emit1((v >> 24) & 0xFF);
}


x86 assembly (clang, -O0):
<Emit4>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
and    $0xff,%edi
call   1030 <Emit1@plt>
mov    -0x4(%rbp),%edi
sar    $0x8,%edi
and    $0xff,%edi
call   1030 <Emit1@plt>
mov    -0x4(%rbp),%edi
sar    $0x10,%edi
and    $0xff,%edi
call   1030 <Emit1@plt>
mov    -0x4(%rbp),%edi
sar    $0x18,%edi
and    $0xff,%edi
call   1030 <Emit1@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Emit4>:
push   %rbx
mov    %edi,%ebx
movzbl %bl,%edi
call   1030 <Emit1@plt>
movzbl %bh,%edi
call   1030 <Emit1@plt>
mov    %ebx,%eax
shr    $0x10,%eax
movzbl %al,%edi
call   1030 <Emit1@plt>
shr    $0x18,%ebx
mov    %ebx,%edi
pop    %rbx
jmp    1030 <Emit1@plt>

LLVM IR (-O0):
define void @Emit4(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = and i32 %3, 255
%5 = call i32 @Emit1(i32 %4)
%6 = load i32, i32* %2
%7 = ashr i32 %6, 8
%8 = and i32 %7, 255
%9 = call i32 @Emit1(i32 %8)
%10 = load i32, i32* %2
%11 = ashr i32 %10, 16
%12 = and i32 %11, 255
%13 = call i32 @Emit1(i32 %12)
%14 = load i32, i32* %2
%15 = ashr i32 %14, 24
%16 = and i32 %15, 255
%17 = call i32 @Emit1(i32 %16)
ret void
}

LLVM IR (-O2):
define void @Emit4(i32 %0) {
%2 = and i32 %0, 255
%3 = tail call i32 @Emit1(i32 %2)
%4 = lshr i32 %0, 8
%5 = and i32 %4, 255
%6 = tail call i32 @Emit1(i32 %5)
%7 = lshr i32 %0, 16
%8 = and i32 %7, 255
%9 = tail call i32 @Emit1(i32 %8)
%10 = lshr i32 %0, 24
%11 = tail call i32 @Emit1(i32 %10)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, double);
void printParamD(double d) { printf(" %.10G", d); }


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

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

LLVM IR (-O0):
@.str = [7 x i8] c" %.10G\00"
define void @printParamD(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), double %3)
ret void
}

LLVM IR (-O2):
@.str = [7 x i8] c" %.10G\00"
define void @printParamD(double %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), double %0)
ret void
}
/* Type definitions */
struct FormaGeometrica {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void disegnati_fg(const struct FormaGeometrica *buttalo) {
  printf("\n Non disegno nulla \n");
}


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

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

LLVM IR (-O0):
%struct.FormaGeometrica = type { i32 }
@.str = [22 x i8] c"\0A Non disegno nulla \0A\00"
define void @disegnati_fg(%struct.FormaGeometrica* %0) {
%2 = alloca %struct.FormaGeometrica*
store %struct.FormaGeometrica* %0, %struct.FormaGeometrica** %2
%3 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
%struct.FormaGeometrica = type { i32 }
@str = [21 x i8] c"\0A Non disegno nulla \00"
define void @disegnati_fg(%struct.FormaGeometrica* nocapture readnone %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printAns(int);
void doAdd(int a, int b) { printAns(a + b); }


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

x86 assembly (clang, -O2):
<doAdd>:
add    %esi,%edi
jmp    1030 <printAns@plt>

LLVM IR (-O0):
define void @doAdd(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
%8 = call i32 @printAns(i32 %7)
ret void
}

LLVM IR (-O2):
define void @doAdd(i32 %0, i32 %1) {
%3 = add nsw i32 %1, %0
%4 = tail call i32 @printAns(i32 %3)
ret void
}
void RTDbgAsModuleByName(void) {}


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

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

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

LLVM IR (-O2):
define void @RTDbgAsModuleByName() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ LOG_CRIT;
int /*<<< orphan*/ abort();
int /*<<< orphan*/ logx(int /*<<< orphan*/, char *, char const *, char const *,
                        unsigned int, int);
void __dm_type_assert_fail(const char *expected, int got, unsigned int line,
                           const char *function) {
  logx(LOG_CRIT, "assertion type=='%s' failed at %s:%d, got type==%X", expected,
       function, line, got);
  abort();
}


x86 assembly (clang, -O0):
<__dm_type_assert_fail>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %rcx,-0x18(%rbp)
mov    0x2eab(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
mov    -0x18(%rbp),%rcx
mov    -0x10(%rbp),%r8d
mov    -0xc(%rbp),%r9d
lea    0xeaa(%rip),%rsi
call   1040 <logx@plt>
mov    $0x0,%al
call   1030 <abort@plt>

x86 assembly (clang, -O2):
<__dm_type_assert_fail>:
push   %rax
mov    %edx,%r8d
mov    %esi,%r9d
mov    %rdi,%rdx
mov    0x2eb7(%rip),%rax
mov    (%rax),%edi
lea    0xec6(%rip),%rsi
call   1040 <logx@plt>
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
@LOG_CRIT = global i32 0
@.str = [51 x i8] c"assertion type=='%s' failed at %s:%d, got type==%X\00"
define void @__dm_type_assert_fail(i8* %0, i32 %1, i32 %2, i8* %3) {
%5 = alloca i8*
%6 = alloca i32
%7 = alloca i32
%8 = alloca i8*
store i8* %0, i8** %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i8* %3, i8** %8
%9 = load i32, i32* @LOG_CRIT
%10 = load i8*, i8** %5
%11 = load i8*, i8** %8
%12 = load i32, i32* %7
%13 = load i32, i32* %6
%14 = call i32 @logx(i32 %9, i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str, i64 0, i64 0), i8* %10, i8* %11, i32 %12, i32 %13)
%15 = call i32 (...) @abort()
unreachable
}

LLVM IR (-O2):
@LOG_CRIT = global i32 0
@.str = [51 x i8] c"assertion type=='%s' failed at %s:%d, got type==%X\00"
define void @__dm_type_assert_fail(i8* %0, i32 %1, i32 %2, i8* %3) {
%5 = load i32, i32* @LOG_CRIT
%6 = tail call i32 @logx(i32 %5, i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %3, i32 %2, i32 %1)
%7 = tail call i32 (...) @abort()
unreachable
}
int check_if_equal(char *str) {
  int i;
  i = -1;
  while (str[++i] != '\0')
    if (str[i] == '=')
      return (0);
  return (1);
}


x86 assembly (clang, -O0):
<check_if_equal>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
movl   $0xffffffff,-0x14(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x14(%rbp),%ecx
add    $0x1,%ecx
mov    %ecx,-0x14(%rbp)
movslq %ecx,%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
je     1152 <check_if_equal+0x52>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x3d,%eax
jne    114d <check_if_equal+0x4d>
movl   $0x0,-0x4(%rbp)
jmp    1159 <check_if_equal+0x59>
jmp    110f <check_if_equal+0xf>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<check_if_equal>:
movzbl (%rdi),%eax
test   %al,%al
je     1112 <check_if_equal+0x12>
add    $0x1,%rdi
cmp    $0x3d,%al
jne    1100 <check_if_equal>
xor    %eax,%eax
ret
mov    $0x1,%eax
ret

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

LLVM IR (-O2):
define i32 @check_if_equal(i8* nocapture %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i64 [ %4, %2 ], [ -1, %1 ]
%4 = add nsw i64 %3, 1
%5 = getelementptr inbounds i8, i8* %0, i64 %4
%6 = load i8, i8* %5
switch i8 %6, label %2 [
i8 0, label %8
i8 61, label %7
]
7: ; preds = %2
br label %8
8: ; preds = %2, %7
%9 = phi i32 [ 0, %7 ], [ 1, %2 ]
ret i32 %9
}
/* Variables and functions */
int branch_opcode(unsigned int);
int instr_is_branch_iform(unsigned int instr) {
  return branch_opcode(instr) == 18;
}


x86 assembly (clang, -O0):
<instr_is_branch_iform>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <branch_opcode@plt>
cmp    $0x12,%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<instr_is_branch_iform>:
push   %rax
call   1030 <branch_opcode@plt>
xor    %ecx,%ecx
cmp    $0x12,%eax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @instr_is_branch_iform(i32 %0) {
%2 = tail call i32 @branch_opcode(i32 %0)
%3 = icmp eq i32 %2, 18
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ console_to_spim();
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int yylex();
int read_token() {
  int token = yylex();
  if (token == 0) {
    console_to_spim();
    exit(0);
  } else {
    return (token);
  }
}


x86 assembly (clang, -O0):
<read_token>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <yylex@plt>
mov    %eax,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jne    115a <read_token+0x2a>
mov    $0x0,%al
call   1040 <console_to_spim@plt>
xor    %edi,%edi
call   1050 <exit@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<read_token>:
push   %rax
xor    %eax,%eax
call   1030 <yylex@plt>
test   %eax,%eax
je     113e <read_token+0xe>
pop    %rcx
ret
xor    %eax,%eax
call   1040 <console_to_spim@plt>
xor    %edi,%edi
call   1050 <exit@plt>

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

LLVM IR (-O2):
define i32 @read_token() {
%1 = tail call i32 (...) @yylex()
%2 = icmp eq i32 %1, 0
br i1 %2, label %3, label %6
3: ; preds = %0
%4 = tail call i32 (...) @console_to_spim()
%5 = tail call i32 @exit(i32 0)
unreachable
6: ; preds = %0
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void qclose(void *qp) { free(qp); }


x86 assembly (clang, -O0):
<qclose>:
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):
<qclose>:
jmp    1030 <free@plt>

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

LLVM IR (-O2):
define void @qclose(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ int32_t;

/* Variables and functions */
int /*<<< orphan*/ socket_error();
int32_t net_error(void) { return socket_error(); }


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

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

LLVM IR (-O0):
define i32 @net_error() {
%1 = call i32 (...) @socket_error()
ret i32 %1
}

LLVM IR (-O2):
define i32 @net_error() {
%1 = tail call i32 (...) @socket_error()
ret i32 %1
}
/* Type definitions */
typedef int uint8_t;
typedef int uint64_t;

/* Variables and functions */
uint64_t ntoh64(const uint8_t *src) {
  return (uint64_t)src[0] << 56 | (uint64_t)src[1] << 48 |
         (uint64_t)src[2] << 40 | (uint64_t)src[3] << 32 |
         (uint64_t)src[4] << 24 | (uint64_t)src[5] << 16 |
         (uint64_t)src[6] << 8 | src[7];
}


x86 assembly (clang, -O0):
<ntoh64>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    $0x38,%ecx
shl    %cl,%eax
mov    -0x8(%rbp),%rcx
mov    0x4(%rcx),%edx
mov    $0x30,%ecx
shl    %cl,%edx
mov    %edx,%ecx
or     %ecx,%eax
mov    -0x8(%rbp),%rcx
mov    0x8(%rcx),%edx
mov    $0x28,%ecx
shl    %cl,%edx
mov    %edx,%ecx
or     %ecx,%eax
mov    -0x8(%rbp),%rcx
mov    0xc(%rcx),%edx
mov    $0x20,%ecx
shl    %cl,%edx
mov    %edx,%ecx
or     %ecx,%eax
mov    -0x8(%rbp),%rcx
mov    0x10(%rcx),%ecx
shl    $0x18,%ecx
or     %ecx,%eax
mov    -0x8(%rbp),%rcx
mov    0x14(%rcx),%ecx
shl    $0x10,%ecx
or     %ecx,%eax
mov    -0x8(%rbp),%rcx
mov    0x18(%rcx),%ecx
shl    $0x8,%ecx
or     %ecx,%eax
mov    -0x8(%rbp),%rcx
or     0x1c(%rcx),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @ntoh64(i32* nocapture readnone %0) {
ret i32 poison
}
/* Type definitions */
typedef int /*<<< orphan*/ path;

/* Variables and functions */
int executable_exists(char *);
scalar_t__ get_cmd_path(char const *, int, char *);
int external_command_exists(const char cmd[]) {
  char path[4096];
  if (get_cmd_path(cmd, sizeof(path), path) == 0) {
    return executable_exists(path);
  }
  return 0;
}


x86 assembly (clang, -O0):
<external_command_exists>:
push   %rbp
mov    %rsp,%rbp
sub    $0x1010,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    -0x1010(%rbp),%rdx
mov    $0x1000,%esi
call   1040 <get_cmd_path@plt>
cmp    $0x0,%rax
jne    1162 <external_command_exists+0x42>
lea    -0x1010(%rbp),%rdi
call   1030 <executable_exists@plt>
mov    %eax,-0x4(%rbp)
jmp    1169 <external_command_exists+0x49>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x1010,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<external_command_exists>:
sub    $0x1008,%rsp
mov    %rsp,%rdx
mov    $0x1000,%esi
call   1040 <get_cmd_path@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
je     1146 <external_command_exists+0x26>
add    $0x1008,%rsp
ret
mov    %rsp,%rdi
call   1030 <executable_exists@plt>
add    $0x1008,%rsp
ret

LLVM IR (-O0):
define i32 @external_command_exists(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca [4096 x i8]
store i8* %0, i8** %3
%5 = load i8*, i8** %3
%6 = getelementptr inbounds [4096 x i8], [4096 x i8]* %4, i64 0, i64 0
%7 = call i64 @get_cmd_path(i8* %5, i32 4096, i8* %6)
%8 = icmp eq i64 %7, 0
br i1 %8, label %9, label %12
9: ; preds = %1
%10 = getelementptr inbounds [4096 x i8], [4096 x i8]* %4, i64 0, i64 0
%11 = call i32 @executable_exists(i8* %10)
store i32 %11, i32* %2
br label %13
12: ; preds = %1
store i32 0, i32* %2
br label %13
13: ; preds = %12, %9
%14 = load i32, i32* %2
ret i32 %14
}

LLVM IR (-O2):
define i32 @external_command_exists(i8* %0) {
%2 = alloca [4096 x i8]
%3 = getelementptr inbounds [4096 x i8], [4096 x i8]* %2, i64 0, i64 0
%4 = call i64 @get_cmd_path(i8* %0, i32 4096, i8* %3)
%5 = icmp eq i64 %4, 0
br i1 %5, label %6, label %8
6: ; preds = %1
%7 = call i32 @executable_exists(i8* %3)
br label %8
8: ; preds = %1, %6
%9 = phi i32 [ %7, %6 ], [ 0, %1 ]
ret i32 %9
}
int prints(int n, ...) { return n; }


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

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

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

LLVM IR (-O2):
define i32 @prints(i32 returned %0, ...) {
ret i32 %0
}
/* Type definitions */
struct Bot {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ Bot_dispose(struct Bot *);
int /*<<< orphan*/ Bot_start(struct Bot *);
void *run_bot(void *ptr) {
  struct Bot *bot = (struct Bot *)ptr;
  Bot_start(bot);
  Bot_dispose(bot);
  return NULL;
}


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

x86 assembly (clang, -O2):
<run_bot>:
push   %rbx
mov    %rdi,%rbx
call   1040 <Bot_start@plt>
mov    %rbx,%rdi
call   1030 <Bot_dispose@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
%struct.Bot = type { i32 }
define i8* @run_bot(i8* %0) {
%2 = alloca i8*
%3 = alloca %struct.Bot*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = bitcast i8* %4 to %struct.Bot*
store %struct.Bot* %5, %struct.Bot** %3
%6 = load %struct.Bot*, %struct.Bot** %3
%7 = call i32 @Bot_start(%struct.Bot* %6)
%8 = load %struct.Bot*, %struct.Bot** %3
%9 = call i32 @Bot_dispose(%struct.Bot* %8)
ret i8* null
}

LLVM IR (-O2):
%struct.Bot = type { i32 }
define noalias i8* @run_bot(i8* %0) {
%2 = bitcast i8* %0 to %struct.Bot*
%3 = tail call i32 @Bot_start(%struct.Bot* %2)
%4 = tail call i32 @Bot_dispose(%struct.Bot* %2)
ret i8* null
}