xunge/DecIR huggingface dataset:
/* Variables and functions */
int matN_getIndex(int const, int const, int);
int mat4_getIndex(const int row, const int col) {
  return matN_getIndex(row, col, 4);
}


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

x86 assembly (clang, -O2):
<mat4_getIndex>:
mov    $0x4,%edx
jmp    1030 <matN_getIndex@plt>

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

LLVM IR (-O2):
define i32 @mat4_getIndex(i32 %0, i32 %1) {
%3 = tail call i32 @matN_getIndex(i32 %0, i32 %1, i32 4)
ret i32 %3
}
int evaluate_nor_node(int input1, int input2, int input3) {}


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

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

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

LLVM IR (-O2):
define i32 @evaluate_nor_node(i32 %0, i32 %1, i32 %2) {
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int pa_context_proplist_remove() {
  printf("NOT IMPLEMENTED:"
         "pa_context_proplist_remove"
         "\n");
}


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

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

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

LLVM IR (-O2):
@str = [43 x i8] c"NOT IMPLEMENTED:pa_context_proplist_remove\00"
define i32 @pa_context_proplist_remove() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([43 x i8], [43 x i8]* @str, i64 0, i64 0))
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ strcpy(char *, char const *);
int strlen(char *);
char *strcat(char *s, const char *t) {
  strcpy(s + strlen(s), t);
  return s;
}


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

x86 assembly (clang, -O2):
<strcat>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
call   1040 <strlen@plt>
movslq %eax,%rdi
add    %rbx,%rdi
mov    %r14,%rsi
call   1030 <strcpy@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i8* @strcat(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = load i8*, i8** %3
%7 = call i32 @strlen(i8* %6)
%8 = sext i32 %7 to i64
%9 = getelementptr inbounds i8, i8* %5, i64 %8
%10 = load i8*, i8** %4
%11 = call i32 @strcpy(i8* %9, i8* %10)
%12 = load i8*, i8** %3
ret i8* %12
}

LLVM IR (-O2):
define i8* @strcat(i8* returned %0, i8* %1) {
%3 = tail call i32 @strlen(i8* %0)
%4 = sext i32 %3 to i64
%5 = getelementptr inbounds i8, i8* %0, i64 %4
%6 = tail call i32 @strcpy(i8* %5, i8* %1)
ret i8* %0
}
/* Variables and functions */
float plus(float, float);
int /*<<< orphan*/ printf(char *, float);
void main() {
  float add(float, float);
  float a = 3.6, b = 6.5, c, d;
  c = add(a, b);
  d = plus(a, b);
  printf("add  sum is %f\n", c);
  printf("plus sum is %f\n", d);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  0xec4(%rip),%xmm0
movss  %xmm0,-0x4(%rbp)
movss  0xeb3(%rip),%xmm0
movss  %xmm0,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
movss  -0x8(%rbp),%xmm1
call   1040 <add@plt>
movss  %xmm0,-0xc(%rbp)
movss  -0x4(%rbp),%xmm0
movss  -0x8(%rbp),%xmm1
call   1030 <plus@plt>
movss  %xmm0,-0x10(%rbp)
movss  -0xc(%rbp),%xmm0
lea    0xe82(%rip),%rdi
call   1050 <printf@plt>
movss  -0x10(%rbp),%xmm0
lea    0xe81(%rip),%rdi
call   1050 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
movss  0xec7(%rip),%xmm0
movss  0xec3(%rip),%xmm1
call   1040 <add@plt>
movss  %xmm0,0x4(%rsp)
movss  0xeac(%rip),%xmm0
movss  0xea8(%rip),%xmm1
call   1030 <plus@plt>
movss  %xmm0,(%rsp)
lea    0xe9b(%rip),%rdi
movss  0x4(%rsp),%xmm0
call   1050 <printf@plt>
lea    0xe99(%rip),%rdi
movss  (%rsp),%xmm0
pop    %rax
jmp    1050 <printf@plt>

LLVM IR (-O0):
@.str = [16 x i8] c"add sum is %f\0A\00"
@.str.1 = [16 x i8] c"plus sum is %f\0A\00"
define void @main() {
%1 = alloca float
%2 = alloca float
%3 = alloca float
%4 = alloca float
store float 0x400CCCCCC0000000, float* %1
store float 6.500000e+00, float* %2
%5 = load float, float* %1
%6 = load float, float* %2
%7 = call float @add(float %5, float %6)
store float %7, float* %3
%8 = load float, float* %1
%9 = load float, float* %2
%10 = call float @plus(float %8, float %9)
store float %10, float* %4
%11 = load float, float* %3
%12 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), float %11)
%13 = load float, float* %4
%14 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0), float %13)
ret void
}

LLVM IR (-O2):
@.str = [16 x i8] c"add sum is %f\0A\00"
@.str.1 = [16 x i8] c"plus sum is %f\0A\00"
define void @main() {
%1 = tail call float @add(float 0x400CCCCCC0000000, float 6.500000e+00)
%2 = tail call float @plus(float 0x400CCCCCC0000000, float 6.500000e+00)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), float %1)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0), float %2)
ret void
}
void timeout_handler(int unused) {}


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

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

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

