#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*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, char const *);
void usage() {
  static const char *msg =
      "lookbusy [ -h ] [ options ]\n"
      "General options:\n"
      "  -h, --help           Commandline help (you're reading it)\n"
      "  -v, --verbose        Verbose output (may be repeated)\n"
      "  -q, --quiet          Be quiet, produce output on errors only\n"
      "CPU usage options:\n"
      "  -c, --cpu-util=PCT,  Desired utilization of each CPU, in percent "
      "(default\n"
      "      --cpu-util=RANGE   50%).  If 'curve' CPU usage mode is chosen, a "
      "range\n"
      "                         of the form MIN-MAX should be given.\n"
      "  -n, --ncpus=NUM      Number of CPUs to keep busy (default: "
      "autodetected)\n"
      "  -r, --cpu-mode=MODE  Utilization mode ('fixed' or 'curve', see "
      "lookbusy(1))\n"
      "  -p, --cpu-curve-peak=TIME\n"
      "                       Offset of peak utilization within curve period, "
      "in\n"
      "                         seconds (append 'm', 'h', 'd' for other "
      "units)\n"
      "  -P, --cpu-curve-period=TIME\n"
      "                       Duration of utilization curve period, in seconds "
      "(append\n"
      "		       'm', 'h', 'd' for other units)\n"
      "Memory usage options:\n"
      "  -m, --mem-util=SIZE   Amount of memory to use (in bytes, followed by "
      "KB, MB,\n"
      "                         or GB for other units; see lookbusy(1))\n"
      "  -M, --mem-sleep=TIME Time to sleep between iterations, in usec "
      "(default 1000)\n"
      "Disk usage options:\n"
      "  -d, --disk-util=SIZE Size of files to use for disk churn (in bytes,\n"
      "                         followed by KB, MB, GB or TB for other units)\n"
      "  -b, --disk-block-size=SIZE\n"
      "                       Size of blocks to use for I/O (in bytes, "
      "followed\n"
      "                         by KB, MB or GB)\n"
      "  -D, --disk-sleep=TIME\n"
      "                       Time to sleep between iterations, in msec "
      "(default 100)\n"
      "  -f, --disk-path=PATH Path to a file/directory to use as a buffer "
      "(default\n"
      "                         /tmp); specify multiple times for additional "
      "paths\n"
      "";
  printf("usage: %s", msg);
  exit(0);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
mov    0x2f05(%rip),%rsi
lea    0x159c(%rip),%rdi
call   1030 <printf@plt>
xor    %edi,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rax
lea    0x15a6(%rip),%rdi
lea    0xed1(%rip),%rsi
call   1030 <printf@plt>
xor    %edi,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@usage.msg = internal global i8* getelementptr inbounds ([1742 x i8], [1742 x i8]* @.str, i32 0, i32 0)
@.str = [1742 x i8] c"lookbusy [ -h ] [ options ]\0AGeneral options:\0A -h, --help Commandline help (you're reading it)\0A -v, --verbose Verbose output (may be repeated)\0A -q, --quiet Be quiet, produce output on errors only\0ACPU usage options:\0A -c, --cpu-util=PCT, Desired utilization of each CPU, in percent (default\0A --cpu-util=RANGE 50%). If 'curve' CPU usage mode is chosen, a range\0A of the form MIN-MAX should be given.\0A -n, --ncpus=NUM Number of CPUs to keep busy (default: autodetected)\0A -r, --cpu-mode=MODE Utilization mode ('fixed' or 'curve', see lookbusy(1))\0A -p, --cpu-curve-peak=TIME\0A Offset of peak utilization within curve period, in\0A seconds (append 'm', 'h', 'd' for other units)\0A -P, --cpu-curve-period=TIME\0A Duration of utilization curve period, in seconds (append\0A\09\09 'm', 'h', 'd' for other units)\0AMemory usage options:\0A -m, --mem-util=SIZE Amount of memory to use (in bytes, followed by KB, MB,\0A or GB for other units; see lookbusy(1))\0A -M, --mem-sleep=TIME Time to sleep between iterations, in usec (default 1000)\0ADisk usage options:\0A -d, --disk-util=SIZE Size of files to use for disk churn (in bytes,\0A followed by KB, MB, GB or TB for other units)\0A -b, --disk-block-size=SIZE\0A Size of blocks to use for I/O (in bytes, followed\0A by KB, MB or GB)\0A -D, --disk-sleep=TIME\0A Time to sleep between iterations, in msec (default 100)\0A -f, --disk-path=PATH Path to a file/directory to use as a buffer (default\0A /tmp); specify multiple times for additional paths\0A\00"
@.str.1 = [10 x i8] c"usage: %s\00"
define void @usage() {
%1 = load i8*, i8** @usage.msg
%2 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i8* %1)
%3 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@.str = [1742 x i8] c"lookbusy [ -h ] [ options ]\0AGeneral options:\0A -h, --help Commandline help (you're reading it)\0A -v, --verbose Verbose output (may be repeated)\0A -q, --quiet Be quiet, produce output on errors only\0ACPU usage options:\0A -c, --cpu-util=PCT, Desired utilization of each CPU, in percent (default\0A --cpu-util=RANGE 50%). If 'curve' CPU usage mode is chosen, a range\0A of the form MIN-MAX should be given.\0A -n, --ncpus=NUM Number of CPUs to keep busy (default: autodetected)\0A -r, --cpu-mode=MODE Utilization mode ('fixed' or 'curve', see lookbusy(1))\0A -p, --cpu-curve-peak=TIME\0A Offset of peak utilization within curve period, in\0A seconds (append 'm', 'h', 'd' for other units)\0A -P, --cpu-curve-period=TIME\0A Duration of utilization curve period, in seconds (append\0A\09\09 'm', 'h', 'd' for other units)\0AMemory usage options:\0A -m, --mem-util=SIZE Amount of memory to use (in bytes, followed by KB, MB,\0A or GB for other units; see lookbusy(1))\0A -M, --mem-sleep=TIME Time to sleep between iterations, in usec (default 1000)\0ADisk usage options:\0A -d, --disk-util=SIZE Size of files to use for disk churn (in bytes,\0A followed by KB, MB, GB or TB for other units)\0A -b, --disk-block-size=SIZE\0A Size of blocks to use for I/O (in bytes, followed\0A by KB, MB or GB)\0A -D, --disk-sleep=TIME\0A Time to sleep between iterations, in msec (default 100)\0A -f, --disk-path=PATH Path to a file/directory to use as a buffer (default\0A /tmp); specify multiple times for additional paths\0A\00"
@.str.1 = [10 x i8] c"usage: %s\00"
define void @usage() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([1742 x i8], [1742 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @exit(i32 0)
unreachable
}