xunge/DecIR huggingface dataset:
/* Type definitions */
typedef char uint8_t;

/* Variables and functions */
char *pd9p_dec1(char *buf, uint8_t *val) {
  *val = buf[0];
  return buf + 1;
}


x86 assembly (clang, -O0):
<pd9p_dec1>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%cl
mov    -0x10(%rbp),%rax
mov    %cl,(%rax)
mov    -0x8(%rbp),%rax
add    $0x1,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<pd9p_dec1>:
mov    (%rdi),%al
mov    %al,(%rsi)
lea    0x1(%rdi),%rax
ret

LLVM IR (-O0):
define i8* @pd9p_dec1(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = getelementptr inbounds i8, i8* %5, i64 0
%7 = load i8, i8* %6
%8 = load i8*, i8** %4
store i8 %7, i8* %8
%9 = load i8*, i8** %3
%10 = getelementptr inbounds i8, i8* %9, i64 1
ret i8* %10
}

LLVM IR (-O2):
define i8* @pd9p_dec1(i8* %0, i8* nocapture writeonly %1) {
%3 = load i8, i8* %0
store i8 %3, i8* %1
%4 = getelementptr inbounds i8, i8* %0, i64 1
ret i8* %4
}
int oa_start_record(struct oarchive *oa, const char *tag) { return 0; }


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

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

LLVM IR (-O0):
%struct.oarchive = type opaque
define i32 @oa_start_record(%struct.oarchive* %0, i8* %1) {
%3 = alloca %struct.oarchive*
%4 = alloca i8*
store %struct.oarchive* %0, %struct.oarchive** %3
store i8* %1, i8** %4
ret i32 0
}

LLVM IR (-O2):
%struct.oarchive = type opaque
define i32 @oa_start_record(%struct.oarchive* nocapture readnone %0, i8* nocapture readnone %1) {
ret i32 0
}
char ComplementBaseAscii(char base) {
  if (base == 'A')
    return 'T';
  else if (base == 'C')
    return 'G';
  else if (base == 'T')
    return 'A';
  else if (base == 'G')
    return 'C';
  return 'N';
}


x86 assembly (clang, -O0):
<ComplementBaseAscii>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x2(%rbp)
movsbl -0x2(%rbp),%eax
cmp    $0x41,%eax
jne    1120 <ComplementBaseAscii+0x20>
movb   $0x54,-0x1(%rbp)
jmp    1175 <ComplementBaseAscii+0x75>
movsbl -0x2(%rbp),%eax
cmp    $0x43,%eax
jne    1136 <ComplementBaseAscii+0x36>
movb   $0x47,-0x1(%rbp)
jmp    1175 <ComplementBaseAscii+0x75>
movsbl -0x2(%rbp),%eax
cmp    $0x54,%eax
jne    114c <ComplementBaseAscii+0x4c>
movb   $0x41,-0x1(%rbp)
jmp    1175 <ComplementBaseAscii+0x75>
movsbl -0x2(%rbp),%eax
cmp    $0x47,%eax
jne    1162 <ComplementBaseAscii+0x62>
movb   $0x43,-0x1(%rbp)
jmp    1175 <ComplementBaseAscii+0x75>
jmp    1167 <ComplementBaseAscii+0x67>
jmp    116c <ComplementBaseAscii+0x6c>
jmp    1171 <ComplementBaseAscii+0x71>
movb   $0x4e,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ComplementBaseAscii>:
add    $0xbf,%dil
cmp    $0x13,%dil
ja     1123 <ComplementBaseAscii+0x23>
mov    $0x54,%al
movzbl %dil,%ecx
lea    0xee9(%rip),%rdx
movslq (%rdx,%rcx,4),%rcx
add    %rdx,%rcx
jmp    *%rcx
mov    $0x47,%al
ret
mov    $0x4e,%al
ret
mov    $0x43,%al
ret
mov    $0x41,%al
ret

LLVM IR (-O0):
define signext i8 @ComplementBaseAscii(i8 signext %0) {
%2 = alloca i8
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
%6 = icmp eq i32 %5, 65
br i1 %6, label %7, label %8
7: ; preds = %1
store i8 84, i8* %2
br label %27
8: ; preds = %1
%9 = load i8, i8* %3
%10 = sext i8 %9 to i32
%11 = icmp eq i32 %10, 67
br i1 %11, label %12, label %13
12: ; preds = %8
store i8 71, i8* %2
br label %27
13: ; preds = %8
%14 = load i8, i8* %3
%15 = sext i8 %14 to i32
%16 = icmp eq i32 %15, 84
br i1 %16, label %17, label %18
17: ; preds = %13
store i8 65, i8* %2
br label %27
18: ; preds = %13
%19 = load i8, i8* %3
%20 = sext i8 %19 to i32
%21 = icmp eq i32 %20, 71
br i1 %21, label %22, label %23
22: ; preds = %18
store i8 67, i8* %2
br label %27
23: ; preds = %18
br label %24
24: ; preds = %23
br label %25
25: ; preds = %24
br label %26
26: ; preds = %25
store i8 78, i8* %2
br label %27
27: ; preds = %26, %22, %17, %12, %7
%28 = load i8, i8* %2
ret i8 %28
}

