xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ output_logfile(char *);
int /*<<< orphan*/ sprintf(char *, char *, char *, int);
void output_int(char *name, int value) {
  char data[2048];
  sprintf(data, "%-35s = %9d\n", name, value);
  output_logfile(data);
}


x86 assembly (clang, -O0):
<output_int>:
push   %rbp
mov    %rsp,%rbp
sub    $0x810,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
lea    -0x810(%rbp),%rdi
mov    -0x8(%rbp),%rdx
mov    -0xc(%rbp),%ecx
lea    0xeb9(%rip),%rsi
call   1040 <sprintf@plt>
lea    -0x810(%rbp),%rdi
call   1030 <output_logfile@plt>
add    $0x810,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<output_int>:
push   %rbx
sub    $0x800,%rsp
mov    %esi,%ecx
mov    %rdi,%rdx
lea    0xecc(%rip),%rsi
mov    %rsp,%rbx
mov    %rbx,%rdi
call   1040 <sprintf@plt>
mov    %rbx,%rdi
call   1030 <output_logfile@plt>
add    $0x800,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [13 x i8] c"%-35s = %9d\0A\00"
define void @output_int(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca [2048 x i8]
store i8* %0, i8** %3
store i32 %1, i32* %4
%6 = getelementptr inbounds [2048 x i8], [2048 x i8]* %5, i64 0, i64 0
%7 = load i8*, i8** %3
%8 = load i32, i32* %4
%9 = call i32 @sprintf(i8* %6, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* %7, i32 %8)
%10 = getelementptr inbounds [2048 x i8], [2048 x i8]* %5, i64 0, i64 0
%11 = call i32 @output_logfile(i8* %10)
ret void
}

