xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ GL_QUADS;
int /*<<< orphan*/ glBegin(int /*<<< orphan*/);
int /*<<< orphan*/ glColor3f(int, int, int);
int /*<<< orphan*/ glEnd();
int /*<<< orphan*/ glVertex2f(int, int);
void DrawAQuad() {
  glBegin(GL_QUADS);
  glColor3f(0., 0., 0.);
  glVertex2f(0.0, 0.);
  glVertex2f(1., 0.);
  glVertex2f(1., 1.);
  glVertex2f(0., 1.);
  glEnd();
}


x86 assembly (clang, -O0):
<DrawAQuad>:
push   %rbp
mov    %rsp,%rbp
mov    0x2e9d(%rip),%rax
mov    (%rax),%edi
call   1060 <glBegin@plt>
xor    %edx,%edx
mov    %edx,%edi
mov    %edx,%esi
call   1040 <glColor3f@plt>
xor    %esi,%esi
mov    %esi,%edi
call   1050 <glVertex2f@plt>
mov    $0x1,%edi
xor    %esi,%esi
call   1050 <glVertex2f@plt>
mov    $0x1,%esi
mov    %esi,%edi
call   1050 <glVertex2f@plt>
xor    %edi,%edi
mov    $0x1,%esi
call   1050 <glVertex2f@plt>
mov    $0x0,%al
call   1030 <glEnd@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<DrawAQuad>:
push   %rax
mov    0x2ea0(%rip),%rax
mov    (%rax),%edi
call   1060 <glBegin@plt>
xor    %edi,%edi
xor    %esi,%esi
xor    %edx,%edx
call   1040 <glColor3f@plt>
xor    %edi,%edi
xor    %esi,%esi
call   1050 <glVertex2f@plt>
mov    $0x1,%edi
xor    %esi,%esi
call   1050 <glVertex2f@plt>
mov    $0x1,%edi
mov    $0x1,%esi
call   1050 <glVertex2f@plt>
xor    %edi,%edi
mov    $0x1,%esi
call   1050 <glVertex2f@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <glEnd@plt>

LLVM IR (-O0):
@GL_QUADS = global i32 0
define void @DrawAQuad() {
%1 = load i32, i32* @GL_QUADS
%2 = call i32 @glBegin(i32 %1)
%3 = call i32 @glColor3f(i32 0, i32 0, i32 0)
%4 = call i32 @glVertex2f(i32 0, i32 0)
%5 = call i32 @glVertex2f(i32 1, i32 0)
%6 = call i32 @glVertex2f(i32 1, i32 1)
%7 = call i32 @glVertex2f(i32 0, i32 1)
%8 = call i32 (...) @glEnd()
ret void
}

