#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*/ printf(char *);
printhelp() {
  printf("Usage: dhrystone (-h | -l MLOOPS | -r DURATION) [-t THREADS [-d "
         "DELAY]]\n");
  printf("\n");
  printf("Runs dhrystone benchmark either for a specfied duration or for a "
         "specified\n");
  printf("number of iterations.\n");
  printf("\n");
  printf("Options:\n");
  printf("    -h          Print this message and exit.\n");
  printf(
      "    -l MLOOPS   Run dhrystone for the specified number of millions\n");
  printf("                of iterations (i.e. the actual number of iterations "
         "is\n");
  printf("                MLOOPS * 1e6).\n");
  printf("    -r DURATION Run dhhrystone for the specified duration (in "
         "seconds). \n");
  printf("                dhrystone will be run 500000 iterations, looping "
         "until\n");
  printf("                the specified time period has passed.\n");
  printf("\n");
  printf(
      "    Note: -r and -l options may not be specified at the same time.\n");
  printf("\n");
  printf("    -t THREADS  Specified the number of concurrent threads "
         "(processes,\n");
  printf("                actually) that will be spawned. Defaults to 1.\n");
  printf(
      "    -d DELAY    if THREADS is > 1, this specifies the delay between\n");
  printf("                spawning the threads.\n");
  printf("\n");
}


x86 assembly (clang, -O0):
<printhelp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xee1(%rip),%rdi
call   1030 <printf@plt>
lea    0x10ad(%rip),%rdi
call   1030 <printf@plt>
lea    0xf12(%rip),%rdi
call   1030 <printf@plt>
lea    0xf52(%rip),%rdi
call   1030 <printf@plt>
lea    0x1089(%rip),%rdi
call   1030 <printf@plt>
lea    0xf51(%rip),%rdi
call   1030 <printf@plt>
lea    0xf4f(%rip),%rdi
call   1030 <printf@plt>
lea    0xf71(%rip),%rdi
call   1030 <printf@plt>
lea    0xfa9(%rip),%rdi
call   1030 <printf@plt>
lea    0xfe5(%rip),%rdi
call   1030 <printf@plt>
lea    0xff9(%rip),%rdi
call   1030 <printf@plt>
lea    0x1037(%rip),%rdi
call   1030 <printf@plt>
lea    0x1073(%rip),%rdi
call   1030 <printf@plt>
lea    0x101d(%rip),%rdi
call   1030 <printf@plt>
lea    0x1092(%rip),%rdi
call   1030 <printf@plt>
lea    0x1005(%rip),%rdi
call   1030 <printf@plt>
lea    0x10be(%rip),%rdi
call   1030 <printf@plt>
lea    0x10fa(%rip),%rdi
call   1030 <printf@plt>
lea    0x112e(%rip),%rdi
call   1030 <printf@plt>
lea    0x1167(%rip),%rdi
call   1030 <printf@plt>
lea    0xfc9(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printhelp>:
push   %rax
lea    0xed8(%rip),%rdi
call   1040 <puts@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xf0a(%rip),%rdi
call   1040 <puts@plt>
lea    0xf49(%rip),%rdi
call   1040 <puts@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xf49(%rip),%rdi
call   1040 <puts@plt>
lea    0xf46(%rip),%rdi
call   1040 <puts@plt>
lea    0xf67(%rip),%rdi
call   1040 <puts@plt>
lea    0xf9e(%rip),%rdi
call   1040 <puts@plt>
lea    0xfd9(%rip),%rdi
call   1040 <puts@plt>
lea    0xfec(%rip),%rdi
call   1040 <puts@plt>
lea    0x1029(%rip),%rdi
call   1040 <puts@plt>
lea    0x1064(%rip),%rdi
call   1040 <puts@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0x1084(%rip),%rdi
call   1040 <puts@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0x10b1(%rip),%rdi
call   1040 <puts@plt>
lea    0x10ec(%rip),%rdi
call   1040 <puts@plt>
lea    0x111f(%rip),%rdi
call   1040 <puts@plt>
lea    0x1157(%rip),%rdi
call   1040 <puts@plt>
mov    $0xa,%edi
pop    %rax
jmp    1030 <putchar@plt>

LLVM IR (-O0):
@.str = [73 x i8] c"Usage: dhrystone (-h | -l MLOOPS | -r DURATION) [-t THREADS [-d DELAY]]\0A\00"
@.str.1 = [2 x i8] c"\0A\00"
@.str.2 = [76 x i8] c"Runs dhrystone benchmark either for a specfied duration or for a specified\0A\00"
@.str.3 = [23 x i8] c"number of iterations.\0A\00"
@.str.4 = [10 x i8] c"Options:\0A\00"
@.str.5 = [46 x i8] c" -h Print this message and exit.\0A\00"
@.str.6 = [68 x i8] c" -l MLOOPS Run dhrystone for the specified number of millions\0A\00"
@.str.7 = [72 x i8] c" of iterations (i.e. the actual number of iterations is\0A\00"
@.str.8 = [32 x i8] c" MLOOPS * 1e6).\0A\00"
@.str.9 = [74 x i8] c" -r DURATION Run dhhrystone for the specified duration (in seconds). \0A\00"
@.str.10 = [72 x i8] c" dhrystone will be run 500000 iterations, looping until\0A\00"
@.str.11 = [55 x i8] c" the specified time period has passed.\0A\00"
@.str.12 = [68 x i8] c" Note: -r and -l options may not be specified at the same time.\0A\00"
@.str.13 = [72 x i8] c" -t THREADS Specified the number of concurrent threads (processes,\0A\00"
@.str.14 = [64 x i8] c" actually) that will be spawned. Defaults to 1.\0A\00"
@.str.15 = [69 x i8] c" -d DELAY if THREADS is > 1, this specifies the delay between\0A\00"
@.str.16 = [39 x i8] c" spawning the threads.\0A\00"
define i32 @printhelp() {
%1 = alloca i32
%2 = call i32 @printf(i8* getelementptr inbounds ([73 x i8], [73 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%4 = call i32 @printf(i8* getelementptr inbounds ([76 x i8], [76 x i8]* @.str.2, i64 0, i64 0))
%5 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.3, i64 0, i64 0))
%6 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%7 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.4, i64 0, i64 0))
%8 = call i32 @printf(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.5, i64 0, i64 0))
%9 = call i32 @printf(i8* getelementptr inbounds ([68 x i8], [68 x i8]* @.str.6, i64 0, i64 0))
%10 = call i32 @printf(i8* getelementptr inbounds ([72 x i8], [72 x i8]* @.str.7, i64 0, i64 0))
%11 = call i32 @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.8, i64 0, i64 0))
%12 = call i32 @printf(i8* getelementptr inbounds ([74 x i8], [74 x i8]* @.str.9, i64 0, i64 0))
%13 = call i32 @printf(i8* getelementptr inbounds ([72 x i8], [72 x i8]* @.str.10, i64 0, i64 0))
%14 = call i32 @printf(i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str.11, i64 0, i64 0))
%15 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%16 = call i32 @printf(i8* getelementptr inbounds ([68 x i8], [68 x i8]* @.str.12, i64 0, i64 0))
%17 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%18 = call i32 @printf(i8* getelementptr inbounds ([72 x i8], [72 x i8]* @.str.13, i64 0, i64 0))
%19 = call i32 @printf(i8* getelementptr inbounds ([64 x i8], [64 x i8]* @.str.14, i64 0, i64 0))
%20 = call i32 @printf(i8* getelementptr inbounds ([69 x i8], [69 x i8]* @.str.15, i64 0, i64 0))
%21 = call i32 @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.16, i64 0, i64 0))
%22 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%23 = load i32, i32* %1
ret i32 %23
}