LLVM IR (-O2):
define signext i8 @ComplementBaseAscii(i8 signext %0) {
switch i8 %0, label %5 [
i8 65, label %6
i8 67, label %2
i8 84, label %3
i8 71, label %4
]
2: ; preds = %1
br label %6
3: ; preds = %1
br label %6
4: ; preds = %1
br label %6
5: ; preds = %1
br label %6
6: ; preds = %1, %5, %4, %3, %2
%7 = phi i8 [ 71, %2 ], [ 65, %3 ], [ 67, %4 ], [ 78, %5 ], [ 84, %1 ]
ret i8 %7
}
/* Variables and functions */
double floor(double);
double round_toward_zero(double d) { return (d < 0.0) ? -floor(-d) : floor(d); }


x86 assembly (clang, -O0):
<round_toward_zero>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
xorps  %xmm0,%xmm0
ucomisd -0x8(%rbp),%xmm0
jbe    116d <round_toward_zero+0x5d>
movsd  -0x8(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
call   1030 <floor@plt>
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0x10(%rbp)
jmp    117c <round_toward_zero+0x6c>
movsd  -0x8(%rbp),%xmm0
call   1030 <floor@plt>
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<round_toward_zero>:
xorpd  %xmm1,%xmm1
ucomisd %xmm0,%xmm1
jbe    1132 <round_toward_zero+0x22>
push   %rax
xorpd  0xedd(%rip),%xmm0
call   1030 <floor@plt>
xorpd  0xed0(%rip),%xmm0
pop    %rax
ret
jmp    1030 <floor@plt>

LLVM IR (-O0):
define double @round_toward_zero(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fcmp olt double %3, 0.000000e+00
br i1 %4, label %5, label %10
5: ; preds = %1
%6 = load double, double* %2
%7 = fneg double %6
%8 = call double @llvm.floor.f64(double %7)
%9 = fneg double %8
br label %13
10: ; preds = %1
%11 = load double, double* %2
%12 = call double @llvm.floor.f64(double %11)
br label %13
13: ; preds = %10, %5
%14 = phi double [ %9, %5 ], [ %12, %10 ]
ret double %14
}

LLVM IR (-O2):
define double @round_toward_zero(double %0) {
%2 = fcmp olt double %0, 0.000000e+00
br i1 %2, label %3, label %7
3: ; preds = %1
%4 = fneg double %0
%5 = tail call double @llvm.floor.f64(double %4)
%6 = fneg double %5
br label %9
7: ; preds = %1
%8 = tail call double @llvm.floor.f64(double %0)
br label %9
9: ; preds = %7, %3
%10 = phi double [ %6, %3 ], [ %8, %7 ]
ret double %10
}
/* Variables and functions */
int /*<<< orphan*/ flagscreenrect();
int /*<<< orphan*/ pushNumber(int /*<<< orphan*/);
void basFlagScreenRect() { pushNumber(flagscreenrect()); }


x86 assembly (clang, -O0):
<basFlagScreenRect>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <flagscreenrect@plt>
mov    %eax,%edi
call   1040 <pushNumber@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<basFlagScreenRect>:
push   %rax
xor    %eax,%eax
call   1030 <flagscreenrect@plt>
mov    %eax,%edi
pop    %rax
jmp    1040 <pushNumber@plt>

LLVM IR (-O0):
define void @basFlagScreenRect() {
%1 = call i32 (...) @flagscreenrect()
%2 = call i32 @pushNumber(i32 %1)
ret void
}

LLVM IR (-O2):
define void @basFlagScreenRect() {
%1 = tail call i32 (...) @flagscreenrect()
%2 = tail call i32 @pushNumber(i32 %1)
ret void
}
/* Variables and functions */
int __VERIFIER_nondet_int();
int main() {
  int y;
  y = __VERIFIER_nondet_int();
  while (y >= 0) {
    y = y - 1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jl     1141 <main+0x31>
mov    -0x8(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1129 <main+0x19>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 (...) @__VERIFIER_nondet_int()
store i32 %3, i32* %2
br label %4
4: ; preds = %7, %0
%5 = load i32, i32* %2
%6 = icmp sge i32 %5, 0
br i1 %6, label %7, label %10
7: ; preds = %4
%8 = load i32, i32* %2
%9 = sub nsw i32 %8, 1
store i32 %9, i32* %2
br label %4
10: ; preds = %4
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @__VERIFIER_nondet_int()
ret i32 0
}
void __dpd_cpydeclet(char *str, const char *declet) {
  str[0] = declet[0];
  str[1] = declet[1];
  str[2] = declet[2];
}


x86 assembly (clang, -O0):
<__dpd_cpydeclet>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
mov    -0x10(%rbp),%rax
mov    0x1(%rax),%cl
mov    -0x8(%rbp),%rax
mov    %cl,0x1(%rax)
mov    -0x10(%rbp),%rax
mov    0x2(%rax),%cl
mov    -0x8(%rbp),%rax
mov    %cl,0x2(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<__dpd_cpydeclet>:
mov    (%rsi),%al
mov    %al,(%rdi)
mov    0x1(%rsi),%al
mov    %al,0x1(%rdi)
mov    0x2(%rsi),%al
mov    %al,0x2(%rdi)
ret

LLVM IR (-O0):
define void @__dpd_cpydeclet(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %4
%6 = getelementptr inbounds i8, i8* %5, i64 0
%7 = load i8, i8* %6
%8 = load i8*, i8** %3
%9 = getelementptr inbounds i8, i8* %8, i64 0
store i8 %7, i8* %9
%10 = load i8*, i8** %4
%11 = getelementptr inbounds i8, i8* %10, i64 1
%12 = load i8, i8* %11
%13 = load i8*, i8** %3
%14 = getelementptr inbounds i8, i8* %13, i64 1
store i8 %12, i8* %14
%15 = load i8*, i8** %4
%16 = getelementptr inbounds i8, i8* %15, i64 2
%17 = load i8, i8* %16
%18 = load i8*, i8** %3
%19 = getelementptr inbounds i8, i8* %18, i64 2
store i8 %17, i8* %19
ret void
}

LLVM IR (-O2):
define void @__dpd_cpydeclet(i8* nocapture writeonly %0, i8* nocapture %1) {
%3 = load i8, i8* %1
store i8 %3, i8* %0
%4 = getelementptr inbounds i8, i8* %1, i64 1
%5 = load i8, i8* %4
%6 = getelementptr inbounds i8, i8* %0, i64 1
store i8 %5, i8* %6
%7 = getelementptr inbounds i8, i8* %1, i64 2
%8 = load i8, i8* %7
%9 = getelementptr inbounds i8, i8* %0, i64 2
store i8 %8, i8* %9
ret void
}
/* Variables and functions */
int /*<<< orphan*/ for3_();
int /*<<< orphan*/ printf(char *);
void test03(void) {
  printf("\n");
  printf("TEST03:\n");
  printf("  Call a FORTRAN routine which calls a C routine.\n");
  printf("  The C routine returns character data of some sort.\n");
  for3_();
  return;
}


x86 assembly (clang, -O0):
<test03>:
push   %rbp
mov    %rsp,%rbp
lea    0xf0f(%rip),%rdi
call   1030 <printf@plt>
lea    0xec9(%rip),%rdi
call   1030 <printf@plt>
lea    0xec6(%rip),%rdi
call   1030 <printf@plt>
lea    0xeed(%rip),%rdi
call   1030 <printf@plt>
mov    $0x0,%al
call   1040 <for3_@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<test03>:
push   %rax
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xebe(%rip),%rdi
call   1040 <puts@plt>
lea    0xeba(%rip),%rdi
call   1040 <puts@plt>
lea    0xee0(%rip),%rdi
call   1040 <puts@plt>
xor    %eax,%eax
pop    %rcx
jmp    1050 <for3_@plt>

LLVM IR (-O0):
@.str = [2 x i8] c"\0A\00"
@.str.1 = [9 x i8] c"TEST03:\0A\00"
@.str.2 = [51 x i8] c" Call a FORTRAN routine which calls a C routine.\0A\00"
@.str.3 = [54 x i8] c" The C routine returns character data of some sort.\0A\00"
define void @test03() {
%1 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str.2, i64 0, i64 0))
%4 = call i32 @printf(i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str.3, i64 0, i64 0))
%5 = call i32 (...) @for3_()
ret void
}

LLVM IR (-O2):
@str = [8 x i8] c"TEST03:\00"
@str.4 = [50 x i8] c" Call a FORTRAN routine which calls a C routine.\00"
@str.5 = [53 x i8] c" The C routine returns character data of some sort.\00"
define void @test03() {
%1 = tail call i32 @putchar(i32 10)
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @str, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([50 x i8], [50 x i8]* @str.4, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([53 x i8], [53 x i8]* @str.5, i64 0, i64 0))
%5 = tail call i32 (...) @for3_()
ret void
}
/* Variables and functions */
scalar_t__ GetConstants();
int /*<<< orphan*/ GetTemp(float *);
int /*<<< orphan*/ printf(char *, float);
int main(int argc, char **argv) {
  if (GetConstants()) {
    return 2;
  }
  float fTemp;
  GetTemp(&fTemp);
  printf("Current Temp = %.1f\n", fTemp);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1040 <GetConstants@plt>
cmp    $0x0,%rax
je     1163 <main+0x33>
movl   $0x2,-0x4(%rbp)
jmp    117d <main+0x4d>
lea    -0x14(%rbp),%rdi
call   1050 <GetTemp@plt>
movss  -0x14(%rbp),%xmm0
lea    0xe88(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1040 <GetConstants@plt>
mov    %rax,%rcx
mov    $0x2,%eax
test   %rcx,%rcx
je     1147 <main+0x17>
pop    %rcx
ret
lea    0x4(%rsp),%rdi
call   1050 <GetTemp@plt>
movss  0x4(%rsp),%xmm0
lea    0xea2(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [21 x i8] c"Current Temp = %.1f\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca float
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = call i64 (...) @GetConstants()
%8 = icmp ne i64 %7, 0
br i1 %8, label %9, label %10
9: ; preds = %2
store i32 2, i32* %3
br label %14
10: ; preds = %2
%11 = call i32 @GetTemp(float* %6)
%12 = load float, float* %6
%13 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), float %12)
br label %14
14: ; preds = %10, %9
%15 = load i32, i32* %3
ret i32 %15
}

LLVM IR (-O2):
@.str = [21 x i8] c"Current Temp = %.1f\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca float
%4 = tail call i64 (...) @GetConstants()
%5 = icmp eq i64 %4, 0
br i1 %5, label %6, label %11
6: ; preds = %2
%7 = bitcast float* %3 to i8*
%8 = call i32 @GetTemp(float* %3)
%9 = load float, float* %3
%10 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), float %9)
br label %11
11: ; preds = %2, %6
%12 = phi i32 [ 0, %6 ], [ 2, %2 ]
ret i32 %12
}
/* Type definitions */
typedef float float_t;
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, float);
unsigned int _float(FILE *output) {
  float_t test;
  float teste;
  test = 1.2232132;
  teste = test;
  fprintf(output, "%f", teste);
  return 2;
}


