#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 const *, char const *);
void print_usage(const char *name) {
  printf("Usage: %s <options>\n\n"
         "  -h                  show help and exit\n"
         "  -v                  show version and exit\n"
         "  -i ip_address       listen IP address, IPv6 support       "
         "(default: 127.0.0.1)\n"
         "  -p port             listen port                           "
         "(default: 8000)\n"
         "  -r webroot          webroot directory                     "
         "(default: current directory)\n"
         "  -w nb_workers       number of workers to start            "
         "(default: 2)\n"
         "  -c connections      number of connections per worker      "
         "(default: 500)\n"
         "  -o filepath         logfile path                          "
         "(default: stderr)\n"
         "  -l level            logging level [0-5], 0 to disable     "
         "(default: 2)\n"
         "  -d                  run as daemon (background)            "
         "(default: no)\n"
         "\n"
         "example: %s -d -i 192.168.1.1 -p 8080 -o web.log -l 1 -w 4 -r "
         "/var/www/public_html\n"
         "\n",
         name, name);
}


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

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

LLVM IR (-O0):
@.str = [811 x i8] c"Usage: %s <options>\0A\0A -h show help and exit\0A -v show version and exit\0A -i ip_address listen IP address, IPv6 support (default: 127.0.0.1)\0A -p port listen port (default: 8000)\0A -r webroot webroot directory (default: current directory)\0A -w nb_workers number of workers to start (default: 2)\0A -c connections number of connections per worker (default: 500)\0A -o filepath logfile path (default: stderr)\0A -l level logging level [0-5], 0 to disable (default: 2)\0A -d run as daemon (background) (default: no)\0A\0Aexample: %s -d -i 192.168.1.1 -p 8080 -o web.log -l 1 -w 4 -r /var/www/public_html\0A\0A\00"
define void @print_usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i8*, i8** %2
%5 = call i32 @printf(i8* getelementptr inbounds ([811 x i8], [811 x i8]* @.str, i64 0, i64 0), i8* %3, i8* %4)
ret void
}

LLVM IR (-O2):
@.str = [811 x i8] c"Usage: %s <options>\0A\0A -h show help and exit\0A -v show version and exit\0A -i ip_address listen IP address, IPv6 support (default: 127.0.0.1)\0A -p port listen port (default: 8000)\0A -r webroot webroot directory (default: current directory)\0A -w nb_workers number of workers to start (default: 2)\0A -c connections number of connections per worker (default: 500)\0A -o filepath logfile path (default: stderr)\0A -l level logging level [0-5], 0 to disable (default: 2)\0A -d run as daemon (background) (default: no)\0A\0Aexample: %s -d -i 192.168.1.1 -p 8080 -o web.log -l 1 -w 4 -r /var/www/public_html\0A\0A\00"
define void @print_usage(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([811 x i8], [811 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %0)
ret void
}