xunge/DecIR huggingface dataset:
/* Type definitions */
typedef int /*<<< orphan*/ mode_t;

/* Variables and functions */
int mkdirat_recursive(int, char const *, int /*<<< orphan*/);
int mkdir_recursive(const char *path, mode_t mode) {
  return mkdirat_recursive(-100, path, mode);
}


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

x86 assembly (clang, -O2):
<mkdir_recursive>:
mov    %esi,%edx
mov    %rdi,%rsi
mov    $0xffffff9c,%edi
jmp    1030 <mkdirat_recursive@plt>

LLVM IR (-O0):
define i32 @mkdir_recursive(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 = call i32 @mkdirat_recursive(i32 -100, i8* %5, i32 %6)
ret i32 %7
}

LLVM IR (-O2):
define i32 @mkdir_recursive(i8* %0, i32 %1) {
%3 = tail call i32 @mkdirat_recursive(i32 -100, i8* %0, i32 %1)
ret i32 %3
}
/* Variables and functions */
int getopt(int, char **, char const *);
int c_getopt(int arg0, char **arg1, const char *arg2) {
  return getopt(arg0, arg1, arg2);
}


x86 assembly (clang, -O0):
<c_getopt>:
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   1030 <getopt@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<c_getopt>:
jmp    1030 <getopt@plt>

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

