#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*/ fputs(char *, int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ stdout;
void usage(int status) {
  printf("usage: %s [-w|--workers] <port> [<handler> [<args>]]\n\n", "malunas");
  fputs("Listens for incomming connections on a TCP port. All the data that "
        "is\nreceived and sent from an accepted connection socket is mapped to "
        "one of the\nsupported handlers.\n\n",
        stdout);
  fputs("OPTIONS:\nMandatory arguments to long options are mandatory for short "
        "options too.\n  -w, --workers=NUMBER adjust number of preforked "
        "workers that accept connections\n\n",
        stdout);
  fputs("HANDLERS:\n  exec     maps to input and output of a locally executed "
        "command\n  proxy    forward socket data to a new TCP connection\n\n",
        stdout);
  printf("Run '%s HANDLER --help' for more information on a handler.\n",
         "malunas");
  exit(status);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    0xebe(%rip),%rdi
lea    0xeee(%rip),%rsi
call   1030 <printf@plt>
mov    0x2e8b(%rip),%rax
mov    (%rax),%esi
lea    0xee1(%rip),%rdi
call   1040 <fputs@plt>
mov    0x2e76(%rip),%rax
mov    (%rax),%esi
lea    0xf75(%rip),%rdi
call   1040 <fputs@plt>
mov    0x2e61(%rip),%rax
mov    (%rax),%esi
lea    0x1006(%rip),%rdi
call   1040 <fputs@plt>
lea    0x107f(%rip),%rdi
lea    0xe9c(%rip),%rsi
call   1030 <printf@plt>
mov    -0x4(%rbp),%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rbp
push   %r14
push   %rbx
mov    %edi,%ebp
lea    0xec3(%rip),%rdi
lea    0xef3(%rip),%r14
mov    %r14,%rsi
call   1030 <printf@plt>
mov    0x2e8d(%rip),%rbx
mov    (%rbx),%esi
lea    0xee3(%rip),%rdi
call   1040 <fputs@plt>
mov    (%rbx),%esi
lea    0xf7e(%rip),%rdi
call   1040 <fputs@plt>
mov    (%rbx),%esi
lea    0x1016(%rip),%rdi
call   1040 <fputs@plt>
lea    0x108f(%rip),%rdi
mov    %r14,%rsi
call   1030 <printf@plt>
mov    %ebp,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [55 x i8] c"usage: %s [-w|--workers] <port> [<handler> [<args>]]\0A\0A\00"
@.str.1 = [8 x i8] c"malunas\00"
@.str.2 = [169 x i8] c"Listens for incomming connections on a TCP port. All the data that is\0Areceived and sent from an accepted connection socket is mapped to one of the\0Asupported handlers.\0A\0A\00"
@stdout = global i32 0
@.str.3 = [166 x i8] c"OPTIONS:\0AMandatory arguments to long options are mandatory for short options too.\0A -w, --workers=NUMBER adjust number of preforked workers that accept connections\0A\0A\00"
@.str.4 = [133 x i8] c"HANDLERS:\0A exec maps to input and output of a locally executed command\0A proxy forward socket data to a new TCP connection\0A\0A\00"
@.str.5 = [60 x i8] c"Run '%s HANDLER --help' for more information on a handler.\0A\00"
define void @usage(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @printf(i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
%4 = load i32, i32* @stdout
%5 = call i32 @fputs(i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str.2, i64 0, i64 0), i32 %4)
%6 = load i32, i32* @stdout
%7 = call i32 @fputs(i8* getelementptr inbounds ([166 x i8], [166 x i8]* @.str.3, i64 0, i64 0), i32 %6)
%8 = load i32, i32* @stdout
%9 = call i32 @fputs(i8* getelementptr inbounds ([133 x i8], [133 x i8]* @.str.4, i64 0, i64 0), i32 %8)
%10 = call i32 @printf(i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
%11 = load i32, i32* %2
%12 = call i32 @exit(i32 %11)
unreachable
}

LLVM IR (-O2):
@.str = [55 x i8] c"usage: %s [-w|--workers] <port> [<handler> [<args>]]\0A\0A\00"
@.str.1 = [8 x i8] c"malunas\00"
@.str.2 = [169 x i8] c"Listens for incomming connections on a TCP port. All the data that is\0Areceived and sent from an accepted connection socket is mapped to one of the\0Asupported handlers.\0A\0A\00"
@stdout = global i32 0
@.str.3 = [166 x i8] c"OPTIONS:\0AMandatory arguments to long options are mandatory for short options too.\0A -w, --workers=NUMBER adjust number of preforked workers that accept connections\0A\0A\00"
@.str.4 = [133 x i8] c"HANDLERS:\0A exec maps to input and output of a locally executed command\0A proxy forward socket data to a new TCP connection\0A\0A\00"
@.str.5 = [60 x i8] c"Run '%s HANDLER --help' for more information on a handler.\0A\00"
define void @usage(i32 %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
%3 = load i32, i32* @stdout
%4 = tail call i32 @fputs(i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str.2, i64 0, i64 0), i32 %3)
%5 = load i32, i32* @stdout
%6 = tail call i32 @fputs(i8* getelementptr inbounds ([166 x i8], [166 x i8]* @.str.3, i64 0, i64 0), i32 %5)
%7 = load i32, i32* @stdout
%8 = tail call i32 @fputs(i8* getelementptr inbounds ([133 x i8], [133 x i8]* @.str.4, i64 0, i64 0), i32 %7)
%9 = tail call i32 @printf(i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
%10 = tail call i32 @exit(i32 %0)
unreachable
}