xunge/DecIR huggingface dataset:
/* Variables and functions */
scalar_t__ equal_enough_double(double, double);
int cmp_doubles_func(const void *p1, const void *p2) {
  double a = *((const double *)p1);
  double b = *((const double *)p2);
  if (equal_enough_double(a, b))
    return 0;
  return (a < b) ? -1 : 1;
}


x86 assembly (clang, -O0):
<cmp_doubles_func>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x20(%rbp)
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x20(%rbp),%xmm0
movsd  -0x28(%rbp),%xmm1
call   1030 <equal_enough_double@plt>
cmp    $0x0,%rax
je     115f <cmp_doubles_func+0x4f>
movl   $0x0,-0x4(%rbp)
jmp    117d <cmp_doubles_func+0x6d>
movsd  -0x20(%rbp),%xmm1
movsd  -0x28(%rbp),%xmm0
mov    $0x1,%eax
mov    $0xffffffff,%ecx
ucomisd %xmm1,%xmm0
cmova  %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cmp_doubles_func>:
sub    $0x18,%rsp
movsd  (%rdi),%xmm0
movsd  %xmm0,0x10(%rsp)
movsd  (%rsi),%xmm1
movsd  %xmm1,0x8(%rsp)
call   1030 <equal_enough_double@plt>
xor    %ecx,%ecx
movsd  0x8(%rsp),%xmm0
ucomisd 0x10(%rsp),%xmm0
setbe  %cl
xor    %edx,%edx
test   %rax,%rax
lea    -0x1(%rcx,%rcx,1),%eax
cmovne %edx,%eax
add    $0x18,%rsp
ret

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