LLVM IR (-O2):
define i32 @c_getopt(i32 %0, i8** %1, i8* %2) {
%4 = tail call i32 @getopt(i32 %0, i8** %1, i8* %2)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ scene_animate(float);
void world_animate(float secs) { scene_animate(secs); }


x86 assembly (clang, -O0):
<world_animate>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
call   1030 <scene_animate@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<world_animate>:
jmp    1030 <scene_animate@plt>

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

LLVM IR (-O2):
define void @world_animate(float %0) {
%2 = tail call i32 @scene_animate(float %0)
ret void
}
/* Variables and functions */
size_t prs_max_compressed_size(size_t len) {
  len += 2;
  return len + (len >> 3) + ((len & 0x07) ? 1 : 0);
}


x86 assembly (clang, -O0):
<prs_max_compressed_size>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x2,%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x8(%rbp),%rcx
shr    $0x3,%rcx
add    %rcx,%rax
mov    -0x8(%rbp),%rsi
and    $0x7,%rsi
xor    %ecx,%ecx
mov    $0x1,%edx
cmp    $0x0,%rsi
cmovne %edx,%ecx
movslq %ecx,%rcx
add    %rcx,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<prs_max_compressed_size>:
lea    0x2(%rdi),%rcx
mov    %rcx,%rax
shr    $0x3,%rax
add    %rdi,%rax
add    $0x2,%rax
and    $0x7,%ecx
cmp    $0x1,%rcx
sbb    $0xffffffffffffffff,%rax
ret

LLVM IR (-O0):
define i64 @prs_max_compressed_size(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = add i64 %3, 2
store i64 %4, i64* %2
%5 = load i64, i64* %2
%6 = load i64, i64* %2
%7 = lshr i64 %6, 3
%8 = add i64 %5, %7
%9 = load i64, i64* %2
%10 = and i64 %9, 7
%11 = icmp ne i64 %10, 0
%12 = zext i1 %11 to i64
%13 = select i1 %11, i32 1, i32 0
%14 = sext i32 %13 to i64
%15 = add i64 %8, %14
ret i64 %15
}

LLVM IR (-O2):
define i64 @prs_max_compressed_size(i64 %0) {
%2 = add i64 %0, 2
%3 = lshr i64 %2, 3
%4 = add i64 %3, %2
%5 = and i64 %2, 7
%6 = icmp ne i64 %5, 0
%7 = zext i1 %6 to i64
%8 = add i64 %4, %7
ret i64 %8
}
/* Variables and functions */
int atoi(char *);
int stoi(char *number, int len) {
  int i;
  char temp[len];
  for (i = 0; i < len; i++)
    temp[i] = number[i];
  return atoi(temp);
}


x86 assembly (clang, -O0):
<stoi>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %rsp,%rcx
mov    %rcx,-0x18(%rbp)
mov    %rax,%rdx
add    $0xf,%rdx
and    $0xfffffffffffffff0,%rdx
mov    %rsp,%rcx
sub    %rdx,%rcx
mov    %rcx,-0x28(%rbp)
mov    %rcx,%rsp
mov    %rax,-0x20(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    117c <stoi+0x6c>
mov    -0x28(%rbp),%rax
mov    -0x8(%rbp),%rcx
movslq -0x10(%rbp),%rdx
mov    (%rcx,%rdx,1),%dl
movslq -0x10(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    114c <stoi+0x3c>
mov    -0x28(%rbp),%rdi
call   1030 <atoi@plt>
mov    -0x18(%rbp),%rcx
mov    %rcx,%rsp
mov    %rbp,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<stoi>:
push   %rbp
mov    %rsp,%rbp
push   %rbx
push   %rax
mov    %esi,%edx
mov    %rsp,%rbx
lea    0xf(%rdx),%rcx
and    $0xfffffffffffffff0,%rcx
sub    %rcx,%rbx
mov    %rbx,%rsp
test   %esi,%esi
jle    114b <stoi+0x2b>
mov    %rdi,%rax
mov    %rbx,%rdi
mov    %rax,%rsi
call   1030 <memcpy@plt>
mov    %rbx,%rdi
call   1040 <atoi@plt>
lea    -0x8(%rbp),%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @stoi(i8* nocapture %0, i32 %1) {
%3 = zext i32 %1 to i64
%4 = alloca i8, i64 %3
%5 = icmp sgt i32 %1, 0
br i1 %5, label %6, label %7
6: ; preds = %2
br label %7
7: ; preds = %6, %2
%8 = call i32 @atoi(i8* %4)
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isprint(int);
void t_isprint_0x0d() {
  Assert_real((isprint(13) == 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_isprint.c",
              70, ("isprint should be 0 for 0x0d"));
}


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

x86 assembly (clang, -O2):
<t_isprint_0x0d>:
push   %rax
mov    $0xd,%edi
call   1030 <isprint@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x46,%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_isprint.c\00"
@.str.1 = [29 x i8] c"isprint should be 0 for 0x0d\00"
define void @t_isprint_0x0d() {
%1 = call i64 @isprint(i32 13)
%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 70, 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_isprint.c\00"
@.str.1 = [29 x i8] c"isprint should be 0 for 0x0d\00"
define void @t_isprint_0x0d() {
%1 = tail call i64 @isprint(i32 13)
%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 70, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef char *int64_t;

/* Variables and functions */
int64_t zero_sub8(int64_t in) {
  int64_t out;
  asm("sub %%al, %%bl" : "=b"(out) : "a"(in), "0"(0));
  return out;
}


x86 assembly (clang, -O0):
<zero_sub8>:
push   %rbp
mov    %rsp,%rbp
push   %rbx
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
xor    %ecx,%ecx
mov    %ecx,%ebx
sub    %al,%bl
mov    %rbx,-0x18(%rbp)
mov    -0x18(%rbp),%rax
pop    %rbx
pop    %rbp
ret

x86 assembly (clang, -O2):
<zero_sub8>:
push   %rbx
mov    %rdi,%rax
xor    %ebx,%ebx
sub    %al,%bl
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i8* @zero_sub8(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i8* asm "sub %al, %bl", "={bx},{ax},0,~{dirflag},~{fpsr},~{flags}"(i8* %4, i64 0)
store i8* %5, i8** %3
%6 = load i8*, i8** %3
ret i8* %6
}

LLVM IR (-O2):
define i8* @zero_sub8(i8* readnone %0) {
%2 = tail call i8* asm "sub %al, %bl", "={bx},{ax},0,~{dirflag},~{fpsr},~{flags}"(i8* %0, i64 0)
ret i8* %2
}
/* Variables and functions */
int _ada_use_c2phc4c(int, int *, int *, double *, int /*<<< orphan*/);
int padcon_get_dobldobl_t_value(double *tval) {
  int fail;
  int precision = 1;
  int *b;
  fail = _ada_use_c2phc4c(867, &precision, b, tval, 0);
  return fail;
}


x86 assembly (clang, -O0):
<padcon_get_dobldobl_t_value>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x1,-0x10(%rbp)
mov    -0x18(%rbp),%rdx
mov    -0x8(%rbp),%rcx
mov    $0x363,%edi
lea    -0x10(%rbp),%rsi
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc4c@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<padcon_get_dobldobl_t_value>:
push   %rax
mov    %rdi,%rcx
movl   $0x1,0x4(%rsp)
lea    0x4(%rsp),%rsi
mov    $0x363,%edi
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc4c@plt>
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @padcon_get_dobldobl_t_value(double* %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
store i32 1, i32* %2
%4 = call i32 @_ada_use_c2phc4c(i32 867, i32* %2, i32* undef, double* %0, i32 0)
ret i32 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fputs(char *, int /*<<< orphan*/ *);
int /*<<< orphan*/ rewind(int /*<<< orphan*/ *);
void genera_mensaje(FILE *file) {
  fputs("El mensaje a escribir es Alvaro", file);
  rewind(file);
}


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

x86 assembly (clang, -O2):
<genera_mensaje>:
push   %rbx
mov    %rdi,%rbx
lea    0xed5(%rip),%rdi
mov    $0x1f,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1040 <fwrite@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <rewind@plt>

LLVM IR (-O0):
@.str = [32 x i8] c"El mensaje a escribir es Alvaro\00"
define void @genera_mensaje(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = call i32 @fputs(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), i32* %3)
%5 = load i32*, i32** %2
%6 = call i32 @rewind(i32* %5)
ret void
}

LLVM IR (-O2):
@.str = [32 x i8] c"El mensaje a escribir es Alvaro\00"
define void @genera_mensaje(i32* nocapture %0) {
%2 = tail call i64 @fwrite(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), i64 31, i64 1, i32* %0)
%3 = tail call i32 @rewind(i32* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
void test_func_args(int x, int y) {
  if (x == y)
    exit(1);
}


x86 assembly (clang, -O0):
<test_func_args>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
jne    1134 <test_func_args+0x24>
mov    $0x1,%edi
call   1030 <exit@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_func_args>:
cmp    %esi,%edi
je     1115 <test_func_args+0x5>
ret
push   %rax
mov    $0x1,%edi
call   1030 <exit@plt>

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

LLVM IR (-O2):
define void @test_func_args(i32 %0, i32 %1) {
%3 = icmp eq i32 %0, %1
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = tail call i32 @exit(i32 1)
unreachable
6: ; preds = %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fun();
int main() {
  fun();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <fun@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <fun@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @fun()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @fun()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printk(char *, unsigned long, unsigned long);
void data_abort_handler(unsigned long faultpc, unsigned long faultaddr) {
  printk("data abort PC=%08x, fault address=%08x\n", faultpc - 8, faultaddr);
  for (;;)
    continue;
}


x86 assembly (clang, -O0):
<data_abort_handler>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rsi
sub    $0x8,%rsi
mov    -0x10(%rbp),%rdx
lea    0xecd(%rip),%rdi
call   1030 <printk@plt>
jmp    1138 <data_abort_handler+0x28>

x86 assembly (clang, -O2):
<data_abort_handler>:
push   %rax
mov    %rsi,%rdx
lea    -0x8(%rdi),%rsi
lea    0xee1(%rip),%rdi
call   1030 <printk@plt>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
jmp    1130 <data_abort_handler+0x20>

LLVM IR (-O0):
@.str = [40 x i8] c"data abort PC=%08x, fault address=%08x\0A\00"
define void @data_abort_handler(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %3
%6 = sub i64 %5, 8
%7 = load i64, i64* %4
%8 = call i32 @printk(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0), i64 %6, i64 %7)
br label %9
9: ; preds = %9, %2
br label %9
}

LLVM IR (-O2):
@.str = [40 x i8] c"data abort PC=%08x, fault address=%08x\0A\00"
define void @data_abort_handler(i64 %0, i64 %1) {
%3 = add i64 %0, -8
%4 = tail call i32 @printk(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0), i64 %3, i64 %1)
br label %5
5: ; preds = %5, %2
br label %5
}
/* Variables and functions */
int pl_on_lib_exit();
int pl_lib_exit(void) { return pl_on_lib_exit(); }


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

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

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

LLVM IR (-O2):
define i32 @pl_lib_exit() {
%1 = tail call i32 (...) @pl_on_lib_exit()
ret i32 %1
}
unsigned char *getCurrentDirStr(void) {
  return "sproc1.elf sproc2.elf buzmenu.elf license.txt";
}


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

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

LLVM IR (-O0):
@.str = [46 x i8] c"sproc1.elf sproc2.elf buzmenu.elf license.txt\00"
define i8* @getCurrentDirStr() {
ret i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [46 x i8] c"sproc1.elf sproc2.elf buzmenu.elf license.txt\00"
define i8* @getCurrentDirStr() {
ret i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str, i64 0, i64 0)
}
int setbit(int word, int bit) { return (word | (1 << bit)); }


x86 assembly (clang, -O0):
<setbit>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x8(%rbp),%ecx
mov    $0x1,%edx
shl    %cl,%edx
mov    %edx,%ecx
or     %ecx,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @setbit(i32 %0, i32 %1) {
%3 = shl nuw i32 1, %1
%4 = or i32 %3, %0
ret i32 %4
}
int main(int argc, char **argv) {
  int class = 0;
  return class;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
ret i32 0
}
char *skip_char_match(char ch, char *str) {
  while (*str != '\0' && *str == ch) {
    str++;
  }
  return str;
}


x86 assembly (clang, -O0):
<skip_char_match>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x11(%rbp)
je     1136 <skip_char_match+0x36>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
movsbl -0x1(%rbp),%ecx
cmp    %ecx,%eax
sete   %al
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%al
test   $0x1,%al
jne    1146 <skip_char_match+0x46>
jmp    1157 <skip_char_match+0x57>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    110e <skip_char_match+0xe>
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<skip_char_match>:
mov    %rsi,%rax
add    $0xffffffffffffffff,%rax
nopw   0x0(%rax,%rax,1)
movzbl 0x1(%rax),%ecx
add    $0x1,%rax
test   %cl,%cl
je     1121 <skip_char_match+0x21>
cmp    %dil,%cl
je     1110 <skip_char_match+0x10>
ret

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

LLVM IR (-O2):
define i8* @skip_char_match(i8 signext %0, i8* %1) {
br label %3
3: ; preds = %3, %2
%4 = phi i8* [ %1, %2 ], [ %9, %3 ]
%5 = load i8, i8* %4
%6 = icmp ne i8 %5, 0
%7 = icmp eq i8 %5, %0
%8 = and i1 %6, %7
%9 = getelementptr inbounds i8, i8* %4, i64 1
br i1 %8, label %3, label %10
10: ; preds = %3
ret i8* %4
}
void debug_flush(void) {}


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

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

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

LLVM IR (-O2):
define void @debug_flush() {
ret void
}
void SetRow_Any_X86() {}


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

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

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

LLVM IR (-O2):
define void @SetRow_Any_X86() {
ret void
}
char *pref(char c, char *s) {}


x86 assembly (clang, -O0):
<pref>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x9(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define noalias i8* @pref(i8 signext %0, i8* nocapture readnone %1) {
ret i8* undef
}
int hash(char *key) {
  unsigned ret = 0;
  while (*key)
    ret = (ret << 1) + (*key++);
  return ret % 37;
}


x86 assembly (clang, -O0):
<hash>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     113e <hash+0x3e>
mov    -0xc(%rbp),%eax
shl    $0x1,%eax
mov    -0x8(%rbp),%rcx
mov    %rcx,%rdx
add    $0x1,%rdx
mov    %rdx,-0x8(%rbp)
movsbl (%rcx),%ecx
add    %ecx,%eax
mov    %eax,-0xc(%rbp)
jmp    110f <hash+0xf>
mov    -0xc(%rbp),%eax
mov    $0x25,%ecx
xor    %edx,%edx
div    %ecx
mov    %edx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<hash>:
mov    (%rdi),%cl
test   %cl,%cl
je     1144 <hash+0x44>
add    $0x1,%rdi
xor    %eax,%eax
nopl   0x0(%rax)
movsbl %cl,%ecx
lea    (%rcx,%rax,2),%eax
movzbl (%rdi),%ecx
add    $0x1,%rdi
test   %cl,%cl
jne    1110 <hash+0x10>
mov    %eax,%ecx
mov    $0xbacf914d,%edx
imul   %rcx,%rdx
shr    $0x20,%rdx
mov    %eax,%ecx
sub    %edx,%ecx
shr    %ecx
add    %edx,%ecx
shr    $0x5,%ecx
lea    (%rcx,%rcx,8),%edx
lea    (%rcx,%rdx,4),%ecx
sub    %ecx,%eax
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @hash(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %16, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %12, %4 ], [ %2, %1 ]
%6 = phi i32 [ %11, %4 ], [ 0, %1 ]
%7 = phi i8* [ %9, %4 ], [ %0, %1 ]
%8 = shl i32 %6, 1
%9 = getelementptr inbounds i8, i8* %7, i64 1
%10 = sext i8 %5 to i32
%11 = add i32 %8, %10
%12 = load i8, i8* %9
%13 = icmp eq i8 %12, 0
br i1 %13, label %14, label %4
14: ; preds = %4
%15 = urem i32 %11, 37
br label %16
16: ; preds = %14, %1
%17 = phi i32 [ 0, %1 ], [ %15, %14 ]
ret i32 %17
}
void ff_hevc_put_hevc_uni_epel_hv64_10_avx2() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_uni_epel_hv64_10_avx2() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, int, char *);
int main(int argc, char **argv) {
  int i;
  for (i = 0; i < argc; i++)
    printf("argv[%d]: %s \n", i, argv[i]);
  exit(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1172 <main+0x52>
mov    -0x14(%rbp),%esi
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rdx
lea    0xea1(%rip),%rdi
call   1030 <printf@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    113d <main+0x1d>
xor    %edi,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
test   %edi,%edi
jle    1157 <main+0x37>
mov    %rsi,%r14
mov    %edi,%r12d
xor    %ebx,%ebx
lea    0xec5(%rip),%r15
nopl   0x0(%rax,%rax,1)
mov    (%r14,%rbx,8),%rdx
mov    %r15,%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
add    $0x1,%rbx
cmp    %rbx,%r12
jne    1140 <main+0x20>
xor    %edi,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [15 x i8] c"argv[%d]: %s \0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 0, i32* %6
br label %7
7: ; preds = %19, %2
%8 = load i32, i32* %6
%9 = load i32, i32* %4
%10 = icmp slt i32 %8, %9
br i1 %10, label %11, label %22
11: ; preds = %7
%12 = load i32, i32* %6
%13 = load i8**, i8*** %5
%14 = load i32, i32* %6
%15 = sext i32 %14 to i64
%16 = getelementptr inbounds i8*, i8** %13, i64 %15
%17 = load i8*, i8** %16
%18 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 %12, i8* %17)
br label %19
19: ; preds = %11
%20 = load i32, i32* %6
%21 = add nsw i32 %20, 1
store i32 %21, i32* %6
br label %7
22: ; preds = %7
%23 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@.str = [15 x i8] c"argv[%d]: %s \0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp sgt i32 %0, 0
br i1 %3, label %4, label %14
4: ; preds = %2
%5 = zext i32 %0 to i64
br label %6
6: ; preds = %4, %6
%7 = phi i64 [ 0, %4 ], [ %12, %6 ]
%8 = getelementptr inbounds i8*, i8** %1, i64 %7
%9 = load i8*, i8** %8
%10 = trunc i64 %7 to i32
%11 = tail call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 %10, i8* %9)
%12 = add nuw nsw i64 %7, 1
%13 = icmp eq i64 %12, %5
br i1 %13, label %14, label %6
14: ; preds = %6, %2
%15 = tail call i32 @exit(i32 0)
unreachable
}
void show_read_unlock(void) {
  asm volatile("/* start */");
  rcu_read_unlock();
  asm volatile("/* end */");
}


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

x86 assembly (clang, -O2):
<show_read_unlock>:
push   %rax
xor    %eax,%eax
call   1030 <rcu_read_unlock@plt>
pop    %rax
ret

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

LLVM IR (-O2):
define void @show_read_unlock() {
tail call void asm sideeffect "/* start */", "~{dirflag},~{fpsr},~{flags}"()
%1 = tail call i32 (...) @rcu_read_unlock()
tail call void asm sideeffect "/* end */", "~{dirflag},~{fpsr},~{flags}"()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ pthread_exit(int /*<<< orphan*/ *);
void *thread1_func(void *arg) {
  pthread_exit(NULL);
  return NULL;
}


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

x86 assembly (clang, -O2):
<thread1_func>:
push   %rax
xor    %edi,%edi
call   1030 <pthread_exit@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define noalias i8* @thread1_func(i8* nocapture readnone %0) {
%2 = tail call i32 @pthread_exit(i32* null)
ret i8* null
}
/* Variables and functions */
int /*<<< orphan*/ fputs(char *, int /*<<< orphan*/);
int /*<<< orphan*/ stderr;
void usage() {
  fputs("Usage: cash -i, --interactive\n       cash <script>\n", stderr);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ec5(%rip),%rax
mov    (%rax),%esi
lea    0xedc(%rip),%rdi
call   1030 <fputs@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<usage>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%esi
lea    0xee0(%rip),%rdi
jmp    1030 <fputs@plt>

LLVM IR (-O0):
@.str = [52 x i8] c"Usage: cash -i, --interactive\0A cash <script>\0A\00"
@stderr = global i32 0
define void @usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fputs(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str, i64 0, i64 0), i32 %1)
ret void
}

LLVM IR (-O2):
@.str = [52 x i8] c"Usage: cash -i, --interactive\0A cash <script>\0A\00"
@stderr = global i32 0
define void @usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fputs(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str, i64 0, i64 0), i32 %1)
ret void
}
signed char f2(signed char x, signed char y) {
  if (((x ^ y) & (((x ^ ((x ^ y) & (1 << (8 - 1)))) - y) ^ y)) < 0)
    return x;
  return x - y;
}


x86 assembly (clang, -O0):
<f2>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x2(%rbp)
mov    %al,-0x3(%rbp)
movsbl -0x2(%rbp),%eax
movsbl -0x3(%rbp),%ecx
xor    %ecx,%eax
movsbl -0x2(%rbp),%ecx
movsbl -0x2(%rbp),%edx
movsbl -0x3(%rbp),%esi
xor    %esi,%edx
and    $0x80,%edx
xor    %edx,%ecx
movsbl -0x3(%rbp),%edx
sub    %edx,%ecx
movsbl -0x3(%rbp),%edx
xor    %edx,%ecx
and    %ecx,%eax
cmp    $0x0,%eax
jge    1152 <f2+0x52>
mov    -0x2(%rbp),%al
mov    %al,-0x1(%rbp)
jmp    115f <f2+0x5f>
movsbl -0x2(%rbp),%eax
movsbl -0x3(%rbp),%ecx
sub    %ecx,%eax
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f2>:
mov    %edi,%eax
mov    %esi,%ecx
xor    %edi,%ecx
mov    %ecx,%edx
and    $0x80,%edx
xor    %edi,%edx
sub    %esi,%edx
xor    %esi,%edx
xor    %edi,%edi
test   %ecx,%edx
cmovns %esi,%edi
sub    %dil,%al
ret

LLVM IR (-O0):
define signext i8 @f2(i8 signext %0, i8 signext %1) {
%3 = alloca i8
%4 = alloca i8
%5 = alloca i8
store i8 %0, i8* %4
store i8 %1, i8* %5
%6 = load i8, i8* %4
%7 = sext i8 %6 to i32
%8 = load i8, i8* %5
%9 = sext i8 %8 to i32
%10 = xor i32 %7, %9
%11 = load i8, i8* %4
%12 = sext i8 %11 to i32
%13 = load i8, i8* %4
%14 = sext i8 %13 to i32
%15 = load i8, i8* %5
%16 = sext i8 %15 to i32
%17 = xor i32 %14, %16
%18 = and i32 %17, 128
%19 = xor i32 %12, %18
%20 = load i8, i8* %5
%21 = sext i8 %20 to i32
%22 = sub nsw i32 %19, %21
%23 = load i8, i8* %5
%24 = sext i8 %23 to i32
%25 = xor i32 %22, %24
%26 = and i32 %10, %25
%27 = icmp slt i32 %26, 0
br i1 %27, label %28, label %30
28: ; preds = %2
%29 = load i8, i8* %4
store i8 %29, i8* %3
br label %37
30: ; preds = %2
%31 = load i8, i8* %4
%32 = sext i8 %31 to i32
%33 = load i8, i8* %5
%34 = sext i8 %33 to i32
%35 = sub nsw i32 %32, %34
%36 = trunc i32 %35 to i8
store i8 %36, i8* %3
br label %37
37: ; preds = %30, %28
%38 = load i8, i8* %3
ret i8 %38
}

LLVM IR (-O2):
define signext i8 @f2(i8 signext %0, i8 signext %1) {
%3 = sext i8 %0 to i32
%4 = sext i8 %1 to i32
%5 = xor i8 %1, %0
%6 = sext i8 %5 to i32
%7 = and i32 %6, 128
%8 = xor i32 %7, %3
%9 = sub nsw i32 %8, %4
%10 = xor i32 %9, %4
%11 = and i32 %10, %6
%12 = icmp slt i32 %11, 0
%13 = select i1 %12, i8 0, i8 %1
%14 = sub i8 %0, %13
ret i8 %14
}
int **set_line(int lin, int p, int **tab) {
  int j;
  for (j = 0; j < p; j++) {
    tab[lin][j] = -1;
  }
  return tab;
}


x86 assembly (clang, -O0):
<set_line>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1146 <set_line+0x46>
mov    -0x10(%rbp),%rax
movslq -0x4(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x14(%rbp),%rcx
movl   $0xffffffff,(%rax,%rcx,4)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1115 <set_line+0x15>
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_line>:
push   %rbx
mov    %rdx,%rbx
test   %esi,%esi
jle    112f <set_line+0x1f>
movslq %edi,%rax
mov    (%rbx,%rax,8),%rdi
mov    %esi,%edx
shl    $0x2,%rdx
mov    $0xff,%esi
call   1030 <memset@plt>
mov    %rbx,%rax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32** @set_line(i32 %0, i32 %1, i32** returned %2) {
%4 = icmp sgt i32 %1, 0
br i1 %4, label %5, label %12
5: ; preds = %3
%6 = sext i32 %0 to i64
%7 = getelementptr inbounds i32*, i32** %2, i64 %6
%8 = bitcast i32** %7 to i8**
%9 = load i8*, i8** %8
%10 = zext i32 %1 to i64
%11 = shl nuw nsw i64 %10, 2
br label %12
12: ; preds = %5, %3
ret i32** %2
}
/* Type definitions */
typedef int uint16_t;

/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int);
void AnsiTerm_goto(uint16_t x, uint16_t y) { printf("\x1B[%d;%dH", y, x); }


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

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

LLVM IR (-O0):
@.str = [9 x i8] c"\1B[%d;%dH\00"
define void @AnsiTerm_goto(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 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 %5, i32 %6)
ret void
}

LLVM IR (-O2):
@.str = [9 x i8] c"\1B[%d;%dH\00"
define void @AnsiTerm_goto(i32 %0, i32 %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 %1, i32 %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void segundo(char *arg) { printf("Bienvenidos a SO %s\n", arg); }


x86 assembly (clang, -O0):
<segundo>:
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):
<segundo>:
mov    %rdi,%rsi
lea    0xee6(%rip),%rdi
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [21 x i8] c"Bienvenidos a SO %s\0A\00"
define void @segundo(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int use(char *name) {
  printf("use:\n%s objectfile\n", name);
  printf("    or\n");
  printf("%s\n", name);
  printf("    to use implicit \"fa.out\" objectfile.\n");
  return 8;
}


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

x86 assembly (clang, -O2):
<use>:
push   %rbx
mov    %rdi,%rbx
lea    0xed5(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
mov    %rbx,%rdi
call   1030 <puts@plt>
lea    0xecb(%rip),%rdi
call   1030 <puts@plt>
mov    $0x8,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [20 x i8] c"use:\0A%s objectfile\0A\00"
@.str.1 = [8 x i8] c" or\0A\00"
@.str.2 = [4 x i8] c"%s\0A\00"
@.str.3 = [42 x i8] c" to use implicit \22fa.out\22 objectfile.\0A\00"
define i32 @use(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
%6 = load i8*, i8** %2
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i8* %6)
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.3, i64 0, i64 0))
ret i32 8
}

LLVM IR (-O2):
@.str = [20 x i8] c"use:\0A%s objectfile\0A\00"
@str = [7 x i8] c" or\00"
@str.4 = [41 x i8] c" to use implicit \22fa.out\22 objectfile.\00"
define i32 @use(i8* %0) {
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @str, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) %0)
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([41 x i8], [41 x i8]* @str.4, i64 0, i64 0))
ret i32 8
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main() {
  char var[50] = " Write Once Run Everywere ";
  int cont = 0;
  for (int i = 0; i < 50; i++) {
    if (var[i] == ' ') {
      cont++;
    }
  }
  printf("Existem %d espaços em branco", cont);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x40(%rbp),%rdi
lea    0xec6(%rip),%rsi
mov    $0x32,%edx
call   1040 <memcpy@plt>
movl   $0x0,-0x44(%rbp)
movl   $0x0,-0x48(%rbp)
cmpl   $0x32,-0x48(%rbp)
jge    118a <main+0x6a>
movslq -0x48(%rbp),%rax
movsbl -0x40(%rbp,%rax,1),%eax
cmp    $0x20,%eax
jne    1177 <main+0x57>
mov    -0x44(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x44(%rbp)
jmp    117c <main+0x5c>
mov    -0x48(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x48(%rbp)
jmp    1152 <main+0x32>
mov    -0x44(%rbp),%esi
lea    0xe9e(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x50,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@__const.main.var = [50 x i8] c" Write Once Run Everywere \00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00"
@.str = [30 x i8] c"Existem %d espa\C3\A7os em branco\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [50 x i8]
%3 = alloca i32
%4 = alloca i32
store i32 0, i32* %1
%5 = bitcast [50 x i8]* %2 to i8*
store i32 0, i32* %3
store i32 0, i32* %4
br label %6
6: ; preds = %20, %0
%7 = load i32, i32* %4
%8 = icmp slt i32 %7, 50
br i1 %8, label %9, label %23
9: ; preds = %6
%10 = load i32, i32* %4
%11 = sext i32 %10 to i64
%12 = getelementptr inbounds [50 x i8], [50 x i8]* %2, i64 0, i64 %11
%13 = load i8, i8* %12
%14 = sext i8 %13 to i32
%15 = icmp eq i32 %14, 32
br i1 %15, label %16, label %19
16: ; preds = %9
%17 = load i32, i32* %3
%18 = add nsw i32 %17, 1
store i32 %18, i32* %3
br label %19
19: ; preds = %16, %9
br label %20
20: ; preds = %19
%21 = load i32, i32* %4
%22 = add nsw i32 %21, 1
store i32 %22, i32* %4
br label %6
23: ; preds = %6
%24 = load i32, i32* %3
%25 = call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0), i32 %24)
%26 = load i32, i32* %1
ret i32 %26
}

LLVM IR (-O2):
@.str = [30 x i8] c"Existem %d espa\C3\A7os em branco\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0), i32 5)
ret i32 0
}
double _Complex div_double_cr(double _Complex a, double b) { return a / b; }


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

