xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int /*<<< orphan*/, char *, int, char *);
int /*<<< orphan*/ isgraph(int);
void t_isgraph_0x4d() {
  Assert_real((isgraph(77)),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isgraph.c",
              390, ("isgraph should be 1 for M"));
}


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

x86 assembly (clang, -O2):
<t_isgraph_0x4d>:
push   %rax
mov    $0x4d,%edi
call   1040 <isgraph@plt>
lea    0xece(%rip),%rsi
lea    0xf6f(%rip),%rcx
mov    %eax,%edi
mov    $0x186,%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 = [26 x i8] c"isgraph should be 1 for M\00"
define void @t_isgraph_0x4d() {
%1 = call i32 @isgraph(i32 77)
%2 = call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 390, 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_isgraph.c\00"
@.str.1 = [26 x i8] c"isgraph should be 1 for M\00"
define void @t_isgraph_0x4d() {
%1 = tail call i32 @isgraph(i32 77)
%2 = tail call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 390, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int main() {
  long winds = 0;
  while (winds != 0) {
    if (*(char *)winds)
      break;
  }
  if (winds == 0 || winds != 0 || *(char *)winds)
    exit(0);
  abort();
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movq   $0x0,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     1159 <main+0x39>
mov    -0x10(%rbp),%rax
cmpb   $0x0,(%rax)
je     1154 <main+0x34>
jmp    1159 <main+0x39>
jmp    1137 <main+0x17>
cmpq   $0x0,-0x10(%rbp)
je     117f <main+0x5f>
cmpq   $0x0,-0x10(%rbp)
jne    117f <main+0x5f>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     1186 <main+0x66>
xor    %edi,%edi
call   1040 <exit@plt>
mov    $0x0,%al
call   1030 <abort@plt>

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i64
store i32 0, i32* %1
store i64 0, i64* %2
br label %3
3: ; preds = %12, %0
%4 = load i64, i64* %2
%5 = icmp ne i64 %4, 0
br i1 %5, label %6, label %13
6: ; preds = %3
%7 = load i64, i64* %2
%8 = inttoptr i64 %7 to i8*
%9 = load i8, i8* %8
%10 = icmp ne i8 %9, 0
br i1 %10, label %11, label %12
11: ; preds = %6
br label %13
12: ; preds = %6
br label %3
13: ; preds = %11, %3
%14 = load i64, i64* %2
%15 = icmp eq i64 %14, 0
br i1 %15, label %25, label %16
16: ; preds = %13
%17 = load i64, i64* %2
%18 = icmp ne i64 %17, 0
br i1 %18, label %25, label %19
19: ; preds = %16
%20 = load i64, i64* %2
%21 = inttoptr i64 %20 to i8*
%22 = load i8, i8* %21
%23 = sext i8 %22 to i32
%24 = icmp ne i32 %23, 0
br i1 %24, label %25, label %27
25: ; preds = %19, %16, %13
%26 = call i32 @exit(i32 0)
unreachable
27: ; preds = %19
%28 = call i32 (...) @abort()
unreachable
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @exit(i32 0)
unreachable
}
/* Variables and functions */
int popNumber();
int /*<<< orphan*/ pushNumber(int /*<<< orphan*/);
int /*<<< orphan*/ ybob(int);
void basYBob() {
  int n;
  n = popNumber();
  pushNumber(ybob(n));
}


x86 assembly (clang, -O0):
<basYBob>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1050 <popNumber@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <ybob@plt>
mov    %eax,%edi
call   1040 <pushNumber@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<basYBob>:
push   %rax
xor    %eax,%eax
call   1050 <popNumber@plt>
mov    %eax,%edi
call   1030 <ybob@plt>
mov    %eax,%edi
pop    %rax
jmp    1040 <pushNumber@plt>

LLVM IR (-O0):
define void @basYBob() {
%1 = alloca i32
%2 = call i32 (...) @popNumber()
store i32 %2, i32* %1
%3 = load i32, i32* %1
%4 = call i32 @ybob(i32 %3)
%5 = call i32 @pushNumber(i32 %4)
ret void
}

LLVM IR (-O2):
define void @basYBob() {
%1 = tail call i32 (...) @popNumber()
%2 = tail call i32 @ybob(i32 %1)
%3 = tail call i32 @pushNumber(i32 %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ EBADF;
int STDERR_FILENO;
int STDOUT_FILENO;
int /*<<< orphan*/ errno;
int _isatty(int file) {
  if ((file == STDOUT_FILENO) || (file == STDERR_FILENO)) {
    return 1;
  } else {
    errno = EBADF;
    return -1;
  }
}


x86 assembly (clang, -O0):
<_isatty>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    0x2edf(%rip),%rcx
cmp    (%rcx),%eax
je     112b <_isatty+0x2b>
mov    -0x8(%rbp),%eax
mov    0x2ead(%rip),%rcx
cmp    (%rcx),%eax
jne    1137 <_isatty+0x37>
movl   $0x1,-0x4(%rbp)
jmp    1150 <_isatty+0x50>
mov    0x2e8a(%rip),%rax
mov    (%rax),%ecx
mov    0x2e91(%rip),%rax
mov    %ecx,(%rax)
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_isatty>:
mov    0x2ee9(%rip),%rcx
mov    $0x1,%eax
cmp    %edi,(%rcx)
je     1132 <_isatty+0x32>
mov    0x2eb9(%rip),%rcx
cmp    %edi,(%rcx)
je     1132 <_isatty+0x32>
mov    0x2ea6(%rip),%rax
mov    (%rax),%eax
mov    0x2ead(%rip),%rcx
mov    %eax,(%rcx)
mov    $0xffffffff,%eax
ret

LLVM IR (-O0):
@STDOUT_FILENO = global i32 0
@STDERR_FILENO = global i32 0
@EBADF = global i32 0
@errno = global i32 0
define i32 @_isatty(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = load i32, i32* @STDOUT_FILENO
%6 = icmp eq i32 %4, %5
br i1 %6, label %11, label %7
7: ; preds = %1
%8 = load i32, i32* %3
%9 = load i32, i32* @STDERR_FILENO
%10 = icmp eq i32 %8, %9
br i1 %10, label %11, label %12
11: ; preds = %7, %1
store i32 1, i32* %2
br label %14
12: ; preds = %7
%13 = load i32, i32* @EBADF
store i32 %13, i32* @errno
store i32 -1, i32* %2
br label %14
14: ; preds = %12, %11
%15 = load i32, i32* %2
ret i32 %15
}

LLVM IR (-O2):
@STDOUT_FILENO = global i32 0
@STDERR_FILENO = global i32 0
@EBADF = global i32 0
@errno = global i32 0
define i32 @_isatty(i32 %0) {
%2 = load i32, i32* @STDOUT_FILENO
%3 = icmp eq i32 %2, %0
%4 = load i32, i32* @STDERR_FILENO
%5 = icmp eq i32 %4, %0
%6 = select i1 %3, i1 true, i1 %5
br i1 %6, label %9, label %7
7: ; preds = %1
%8 = load i32, i32* @EBADF
store i32 %8, i32* @errno
br label %9
9: ; preds = %1, %7
%10 = phi i32 [ -1, %7 ], [ 1, %1 ]
ret i32 %10
}
/* Variables and functions */
char *strrchr(char *, char);
char *extension_of(char *filename) {
  char *dot = strrchr(filename, '.');
  if (!dot || dot == filename)
    return "";
  return dot + 1;
}


x86 assembly (clang, -O0):
<extension_of>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    $0x2e,%esi
call   1030 <strrchr@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     1147 <extension_of+0x37>
mov    -0x18(%rbp),%rax
cmp    -0x10(%rbp),%rax
jne    1157 <extension_of+0x47>
lea    0xeb2(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1163 <extension_of+0x53>
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<extension_of>:
push   %rbx
mov    %rdi,%rbx
mov    $0x2e,%esi
call   1030 <strrchr@plt>
lea    0x1(%rax),%rcx
cmp    %rbx,%rax
lea    0xed4(%rip),%rdx
cmove  %rdx,%rcx
test   %rax,%rax
cmove  %rdx,%rcx
mov    %rcx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [1 x i8] zeroinitializer
define i8* @extension_of(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
%5 = load i8*, i8** %3
%6 = call i8* @strrchr(i8* %5, i8 signext 46)
store i8* %6, i8** %4
%7 = load i8*, i8** %4
%8 = icmp ne i8* %7, null
br i1 %8, label %9, label %13
9: ; preds = %1
%10 = load i8*, i8** %4
%11 = load i8*, i8** %3
%12 = icmp eq i8* %10, %11
br i1 %12, label %13, label %14
13: ; preds = %9, %1
store i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), i8** %2
br label %17
14: ; preds = %9
%15 = load i8*, i8** %4
%16 = getelementptr inbounds i8, i8* %15, i64 1
store i8* %16, i8** %2
br label %17
17: ; preds = %14, %13
%18 = load i8*, i8** %2
ret i8* %18
}

LLVM IR (-O2):
@.str = [1 x i8] zeroinitializer
define i8* @extension_of(i8* %0) {
%2 = tail call i8* @strrchr(i8* dereferenceable(1) %0, i8 signext 46)
%3 = icmp eq i8* %2, null
%4 = icmp eq i8* %2, %0
%5 = or i1 %3, %4
%6 = getelementptr inbounds i8, i8* %2, i64 1
%7 = select i1 %5, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), i8* %6
ret i8* %7
}
short interpolateheight(int h1, int h2, int parts, int index) {
  float dh;
  dh = ((float)(h2 - h1)) / parts;
  return h1 + (dh * index);
}


x86 assembly (clang, -O0):
<interpolateheight>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    -0x8(%rbp),%eax
mov    -0x4(%rbp),%ecx
sub    %ecx,%eax
cvtsi2ss %eax,%xmm0
cvtsi2ssl -0xc(%rbp),%xmm1
divss  %xmm1,%xmm0
movss  %xmm0,-0x14(%rbp)
cvtsi2ssl -0x4(%rbp),%xmm1
movss  -0x14(%rbp),%xmm0
cvtsi2ssl -0x10(%rbp),%xmm2
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
cvttss2si %xmm0,%eax
cwtl
pop    %rbp
ret

x86 assembly (clang, -O2):
<interpolateheight>:
sub    %edi,%esi
cvtsi2ss %esi,%xmm0
cvtsi2ss %edx,%xmm1
cvtsi2ss %edi,%xmm2
divss  %xmm1,%xmm0
xorps  %xmm1,%xmm1
cvtsi2ss %ecx,%xmm1
mulss  %xmm0,%xmm1
addss  %xmm2,%xmm1
cvttss2si %xmm1,%eax
ret

LLVM IR (-O0):
define signext i16 @interpolateheight(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca float
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i32 %3, i32* %8
%10 = load i32, i32* %6
%11 = load i32, i32* %5
%12 = sub nsw i32 %10, %11
%13 = sitofp i32 %12 to float
%14 = load i32, i32* %7
%15 = sitofp i32 %14 to float
%16 = fdiv float %13, %15
store float %16, float* %9
%17 = load i32, i32* %5
%18 = sitofp i32 %17 to float
%19 = load float, float* %9
%20 = load i32, i32* %8
%21 = sitofp i32 %20 to float
%22 = call float @llvm.fmuladd.f32(float %19, float %21, float %18)
%23 = fptosi float %22 to i16
ret i16 %23
}

LLVM IR (-O2):
define signext i16 @interpolateheight(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = sub nsw i32 %1, %0
%6 = sitofp i32 %5 to float
%7 = sitofp i32 %2 to float
%8 = fdiv float %6, %7
%9 = sitofp i32 %0 to float
%10 = sitofp i32 %3 to float
%11 = tail call float @llvm.fmuladd.f32(float %8, float %10, float %9)
%12 = fptosi float %11 to i16
ret i16 %12
}
/* Variables and functions */
int /*<<< orphan*/ cl_wrapper_init();
__attribute__((constructor)) void wrapper_constructor(void) {
  cl_wrapper_init();
}


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

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

LLVM IR (-O0):
@llvm.global_ctors = appending global [1 x { i32, void ()*, i8* }] [{ i32, void ()*, i8* } { i32 65535, void ()* @wrapper_constructor, i8* null }]
define void @wrapper_constructor() {
%1 = call i32 (...) @cl_wrapper_init()
ret void
}

LLVM IR (-O2):
@llvm.global_ctors = appending global [1 x { i32, void ()*, i8* }] [{ i32, void ()*, i8* } { i32 65535, void ()* @wrapper_constructor, i8* null }]
define void @wrapper_constructor() {
%1 = tail call i32 (...) @cl_wrapper_init()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
int foo(int x) {
  assert(x < 2);
  return 1;
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x2,-0x4(%rbp)
setl   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
mov    $0x1,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo>:
push   %rax
xor    %eax,%eax
cmp    $0x2,%edi
setl   %al
mov    %eax,%edi
call   1030 <assert@plt>
mov    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @foo(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp slt i32 %3, 2
%5 = zext i1 %4 to i32
%6 = call i32 @assert(i32 %5)
ret i32 1
}

LLVM IR (-O2):
define i32 @foo(i32 %0) {
%2 = icmp slt i32 %0, 2
%3 = zext i1 %2 to i32
%4 = tail call i32 @assert(i32 %3)
ret i32 1
}
long extract_mb6(insn, invalid)
unsigned long insn;
int *invalid;
{ return ((insn >> 6) & 0x1f) | (insn & 0x20); }


x86 assembly (clang, -O0):
<extract_mb6>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
shr    $0x6,%rax
and    $0x1f,%rax
mov    -0x8(%rbp),%rcx
and    $0x20,%rcx
or     %rcx,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<extract_mb6>:
mov    %edi,%eax
shr    $0x6,%eax
and    $0x1f,%eax
and    $0x20,%edi
or     %rdi,%rax
ret

LLVM IR (-O0):
define i64 @extract_mb6(i64 %0, i32* %1) {
%3 = alloca i64
%4 = alloca i32*
store i64 %0, i64* %3
store i32* %1, i32** %4
%5 = load i64, i64* %3
%6 = lshr i64 %5, 6
%7 = and i64 %6, 31
%8 = load i64, i64* %3
%9 = and i64 %8, 32
%10 = or i64 %7, %9
ret i64 %10
}

LLVM IR (-O2):
define i64 @extract_mb6(i64 %0, i32* nocapture readnone %1) {
%3 = lshr i64 %0, 6
%4 = and i64 %3, 31
%5 = and i64 %0, 32
%6 = or i64 %4, %5
ret i64 %6
}
/* Variables and functions */
scalar_t__ EOF;
scalar_t__ getchar();
int /*<<< orphan*/ printf(char *, int);
int main() {
  int c;
  while (c = getchar() != EOF) {
    printf("c = [%d]\n", c);
  }
  printf("c = [%d]\n", c);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1040 <getchar@plt>
mov    0x2eab(%rip),%rcx
cmp    (%rcx),%rax
setne  %al
mov    %al,%cl
and    $0x1,%cl
movzbl %cl,%ecx
mov    %ecx,-0x8(%rbp)
test   $0x1,%al
jne    115b <main+0x3b>
jmp    116f <main+0x4f>
mov    -0x8(%rbp),%esi
lea    0xe9b(%rip),%rdi
call   1030 <printf@plt>
jmp    112f <main+0xf>
mov    -0x8(%rbp),%esi
lea    0xe87(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
xor    %eax,%eax
call   1040 <getchar@plt>
mov    0x2eb6(%rip),%r14
cmp    (%r14),%rax
je     1159 <main+0x39>
lea    0xec2(%rip),%rbx
xchg   %ax,%ax
mov    %rbx,%rdi
mov    $0x1,%esi
call   1030 <printf@plt>
xor    %eax,%eax
call   1040 <getchar@plt>
cmp    (%r14),%rax
jne    1140 <main+0x20>
lea    0xea0(%rip),%rdi
xor    %esi,%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
@EOF = global i64 0
@.str = [10 x i8] c"c = [%d]\0A\00"
define i32 @main() {
%1 = tail call i64 (...) @getchar()
%2 = load i64, i64* @EOF
%3 = icmp eq i64 %1, %2
br i1 %3, label %9, label %4
4: ; preds = %0, %4
%5 = tail call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 1)
%6 = tail call i64 (...) @getchar()
%7 = load i64, i64* @EOF
%8 = icmp eq i64 %6, %7
br i1 %8, label %9, label %4
9: ; preds = %4, %0
%10 = tail call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 0)
ret i32 0
}
/* Variables and functions */
scalar_t__ check_sum_of_primes(int);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int p;
  scanf("%d", &p);
  if (check_sum_of_primes(p)) {
    printf("Yes");
  } else {
    printf("No");
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1050 <scanf@plt>
mov    -0x8(%rbp),%edi
call   1030 <check_sum_of_primes@plt>
cmp    $0x0,%rax
je     1172 <main+0x42>
lea    0xe9b(%rip),%rdi
call   1040 <printf@plt>
jmp    117e <main+0x4e>
lea    0xe8e(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xec8(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1050 <scanf@plt>
mov    0x4(%rsp),%edi
call   1030 <check_sum_of_primes@plt>
test   %rax,%rax
lea    0xeb2(%rip),%rax
lea    0xea7(%rip),%rdi
cmove  %rax,%rdi
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [4 x i8] c"Yes\00"
@.str.2 = [3 x i8] c"No\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%4 = load i32, i32* %1
%5 = call i64 @check_sum_of_primes(i32 %4)
%6 = icmp eq i64 %5, 0
%7 = select i1 %6, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0)
%8 = call i32 @printf(i8* dereferenceable(1) %7)
ret i32 0
}
char *findBroadcastAddr() { return "255.255.255.255"; }


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

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

LLVM IR (-O0):
@.str = [16 x i8] c"255.255.255.255\00"
define i8* @findBroadcastAddr() {
ret i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [16 x i8] c"255.255.255.255\00"
define i8* @findBroadcastAddr() {
ret i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
int getopt_test(int, char **);
int main(int argc, char *argv[]) { return getopt_test(argc, argv); }


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    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1030 <getopt_test@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
jmp    1030 <getopt_test@plt>

LLVM IR (-O0):
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* %4
%7 = load i8**, i8*** %5
%8 = call i32 @getopt_test(i32 %6, i8** %7)
ret i32 %8
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** %1) {
%3 = tail call i32 @getopt_test(i32 %0, i8** %1)
ret i32 %3
}
/* Variables and functions */
double ldexpf(double, int);
int /*<<< orphan*/ printf(char *, double);
int main(void) {
  printf("%f\n", ldexpf(1.0, 6));
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
movsd  0xed7(%rip),%xmm0
mov    $0x6,%edi
call   1040 <ldexpf@plt>
lea    0xece(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%f\0A\00"
define i32 @main() {
%1 = tail call double @ldexpf(double 1.000000e+00, i32 6)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double %1)
ret i32 0
}
void log2mem_atomic_spinunlock(volatile int *v) { __sync_lock_release(v); }


x86 assembly (clang, -O0):
<log2mem_atomic_spinunlock>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movl   $0x0,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<log2mem_atomic_spinunlock>:
movl   $0x0,(%rdi)
ret

LLVM IR (-O0):
define void @log2mem_atomic_spinunlock(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
store atomic i32 0, i32* %3 release
ret void
}

LLVM IR (-O2):
define void @log2mem_atomic_spinunlock(i32* nocapture writeonly %0) {
store atomic i32 0, i32* %0 release
ret void
}
/* Variables and functions */
int genrand64_int64();
__attribute__((unused)) double genrand64_real3(void) {
  return ((genrand64_int64() >> 12) + 0.5) * (1.0 / 4503599627370496.0);
}


x86 assembly (clang, -O0):
<genrand64_real3>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <genrand64_int64@plt>
sar    $0xc,%eax
cvtsi2sd %eax,%xmm0
movsd  0xede(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  0xeca(%rip),%xmm1
mulsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<genrand64_real3>:
push   %rax
xor    %eax,%eax
call   1030 <genrand64_int64@plt>
sar    $0xc,%eax
cvtsi2sd %eax,%xmm0
addsd  0xed9(%rip),%xmm0
mulsd  0xed9(%rip),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @genrand64_real3() {
%1 = call i32 (...) @genrand64_int64()
%2 = ashr i32 %1, 12
%3 = sitofp i32 %2 to double
%4 = fadd double %3, 5.000000e-01
%5 = fmul double %4, 0x3CB0000000000000
ret double %5
}

LLVM IR (-O2):
define double @genrand64_real3() {
%1 = tail call i32 (...) @genrand64_int64()
%2 = ashr i32 %1, 12
%3 = sitofp i32 %2 to double
%4 = fadd double %3, 5.000000e-01
%5 = fmul double %4, 0x3CB0000000000000
ret double %5
}
/* Variables and functions */
int v4l2_close(int);
__attribute__((visibility("default"))) int close(int fd) {
  return v4l2_close(fd);
}


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

x86 assembly (clang, -O2):
<close>:
jmp    1030 <v4l2_close@plt>

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

LLVM IR (-O2):
define i32 @close(i32 %0) {
%2 = tail call i32 @v4l2_close(i32 %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ __ESBMC_assert(int /*<<< orphan*/, char *);
void __VERIFIER_error(void) {
ERROR:
  __ESBMC_assert(0, "Verifier error called\n");
}


x86 assembly (clang, -O0):
<__VERIFIER_error>:
push   %rbp
mov    %rsp,%rbp
jmp    1119 <__VERIFIER_error+0x9>
xor    %edi,%edi
lea    0xede(%rip),%rsi
call   1030 <__ESBMC_assert@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<__VERIFIER_error>:
lea    0xee9(%rip),%rsi
xor    %edi,%edi
jmp    1030 <__ESBMC_assert@plt>

LLVM IR (-O0):
@.str = [23 x i8] c"Verifier error called\0A\00"
define void @__VERIFIER_error() {
br label %1
1: ; preds = %0
%2 = call i32 @__ESBMC_assert(i32 0, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [23 x i8] c"Verifier error called\0A\00"
define void @__VERIFIER_error() {
%1 = tail call i32 @__ESBMC_assert(i32 0, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
ret void
}
void test2() { asm volatile("int3"); }


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

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

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

LLVM IR (-O2):
define void @test2() {
tail call void asm sideeffect "int3", "~{dirflag},~{fpsr},~{flags}"()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ E();
int /*<<< orphan*/ printf(char *, ...);
int randChar(char *);
int randInt(int);
int T() {
  if (randInt(10) < 7) {
    printf("%c", randChar("0123456789"));
  } else {
    printf("(");
    E();
    printf(")");
  }
}


x86 assembly (clang, -O0):
<T>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0xa,%edi
call   1060 <randInt@plt>
cmp    $0x7,%eax
jge    117c <T+0x3c>
lea    0xea1(%rip),%rdi
call   1040 <randChar@plt>
mov    %eax,%esi
lea    0xe90(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    119f <T+0x5f>
lea    0xe8b(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    $0x0,%al
call   1050 <E@plt>
lea    0xe78(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<T>:
push   %rax
mov    $0xa,%edi
call   1060 <randInt@plt>
cmp    $0x6,%eax
jg     1164 <T+0x24>
lea    0xea9(%rip),%rdi
call   1040 <randChar@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <putchar@plt>
mov    $0x28,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
call   1050 <E@plt>
mov    $0x29,%edi
pop    %rax
jmp    1030 <putchar@plt>

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

LLVM IR (-O2):
@.str.1 = [11 x i8] c"0123456789\00"
define i32 @T() {
%1 = tail call i32 @randInt(i32 10)
%2 = icmp slt i32 %1, 7
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = tail call i32 @randChar(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0))
br label %8
5: ; preds = %0
%6 = tail call i32 @putchar(i32 40)
%7 = tail call i32 (...) @E()
br label %8
8: ; preds = %5, %3
%9 = phi i32 [ 41, %5 ], [ %4, %3 ]
%10 = tail call i32 @putchar(i32 %9)
ret i32 undef
}
void bwb_Timer_On(void) {
  bwx_DEBUG(__FUNCTION__);
  SetEvent(0X40);
}


x86 assembly (clang, -O0):
<bwb_Timer_On>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
mov    $0x0,%al
call   1040 <bwx_DEBUG@plt>
mov    $0x40,%edi
mov    $0x0,%al
call   1030 <SetEvent@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<bwb_Timer_On>:
push   %rax
lea    0xed8(%rip),%rdi
xor    %eax,%eax
call   1040 <bwx_DEBUG@plt>
mov    $0x40,%edi
xor    %eax,%eax
pop    %rcx
jmp    1030 <SetEvent@plt>

LLVM IR (-O0):
@__FUNCTION__.bwb_Timer_On = [13 x i8] c"bwb_Timer_On\00"
define void @bwb_Timer_On() {
%1 = call i32 (i8*, ...) bitcast (i32 (...)* @bwx_DEBUG to i32 (i8*, ...)*)(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @__FUNCTION__.bwb_Timer_On, i64 0, i64 0))
%2 = call i32 (i32, ...) bitcast (i32 (...)* @SetEvent to i32 (i32, ...)*)(i32 64)
ret void
}

LLVM IR (-O2):
@__FUNCTION__.bwb_Timer_On = [13 x i8] c"bwb_Timer_On\00"
define void @bwb_Timer_On() {
%1 = tail call i32 (i8*, ...) bitcast (i32 (...)* @bwx_DEBUG to i32 (i8*, ...)*)(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @__FUNCTION__.bwb_Timer_On, i64 0, i64 0))
%2 = tail call i32 (i32, ...) bitcast (i32 (...)* @SetEvent to i32 (i32, ...)*)(i32 64)
ret void
}
int findMax(int a, int b) {
  int result[2];
  result[0] = a;
  result[1] = b;
  int sign_bit = (unsigned int)(a - b) >> (sizeof(int) * 8 - 1);
  return result[sign_bit];
}


x86 assembly (clang, -O0):
<findMax>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%eax
sub    -0x8(%rbp),%eax
shr    $0x1f,%eax
mov    %eax,-0x14(%rbp)
movslq -0x14(%rbp),%rax
mov    -0x10(%rbp,%rax,4),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<findMax>:
mov    %edi,-0x8(%rsp)
mov    %esi,-0x4(%rsp)
xor    %eax,%eax
cmp    %esi,%edi
setl   %al
mov    -0x8(%rsp,%rax,4),%eax
ret

LLVM IR (-O0):
define i32 @findMax(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca [2 x i32]
%6 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%7 = load i32, i32* %3
%8 = getelementptr inbounds [2 x i32], [2 x i32]* %5, i64 0, i64 0
store i32 %7, i32* %8
%9 = load i32, i32* %4
%10 = getelementptr inbounds [2 x i32], [2 x i32]* %5, i64 0, i64 1
store i32 %9, i32* %10
%11 = load i32, i32* %3
%12 = load i32, i32* %4
%13 = sub nsw i32 %11, %12
%14 = lshr i32 %13, 31
store i32 %14, i32* %6
%15 = load i32, i32* %6
%16 = sext i32 %15 to i64
%17 = getelementptr inbounds [2 x i32], [2 x i32]* %5, i64 0, i64 %16
%18 = load i32, i32* %17
ret i32 %18
}

LLVM IR (-O2):
define i32 @findMax(i32 %0, i32 %1) {
%3 = alloca [2 x i32]
%4 = bitcast [2 x i32]* %3 to i8*
%5 = getelementptr inbounds [2 x i32], [2 x i32]* %3, i64 0, i64 0
store i32 %0, i32* %5
%6 = getelementptr inbounds [2 x i32], [2 x i32]* %3, i64 0, i64 1
store i32 %1, i32* %6
%7 = icmp slt i32 %0, %1
%8 = zext i1 %7 to i64
%9 = getelementptr inbounds [2 x i32], [2 x i32]* %3, i64 0, i64 %8
%10 = load i32, i32* %9
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ Cmd_Argv(int);
int /*<<< orphan*/ SaveTheGame(int /*<<< orphan*/);
void Save_f(void) { SaveTheGame(Cmd_Argv(1)); }


x86 assembly (clang, -O0):
<Save_f>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%edi
call   1040 <Cmd_Argv@plt>
mov    %eax,%edi
call   1030 <SaveTheGame@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<Save_f>:
push   %rax
mov    $0x1,%edi
call   1040 <Cmd_Argv@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <SaveTheGame@plt>

LLVM IR (-O0):
define void @Save_f() {
%1 = call i32 @Cmd_Argv(i32 1)
%2 = call i32 @SaveTheGame(i32 %1)
ret void
}

LLVM IR (-O2):
define void @Save_f() {
%1 = tail call i32 @Cmd_Argv(i32 1)
%2 = tail call i32 @SaveTheGame(i32 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int /*<<< orphan*/, char *, int, char *);
int /*<<< orphan*/ isalnum(int);
void t_isalnum_0x67() {
  Assert_real((isalnum(103)),
              "/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_isalnum.c",
              520, ("isalnum should be 1 for g"));
}


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

x86 assembly (clang, -O2):
<t_isalnum_0x67>:
push   %rax
mov    $0x67,%edi
call   1030 <isalnum@plt>
lea    0xece(%rip),%rsi
lea    0xf6f(%rip),%rcx
mov    %eax,%edi
mov    $0x208,%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_isalnum.c\00"
@.str.1 = [26 x i8] c"isalnum should be 1 for g\00"
define void @t_isalnum_0x67() {
%1 = call i32 @isalnum(i32 103)
%2 = call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 520, 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_isalnum.c\00"
@.str.1 = [26 x i8] c"isalnum should be 1 for g\00"
define void @t_isalnum_0x67() {
%1 = tail call i32 @isalnum(i32 103)
%2 = tail call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 520, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
long b_length(s)
char *s;
{ return (s) ? strlen(s) : 0; }


x86 assembly (clang, -O0):
<b_length>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1139 <b_length+0x29>
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    %rax,-0x10(%rbp)
jmp    1144 <b_length+0x34>
xor    %eax,%eax
mov    %rax,-0x10(%rbp)
jmp    1144 <b_length+0x34>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i64 @b_length(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 %5, label %8
5: ; preds = %1
%6 = load i8*, i8** %2
%7 = call i64 @strlen(i8* %6)
br label %9
8: ; preds = %1
br label %9
9: ; preds = %8, %5
%10 = phi i64 [ %7, %5 ], [ 0, %8 ]
ret i64 %10
}

LLVM IR (-O2):
define i64 @b_length(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i64 @strlen(i8* %0)
br label %5
5: ; preds = %1, %3
%6 = phi i64 [ %4, %3 ], [ 0, %1 ]
ret i64 %6
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
void usage(char *name) {
  fprintf(stderr, "Usage: %s [options] n1 n2 n3 n4 ...\n", name);
  fprintf(stderr, "For more information type: %s -h \n\n", name);
}


x86 assembly (clang, -O0):
<usage>:
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>
mov    0x2ea4(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xedc(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<usage>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
mov    0x2ec2(%rip),%r14
mov    (%r14),%edi
lea    0xed8(%rip),%rsi
mov    %rbx,%rdx
call   1030 <fprintf@plt>
mov    (%r14),%edi
lea    0xeeb(%rip),%rsi
mov    %rbx,%rdx
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [37 x i8] c"Usage: %s [options] n1 n2 n3 n4 ...\0A\00"
@.str.1 = [36 x i8] c"For more information type: %s -h \0A\0A\00"
define void @usage(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 ([37 x i8], [37 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = load i32, i32* @stderr
%7 = load i8*, i8** %2
%8 = call i32 @fprintf(i32 %6, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.1, i64 0, i64 0), i8* %7)
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [37 x i8] c"Usage: %s [options] n1 n2 n3 n4 ...\0A\00"
@.str.1 = [36 x i8] c"For more information type: %s -h \0A\0A\00"
define void @usage(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = load i32, i32* @stderr
%5 = tail call i32 @fprintf(i32 %4, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.1, i64 0, i64 0), i8* %0)
ret void
}
/* Type definitions */
struct timeval {
  double tv_sec;
  scalar_t__ tv_usec;
};

/* Variables and functions */
int /*<<< orphan*/ exit(int);
scalar_t__ gettimeofday(struct timeval *, int /*<<< orphan*/ *);
int /*<<< orphan*/ perror(char *);
double dgettimeofday(void) {
  struct timeval tv;
  if (gettimeofday(&tv, NULL) != 0) {
    perror("gettimeofday");
    exit(-1);
  }
  return (tv.tv_sec + ((double)tv.tv_usec) / 1000000.);
}


x86 assembly (clang, -O0):
<dgettimeofday>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    -0x10(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1030 <gettimeofday@plt>
cmp    $0x0,%rax
je     1165 <dgettimeofday+0x35>
lea    0xeb2(%rip),%rdi
call   1040 <perror@plt>
mov    $0xffffffff,%edi
call   1050 <exit@plt>
movsd  -0x10(%rbp),%xmm0
cvtsi2sdq -0x8(%rbp),%xmm1
movsd  0xe88(%rip),%xmm2
divsd  %xmm2,%xmm1
addsd  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dgettimeofday>:
sub    $0x18,%rsp
lea    0x8(%rsp),%rdi
xor    %esi,%esi
call   1030 <gettimeofday@plt>
test   %rax,%rax
jne    115f <dgettimeofday+0x2f>
cvtsi2sdq 0x10(%rsp),%xmm0
divsd  0xeac(%rip),%xmm0
addsd  0x8(%rsp),%xmm0
add    $0x18,%rsp
ret
lea    0xea2(%rip),%rdi
call   1040 <perror@plt>
mov    $0xffffffff,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
%struct.timeval = type { double, i64 }
@.str = [13 x i8] c"gettimeofday\00"
define double @dgettimeofday() {
%1 = alloca %struct.timeval
%2 = call i64 @gettimeofday(%struct.timeval* %1, i32* null)
%3 = icmp ne i64 %2, 0
br i1 %3, label %4, label %7
4: ; preds = %0
%5 = call i32 @perror(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
%6 = call i32 @exit(i32 -1)
unreachable
7: ; preds = %0
%8 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i32 0, i32 0
%9 = load double, double* %8
%10 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i32 0, i32 1
%11 = load i64, i64* %10
%12 = sitofp i64 %11 to double
%13 = fdiv double %12, 1.000000e+06
%14 = fadd double %9, %13
ret double %14
}

LLVM IR (-O2):
%struct.timeval = type { double, i64 }
@.str = [13 x i8] c"gettimeofday\00"
define double @dgettimeofday() {
%1 = alloca %struct.timeval
%2 = bitcast %struct.timeval* %1 to i8*
%3 = call i64 @gettimeofday(%struct.timeval* %1, i32* null)
%4 = icmp eq i64 %3, 0
br i1 %4, label %8, label %5
5: ; preds = %0
%6 = tail call i32 @perror(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
%7 = tail call i32 @exit(i32 -1)
unreachable
8: ; preds = %0
%9 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 0
%10 = load double, double* %9
%11 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 1
%12 = load i64, i64* %11
%13 = sitofp i64 %12 to double
%14 = fdiv double %13, 1.000000e+06
%15 = fadd double %10, %14
ret double %15
}
int RGB2Cr(int r, int g, int b) {
  return (439 * r - 368 * g - 71 * b + 128500) / 1000;
}


x86 assembly (clang, -O0):
<RGB2Cr>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
imul   $0x1b7,-0x4(%rbp),%eax
imul   $0x170,-0x8(%rbp),%ecx
sub    %ecx,%eax
imul   $0x47,-0xc(%rbp),%ecx
sub    %ecx,%eax
add    $0x1f5f4,%eax
mov    $0x3e8,%ecx
cltd
idiv   %ecx
pop    %rbp
ret

x86 assembly (clang, -O2):
<RGB2Cr>:
imul   $0x1b7,%edi,%eax
imul   $0xfffffe90,%esi,%ecx
add    %eax,%ecx
imul   $0xffffffb9,%edx,%eax
add    %ecx,%eax
add    $0x1f5f4,%eax
cltq
imul   $0x10624dd3,%rax,%rax
mov    %rax,%rcx
shr    $0x3f,%rcx
sar    $0x26,%rax
add    %ecx,%eax
ret

LLVM IR (-O0):
define i32 @RGB2Cr(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i32, i32* %4
%8 = mul nsw i32 439, %7
%9 = load i32, i32* %5
%10 = mul nsw i32 368, %9
%11 = sub nsw i32 %8, %10
%12 = load i32, i32* %6
%13 = mul nsw i32 71, %12
%14 = sub nsw i32 %11, %13
%15 = add nsw i32 %14, 128500
%16 = sdiv i32 %15, 1000
ret i32 %16
}

LLVM IR (-O2):
define i32 @RGB2Cr(i32 %0, i32 %1, i32 %2) {
%4 = mul nsw i32 %0, 439
%5 = mul i32 %1, -368
%6 = mul i32 %2, -71
%7 = add i32 %4, 128500
%8 = add i32 %7, %5
%9 = add i32 %8, %6
%10 = sdiv i32 %9, 1000
ret i32 %10
}
void reg_write8(unsigned int address, unsigned char value) {
  unsigned char *mem = (unsigned char *)address;
  *mem = value;
}


x86 assembly (clang, -O0):
<reg_write8>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %edi,-0x4(%rbp)
mov    %al,-0x5(%rbp)
mov    -0x4(%rbp),%eax
mov    %rax,-0x10(%rbp)
mov    -0x5(%rbp),%cl
mov    -0x10(%rbp),%rax
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<reg_write8>:
mov    %edi,%eax
mov    %sil,(%rax)
ret

LLVM IR (-O0):
define void @reg_write8(i32 %0, i8 zeroext %1) {
%3 = alloca i32
%4 = alloca i8
%5 = alloca i8*
store i32 %0, i32* %3
store i8 %1, i8* %4
%6 = load i32, i32* %3
%7 = zext i32 %6 to i64
%8 = inttoptr i64 %7 to i8*
store i8* %8, i8** %5
%9 = load i8, i8* %4
%10 = load i8*, i8** %5
store i8 %9, i8* %10
ret void
}

LLVM IR (-O2):
define void @reg_write8(i32 %0, i8 zeroext %1) {
%3 = zext i32 %0 to i64
%4 = inttoptr i64 %3 to i8*
store i8 %1, i8* %4
ret void
}
void b43_leds_register(struct b43_wldev *dev) {}


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

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

LLVM IR (-O0):
%struct.b43_wldev = type opaque
define void @b43_leds_register(%struct.b43_wldev* %0) {
%2 = alloca %struct.b43_wldev*
store %struct.b43_wldev* %0, %struct.b43_wldev** %2
ret void
}

LLVM IR (-O2):
%struct.b43_wldev = type opaque
define void @b43_leds_register(%struct.b43_wldev* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ pushattributes();
void pushat_() { pushattributes(); }


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

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

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

LLVM IR (-O2):
define void @pushat_() {
%1 = tail call i32 (...) @pushattributes()
ret void
}
int ft_isprint(int c) { return ((c > 31 && c < 127) ? 1 : 0); }


x86 assembly (clang, -O0):
<ft_isprint>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
xor    %eax,%eax
cmpl   $0x1f,-0x4(%rbp)
mov    %al,-0x5(%rbp)
jle    1120 <ft_isprint+0x20>
cmpl   $0x7f,-0x4(%rbp)
setl   %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%dl
xor    %eax,%eax
mov    $0x1,%ecx
test   $0x1,%dl
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_isprint>:
add    $0xffffffe0,%edi
xor    %eax,%eax
cmp    $0x5f,%edi
setb   %al
ret

LLVM IR (-O0):
define i32 @ft_isprint(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp sgt i32 %3, 31
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i32, i32* %2
%7 = icmp slt i32 %6, 127
br label %8
8: ; preds = %5, %1
%9 = phi i1 [ false, %1 ], [ %7, %5 ]
%10 = zext i1 %9 to i64
%11 = select i1 %9, i32 1, i32 0
ret i32 %11
}

LLVM IR (-O2):
define i32 @ft_isprint(i32 %0) {
%2 = add i32 %0, -32
%3 = icmp ult i32 %2, 95
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ sigset_t;

/* Variables and functions */
int /*<<< orphan*/ sigemptyset(int /*<<< orphan*/ *);
int sigsuspend(int /*<<< orphan*/ *);
int test(void) {
  sigset_t sigmask;
  int result;
  (void)sigemptyset(&sigmask);
  result = sigsuspend(&sigmask);
  return result;
}


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

x86 assembly (clang, -O2):
<test>:
push   %rbx
sub    $0x10,%rsp
lea    0xc(%rsp),%rbx
mov    %rbx,%rdi
call   1030 <sigemptyset@plt>
mov    %rbx,%rdi
call   1040 <sigsuspend@plt>
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define i32 @test() {
%1 = alloca i32
%2 = alloca i32
%3 = call i32 @sigemptyset(i32* %1)
%4 = call i32 @sigsuspend(i32* %1)
store i32 %4, i32* %2
%5 = load i32, i32* %2
ret i32 %5
}

LLVM IR (-O2):
define i32 @test() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @sigemptyset(i32* %1)
%4 = call i32 @sigsuspend(i32* %1)
ret i32 %4
}
int dynref__open(struct dynref__obj *const p, const char *ref_file_path,
                 const char mode) {}


x86 assembly (clang, -O0):
<dynref__open>:
push   %rbp
mov    %rsp,%rbp
mov    %dl,%al
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %al,-0x19(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.dynref__obj = type opaque
define i32 @dynref__open(%struct.dynref__obj* %0, i8* %1, i8 signext %2) {
%4 = alloca i32
%5 = alloca %struct.dynref__obj*
%6 = alloca i8*
%7 = alloca i8
store %struct.dynref__obj* %0, %struct.dynref__obj** %5
store i8* %1, i8** %6
store i8 %2, i8* %7
%8 = load i32, i32* %4
ret i32 %8
}

LLVM IR (-O2):
%struct.dynref__obj = type opaque
define i32 @dynref__open(%struct.dynref__obj* nocapture readnone %0, i8* nocapture readnone %1, i8 signext %2) {
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ isnan(float);
float flex_auto_to_0(float value) { return !isnan(value) ? value : 0; }


x86 assembly (clang, -O0):
<flex_auto_to_0>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
call   1030 <isnan@plt>
cmp    $0x0,%eax
jne    113f <flex_auto_to_0+0x2f>
movss  -0x4(%rbp),%xmm0
movss  %xmm0,-0x8(%rbp)
jmp    114c <flex_auto_to_0+0x3c>
xorps  %xmm0,%xmm0
movss  %xmm0,-0x8(%rbp)
jmp    114c <flex_auto_to_0+0x3c>
movss  -0x8(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<flex_auto_to_0>:
push   %rax
movss  %xmm0,0x4(%rsp)
call   1030 <isnan@plt>
movss  0x4(%rsp),%xmm0
test   %eax,%eax
je     1129 <flex_auto_to_0+0x19>
xorps  %xmm0,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @flex_auto_to_0(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = call i32 @isnan(float %3)
%5 = icmp ne i32 %4, 0
br i1 %5, label %8, label %6
6: ; preds = %1
%7 = load float, float* %2
br label %9
8: ; preds = %1
br label %9
9: ; preds = %8, %6
%10 = phi float [ %7, %6 ], [ 0.000000e+00, %8 ]
ret float %10
}

LLVM IR (-O2):
define float @flex_auto_to_0(float %0) {
%2 = tail call i32 @isnan(float %0)
%3 = icmp eq i32 %2, 0
%4 = select i1 %3, float %0, float 0.000000e+00
ret float %4
}
mlreplyt(prompt, buf, nbuf, eolchar) char *prompt;
char *buf;
int eolchar;
int nbuf;
{ return (nextarg(prompt, buf, nbuf, eolchar)); }


x86 assembly (clang, -O0):
<mlreplyt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %ecx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
mov    -0x18(%rbp),%ecx
mov    $0x0,%al
call   1030 <nextarg@plt>
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @mlreplyt(i8* %0, i8* %1, i32 %2, i32 %3) {
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i32
%8 = alloca i32
store i8* %0, i8** %5
store i8* %1, i8** %6
store i32 %2, i32* %7
store i32 %3, i32* %8
%9 = load i8*, i8** %5
%10 = load i8*, i8** %6
%11 = load i32, i32* %7
%12 = load i32, i32* %8
%13 = call i32 (i8*, i8*, i32, i32, ...) bitcast (i32 (...)* @nextarg to i32 (i8*, i8*, i32, i32, ...)*)(i8* %9, i8* %10, i32 %11, i32 %12)
ret i32 %13
}

LLVM IR (-O2):
define i32 @mlreplyt(i8* %0, i8* %1, i32 %2, i32 %3) {
%5 = tail call i32 (i8*, i8*, i32, i32, ...) bitcast (i32 (...)* @nextarg to i32 (i8*, i8*, i32, i32, ...)*)(i8* %0, i8* %1, i32 %2, i32 %3)
ret i32 %5
}