#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 */
size_t prime_count_inverse(size_t prime_count) {
  if (prime_count < 25)
    return 100;
  else if (prime_count < 168)
    return 1000;
  else if (prime_count < 1229)
    return 10000;
  else if (prime_count < 9592)
    return 100000;
  else if (prime_count < 78498)
    return 1000000;
  else if (prime_count < 664579)
    return 10000000;
  else
    return 100000000;
}


x86 assembly (clang, -O0):
<prime_count_inverse>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
cmpq   $0x19,-0x10(%rbp)
jae    1120 <prime_count_inverse+0x20>
movq   $0x64,-0x8(%rbp)
jmp    11af <prime_count_inverse+0xaf>
cmpq   $0xa8,-0x10(%rbp)
jae    113b <prime_count_inverse+0x3b>
movq   $0x3e8,-0x8(%rbp)
jmp    11af <prime_count_inverse+0xaf>
cmpq   $0x4cd,-0x10(%rbp)
jae    1156 <prime_count_inverse+0x56>
movq   $0x2710,-0x8(%rbp)
jmp    11af <prime_count_inverse+0xaf>
cmpq   $0x2578,-0x10(%rbp)
jae    1171 <prime_count_inverse+0x71>
movq   $0x186a0,-0x8(%rbp)
jmp    11af <prime_count_inverse+0xaf>
cmpq   $0x132a2,-0x10(%rbp)
jae    118c <prime_count_inverse+0x8c>
movq   $0xf4240,-0x8(%rbp)
jmp    11af <prime_count_inverse+0xaf>
cmpq   $0xa2403,-0x10(%rbp)
jae    11a7 <prime_count_inverse+0xa7>
movq   $0x989680,-0x8(%rbp)
jmp    11af <prime_count_inverse+0xaf>
movq   $0x5f5e100,-0x8(%rbp)
05
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<prime_count_inverse>:
mov    $0x64,%eax
cmp    $0x19,%rdi
jb     1158 <prime_count_inverse+0x58>
mov    $0x3e8,%eax
cmp    $0xa8,%rdi
jb     1158 <prime_count_inverse+0x58>
mov    $0x2710,%eax
cmp    $0x4cd,%rdi
jb     1158 <prime_count_inverse+0x58>
mov    $0x186a0,%eax
cmp    $0x2578,%rdi
jb     1158 <prime_count_inverse+0x58>
mov    $0xf4240,%eax
cmp    $0x132a2,%rdi
jb     1158 <prime_count_inverse+0x58>
cmp    $0xa2403,%rdi
mov    $0x989680,%ecx
mov    $0x5f5e100,%eax
cmovb  %rcx,%rax
ret

LLVM IR (-O0):
define i64 @prime_count_inverse(i64 %0) {
%2 = alloca i64
%3 = alloca i64
store i64 %0, i64* %3
%4 = load i64, i64* %3
%5 = icmp ult i64 %4, 25
br i1 %5, label %6, label %7
6: ; preds = %1
store i64 100, i64* %2
br label %28
7: ; preds = %1
%8 = load i64, i64* %3
%9 = icmp ult i64 %8, 168
br i1 %9, label %10, label %11
10: ; preds = %7
store i64 1000, i64* %2
br label %28
11: ; preds = %7
%12 = load i64, i64* %3
%13 = icmp ult i64 %12, 1229
br i1 %13, label %14, label %15
14: ; preds = %11
store i64 10000, i64* %2
br label %28
15: ; preds = %11
%16 = load i64, i64* %3
%17 = icmp ult i64 %16, 9592
br i1 %17, label %18, label %19
18: ; preds = %15
store i64 100000, i64* %2
br label %28
19: ; preds = %15
%20 = load i64, i64* %3
%21 = icmp ult i64 %20, 78498
br i1 %21, label %22, label %23
22: ; preds = %19
store i64 1000000, i64* %2
br label %28
23: ; preds = %19
%24 = load i64, i64* %3
%25 = icmp ult i64 %24, 664579
br i1 %25, label %26, label %27
26: ; preds = %23
store i64 10000000, i64* %2
br label %28
27: ; preds = %23
store i64 100000000, i64* %2
br label %28
28: ; preds = %27, %26, %22, %18, %14, %10, %6
%29 = load i64, i64* %2
ret i64 %29
}

LLVM IR (-O2):
define i64 @prime_count_inverse(i64 %0) {
%2 = icmp ult i64 %0, 25
br i1 %2, label %14, label %3
3: ; preds = %1
%4 = icmp ult i64 %0, 168
br i1 %4, label %14, label %5
5: ; preds = %3
%6 = icmp ult i64 %0, 1229
br i1 %6, label %14, label %7
7: ; preds = %5
%8 = icmp ult i64 %0, 9592
br i1 %8, label %14, label %9
9: ; preds = %7
%10 = icmp ult i64 %0, 78498
br i1 %10, label %14, label %11
11: ; preds = %9
%12 = icmp ult i64 %0, 664579
%13 = select i1 %12, i64 10000000, i64 100000000
br label %14
14: ; preds = %11, %9, %7, %5, %3, %1
%15 = phi i64 [ 100, %1 ], [ 1000, %3 ], [ 10000, %5 ], [ 100000, %7 ], [ 1000000, %9 ], [ %13, %11 ]
ret i64 %15
}