xunge/DecIR huggingface dataset:
/* Variables and functions */
scalar_t__ getpid();
int getppid();
scalar_t__ getsid(int /*<<< orphan*/);
int diminuto_log_interactive() {
  return ((getpid() != getsid(0)) && (getppid() != 1));
}


x86 assembly (clang, -O0):
<diminuto_log_interactive>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <getpid@plt>
mov    %rax,-0x10(%rbp)
xor    %edi,%edi
call   1040 <getsid@plt>
mov    -0x10(%rbp),%rcx
mov    %rax,%rdx
xor    %eax,%eax
cmp    %rdx,%rcx
mov    %al,-0x1(%rbp)
je     116f <diminuto_log_interactive+0x3f>
mov    $0x0,%al
call   1050 <getppid@plt>
cmp    $0x1,%eax
setne  %al
mov    %al,-0x1(%rbp)
mov    -0x1(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<diminuto_log_interactive>:
push   %r14
push   %rbx
push   %rax
xor    %ebx,%ebx
xor    %eax,%eax
call   1030 <getpid@plt>
mov    %rax,%r14
xor    %edi,%edi
call   1040 <getsid@plt>
cmp    %rax,%r14
je     115b <diminuto_log_interactive+0x2b>
xor    %eax,%eax
call   1050 <getppid@plt>
xor    %ebx,%ebx
cmp    $0x1,%eax
setne  %bl
mov    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i32 @diminuto_log_interactive() {
%1 = call i64 (...) @getpid()
%2 = call i64 @getsid(i32 0)
%3 = icmp ne i64 %1, %2
br i1 %3, label %4, label %7
4: ; preds = %0
%5 = call i32 (...) @getppid()
%6 = icmp ne i32 %5, 1
br label %7
7: ; preds = %4, %0
%8 = phi i1 [ false, %0 ], [ %6, %4 ]
%9 = zext i1 %8 to i32
ret i32 %9
}

LLVM IR (-O2):
define i32 @diminuto_log_interactive() {
%1 = tail call i64 (...) @getpid()
%2 = tail call i64 @getsid(i32 0)
%3 = icmp eq i64 %1, %2
br i1 %3, label %8, label %4
4: ; preds = %0
%5 = tail call i32 (...) @getppid()
%6 = icmp ne i32 %5, 1
%7 = zext i1 %6 to i32
br label %8
8: ; preds = %4, %0
%9 = phi i32 [ 0, %0 ], [ %7, %4 ]
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *);
int /*<<< orphan*/ recoverableError(char *);
int /*<<< orphan*/ stderr;
void includebinTooBigError(const char *includefile) {
  recoverableError("The file to be include with the includebin is too large");
  fprintf(stderr, "     IncludeBin: %s  \n", includefile);
  exit(1);
}


x86 assembly (clang, -O0):
<includebinTooBigError>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xebd(%rip),%rdi
call   1030 <recoverableError@plt>
mov    0x2e91(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xedc(%rip),%rsi
call   1040 <fprintf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<includebinTooBigError>:
push   %rbx
mov    %rdi,%rbx
lea    0xec5(%rip),%rdi
call   1030 <recoverableError@plt>
mov    0x2e99(%rip),%rax
mov    (%rax),%edi
lea    0xee8(%rip),%rsi
mov    %rbx,%rdx
call   1040 <fprintf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [56 x i8] c"The file to be include with the includebin is too large\00"
@stderr = global i32 0
@.str.1 = [23 x i8] c" IncludeBin: %s \0A\00"
define void @includebinTooBigError(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 @recoverableError(i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str, i64 0, i64 0))
%4 = load i32, i32* @stderr
%5 = load i8*, i8** %2
%6 = call i32 @fprintf(i32 %4, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.1, i64 0, i64 0), i8* %5)
%7 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@.str = [56 x i8] c"The file to be include with the includebin is too large\00"
@stderr = global i32 0
@.str.1 = [23 x i8] c" IncludeBin: %s \0A\00"
define void @includebinTooBigError(i8* %0) {
%2 = tail call i32 @recoverableError(i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* @stderr
%4 = tail call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.1, i64 0, i64 0), i8* %0)
%5 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ Cross_lf(double *, double *, double *);
double Dot_lf(double *, double *, int);
double ScalarTriple_lf(double *x, double *y, double *z) {
  double tmp[3];
  double stp;
  Cross_lf(y, z, tmp);
  stp = Dot_lf(x, tmp, 3);
  return stp;
}


x86 assembly (clang, -O0):
<ScalarTriple_lf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
lea    -0x30(%rbp),%rdx
call   1040 <Cross_lf@plt>
mov    -0x8(%rbp),%rdi
lea    -0x30(%rbp),%rsi
mov    $0x3,%edx
call   1030 <Dot_lf@plt>
movsd  %xmm0,-0x38(%rbp)
movsd  -0x38(%rbp),%xmm0
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ScalarTriple_lf>:
push   %r14
push   %rbx
sub    $0x18,%rsp
mov    %rdi,%rbx
mov    %rsp,%r14
mov    %rsi,%rdi
mov    %rdx,%rsi
mov    %r14,%rdx
call   1040 <Cross_lf@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
mov    $0x3,%edx
call   1030 <Dot_lf@plt>
add    $0x18,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define double @ScalarTriple_lf(double* %0, double* %1, double* %2) {
%4 = alloca double*
%5 = alloca double*
%6 = alloca double*
%7 = alloca [3 x double]
%8 = alloca double
store double* %0, double** %4
store double* %1, double** %5
store double* %2, double** %6
%9 = load double*, double** %5
%10 = load double*, double** %6
%11 = getelementptr inbounds [3 x double], [3 x double]* %7, i64 0, i64 0
%12 = call i32 @Cross_lf(double* %9, double* %10, double* %11)
%13 = load double*, double** %4
%14 = getelementptr inbounds [3 x double], [3 x double]* %7, i64 0, i64 0
%15 = call double @Dot_lf(double* %13, double* %14, i32 3)
store double %15, double* %8
%16 = load double, double* %8
ret double %16
}

LLVM IR (-O2):
define double @ScalarTriple_lf(double* %0, double* %1, double* %2) {
%4 = alloca [3 x double]
%5 = bitcast [3 x double]* %4 to i8*
%6 = getelementptr inbounds [3 x double], [3 x double]* %4, i64 0, i64 0
%7 = call i32 @Cross_lf(double* %1, double* %2, double* %6)
%8 = call double @Dot_lf(double* %0, double* %6, i32 3)
ret double %8
}
void f_int_p2(int f) { return; }


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

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

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

LLVM IR (-O2):
define void @f_int_p2(i32 %0) {
ret void
}
/* Variables and functions */
int strcmp(void const *, void const *);
int cmpline(const void *a, const void *b) { return strcmp(a, b); }


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

x86 assembly (clang, -O2):
<cmpline>:
jmp    1030 <strcmp@plt>

LLVM IR (-O0):
define i32 @cmpline(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 i32 @strcmp(i8* %5, i8* %6)
ret i32 %7
}

LLVM IR (-O2):
define i32 @cmpline(i8* nocapture %0, i8* nocapture %1) {
%3 = tail call i32 @strcmp(i8* dereferenceable(1) %0, i8* dereferenceable(1) %1)
ret i32 %3
}
void UARTLineCharacConfig(unsigned int baseAdd, unsigned int wLenStbFlag,
                          unsigned int parityFlag) {
  (*((volatile unsigned int *)(baseAdd + (0xC)))) &=
      ~((0x00000004u) | (0x00000003u));
  (*((volatile unsigned int *)(baseAdd + (0xC)))) |=
      (wLenStbFlag & ((0x00000004u) | (0x00000003u)));
  (*((volatile unsigned int *)(baseAdd + (0xC)))) &=
      ~((0x00000020u) | (0x00000010u) | (0x00000008u));
  (*((volatile unsigned int *)(baseAdd + (0xC)))) |=
      (parityFlag & ((0x00000020u) | (0x00000010u) | (0x00000008u)));
}


x86 assembly (clang, -O0):
<UARTLineCharacConfig>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%eax
add    $0xc,%eax
mov    %eax,%eax
mov    (%rax),%ecx
and    $0xfffffff8,%ecx
mov    %ecx,(%rax)
mov    -0x8(%rbp),%edx
and    $0x7,%edx
mov    -0x4(%rbp),%eax
add    $0xc,%eax
mov    %eax,%eax
mov    (%rax),%ecx
or     %edx,%ecx
mov    %ecx,(%rax)
mov    -0x4(%rbp),%eax
add    $0xc,%eax
mov    %eax,%eax
mov    (%rax),%ecx
and    $0xffffffc7,%ecx
mov    %ecx,(%rax)
mov    -0xc(%rbp),%edx
and    $0x38,%edx
mov    -0x4(%rbp),%eax
add    $0xc,%eax
mov    %eax,%eax
mov    (%rax),%ecx
or     %edx,%ecx
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<UARTLineCharacConfig>:
add    $0xc,%edi
andl   $0xfffffff8,(%rdi)
and    $0x7,%esi
or     %esi,(%rdi)
andl   $0xffffffc7,(%rdi)
and    $0x38,%edx
or     %edx,(%rdi)
ret

LLVM IR (-O0):
define void @UARTLineCharacConfig(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 = add i32 %7, 12
%9 = zext i32 %8 to i64
%10 = inttoptr i64 %9 to i32*
%11 = load volatile i32, i32* %10
%12 = and i32 %11, -8
store volatile i32 %12, i32* %10
%13 = load i32, i32* %5
%14 = and i32 %13, 7
%15 = load i32, i32* %4
%16 = add i32 %15, 12
%17 = zext i32 %16 to i64
%18 = inttoptr i64 %17 to i32*
%19 = load volatile i32, i32* %18
%20 = or i32 %19, %14
store volatile i32 %20, i32* %18
%21 = load i32, i32* %4
%22 = add i32 %21, 12
%23 = zext i32 %22 to i64
%24 = inttoptr i64 %23 to i32*
%25 = load volatile i32, i32* %24
%26 = and i32 %25, -57
store volatile i32 %26, i32* %24
%27 = load i32, i32* %6
%28 = and i32 %27, 56
%29 = load i32, i32* %4
%30 = add i32 %29, 12
%31 = zext i32 %30 to i64
%32 = inttoptr i64 %31 to i32*
%33 = load volatile i32, i32* %32
%34 = or i32 %33, %28
store volatile i32 %34, i32* %32
ret void
}

LLVM IR (-O2):
define void @UARTLineCharacConfig(i32 %0, i32 %1, i32 %2) {
%4 = add i32 %0, 12
%5 = zext i32 %4 to i64
%6 = inttoptr i64 %5 to i32*
%7 = load volatile i32, i32* %6
%8 = and i32 %7, -8
store volatile i32 %8, i32* %6
%9 = and i32 %1, 7
%10 = load volatile i32, i32* %6
%11 = or i32 %10, %9
store volatile i32 %11, i32* %6
%12 = load volatile i32, i32* %6
%13 = and i32 %12, -57
store volatile i32 %13, i32* %6
%14 = and i32 %2, 56
%15 = load volatile i32, i32* %6
%16 = or i32 %15, %14
store volatile i32 %16, i32* %6
ret void
}
void xfrm_unregister_type(void) { nsc_assert(0, __func__); }


x86 assembly (clang, -O0):
<xfrm_unregister_type>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
lea    0xee3(%rip),%rsi
mov    $0x0,%al
call   1030 <nsc_assert@plt>
pop    %rbp
ret

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

LLVM IR (-O0):
@__func__.xfrm_unregister_type = [21 x i8] c"xfrm_unregister_type\00"
define void @xfrm_unregister_type() {
%1 = call i32 (i32, i8*, ...) bitcast (i32 (...)* @nsc_assert to i32 (i32, i8*, ...)*)(i32 0, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @__func__.xfrm_unregister_type, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@__func__.xfrm_unregister_type = [21 x i8] c"xfrm_unregister_type\00"
define void @xfrm_unregister_type() {
%1 = tail call i32 (i32, i8*, ...) bitcast (i32 (...)* @nsc_assert to i32 (i32, i8*, ...)*)(i32 0, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @__func__.xfrm_unregister_type, i64 0, i64 0))
ret void
}
int get_cmd_len(int cbyte) {
  int len;
  int group;
  group = (cbyte >> 5) & 7;
  if (group == 0)
    len = 6;
  if (group == 1 || group == 2)
    len = 10;
  if (group == 5)
    len = 12;
  return (len);
}


x86 assembly (clang, -O0):
<get_cmd_len>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x5,%eax
and    $0x7,%eax
mov    %eax,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jne    1124 <get_cmd_len+0x24>
movl   $0x6,-0x8(%rbp)
cmpl   $0x1,-0xc(%rbp)
je     1138 <get_cmd_len+0x38>
cmpl   $0x2,-0xc(%rbp)
jne    113f <get_cmd_len+0x3f>
movl   $0xa,-0x8(%rbp)
cmpl   $0x5,-0xc(%rbp)
jne    1150 <get_cmd_len+0x50>
movl   $0xc,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_cmd_len>:
shr    $0x5,%edi
and    $0x7,%edi
lea    -0x1(%rdi),%eax
xor    %ecx,%ecx
cmp    $0x2,%eax
setb   %cl
lea    0x6(,%rcx,4),%ecx
cmp    $0x5,%edi
mov    $0xc,%eax
cmovne %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @get_cmd_len(i32 %0) {
%2 = lshr i32 %0, 5
%3 = and i32 %2, 7
%4 = add nsw i32 %3, -1
%5 = icmp ult i32 %4, 2
%6 = select i1 %5, i32 10, i32 6
%7 = icmp eq i32 %3, 5
%8 = select i1 %7, i32 12, i32 %6
ret i32 %8
}
void ARGB1555ToARGB() {}


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

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

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

LLVM IR (-O2):
define void @ARGB1555ToARGB() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ ispunct(int);
void t_ispunct_0xbe() {
  Assert_real((ispunct(190) == 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_ispunct.c",
              955, ("ispunct should be 0 for 0xbe"));
}


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

x86 assembly (clang, -O2):
<t_ispunct_0xbe>:
push   %rax
mov    $0xbe,%edi
call   1030 <ispunct@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x3bb,%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_ispunct.c\00"
@.str.1 = [29 x i8] c"ispunct should be 0 for 0xbe\00"
define void @t_ispunct_0xbe() {
%1 = call i64 @ispunct(i32 190)
%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 955, 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_ispunct.c\00"
@.str.1 = [29 x i8] c"ispunct should be 0 for 0xbe\00"
define void @t_ispunct_0xbe() {
%1 = tail call i64 @ispunct(i32 190)
%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 955, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  scalar_t__ free_private;
};
typedef TYPE_1__ XExtData;

/* Variables and functions */
void *get_XExtData_free_private(void *_p) {
  return (void *)((XExtData *)_p)->free_private;
}


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

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

LLVM IR (-O0):
%struct.TYPE_2__ = type { i64 }
define i8* @get_XExtData_free_private(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = bitcast i8* %3 to %struct.TYPE_2__*
%5 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %4, i32 0, i32 0
%6 = load i64, i64* %5
%7 = inttoptr i64 %6 to i8*
ret i8* %7
}

LLVM IR (-O2):
define i8* @get_XExtData_free_private(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
%4 = inttoptr i64 %3 to i8*
ret i8* %4
}
int sljit_is_fpu_available(void) { return 1; }


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

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

LLVM IR (-O0):
define i32 @sljit_is_fpu_available() {
ret i32 1
}

LLVM IR (-O2):
define i32 @sljit_is_fpu_available() {
ret i32 1
}
int roundInt(float a) {
  if (a >= 0)
    return (int)(a + 0.5);
  else
    return (int)(a - 0.5);
}


x86 assembly (clang, -O0):
<roundInt>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x8(%rbp)
movss  -0x8(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jb     113b <roundInt+0x3b>
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xed5(%rip),%xmm1
addsd  %xmm1,%xmm0
cvttsd2si %xmm0,%eax
mov    %eax,-0x4(%rbp)
jmp    1157 <roundInt+0x57>
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xeb4(%rip),%xmm1
subsd  %xmm1,%xmm0
cvttsd2si %xmm0,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<roundInt>:
xorps  %xmm1,%xmm1
xor    %eax,%eax
ucomiss %xmm1,%xmm0
setb   %al
cvtss2sd %xmm0,%xmm0
lea    0xeea(%rip),%rcx
addsd  (%rcx,%rax,8),%xmm0
cvttsd2si %xmm0,%eax
ret

LLVM IR (-O0):
define i32 @roundInt(float %0) {
%2 = alloca i32
%3 = alloca float
store float %0, float* %3
%4 = load float, float* %3
%5 = fcmp oge float %4, 0.000000e+00
br i1 %5, label %6, label %11
6: ; preds = %1
%7 = load float, float* %3
%8 = fpext float %7 to double
%9 = fadd double %8, 5.000000e-01
%10 = fptosi double %9 to i32
store i32 %10, i32* %2
br label %16
11: ; preds = %1
%12 = load float, float* %3
%13 = fpext float %12 to double
%14 = fsub double %13, 5.000000e-01
%15 = fptosi double %14 to i32
store i32 %15, i32* %2
br label %16
16: ; preds = %11, %6
%17 = load i32, i32* %2
ret i32 %17
}

LLVM IR (-O2):
define i32 @roundInt(float %0) {
%2 = fcmp ult float %0, 0.000000e+00
%3 = fpext float %0 to double
%4 = select i1 %2, double -5.000000e-01, double 5.000000e-01
%5 = fadd double %4, %3
%6 = fptosi double %5 to i32
ret i32 %6
}
/* Variables and functions */
int search_file(char *, char *);
int main(void) { return search_file("mobydick.txt", "the"); }


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

x86 assembly (clang, -O2):
<main>:
lea    0xee9(%rip),%rdi
lea    0xeef(%rip),%rsi
jmp    1030 <search_file@plt>

LLVM IR (-O0):
@.str = [13 x i8] c"mobydick.txt\00"
@.str.1 = [4 x i8] c"the\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @search_file(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
ret i32 %2
}

LLVM IR (-O2):
@.str = [13 x i8] c"mobydick.txt\00"
@.str.1 = [4 x i8] c"the\00"
define i32 @main() {
%1 = tail call i32 @search_file(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ gets(char **);
void nothing() {
  char *buf0[50];
  gets(buf0);
}


x86 assembly (clang, -O0):
<nothing>:
push   %rbp
mov    %rsp,%rbp
sub    $0x190,%rsp
lea    -0x190(%rbp),%rdi
call   1030 <gets@plt>
add    $0x190,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<nothing>:
sub    $0x198,%rsp
mov    %rsp,%rdi
call   1030 <gets@plt>
add    $0x198,%rsp
ret

LLVM IR (-O0):
define void @nothing() {
%1 = alloca [50 x i8*]
%2 = getelementptr inbounds [50 x i8*], [50 x i8*]* %1, i64 0, i64 0
%3 = call i32 @gets(i8** %2)
ret void
}

LLVM IR (-O2):
define void @nothing() {
%1 = alloca [50 x i8*]
%2 = bitcast [50 x i8*]* %1 to i8*
%3 = getelementptr inbounds [50 x i8*], [50 x i8*]* %1, i64 0, i64 0
%4 = call i32 @gets(i8** %3)
ret void
}
/* Variables and functions */
size_t ZSTD_read_ARCH(const void *p) { return *(size_t *)p; }


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

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

LLVM IR (-O0):
define i64 @ZSTD_read_ARCH(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = bitcast i8* %3 to i64*
%5 = load i64, i64* %4
ret i64 %5
}

LLVM IR (-O2):
define i64 @ZSTD_read_ARCH(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
ret i64 %3
}
void ANDROID_MEMBAR_FULL(void) { __asm__ __volatile__("mfence" ::: "memory"); }


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

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

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

LLVM IR (-O2):
define void @ANDROID_MEMBAR_FULL() {
tail call void asm sideeffect "mfence", "~{memory},~{dirflag},~{fpsr},~{flags}"()
ret void
}
/* Variables and functions */
void *__attribute__((no))
do_jit_call(void *rf, void *mem,
            void *(*code)(void *, void *, void *, void *)) {
  void *r = code(NULL, rf, NULL, mem);
  return r;
}


x86 assembly (clang, -O0):
<do_jit_call>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rcx
xor    %edx,%edx
mov    %rdx,%rdi
call   *%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<do_jit_call>:
mov    %rdx,%rax
mov    %rsi,%rcx
mov    %rdi,%rsi
xor    %edi,%edi
xor    %edx,%edx
jmp    *%rax

LLVM IR (-O0):
define i8* @do_jit_call(i8* %0, i8* %1, i8* (i8*, i8*, i8*, i8*)* %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8* (i8*, i8*, i8*, i8*)*
%7 = alloca i8*
store i8* %0, i8** %4
store i8* %1, i8** %5
store i8* (i8*, i8*, i8*, i8*)* %2, i8* (i8*, i8*, i8*, i8*)** %6
%8 = load i8* (i8*, i8*, i8*, i8*)*, i8* (i8*, i8*, i8*, i8*)** %6
%9 = load i8*, i8** %4
%10 = load i8*, i8** %5
%11 = call i8* %8(i8* null, i8* %9, i8* null, i8* %10)
store i8* %11, i8** %7
%12 = load i8*, i8** %7
ret i8* %12
}

LLVM IR (-O2):
define i8* @do_jit_call(i8* %0, i8* %1, i8* (i8*, i8*, i8*, i8*)* nocapture %2) {
%4 = tail call i8* %2(i8* null, i8* %0, i8* null, i8* %1)
ret i8* %4
}
/* Variables and functions */
long long SieveOfEratosthenes(long long, long long *);
long long *calloc(int, int);
int /*<<< orphan*/ find3Numbers(long long *, long long, long long);
int /*<<< orphan*/ scanf(char *, long long *);
int main() {
  long long test;
  long long n;
  scanf("%lld", &n);
  long long *arr = calloc(10000007, sizeof(long long));
  long long size = SieveOfEratosthenes(n, arr);
  find3Numbers(arr, size, n);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeaa(%rip),%rdi
lea    -0x18(%rbp),%rsi
call   1050 <scanf@plt>
mov    $0x989687,%edi
mov    $0x8,%esi
call   1040 <calloc@plt>
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x20(%rbp),%rsi
call   1030 <SieveOfEratosthenes@plt>
mov    %rax,-0x28(%rbp)
mov    -0x20(%rbp),%rdi
mov    -0x28(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1060 <find3Numbers@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
lea    0xeb4(%rip),%rdi
lea    0x8(%rsp),%rsi
call   1050 <scanf@plt>
mov    $0x989687,%edi
mov    $0x8,%esi
call   1040 <calloc@plt>
mov    %rax,%rbx
mov    0x8(%rsp),%rdi
mov    %rax,%rsi
call   1030 <SieveOfEratosthenes@plt>
mov    0x8(%rsp),%rdx
mov    %rbx,%rdi
mov    %rax,%rsi
call   1060 <find3Numbers@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [5 x i8] c"%lld\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i64
%3 = alloca i64
%4 = alloca i64*
%5 = alloca i64
store i32 0, i32* %1
%6 = call i32 @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i64* %3)
%7 = call i64* @calloc(i32 10000007, i32 8)
store i64* %7, i64** %4
%8 = load i64, i64* %3
%9 = load i64*, i64** %4
%10 = call i64 @SieveOfEratosthenes(i64 %8, i64* %9)
store i64 %10, i64* %5
%11 = load i64*, i64** %4
%12 = load i64, i64* %5
%13 = load i64, i64* %3
%14 = call i32 @find3Numbers(i64* %11, i64 %12, i64 %13)
ret i32 0
}

LLVM IR (-O2):
@.str = [5 x i8] c"%lld\00"
define i32 @main() {
%1 = alloca i64
%2 = bitcast i64* %1 to i8*
%3 = call i32 @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i64* %1)
%4 = call i64* @calloc(i32 10000007, i32 8)
%5 = load i64, i64* %1
%6 = call i64 @SieveOfEratosthenes(i64 %5, i64* %4)
%7 = load i64, i64* %1
%8 = call i32 @find3Numbers(i64* %4, i64 %6, i64 %7)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void instructions(void) {
  printf("Enter your choice:\n"
         "   1 to insert an element into the list.\n"
         "   2 to delete an element from the list.\n"
         "   3 to end.\n");
}


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

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

LLVM IR (-O0):
@.str = [115 x i8] c"Enter your choice:\0A 1 to insert an element into the list.\0A 2 to delete an element from the list.\0A 3 to end.\0A\00"
define void @instructions() {
%1 = call i32 @printf(i8* getelementptr inbounds ([115 x i8], [115 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [114 x i8] c"Enter your choice:\0A 1 to insert an element into the list.\0A 2 to delete an element from the list.\0A 3 to end.\00"
define void @instructions() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([114 x i8], [114 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fatal(char *);
void *malloc(unsigned int);
void *ec_malloc(unsigned int size) {
  void *ptr;
  ptr = malloc(size);
  if (ptr == NULL)
    fatal("in ec_malloc() on memory allocation");
  return ptr;
}


x86 assembly (clang, -O0):
<ec_malloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    114e <ec_malloc+0x2e>
lea    0xeb7(%rip),%rdi
call   1040 <fatal@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ec_malloc>:
push   %rbx
call   1030 <malloc@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    113a <ec_malloc+0x1a>
lea    0xecb(%rip),%rdi
call   1040 <fatal@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [36 x i8] c"in ec_malloc() on memory allocation\00"
define i8* @ec_malloc(i32 %0) {
%2 = alloca i32
%3 = alloca i8*
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = call i8* @malloc(i32 %4)
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = icmp eq i8* %6, null
br i1 %7, label %8, label %10
8: ; preds = %1
%9 = call i32 @fatal(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0))
br label %10
10: ; preds = %8, %1
%11 = load i8*, i8** %3
ret i8* %11
}

LLVM IR (-O2):
@.str = [36 x i8] c"in ec_malloc() on memory allocation\00"
define noalias i8* @ec_malloc(i32 %0) {
%2 = tail call i8* @malloc(i32 %0)
%3 = icmp eq i8* %2, null
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 @fatal(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0))
br label %6
6: ; preds = %4, %1
ret i8* %2
}
/* Variables and functions */
double nan(int /*<<< orphan*/ *);
double trio_nan(void) {
  static double result = 0.0;
  if (result == 0.0) {
    result = nan(NULL);
  }
  return result;
}


x86 assembly (clang, -O0):
<trio_nan>:
push   %rbp
mov    %rsp,%rbp
movsd  0x2f14(%rip),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    1140 <trio_nan+0x30>
jp     1140 <trio_nan+0x30>
xor    %eax,%eax
mov    %eax,%edi
call   1030 <nan@plt>
movsd  %xmm0,0x2ef0(%rip)
movsd  0x2ee8(%rip),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<trio_nan>:
push   %rax
movsd  0x2f17(%rip),%xmm0
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    1134 <trio_nan+0x24>
jp     1134 <trio_nan+0x24>
xor    %edi,%edi
call   1030 <nan@plt>
movsd  %xmm0,0x2efc(%rip)
pop    %rax
ret

LLVM IR (-O0):
@trio_nan.result = internal global double 0.000000e+00
define double @trio_nan() {
%1 = load double, double* @trio_nan.result
%2 = fcmp oeq double %1, 0.000000e+00
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = call double @nan(i32* null)
store double %4, double* @trio_nan.result
br label %5
5: ; preds = %3, %0
%6 = load double, double* @trio_nan.result
ret double %6
}

LLVM IR (-O2):
@trio_nan.result = internal unnamed_addr global double 0.000000e+00
define double @trio_nan() {
%1 = load double, double* @trio_nan.result
%2 = fcmp oeq double %1, 0.000000e+00
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = tail call double @nan(i32* null)
store double %4, double* @trio_nan.result
br label %5
5: ; preds = %3, %0
%6 = phi double [ %4, %3 ], [ %1, %0 ]
ret double %6
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ islower(int);
void t_islower_0xa6() {
  Assert_real((islower(166) == 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",
              835, ("islower should be 0 for 0xa6"));
}


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

x86 assembly (clang, -O2):
<t_islower_0xa6>:
push   %rax
mov    $0xa6,%edi
call   1030 <islower@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x343,%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 0xa6\00"
define void @t_islower_0xa6() {
%1 = call i64 @islower(i32 166)
%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 835, 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 0xa6\00"
define void @t_islower_0xa6() {
%1 = tail call i64 @islower(i32 166)
%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 835, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int generate_snp_sites_generic(char *, int, int, int, char *, int, int, int);
int generate_snp_sites_with_ref_pure_mono(
    char filename[], int output_multi_fasta_file, int output_vcf_file,
    int output_phylip_file, char output_filename[], int output_reference,
    int pure_mode, int output_monomorphic) {
  return generate_snp_sites_generic(
      filename, output_multi_fasta_file, output_vcf_file, output_phylip_file,
      output_filename, output_reference, pure_mode, output_monomorphic);
}


x86 assembly (clang, -O0):
<generate_snp_sites_with_ref_pure_mono>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    0x18(%rbp),%eax
mov    0x10(%rbp),%eax
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    %r8,-0x20(%rbp)
mov    %r9d,-0x24(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
mov    -0x14(%rbp),%ecx
mov    -0x20(%rbp),%r8
mov    -0x24(%rbp),%r9d
mov    0x10(%rbp),%r10d
mov    0x18(%rbp),%eax
mov    %r10d,(%rsp)
mov    %eax,0x8(%rsp)
call   1030 <generate_snp_sites_generic@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<generate_snp_sites_with_ref_pure_mono>:
jmp    1030 <generate_snp_sites_generic@plt>

LLVM IR (-O0):
define i32 @generate_snp_sites_with_ref_pure_mono(i8* %0, i32 %1, i32 %2, i32 %3, i8* %4, i32 %5, i32 %6, i32 %7) {
%9 = alloca i8*
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i8*
%14 = alloca i32
%15 = alloca i32
%16 = alloca i32
store i8* %0, i8** %9
store i32 %1, i32* %10
store i32 %2, i32* %11
store i32 %3, i32* %12
store i8* %4, i8** %13
store i32 %5, i32* %14
store i32 %6, i32* %15
store i32 %7, i32* %16
%17 = load i8*, i8** %9
%18 = load i32, i32* %10
%19 = load i32, i32* %11
%20 = load i32, i32* %12
%21 = load i8*, i8** %13
%22 = load i32, i32* %14
%23 = load i32, i32* %15
%24 = load i32, i32* %16
%25 = call i32 @generate_snp_sites_generic(i8* %17, i32 %18, i32 %19, i32 %20, i8* %21, i32 %22, i32 %23, i32 %24)
ret i32 %25
}

LLVM IR (-O2):
define i32 @generate_snp_sites_with_ref_pure_mono(i8* %0, i32 %1, i32 %2, i32 %3, i8* %4, i32 %5, i32 %6, i32 %7) {
%9 = tail call i32 @generate_snp_sites_generic(i8* %0, i32 %1, i32 %2, i32 %3, i8* %4, i32 %5, i32 %6, i32 %7)
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ assem_debug(char *, int);
int /*<<< orphan*/ output_byte(int);
int /*<<< orphan*/ output_modrm(int /*<<< orphan*/, int, int);
int /*<<< orphan*/ output_w32(int);
void emit_fldcw(int addr) {
  assem_debug("fldcw %x\n", addr);
  output_byte(0xd9);
  output_modrm(0, 5, 5);
  output_w32(addr);
}


x86 assembly (clang, -O0):
<emit_fldcw>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%esi
lea    0xeab(%rip),%rdi
call   1030 <assem_debug@plt>
mov    $0xd9,%edi
call   1050 <output_byte@plt>
xor    %edi,%edi
mov    $0x5,%edx
mov    %edx,%esi
call   1060 <output_modrm@plt>
mov    -0x4(%rbp),%edi
call   1040 <output_w32@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<emit_fldcw>:
push   %rbx
mov    %edi,%ebx
lea    0xeb6(%rip),%rdi
mov    %ebx,%esi
call   1030 <assem_debug@plt>
mov    $0xd9,%edi
call   1050 <output_byte@plt>
xor    %edi,%edi
mov    $0x5,%esi
mov    $0x5,%edx
call   1060 <output_modrm@plt>
mov    %ebx,%edi
pop    %rbx
jmp    1040 <output_w32@plt>

LLVM IR (-O0):
@.str = [10 x i8] c"fldcw %x\0A\00"
define void @emit_fldcw(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @assem_debug(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 %3)
%5 = call i32 @output_byte(i32 217)
%6 = call i32 @output_modrm(i32 0, i32 5, i32 5)
%7 = load i32, i32* %2
%8 = call i32 @output_w32(i32 %7)
ret void
}

LLVM IR (-O2):
@.str = [10 x i8] c"fldcw %x\0A\00"
define void @emit_fldcw(i32 %0) {
%2 = tail call i32 @assem_debug(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 %0)
%3 = tail call i32 @output_byte(i32 217)
%4 = tail call i32 @output_modrm(i32 0, i32 5, i32 5)
%5 = tail call i32 @output_w32(i32 %0)
ret void
}
void debug_init(const char *filename) {}


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

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

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

LLVM IR (-O2):
define void @debug_init(i8* nocapture %0) {
ret void
}
int gmx_node_num(void) { return 1; }


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

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

LLVM IR (-O0):
define i32 @gmx_node_num() {
ret i32 1
}

LLVM IR (-O2):
define i32 @gmx_node_num() {
ret i32 1
}
/* Variables and functions */
scalar_t__ isspace(char);
int break_word(int inquote, char *line) {
  if (*line == '\0' || *line == '\"')
    return (1);
  if (!inquote && isspace(*line))
    return (1);
  return (0);
}


x86 assembly (clang, -O0):
<break_word>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     113f <break_word+0x2f>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x22,%eax
jne    114b <break_word+0x3b>
movl   $0x1,-0x4(%rbp)
jmp    117e <break_word+0x6e>
cmpl   $0x0,-0x8(%rbp)
jne    1177 <break_word+0x67>
mov    -0x10(%rbp),%rax
movsbl (%rax),%edi
call   1030 <isspace@plt>
cmp    $0x0,%rax
je     1177 <break_word+0x67>
movl   $0x1,-0x4(%rbp)
jmp    117e <break_word+0x6e>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<break_word>:
push   %rbx
mov    (%rsi),%al
mov    $0x1,%ebx
test   %al,%al
je     1133 <break_word+0x23>
cmp    $0x22,%al
je     1133 <break_word+0x23>
test   %edi,%edi
jne    1131 <break_word+0x21>
movsbl %al,%edi
call   1030 <isspace@plt>
test   %rax,%rax
jne    1133 <break_word+0x23>
xor    %ebx,%ebx
mov    %ebx,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @break_word(i32 %0, i8* nocapture %1) {
%3 = load i8, i8* %1
switch i8 %3, label %4 [
i8 0, label %10
i8 34, label %10
]
4: ; preds = %2
%5 = icmp eq i32 %0, 0
br i1 %5, label %6, label %9
6: ; preds = %4
%7 = tail call i64 @isspace(i8 signext %3)
%8 = icmp eq i64 %7, 0
br i1 %8, label %9, label %10
9: ; preds = %6, %4
br label %10
10: ; preds = %6, %2, %2, %9
%11 = phi i32 [ 0, %9 ], [ 1, %2 ], [ 1, %2 ], [ 1, %6 ]
ret i32 %11
}
void g_object_disconnect() {}


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

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

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

LLVM IR (-O2):
define void @g_object_disconnect() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ memcpy(int /*<<< orphan*/, void const *, int /*<<< orphan*/);
int /*<<< orphan*/ register_data(int, int /*<<< orphan*/);
int /*<<< orphan*/ register_size(int);
void supply_register(int n, const void *buf) {
  memcpy(register_data(n, 0), buf, register_size(n));
}


x86 assembly (clang, -O0):
<supply_register>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%edi
xor    %esi,%esi
call   1050 <register_data@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <register_size@plt>
mov    -0x1c(%rbp),%edi
mov    -0x18(%rbp),%rsi
mov    %eax,%edx
call   1040 <memcpy@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<supply_register>:
push   %rbp
push   %r14
push   %rbx
mov    %rsi,%r14
mov    %edi,%ebp
xor    %esi,%esi
call   1050 <register_data@plt>
mov    %eax,%ebx
mov    %ebp,%edi
call   1030 <register_size@plt>
mov    %ebx,%edi
mov    %r14,%rsi
mov    %eax,%edx
pop    %rbx
pop    %r14
pop    %rbp
jmp    1040 <memcpy@plt>

LLVM IR (-O0):
define void @supply_register(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
store i32 %0, i32* %3
store i8* %1, i8** %4
%5 = load i32, i32* %3
%6 = call i32 @register_data(i32 %5, i32 0)
%7 = load i8*, i8** %4
%8 = load i32, i32* %3
%9 = call i32 @register_size(i32 %8)
%10 = call i32 @memcpy(i32 %6, i8* %7, i32 %9)
ret void
}

LLVM IR (-O2):
define void @supply_register(i32 %0, i8* %1) {
%3 = tail call i32 @register_data(i32 %0, i32 0)
%4 = tail call i32 @register_size(i32 %0)
%5 = tail call i32 @memcpy(i32 %3, i8* %1, i32 %4)
ret void
}
int c3_min(int x, int y) {
  if (y < x) {
    return y;
  } else {
    return x;
  }
}


x86 assembly (clang, -O0):
<c3_min>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1121 <c3_min+0x21>
mov    -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1127 <c3_min+0x27>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<c3_min>:
mov    %edi,%eax
cmp    %edi,%esi
cmovl  %esi,%eax
ret

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

LLVM IR (-O2):
define i32 @c3_min(i32 %0, i32 %1) {
%3 = icmp slt i32 %1, %0
%4 = select i1 %3, i32 %1, i32 %0
ret i32 %4
}
unsigned long tl880_calc_dpc_pll_const(unsigned long a, unsigned char b,
                                       unsigned char c) {
  return (((((a & 0x3ff) << 8) | (b & 0x1f)) << 4) | (c & 3)) << 4;
}


x86 assembly (clang, -O0):
<tl880_calc_dpc_pll_const>:
push   %rbp
mov    %rsp,%rbp
mov    %dl,%al
mov    %sil,%cl
mov    %rdi,-0x8(%rbp)
mov    %cl,-0x9(%rbp)
mov    %al,-0xa(%rbp)
mov    -0x8(%rbp),%rax
and    $0x3ff,%rax
shl    $0x8,%rax
movzbl -0x9(%rbp),%ecx
and    $0x1f,%ecx
movslq %ecx,%rcx
or     %rcx,%rax
shl    $0x4,%rax
movzbl -0xa(%rbp),%ecx
and    $0x3,%ecx
movslq %ecx,%rcx
or     %rcx,%rax
shl    $0x4,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<tl880_calc_dpc_pll_const>:
shl    $0x8,%edi
lea    (%rdi,%rsi,1),%ecx
and    $0x3ff1f,%ecx
shl    $0x8,%rcx
shl    $0x4,%dl
and    $0x30,%dl
movzbl %dl,%eax
or     %rcx,%rax
ret

LLVM IR (-O0):
define i64 @tl880_calc_dpc_pll_const(i64 %0, i8 zeroext %1, i8 zeroext %2) {
%4 = alloca i64
%5 = alloca i8
%6 = alloca i8
store i64 %0, i64* %4
store i8 %1, i8* %5
store i8 %2, i8* %6
%7 = load i64, i64* %4
%8 = and i64 %7, 1023
%9 = shl i64 %8, 8
%10 = load i8, i8* %5
%11 = zext i8 %10 to i32
%12 = and i32 %11, 31
%13 = sext i32 %12 to i64
%14 = or i64 %9, %13
%15 = shl i64 %14, 4
%16 = load i8, i8* %6
%17 = zext i8 %16 to i32
%18 = and i32 %17, 3
%19 = sext i32 %18 to i64
%20 = or i64 %15, %19
%21 = shl i64 %20, 4
ret i64 %21
}

LLVM IR (-O2):
define i64 @tl880_calc_dpc_pll_const(i64 %0, i8 zeroext %1, i8 zeroext %2) {
%4 = shl i64 %0, 8
%5 = and i64 %4, 261888
%6 = and i8 %1, 31
%7 = zext i8 %6 to i64
%8 = or i64 %5, %7
%9 = shl nuw nsw i64 %8, 8
%10 = shl i8 %2, 4
%11 = and i8 %10, 48
%12 = zext i8 %11 to i64
%13 = or i64 %9, %12
ret i64 %13
}
void analogWrite(int pin, int value) {}


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

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

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

LLVM IR (-O2):
define void @analogWrite(i32 %0, i32 %1) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ unlink(char *);
void sig_intr(int signo) {
  printf("catch sigint\n");
  unlink("/home/suncco/c/apue/17/u.sock");
  exit(0);
}


x86 assembly (clang, -O0):
<sig_intr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    0xebe(%rip),%rdi
call   1040 <printf@plt>
lea    0xec0(%rip),%rdi
call   1030 <unlink@plt>
xor    %edi,%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<sig_intr>:
push   %rax
lea    0xee6(%rip),%rdi
call   1040 <puts@plt>
lea    0xebc(%rip),%rdi
call   1030 <unlink@plt>
xor    %edi,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [14 x i8] c"catch sigint\0A\00"
@.str.1 = [30 x i8] c"/home/suncco/c/apue/17/u.sock\00"
define void @sig_intr(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @unlink(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
%5 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@.str.1 = [30 x i8] c"/home/suncco/c/apue/17/u.sock\00"
@str = [13 x i8] c"catch sigint\00"
define void @sig_intr(i32 %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str, i64 0, i64 0))
%3 = tail call i32 @unlink(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
%4 = tail call i32 @exit(i32 0)
unreachable
}
/* Type definitions */
typedef int /*<<< orphan*/ va_list;

/* Variables and functions */
int vasprintf(char **, char const *, int /*<<< orphan*/);
int outside_vasprintf(char **strp, const char *fmt, va_list ap) {
  return vasprintf(strp, fmt, ap);
}


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

x86 assembly (clang, -O2):
<outside_vasprintf>:
jmp    1030 <vasprintf@plt>

LLVM IR (-O0):
define i32 @outside_vasprintf(i8** %0, i8* %1, i32 %2) {
%4 = alloca i8**
%5 = alloca i8*
%6 = alloca i32
store i8** %0, i8*** %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%7 = load i8**, i8*** %4
%8 = load i8*, i8** %5
%9 = load i32, i32* %6
%10 = call i32 @vasprintf(i8** %7, i8* %8, i32 %9)
ret i32 %10
}

LLVM IR (-O2):
define i32 @outside_vasprintf(i8** %0, i8* %1, i32 %2) {
%4 = tail call i32 @vasprintf(i8** %0, i8* %1, i32 %2)
ret i32 %4
}
int test_imm_EAuint16_mem(unsigned short *val) {
  return ((*val) & (0xEA << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_EAuint16_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movzwl (%rax),%edx
and    $0xea,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_EAuint16_mem>:
testb  $0xea,(%rdi)
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_EAuint16_mem(i16* nocapture %0) {
%2 = load i16, i16* %0
%3 = and i16 %2, 234
%4 = icmp eq i16 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}