#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 *, char *);
int /*<<< orphan*/ stderr;
void usage(char *progname) {
  fprintf(
      stderr,
      "Usage: %s [OPTIONS] PROG [ARGS]...\nOptions:\n  -i "
      "[INTERFACE:]PORT	bind a listening socket in the internet namespace\n  "
      "-l PATH, -x PATH      bind a listening socket in the local unix "
      "namespace\n  -s                    create a stream socket (default "
      "socket style)\n  -d                    create a datagram socket instead "
      "of a stream socket\n  -t [INTERFACE:]PORT   create a TCP socket: "
      "equivalent to -s -i\n  -u [INTERFACE:]PORT   create a UDP socket: "
      "equivalent to -d -i\n  -b BACKLOG            set the listen backlog for "
      "a stream socket\n  -c MAXCLIENTS         set the maximum number of "
      "concurrent connections\n                          accepted by a stream "
      "socket (default is unlimited)\n  -n                    set TCP_NODELAY "
      "to disable Nagle's algorithm for TCP\n                          stream "
      "connections\n  -v                    report information about every "
      "connection accepted\n                          or initial datagram "
      "received to stderr or the log\n  -B                    fork, establish "
      "new session id, redirect stdin and\n                          stdout "
      "to/from /dev/null if they are attached to a\n                          "
      "terminal, and run as a daemon in the background\n  -L TAG[:FAC.PRI]     "
      " start a logger subprocess, redirecting stderr to the\n                 "
      "         system log with tag TAG, facility FAC and priority\n           "
      "               PRI (defaulting to daemon.notice if unspecified)\n  -L "
      ">LOGFILE           redirect stderr to create and write to LOGFILE\n  -L "
      ">>LOGFILE          redirect stderr to append to LOGFILE\n  -P PIDFILE   "
      "         write pid to PIDFILE (after forking if used with -B)\n  -S     "
      "               supervisor mode: restart PROG whenever it exits\n  -U    "
      "                after binding the socket, drop privileges to those\n    "
      "                      specified by $UID and $GID, and if $ROOT is "
      "set,\n                          chroot into that directory\n  -V        "
      "            print the program version number to stderr and exit\n\nWhen "
      "a stream socket is specified, listen on it and accept all "
      "incoming\nconnections, executing the given program in a child process "
      "with stdin and\nstdout attached to the connection socket. Do not wait "
      "for the child to exit\nbefore accepting another connection on the "
      "listening socket.\n\nWhen a datagram socket is specified, wait for an "
      "initial datagram to arrive\nbefore launching the given program with "
      "stdin and stdout attached to the\nlistening socket. Until this program "
      "exits, don't attempt to check for more\ndatagrams or spawn another "
      "child.\n\nIf none of -i, -l, -u is used, no socket is bound and the "
      "given program is\nexecuted immediately, after any background, logging, "
      "pidfile and privilege\ndropping actions have been completed. This "
      "allows use of these facilities\nfor standalone and non-network "
      "services. If the -S option is specified in\nthis case, a supervisor "
      "process restarts the program whenever it exits.\n",
      progname);
  exit(1);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ead(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xec0(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rax
mov    %rdi,%rdx
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [2890 x i8] c"Usage: %s [OPTIONS] PROG [ARGS]...\0AOptions:\0A -i [INTERFACE:]PORT\09bind a listening socket in the internet namespace\0A -l PATH, -x PATH bind a listening socket in the local unix namespace\0A -s create a stream socket (default socket style)\0A -d create a datagram socket instead of a stream socket\0A -t [INTERFACE:]PORT create a TCP socket: equivalent to -s -i\0A -u [INTERFACE:]PORT create a UDP socket: equivalent to -d -i\0A -b BACKLOG set the listen backlog for a stream socket\0A -c MAXCLIENTS set the maximum number of concurrent connections\0A accepted by a stream socket (default is unlimited)\0A -n set TCP_NODELAY to disable Nagle's algorithm for TCP\0A stream connections\0A -v report information about every connection accepted\0A or initial datagram received to stderr or the log\0A -B fork, establish new session id, redirect stdin and\0A stdout to/from /dev/null if they are attached to a\0A terminal, and run as a daemon in the background\0A -L TAG[:FAC.PRI] start a logger subprocess, redirecting stderr to the\0A system log with tag TAG, facility FAC and priority\0A PRI (defaulting to daemon.notice if unspecified)\0A -L >LOGFILE redirect stderr to create and write to LOGFILE\0A -L >>LOGFILE redirect stderr to append to LOGFILE\0A -P PIDFILE write pid to PIDFILE (after forking if used with -B)\0A -S supervisor mode: restart PROG whenever it exits\0A -U after binding the socket, drop privileges to those\0A specified by $UID and $GID, and if $ROOT is set,\0A chroot into that directory\0A -V print the program version number to stderr and exit\0A\0AWhen a stream socket is specified, listen on it and accept all incoming\0Aconnections, executing the given program in a child process with stdin and\0Astdout attached to the connection socket. Do not wait for the child to exit\0Abefore accepting another connection on the listening socket.\0A\0AWhen a datagram socket is specified, wait for an initial datagram to arrive\0Abefore launching the given program with stdin and stdout attached to the\0Alistening socket. Until this program exits, don't attempt to check for more\0Adatagrams or spawn another child.\0A\0AIf none of -i, -l, -u is used, no socket is bound and the given program is\0Aexecuted immediately, after any background, logging, pidfile and privilege\0Adropping actions have been completed. This allows use of these facilities\0Afor standalone and non-network services. If the -S option is specified in\0Athis case, a supervisor process restarts the program whenever it exits.\0A\00"
define void @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([2890 x i8], [2890 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [2890 x i8] c"Usage: %s [OPTIONS] PROG [ARGS]...\0AOptions:\0A -i [INTERFACE:]PORT\09bind a listening socket in the internet namespace\0A -l PATH, -x PATH bind a listening socket in the local unix namespace\0A -s create a stream socket (default socket style)\0A -d create a datagram socket instead of a stream socket\0A -t [INTERFACE:]PORT create a TCP socket: equivalent to -s -i\0A -u [INTERFACE:]PORT create a UDP socket: equivalent to -d -i\0A -b BACKLOG set the listen backlog for a stream socket\0A -c MAXCLIENTS set the maximum number of concurrent connections\0A accepted by a stream socket (default is unlimited)\0A -n set TCP_NODELAY to disable Nagle's algorithm for TCP\0A stream connections\0A -v report information about every connection accepted\0A or initial datagram received to stderr or the log\0A -B fork, establish new session id, redirect stdin and\0A stdout to/from /dev/null if they are attached to a\0A terminal, and run as a daemon in the background\0A -L TAG[:FAC.PRI] start a logger subprocess, redirecting stderr to the\0A system log with tag TAG, facility FAC and priority\0A PRI (defaulting to daemon.notice if unspecified)\0A -L >LOGFILE redirect stderr to create and write to LOGFILE\0A -L >>LOGFILE redirect stderr to append to LOGFILE\0A -P PIDFILE write pid to PIDFILE (after forking if used with -B)\0A -S supervisor mode: restart PROG whenever it exits\0A -U after binding the socket, drop privileges to those\0A specified by $UID and $GID, and if $ROOT is set,\0A chroot into that directory\0A -V print the program version number to stderr and exit\0A\0AWhen a stream socket is specified, listen on it and accept all incoming\0Aconnections, executing the given program in a child process with stdin and\0Astdout attached to the connection socket. Do not wait for the child to exit\0Abefore accepting another connection on the listening socket.\0A\0AWhen a datagram socket is specified, wait for an initial datagram to arrive\0Abefore launching the given program with stdin and stdout attached to the\0Alistening socket. Until this program exits, don't attempt to check for more\0Adatagrams or spawn another child.\0A\0AIf none of -i, -l, -u is used, no socket is bound and the given program is\0Aexecuted immediately, after any background, logging, pidfile and privilege\0Adropping actions have been completed. This allows use of these facilities\0Afor standalone and non-network services. If the -S option is specified in\0Athis case, a supervisor process restarts the program whenever it exits.\0A\00"
define void @usage(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([2890 x i8], [2890 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = tail call i32 @exit(i32 1)
unreachable
}