xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ Anti_Par(char *, char *, long);
int /*<<< orphan*/ Reverse(char *);
void Rev_Compl(char *orig, char *rev, long len) {
  Anti_Par(orig, rev, len);
  Reverse(rev);
}


x86 assembly (clang, -O0):
<Rev_Compl>:
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 <Anti_Par@plt>
mov    -0x10(%rbp),%rdi
call   1040 <Reverse@plt>
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define void @Rev_Compl(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 @Anti_Par(i8* %7, i8* %8, i64 %9)
%11 = load i8*, i8** %5
%12 = call i32 @Reverse(i8* %11)
ret void
}

LLVM IR (-O2):
define void @Rev_Compl(i8* %0, i8* %1, i64 %2) {
%4 = tail call i32 @Anti_Par(i8* %0, i8* %1, i64 %2)
%5 = tail call i32 @Reverse(i8* %1)
ret void
}
int f(int n, int i) { return n > 1 ? f(n / (n % 2 + 2), ++i) : i; }


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
cmpl   $0x1,-0x4(%rbp)
jle    115c <f+0x4c>
mov    -0x4(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    -0x10(%rbp),%eax
mov    %edx,%ecx
add    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,%edi
mov    -0x8(%rbp),%esi
add    $0x1,%esi
mov    %esi,-0x8(%rbp)
call   1030 <f@plt>
mov    %eax,-0xc(%rbp)
jmp    1162 <f+0x52>
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f>:
cmp    $0x2,%edi
jl     1124 <f+0x24>
mov    %edi,%eax
nopw   0x0(%rax,%rax,1)
mov    %eax,%ecx
and    $0x1,%ecx
or     $0x2,%ecx
xor    %edx,%edx
div    %ecx
add    $0x1,%esi
cmp    $0x1,%eax
ja     1110 <f+0x10>
mov    %esi,%eax
ret

LLVM IR (-O0):
define i32 @f(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 = icmp sgt i32 %5, 1
br i1 %6, label %7, label %16
7: ; preds = %2
%8 = load i32, i32* %3
%9 = load i32, i32* %3
%10 = srem i32 %9, 2
%11 = add nsw i32 %10, 2
%12 = sdiv i32 %8, %11
%13 = load i32, i32* %4
%14 = add nsw i32 %13, 1
store i32 %14, i32* %4
%15 = call i32 @f(i32 %12, i32 %14)
br label %18
16: ; preds = %2
%17 = load i32, i32* %4
br label %18
18: ; preds = %16, %7
%19 = phi i32 [ %15, %7 ], [ %17, %16 ]
ret i32 %19
}

LLVM IR (-O2):
define i32 @f(i32 %0, i32 %1) {
%3 = icmp sgt i32 %0, 1
br i1 %3, label %4, label %12
4: ; preds = %2, %4
%5 = phi i32 [ %10, %4 ], [ %1, %2 ]
%6 = phi i32 [ %9, %4 ], [ %0, %2 ]
%7 = and i32 %6, 1
%8 = or i32 %7, 2
%9 = udiv i32 %6, %8
%10 = add nsw i32 %5, 1
%11 = icmp ugt i32 %9, 1
br i1 %11, label %4, label %12
12: ; preds = %4, %2
%13 = phi i32 [ %1, %2 ], [ %10, %4 ]
ret i32 %13
}
/* Variables and functions */
int /*<<< orphan*/ SIGINT;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ remove(char *);
int /*<<< orphan*/ signal(int /*<<< orphan*/, void (*)(int));
void sigintHandler(int sig_num) {
  signal(SIGINT, sigintHandler);
  printf("\b\b\b");
  remove("./tmp.c");
  remove("./a.out");
  exit(0);
}


x86 assembly (clang, -O0):
<sigintHandler>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    0x2e8e(%rip),%rax
mov    (%rax),%edi
mov    0x2e8d(%rip),%rsi
call   1050 <signal@plt>
lea    0xe99(%rip),%rdi
call   1040 <printf@plt>
lea    0xe91(%rip),%rdi
call   1030 <remove@plt>
lea    0xe8d(%rip),%rdi
call   1030 <remove@plt>
xor    %edi,%edi
call   1060 <exit@plt>

x86 assembly (clang, -O2):
<sigintHandler>:
push   %rax
mov    0x2e98(%rip),%rax
mov    (%rax),%edi
mov    0x2e97(%rip),%rsi
call   1050 <signal@plt>
lea    0xea3(%rip),%rdi
call   1040 <printf@plt>
lea    0xe9b(%rip),%rdi
call   1030 <remove@plt>
lea    0xe97(%rip),%rdi
call   1030 <remove@plt>
xor    %edi,%edi
call   1060 <exit@plt>

LLVM IR (-O0):
@SIGINT = global i32 0
@.str = [4 x i8] c"\08\08\08\00"
@.str.1 = [8 x i8] c"./tmp.c\00"
@.str.2 = [8 x i8] c"./a.out\00"
define void @sigintHandler(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* @SIGINT
%4 = call i32 @signal(i32 %3, void (i32)* @sigintHandler)
%5 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%6 = call i32 @remove(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
%7 = call i32 @remove(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0))
%8 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@SIGINT = global i32 0
@.str = [4 x i8] c"\08\08\08\00"
@.str.1 = [8 x i8] c"./tmp.c\00"
@.str.2 = [8 x i8] c"./a.out\00"
define void @sigintHandler(i32 %0) {
%2 = load i32, i32* @SIGINT
%3 = tail call i32 @signal(i32 %2, void (i32)* @sigintHandler)
%4 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%5 = tail call i32 @remove(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
%6 = tail call i32 @remove(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0))
%7 = tail call i32 @exit(i32 0)
unreachable
}
double f3(double y) { return (y - 0.0) - 0.0; }


x86 assembly (clang, -O0):
<f3>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
xorps  %xmm1,%xmm1
subsd  %xmm1,%xmm0
xorps  %xmm1,%xmm1
subsd  %xmm1,%xmm0
pop    %rbp
ret

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

LLVM IR (-O0):
define double @f3(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fsub double %3, 0.000000e+00
%5 = fsub double %4, 0.000000e+00
ret double %5
}

LLVM IR (-O2):
define double @f3(double returned %0) {
ret double %0
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isspace(int);
void t_isspace_0x29() {
  Assert_real((isspace(41) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isspace.c",
              210, ("isspace should be 0 for )"));
}


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

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

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

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isspace.c\00"
@.str.1 = [26 x i8] c"isspace should be 0 for )\00"
define void @t_isspace_0x29() {
%1 = tail call i64 @isspace(i32 41)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 210, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Type definitions */
struct bst_node {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ structure(struct bst_node *, int /*<<< orphan*/);
void bst_print(struct bst_node *tree) {
  printf("BST PRINT:\n");
  structure(tree, 0);
}


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

x86 assembly (clang, -O2):
<bst_print>:
push   %rbx
mov    %rdi,%rbx
lea    0xed5(%rip),%rdi
call   1030 <puts@plt>
mov    %rbx,%rdi
xor    %esi,%esi
pop    %rbx
jmp    1040 <structure@plt>

LLVM IR (-O0):
%struct.bst_node = type { i32 }
@.str = [12 x i8] c"BST PRINT:\0A\00"
define void @bst_print(%struct.bst_node* %0) {
%2 = alloca %struct.bst_node*
store %struct.bst_node* %0, %struct.bst_node** %2
%3 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%4 = load %struct.bst_node*, %struct.bst_node** %2
%5 = call i32 @structure(%struct.bst_node* %4, i32 0)
ret void
}

LLVM IR (-O2):
%struct.bst_node = type { i32 }
@str = [11 x i8] c"BST PRINT:\00"
define void @bst_print(%struct.bst_node* %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @str, i64 0, i64 0))
%3 = tail call i32 @structure(%struct.bst_node* %0, i32 0)
ret void
}
char mxstr_replaceCharInPlace(char *s, int index, char c) {
  s[index] = c;
  return c;
}


x86 assembly (clang, -O0):
<mxstr_replaceCharInPlace>:
push   %rbp
mov    %rsp,%rbp
mov    %dl,%al
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %al,-0xd(%rbp)
mov    -0xd(%rbp),%dl
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
movsbl -0xd(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<mxstr_replaceCharInPlace>:
mov    %edx,%eax
movslq %esi,%rcx
mov    %al,(%rdi,%rcx,1)
ret

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

LLVM IR (-O2):
define signext i8 @mxstr_replaceCharInPlace(i8* nocapture writeonly %0, i32 %1, i8 returned signext %2) {
%4 = sext i32 %1 to i64
%5 = getelementptr inbounds i8, i8* %0, i64 %4
store i8 %2, i8* %5
ret i8 %2
}
void dead_test9(int *data) {
  int k = 0;
  int j;
  for (j = 0; j < 5; j++)
    k++;
  j = data[2];
  data[j] = 2;
}


x86 assembly (clang, -O0):
<dead_test9>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
cmpl   $0x5,-0x10(%rbp)
jge    1137 <dead_test9+0x37>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1116 <dead_test9+0x16>
mov    -0x8(%rbp),%rax
mov    0x8(%rax),%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
movl   $0x2,(%rax,%rcx,4)
pop    %rbp
ret

x86 assembly (clang, -O2):
<dead_test9>:
movslq 0x8(%rdi),%rax
movl   $0x2,(%rdi,%rax,4)
ret

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

LLVM IR (-O2):
define void @dead_test9(i32* nocapture %0) {
%2 = getelementptr inbounds i32, i32* %0, i64 2
%3 = load i32, i32* %2
%4 = sext i32 %3 to i64
%5 = getelementptr inbounds i32, i32* %0, i64 %4
store i32 2, i32* %5
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int getc(int /*<<< orphan*/ *);
int /*<<< orphan*/ printf(char *, int);
void crash_getc() {
  FILE *f;
  int i;
  f = fopen("this_file_doesnt_exists", "r");
  i = getc(f);
  printf("i =%i\n", i);
  fclose(f);
}


x86 assembly (clang, -O0):
<crash_getc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xeb1(%rip),%rdi
lea    0xec2(%rip),%rsi
call   1050 <fopen@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1060 <getc@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%esi
lea    0xea5(%rip),%rdi
call   1040 <printf@plt>
mov    -0x8(%rbp),%rdi
call   1030 <fclose@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<crash_getc>:
push   %rbx
lea    0xeb8(%rip),%rdi
lea    0xec9(%rip),%rsi
call   1050 <fopen@plt>
mov    %rax,%rbx
mov    %rax,%rdi
call   1060 <getc@plt>
lea    0xeb4(%rip),%rdi
mov    %eax,%esi
call   1040 <printf@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <fclose@plt>

LLVM IR (-O0):
@.str = [24 x i8] c"this_file_doesnt_exists\00"
@.str.1 = [2 x i8] c"r\00"
@.str.2 = [7 x i8] c"i =%i\0A\00"
define void @crash_getc() {
%1 = alloca i32*
%2 = alloca i32
%3 = call i32* @fopen(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
store i32* %3, i32** %1
%4 = load i32*, i32** %1
%5 = call i32 @getc(i32* %4)
store i32 %5, i32* %2
%6 = load i32, i32* %2
%7 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), i32 %6)
%8 = load i32*, i32** %1
%9 = call i32 @fclose(i32* %8)
ret void
}

LLVM IR (-O2):
@.str = [24 x i8] c"this_file_doesnt_exists\00"
@.str.1 = [2 x i8] c"r\00"
@.str.2 = [7 x i8] c"i =%i\0A\00"
define void @crash_getc() {
%1 = tail call i32* @fopen(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%2 = tail call i32 @getc(i32* %1)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), i32 %2)
%4 = tail call i32 @fclose(i32* %1)
ret void
}
int fun495() { return 495; }


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

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

LLVM IR (-O0):
define i32 @fun495() {
ret i32 495
}

LLVM IR (-O2):
define i32 @fun495() {
ret i32 495
}
/* Type definitions */
struct vdso_data {
  int dummy;
};
struct timezone {
  int dummy;
};
struct __kernel_old_timeval {
  int dummy;
};

/* Variables and functions */
int __cvdso_gettimeofday_data(struct vdso_data const *,
                              struct __kernel_old_timeval *, struct timezone *);
int __c_kernel_gettimeofday(struct __kernel_old_timeval *tv,
                            struct timezone *tz, const struct vdso_data *vd) {
  return __cvdso_gettimeofday_data(vd, tv, tz);
}


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

x86 assembly (clang, -O2):
<__c_kernel_gettimeofday>:
mov    %rdx,%rax
mov    %rsi,%rdx
mov    %rdi,%rsi
mov    %rax,%rdi
jmp    1030 <__cvdso_gettimeofday_data@plt>

LLVM IR (-O0):
%struct.__kernel_old_timeval = type { i32 }
%struct.timezone = type { i32 }
%struct.vdso_data = type { i32 }
define i32 @__c_kernel_gettimeofday(%struct.__kernel_old_timeval* %0, %struct.timezone* %1, %struct.vdso_data* %2) {
%4 = alloca %struct.__kernel_old_timeval*
%5 = alloca %struct.timezone*
%6 = alloca %struct.vdso_data*
store %struct.__kernel_old_timeval* %0, %struct.__kernel_old_timeval** %4
store %struct.timezone* %1, %struct.timezone** %5
store %struct.vdso_data* %2, %struct.vdso_data** %6
%7 = load %struct.vdso_data*, %struct.vdso_data** %6
%8 = load %struct.__kernel_old_timeval*, %struct.__kernel_old_timeval** %4
%9 = load %struct.timezone*, %struct.timezone** %5
%10 = call i32 @__cvdso_gettimeofday_data(%struct.vdso_data* %7, %struct.__kernel_old_timeval* %8, %struct.timezone* %9)
ret i32 %10
}

LLVM IR (-O2):
%struct.__kernel_old_timeval = type { i32 }
%struct.timezone = type { i32 }
%struct.vdso_data = type { i32 }
define i32 @__c_kernel_gettimeofday(%struct.__kernel_old_timeval* %0, %struct.timezone* %1, %struct.vdso_data* %2) {
%4 = tail call i32 @__cvdso_gettimeofday_data(%struct.vdso_data* %2, %struct.__kernel_old_timeval* %0, %struct.timezone* %1)
ret i32 %4
}
void _TFC4Blog5Assetg10identifierSS() {}


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

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

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

LLVM IR (-O2):
define void @_TFC4Blog5Assetg10identifierSS() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ test_vectors();
int main() {
  if (!test_vectors())
    printf("test vector ok\n");
  else
    printf("test vector fail\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1040 <test_vectors@plt>
cmp    $0x0,%eax
jne    1150 <main+0x30>
lea    0xeba(%rip),%rdi
call   1030 <printf@plt>
jmp    115c <main+0x3c>
lea    0xeb9(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [16 x i8] c"test vector ok\0A\00"
@.str.1 = [18 x i8] c"test vector fail\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @test_vectors()
%3 = icmp ne i32 %2, 0
br i1 %3, label %6, label %4
4: ; preds = %0
%5 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
br label %8
6: ; preds = %0
%7 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0))
br label %8
8: ; preds = %6, %4
ret i32 0
}

LLVM IR (-O2):
@str = [15 x i8] c"test vector ok\00"
@str.2 = [17 x i8] c"test vector fail\00"
define i32 @main() {
%1 = tail call i32 (...) @test_vectors()
%2 = icmp eq i32 %1, 0
%3 = select i1 %2, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @str, i64 0, i64 0), i8* getelementptr inbounds ([17 x i8], [17 x i8]* @str.2, i64 0, i64 0)
%4 = tail call i32 @puts(i8* dereferenceable(1) %3)
ret i32 0
}
void SCB_2_ScbModePostEnable(void) {}


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

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

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

LLVM IR (-O2):
define void @SCB_2_ScbModePostEnable() {
ret void
}
void modbus_ext_get_state(struct modbus_ext_status *status) {}


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

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

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

LLVM IR (-O2):
%struct.modbus_ext_status = type opaque
define void @modbus_ext_get_state(%struct.modbus_ext_status* nocapture %0) {
ret void
}
void task_dump_trace(void) {}


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

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

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

LLVM IR (-O2):
define void @task_dump_trace() {
ret void
}
extern int long_and_complicated_name() { return 3; }


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

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

LLVM IR (-O0):
define i32 @long_and_complicated_name() {
ret i32 3
}

LLVM IR (-O2):
define i32 @long_and_complicated_name() {
ret i32 3
}
/* Variables and functions */
int EXIT_SUCCESS;
int /*<<< orphan*/ printf(char *, int, int, int);
int main(void) {
  int val1 = 567;
  int val2 = 987;
  int result = val2 ^ ((val1 ^ val2) & -(val1 < val2));
  printf("The minimum of %d and %d is: %d\n", val1, val2, result);
  return (EXIT_SUCCESS);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x237,-0x8(%rbp)
movl   $0x3db,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    -0x8(%rbp),%ecx
xor    -0xc(%rbp),%ecx
mov    -0x8(%rbp),%edx
cmp    -0xc(%rbp),%edx
setl   %dl
and    $0x1,%dl
movzbl %dl,%esi
xor    %edx,%edx
sub    %esi,%edx
and    %edx,%ecx
xor    %ecx,%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
mov    -0x10(%rbp),%ecx
lea    0xea0(%rip),%rdi
call   1030 <printf@plt>
mov    0x2e74(%rip),%rax
mov    (%rax),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [33 x i8] c"The minimum of %d and %d is: %d\0A\00"
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 0, i32* %1
store i32 567, i32* %2
store i32 987, i32* %3
%5 = load i32, i32* %3
%6 = load i32, i32* %2
%7 = load i32, i32* %3
%8 = xor i32 %6, %7
%9 = load i32, i32* %2
%10 = load i32, i32* %3
%11 = icmp slt i32 %9, %10
%12 = zext i1 %11 to i32
%13 = sub nsw i32 0, %12
%14 = and i32 %8, %13
%15 = xor i32 %5, %14
store i32 %15, i32* %4
%16 = load i32, i32* %2
%17 = load i32, i32* %3
%18 = load i32, i32* %4
%19 = call i32 @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0), i32 %16, i32 %17, i32 %18)
%20 = load i32, i32* @EXIT_SUCCESS
ret i32 %20
}

LLVM IR (-O2):
@.str = [33 x i8] c"The minimum of %d and %d is: %d\0A\00"
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0), i32 567, i32 987, i32 567)
%2 = load i32, i32* @EXIT_SUCCESS
ret i32 %2
}
OP(dd, e8) {
  illegal_1();
  op_e8();
}


