xunge/DecIR huggingface dataset:
/* Variables and functions */
scalar_t__ strlen(char *);
size_t _get_string_list_size(char **list, int count) {
  int i;
  size_t total = 0;
  for (i = 0; i < count; i++)
    total += strlen(list[i]) + 1;
  return total;
}


x86 assembly (clang, -O0):
<_get_string_list_size>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movq   $0x0,-0x18(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1165 <_get_string_list_size+0x55>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1030 <strlen@plt>
add    $0x1,%rax
add    -0x18(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    112e <_get_string_list_size+0x1e>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_get_string_list_size>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
test   %esi,%esi
jle    114b <_get_string_list_size+0x3b>
mov    %rdi,%r14
mov    %esi,%r15d
xor    %ebx,%ebx
xor    %r12d,%r12d
nopw   0x0(%rax,%rax,1)
mov    (%r14,%rbx,8),%rdi
call   1030 <strlen@plt>
add    %rax,%r12
add    $0x1,%r12
add    $0x1,%rbx
cmp    %rbx,%r15
jne    1130 <_get_string_list_size+0x20>
jmp    114e <_get_string_list_size+0x3e>
xor    %r12d,%r12d
mov    %r12,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define i64 @_get_string_list_size(i8** nocapture %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %16
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %6
6: ; preds = %4, %6
%7 = phi i64 [ 0, %4 ], [ %14, %6 ]
%8 = phi i64 [ 0, %4 ], [ %13, %6 ]
%9 = getelementptr inbounds i8*, i8** %0, i64 %7
%10 = load i8*, i8** %9
%11 = tail call i64 @strlen(i8* dereferenceable(1) %10)
%12 = add i64 %8, 1
%13 = add i64 %12, %11
%14 = add nuw nsw i64 %7, 1
%15 = icmp eq i64 %14, %5
br i1 %15, label %16, label %6
16: ; preds = %6, %2
%17 = phi i64 [ 0, %2 ], [ %13, %6 ]
ret i64 %17
}
/* Variables and functions */
int /*<<< orphan*/ systick_init_int(int);
void systick_init_milli(void) { systick_init_int(72 * 1000); }


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

x86 assembly (clang, -O2):
<systick_init_milli>:
mov    $0x11940,%edi
jmp    1030 <systick_init_int@plt>

LLVM IR (-O0):
define void @systick_init_milli() {
%1 = call i32 @systick_init_int(i32 72000)
ret void
}

LLVM IR (-O2):
define void @systick_init_milli() {
%1 = tail call i32 @systick_init_int(i32 72000)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ rem_off();
void v0() { rem_off(); }


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

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

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

LLVM IR (-O2):
define void @v0() {
%1 = tail call i32 (...) @rem_off()
ret void
}
/* Variables and functions */
int strncmp(char *, char *, int);
int t11(void) { return strncmp("foo", "bar", 3); }


x86 assembly (clang, -O0):
<t11>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
lea    0xee2(%rip),%rsi
mov    $0x3,%edx
call   1030 <strncmp@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t11>:
lea    0xee9(%rip),%rdi
lea    0xee6(%rip),%rsi
mov    $0x3,%edx
jmp    1030 <strncmp@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"foo\00"
@.str.1 = [4 x i8] c"bar\00"
define i32 @t11() {
%1 = call i32 @strncmp(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 3)
ret i32 %1
}

LLVM IR (-O2):
@.str = [4 x i8] c"foo\00"
@.str.1 = [4 x i8] c"bar\00"
define i32 @t11() {
%1 = tail call i32 @strncmp(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 3)
ret i32 %1
}
/* Type definitions */
struct stack_st_OPENSSL_BLOCK {
  int dummy;
};
typedef int /*<<< orphan*/ OPENSSL_STACK;

/* Variables and functions */
int OPENSSL_sk_push(int /*<<< orphan*/ *, void const *);
int sk_OPENSSL_BLOCK_push(struct stack_st_OPENSSL_BLOCK *sk, void *ptr) {
  return OPENSSL_sk_push((OPENSSL_STACK *)sk, (const void *)ptr);
}


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

x86 assembly (clang, -O2):
<sk_OPENSSL_BLOCK_push>:
jmp    1030 <OPENSSL_sk_push@plt>

LLVM IR (-O0):
%struct.stack_st_OPENSSL_BLOCK = type { i32 }
define i32 @sk_OPENSSL_BLOCK_push(%struct.stack_st_OPENSSL_BLOCK* %0, i8* %1) {
%3 = alloca %struct.stack_st_OPENSSL_BLOCK*
%4 = alloca i8*
store %struct.stack_st_OPENSSL_BLOCK* %0, %struct.stack_st_OPENSSL_BLOCK** %3
store i8* %1, i8** %4
%5 = load %struct.stack_st_OPENSSL_BLOCK*, %struct.stack_st_OPENSSL_BLOCK** %3
%6 = bitcast %struct.stack_st_OPENSSL_BLOCK* %5 to i32*
%7 = load i8*, i8** %4
%8 = call i32 @OPENSSL_sk_push(i32* %6, i8* %7)
ret i32 %8
}

LLVM IR (-O2):
%struct.stack_st_OPENSSL_BLOCK = type { i32 }
define i32 @sk_OPENSSL_BLOCK_push(%struct.stack_st_OPENSSL_BLOCK* %0, i8* %1) {
%3 = getelementptr %struct.stack_st_OPENSSL_BLOCK, %struct.stack_st_OPENSSL_BLOCK* %0, i64 0, i32 0
%4 = tail call i32 @OPENSSL_sk_push(i32* %3, i8* %1)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(void) {
  printf("Hi  Earth\n");
  while (1) {
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeda(%rip),%rdi
call   1030 <printf@plt>
jmp    112b <main+0x1b>

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
nopl   (%rax)
jmp    1120 <main+0x10>

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

LLVM IR (-O2):
@str = [10 x i8] c"Hi Earth\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @str, i64 0, i64 0))
br label %2
2: ; preds = %0, %2
br label %2
}
q(a, b, c, d, e, f, g, h, j) { return a + b + c + d + e + f + g + h + j; }


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

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

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

LLVM IR (-O2):
define i32 @q(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5, i32 %6, i32 %7, i32 %8) {
%10 = add nsw i32 %1, %0
%11 = add nsw i32 %10, %2
%12 = add nsw i32 %11, %3
%13 = add nsw i32 %12, %4
%14 = add nsw i32 %13, %5
%15 = add nsw i32 %14, %6
%16 = add nsw i32 %15, %7
%17 = add nsw i32 %16, %8
ret i32 %17
}
/* Variables and functions */
int /*<<< orphan*/ getenv(char *);
int /*<<< orphan*/ puts(int /*<<< orphan*/);
int main(void) {
  puts(getenv("PATH"));
  return 0;
}


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

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

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

LLVM IR (-O2):
@.str = [5 x i8] c"PATH\00"
define i32 @main() {
%1 = tail call i32 @getenv(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @puts(i32 %1)
ret i32 0
}
/* Variables and functions */
int S_IRUSR;
int S_IWUSR;
int __gen_tempname(char *, int, int /*<<< orphan*/, int, int);
int mkstemps64(char *template, int suffixlen) {
  return __gen_tempname(template, 1, 0, suffixlen, S_IRUSR | S_IWUSR);
}


x86 assembly (clang, -O0):
<mkstemps64>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%ecx
mov    0x2eab(%rip),%rax
mov    (%rax),%r8d
mov    0x2eb1(%rip),%rax
or     (%rax),%r8d
mov    $0x1,%esi
xor    %edx,%edx
call   1030 <__gen_tempname@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mkstemps64>:
mov    %esi,%ecx
mov    0x2ebf(%rip),%rax
mov    0x2ec8(%rip),%rdx
mov    (%rdx),%r8d
or     (%rax),%r8d
mov    $0x1,%esi
xor    %edx,%edx
jmp    1030 <__gen_tempname@plt>

LLVM IR (-O0):
@S_IRUSR = global i32 0
@S_IWUSR = global i32 0
define i32 @mkstemps64(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i8*, i8** %3
%6 = load i32, i32* %4
%7 = load i32, i32* @S_IRUSR
%8 = load i32, i32* @S_IWUSR
%9 = or i32 %7, %8
%10 = call i32 @__gen_tempname(i8* %5, i32 1, i32 0, i32 %6, i32 %9)
ret i32 %10
}

LLVM IR (-O2):
@S_IRUSR = global i32 0
@S_IWUSR = global i32 0
define i32 @mkstemps64(i8* %0, i32 %1) {
%3 = load i32, i32* @S_IRUSR
%4 = load i32, i32* @S_IWUSR
%5 = or i32 %4, %3
%6 = tail call i32 @__gen_tempname(i8* %0, i32 1, i32 0, i32 %1, i32 %5)
ret i32 %6
}
void wcnss_allow_suspend(void) {}


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

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

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

LLVM IR (-O2):
define void @wcnss_allow_suspend() {
ret void
}
/* Variables and functions */
char *ksearch(char const *, char *);
int hlength(const char *header, int lhead) {
  char *hend;
  hend = ksearch(header, "END");
  return (hend + 80 - header);
}


x86 assembly (clang, -O0):
<hlength>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xed6(%rip),%rsi
call   1030 <ksearch@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
add    $0x50,%rax
mov    -0x8(%rbp),%rcx
sub    %rcx,%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<hlength>:
push   %rbx
mov    %rdi,%rbx
lea    0xee5(%rip),%rsi
call   1030 <ksearch@plt>
sub    %ebx,%eax
add    $0x50,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [4 x i8] c"END\00"
define i32 @hlength(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i8*
store i8* %0, i8** %3
store i32 %1, i32* %4
%6 = load i8*, i8** %3
%7 = call i8* @ksearch(i8* %6, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
store i8* %7, i8** %5
%8 = load i8*, i8** %5
%9 = getelementptr inbounds i8, i8* %8, i64 80
%10 = load i8*, i8** %3
%11 = ptrtoint i8* %9 to i64
%12 = ptrtoint i8* %10 to i64
%13 = sub i64 %11, %12
%14 = trunc i64 %13 to i32
ret i32 %14
}

LLVM IR (-O2):
@.str = [4 x i8] c"END\00"
define i32 @hlength(i8* %0, i32 %1) {
%3 = tail call i8* @ksearch(i8* %0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%4 = getelementptr inbounds i8, i8* %3, i64 80
%5 = ptrtoint i8* %4 to i64
%6 = ptrtoint i8* %0 to i64
%7 = sub i64 %5, %6
%8 = trunc i64 %7 to i32
ret i32 %8
}
/* Variables and functions */
double sqrt(double);
double Func_Sqrt(double *oplist, unsigned int numops) {
  return sqrt(oplist[0]);
}


x86 assembly (clang, -O0):
<Func_Sqrt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm0
call   1030 <sqrt@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Func_Sqrt>:
movsd  (%rdi),%xmm0
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jb     1123 <Func_Sqrt+0x13>
sqrtsd %xmm0,%xmm0
ret
jmp    1030 <sqrt@plt>

LLVM IR (-O0):
define double @Func_Sqrt(double* %0, i32 %1) {
%3 = alloca double*
%4 = alloca i32
store double* %0, double** %3
store i32 %1, i32* %4
%5 = load double*, double** %3
%6 = getelementptr inbounds double, double* %5, i64 0
%7 = load double, double* %6
%8 = call double @sqrt(double %7)
ret double %8
}

LLVM IR (-O2):
define double @Func_Sqrt(double* nocapture %0, i32 %1) {
%3 = load double, double* %0
%4 = tail call double @sqrt(double %3)
ret double %4
}
/* Variables and functions */
int rand();
int /*<<< orphan*/ srand(unsigned int);
scalar_t__ time(int /*<<< orphan*/ *);
aleatorio(int limite, int semilla) {
  int valor;
  if (semilla != 0)
    srand((unsigned int)time(NULL));
  valor = rand() % limite;
  return (valor);
}


x86 assembly (clang, -O0):
<aleatorio>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
je     1158 <aleatorio+0x28>
xor    %eax,%eax
mov    %eax,%edi
call   1040 <time@plt>
mov    %eax,%edi
call   1030 <srand@plt>
mov    $0x0,%al
call   1050 <rand@plt>
cltd
idivl  -0x4(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<aleatorio>:
push   %rbx
mov    %edi,%ebx
test   %esi,%esi
je     1145 <aleatorio+0x15>
xor    %edi,%edi
call   1040 <time@plt>
mov    %eax,%edi
call   1030 <srand@plt>
xor    %eax,%eax
call   1050 <rand@plt>
cltd
idiv   %ebx
mov    %edx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @aleatorio(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = load i32, i32* %4
%7 = icmp ne i32 %6, 0
br i1 %7, label %8, label %12
8: ; preds = %2
%9 = call i64 @time(i32* null)
%10 = trunc i64 %9 to i32
%11 = call i32 @srand(i32 %10)
br label %12
12: ; preds = %8, %2
%13 = call i32 (...) @rand()
%14 = load i32, i32* %3
%15 = srem i32 %13, %14
store i32 %15, i32* %5
%16 = load i32, i32* %5
ret i32 %16
}

LLVM IR (-O2):
define i32 @aleatorio(i32 %0, i32 %1) {
%3 = icmp eq i32 %1, 0
br i1 %3, label %8, label %4
4: ; preds = %2
%5 = tail call i64 @time(i32* null)
%6 = trunc i64 %5 to i32
%7 = tail call i32 @srand(i32 %6)
br label %8
8: ; preds = %4, %2
%9 = tail call i32 (...) @rand()
%10 = srem i32 %9, %0
ret i32 %10
}
void __DELETE_java_lang_reflect_Array(void *me, void *client_data) {}


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

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

LLVM IR (-O0):
define void @__DELETE_java_lang_reflect_Array(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_lang_reflect_Array(i8* nocapture %0, i8* nocapture %1) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int sha1_self_test(void) {
  printf("SHA-1 self-test not available\n\n");
  return (1);
}


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

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

LLVM IR (-O0):
@.str = [32 x i8] c"SHA-1 self-test not available\0A\0A\00"
define i32 @sha1_self_test() {
%1 = call i32 @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0))
ret i32 1
}

LLVM IR (-O2):
@str = [31 x i8] c"SHA-1 self-test not available\0A\00"
define i32 @sha1_self_test() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @str, i64 0, i64 0))
ret i32 1
}
/* Type definitions */
struct sockaddr_in {
  int dummy;
};
struct sockaddr {
  int dummy;
};

/* Variables and functions */
int sendto(int, char *, int, int /*<<< orphan*/, struct sockaddr *, int);
int fh_udp_send(int s, void *buf, int nbytes, struct sockaddr_in *to) {
  return sendto(s, (char *)buf, nbytes, 0, (struct sockaddr *)to,
                sizeof(struct sockaddr_in));
}


x86 assembly (clang, -O0):
<fh_udp_send>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
mov    -0x20(%rbp),%r8
xor    %ecx,%ecx
mov    $0x4,%r9d
call   1030 <sendto@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fh_udp_send>:
mov    %rcx,%r8
xor    %ecx,%ecx
mov    $0x4,%r9d
jmp    1030 <sendto@plt>

LLVM IR (-O0):
%struct.sockaddr_in = type { i32 }
%struct.sockaddr = type { i32 }
define i32 @fh_udp_send(i32 %0, i8* %1, i32 %2, %struct.sockaddr_in* %3) {
%5 = alloca i32
%6 = alloca i8*
%7 = alloca i32
%8 = alloca %struct.sockaddr_in*
store i32 %0, i32* %5
store i8* %1, i8** %6
store i32 %2, i32* %7
store %struct.sockaddr_in* %3, %struct.sockaddr_in** %8
%9 = load i32, i32* %5
%10 = load i8*, i8** %6
%11 = load i32, i32* %7
%12 = load %struct.sockaddr_in*, %struct.sockaddr_in** %8
%13 = bitcast %struct.sockaddr_in* %12 to %struct.sockaddr*
%14 = call i32 @sendto(i32 %9, i8* %10, i32 %11, i32 0, %struct.sockaddr* %13, i32 4)
ret i32 %14
}

LLVM IR (-O2):
%struct.sockaddr_in = type { i32 }
%struct.sockaddr = type { i32 }
define i32 @fh_udp_send(i32 %0, i8* %1, i32 %2, %struct.sockaddr_in* %3) {
%5 = bitcast %struct.sockaddr_in* %3 to %struct.sockaddr*
%6 = tail call i32 @sendto(i32 %0, i8* %1, i32 %2, i32 0, %struct.sockaddr* %5, i32 4)
ret i32 %6
}
char *hash_plugin_detailed(void) {
  return ("bfunix - bcrypt (Blowfish) plugin\n"
          "------------------------\n"
          "Use this module to crack shadow passwords\n"
          "Input should be in form: \'user:hash\' or just \'hash\'. shadow "
          "files are acceptable\n"
          "Known software that uses this password hashing method:\n"
          "SUSE-based distributions, some Unix-like operating systems\n"
          "\nAuthor: Milen Rangelov <gat3way@gat3way.eu>\n");
}


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

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

LLVM IR (-O0):
@.str = [342 x i8] c"bfunix - bcrypt (Blowfish) plugin\0A------------------------\0AUse this module to crack shadow passwords\0AInput should be in form: 'user:hash' or just 'hash'. shadow files are acceptable\0AKnown software that uses this password hashing method:\0ASUSE-based distributions, some Unix-like operating systems\0A\0AAuthor: Milen Rangelov <gat3way@gat3way.eu>\0A\00"
define i8* @hash_plugin_detailed() {
ret i8* getelementptr inbounds ([342 x i8], [342 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [342 x i8] c"bfunix - bcrypt (Blowfish) plugin\0A------------------------\0AUse this module to crack shadow passwords\0AInput should be in form: 'user:hash' or just 'hash'. shadow files are acceptable\0AKnown software that uses this password hashing method:\0ASUSE-based distributions, some Unix-like operating systems\0A\0AAuthor: Milen Rangelov <gat3way@gat3way.eu>\0A\00"
define i8* @hash_plugin_detailed() {
ret i8* getelementptr inbounds ([342 x i8], [342 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
int keyzen_self_has_keys(char const **, int);
int keyzen_self_has_key(const char *key) {
  return keyzen_self_has_keys(&key, 1);
}


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

x86 assembly (clang, -O2):
<keyzen_self_has_key>:
push   %rax
mov    %rdi,(%rsp)
mov    %rsp,%rdi
mov    $0x1,%esi
call   1030 <keyzen_self_has_keys@plt>
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @keyzen_self_has_key(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 @keyzen_self_has_keys(i8** %2, i32 1)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ _cause(int);
void _cause_adel() { _cause(1); }


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

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

LLVM IR (-O0):
define void @_cause_adel() {
%1 = call i32 @_cause(i32 1)
ret void
}

LLVM IR (-O2):
define void @_cause_adel() {
%1 = tail call i32 @_cause(i32 1)
ret void
}
unsigned long UARTModemControlGet(unsigned long ulBase) {
  ;
  ;
  return ((*((volatile unsigned long *)(ulBase + 0x00000030))) &
          (0x00000800 | 0x00000400));
}


x86 assembly (clang, -O0):
<UARTModemControlGet>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    0x30(%rax),%rax
and    $0xc00,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<UARTModemControlGet>:
mov    0x30(%rdi),%rax
and    $0xc00,%eax
ret

LLVM IR (-O0):
define i64 @UARTModemControlGet(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = add i64 %3, 48
%5 = inttoptr i64 %4 to i64*
%6 = load volatile i64, i64* %5
%7 = and i64 %6, 3072
ret i64 %7
}

LLVM IR (-O2):
define i64 @UARTModemControlGet(i64 %0) {
%2 = add i64 %0, 48
%3 = inttoptr i64 %2 to i64*
%4 = load volatile i64, i64* %3
%5 = and i64 %4, 3072
ret i64 %5
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
int likwid_markerStopRegion(const char *regionTag) {
  fprintf(stderr, "WARNING: dummy likwid_markerStopRegion(...) called\n");
  return 0;
}


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

x86 assembly (clang, -O2):
<likwid_markerStopRegion>:
push   %rax
mov    0x2ec8(%rip),%rax
mov    (%rax),%edi
lea    0xedf(%rip),%rsi
call   1030 <fprintf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@stderr = global i32 0
@.str = [52 x i8] c"WARNING: dummy likwid_markerStopRegion(...) called\0A\00"
define i32 @likwid_markerStopRegion(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [52 x i8] c"WARNING: dummy likwid_markerStopRegion(...) called\0A\00"
define i32 @likwid_markerStopRegion(i8* nocapture readnone %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
void zylonite_pxa320_init(void) {
  if (cpu_is_pxa320())
    panic("%s: PXA320 not supported\n", __func__);
}


x86 assembly (clang, -O0):
<zylonite_pxa320_init>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <cpu_is_pxa320@plt>
cmp    $0x0,%eax
je     1149 <zylonite_pxa320_init+0x29>
lea    0xec5(%rip),%rdi
lea    0xed8(%rip),%rsi
mov    $0x0,%al
call   1040 <panic@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<zylonite_pxa320_init>:
push   %rax
xor    %eax,%eax
call   1030 <cpu_is_pxa320@plt>
test   %eax,%eax
je     1142 <zylonite_pxa320_init+0x22>
lea    0xecd(%rip),%rdi
lea    0xee0(%rip),%rsi
xor    %eax,%eax
pop    %rcx
jmp    1040 <panic@plt>
pop    %rax
ret

LLVM IR (-O0):
@.str = [26 x i8] c"%s: PXA320 not supported\0A\00"
@__func__.zylonite_pxa320_init = [21 x i8] c"zylonite_pxa320_init\00"
define void @zylonite_pxa320_init() {
%1 = call i32 (...) @cpu_is_pxa320()
%2 = icmp ne i32 %1, 0
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = call i32 (i8*, i8*, ...) bitcast (i32 (...)* @panic to i32 (i8*, i8*, ...)*)(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([21 x i8], [21 x i8]* @__func__.zylonite_pxa320_init, i64 0, i64 0))
br label %5
5: ; preds = %3, %0
ret void
}

LLVM IR (-O2):
@.str = [26 x i8] c"%s: PXA320 not supported\0A\00"
@__func__.zylonite_pxa320_init = [21 x i8] c"zylonite_pxa320_init\00"
define void @zylonite_pxa320_init() {
%1 = tail call i32 (...) @cpu_is_pxa320()
%2 = icmp eq i32 %1, 0
br i1 %2, label %5, label %3
3: ; preds = %0
%4 = tail call i32 (i8*, i8*, ...) bitcast (i32 (...)* @panic to i32 (i8*, i8*, ...)*)(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([21 x i8], [21 x i8]* @__func__.zylonite_pxa320_init, i64 0, i64 0))
br label %5
5: ; preds = %3, %0
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ l;

/* Variables and functions */
int /*<<< orphan*/ writen(int, unsigned long long *, int);
void send_ull(int fd, unsigned long long l) { writen(fd, &l, sizeof(l)); }


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

x86 assembly (clang, -O2):
<send_ull>:
push   %rax
mov    %rsi,(%rsp)
mov    %rsp,%rsi
mov    $0x8,%edx
call   1030 <writen@plt>
pop    %rax
ret

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

LLVM IR (-O2):
define void @send_ull(i32 %0, i64 %1) {
%3 = alloca i64
store i64 %1, i64* %3
%4 = call i32 @writen(i32 %0, i64* %3, i32 8)
ret void
}
_Bool compare(int n1, int n2) {
  if (n1 == n2) {
    return 1;
  } else {
    return 0;
  }
}


x86 assembly (clang, -O0):
<compare>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jne    111f <compare+0x1f>
movb   $0x1,-0x1(%rbp)
jmp    1123 <compare+0x23>
movb   $0x0,-0x1(%rbp)
mov    -0x1(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<compare>:
cmp    %esi,%edi
sete   %al
ret

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

LLVM IR (-O2):
define zeroext i1 @compare(i32 %0, i32 %1) {
%3 = icmp eq i32 %0, %1
ret i1 %3
}
void FreeMemory(void *p, int *zz) { *zz = 0; }


x86 assembly (clang, -O0):
<FreeMemory>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movl   $0x0,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<FreeMemory>:
movl   $0x0,(%rsi)
ret

LLVM IR (-O0):
define void @FreeMemory(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
store i32 0, i32* %5
ret void
}

LLVM IR (-O2):
define void @FreeMemory(i8* nocapture readnone %0, i32* nocapture writeonly %1) {
store i32 0, i32* %1
ret void
}
/* Type definitions */
typedef unsigned long uint32_t;

/* Variables and functions */
void SHA2SelectAlgorithm(uint32_t algorithm) {

  ;
  (*((volatile unsigned long *)(0x40024000 + 0x00000700))) = algorithm;
}


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

x86 assembly (clang, -O2):
<SHA2SelectAlgorithm>:
mov    %rdi,0x40024700
40
ret

LLVM IR (-O0):
define void @SHA2SelectAlgorithm(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
store volatile i64 %3, i64* inttoptr (i64 1073891072 to i64*)
ret void
}

LLVM IR (-O2):
define void @SHA2SelectAlgorithm(i64 %0) {
store volatile i64 %0, i64* inttoptr (i64 1073891072 to i64*)
ret void
}
/* Variables and functions */
int close(int);
int tcp_close(void *arg) {
  int *fd = (int *)arg;
  return close(*fd);
}


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

x86 assembly (clang, -O2):
<tcp_close>:
mov    (%rdi),%edi
jmp    1030 <close@plt>

LLVM IR (-O0):
define i32 @tcp_close(i8* %0) {
%2 = alloca i8*
%3 = alloca i32*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = bitcast i8* %4 to i32*
store i32* %5, i32** %3
%6 = load i32*, i32** %3
%7 = load i32, i32* %6
%8 = call i32 @close(i32 %7)
ret i32 %8
}

LLVM IR (-O2):
define i32 @tcp_close(i8* nocapture %0) {
%2 = bitcast i8* %0 to i32*
%3 = load i32, i32* %2
%4 = tail call i32 @close(i32 %3)
ret i32 %4
}
void gtk_tool_item_get_visible_horizontal() {}


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

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

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

LLVM IR (-O2):
define void @gtk_tool_item_get_visible_horizontal() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ nsc_assert(int);
void cv_wait(void) {
  nsc_assert(0 && "This function is unimplemented.");
  ;
}


x86 assembly (clang, -O0):
<cv_wait>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
call   1030 <nsc_assert@plt>
pop    %rbp
ret

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

LLVM IR (-O0):
define void @cv_wait() {
%1 = call i32 @nsc_assert(i32 0)
ret void
}

LLVM IR (-O2):
define void @cv_wait() {
%1 = tail call i32 @nsc_assert(i32 0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ memcpy(void *, void const *, size_t);
void *mempcpy(void *dest, const void *src, size_t n) {
  memcpy(dest, src, n);
  dest += n;
  return dest;
}


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

x86 assembly (clang, -O2):
<mempcpy>:
push   %r14
push   %rbx
push   %rax
mov    %rdx,%r14
mov    %rdi,%rbx
call   1030 <memcpy@plt>
add    %r14,%rbx
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i8* @mempcpy(i8* %0, i8* %1, i64 %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i64
store i8* %0, i8** %4
store i8* %1, i8** %5
store i64 %2, i64* %6
%7 = load i8*, i8** %4
%8 = load i8*, i8** %5
%9 = load i64, i64* %6
%10 = call i32 @memcpy(i8* %7, i8* %8, i64 %9)
%11 = load i64, i64* %6
%12 = load i8*, i8** %4
%13 = getelementptr i8, i8* %12, i64 %11
store i8* %13, i8** %4
%14 = load i8*, i8** %4
ret i8* %14
}

LLVM IR (-O2):
define i8* @mempcpy(i8* %0, i8* %1, i64 %2) {
%4 = tail call i32 @memcpy(i8* %0, i8* %1, i64 %2)
%5 = getelementptr i8, i8* %0, i64 %2
ret i8* %5
}
void RGB565ToYRow_C() {}


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ IPC_RMID;
int shmctl(int, int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ shmdt(struct shmem *);
int deAllocAndFreeSharedMem(struct shmem *shmem, int seg_id) {
  shmdt(shmem);
  return shmctl(seg_id, IPC_RMID, 0);
}


x86 assembly (clang, -O0):
<deAllocAndFreeSharedMem>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <shmdt@plt>
mov    -0xc(%rbp),%edi
mov    0x2e9e(%rip),%rax
mov    (%rax),%esi
xor    %edx,%edx
call   1040 <shmctl@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<deAllocAndFreeSharedMem>:
push   %rbx
mov    %esi,%ebx
call   1030 <shmdt@plt>
mov    0x2eb1(%rip),%rax
mov    (%rax),%esi
mov    %ebx,%edi
xor    %edx,%edx
pop    %rbx
jmp    1040 <shmctl@plt>

LLVM IR (-O0):
%struct.shmem = type { i32 }
@IPC_RMID = global i32 0
define i32 @deAllocAndFreeSharedMem(%struct.shmem* %0, i32 %1) {
%3 = alloca %struct.shmem*
%4 = alloca i32
store %struct.shmem* %0, %struct.shmem** %3
store i32 %1, i32* %4
%5 = load %struct.shmem*, %struct.shmem** %3
%6 = call i32 @shmdt(%struct.shmem* %5)
%7 = load i32, i32* %4
%8 = load i32, i32* @IPC_RMID
%9 = call i32 @shmctl(i32 %7, i32 %8, i32 0)
ret i32 %9
}

LLVM IR (-O2):
%struct.shmem = type { i32 }
@IPC_RMID = global i32 0
define i32 @deAllocAndFreeSharedMem(%struct.shmem* %0, i32 %1) {
%3 = tail call i32 @shmdt(%struct.shmem* %0)
%4 = load i32, i32* @IPC_RMID
%5 = tail call i32 @shmctl(i32 %1, i32 %4, i32 0)
ret i32 %5
}
char *find(unsigned long addr) { return 0; }


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

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

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

LLVM IR (-O2):
define noalias i8* @find(i64 %0) {
ret i8* null
}
/* Variables and functions */
scalar_t__ calloc(int, int);
int /*<<< orphan*/ sleep(int);
int main(void) {
  long *data = (long *)calloc(1, 1500 * 1024 * 1024);
  if (!data)
    return -1;
  while (1)
    sleep(1);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x1,%edi
mov    $0x5dc00000,%esi
call   1030 <calloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1158 <main+0x38>
mov    $0xffffffff,%eax
add    $0x10,%rsp
pop    %rbp
ret
jmp    115d <main+0x3d>
mov    $0x1,%edi
call   1040 <sleep@plt>
jmp    115d <main+0x3d>

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x1,%edi
mov    $0x5dc00000,%esi
call   1030 <calloc@plt>
test   %rax,%rax
je     114c <main+0x2c>
cs nopw 0x0(%rax,%rax,1)
nop
mov    $0x1,%edi
call   1040 <sleep@plt>
jmp    1140 <main+0x20>
mov    $0xffffffff,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i64*
store i32 0, i32* %1
%3 = call i64 @calloc(i32 1, i32 1572864000)
%4 = inttoptr i64 %3 to i64*
store i64* %4, i64** %2
%5 = load i64*, i64** %2
%6 = icmp ne i64* %5, null
br i1 %6, label %8, label %7
7: ; preds = %0
ret i32 -1
8: ; preds = %0
br label %9
9: ; preds = %8, %9
%10 = call i32 @sleep(i32 1)
br label %9
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i64 @calloc(i32 1, i32 1572864000)
%2 = icmp eq i64 %1, 0
br i1 %2, label %3, label %4
3: ; preds = %0
ret i32 -1
4: ; preds = %0, %4
%5 = tail call i32 @sleep(i32 1)
br label %4
}
/* Variables and functions */
int trunc(double);
void trunc_w_d(double *source, int *dest) { *dest = trunc(*source); }


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

x86 assembly (clang, -O2):
<trunc_w_d>:
push   %rbx
mov    %rsi,%rbx
movsd  (%rdi),%xmm0
call   1030 <trunc@plt>
mov    %eax,(%rbx)
pop    %rbx
ret

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

LLVM IR (-O2):
define void @trunc_w_d(double* nocapture %0, i32* nocapture writeonly %1) {
%3 = load double, double* %0
%4 = tail call i32 @trunc(double %3)
store i32 %4, i32* %1
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
scalar_t__ executeInstruction();
void execute(uint32_t ip) {
  while (executeInstruction())
    ;
}


x86 assembly (clang, -O0):
<execute>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x0,%al
call   1030 <executeInstruction@plt>
cmp    $0x0,%rax
je     1131 <execute+0x21>
jmp    111b <execute+0xb>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<execute>:
push   %rax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1030 <executeInstruction@plt>
test   %rax,%rax
jne    1120 <execute+0x10>
pop    %rax
ret

LLVM IR (-O0):
define void @execute(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
br label %3
3: ; preds = %6, %1
%4 = call i64 (...) @executeInstruction()
%5 = icmp ne i64 %4, 0
br i1 %5, label %6, label %7
6: ; preds = %3
br label %3
7: ; preds = %3
ret void
}

LLVM IR (-O2):
define void @execute(i32 %0) {
br label %2
2: ; preds = %2, %1
%3 = tail call i64 (...) @executeInstruction()
%4 = icmp eq i64 %3, 0
br i1 %4, label %5, label %2
5: ; preds = %2
ret void
}
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
void u8tochar(uint8_t x, char *str) {
  if ((x > 0x20) && (x < 0x7f))
    str[0] = (char)x;
  else
    str[0] = (char)'.';
}


x86 assembly (clang, -O0):
<u8tochar>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x20,-0x4(%rbp)
jle    112f <u8tochar+0x2f>
cmpl   $0x7f,-0x4(%rbp)
jge    112f <u8tochar+0x2f>
mov    -0x4(%rbp),%eax
mov    %al,%cl
mov    -0x10(%rbp),%rax
mov    %cl,(%rax)
jmp    1136 <u8tochar+0x36>
mov    -0x10(%rbp),%rax
movb   $0x2e,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<u8tochar>:
lea    -0x21(%rdi),%eax
cmp    $0x5e,%eax
mov    $0x2e,%eax
cmovb  %edi,%eax
mov    %al,(%rsi)
ret

LLVM IR (-O0):
define void @u8tochar(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 = icmp sgt i32 %5, 32
br i1 %6, label %7, label %15
7: ; preds = %2
%8 = load i32, i32* %3
%9 = icmp slt i32 %8, 127
br i1 %9, label %10, label %15
10: ; preds = %7
%11 = load i32, i32* %3
%12 = trunc i32 %11 to i8
%13 = load i8*, i8** %4
%14 = getelementptr inbounds i8, i8* %13, i64 0
store i8 %12, i8* %14
br label %18
15: ; preds = %7, %2
%16 = load i8*, i8** %4
%17 = getelementptr inbounds i8, i8* %16, i64 0
store i8 46, i8* %17
br label %18
18: ; preds = %15, %10
ret void
}

LLVM IR (-O2):
define void @u8tochar(i32 %0, i8* nocapture writeonly %1) {
%3 = add i32 %0, -33
%4 = icmp ult i32 %3, 94
%5 = trunc i32 %0 to i8
%6 = select i1 %4, i8 %5, i8 46
store i8 %6, i8* %1
ret void
}
void link_error3() {}


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

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

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

LLVM IR (-O2):
define void @link_error3() {
ret void
}
/* Type definitions */
typedef int uint;

/* Variables and functions */
void setbitmap(uint a[], int len, int d) {
  int index;
  int bit;
  index = d / 8;
  bit = (d % 8);
  if (index <= len)
    a[index] = a[index] | (0x1 << bit);
}


x86 assembly (clang, -O0):
<setbitmap>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x10(%rbp),%eax
mov    $0x8,%ecx
cltd
idiv   %ecx
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%eax
mov    $0x8,%ecx
cltd
idiv   %ecx
mov    %edx,-0x18(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0xc(%rbp),%eax
jg     1158 <setbitmap+0x58>
mov    -0x8(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,4),%edx
mov    -0x18(%rbp),%ecx
mov    $0x1,%eax
shl    %cl,%eax
or     %eax,%edx
mov    -0x8(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
pop    %rbp
ret

x86 assembly (clang, -O2):
<setbitmap>:
lea    0x7(%rdx),%eax
test   %edx,%edx
cmovns %edx,%eax
sar    $0x3,%eax
cmp    %esi,%eax
jg     1120 <setbitmap+0x20>
and    $0x7,%dl
mov    $0x1,%esi
mov    %edx,%ecx
shl    %cl,%esi
cltq
or     %esi,(%rdi,%rax,4)
ret

LLVM IR (-O0):
define void @setbitmap(i32* %0, i32 %1, i32 %2) {
%4 = alloca i32*
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32* %0, i32** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%9 = load i32, i32* %6
%10 = sdiv i32 %9, 8
store i32 %10, i32* %7
%11 = load i32, i32* %6
%12 = srem i32 %11, 8
store i32 %12, i32* %8
%13 = load i32, i32* %7
%14 = load i32, i32* %5
%15 = icmp sle i32 %13, %14
br i1 %15, label %16, label %29
16: ; preds = %3
%17 = load i32*, i32** %4
%18 = load i32, i32* %7
%19 = sext i32 %18 to i64
%20 = getelementptr inbounds i32, i32* %17, i64 %19
%21 = load i32, i32* %20
%22 = load i32, i32* %8
%23 = shl i32 1, %22
%24 = or i32 %21, %23
%25 = load i32*, i32** %4
%26 = load i32, i32* %7
%27 = sext i32 %26 to i64
%28 = getelementptr inbounds i32, i32* %25, i64 %27
store i32 %24, i32* %28
br label %29
29: ; preds = %16, %3
ret void
}

LLVM IR (-O2):
define void @setbitmap(i32* nocapture %0, i32 %1, i32 %2) {
%4 = sdiv i32 %2, 8
%5 = icmp sgt i32 %4, %1
br i1 %5, label %13, label %6
6: ; preds = %3
%7 = sext i32 %4 to i64
%8 = getelementptr inbounds i32, i32* %0, i64 %7
%9 = load i32, i32* %8
%10 = and i32 %2, 7
%11 = shl nuw nsw i32 1, %10
%12 = or i32 %9, %11
store i32 %12, i32* %8
br label %13
13: ; preds = %6, %3
ret void
}
float Sleef_fabsf(float x) { return __builtin_fabsf(x); }


x86 assembly (clang, -O0):
<Sleef_fabsf>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
movaps 0xeeb(%rip),%xmm1
pand   %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<Sleef_fabsf>:
andps  0xef9(%rip),%xmm0
ret

LLVM IR (-O0):
define float @Sleef_fabsf(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = call float @llvm.fabs.f32(float %3)
ret float %4
}

LLVM IR (-O2):
define float @Sleef_fabsf(float %0) {
%2 = tail call float @llvm.fabs.f32(float %0)
ret float %2
}
/* Variables and functions */
int /*<<< orphan*/ init_sigaction();
int /*<<< orphan*/ init_time();
void SetPollingTimer() {
  init_sigaction();
  init_time();
}


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

x86 assembly (clang, -O2):
<SetPollingTimer>:
push   %rax
xor    %eax,%eax
call   1030 <init_sigaction@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <init_time@plt>

LLVM IR (-O0):
define void @SetPollingTimer() {
%1 = call i32 (...) @init_sigaction()
%2 = call i32 (...) @init_time()
ret void
}

LLVM IR (-O2):
define void @SetPollingTimer() {
%1 = tail call i32 (...) @init_sigaction()
%2 = tail call i32 (...) @init_time()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ outnop1str(char *);
void comDreg() {
  outnop1str("COMA");
  outnop1str("COMB");
}


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

x86 assembly (clang, -O2):
<comDreg>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <outnop1str@plt>
lea    0xee1(%rip),%rdi
pop    %rax
jmp    1030 <outnop1str@plt>

LLVM IR (-O0):
@.str = [5 x i8] c"COMA\00"
@.str.1 = [5 x i8] c"COMB\00"
define void @comDreg() {
%1 = call i32 @outnop1str(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @outnop1str(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [5 x i8] c"COMA\00"
@.str.1 = [5 x i8] c"COMB\00"
define void @comDreg() {
%1 = tail call i32 @outnop1str(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @outnop1str(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
int main(int argc, char *argv[]) {
  printf("%s\n", "macro_in_h");
  printf("%s\n", "macro_from_extra");
}


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

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xee8(%rip),%rbx
lea    0xee5(%rip),%rsi
mov    %rbx,%rdi
call   1030 <printf@plt>
lea    0xee1(%rip),%rsi
mov    %rbx,%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%s\0A\00"
@.str.1 = [11 x i8] c"macro_in_h\00"
@.str.2 = [17 x i8] c"macro_from_extra\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0))
%4 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.2, i64 0, i64 0))
ret i32 0
}