xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int /*<<< orphan*/, char *, int, char *);
int /*<<< orphan*/ ispunct(int);
void t_ispunct_0x29() {
  Assert_real((ispunct(41)),
              "/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_ispunct.c",
              210, ("ispunct should be 1 for )"));
}


x86 assembly (clang, -O0):
<t_ispunct_0x29>:
push   %rbp
mov    %rsp,%rbp
mov    $0x29,%edi
call   1030 <ispunct@plt>
mov    %eax,%edi
lea    0xec9(%rip),%rsi
mov    $0xd2,%edx
lea    0xf65(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_ispunct_0x29>:
push   %rax
mov    $0x29,%edi
call   1030 <ispunct@plt>
lea    0xece(%rip),%rsi
lea    0xf6f(%rip),%rcx
mov    %eax,%edi
mov    $0xd2,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

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

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_ispunct.c\00"
@.str.1 = [26 x i8] c"ispunct should be 1 for )\00"
define void @t_ispunct_0x29() {
%1 = tail call i32 @ispunct(i32 41)
%2 = tail call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 210, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
void security_sb_umount_busy(struct vfsmount *mnt) {}


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

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

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

LLVM IR (-O2):
%struct.vfsmount = type opaque
define void @security_sb_umount_busy(%struct.vfsmount* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ ispunct(int);
void t_ispunct_0xf6() {
  Assert_real((ispunct(246) == 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_ispunct.c",
              1235, ("ispunct should be 0 for 0xf6"));
}


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

x86 assembly (clang, -O2):
<t_ispunct_0xf6>:
push   %rax
mov    $0xf6,%edi
call   1030 <ispunct@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x4d3,%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_ispunct.c\00"
@.str.1 = [29 x i8] c"ispunct should be 0 for 0xf6\00"
define void @t_ispunct_0xf6() {
%1 = call i64 @ispunct(i32 246)
%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 1235, 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_ispunct.c\00"
@.str.1 = [29 x i8] c"ispunct should be 0 for 0xf6\00"
define void @t_ispunct_0xf6() {
%1 = tail call i64 @ispunct(i32 246)
%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 1235, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Cbuf_AddText(char *);
int /*<<< orphan*/ Cbuf_Execute();
int /*<<< orphan*/ ControlsSetMenuItemValues();
void ControlsResetDefaultsFunc(void *unused) {
  Cbuf_AddText("exec default.cfg\n");
  Cbuf_Execute();
  ControlsSetMenuItemValues();
}


x86 assembly (clang, -O0):
<ControlsResetDefaultsFunc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xebd(%rip),%rdi
call   1030 <Cbuf_AddText@plt>
mov    $0x0,%al
call   1050 <Cbuf_Execute@plt>
mov    $0x0,%al
call   1040 <ControlsSetMenuItemValues@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ControlsResetDefaultsFunc>:
push   %rax
lea    0xec8(%rip),%rdi
call   1030 <Cbuf_AddText@plt>
xor    %eax,%eax
call   1050 <Cbuf_Execute@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <ControlsSetMenuItemValues@plt>

LLVM IR (-O0):
@.str = [18 x i8] c"exec default.cfg\0A\00"
define void @ControlsResetDefaultsFunc(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 @Cbuf_AddText(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
%4 = call i32 (...) @Cbuf_Execute()
%5 = call i32 (...) @ControlsSetMenuItemValues()
ret void
}

LLVM IR (-O2):
@.str = [18 x i8] c"exec default.cfg\0A\00"
define void @ControlsResetDefaultsFunc(i8* nocapture readnone %0) {
%2 = tail call i32 @Cbuf_AddText(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 (...) @Cbuf_Execute()
%4 = tail call i32 (...) @ControlsSetMenuItemValues()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ nsc_assert(int);
void l_nowrite(void) {
  nsc_assert(0 && "This function is unimplemented.");
  ;
}


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

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

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

LLVM IR (-O2):
define void @l_nowrite() {
%1 = tail call i32 @nsc_assert(i32 0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void write_str(char *s) { printf("%s", s); }


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

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

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
define void @write_str(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ str_ltrim_char(char *, char);
int /*<<< orphan*/ str_rtrim_char(char *, char);
int str_trim_char(char *s, char c) {
  if (!s || !*s) {
    return -1;
  }
  str_ltrim_char(s, c);
  str_rtrim_char(s, c);
  return 0;
}


x86 assembly (clang, -O0):
<str_trim_char>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %sil,%al
mov    %rdi,-0x10(%rbp)
mov    %al,-0x11(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     114a <str_trim_char+0x2a>
mov    -0x10(%rbp),%rax
cmpb   $0x0,(%rax)
jne    1156 <str_trim_char+0x36>
movl   $0xffffffff,-0x4(%rbp)
jmp    1177 <str_trim_char+0x57>
mov    -0x10(%rbp),%rdi
movsbl -0x11(%rbp),%esi
call   1030 <str_ltrim_char@plt>
mov    -0x10(%rbp),%rdi
movsbl -0x11(%rbp),%esi
call   1040 <str_rtrim_char@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<str_trim_char>:
push   %rbp
push   %rbx
push   %rax
mov    $0xffffffff,%eax
test   %rdi,%rdi
je     114f <str_trim_char+0x2f>
mov    %rdi,%rbx
cmpb   $0x0,(%rdi)
je     114f <str_trim_char+0x2f>
movsbl %sil,%ebp
mov    %rbx,%rdi
mov    %ebp,%esi
call   1030 <str_ltrim_char@plt>
mov    %rbx,%rdi
mov    %ebp,%esi
call   1040 <str_rtrim_char@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @str_trim_char(i8* %0, i8 signext %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i8
store i8* %0, i8** %4
store i8 %1, i8* %5
%6 = load i8*, i8** %4
%7 = icmp ne i8* %6, null
br i1 %7, label %8, label %12
8: ; preds = %2
%9 = load i8*, i8** %4
%10 = load i8, i8* %9
%11 = icmp ne i8 %10, 0
br i1 %11, label %13, label %12
12: ; preds = %8, %2
store i32 -1, i32* %3
br label %20
13: ; preds = %8
%14 = load i8*, i8** %4
%15 = load i8, i8* %5
%16 = call i32 @str_ltrim_char(i8* %14, i8 signext %15)
%17 = load i8*, i8** %4
%18 = load i8, i8* %5
%19 = call i32 @str_rtrim_char(i8* %17, i8 signext %18)
store i32 0, i32* %3
br label %20
20: ; preds = %13, %12
%21 = load i32, i32* %3
ret i32 %21
}

LLVM IR (-O2):
define i32 @str_trim_char(i8* %0, i8 signext %1) {
%3 = icmp eq i8* %0, null
br i1 %3, label %10, label %4
4: ; preds = %2
%5 = load i8, i8* %0
%6 = icmp eq i8 %5, 0
br i1 %6, label %10, label %7
7: ; preds = %4
%8 = tail call i32 @str_ltrim_char(i8* %0, i8 signext %1)
%9 = tail call i32 @str_rtrim_char(i8* %0, i8 signext %1)
br label %10
10: ; preds = %2, %4, %7
%11 = phi i32 [ 0, %7 ], [ -1, %4 ], [ -1, %2 ]
ret i32 %11
}
/* Variables and functions */
size_t siphash_adjust_hash_size(size_t hash_size) {
  if (hash_size == 0)
    hash_size = 16;
  return hash_size;
}


x86 assembly (clang, -O0):
<siphash_adjust_hash_size>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    111b <siphash_adjust_hash_size+0x1b>
movq   $0x10,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<siphash_adjust_hash_size>:
test   %rdi,%rdi
mov    $0x10,%eax
cmovne %rdi,%rax
ret

LLVM IR (-O0):
define i64 @siphash_adjust_hash_size(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = icmp eq i64 %3, 0
br i1 %4, label %5, label %6
5: ; preds = %1
store i64 16, i64* %2
br label %6
6: ; preds = %5, %1
%7 = load i64, i64* %2
ret i64 %7
}

LLVM IR (-O2):
define i64 @siphash_adjust_hash_size(i64 %0) {
%2 = icmp eq i64 %0, 0
%3 = select i1 %2, i64 16, i64 %0
ret i64 %3
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
void doathing(int a) { exit(a); }


x86 assembly (clang, -O0):
<doathing>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <exit@plt>

x86 assembly (clang, -O2):
<doathing>:
push   %rax
call   1030 <exit@plt>

LLVM IR (-O0):
define void @doathing(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @exit(i32 %3)
unreachable
}

LLVM IR (-O2):
define void @doathing(i32 %0) {
%2 = tail call i32 @exit(i32 %0)
unreachable
}
/* Type definitions */
struct mmbuf_obj {
  int dummy;
};

/* Variables and functions */
int mmbuf__close(struct mmbuf_obj *);
int teardown(struct mmbuf_obj *m) { return mmbuf__close(m); }


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

x86 assembly (clang, -O2):
<teardown>:
jmp    1030 <mmbuf__close@plt>

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

LLVM IR (-O2):
%struct.mmbuf_obj = type { i32 }
define i32 @teardown(%struct.mmbuf_obj* %0) {
%2 = tail call i32 @mmbuf__close(%struct.mmbuf_obj* %0)
ret i32 %2
}
void epj2dt(epoch, date, time) double epoch;
double *date;
double *time;
{
  double dj;
  dj = epj2jd(epoch);
  jd2dt(dj, date, time);
}


x86 assembly (clang, -O0):
<epj2dt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
movsd  -0x8(%rbp),%xmm0
mov    $0x1,%al
call   1030 <epj2jd@plt>
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x20(%rbp),%xmm0
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    $0x1,%al
call   1040 <jd2dt@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<epj2dt>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
mov    $0x1,%al
call   1030 <epj2jd@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
mov    %rbx,%rdi
mov    %r14,%rsi
mov    $0x1,%al
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <jd2dt@plt>

LLVM IR (-O0):
define void @epj2dt(double %0, double* %1, double* %2) {
%4 = alloca double
%5 = alloca double*
%6 = alloca double*
%7 = alloca double
store double %0, double* %4
store double* %1, double** %5
store double* %2, double** %6
%8 = load double, double* %4
%9 = call i32 (double, ...) bitcast (i32 (...)* @epj2jd to i32 (double, ...)*)(double %8)
%10 = sitofp i32 %9 to double
store double %10, double* %7
%11 = load double, double* %7
%12 = load double*, double** %5
%13 = load double*, double** %6
%14 = call i32 (double, double*, double*, ...) bitcast (i32 (...)* @jd2dt to i32 (double, double*, double*, ...)*)(double %11, double* %12, double* %13)
ret void
}

LLVM IR (-O2):
define void @epj2dt(double %0, double* %1, double* %2) {
%4 = tail call i32 (double, ...) bitcast (i32 (...)* @epj2jd to i32 (double, ...)*)(double %0)
%5 = sitofp i32 %4 to double
%6 = tail call i32 (double, double*, double*, ...) bitcast (i32 (...)* @jd2dt to i32 (double, double*, double*, ...)*)(double %5, double* %1, double* %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ close(int);
void my_close(int *fd) {
  close(*fd);
  *fd = -1;
}


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

x86 assembly (clang, -O2):
<my_close>:
push   %rbx
mov    %rdi,%rbx
mov    (%rdi),%edi
call   1030 <close@plt>
movl   $0xffffffff,(%rbx)
pop    %rbx
ret

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

LLVM IR (-O2):
define void @my_close(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = tail call i32 @close(i32 %2)
store i32 -1, i32* %0
ret void
}
/* Variables and functions */
int createSemAux(int);
int createSem(int initialValue) { return createSemAux(initialValue); }


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

x86 assembly (clang, -O2):
<createSem>:
jmp    1030 <createSemAux@plt>

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

LLVM IR (-O2):
define i32 @createSem(i32 %0) {
%2 = tail call i32 @createSemAux(i32 %0)
ret i32 %2
}
void eMaisUma() {
  double t[1];
  if (*t)
    return;
}


x86 assembly (clang, -O0):
<eMaisUma>:
push   %rbp
mov    %rsp,%rbp
movsd  -0x8(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    1121 <eMaisUma+0x21>
jp     1121 <eMaisUma+0x21>
jmp    1126 <eMaisUma+0x26>
jmp    1126 <eMaisUma+0x26>
pop    %rbp
ret

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

LLVM IR (-O0):
define void @eMaisUma() {
%1 = alloca [1 x double]
%2 = getelementptr inbounds [1 x double], [1 x double]* %1, i64 0, i64 0
%3 = load double, double* %2
%4 = fcmp une double %3, 0.000000e+00
br i1 %4, label %5, label %6
5: ; preds = %0
br label %6
6: ; preds = %5, %0
ret void
}

LLVM IR (-O2):
define void @eMaisUma() {
ret void
}
int ft_strcmp(const char *s1, const char *s2) {
  while (*s1 == *s2 && *s1 != '\0') {
    s1++;
    s2++;
  }
  return (*(unsigned char *)s1 - *(unsigned char *)s2);
}


x86 assembly (clang, -O0):
<ft_strcmp>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%ecx
mov    -0x10(%rbp),%rax
movsbl (%rax),%edx
xor    %eax,%eax
cmp    %edx,%ecx
mov    %al,-0x11(%rbp)
jne    1137 <ft_strcmp+0x37>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
setne  %al
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%al
test   $0x1,%al
jne    1147 <ft_strcmp+0x47>
jmp    1164 <ft_strcmp+0x64>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    110c <ft_strcmp+0xc>
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
mov    -0x10(%rbp),%rcx
movzbl (%rcx),%ecx
sub    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_strcmp>:
mov    (%rdi),%al
mov    (%rsi),%cl
test   %al,%al
je     1134 <ft_strcmp+0x34>
cmp    %cl,%al
jne    1134 <ft_strcmp+0x34>
mov    $0x1,%edx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
movzbl (%rdi,%rdx,1),%eax
movzbl (%rsi,%rdx,1),%ecx
test   %al,%al
je     1134 <ft_strcmp+0x34>
add    $0x1,%rdx
cmp    %cl,%al
je     1120 <ft_strcmp+0x20>
movzbl %al,%eax
movzbl %cl,%ecx
sub    %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @ft_strcmp(i8* nocapture %0, i8* nocapture %1) {
%3 = load i8, i8* %0
%4 = load i8, i8* %1
%5 = icmp ne i8 %3, %4
%6 = icmp eq i8 %3, 0
%7 = or i1 %6, %5
br i1 %7, label %18, label %8
8: ; preds = %2, %8
%9 = phi i8* [ %12, %8 ], [ %1, %2 ]
%10 = phi i8* [ %11, %8 ], [ %0, %2 ]
%11 = getelementptr inbounds i8, i8* %10, i64 1
%12 = getelementptr inbounds i8, i8* %9, i64 1
%13 = load i8, i8* %11
%14 = load i8, i8* %12
%15 = icmp ne i8 %13, %14
%16 = icmp eq i8 %13, 0
%17 = or i1 %16, %15
br i1 %17, label %18, label %8
18: ; preds = %8, %2
%19 = phi i8 [ %3, %2 ], [ %13, %8 ]
%20 = phi i8 [ %4, %2 ], [ %14, %8 ]
%21 = zext i8 %19 to i32
%22 = zext i8 %20 to i32
%23 = sub nsw i32 %21, %22
ret i32 %23
}
/* Variables and functions */
int /*<<< orphan*/ cleanup_pid_file();
int /*<<< orphan*/ config_cleanup();
int /*<<< orphan*/ driver_cleanup();
int /*<<< orphan*/ exit(int);
void cleanup(int code) {
  driver_cleanup();
  config_cleanup();
  cleanup_pid_file();
  exit(code);
}


x86 assembly (clang, -O0):
<cleanup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x0,%al
call   1030 <driver_cleanup@plt>
mov    $0x0,%al
call   1060 <config_cleanup@plt>
mov    $0x0,%al
call   1040 <cleanup_pid_file@plt>
mov    -0x4(%rbp),%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<cleanup>:
push   %rbx
mov    %edi,%ebx
xor    %eax,%eax
call   1030 <driver_cleanup@plt>
xor    %eax,%eax
call   1060 <config_cleanup@plt>
xor    %eax,%eax
call   1040 <cleanup_pid_file@plt>
mov    %ebx,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
define void @cleanup(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 (...) @driver_cleanup()
%4 = call i32 (...) @config_cleanup()
%5 = call i32 (...) @cleanup_pid_file()
%6 = load i32, i32* %2
%7 = call i32 @exit(i32 %6)
unreachable
}

LLVM IR (-O2):
define void @cleanup(i32 %0) {
%2 = tail call i32 (...) @driver_cleanup()
%3 = tail call i32 (...) @config_cleanup()
%4 = tail call i32 (...) @cleanup_pid_file()
%5 = tail call i32 @exit(i32 %0)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ myFork(int);
int /*<<< orphan*/ printf(char *);
void runCMD(int cmdIndex) {
  switch (cmdIndex) {
  case -1:
    printf("Command Not Found \n");
    break;
  case 0:
    exit(0);
    break;
  default:
    myFork(cmdIndex);
    break;
  }
}


x86 assembly (clang, -O0):
<runCMD>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
sub    $0xffffffff,%eax
je     115f <runCMD+0x2f>
jmp    114f <runCMD+0x1f>
mov    -0x8(%rbp),%eax
test   %eax,%eax
je     1170 <runCMD+0x40>
jmp    1177 <runCMD+0x47>
lea    0xe9a(%rip),%rdi
call   1030 <printf@plt>
jmp    117f <runCMD+0x4f>
xor    %edi,%edi
call   1050 <exit@plt>
mov    -0x4(%rbp),%edi
call   1040 <myFork@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<runCMD>:
cmp    $0xffffffff,%edi
je     113e <runCMD+0xe>
test   %edi,%edi
je     114a <runCMD+0x1a>
jmp    1040 <myFork@plt>
lea    0xebb(%rip),%rdi
jmp    1030 <puts@plt>
push   %rax
xor    %edi,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [20 x i8] c"Command Not Found \0A\00"
define void @runCMD(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
switch i32 %3, label %8 [
i32 -1, label %4
i32 0, label %6
]
4: ; preds = %1
%5 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
br label %11
6: ; preds = %1
%7 = call i32 @exit(i32 0)
unreachable
8: ; preds = %1
%9 = load i32, i32* %2
%10 = call i32 @myFork(i32 %9)
br label %11
11: ; preds = %8, %4
ret void
}

LLVM IR (-O2):
@str = [19 x i8] c"Command Not Found \00"
define void @runCMD(i32 %0) {
switch i32 %0, label %6 [
i32 -1, label %2
i32 0, label %4
]
2: ; preds = %1
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @str, i64 0, i64 0))
br label %8
4: ; preds = %1
%5 = tail call i32 @exit(i32 0)
unreachable
6: ; preds = %1
%7 = tail call i32 @myFork(i32 %0)
br label %8
8: ; preds = %6, %2
ret void
}
void inicializar(char *vetor) {
  register int x;
  for (x = 0; x < 101; x++)
    vetor[x] = '\0';
}


x86 assembly (clang, -O0):
<inicializar>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x65,-0xc(%rbp)
jge    1133 <inicializar+0x33>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movb   $0x0,(%rax,%rcx,1)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    110f <inicializar+0xf>
pop    %rbp
ret

x86 assembly (clang, -O2):
<inicializar>:
xorps  %xmm0,%xmm0
movups %xmm0,0x50(%rdi)
movups %xmm0,0x40(%rdi)
movups %xmm0,0x30(%rdi)
movups %xmm0,0x20(%rdi)
movups %xmm0,0x10(%rdi)
movups %xmm0,(%rdi)
movq   $0x0,0x5d(%rdi)
ret

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

LLVM IR (-O2):
define void @inicializar(i8* nocapture writeonly %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ AllocArrays();
int /*<<< orphan*/ CalcDivSigma();
int /*<<< orphan*/ CalcForceZ();
int /*<<< orphan*/ CalcSigmas();
int /*<<< orphan*/ PassConsoleParams(int, char **);
int /*<<< orphan*/ PrintDiff();
int /*<<< orphan*/ ReadSubFunc();
int main(int argc, char **argv) {
  PassConsoleParams(argc, argv);
  AllocArrays();
  ReadSubFunc();
  CalcForceZ();
  CalcSigmas();
  CalcDivSigma();
  PrintDiff();
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1040 <PassConsoleParams@plt>
mov    $0x0,%al
call   1070 <AllocArrays@plt>
mov    $0x0,%al
call   1060 <ReadSubFunc@plt>
mov    $0x0,%al
call   1030 <CalcForceZ@plt>
mov    $0x0,%al
call   1080 <CalcSigmas@plt>
mov    $0x0,%al
call   1090 <CalcDivSigma@plt>
mov    $0x0,%al
call   1050 <PrintDiff@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
call   1040 <PassConsoleParams@plt>
xor    %eax,%eax
call   1070 <AllocArrays@plt>
xor    %eax,%eax
call   1060 <ReadSubFunc@plt>
xor    %eax,%eax
call   1030 <CalcForceZ@plt>
xor    %eax,%eax
call   1080 <CalcSigmas@plt>
xor    %eax,%eax
call   1090 <CalcDivSigma@plt>
xor    %eax,%eax
call   1050 <PrintDiff@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
store i32 %0, i32* %3
store i8** %1, i8*** %4
%5 = load i32, i32* %3
%6 = load i8**, i8*** %4
%7 = call i32 @PassConsoleParams(i32 %5, i8** %6)
%8 = call i32 (...) @AllocArrays()
%9 = call i32 (...) @ReadSubFunc()
%10 = call i32 (...) @CalcForceZ()
%11 = call i32 (...) @CalcSigmas()
%12 = call i32 (...) @CalcDivSigma()
%13 = call i32 (...) @PrintDiff()
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** %1) {
%3 = tail call i32 @PassConsoleParams(i32 %0, i8** %1)
%4 = tail call i32 (...) @AllocArrays()
%5 = tail call i32 (...) @ReadSubFunc()
%6 = tail call i32 (...) @CalcForceZ()
%7 = tail call i32 (...) @CalcSigmas()
%8 = tail call i32 (...) @CalcDivSigma()
%9 = tail call i32 (...) @PrintDiff()
ret i32 0
}
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
uint8_t ds_crc8_bit_update(uint8_t crc8, uint8_t bit) {
  uint8_t crc8_base = (crc8 >> 1) & 0x73;
  uint8_t xor1 = (crc8 & 1) ^ bit;
  return crc8_base | ((((crc8 >> 3) & 1) ^ xor1) << 2) |
         ((((crc8 >> 4) & 1) ^ xor1) << 3) | (xor1 << 7);
}


x86 assembly (clang, -O0):
<ds_crc8_bit_update>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x1,%eax
and    $0x73,%eax
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%eax
and    $0x1,%eax
xor    -0x8(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
mov    -0x4(%rbp),%ecx
sar    $0x3,%ecx
and    $0x1,%ecx
xor    -0x10(%rbp),%ecx
shl    $0x2,%ecx
or     %ecx,%eax
mov    -0x4(%rbp),%ecx
sar    $0x4,%ecx
and    $0x1,%ecx
xor    -0x10(%rbp),%ecx
shl    $0x3,%ecx
or     %ecx,%eax
mov    -0x10(%rbp),%ecx
shl    $0x7,%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ds_crc8_bit_update>:
mov    %edi,%ecx
shr    %ecx
and    $0x73,%ecx
mov    %edi,%eax
and    $0x1,%eax
xor    %esi,%eax
mov    %edi,%edx
shr    $0x3,%edx
and    $0x1,%edx
xor    %eax,%edx
shl    $0x2,%edx
shr    $0x4,%edi
and    $0x1,%edi
xor    %eax,%edi
lea    0x0(,%rdi,8),%esi
shl    $0x7,%eax
or     %ecx,%eax
or     %edx,%eax
or     %esi,%eax
ret

LLVM IR (-O0):
define i32 @ds_crc8_bit_update(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%7 = load i32, i32* %3
%8 = ashr i32 %7, 1
%9 = and i32 %8, 115
store i32 %9, i32* %5
%10 = load i32, i32* %3
%11 = and i32 %10, 1
%12 = load i32, i32* %4
%13 = xor i32 %11, %12
store i32 %13, i32* %6
%14 = load i32, i32* %5
%15 = load i32, i32* %3
%16 = ashr i32 %15, 3
%17 = and i32 %16, 1
%18 = load i32, i32* %6
%19 = xor i32 %17, %18
%20 = shl i32 %19, 2
%21 = or i32 %14, %20
%22 = load i32, i32* %3
%23 = ashr i32 %22, 4
%24 = and i32 %23, 1
%25 = load i32, i32* %6
%26 = xor i32 %24, %25
%27 = shl i32 %26, 3
%28 = or i32 %21, %27
%29 = load i32, i32* %6
%30 = shl i32 %29, 7
%31 = or i32 %28, %30
ret i32 %31
}

LLVM IR (-O2):
define i32 @ds_crc8_bit_update(i32 %0, i32 %1) {
%3 = lshr i32 %0, 1
%4 = and i32 %3, 115
%5 = and i32 %0, 1
%6 = xor i32 %5, %1
%7 = lshr i32 %0, 3
%8 = and i32 %7, 1
%9 = xor i32 %8, %6
%10 = shl i32 %9, 2
%11 = lshr i32 %0, 4
%12 = and i32 %11, 1
%13 = xor i32 %12, %6
%14 = shl i32 %13, 3
%15 = shl i32 %6, 7
%16 = or i32 %15, %4
%17 = or i32 %16, %10
%18 = or i32 %17, %14
ret i32 %18
}
/* Variables and functions */
int /*<<< orphan*/ calc_strip_offsets(char *, char *, size_t *, size_t *,
                                      size_t *);
char *strstrip(char *str, char *chars) {
  size_t len, l, r;
  if (chars == NULL)
    chars = " \t\n\v\f\r";
  calc_strip_offsets(str, chars, &len, &l, &r);
  str[len - r] = '\0';
  return str + l;
}


x86 assembly (clang, -O0):
<strstrip>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1136 <strstrip+0x26>
lea    0xece(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
lea    -0x18(%rbp),%rdx
lea    -0x20(%rbp),%rcx
lea    -0x28(%rbp),%r8
call   1030 <calc_strip_offsets@plt>
mov    -0x8(%rbp),%rax
mov    -0x18(%rbp),%rcx
sub    -0x28(%rbp),%rcx
movb   $0x0,(%rax,%rcx,1)
mov    -0x8(%rbp),%rax
add    -0x20(%rbp),%rax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strstrip>:
push   %rbx
sub    $0x20,%rsp
mov    %rdi,%rbx
test   %rsi,%rsi
lea    0xede(%rip),%rax
cmove  %rax,%rsi
lea    0x18(%rsp),%rdx
lea    0x10(%rsp),%rcx
lea    0x8(%rsp),%r8
call   1030 <calc_strip_offsets@plt>
mov    0x18(%rsp),%rax
sub    0x8(%rsp),%rax
movb   $0x0,(%rbx,%rax,1)
add    0x10(%rsp),%rbx
mov    %rbx,%rax
add    $0x20,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [7 x i8] c" \09\0A\0B\0C\0D\00"
define i8* @strstrip(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i64
%6 = alloca i64
%7 = alloca i64
store i8* %0, i8** %3
store i8* %1, i8** %4
%8 = load i8*, i8** %4
%9 = icmp eq i8* %8, null
br i1 %9, label %10, label %11
10: ; preds = %2
store i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8** %4
br label %11
11: ; preds = %10, %2
%12 = load i8*, i8** %3
%13 = load i8*, i8** %4
%14 = call i32 @calc_strip_offsets(i8* %12, i8* %13, i64* %5, i64* %6, i64* %7)
%15 = load i8*, i8** %3
%16 = load i64, i64* %5
%17 = load i64, i64* %7
%18 = sub i64 %16, %17
%19 = getelementptr inbounds i8, i8* %15, i64 %18
store i8 0, i8* %19
%20 = load i8*, i8** %3
%21 = load i64, i64* %6
%22 = getelementptr inbounds i8, i8* %20, i64 %21
ret i8* %22
}

LLVM IR (-O2):
@.str = [7 x i8] c" \09\0A\0B\0C\0D\00"
define i8* @strstrip(i8* %0, i8* %1) {
%3 = alloca i64
%4 = alloca i64
%5 = alloca i64
%6 = bitcast i64* %3 to i8*
%7 = bitcast i64* %4 to i8*
%8 = bitcast i64* %5 to i8*
%9 = icmp eq i8* %1, null
%10 = select i1 %9, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* %1
%11 = call i32 @calc_strip_offsets(i8* %0, i8* %10, i64* %3, i64* %4, i64* %5)
%12 = load i64, i64* %3
%13 = load i64, i64* %5
%14 = sub i64 %12, %13
%15 = getelementptr inbounds i8, i8* %0, i64 %14
store i8 0, i8* %15
%16 = load i64, i64* %4
%17 = getelementptr inbounds i8, i8* %0, i64 %16
ret i8* %17
}
char *ft_strrchr(const char *s, int c) {
  char *save;
  save = 0;
  while (1) {
    if (*s == c)
      save = (char *)s;
    if (!*s)
      return (save);
    s++;
  }
}


x86 assembly (clang, -O0):
<ft_strrchr>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movq   $0x0,-0x18(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    -0xc(%rbp),%eax
jne    112b <ft_strrchr+0x2b>
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
jne    113e <ft_strrchr+0x3e>
mov    -0x18(%rbp),%rax
pop    %rbp
ret
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1113 <ft_strrchr+0x13>

x86 assembly (clang, -O2):
<ft_strrchr>:
xor    %eax,%eax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movsbl (%rdi),%ecx
cmp    %esi,%ecx
cmove  %rdi,%rax
add    $0x1,%rdi
test   %ecx,%ecx
jne    1110 <ft_strrchr+0x10>
ret

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

LLVM IR (-O2):
define i8* @ft_strrchr(i8* %0, i32 %1) {
br label %3
3: ; preds = %3, %2
%4 = phi i8* [ %0, %2 ], [ %11, %3 ]
%5 = phi i8* [ null, %2 ], [ %9, %3 ]
%6 = load i8, i8* %4
%7 = sext i8 %6 to i32
%8 = icmp eq i32 %7, %1
%9 = select i1 %8, i8* %4, i8* %5
%10 = icmp eq i8 %6, 0
%11 = getelementptr inbounds i8, i8* %4, i64 1
br i1 %10, label %12, label %3
12: ; preds = %3
ret i8* %9
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int, int);
testBitAnd() { printf("%d & %d = %d\n", 10, 7, 10 & 7); }


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

x86 assembly (clang, -O2):
<testBitAnd>:
lea    0xee9(%rip),%rdi
mov    $0xa,%esi
mov    $0x7,%edx
mov    $0x2,%ecx
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [14 x i8] c"%d & %d = %d\0A\00"
define i32 @testBitAnd() {
%1 = alloca i32
%2 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 10, i32 7, i32 2)
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
@.str = [14 x i8] c"%d & %d = %d\0A\00"
define i32 @testBitAnd() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 10, i32 7, i32 2)
ret i32 undef
}
void write() {}


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

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

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

LLVM IR (-O2):
define void @write() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int, int);
int main(void) {
  int n, n2, n3;
  n = 5;
  n2 = n * n;
  n3 = n2 * n2;
  printf("n = %d, n squared = %d, n cubed = %d", n, n2, n3);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x5,-0x8(%rbp)
mov    -0x8(%rbp),%eax
imul   -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
imul   -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
mov    -0x10(%rbp),%ecx
lea    0xeb6(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@.str = [37 x i8] c"n = %d, n squared = %d, n cubed = %d\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0), i32 5, i32 25, i32 625)
ret i32 0
}
/* Variables and functions */
char *strrchr(char *, char);
char *GetExtension(char *filename) {
  char *cptr;
  cptr = strrchr(filename, '.');
  return ((cptr) ? cptr + 1 : "");
}


x86 assembly (clang, -O0):
<GetExtension>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x2e,%esi
call   1030 <strrchr@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     114a <GetExtension+0x3a>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    115a <GetExtension+0x4a>
lea    0xeaf(%rip),%rax
mov    %rax,-0x18(%rbp)
jmp    115a <GetExtension+0x4a>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<GetExtension>:
push   %rax
mov    $0x2e,%esi
call   1030 <strrchr@plt>
lea    0x1(%rax),%rcx
test   %rax,%rax
lea    0xed7(%rip),%rax
cmovne %rcx,%rax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [1 x i8] zeroinitializer
define i8* @GetExtension(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i8* @strrchr(i8* %4, i8 signext 46)
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = icmp ne i8* %6, null
br i1 %7, label %8, label %11
8: ; preds = %1
%9 = load i8*, i8** %3
%10 = getelementptr inbounds i8, i8* %9, i64 1
br label %12
11: ; preds = %1
br label %12
12: ; preds = %11, %8
%13 = phi i8* [ %10, %8 ], [ getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), %11 ]
ret i8* %13
}

LLVM IR (-O2):
@.str = [1 x i8] zeroinitializer
define i8* @GetExtension(i8* %0) {
%2 = tail call i8* @strrchr(i8* dereferenceable(1) %0, i8 signext 46)
%3 = icmp eq i8* %2, null
%4 = getelementptr inbounds i8, i8* %2, i64 1
%5 = select i1 %3, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), i8* %4
ret i8* %5
}
void EmitRet(unsigned char **storage) {
  if (!(*storage))
    return;
  (*((unsigned char *)*storage)) = 0xC3;
  (*storage)++;
}


x86 assembly (clang, -O0):
<EmitRet>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
cmpq   $0x0,(%rax)
jne    111b <EmitRet+0x1b>
jmp    1133 <EmitRet+0x33>
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
movb   $0xc3,(%rax)
mov    -0x8(%rbp),%rax
mov    (%rax),%rcx
add    $0x1,%rcx
mov    %rcx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<EmitRet>:
mov    (%rdi),%rax
test   %rax,%rax
je     110f <EmitRet+0xf>
movb   $0xc3,(%rax)
addq   $0x1,(%rdi)
ret

LLVM IR (-O0):
define void @EmitRet(i8** %0) {
%2 = alloca i8**
store i8** %0, i8*** %2
%3 = load i8**, i8*** %2
%4 = load i8*, i8** %3
%5 = icmp ne i8* %4, null
br i1 %5, label %7, label %6
6: ; preds = %1
br label %13
7: ; preds = %1
%8 = load i8**, i8*** %2
%9 = load i8*, i8** %8
store i8 -61, i8* %9
%10 = load i8**, i8*** %2
%11 = load i8*, i8** %10
%12 = getelementptr inbounds i8, i8* %11, i32 1
store i8* %12, i8** %10
br label %13
13: ; preds = %7, %6
ret void
}

LLVM IR (-O2):
define void @EmitRet(i8** nocapture %0) {
%2 = load i8*, i8** %0
%3 = icmp eq i8* %2, null
br i1 %3, label %7, label %4
4: ; preds = %1
store i8 -61, i8* %2
%5 = load i8*, i8** %0
%6 = getelementptr inbounds i8, i8* %5, i64 1
store i8* %6, i8** %0
br label %7
7: ; preds = %1, %4
ret void
}
void SekInit(void) {}


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

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

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

LLVM IR (-O2):
define void @SekInit() {
ret void
}
/* Variables and functions */
int fn_sq_ch_68_ch_105_ch_102_ch_102_ch_101_ch_114_ch_101_ch_110_ch_116_ch_73_ch_110_ch_100_ch_105_ch_118_ch_105_ch_100_ch_117_ch_97_ch_108_ch_115(
    char const *);
int fn_al_sq_ch_68_ch_105_ch_102_ch_102_ch_101_ch_114_ch_101_ch_110_ch_116_ch_73_ch_110_ch_100_ch_105_ch_118_ch_105_ch_100_ch_117_ch_97_ch_108_ch_115(
    const char *text) {
  int pos = 0;
  pos =
      fn_sq_ch_68_ch_105_ch_102_ch_102_ch_101_ch_114_ch_101_ch_110_ch_116_ch_73_ch_110_ch_100_ch_105_ch_118_ch_105_ch_100_ch_117_ch_97_ch_108_ch_115(
          text);
  if (pos != -1)
    return pos;
  return -1;
}


x86 assembly (clang, -O0):
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <fn_sq_ch_68_ch_105_ch_102_ch_102_ch_101_ch_114_ch_101_ch_110_ch_116_ch_73_ch_110_ch_100_ch_105_ch_118_ch_105_ch_100_ch_117_ch_97_ch_108_ch_115@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0xffffffff,-0x14(%rbp)
je     1144 <fn_al_sq_ch_68_ch_105_ch_102_ch_102_ch_101_ch_114_ch_101_ch_110_ch_116_ch_73_ch_110_ch_100_ch_105_ch_118_ch_105_ch_100_ch_117_ch_97_ch_108_ch_115+0x34>
mov    -0x14(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    114b <fn_al_sq_ch_68_ch_105_ch_102_ch_102_ch_101_ch_114_ch_101_ch_110_ch_116_ch_73_ch_110_ch_100_ch_105_ch_118_ch_105_ch_100_ch_117_ch_97_ch_108_ch_115+0x3b>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @fn_al_sq_ch_68_ch_105_ch_102_ch_102_ch_101_ch_114_ch_101_ch_110_ch_116_ch_73_ch_110_ch_100_ch_105_ch_118_ch_105_ch_100_ch_117_ch_97_ch_108_ch_115(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 0, i32* %4
%5 = load i8*, i8** %3
%6 = call i32 @fn_sq_ch_68_ch_105_ch_102_ch_102_ch_101_ch_114_ch_101_ch_110_ch_116_ch_73_ch_110_ch_100_ch_105_ch_118_ch_105_ch_100_ch_117_ch_97_ch_108_ch_115(i8* %5)
store i32 %6, i32* %4
%7 = load i32, i32* %4
%8 = icmp ne i32 %7, -1
br i1 %8, label %9, label %11
9: ; preds = %1
%10 = load i32, i32* %4
store i32 %10, i32* %2
br label %12
11: ; preds = %1
store i32 -1, i32* %2
br label %12
12: ; preds = %11, %9
%13 = load i32, i32* %2
ret i32 %13
}

LLVM IR (-O2):
define i32 @fn_al_sq_ch_68_ch_105_ch_102_ch_102_ch_101_ch_114_ch_101_ch_110_ch_116_ch_73_ch_110_ch_100_ch_105_ch_118_ch_105_ch_100_ch_117_ch_97_ch_108_ch_115(i8* %0) {
%2 = tail call i32 @fn_sq_ch_68_ch_105_ch_102_ch_102_ch_101_ch_114_ch_101_ch_110_ch_116_ch_73_ch_110_ch_100_ch_105_ch_118_ch_105_ch_100_ch_117_ch_97_ch_108_ch_115(i8* %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ ol(char *);
gdata() { ol(".data"); }


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

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

LLVM IR (-O0):
@.str = [6 x i8] c".data\00"
define i32 @gdata() {
%1 = alloca i32
%2 = call i32 @ol(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
@.str = [6 x i8] c".data\00"
define i32 @gdata() {
%1 = tail call i32 @ol(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ islower(int);
void t_islower_0x5f() {
  Assert_real((islower(95) == 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_islower.c",
              480, ("islower should be 0 for _"));
}


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

x86 assembly (clang, -O2):
<t_islower_0x5f>:
push   %rax
mov    $0x5f,%edi
call   1030 <islower@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x1e0,%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_islower.c\00"
@.str.1 = [26 x i8] c"islower should be 0 for _\00"
define void @t_islower_0x5f() {
%1 = call i64 @islower(i32 95)
%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 480, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_islower.c\00"
@.str.1 = [26 x i8] c"islower should be 0 for _\00"
define void @t_islower_0x5f() {
%1 = tail call i64 @islower(i32 95)
%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 480, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
char a_upper(char c) { return (c >= 'a' && c <= 'z') ? c - ('a' - 'A') : c; }


x86 assembly (clang, -O0):
<a_upper>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
cmp    $0x61,%eax
jl     1133 <a_upper+0x33>
movsbl -0x1(%rbp),%eax
cmp    $0x7a,%eax
jg     1133 <a_upper+0x33>
movsbl -0x1(%rbp),%eax
sub    $0x20,%eax
mov    %eax,-0x8(%rbp)
jmp    113a <a_upper+0x3a>
movsbl -0x1(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
movsbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<a_upper>:
lea    -0x61(%rdi),%eax
lea    -0x20(%rdi),%ecx
cmp    $0x1a,%al
movzbl %cl,%eax
cmovae %edi,%eax
ret

LLVM IR (-O0):
define signext i8 @a_upper(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = icmp sge i32 %4, 97
br i1 %5, label %6, label %14
6: ; preds = %1
%7 = load i8, i8* %2
%8 = sext i8 %7 to i32
%9 = icmp sle i32 %8, 122
br i1 %9, label %10, label %14
10: ; preds = %6
%11 = load i8, i8* %2
%12 = sext i8 %11 to i32
%13 = sub nsw i32 %12, 32
br label %17
14: ; preds = %6, %1
%15 = load i8, i8* %2
%16 = sext i8 %15 to i32
br label %17
17: ; preds = %14, %10
%18 = phi i32 [ %13, %10 ], [ %16, %14 ]
%19 = trunc i32 %18 to i8
ret i8 %19
}

LLVM IR (-O2):
define signext i8 @a_upper(i8 signext %0) {
%2 = add i8 %0, -97
%3 = icmp ult i8 %2, 26
%4 = add i8 %0, -32
%5 = select i1 %3, i8 %4, i8 %0
ret i8 %5
}
int label(void) {
  static int id = 1;
  return id++;
}


x86 assembly (clang, -O0):
<label>:
push   %rbp
mov    %rsp,%rbp
mov    0x2f16(%rip),%eax
mov    %eax,%ecx
add    $0x1,%ecx
mov    %ecx,0x2f0b(%rip)
pop    %rbp
ret

x86 assembly (clang, -O2):
<label>:
mov    0x2f1a(%rip),%eax
lea    0x1(%rax),%ecx
mov    %ecx,0x2f11(%rip)
ret

LLVM IR (-O0):
@label.id = internal global i32 1
define i32 @label() {
%1 = load i32, i32* @label.id
%2 = add nsw i32 %1, 1
store i32 %2, i32* @label.id
ret i32 %1
}

LLVM IR (-O2):
@label.id = internal unnamed_addr global i32 1
define i32 @label() {
%1 = load i32, i32* @label.id
%2 = add nsw i32 %1, 1
store i32 %2, i32* @label.id
ret i32 %1
}