x86 assembly (clang, -O2):
<div_double_cr>:
unpcklpd %xmm1,%xmm0
unpcklpd %xmm2,%xmm2
divpd  %xmm2,%xmm0
movapd %xmm0,%xmm1
unpckhpd %xmm0,%xmm1
ret

LLVM IR (-O0):
define { double, double } @div_double_cr(double %0, double %1, double %2) {
%4 = alloca { double, double }
%5 = alloca { double, double }
%6 = alloca double
%7 = getelementptr inbounds { double, double }, { double, double }* %5, i32 0, i32 0
store double %0, double* %7
%8 = getelementptr inbounds { double, double }, { double, double }* %5, i32 0, i32 1
store double %1, double* %8
store double %2, double* %6
%9 = getelementptr inbounds { double, double }, { double, double }* %5, i32 0, i32 0
%10 = load double, double* %9
%11 = getelementptr inbounds { double, double }, { double, double }* %5, i32 0, i32 1
%12 = load double, double* %11
%13 = load double, double* %6
%14 = fdiv double %10, %13
%15 = fdiv double %12, %13
%16 = getelementptr inbounds { double, double }, { double, double }* %4, i32 0, i32 0
%17 = getelementptr inbounds { double, double }, { double, double }* %4, i32 0, i32 1
store double %14, double* %16
store double %15, double* %17
%18 = load { double, double }, { double, double }* %4
ret { double, double } %18
}