LLVM IR (-O2):
define i32 @cmp_doubles_func(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to double*
%4 = load double, double* %3
%5 = bitcast i8* %1 to double*
%6 = load double, double* %5
%7 = tail call i64 @equal_enough_double(double %4, double %6)
%8 = icmp eq i64 %7, 0
%9 = fcmp olt double %4, %6
%10 = select i1 %9, i32 -1, i32 1
%11 = select i1 %8, i32 %10, i32 0
ret i32 %11
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isgraph(int);
void t_isgraph_0xd6() {
  Assert_real((isgraph(214) == 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_isgraph.c",
              1075, ("isgraph should be 0 for 0xd6"));
}


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

x86 assembly (clang, -O2):
<t_isgraph_0xd6>:
push   %rax
mov    $0xd6,%edi
call   1040 <isgraph@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x433,%edx
pop    %rax
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_isgraph.c\00"
@.str.1 = [29 x i8] c"isgraph should be 0 for 0xd6\00"
define void @t_isgraph_0xd6() {
%1 = call i64 @isgraph(i32 214)
%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 1075, 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_isgraph.c\00"
@.str.1 = [29 x i8] c"isgraph should be 0 for 0xd6\00"
define void @t_isgraph_0xd6() {
%1 = tail call i64 @isgraph(i32 214)
%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 1075, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int sockgetstatus(int);
int tcpgetstatus(int sock) { return sockgetstatus(sock); }


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

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

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

LLVM IR (-O2):
define i32 @tcpgetstatus(i32 %0) {
%2 = tail call i32 @sockgetstatus(i32 %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ preload_seq(int);
void main(void) { preload_seq(444); }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1bc,%edi
call   1030 <preload_seq@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
mov    $0x1bc,%edi
jmp    1030 <preload_seq@plt>

LLVM IR (-O0):
define void @main() {
%1 = call i32 @preload_seq(i32 444)
ret void
}

LLVM IR (-O2):
define void @main() {
%1 = tail call i32 @preload_seq(i32 444)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ enter(char *);
int nextsymbol();
int /*<<< orphan*/ out();
int /*<<< orphan*/ pE();
int /*<<< orphan*/ pa();
int /*<<< orphan*/ plp();
int /*<<< orphan*/ prp();
pF() {
  enter("pF");
  switch (nextsymbol()) {
  case '(': {
    plp();
    pE();
    prp();
    break;
  }
  case 'a': {
    pa();
  }
  }
  out();
}


x86 assembly (clang, -O0):
<pF>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xe81(%rip),%rdi
call   1050 <enter@plt>
xor    %eax,%eax
call   1030 <nextsymbol@plt>
mov    %eax,%ecx
mov    %ecx,-0x8(%rbp)
sub    $0x28,%eax
je     11af <pF+0x3f>
jmp    119e <pF+0x2e>
mov    -0x8(%rbp),%eax
sub    $0x61,%eax
je     11c9 <pF+0x59>
jmp    11d0 <pF+0x60>
mov    $0x0,%al
call   1060 <plp@plt>
mov    $0x0,%al
call   1070 <pE@plt>
mov    $0x0,%al
call   1040 <prp@plt>
jmp    11d0 <pF+0x60>
mov    $0x0,%al
call   1090 <pa@plt>
mov    $0x0,%al
call   1080 <out@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pF>:
push   %rax
lea    0xe88(%rip),%rdi
call   1050 <enter@plt>
xor    %eax,%eax
call   1030 <nextsymbol@plt>
cmp    $0x61,%eax
je     11a5 <pF+0x35>
cmp    $0x28,%eax
jne    11ac <pF+0x3c>
xor    %eax,%eax
call   1060 <plp@plt>
xor    %eax,%eax
call   1070 <pE@plt>
xor    %eax,%eax
call   1040 <prp@plt>
jmp    11ac <pF+0x3c>
xor    %eax,%eax
call   1090 <pa@plt>
xor    %eax,%eax
pop    %rcx
jmp    1080 <out@plt>

LLVM IR (-O0):
@.str = [3 x i8] c"pF\00"
define i32 @pF() {
%1 = alloca i32
%2 = call i32 @enter(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%3 = call i32 (...) @nextsymbol()
switch i32 %3, label %10 [
i32 40, label %4
i32 97, label %8
]
4: ; preds = %0
%5 = call i32 (...) @plp()
%6 = call i32 (...) @pE()
%7 = call i32 (...) @prp()
br label %10
8: ; preds = %0
%9 = call i32 (...) @pa()
br label %10
10: ; preds = %8, %0, %4
%11 = call i32 (...) @out()
%12 = load i32, i32* %1
ret i32 %12
}

LLVM IR (-O2):
@.str = [3 x i8] c"pF\00"
define i32 @pF() {
%1 = tail call i32 @enter(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 (...) @nextsymbol()
switch i32 %2, label %9 [
i32 40, label %3
i32 97, label %7
]
3: ; preds = %0
%4 = tail call i32 (...) @plp()
%5 = tail call i32 (...) @pE()
%6 = tail call i32 (...) @prp()
br label %9
7: ; preds = %0
%8 = tail call i32 (...) @pa()
br label %9
9: ; preds = %7, %0, %3
%10 = tail call i32 (...) @out()
ret i32 undef
}
unsigned long b_mem_release(unsigned long *mem, unsigned long nbr) {
  unsigned long tlong;
  asm volatile("call *0x00100058" : "=c"(tlong) : "a"(*(mem)), "c"(nbr));
  return tlong;
}


x86 assembly (clang, -O0):
<b_mem_release>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    -0x10(%rbp),%rcx
call   *0x100058
mov    %rcx,-0x18(%rbp)
mov    -0x18(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<b_mem_release>:
mov    %rsi,%rcx
mov    (%rdi),%rax
call   *0x100058
mov    %rcx,%rax
ret

LLVM IR (-O0):
define i64 @b_mem_release(i64* %0, i64 %1) {
%3 = alloca i64*
%4 = alloca i64
%5 = alloca i64
store i64* %0, i64** %3
store i64 %1, i64* %4
%6 = load i64*, i64** %3
%7 = load i64, i64* %6
%8 = load i64, i64* %4
%9 = call i64 asm sideeffect "call *0x00100058", "={cx},{ax},{cx},~{dirflag},~{fpsr},~{flags}"(i64 %7, i64 %8)
store i64 %9, i64* %5
%10 = load i64, i64* %5
ret i64 %10
}

LLVM IR (-O2):
define i64 @b_mem_release(i64* nocapture %0, i64 %1) {
%3 = load i64, i64* %0
%4 = tail call i64 asm sideeffect "call *0x00100058", "={cx},{ax},{cx},~{dirflag},~{fpsr},~{flags}"(i64 %3, i64 %1)
ret i64 %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(void) {
  printf("Welcome to C!\n");
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [15 x i8] c"Welcome to C!\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [14 x i8] c"Welcome to C!\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ clear(unsigned char);
int /*<<< orphan*/ nxtDisplayString(unsigned char, char *, char);
int /*<<< orphan*/ update(unsigned char);
void printf(char character, unsigned char line) {
  if (line >= 8)
    line = 8 - 1;
  clear(line);
  nxtDisplayString(line, "%c", character);
  update(line);
}


x86 assembly (clang, -O0):
<printf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
movzbl -0x2(%rbp),%eax
cmp    $0x8,%eax
jl     1155 <printf+0x25>
movb   $0x7,-0x2(%rbp)
movzbl -0x2(%rbp),%edi
call   1040 <clear@plt>
mov    -0x2(%rbp),%al
lea    0xe98(%rip),%rsi
movzbl %al,%edi
movsbl -0x1(%rbp),%edx
call   1050 <nxtDisplayString@plt>
movzbl -0x2(%rbp),%edi
call   1030 <update@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printf>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebx
cmp    $0x7,%sil
mov    $0x7,%ebp
cmovb  %esi,%ebp
mov    %ebp,%edi
call   1040 <clear@plt>
lea    0xeb1(%rip),%rsi
mov    %ebp,%edi
mov    %ebx,%edx
call   1050 <nxtDisplayString@plt>
mov    %ebp,%edi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <update@plt>

LLVM IR (-O0):
@.str = [3 x i8] c"%c\00"
define void @printf(i8 signext %0, i8 zeroext %1) {
%3 = alloca i8
%4 = alloca i8
store i8 %0, i8* %3
store i8 %1, i8* %4
%5 = load i8, i8* %4
%6 = zext i8 %5 to i32
%7 = icmp sge i32 %6, 8
br i1 %7, label %8, label %9
8: ; preds = %2
store i8 7, i8* %4
br label %9
9: ; preds = %8, %2
%10 = load i8, i8* %4
%11 = call i32 @clear(i8 zeroext %10)
%12 = load i8, i8* %4
%13 = load i8, i8* %3
%14 = call i32 @nxtDisplayString(i8 zeroext %12, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8 signext %13)
%15 = load i8, i8* %4
%16 = call i32 @update(i8 zeroext %15)
ret void
}

LLVM IR (-O2):
@.str = [3 x i8] c"%c\00"
define void @printf(i8 signext %0, i8 zeroext %1) {
%3 = icmp ult i8 %1, 7
%4 = select i1 %3, i8 %1, i8 7
%5 = tail call i32 @clear(i8 zeroext %4)
%6 = tail call i32 @nxtDisplayString(i8 zeroext %4, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8 signext %0)
%7 = tail call i32 @update(i8 zeroext %4)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Out_Ln();
void OPM_LogWLn(void) { Out_Ln(); }


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

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

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

LLVM IR (-O2):
define void @OPM_LogWLn() {
%1 = tail call i32 (...) @Out_Ln()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main() {
  int a, b;
  a = 5;
  b = 10;
  (a < b) ? printf("%d", a) : printf("%d", b);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x5,-0x8(%rbp)
movl   $0xa,-0xc(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    114d <main+0x3d>
mov    -0x8(%rbp),%esi
lea    0xebd(%rip),%rdi
call   1030 <printf@plt>
jmp    115c <main+0x4c>
mov    -0xc(%rbp),%esi
lea    0xea9(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 5)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ writefile(char const *, int *, int const *, char const *,
                             int *, int *);
void iwritefile(const char *filename, const int *m, const int *n, const int *A,
                const int *ldA, int *info) {
  int cm = *m * (int)(sizeof(int) / sizeof(char));
  int cldA = *ldA * (int)(sizeof(int) / sizeof(char));
  writefile(filename, &cm, n, (const char *)A, &cldA, info);
}


x86 assembly (clang, -O0):
<iwritefile>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
shl    $0x2,%eax
mov    %eax,-0x34(%rbp)
mov    -0x28(%rbp),%rax
mov    (%rax),%eax
shl    $0x2,%eax
mov    %eax,-0x38(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    -0x30(%rbp),%r9
lea    -0x34(%rbp),%rsi
lea    -0x38(%rbp),%r8
call   1030 <writefile@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<iwritefile>:
push   %rax
mov    (%rsi),%eax
shl    $0x2,%eax
mov    %eax,0x4(%rsp)
mov    (%r8),%eax
shl    $0x2,%eax
mov    %eax,(%rsp)
lea    0x4(%rsp),%rsi
mov    %rsp,%r8
call   1030 <writefile@plt>
pop    %rax
ret

LLVM IR (-O0):
define void @iwritefile(i8* %0, i32* %1, i32* %2, i32* %3, i32* %4, i32* %5) {
%7 = alloca i8*
%8 = alloca i32*
%9 = alloca i32*
%10 = alloca i32*
%11 = alloca i32*
%12 = alloca i32*
%13 = alloca i32
%14 = alloca i32
store i8* %0, i8** %7
store i32* %1, i32** %8
store i32* %2, i32** %9
store i32* %3, i32** %10
store i32* %4, i32** %11
store i32* %5, i32** %12
%15 = load i32*, i32** %8
%16 = load i32, i32* %15
%17 = mul nsw i32 %16, 4
store i32 %17, i32* %13
%18 = load i32*, i32** %11
%19 = load i32, i32* %18
%20 = mul nsw i32 %19, 4
store i32 %20, i32* %14
%21 = load i8*, i8** %7
%22 = load i32*, i32** %9
%23 = load i32*, i32** %10
%24 = bitcast i32* %23 to i8*
%25 = load i32*, i32** %12
%26 = call i32 @writefile(i8* %21, i32* %13, i32* %22, i8* %24, i32* %14, i32* %25)
ret void
}

LLVM IR (-O2):
define void @iwritefile(i8* %0, i32* nocapture %1, i32* %2, i32* %3, i32* nocapture %4, i32* %5) {
%7 = alloca i32
%8 = alloca i32
%9 = bitcast i32* %7 to i8*
%10 = load i32, i32* %1
%11 = shl nsw i32 %10, 2
store i32 %11, i32* %7
%12 = bitcast i32* %8 to i8*
%13 = load i32, i32* %4
%14 = shl nsw i32 %13, 2
store i32 %14, i32* %8
%15 = bitcast i32* %3 to i8*
%16 = call i32 @writefile(i8* %0, i32* %7, i32* %2, i8* %15, i32* %8, i32* %5)
ret void
}
/* Variables and functions */
double quagum_(double *, double *);
double cquagum(double *f, double *para) { return quagum_(f, para); }


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

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

LLVM IR (-O0):
define double @cquagum(double* %0, double* %1) {
%3 = alloca double*
%4 = alloca double*
store double* %0, double** %3
store double* %1, double** %4
%5 = load double*, double** %3
%6 = load double*, double** %4
%7 = call double @quagum_(double* %5, double* %6)
ret double %7
}

LLVM IR (-O2):
define double @cquagum(double* %0, double* %1) {
%3 = tail call double @quagum_(double* %0, double* %1)
ret double %3
}
int byte_row_normal(int byte) { return byte - 0x21; }


x86 assembly (clang, -O0):
<byte_row_normal>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
sub    $0x21,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<byte_row_normal>:
lea    -0x21(%rdi),%eax
ret

LLVM IR (-O0):
define i32 @byte_row_normal(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = sub nsw i32 %3, 33
ret i32 %4
}

LLVM IR (-O2):
define i32 @byte_row_normal(i32 %0) {
%2 = add nsw i32 %0, -33
ret i32 %2
}
/* Variables and functions */
char const *get_asf_bin_dir();
const char *get_asf_bin_dir_win() { return get_asf_bin_dir(); }


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

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

LLVM IR (-O0):
define i8* @get_asf_bin_dir_win() {
%1 = call i8* (...) @get_asf_bin_dir()
ret i8* %1
}

LLVM IR (-O2):
define i8* @get_asf_bin_dir_win() {
%1 = tail call i8* (...) @get_asf_bin_dir()
ret i8* %1
}
/* Type definitions */
typedef int uint32_t;
typedef int uint16_t;

/* Variables and functions */
uint32_t MIPS32_ORI(unsigned dst, unsigned src, uint16_t imm) {
  return (0x34000000 | (src << 21) | (dst << 16) | imm);
}


x86 assembly (clang, -O0):
<MIPS32_ORI>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x8(%rbp),%eax
shl    $0x15,%eax
or     $0x34000000,%eax
mov    -0x4(%rbp),%ecx
shl    $0x10,%ecx
or     %ecx,%eax
or     -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<MIPS32_ORI>:
mov    %edi,%eax
shl    $0x15,%esi
shl    $0x10,%eax
or     %esi,%eax
or     %edx,%eax
or     $0x34000000,%eax
ret

LLVM IR (-O0):
define i32 @MIPS32_ORI(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* %5
%8 = shl i32 %7, 21
%9 = or i32 872415232, %8
%10 = load i32, i32* %4
%11 = shl i32 %10, 16
%12 = or i32 %9, %11
%13 = load i32, i32* %6
%14 = or i32 %12, %13
ret i32 %14
}

LLVM IR (-O2):
define i32 @MIPS32_ORI(i32 %0, i32 %1, i32 %2) {
%4 = shl i32 %1, 21
%5 = shl i32 %0, 16
%6 = or i32 %5, %4
%7 = or i32 %6, %2
%8 = or i32 %7, 872415232
ret i32 %8
}
long Long__MINUS_(long x, long y) { return x - y; }


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

x86 assembly (clang, -O2):
<Long__MINUS_>:
mov    %rdi,%rax
sub    %rsi,%rax
ret

LLVM IR (-O0):
define i64 @Long__MINUS_(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 = sub nsw i64 %5, %6
ret i64 %7
}

LLVM IR (-O2):
define i64 @Long__MINUS_(i64 %0, i64 %1) {
%3 = sub nsw i64 %0, %1
ret i64 %3
}
/* Variables and functions */
int /*<<< orphan*/ diamond(int);
int input(char *);
int main() {
  int r = input("input r:");
  diamond(r);
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [9 x i8] c"input r:\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 @input(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
store i32 %3, i32* %2
%4 = load i32, i32* %2
%5 = call i32 @diamond(i32 %4)
ret i32 0
}

LLVM IR (-O2):
@.str = [9 x i8] c"input r:\00"
define i32 @main() {
%1 = tail call i32 @input(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @diamond(i32 %1)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main() {
  printf("Happy New Year");
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [15 x i8] c"Happy New Year\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [15 x i8] c"Happy New Year\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
void set_arrays() {
  extern void set_arrays_perpoint_perline(void);
  extern void set_arrays_multidimen(void);
  extern void reconstructeno_set_arrays(void);
  set_arrays_perpoint_perline();
  set_arrays_multidimen();
  reconstructeno_set_arrays();
}


x86 assembly (clang, -O0):
<set_arrays>:
push   %rbp
mov    %rsp,%rbp
call   1040 <set_arrays_perpoint_perline@plt>
call   1030 <set_arrays_multidimen@plt>
call   1050 <reconstructeno_set_arrays@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_arrays>:
push   %rax
call   1040 <set_arrays_perpoint_perline@plt>
call   1030 <set_arrays_multidimen@plt>
pop    %rax
jmp    1050 <reconstructeno_set_arrays@plt>

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

LLVM IR (-O2):
define void @set_arrays() {
tail call void @set_arrays_perpoint_perline()
tail call void @set_arrays_multidimen()
tail call void @reconstructeno_set_arrays()
ret void
}
int ands_si_test1(int a, int b, int c) {
  int d = a & b;
  if (d == 0)
    return a + c;
  else
    return b + d + c;
}


x86 assembly (clang, -O0):
<ands_si_test1>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%eax
and    -0xc(%rbp),%eax
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
jne    112e <ands_si_test1+0x2e>
mov    -0x8(%rbp),%eax
add    -0x10(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    113a <ands_si_test1+0x3a>
mov    -0xc(%rbp),%eax
add    -0x14(%rbp),%eax
add    -0x10(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ands_si_test1>:
mov    %esi,%ecx
and    %edi,%ecx
lea    (%rsi,%rcx,1),%eax
test   %ecx,%ecx
cmove  %edi,%eax
add    %edx,%eax
ret

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

LLVM IR (-O2):
define i32 @ands_si_test1(i32 %0, i32 %1, i32 %2) {
%4 = and i32 %1, %0
%5 = icmp eq i32 %4, 0
%6 = add nsw i32 %4, %1
%7 = select i1 %5, i32 %0, i32 %6
%8 = add nsw i32 %7, %2
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ asmerr(int);
int chk_v2(int i) {
  if (i >= -127 && i <= 127)
    return (i);
  else {
    asmerr(5);
    return (0);
  }
}


x86 assembly (clang, -O0):
<chk_v2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
cmpl   $0xffffff81,-0x8(%rbp)
jl     113a <chk_v2+0x2a>
cmpl   $0x7f,-0x8(%rbp)
jg     113a <chk_v2+0x2a>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    114b <chk_v2+0x3b>
mov    $0x5,%edi
call   1030 <asmerr@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<chk_v2>:
mov    %edi,%eax
lea    0x7f(%rax),%ecx
cmp    $0xff,%ecx
jb     112e <chk_v2+0x1e>
push   %rax
mov    $0x5,%edi
call   1030 <asmerr@plt>
xor    %eax,%eax
add    $0x8,%rsp
ret

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

LLVM IR (-O2):
define i32 @chk_v2(i32 %0) {
%2 = add i32 %0, 127
%3 = icmp ult i32 %2, 255
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i32 @asmerr(i32 5)
br label %6
6: ; preds = %1, %4
%7 = phi i32 [ 0, %4 ], [ %0, %1 ]
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ httpd();
int /*<<< orphan*/ rump_pub_lwproc_releaselwp();
int main() {
  rump_pub_lwproc_releaselwp();
  httpd();
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <rump_pub_lwproc_releaselwp@plt>
mov    $0x0,%al
call   1040 <httpd@plt>
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = call i32 (...) @rump_pub_lwproc_releaselwp()
%2 = call i32 (...) @httpd()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @rump_pub_lwproc_releaselwp()
%2 = tail call i32 (...) @httpd()
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ __m64;

/* Variables and functions */
int /*<<< orphan*/ _mm_packs_pi32(int /*<<< orphan*/, int /*<<< orphan*/);
__m64 test76(__m64 a, __m64 b) { return _mm_packs_pi32(a, b); }


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

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

LLVM IR (-O0):
define i32 @test76(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 @_mm_packs_pi32(i32 %5, i32 %6)
ret i32 %7
}

LLVM IR (-O2):
define i32 @test76(i32 %0, i32 %1) {
%3 = tail call i32 @_mm_packs_pi32(i32 %0, i32 %1)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ srand(unsigned int);
scalar_t__ time(int /*<<< orphan*/ *);
void init_random_system() { srand((unsigned)time(NULL)); }


x86 assembly (clang, -O0):
<init_random_system>:
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):
<init_random_system>:
push   %rax
xor    %edi,%edi
call   1040 <time@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <srand@plt>

LLVM IR (-O0):
define void @init_random_system() {
%1 = call i64 @time(i32* null)
%2 = trunc i64 %1 to i32
%3 = call i32 @srand(i32 %2)
ret void
}

LLVM IR (-O2):
define void @init_random_system() {
%1 = tail call i64 @time(i32* null)
%2 = trunc i64 %1 to i32
%3 = tail call i32 @srand(i32 %2)
ret void
}
/* Type definitions */
struct in_addr {
  int /*<<< orphan*/ s_addr;
};

/* Variables and functions */
int /*<<< orphan*/ _add_constraint(struct in_addr, int, int);
int /*<<< orphan*/ inet_addr(char *);
void allowlist_prefix(char *ip, int prefix_len) {
  struct in_addr addr;
  addr.s_addr = inet_addr(ip);
  _add_constraint(addr, prefix_len, 1);
}


x86 assembly (clang, -O0):
<allowlist_prefix>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <inet_addr@plt>
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edi
mov    $0x1,%edx
call   1040 <_add_constraint@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<allowlist_prefix>:
push   %rbx
mov    %esi,%ebx
call   1030 <inet_addr@plt>
mov    %eax,%edi
mov    %ebx,%esi
mov    $0x1,%edx
pop    %rbx
jmp    1040 <_add_constraint@plt>

LLVM IR (-O0):
%struct.in_addr = type { i32 }
define void @allowlist_prefix(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca %struct.in_addr
store i8* %0, i8** %3
store i32 %1, i32* %4
%6 = load i8*, i8** %3
%7 = call i32 @inet_addr(i8* %6)
%8 = getelementptr inbounds %struct.in_addr, %struct.in_addr* %5, i32 0, i32 0
store i32 %7, i32* %8
%9 = load i32, i32* %4
%10 = getelementptr inbounds %struct.in_addr, %struct.in_addr* %5, i32 0, i32 0
%11 = load i32, i32* %10
%12 = call i32 @_add_constraint(i32 %11, i32 %9, i32 1)
ret void
}

LLVM IR (-O2):
define void @allowlist_prefix(i8* %0, i32 %1) {
%3 = tail call i32 @inet_addr(i8* %0)
%4 = tail call i32 @_add_constraint(i32 %3, i32 %1, i32 1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ bar();
int /*<<< orphan*/ blah();
int /*<<< orphan*/ foo();
void baz_4(int a, int b, int c) {
  if (a && b) {
    foo();
    if (c)
      bar();
  }
  if (b && c)
    blah();
}


x86 assembly (clang, -O0):
<baz_4>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     1172 <baz_4+0x42>
cmpl   $0x0,-0x8(%rbp)
je     1172 <baz_4+0x42>
mov    $0x0,%al
call   1040 <foo@plt>
cmpl   $0x0,-0xc(%rbp)
je     116d <baz_4+0x3d>
mov    $0x0,%al
call   1030 <bar@plt>
jmp    1172 <baz_4+0x42>
cmpl   $0x0,-0x8(%rbp)
je     118d <baz_4+0x5d>
cmpl   $0x0,-0xc(%rbp)
je     118d <baz_4+0x5d>
mov    $0x0,%al
call   1050 <blah@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<baz_4>:
push   %rbp
push   %rbx
push   %rax
mov    %edx,%ebx
mov    %esi,%ebp
test   %edi,%edi
je     1151 <baz_4+0x21>
test   %ebp,%ebp
je     1151 <baz_4+0x21>
xor    %eax,%eax
call   1040 <foo@plt>
test   %ebx,%ebx
je     1166 <baz_4+0x36>
xor    %eax,%eax
call   1030 <bar@plt>
test   %ebp,%ebp
je     1166 <baz_4+0x36>
test   %ebx,%ebx
je     1166 <baz_4+0x36>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1050 <blah@plt>
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define void @baz_4(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 = icmp ne i32 %7, 0
br i1 %8, label %9, label %19
9: ; preds = %3
%10 = load i32, i32* %5
%11 = icmp ne i32 %10, 0
br i1 %11, label %12, label %19
12: ; preds = %9
%13 = call i32 (...) @foo()
%14 = load i32, i32* %6
%15 = icmp ne i32 %14, 0
br i1 %15, label %16, label %18
16: ; preds = %12
%17 = call i32 (...) @bar()
br label %18
18: ; preds = %16, %12
br label %19
19: ; preds = %18, %9, %3
%20 = load i32, i32* %5
%21 = icmp ne i32 %20, 0
br i1 %21, label %22, label %27
22: ; preds = %19
%23 = load i32, i32* %6
%24 = icmp ne i32 %23, 0
br i1 %24, label %25, label %27
25: ; preds = %22
%26 = call i32 (...) @blah()
br label %27
27: ; preds = %25, %22, %19
ret void
}

LLVM IR (-O2):
define void @baz_4(i32 %0, i32 %1, i32 %2) {
%4 = icmp ne i32 %0, 0
%5 = icmp ne i32 %1, 0
%6 = and i1 %4, %5
br i1 %6, label %7, label %12
7: ; preds = %3
%8 = tail call i32 (...) @foo()
%9 = icmp eq i32 %2, 0
br i1 %9, label %17, label %10
10: ; preds = %7
%11 = tail call i32 (...) @bar()
br label %12
12: ; preds = %10, %3
%13 = icmp ne i32 %2, 0
%14 = and i1 %5, %13
br i1 %14, label %15, label %17
15: ; preds = %12
%16 = tail call i32 (...) @blah()
br label %17
17: ; preds = %7, %15, %12
ret void
}
/* Type definitions */
typedef size_t uint16_t;

/* Variables and functions */
int /*<<< orphan*/ memcpy(size_t *, void const *, size_t);
size_t *xalloc(int);
uint16_t *alloc_rdata_init(const void *data, size_t size) {
  uint16_t *result = xalloc(sizeof(uint16_t) + size);
  *result = size;
  memcpy(result + 1, data, size);
  return result;
}


x86 assembly (clang, -O0):
<alloc_rdata_init>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
add    $0x8,%rax
mov    %eax,%edi
call   1040 <xalloc@plt>
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rcx
mov    -0x18(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x18(%rbp),%rdi
add    $0x8,%rdi
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
call   1030 <memcpy@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<alloc_rdata_init>:
push   %r15
push   %r14
push   %rbx
mov    %rsi,%r15
mov    %rdi,%r14
lea    0x8(%rsi),%edi
call   1040 <xalloc@plt>
mov    %rax,%rbx
mov    %r15,(%rax)
lea    0x8(%rax),%rdi
mov    %r14,%rsi
mov    %r15,%rdx
call   1030 <memcpy@plt>
mov    %rbx,%rax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define i64* @alloc_rdata_init(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
%5 = alloca i64*
store i8* %0, i8** %3
store i64 %1, i64* %4
%6 = load i64, i64* %4
%7 = add i64 8, %6
%8 = trunc i64 %7 to i32
%9 = call i64* @xalloc(i32 %8)
store i64* %9, i64** %5
%10 = load i64, i64* %4
%11 = load i64*, i64** %5
store i64 %10, i64* %11
%12 = load i64*, i64** %5
%13 = getelementptr inbounds i64, i64* %12, i64 1
%14 = load i8*, i8** %3
%15 = load i64, i64* %4
%16 = call i32 @memcpy(i64* %13, i8* %14, i64 %15)
%17 = load i64*, i64** %5
ret i64* %17
}

LLVM IR (-O2):
define i64* @alloc_rdata_init(i8* %0, i64 %1) {
%3 = trunc i64 %1 to i32
%4 = add i32 %3, 8
%5 = tail call i64* @xalloc(i32 %4)
store i64 %1, i64* %5
%6 = getelementptr inbounds i64, i64* %5, i64 1
%7 = tail call i32 @memcpy(i64* %6, i8* %0, i64 %1)
ret i64* %5
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ islower(int);
void t_islower_0xf9() {
  Assert_real((islower(249) == 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",
              1250, ("islower should be 0 for 0xf9"));
}


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

x86 assembly (clang, -O2):
<t_islower_0xf9>:
push   %rax
mov    $0xf9,%edi
call   1030 <islower@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x4e2,%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 = [29 x i8] c"islower should be 0 for 0xf9\00"
define void @t_islower_0xf9() {
%1 = call i64 @islower(i32 249)
%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 1250, 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_islower.c\00"
@.str.1 = [29 x i8] c"islower should be 0 for 0xf9\00"
define void @t_islower_0xf9() {
%1 = tail call i64 @islower(i32 249)
%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 1250, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void usage() {
  printf("usage: makeinitrd srcpath1 dstfile1 srcpath2 dstfile2 ... imgpath\n"
         "note: maximum number of files is 64\n"
         "example: makeinitrd ../bin/init init ../bin/initrd\n"
         "         makeinitrd ../bin/echo echo ../bin/ls ls ../bin/cat cat "
         "../bin/initrd\n");
}


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

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

LLVM IR (-O0):
@.str = [233 x i8] c"usage: makeinitrd srcpath1 dstfile1 srcpath2 dstfile2 ... imgpath\0Anote: maximum number of files is 64\0Aexample: makeinitrd ../bin/init init ../bin/initrd\0A makeinitrd ../bin/echo echo ../bin/ls ls ../bin/cat cat ../bin/initrd\0A\00"
define void @usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([233 x i8], [233 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [232 x i8] c"usage: makeinitrd srcpath1 dstfile1 srcpath2 dstfile2 ... imgpath\0Anote: maximum number of files is 64\0Aexample: makeinitrd ../bin/init init ../bin/initrd\0A makeinitrd ../bin/echo echo ../bin/ls ls ../bin/cat cat ../bin/initrd\00"
define void @usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([232 x i8], [232 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
size_t self_strlen(char s[]) {
  size_t len = 0;
  while (s[len] != '\0')
    len++;
  return len;
}


x86 assembly (clang, -O0):
<self_strlen>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movq   $0x0,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
je     1136 <self_strlen+0x36>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1110 <self_strlen+0x10>
mov    -0x10(%rbp),%rax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i64 @self_strlen(i8* nocapture %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i64 [ 0, %1 ], [ %7, %2 ]
%4 = getelementptr inbounds i8, i8* %0, i64 %3
%5 = load i8, i8* %4
%6 = icmp eq i8 %5, 0
%7 = add i64 %3, 1
br i1 %6, label %8, label %2
8: ; preds = %2
ret i64 %3
}
/* Variables and functions */
scalar_t__ w_islower(char);
char w_toupper(char c) { return w_islower(c) ? (c - 'a' + 'A') : c; }


x86 assembly (clang, -O0):
<w_toupper>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%edi
call   1030 <w_islower@plt>
cmp    $0x0,%rax
je     1143 <w_toupper+0x33>
movsbl -0x1(%rbp),%eax
sub    $0x61,%eax
add    $0x41,%eax
mov    %eax,-0x8(%rbp)
jmp    114a <w_toupper+0x3a>
movsbl -0x1(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
movsbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<w_toupper>:
push   %rbx
mov    %edi,%ebx
call   1030 <w_islower@plt>
lea    -0x20(%rbx),%ecx
test   %rax,%rax
movzbl %cl,%eax
cmove  %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define signext i8 @w_toupper(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = call i64 @w_islower(i8 signext %3)
%5 = icmp ne i64 %4, 0
br i1 %5, label %6, label %11
6: ; preds = %1
%7 = load i8, i8* %2
%8 = sext i8 %7 to i32
%9 = sub nsw i32 %8, 97
%10 = add nsw i32 %9, 65
br label %14
11: ; preds = %1
%12 = load i8, i8* %2
%13 = sext i8 %12 to i32
br label %14
14: ; preds = %11, %6
%15 = phi i32 [ %10, %6 ], [ %13, %11 ]
%16 = trunc i32 %15 to i8
ret i8 %16
}

LLVM IR (-O2):
define signext i8 @w_toupper(i8 signext %0) {
%2 = tail call i64 @w_islower(i8 signext %0)
%3 = icmp eq i64 %2, 0
%4 = add i8 %0, -32
%5 = select i1 %3, i8 %0, i8 %4
ret i8 %5
}
void xencons_force_flush(void) {}


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

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

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

LLVM IR (-O2):
define void @xencons_force_flush() {
ret void
}
long gs_display_init() { return 0; }


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

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

LLVM IR (-O0):
define i64 @gs_display_init() {
ret i64 0
}

LLVM IR (-O2):
define i64 @gs_display_init() {
ret i64 0
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
void main() {
  int x;
  char *cp = &x;
  for (int i = 0; i != sizeof(int); i++)
    *(cp + i) = 0;
  assert(x == 0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
lea    -0x4(%rbp),%rax
mov    %rax,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
movslq -0x14(%rbp),%rax
cmp    $0x4,%rax
je     114f <main+0x3f>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
movb   $0x0,(%rax,%rcx,1)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1127 <main+0x17>
cmpl   $0x0,-0x4(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
mov    $0x1,%edi
jmp    1030 <assert@plt>

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

LLVM IR (-O2):
define void @main() {
%1 = tail call i32 @assert(i32 1)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
int /*<<< orphan*/ radio_df_ant_num_get();
uint8_t lll_df_ant_num_get(void) { return radio_df_ant_num_get(); }


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

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

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

LLVM IR (-O2):
define i32 @lll_df_ant_num_get() {
%1 = tail call i32 (...) @radio_df_ant_num_get()
ret i32 %1
}
void apply_paravirt(struct paravirt_patch_site *start,
                    struct paravirt_patch_site *end) {}


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

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

LLVM IR (-O0):
%struct.paravirt_patch_site = type opaque
define void @apply_paravirt(%struct.paravirt_patch_site* %0, %struct.paravirt_patch_site* %1) {
%3 = alloca %struct.paravirt_patch_site*
%4 = alloca %struct.paravirt_patch_site*
store %struct.paravirt_patch_site* %0, %struct.paravirt_patch_site** %3
store %struct.paravirt_patch_site* %1, %struct.paravirt_patch_site** %4
ret void
}

LLVM IR (-O2):
%struct.paravirt_patch_site = type opaque
define void @apply_paravirt(%struct.paravirt_patch_site* nocapture %0, %struct.paravirt_patch_site* nocapture %1) {
ret void
}
void JIS0208_to_Unicode(void) {}


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

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

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

LLVM IR (-O2):
define void @JIS0208_to_Unicode() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void mallocAllocatorFree(void *ptr) { free(ptr); }


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

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

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

LLVM IR (-O2):
define void @mallocAllocatorFree(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}