x86 assembly (clang, -O0):
<OP>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    $0x0,%al
call   1030 <illegal_1@plt>
mov    $0x0,%al
call   1040 <op_e8@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @OP(i32 %0, i32 %1) {
%3 = tail call i32 (...) @illegal_1()
%4 = tail call i32 (...) @op_e8()
ret i32 undef
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
unsigned _get_fastrc_rate(void) {
  uint32_t ckgr_mor = *((volatile uint32_t *)(((0x400e0400) + 0x20)));
  if (ckgr_mor & (1 << 3)) {
    const unsigned mul = (ckgr_mor & (7 << 4)) >> (4);
    return (4 * 1000 * 1000) * (mul + 1);
  } else {
    return 0;
  }
}


x86 assembly (clang, -O0):
<_get_fastrc_rate>:
push   %rbp
mov    %rsp,%rbp
mov    $0x400e0420,%eax
mov    (%rax),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
and    $0x8,%eax
cmp    $0x0,%eax
je     113d <_get_fastrc_rate+0x3d>
mov    -0x8(%rbp),%eax
and    $0x70,%eax
sar    $0x4,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
imul   $0x3d0900,%eax,%eax
mov    %eax,-0x4(%rbp)
jmp    1144 <_get_fastrc_rate+0x44>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_get_fastrc_rate>:
mov    0x400e0420,%eax
mov    %eax,%ecx
shl    $0x1c,%ecx
sar    $0x1f,%ecx
shr    $0x4,%eax
and    $0x7,%eax
imul   $0x3d0900,%eax,%eax
add    $0x3d0900,%eax
and    %ecx,%eax
ret

LLVM IR (-O0):
define i32 @_get_fastrc_rate() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = load volatile i32, i32* inttoptr (i64 1074660384 to i32*)
store i32 %4, i32* %2
%5 = load i32, i32* %2
%6 = and i32 %5, 8
%7 = icmp ne i32 %6, 0
br i1 %7, label %8, label %15
8: ; preds = %0
%9 = load i32, i32* %2
%10 = and i32 %9, 112
%11 = ashr i32 %10, 4
store i32 %11, i32* %3
%12 = load i32, i32* %3
%13 = add i32 %12, 1
%14 = mul i32 4000000, %13
store i32 %14, i32* %1
br label %16
15: ; preds = %0
store i32 0, i32* %1
br label %16
16: ; preds = %15, %8
%17 = load i32, i32* %1
ret i32 %17
}

