#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 */
scalar_t__ INT_MAX;
int /*<<< orphan*/ assert(int);
unsigned corpus_table_size_min(int count, unsigned size_min) {
  unsigned n;
  assert(count <= (int)(0.75 * ((unsigned)INT_MAX + 1)));
  assert(size_min <= ((unsigned)INT_MAX + 1));
  assert(1 > 0);
  n = 1;
  while (n < size_min || ((unsigned)count > (unsigned)(0.75 * n))) {
    n *= 2;
  }
  return n;
}


x86 assembly (clang, -O0):
<corpus_table_size_min>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    0x2ec0(%rip),%rcx
mov    (%rcx),%ecx
add    $0x1,%ecx
cvtsi2sd %rcx,%xmm1
movsd  0xec6(%rip),%xmm0
mulsd  %xmm1,%xmm0
cvttsd2si %xmm0,%ecx
cmp    %ecx,%eax
setle  %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
mov    -0x8(%rbp),%eax
mov    0x2e8d(%rip),%rcx
mov    (%rcx),%rcx
add    $0x1,%ecx
cmp    %ecx,%eax
setbe  %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
mov    $0x1,%edi
call   1030 <assert@plt>
movl   $0x1,-0xc(%rbp)
mov    -0xc(%rbp),%ecx
mov    $0x1,%al
cmp    -0x8(%rbp),%ecx
mov    %al,-0xd(%rbp)
jb     11b6 <corpus_table_size_min+0xa6>
mov    -0x4(%rbp),%eax
mov    -0xc(%rbp),%ecx
cvtsi2sd %rcx,%xmm0
movsd  0xe5b(%rip),%xmm1
mulsd  %xmm1,%xmm0
cvttsd2si %xmm0,%rcx
cmp    %ecx,%eax
seta   %al
mov    %al,-0xd(%rbp)
mov    -0xd(%rbp),%al
test   $0x1,%al
jne    11c6 <corpus_table_size_min+0xb6>
jmp    11d4 <corpus_table_size_min+0xc4>
mov    -0xc(%rbp),%eax
shl    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1181 <corpus_table_size_min+0x71>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<corpus_table_size_min>:
push   %rbp
push   %r14
push   %rbx
mov    0x2ecd(%rip),%rbp
mov    0x0(%rbp),%eax
add    $0x1,%eax
cvtsi2sd %rax,%xmm0
mulsd  0xed2(%rip),%xmm0
cvttsd2si %xmm0,%eax
mov    %esi,%ebx
mov    %edi,%r14d
xor    %edi,%edi
cmp    %r14d,%eax
setge  %dil
call   1030 <assert@plt>
mov    0x0(%rbp),%eax
add    $0x1,%eax
xor    %edi,%edi
cmp    %ebx,%eax
setae  %dil
call   1030 <assert@plt>
mov    $0x1,%ebp
mov    $0x1,%edi
call   1030 <assert@plt>
movsd  0xe91(%rip),%xmm0
jmp    1182 <corpus_table_size_min+0x72>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
add    %ebp,%ebp
cmp    %ebx,%ebp
jb     1180 <corpus_table_size_min+0x70>
mov    %ebp,%eax
xorps  %xmm1,%xmm1
cvtsi2sd %rax,%xmm1
mulsd  %xmm0,%xmm1
cvttsd2si %xmm1,%rax
cmp    %r14d,%eax
jb     1180 <corpus_table_size_min+0x70>
mov    %ebp,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
@INT_MAX = global i64 0
define i32 @corpus_table_size_min(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = load i32, i32* %3
%7 = load i64, i64* @INT_MAX
%8 = trunc i64 %7 to i32
%9 = add i32 %8, 1
%10 = uitofp i32 %9 to double
%11 = fmul double 7.500000e-01, %10
%12 = fptosi double %11 to i32
%13 = icmp sle i32 %6, %12
%14 = zext i1 %13 to i32
%15 = call i32 @assert(i32 %14)
%16 = load i32, i32* %4
%17 = load i64, i64* @INT_MAX
%18 = trunc i64 %17 to i32
%19 = add i32 %18, 1
%20 = icmp ule i32 %16, %19
%21 = zext i1 %20 to i32
%22 = call i32 @assert(i32 %21)
%23 = call i32 @assert(i32 1)
store i32 1, i32* %5
br label %24
24: ; preds = %37, %2
%25 = load i32, i32* %5
%26 = load i32, i32* %4
%27 = icmp ult i32 %25, %26
br i1 %27, label %35, label %28
28: ; preds = %24
%29 = load i32, i32* %3
%30 = load i32, i32* %5
%31 = uitofp i32 %30 to double
%32 = fmul double 7.500000e-01, %31
%33 = fptoui double %32 to i32
%34 = icmp ugt i32 %29, %33
br label %35
35: ; preds = %28, %24
%36 = phi i1 [ true, %24 ], [ %34, %28 ]
br i1 %36, label %37, label %40
37: ; preds = %35
%38 = load i32, i32* %5
%39 = mul i32 %38, 2
store i32 %39, i32* %5
br label %24
40: ; preds = %35
%41 = load i32, i32* %5
ret i32 %41
}

LLVM IR (-O2):
@INT_MAX = global i64 0
define i32 @corpus_table_size_min(i32 %0, i32 %1) {
%3 = load i64, i64* @INT_MAX
%4 = trunc i64 %3 to i32
%5 = add i32 %4, 1
%6 = uitofp i32 %5 to double
%7 = fmul double %6, 7.500000e-01
%8 = fptosi double %7 to i32
%9 = icmp sge i32 %8, %0
%10 = zext i1 %9 to i32
%11 = tail call i32 @assert(i32 %10)
%12 = load i64, i64* @INT_MAX
%13 = trunc i64 %12 to i32
%14 = add i32 %13, 1
%15 = icmp uge i32 %14, %1
%16 = zext i1 %15 to i32
%17 = tail call i32 @assert(i32 %16)
%18 = tail call i32 @assert(i32 1)
br label %19
19: ; preds = %27, %2
%20 = phi i32 [ 1, %2 ], [ %28, %27 ]
%21 = icmp ult i32 %20, %1
br i1 %21, label %27, label %22
22: ; preds = %19
%23 = uitofp i32 %20 to double
%24 = fmul double %23, 7.500000e-01
%25 = fptoui double %24 to i32
%26 = icmp ult i32 %25, %0
br i1 %26, label %27, label %29
27: ; preds = %19, %22
%28 = shl i32 %20, 1
br label %19
29: ; preds = %22
ret i32 %20
}