xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ islower(int);
void t_islower_0xcc() {
  Assert_real((islower(204) == 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",
              1025, ("islower should be 0 for 0xcc"));
}


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

x86 assembly (clang, -O2):
<t_islower_0xcc>:
push   %rax
mov    $0xcc,%edi
call   1030 <islower@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x401,%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 0xcc\00"
define void @t_islower_0xcc() {
%1 = call i64 @islower(i32 204)
%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 1025, 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 0xcc\00"
define void @t_islower_0xcc() {
%1 = tail call i64 @islower(i32 204)
%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 1025, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int close(int);
int /*<<< orphan*/ perror(char *);
int close_rawsocket(int sock) {
  int ret;
  ret = close(sock);
  if (ret < 0) {
    perror("close() failed ");
  }
  return (ret);
}


x86 assembly (clang, -O0):
<close_rawsocket>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <close@plt>
mov    %eax,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jge    114c <close_rawsocket+0x2c>
lea    0xeb9(%rip),%rdi
call   1040 <perror@plt>
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<close_rawsocket>:
push   %rbx
call   1030 <close@plt>
mov    %eax,%ebx
test   %eax,%eax
js     1130 <close_rawsocket+0x10>
mov    %ebx,%eax
pop    %rbx
ret
lea    0xec9(%rip),%rdi
call   1040 <perror@plt>
jmp    112c <close_rawsocket+0xc>

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

LLVM IR (-O2):
@.str = [16 x i8] c"close() failed \00"
define i32 @close_rawsocket(i32 %0) {
%2 = tail call i32 @close(i32 %0)
%3 = icmp slt i32 %2, 0
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 @perror(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
br label %6
6: ; preds = %4, %1
ret i32 %2
}
void base64_append(char **ou, int *line_count, char data) {
  if (*line_count == 76) {
    *(*ou)++ = '\n';
    *line_count = 0;
  }
  *(*ou)++ = data;
  if (*line_count >= 0)
    (*line_count)++;
}


x86 assembly (clang, -O0):
<base64_append>:
push   %rbp
mov    %rsp,%rbp
mov    %dl,%al
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %al,-0x11(%rbp)
mov    -0x10(%rbp),%rax
cmpl   $0x4c,(%rax)
jne    113c <base64_append+0x3c>
mov    -0x8(%rbp),%rcx
mov    (%rcx),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,(%rcx)
movb   $0xa,(%rax)
mov    -0x10(%rbp),%rax
movl   $0x0,(%rax)
mov    -0x11(%rbp),%cl
mov    -0x8(%rbp),%rdx
mov    (%rdx),%rax
mov    %rax,%rsi
add    $0x1,%rsi
mov    %rsi,(%rdx)
mov    %cl,(%rax)
mov    -0x10(%rbp),%rax
cmpl   $0x0,(%rax)
jl     116a <base64_append+0x6a>
mov    -0x10(%rbp),%rax
mov    (%rax),%ecx
add    $0x1,%ecx
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<base64_append>:
cmpl   $0x4c,(%rsi)
jne    1118 <base64_append+0x18>
mov    (%rdi),%rax
lea    0x1(%rax),%rcx
mov    %rcx,(%rdi)
movb   $0xa,(%rax)
movl   $0x0,(%rsi)
mov    (%rdi),%rax
lea    0x1(%rax),%rcx
mov    %rcx,(%rdi)
mov    %dl,(%rax)
mov    (%rsi),%eax
test   %eax,%eax
js     112f <base64_append+0x2f>
add    $0x1,%eax
mov    %eax,(%rsi)
ret

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

LLVM IR (-O2):
define void @base64_append(i8** nocapture %0, i32* nocapture %1, i8 signext %2) {
%4 = load i32, i32* %1
%5 = icmp eq i32 %4, 76
br i1 %5, label %6, label %9
6: ; preds = %3
%7 = load i8*, i8** %0
%8 = getelementptr inbounds i8, i8* %7, i64 1
store i8* %8, i8** %0
store i8 10, i8* %7
store i32 0, i32* %1
br label %9
9: ; preds = %6, %3
%10 = load i8*, i8** %0
%11 = getelementptr inbounds i8, i8* %10, i64 1
store i8* %11, i8** %0
store i8 %2, i8* %10
%12 = load i32, i32* %1
%13 = icmp sgt i32 %12, -1
br i1 %13, label %14, label %16
14: ; preds = %9
%15 = add nuw nsw i32 %12, 1
store i32 %15, i32* %1
br label %16
16: ; preds = %14, %9
ret void
}
/* Variables and functions */
int /*<<< orphan*/ frontend_version();
int /*<<< orphan*/ newline();
int /*<<< orphan*/ output_line(char *);
int /*<<< orphan*/ output_string(char *);
void header(void) {
  output_string("; Small C Z80\n;\tCoder (ac0)\n;");
  frontend_version();
  newline();
  output_line("\t;program area SMALLC_GENERATED is RELOCATABLE");
  output_line("\t.module SMALLC_GENERATED");
}


x86 assembly (clang, -O0):
<header>:
push   %rbp
mov    %rsp,%rbp
lea    0xeb5(%rip),%rdi
call   1040 <output_string@plt>
mov    $0x0,%al
call   1050 <frontend_version@plt>
mov    $0x0,%al
call   1030 <newline@plt>
lea    0xeb9(%rip),%rdi
call   1060 <output_line@plt>
lea    0xedc(%rip),%rdi
call   1060 <output_line@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<header>:
push   %rax
lea    0xeb8(%rip),%rdi
call   1040 <output_string@plt>
xor    %eax,%eax
call   1050 <frontend_version@plt>
xor    %eax,%eax
call   1030 <newline@plt>
lea    0xebc(%rip),%rdi
call   1060 <output_line@plt>
lea    0xedf(%rip),%rdi
pop    %rax
jmp    1060 <output_line@plt>

LLVM IR (-O0):
@.str = [30 x i8] c"; Small C Z80\0A;\09Coder (ac0)\0A;\00"
@.str.1 = [47 x i8] c"\09;program area SMALLC_GENERATED is RELOCATABLE\00"
@.str.2 = [26 x i8] c"\09.module SMALLC_GENERATED\00"
define void @header() {
%1 = call i32 @output_string(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0))
%2 = call i32 (...) @frontend_version()
%3 = call i32 (...) @newline()
%4 = call i32 @output_line(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.1, i64 0, i64 0))
%5 = call i32 @output_line(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.2, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [30 x i8] c"; Small C Z80\0A;\09Coder (ac0)\0A;\00"
@.str.1 = [47 x i8] c"\09;program area SMALLC_GENERATED is RELOCATABLE\00"
@.str.2 = [26 x i8] c"\09.module SMALLC_GENERATED\00"
define void @header() {
%1 = tail call i32 @output_string(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 (...) @frontend_version()
%3 = tail call i32 (...) @newline()
%4 = tail call i32 @output_line(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.1, i64 0, i64 0))
%5 = tail call i32 @output_line(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.2, i64 0, i64 0))
ret void
}
char *strcat(s1, s2)
register char *s1;
register const char *s2;
{
  register char *os1;
  os1 = s1;
  while (*s1++)
    ;
  --s1;
  while ((*s1++ = *s2++))
    ;
  return (os1);
}


x86 assembly (clang, -O0):
<strcat>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
cmpb   $0x0,(%rax)
je     1131 <strcat+0x31>
jmp    1114 <strcat+0x14>
mov    -0x8(%rbp),%rax
add    $0xffffffffffffffff,%rax
mov    %rax,-0x8(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
mov    (%rax),%al
mov    -0x8(%rbp),%rcx
mov    %rcx,%rdx
add    $0x1,%rdx
mov    %rdx,-0x8(%rbp)
mov    %al,(%rcx)
cmp    $0x0,%al
je     116c <strcat+0x6c>
jmp    113d <strcat+0x3d>
mov    -0x18(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strcat>:
mov    %rdi,%rax
mov    %rdi,%rcx
cs nopw 0x0(%rax,%rax,1)
cmpb   $0x0,(%rcx)
lea    0x1(%rcx),%rcx
jne    1110 <strcat+0x10>
xor    %edx,%edx
nopl   0x0(%rax,%rax,1)
movzbl (%rsi,%rdx,1),%edi
mov    %dil,-0x1(%rcx,%rdx,1)
add    $0x1,%rdx
test   %dil,%dil
jne    1120 <strcat+0x20>
ret

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

LLVM IR (-O2):
define i8* @strcat(i8* returned %0, i8* nocapture %1) {
br label %3
3: ; preds = %3, %2
%4 = phi i8* [ %0, %2 ], [ %5, %3 ]
%5 = getelementptr inbounds i8, i8* %4, i64 1
%6 = load i8, i8* %4
%7 = icmp eq i8 %6, 0
br i1 %7, label %8, label %3
8: ; preds = %3, %8
%9 = phi i8* [ %11, %8 ], [ %1, %3 ]
%10 = phi i8* [ %13, %8 ], [ %4, %3 ]
%11 = getelementptr inbounds i8, i8* %9, i64 1
%12 = load i8, i8* %9
%13 = getelementptr inbounds i8, i8* %10, i64 1
store i8 %12, i8* %10
%14 = icmp eq i8 %12, 0
br i1 %14, label %15, label %8
15: ; preds = %8
ret i8* %0
}
void critical(x, y) int x[], y[];
{
  int *x_next, *y_next;
#pragma omp parallel shared(x, y) private(x_next, y_next)
  {
#pragma omp critical(xaxis)
    x_next = dequeue(x);
    work(x_next);
#pragma omp critical(yaxis)
    y_next = dequeue(y);
    work(y_next);
  }
}


x86 assembly (clang, -O0):
<critical>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x0,%al
call   1040 <dequeue@plt>
cltq
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    $0x0,%al
call   1030 <work@plt>
mov    -0x10(%rbp),%rdi
mov    $0x0,%al
call   1040 <dequeue@plt>
cltq
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rdi
mov    $0x0,%al
call   1030 <work@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<critical>:
push   %rbx
mov    %rsi,%rbx
xor    %eax,%eax
call   1040 <dequeue@plt>
movslq %eax,%rdi
xor    %eax,%eax
call   1030 <work@plt>
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <dequeue@plt>
movslq %eax,%rdi
xor    %eax,%eax
pop    %rbx
jmp    1030 <work@plt>

LLVM IR (-O0):
define void @critical(i32* %0, i32* %1) {
%3 = alloca i32*
%4 = alloca i32*
%5 = alloca i32*
%6 = alloca i32*
store i32* %0, i32** %3
store i32* %1, i32** %4
%7 = load i32*, i32** %3
%8 = call i32 (i32*, ...) bitcast (i32 (...)* @dequeue to i32 (i32*, ...)*)(i32* %7)
%9 = sext i32 %8 to i64
%10 = inttoptr i64 %9 to i32*
store i32* %10, i32** %5
%11 = load i32*, i32** %5
%12 = call i32 (i32*, ...) bitcast (i32 (...)* @work to i32 (i32*, ...)*)(i32* %11)
%13 = load i32*, i32** %4
%14 = call i32 (i32*, ...) bitcast (i32 (...)* @dequeue to i32 (i32*, ...)*)(i32* %13)
%15 = sext i32 %14 to i64
%16 = inttoptr i64 %15 to i32*
store i32* %16, i32** %6
%17 = load i32*, i32** %6
%18 = call i32 (i32*, ...) bitcast (i32 (...)* @work to i32 (i32*, ...)*)(i32* %17)
ret void
}

LLVM IR (-O2):
define void @critical(i32* %0, i32* %1) {
%3 = tail call i32 (i32*, ...) bitcast (i32 (...)* @dequeue to i32 (i32*, ...)*)(i32* %0)
%4 = sext i32 %3 to i64
%5 = inttoptr i64 %4 to i32*
%6 = tail call i32 (i32*, ...) bitcast (i32 (...)* @work to i32 (i32*, ...)*)(i32* %5)
%7 = tail call i32 (i32*, ...) bitcast (i32 (...)* @dequeue to i32 (i32*, ...)*)(i32* %1)
%8 = sext i32 %7 to i64
%9 = inttoptr i64 %8 to i32*
%10 = tail call i32 (i32*, ...) bitcast (i32 (...)* @work to i32 (i32*, ...)*)(i32* %9)
ret void
}
/* Variables and functions */
int anetSetBlock(char *, int, int);
int anetNonBlock(char *err, int fd) { return anetSetBlock(err, fd, 1); }


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

x86 assembly (clang, -O2):
<anetNonBlock>:
mov    $0x1,%edx
jmp    1030 <anetSetBlock@plt>

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

LLVM IR (-O2):
define i32 @anetNonBlock(i8* %0, i32 %1) {
%3 = tail call i32 @anetSetBlock(i8* %0, i32 %1, i32 1)
ret i32 %3
}
void foo056() {}


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

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

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

LLVM IR (-O2):
define void @foo056() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ sprintf(char *, char *, int);
const char *makeStringFromInt(int key) {
  static char buf[16];
  sprintf(buf, "%d", key);
  return buf;
}


x86 assembly (clang, -O0):
<makeStringFromInt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edx
lea    0x2f1b(%rip),%rdi
lea    0xed4(%rip),%rsi
call   1030 <sprintf@plt>
lea    0x2f08(%rip),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<makeStringFromInt>:
push   %rbx
mov    %edi,%edx
lea    0x2f26(%rip),%rbx
lea    0xedf(%rip),%rsi
mov    %rbx,%rdi
call   1030 <sprintf@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@makeStringFromInt.buf = internal global [16 x i8] zeroinitializer
@.str = [3 x i8] c"%d\00"
define i8* @makeStringFromInt(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @sprintf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @makeStringFromInt.buf, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %3)
ret i8* getelementptr inbounds ([16 x i8], [16 x i8]* @makeStringFromInt.buf, i64 0, i64 0)
}

LLVM IR (-O2):
@makeStringFromInt.buf = internal global [16 x i8] zeroinitializer
@.str = [3 x i8] c"%d\00"
define i8* @makeStringFromInt(i32 %0) {
%2 = tail call i32 @sprintf(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @makeStringFromInt.buf, i64 0, i64 0), i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %0)
ret i8* getelementptr inbounds ([16 x i8], [16 x i8]* @makeStringFromInt.buf, i64 0, i64 0)
}
void XwcDrawText() {}


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

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

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

LLVM IR (-O2):
define void @XwcDrawText() {
ret void
}
void unset_bit(unsigned char *c, int i) { c[i / 8] &= ~(128 >> (i % 8)); }


x86 assembly (clang, -O0):
<unset_bit>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    $0x8,%ecx
cltd
idiv   %ecx
mov    %edx,%ecx
mov    $0x80,%esi
sar    %cl,%esi
xor    $0xffffffff,%esi
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0xc(%rbp),%eax
mov    $0x8,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    -0x18(%rbp),%rax
movslq %ecx,%rcx
movzbl (%rax,%rcx,1),%edx
and    %esi,%edx
mov    %dl,(%rax,%rcx,1)
pop    %rbp
ret

x86 assembly (clang, -O2):
<unset_bit>:
mov    %esi,%ecx
and    $0x7,%cl
mov    $0xffffff7f,%eax
sar    %cl,%eax
lea    0x7(%rsi),%ecx
test   %esi,%esi
cmovns %esi,%ecx
sar    $0x3,%ecx
movslq %ecx,%rcx
and    %al,(%rdi,%rcx,1)
ret

LLVM IR (-O0):
define void @unset_bit(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 = srem i32 %5, 8
%7 = ashr i32 128, %6
%8 = xor i32 %7, -1
%9 = load i8*, i8** %3
%10 = load i32, i32* %4
%11 = sdiv i32 %10, 8
%12 = sext i32 %11 to i64
%13 = getelementptr inbounds i8, i8* %9, i64 %12
%14 = load i8, i8* %13
%15 = zext i8 %14 to i32
%16 = and i32 %15, %8
%17 = trunc i32 %16 to i8
store i8 %17, i8* %13
ret void
}

LLVM IR (-O2):
define void @unset_bit(i8* nocapture %0, i32 %1) {
%3 = and i32 %1, 7
%4 = ashr i32 -129, %3
%5 = sdiv i32 %1, 8
%6 = sext i32 %5 to i64
%7 = getelementptr inbounds i8, i8* %0, i64 %6
%8 = load i8, i8* %7
%9 = trunc i32 %4 to i8
%10 = and i8 %8, %9
store i8 %10, i8* %7
ret void
}
unsigned long long ft_ullongmin(unsigned long long n1, unsigned long long n2) {
  return ((n1 < n2) ? n1 : n2);
}


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

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

LLVM IR (-O0):
define i64 @ft_ullongmin(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 ult 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 @ft_ullongmin(i64 %0, i64 %1) {
%3 = icmp ult i64 %0, %1
%4 = select i1 %3, i64 %0, i64 %1
ret i64 %4
}
/* Variables and functions */
int /*<<< orphan*/ cleanup_screen();
int /*<<< orphan*/ event_loop();
int /*<<< orphan*/ setup_screen();
int /*<<< orphan*/ srand(int /*<<< orphan*/);
int /*<<< orphan*/ time(int /*<<< orphan*/ *);
int main() {
  srand(time(NULL));
  setup_screen();
  event_loop();
  cleanup_screen();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
xor    %eax,%eax
mov    %eax,%edi
call   1060 <time@plt>
mov    %eax,%edi
call   1040 <srand@plt>
mov    $0x0,%al
call   1050 <setup_screen@plt>
mov    $0x0,%al
call   1070 <event_loop@plt>
mov    $0x0,%al
call   1030 <cleanup_screen@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %edi,%edi
call   1060 <time@plt>
mov    %eax,%edi
call   1040 <srand@plt>
xor    %eax,%eax
call   1050 <setup_screen@plt>
xor    %eax,%eax
call   1070 <event_loop@plt>
xor    %eax,%eax
call   1030 <cleanup_screen@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @time(i32* null)
%3 = call i32 @srand(i32 %2)
%4 = call i32 (...) @setup_screen()
%5 = call i32 (...) @event_loop()
%6 = call i32 (...) @cleanup_screen()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @time(i32* null)
%2 = tail call i32 @srand(i32 %1)
%3 = tail call i32 (...) @setup_screen()
%4 = tail call i32 (...) @event_loop()
%5 = tail call i32 (...) @cleanup_screen()
ret i32 0
}
char readChar() { return 'a'; }


x86 assembly (clang, -O0):
<readChar>:
push   %rbp
mov    %rsp,%rbp
mov    $0x61,%al
movsbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<readChar>:
mov    $0x61,%al
ret

LLVM IR (-O0):
define signext i8 @readChar() {
ret i8 97
}

LLVM IR (-O2):
define signext i8 @readChar() {
ret i8 97
}
void handler(signal) int signal;
{
  ;
  Echon();
  ;
  unzip_exit(80);
}


x86 assembly (clang, -O0):
<handler>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x0,%al
call   1040 <Echon@plt>
mov    $0x50,%edi
mov    $0x0,%al
call   1030 <unzip_exit@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<handler>:
push   %rax
xor    %eax,%eax
call   1040 <Echon@plt>
mov    $0x50,%edi
xor    %eax,%eax
pop    %rcx
jmp    1030 <unzip_exit@plt>

LLVM IR (-O0):
define void @handler(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 (...) @Echon()
%4 = call i32 (i32, ...) bitcast (i32 (...)* @unzip_exit to i32 (i32, ...)*)(i32 80)
ret void
}

LLVM IR (-O2):
define void @handler(i32 %0) {
%2 = tail call i32 (...) @Echon()
%3 = tail call i32 (i32, ...) bitcast (i32 (...)* @unzip_exit to i32 (i32, ...)*)(i32 80)
ret void
}
void TestObjType_finalize(void *_self) {}


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

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

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

LLVM IR (-O2):
define void @TestObjType_finalize(i8* nocapture %0) {
ret void
}
int three() { return 12; }


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

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

LLVM IR (-O0):
define i32 @three() {
ret i32 12
}

LLVM IR (-O2):
define i32 @three() {
ret i32 12
}
void pvr_dbg_init(void) {}


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

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

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

LLVM IR (-O2):
define void @pvr_dbg_init() {
ret void
}
int cairo_code_draw_casDLabel_get_height() { return 10; }


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

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

LLVM IR (-O0):
define i32 @cairo_code_draw_casDLabel_get_height() {
ret i32 10
}

LLVM IR (-O2):
define i32 @cairo_code_draw_casDLabel_get_height() {
ret i32 10
}
/* Variables and functions */
void *check_alloc(int /*<<< orphan*/);
int /*<<< orphan*/ realloc(void *, size_t);
void *opus_realloc(void *_ptr, size_t _size) {
  return check_alloc(realloc(_ptr, _size));
}


x86 assembly (clang, -O0):
<opus_realloc>:
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 <realloc@plt>
mov    %eax,%edi
call   1040 <check_alloc@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i8* @opus_realloc(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
store i8* %0, i8** %3
store i64 %1, i64* %4
%5 = load i8*, i8** %3
%6 = load i64, i64* %4
%7 = call i32 @realloc(i8* %5, i64 %6)
%8 = call i8* @check_alloc(i32 %7)
ret i8* %8
}

LLVM IR (-O2):
define i8* @opus_realloc(i8* %0, i64 %1) {
%3 = tail call i32 @realloc(i8* %0, i64 %1)
%4 = tail call i8* @check_alloc(i32 %3)
ret i8* %4
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ printf(char *, char, char, char, char);
void ipprint(uint32_t *a) {
  char *b = (char *)a;
  printf("%d.%d.%d.%d", b[0], b[1], b[2], b[3]);
}


x86 assembly (clang, -O0):
<ipprint>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%sil
mov    -0x10(%rbp),%rax
mov    0x1(%rax),%dl
mov    -0x10(%rbp),%rax
mov    0x2(%rax),%cl
mov    -0x10(%rbp),%rax
lea    0xebc(%rip),%rdi
movsbl %sil,%esi
movsbl %dl,%edx
movsbl %cl,%ecx
movsbl 0x3(%rax),%r8d
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ipprint>:
movsbl (%rdi),%esi
movsbl 0x1(%rdi),%edx
movsbl 0x2(%rdi),%ecx
movsbl 0x3(%rdi),%r8d
lea    0xed9(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [12 x i8] c"%d.%d.%d.%d\00"
define void @ipprint(i32* %0) {
%2 = alloca i32*
%3 = alloca i8*
store i32* %0, i32** %2
%4 = load i32*, i32** %2
%5 = bitcast i32* %4 to i8*
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = getelementptr inbounds i8, i8* %6, i64 0
%8 = load i8, i8* %7
%9 = load i8*, i8** %3
%10 = getelementptr inbounds i8, i8* %9, i64 1
%11 = load i8, i8* %10
%12 = load i8*, i8** %3
%13 = getelementptr inbounds i8, i8* %12, i64 2
%14 = load i8, i8* %13
%15 = load i8*, i8** %3
%16 = getelementptr inbounds i8, i8* %15, i64 3
%17 = load i8, i8* %16
%18 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8 signext %8, i8 signext %11, i8 signext %14, i8 signext %17)
ret void
}

LLVM IR (-O2):
@.str = [12 x i8] c"%d.%d.%d.%d\00"
define void @ipprint(i32* nocapture %0) {
%2 = bitcast i32* %0 to i8*
%3 = load i8, i8* %2
%4 = getelementptr inbounds i8, i8* %2, i64 1
%5 = load i8, i8* %4
%6 = getelementptr inbounds i8, i8* %2, i64 2
%7 = load i8, i8* %6
%8 = getelementptr inbounds i8, i8* %2, i64 3
%9 = load i8, i8* %8
%10 = tail call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8 signext %3, i8 signext %5, i8 signext %7, i8 signext %9)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int /*<<< orphan*/, char *, int, char *);
int /*<<< orphan*/ isprint(int);
void t_isprint_0x5a() {
  Assert_real((isprint(90)),
              "/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_isprint.c",
              455, ("isprint should be 1 for Z"));
}


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

x86 assembly (clang, -O2):
<t_isprint_0x5a>:
push   %rax
mov    $0x5a,%edi
call   1030 <isprint@plt>
lea    0xece(%rip),%rsi
lea    0xf6f(%rip),%rcx
mov    %eax,%edi
mov    $0x1c7,%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_isprint.c\00"
@.str.1 = [26 x i8] c"isprint should be 1 for Z\00"
define void @t_isprint_0x5a() {
%1 = call i32 @isprint(i32 90)
%2 = call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 455, 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_isprint.c\00"
@.str.1 = [26 x i8] c"isprint should be 1 for Z\00"
define void @t_isprint_0x5a() {
%1 = tail call i32 @isprint(i32 90)
%2 = tail call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 455, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Type definitions */
struct ebpt_node {
  int dummy;
};
struct eb_root {
  int dummy;
};
struct eb64_node {
  int dummy;
};
struct eb32_node {
  int dummy;
};

/* Variables and functions */
scalar_t__ eb32_insert(struct eb_root *, struct eb32_node *);
scalar_t__ eb64_insert(struct eb_root *, struct eb64_node *);
__attribute__((always_)) struct ebpt_node *ebpt_insert(struct eb_root *root,
                                                       struct ebpt_node *new) {
  if (sizeof(void *) == 4)
    return (struct ebpt_node *)eb32_insert(root, (struct eb32_node *)new);
  else
    return (struct ebpt_node *)eb64_insert(root, (struct eb64_node *)new);
}


x86 assembly (clang, -O0):
<ebpt_insert>:
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 <eb64_insert@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.eb_root = type { i32 }
%struct.ebpt_node = type { i32 }
%struct.eb64_node = type { i32 }
define %struct.ebpt_node* @ebpt_insert(%struct.eb_root* %0, %struct.ebpt_node* %1) {
%3 = alloca %struct.eb_root*
%4 = alloca %struct.ebpt_node*
store %struct.eb_root* %0, %struct.eb_root** %3
store %struct.ebpt_node* %1, %struct.ebpt_node** %4
%5 = load %struct.eb_root*, %struct.eb_root** %3
%6 = load %struct.ebpt_node*, %struct.ebpt_node** %4
%7 = bitcast %struct.ebpt_node* %6 to %struct.eb64_node*
%8 = call i64 @eb64_insert(%struct.eb_root* %5, %struct.eb64_node* %7)
%9 = inttoptr i64 %8 to %struct.ebpt_node*
ret %struct.ebpt_node* %9
}

LLVM IR (-O2):
%struct.eb_root = type { i32 }
%struct.ebpt_node = type { i32 }
%struct.eb64_node = type { i32 }
define %struct.ebpt_node* @ebpt_insert(%struct.eb_root* %0, %struct.ebpt_node* %1) {
%3 = bitcast %struct.ebpt_node* %1 to %struct.eb64_node*
%4 = tail call i64 @eb64_insert(%struct.eb_root* %0, %struct.eb64_node* %3)
%5 = inttoptr i64 %4 to %struct.ebpt_node*
ret %struct.ebpt_node* %5
}
int real_to_int(double in1) { return (int)in1; }


x86 assembly (clang, -O0):
<real_to_int>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
cvttsd2si -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<real_to_int>:
cvttsd2si %xmm0,%eax
ret

LLVM IR (-O0):
define i32 @real_to_int(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fptosi double %3 to i32
ret i32 %4
}

LLVM IR (-O2):
define i32 @real_to_int(double %0) {
%2 = fptosi double %0 to i32
ret i32 %2
}
char isApplicationActive(void) { return 1; }


x86 assembly (clang, -O0):
<isApplicationActive>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%al
movsbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isApplicationActive>:
mov    $0x1,%al
ret

LLVM IR (-O0):
define signext i8 @isApplicationActive() {
ret i8 1
}

LLVM IR (-O2):
define signext i8 @isApplicationActive() {
ret i8 1
}
/* Type definitions */
struct vmbuf {
  int dummy;
};

/* Variables and functions */
int vmbuf_resize_to(struct vmbuf *, scalar_t__);
scalar_t__ vmbuf_size(struct vmbuf *);
size_t vmbuf_wavail(struct vmbuf *);
int vmbuf_resize_if_less(struct vmbuf *vmbuf, size_t desired_size) {
  size_t wa = vmbuf_wavail(vmbuf);
  if (desired_size <= wa)
    return 0;
  return vmbuf_resize_to(vmbuf, vmbuf_size(vmbuf) + desired_size);
}


x86 assembly (clang, -O0):
<vmbuf_resize_if_less>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1050 <vmbuf_wavail@plt>
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rax
cmp    -0x20(%rbp),%rax
ja     1167 <vmbuf_resize_if_less+0x37>
movl   $0x0,-0x4(%rbp)
jmp    118b <vmbuf_resize_if_less+0x5b>
mov    -0x10(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <vmbuf_size@plt>
mov    -0x28(%rbp),%rdi
mov    %rax,%rsi
add    -0x18(%rbp),%rsi
call   1030 <vmbuf_resize_to@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<vmbuf_resize_if_less>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rdi,%r14
call   1050 <vmbuf_wavail@plt>
cmp    %rbx,%rax
jae    1161 <vmbuf_resize_if_less+0x31>
mov    %r14,%rdi
call   1040 <vmbuf_size@plt>
add    %rax,%rbx
mov    %r14,%rdi
mov    %rbx,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <vmbuf_resize_to@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
%struct.vmbuf = type { i32 }
define i32 @vmbuf_resize_if_less(%struct.vmbuf* %0, i64 %1) {
%3 = alloca i32
%4 = alloca %struct.vmbuf*
%5 = alloca i64
%6 = alloca i64
store %struct.vmbuf* %0, %struct.vmbuf** %4
store i64 %1, i64* %5
%7 = load %struct.vmbuf*, %struct.vmbuf** %4
%8 = call i64 @vmbuf_wavail(%struct.vmbuf* %7)
store i64 %8, i64* %6
%9 = load i64, i64* %5
%10 = load i64, i64* %6
%11 = icmp ule i64 %9, %10
br i1 %11, label %12, label %13
12: ; preds = %2
store i32 0, i32* %3
br label %20
13: ; preds = %2
%14 = load %struct.vmbuf*, %struct.vmbuf** %4
%15 = load %struct.vmbuf*, %struct.vmbuf** %4
%16 = call i64 @vmbuf_size(%struct.vmbuf* %15)
%17 = load i64, i64* %5
%18 = add i64 %16, %17
%19 = call i32 @vmbuf_resize_to(%struct.vmbuf* %14, i64 %18)
store i32 %19, i32* %3
br label %20
20: ; preds = %13, %12
%21 = load i32, i32* %3
ret i32 %21
}

LLVM IR (-O2):
%struct.vmbuf = type { i32 }
define i32 @vmbuf_resize_if_less(%struct.vmbuf* %0, i64 %1) {
%3 = tail call i64 @vmbuf_wavail(%struct.vmbuf* %0)
%4 = icmp ult i64 %3, %1
br i1 %4, label %5, label %9
5: ; preds = %2
%6 = tail call i64 @vmbuf_size(%struct.vmbuf* %0)
%7 = add i64 %6, %1
%8 = tail call i32 @vmbuf_resize_to(%struct.vmbuf* %0, i64 %7)
br label %9
9: ; preds = %2, %5
%10 = phi i32 [ %8, %5 ], [ 0, %2 ]
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ _SC_NPROCESSORS_ONLN;
scalar_t__ sysconf(int /*<<< orphan*/);
int get_num_cores() { return (int)sysconf(_SC_NPROCESSORS_ONLN); }


x86 assembly (clang, -O0):
<get_num_cores>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ecd(%rip),%rax
mov    (%rax),%edi
call   1030 <sysconf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_num_cores>:
mov    0x2ed1(%rip),%rax
mov    (%rax),%edi
jmp    1030 <sysconf@plt>

LLVM IR (-O0):
@_SC_NPROCESSORS_ONLN = global i32 0
define i32 @get_num_cores() {
%1 = load i32, i32* @_SC_NPROCESSORS_ONLN
%2 = call i64 @sysconf(i32 %1)
%3 = trunc i64 %2 to i32
ret i32 %3
}

LLVM IR (-O2):
@_SC_NPROCESSORS_ONLN = global i32 0
define i32 @get_num_cores() {
%1 = load i32, i32* @_SC_NPROCESSORS_ONLN
%2 = tail call i64 @sysconf(i32 %1)
%3 = trunc i64 %2 to i32
ret i32 %3
}
/* Variables and functions */
int EINVAL;
__attribute__((visibility("default"))) int
sd_session_get_type(const char *session, char **type) {
  return -EINVAL;
}


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

x86 assembly (clang, -O2):
<sd_session_get_type>:
mov    0x2ed9(%rip),%rcx
xor    %eax,%eax
sub    (%rcx),%eax
ret

LLVM IR (-O0):
@EINVAL = global i32 0
define i32 @sd_session_get_type(i8* %0, i8** %1) {
%3 = alloca i8*
%4 = alloca i8**
store i8* %0, i8** %3
store i8** %1, i8*** %4
%5 = load i32, i32* @EINVAL
%6 = sub nsw i32 0, %5
ret i32 %6
}

LLVM IR (-O2):
@EINVAL = global i32 0
define i32 @sd_session_get_type(i8* nocapture readnone %0, i8** nocapture readnone %1) {
%3 = load i32, i32* @EINVAL
%4 = sub nsw i32 0, %3
ret i32 %4
}
char conv_itoc(char c) {
  if (c < 10) {
    return (char)(c + (char)'0');
  } else if (c < 37) {
    return (char)(c + (char)'A' - (char)10);
  }
  return (char)(-1);
}


x86 assembly (clang, -O0):
<conv_itoc>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x2(%rbp)
movsbl -0x2(%rbp),%eax
cmp    $0xa,%eax
jge    1126 <conv_itoc+0x26>
movsbl -0x2(%rbp),%eax
add    $0x30,%eax
mov    %al,-0x1(%rbp)
jmp    114e <conv_itoc+0x4e>
movsbl -0x2(%rbp),%eax
cmp    $0x25,%eax
jge    1145 <conv_itoc+0x45>
movsbl -0x2(%rbp),%eax
add    $0x41,%eax
sub    $0xa,%eax
mov    %al,-0x1(%rbp)
jmp    114e <conv_itoc+0x4e>
jmp    114a <conv_itoc+0x4a>
movb   $0xff,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<conv_itoc>:
lea    0x30(%rdi),%eax
lea    0x37(%rdi),%ecx
cmp    $0x25,%dil
movzbl %cl,%ecx
mov    $0xff,%edx
cmovl  %ecx,%edx
cmp    $0xa,%dil
movzbl %al,%eax
cmovge %edx,%eax
ret

LLVM IR (-O0):
define signext i8 @conv_itoc(i8 signext %0) {
%2 = alloca i8
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
%6 = icmp slt i32 %5, 10
br i1 %6, label %7, label %12
7: ; preds = %1
%8 = load i8, i8* %3
%9 = sext i8 %8 to i32
%10 = add nsw i32 %9, 48
%11 = trunc i32 %10 to i8
store i8 %11, i8* %2
br label %24
12: ; preds = %1
%13 = load i8, i8* %3
%14 = sext i8 %13 to i32
%15 = icmp slt i32 %14, 37
br i1 %15, label %16, label %22
16: ; preds = %12
%17 = load i8, i8* %3
%18 = sext i8 %17 to i32
%19 = add nsw i32 %18, 65
%20 = sub nsw i32 %19, 10
%21 = trunc i32 %20 to i8
store i8 %21, i8* %2
br label %24
22: ; preds = %12
br label %23
23: ; preds = %22
store i8 -1, i8* %2
br label %24
24: ; preds = %23, %16, %7
%25 = load i8, i8* %2
ret i8 %25
}

LLVM IR (-O2):
define signext i8 @conv_itoc(i8 signext %0) {
%2 = icmp slt i8 %0, 10
%3 = add i8 %0, 48
%4 = icmp slt i8 %0, 37
%5 = add i8 %0, 55
%6 = select i1 %4, i8 %5, i8 -1
%7 = select i1 %2, i8 %3, i8 %6
ret i8 %7
}
/* Variables and functions */
int /*<<< orphan*/ link_failure_scalbln();
scalar_t__ scalbln(double, long);
void test_scalbln(double d, long int x) {
  if (scalbln(d, x) != scalbln(d, x))
    link_failure_scalbln();
}


x86 assembly (clang, -O0):
<test_scalbln>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
mov    %rdi,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
mov    -0x10(%rbp),%rdi
call   1040 <scalbln@plt>
mov    %rax,-0x18(%rbp)
movsd  -0x8(%rbp),%xmm0
mov    -0x10(%rbp),%rdi
call   1040 <scalbln@plt>
mov    %rax,%rcx
mov    -0x18(%rbp),%rax
cmp    %rcx,%rax
je     1168 <test_scalbln+0x48>
mov    $0x0,%al
call   1030 <link_failure_scalbln@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_scalbln>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
movsd  %xmm0,(%rsp)
call   1040 <scalbln@plt>
mov    %rax,%r14
movsd  (%rsp),%xmm0
mov    %rbx,%rdi
call   1040 <scalbln@plt>
cmp    %rax,%r14
jne    114e <test_scalbln+0x2e>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <link_failure_scalbln@plt>

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

LLVM IR (-O2):
define void @test_scalbln(double %0, i64 %1) {
%3 = tail call i64 @scalbln(double %0, i64 %1)
%4 = tail call i64 @scalbln(double %0, i64 %1)
%5 = icmp eq i64 %3, %4
br i1 %5, label %8, label %6
6: ; preds = %2
%7 = tail call i32 (...) @link_failure_scalbln()
br label %8
8: ; preds = %6, %2
ret void
}
/* Type definitions */
struct map_ent {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ map_delete(struct map_ent **, char *);
int /*<<< orphan*/ map_free(struct map_ent *);
int /*<<< orphan*/ map_write(struct map_ent *);
void map_remove(struct map_ent **mapp, char *devnm) {
  if (devnm[0] == 0)
    return;
  map_delete(mapp, devnm);
  map_write(*mapp);
  map_free(*mapp);
}


x86 assembly (clang, -O0):
<map_remove>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
jne    1155 <map_remove+0x25>
jmp    117a <map_remove+0x4a>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1050 <map_delete@plt>
mov    -0x8(%rbp),%rax
mov    (%rax),%rdi
call   1040 <map_write@plt>
mov    -0x8(%rbp),%rax
mov    (%rax),%rdi
call   1030 <map_free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<map_remove>:
push   %rbx
cmpb   $0x0,(%rsi)
je     114f <map_remove+0x1f>
mov    %rdi,%rbx
call   1050 <map_delete@plt>
mov    (%rbx),%rdi
call   1040 <map_write@plt>
mov    (%rbx),%rdi
pop    %rbx
jmp    1030 <map_free@plt>
pop    %rbx
ret

LLVM IR (-O0):
%struct.map_ent = type { i32 }
define void @map_remove(%struct.map_ent** %0, i8* %1) {
%3 = alloca %struct.map_ent**
%4 = alloca i8*
store %struct.map_ent** %0, %struct.map_ent*** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %4
%6 = getelementptr inbounds i8, i8* %5, i64 0
%7 = load i8, i8* %6
%8 = sext i8 %7 to i32
%9 = icmp eq i32 %8, 0
br i1 %9, label %10, label %11
10: ; preds = %2
br label %21
11: ; preds = %2
%12 = load %struct.map_ent**, %struct.map_ent*** %3
%13 = load i8*, i8** %4
%14 = call i32 @map_delete(%struct.map_ent** %12, i8* %13)
%15 = load %struct.map_ent**, %struct.map_ent*** %3
%16 = load %struct.map_ent*, %struct.map_ent** %15
%17 = call i32 @map_write(%struct.map_ent* %16)
%18 = load %struct.map_ent**, %struct.map_ent*** %3
%19 = load %struct.map_ent*, %struct.map_ent** %18
%20 = call i32 @map_free(%struct.map_ent* %19)
br label %21
21: ; preds = %11, %10
ret void
}

LLVM IR (-O2):
%struct.map_ent = type { i32 }
define void @map_remove(%struct.map_ent** %0, i8* %1) {
%3 = load i8, i8* %1
%4 = icmp eq i8 %3, 0
br i1 %4, label %11, label %5
5: ; preds = %2
%6 = tail call i32 @map_delete(%struct.map_ent** %0, i8* %1)
%7 = load %struct.map_ent*, %struct.map_ent** %0
%8 = tail call i32 @map_write(%struct.map_ent* %7)
%9 = load %struct.map_ent*, %struct.map_ent** %0
%10 = tail call i32 @map_free(%struct.map_ent* %9)
br label %11
11: ; preds = %2, %5
ret void
}
/* Variables and functions */
double RAND_MAX;
scalar_t__ rand();
int round(double);
int rnd(int N) { return round((double)rand() / RAND_MAX * (N - 1)); }


x86 assembly (clang, -O0):
<rnd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x0,%al
call   1040 <rand@plt>
cvtsi2sd %rax,%xmm0
mov    0x2eaa(%rip),%rax
divsd  (%rax),%xmm0
mov    -0x4(%rbp),%eax
sub    $0x1,%eax
cvtsi2sd %eax,%xmm1
mulsd  %xmm1,%xmm0
call   1030 <round@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rnd>:
push   %rbx
mov    %edi,%ebx
xor    %eax,%eax
call   1040 <rand@plt>
cvtsi2sd %rax,%xmm1
mov    0x2eb2(%rip),%rax
divsd  (%rax),%xmm1
add    $0xffffffff,%ebx
cvtsi2sd %ebx,%xmm0
mulsd  %xmm1,%xmm0
pop    %rbx
jmp    1030 <round@plt>

LLVM IR (-O0):
@RAND_MAX = global double 0.000000e+00
define i32 @rnd(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i64 (...) @rand()
%4 = sitofp i64 %3 to double
%5 = load double, double* @RAND_MAX
%6 = fdiv double %4, %5
%7 = load i32, i32* %2
%8 = sub nsw i32 %7, 1
%9 = sitofp i32 %8 to double
%10 = fmul double %6, %9
%11 = call i32 @round(double %10)
ret i32 %11
}

LLVM IR (-O2):
@RAND_MAX = global double 0.000000e+00
define i32 @rnd(i32 %0) {
%2 = tail call i64 (...) @rand()
%3 = sitofp i64 %2 to double
%4 = load double, double* @RAND_MAX
%5 = fdiv double %3, %4
%6 = add nsw i32 %0, -1
%7 = sitofp i32 %6 to double
%8 = fmul double %5, %7
%9 = tail call i32 @round(double %8)
ret i32 %9
}
int test_imm_EFuint8_reg(unsigned char val) {
  return ((val) & (0xEF << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_EFuint8_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%edx
and    $0xef,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_EFuint8_reg>:
test   $0xef,%dil
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_EFuint8_reg(i8 zeroext %0) {
%2 = and i8 %0, -17
%3 = icmp eq i8 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
float iColorReconstruct(unsigned char value) {
  if (value <= 0)
    return 0.0f;
  if (value >= 255)
    return 1.0f;
  return (((float)value + 0.5f) / 256.0f);
}


x86 assembly (clang, -O0):
<iColorReconstruct>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movzbl -0x5(%rbp),%eax
cmp    $0x0,%eax
jg     1124 <iColorReconstruct+0x24>
xorps  %xmm0,%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    116a <iColorReconstruct+0x6a>
movzbl -0x5(%rbp),%eax
cmp    $0xff,%eax
jl     1145 <iColorReconstruct+0x45>
movss  0xecd(%rip),%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    116a <iColorReconstruct+0x6a>
movzbl -0x5(%rbp),%eax
cvtsi2ss %eax,%xmm0
movss  0xeaf(%rip),%xmm1
addss  %xmm1,%xmm0
movss  0xe9f(%rip),%xmm1
divss  %xmm1,%xmm0
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<iColorReconstruct>:
test   %edi,%edi
je     1113 <iColorReconstruct+0x13>
cmp    $0xff,%dil
jne    1117 <iColorReconstruct+0x17>
movss  0xeee(%rip),%xmm0
ret
xorps  %xmm0,%xmm0
ret
movzbl %dil,%eax
cvtsi2ss %eax,%xmm0
addss  0xedd(%rip),%xmm0
mulss  0xed9(%rip),%xmm0
ret

LLVM IR (-O0):
define float @iColorReconstruct(i8 zeroext %0) {
%2 = alloca float
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = zext i8 %4 to i32
%6 = icmp sle i32 %5, 0
br i1 %6, label %7, label %8
7: ; preds = %1
store float 0.000000e+00, float* %2
br label %18
8: ; preds = %1
%9 = load i8, i8* %3
%10 = zext i8 %9 to i32
%11 = icmp sge i32 %10, 255
br i1 %11, label %12, label %13
12: ; preds = %8
store float 1.000000e+00, float* %2
br label %18
13: ; preds = %8
%14 = load i8, i8* %3
%15 = uitofp i8 %14 to float
%16 = fadd float %15, 5.000000e-01
%17 = fdiv float %16, 2.560000e+02
store float %17, float* %2
br label %18
18: ; preds = %13, %12, %7
%19 = load float, float* %2
ret float %19
}

LLVM IR (-O2):
define float @iColorReconstruct(i8 zeroext %0) {
switch i8 %0, label %3 [
i8 0, label %7
i8 -1, label %2
]
2: ; preds = %1
br label %7
3: ; preds = %1
%4 = uitofp i8 %0 to float
%5 = fadd float %4, 5.000000e-01
%6 = fmul float %5, 3.906250e-03
br label %7
7: ; preds = %1, %3, %2
%8 = phi float [ 1.000000e+00, %2 ], [ %6, %3 ], [ 0.000000e+00, %1 ]
ret float %8
}