LLVM IR (-O2):
define { double, double } @div_double_cr(double %0, double %1, double %2) {
%4 = insertelement <2 x double> poison, double %0, i64 0
%5 = insertelement <2 x double> %4, double %1, i64 1
%6 = insertelement <2 x double> poison, double %2, i64 0
%7 = shufflevector <2 x double> %6, <2 x double> poison, <2 x i32> zeroinitializer
%8 = fdiv <2 x double> %5, %7
%9 = extractelement <2 x double> %8, i64 0
%10 = insertvalue { double, double } poison, double %9, 0
%11 = extractelement <2 x double> %8, i64 1
%12 = insertvalue { double, double } %10, double %11, 1
ret { double, double } %12
}
void start_sample(int auto_trigger) { return; }


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

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

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

LLVM IR (-O2):
define void @start_sample(i32 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ put32(unsigned long);
int /*<<< orphan*/ put8(unsigned long);
void xor_reg32_m32(unsigned long reg32, void *_m32) {
  unsigned long *m32 = (unsigned long *)_m32;
  put8(0x33);
  put8((reg32 << 3) | 5);
  put32((unsigned long)(m32));
}


x86 assembly (clang, -O0):
<xor_reg32_m32>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    $0x33,%edi
call   1030 <put8@plt>
mov    -0x8(%rbp),%rdi
shl    $0x3,%rdi
or     $0x5,%rdi
call   1030 <put8@plt>
mov    -0x18(%rbp),%rdi
call   1040 <put32@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xor_reg32_m32>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
mov    $0x33,%edi
call   1030 <put8@plt>
lea    0x5(,%rbx,8),%rdi
call   1030 <put8@plt>
mov    %r14,%rdi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <put32@plt>

LLVM IR (-O0):
define void @xor_reg32_m32(i64 %0, i8* %1) {
%3 = alloca i64
%4 = alloca i8*
%5 = alloca i64*
store i64 %0, i64* %3
store i8* %1, i8** %4
%6 = load i8*, i8** %4
%7 = bitcast i8* %6 to i64*
store i64* %7, i64** %5
%8 = call i32 @put8(i64 51)
%9 = load i64, i64* %3
%10 = shl i64 %9, 3
%11 = or i64 %10, 5
%12 = call i32 @put8(i64 %11)
%13 = load i64*, i64** %5
%14 = ptrtoint i64* %13 to i64
%15 = call i32 @put32(i64 %14)
ret void
}

LLVM IR (-O2):
define void @xor_reg32_m32(i64 %0, i8* %1) {
%3 = tail call i32 @put8(i64 51)
%4 = shl i64 %0, 3
%5 = or i64 %4, 5
%6 = tail call i32 @put8(i64 %5)
%7 = ptrtoint i8* %1 to i64
%8 = tail call i32 @put32(i64 %7)
ret void
}
const char *TA_GetVersionDate(void) { return "Mar 16 2022"; }


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

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

LLVM IR (-O0):
@.str = [12 x i8] c"Mar 16 2022\00"
define i8* @TA_GetVersionDate() {
ret i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [12 x i8] c"Mar 16 2022\00"
define i8* @TA_GetVersionDate() {
ret i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
scalar_t__ myFindString(char *, char *);
int /*<<< orphan*/ printf(char *, char *);
int main(int argc, const char *argv[]) {
  printf("%s\n", (myFindString("isTRUE?", "TRUE")) ? "TRUE" : "FALSE");
  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)
lea    0xec7(%rip),%rdi
lea    0xec8(%rip),%rsi
call   1030 <myFindString@plt>
mov    %rax,%rcx
lea    0xebe(%rip),%rsi
lea    0xeb2(%rip),%rax
cmp    $0x0,%rcx
cmovne %rax,%rsi
lea    0xe97(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xedc(%rip),%rdi
lea    0xedd(%rip),%rbx
mov    %rbx,%rsi
call   1030 <myFindString@plt>
test   %rax,%rax
lea    0xed0(%rip),%rsi
cmovne %rbx,%rsi
lea    0xeb4(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%s\0A\00"
@.str.1 = [8 x i8] c"isTRUE?\00"
@.str.2 = [5 x i8] c"TRUE\00"
@.str.3 = [6 x i8] c"FALSE\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 i64 @myFindString(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
%7 = icmp ne i64 %6, 0
%8 = zext i1 %7 to i64
%9 = select i1 %7, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0)
%10 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %9)
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%s\0A\00"
@.str.1 = [8 x i8] c"isTRUE?\00"
@.str.2 = [5 x i8] c"TRUE\00"
@.str.3 = [6 x i8] c"FALSE\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i64 @myFindString(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0)
%6 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %5)
ret i32 0
}