LLVM IR (-O2):
@GL_QUADS = global i32 0
define void @DrawAQuad() {
%1 = load i32, i32* @GL_QUADS
%2 = tail call i32 @glBegin(i32 %1)
%3 = tail call i32 @glColor3f(i32 0, i32 0, i32 0)
%4 = tail call i32 @glVertex2f(i32 0, i32 0)
%5 = tail call i32 @glVertex2f(i32 1, i32 0)
%6 = tail call i32 @glVertex2f(i32 1, i32 1)
%7 = tail call i32 @glVertex2f(i32 0, i32 1)
%8 = tail call i32 (...) @glEnd()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ srand(int /*<<< orphan*/);
int /*<<< orphan*/ time(int /*<<< orphan*/ *);
void pareto_init() { srand(time(NULL)); }


x86 assembly (clang, -O0):
<pareto_init>:
push   %rbp
mov    %rsp,%rbp
xor    %eax,%eax
mov    %eax,%edi
call   1040 <time@plt>
mov    %eax,%edi
call   1030 <srand@plt>
pop    %rbp
ret

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

LLVM IR (-O0):
define void @pareto_init() {
%1 = call i32 @time(i32* null)
%2 = call i32 @srand(i32 %1)
ret void
}

LLVM IR (-O2):
define void @pareto_init() {
%1 = tail call i32 @time(i32* null)
%2 = tail call i32 @srand(i32 %1)
ret void
}
int main() {
  int a = 5;
  int b = ((a > 5) ? ((a > 6) ? 100 : 10) : ((a == 5) ? 5 : -100));
  return b;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movl   $0x5,-0x8(%rbp)
cmpl   $0x5,-0x8(%rbp)
jle    1137 <main+0x37>
mov    -0x8(%rbp),%edx
mov    $0xa,%eax
mov    $0x64,%ecx
cmp    $0x6,%edx
cmovg  %ecx,%eax
mov    %eax,-0x10(%rbp)
jmp    114d <main+0x4d>
mov    -0x8(%rbp),%edx
mov    $0xffffff9c,%eax
mov    $0x5,%ecx
cmp    $0x5,%edx
cmove  %ecx,%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
store i32 5, i32* %2
%4 = load i32, i32* %2
%5 = icmp sgt i32 %4, 5
br i1 %5, label %6, label %11
6: ; preds = %0
%7 = load i32, i32* %2
%8 = icmp sgt i32 %7, 6
%9 = zext i1 %8 to i64
%10 = select i1 %8, i32 100, i32 10
br label %16
11: ; preds = %0
%12 = load i32, i32* %2
%13 = icmp eq i32 %12, 5
%14 = zext i1 %13 to i64
%15 = select i1 %13, i32 5, i32 -100
br label %16
16: ; preds = %11, %6
%17 = phi i32 [ %10, %6 ], [ %15, %11 ]
store i32 %17, i32* %3
%18 = load i32, i32* %3
ret i32 %18
}

LLVM IR (-O2):
define i32 @main() {
ret i32 5
}
/* Variables and functions */
int /*<<< orphan*/ opaque(int);
int /*<<< orphan*/ scanf(char *, char *);
int strlen(char *);
int main(int argc, char *argv[]) {
  char buf[32];
  int n;
  scanf("%s", buf);
  n = strlen(buf);
  opaque(n);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0x30(%rbp),%rsi
lea    0xeaf(%rip),%rdi
call   1050 <scanf@plt>
lea    -0x30(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,-0x34(%rbp)
mov    -0x34(%rbp),%edi
call   1040 <opaque@plt>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x20,%rsp
lea    0xec4(%rip),%rdi
mov    %rsp,%rbx
mov    %rbx,%rsi
call   1050 <scanf@plt>
mov    %rbx,%rdi
call   1030 <strlen@plt>
mov    %eax,%edi
call   1040 <opaque@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [32 x i8]
%4 = getelementptr inbounds [32 x i8], [32 x i8]* %3, i64 0, i64 0
%5 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = call i32 @strlen(i8* %4)
%7 = call i32 @opaque(i32 %6)
ret i32 0
}
void gtk_color_button_set_title() {}


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

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

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

LLVM IR (-O2):
define void @gtk_color_button_set_title() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ expanderWrite(int, char);
int /*<<< orphan*/ usleep(int);
void pulseEnable(int file, char value) {
  expanderWrite(file, value | 0x04);
  usleep(1);
  expanderWrite(file, value & ~0x04);
  usleep(50);
}


x86 assembly (clang, -O0):
<pulseEnable>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %sil,%al
mov    %edi,-0x4(%rbp)
mov    %al,-0x5(%rbp)
mov    -0x4(%rbp),%edi
movsbl -0x5(%rbp),%eax
or     $0x4,%eax
movsbl %al,%esi
call   1030 <expanderWrite@plt>
mov    $0x1,%edi
call   1040 <usleep@plt>
mov    -0x4(%rbp),%edi
movsbl -0x5(%rbp),%eax
and    $0xfffffffb,%eax
movsbl %al,%esi
call   1030 <expanderWrite@plt>
mov    $0x32,%edi
call   1040 <usleep@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pulseEnable>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
mov    %ebx,%eax
or     $0x4,%al
movsbl %al,%esi
call   1030 <expanderWrite@plt>
mov    $0x1,%edi
call   1040 <usleep@plt>
and    $0xfb,%bl
movsbl %bl,%esi
mov    %ebp,%edi
call   1030 <expanderWrite@plt>
mov    $0x32,%edi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1040 <usleep@plt>

LLVM IR (-O0):
define void @pulseEnable(i32 %0, i8 signext %1) {
%3 = alloca i32
%4 = alloca i8
store i32 %0, i32* %3
store i8 %1, i8* %4
%5 = load i32, i32* %3
%6 = load i8, i8* %4
%7 = sext i8 %6 to i32
%8 = or i32 %7, 4
%9 = trunc i32 %8 to i8
%10 = call i32 @expanderWrite(i32 %5, i8 signext %9)
%11 = call i32 @usleep(i32 1)
%12 = load i32, i32* %3
%13 = load i8, i8* %4
%14 = sext i8 %13 to i32
%15 = and i32 %14, -5
%16 = trunc i32 %15 to i8
%17 = call i32 @expanderWrite(i32 %12, i8 signext %16)
%18 = call i32 @usleep(i32 50)
ret void
}

LLVM IR (-O2):
define void @pulseEnable(i32 %0, i8 signext %1) {
%3 = or i8 %1, 4
%4 = tail call i32 @expanderWrite(i32 %0, i8 signext %3)
%5 = tail call i32 @usleep(i32 1)
%6 = and i8 %1, -5
%7 = tail call i32 @expanderWrite(i32 %0, i8 signext %6)
%8 = tail call i32 @usleep(i32 50)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int pa_x11_set_prop() {
  printf("NOT IMPLEMENTED:"
         "pa_x11_set_prop"
         "\n");
}


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

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

LLVM IR (-O0):
@.str = [33 x i8] c"NOT IMPLEMENTED:pa_x11_set_prop\0A\00"
define i32 @pa_x11_set_prop() {
%1 = alloca i32
%2 = call i32 @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
@str = [32 x i8] c"NOT IMPLEMENTED:pa_x11_set_prop\00"
define i32 @pa_x11_set_prop() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @str, i64 0, i64 0))
ret i32 undef
}
void av_image_get_linesize() {}


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

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

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

LLVM IR (-O2):
define void @av_image_get_linesize() {
ret void
}
void finish_test() {}


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

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

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

LLVM IR (-O2):
define void @finish_test() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main(int argc, char *argv[]) {
  int a = 0123;
  printf("___d___%d\n", a);
  printf("___o___%o\n", a);
  printf("___x___%x\n", a);
  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   $0x53,-0x14(%rbp)
mov    -0x14(%rbp),%esi
lea    0xec9(%rip),%rdi
call   1030 <printf@plt>
mov    -0x14(%rbp),%esi
lea    0xec5(%rip),%rdi
call   1030 <printf@plt>
mov    -0x14(%rbp),%esi
lea    0xec1(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [11 x i8] c"___d___%d\0A\00"
@.str.1 = [11 x i8] c"___o___%o\0A\00"
@.str.2 = [11 x i8] c"___x___%x\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 83, i32* %6
%7 = load i32, i32* %6
%8 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 %7)
%9 = load i32, i32* %6
%10 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i32 %9)
%11 = load i32, i32* %6
%12 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0), i32 %11)
ret i32 0
}

