#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_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, ...);
int /*<<< orphan*/ stderr;
__attribute__((noreturn)) void usage(void) {
  fprintf(stderr, "Usage: %s [OPTIONS] [COMMAND]\n", "drmem");
  fprintf(stderr, "\nOptions:\n\n");
  fprintf(
      stderr,
      "  --block-size       set size of blocs [ byte | word | page | huge ]\n");
  fprintf(stderr, "  --max-mem          maximal memory to allocate in bytes\n");
  fprintf(stderr, "  --where            where to allocate [ heap | stack ]\n");
  fprintf(stderr, "  --fill             fill allocated data\n");
  fprintf(stderr, "  --trim             set trim threshold\n");
  fprintf(stderr, "  --repeat           number of cycles to execute\n");
  fprintf(stderr,
          "  --delay            add nano second sleep after each operation\n");
  fprintf(stderr, "  --verbose          display more information\n");
  fprintf(stderr, "  --help             this help\n");
  exit(EXIT_FAILURE);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
lea    0xee4(%rip),%rdx
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2e97(%rip),%rax
mov    (%rax),%edi
lea    0xed3(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2e80(%rip),%rax
mov    (%rax),%edi
lea    0xec8(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2e69(%rip),%rax
mov    (%rax),%edi
lea    0xef7(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2e52(%rip),%rax
mov    (%rax),%edi
lea    0xf1a(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2e3b(%rip),%rax
mov    (%rax),%edi
lea    0xf3c(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2e24(%rip),%rax
mov    (%rax),%edi
lea    0xf4f(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2e0d(%rip),%rax
mov    (%rax),%edi
lea    0xf61(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2df6(%rip),%rax
mov    (%rax),%edi
lea    0xf7c(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2ddf(%rip),%rax
mov    (%rax),%edi
lea    0xfa6(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2dc8(%rip),%rax
mov    (%rax),%edi
lea    0xfbe(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2da9(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rbx
mov    0x2eb8(%rip),%rbx
mov    (%rbx),%edi
lea    0xecf(%rip),%rsi
lea    0xee7(%rip),%rdx
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0xedd(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0xed9(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0xf0f(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0xf39(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0xf62(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0xf7c(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0xf95(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0xfb7(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0xfe8(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0x1007(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    0x2df2(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [31 x i8] c"Usage: %s [OPTIONS] [COMMAND]\0A\00"
@.str.1 = [6 x i8] c"drmem\00"
@.str.2 = [12 x i8] c"\0AOptions:\0A\0A\00"
@.str.3 = [70 x i8] c" --block-size set size of blocs [ byte | word | page | huge ]\0A\00"
@.str.4 = [58 x i8] c" --max-mem maximal memory to allocate in bytes\0A\00"
@.str.5 = [57 x i8] c" --where where to allocate [ heap | stack ]\0A\00"
@.str.6 = [42 x i8] c" --fill fill allocated data\0A\00"
@.str.7 = [41 x i8] c" --trim set trim threshold\0A\00"
@.str.8 = [50 x i8] c" --repeat number of cycles to execute\0A\00"
@.str.9 = [65 x i8] c" --delay add nano second sleep after each operation\0A\00"
@.str.10 = [47 x i8] c" --verbose display more information\0A\00"
@.str.11 = [32 x i8] c" --help this help\0A\00"
@EXIT_FAILURE = global i32 0
define void @usage() {
%1 = load i32, i32* @stderr
%2 = call i32 (i32, i8*, ...) @fprintf(i32 %1, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
%3 = load i32, i32* @stderr
%4 = call i32 (i32, i8*, ...) @fprintf(i32 %3, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.2, i64 0, i64 0))
%5 = load i32, i32* @stderr
%6 = call i32 (i32, i8*, ...) @fprintf(i32 %5, i8* getelementptr inbounds ([70 x i8], [70 x i8]* @.str.3, i64 0, i64 0))
%7 = load i32, i32* @stderr
%8 = call i32 (i32, i8*, ...) @fprintf(i32 %7, i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str.4, i64 0, i64 0))
%9 = load i32, i32* @stderr
%10 = call i32 (i32, i8*, ...) @fprintf(i32 %9, i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str.5, i64 0, i64 0))
%11 = load i32, i32* @stderr
%12 = call i32 (i32, i8*, ...) @fprintf(i32 %11, i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.6, i64 0, i64 0))
%13 = load i32, i32* @stderr
%14 = call i32 (i32, i8*, ...) @fprintf(i32 %13, i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.7, i64 0, i64 0))
%15 = load i32, i32* @stderr
%16 = call i32 (i32, i8*, ...) @fprintf(i32 %15, i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.8, i64 0, i64 0))
%17 = load i32, i32* @stderr
%18 = call i32 (i32, i8*, ...) @fprintf(i32 %17, i8* getelementptr inbounds ([65 x i8], [65 x i8]* @.str.9, i64 0, i64 0))
%19 = load i32, i32* @stderr
%20 = call i32 (i32, i8*, ...) @fprintf(i32 %19, i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.10, i64 0, i64 0))
%21 = load i32, i32* @stderr
%22 = call i32 (i32, i8*, ...) @fprintf(i32 %21, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.11, i64 0, i64 0))
%23 = load i32, i32* @EXIT_FAILURE
%24 = call i32 @exit(i32 %23)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [31 x i8] c"Usage: %s [OPTIONS] [COMMAND]\0A\00"
@.str.1 = [6 x i8] c"drmem\00"
@.str.2 = [12 x i8] c"\0AOptions:\0A\0A\00"
@.str.3 = [70 x i8] c" --block-size set size of blocs [ byte | word | page | huge ]\0A\00"
@.str.4 = [58 x i8] c" --max-mem maximal memory to allocate in bytes\0A\00"
@.str.5 = [57 x i8] c" --where where to allocate [ heap | stack ]\0A\00"
@.str.6 = [42 x i8] c" --fill fill allocated data\0A\00"
@.str.7 = [41 x i8] c" --trim set trim threshold\0A\00"
@.str.8 = [50 x i8] c" --repeat number of cycles to execute\0A\00"
@.str.9 = [65 x i8] c" --delay add nano second sleep after each operation\0A\00"
@.str.10 = [47 x i8] c" --verbose display more information\0A\00"
@.str.11 = [32 x i8] c" --help this help\0A\00"
@EXIT_FAILURE = global i32 0
define void @usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 (i32, i8*, ...) @fprintf(i32 %1, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
%3 = load i32, i32* @stderr
%4 = tail call i32 (i32, i8*, ...) @fprintf(i32 %3, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.2, i64 0, i64 0))
%5 = load i32, i32* @stderr
%6 = tail call i32 (i32, i8*, ...) @fprintf(i32 %5, i8* getelementptr inbounds ([70 x i8], [70 x i8]* @.str.3, i64 0, i64 0))
%7 = load i32, i32* @stderr
%8 = tail call i32 (i32, i8*, ...) @fprintf(i32 %7, i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str.4, i64 0, i64 0))
%9 = load i32, i32* @stderr
%10 = tail call i32 (i32, i8*, ...) @fprintf(i32 %9, i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str.5, i64 0, i64 0))
%11 = load i32, i32* @stderr
%12 = tail call i32 (i32, i8*, ...) @fprintf(i32 %11, i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.6, i64 0, i64 0))
%13 = load i32, i32* @stderr
%14 = tail call i32 (i32, i8*, ...) @fprintf(i32 %13, i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.7, i64 0, i64 0))
%15 = load i32, i32* @stderr
%16 = tail call i32 (i32, i8*, ...) @fprintf(i32 %15, i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.8, i64 0, i64 0))
%17 = load i32, i32* @stderr
%18 = tail call i32 (i32, i8*, ...) @fprintf(i32 %17, i8* getelementptr inbounds ([65 x i8], [65 x i8]* @.str.9, i64 0, i64 0))
%19 = load i32, i32* @stderr
%20 = tail call i32 (i32, i8*, ...) @fprintf(i32 %19, i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.10, i64 0, i64 0))
%21 = load i32, i32* @stderr
%22 = tail call i32 (i32, i8*, ...) @fprintf(i32 %21, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.11, i64 0, i64 0))
%23 = load i32, i32* @EXIT_FAILURE
%24 = tail call i32 @exit(i32 %23)
unreachable
}