#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*/ fputs(char *, int /*<<< orphan*/);
int /*<<< orphan*/ stderr;
void print_options() {
  fputs("primes - multithreaded prime sieve                   \n", stderr);
  fputs("Usage: primes [args]                                 \n", stderr);
  fputs("  --threads=<count>      Sets the number of threads  \n", stderr);
  fputs("  --chunks=<count>       Sets the number of chunks   \n", stderr);
  fputs("  --size=<size>          Sets the size of a chunk    \n", stderr);
  fputs("  --sieve_file=<path>)   Chooses a file for the cache\n", stderr);
  fputs("  --primes_file=<path>)  Chooses an output file      \n", stderr);
}


x86 assembly (clang, -O0):
<print_options>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ec5(%rip),%rax
mov    (%rax),%esi
lea    0xedc(%rip),%rdi
call   1030 <fputs@plt>
mov    0x2eb0(%rip),%rax
mov    (%rax),%esi
lea    0xefe(%rip),%rdi
call   1030 <fputs@plt>
mov    0x2e9b(%rip),%rax
mov    (%rax),%esi
lea    0xf20(%rip),%rdi
call   1030 <fputs@plt>
mov    0x2e86(%rip),%rax
mov    (%rax),%esi
lea    0xf42(%rip),%rdi
call   1030 <fputs@plt>
mov    0x2e71(%rip),%rax
mov    (%rax),%esi
lea    0xf64(%rip),%rdi
call   1030 <fputs@plt>
mov    0x2e5c(%rip),%rax
mov    (%rax),%esi
lea    0xf86(%rip),%rdi
call   1030 <fputs@plt>
mov    0x2e47(%rip),%rax
mov    (%rax),%esi
lea    0xfa8(%rip),%rdi
call   1030 <fputs@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_options>:
push   %rbx
mov    0x2ec8(%rip),%rbx
mov    (%rbx),%esi
lea    0xedf(%rip),%rdi
call   1030 <fputs@plt>
mov    (%rbx),%esi
lea    0xf08(%rip),%rdi
call   1030 <fputs@plt>
mov    (%rbx),%esi
lea    0xf31(%rip),%rdi
call   1030 <fputs@plt>
mov    (%rbx),%esi
lea    0xf5a(%rip),%rdi
call   1030 <fputs@plt>
mov    (%rbx),%esi
lea    0xf83(%rip),%rdi
call   1030 <fputs@plt>
mov    (%rbx),%esi
lea    0xfac(%rip),%rdi
call   1030 <fputs@plt>
mov    (%rbx),%esi
lea    0xfd5(%rip),%rdi
pop    %rbx
jmp    1030 <fputs@plt>

LLVM IR (-O0):
@.str = [55 x i8] c"primes - multithreaded prime sieve \0A\00"
@stderr = global i32 0
@.str.1 = [55 x i8] c"Usage: primes [args] \0A\00"
@.str.2 = [55 x i8] c" --threads=<count> Sets the number of threads \0A\00"
@.str.3 = [55 x i8] c" --chunks=<count> Sets the number of chunks \0A\00"
@.str.4 = [55 x i8] c" --size=<size> Sets the size of a chunk \0A\00"
@.str.5 = [55 x i8] c" --sieve_file=<path>) Chooses a file for the cache\0A\00"
@.str.6 = [55 x i8] c" --primes_file=<path>) Chooses an output file \0A\00"
define void @print_options() {
%1 = load i32, i32* @stderr
%2 = call i32 @fputs(i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str, i64 0, i64 0), i32 %1)
%3 = load i32, i32* @stderr
%4 = call i32 @fputs(i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str.1, i64 0, i64 0), i32 %3)
%5 = load i32, i32* @stderr
%6 = call i32 @fputs(i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str.2, i64 0, i64 0), i32 %5)
%7 = load i32, i32* @stderr
%8 = call i32 @fputs(i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str.3, i64 0, i64 0), i32 %7)
%9 = load i32, i32* @stderr
%10 = call i32 @fputs(i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str.4, i64 0, i64 0), i32 %9)
%11 = load i32, i32* @stderr
%12 = call i32 @fputs(i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str.5, i64 0, i64 0), i32 %11)
%13 = load i32, i32* @stderr
%14 = call i32 @fputs(i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str.6, i64 0, i64 0), i32 %13)
ret void
}

LLVM IR (-O2):
@.str = [55 x i8] c"primes - multithreaded prime sieve \0A\00"
@stderr = global i32 0
@.str.1 = [55 x i8] c"Usage: primes [args] \0A\00"
@.str.2 = [55 x i8] c" --threads=<count> Sets the number of threads \0A\00"
@.str.3 = [55 x i8] c" --chunks=<count> Sets the number of chunks \0A\00"
@.str.4 = [55 x i8] c" --size=<size> Sets the size of a chunk \0A\00"
@.str.5 = [55 x i8] c" --sieve_file=<path>) Chooses a file for the cache\0A\00"
@.str.6 = [55 x i8] c" --primes_file=<path>) Chooses an output file \0A\00"
define void @print_options() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fputs(i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str, i64 0, i64 0), i32 %1)
%3 = load i32, i32* @stderr
%4 = tail call i32 @fputs(i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str.1, i64 0, i64 0), i32 %3)
%5 = load i32, i32* @stderr
%6 = tail call i32 @fputs(i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str.2, i64 0, i64 0), i32 %5)
%7 = load i32, i32* @stderr
%8 = tail call i32 @fputs(i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str.3, i64 0, i64 0), i32 %7)
%9 = load i32, i32* @stderr
%10 = tail call i32 @fputs(i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str.4, i64 0, i64 0), i32 %9)
%11 = load i32, i32* @stderr
%12 = tail call i32 @fputs(i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str.5, i64 0, i64 0), i32 %11)
%13 = load i32, i32* @stderr
%14 = tail call i32 @fputs(i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str.6, i64 0, i64 0), i32 %13)
ret void
}