LLVM IR (-O2):
define i32 @_get_fastrc_rate() {
%1 = load volatile i32, i32* inttoptr (i64 1074660384 to i32*)
%2 = and i32 %1, 8
%3 = icmp eq i32 %2, 0
%4 = lshr i32 %1, 4
%5 = and i32 %4, 7
%6 = mul nuw nsw i32 %5, 4000000
%7 = add nuw nsw i32 %6, 4000000
%8 = select i1 %3, i32 0, i32 %7
ret i32 %8
}
void av_buffer_pool_uninit() {}


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

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

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

LLVM IR (-O2):
define void @av_buffer_pool_uninit() {
ret void
}
int fun373() { return 373; }


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

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

LLVM IR (-O0):
define i32 @fun373() {
ret i32 373
}

LLVM IR (-O2):
define i32 @fun373() {
ret i32 373
}
void avcodec_pix_fmt_to_codec_tag() {}


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

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

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

LLVM IR (-O2):
define void @avcodec_pix_fmt_to_codec_tag() {
ret void
}
void pci_create_legacy_files(struct pci_bus *bus) { return; }


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

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

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

LLVM IR (-O2):
%struct.pci_bus = type opaque
define void @pci_create_legacy_files(%struct.pci_bus* nocapture %0) {
ret void
}
void MakeSegv() {
  volatile int *p;
  int i;
  p = &i;
  *p = 1;
  *p = 2;
  *p = 3;
  *p = 4;
  *p = 5;
  *p = 6;
  *p = 7;
  *p = 8;
  *p = 9;
  p = (volatile int *)0x9;
  i = *p;
}