LLVM IR (-O2):
@.str = [13 x i8] c"%-35s = %9d\0A\00"
define void @output_int(i8* %0, i32 %1) {
%3 = alloca [2048 x i8]
%4 = getelementptr inbounds [2048 x i8], [2048 x i8]* %3, i64 0, i64 0
%5 = call i32 @sprintf(i8* %4, i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* %0, i32 %1)
%6 = call i32 @output_logfile(i8* %4)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FTSENT;

/* Variables and functions */
int sizecmp(int /*<<< orphan*/ const *, int /*<<< orphan*/ const *);
int revsizecmp(const FTSENT *a, const FTSENT *b) { return (sizecmp(b, a)); }


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

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

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

LLVM IR (-O2):
define i32 @revsizecmp(i32* %0, i32* %1) {
%3 = tail call i32 @sizecmp(i32* %1, i32* %0)
ret i32 %3
}
void clr() { asm volatile("popq %%rax\n\t" :::); }


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

x86 assembly (clang, -O2):
<clr>:
pop    %rax
ret

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

LLVM IR (-O2):
define void @clr() {
tail call void asm sideeffect "popq %rax\0A\09", "~{dirflag},~{fpsr},~{flags}"()
ret void
}
void ff_hevc_put_hevc_uni_w_qpel_hv48_10_sse4() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_uni_w_qpel_hv48_10_sse4() {
ret void
}
fatal(pat, arg1, arg2, arg3) char *pat;
int arg1, arg2, arg3;
{
  say(pat, arg1, arg2, arg3);
  my_exit(1);
}


x86 assembly (clang, -O0):
<fatal>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    %edx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%esi
mov    -0x18(%rbp),%edx
mov    -0x1c(%rbp),%ecx
mov    $0x0,%al
call   1040 <say@plt>
mov    $0x1,%edi
mov    $0x0,%al
call   1030 <my_exit@plt>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fatal>:
push   %rax
xor    %eax,%eax
call   1040 <say@plt>
mov    $0x1,%edi
xor    %eax,%eax
pop    %rcx
jmp    1030 <my_exit@plt>

LLVM IR (-O0):
define i32 @fatal(i8* %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca i32
%6 = alloca i8*
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
store i8* %0, i8** %6
store i32 %1, i32* %7
store i32 %2, i32* %8
store i32 %3, i32* %9
%10 = load i8*, i8** %6
%11 = load i32, i32* %7
%12 = load i32, i32* %8
%13 = load i32, i32* %9
%14 = call i32 (i8*, i32, i32, i32, ...) bitcast (i32 (...)* @say to i32 (i8*, i32, i32, i32, ...)*)(i8* %10, i32 %11, i32 %12, i32 %13)
%15 = call i32 (i32, ...) bitcast (i32 (...)* @my_exit to i32 (i32, ...)*)(i32 1)
%16 = load i32, i32* %5
ret i32 %16
}

LLVM IR (-O2):
define i32 @fatal(i8* %0, i32 %1, i32 %2, i32 %3) {
%5 = tail call i32 (i8*, i32, i32, i32, ...) bitcast (i32 (...)* @say to i32 (i8*, i32, i32, i32, ...)*)(i8* %0, i32 %1, i32 %2, i32 %3)
%6 = tail call i32 (i32, ...) bitcast (i32 (...)* @my_exit to i32 (i32, ...)*)(i32 1)
ret i32 undef
}
/* Variables and functions */
char *malloc(int);
int /*<<< orphan*/ sprintf(char *, char *, char *, char *);
char *subsSuffix2(char *nameptr, char *suffptr) {
  char *subsptr;
  subsptr = malloc(128 * sizeof(char));
  sprintf(subsptr, "%s%s", nameptr, suffptr);
  return (subsptr);
}


x86 assembly (clang, -O0):
<subsSuffix2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x80,%edi
call   1030 <malloc@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x8(%rbp),%rdx
mov    -0x10(%rbp),%rcx
lea    0xeaf(%rip),%rsi
call   1040 <sprintf@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<subsSuffix2>:
push   %r15
push   %r14
push   %rbx
mov    %rsi,%r14
mov    %rdi,%r15
mov    $0x80,%edi
call   1030 <malloc@plt>
mov    %rax,%rbx
lea    0xec1(%rip),%rsi
mov    %rax,%rdi
mov    %r15,%rdx
mov    %r14,%rcx
call   1040 <sprintf@plt>
mov    %rbx,%rax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [5 x i8] c"%s%s\00"
define i8* @subsSuffix2(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%6 = call i8* @malloc(i32 128)
store i8* %6, i8** %5
%7 = load i8*, i8** %5
%8 = load i8*, i8** %3
%9 = load i8*, i8** %4
%10 = call i32 @sprintf(i8* %7, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* %8, i8* %9)
%11 = load i8*, i8** %5
ret i8* %11
}

LLVM IR (-O2):
@.str = [5 x i8] c"%s%s\00"
define noalias i8* @subsSuffix2(i8* %0, i8* %1) {
%3 = tail call dereferenceable_or_null(128) i8* @malloc(i32 128)
%4 = tail call i32 @sprintf(i8* dereferenceable(1) %3, i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %1)
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ start_tftp_server(int, char *);
int main(int argc, char **argv) {
  start_tftp_server(10220, "./tftproot");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x27ec,%edi
lea    0xece(%rip),%rsi
call   1030 <start_tftp_server@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rsi
mov    $0x27ec,%edi
call   1030 <start_tftp_server@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [11 x i8] c"./tftproot\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 @start_tftp_server(i32 10220, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [11 x i8] c"./tftproot\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @start_tftp_server(i32 10220, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
/* Type definitions */
struct main_args {
  int dummy;
};

/* Variables and functions */
int captured_main(struct main_args *);
int lgdb_main(struct main_args *args) { return captured_main(args); }


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

x86 assembly (clang, -O2):
<lgdb_main>:
jmp    1030 <captured_main@plt>

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

LLVM IR (-O2):
%struct.main_args = type { i32 }
define i32 @lgdb_main(%struct.main_args* %0) {
%2 = tail call i32 @captured_main(%struct.main_args* %0)
ret i32 %2
}
/* Variables and functions */
int strcmp(char const *, char const *);
int stab_cmpkey(const char *a, const size_t alen, const char *b,
                const size_t blen) {
  return strcmp(a, b);
}


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

x86 assembly (clang, -O2):
<stab_cmpkey>:
mov    %rdx,%rsi
jmp    1030 <strcmp@plt>

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

LLVM IR (-O2):
define i32 @stab_cmpkey(i8* nocapture %0, i64 %1, i8* nocapture %2, i64 %3) {
%5 = tail call i32 @strcmp(i8* dereferenceable(1) %0, i8* dereferenceable(1) %2)
ret i32 %5
}
void fakeClStageComplete(int stage) {}


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

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

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

LLVM IR (-O2):
define void @fakeClStageComplete(i32 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ memcpy(void *, void const *, size_t);
int copyin(const void *src, void *dst, size_t nbytes) {
  memcpy(dst, src, nbytes);
  return 0;
}


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

x86 assembly (clang, -O2):
<copyin>:
push   %rax
mov    %rdi,%rax
mov    %rsi,%rdi
mov    %rax,%rsi
call   1030 <memcpy@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @copyin(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** %5
%8 = load i8*, i8** %4
%9 = load i64, i64* %6
%10 = call i32 @memcpy(i8* %7, i8* %8, i64 %9)
ret i32 0
}

LLVM IR (-O2):
define i32 @copyin(i8* %0, i8* %1, i64 %2) {
%4 = tail call i32 @memcpy(i8* %1, i8* %0, i64 %2)
ret i32 0
}
int ibc(int n, int r) {
  if (r == 0 || n == r)
    return 1;
  else
    return ibc(n - 1, r - 1) + ibc(n - 1, r);
}


x86 assembly (clang, -O0):
<ibc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
je     1134 <ibc+0x24>
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jne    1140 <ibc+0x30>
movl   $0x1,-0x4(%rbp)
jmp    116c <ibc+0x5c>
mov    -0x8(%rbp),%edi
sub    $0x1,%edi
mov    -0xc(%rbp),%esi
sub    $0x1,%esi
call   1030 <ibc@plt>
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%edi
sub    $0x1,%edi
mov    -0xc(%rbp),%esi
call   1030 <ibc@plt>
mov    %eax,%ecx
mov    -0x10(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ibc>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    $0x1,%ebp
test   %esi,%esi
je     1162 <ibc+0x52>
mov    %esi,%r14d
mov    %edi,%ebx
cmp    %esi,%edi
je     1162 <ibc+0x52>
lea    -0x1(%r14),%r15d
neg    %r14d
add    $0xffffffff,%ebx
xor    %ebp,%ebp
cs nopw 0x0(%rax,%rax,1)
nop
mov    %ebx,%edi
mov    %r15d,%esi
call   1030 <ibc@plt>
add    %eax,%ebp
lea    (%r14,%rbx,1),%eax
add    $0xffffffff,%eax
mov    %ebx,%ecx
add    $0xffffffff,%ecx
mov    %ecx,%ebx
cmp    $0xffffffff,%eax
jne    1140 <ibc+0x30>
add    $0x1,%ebp
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @ibc(i32 %0, i32 %1) {
%3 = icmp eq i32 %1, 0
%4 = icmp eq i32 %0, %1
%5 = or i1 %3, %4
br i1 %5, label %17, label %6
6: ; preds = %2
%7 = add nsw i32 %1, -1
br label %8
8: ; preds = %6, %8
%9 = phi i32 [ %0, %6 ], [ %11, %8 ]
%10 = phi i32 [ 0, %6 ], [ %13, %8 ]
%11 = add nsw i32 %9, -1
%12 = tail call i32 @ibc(i32 %11, i32 %7)
%13 = add nsw i32 %12, %10
%14 = icmp eq i32 %11, %1
br i1 %14, label %15, label %8
15: ; preds = %8
%16 = add i32 %13, 1
br label %17
17: ; preds = %15, %2
%18 = phi i32 [ 1, %2 ], [ %16, %15 ]
ret i32 %18
}
int set_memory_xn(unsigned long virt, int numpages) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @set_memory_xn(i64 %0, i32 %1) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ confTimerA0();
int /*<<< orphan*/ iniciaOperacao();
int /*<<< orphan*/ iniciaPinos();
int /*<<< orphan*/ printf(char *, int);
void main() {
  iniciaPinos();
  confTimerA0();
  iniciaOperacao();
  printf("Passo = %d\n", (int)(1048576 * 0.000001));
  while (1)
    ;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <iniciaPinos@plt>
mov    $0x0,%al
call   1060 <confTimerA0@plt>
mov    $0x0,%al
call   1050 <iniciaOperacao@plt>
lea    0xea0(%rip),%rdi
mov    $0x1,%esi
call   1040 <printf@plt>
jmp    116a <main+0x2a>

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <iniciaPinos@plt>
xor    %eax,%eax
call   1060 <confTimerA0@plt>
xor    %eax,%eax
call   1050 <iniciaOperacao@plt>
lea    0xea3(%rip),%rdi
mov    $0x1,%esi
call   1040 <printf@plt>
nopw   0x0(%rax,%rax,1)
jmp    1170 <main+0x30>

LLVM IR (-O0):
@.str = [12 x i8] c"Passo = %d\0A\00"
define void @main() {
%1 = call i32 (...) @iniciaPinos()
%2 = call i32 (...) @confTimerA0()
%3 = call i32 (...) @iniciaOperacao()
%4 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 1)
br label %5
5: ; preds = %0, %5
br label %5
}

LLVM IR (-O2):
@.str = [12 x i8] c"Passo = %d\0A\00"
define void @main() {
%1 = tail call i32 (...) @iniciaPinos()
%2 = tail call i32 (...) @confTimerA0()
%3 = tail call i32 (...) @iniciaOperacao()
%4 = tail call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 1)
br label %5
5: ; preds = %0, %5
br label %5
}
void glmGenerateIdentityQuaternionf(float q[4]) {
  q[0] = 1;
  q[1] = 0;
  q[2] = 0;
  q[3] = 0;
}


x86 assembly (clang, -O0):
<glmGenerateIdentityQuaternionf>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movss  0xeec(%rip),%xmm0
movss  %xmm0,(%rax)
mov    -0x8(%rbp),%rax
xorps  %xmm0,%xmm0
movss  %xmm0,0x4(%rax)
mov    -0x8(%rbp),%rax
xorps  %xmm0,%xmm0
movss  %xmm0,0x8(%rax)
mov    -0x8(%rbp),%rax
xorps  %xmm0,%xmm0
movss  %xmm0,0xc(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<glmGenerateIdentityQuaternionf>:
movss  0xef8(%rip),%xmm0
movups %xmm0,(%rdi)
ret

LLVM IR (-O0):
define void @glmGenerateIdentityQuaternionf(float* %0) {
%2 = alloca float*
store float* %0, float** %2
%3 = load float*, float** %2
%4 = getelementptr inbounds float, float* %3, i64 0
store float 1.000000e+00, float* %4
%5 = load float*, float** %2
%6 = getelementptr inbounds float, float* %5, i64 1
store float 0.000000e+00, float* %6
%7 = load float*, float** %2
%8 = getelementptr inbounds float, float* %7, i64 2
store float 0.000000e+00, float* %8
%9 = load float*, float** %2
%10 = getelementptr inbounds float, float* %9, i64 3
store float 0.000000e+00, float* %10
ret void
}

LLVM IR (-O2):
define void @glmGenerateIdentityQuaternionf(float* nocapture writeonly %0) {
%2 = bitcast float* %0 to <4 x float>*
store <4 x float> <float 1.000000e+00, float 0.000000e+00, float 0.000000e+00, float 0.000000e+00>, <4 x float>* %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ outstr(char *);
void clear_screen(void) { outstr("\033[0J\x1b[H\x1b[J"); }


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

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

LLVM IR (-O0):
@.str = [11 x i8] c"\1B[0J\1B[H\1B[J\00"
define void @clear_screen() {
%1 = call i32 @outstr(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [11 x i8] c"\1B[0J\1B[H\1B[J\00"
define void @clear_screen() {
%1 = tail call i32 @outstr(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ EF_Abort(char *);
void internalError(void) { EF_Abort("Internal error in allocator."); }


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

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

LLVM IR (-O0):
@.str = [29 x i8] c"Internal error in allocator.\00"
define void @internalError() {
%1 = call i32 @EF_Abort(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [29 x i8] c"Internal error in allocator.\00"
define void @internalError() {
%1 = tail call i32 @EF_Abort(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Type definitions */
struct rb3_head {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ rb3_get_child(struct rb3_head *, int);
struct rb3_head *rb3_get_minmax_in_subtree(int /*<<< orphan*/, int);
struct rb3_head *rb3_get_prevnext_descendant(struct rb3_head *head, int dir) {
  return rb3_get_minmax_in_subtree(rb3_get_child(head, dir), !dir);
}


x86 assembly (clang, -O0):
<rb3_get_prevnext_descendant>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1040 <rb3_get_child@plt>
mov    %eax,%edi
cmpl   $0x0,-0xc(%rbp)
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%esi
call   1030 <rb3_get_minmax_in_subtree@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rb3_get_prevnext_descendant>:
push   %rbx
mov    %esi,%ebx
call   1040 <rb3_get_child@plt>
xor    %esi,%esi
test   %ebx,%ebx
sete   %sil
mov    %eax,%edi
pop    %rbx
jmp    1030 <rb3_get_minmax_in_subtree@plt>

LLVM IR (-O0):
%struct.rb3_head = type { i32 }
define %struct.rb3_head* @rb3_get_prevnext_descendant(%struct.rb3_head* %0, i32 %1) {
%3 = alloca %struct.rb3_head*
%4 = alloca i32
store %struct.rb3_head* %0, %struct.rb3_head** %3
store i32 %1, i32* %4
%5 = load %struct.rb3_head*, %struct.rb3_head** %3
%6 = load i32, i32* %4
%7 = call i32 @rb3_get_child(%struct.rb3_head* %5, i32 %6)
%8 = load i32, i32* %4
%9 = icmp ne i32 %8, 0
%10 = xor i1 %9, true
%11 = zext i1 %10 to i32
%12 = call %struct.rb3_head* @rb3_get_minmax_in_subtree(i32 %7, i32 %11)
ret %struct.rb3_head* %12
}

LLVM IR (-O2):
%struct.rb3_head = type { i32 }
define %struct.rb3_head* @rb3_get_prevnext_descendant(%struct.rb3_head* %0, i32 %1) {
%3 = tail call i32 @rb3_get_child(%struct.rb3_head* %0, i32 %1)
%4 = icmp eq i32 %1, 0
%5 = zext i1 %4 to i32
%6 = tail call %struct.rb3_head* @rb3_get_minmax_in_subtree(i32 %3, i32 %5)
ret %struct.rb3_head* %6
}
/* Variables and functions */
int /*<<< orphan*/ usleep(int const);
void msleep(const int millisecs) { usleep(millisecs * 1000); }


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

x86 assembly (clang, -O2):
<msleep>:
imul   $0x3e8,%edi,%edi
jmp    1030 <usleep@plt>

LLVM IR (-O0):
define void @msleep(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = mul nsw i32 %3, 1000
%5 = call i32 @usleep(i32 %4)
ret void
}

LLVM IR (-O2):
define void @msleep(i32 %0) {
%2 = mul nsw i32 %0, 1000
%3 = tail call i32 @usleep(i32 %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int print_usage() {
  printf(" Usage: lu_data [options]\n");
  printf(" Option:\n");
  printf(" \t[ -s <vector size> ] (default: %d)\n", 1024);
  return 1;
}


x86 assembly (clang, -O0):
<print_usage>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xef2(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xeee(%rip),%rdi
mov    $0x400,%esi
mov    $0x0,%al
call   1030 <printf@plt>
mov    $0x1,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_usage>:
push   %rax
lea    0xefe(%rip),%rdi
call   1030 <puts@plt>
lea    0xf0c(%rip),%rdi
call   1030 <puts@plt>
lea    0xec0(%rip),%rdi
mov    $0x400,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [27 x i8] c" Usage: lu_data [options]\0A\00"
@.str.1 = [10 x i8] c" Option:\0A\00"
@.str.2 = [38 x i8] c" \09[ -s <vector size> ] (default: %d)\0A\00"
define i32 @print_usage() {
%1 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0))
%2 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.2, i64 0, i64 0), i32 1024)
ret i32 1
}

LLVM IR (-O2):
@.str.2 = [38 x i8] c" \09[ -s <vector size> ] (default: %d)\0A\00"
@str = [26 x i8] c" Usage: lu_data [options]\00"
@str.3 = [9 x i8] c" Option:\00"
define i32 @print_usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @str.3, i64 0, i64 0))
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([38 x i8], [38 x i8]* @.str.2, i64 0, i64 0), i32 1024)
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, long, int);
void main() {
  long i = 0, a = 0, b = 0;
  for (i = 1; i < 100; i++) {
    b = 809;
    a = b * i + 1;
    if (b >= 1000 && b <= 10000 && 8 * i < 100 && 9 * i >= 100)
      printf("%ld,%ld\n", b, 809 * i);
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movq   $0x0,-0x8(%rbp)
movq   $0x0,-0x10(%rbp)
movq   $0x0,-0x18(%rbp)
movq   $0x1,-0x8(%rbp)
cmpq   $0x64,-0x8(%rbp)
jge    11c9 <main+0xb9>
movq   $0x329,-0x18(%rbp)
mov    -0x18(%rbp),%rax
imul   -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
cmpq   $0x3e8,-0x18(%rbp)
jl     11b3 <main+0xa3>
cmpq   $0x2710,-0x18(%rbp)
jg     11b3 <main+0xa3>
mov    -0x8(%rbp),%rax
shl    $0x3,%rax
cmp    $0x64,%rax
jge    11b3 <main+0xa3>
imul   $0x9,-0x8(%rbp),%rax
cmp    $0x64,%rax
jl     11b3 <main+0xa3>
mov    -0x18(%rbp),%rsi
imul   $0x329,-0x8(%rbp),%rax
mov    %eax,%edx
lea    0xe52(%rip),%rdi
call   1030 <printf@plt>
jmp    11b8 <main+0xa8>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1138 <main+0x28>
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [9 x i8] c"%ld,%ld\0A\00"
define void @main() {
%1 = alloca i64
%2 = alloca i64
%3 = alloca i64
store i64 0, i64* %1
store i64 0, i64* %2
store i64 0, i64* %3
store i64 1, i64* %1
br label %4
4: ; preds = %32, %0
%5 = load i64, i64* %1
%6 = icmp slt i64 %5, 100
br i1 %6, label %7, label %35
7: ; preds = %4
store i64 809, i64* %3
%8 = load i64, i64* %3
%9 = load i64, i64* %1
%10 = mul nsw i64 %8, %9
%11 = add nsw i64 %10, 1
store i64 %11, i64* %2
%12 = load i64, i64* %3
%13 = icmp sge i64 %12, 1000
br i1 %13, label %14, label %31
14: ; preds = %7
%15 = load i64, i64* %3
%16 = icmp sle i64 %15, 10000
br i1 %16, label %17, label %31
17: ; preds = %14
%18 = load i64, i64* %1
%19 = mul nsw i64 8, %18
%20 = icmp slt i64 %19, 100
br i1 %20, label %21, label %31
21: ; preds = %17
%22 = load i64, i64* %1
%23 = mul nsw i64 9, %22
%24 = icmp sge i64 %23, 100
br i1 %24, label %25, label %31
25: ; preds = %21
%26 = load i64, i64* %3
%27 = load i64, i64* %1
%28 = mul nsw i64 809, %27
%29 = trunc i64 %28 to i32
%30 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i64 %26, i32 %29)
br label %31
31: ; preds = %25, %21, %17, %14, %7
br label %32
32: ; preds = %31
%33 = load i64, i64* %1
%34 = add nsw i64 %33, 1
store i64 %34, i64* %1
br label %4
35: ; preds = %4
ret void
}

LLVM IR (-O2):
define void @main() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ f1();
int /*<<< orphan*/ f3();
void f2() {
  f1();
  f3();
  f1();
}


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

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

LLVM IR (-O0):
define void @f2() {
%1 = call i32 (...) @f1()
%2 = call i32 (...) @f3()
%3 = call i32 (...) @f1()
ret void
}

LLVM IR (-O2):
define void @f2() {
%1 = tail call i32 (...) @f1()
%2 = tail call i32 (...) @f3()
%3 = tail call i32 (...) @f1()
ret void
}
void __attribute__((weak)) usbcb_sof_handler() {}


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

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

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

LLVM IR (-O2):
define weak void @usbcb_sof_handler() {
ret void
}
unsigned long rdtscll(void) {
  unsigned int a, d;
  asm volatile("rdtsc" : "=a"(a), "=d"(d) : : "%rbx", "%rcx");
  return ((unsigned long)a) | (((unsigned long)d) << 32);
}


x86 assembly (clang, -O0):
<rdtscll>:
push   %rbp
mov    %rsp,%rbp
push   %rbx
rdtsc
mov    %eax,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0xc(%rbp),%eax
mov    -0x10(%rbp),%ecx
shl    $0x20,%rcx
or     %rcx,%rax
pop    %rbx
pop    %rbp
ret

x86 assembly (clang, -O2):
<rdtscll>:
push   %rbx
rdtsc
mov    %eax,%eax
shl    $0x20,%rdx
or     %rdx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i64 @rdtscll() {
%1 = alloca i32
%2 = alloca i32
%3 = call { i32, i32 } asm sideeffect "rdtsc", "={ax},={dx},~{rbx},~{rcx},~{dirflag},~{fpsr},~{flags}"()
%4 = extractvalue { i32, i32 } %3, 0
%5 = extractvalue { i32, i32 } %3, 1
store i32 %4, i32* %1
store i32 %5, i32* %2
%6 = load i32, i32* %1
%7 = zext i32 %6 to i64
%8 = load i32, i32* %2
%9 = zext i32 %8 to i64
%10 = shl i64 %9, 32
%11 = or i64 %7, %10
ret i64 %11
}

LLVM IR (-O2):
define i64 @rdtscll() {
%1 = tail call { i32, i32 } asm sideeffect "rdtsc", "={ax},={dx},~{rbx},~{rcx},~{dirflag},~{fpsr},~{flags}"()
%2 = extractvalue { i32, i32 } %1, 0
%3 = extractvalue { i32, i32 } %1, 1
%4 = zext i32 %2 to i64
%5 = zext i32 %3 to i64
%6 = shl nuw i64 %5, 32
%7 = or i64 %6, %4
ret i64 %7
}
/* Variables and functions */
int /*<<< orphan*/ hdate_get_utc_sun_time_deg(int, int, int, double, double,
                                              double, int *, int *);
void hdate_get_utc_sun_time(int day, int month, int year, double latitude,
                            double longitude, int *sunrise, int *sunset) {
  hdate_get_utc_sun_time_deg(day, month, year, latitude, longitude, 90.833,
                             sunrise, sunset);
  return;
}


x86 assembly (clang, -O0):
<hdate_get_utc_sun_time>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
movsd  %xmm0,-0x18(%rbp)
movsd  %xmm1,-0x20(%rbp)
mov    %rcx,-0x28(%rbp)
mov    %r8,-0x30(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
movsd  -0x18(%rbp),%xmm0
movsd  -0x20(%rbp),%xmm1
mov    -0x28(%rbp),%rcx
mov    -0x30(%rbp),%r8
movsd  0xeaa(%rip),%xmm2
call   1030 <hdate_get_utc_sun_time_deg@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<hdate_get_utc_sun_time>:
movsd  0xee8(%rip),%xmm2
jmp    1030 <hdate_get_utc_sun_time_deg@plt>

LLVM IR (-O0):
define void @hdate_get_utc_sun_time(i32 %0, i32 %1, i32 %2, double %3, double %4, i32* %5, i32* %6) {
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca double
%12 = alloca double
%13 = alloca i32*
%14 = alloca i32*
store i32 %0, i32* %8
store i32 %1, i32* %9
store i32 %2, i32* %10
store double %3, double* %11
store double %4, double* %12
store i32* %5, i32** %13
store i32* %6, i32** %14
%15 = load i32, i32* %8
%16 = load i32, i32* %9
%17 = load i32, i32* %10
%18 = load double, double* %11
%19 = load double, double* %12
%20 = load i32*, i32** %13
%21 = load i32*, i32** %14
%22 = call i32 @hdate_get_utc_sun_time_deg(i32 %15, i32 %16, i32 %17, double %18, double %19, double 9.083300e+01, i32* %20, i32* %21)
ret void
}

LLVM IR (-O2):
define void @hdate_get_utc_sun_time(i32 %0, i32 %1, i32 %2, double %3, double %4, i32* %5, i32* %6) {
%8 = tail call i32 @hdate_get_utc_sun_time_deg(i32 %0, i32 %1, i32 %2, double %3, double %4, double 9.083300e+01, i32* %5, i32* %6)
ret void
}
/* Variables and functions */
char *environ_exit_application_name(char *);
char *environ_application_name(char *argv_0) {
  return environ_exit_application_name(argv_0);
}


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

x86 assembly (clang, -O2):
<environ_application_name>:
jmp    1030 <environ_exit_application_name@plt>

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

LLVM IR (-O2):
define i8* @environ_application_name(i8* %0) {
%2 = tail call i8* @environ_exit_application_name(i8* %0)
ret i8* %2
}
int main(int argc, const char *argv[]) {
  char dir[] = {"test"};
  if (rmdir(dir))
    perror("mkdir");
  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)
mov    0xec4(%rip),%eax
mov    %eax,-0x15(%rbp)
mov    0xebf(%rip),%al
mov    %al,-0x11(%rbp)
lea    -0x15(%rbp),%rdi
mov    $0x0,%al
call   1030 <rmdir@plt>
cmp    $0x0,%eax
je     116a <main+0x4a>
lea    0xea2(%rip),%rdi
mov    $0x0,%al
call   1040 <perror@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
movb   $0x0,0x4(%rsp)
movl   $0x74736574,(%rsp)
mov    %rsp,%rdi
xor    %eax,%eax
call   1030 <rmdir@plt>
test   %eax,%eax
je     1149 <main+0x29>
lea    0xec3(%rip),%rdi
xor    %eax,%eax
call   1040 <perror@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@__const.main.dir = [5 x i8] c"test\00"
@.str = [6 x i8] c"mkdir\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [5 x i8]
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = bitcast [5 x i8]* %6 to i8*
%8 = getelementptr inbounds [5 x i8], [5 x i8]* %6, i64 0, i64 0
%9 = call i32 (i8*, ...) bitcast (i32 (...)* @rmdir to i32 (i8*, ...)*)(i8* %8)
%10 = icmp ne i32 %9, 0
br i1 %10, label %11, label %13
11: ; preds = %2
%12 = call i32 (i8*, ...) bitcast (i32 (...)* @perror to i32 (i8*, ...)*)(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
br label %13
13: ; preds = %11, %2
ret i32 0
}

LLVM IR (-O2):
@__const.main.dir = [5 x i8] c"test\00"
@.str = [6 x i8] c"mkdir\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [5 x i8]
%4 = getelementptr inbounds [5 x i8], [5 x i8]* %3, i64 0, i64 0
%5 = call i32 (i8*, ...) bitcast (i32 (...)* @rmdir to i32 (i8*, ...)*)(i8* %4)
%6 = icmp eq i32 %5, 0
br i1 %6, label %9, label %7
7: ; preds = %2
%8 = call i32 (i8*, ...) bitcast (i32 (...)* @perror to i32 (i8*, ...)*)(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
br label %9
9: ; preds = %7, %2
ret i32 0
}
/* Variables and functions */
int hemmelig_funksjon(int, int);
int funk(int a, int b) {
  int c = hemmelig_funksjon(a, b);
  return c;
}


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

x86 assembly (clang, -O2):
<funk>:
jmp    1030 <hemmelig_funksjon@plt>

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

LLVM IR (-O2):
define i32 @funk(i32 %0, i32 %1) {
%3 = tail call i32 @hemmelig_funksjon(i32 %0, i32 %1)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void erro(char *n_erro) { printf("\n\r\t%s\n", n_erro); }


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

x86 assembly (clang, -O2):
<erro>:
mov    %rdi,%rsi
lea    0xee6(%rip),%rdi
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [7 x i8] c"\0A\0D\09%s\0A\00"
define void @erro(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
int mwsync_post_setup(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @mwsync_post_setup() {
ret i32 0
}
char *strcpy(char *destination, const char *source) {
  unsigned i = 0;
  for (; source[i]; ++i)
    destination[i] = source[i];
  destination[i] = 0;
  return destination;
}


x86 assembly (clang, -O0):
<strcpy>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x14(%rbp),%ecx
cmpb   $0x0,(%rax,%rcx,1)
je     1146 <strcpy+0x46>
mov    -0x10(%rbp),%rax
mov    -0x14(%rbp),%ecx
mov    (%rax,%rcx,1),%dl
mov    -0x8(%rbp),%rax
mov    -0x14(%rbp),%ecx
mov    %dl,(%rax,%rcx,1)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1113 <strcpy+0x13>
mov    -0x8(%rbp),%rax
mov    -0x14(%rbp),%ecx
movb   $0x0,(%rax,%rcx,1)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strcpy>:
mov    %rdi,%rax
mov    (%rsi),%dl
xor    %ecx,%ecx
test   %dl,%dl
je     1120 <strcpy+0x20>
nopl   0x0(%rax,%rax,1)
mov    %dl,(%rax,%rcx,1)
add    $0x1,%ecx
movzbl (%rsi,%rcx,1),%edx
test   %dl,%dl
jne    1110 <strcpy+0x10>
mov    %ecx,%ecx
movb   $0x0,(%rax,%rcx,1)
ret

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

LLVM IR (-O2):
define i8* @strcpy(i8* returned writeonly %0, i8* nocapture %1) {
%3 = load i8, i8* %1
%4 = icmp eq i8 %3, 0
br i1 %4, label %17, label %5
5: ; preds = %2, %5
%6 = phi i8 [ %13, %5 ], [ %3, %2 ]
%7 = phi i64 [ %11, %5 ], [ 0, %2 ]
%8 = phi i32 [ %10, %5 ], [ 0, %2 ]
%9 = getelementptr inbounds i8, i8* %0, i64 %7
store i8 %6, i8* %9
%10 = add i32 %8, 1
%11 = zext i32 %10 to i64
%12 = getelementptr inbounds i8, i8* %1, i64 %11
%13 = load i8, i8* %12
%14 = icmp eq i8 %13, 0
br i1 %14, label %15, label %5
15: ; preds = %5
%16 = zext i32 %10 to i64
br label %17
17: ; preds = %2, %15
%18 = phi i64 [ %16, %15 ], [ 0, %2 ]
%19 = getelementptr inbounds i8, i8* %0, i64 %18
store i8 0, i8* %19
ret i8* %0
}
/* Variables and functions */
int /*<<< orphan*/ FlushProcessWriteBuffers();
void PalFlushProcessWriteBuffers() { FlushProcessWriteBuffers(); }


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

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

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

LLVM IR (-O2):
define void @PalFlushProcessWriteBuffers() {
%1 = tail call i32 (...) @FlushProcessWriteBuffers()
ret void
}
void rop3_61_1_1(unsigned char *D, unsigned char S, unsigned char T) {
  unsigned char stk1;
  unsigned char stk2;
  unsigned char stk3;
  stk3 = *D | S;
  stk3 = ~stk3;
  stk2 = T | stk3;
  stk1 = S ^ stk2;
  *D = (stk1 & (~S) & (~T)) | (*D & S) | (*D & T);
}


x86 assembly (clang, -O0):
<rop3_61_1_1>:
push   %rbp
mov    %rsp,%rbp
mov    %dl,%al
mov    %sil,%cl
mov    %rdi,-0x8(%rbp)
mov    %cl,-0x9(%rbp)
mov    %al,-0xa(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
movzbl -0x9(%rbp),%ecx
or     %ecx,%eax
mov    %al,-0xd(%rbp)
movzbl -0xd(%rbp),%eax
xor    $0xffffffff,%eax
mov    %al,-0xd(%rbp)
movzbl -0xa(%rbp),%eax
movzbl -0xd(%rbp),%ecx
or     %ecx,%eax
mov    %al,-0xc(%rbp)
movzbl -0x9(%rbp),%eax
movzbl -0xc(%rbp),%ecx
xor    %ecx,%eax
mov    %al,-0xb(%rbp)
movzbl -0xb(%rbp),%eax
movzbl -0x9(%rbp),%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
movzbl -0xa(%rbp),%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
mov    -0x8(%rbp),%rcx
movzbl (%rcx),%ecx
movzbl -0x9(%rbp),%edx
and    %edx,%ecx
or     %ecx,%eax
mov    -0x8(%rbp),%rcx
movzbl (%rcx),%ecx
movzbl -0xa(%rbp),%edx
and    %edx,%ecx
or     %ecx,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<rop3_61_1_1>:
mov    (%rdi),%al
mov    %edx,%ecx
or     %sil,%cl
or     %al,%cl
not    %cl
and    %al,%sil
and    %dl,%al
or     %sil,%al
or     %cl,%al
mov    %al,(%rdi)
ret

LLVM IR (-O0):
define void @rop3_61_1_1(i8* %0, i8 zeroext %1, i8 zeroext %2) {
%4 = alloca i8*
%5 = alloca i8
%6 = alloca i8
%7 = alloca i8
%8 = alloca i8
%9 = alloca i8
store i8* %0, i8** %4
store i8 %1, i8* %5
store i8 %2, i8* %6
%10 = load i8*, i8** %4
%11 = load i8, i8* %10
%12 = zext i8 %11 to i32
%13 = load i8, i8* %5
%14 = zext i8 %13 to i32
%15 = or i32 %12, %14
%16 = trunc i32 %15 to i8
store i8 %16, i8* %9
%17 = load i8, i8* %9
%18 = zext i8 %17 to i32
%19 = xor i32 %18, -1
%20 = trunc i32 %19 to i8
store i8 %20, i8* %9
%21 = load i8, i8* %6
%22 = zext i8 %21 to i32
%23 = load i8, i8* %9
%24 = zext i8 %23 to i32
%25 = or i32 %22, %24
%26 = trunc i32 %25 to i8
store i8 %26, i8* %8
%27 = load i8, i8* %5
%28 = zext i8 %27 to i32
%29 = load i8, i8* %8
%30 = zext i8 %29 to i32
%31 = xor i32 %28, %30
%32 = trunc i32 %31 to i8
store i8 %32, i8* %7
%33 = load i8, i8* %7
%34 = zext i8 %33 to i32
%35 = load i8, i8* %5
%36 = zext i8 %35 to i32
%37 = xor i32 %36, -1
%38 = and i32 %34, %37
%39 = load i8, i8* %6
%40 = zext i8 %39 to i32
%41 = xor i32 %40, -1
%42 = and i32 %38, %41
%43 = load i8*, i8** %4
%44 = load i8, i8* %43
%45 = zext i8 %44 to i32
%46 = load i8, i8* %5
%47 = zext i8 %46 to i32
%48 = and i32 %45, %47
%49 = or i32 %42, %48
%50 = load i8*, i8** %4
%51 = load i8, i8* %50
%52 = zext i8 %51 to i32
%53 = load i8, i8* %6
%54 = zext i8 %53 to i32
%55 = and i32 %52, %54
%56 = or i32 %49, %55
%57 = trunc i32 %56 to i8
%58 = load i8*, i8** %4
store i8 %57, i8* %58
ret void
}

LLVM IR (-O2):
define void @rop3_61_1_1(i8* nocapture %0, i8 zeroext %1, i8 zeroext %2) {
%4 = load i8, i8* %0
%5 = or i8 %2, %1
%6 = or i8 %5, %4
%7 = xor i8 %6, -1
%8 = and i8 %4, %1
%9 = or i8 %8, %7
%10 = and i8 %4, %2
%11 = or i8 %9, %10
store i8 %11, i8* %0
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uid_t;
typedef int /*<<< orphan*/ gid_t;

/* Variables and functions */
int syscall(int, char const *, int /*<<< orphan*/, int /*<<< orphan*/);
int lchown(const char *path, uid_t uid, gid_t gid) {
  return syscall(16, path, uid, gid);
}


x86 assembly (clang, -O0):
<lchown>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0xc(%rbp),%edx
mov    -0x10(%rbp),%ecx
mov    $0x10,%edi
call   1030 <syscall@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<lchown>:
mov    %edx,%ecx
mov    %esi,%edx
mov    %rdi,%rsi
mov    $0x10,%edi
jmp    1030 <syscall@plt>

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

LLVM IR (-O2):
define i32 @lchown(i8* %0, i32 %1, i32 %2) {
%4 = tail call i32 @syscall(i32 16, i8* %0, i32 %1, i32 %2)
ret i32 %4
}
float f(void) { return 0.0; }


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

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

LLVM IR (-O0):
define float @f() {
ret float 0.000000e+00
}

LLVM IR (-O2):
define float @f() {
ret float 0.000000e+00
}
/* Variables and functions */
int /*<<< orphan*/ putchar(unsigned int);
puthex4(unsigned x) {
  x &= 0xF;
  putchar(x > 9 ? x - 10 + 'A' : x + '0');
}


x86 assembly (clang, -O0):
<puthex4>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
and    $0xf,%eax
mov    %eax,-0x8(%rbp)
cmpl   $0x9,-0x8(%rbp)
jbe    113f <puthex4+0x2f>
mov    -0x8(%rbp),%eax
sub    $0xa,%eax
add    $0x41,%eax
mov    %eax,-0xc(%rbp)
jmp    1148 <puthex4+0x38>
mov    -0x8(%rbp),%eax
add    $0x30,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%edi
call   1030 <putchar@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<puthex4>:
and    $0xf,%edi
lea    0x37(%rdi),%ecx
lea    0x30(%rdi),%eax
cmp    $0xa,%edi
cmovae %ecx,%eax
mov    %eax,%edi
jmp    1030 <putchar@plt>

LLVM IR (-O0):
define i32 @puthex4(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = and i32 %4, 15
store i32 %5, i32* %3
%6 = load i32, i32* %3
%7 = icmp ugt i32 %6, 9
br i1 %7, label %8, label %12
8: ; preds = %1
%9 = load i32, i32* %3
%10 = sub i32 %9, 10
%11 = add i32 %10, 65
br label %15
12: ; preds = %1
%13 = load i32, i32* %3
%14 = add i32 %13, 48
br label %15
15: ; preds = %12, %8
%16 = phi i32 [ %11, %8 ], [ %14, %12 ]
%17 = call i32 @putchar(i32 %16)
%18 = load i32, i32* %2
ret i32 %18
}

LLVM IR (-O2):
define i32 @puthex4(i32 %0) {
%2 = and i32 %0, 15
%3 = icmp ugt i32 %2, 9
%4 = add nuw nsw i32 %2, 55
%5 = or i32 %2, 48
%6 = select i1 %3, i32 %4, i32 %5
%7 = tail call i32 @putchar(i32 %6)
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ iscntrl(int);
void t_iscntrl_0x8a() {
  Assert_real((iscntrl(138) == 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_iscntrl.c",
              695, ("iscntrl should be 0 for 0x8a"));
}


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

x86 assembly (clang, -O2):
<t_iscntrl_0x8a>:
push   %rax
mov    $0x8a,%edi
call   1030 <iscntrl@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x2b7,%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_iscntrl.c\00"
@.str.1 = [29 x i8] c"iscntrl should be 0 for 0x8a\00"
define void @t_iscntrl_0x8a() {
%1 = call i64 @iscntrl(i32 138)
%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 695, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_iscntrl.c\00"
@.str.1 = [29 x i8] c"iscntrl should be 0 for 0x8a\00"
define void @t_iscntrl_0x8a() {
%1 = tail call i64 @iscntrl(i32 138)
%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 695, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}