x86 assembly (clang, -O0):
<_float>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movss  0xedc(%rip),%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0xc(%rbp),%xmm0
movss  %xmm0,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
movss  -0x10(%rbp),%xmm0
lea    0xec1(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x2,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_float>:
push   %rax
lea    0xeec(%rip),%rsi
movss  0xee0(%rip),%xmm0
call   1030 <fprintf@plt>
mov    $0x2,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%f\00"
define i32 @_float(i32* %0) {
%2 = alloca i32*
%3 = alloca float
%4 = alloca float
store i32* %0, i32** %2
store float 0x3FF3924800000000, float* %3
%5 = load float, float* %3
store float %5, float* %4
%6 = load i32*, i32** %2
%7 = load float, float* %4
%8 = call i32 @fprintf(i32* %6, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), float %7)
ret i32 2
}

LLVM IR (-O2):
@.str = [3 x i8] c"%f\00"
define i32 @_float(i32* nocapture %0) {
%2 = tail call i32 @fprintf(i32* %0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), float 0x3FF3924800000000)
ret i32 2
}
void set_clock_speed(void) {}


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

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

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

LLVM IR (-O2):
define void @set_clock_speed() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int main(int argc, char *argv[]) {
  if (argc < 3) {
    printf("Usage: stlm username password\n");
    return 0;
  }
  printf("%s %s\n", argv[1], argv[2]);
}


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)
cmpl   $0x3,-0x8(%rbp)
jge    114a <main+0x3a>
lea    0xec9(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x4(%rbp)
jmp    1168 <main+0x58>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rsi
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rdx
lea    0xebe(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
cmp    $0x2,%edi
jg     1134 <main+0x14>
lea    0xeda(%rip),%rdi
call   1030 <puts@plt>
jmp    114d <main+0x2d>
mov    0x8(%rsi),%rax
mov    0x10(%rsi),%rdx
lea    0xebd(%rip),%rdi
mov    %rax,%rsi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [31 x i8] c"Usage: stlm username password\0A\00"
@.str.1 = [7 x i8] c"%s %s\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 = load i32, i32* %4
%7 = icmp slt i32 %6, 3
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0))
store i32 0, i32* %3
br label %18
10: ; preds = %2
%11 = load i8**, i8*** %5
%12 = getelementptr inbounds i8*, i8** %11, i64 1
%13 = load i8*, i8** %12
%14 = load i8**, i8*** %5
%15 = getelementptr inbounds i8*, i8** %14, i64 2
%16 = load i8*, i8** %15
%17 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i8* %13, i8* %16)
br label %18
18: ; preds = %10, %8
%19 = load i32, i32* %3
ret i32 %19
}