LLVM IR (-O2):
define void @timeout_handler(i32 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Com_Printf(char *);
void OnInit() { Com_Printf("Hellooooooooooo World\n"); }


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

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

LLVM IR (-O0):
@.str = [23 x i8] c"Hellooooooooooo World\0A\00"
define void @OnInit() {
%1 = call i32 @Com_Printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [23 x i8] c"Hellooooooooooo World\0A\00"
define void @OnInit() {
%1 = tail call i32 @Com_Printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
ret void
}
void DvrRecorder_Create(void) {}


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

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

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

LLVM IR (-O2):
define void @DvrRecorder_Create() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int solution(int, int, int);
int main() {
  printf("1: %d\n", solution(10, 85, 30));
  printf("2: %d\n", solution(10, 30, 10));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0xa,%edi
mov    $0x55,%esi
mov    $0x1e,%edx
call   1030 <solution@plt>
mov    %eax,%esi
lea    0xeb4(%rip),%rdi
call   1040 <printf@plt>
mov    $0xa,%edx
mov    $0x1e,%esi
mov    %edx,%edi
call   1030 <solution@plt>
mov    %eax,%esi
lea    0xe9c(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0xa,%edi
mov    $0x55,%esi
mov    $0x1e,%edx
call   1030 <solution@plt>
lea    0xec4(%rip),%rdi
mov    %eax,%esi
call   1040 <printf@plt>
mov    $0xa,%edi
mov    $0x1e,%esi
mov    $0xa,%edx
call   1030 <solution@plt>
lea    0xea9(%rip),%rdi
mov    %eax,%esi
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [7 x i8] c"1: %d\0A\00"
@.str.1 = [7 x i8] c"2: %d\0A\00"
define i32 @main() {
%1 = tail call i32 @solution(i32 10, i32 85, i32 30)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 %1)
%3 = tail call i32 @solution(i32 10, i32 30, i32 10)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i32 %3)
ret i32 0
}
int charTipo(char letra) {
  if ((letra >= 0x41) && (letra <= 0x5A))
    return 0;
  else if (letra == 0x0A)
    return 1;
  return 2;
}


x86 assembly (clang, -O0):
<charTipo>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
cmp    $0x41,%eax
jl     1130 <charTipo+0x30>
movsbl -0x5(%rbp),%eax
cmp    $0x5a,%eax
jg     1130 <charTipo+0x30>
movl   $0x0,-0x4(%rbp)
jmp    1155 <charTipo+0x55>
movsbl -0x5(%rbp),%eax
cmp    $0xa,%eax
jne    1149 <charTipo+0x49>
movl   $0x1,-0x4(%rbp)
jmp    1155 <charTipo+0x55>
jmp    114e <charTipo+0x4e>
movl   $0x2,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<charTipo>:
lea    -0x41(%rdi),%ecx
xor    %eax,%eax
cmp    $0xa,%dil
sete   %al
mov    $0x2,%edx
sub    %eax,%edx
xor    %eax,%eax
cmp    $0x1a,%cl
cmovae %edx,%eax
ret

LLVM IR (-O0):
define i32 @charTipo(i8 signext %0) {
%2 = alloca i32
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
%6 = icmp sge i32 %5, 65
br i1 %6, label %7, label %12
7: ; preds = %1
%8 = load i8, i8* %3
%9 = sext i8 %8 to i32
%10 = icmp sle i32 %9, 90
br i1 %10, label %11, label %12
11: ; preds = %7
store i32 0, i32* %2
br label %19
12: ; preds = %7, %1
%13 = load i8, i8* %3
%14 = sext i8 %13 to i32
%15 = icmp eq i32 %14, 10
br i1 %15, label %16, label %17
16: ; preds = %12
store i32 1, i32* %2
br label %19
17: ; preds = %12
br label %18
18: ; preds = %17
store i32 2, i32* %2
br label %19
19: ; preds = %18, %16, %11
%20 = load i32, i32* %2
ret i32 %20
}

LLVM IR (-O2):
define i32 @charTipo(i8 signext %0) {
%2 = add i8 %0, -65
%3 = icmp ult i8 %2, 26
%4 = icmp eq i8 %0, 10
%5 = select i1 %4, i32 1, i32 2
%6 = select i1 %3, i32 0, i32 %5
ret i32 %6
}
/* Type definitions */
struct inode {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ fist_print_generic_inode3(char const *, char *,
                                             struct inode const *);
void fist_print_generic_inode(const char *str, const struct inode *inode) {
  fist_print_generic_inode3(str, "", inode);
}


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

x86 assembly (clang, -O2):
<fist_print_generic_inode>:
mov    %rsi,%rdx
lea    0xee6(%rip),%rsi
jmp    1030 <fist_print_generic_inode3@plt>

LLVM IR (-O0):
%struct.inode = type { i32 }
@.str = [1 x i8] zeroinitializer
define void @fist_print_generic_inode(i8* %0, %struct.inode* %1) {
%3 = alloca i8*
%4 = alloca %struct.inode*
store i8* %0, i8** %3
store %struct.inode* %1, %struct.inode** %4
%5 = load i8*, i8** %3
%6 = load %struct.inode*, %struct.inode** %4
%7 = call i32 @fist_print_generic_inode3(i8* %5, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), %struct.inode* %6)
ret void
}

LLVM IR (-O2):
%struct.inode = type { i32 }
@.str = [1 x i8] zeroinitializer
define void @fist_print_generic_inode(i8* %0, %struct.inode* %1) {
%3 = tail call i32 @fist_print_generic_inode3(i8* %0, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), %struct.inode* %1)
ret void
}
/* Type definitions */
struct virtual_item {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ BUG();
int sd_part_size(struct virtual_item *vi, int first, int count) {
  if (count)
    BUG();
  return 0;
}


x86 assembly (clang, -O0):
<sd_part_size>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
cmpl   $0x0,-0x10(%rbp)
je     1133 <sd_part_size+0x23>
mov    $0x0,%al
call   1030 <BUG@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sd_part_size>:
test   %edx,%edx
je     1120 <sd_part_size+0x10>
push   %rax
xor    %eax,%eax
call   1030 <BUG@plt>
add    $0x8,%rsp
xor    %eax,%eax
ret

LLVM IR (-O0):
%struct.virtual_item = type { i32 }
define i32 @sd_part_size(%struct.virtual_item* %0, i32 %1, i32 %2) {
%4 = alloca %struct.virtual_item*
%5 = alloca i32
%6 = alloca i32
store %struct.virtual_item* %0, %struct.virtual_item** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i32, i32* %6
%8 = icmp ne i32 %7, 0
br i1 %8, label %9, label %11
9: ; preds = %3
%10 = call i32 (...) @BUG()
br label %11
11: ; preds = %9, %3
ret i32 0
}

LLVM IR (-O2):
%struct.virtual_item = type { i32 }
define i32 @sd_part_size(%struct.virtual_item* nocapture readnone %0, i32 %1, i32 %2) {
%4 = icmp eq i32 %2, 0
br i1 %4, label %7, label %5
5: ; preds = %3
%6 = tail call i32 (...) @BUG()
br label %7
7: ; preds = %5, %3
ret i32 0
}
/* Variables and functions */
scalar_t__ rand();
int nextrandom() { return ((int)rand()) * ((int)rand()) + (int)rand(); }


x86 assembly (clang, -O0):
<nextrandom>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <rand@plt>
mov    %eax,-0x8(%rbp)
mov    $0x0,%al
call   1030 <rand@plt>
mov    %rax,%rcx
mov    -0x8(%rbp),%eax
imul   %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    $0x0,%al
call   1030 <rand@plt>
mov    %rax,%rcx
mov    -0x4(%rbp),%eax
add    %ecx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<nextrandom>:
push   %r14
push   %rbx
push   %rax
xor    %eax,%eax
call   1030 <rand@plt>
mov    %rax,%r14
xor    %eax,%eax
call   1030 <rand@plt>
mov    %rax,%rbx
imul   %r14d,%ebx
xor    %eax,%eax
call   1030 <rand@plt>
add    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i32 @nextrandom() {
%1 = call i64 (...) @rand()
%2 = trunc i64 %1 to i32
%3 = call i64 (...) @rand()
%4 = trunc i64 %3 to i32
%5 = mul nsw i32 %2, %4
%6 = call i64 (...) @rand()
%7 = trunc i64 %6 to i32
%8 = add nsw i32 %5, %7
ret i32 %8
}

LLVM IR (-O2):
define i32 @nextrandom() {
%1 = tail call i64 (...) @rand()
%2 = trunc i64 %1 to i32
%3 = tail call i64 (...) @rand()
%4 = trunc i64 %3 to i32
%5 = mul nsw i32 %4, %2
%6 = tail call i64 (...) @rand()
%7 = trunc i64 %6 to i32
%8 = add nsw i32 %5, %7
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ ControllerLinkLost(int /*<<< orphan*/);
int /*<<< orphan*/ ROM_WatchdogIntClear(int);
void WatchdogIntHandler(void) {
  ROM_WatchdogIntClear(0x40000000);
  ControllerLinkLost(0);
}


x86 assembly (clang, -O0):
<WatchdogIntHandler>:
push   %rbp
mov    %rsp,%rbp
mov    $0x40000000,%edi
call   1030 <ROM_WatchdogIntClear@plt>
xor    %edi,%edi
call   1040 <ControllerLinkLost@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<WatchdogIntHandler>:
push   %rax
mov    $0x40000000,%edi
call   1030 <ROM_WatchdogIntClear@plt>
xor    %edi,%edi
pop    %rax
jmp    1040 <ControllerLinkLost@plt>

LLVM IR (-O0):
define void @WatchdogIntHandler() {
%1 = call i32 @ROM_WatchdogIntClear(i32 1073741824)
%2 = call i32 @ControllerLinkLost(i32 0)
ret void
}

LLVM IR (-O2):
define void @WatchdogIntHandler() {
%1 = tail call i32 @ROM_WatchdogIntClear(i32 1073741824)
%2 = tail call i32 @ControllerLinkLost(i32 0)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint64_t;

/* Variables and functions */
int /*<<< orphan*/ fnv_64a_64(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ fnv_64a_buf(void const *, size_t, int /*<<< orphan*/);
uint64_t sd_hash(const void *buf, size_t len) {
  uint64_t hval = fnv_64a_buf(buf, len, ((uint64_t)0xcbf29ce484222325ULL));
  return fnv_64a_64(hval, hval);
}


x86 assembly (clang, -O0):
<sd_hash>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    $0x84222325,%edx
call   1040 <fnv_64a_buf@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%edi
mov    -0x14(%rbp),%esi
call   1030 <fnv_64a_64@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sd_hash>:
push   %rax
mov    $0x84222325,%edx
call   1040 <fnv_64a_buf@plt>
mov    %eax,%edi
mov    %eax,%esi
pop    %rax
jmp    1030 <fnv_64a_64@plt>

LLVM IR (-O0):
define i32 @sd_hash(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
%5 = alloca i32
store i8* %0, i8** %3
store i64 %1, i64* %4
%6 = load i8*, i8** %3
%7 = load i64, i64* %4
%8 = call i32 @fnv_64a_buf(i8* %6, i64 %7, i32 -2078137563)
store i32 %8, i32* %5
%9 = load i32, i32* %5
%10 = load i32, i32* %5
%11 = call i32 @fnv_64a_64(i32 %9, i32 %10)
ret i32 %11
}

LLVM IR (-O2):
define i32 @sd_hash(i8* %0, i64 %1) {
%3 = tail call i32 @fnv_64a_buf(i8* %0, i64 %1, i32 -2078137563)
%4 = tail call i32 @fnv_64a_64(i32 %3, i32 %3)
ret i32 %4
}
void group_init(void) { return; }


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

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

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

LLVM IR (-O2):
define void @group_init() {
ret void
}
unsigned test(unsigned one, unsigned bit) {
  unsigned val = bit & 1;
  unsigned zero = one >> 1;
  val++;
  return zero + (val >> 1);
}


x86 assembly (clang, -O0):
<test>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
and    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%eax
shr    $0x1,%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    -0x10(%rbp),%eax
mov    -0xc(%rbp),%ecx
shr    $0x1,%ecx
add    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test>:
and    $0x1,%esi
shr    %edi
lea    0x1(%rsi),%eax
shr    %eax
add    %edi,%eax
ret

LLVM IR (-O0):
define i32 @test(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%7 = load i32, i32* %4
%8 = and i32 %7, 1
store i32 %8, i32* %5
%9 = load i32, i32* %3
%10 = lshr i32 %9, 1
store i32 %10, i32* %6
%11 = load i32, i32* %5
%12 = add i32 %11, 1
store i32 %12, i32* %5
%13 = load i32, i32* %6
%14 = load i32, i32* %5
%15 = lshr i32 %14, 1
%16 = add i32 %13, %15
ret i32 %16
}

LLVM IR (-O2):
define i32 @test(i32 %0, i32 %1) {
%3 = and i32 %1, 1
%4 = lshr i32 %0, 1
%5 = add nuw nsw i32 %3, 1
%6 = lshr i32 %5, 1
%7 = add nuw i32 %6, %4
ret i32 %7
}
int nondetnn() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @nondetnn() {
ret i32 0
}
int test_imm_44int64_midword_reg(long long val) {
  return ((val >> 16) & (0x44 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_44int64_midword_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdx
sar    $0x10,%rdx
and    $0x44,%rdx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_44int64_midword_reg>:
test   $0x440000,%edi
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_44int64_midword_reg(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = ashr i64 %3, 16
%5 = and i64 %4, 68
%6 = icmp ne i64 %5, 0
%7 = zext i1 %6 to i64
%8 = select i1 %6, i32 -20, i32 -40
ret i32 %8
}

LLVM IR (-O2):
define i32 @test_imm_44int64_midword_reg(i64 %0) {
%2 = and i64 %0, 4456448
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ foo(int *);
int /*<<< orphan*/ test_assert(int);
int main(void) {
  int a = 0;
  foo(&a);
  test_assert(a == 3);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x4(%rbp),%rdi
call   1030 <foo@plt>
cmpl   $0x3,-0x4(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <test_assert@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
movl   $0x0,0x4(%rsp)
lea    0x4(%rsp),%rdi
call   1030 <foo@plt>
xor    %edi,%edi
cmpl   $0x3,0x4(%rsp)
sete   %dil
call   1040 <test_assert@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
store i32 0, i32* %1
%3 = call i32 @foo(i32* %1)
%4 = load i32, i32* %1
%5 = icmp eq i32 %4, 3
%6 = zext i1 %5 to i32
%7 = call i32 @test_assert(i32 %6)
ret i32 0
}
void McASPRxClkCheckConfig(unsigned int baseAddr, unsigned int clkDiv,
                           unsigned char boundMin, unsigned char boundMax) {
  (*((volatile unsigned int *)(baseAddr + (0x88)))) =
      clkDiv | boundMin << (0x00000008u) | boundMax << (0x00000010u);
}


x86 assembly (clang, -O0):
<McASPRxClkCheckConfig>:
push   %rbp
mov    %rsp,%rbp
mov    %cl,%al
mov    %dl,%cl
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %cl,-0x9(%rbp)
mov    %al,-0xa(%rbp)
mov    -0x8(%rbp),%ecx
movzbl -0x9(%rbp),%eax
shl    $0x8,%eax
or     %eax,%ecx
movzbl -0xa(%rbp),%eax
shl    $0x10,%eax
or     %eax,%ecx
mov    -0x4(%rbp),%eax
add    $0x88,%eax
mov    %eax,%eax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<McASPRxClkCheckConfig>:
shl    $0x8,%edx
or     %esi,%edx
shl    $0x10,%ecx
or     %edx,%ecx
add    $0x88,%edi
mov    %ecx,(%rdi)
ret

LLVM IR (-O0):
define void @McASPRxClkCheckConfig(i32 %0, i32 %1, i8 zeroext %2, i8 zeroext %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i8
%8 = alloca i8
store i32 %0, i32* %5
store i32 %1, i32* %6
store i8 %2, i8* %7
store i8 %3, i8* %8
%9 = load i32, i32* %6
%10 = load i8, i8* %7
%11 = zext i8 %10 to i32
%12 = shl i32 %11, 8
%13 = or i32 %9, %12
%14 = load i8, i8* %8
%15 = zext i8 %14 to i32
%16 = shl i32 %15, 16
%17 = or i32 %13, %16
%18 = load i32, i32* %5
%19 = add i32 %18, 136
%20 = zext i32 %19 to i64
%21 = inttoptr i64 %20 to i32*
store volatile i32 %17, i32* %21
ret void
}

LLVM IR (-O2):
define void @McASPRxClkCheckConfig(i32 %0, i32 %1, i8 zeroext %2, i8 zeroext %3) {
%5 = zext i8 %2 to i32
%6 = shl nuw nsw i32 %5, 8
%7 = or i32 %6, %1
%8 = zext i8 %3 to i32
%9 = shl nuw nsw i32 %8, 16
%10 = or i32 %7, %9
%11 = add i32 %0, 136
%12 = zext i32 %11 to i64
%13 = inttoptr i64 %12 to i32*
store volatile i32 %10, i32* %13
ret void
}
int fits_is_reentrant(void) { return (0); }


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

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

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

LLVM IR (-O2):
define i32 @fits_is_reentrant() {
ret i32 0
}
double speedMotor(double speed, double slope) {
  double speedFinal = speed;
  return speedFinal;
}


x86 assembly (clang, -O0):
<speedMotor>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
pop    %rbp
ret

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

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

LLVM IR (-O2):
define double @speedMotor(double returned %0, double %1) {
ret double %0
}
/* Variables and functions */
int /*<<< orphan*/ UARTEnableRX();
int /*<<< orphan*/ UARTEnableTX();
void UARTInit() {
  *((char *)0xFFFFFFE3) = (*((char *)0xFFFFFFE3)) | (1 << 7);
  *((char *)0xFFFFFFE0) = 1;
  *((char *)0xFFFFFFE1) = 0;
  *((char *)0xFFFFFFE3) = (*((char *)0xFFFFFFE3)) & ~(1 << 7);
  UARTEnableTX();
  UARTEnableRX();
}


x86 assembly (clang, -O0):
<UARTInit>:
push   %rbp
mov    %rsp,%rbp
mov    $0xffffffe3,%eax
movsbl (%rax),%eax
or     $0x80,%eax
mov    %al,%cl
mov    $0xffffffe3,%eax
mov    %cl,(%rax)
mov    $0xffffffe0,%eax
movb   $0x1,(%rax)
mov    $0xffffffe1,%eax
movb   $0x0,(%rax)
mov    $0xffffffe3,%eax
movsbl (%rax),%eax
and    $0xffffff7f,%eax
mov    %al,%cl
mov    $0xffffffe3,%eax
mov    %cl,(%rax)
mov    $0x0,%al
call   1030 <UARTEnableTX@plt>
mov    $0x0,%al
call   1040 <UARTEnableRX@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<UARTInit>:
push   %rax
mov    $0xffffffe3,%eax
movw   $0x1,-0x3(%rax)
andb   $0x7f,(%rax)
xor    %eax,%eax
call   1030 <UARTEnableTX@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <UARTEnableRX@plt>

LLVM IR (-O0):
define void @UARTInit() {
%1 = load i8, i8* inttoptr (i64 4294967267 to i8*)
%2 = sext i8 %1 to i32
%3 = or i32 %2, 128
%4 = trunc i32 %3 to i8
store i8 %4, i8* inttoptr (i64 4294967267 to i8*)
store i8 1, i8* inttoptr (i64 4294967264 to i8*)
store i8 0, i8* inttoptr (i64 4294967265 to i8*)
%5 = load i8, i8* inttoptr (i64 4294967267 to i8*)
%6 = sext i8 %5 to i32
%7 = and i32 %6, -129
%8 = trunc i32 %7 to i8
store i8 %8, i8* inttoptr (i64 4294967267 to i8*)
%9 = call i32 (...) @UARTEnableTX()
%10 = call i32 (...) @UARTEnableRX()
ret void
}

LLVM IR (-O2):
define void @UARTInit() {
%1 = load i8, i8* inttoptr (i64 4294967267 to i8*)
%2 = or i8 %1, -128
store i8 %2, i8* inttoptr (i64 4294967267 to i8*)
store i8 1, i8* inttoptr (i64 4294967264 to i8*)
store i8 0, i8* inttoptr (i64 4294967265 to i8*)
%3 = load i8, i8* inttoptr (i64 4294967267 to i8*)
%4 = and i8 %3, 127
store i8 %4, i8* inttoptr (i64 4294967267 to i8*)
%5 = tail call i32 (...) @UARTEnableTX()
%6 = tail call i32 (...) @UARTEnableRX()
ret void
}
float quantum_foo(float _Complex a) {
  float *p = (float *)&a;
  return p[2];
}


x86 assembly (clang, -O0):
<quantum_foo>:
push   %rbp
mov    %rsp,%rbp
movlpd %xmm0,-0x8(%rbp)
lea    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movss  0x8(%rax),%xmm0
pop    %rbp
ret

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

LLVM IR (-O0):
define float @quantum_foo(<2 x float> %0) {
%2 = alloca { float, float }
%3 = alloca float*
%4 = bitcast { float, float }* %2 to <2 x float>*
store <2 x float> %0, <2 x float>* %4
%5 = bitcast { float, float }* %2 to float*
store float* %5, float** %3
%6 = load float*, float** %3
%7 = getelementptr inbounds float, float* %6, i64 2
%8 = load float, float* %7
ret float %8
}

LLVM IR (-O2):
define float @quantum_foo(<2 x float> %0) {
ret float poison
}
void m_sethwf(fd, on) int fd, on;
{}


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

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

LLVM IR (-O0):
define void @m_sethwf(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 @m_sethwf(i32 %0, i32 %1) {
ret void
}
/* Type definitions */
struct object {
  int dummy;
};
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int fileOut_object_version_3(int /*<<< orphan*/ *, struct object *);
int fileOut_object(FILE *fp, struct object *obj) {
  return fileOut_object_version_3(fp, obj);
}


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

x86 assembly (clang, -O2):
<fileOut_object>:
jmp    1030 <fileOut_object_version_3@plt>

LLVM IR (-O0):
%struct.object = type { i32 }
define i32 @fileOut_object(i32* %0, %struct.object* %1) {
%3 = alloca i32*
%4 = alloca %struct.object*
store i32* %0, i32** %3
store %struct.object* %1, %struct.object** %4
%5 = load i32*, i32** %3
%6 = load %struct.object*, %struct.object** %4
%7 = call i32 @fileOut_object_version_3(i32* %5, %struct.object* %6)
ret i32 %7
}

LLVM IR (-O2):
%struct.object = type { i32 }
define i32 @fileOut_object(i32* %0, %struct.object* %1) {
%3 = tail call i32 @fileOut_object_version_3(i32* %0, %struct.object* %1)
ret i32 %3
}
/* Variables and functions */
scalar_t__ inver_thread_b();
void *inver_thread_b_wrap(void *v __attribute__((unused))) {
  return (void *)(intptr_t)inver_thread_b();
}


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

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

LLVM IR (-O0):
define i8* @inver_thread_b_wrap(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i64 (...) @inver_thread_b()
%4 = inttoptr i64 %3 to i8*
ret i8* %4
}

LLVM IR (-O2):
define i8* @inver_thread_b_wrap(i8* nocapture readnone %0) {
%2 = tail call i64 (...) @inver_thread_b()
%3 = inttoptr i64 %2 to i8*
ret i8* %3
}
/* Variables and functions */
int EXIT_SUCCESS;
int /*<<< orphan*/ printf(char *, int /*<<< orphan*/);
int main(int arg, char *argv[], char **environ) {
  while (*environ) {
    printf("%s\n", *environ++);
  }
  return EXIT_SUCCESS;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x18(%rbp),%rax
cmpq   $0x0,(%rax)
je     115d <main+0x4d>
mov    -0x18(%rbp),%rax
mov    %rax,%rcx
add    $0x8,%rcx
mov    %rcx,-0x18(%rbp)
mov    (%rax),%rax
mov    %eax,%esi
lea    0xead(%rip),%rdi
call   1030 <printf@plt>
jmp    112a <main+0x1a>
mov    0x2e7c(%rip),%rax
mov    (%rax),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
mov    (%rdx),%rsi
test   %rsi,%rsi
je     1144 <main+0x34>
mov    %rdx,%rbx
add    $0x8,%rbx
lea    0xed6(%rip),%r14
nopw   0x0(%rax,%rax,1)
mov    %r14,%rdi
call   1030 <printf@plt>
mov    (%rbx),%rsi
add    $0x8,%rbx
test   %rsi,%rsi
jne    1130 <main+0x20>
mov    0x2e95(%rip),%rax
mov    (%rax),%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%s\0A\00"
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** %1, i8** %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i8**
%7 = alloca i8**
store i32 0, i32* %4
store i32 %0, i32* %5
store i8** %1, i8*** %6
store i8** %2, i8*** %7
br label %8
8: ; preds = %12, %3
%9 = load i8**, i8*** %7
%10 = load i8*, i8** %9
%11 = icmp ne i8* %10, null
br i1 %11, label %12, label %18
12: ; preds = %8
%13 = load i8**, i8*** %7
%14 = getelementptr inbounds i8*, i8** %13, i32 1
store i8** %14, i8*** %7
%15 = load i8*, i8** %13
%16 = ptrtoint i8* %15 to i32
%17 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %16)
br label %8
18: ; preds = %8
%19 = load i32, i32* @EXIT_SUCCESS
ret i32 %19
}

LLVM IR (-O2):
@.str = [4 x i8] c"%s\0A\00"
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** nocapture readnone %1, i8** nocapture %2) {
%4 = load i8*, i8** %2
%5 = icmp eq i8* %4, null
br i1 %5, label %15, label %6
6: ; preds = %3, %6
%7 = phi i8* [ %13, %6 ], [ %4, %3 ]
%8 = phi i8** [ %9, %6 ], [ %2, %3 ]
%9 = getelementptr inbounds i8*, i8** %8, i64 1
%10 = ptrtoint i8* %7 to i64
%11 = trunc i64 %10 to i32
%12 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %11)
%13 = load i8*, i8** %9
%14 = icmp eq i8* %13, null
br i1 %14, label %15, label %6
15: ; preds = %6, %3
%16 = load i32, i32* @EXIT_SUCCESS
ret i32 %16
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int a = 0;
  scanf("%d", &a);
  printf("a = %d\n", a);
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
movl   $0x0,0x4(%rsp)
lea    0xed0(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1040 <scanf@plt>
mov    0x4(%rsp),%esi
lea    0xebe(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [8 x i8] c"a = %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
store i32 0, i32* %1
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%4 = load i32, i32* %1
%5 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i32 %4)
ret i32 0
}
/* Forward declarations */
typedef struct TYPE_4__ TYPE_2__;
typedef struct TYPE_3__ TYPE_1__;

/* Type definitions */
struct TYPE_3__ {
  scalar_t__ window;
};
struct TYPE_4__ {
  TYPE_1__ xcirculate;
};
typedef TYPE_2__ XEvent;

/* Variables and functions */
unsigned long get_XEvent_xcirculate_window(void *_p) {
  return (unsigned long)((XEvent *)_p)->xcirculate.window;
}


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

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

LLVM IR (-O0):
%struct.TYPE_4__ = type { %struct.TYPE_3__ }
%struct.TYPE_3__ = type { i64 }
define i64 @get_XEvent_xcirculate_window(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = bitcast i8* %3 to %struct.TYPE_4__*
%5 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %4, i32 0, i32 0
%6 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %5, i32 0, i32 0
%7 = load i64, i64* %6
ret i64 %7
}

LLVM IR (-O2):
define i64 @get_XEvent_xcirculate_window(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
ret i64 %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ scanf(char *, int *);
int main(void) {
  int A, B, C;
  scanf("%d", &A);
  scanf("%d", &B);
  C = A + B;
  printf("SOMA = %d\n", C);
  return 0;
}


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

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

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [11 x i8] c"SOMA = %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = bitcast i32* %1 to i8*
%4 = bitcast i32* %2 to i8*
%5 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%6 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
%7 = load i32, i32* %1
%8 = load i32, i32* %2
%9 = add nsw i32 %8, %7
%10 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i32 %9)
ret i32 0
}
/* Type definitions */
struct ev_loop {
  int dummy;
};

/* Variables and functions */
unsigned int ev_depth(struct ev_loop *);
unsigned int ev_loop_depth(struct ev_loop *loop) { return ev_depth(loop); }


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

x86 assembly (clang, -O2):
<ev_loop_depth>:
jmp    1030 <ev_depth@plt>

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

LLVM IR (-O2):
%struct.ev_loop = type { i32 }
define i32 @ev_loop_depth(%struct.ev_loop* %0) {
%2 = tail call i32 @ev_depth(%struct.ev_loop* %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ condition_a(char);
scalar_t__ condition_alphanumeric(char);
int condition_alphanumericExcept_a(char c) {
  return !condition_a(c) && condition_alphanumeric(c);
}


x86 assembly (clang, -O0):
<condition_alphanumericExcept_a>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%edi
call   1040 <condition_a@plt>
mov    %eax,%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x2(%rbp)
jne    115a <condition_alphanumericExcept_a+0x3a>
movsbl -0x1(%rbp),%edi
call   1030 <condition_alphanumeric@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<condition_alphanumericExcept_a>:
push   %rbx
mov    %edi,%ebx
call   1040 <condition_a@plt>
mov    %eax,%ecx
xor    %eax,%eax
test   %ecx,%ecx
je     1132 <condition_alphanumericExcept_a+0x12>
pop    %rbx
ret
movsbl %bl,%edi
call   1030 <condition_alphanumeric@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
setne  %al
pop    %rbx
ret

LLVM IR (-O0):
define i32 @condition_alphanumericExcept_a(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = call i32 @condition_a(i8 signext %3)
%5 = icmp ne i32 %4, 0
br i1 %5, label %10, label %6
6: ; preds = %1
%7 = load i8, i8* %2
%8 = call i64 @condition_alphanumeric(i8 signext %7)
%9 = icmp ne i64 %8, 0
br label %10
10: ; preds = %6, %1
%11 = phi i1 [ false, %1 ], [ %9, %6 ]
%12 = zext i1 %11 to i32
ret i32 %12
}

LLVM IR (-O2):
define i32 @condition_alphanumericExcept_a(i8 signext %0) {
%2 = tail call i32 @condition_a(i8 signext %0)
%3 = icmp eq i32 %2, 0
br i1 %3, label %4, label %8
4: ; preds = %1
%5 = tail call i64 @condition_alphanumeric(i8 signext %0)
%6 = icmp ne i64 %5, 0
%7 = zext i1 %6 to i32
br label %8
8: ; preds = %4, %1
%9 = phi i32 [ 0, %1 ], [ %7, %4 ]
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *);
void usage(void) {
  printf("options:\n"
         "  -f <file>  Specify parameters file (default: etc/param)\n"
         "  -d         Don't run as daemon (for debuggers)\n");
  printf(
      "\n"
      "bbs100 is usually started using the 'bbs' script rather than calling\n"
      "the binary directly. Instead of using command line arguments, the\n"
      "parameters are specified in the socalled param file.\n");
  exit(1);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
lea    0xf3e(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
lea    0xf40(%rip),%rdi
call   1030 <puts@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [117 x i8] c"options:\0A -f <file> Specify parameters file (default: etc/param)\0A -d Don't run as daemon (for debuggers)\0A\00"
@.str.1 = [190 x i8] c"\0Abbs100 is usually started using the 'bbs' script rather than calling\0Athe binary directly. Instead of using command line arguments, the\0Aparameters are specified in the socalled param file.\0A\00"
define void @usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([117 x i8], [117 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([190 x i8], [190 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@str = [116 x i8] c"options:\0A -f <file> Specify parameters file (default: etc/param)\0A -d Don't run as daemon (for debuggers)\00"
@str.2 = [189 x i8] c"\0Abbs100 is usually started using the 'bbs' script rather than calling\0Athe binary directly. Instead of using command line arguments, the\0Aparameters are specified in the socalled param file.\00"
define void @usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([116 x i8], [116 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([189 x i8], [189 x i8]* @str.2, i64 0, i64 0))
%3 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, int, int);
int /*<<< orphan*/ func(int *, int *);
int /*<<< orphan*/ stdout;
int main(int argc, char **argv) {
  int a, b;
  a = 0;
  b = 0;
  func(&a, &b);
  fprintf(stdout, "a: %d b: %d \n", a, b);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
lea    -0x14(%rbp),%rdi
lea    -0x18(%rbp),%rsi
call   1040 <func@plt>
mov    0x2e88(%rip),%rax
mov    (%rax),%edi
mov    -0x14(%rbp),%edx
mov    -0x18(%rbp),%ecx
lea    0xe99(%rip),%rsi
call   1030 <fprintf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
movl   $0x0,0x4(%rsp)
movl   $0x0,(%rsp)
lea    0x4(%rsp),%rdi
mov    %rsp,%rsi
call   1040 <func@plt>
mov    0x2e9c(%rip),%rax
mov    (%rax),%edi
mov    0x4(%rsp),%edx
mov    (%rsp),%ecx
lea    0xeac(%rip),%rsi
call   1030 <fprintf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@stdout = global i32 0
@.str = [14 x i8] c"a: %d b: %d \0A\00"
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
%8 = call i32 @func(i32* %6, i32* %7)
%9 = load i32, i32* @stdout
%10 = load i32, i32* %6
%11 = load i32, i32* %7
%12 = call i32 @fprintf(i32 %9, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 %10, i32 %11)
ret i32 0
}

LLVM IR (-O2):
@stdout = global i32 0
@.str = [14 x i8] c"a: %d b: %d \0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca i32
%4 = alloca i32
%5 = bitcast i32* %3 to i8*
%6 = bitcast i32* %4 to i8*
store i32 0, i32* %3
store i32 0, i32* %4
%7 = call i32 @func(i32* %3, i32* %4)
%8 = load i32, i32* @stdout
%9 = load i32, i32* %3
%10 = load i32, i32* %4
%11 = call i32 @fprintf(i32 %8, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 %9, i32 %10)
ret i32 0
}
/* Variables and functions */
unsigned int swapInt(unsigned int);
unsigned long long swapLongLong(unsigned long long qw) {
  unsigned int *a, *b;
  unsigned long long ret;
  a = (unsigned int *)&qw;
  b = (unsigned int *)&ret;
  b[0] = swapInt(a[1]);
  b[1] = swapInt(a[0]);
  return ret;
}


x86 assembly (clang, -O0):
<swapLongLong>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
lea    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
lea    -0x20(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    0x4(%rax),%edi
call   1030 <swapInt@plt>
mov    %eax,%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x10(%rbp),%rax
mov    (%rax),%edi
call   1030 <swapInt@plt>
mov    %eax,%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,0x4(%rax)
mov    -0x20(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<swapLongLong>:
push   %rbp
push   %rbx
push   %rax
mov    %rdi,%rbx
shr    $0x20,%rdi
call   1030 <swapInt@plt>
mov    %eax,%ebp
mov    %ebx,%edi
call   1030 <swapInt@plt>
shl    $0x20,%rax
mov    %ebp,%ecx
or     %rcx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define i64 @swapLongLong(i64 %0) {
%2 = trunc i64 %0 to i32
%3 = lshr i64 %0, 32
%4 = trunc i64 %3 to i32
%5 = tail call i32 @swapInt(i32 %4)
%6 = tail call i32 @swapInt(i32 %2)
%7 = zext i32 %6 to i64
%8 = shl nuw i64 %7, 32
%9 = zext i32 %5 to i64
%10 = or i64 %8, %9
ret i64 %10
}