LLVM IR (-O2):
@.str = [11 x i8] c"___d___%d\0A\00"
@.str.1 = [11 x i8] c"___o___%o\0A\00"
@.str.2 = [11 x i8] c"___x___%x\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 83)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i32 83)
%5 = tail call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0), i32 83)
ret i32 0
}
trim(c) int c;
{ return (c & 0177); }


x86 assembly (clang, -O0):
<trim>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0x7f,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<trim>:
mov    %edi,%eax
and    $0x7f,%eax
ret

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

LLVM IR (-O2):
define i32 @trim(i32 %0) {
%2 = and i32 %0, 127
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
int isqrt(int);
void t_sqrt_5929() {
  Assert_real((isqrt(5929) == 77),
              "/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/stdlib/isqrt.c",
              1395, ("Integer square root of 5929 should be 77"));
}


x86 assembly (clang, -O0):
<t_sqrt_5929>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1729,%edi
call   1030 <isqrt@plt>
cmp    $0x4d,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xec0(%rip),%rsi
mov    $0x573,%edx
lea    0xf56(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_sqrt_5929>:
push   %rax
mov    $0x1729,%edi
call   1030 <isqrt@plt>
xor    %edi,%edi
cmp    $0x4d,%eax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf60(%rip),%rcx
mov    $0x573,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [162 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/stdlib/isqrt.c\00"
@.str.1 = [41 x i8] c"Integer square root of 5929 should be 77\00"
define void @t_sqrt_5929() {
%1 = call i32 @isqrt(i32 5929)
%2 = icmp eq i32 %1, 77
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([162 x i8], [162 x i8]* @.str, i64 0, i64 0), i32 1395, i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [162 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/stdlib/isqrt.c\00"
@.str.1 = [41 x i8] c"Integer square root of 5929 should be 77\00"
define void @t_sqrt_5929() {
%1 = tail call i32 @isqrt(i32 5929)
%2 = icmp eq i32 %1, 77
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([162 x i8], [162 x i8]* @.str, i64 0, i64 0), i32 1395, i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.1, i64 0, i64 0))
ret void
}
int compare_stats(const void *void1, const void *void2) {
  const unsigned long *stat1, *stat2;
  stat1 = void1;
  stat2 = void2;
  if (*stat1 < *stat2)
    return -1;
  else if (*stat1 > *stat2)
    return 1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<compare_stats>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x20(%rbp),%rax
mov    (%rax),%rax
mov    -0x28(%rbp),%rcx
cmp    (%rcx),%rax
jae    113c <compare_stats+0x3c>
movl   $0xffffffff,-0x4(%rbp)
jmp    1163 <compare_stats+0x63>
mov    -0x20(%rbp),%rax
mov    (%rax),%rax
mov    -0x28(%rbp),%rcx
cmp    (%rcx),%rax
jbe    115c <compare_stats+0x5c>
movl   $0x1,-0x4(%rbp)
jmp    1163 <compare_stats+0x63>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<compare_stats>:
mov    (%rdi),%rax
xor    %ecx,%ecx
cmp    (%rsi),%rax
seta   %cl
mov    $0xffffffff,%eax
cmovae %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @compare_stats(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i64*
%4 = bitcast i8* %1 to i64*
%5 = load i64, i64* %3
%6 = load i64, i64* %4
%7 = icmp ult i64 %5, %6
%8 = icmp ugt i64 %5, %6
%9 = zext i1 %8 to i32
%10 = select i1 %7, i32 -1, i32 %9
ret i32 %10
}
int test_imm_5Aint16_mem(short *val) {
  return ((*val) & (0x5A << 0)) ? -20 : -40;
}


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

x86 assembly (clang, -O2):
<test_imm_5Aint16_mem>:
testb  $0x5a,(%rdi)
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_5Aint16_mem(i16* %0) {
%2 = alloca i16*
store i16* %0, i16** %2
%3 = load i16*, i16** %2
%4 = load i16, i16* %3
%5 = sext i16 %4 to i32
%6 = and i32 %5, 90
%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_5Aint16_mem(i16* nocapture %0) {
%2 = load i16, i16* %0
%3 = and i16 %2, 90
%4 = icmp eq i16 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
void glShaderBinary(void) { return; }


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

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

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

LLVM IR (-O2):
define void @glShaderBinary() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ strrchr(char *, int);
void uninivar_strrchr(void) {
  char *str;
  int c;
  (void)strrchr(str, c);
}


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

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

LLVM IR (-O0):
define void @uninivar_strrchr() {
%1 = alloca i8*
%2 = alloca i32
%3 = load i8*, i8** %1
%4 = load i32, i32* %2
%5 = call i32 @strrchr(i8* %3, i32 %4)
ret void
}

LLVM IR (-O2):
define void @uninivar_strrchr() {
%1 = tail call i32 @strrchr(i8* undef, i32 undef)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ test(char *);
int aa(void) {
  char t[10];
  test(t);
}


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

x86 assembly (clang, -O2):
<aa>:
sub    $0x18,%rsp
lea    0xe(%rsp),%rdi
call   1030 <test@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
define i32 @aa() {
%1 = alloca i32
%2 = alloca [10 x i8]
%3 = getelementptr inbounds [10 x i8], [10 x i8]* %2, i64 0, i64 0
%4 = call i32 @test(i8* %3)
%5 = load i32, i32* %1
ret i32 %5
}

LLVM IR (-O2):
define i32 @aa() {
%1 = alloca [10 x i8]
%2 = getelementptr inbounds [10 x i8], [10 x i8]* %1, i64 0, i64 0
%3 = call i32 @test(i8* %2)
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, float, float, float);
int main(void) {
  float plank_length = 10.0f;
  float piece_count = 4.0f;
  float peice_length = 0.0f;
  peice_length = plank_length / piece_count;
  printf("A plank %.2f feet long can be cut into %.0f pieces %.2f feet long.",
         plank_length, piece_count, peice_length);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movss  0xedd(%rip),%xmm0
movss  %xmm0,-0x8(%rbp)
movss  0xecc(%rip),%xmm0
movss  %xmm0,-0xc(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0x10(%rbp)
movss  -0x8(%rbp),%xmm0
divss  -0xc(%rbp),%xmm0
movss  %xmm0,-0x10(%rbp)
movss  -0x8(%rbp),%xmm0
movss  -0xc(%rbp),%xmm1
movss  -0x10(%rbp),%xmm2
lea    0xea2(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xef4(%rip),%rdi
movss  0xee0(%rip),%xmm0
movss  0xedc(%rip),%xmm1
movss  0xed8(%rip),%xmm2
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [67 x i8] c"A plank %.2f feet long can be cut into %.0f pieces %.2f feet long.\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca float
%3 = alloca float
%4 = alloca float
store i32 0, i32* %1
store float 1.000000e+01, float* %2
store float 4.000000e+00, float* %3
store float 0.000000e+00, float* %4
%5 = load float, float* %2
%6 = load float, float* %3
%7 = fdiv float %5, %6
store float %7, float* %4
%8 = load float, float* %2
%9 = load float, float* %3
%10 = load float, float* %4
%11 = call i32 @printf(i8* getelementptr inbounds ([67 x i8], [67 x i8]* @.str, i64 0, i64 0), float %8, float %9, float %10)
ret i32 0
}

LLVM IR (-O2):
@.str = [67 x i8] c"A plank %.2f feet long can be cut into %.0f pieces %.2f feet long.\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([67 x i8], [67 x i8]* @.str, i64 0, i64 0), float 1.000000e+01, float 4.000000e+00, float 2.500000e+00)
ret i32 0
}
void Upper_Read(char *s) {
  static char letter[4] = {'A', 'C', 'G', 'T'};
  for (; *s != 4; s++)
    *s = letter[(int)*s];
  *s = '\0';
}


x86 assembly (clang, -O0):
<Upper_Read>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x4,%eax
je     1143 <Upper_Read+0x43>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
movslq %eax,%rcx
lea    0x2ef7(%rip),%rax
mov    (%rax,%rcx,1),%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1108 <Upper_Read+0x8>
mov    -0x8(%rbp),%rax
movb   $0x0,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<Upper_Read>:
mov    (%rdi),%al
cmp    $0x4,%al
je     1126 <Upper_Read+0x26>
lea    0xef3(%rip),%rcx
nopl   (%rax)
movsbq %al,%rax
movzbl (%rax,%rcx,1),%eax
mov    %al,(%rdi)
movzbl 0x1(%rdi),%eax
add    $0x1,%rdi
cmp    $0x4,%al
jne    1110 <Upper_Read+0x10>
movb   $0x0,(%rdi)
ret

LLVM IR (-O0):
@Upper_Read.letter = internal global [4 x i8] c"ACGT"
define void @Upper_Read(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
br label %3
3: ; preds = %16, %1
%4 = load i8*, i8** %2
%5 = load i8, i8* %4
%6 = sext i8 %5 to i32
%7 = icmp ne i32 %6, 4
br i1 %7, label %8, label %19
8: ; preds = %3
%9 = load i8*, i8** %2
%10 = load i8, i8* %9
%11 = sext i8 %10 to i32
%12 = sext i32 %11 to i64
%13 = getelementptr inbounds [4 x i8], [4 x i8]* @Upper_Read.letter, i64 0, i64 %12
%14 = load i8, i8* %13
%15 = load i8*, i8** %2
store i8 %14, i8* %15
br label %16
16: ; preds = %8
%17 = load i8*, i8** %2
%18 = getelementptr inbounds i8, i8* %17, i32 1
store i8* %18, i8** %2
br label %3
19: ; preds = %3
%20 = load i8*, i8** %2
store i8 0, i8* %20
ret void
}

LLVM IR (-O2):
@Upper_Read.letter = internal unnamed_addr constant [4 x i8] c"ACGT"
define void @Upper_Read(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 4
br i1 %3, label %13, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %11, %4 ], [ %2, %1 ]
%6 = phi i8* [ %10, %4 ], [ %0, %1 ]
%7 = sext i8 %5 to i64
%8 = getelementptr inbounds [4 x i8], [4 x i8]* @Upper_Read.letter, i64 0, i64 %7
%9 = load i8, i8* %8
store i8 %9, i8* %6
%10 = getelementptr inbounds i8, i8* %6, i64 1
%11 = load i8, i8* %10
%12 = icmp eq i8 %11, 4
br i1 %12, label %13, label %4
13: ; preds = %4, %1
%14 = phi i8* [ %0, %1 ], [ %10, %4 ]
store i8 0, i8* %14
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fatal(char *);
void *malloc(size_t);
void *safe_malloc(size_t size) {
  void *mymem;
  if ((int)size < 0)
    fatal("Tried to malloc negative amount of memory!!!");
  mymem = malloc(size);
  if (mymem == NULL)
    fatal("Malloc Failed! Probably out of space.");
  return mymem;
}


x86 assembly (clang, -O0):
<safe_malloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
cmp    $0x0,%eax
jge    1145 <safe_malloc+0x25>
lea    0xec0(%rip),%rdi
call   1040 <fatal@plt>
mov    -0x8(%rbp),%rdi
call   1030 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1169 <safe_malloc+0x49>
lea    0xec9(%rip),%rdi
call   1040 <fatal@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<safe_malloc>:
push   %rbx
mov    %rdi,%rbx
test   $0x80000000,%ebx
je     1138 <safe_malloc+0x18>
lea    0xecd(%rip),%rdi
call   1040 <fatal@plt>
mov    %rbx,%rdi
call   1030 <malloc@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    1154 <safe_malloc+0x34>
lea    0xede(%rip),%rdi
call   1040 <fatal@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [45 x i8] c"Tried to malloc negative amount of memory!!!\00"
@.str.1 = [38 x i8] c"Malloc Failed! Probably out of space.\00"
define i8* @safe_malloc(i64 %0) {
%2 = alloca i64
%3 = alloca i8*
store i64 %0, i64* %2
%4 = load i64, i64* %2
%5 = trunc i64 %4 to i32
%6 = icmp slt i32 %5, 0
br i1 %6, label %7, label %9
7: ; preds = %1
%8 = call i32 @fatal(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str, i64 0, i64 0))
br label %9
9: ; preds = %7, %1
%10 = load i64, i64* %2
%11 = call i8* @malloc(i64 %10)
store i8* %11, i8** %3
%12 = load i8*, i8** %3
%13 = icmp eq i8* %12, null
br i1 %13, label %14, label %16
14: ; preds = %9
%15 = call i32 @fatal(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.1, i64 0, i64 0))
br label %16
16: ; preds = %14, %9
%17 = load i8*, i8** %3
ret i8* %17
}

LLVM IR (-O2):
@.str = [45 x i8] c"Tried to malloc negative amount of memory!!!\00"
@.str.1 = [38 x i8] c"Malloc Failed! Probably out of space.\00"
define noalias i8* @safe_malloc(i64 %0) {
%2 = and i64 %0, 2147483648
%3 = icmp eq i64 %2, 0
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i32 @fatal(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str, i64 0, i64 0))
br label %6
6: ; preds = %4, %1
%7 = tail call i8* @malloc(i64 %0)
%8 = icmp eq i8* %7, null
br i1 %8, label %9, label %11
9: ; preds = %6
%10 = tail call i32 @fatal(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.1, i64 0, i64 0))
br label %11
11: ; preds = %9, %6
ret i8* %7
}
int main() {
  struct {
    int x, y;
  } a, b, c;
  a = b;
  b = c;
  c = a;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.anon = type { i32, i32 }
define i32 @main() {
%1 = alloca %struct.anon
%2 = alloca %struct.anon
%3 = alloca %struct.anon
%4 = bitcast %struct.anon* %1 to i8*
%5 = bitcast %struct.anon* %2 to i8*
%6 = bitcast %struct.anon* %2 to i8*
%7 = bitcast %struct.anon* %3 to i8*
%8 = bitcast %struct.anon* %3 to i8*
%9 = bitcast %struct.anon* %1 to i8*
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
/* Variables and functions */
int pigpio_command(int, int, unsigned int, int /*<<< orphan*/, int);
int file_close(int pi, unsigned handle) {
  return pigpio_command(pi, 105, handle, 0, 1);
}


x86 assembly (clang, -O0):
<file_close>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%edx
mov    $0x69,%esi
xor    %ecx,%ecx
mov    $0x1,%r8d
call   1030 <pigpio_command@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<file_close>:
mov    %esi,%edx
mov    $0x69,%esi
xor    %ecx,%ecx
mov    $0x1,%r8d
jmp    1030 <pigpio_command@plt>

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

LLVM IR (-O2):
define i32 @file_close(i32 %0, i32 %1) {
%3 = tail call i32 @pigpio_command(i32 %0, i32 105, i32 %1, i32 0, i32 1)
ret i32 %3
}
int openF(const char *fname, int flags, int mode) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @openF(i8* nocapture readnone %0, i32 %1, i32 %2) {
ret i32 0
}
/* Type definitions */
struct stat {
  int dummy;
};

/* Variables and functions */
int lstat(char *, struct stat *);
scalar_t__ stat(char *, struct stat *);
int xstat(char *f, struct stat *sb) {
  if (stat(f, sb) >= 0)
    return 0;
  return lstat(f, sb);
}


x86 assembly (clang, -O0):
<xstat>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1040 <stat@plt>
cmp    $0x0,%rax
jl     1153 <xstat+0x33>
movl   $0x0,-0x4(%rbp)
jmp    1163 <xstat+0x43>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1030 <lstat@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xstat>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
call   1040 <stat@plt>
test   %rax,%rax
js     113e <xstat+0x1e>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret
mov    %rbx,%rdi
mov    %r14,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <lstat@plt>

LLVM IR (-O0):
%struct.stat = type { i32 }
define i32 @xstat(i8* %0, %struct.stat* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca %struct.stat*
store i8* %0, i8** %4
store %struct.stat* %1, %struct.stat** %5
%6 = load i8*, i8** %4
%7 = load %struct.stat*, %struct.stat** %5
%8 = call i64 @stat(i8* %6, %struct.stat* %7)
%9 = icmp sge i64 %8, 0
br i1 %9, label %10, label %11
10: ; preds = %2
store i32 0, i32* %3
br label %15
11: ; preds = %2
%12 = load i8*, i8** %4
%13 = load %struct.stat*, %struct.stat** %5
%14 = call i32 @lstat(i8* %12, %struct.stat* %13)
store i32 %14, i32* %3
br label %15
15: ; preds = %11, %10
%16 = load i32, i32* %3
ret i32 %16
}

LLVM IR (-O2):
%struct.stat = type { i32 }
define i32 @xstat(i8* %0, %struct.stat* %1) {
%3 = tail call i64 @stat(i8* %0, %struct.stat* %1)
%4 = icmp sgt i64 %3, -1
br i1 %4, label %7, label %5
5: ; preds = %2
%6 = tail call i32 @lstat(i8* %0, %struct.stat* %1)
br label %7
7: ; preds = %2, %5
%8 = phi i32 [ %6, %5 ], [ 0, %2 ]
ret i32 %8
}
int XWidthMMOfScreen() {}


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

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

LLVM IR (-O0):
define i32 @XWidthMMOfScreen() {
%1 = alloca i32
%2 = load i32, i32* %1
ret i32 %2
}

LLVM IR (-O2):
define i32 @XWidthMMOfScreen() {
ret i32 undef
}
/* Variables and functions */
int m25p16_isReady();
bool flashfsIsReady(void) { return m25p16_isReady(); }


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

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

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

LLVM IR (-O2):
define i32 @flashfsIsReady() {
%1 = tail call i32 (...) @m25p16_isReady()
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int /*<<< orphan*/, char *, int, char *);
int /*<<< orphan*/ isascii(int);
void t_isascii_0x4a() {
  Assert_real((isascii(74)),
              "/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_isascii.c",
              375, ("isascii should be 1 for J"));
}


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

x86 assembly (clang, -O2):
<t_isascii_0x4a>:
lea    0xee9(%rip),%rsi
lea    0xf8a(%rip),%rcx
mov    $0x1,%edi
mov    $0x177,%edx
jmp    1030 <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_isascii.c\00"
@.str.1 = [26 x i8] c"isascii should be 1 for J\00"
define void @t_isascii_0x4a() {
%1 = call i32 @isascii(i32 74)
%2 = call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 375, 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_isascii.c\00"
@.str.1 = [26 x i8] c"isascii should be 1 for J\00"
define void @t_isascii_0x4a() {
%1 = tail call i32 @Assert_real(i32 1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 375, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
size_t minzu(size_t a, size_t b) { return (a <= b) ? a : b; }


x86 assembly (clang, -O0):
<minzu>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cmp    -0x10(%rbp),%rax
ja     1127 <minzu+0x27>
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
jmp    112f <minzu+0x2f>
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<minzu>:
mov    %rdi,%rax
cmp    %rsi,%rdi
cmova  %rsi,%rax
ret

LLVM IR (-O0):
define i64 @minzu(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %3
%6 = load i64, i64* %4
%7 = icmp ule i64 %5, %6
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = load i64, i64* %3
br label %12
10: ; preds = %2
%11 = load i64, i64* %4
br label %12
12: ; preds = %10, %8
%13 = phi i64 [ %9, %8 ], [ %11, %10 ]
ret i64 %13
}

LLVM IR (-O2):
define i64 @minzu(i64 %0, i64 %1) {
%3 = icmp ugt i64 %0, %1
%4 = select i1 %3, i64 %1, i64 %0
ret i64 %4
}
int foo(int a, int b, int c, int d) {
  int e;
  __asm__ volatile("mov %%ebx, %0 \n" : "=rm"(e));
  return printf("%d, %d, %d, %d, %d\n", a, b, c, d, e);
}


x86 assembly (clang, -O0):
<foo>:
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    %ebx,-0x14(%rbp)
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
mov    -0xc(%rbp),%ecx
mov    -0x10(%rbp),%r8d
mov    -0x14(%rbp),%r9d
lea    0xec1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo>:
push   %rax
mov    %ecx,%r8d
mov    %edx,%ecx
mov    %esi,%edx
mov    %edi,%esi
mov    %ebx,0x4(%rsp)
mov    0x4(%rsp),%r9d
lea    0xed6(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
pop    %rcx
ret

LLVM IR (-O0):
@.str = [20 x i8] c"%d, %d, %d, %d, %d\0A\00"
define i32 @foo(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* %5
%11 = load i32, i32* %6
%12 = load i32, i32* %7
%13 = load i32, i32* %8
%14 = load i32, i32* %9
%15 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i32 %10, i32 %11, i32 %12, i32 %13, i32 %14)
ret i32 %15
}

LLVM IR (-O2):
@.str = [20 x i8] c"%d, %d, %d, %d, %d\0A\00"
define i32 @foo(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca i32
%6 = bitcast i32* %5 to i8*
%7 = load i32, i32* %5
%8 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i32 %0, i32 %1, i32 %2, i32 %3, i32 %7)
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ fflush(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ stdout;
int second(void) {
  printf("I am a nested worker!\n");
  fflush(stdout);
  return 0;
}


x86 assembly (clang, -O0):
<second>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
mov    0x2ea9(%rip),%rax
mov    (%rax),%edi
call   1040 <fflush@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<second>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
mov    0x2eac(%rip),%rax
mov    (%rax),%edi
call   1040 <fflush@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [23 x i8] c"I am a nested worker!\0A\00"
@stdout = global i32 0
define i32 @second() {
%1 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
%2 = load i32, i32* @stdout
%3 = call i32 @fflush(i32 %2)
ret i32 0
}

LLVM IR (-O2):
@stdout = global i32 0
@str = [22 x i8] c"I am a nested worker!\00"
define i32 @second() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @str, i64 0, i64 0))
%2 = load i32, i32* @stdout
%3 = tail call i32 @fflush(i32 %2)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ int32_t;

/* Variables and functions */
int /*<<< orphan*/ htonl(int /*<<< orphan*/);
int /*<<< orphan*/ memcpy(char *, int /*<<< orphan*/ *, int);
void copy_int4(char **pointer, int32_t value) {
  value = htonl(value);
  memcpy(*pointer, &value, 4);
  *pointer += 4;
}


x86 assembly (clang, -O0):
<copy_int4>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%edi
call   1030 <htonl@plt>
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rdi
lea    -0xc(%rbp),%rsi
mov    $0x4,%edx
call   1040 <memcpy@plt>
mov    -0x8(%rbp),%rax
mov    (%rax),%rcx
add    $0x4,%rcx
mov    %rcx,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<copy_int4>:
push   %rbx
sub    $0x10,%rsp
mov    %rdi,%rbx
mov    %esi,%edi
call   1030 <htonl@plt>
mov    %eax,0xc(%rsp)
mov    (%rbx),%rdi
lea    0xc(%rsp),%rsi
mov    $0x4,%edx
call   1040 <memcpy@plt>
addq   $0x4,(%rbx)
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define void @copy_int4(i8** %0, i32 %1) {
%3 = alloca i8**
%4 = alloca i32
store i8** %0, i8*** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = call i32 @htonl(i32 %5)
store i32 %6, i32* %4
%7 = load i8**, i8*** %3
%8 = load i8*, i8** %7
%9 = call i32 @memcpy(i8* %8, i32* %4, i32 4)
%10 = load i8**, i8*** %3
%11 = load i8*, i8** %10
%12 = getelementptr inbounds i8, i8* %11, i64 4
store i8* %12, i8** %10
ret void
}

LLVM IR (-O2):
define void @copy_int4(i8** nocapture %0, i32 %1) {
%3 = alloca i32
%4 = tail call i32 @htonl(i32 %1)
store i32 %4, i32* %3
%5 = load i8*, i8** %0
%6 = call i32 @memcpy(i8* %5, i32* %3, i32 4)
%7 = load i8*, i8** %0
%8 = getelementptr inbounds i8, i8* %7, i64 4
store i8* %8, i8** %0
ret void
}
int do_747() { return 747; }


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

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

LLVM IR (-O0):
define i32 @do_747() {
ret i32 747
}

LLVM IR (-O2):
define i32 @do_747() {
ret i32 747
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(int argc, const char *argv[]) {
  printf("This is single printf\non multilines.");
  printf("Line two\n");
  printf("Line three\n");
  printf("Line four\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    0xed3(%rip),%rdi
call   1030 <printf@plt>
lea    0xeec(%rip),%rdi
call   1030 <printf@plt>
lea    0xeea(%rip),%rdi
call   1030 <printf@plt>
lea    0xeea(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
call   1040 <printf@plt>
lea    0xef1(%rip),%rdi
call   1030 <puts@plt>
lea    0xeee(%rip),%rdi
call   1030 <puts@plt>
lea    0xeed(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [37 x i8] c"This is single printf\0Aon multilines.\00"
@.str.1 = [10 x i8] c"Line two\0A\00"
@.str.2 = [12 x i8] c"Line three\0A\00"
@.str.3 = [11 x i8] c"Line four\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 ([37 x i8], [37 x i8]* @.str, i64 0, i64 0))
%7 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0))
%8 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.2, i64 0, i64 0))
%9 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.3, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [37 x i8] c"This is single printf\0Aon multilines.\00"
@str = [9 x i8] c"Line two\00"
@str.4 = [11 x i8] c"Line three\00"
@str.5 = [10 x i8] c"Line four\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @str, i64 0, i64 0))
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @str.4, i64 0, i64 0))
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @str.5, i64 0, i64 0))
ret i32 0
}
unsigned xrop3_245_1_0(unsigned char s, unsigned char t) {
  unsigned D = 0x00ff;
  unsigned S = ((unsigned)s << 8) | s;
  unsigned T = ((unsigned)t << 8) | t;
  unsigned stk1;
  unsigned stk2;
  stk2 = ~D;
  stk1 = T | stk2;
  return (stk1 & (~S)) | (D & S);
}


x86 assembly (clang, -O0):
<xrop3_245_1_0>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
movl   $0xff,-0x8(%rbp)
movzbl -0x1(%rbp),%eax
shl    $0x8,%eax
movzbl -0x1(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0xc(%rbp)
movzbl -0x2(%rbp),%eax
shl    $0x8,%eax
movzbl -0x2(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%eax
xor    $0xffffffff,%eax
mov    %eax,-0x18(%rbp)
mov    -0x10(%rbp),%eax
or     -0x18(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    -0xc(%rbp),%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
mov    -0x8(%rbp),%ecx
and    -0xc(%rbp),%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<xrop3_245_1_0>:
mov    %edi,%eax
shl    $0x8,%eax
or     %edi,%eax
lea    -0x100(%rsi),%ecx
not    %eax
and    %ecx,%eax
or     %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @xrop3_245_1_0(i8 zeroext %0, i8 zeroext %1) {
%3 = zext i8 %0 to i32
%4 = mul nuw nsw i32 %3, 257
%5 = zext i8 %1 to i32
%6 = or i32 %5, -256
%7 = xor i32 %4, -1
%8 = and i32 %6, %7
%9 = or i32 %8, %3
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ perror(char const *);
void error(const char *msg) {
  perror(msg);
  exit(-1);
}


x86 assembly (clang, -O0):
<error>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <perror@plt>
mov    $0xffffffff,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<error>:
push   %rax
call   1030 <perror@plt>
mov    $0xffffffff,%edi
call   1040 <exit@plt>

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

LLVM IR (-O2):
define void @error(i8* nocapture %0) {
%2 = tail call i32 @perror(i8* %0)
%3 = tail call i32 @exit(i32 -1)
unreachable
}
/* Variables and functions */
double floorl(double);
double floor(double x) { return floorl(x); }


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

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

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

LLVM IR (-O2):
define double @floor(double %0) {
%2 = tail call double @floorl(double %0)
ret double %2
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void default_free(void *ptr, void *user_data) {
  do {
    free(ptr);
    ptr = NULL;
  } while (0);
}


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

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

LLVM IR (-O0):
define void @default_free(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 = %2
%6 = load i8*, i8** %3
%7 = call i32 @free(i8* %6)
store i8* null, i8** %3
br label %8
8: ; preds = %5
ret void
}

LLVM IR (-O2):
define void @default_free(i8* nocapture %0, i8* nocapture readnone %1) {
%3 = tail call i32 @free(i8* %0)
ret void
}
void BN_bn2dec(void) {}


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

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

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

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