LLVM IR (-O2):
@.str.1 = [7 x i8] c"%s %s\0A\00"
@str = [30 x i8] c"Usage: stlm username password\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp slt i32 %0, 3
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @str, i64 0, i64 0))
br label %12
6: ; preds = %2
%7 = getelementptr inbounds i8*, i8** %1, i64 1
%8 = load i8*, i8** %7
%9 = getelementptr inbounds i8*, i8** %1, i64 2
%10 = load i8*, i8** %9
%11 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i8* %8, i8* %10)
br label %12
12: ; preds = %6, %4
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ va_list;

/* Variables and functions */
long sys_set_tid_address(va_list ap) { return 0; }


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

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

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

LLVM IR (-O2):
define i64 @sys_set_tid_address(i32 %0) {
ret i64 0
}
int test_imm_F4int8_mem(signed char *val) {
  return ((*val) & (-0xF4 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_F4int8_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%edx
and    $0xffffff0c,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_F4int8_mem>:
movsbl (%rdi),%eax
test   $0xffffff0c,%eax
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_F4int8_mem(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
%6 = and i32 %5, -244
%7 = icmp ne i32 %6, 0
%8 = zext i1 %7 to i64
%9 = select i1 %7, i32 -20, i32 -40
ret i32 %9
}

LLVM IR (-O2):
define i32 @test_imm_F4int8_mem(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = sext i8 %2 to i32
%4 = and i32 %3, -244
%5 = icmp eq i32 %4, 0
%6 = select i1 %5, i32 -40, i32 -20
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isspace(int);
void t_isspace_0xfa() {
  Assert_real((isspace(250) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isspace.c",
              1255, ("isspace should be 0 for 0xfa"));
}


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

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

LLVM IR (-O0):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isspace.c\00"
@.str.1 = [29 x i8] c"isspace should be 0 for 0xfa\00"
define void @t_isspace_0xfa() {
%1 = call i64 @isspace(i32 250)
%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 1255, 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_isspace.c\00"
@.str.1 = [29 x i8] c"isspace should be 0 for 0xfa\00"
define void @t_isspace_0xfa() {
%1 = tail call i64 @isspace(i32 250)
%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 1255, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Type definitions */
struct object {
  int dummy;
};
struct function {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(struct function *);
void function_dispose(struct object *object) {
  struct function *function = (void *)object;
  free(function);
}


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

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

LLVM IR (-O0):
%struct.object = type { i32 }
%struct.function = type { i32 }
define void @function_dispose(%struct.object* %0) {
%2 = alloca %struct.object*
%3 = alloca %struct.function*
store %struct.object* %0, %struct.object** %2
%4 = load %struct.object*, %struct.object** %2
%5 = bitcast %struct.object* %4 to i8*
%6 = bitcast i8* %5 to %struct.function*
store %struct.function* %6, %struct.function** %3
%7 = load %struct.function*, %struct.function** %3
%8 = call i32 @free(%struct.function* %7)
ret void
}

LLVM IR (-O2):
%struct.object = type { i32 }
%struct.function = type { i32 }
define void @function_dispose(%struct.object* nocapture %0) {
%2 = bitcast %struct.object* %0 to %struct.function*
%3 = tail call i32 @free(%struct.function* %2)
ret void
}
/* Variables and functions */
char *find_dash(char *const str) {
  char *iter = str;
  for (char ch = *iter; ch != '\0'; ch = *(++iter)) {
    if (ch == '-') {
      return iter;
    }
  }
  return NULL;
}


x86 assembly (clang, -O0):
<find_dash>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    (%rax),%al
mov    %al,-0x19(%rbp)
movsbl -0x19(%rbp),%eax
cmp    $0x0,%eax
je     115f <find_dash+0x5f>
movsbl -0x19(%rbp),%eax
cmp    $0x2d,%eax
jne    1140 <find_dash+0x40>
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    1167 <find_dash+0x67>
jmp    1145 <find_dash+0x45>
mov    -0x18(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x18(%rbp)
mov    0x1(%rax),%al
mov    %al,-0x19(%rbp)
jmp    1119 <find_dash+0x19>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<find_dash>:
mov    %rdi,%rax
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
movzbl (%rax),%ecx
test   %cl,%cl
je     1122 <find_dash+0x22>
cmp    $0x2d,%cl
je     1122 <find_dash+0x22>
add    $0x1,%rax
jmp    1110 <find_dash+0x10>
xor    %edx,%edx
test   %cl,%cl
cmove  %rdx,%rax
ret

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

LLVM IR (-O2):
define i8* @find_dash(i8* %0) {
br label %2
2: ; preds = %5, %1
%3 = phi i8* [ %0, %1 ], [ %6, %5 ]
%4 = load i8, i8* %3
switch i8 %4, label %5 [
i8 45, label %7
i8 0, label %7
]
5: ; preds = %2
%6 = getelementptr inbounds i8, i8* %3, i64 1
br label %2
7: ; preds = %2, %2
%8 = icmp eq i8 %4, 0
%9 = select i1 %8, i8* null, i8* %3
ret i8* %9
}
const char *MOJOSHADER_changeset(void) { return "hg-1056:73c697a7e950"; }


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

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

LLVM IR (-O0):
@.str = [21 x i8] c"hg-1056:73c697a7e950\00"
define i8* @MOJOSHADER_changeset() {
ret i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [21 x i8] c"hg-1056:73c697a7e950\00"
define i8* @MOJOSHADER_changeset() {
ret i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0)
}
void XVendorRelease() {}


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

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

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

LLVM IR (-O2):
define void @XVendorRelease() {
ret void
}
int splatt_mutex_translate_id(int const id, int const num_locks,
                              int const pad_size) {
  return (id % num_locks) * pad_size;
}


x86 assembly (clang, -O0):
<splatt_mutex_translate_id>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%eax
cltd
idivl  -0x8(%rbp)
mov    %edx,%eax
imul   -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<splatt_mutex_translate_id>:
mov    %edx,%ecx
mov    %edi,%eax
cltd
idiv   %esi
imul   %edx,%ecx
mov    %ecx,%eax
ret

LLVM IR (-O0):
define i32 @splatt_mutex_translate_id(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i32, i32* %4
%8 = load i32, i32* %5
%9 = srem i32 %7, %8
%10 = load i32, i32* %6
%11 = mul nsw i32 %9, %10
ret i32 %11
}

LLVM IR (-O2):
define i32 @splatt_mutex_translate_id(i32 %0, i32 %1, i32 %2) {
%4 = srem i32 %0, %1
%5 = mul nsw i32 %4, %2
ret i32 %5
}
unsigned int scan_ushort(register const char *s, register unsigned short *u) {
  register unsigned int pos = 0;
  register unsigned short result = 0;
  register unsigned short c;
  while ((c = (unsigned short)(unsigned char)(s[pos] - '0')) < 10) {
    result = result * 10 + c;
    ++pos;
  }
  *u = result;
  return pos;
}


x86 assembly (clang, -O0):
<scan_ushort>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
movw   $0x0,-0x16(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x14(%rbp),%ecx
movsbl (%rax,%rcx,1),%eax
sub    $0x30,%eax
movzbl %al,%eax
mov    %ax,-0x18(%rbp)
movzwl %ax,%eax
cmp    $0xa,%eax
jge    1159 <scan_ushort+0x59>
movzwl -0x16(%rbp),%eax
imul   $0xa,%eax,%eax
movzwl -0x18(%rbp),%ecx
add    %ecx,%eax
mov    %ax,-0x16(%rbp)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1119 <scan_ushort+0x19>
mov    -0x16(%rbp),%cx
mov    -0x10(%rbp),%rax
mov    %cx,(%rax)
mov    -0x14(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<scan_ushort>:
mov    (%rdi),%dl
add    $0xd0,%dl
xor    %ecx,%ecx
mov    $0x0,%eax
cmp    $0x9,%dl
ja     1138 <scan_ushort+0x38>
xor    %eax,%eax
xor    %ecx,%ecx
cs nopw 0x0(%rax,%rax,1)
nop
movzbl %dl,%edx
lea    (%rcx,%rcx,4),%ecx
lea    (%rdx,%rcx,2),%ecx
add    $0x1,%eax
movzbl (%rdi,%rax,1),%edx
add    $0xd0,%dl
cmp    $0xa,%dl
jb     1120 <scan_ushort+0x20>
mov    %cx,(%rsi)
ret

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

LLVM IR (-O2):
define i32 @scan_ushort(i8* nocapture %0, i16* nocapture writeonly %1) {
%3 = load i8, i8* %0
%4 = add i8 %3, -48
%5 = icmp ult i8 %4, 10
br i1 %5, label %6, label %19
6: ; preds = %2, %6
%7 = phi i8 [ %17, %6 ], [ %4, %2 ]
%8 = phi i32 [ %13, %6 ], [ 0, %2 ]
%9 = phi i16 [ %12, %6 ], [ 0, %2 ]
%10 = zext i8 %7 to i16
%11 = mul i16 %9, 10
%12 = add i16 %11, %10
%13 = add i32 %8, 1
%14 = zext i32 %13 to i64
%15 = getelementptr inbounds i8, i8* %0, i64 %14
%16 = load i8, i8* %15
%17 = add i8 %16, -48
%18 = icmp ult i8 %17, 10
br i1 %18, label %6, label %19
19: ; preds = %6, %2
%20 = phi i16 [ 0, %2 ], [ %12, %6 ]
%21 = phi i32 [ 0, %2 ], [ %13, %6 ]
store i16 %20, i16* %1
ret i32 %21
}
/* Variables and functions */
scalar_t__ isalpha(int);
scalar_t__ isascii(int);
int Cisalpha(int c) { return isascii(c) && isalpha(c); }


x86 assembly (clang, -O0):
<Cisalpha>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1040 <isascii@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    $0x0,%rcx
mov    %al,-0x5(%rbp)
je     1157 <Cisalpha+0x37>
mov    -0x4(%rbp),%edi
call   1030 <isalpha@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Cisalpha>:
push   %rbx
mov    %edi,%ebx
call   1040 <isascii@plt>
test   %rax,%rax
je     1141 <Cisalpha+0x21>
mov    %ebx,%edi
call   1030 <isalpha@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
setne  %al
pop    %rbx
ret
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @Cisalpha(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i64 @isascii(i32 %3)
%5 = icmp ne i64 %4, 0
br i1 %5, label %6, label %10
6: ; preds = %1
%7 = load i32, i32* %2
%8 = call i64 @isalpha(i32 %7)
%9 = icmp ne i64 %8, 0
br label %10
10: ; preds = %6, %1
%11 = phi i1 [ false, %1 ], [ %9, %6 ]
%12 = zext i1 %11 to i32
ret i32 %12
}

LLVM IR (-O2):
define i32 @Cisalpha(i32 %0) {
%2 = tail call i64 @isascii(i32 %0)
%3 = icmp eq i64 %2, 0
br i1 %3, label %8, label %4
4: ; preds = %1
%5 = tail call i64 @isalpha(i32 %0)
%6 = icmp ne i64 %5, 0
%7 = zext i1 %6 to i32
br label %8
8: ; preds = %4, %1
%9 = phi i32 [ 0, %1 ], [ %7, %4 ]
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ test_parser_sourcefile(char *, char *);
int /*<<< orphan*/ test_parser_verify_parse(int /*<<< orphan*/, char *, char *,
                                            char *, int /*<<< orphan*/);
void test_glsl_comments() {
  test_parser_verify_parse(test_parser_sourcefile("glsl", " //comment"), "glsl",
                           "", "//comment", 0);
}


x86 assembly (clang, -O0):
<test_glsl_comments>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
lea    0xed3(%rip),%rsi
call   1030 <test_parser_sourcefile@plt>
mov    %eax,%edi
lea    0xec0(%rip),%rsi
lea    0xebd(%rip),%rdx
lea    0xeb8(%rip),%rcx
xor    %r8d,%r8d
call   1040 <test_parser_verify_parse@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_glsl_comments>:
push   %rbx
lea    0xed8(%rip),%rbx
lea    0xed6(%rip),%rsi
mov    %rbx,%rdi
call   1030 <test_parser_sourcefile@plt>
lea    0xec6(%rip),%rdx
lea    0xec1(%rip),%rcx
mov    %eax,%edi
mov    %rbx,%rsi
xor    %r8d,%r8d
pop    %rbx
jmp    1040 <test_parser_verify_parse@plt>

LLVM IR (-O0):
@.str = [5 x i8] c"glsl\00"
@.str.1 = [11 x i8] c" //comment\00"
@.str.2 = [1 x i8] zeroinitializer
@.str.3 = [10 x i8] c"//comment\00"
define void @test_glsl_comments() {
%1 = call i32 @test_parser_sourcefile(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0))
%2 = call i32 @test_parser_verify_parse(i32 %1, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.3, i64 0, i64 0), i32 0)
ret void
}

LLVM IR (-O2):
@.str = [5 x i8] c"glsl\00"
@.str.1 = [11 x i8] c" //comment\00"
@.str.2 = [1 x i8] zeroinitializer
@.str.3 = [10 x i8] c"//comment\00"
define void @test_glsl_comments() {
%1 = tail call i32 @test_parser_sourcefile(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0))
%2 = tail call i32 @test_parser_verify_parse(i32 %1, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.3, i64 0, i64 0), i32 0)
ret void
}
/* Type definitions */
struct i2c_client {
  int dummy;
};

/* Variables and functions */
int i2c_detach_client(struct i2c_client *);
int /*<<< orphan*/ kfree(struct i2c_client *);
int detach(struct i2c_client *client) {
  int ret = i2c_detach_client(client);
  kfree(client);
  return ret;
}


x86 assembly (clang, -O0):
<detach>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <i2c_detach_client@plt>
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <kfree@plt>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<detach>:
push   %rbp
push   %rbx
push   %rax
mov    %rdi,%rbx
call   1040 <i2c_detach_client@plt>
mov    %eax,%ebp
mov    %rbx,%rdi
call   1030 <kfree@plt>
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
%struct.i2c_client = type { i32 }
define i32 @detach(%struct.i2c_client* %0) {
%2 = alloca %struct.i2c_client*
%3 = alloca i32
store %struct.i2c_client* %0, %struct.i2c_client** %2
%4 = load %struct.i2c_client*, %struct.i2c_client** %2
%5 = call i32 @i2c_detach_client(%struct.i2c_client* %4)
store i32 %5, i32* %3
%6 = load %struct.i2c_client*, %struct.i2c_client** %2
%7 = call i32 @kfree(%struct.i2c_client* %6)
%8 = load i32, i32* %3
ret i32 %8
}

LLVM IR (-O2):
%struct.i2c_client = type { i32 }
define i32 @detach(%struct.i2c_client* %0) {
%2 = tail call i32 @i2c_detach_client(%struct.i2c_client* %0)
%3 = tail call i32 @kfree(%struct.i2c_client* %0)
ret i32 %2
}
int get_salt_size(void) { return 8; }


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

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

LLVM IR (-O0):
define i32 @get_salt_size() {
ret i32 8
}

LLVM IR (-O2):
define i32 @get_salt_size() {
ret i32 8
}
int bcd2dec(unsigned char buf) {
  return (((buf & 0xf0) >> 4) * 10) + (buf & 0x0f);
}


x86 assembly (clang, -O0):
<bcd2dec>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%eax
and    $0xf0,%eax
sar    $0x4,%eax
imul   $0xa,%eax,%eax
movzbl -0x1(%rbp),%ecx
and    $0xf,%ecx
add    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<bcd2dec>:
mov    %edi,%eax
shr    $0x4,%eax
lea    (%rax,%rax,4),%eax
and    $0xf,%edi
lea    (%rdi,%rax,2),%eax
ret

LLVM IR (-O0):
define i32 @bcd2dec(i8 zeroext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = zext i8 %3 to i32
%5 = and i32 %4, 240
%6 = ashr i32 %5, 4
%7 = mul nsw i32 %6, 10
%8 = load i8, i8* %2
%9 = zext i8 %8 to i32
%10 = and i32 %9, 15
%11 = add nsw i32 %7, %10
ret i32 %11
}

LLVM IR (-O2):
define i32 @bcd2dec(i8 zeroext %0) {
%2 = zext i8 %0 to i32
%3 = lshr i32 %2, 4
%4 = mul nuw nsw i32 %3, 10
%5 = and i32 %2, 15
%6 = add nuw nsw i32 %4, %5
ret i32 %6
}
char *strcpy(char *destination, const char *source) {
  while (*source) {
    *(destination++) = *(source++);
  }
  return destination;
}


x86 assembly (clang, -O0):
<strcpy>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
cmpb   $0x0,(%rax)
je     1140 <strcpy+0x40>
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
mov    (%rax),%cl
mov    -0x8(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x8(%rbp)
mov    %cl,(%rax)
jmp    110c <strcpy+0xc>
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strcpy>:
mov    %rdi,%rax
mov    (%rsi),%cl
test   %cl,%cl
je     1121 <strcpy+0x21>
add    $0x1,%rsi
nopl   (%rax)
mov    %cl,(%rax)
add    $0x1,%rax
movzbl (%rsi),%ecx
add    $0x1,%rsi
test   %cl,%cl
jne    1110 <strcpy+0x10>
ret

LLVM IR (-O0):
define i8* @strcpy(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 = %9, %2
%6 = load i8*, i8** %4
%7 = load i8, i8* %6
%8 = icmp ne i8 %7, 0
br i1 %8, label %9, label %15
9: ; preds = %5
%10 = load i8*, i8** %4
%11 = getelementptr inbounds i8, i8* %10, i32 1
store i8* %11, i8** %4
%12 = load i8, i8* %10
%13 = load i8*, i8** %3
%14 = getelementptr inbounds i8, i8* %13, i32 1
store i8* %14, i8** %3
store i8 %12, i8* %13
br label %5
15: ; preds = %5
%16 = load i8*, i8** %3
ret i8* %16
}

LLVM IR (-O2):
define i8* @strcpy(i8* writeonly %0, i8* nocapture %1) {
%3 = load i8, i8* %1
%4 = icmp eq i8 %3, 0
br i1 %4, label %13, label %5
5: ; preds = %2, %5
%6 = phi i8 [ %11, %5 ], [ %3, %2 ]
%7 = phi i8* [ %9, %5 ], [ %1, %2 ]
%8 = phi i8* [ %10, %5 ], [ %0, %2 ]
%9 = getelementptr inbounds i8, i8* %7, i64 1
%10 = getelementptr inbounds i8, i8* %8, i64 1
store i8 %6, i8* %8
%11 = load i8, i8* %9
%12 = icmp eq i8 %11, 0
br i1 %12, label %13, label %5
13: ; preds = %5, %2
%14 = phi i8* [ %0, %2 ], [ %10, %5 ]
ret i8* %14
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ islower(int);
void t_islower_0x7d() {
  Assert_real((islower(125) == 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",
              630, ("islower should be 0 for }"));
}


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

x86 assembly (clang, -O2):
<t_islower_0x7d>:
push   %rax
mov    $0x7d,%edi
call   1030 <islower@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x276,%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_0x7d() {
%1 = call i64 @islower(i32 125)
%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 630, 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_0x7d() {
%1 = tail call i64 @islower(i32 125)
%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 630, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
int task3_valid_input(int guessed) {
  int valid_input = 1;
  if ((guessed > 100) || (guessed < -100)) {
    valid_input = 0;
  }
  return valid_input;
}


x86 assembly (clang, -O0):
<task3_valid_input>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
cmpl   $0x64,-0x4(%rbp)
jg     1122 <task3_valid_input+0x22>
cmpl   $0xffffff9c,-0x4(%rbp)
jge    1129 <task3_valid_input+0x29>
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<task3_valid_input>:
add    $0x64,%edi
xor    %eax,%eax
cmp    $0xc9,%edi
setb   %al
ret

LLVM IR (-O0):
define i32 @task3_valid_input(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
store i32 1, i32* %3
%4 = load i32, i32* %2
%5 = icmp sgt i32 %4, 100
br i1 %5, label %9, label %6
6: ; preds = %1
%7 = load i32, i32* %2
%8 = icmp slt i32 %7, -100
br i1 %8, label %9, label %10
9: ; preds = %6, %1
store i32 0, i32* %3
br label %10
10: ; preds = %9, %6
%11 = load i32, i32* %3
ret i32 %11
}

LLVM IR (-O2):
define i32 @task3_valid_input(i32 %0) {
%2 = add i32 %0, 100
%3 = icmp ult i32 %2, 201
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ uint64_t;

/* Variables and functions */
int /*<<< orphan*/ clp2(int /*<<< orphan*/);
int ilog2(int /*<<< orphan*/);
int ceiling_log2(uint64_t x) { return ilog2(clp2(x)); }


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

x86 assembly (clang, -O2):
<ceiling_log2>:
push   %rax
call   1040 <clp2@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <ilog2@plt>

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

LLVM IR (-O2):
define i32 @ceiling_log2(i32 %0) {
%2 = tail call i32 @clp2(i32 %0)
%3 = tail call i32 @ilog2(i32 %2)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ brc2(int, int, char);
void dectst(int pn) { brc2(2, pn, 'y'); }


x86 assembly (clang, -O0):
<dectst>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%esi
mov    $0x2,%edi
mov    $0x79,%edx
call   1030 <brc2@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dectst>:
mov    %edi,%esi
mov    $0x2,%edi
mov    $0x79,%edx
jmp    1030 <brc2@plt>

LLVM IR (-O0):
define void @dectst(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @brc2(i32 2, i32 %3, i8 signext 121)
ret void
}

LLVM IR (-O2):
define void @dectst(i32 %0) {
%2 = tail call i32 @brc2(i32 2, i32 %0, i8 signext 121)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void test_c() { printf("this is in test_c...\n"); }


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

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

LLVM IR (-O0):
@.str = [22 x i8] c"this is in test_c...\0A\00"
define void @test_c() {
%1 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [21 x i8] c"this is in test_c...\00"
define void @test_c() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @str, i64 0, i64 0))
ret void
}
void __assert2(const char *file, int line, const char *func,
               const char *failedexpr) {}


x86 assembly (clang, -O0):
<__assert2>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @__assert2(i8* %0, i32 %1, i8* %2, i8* %3) {
%5 = alloca i8*
%6 = alloca i32
%7 = alloca i8*
%8 = alloca i8*
store i8* %0, i8** %5
store i32 %1, i32* %6
store i8* %2, i8** %7
store i8* %3, i8** %8
ret void
}

LLVM IR (-O2):
define void @__assert2(i8* nocapture %0, i32 %1, i8* nocapture %2, i8* nocapture %3) {
ret void
}
void exram_init(void) {}


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

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

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

LLVM IR (-O2):
define void @exram_init() {
ret void
}
void hdrive1() {}


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

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

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

LLVM IR (-O2):
define void @hdrive1() {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ mode_t;
typedef int dev_t;

/* Variables and functions */
int syscall(int, int, char const *, int /*<<< orphan*/, int);
int mknodat(int fd, const char *path, mode_t mode, dev_t dev) {
  return syscall(324, fd, path, mode, dev & 0xffff);
}


x86 assembly (clang, -O0):
<mknodat>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %ecx,-0x18(%rbp)
mov    -0x4(%rbp),%esi
mov    -0x10(%rbp),%rdx
mov    -0x14(%rbp),%ecx
mov    -0x18(%rbp),%r8d
and    $0xffff,%r8d
mov    $0x144,%edi
call   1030 <syscall@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mknodat>:
mov    %edx,%eax
mov    %rsi,%rdx
mov    %edi,%esi
movzwl %cx,%r8d
mov    $0x144,%edi
mov    %eax,%ecx
jmp    1030 <syscall@plt>

LLVM IR (-O0):
define i32 @mknodat(i32 %0, i8* %1, i32 %2, i32 %3) {
%5 = alloca i32
%6 = alloca i8*
%7 = alloca i32
%8 = alloca i32
store i32 %0, i32* %5
store i8* %1, i8** %6
store i32 %2, i32* %7
store i32 %3, i32* %8
%9 = load i32, i32* %5
%10 = load i8*, i8** %6
%11 = load i32, i32* %7
%12 = load i32, i32* %8
%13 = and i32 %12, 65535
%14 = call i32 @syscall(i32 324, i32 %9, i8* %10, i32 %11, i32 %13)
ret i32 %14
}

LLVM IR (-O2):
define i32 @mknodat(i32 %0, i8* %1, i32 %2, i32 %3) {
%5 = and i32 %3, 65535
%6 = tail call i32 @syscall(i32 324, i32 %0, i8* %1, i32 %2, i32 %5)
ret i32 %6
}