LLVM IR (-O2):
@str = [72 x i8] c"Usage: dhrystone (-h | -l MLOOPS | -r DURATION) [-t THREADS [-d DELAY]]\00"
@str.17 = [75 x i8] c"Runs dhrystone benchmark either for a specfied duration or for a specified\00"
@str.18 = [22 x i8] c"number of iterations.\00"
@str.19 = [9 x i8] c"Options:\00"
@str.20 = [45 x i8] c" -h Print this message and exit.\00"
@str.21 = [67 x i8] c" -l MLOOPS Run dhrystone for the specified number of millions\00"
@str.22 = [71 x i8] c" of iterations (i.e. the actual number of iterations is\00"
@str.23 = [31 x i8] c" MLOOPS * 1e6).\00"
@str.24 = [73 x i8] c" -r DURATION Run dhhrystone for the specified duration (in seconds). \00"
@str.25 = [71 x i8] c" dhrystone will be run 500000 iterations, looping until\00"
@str.26 = [54 x i8] c" the specified time period has passed.\00"
@str.27 = [67 x i8] c" Note: -r and -l options may not be specified at the same time.\00"
@str.28 = [71 x i8] c" -t THREADS Specified the number of concurrent threads (processes,\00"
@str.29 = [63 x i8] c" actually) that will be spawned. Defaults to 1.\00"
@str.30 = [68 x i8] c" -d DELAY if THREADS is > 1, this specifies the delay between\00"
@str.31 = [38 x i8] c" spawning the threads.\00"
define i32 @printhelp() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([72 x i8], [72 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @putchar(i32 10)
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([75 x i8], [75 x i8]* @str.17, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @str.18, i64 0, i64 0))
%5 = tail call i32 @putchar(i32 10)
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @str.19, i64 0, i64 0))
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([45 x i8], [45 x i8]* @str.20, i64 0, i64 0))
%8 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([67 x i8], [67 x i8]* @str.21, i64 0, i64 0))
%9 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([71 x i8], [71 x i8]* @str.22, i64 0, i64 0))
%10 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @str.23, i64 0, i64 0))
%11 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([73 x i8], [73 x i8]* @str.24, i64 0, i64 0))
%12 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([71 x i8], [71 x i8]* @str.25, i64 0, i64 0))
%13 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([54 x i8], [54 x i8]* @str.26, i64 0, i64 0))
%14 = tail call i32 @putchar(i32 10)
%15 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([67 x i8], [67 x i8]* @str.27, i64 0, i64 0))
%16 = tail call i32 @putchar(i32 10)
%17 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([71 x i8], [71 x i8]* @str.28, i64 0, i64 0))
%18 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([63 x i8], [63 x i8]* @str.29, i64 0, i64 0))
%19 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([68 x i8], [68 x i8]* @str.30, i64 0, i64 0))
%20 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([38 x i8], [38 x i8]* @str.31, i64 0, i64 0))
%21 = tail call i32 @putchar(i32 10)
ret i32 undef
}