x86 assembly (clang, -O0):
<MakeSegv>:
push   %rbp
mov    %rsp,%rbp
lea    -0xc(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movl   $0x1,(%rax)
mov    -0x8(%rbp),%rax
movl   $0x2,(%rax)
mov    -0x8(%rbp),%rax
movl   $0x3,(%rax)
mov    -0x8(%rbp),%rax
movl   $0x4,(%rax)
mov    -0x8(%rbp),%rax
movl   $0x5,(%rax)
mov    -0x8(%rbp),%rax
movl   $0x6,(%rax)
mov    -0x8(%rbp),%rax
movl   $0x7,(%rax)
mov    -0x8(%rbp),%rax
movl   $0x8,(%rax)
mov    -0x8(%rbp),%rax
movl   $0x9,(%rax)
mov    $0x9,%eax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0xc(%rbp)
pop    %rbp
ret

x86 assembly (clang, -O2):
<MakeSegv>:
movl   $0x1,-0x4(%rsp)
movl   $0x2,-0x4(%rsp)
movl   $0x3,-0x4(%rsp)
movl   $0x4,-0x4(%rsp)
movl   $0x5,-0x4(%rsp)
movl   $0x6,-0x4(%rsp)
movl   $0x7,-0x4(%rsp)
movl   $0x8,-0x4(%rsp)
movl   $0x9,-0x4(%rsp)
mov    0x9,%eax
ret

LLVM IR (-O0):
define void @MakeSegv() {
%1 = alloca i32*
%2 = alloca i32
store i32* %2, i32** %1
%3 = load i32*, i32** %1
store volatile i32 1, i32* %3
%4 = load i32*, i32** %1
store volatile i32 2, i32* %4
%5 = load i32*, i32** %1
store volatile i32 3, i32* %5
%6 = load i32*, i32** %1
store volatile i32 4, i32* %6
%7 = load i32*, i32** %1
store volatile i32 5, i32* %7
%8 = load i32*, i32** %1
store volatile i32 6, i32* %8
%9 = load i32*, i32** %1
store volatile i32 7, i32* %9
%10 = load i32*, i32** %1
store volatile i32 8, i32* %10
%11 = load i32*, i32** %1
store volatile i32 9, i32* %11
store i32* inttoptr (i64 9 to i32*), i32** %1
%12 = load i32*, i32** %1
%13 = load volatile i32, i32* %12
store i32 %13, i32* %2
ret void
}

LLVM IR (-O2):
define void @MakeSegv() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
store volatile i32 1, i32* %1
store volatile i32 2, i32* %1
store volatile i32 3, i32* %1
store volatile i32 4, i32* %1
store volatile i32 5, i32* %1
store volatile i32 6, i32* %1
store volatile i32 7, i32* %1
store volatile i32 8, i32* %1
store volatile i32 9, i32* %1
%3 = load volatile i32, i32* inttoptr (i64 9 to i32*)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int uint32_t;
struct sha3_ctx {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ cryptonite_sha3_finalize_with_pad_byte(struct sha3_ctx *,
                                                          int);
int /*<<< orphan*/ cryptonite_sha3_output(struct sha3_ctx *,
                                          int /*<<< orphan*/ *, int);
void cryptonite_keccak_finalize(struct sha3_ctx *ctx, uint32_t hashlen,
                                uint8_t *out) {
  cryptonite_sha3_finalize_with_pad_byte(ctx, 1);
  cryptonite_sha3_output(ctx, out, hashlen / 8);
}


x86 assembly (clang, -O0):
<cryptonite_keccak_finalize>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x1,%esi
call   1030 <cryptonite_sha3_finalize_with_pad_byte@plt>
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0xc(%rbp),%eax
mov    $0x8,%ecx
cltd
idiv   %ecx
mov    %eax,%edx
call   1040 <cryptonite_sha3_output@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cryptonite_keccak_finalize>:
push   %r15
push   %r14
push   %rbx
mov    %rdx,%r14
mov    %esi,%ebx
mov    %rdi,%r15
mov    $0x1,%esi
call   1030 <cryptonite_sha3_finalize_with_pad_byte@plt>
lea    0x7(%rbx),%edx
test   %ebx,%ebx
cmovns %ebx,%edx
sar    $0x3,%edx
mov    %r15,%rdi
mov    %r14,%rsi
pop    %rbx
pop    %r14
pop    %r15
jmp    1040 <cryptonite_sha3_output@plt>

LLVM IR (-O0):
%struct.sha3_ctx = type { i32 }
define void @cryptonite_keccak_finalize(%struct.sha3_ctx* %0, i32 %1, i32* %2) {
%4 = alloca %struct.sha3_ctx*
%5 = alloca i32
%6 = alloca i32*
store %struct.sha3_ctx* %0, %struct.sha3_ctx** %4
store i32 %1, i32* %5
store i32* %2, i32** %6
%7 = load %struct.sha3_ctx*, %struct.sha3_ctx** %4
%8 = call i32 @cryptonite_sha3_finalize_with_pad_byte(%struct.sha3_ctx* %7, i32 1)
%9 = load %struct.sha3_ctx*, %struct.sha3_ctx** %4
%10 = load i32*, i32** %6
%11 = load i32, i32* %5
%12 = sdiv i32 %11, 8
%13 = call i32 @cryptonite_sha3_output(%struct.sha3_ctx* %9, i32* %10, i32 %12)
ret void
}

LLVM IR (-O2):
%struct.sha3_ctx = type { i32 }
define void @cryptonite_keccak_finalize(%struct.sha3_ctx* %0, i32 %1, i32* %2) {
%4 = tail call i32 @cryptonite_sha3_finalize_with_pad_byte(%struct.sha3_ctx* %0, i32 1)
%5 = sdiv i32 %1, 8
%6 = tail call i32 @cryptonite_sha3_output(%struct.sha3_ctx* %0, i32* %2, i32 %5)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ m68ki_jump(int /*<<< orphan*/);
int /*<<< orphan*/ m68ki_pull_16();
int /*<<< orphan*/ m68ki_pull_32();
int /*<<< orphan*/ m68ki_set_ccr(int /*<<< orphan*/);
void m68k_op_rtr_32(void) {
  m68ki_set_ccr(m68ki_pull_16());
  m68ki_jump(m68ki_pull_32());
}


x86 assembly (clang, -O0):
<m68k_op_rtr_32>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1060 <m68ki_pull_16@plt>
mov    %eax,%edi
call   1050 <m68ki_set_ccr@plt>
mov    $0x0,%al
call   1040 <m68ki_pull_32@plt>
mov    %eax,%edi
call   1030 <m68ki_jump@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<m68k_op_rtr_32>:
push   %rax
xor    %eax,%eax
call   1060 <m68ki_pull_16@plt>
mov    %eax,%edi
call   1050 <m68ki_set_ccr@plt>
xor    %eax,%eax
call   1040 <m68ki_pull_32@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <m68ki_jump@plt>

LLVM IR (-O0):
define void @m68k_op_rtr_32() {
%1 = call i32 (...) @m68ki_pull_16()
%2 = call i32 @m68ki_set_ccr(i32 %1)
%3 = call i32 (...) @m68ki_pull_32()
%4 = call i32 @m68ki_jump(i32 %3)
ret void
}

LLVM IR (-O2):
define void @m68k_op_rtr_32() {
%1 = tail call i32 (...) @m68ki_pull_16()
%2 = tail call i32 @m68ki_set_ccr(i32 %1)
%3 = tail call i32 (...) @m68ki_pull_32()
%4 = tail call i32 @m68ki_jump(i32 %3)
ret void
}
/* Variables and functions */
char *ft_memchr(char const *, int, scalar_t__);
scalar_t__ ft_strlen(char *);
char *ft_strchr(const char *s, int c) {
  return (ft_memchr(s, c, ft_strlen((char *)s) + 1));
}


x86 assembly (clang, -O0):
<ft_strchr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <ft_strlen@plt>
mov    -0x18(%rbp),%rdi
mov    -0x10(%rbp),%esi
mov    %rax,%rdx
add    $0x1,%rdx
call   1030 <ft_memchr@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_strchr>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %rdi,%rbx
call   1040 <ft_strlen@plt>
lea    0x1(%rax),%rdx
mov    %rbx,%rdi
mov    %ebp,%esi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <ft_memchr@plt>

LLVM IR (-O0):
define i8* @ft_strchr(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 i8*, i8** %3
%8 = call i64 @ft_strlen(i8* %7)
%9 = add nsw i64 %8, 1
%10 = call i8* @ft_memchr(i8* %5, i32 %6, i64 %9)
ret i8* %10
}

LLVM IR (-O2):
define i8* @ft_strchr(i8* %0, i32 %1) {
%3 = tail call i64 @ft_strlen(i8* %0)
%4 = add nsw i64 %3, 1
%5 = tail call i8* @ft_memchr(i8* %0, i32 %1, i64 %4)
ret i8* %5
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int);
int /*<<< orphan*/ swap(int *, int *);
int main() {
  int a = 3, b = 5;
  printf("a = %d\tb = %d\n", a, b);
  swap(&a, &b);
  printf("a = %d\tb = %d\n", a, b);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x3,-0x8(%rbp)
movl   $0x5,-0xc(%rbp)
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
lea    0xeb6(%rip),%rdi
call   1030 <printf@plt>
lea    -0x8(%rbp),%rdi
lea    -0xc(%rbp),%rsi
call   1040 <swap@plt>
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
lea    0xe97(%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
movl   $0x3,0xc(%rsp)
movl   $0x5,0x8(%rsp)
lea    0xec4(%rip),%rbx
mov    %rbx,%rdi
mov    $0x3,%esi
mov    $0x5,%edx
call   1030 <printf@plt>
lea    0xc(%rsp),%rdi
lea    0x8(%rsp),%rsi
call   1040 <swap@plt>
mov    0xc(%rsp),%esi
mov    0x8(%rsp),%edx
mov    %rbx,%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [15 x i8] c"a = %d\09b = %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = bitcast i32* %1 to i8*
store i32 3, i32* %1
%4 = bitcast i32* %2 to i8*
store i32 5, i32* %2
%5 = tail call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 3, i32 5)
%6 = call i32 @swap(i32* %1, i32* %2)
%7 = load i32, i32* %1
%8 = load i32, i32* %2
%9 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 %7, i32 %8)
ret i32 0
}
/* Variables and functions */
int printf(char *, int);
int printint(int data) { return printf("%d ", data); }


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

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

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d \00"
define i32 @printint(i32 %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %0)
ret i32 %2
}
/* Type definitions */
struct sockaddr {
  int dummy;
};
typedef int /*<<< orphan*/ socklen_t;

/* Variables and functions */
int accept(int, struct sockaddr *, int /*<<< orphan*/ *);
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ perror(char *);
int Accept(int fd, struct sockaddr *sa, socklen_t *salenptr) {
  int n;
  if ((n = accept(fd, sa, salenptr)) < 0) {
    perror("accept error");
    exit(1);
  }
  return (n);
}


x86 assembly (clang, -O0):
<Accept>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1040 <accept@plt>
mov    %eax,-0x1c(%rbp)
cmp    $0x0,%eax
jge    1175 <Accept+0x45>
lea    0xe9a(%rip),%rdi
call   1030 <perror@plt>
mov    $0x1,%edi
call   1050 <exit@plt>
mov    -0x1c(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Accept>:
push   %rax
call   1040 <accept@plt>
test   %eax,%eax
js     113c <Accept+0xc>
pop    %rcx
ret
lea    0xebd(%rip),%rdi
call   1030 <perror@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
%struct.sockaddr = type { i32 }
@.str = [13 x i8] c"accept error\00"
define i32 @Accept(i32 %0, %struct.sockaddr* %1, i32* %2) {
%4 = alloca i32
%5 = alloca %struct.sockaddr*
%6 = alloca i32*
%7 = alloca i32
store i32 %0, i32* %4
store %struct.sockaddr* %1, %struct.sockaddr** %5
store i32* %2, i32** %6
%8 = load i32, i32* %4
%9 = load %struct.sockaddr*, %struct.sockaddr** %5
%10 = load i32*, i32** %6
%11 = call i32 @accept(i32 %8, %struct.sockaddr* %9, i32* %10)
store i32 %11, i32* %7
%12 = icmp slt i32 %11, 0
br i1 %12, label %13, label %16
13: ; preds = %3
%14 = call i32 @perror(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
%15 = call i32 @exit(i32 1)
unreachable
16: ; preds = %3
%17 = load i32, i32* %7
ret i32 %17
}

LLVM IR (-O2):
%struct.sockaddr = type { i32 }
@.str = [13 x i8] c"accept error\00"
define i32 @Accept(i32 %0, %struct.sockaddr* %1, i32* %2) {
%4 = tail call i32 @accept(i32 %0, %struct.sockaddr* %1, i32* %2)
%5 = icmp slt i32 %4, 0
br i1 %5, label %6, label %9
6: ; preds = %3
%7 = tail call i32 @perror(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
%8 = tail call i32 @exit(i32 1)
unreachable
9: ; preds = %3
ret i32 %4
}
/* Variables and functions */
double floor(double);
double revolution(double x) { return (x - 360.0 * floor(x * (1.0 / 360.0))); }


x86 assembly (clang, -O0):
<revolution>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  0xed9(%rip),%xmm0
mulsd  -0x8(%rbp),%xmm0
call   1030 <floor@plt>
movsd  -0x10(%rbp),%xmm1
movsd  0xeba(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<revolution>:
push   %rax
movapd %xmm0,%xmm1
movsd  %xmm0,(%rsp)
movsd  0xede(%rip),%xmm0
mulsd  %xmm1,%xmm0
call   1030 <floor@plt>
mulsd  0xed5(%rip),%xmm0
addsd  (%rsp),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @revolution(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = load double, double* %2
%5 = fmul double %4, 0x3F66C16C16C16C17
%6 = call double @llvm.floor.f64(double %5)
%7 = call double @llvm.fmuladd.f64(double -3.600000e+02, double %6, double %3)
ret double %7
}

LLVM IR (-O2):
define double @revolution(double %0) {
%2 = fmul double %0, 0x3F66C16C16C16C17
%3 = tail call double @llvm.floor.f64(double %2)
%4 = tail call double @llvm.fmuladd.f64(double %3, double -3.600000e+02, double %0)
ret double %4
}
/* Variables and functions */
size_t strlen(const char *s) {
  const char *p = s;
  while (*p != '\0')
    p++;
  return (size_t)(p - s);
}


x86 assembly (clang, -O0):
<strlen>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     1131 <strlen+0x31>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1110 <strlen+0x10>
mov    -0x10(%rbp),%rax
mov    -0x8(%rbp),%rcx
sub    %rcx,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strlen>:
mov    $0xffffffffffffffff,%rax
nopw   0x0(%rax,%rax,1)
cmpb   $0x0,0x1(%rdi,%rax,1)
lea    0x1(%rax),%rax
jne    1110 <strlen+0x10>
ret

LLVM IR (-O0):
define i64 @strlen(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
store i8* %4, i8** %3
br label %5
5: ; preds = %10, %1
%6 = load i8*, i8** %3
%7 = load i8, i8* %6
%8 = sext i8 %7 to i32
%9 = icmp ne i32 %8, 0
br i1 %9, label %10, label %13
10: ; preds = %5
%11 = load i8*, i8** %3
%12 = getelementptr inbounds i8, i8* %11, i32 1
store i8* %12, i8** %3
br label %5
13: ; preds = %5
%14 = load i8*, i8** %3
%15 = load i8*, i8** %2
%16 = ptrtoint i8* %14 to i64
%17 = ptrtoint i8* %15 to i64
%18 = sub i64 %16, %17
ret i64 %18
}

LLVM IR (-O2):
define i64 @strlen(i8* %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i8* [ %0, %1 ], [ %6, %2 ]
%4 = load i8, i8* %3
%5 = icmp eq i8 %4, 0
%6 = getelementptr inbounds i8, i8* %3, i64 1
br i1 %5, label %7, label %2
7: ; preds = %2
%8 = ptrtoint i8* %3 to i64
%9 = ptrtoint i8* %0 to i64
%10 = sub i64 %8, %9
ret i64 %10
}
/* Type definitions */
typedef int /*<<< orphan*/ sem_t;

/* Variables and functions */
int /*<<< orphan*/ sem_destroy(int /*<<< orphan*/ *);
int /*<<< orphan*/ xfree(int /*<<< orphan*/ *);
void sem_free(sem_t *sem) {
  sem_destroy(sem);
  xfree(sem);
}


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

x86 assembly (clang, -O2):
<sem_free>:
push   %rbx
mov    %rdi,%rbx
call   1040 <sem_destroy@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <xfree@plt>

LLVM IR (-O0):
define void @sem_free(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = call i32 @sem_destroy(i32* %3)
%5 = load i32*, i32** %2
%6 = call i32 @xfree(i32* %5)
ret void
}

LLVM IR (-O2):
define void @sem_free(i32* %0) {
%2 = tail call i32 @sem_destroy(i32* %0)
%3 = tail call i32 @xfree(i32* %0)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
int hash(int /*<<< orphan*/ *, size_t, int /*<<< orphan*/ const *, size_t, int,
         int);
int keccak_384(uint8_t *out, size_t outlen, const uint8_t *in, size_t inlen) {
  if (outlen > (384 / 8)) {
    return -1;
  }
  return hash(out, outlen, in, inlen, 200 - (384 / 4), 0x01);
}


x86 assembly (clang, -O0):
<keccak_384>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    %rcx,-0x28(%rbp)
cmpq   $0x30,-0x18(%rbp)
jbe    113f <keccak_384+0x2f>
movl   $0xffffffff,-0x4(%rbp)
jmp    1163 <keccak_384+0x53>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x20(%rbp),%rdx
mov    -0x28(%rbp),%rcx
mov    $0x68,%r8d
mov    $0x1,%r9d
call   1030 <hash@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<keccak_384>:
cmp    $0x30,%rsi
jbe    111c <keccak_384+0xc>
mov    $0xffffffff,%eax
ret
mov    $0x68,%r8d
mov    $0x1,%r9d
jmp    1030 <hash@plt>

LLVM IR (-O0):
define i32 @keccak_384(i32* %0, i64 %1, i32* %2, i64 %3) {
%5 = alloca i32
%6 = alloca i32*
%7 = alloca i64
%8 = alloca i32*
%9 = alloca i64
store i32* %0, i32** %6
store i64 %1, i64* %7
store i32* %2, i32** %8
store i64 %3, i64* %9
%10 = load i64, i64* %7
%11 = icmp ugt i64 %10, 48
br i1 %11, label %12, label %13
12: ; preds = %4
store i32 -1, i32* %5
br label %19
13: ; preds = %4
%14 = load i32*, i32** %6
%15 = load i64, i64* %7
%16 = load i32*, i32** %8
%17 = load i64, i64* %9
%18 = call i32 @hash(i32* %14, i64 %15, i32* %16, i64 %17, i32 104, i32 1)
store i32 %18, i32* %5
br label %19
19: ; preds = %13, %12
%20 = load i32, i32* %5
ret i32 %20
}

LLVM IR (-O2):
define i32 @keccak_384(i32* %0, i64 %1, i32* %2, i64 %3) {
%5 = icmp ugt i64 %1, 48
br i1 %5, label %8, label %6
6: ; preds = %4
%7 = tail call i32 @hash(i32* %0, i64 %1, i32* %2, i64 %3, i32 104, i32 1)
br label %8
8: ; preds = %4, %6
%9 = phi i32 [ %7, %6 ], [ -1, %4 ]
ret i32 %9
}
void NV21ToARGBRow_Any_SSSE3() {}


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

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

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

LLVM IR (-O2):
define void @NV21ToARGBRow_Any_SSSE3() {
ret void
}
void *qd_http_server_run(void *qd_http_server) { return 0; }


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

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

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

LLVM IR (-O2):
define noalias i8* @qd_http_server_run(i8* nocapture readnone %0) {
ret i8* null
}
int deg_to_index_160(int val) {
  int idx;
  idx = val * 2 / 45;
  if (idx < 0)
    idx += 160;
  return (idx);
}


x86 assembly (clang, -O0):
<deg_to_index_160>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shl    $0x1,%eax
mov    $0x2d,%ecx
cltd
idiv   %ecx
mov    %eax,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jge    112d <deg_to_index_160+0x2d>
mov    -0x8(%rbp),%eax
add    $0xa0,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<deg_to_index_160>:
lea    (%rdi,%rdi,1),%eax
cltq
imul   $0xffffffffb60b60b7,%rax,%rax
shr    $0x20,%rax
lea    (%rax,%rdi,2),%eax
mov    %eax,%ecx
shr    $0x1f,%ecx
sar    $0x5,%eax
lea    (%rax,%rcx,1),%edx
cmp    $0xffffffea,%edi
lea    0xa0(%rax,%rcx,1),%eax
cmovge %edx,%eax
ret

LLVM IR (-O0):
define i32 @deg_to_index_160(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = mul nsw i32 %4, 2
%6 = sdiv i32 %5, 45
store i32 %6, i32* %3
%7 = load i32, i32* %3
%8 = icmp slt i32 %7, 0
br i1 %8, label %9, label %12
9: ; preds = %1
%10 = load i32, i32* %3
%11 = add nsw i32 %10, 160
store i32 %11, i32* %3
br label %12
12: ; preds = %9, %1
%13 = load i32, i32* %3
ret i32 %13
}

LLVM IR (-O2):
define i32 @deg_to_index_160(i32 %0) {
%2 = shl nsw i32 %0, 1
%3 = sdiv i32 %2, 45
%4 = icmp slt i32 %0, -22
%5 = add nsw i32 %3, 160
%6 = select i1 %4, i32 %5, i32 %3
ret i32 %6
}