#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);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ stderr;
void usage(void) {
  fprintf(stderr, "Invalid arguments!\n");
  printf(
      "Usage: box [<options>] -- <command> <arguments>\n\nOptions:\n-a "
      "<level>\tSet file access level (0=none, 1=cwd, 2=/etc,/lib,..., 3=whole "
      "fs, 9=no checks; needs -f)\n-c <dir>\tChange directory to <dir> "
      "first\n-e\t\tInherit full environment of the parent process\n-E "
      "<var>\tInherit the environment variable <var> from the parent "
      "process\n-E <var>=<val>\tSet the environment variable <var> to <val>; "
      "unset it if <var> is empty\n-f\t\tFilter system calls (-ff=very "
      "restricted)\n-i <file>\tRedirect stdin from <file>\n-k <size>\tLimit "
      "stack size to <size> KB (default: 0=unlimited)\n-m <size>\tLimit "
      "address space to <size> KB\n-M <file>\tOutput process information to "
      "<file> (name:value)\n-o <file>\tRedirect stdout to <file>\n-p "
      "<path>\tPermit access to the specified path (or subtree if it ends with "
      "a `/')\n-p <path>=<act>\tDefine action for the specified path "
      "(<act>=yes/no)\n-r <file>\tRedirect stderr to <file>\n-s <sys>\tPermit "
      "the specified syscall (be careful)\n-s <sys>=<act>\tDefine action for "
      "the specified syscall (<act>=yes/no/file)\n-t <time>\tSet run time "
      "limit (seconds, fractions allowed)\n-T\t\tAllow syscalls for measuring "
      "run time\n-v\t\tBe verbose (use multiple times for even more "
      "verbosity)\n-w <time>\tSet wall clock time limit (seconds, fractions "
      "allowed)\n-x <time>\tSet extra timeout, before which a timing-out "
      "program is not yet killed,\n\t\tso that its real execution time is "
      "reported (seconds, fractions allowed)\n-A <opt>\tPass <opt> as "
      "additional argument to the <command>\n\t\tBe noted that this option "
      "will be appended after <arguments> respectively\n");
  exit(2);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ea5(%rip),%rax
mov    (%rax),%edi
lea    0xebc(%rip),%rsi
call   1040 <fprintf@plt>
lea    0xec4(%rip),%rdi
call   1030 <printf@plt>
mov    $0x2,%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rax
mov    0x2ea8(%rip),%rax
mov    (%rax),%edi
lea    0xebf(%rip),%rsi
call   1040 <fprintf@plt>
lea    0xec7(%rip),%rdi
call   1030 <puts@plt>
mov    $0x2,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [20 x i8] c"Invalid arguments!\0A\00"
@.str.1 = [1525 x i8] c"Usage: box [<options>] -- <command> <arguments>\0A\0AOptions:\0A-a <level>\09Set file access level (0=none, 1=cwd, 2=/etc,/lib,..., 3=whole fs, 9=no checks; needs -f)\0A-c <dir>\09Change directory to <dir> first\0A-e\09\09Inherit full environment of the parent process\0A-E <var>\09Inherit the environment variable <var> from the parent process\0A-E <var>=<val>\09Set the environment variable <var> to <val>; unset it if <var> is empty\0A-f\09\09Filter system calls (-ff=very restricted)\0A-i <file>\09Redirect stdin from <file>\0A-k <size>\09Limit stack size to <size> KB (default: 0=unlimited)\0A-m <size>\09Limit address space to <size> KB\0A-M <file>\09Output process information to <file> (name:value)\0A-o <file>\09Redirect stdout to <file>\0A-p <path>\09Permit access to the specified path (or subtree if it ends with a `/')\0A-p <path>=<act>\09Define action for the specified path (<act>=yes/no)\0A-r <file>\09Redirect stderr to <file>\0A-s <sys>\09Permit the specified syscall (be careful)\0A-s <sys>=<act>\09Define action for the specified syscall (<act>=yes/no/file)\0A-t <time>\09Set run time limit (seconds, fractions allowed)\0A-T\09\09Allow syscalls for measuring run time\0A-v\09\09Be verbose (use multiple times for even more verbosity)\0A-w <time>\09Set wall clock time limit (seconds, fractions allowed)\0A-x <time>\09Set extra timeout, before which a timing-out program is not yet killed,\0A\09\09so that its real execution time is reported (seconds, fractions allowed)\0A-A <opt>\09Pass <opt> as additional argument to the <command>\0A\09\09Be noted that this option will be appended after <arguments> respectively\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([1525 x i8], [1525 x i8]* @.str.1, i64 0, i64 0))
%4 = call i32 @exit(i32 2)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [20 x i8] c"Invalid arguments!\0A\00"
@str = [1524 x i8] c"Usage: box [<options>] -- <command> <arguments>\0A\0AOptions:\0A-a <level>\09Set file access level (0=none, 1=cwd, 2=/etc,/lib,..., 3=whole fs, 9=no checks; needs -f)\0A-c <dir>\09Change directory to <dir> first\0A-e\09\09Inherit full environment of the parent process\0A-E <var>\09Inherit the environment variable <var> from the parent process\0A-E <var>=<val>\09Set the environment variable <var> to <val>; unset it if <var> is empty\0A-f\09\09Filter system calls (-ff=very restricted)\0A-i <file>\09Redirect stdin from <file>\0A-k <size>\09Limit stack size to <size> KB (default: 0=unlimited)\0A-m <size>\09Limit address space to <size> KB\0A-M <file>\09Output process information to <file> (name:value)\0A-o <file>\09Redirect stdout to <file>\0A-p <path>\09Permit access to the specified path (or subtree if it ends with a `/')\0A-p <path>=<act>\09Define action for the specified path (<act>=yes/no)\0A-r <file>\09Redirect stderr to <file>\0A-s <sys>\09Permit the specified syscall (be careful)\0A-s <sys>=<act>\09Define action for the specified syscall (<act>=yes/no/file)\0A-t <time>\09Set run time limit (seconds, fractions allowed)\0A-T\09\09Allow syscalls for measuring run time\0A-v\09\09Be verbose (use multiple times for even more verbosity)\0A-w <time>\09Set wall clock time limit (seconds, fractions allowed)\0A-x <time>\09Set extra timeout, before which a timing-out program is not yet killed,\0A\09\09so that its real execution time is reported (seconds, fractions allowed)\0A-A <opt>\09Pass <opt> as additional argument to the <command>\0A\09\09Be noted that this option will be appended after <arguments> respectively\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([1524 x i8], [1524 x i8]* @str, i64 0, i64 0))
%4 = tail call i32 @exit(i32 2)
unreachable
}