#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 fortune(int, double, int, int, double);
int main() {
  assert(fortune(100000, 1, 2000, 15, 1) == 1);
  assert(fortune(100000, 1, 10000, 10, 1) == 1);
  assert(fortune(100000, 1, 9185, 12, 1) == 0);
  assert(fortune(6722682, 6.5, 448916, 24, 2.6) == 1);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    $0x186a0,%edi
movsd  0xedf(%rip),%xmm1
mov    $0x7d0,%esi
mov    $0xf,%edx
movaps %xmm1,%xmm0
call   1030 <fortune@plt>
cmp    $0x1,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
mov    $0x186a0,%edi
movsd  0xeb0(%rip),%xmm1
mov    $0x2710,%esi
mov    $0xa,%edx
movaps %xmm1,%xmm0
call   1030 <fortune@plt>
cmp    $0x1,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
mov    $0x186a0,%edi
movsd  0xe81(%rip),%xmm1
mov    $0x23e1,%esi
mov    $0xc,%edx
movaps %xmm1,%xmm0
call   1030 <fortune@plt>
cmp    $0x0,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
mov    $0x66947a,%edi
movsd  0xe42(%rip),%xmm0
mov    $0x6d994,%esi
mov    $0x18,%edx
movsd  0xe38(%rip),%xmm1
call   1030 <fortune@plt>
cmp    $0x1,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
movsd  0xed7(%rip),%xmm0
mov    $0x186a0,%edi
mov    $0x7d0,%esi
mov    $0xf,%edx
movaps %xmm0,%xmm1
call   1030 <fortune@plt>
xor    %edi,%edi
cmp    $0x1,%eax
sete   %dil
call   1040 <assert@plt>
mov    $0x186a0,%edi
movsd  0xea5(%rip),%xmm0
mov    $0x2710,%esi
mov    $0xa,%edx
movaps %xmm0,%xmm1
call   1030 <fortune@plt>
xor    %edi,%edi
cmp    $0x1,%eax
sete   %dil
call   1040 <assert@plt>
mov    $0x186a0,%edi
movsd  0xe78(%rip),%xmm0
mov    $0x23e1,%esi
mov    $0xc,%edx
movaps %xmm0,%xmm1
call   1030 <fortune@plt>
xor    %edi,%edi
test   %eax,%eax
sete   %dil
call   1040 <assert@plt>
movsd  0xe59(%rip),%xmm0
movsd  0xe59(%rip),%xmm1
mov    $0x66947a,%edi
mov    $0x6d994,%esi
mov    $0x18,%edx
call   1030 <fortune@plt>
xor    %edi,%edi
cmp    $0x1,%eax
sete   %dil
call   1040 <assert@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = call i32 @fortune(i32 100000, double 1.000000e+00, i32 2000, i32 15, double 1.000000e+00)
%2 = icmp eq i32 %1, 1
%3 = zext i1 %2 to i32
%4 = call i32 @assert(i32 %3)
%5 = call i32 @fortune(i32 100000, double 1.000000e+00, i32 10000, i32 10, double 1.000000e+00)
%6 = icmp eq i32 %5, 1
%7 = zext i1 %6 to i32
%8 = call i32 @assert(i32 %7)
%9 = call i32 @fortune(i32 100000, double 1.000000e+00, i32 9185, i32 12, double 1.000000e+00)
%10 = icmp eq i32 %9, 0
%11 = zext i1 %10 to i32
%12 = call i32 @assert(i32 %11)
%13 = call i32 @fortune(i32 6722682, double 6.500000e+00, i32 448916, i32 24, double 2.600000e+00)
%14 = icmp eq i32 %13, 1
%15 = zext i1 %14 to i32
%16 = call i32 @assert(i32 %15)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @fortune(i32 100000, double 1.000000e+00, i32 2000, i32 15, double 1.000000e+00)
%2 = icmp eq i32 %1, 1
%3 = zext i1 %2 to i32
%4 = tail call i32 @assert(i32 %3)
%5 = tail call i32 @fortune(i32 100000, double 1.000000e+00, i32 10000, i32 10, double 1.000000e+00)
%6 = icmp eq i32 %5, 1
%7 = zext i1 %6 to i32
%8 = tail call i32 @assert(i32 %7)
%9 = tail call i32 @fortune(i32 100000, double 1.000000e+00, i32 9185, i32 12, double 1.000000e+00)
%10 = icmp eq i32 %9, 0
%11 = zext i1 %10 to i32
%12 = tail call i32 @assert(i32 %11)
%13 = tail call i32 @fortune(i32 6722682, double 6.500000e+00, i32 448916, i32 24, double 2.600000e+00)
%14 = icmp eq i32 %13, 1
%15 = zext i1 %14 to i32
%16 = tail call i32 @assert(i32 %15)
ret i32 0
}