xunge/DecIR huggingface dataset:
/* Variables and functions */
int rand();
float noiseOsc(int A) {
  return A * ((2.0 * ((rand() % (127 - (-128))) + (-128)) - 1.0) / 127);
}


x86 assembly (clang, -O0):
<noiseOsc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cvtsi2sdl -0x4(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
mov    $0x0,%al
call   1030 <rand@plt>
movsd  -0x10(%rbp),%xmm0
mov    $0xff,%ecx
cltd
idiv   %ecx
add    $0xffffff80,%edx
cvtsi2sd %edx,%xmm1
addsd  %xmm1,%xmm1
movsd  0xebc(%rip),%xmm2
addsd  %xmm2,%xmm1
movsd  0xea8(%rip),%xmm2
divsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<noiseOsc>:
push   %rax
cvtsi2sd %edi,%xmm0
movsd  %xmm0,(%rsp)
xor    %eax,%eax
call   1030 <rand@plt>
cltq
imul   $0xffffffff80808081,%rax,%rcx
shr    $0x20,%rcx
add    %eax,%ecx
mov    %ecx,%edx
shr    $0x1f,%edx
sar    $0x7,%ecx
add    %edx,%ecx
mov    %ecx,%edx
shl    $0x8,%edx
sub    %edx,%ecx
add    %ecx,%eax
add    $0xffffff80,%eax
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
addsd  %xmm0,%xmm0
addsd  0xea7(%rip),%xmm0
divsd  0xea7(%rip),%xmm0
mulsd  (%rsp),%xmm0
cvtsd2ss %xmm0,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @noiseOsc(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = sitofp i32 %3 to double
%5 = call i32 (...) @rand()
%6 = srem i32 %5, 255
%7 = add nsw i32 %6, -128
%8 = sitofp i32 %7 to double
%9 = call double @llvm.fmuladd.f64(double 2.000000e+00, double %8, double -1.000000e+00)
%10 = fdiv double %9, 1.270000e+02
%11 = fmul double %4, %10
%12 = fptrunc double %11 to float
ret float %12
}

LLVM IR (-O2):
define float @noiseOsc(i32 %0) {
%2 = sitofp i32 %0 to double
%3 = tail call i32 (...) @rand()
%4 = srem i32 %3, 255
%5 = add nsw i32 %4, -128
%6 = sitofp i32 %5 to double
%7 = tail call double @llvm.fmuladd.f64(double %6, double 2.000000e+00, double -1.000000e+00)
%8 = fdiv double %7, 1.270000e+02
%9 = fmul double %8, %2
%10 = fptrunc double %9 to float
ret float %10
}
/* Type definitions */
typedef scalar_t__ uint8_t;
typedef int uint32_t;

/* Variables and functions */
void LittleEndianWriteU32(uint32_t value, uint8_t *bytes) {
  bytes[0] = (uint8_t)value;
  bytes[1] = (uint8_t)(value >> 8);
  bytes[2] = (uint8_t)(value >> 16);
  bytes[3] = (uint8_t)(value >> 24);
}


x86 assembly (clang, -O0):
<LittleEndianWriteU32>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
movslq -0x4(%rbp),%rcx
mov    -0x10(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x4(%rbp),%eax
sar    $0x8,%eax
movslq %eax,%rcx
mov    -0x10(%rbp),%rax
mov    %rcx,0x8(%rax)
mov    -0x4(%rbp),%eax
sar    $0x10,%eax
movslq %eax,%rcx
mov    -0x10(%rbp),%rax
mov    %rcx,0x10(%rax)
mov    -0x4(%rbp),%eax
sar    $0x18,%eax
movslq %eax,%rcx
mov    -0x10(%rbp),%rax
mov    %rcx,0x18(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<LittleEndianWriteU32>:
movslq %edi,%rax
mov    %rax,(%rsi)
mov    %eax,%ecx
sar    $0x8,%ecx
movslq %ecx,%rcx
mov    %rcx,0x8(%rsi)
mov    %eax,%ecx
sar    $0x10,%ecx
movslq %ecx,%rcx
mov    %rcx,0x10(%rsi)
sar    $0x18,%eax
cltq
mov    %rax,0x18(%rsi)
ret

LLVM IR (-O0):
define void @LittleEndianWriteU32(i32 %0, i64* %1) {
%3 = alloca i32
%4 = alloca i64*
store i32 %0, i32* %3
store i64* %1, i64** %4
%5 = load i32, i32* %3
%6 = sext i32 %5 to i64
%7 = load i64*, i64** %4
%8 = getelementptr inbounds i64, i64* %7, i64 0
store i64 %6, i64* %8
%9 = load i32, i32* %3
%10 = ashr i32 %9, 8
%11 = sext i32 %10 to i64
%12 = load i64*, i64** %4
%13 = getelementptr inbounds i64, i64* %12, i64 1
store i64 %11, i64* %13
%14 = load i32, i32* %3
%15 = ashr i32 %14, 16
%16 = sext i32 %15 to i64
%17 = load i64*, i64** %4
%18 = getelementptr inbounds i64, i64* %17, i64 2
store i64 %16, i64* %18
%19 = load i32, i32* %3
%20 = ashr i32 %19, 24
%21 = sext i32 %20 to i64
%22 = load i64*, i64** %4
%23 = getelementptr inbounds i64, i64* %22, i64 3
store i64 %21, i64* %23
ret void
}

LLVM IR (-O2):
define void @LittleEndianWriteU32(i32 %0, i64* nocapture writeonly %1) {
%3 = sext i32 %0 to i64
store i64 %3, i64* %1
%4 = ashr i32 %0, 8
%5 = sext i32 %4 to i64
%6 = getelementptr inbounds i64, i64* %1, i64 1
store i64 %5, i64* %6
%7 = ashr i32 %0, 16
%8 = sext i32 %7 to i64
%9 = getelementptr inbounds i64, i64* %1, i64 2
store i64 %8, i64* %9
%10 = ashr i32 %0, 24
%11 = sext i32 %10 to i64
%12 = getelementptr inbounds i64, i64* %1, i64 3
store i64 %11, i64* %12
ret void
}
/* Variables and functions */
int /*<<< orphan*/ alarm(int);
int /*<<< orphan*/ printf(char *);
int main(int argc, char *argv[]) {
  printf("----------------PROCESS START----------------\n");
  printf("Prob 4: alarm\n");
  alarm(1);
  while (1)
    ;
  printf("----------------PROCESS   END----------------\n");
  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    0xec3(%rip),%rdi
call   1030 <printf@plt>
lea    0xee6(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <alarm@plt>
jmp    1158 <main+0x38>

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
lea    0xefa(%rip),%rdi
call   1030 <puts@plt>
mov    $0x1,%edi
call   1040 <alarm@plt>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
jmp    1150 <main+0x30>

LLVM IR (-O0):
@.str = [47 x i8] c"----------------PROCESS START----------------\0A\00"
@.str.1 = [15 x i8] c"Prob 4: alarm\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 @printf(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0))
%7 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0))
%8 = call i32 @alarm(i32 1)
br label %9
9: ; preds = %2, %9
br label %9
}

LLVM IR (-O2):
@str = [46 x i8] c"----------------PROCESS START----------------\00"
@str.2 = [14 x i8] c"Prob 4: alarm\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([46 x i8], [46 x i8]* @str, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @str.2, i64 0, i64 0))
%5 = tail call i32 @alarm(i32 1)
br label %6
6: ; preds = %2, %6
br label %6
}
/* Variables and functions */
int /*<<< orphan*/ strcmp(void *, void *);
int streq(void *a, void *b) {
  if (a == b)
    return 1;
  if (a == NULL || b == NULL)
    return 0;
  return !strcmp(a, b);
}


x86 assembly (clang, -O0):
<streq>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
cmp    -0x18(%rbp),%rax
jne    113a <streq+0x2a>
movl   $0x1,-0x4(%rbp)
jmp    1179 <streq+0x69>
cmpq   $0x0,-0x10(%rbp)
je     1150 <streq+0x40>
cmpq   $0x0,-0x18(%rbp)
jne    115c <streq+0x4c>
movl   $0x0,-0x4(%rbp)
jmp    1179 <streq+0x69>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<streq>:
cmp    %rsi,%rdi
je     1135 <streq+0x25>
xor    %eax,%eax
test   %rdi,%rdi
je     1134 <streq+0x24>
test   %rsi,%rsi
je     1134 <streq+0x24>
push   %rax
call   1030 <strcmp@plt>
mov    %eax,%ecx
xor    %eax,%eax
test   %ecx,%ecx
sete   %al
add    $0x8,%rsp
ret
mov    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @streq(i8* %0, i8* %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 = load i8*, i8** %5
%8 = icmp eq i8* %6, %7
br i1 %8, label %9, label %10
9: ; preds = %2
store i32 1, i32* %3
br label %24
10: ; preds = %2
%11 = load i8*, i8** %4
%12 = icmp eq i8* %11, null
br i1 %12, label %16, label %13
13: ; preds = %10
%14 = load i8*, i8** %5
%15 = icmp eq i8* %14, null
br i1 %15, label %16, label %17
16: ; preds = %13, %10
store i32 0, i32* %3
br label %24
17: ; preds = %13
%18 = load i8*, i8** %4
%19 = load i8*, i8** %5
%20 = call i32 @strcmp(i8* %18, i8* %19)
%21 = icmp ne i32 %20, 0
%22 = xor i1 %21, true
%23 = zext i1 %22 to i32
store i32 %23, i32* %3
br label %24
24: ; preds = %17, %16, %9
%25 = load i32, i32* %3
ret i32 %25
}

LLVM IR (-O2):
define i32 @streq(i8* %0, i8* %1) {
%3 = icmp eq i8* %0, %1
br i1 %3, label %12, label %4
4: ; preds = %2
%5 = icmp eq i8* %0, null
%6 = icmp eq i8* %1, null
%7 = or i1 %5, %6
br i1 %7, label %12, label %8
8: ; preds = %4
%9 = tail call i32 @strcmp(i8* dereferenceable(1) %0, i8* dereferenceable(1) %1)
%10 = icmp eq i32 %9, 0
%11 = zext i1 %10 to i32
br label %12
12: ; preds = %4, %2, %8
%13 = phi i32 [ %11, %8 ], [ 1, %2 ], [ 0, %4 ]
ret i32 %13
}
void S_AmbientOn(void) {}


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

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

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

LLVM IR (-O2):
define void @S_AmbientOn() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void freep(void *p) {
  void **_p = p;
  free(*_p);
  *_p = NULL;
}


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

x86 assembly (clang, -O2):
<freep>:
push   %rbx
mov    %rdi,%rbx
mov    (%rdi),%rdi
call   1030 <free@plt>
movq   $0x0,(%rbx)
pop    %rbx
ret

LLVM IR (-O0):
define void @freep(i8* %0) {
%2 = alloca i8*
%3 = alloca i8**
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = bitcast i8* %4 to i8**
store i8** %5, i8*** %3
%6 = load i8**, i8*** %3
%7 = load i8*, i8** %6
%8 = call i32 @free(i8* %7)
%9 = load i8**, i8*** %3
store i8* null, i8** %9
ret void
}

LLVM IR (-O2):
define void @freep(i8* nocapture %0) {
%2 = bitcast i8* %0 to i8**
%3 = load i8*, i8** %2
%4 = tail call i32 @free(i8* %3)
store i8* null, i8** %2
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ sigset_t;

/* Variables and functions */
int sigemptyset(int /*<<< orphan*/ *);
int test(void) {
  sigset_t signal_set;
  int result;
  result = sigemptyset(&signal_set);
  return result;
}


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

x86 assembly (clang, -O2):
<test>:
push   %rax
lea    0x4(%rsp),%rdi
call   1030 <sigemptyset@plt>
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @test() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @sigemptyset(i32* %1)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ _s2priv_ss2pt(unsigned int, int /*<<< orphan*/);
void ss2ptt(unsigned int itextureID) { _s2priv_ss2pt(itextureID, 0); }


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

x86 assembly (clang, -O2):
<ss2ptt>:
xor    %esi,%esi
jmp    1030 <_s2priv_ss2pt@plt>

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

LLVM IR (-O2):
define void @ss2ptt(i32 %0) {
%2 = tail call i32 @_s2priv_ss2pt(i32 %0, i32 0)
ret void
}
/* Variables and functions */
int pad(int, int);
int subdivide(int quantum, int per, int s, int o) {
  int base = ((s - o) / quantum) * per;
  return (pad(o + base, quantum));
}


x86 assembly (clang, -O0):
<subdivide>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    -0xc(%rbp),%eax
sub    -0x10(%rbp),%eax
cltd
idivl  -0x4(%rbp)
imul   -0x8(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%edi
add    -0x14(%rbp),%edi
mov    -0x4(%rbp),%esi
call   1030 <pad@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<subdivide>:
mov    %edx,%eax
mov    %edi,%r8d
sub    %ecx,%eax
cltd
idiv   %edi
imul   %esi,%eax
lea    (%rax,%rcx,1),%edi
mov    %r8d,%esi
jmp    1030 <pad@plt>

LLVM IR (-O0):
define i32 @subdivide(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i32 %3, i32* %8
%10 = load i32, i32* %7
%11 = load i32, i32* %8
%12 = sub nsw i32 %10, %11
%13 = load i32, i32* %5
%14 = sdiv i32 %12, %13
%15 = load i32, i32* %6
%16 = mul nsw i32 %14, %15
store i32 %16, i32* %9
%17 = load i32, i32* %8
%18 = load i32, i32* %9
%19 = add nsw i32 %17, %18
%20 = load i32, i32* %5
%21 = call i32 @pad(i32 %19, i32 %20)
ret i32 %21
}

LLVM IR (-O2):
define i32 @subdivide(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = sub nsw i32 %2, %3
%6 = sdiv i32 %5, %0
%7 = mul nsw i32 %6, %1
%8 = add nsw i32 %7, %3
%9 = tail call i32 @pad(i32 %8, i32 %0)
ret i32 %9
}
/* Type definitions */
typedef int pid_t;

/* Variables and functions */
int /*<<< orphan*/ SIGTERM;
int getppid();
int /*<<< orphan*/ kill(int const, int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, char *, int const);
char *sl_this();
void slc_die(void) {
  const pid_t father = getppid();
  printf("%s killing test controller %u\n", sl_this(), father);
  kill(father, SIGTERM);
}


x86 assembly (clang, -O0):
<slc_die>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1060 <getppid@plt>
mov    %eax,-0x4(%rbp)
mov    $0x0,%al
call   1030 <sl_this@plt>
mov    %rax,%rsi
mov    -0x4(%rbp),%edx
lea    0xe9a(%rip),%rdi
call   1040 <printf@plt>
mov    -0x4(%rbp),%edi
mov    0x2e73(%rip),%rax
mov    (%rax),%esi
call   1050 <kill@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<slc_die>:
push   %rbx
xor    %eax,%eax
call   1060 <getppid@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1030 <sl_this@plt>
lea    0xea8(%rip),%rdi
mov    %rax,%rsi
mov    %ebx,%edx
call   1040 <printf@plt>
mov    0x2e7f(%rip),%rax
mov    (%rax),%esi
mov    %ebx,%edi
pop    %rbx
jmp    1050 <kill@plt>

LLVM IR (-O0):
@.str = [31 x i8] c"%s killing test controller %u\0A\00"
@SIGTERM = global i32 0
define void @slc_die() {
%1 = alloca i32
%2 = call i32 (...) @getppid()
store i32 %2, i32* %1
%3 = call i8* (...) @sl_this()
%4 = load i32, i32* %1
%5 = call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0), i8* %3, i32 %4)
%6 = load i32, i32* %1
%7 = load i32, i32* @SIGTERM
%8 = call i32 @kill(i32 %6, i32 %7)
ret void
}

LLVM IR (-O2):
@.str = [31 x i8] c"%s killing test controller %u\0A\00"
@SIGTERM = global i32 0
define void @slc_die() {
%1 = tail call i32 (...) @getppid()
%2 = tail call i8* (...) @sl_this()
%3 = tail call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0), i8* %2, i32 %1)
%4 = load i32, i32* @SIGTERM
%5 = tail call i32 @kill(i32 %1, i32 %4)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fn1();
int main() {
  fn1();
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @fn1()
ret i32 0
}
const unsigned char *string_trimLeft(const unsigned char *string) {
  const unsigned char *p = string;
  while (*p == ' ')
    p++;
  return p;
}


