#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 *, char *);
void usage(char *name) {
  printf("Execution utility for MiniNExT (MiniNet ExTended)\n\n"
         "Usage: %s [-cdnmiufp] [-a pid] [-b pid] [-k pid] [-j pid] [-g group] "
         "[-r rtprio] cmd args...\n\n"
         "Options:\n"
         "  -c: close all file descriptors except stdin/out/error\n"
         "  -d: detach from tty by calling setsid()\n"
         "  -n: run in new network namespace\n"
         "  -m: run in new mount namespace\n"
         "  -i: run in new PID namespace\n"
         "  -u: run in new UTS namespace\n"
         "  -f: mount procfs (requires new PID namespace)\n"
         "  -p: print ^A + pid\n"
         "  -a: pid: attach to pid's network namespace\n"
         "  -b: pid: attach to pid's mount namespace\n"
         "  -k: pid: attach to pid's PID namespace\n"
         "  -j: pid: attach to pid's UTS namespace\n"
         "  -g: group: add to cgroup\n"
         "  -r: rtprio: run with SCHED_RR (usually requires -g)\n"
         "  -v: print version\n",
         name);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xed9(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<usage>:
mov    %rdi,%rsi
lea    0xee6(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [723 x i8] c"Execution utility for MiniNExT (MiniNet ExTended)\0A\0AUsage: %s [-cdnmiufp] [-a pid] [-b pid] [-k pid] [-j pid] [-g group] [-r rtprio] cmd args...\0A\0AOptions:\0A -c: close all file descriptors except stdin/out/error\0A -d: detach from tty by calling setsid()\0A -n: run in new network namespace\0A -m: run in new mount namespace\0A -i: run in new PID namespace\0A -u: run in new UTS namespace\0A -f: mount procfs (requires new PID namespace)\0A -p: print ^A + pid\0A -a: pid: attach to pid's network namespace\0A -b: pid: attach to pid's mount namespace\0A -k: pid: attach to pid's PID namespace\0A -j: pid: attach to pid's UTS namespace\0A -g: group: add to cgroup\0A -r: rtprio: run with SCHED_RR (usually requires -g)\0A -v: print version\0A\00"
define void @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([723 x i8], [723 x i8]* @.str, i64 0, i64 0), i8* %3)
ret void
}

LLVM IR (-O2):
@.str = [723 x i8] c"Execution utility for MiniNExT (MiniNet ExTended)\0A\0AUsage: %s [-cdnmiufp] [-a pid] [-b pid] [-k pid] [-j pid] [-g group] [-r rtprio] cmd args...\0A\0AOptions:\0A -c: close all file descriptors except stdin/out/error\0A -d: detach from tty by calling setsid()\0A -n: run in new network namespace\0A -m: run in new mount namespace\0A -i: run in new PID namespace\0A -u: run in new UTS namespace\0A -f: mount procfs (requires new PID namespace)\0A -p: print ^A + pid\0A -a: pid: attach to pid's network namespace\0A -b: pid: attach to pid's mount namespace\0A -k: pid: attach to pid's PID namespace\0A -j: pid: attach to pid's UTS namespace\0A -g: group: add to cgroup\0A -r: rtprio: run with SCHED_RR (usually requires -g)\0A -v: print version\0A\00"
define void @usage(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([723 x i8], [723 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}