xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void menu() {
  printf("\nDigite 1 para inserir Ponto;\n");
  printf("Digite 2 para inserir Objeto;\n");
  printf("Digite 3 para encerrar.\n");
}


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

x86 assembly (clang, -O2):
<menu>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
lea    0xefa(%rip),%rdi
call   1030 <puts@plt>
lea    0xf0c(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [31 x i8] c"\0ADigite 1 para inserir Ponto;\0A\00"
@.str.1 = [31 x i8] c"Digite 2 para inserir Objeto;\0A\00"
@.str.2 = [25 x i8] c"Digite 3 para encerrar.\0A\00"
define void @menu() {
%1 = call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.2, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [30 x i8] c"\0ADigite 1 para inserir Ponto;\00"
@str.3 = [30 x i8] c"Digite 2 para inserir Objeto;\00"
@str.4 = [24 x i8] c"Digite 3 para encerrar.\00"
define void @menu() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @str.3, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @str.4, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ _wymix32(unsigned int *, unsigned int *);
unsigned wy32x32(unsigned a, unsigned b) {
  _wymix32(&a, &b);
  _wymix32(&a, &b);
  return a ^ b;
}


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

x86 assembly (clang, -O2):
<wy32x32>:
push   %r14
push   %rbx
push   %rax
mov    %edi,0x4(%rsp)
mov    %esi,(%rsp)
lea    0x4(%rsp),%rbx
mov    %rsp,%r14
mov    %rbx,%rdi
mov    %r14,%rsi
call   1030 <_wymix32@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1030 <_wymix32@plt>
mov    (%rsp),%eax
xor    0x4(%rsp),%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i32 @wy32x32(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = call i32 @_wymix32(i32* %3, i32* %4)
%6 = call i32 @_wymix32(i32* %3, i32* %4)
%7 = load i32, i32* %3
%8 = load i32, i32* %4
%9 = xor i32 %7, %8
ret i32 %9
}

LLVM IR (-O2):
define i32 @wy32x32(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = call i32 @_wymix32(i32* %3, i32* %4)
%6 = call i32 @_wymix32(i32* %3, i32* %4)
%7 = load i32, i32* %3
%8 = load i32, i32* %4
%9 = xor i32 %8, %7
ret i32 %9
}
void pcommit_sfence(void) {}


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

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

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

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


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

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

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

LLVM IR (-O2):
define void @gtk_vscrollbar_get_type() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ perror(char *);
void my_err(char *str) {
  perror(str);
  exit(1);
}


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

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

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

LLVM IR (-O2):
define void @my_err(i8* nocapture %0) {
%2 = tail call i32 @perror(i8* %0)
%3 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ emit(char *);
void register_function_name(char *function_name) {
  emit("\n.global ");
  emit(function_name);
  emit("\n");
}


x86 assembly (clang, -O0):
<register_function_name>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xedd(%rip),%rdi
call   1030 <emit@plt>
mov    -0x8(%rbp),%rdi
call   1030 <emit@plt>
lea    0xed2(%rip),%rdi
call   1030 <emit@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<register_function_name>:
push   %rbx
mov    %rdi,%rbx
lea    0xee5(%rip),%rdi
call   1030 <emit@plt>
mov    %rbx,%rdi
call   1030 <emit@plt>
lea    0xedb(%rip),%rdi
pop    %rbx
jmp    1030 <emit@plt>

LLVM IR (-O0):
@.str = [10 x i8] c"\0A.global \00"
@.str.1 = [2 x i8] c"\0A\00"
define void @register_function_name(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 @emit(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
%4 = load i8*, i8** %2
%5 = call i32 @emit(i8* %4)
%6 = call i32 @emit(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [10 x i8] c"\0A.global \00"
@.str.1 = [2 x i8] c"\0A\00"
define void @register_function_name(i8* %0) {
%2 = tail call i32 @emit(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @emit(i8* %0)
%4 = tail call i32 @emit(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
ret void
}
pick(s) char *s;
{
  fprintf("%s? ", s);
  if (ttyin() == 'y')
    printf("%s\n", s);
}


x86 assembly (clang, -O0):
<pick>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rsi
lea    0xeb9(%rip),%rdi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    $0x0,%al
call   1030 <ttyin@plt>
cmp    $0x79,%eax
jne    1170 <pick+0x40>
mov    -0x10(%rbp),%rsi
lea    0xe9c(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pick>:
push   %rbx
mov    %rdi,%rbx
lea    0xec5(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1050 <fprintf@plt>
xor    %eax,%eax
call   1040 <ttyin@plt>
cmp    $0x79,%eax
jne    1159 <pick+0x29>
mov    %rbx,%rdi
call   1030 <puts@plt>
pop    %rbx
ret

LLVM IR (-O0):
@.str = [5 x i8] c"%s? \00"
@.str.1 = [4 x i8] c"%s\0A\00"
define i32 @pick(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
store i8* %0, i8** %3
%4 = load i8*, i8** %3
%5 = call i32 (i8*, i8*, ...) bitcast (i32 (...)* @fprintf to i32 (i8*, i8*, ...)*)(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = call i32 (...) @ttyin()
%7 = icmp eq i32 %6, 121
br i1 %7, label %8, label %11
8: ; preds = %1
%9 = load i8*, i8** %3
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %9)
br label %11
11: ; preds = %8, %1
%12 = load i32, i32* %2
ret i32 %12
}

LLVM IR (-O2):
@.str = [5 x i8] c"%s? \00"
define i32 @pick(i8* %0) {
%2 = tail call i32 (i8*, i8*, ...) bitcast (i32 (...)* @fprintf to i32 (i8*, i8*, ...)*)(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = tail call i32 (...) @ttyin()
%4 = icmp eq i32 %3, 121
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = tail call i32 @puts(i8* dereferenceable(1) %0)
br label %7
7: ; preds = %5, %1
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
void xterm_sigchld(int foo) { exit(0); }


x86 assembly (clang, -O0):
<xterm_sigchld>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
xor    %edi,%edi
call   1030 <exit@plt>

x86 assembly (clang, -O2):
<xterm_sigchld>:
push   %rax
xor    %edi,%edi
call   1030 <exit@plt>

LLVM IR (-O0):
define void @xterm_sigchld(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
define void @xterm_sigchld(i32 %0) {
%2 = tail call i32 @exit(i32 0)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ succeed();
int main() {
  succeed();
  printf("ok\n");
  return 0;
}


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

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

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

LLVM IR (-O2):
@str = [3 x i8] c"ok\00"
define i32 @main() {
%1 = tail call i32 (...) @succeed()
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
int isqrt(int);
void t_sqrt_186() {
  Assert_real((isqrt(186) == 13),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/stdlib/isqrt.c",
              935, ("Integer square root of 186 should be 13"));
}


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

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

LLVM IR (-O0):
@.str = [162 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/stdlib/isqrt.c\00"
@.str.1 = [40 x i8] c"Integer square root of 186 should be 13\00"
define void @t_sqrt_186() {
%1 = call i32 @isqrt(i32 186)
%2 = icmp eq i32 %1, 13
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([162 x i8], [162 x i8]* @.str, i64 0, i64 0), i32 935, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [162 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/stdlib/isqrt.c\00"
@.str.1 = [40 x i8] c"Integer square root of 186 should be 13\00"
define void @t_sqrt_186() {
%1 = tail call i32 @isqrt(i32 186)
%2 = icmp eq i32 %1, 13
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([162 x i8], [162 x i8]* @.str, i64 0, i64 0), i32 935, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int mkfifo(char *, int);
int /*<<< orphan*/ perror(char *);
int main7(int argc, char *argv[]) {
  int fd;
  fd = mkfifo(argv[1], 0777);
  if (fd < 0) {
    perror("ERROR MKFIFO\n");
    exit(1);
  }
  exit(0);
}


x86 assembly (clang, -O0):
<main7>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
mov    $0x1ff,%esi
call   1030 <mkfifo@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
jge    1174 <main7+0x44>
lea    0xe9b(%rip),%rdi
call   1040 <perror@plt>
mov    $0x1,%edi
call   1050 <exit@plt>
xor    %edi,%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<main7>:
push   %rax
mov    0x8(%rsi),%rdi
mov    $0x1ff,%esi
call   1030 <mkfifo@plt>
test   %eax,%eax
jns    1159 <main7+0x29>
lea    0xeb6(%rip),%rdi
call   1040 <perror@plt>
mov    $0x1,%edi
call   1050 <exit@plt>
xor    %edi,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [14 x i8] c"ERROR MKFIFO\0A\00"
define i32 @main7(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
%5 = alloca i32
store i32 %0, i32* %3
store i8** %1, i8*** %4
%6 = load i8**, i8*** %4
%7 = getelementptr inbounds i8*, i8** %6, i64 1
%8 = load i8*, i8** %7
%9 = call i32 @mkfifo(i8* %8, i32 511)
store i32 %9, i32* %5
%10 = load i32, i32* %5
%11 = icmp slt i32 %10, 0
br i1 %11, label %12, label %15
12: ; preds = %2
%13 = call i32 @perror(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%14 = call i32 @exit(i32 1)
unreachable
15: ; preds = %2
%16 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@.str = [14 x i8] c"ERROR MKFIFO\0A\00"
define i32 @main7(i32 %0, i8** nocapture %1) {
%3 = getelementptr inbounds i8*, i8** %1, i64 1
%4 = load i8*, i8** %3
%5 = tail call i32 @mkfifo(i8* %4, i32 511)
%6 = icmp slt i32 %5, 0
br i1 %6, label %7, label %10
7: ; preds = %2
%8 = tail call i32 @perror(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%9 = tail call i32 @exit(i32 1)
unreachable
10: ; preds = %2
%11 = tail call i32 @exit(i32 0)
unreachable
}
/* Variables and functions */
char *MakeCRC(char *);
int /*<<< orphan*/ printf(char *, char *, char *);
int main(int argc, char *argv[]) {
  char *Data, *Result;
  Data = argv[1];
  Result = MakeCRC(Data);
  printf("CRC of [%s] is [%s] with P=[100101]\n", Data, Result);
  return (0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
call   1030 <MakeCRC@plt>
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rsi
mov    -0x20(%rbp),%rdx
lea    0xea2(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    0x8(%rsi),%rbx
mov    %rbx,%rdi
call   1030 <MakeCRC@plt>
lea    0xecc(%rip),%rdi
mov    %rbx,%rsi
mov    %rax,%rdx
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [37 x i8] c"CRC of [%s] is [%s] with P=[100101]\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i8*
%7 = alloca i8*
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%8 = load i8**, i8*** %5
%9 = getelementptr inbounds i8*, i8** %8, i64 1
%10 = load i8*, i8** %9
store i8* %10, i8** %6
%11 = load i8*, i8** %6
%12 = call i8* @MakeCRC(i8* %11)
store i8* %12, i8** %7
%13 = load i8*, i8** %6
%14 = load i8*, i8** %7
%15 = call i32 @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0), i8* %13, i8* %14)
ret i32 0
}

LLVM IR (-O2):
@.str = [37 x i8] c"CRC of [%s] is [%s] with P=[100101]\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = getelementptr inbounds i8*, i8** %1, i64 1
%4 = load i8*, i8** %3
%5 = tail call i8* @MakeCRC(i8* %4)
%6 = tail call i32 @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0), i8* %4, i8* %5)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ *fopen(char *, char *);
FILE *e_open_file(char *fname) {
  FILE *fp;
  fp = fopen(fname, "r");
  return fp;
}


x86 assembly (clang, -O0):
<e_open_file>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xed9(%rip),%rsi
call   1030 <fopen@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<e_open_file>:
lea    0xee9(%rip),%rsi
jmp    1030 <fopen@plt>

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

LLVM IR (-O2):
@.str = [2 x i8] c"r\00"
define noalias i32* @e_open_file(i8* nocapture %0) {
%2 = tail call i32* @fopen(i8* %0, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
ret i32* %2
}
void finishup(start_time) long start_time;
{
  long end_time;
  end_time = time((long *)0);
  printf("\nend time = %s\n", ctime(&end_time));
  printf("elapsed time = %4.2f hours\n", ((end_time - start_time) / 3600.0));
}


x86 assembly (clang, -O0):
<finishup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
xor    %eax,%eax
mov    %eax,%edi
mov    $0x0,%al
call   1050 <time@plt>
cltq
mov    %rax,-0x10(%rbp)
lea    -0x10(%rbp),%rdi
mov    $0x0,%al
call   1030 <ctime@plt>
mov    %eax,%esi
lea    0xea7(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x10(%rbp),%rax
sub    -0x8(%rbp),%rax
cvtsi2sd %rax,%xmm0
movsd  0xe83(%rip),%xmm1
divsd  %xmm1,%xmm0
lea    0xe90(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<finishup>:
push   %rbx
sub    $0x10,%rsp
mov    %rdi,%rbx
xor    %edi,%edi
xor    %eax,%eax
call   1050 <time@plt>
cltq
mov    %rax,0x8(%rsp)
lea    0x8(%rsp),%rdi
xor    %eax,%eax
call   1030 <ctime@plt>
lea    0xead(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x8(%rsp),%rax
sub    %rbx,%rax
cvtsi2sd %rax,%xmm0
divsd  0xe87(%rip),%xmm0
lea    0xe98(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [16 x i8] c"\0Aend time = %s\0A\00"
@.str.1 = [28 x i8] c"elapsed time = %4.2f hours\0A\00"
define void @finishup(i64 %0) {
%2 = alloca i64
%3 = alloca i64
store i64 %0, i64* %2
%4 = call i32 (i64*, ...) bitcast (i32 (...)* @time to i32 (i64*, ...)*)(i64* null)
%5 = sext i32 %4 to i64
store i64 %5, i64* %3
%6 = call i32 (i64*, ...) bitcast (i32 (...)* @ctime to i32 (i64*, ...)*)(i64* %3)
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i32 %6)
%8 = load i64, i64* %3
%9 = load i64, i64* %2
%10 = sub nsw i64 %8, %9
%11 = sitofp i64 %10 to double
%12 = fdiv double %11, 3.600000e+03
%13 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.1, i64 0, i64 0), double %12)
ret void
}

LLVM IR (-O2):
@.str = [16 x i8] c"\0Aend time = %s\0A\00"
@.str.1 = [28 x i8] c"elapsed time = %4.2f hours\0A\00"
define void @finishup(i64 %0) {
%2 = alloca i64
%3 = bitcast i64* %2 to i8*
%4 = tail call i32 (i64*, ...) bitcast (i32 (...)* @time to i32 (i64*, ...)*)(i64* null)
%5 = sext i32 %4 to i64
store i64 %5, i64* %2
%6 = call i32 (i64*, ...) bitcast (i32 (...)* @ctime to i32 (i64*, ...)*)(i64* %2)
%7 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i32 %6)
%8 = load i64, i64* %2
%9 = sub nsw i64 %8, %0
%10 = sitofp i64 %9 to double
%11 = fdiv double %10, 3.600000e+03
%12 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @.str.1, i64 0, i64 0), double %11)
ret void
}
int am33xx_bbu_nand_register_handler(const char *device) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @am33xx_bbu_nand_register_handler(i8* nocapture readnone %0) {
ret i32 0
}
/* Variables and functions */
int __get_array_size(void *);
int /*<<< orphan*/ __infer_set_flag(char *, char *);
void *memset(void *s, int c, size_t n) {
  int size_s;
  __infer_set_flag("ignore_return", "");
  size_s = __get_array_size(s);
  if (n > size_s)
    while (1)
      ;
  return s;
}


x86 assembly (clang, -O0):
<memset>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
lea    0xec6(%rip),%rdi
lea    0xecc(%rip),%rsi
call   1030 <__infer_set_flag@plt>
mov    -0x8(%rbp),%rdi
call   1040 <__get_array_size@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x18(%rbp),%rax
movslq -0x1c(%rbp),%rcx
cmp    %rcx,%rax
jbe    116d <memset+0x4d>
jmp    1168 <memset+0x48>
jmp    1168 <memset+0x48>
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<memset>:
push   %r14
push   %rbx
push   %rax
mov    %rdx,%r14
mov    %rdi,%rbx
lea    0xecf(%rip),%rdi
lea    0xed5(%rip),%rsi
call   1030 <__infer_set_flag@plt>
mov    %rbx,%rdi
call   1040 <__get_array_size@plt>
cltq
cmp    %r14,%rax
jae    1152 <memset+0x32>
nopl   0x0(%rax)
jmp    1150 <memset+0x30>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [14 x i8] c"ignore_return\00"
@.str.1 = [1 x i8] zeroinitializer
define i8* @memset(i8* %0, i32 %1, i64 %2) {
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i64
%7 = alloca i32
store i8* %0, i8** %4
store i32 %1, i32* %5
store i64 %2, i64* %6
%8 = call i32 @__infer_set_flag(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0))
%9 = load i8*, i8** %4
%10 = call i32 @__get_array_size(i8* %9)
store i32 %10, i32* %7
%11 = load i64, i64* %6
%12 = load i32, i32* %7
%13 = sext i32 %12 to i64
%14 = icmp ugt i64 %11, %13
br i1 %14, label %15, label %17
15: ; preds = %3
br label %16
16: ; preds = %15, %16
br label %16
17: ; preds = %3
%18 = load i8*, i8** %4
ret i8* %18
}

LLVM IR (-O2):
@.str = [14 x i8] c"ignore_return\00"
@.str.1 = [1 x i8] zeroinitializer
define i8* @memset(i8* returned %0, i32 %1, i64 %2) {
%4 = tail call i32 @__infer_set_flag(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0))
%5 = tail call i32 @__get_array_size(i8* %0)
%6 = sext i32 %5 to i64
%7 = icmp ult i64 %6, %2
br i1 %7, label %8, label %9
8: ; preds = %3, %8
br label %8
9: ; preds = %3
ret i8* %0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int pa_ip_acl_check() {
  printf("NOT IMPLEMENTED:"
         "pa_ip_acl_check"
         "\n");
}


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

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

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

LLVM IR (-O2):
@str = [32 x i8] c"NOT IMPLEMENTED:pa_ip_acl_check\00"
define i32 @pa_ip_acl_check() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @str, i64 0, i64 0))
ret i32 undef
}
float toDegrees(float radians) {
  return radians * 180.0f / 3.14159265358979323846f;
}


x86 assembly (clang, -O0):
<toDegrees>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  0xef3(%rip),%xmm0
mulss  -0x4(%rbp),%xmm0
movss  0xee2(%rip),%xmm1
divss  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<toDegrees>:
mulss  0xef8(%rip),%xmm0
divss  0xef4(%rip),%xmm0
ret

LLVM IR (-O0):
define float @toDegrees(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = fmul float %3, 1.800000e+02
%5 = fdiv float %4, 0x400921FB60000000
ret float %5
}

LLVM IR (-O2):
define float @toDegrees(float %0) {
%2 = fmul float %0, 1.800000e+02
%3 = fdiv float %2, 0x400921FB60000000
ret float %3
}
/* Variables and functions */
int /*<<< orphan*/ Inst_Printf(char *, char *, ...);
void Jump(char *label) {
  Inst_Printf("la", "$25,%s", label);
  Inst_Printf("j", "$25");
}


x86 assembly (clang, -O0):
<Jump>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdx
lea    0xed9(%rip),%rdi
lea    0xed5(%rip),%rsi
mov    $0x0,%al
call   1030 <Inst_Printf@plt>
lea    0xece(%rip),%rdi
lea    0xec9(%rip),%rsi
mov    $0x0,%al
call   1030 <Inst_Printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Jump>:
push   %rax
mov    %rdi,%rdx
lea    0xee5(%rip),%rdi
lea    0xee1(%rip),%rsi
xor    %eax,%eax
call   1030 <Inst_Printf@plt>
lea    0xeda(%rip),%rdi
lea    0xed5(%rip),%rsi
xor    %eax,%eax
pop    %rcx
jmp    1030 <Inst_Printf@plt>

LLVM IR (-O0):
@.str = [3 x i8] c"la\00"
@.str.1 = [7 x i8] c"$25,%s\00"
@.str.2 = [2 x i8] c"j\00"
@.str.3 = [4 x i8] c"$25\00"
define void @Jump(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 (i8*, i8*, ...) @Inst_Printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i8* %3)
%5 = call i32 (i8*, i8*, ...) @Inst_Printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [3 x i8] c"la\00"
@.str.1 = [7 x i8] c"$25,%s\00"
@.str.2 = [2 x i8] c"j\00"
@.str.3 = [4 x i8] c"$25\00"
define void @Jump(i8* %0) {
%2 = tail call i32 (i8*, i8*, ...) @Inst_Printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i8* %0)
%3 = tail call i32 (i8*, i8*, ...) @Inst_Printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0))
ret void
}
void test39_Test0_pollen__run__E() {}


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

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

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

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


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

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

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

LLVM IR (-O2):
define void @gtk_widget_reset_rc_styles() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ ot(char *);
defword() { ot("long\t"); }


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

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

LLVM IR (-O0):
@.str = [6 x i8] c"long\09\00"
define i32 @defword() {
%1 = alloca i32
%2 = call i32 @ot(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
@.str = [6 x i8] c"long\09\00"
define i32 @defword() {
%1 = tail call i32 @ot(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isgraph(int);
void t_isgraph_0x86() {
  Assert_real((isgraph(134) == 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",
              675, ("isgraph should be 0 for 0x86"));
}


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

x86 assembly (clang, -O2):
<t_isgraph_0x86>:
push   %rax
mov    $0x86,%edi
call   1040 <isgraph@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x2a3,%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 0x86\00"
define void @t_isgraph_0x86() {
%1 = call i64 @isgraph(i32 134)
%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 675, 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 0x86\00"
define void @t_isgraph_0x86() {
%1 = tail call i64 @isgraph(i32 134)
%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 675, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
void disable_interrupts() { __asm__("cli"); }


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

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

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

LLVM IR (-O2):
define void @disable_interrupts() {
tail call void asm sideeffect "cli", "~{dirflag},~{fpsr},~{flags}"()
ret void
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
int /*<<< orphan*/ ASSERT(int);
int /*<<< orphan*/ IntDisable(int);
int /*<<< orphan*/ IntUnregister(int);
int _OneWireIntNumberGet(int);
void OneWireIntUnregister(uint32_t ui32Base) {
  uint32_t ui32Int;
  ASSERT(ui32Base == 0x400B6000);
  ui32Int = _OneWireIntNumberGet(ui32Base);
  ASSERT(ui32Int != 0);
  IntDisable(ui32Int);
  IntUnregister(ui32Int);
}


x86 assembly (clang, -O0):
<OneWireIntUnregister>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x400b6000,-0x4(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1050 <ASSERT@plt>
mov    -0x4(%rbp),%edi
call   1040 <_OneWireIntNumberGet@plt>
mov    %eax,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
setne  %al
and    $0x1,%al
movzbl %al,%edi
call   1050 <ASSERT@plt>
mov    -0x8(%rbp),%edi
call   1030 <IntDisable@plt>
mov    -0x8(%rbp),%edi
call   1060 <IntUnregister@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<OneWireIntUnregister>:
push   %rbx
mov    %edi,%ebx
xor    %edi,%edi
cmp    $0x400b6000,%ebx
sete   %dil
call   1050 <ASSERT@plt>
mov    %ebx,%edi
call   1040 <_OneWireIntNumberGet@plt>
mov    %eax,%ebx
xor    %edi,%edi
test   %eax,%eax
setne  %dil
call   1050 <ASSERT@plt>
mov    %ebx,%edi
call   1030 <IntDisable@plt>
mov    %ebx,%edi
pop    %rbx
jmp    1060 <IntUnregister@plt>

LLVM IR (-O0):
define void @OneWireIntUnregister(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = icmp eq i32 %4, 1074487296
%6 = zext i1 %5 to i32
%7 = call i32 @ASSERT(i32 %6)
%8 = load i32, i32* %2
%9 = call i32 @_OneWireIntNumberGet(i32 %8)
store i32 %9, i32* %3
%10 = load i32, i32* %3
%11 = icmp ne i32 %10, 0
%12 = zext i1 %11 to i32
%13 = call i32 @ASSERT(i32 %12)
%14 = load i32, i32* %3
%15 = call i32 @IntDisable(i32 %14)
%16 = load i32, i32* %3
%17 = call i32 @IntUnregister(i32 %16)
ret void
}

LLVM IR (-O2):
define void @OneWireIntUnregister(i32 %0) {
%2 = icmp eq i32 %0, 1074487296
%3 = zext i1 %2 to i32
%4 = tail call i32 @ASSERT(i32 %3)
%5 = tail call i32 @_OneWireIntNumberGet(i32 %0)
%6 = icmp ne i32 %5, 0
%7 = zext i1 %6 to i32
%8 = tail call i32 @ASSERT(i32 %7)
%9 = tail call i32 @IntDisable(i32 %5)
%10 = tail call i32 @IntUnregister(i32 %5)
ret void
}
char read08(unsigned long reg1) {
  unsigned long *reg;
  signed char val;
  reg = (unsigned long *)reg1;
  val = (char)(*reg);
  return val;
}


x86 assembly (clang, -O0):
<read08>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
mov    %al,-0x11(%rbp)
movsbl -0x11(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<read08>:
mov    (%rdi),%al
ret

LLVM IR (-O0):
define signext i8 @read08(i64 %0) {
%2 = alloca i64
%3 = alloca i64*
%4 = alloca i8
store i64 %0, i64* %2
%5 = load i64, i64* %2
%6 = inttoptr i64 %5 to i64*
store i64* %6, i64** %3
%7 = load i64*, i64** %3
%8 = load i64, i64* %7
%9 = trunc i64 %8 to i8
store i8 %9, i8* %4
%10 = load i8, i8* %4
ret i8 %10
}

LLVM IR (-O2):
define signext i8 @read08(i64 %0) {
%2 = inttoptr i64 %0 to i64*
%3 = load i64, i64* %2
%4 = trunc i64 %3 to i8
ret i8 %4
}
/* Type definitions */
typedef scalar_t__ uint32_t;

/* Variables and functions */
scalar_t__ HAL_EEPROM_Length();
bool checkAddress(uint32_t address) {
  if (address >= 0 && address < HAL_EEPROM_Length()) {
    return true;
  } else {
    return false;
  }
}


x86 assembly (clang, -O0):
<checkAddress>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jl     1152 <checkAddress+0x42>
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    $0x0,%al
call   1030 <HAL_EEPROM_Length@plt>
mov    %rax,%rcx
mov    -0x18(%rbp),%rax
cmp    %rcx,%rax
jge    1152 <checkAddress+0x42>
movl   $0x1,-0x4(%rbp)
jmp    1159 <checkAddress+0x49>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<checkAddress>:
test   %rdi,%rdi
js     112e <checkAddress+0x1e>
push   %rbx
mov    %rdi,%rbx
xor    %eax,%eax
call   1030 <HAL_EEPROM_Length@plt>
mov    %rax,%rcx
mov    $0x1,%eax
cmp    %rbx,%rcx
pop    %rbx
jg     1130 <checkAddress+0x20>
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @checkAddress(i64 %0) {
%2 = icmp sgt i64 %0, -1
br i1 %2, label %3, label %6
3: ; preds = %1
%4 = tail call i64 (...) @HAL_EEPROM_Length()
%5 = icmp sgt i64 %4, %0
br i1 %5, label %7, label %6
6: ; preds = %3, %1
br label %7
7: ; preds = %3, %6
%8 = phi i32 [ 0, %6 ], [ 1, %3 ]
ret i32 %8
}
/* Type definitions */
typedef int uint32_t;
typedef int int16_t;

/* Variables and functions */
float ldexpf(float, int);
float unpack_float(uint32_t value) {
  if (value == 0) {
    return 0.0f;
  }
  int exp = (int16_t)(value >> 16);
  float fractional = (float)(int16_t)(value & 0xffff) / 0x8000;
  return ldexpf(fractional, exp);
}


x86 assembly (clang, -O0):
<unpack_float>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jne    1132 <unpack_float+0x22>
xorps  %xmm0,%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    116a <unpack_float+0x5a>
mov    -0x8(%rbp),%eax
sar    $0x10,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
and    $0xffff,%eax
cvtsi2ss %eax,%xmm0
movss  0xeb1(%rip),%xmm1
divss  %xmm1,%xmm0
movss  %xmm0,-0x10(%rbp)
movss  -0x10(%rbp),%xmm0
mov    -0xc(%rbp),%edi
call   1030 <ldexpf@plt>
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<unpack_float>:
test   %edi,%edi
je     112b <unpack_float+0x1b>
movzwl %di,%eax
cvtsi2ss %eax,%xmm0
sar    $0x10,%edi
mulss  0xeda(%rip),%xmm0
jmp    1030 <ldexpf@plt>
xorps  %xmm0,%xmm0
ret

LLVM IR (-O0):
define float @unpack_float(i32 %0) {
%2 = alloca float
%3 = alloca i32
%4 = alloca i32
%5 = alloca float
store i32 %0, i32* %3
%6 = load i32, i32* %3
%7 = icmp eq i32 %6, 0
br i1 %7, label %8, label %9
8: ; preds = %1
store float 0.000000e+00, float* %2
br label %19
9: ; preds = %1
%10 = load i32, i32* %3
%11 = ashr i32 %10, 16
store i32 %11, i32* %4
%12 = load i32, i32* %3
%13 = and i32 %12, 65535
%14 = sitofp i32 %13 to float
%15 = fdiv float %14, 3.276800e+04
store float %15, float* %5
%16 = load float, float* %5
%17 = load i32, i32* %4
%18 = call float @ldexpf(float %16, i32 %17)
store float %18, float* %2
br label %19
19: ; preds = %9, %8
%20 = load float, float* %2
ret float %20
}

LLVM IR (-O2):
define float @unpack_float(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %9, label %3
3: ; preds = %1
%4 = ashr i32 %0, 16
%5 = and i32 %0, 65535
%6 = sitofp i32 %5 to float
%7 = fmul float %6, 0x3F00000000000000
%8 = tail call float @ldexpf(float %7, i32 %4)
br label %9
9: ; preds = %1, %3
%10 = phi float [ %8, %3 ], [ 0.000000e+00, %1 ]
ret float %10
}
/* Variables and functions */
int /*<<< orphan*/ crt0();
int /*<<< orphan*/ main();
__attribute__((section(".after_vectors"))) void Reset_Handler(void) {
  crt0();
  main();
  while (1)
    ;
}


x86 assembly (clang, -O0):
<Reset_Handler>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <crt0@plt>
mov    $0x0,%al
call   1040 <main@plt>
jmp    1132 <Reset_Handler+0x12>

x86 assembly (clang, -O2):
<Reset_Handler>:
push   %rax
xor    %eax,%eax
call   1030 <crt0@plt>
xor    %eax,%eax
call   1040 <main@plt>
nop
jmp    1130 <Reset_Handler+0x10>

LLVM IR (-O0):
define void @Reset_Handler() section ".after_vectors" {
%1 = call i32 (...) @crt0()
%2 = call i32 (...) @main()
br label %3
3: ; preds = %0, %3
br label %3
}

LLVM IR (-O2):
define void @Reset_Handler() section ".after_vectors" {
%1 = tail call i32 (...) @crt0()
%2 = tail call i32 (...) @main()
br label %3
3: ; preds = %0, %3
br label %3
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void thFreeMutex(void *p) {
  if (!p)
    return;
  free(p);
}


x86 assembly (clang, -O0):
<thFreeMutex>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    112c <thFreeMutex+0x1c>
jmp    1135 <thFreeMutex+0x25>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<thFreeMutex>:
test   %rdi,%rdi
je     111a <thFreeMutex+0xa>
jmp    1030 <free@plt>
ret

LLVM IR (-O0):
define void @thFreeMutex(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = icmp ne i8* %3, null
br i1 %4, label %6, label %5
5: ; preds = %1
br label %9
6: ; preds = %1
%7 = load i8*, i8** %2
%8 = call i32 @free(i8* %7)
br label %9
9: ; preds = %6, %5
ret void
}

LLVM IR (-O2):
define void @thFreeMutex(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 @free(i8* %0)
br label %5
5: ; preds = %1, %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int /*<<< orphan*/, char *, int, char *);
int /*<<< orphan*/ isupper(int);
void t_isupper_0x43() {
  Assert_real((isupper(67)),
              "/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_isupper.c",
              340, ("isupper should be 1 for C"));
}


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

x86 assembly (clang, -O2):
<t_isupper_0x43>:
push   %rax
mov    $0x43,%edi
call   1030 <isupper@plt>
lea    0xece(%rip),%rsi
lea    0xf6f(%rip),%rcx
mov    %eax,%edi
mov    $0x154,%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_isupper.c\00"
@.str.1 = [26 x i8] c"isupper should be 1 for C\00"
define void @t_isupper_0x43() {
%1 = call i32 @isupper(i32 67)
%2 = call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 340, 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_isupper.c\00"
@.str.1 = [26 x i8] c"isupper should be 1 for C\00"
define void @t_isupper_0x43() {
%1 = tail call i32 @isupper(i32 67)
%2 = tail call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 340, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
void ASN1_STRING_data(void) {}


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

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

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

LLVM IR (-O2):
define void @ASN1_STRING_data() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ get_loop_count();
int /*<<< orphan*/ snprintf(char *, size_t, char *, int /*<<< orphan*/);
void loop_count_to_str(char *lcstr, size_t lcstr_len) {
  snprintf(lcstr, lcstr_len, "%li", get_loop_count());
}


x86 assembly (clang, -O0):
<loop_count_to_str>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    $0x0,%al
call   1030 <get_loop_count@plt>
mov    -0x20(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    %eax,%ecx
lea    0xea8(%rip),%rdx
call   1040 <snprintf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<loop_count_to_str>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
xor    %eax,%eax
call   1030 <get_loop_count@plt>
lea    0xec8(%rip),%rdx
mov    %rbx,%rdi
mov    %r14,%rsi
mov    %eax,%ecx
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <snprintf@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"%li\00"
define void @loop_count_to_str(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 (...) @get_loop_count()
%8 = call i32 @snprintf(i8* %5, i64 %6, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %7)
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"%li\00"
define void @loop_count_to_str(i8* %0, i64 %1) {
%3 = tail call i32 (...) @get_loop_count()
%4 = tail call i32 @snprintf(i8* %0, i64 %1, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %3)
ret void
}
void print_debug_addr(const char *str, void *val) {}


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

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

LLVM IR (-O0):
define void @print_debug_addr(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
ret void
}

LLVM IR (-O2):
define void @print_debug_addr(i8* nocapture %0, i8* nocapture %1) {
ret void
}
/* Type definitions */
struct katcp_dispatch {
  int dummy;
};
struct katcp_acquire {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ propagate_acquire_katcp(struct katcp_dispatch *,
                                           struct katcp_acquire *);
int set_value_intbool_katcp(struct katcp_acquire *, int);
int set_boolean_acquire_katcp(struct katcp_dispatch *d, struct katcp_acquire *a,
                              int value) {
  int result;
  result = set_value_intbool_katcp(a, value);
  propagate_acquire_katcp(d, a);
  return result;
}


x86 assembly (clang, -O0):
<set_boolean_acquire_katcp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%esi
call   1040 <set_value_intbool_katcp@plt>
mov    %eax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <propagate_acquire_katcp@plt>
mov    -0x18(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_boolean_acquire_katcp>:
push   %rbp
push   %r14
push   %rbx
mov    %rsi,%rbx
mov    %rdi,%r14
mov    %rsi,%rdi
mov    %edx,%esi
call   1040 <set_value_intbool_katcp@plt>
mov    %eax,%ebp
mov    %r14,%rdi
mov    %rbx,%rsi
call   1030 <propagate_acquire_katcp@plt>
mov    %ebp,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
%struct.katcp_dispatch = type { i32 }
%struct.katcp_acquire = type { i32 }
define i32 @set_boolean_acquire_katcp(%struct.katcp_dispatch* %0, %struct.katcp_acquire* %1, i32 %2) {
%4 = alloca %struct.katcp_dispatch*
%5 = alloca %struct.katcp_acquire*
%6 = alloca i32
%7 = alloca i32
store %struct.katcp_dispatch* %0, %struct.katcp_dispatch** %4
store %struct.katcp_acquire* %1, %struct.katcp_acquire** %5
store i32 %2, i32* %6
%8 = load %struct.katcp_acquire*, %struct.katcp_acquire** %5
%9 = load i32, i32* %6
%10 = call i32 @set_value_intbool_katcp(%struct.katcp_acquire* %8, i32 %9)
store i32 %10, i32* %7
%11 = load %struct.katcp_dispatch*, %struct.katcp_dispatch** %4
%12 = load %struct.katcp_acquire*, %struct.katcp_acquire** %5
%13 = call i32 @propagate_acquire_katcp(%struct.katcp_dispatch* %11, %struct.katcp_acquire* %12)
%14 = load i32, i32* %7
ret i32 %14
}

LLVM IR (-O2):
%struct.katcp_dispatch = type { i32 }
%struct.katcp_acquire = type { i32 }
define i32 @set_boolean_acquire_katcp(%struct.katcp_dispatch* %0, %struct.katcp_acquire* %1, i32 %2) {
%4 = tail call i32 @set_value_intbool_katcp(%struct.katcp_acquire* %1, i32 %2)
%5 = tail call i32 @propagate_acquire_katcp(%struct.katcp_dispatch* %0, %struct.katcp_acquire* %1)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ HplAtmRfa1TimerMacP__CompareB__start();
void AtmegaCompareP__1__AtmegaCompare__start(void) {
  HplAtmRfa1TimerMacP__CompareB__start();
}


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

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

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

LLVM IR (-O2):
define void @AtmegaCompareP__1__AtmegaCompare__start() {
%1 = tail call i32 (...) @HplAtmRfa1TimerMacP__CompareB__start()
ret void
}