#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
int /*<<< orphan*/ assert(int);
int IsRandomSite(const int site, const double *entropy, const double *lmax) {
  assert(site >= 0);
  assert(NULL != entropy);
  assert(NULL != lmax);
  if (entropy[site] - lmax[site] < 2.705947) {
    return 1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<IsRandomSite>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
cmpl   $0x0,-0x8(%rbp)
setge  %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
xor    %eax,%eax
cmp    -0x10(%rbp),%rax
setne  %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
xor    %eax,%eax
cmp    -0x18(%rbp),%rax
setne  %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
mov    -0x10(%rbp),%rax
movslq -0x8(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
mov    -0x18(%rbp),%rax
movslq -0x8(%rbp),%rcx
subsd  (%rax,%rcx,8),%xmm1
movsd  0xe84(%rip),%xmm0
ucomisd %xmm1,%xmm0
jbe    1192 <IsRandomSite+0x82>
movl   $0x1,-0x4(%rbp)
jmp    1199 <IsRandomSite+0x89>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<IsRandomSite>:
push   %rbp
push   %r14
push   %rbx
mov    %rdx,%r14
mov    %rsi,%rbx
mov    %edi,%ebp
not    %edi
shr    $0x1f,%edi
call   1030 <assert@plt>
xor    %edi,%edi
test   %rbx,%rbx
setne  %dil
call   1030 <assert@plt>
xor    %edi,%edi
test   %r14,%r14
setne  %dil
call   1030 <assert@plt>
movslq %ebp,%rax
movsd  (%rbx,%rax,8),%xmm0
subsd  (%r14,%rax,8),%xmm0
movsd  0xea8(%rip),%xmm1
xor    %eax,%eax
ucomisd %xmm0,%xmm1
seta   %al
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define i32 @IsRandomSite(i32 %0, double* %1, double* %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca double*
%7 = alloca double*
store i32 %0, i32* %5
store double* %1, double** %6
store double* %2, double** %7
%8 = load i32, i32* %5
%9 = icmp sge i32 %8, 0
%10 = zext i1 %9 to i32
%11 = call i32 @assert(i32 %10)
%12 = load double*, double** %6
%13 = icmp ne double* null, %12
%14 = zext i1 %13 to i32
%15 = call i32 @assert(i32 %14)
%16 = load double*, double** %7
%17 = icmp ne double* null, %16
%18 = zext i1 %17 to i32
%19 = call i32 @assert(i32 %18)
%20 = load double*, double** %6
%21 = load i32, i32* %5
%22 = sext i32 %21 to i64
%23 = getelementptr inbounds double, double* %20, i64 %22
%24 = load double, double* %23
%25 = load double*, double** %7
%26 = load i32, i32* %5
%27 = sext i32 %26 to i64
%28 = getelementptr inbounds double, double* %25, i64 %27
%29 = load double, double* %28
%30 = fsub double %24, %29
%31 = fcmp olt double %30, 0x4005A5C78A6DACAC
br i1 %31, label %32, label %33
32: ; preds = %3
store i32 1, i32* %4
br label %34
33: ; preds = %3
store i32 0, i32* %4
br label %34
34: ; preds = %33, %32
%35 = load i32, i32* %4
ret i32 %35
}

LLVM IR (-O2):
define i32 @IsRandomSite(i32 %0, double* %1, double* %2) {
%4 = xor i32 %0, -1
%5 = lshr i32 %4, 31
%6 = tail call i32 @assert(i32 %5)
%7 = icmp ne double* %1, null
%8 = zext i1 %7 to i32
%9 = tail call i32 @assert(i32 %8)
%10 = icmp ne double* %2, null
%11 = zext i1 %10 to i32
%12 = tail call i32 @assert(i32 %11)
%13 = sext i32 %0 to i64
%14 = getelementptr inbounds double, double* %1, i64 %13
%15 = load double, double* %14
%16 = getelementptr inbounds double, double* %2, i64 %13
%17 = load double, double* %16
%18 = fsub double %15, %17
%19 = fcmp olt double %18, 0x4005A5C78A6DACAC
%20 = zext i1 %19 to i32
ret i32 %20
}