x86 assembly (clang, -O0):
<string_trimLeft>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movzbl (%rax),%eax
cmp    $0x20,%eax
jne    1131 <string_trimLeft+0x31>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1110 <string_trimLeft+0x10>
mov    -0x10(%rbp),%rax
pop    %rbp
ret

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

LLVM IR (-O0):
define i8* @string_trimLeft(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
store i8* %4, i8** %3
br label %5
5: ; preds = %10, %1
%6 = load i8*, i8** %3
%7 = load i8, i8* %6
%8 = zext i8 %7 to i32
%9 = icmp eq i32 %8, 32
br i1 %9, label %10, label %13
10: ; preds = %5
%11 = load i8*, i8** %3
%12 = getelementptr inbounds i8, i8* %11, i32 1
store i8* %12, i8** %3
br label %5
13: ; preds = %5
%14 = load i8*, i8** %3
ret i8* %14
}

LLVM IR (-O2):
define i8* @string_trimLeft(i8* %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i8* [ %0, %1 ], [ %6, %2 ]
%4 = load i8, i8* %3
%5 = icmp eq i8 %4, 32
%6 = getelementptr inbounds i8, i8* %3, i64 1
br i1 %5, label %2, label %7
7: ; preds = %2
ret i8* %3
}
int main(void) {
  int i, n = 0;
  for (i = 0; i < 10; i += 1) {
    if (i == 3)
      continue;
    n = n + i;
  }
  return n;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0xc(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0xa,-0x8(%rbp)
jge    1149 <main+0x49>
cmpl   $0x3,-0x8(%rbp)
jne    1132 <main+0x32>
jmp    113b <main+0x3b>
mov    -0xc(%rbp),%eax
add    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1119 <main+0x19>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 42
}
void add_sym(unsigned char *str) {
  while (*str != 0)
    str++;
  if (*(str - 1) != '\\') {
    *str = '\\';
    *(str + 1) = 0;
  }
}


x86 assembly (clang, -O0):
<add_sym>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
cmp    $0x0,%eax
je     1129 <add_sym+0x29>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1108 <add_sym+0x8>
mov    -0x8(%rbp),%rax
movzbl -0x1(%rax),%eax
cmp    $0x5c,%eax
je     1149 <add_sym+0x49>
mov    -0x8(%rbp),%rax
movb   $0x5c,(%rax)
mov    -0x8(%rbp),%rax
movb   $0x0,0x1(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<add_sym>:
cmpb   $0x0,(%rdi)
lea    0x1(%rdi),%rdi
jne    1100 <add_sym>
cmpb   $0x5c,-0x2(%rdi)
je     1115 <add_sym+0x15>
movw   $0x5c,-0x1(%rdi)
ret

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

LLVM IR (-O2):
define void @add_sym(i8* nocapture %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i8* [ %0, %1 ], [ %6, %2 ]
%4 = load i8, i8* %3
%5 = icmp eq i8 %4, 0
%6 = getelementptr inbounds i8, i8* %3, i64 1
br i1 %5, label %7, label %2
7: ; preds = %2
%8 = getelementptr inbounds i8, i8* %3, i64 -1
%9 = load i8, i8* %8
%10 = icmp eq i8 %9, 92
br i1 %10, label %12, label %11
11: ; preds = %7
store i8 92, i8* %3
store i8 0, i8* %6
br label %12
12: ; preds = %11, %7
ret void
}
void buggy(int *x) {}


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

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

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

LLVM IR (-O2):
define void @buggy(i32* nocapture %0) {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ ENGINE;

/* Variables and functions */
int ENGINE_CMD_BASE;
int gost_set_default_param(int, void *);
int gost_control_func(ENGINE *e, int cmd, long i, void *p, void (*f)(void)) {
  int param = cmd - ENGINE_CMD_BASE;
  int ret = 0;
  if (param < 0 || param > 0)
    return -1;
  ret = gost_set_default_param(param, p);
  return ret;
}


x86 assembly (clang, -O0):
<gost_control_func>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    %rdx,-0x20(%rbp)
mov    %rcx,-0x28(%rbp)
mov    %r8,-0x30(%rbp)
mov    -0x14(%rbp),%eax
mov    0x2eb3(%rip),%rcx
sub    (%rcx),%eax
mov    %eax,-0x34(%rbp)
movl   $0x0,-0x38(%rbp)
cmpl   $0x0,-0x34(%rbp)
jl     1155 <gost_control_func+0x45>
cmpl   $0x0,-0x34(%rbp)
jle    1161 <gost_control_func+0x51>
movl   $0xffffffff,-0x4(%rbp)
jmp    1176 <gost_control_func+0x66>
mov    -0x34(%rbp),%edi
mov    -0x28(%rbp),%rsi
call   1030 <gost_set_default_param@plt>
mov    %eax,-0x38(%rbp)
mov    -0x38(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gost_control_func>:
mov    0x2ed1(%rip),%rax
cmp    %esi,(%rax)
jne    1125 <gost_control_func+0x15>
xor    %edi,%edi
mov    %rcx,%rsi
jmp    1030 <gost_set_default_param@plt>
mov    $0xffffffff,%eax
ret

LLVM IR (-O0):
@ENGINE_CMD_BASE = global i32 0
define i32 @gost_control_func(i32* %0, i32 %1, i64 %2, i8* %3, void ()* %4) {
%6 = alloca i32
%7 = alloca i32*
%8 = alloca i32
%9 = alloca i64
%10 = alloca i8*
%11 = alloca void ()*
%12 = alloca i32
%13 = alloca i32
store i32* %0, i32** %7
store i32 %1, i32* %8
store i64 %2, i64* %9
store i8* %3, i8** %10
store void ()* %4, void ()** %11
%14 = load i32, i32* %8
%15 = load i32, i32* @ENGINE_CMD_BASE
%16 = sub nsw i32 %14, %15
store i32 %16, i32* %12
store i32 0, i32* %13
%17 = load i32, i32* %12
%18 = icmp slt i32 %17, 0
br i1 %18, label %22, label %19
19: ; preds = %5
%20 = load i32, i32* %12
%21 = icmp sgt i32 %20, 0
br i1 %21, label %22, label %23
22: ; preds = %19, %5
store i32 -1, i32* %6
br label %28
23: ; preds = %19
%24 = load i32, i32* %12
%25 = load i8*, i8** %10
%26 = call i32 @gost_set_default_param(i32 %24, i8* %25)
store i32 %26, i32* %13
%27 = load i32, i32* %13
store i32 %27, i32* %6
br label %28
28: ; preds = %23, %22
%29 = load i32, i32* %6
ret i32 %29
}

LLVM IR (-O2):
@ENGINE_CMD_BASE = global i32 0
define i32 @gost_control_func(i32* nocapture readnone %0, i32 %1, i64 %2, i8* %3, void ()* nocapture readnone %4) {
%6 = load i32, i32* @ENGINE_CMD_BASE
%7 = icmp eq i32 %6, %1
br i1 %7, label %8, label %10
8: ; preds = %5
%9 = tail call i32 @gost_set_default_param(i32 0, i8* %3)
br label %10
10: ; preds = %5, %8
%11 = phi i32 [ %9, %8 ], [ -1, %5 ]
ret i32 %11
}
void X509_EXTENSION_get_object(void) {}


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

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

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

LLVM IR (-O2):
define void @X509_EXTENSION_get_object() {
ret void
}
void foo(int *a) {}


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

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

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

LLVM IR (-O2):
define void @foo(i32* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ memset(void *, int /*<<< orphan*/, unsigned long);
extern unsigned long __xtensa_clear_user(void *addr, unsigned long size) {
  if (!memset(addr, 0, size))
    return size;
  return 0;
}


x86 assembly (clang, -O0):
<__xtensa_clear_user>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rdx
xor    %esi,%esi
call   1030 <memset@plt>
cmp    $0x0,%eax
jne    1145 <__xtensa_clear_user+0x35>
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    114d <__xtensa_clear_user+0x3d>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__xtensa_clear_user>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
xor    %ebx,%ebx
xor    %esi,%esi
mov    %r14,%rdx
call   1030 <memset@plt>
test   %eax,%eax
cmove  %r14,%rbx
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define i64 @__xtensa_clear_user(i8* %0, i64 %1) {
%3 = tail call i32 @memset(i8* %0, i32 0, i64 %1)
%4 = icmp eq i32 %3, 0
%5 = select i1 %4, i64 %1, i64 0
ret i64 %5
}
/* Variables and functions */
int /*<<< orphan*/ do_stat(char *);
int main(int argc, char *argv[]) {
  int i;
  for (i = 1; i < argc; i++)
    do_stat(argv[i]);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x1,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1158 <main+0x48>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1030 <do_stat@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    112d <main+0x1d>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
cmp    $0x2,%edi
jl     1142 <main+0x32>
mov    %rsi,%r14
mov    %edi,%r15d
mov    $0x1,%ebx
cs nopw 0x0(%rax,%rax,1)
nop
mov    (%r14,%rbx,8),%rdi
call   1030 <do_stat@plt>
add    $0x1,%rbx
cmp    %rbx,%r15
jne    1130 <main+0x20>
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %r15
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 1, i32* %6
br label %7
7: ; preds = %18, %2
%8 = load i32, i32* %6
%9 = load i32, i32* %4
%10 = icmp slt i32 %8, %9
br i1 %10, label %11, label %21
11: ; preds = %7
%12 = load i8**, i8*** %5
%13 = load i32, i32* %6
%14 = sext i32 %13 to i64
%15 = getelementptr inbounds i8*, i8** %12, i64 %14
%16 = load i8*, i8** %15
%17 = call i32 @do_stat(i8* %16)
br label %18
18: ; preds = %11
%19 = load i32, i32* %6
%20 = add nsw i32 %19, 1
store i32 %20, i32* %6
br label %7
21: ; preds = %7
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp sgt i32 %0, 1
br i1 %3, label %4, label %13
4: ; preds = %2
%5 = zext i32 %0 to i64
br label %6
6: ; preds = %4, %6
%7 = phi i64 [ 1, %4 ], [ %11, %6 ]
%8 = getelementptr inbounds i8*, i8** %1, i64 %7
%9 = load i8*, i8** %8
%10 = tail call i32 @do_stat(i8* %9)
%11 = add nuw nsw i64 %7, 1
%12 = icmp eq i64 %11, %5
br i1 %12, label %13, label %6
13: ; preds = %6, %2
ret i32 0
}
/* Variables and functions */
int f447(int *);
int f448(int *p) { return f447(p); }


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

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

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

LLVM IR (-O2):
define i32 @f448(i32* %0) {
%2 = tail call i32 @f447(i32* %0)
ret i32 %2
}
void simple16_help(void) { printf("%s - TBD\n", __func__); }


x86 assembly (clang, -O0):
<simple16_help>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
lea    0xee8(%rip),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<simple16_help>:
lea    0xee9(%rip),%rdi
lea    0xeec(%rip),%rsi
xor    %eax,%eax
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [10 x i8] c"%s - TBD\0A\00"
@__func__.simple16_help = [14 x i8] c"simple16_help\00"
define void @simple16_help() {
%1 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @__func__.simple16_help, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [10 x i8] c"%s - TBD\0A\00"
@__func__.simple16_help = [14 x i8] c"simple16_help\00"
define void @simple16_help() {
%1 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @__func__.simple16_help, i64 0, i64 0))
ret void
}
void foo_1_2_1_1_1_2_2_1_1() {}


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

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

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

LLVM IR (-O2):
define void @foo_1_2_1_1_1_2_2_1_1() {
ret void
}
int SteamAPI_ISteamFriends_GetClanCount(void *self) {
  xlogf("%s(self = %p)\n", __func__, self);
  return 0;
}


x86 assembly (clang, -O0):
<SteamAPI_ISteamFriends_GetClanCount>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdx
lea    0xed9(%rip),%rdi
lea    0xee1(%rip),%rsi
mov    $0x0,%al
call   1030 <xlogf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<SteamAPI_ISteamFriends_GetClanCount>:
push   %rax
mov    %rdi,%rdx
lea    0xee5(%rip),%rdi
lea    0xeed(%rip),%rsi
xor    %eax,%eax
call   1030 <xlogf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [15 x i8] c"%s(self = %p)\0A\00"
@__func__.SteamAPI_ISteamFriends_GetClanCount = [36 x i8] c"SteamAPI_ISteamFriends_GetClanCount\00"
define i32 @SteamAPI_ISteamFriends_GetClanCount(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 (i8*, i8*, i8*, ...) bitcast (i32 (...)* @xlogf to i32 (i8*, i8*, i8*, ...)*)(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([36 x i8], [36 x i8]* @__func__.SteamAPI_ISteamFriends_GetClanCount, i64 0, i64 0), i8* %3)
ret i32 0
}

LLVM IR (-O2):
@.str = [15 x i8] c"%s(self = %p)\0A\00"
@__func__.SteamAPI_ISteamFriends_GetClanCount = [36 x i8] c"SteamAPI_ISteamFriends_GetClanCount\00"
define i32 @SteamAPI_ISteamFriends_GetClanCount(i8* %0) {
%2 = tail call i32 (i8*, i8*, i8*, ...) bitcast (i32 (...)* @xlogf to i32 (i8*, i8*, i8*, ...)*)(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([36 x i8], [36 x i8]* @__func__.SteamAPI_ISteamFriends_GetClanCount, i64 0, i64 0), i8* %0)
ret i32 0
}
void __asan_register_globals() {}


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

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

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

LLVM IR (-O2):
define void @__asan_register_globals() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int /*<<< orphan*/, char *, int, char *);
int /*<<< orphan*/ isalnum(int);
void t_isalnum_0x75() {
  Assert_real((isalnum(117)),
              "/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_isalnum.c",
              590, ("isalnum should be 1 for u"));
}


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

x86 assembly (clang, -O2):
<t_isalnum_0x75>:
push   %rax
mov    $0x75,%edi
call   1030 <isalnum@plt>
lea    0xece(%rip),%rsi
lea    0xf6f(%rip),%rcx
mov    %eax,%edi
mov    $0x24e,%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_isalnum.c\00"
@.str.1 = [26 x i8] c"isalnum should be 1 for u\00"
define void @t_isalnum_0x75() {
%1 = call i32 @isalnum(i32 117)
%2 = call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 590, 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_isalnum.c\00"
@.str.1 = [26 x i8] c"isalnum should be 1 for u\00"
define void @t_isalnum_0x75() {
%1 = tail call i32 @isalnum(i32 117)
%2 = tail call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 590, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
void kexec_crash_init(void) {}


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

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

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

LLVM IR (-O2):
define void @kexec_crash_init() {
ret void
}
/* Variables and functions */
scalar_t__ malloc(int);
char *ft_strnew(size_t size) {
  char *str;
  size_t i;
  i = 0;
  str = (char *)malloc(sizeof(char) * size + 1);
  if (str == NULL)
    return (NULL);
  while (i <= size) {
    str[i] = '\0';
    i++;
  }
  return (str);
}


x86 assembly (clang, -O0):
<ft_strnew>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
movq   $0x0,-0x20(%rbp)
mov    -0x10(%rbp),%rax
shl    $0x0,%rax
add    $0x1,%rax
mov    %eax,%edi
call   1030 <malloc@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    1153 <ft_strnew+0x43>
movq   $0x0,-0x8(%rbp)
jmp    118b <ft_strnew+0x7b>
jmp    1158 <ft_strnew+0x48>
mov    -0x20(%rbp),%rax
cmp    -0x10(%rbp),%rax
ja     1183 <ft_strnew+0x73>
mov    -0x18(%rbp),%rax
mov    -0x20(%rbp),%rcx
movb   $0x0,(%rax,%rcx,1)
mov    -0x20(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x20(%rbp)
jmp    1158 <ft_strnew+0x48>
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_strnew>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
add    $0x1,%edi
call   1040 <malloc@plt>
test   %rax,%rax
je     114a <ft_strnew+0x2a>
mov    %rax,%r14
add    $0x1,%rbx
mov    %rax,%rdi
xor    %esi,%esi
mov    %rbx,%rdx
call   1030 <memset@plt>
jmp    114d <ft_strnew+0x2d>
xor    %r14d,%r14d
mov    %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define i8* @ft_strnew(i64 %0) {
%2 = trunc i64 %0 to i32
%3 = add i32 %2, 1
%4 = tail call i64 @malloc(i32 %3)
%5 = inttoptr i64 %4 to i8*
%6 = icmp eq i64 %4, 0
br i1 %6, label %9, label %7
7: ; preds = %1
%8 = add nuw i64 %0, 1
br label %9
9: ; preds = %7, %1
%10 = phi i8* [ null, %1 ], [ %5, %7 ]
ret i8* %10
}
/* Variables and functions */
int /*<<< orphan*/ menu();
int /*<<< orphan*/ system(char *);
int main() {
  menu();
  system("pause");
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <menu@plt>
lea    0xed1(%rip),%rdi
call   1040 <system@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [6 x i8] c"pause\00"
define i32 @main() {
%1 = tail call i32 (...) @menu()
%2 = tail call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
scalar_t__ isspace(char);
char *str_skipwhite(char *ptr) {
  while (isspace(*ptr) && *ptr)
    ptr++;
  return (ptr);
}


x86 assembly (clang, -O0):
<str_skipwhite>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%edi
call   1030 <isspace@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    $0x0,%rcx
mov    %al,-0x9(%rbp)
je     114a <str_skipwhite+0x3a>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
setne  %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
test   $0x1,%al
jne    115a <str_skipwhite+0x4a>
jmp    116b <str_skipwhite+0x5b>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    111c <str_skipwhite+0xc>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<str_skipwhite>:
push   %rbx
mov    %rdi,%rbx
movsbl (%rdi),%edi
nopw   0x0(%rax,%rax,1)
call   1030 <isspace@plt>
test   %rax,%rax
je     1139 <str_skipwhite+0x29>
cmpb   $0x0,(%rbx)
je     1139 <str_skipwhite+0x29>
movsbl 0x1(%rbx),%edi
add    $0x1,%rbx
jmp    1120 <str_skipwhite+0x10>
mov    %rbx,%rax
pop    %rbx
ret

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

LLVM IR (-O2):
define i8* @str_skipwhite(i8* %0) {
%2 = load i8, i8* %0
%3 = tail call i64 @isspace(i8 signext %2)
%4 = icmp eq i64 %3, 0
br i1 %4, label %14, label %5
5: ; preds = %1, %9
%6 = phi i8* [ %10, %9 ], [ %0, %1 ]
%7 = load i8, i8* %6
%8 = icmp eq i8 %7, 0
br i1 %8, label %14, label %9
9: ; preds = %5
%10 = getelementptr inbounds i8, i8* %6, i64 1
%11 = load i8, i8* %10
%12 = tail call i64 @isspace(i8 signext %11)
%13 = icmp eq i64 %12, 0
br i1 %13, label %14, label %5
14: ; preds = %5, %9, %1
%15 = phi i8* [ %0, %1 ], [ %10, %9 ], [ %6, %5 ]
ret i8* %15
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int uint32_t;

/* Variables and functions */
int /*<<< orphan*/ mem_read_ram(int, void *);
uint8_t ps2_read_shadow_ram(uint32_t addr, void *priv) {
  addr = (addr & 0x1ffff) + 0xe0000;
  return mem_read_ram(addr, priv);
}


x86 assembly (clang, -O0):
<ps2_read_shadow_ram>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%eax
and    $0x1ffff,%eax
add    $0xe0000,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1030 <mem_read_ram@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ps2_read_shadow_ram>:
and    $0x1ffff,%edi
or     $0xe0000,%edi
jmp    1030 <mem_read_ram@plt>

LLVM IR (-O0):
define i32 @ps2_read_shadow_ram(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 = and i32 %5, 131071
%7 = add nsw i32 %6, 917504
store i32 %7, i32* %3
%8 = load i32, i32* %3
%9 = load i8*, i8** %4
%10 = call i32 @mem_read_ram(i32 %8, i8* %9)
ret i32 %10
}

LLVM IR (-O2):
define i32 @ps2_read_shadow_ram(i32 %0, i8* %1) {
%3 = and i32 %0, 131071
%4 = or i32 %3, 917504
%5 = tail call i32 @mem_read_ram(i32 %4, i8* %1)
ret i32 %5
}
/* Type definitions */
typedef int /*<<< orphan*/ int32_t;

/* Variables and functions */
int /*<<< orphan*/ memcpy(int /*<<< orphan*/ *, char *, int);
scalar_t__ udp_recv(char *, int);
int32_t udp_recv_int32() {
  static int32_t value = 0;
  char buffer[sizeof(int32_t)];
  while (udp_recv(buffer, sizeof(int32_t)) > 0) {
    memcpy(&value, buffer, sizeof(int32_t));
  }
  return value;
}


x86 assembly (clang, -O0):
<udp_recv_int32>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    -0x4(%rbp),%rdi
mov    $0x4,%esi
call   1040 <udp_recv@plt>
cmp    $0x0,%rax
jle    115a <udp_recv_int32+0x3a>
lea    -0x4(%rbp),%rsi
lea    0x2ee9(%rip),%rdi
mov    $0x4,%edx
call   1030 <memcpy@plt>
jmp    1128 <udp_recv_int32+0x8>
mov    0x2ed4(%rip),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<udp_recv_int32>:
push   %r14
push   %rbx
push   %rax
lea    0x4(%rsp),%rdi
mov    $0x4,%esi
call   1040 <udp_recv@plt>
test   %rax,%rax
jle    1172 <udp_recv_int32+0x52>
lea    0x2ef5(%rip),%r14
lea    0x4(%rsp),%rbx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %r14,%rdi
mov    %rbx,%rsi
mov    $0x4,%edx
call   1030 <memcpy@plt>
mov    %rbx,%rdi
mov    $0x4,%esi
call   1040 <udp_recv@plt>
test   %rax,%rax
jg     1150 <udp_recv_int32+0x30>
mov    0x2ebc(%rip),%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@udp_recv_int32.value = internal global i32 0
define i32 @udp_recv_int32() {
%1 = alloca [4 x i8]
br label %2
2: ; preds = %6, %0
%3 = getelementptr inbounds [4 x i8], [4 x i8]* %1, i64 0, i64 0
%4 = call i64 @udp_recv(i8* %3, i32 4)
%5 = icmp sgt i64 %4, 0
br i1 %5, label %6, label %9
6: ; preds = %2
%7 = getelementptr inbounds [4 x i8], [4 x i8]* %1, i64 0, i64 0
%8 = call i32 @memcpy(i32* @udp_recv_int32.value, i8* %7, i32 4)
br label %2
9: ; preds = %2
%10 = load i32, i32* @udp_recv_int32.value
ret i32 %10
}

LLVM IR (-O2):
@udp_recv_int32.value = internal global i32 0
define i32 @udp_recv_int32() {
%1 = alloca [4 x i8]
%2 = getelementptr inbounds [4 x i8], [4 x i8]* %1, i64 0, i64 0
%3 = call i64 @udp_recv(i8* %2, i32 4)
%4 = icmp sgt i64 %3, 0
br i1 %4, label %5, label %9
5: ; preds = %0, %5
%6 = call i32 @memcpy(i32* @udp_recv_int32.value, i8* %2, i32 4)
%7 = call i64 @udp_recv(i8* %2, i32 4)
%8 = icmp sgt i64 %7, 0
br i1 %8, label %5, label %9
9: ; preds = %5, %0
%10 = load i32, i32* @udp_recv_int32.value
ret i32 %10
}
void getPsyncInitialOffset(void) {
  _serverPanic("/scratch/repos/new/home/jordi_armengol_estape/c-scraper/"
               "outputs/2022-01-22/02-19-57/repos/CodisLabs/redis-port/refs/"
               "heads/redis-4.x-cgo/pkg/rdb/cgo_glue_meow.c",
               79, "Function '%s' is disabled.", __func__);
}


x86 assembly (clang, -O0):
<getPsyncInitialOffset>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
mov    $0x4f,%esi
lea    0xf79(%rip),%rdx
lea    0xf8d(%rip),%rcx
mov    $0x0,%al
call   1030 <_serverPanic@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<getPsyncInitialOffset>:
lea    0xee9(%rip),%rdi
lea    0xf82(%rip),%rdx
lea    0xf96(%rip),%rcx
mov    $0x4f,%esi
xor    %eax,%eax
jmp    1030 <_serverPanic@plt>

LLVM IR (-O0):
@.str = [160 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/CodisLabs/redis-port/refs/heads/redis-4.x-cgo/pkg/rdb/cgo_glue_meow.c\00"
@.str.1 = [27 x i8] c"Function '%s' is disabled.\00"
@__func__.getPsyncInitialOffset = [22 x i8] c"getPsyncInitialOffset\00"
define void @getPsyncInitialOffset() {
%1 = call i32 (i8*, i32, i8*, i8*, ...) bitcast (i32 (...)* @_serverPanic to i32 (i8*, i32, i8*, i8*, ...)*)(i8* getelementptr inbounds ([160 x i8], [160 x i8]* @.str, i64 0, i64 0), i32 79, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([22 x i8], [22 x i8]* @__func__.getPsyncInitialOffset, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [160 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/CodisLabs/redis-port/refs/heads/redis-4.x-cgo/pkg/rdb/cgo_glue_meow.c\00"
@.str.1 = [27 x i8] c"Function '%s' is disabled.\00"
@__func__.getPsyncInitialOffset = [22 x i8] c"getPsyncInitialOffset\00"
define void @getPsyncInitialOffset() {
%1 = tail call i32 (i8*, i32, i8*, i8*, ...) bitcast (i32 (...)* @_serverPanic to i32 (i8*, i32, i8*, i8*, ...)*)(i8* getelementptr inbounds ([160 x i8], [160 x i8]* @.str, i64 0, i64 0), i32 79, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([22 x i8], [22 x i8]* @__func__.getPsyncInitialOffset, i64 0, i64 0))
ret void
}