xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ islower(int);
void t_islower_0x86() {
  Assert_real((islower(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_islower.c",
              675, ("islower should be 0 for 0x86"));
}


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

x86 assembly (clang, -O2):
<t_islower_0x86>:
push   %rax
mov    $0x86,%edi
call   1030 <islower@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x2a3,%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 0x86\00"
define void @t_islower_0x86() {
%1 = call i64 @islower(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_islower.c\00"
@.str.1 = [29 x i8] c"islower should be 0 for 0x86\00"
define void @t_islower_0x86() {
%1 = tail call i64 @islower(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
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void fn_AB(void) { printf("A=>B\n"); }


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

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

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

LLVM IR (-O2):
@str = [5 x i8] c"A=>B\00"
define void @fn_AB() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @str, i64 0, i64 0))
ret void
}
char *strcpy(char *dst, const char *src) {
  char *p = dst;
  while ((*p++ = *src++))
    ;
  return dst;
}


x86 assembly (clang, -O0):
<strcpy>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
mov    (%rax),%al
mov    -0x18(%rbp),%rcx
mov    %rcx,%rdx
add    $0x1,%rdx
mov    %rdx,-0x18(%rbp)
mov    %al,(%rcx)
cmp    $0x0,%al
je     1143 <strcpy+0x43>
jmp    1114 <strcpy+0x14>
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strcpy>:
mov    %rdi,%rax
xor    %ecx,%ecx
cs nopw 0x0(%rax,%rax,1)
nop
movzbl (%rsi,%rcx,1),%edx
mov    %dl,(%rax,%rcx,1)
add    $0x1,%rcx
test   %dl,%dl
jne    1110 <strcpy+0x10>
ret

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

LLVM IR (-O2):
define i8* @strcpy(i8* returned writeonly %0, i8* nocapture %1) {
br label %3
3: ; preds = %3, %2
%4 = phi i8* [ %1, %2 ], [ %6, %3 ]
%5 = phi i8* [ %0, %2 ], [ %8, %3 ]
%6 = getelementptr inbounds i8, i8* %4, i64 1
%7 = load i8, i8* %4
%8 = getelementptr inbounds i8, i8* %5, i64 1
store i8 %7, i8* %5
%9 = icmp eq i8 %7, 0
br i1 %9, label %10, label %3
10: ; preds = %3
ret i8* %0
}
/* Type definitions */
typedef int /*<<< orphan*/ int32_t;

/* Variables and functions */
int /*<<< orphan*/ SEEK_SET;
int /*<<< orphan*/ lseek(int, int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ write(int, int /*<<< orphan*/ *, int);
void write_header(int f, int32_t pos) {
  lseek(f, 0, SEEK_SET);
  write(f, &pos, sizeof(int32_t));
  return;
}


x86 assembly (clang, -O0):
<write_header>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    0x2ea8(%rip),%rax
mov    (%rax),%edx
xor    %esi,%esi
call   1040 <lseek@plt>
mov    -0x4(%rbp),%edi
lea    -0x8(%rbp),%rsi
mov    $0x4,%edx
call   1030 <write@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<write_header>:
push   %rbx
sub    $0x10,%rsp
mov    %edi,%ebx
mov    %esi,0xc(%rsp)
mov    0x2eae(%rip),%rax
mov    (%rax),%edx
xor    %esi,%esi
call   1040 <lseek@plt>
lea    0xc(%rsp),%rsi
mov    %ebx,%edi
mov    $0x4,%edx
call   1030 <write@plt>
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@SEEK_SET = global i32 0
define void @write_header(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = load i32, i32* @SEEK_SET
%7 = call i32 @lseek(i32 %5, i32 0, i32 %6)
%8 = load i32, i32* %3
%9 = call i32 @write(i32 %8, i32* %4, i32 4)
ret void
}

LLVM IR (-O2):
@SEEK_SET = global i32 0
define void @write_header(i32 %0, i32 %1) {
%3 = alloca i32
store i32 %1, i32* %3
%4 = load i32, i32* @SEEK_SET
%5 = tail call i32 @lseek(i32 %0, i32 0, i32 %4)
%6 = call i32 @write(i32 %0, i32* %3, i32 4)
ret void
}
/* Variables and functions */
void *mfsplay_tree_xmalloc(size_t s) {
  extern void *__real_malloc(size_t s);
  return __real_malloc(s);
}


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

x86 assembly (clang, -O2):
<mfsplay_tree_xmalloc>:
jmp    1030 <__real_malloc@plt>

LLVM IR (-O0):
define i8* @mfsplay_tree_xmalloc(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = call i8* @__real_malloc(i64 %3)
ret i8* %4
}

LLVM IR (-O2):
define i8* @mfsplay_tree_xmalloc(i64 %0) {
%2 = tail call i8* @__real_malloc(i64 %0)
ret i8* %2
}
/* Variables and functions */
scalar_t__ C_InstanceTestProvider_Create_InstanceMI(int /*<<< orphan*/ *,
                                                    int /*<<< orphan*/ *);
int main() {
  if (C_InstanceTestProvider_Create_InstanceMI(NULL, NULL)) {
    return 0;
  } else {
    return -1;
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
xor    %eax,%eax
mov    %eax,%esi
mov    %rsi,%rdi
call   1030 <C_InstanceTestProvider_Create_InstanceMI@plt>
cmp    $0x0,%rax
je     1141 <main+0x31>
movl   $0x0,-0x4(%rbp)
jmp    1148 <main+0x38>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %edi,%edi
xor    %esi,%esi
call   1030 <C_InstanceTestProvider_Create_InstanceMI@plt>
cmp    $0x1,%rax
sbb    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i64 @C_InstanceTestProvider_Create_InstanceMI(i32* null, i32* null)
%2 = icmp eq i64 %1, 0
%3 = sext i1 %2 to i32
ret i32 %3
}
/* Variables and functions */
size_t minRunLength(size_t n) {
  size_t r = 0;
  while (n >= 32) {
    r |= (n & 1);
    n >>= 1;
  }
  return n + r;
}


x86 assembly (clang, -O0):
<minRunLength>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movq   $0x0,-0x10(%rbp)
cmpq   $0x20,-0x8(%rbp)
jb     113c <minRunLength+0x3c>
mov    -0x8(%rbp),%rax
and    $0x1,%rax
or     -0x10(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rax
shr    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1110 <minRunLength+0x10>
mov    -0x8(%rbp),%rax
add    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<minRunLength>:
mov    %rdi,%rax
xor    %ecx,%ecx
cmp    $0x20,%rdi
jb     1124 <minRunLength+0x24>
mov    %rax,%rdx
xchg   %ax,%ax
mov    %edx,%esi
and    $0x1,%esi
or     %rsi,%rcx
shr    %rax
cmp    $0x3f,%rdx
mov    %rax,%rdx
ja     1110 <minRunLength+0x10>
add    %rcx,%rax
ret

LLVM IR (-O0):
define i64 @minRunLength(i64 %0) {
%2 = alloca i64
%3 = alloca i64
store i64 %0, i64* %2
store i64 0, i64* %3
br label %4
4: ; preds = %7, %1
%5 = load i64, i64* %2
%6 = icmp uge i64 %5, 32
br i1 %6, label %7, label %14
7: ; preds = %4
%8 = load i64, i64* %2
%9 = and i64 %8, 1
%10 = load i64, i64* %3
%11 = or i64 %10, %9
store i64 %11, i64* %3
%12 = load i64, i64* %2
%13 = lshr i64 %12, 1
store i64 %13, i64* %2
br label %4
14: ; preds = %4
%15 = load i64, i64* %2
%16 = load i64, i64* %3
%17 = add i64 %15, %16
ret i64 %17
}

LLVM IR (-O2):
define i64 @minRunLength(i64 %0) {
%2 = icmp ugt i64 %0, 31
br i1 %2, label %3, label %10
3: ; preds = %1, %3
%4 = phi i64 [ %7, %3 ], [ 0, %1 ]
%5 = phi i64 [ %8, %3 ], [ %0, %1 ]
%6 = and i64 %5, 1
%7 = or i64 %4, %6
%8 = lshr i64 %5, 1
%9 = icmp ugt i64 %5, 63
br i1 %9, label %3, label %10
10: ; preds = %3, %1
%11 = phi i64 [ %0, %1 ], [ %8, %3 ]
%12 = phi i64 [ 0, %1 ], [ %7, %3 ]
%13 = add i64 %12, %11
ret i64 %13
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void parr(int *n) {
  int *p = n;
  int i;
  for (i = 0; n[i]; i++) {
  }
  i = 0;
  while (1) {
    printf("%d\n", *p);
    if (!(*p)) {
      break;
    }
    p++;
  }
}


x86 assembly (clang, -O0):
<parr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x8(%rbp),%rax
movslq -0x14(%rbp),%rcx
cmpl   $0x0,(%rax,%rcx,4)
je     1150 <parr+0x40>
jmp    1142 <parr+0x32>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    112b <parr+0x1b>
movl   $0x0,-0x14(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%esi
lea    0xe9c(%rip),%rdi
call   1030 <printf@plt>
mov    -0x10(%rbp),%rax
cmpl   $0x0,(%rax)
jne    117b <parr+0x6b>
jmp    118c <parr+0x7c>
mov    -0x10(%rbp),%rax
add    $0x4,%rax
mov    %rax,-0x10(%rbp)
jmp    1157 <parr+0x47>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<parr>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
lea    0xee2(%rip),%r14
xchg   %ax,%ax
mov    (%rbx),%esi
mov    %r14,%rdi
call   1030 <printf@plt>
cmpl   $0x0,(%rbx)
lea    0x4(%rbx),%rbx
jne    1120 <parr+0x10>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%d\0A\00"
define void @parr(i32* %0) {
%2 = alloca i32*
%3 = alloca i32*
%4 = alloca i32
store i32* %0, i32** %2
%5 = load i32*, i32** %2
store i32* %5, i32** %3
store i32 0, i32* %4
br label %6
6: ; preds = %14, %1
%7 = load i32*, i32** %2
%8 = load i32, i32* %4
%9 = sext i32 %8 to i64
%10 = getelementptr inbounds i32, i32* %7, i64 %9
%11 = load i32, i32* %10
%12 = icmp ne i32 %11, 0
br i1 %12, label %13, label %17
13: ; preds = %6
br label %14
14: ; preds = %13
%15 = load i32, i32* %4
%16 = add nsw i32 %15, 1
store i32 %16, i32* %4
br label %6
17: ; preds = %6
store i32 0, i32* %4
br label %18
18: ; preds = %17, %26
%19 = load i32*, i32** %3
%20 = load i32, i32* %19
%21 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %20)
%22 = load i32*, i32** %3
%23 = load i32, i32* %22
%24 = icmp ne i32 %23, 0
br i1 %24, label %26, label %25
25: ; preds = %18
br label %29
26: ; preds = %18
%27 = load i32*, i32** %3
%28 = getelementptr inbounds i32, i32* %27, i32 1
store i32* %28, i32** %3
br label %18
29: ; preds = %25
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define void @parr(i32* nocapture %0) {
br label %2
2: ; preds = %1, %2
%3 = phi i32* [ %8, %2 ], [ %0, %1 ]
%4 = load i32, i32* %3
%5 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %4)
%6 = load i32, i32* %3
%7 = icmp eq i32 %6, 0
%8 = getelementptr inbounds i32, i32* %3, i64 1
br i1 %7, label %9, label %2
9: ; preds = %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ STDIN_FILENO;
int /*<<< orphan*/ gui_refresh();
int /*<<< orphan*/ gui_show_if_modified();
int /*<<< orphan*/ scrl(int);
int /*<<< orphan*/ term_canon(int /*<<< orphan*/, int /*<<< orphan*/);
void gui_reload() {
  term_canon(STDIN_FILENO, 0);
  gui_refresh();
  scrl(-1);
  gui_show_if_modified();
}


x86 assembly (clang, -O0):
<gui_reload>:
push   %rbp
mov    %rsp,%rbp
mov    0x2e95(%rip),%rax
mov    (%rax),%edi
xor    %esi,%esi
call   1030 <term_canon@plt>
mov    $0x0,%al
call   1050 <gui_refresh@plt>
mov    $0xffffffff,%edi
call   1040 <scrl@plt>
mov    $0x0,%al
call   1060 <gui_show_if_modified@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<gui_reload>:
push   %rax
mov    0x2e98(%rip),%rax
mov    (%rax),%edi
xor    %esi,%esi
call   1030 <term_canon@plt>
xor    %eax,%eax
call   1050 <gui_refresh@plt>
mov    $0xffffffff,%edi
call   1040 <scrl@plt>
xor    %eax,%eax
pop    %rcx
jmp    1060 <gui_show_if_modified@plt>

LLVM IR (-O0):
@STDIN_FILENO = global i32 0
define void @gui_reload() {
%1 = load i32, i32* @STDIN_FILENO
%2 = call i32 @term_canon(i32 %1, i32 0)
%3 = call i32 (...) @gui_refresh()
%4 = call i32 @scrl(i32 -1)
%5 = call i32 (...) @gui_show_if_modified()
ret void
}

LLVM IR (-O2):
@STDIN_FILENO = global i32 0
define void @gui_reload() {
%1 = load i32, i32* @STDIN_FILENO
%2 = tail call i32 @term_canon(i32 %1, i32 0)
%3 = tail call i32 (...) @gui_refresh()
%4 = tail call i32 @scrl(i32 -1)
%5 = tail call i32 (...) @gui_show_if_modified()
ret void
}
const char *Stream_Definition(void) {
  return "struct Stream {\n"
         "  var  (*sopen)(var,var,var);\n"
         "  void (*sclose)(var);\n"
         "  void (*sseek)(var,int64_t,int);\n"
         "  int64_t (*stell)(var);\n"
         "  void (*sflush)(var);\n"
         "  bool (*seof)(var);\n"
         "  size_t (*sread)(var,void*,size_t);\n"
         "  size_t (*swrite)(var,void*,size_t);\n"
         "};\n";
}


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

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

LLVM IR (-O0):
@.str = [251 x i8] c"struct Stream {\0A var (*sopen)(var,var,var);\0A void (*sclose)(var);\0A void (*sseek)(var,int64_t,int);\0A int64_t (*stell)(var);\0A void (*sflush)(var);\0A bool (*seof)(var);\0A size_t (*sread)(var,void*,size_t);\0A size_t (*swrite)(var,void*,size_t);\0A};\0A\00"
define i8* @Stream_Definition() {
ret i8* getelementptr inbounds ([251 x i8], [251 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [251 x i8] c"struct Stream {\0A var (*sopen)(var,var,var);\0A void (*sclose)(var);\0A void (*sseek)(var,int64_t,int);\0A int64_t (*stell)(var);\0A void (*sflush)(var);\0A bool (*seof)(var);\0A size_t (*sread)(var,void*,size_t);\0A size_t (*swrite)(var,void*,size_t);\0A};\0A\00"
define i8* @Stream_Definition() {
ret i8* getelementptr inbounds ([251 x i8], [251 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
int _ada_use_c2phc4c(int, int *, int *, double *, int /*<<< orphan*/);
int solcon_dimension_of_quaddobl_solutions(int *dimension) {
  int *a, fail;
  double *c;
  fail = _ada_use_c2phc4c(393, a, dimension, c, 0);
  return fail;
}


x86 assembly (clang, -O0):
<solcon_dimension_of_quaddobl_solutions>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x10(%rbp),%rsi
mov    -0x8(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    $0x189,%edi
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc4c@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<solcon_dimension_of_quaddobl_solutions>:
mov    %rdi,%rdx
mov    $0x189,%edi
xor    %r8d,%r8d
jmp    1030 <_ada_use_c2phc4c@plt>

LLVM IR (-O0):
define i32 @solcon_dimension_of_quaddobl_solutions(i32* %0) {
%2 = alloca i32*
%3 = alloca i32*
%4 = alloca i32
%5 = alloca double*
store i32* %0, i32** %2
%6 = load i32*, i32** %3
%7 = load i32*, i32** %2
%8 = load double*, double** %5
%9 = call i32 @_ada_use_c2phc4c(i32 393, i32* %6, i32* %7, double* %8, i32 0)
store i32 %9, i32* %4
%10 = load i32, i32* %4
ret i32 %10
}

LLVM IR (-O2):
define i32 @solcon_dimension_of_quaddobl_solutions(i32* %0) {
%2 = tail call i32 @_ada_use_c2phc4c(i32 393, i32* undef, i32* %0, double* undef, i32 0)
ret i32 %2
}
void azbox_close(void) {}


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

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

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

LLVM IR (-O2):
define void @azbox_close() {
ret void
}
/* Variables and functions */
void *malloc(int);
void *signed_nan(unsigned short numbits) {
  void *result = malloc(sizeof(long));
  *(long *)(result) = -(unsigned long)(1) << (numbits - 1);
  return result;
}


x86 assembly (clang, -O0):
<signed_nan>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
mov    $0x8,%edi
call   1030 <malloc@plt>
mov    %rax,-0x10(%rbp)
movzwl -0x2(%rbp),%eax
sub    $0x1,%eax
mov    %eax,%eax
mov    %eax,%ecx
mov    $0xffffffffffffffff,%rax
shl    %cl,%rax
mov    %rax,%rcx
mov    -0x10(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<signed_nan>:
push   %rbx
mov    %edi,%ebx
mov    $0x8,%edi
call   1030 <malloc@plt>
add    $0xff,%bl
mov    $0xffffffffffffffff,%rdx
mov    %ebx,%ecx
shl    %cl,%rdx
mov    %rdx,(%rax)
pop    %rbx
ret

LLVM IR (-O0):
define i8* @signed_nan(i16 zeroext %0) {
%2 = alloca i16
%3 = alloca i8*
store i16 %0, i16* %2
%4 = call i8* @malloc(i32 8)
store i8* %4, i8** %3
%5 = load i16, i16* %2
%6 = zext i16 %5 to i32
%7 = sub nsw i32 %6, 1
%8 = zext i32 %7 to i64
%9 = shl i64 -1, %8
%10 = load i8*, i8** %3
%11 = bitcast i8* %10 to i64*
store i64 %9, i64* %11
%12 = load i8*, i8** %3
ret i8* %12
}

LLVM IR (-O2):
define noalias i8* @signed_nan(i16 zeroext %0) {
%2 = tail call dereferenceable_or_null(8) i8* @malloc(i32 8)
%3 = zext i16 %0 to i64
%4 = add nuw nsw i64 %3, 4294967295
%5 = and i64 %4, 4294967295
%6 = shl nsw i64 -1, %5
%7 = bitcast i8* %2 to i64*
store i64 %6, i64* %7
ret i8* %2
}
/* Type definitions */
typedef char *int32_t;

/* Variables and functions */
int32_t int32_minmax(int32_t x, int32_t *y) {
  asm("movl (%1),%%ebx;cmpl %%ebx,%%eax;mov %%eax,%%edx;cmovg "
      "%%ebx,%%eax;cmovg %%edx,%%ebx;movl %%ebx,(%1)"
      : "+a"(x)
      : "r"(y)
      : "%ebx", "%edx");
  return x;
}


x86 assembly (clang, -O0):
<int32_minmax>:
push   %rbp
mov    %rsp,%rbp
push   %rbx
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x18(%rbp),%rcx
mov    (%rcx),%ebx
cmp    %ebx,%eax
mov    %eax,%edx
cmovg  %ebx,%eax
cmovg  %edx,%ebx
mov    %ebx,(%rcx)
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
pop    %rbx
pop    %rbp
ret

x86 assembly (clang, -O2):
<int32_minmax>:
push   %rbx
mov    %rdi,%rax
mov    (%rsi),%ebx
cmp    %ebx,%eax
mov    %eax,%edx
cmovg  %ebx,%eax
cmovg  %edx,%ebx
mov    %ebx,(%rsi)
pop    %rbx
ret

LLVM IR (-O0):
define i8* @int32_minmax(i8* %0, i8** %1) {
%3 = alloca i8*
%4 = alloca i8**
store i8* %0, i8** %3
store i8** %1, i8*** %4
%5 = load i8*, i8** %3
%6 = load i8**, i8*** %4
%7 = call i8* asm "movl ($1),%ebx;cmpl %ebx,%eax;mov %eax,%edx;cmovg %ebx,%eax;cmovg %edx,%ebx;movl %ebx,($1)", "={ax},r,0,~{ebx},~{edx},~{dirflag},~{fpsr},~{flags}"(i8** %6, i8* %5)
store i8* %7, i8** %3
%8 = load i8*, i8** %3
ret i8* %8
}

LLVM IR (-O2):
define i8* @int32_minmax(i8* readnone %0, i8** readnone %1) {
%3 = tail call i8* asm "movl ($1),%ebx;cmpl %ebx,%eax;mov %eax,%edx;cmovg %ebx,%eax;cmovg %edx,%ebx;movl %ebx,($1)", "={ax},r,0,~{ebx},~{edx},~{dirflag},~{fpsr},~{flags}"(i8** %1, i8* %0)
ret i8* %3
}
char test23(void) { return '\x3'; }


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

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

LLVM IR (-O0):
define signext i8 @test23() {
ret i8 3
}

LLVM IR (-O2):
define signext i8 @test23() {
ret i8 3
}
double __attribute__((const)) lw6mat_ftod(float f) { return (double)f; }


x86 assembly (clang, -O0):
<lw6mat_ftod>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<lw6mat_ftod>:
cvtss2sd %xmm0,%xmm0
ret

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

LLVM IR (-O2):
define double @lw6mat_ftod(float %0) {
%2 = fpext float %0 to double
ret double %2
}
/* Variables and functions */
float logf(float);
float cbuiltin_lnf(float x) {
  return logf(x) / logf(2.7182818284590452353602874713526624977572f);
}


x86 assembly (clang, -O0):
<cbuiltin_lnf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
call   1030 <logf@plt>
movss  %xmm0,-0x8(%rbp)
movss  0xecc(%rip),%xmm0
call   1030 <logf@plt>
movaps %xmm0,%xmm1
movss  -0x8(%rbp),%xmm0
divss  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cbuiltin_lnf>:
push   %rax
call   1030 <logf@plt>
divss  0xee2(%rip),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @cbuiltin_lnf(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = call float @logf(float %3)
%5 = call float @logf(float 0x4005BF0A80000000)
%6 = fdiv float %4, %5
ret float %6
}

LLVM IR (-O2):
define float @cbuiltin_lnf(float %0) {
%2 = tail call float @logf(float %0)
%3 = fdiv float %2, 0x3FEFFFFFE0000000
ret float %3
}
int uart1Getch(void) {
  if ((*((volatile unsigned char *)0xE0010014)) & (1 << 0))
    return (*((volatile unsigned char *)0xE0010000));
  return -1;
}


x86 assembly (clang, -O0):
<uart1Getch>:
push   %rbp
mov    %rsp,%rbp
mov    $0xe0010014,%eax
mov    (%rax),%al
movzbl %al,%eax
and    $0x1,%eax
cmp    $0x0,%eax
je     112c <uart1Getch+0x2c>
mov    $0xe0010000,%eax
mov    (%rax),%al
movzbl %al,%eax
mov    %eax,-0x4(%rbp)
jmp    1133 <uart1Getch+0x33>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<uart1Getch>:
mov    $0xe0010000,%ecx
mov    $0xffffffff,%eax
testb  $0x1,0x14(%rcx)
je     1113 <uart1Getch+0x13>
movzbl (%rcx),%eax
ret

LLVM IR (-O0):
define i32 @uart1Getch() {
%1 = alloca i32
%2 = load volatile i8, i8* inttoptr (i64 3758161940 to i8*)
%3 = zext i8 %2 to i32
%4 = and i32 %3, 1
%5 = icmp ne i32 %4, 0
br i1 %5, label %6, label %9
6: ; preds = %0
%7 = load volatile i8, i8* inttoptr (i64 3758161920 to i8*)
%8 = zext i8 %7 to i32
store i32 %8, i32* %1
br label %10
9: ; preds = %0
store i32 -1, i32* %1
br label %10
10: ; preds = %9, %6
%11 = load i32, i32* %1
ret i32 %11
}

LLVM IR (-O2):
define i32 @uart1Getch() {
%1 = load volatile i8, i8* inttoptr (i64 3758161940 to i8*)
%2 = and i8 %1, 1
%3 = icmp eq i8 %2, 0
br i1 %3, label %7, label %4
4: ; preds = %0
%5 = load volatile i8, i8* inttoptr (i64 3758161920 to i8*)
%6 = zext i8 %5 to i32
br label %7
7: ; preds = %0, %4
%8 = phi i32 [ %6, %4 ], [ -1, %0 ]
ret i32 %8
}
int main(int argc, char *argv[]) {
  ht$init_args(0, 0);
  void *s = string$from_cstr("Heya");
  string$to_stdoutln(s);
  heap$free(s);
  ht$syscall(60);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
xor    %esi,%esi
mov    %esi,%edi
mov    $0x0,%al
call   1050 <ht$init_args@plt>
lea    0xe8f(%rip),%rdi
mov    $0x0,%al
call   1060 <string$from_cstr@plt>
cltq
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    $0x0,%al
call   1030 <string$to_stdoutln@plt>
mov    -0x18(%rbp),%rdi
mov    $0x0,%al
call   1070 <heap$free@plt>
mov    $0x3c,%edi
mov    $0x0,%al
call   1040 <ht$syscall@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %edi,%edi
xor    %esi,%esi
xor    %eax,%eax
call   1050 <ht$init_args@plt>
lea    0xe9d(%rip),%rdi
xor    %eax,%eax
call   1060 <string$from_cstr@plt>
movslq %eax,%rbx
mov    %rbx,%rdi
xor    %eax,%eax
call   1030 <string$to_stdoutln@plt>
mov    %rbx,%rdi
xor    %eax,%eax
call   1070 <heap$free@plt>
mov    $0x3c,%edi
xor    %eax,%eax
call   1040 <ht$syscall@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [5 x i8] c"Heya\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
%5 = alloca i8*
store i32 %0, i32* %3
store i8** %1, i8*** %4
%6 = call i32 (i32, i32, ...) bitcast (i32 (...)* @"ht$init_args" to i32 (i32, i32, ...)*)(i32 0, i32 0)
%7 = call i32 (i8*, ...) bitcast (i32 (...)* @"string$from_cstr" to i32 (i8*, ...)*)(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%8 = sext i32 %7 to i64
%9 = inttoptr i64 %8 to i8*
store i8* %9, i8** %5
%10 = load i8*, i8** %5
%11 = call i32 (i8*, ...) bitcast (i32 (...)* @"string$to_stdoutln" to i32 (i8*, ...)*)(i8* %10)
%12 = load i8*, i8** %5
%13 = call i32 (i8*, ...) bitcast (i32 (...)* @"heap$free" to i32 (i8*, ...)*)(i8* %12)
%14 = call i32 (i32, ...) bitcast (i32 (...)* @"ht$syscall" to i32 (i32, ...)*)(i32 60)
ret i32 0
}

LLVM IR (-O2):
@.str = [5 x i8] c"Heya\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (i32, i32, ...) bitcast (i32 (...)* @"ht$init_args" to i32 (i32, i32, ...)*)(i32 0, i32 0)
%4 = tail call i32 (i8*, ...) bitcast (i32 (...)* @"string$from_cstr" to i32 (i8*, ...)*)(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%5 = sext i32 %4 to i64
%6 = inttoptr i64 %5 to i8*
%7 = tail call i32 (i8*, ...) bitcast (i32 (...)* @"string$to_stdoutln" to i32 (i8*, ...)*)(i8* %6)
%8 = tail call i32 (i8*, ...) bitcast (i32 (...)* @"heap$free" to i32 (i8*, ...)*)(i8* %6)
%9 = tail call i32 (i32, ...) bitcast (i32 (...)* @"ht$syscall" to i32 (i32, ...)*)(i32 60)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *);
int /*<<< orphan*/ stderr;
void help(const char *argv0) {
  fprintf(stderr,
          "Usage: %s <options...>\n"
          "Valid options:\n"
          "-I <interface>\t-- specify interface name, mandatory\n"
          "-a\t\t-- automagically filter out SSH originator's IP\n"
          "-x <IP>\t\t-- filter out <IP> (IPv4 dotted quad)\n"
          "-X <MAC>\t-- filter out <MAC> (hex-colon 6 bytes)\n"
          "-p\t\t-- detect PXE boot frames only\n"
          "-P\t\t-- promiscous mode\n"
          "-d\t\t-- print dump of packets\n"
          "-n\t\t-- don't ignore local traffic (null MACs)\n",
          argv0);
}


x86 assembly (clang, -O0):
<help>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ebd(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xed0(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<help>:
mov    %rdi,%rdx
mov    0x2ec6(%rip),%rax
mov    (%rax),%edi
lea    0xedd(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [372 x i8] c"Usage: %s <options...>\0AValid options:\0A-I <interface>\09-- specify interface name, mandatory\0A-a\09\09-- automagically filter out SSH originator's IP\0A-x <IP>\09\09-- filter out <IP> (IPv4 dotted quad)\0A-X <MAC>\09-- filter out <MAC> (hex-colon 6 bytes)\0A-p\09\09-- detect PXE boot frames only\0A-P\09\09-- promiscous mode\0A-d\09\09-- print dump of packets\0A-n\09\09-- don't ignore local traffic (null MACs)\0A\00"
define void @help(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([372 x i8], [372 x i8]* @.str, i64 0, i64 0), i8* %4)
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [372 x i8] c"Usage: %s <options...>\0AValid options:\0A-I <interface>\09-- specify interface name, mandatory\0A-a\09\09-- automagically filter out SSH originator's IP\0A-x <IP>\09\09-- filter out <IP> (IPv4 dotted quad)\0A-X <MAC>\09-- filter out <MAC> (hex-colon 6 bytes)\0A-p\09\09-- detect PXE boot frames only\0A-P\09\09-- promiscous mode\0A-d\09\09-- print dump of packets\0A-n\09\09-- don't ignore local traffic (null MACs)\0A\00"
define void @help(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([372 x i8], [372 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ arc4random_addrandom(unsigned char *, int);
int main(void) {
  unsigned char *blah = (unsigned char *)"";
  arc4random_addrandom(blah, 1);
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [1 x i8] zeroinitializer
define i32 @main() {
%1 = alloca i32
%2 = alloca i8*
store i32 0, i32* %1
store i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @arc4random_addrandom(i8* %3, i32 1)
ret i32 0
}

LLVM IR (-O2):
@.str = [1 x i8] zeroinitializer
define i32 @main() {
%1 = tail call i32 @arc4random_addrandom(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), i32 1)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ O_RDWR;
int open(char const *, int /*<<< orphan*/);
int mmc_open(const char *mmc_path) { return open(mmc_path, O_RDWR); }


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

x86 assembly (clang, -O2):
<mmc_open>:
mov    0x2ed1(%rip),%rax
mov    (%rax),%esi
jmp    1030 <open@plt>

LLVM IR (-O0):
@O_RDWR = global i32 0
define i32 @mmc_open(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i32, i32* @O_RDWR
%5 = call i32 @open(i8* %3, i32 %4)
ret i32 %5
}

LLVM IR (-O2):
@O_RDWR = global i32 0
define i32 @mmc_open(i8* nocapture %0) {
%2 = load i32, i32* @O_RDWR
%3 = tail call i32 @open(i8* %0, i32 %2)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ free(char *);
void nds32_aie_eval_free(void *ptr) { free((char *)ptr); }


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

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

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

LLVM IR (-O2):
define void @nds32_aie_eval_free(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
unsigned long csum_tcpudp_nofold(unsigned long saddr, unsigned long daddr,
                                 unsigned short len, unsigned short proto,
                                 unsigned int sum) {
  __asm__("addl %1, %0\n"
          "adcl %2, %0\n"
          "adcl %3, %0\n"
          "adcl $0, %0\n"
          : "=r"(sum)
          : "g"(daddr), "g"(saddr), "g"((ntohs(len) << 16) + proto * 256),
            "0"(sum));
  return sum;
}


x86 assembly (clang, -O0):
<csum_tcpudp_nofold>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %cx,%ax
mov    %dx,%cx
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %cx,-0x12(%rbp)
mov    %ax,-0x14(%rbp)
mov    %r8d,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x40(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x38(%rbp)
movzwl -0x12(%rbp),%edi
mov    $0x0,%al
call   1030 <ntohs@plt>
mov    -0x40(%rbp),%rsi
mov    -0x38(%rbp),%rdx
mov    %eax,%ecx
shl    $0x10,%ecx
movzwl -0x14(%rbp),%eax
shl    $0x8,%eax
add    %eax,%ecx
mov    -0x18(%rbp),%eax
mov    %rsi,-0x20(%rbp)
mov    %rdx,-0x28(%rbp)
mov    %ecx,-0x2c(%rbp)
add    -0x20(%rbp),%eax
adc    -0x28(%rbp),%eax
adc    -0x2c(%rbp),%eax
adc    $0x0,%eax
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
LLVM IR (-O0):
define i64 @csum_tcpudp_nofold(i64 %0, i64 %1, i16 zeroext %2, i16 zeroext %3, i32 %4) {
%6 = alloca i64
%7 = alloca i64
%8 = alloca i16
%9 = alloca i16
%10 = alloca i32
store i64 %0, i64* %6
store i64 %1, i64* %7
store i16 %2, i16* %8
store i16 %3, i16* %9
store i32 %4, i32* %10
%11 = load i64, i64* %7
%12 = load i64, i64* %6
%13 = load i16, i16* %8
%14 = zext i16 %13 to i32
%15 = call i32 (i32, ...) bitcast (i32 (...)* @ntohs to i32 (i32, ...)*)(i32 %14)
%16 = shl i32 %15, 16
%17 = load i16, i16* %9
%18 = zext i16 %17 to i32
%19 = mul nsw i32 %18, 256
%20 = add nsw i32 %16, %19
%21 = load i32, i32* %10
%22 = call i32 asm "addl $1, $0\0Aadcl $2, $0\0Aadcl $3, $0\0Aadcl $$0, $0\0A", "=r,imr,imr,imr,0,~{dirflag},~{fpsr},~{flags}"(i64 %11, i64 %12, i32 %20, i32 %21)
store i32 %22, i32* %10
%23 = load i32, i32* %10
%24 = zext i32 %23 to i64
ret i64 %24
}

LLVM IR (-O2):
/* Type definitions */
typedef int /*<<< orphan*/ BIGNUM;

/* Variables and functions */
scalar_t__ BN_num_bytes(int /*<<< orphan*/ const *);
void update_buflen(const BIGNUM *b, size_t *pbuflen) {
  size_t i;
  if (!b)
    return;
  if (*pbuflen < (i = (size_t)BN_num_bytes(b)))
    *pbuflen = i;
}


x86 assembly (clang, -O0):
<update_buflen>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    1130 <update_buflen+0x20>
jmp    1163 <update_buflen+0x53>
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <BN_num_bytes@plt>
mov    %rax,%rcx
mov    -0x20(%rbp),%rax
mov    %rcx,-0x18(%rbp)
cmp    %rcx,%rax
jae    1163 <update_buflen+0x53>
mov    -0x18(%rbp),%rcx
mov    -0x10(%rbp),%rax
mov    %rcx,(%rax)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<update_buflen>:
push   %r14
push   %rbx
push   %rax
test   %rdi,%rdi
je     112c <update_buflen+0x1c>
mov    %rsi,%rbx
mov    (%rsi),%r14
call   1030 <BN_num_bytes@plt>
cmp    %rax,%r14
jae    112c <update_buflen+0x1c>
mov    %rax,(%rbx)
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @update_buflen(i32* %0, i64* %1) {
%3 = alloca i32*
%4 = alloca i64*
%5 = alloca i64
store i32* %0, i32** %3
store i64* %1, i64** %4
%6 = load i32*, i32** %3
%7 = icmp ne i32* %6, null
br i1 %7, label %9, label %8
8: ; preds = %2
br label %18
9: ; preds = %2
%10 = load i64*, i64** %4
%11 = load i64, i64* %10
%12 = load i32*, i32** %3
%13 = call i64 @BN_num_bytes(i32* %12)
store i64 %13, i64* %5
%14 = icmp ult i64 %11, %13
br i1 %14, label %15, label %18
15: ; preds = %9
%16 = load i64, i64* %5
%17 = load i64*, i64** %4
store i64 %16, i64* %17
br label %18
18: ; preds = %8, %15, %9
ret void
}

LLVM IR (-O2):
define void @update_buflen(i32* %0, i64* nocapture %1) {
%3 = icmp eq i32* %0, null
br i1 %3, label %9, label %4
4: ; preds = %2
%5 = load i64, i64* %1
%6 = tail call i64 @BN_num_bytes(i32* %0)
%7 = icmp ult i64 %5, %6
br i1 %7, label %8, label %9
8: ; preds = %4
store i64 %6, i64* %1
br label %9
9: ; preds = %4, %8, %2
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
void fclosep(FILE **f) {
  if (*f) {
    fclose(*f);
  }
}


x86 assembly (clang, -O0):
<fclosep>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
cmpq   $0x0,(%rax)
je     1136 <fclosep+0x26>
mov    -0x8(%rbp),%rax
mov    (%rax),%rdi
call   1030 <fclose@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fclosep>:
mov    (%rdi),%rdi
test   %rdi,%rdi
je     111d <fclosep+0xd>
jmp    1030 <fclose@plt>
ret

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

LLVM IR (-O2):
define void @fclosep(i32** nocapture %0) {
%2 = load i32*, i32** %0
%3 = icmp eq i32* %2, null
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i32 @fclose(i32* %2)
br label %6
6: ; preds = %4, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ TM_FreeUnusedTextures();
void R_EndRegistration(void) { TM_FreeUnusedTextures(); }


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

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

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

LLVM IR (-O2):
define void @R_EndRegistration() {
%1 = tail call i32 (...) @TM_FreeUnusedTextures()
ret void
}
void omp_set_nested(int _Nested) {}


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

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

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

LLVM IR (-O2):
define void @omp_set_nested(i32 %0) {
ret void
}
float sum2f_unchecked(float a, float b, float *roundoff) {
  float sum = a + b;
  volatile float b_virtual = sum - a;
  *roundoff = b - b_virtual;
  return sum;
}


x86 assembly (clang, -O0):
<sum2f_unchecked>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
mov    %rdi,-0x10(%rbp)
movss  -0x4(%rbp),%xmm0
addss  -0x8(%rbp),%xmm0
movss  %xmm0,-0x14(%rbp)
movss  -0x14(%rbp),%xmm0
subss  -0x4(%rbp),%xmm0
movss  %xmm0,-0x18(%rbp)
movss  -0x8(%rbp),%xmm0
movss  -0x18(%rbp),%xmm1
subss  %xmm1,%xmm0
mov    -0x10(%rbp),%rax
movss  %xmm0,(%rax)
movss  -0x14(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<sum2f_unchecked>:
movaps %xmm0,%xmm2
addss  %xmm1,%xmm2
movaps %xmm2,%xmm3
subss  %xmm0,%xmm3
movss  %xmm3,-0x4(%rsp)
subss  -0x4(%rsp),%xmm1
movss  %xmm1,(%rdi)
movaps %xmm2,%xmm0
ret

LLVM IR (-O0):
define float @sum2f_unchecked(float %0, float %1, float* %2) {
%4 = alloca float
%5 = alloca float
%6 = alloca float*
%7 = alloca float
%8 = alloca float
store float %0, float* %4
store float %1, float* %5
store float* %2, float** %6
%9 = load float, float* %4
%10 = load float, float* %5
%11 = fadd float %9, %10
store float %11, float* %7
%12 = load float, float* %7
%13 = load float, float* %4
%14 = fsub float %12, %13
store volatile float %14, float* %8
%15 = load float, float* %5
%16 = load volatile float, float* %8
%17 = fsub float %15, %16
%18 = load float*, float** %6
store float %17, float* %18
%19 = load float, float* %7
ret float %19
}

LLVM IR (-O2):
define float @sum2f_unchecked(float %0, float %1, float* nocapture writeonly %2) {
%4 = alloca float
%5 = fadd float %0, %1
%6 = bitcast float* %4 to i8*
%7 = fsub float %5, %0
store volatile float %7, float* %4
%8 = load volatile float, float* %4
%9 = fsub float %1, %8
store float %9, float* %2
ret float %5
}
/* Type definitions */
struct emuState {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ do_modes(struct emuState *, int /*<<< orphan*/);
void do_RM(struct emuState *S) { do_modes(S, 0); }


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

x86 assembly (clang, -O2):
<do_RM>:
xor    %esi,%esi
jmp    1030 <do_modes@plt>

LLVM IR (-O0):
%struct.emuState = type { i32 }
define void @do_RM(%struct.emuState* %0) {
%2 = alloca %struct.emuState*
store %struct.emuState* %0, %struct.emuState** %2
%3 = load %struct.emuState*, %struct.emuState** %2
%4 = call i32 @do_modes(%struct.emuState* %3, i32 0)
ret void
}

LLVM IR (-O2):
%struct.emuState = type { i32 }
define void @do_RM(%struct.emuState* %0) {
%2 = tail call i32 @do_modes(%struct.emuState* %0, i32 0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ islower(int);
void t_islower_0x39() {
  Assert_real((islower(57) == 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",
              290, ("islower should be 0 for 9"));
}


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

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

LLVM IR (-O0):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_islower.c\00"
@.str.1 = [26 x i8] c"islower should be 0 for 9\00"
define void @t_islower_0x39() {
%1 = call i64 @islower(i32 57)
%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 290, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_islower.c\00"
@.str.1 = [26 x i8] c"islower should be 0 for 9\00"
define void @t_islower_0x39() {
%1 = tail call i64 @islower(i32 57)
%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 290, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ SendChar_ToUART(int);
void SendChar(int ch) { SendChar_ToUART(ch); }


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

x86 assembly (clang, -O2):
<SendChar>:
jmp    1030 <SendChar_ToUART@plt>

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

LLVM IR (-O2):
define void @SendChar(i32 %0) {
%2 = tail call i32 @SendChar_ToUART(i32 %0)
ret void
}
/* Variables and functions */
scalar_t__ malloc(scalar_t__);
int /*<<< orphan*/ safeStrCpy(char *, char *, scalar_t__);
scalar_t__ strlen(char *);
char *StrSave(char *s) {
  char *ret;
  if ((ret = (char *)malloc(strlen(s) + 1))) {
    safeStrCpy(ret, s, strlen(s) + 1);
  }
  return ret;
}


x86 assembly (clang, -O0):
<StrSave>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    %rax,%rdi
add    $0x1,%rdi
call   1040 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmp    $0x0,%rax
je     118c <StrSave+0x5c>
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    -0x20(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    %rax,%rdx
add    $0x1,%rdx
call   1050 <safeStrCpy@plt>
mov    -0x10(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<StrSave>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
call   1030 <strlen@plt>
lea    0x1(%rax),%rdi
call   1040 <malloc@plt>
mov    %rax,%rbx
test   %rax,%rax
je     1164 <StrSave+0x34>
mov    %r14,%rdi
call   1030 <strlen@plt>
lea    0x1(%rax),%rdx
mov    %rbx,%rdi
mov    %r14,%rsi
call   1050 <safeStrCpy@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i8* @StrSave(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i64 @strlen(i8* %4)
%6 = add nsw i64 %5, 1
%7 = call i64 @malloc(i64 %6)
%8 = inttoptr i64 %7 to i8*
store i8* %8, i8** %3
%9 = icmp ne i8* %8, null
br i1 %9, label %10, label %17
10: ; preds = %1
%11 = load i8*, i8** %3
%12 = load i8*, i8** %2
%13 = load i8*, i8** %2
%14 = call i64 @strlen(i8* %13)
%15 = add nsw i64 %14, 1
%16 = call i32 @safeStrCpy(i8* %11, i8* %12, i64 %15)
br label %17
17: ; preds = %10, %1
%18 = load i8*, i8** %3
ret i8* %18
}

LLVM IR (-O2):
define i8* @StrSave(i8* %0) {
%2 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%3 = add nsw i64 %2, 1
%4 = tail call i64 @malloc(i64 %3)
%5 = inttoptr i64 %4 to i8*
%6 = icmp eq i64 %4, 0
br i1 %6, label %11, label %7
7: ; preds = %1
%8 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%9 = add nsw i64 %8, 1
%10 = tail call i32 @safeStrCpy(i8* %5, i8* %0, i64 %9)
br label %11
11: ; preds = %7, %1
ret i8* %5
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
int main(int argc, char **argv) {
  fprintf(stderr, "nothing to test, ENABLE_IPV6 is not defined in config.h\n");
  return 1;
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2eb3(%rip),%rax
mov    (%rax),%edi
lea    0xeca(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    0x2ec8(%rip),%rax
mov    (%rax),%edi
lea    0xedf(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
@stderr = global i32 0
@.str = [57 x i8] c"nothing to test, ENABLE_IPV6 is not defined in config.h\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = load i32, i32* @stderr
%7 = call i32 @fprintf(i32 %6, i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str, i64 0, i64 0))
ret i32 1
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [57 x i8] c"nothing to test, ENABLE_IPV6 is not defined in config.h\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = load i32, i32* @stderr
%4 = tail call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str, i64 0, i64 0))
ret i32 1
}