#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 */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, ...);
void print_usage(FILE *fp, const char *name) {
  fprintf(fp, "Usage: %s [options]\n", name);
  fprintf(fp, "\t-4\t\tUse IPv4\n");
  fprintf(fp, "\t-6\t\tUse IPv6\n");
  fprintf(fp, "\t-a addr\t\tbind to addr\n");
  fprintf(fp, "\t-p port\t\tlisten on port\n");
  fprintf(fp, "\t-s\t\tsilent\n");
  fprintf(fp, "\t-u\t\tuse UDP\n");
  fprintf(fp, "\t-e\t\techo\n");
  fprintf(fp, "\t-b len\t\tbacklog length\n");
  fprintf(fp, "\t-c cmd resp\tsend resp if receive cmd\n");
  fprintf(fp, "\t-v ver\t\tset HTML version to use (default 1.1)\n");
  fprintf(fp, "\t-w url resp\tsend HTTP response for url\n");
  fprintf(fp, "\t-W\t\tsend a pre-build HTTP response for GET /\n");
  fprintf(fp, "\t-M[mail server name]\t\tbe an email server\n");
  fprintf(fp, "\t-l val\t\tASCII value to use for EOL char\n");
  fprintf(fp, "\t-d delay\tdelay in ms before replying\n");
  fprintf(fp, "\t-r\t\tuse random delay\n");
  fprintf(fp, "\t-m mod\t\tOnly report every mod'th connection\n");
  fprintf(fp, "\t-Z\t\ttoggle close on send (default off)\n");
  fprintf(fp, "\t-g\t\tdebug data\n");
  fprintf(fp, "\t-G\t\tdebug\n");
  fprintf(fp, "\t-h\t\tprint this\n");
}


x86 assembly (clang, -O0):
<print_usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rdx
lea    0xed1(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0xed4(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0xed1(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0xece(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0xed4(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0xedc(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0xed7(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0xed3(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0xecc(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0xed3(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0xee8(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0xf06(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0xf1d(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0xf3a(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0xf53(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0xf6b(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0xf80(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0xf85(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0xfa1(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0xfb8(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0xfb7(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0xfb1(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_usage>:
push   %rbx
mov    %rsi,%rdx
mov    %rdi,%rbx
lea    0xed2(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
lea    0xed9(%rip),%rdi
mov    $0xe,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1040 <fwrite@plt>
lea    0xecf(%rip),%rdi
mov    $0xe,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1040 <fwrite@plt>
lea    0xec5(%rip),%rdi
mov    $0x17,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1040 <fwrite@plt>
lea    0xec4(%rip),%rdi
mov    $0x19,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1040 <fwrite@plt>
lea    0xec5(%rip),%rdi
mov    $0xc,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1040 <fwrite@plt>
lea    0xeb9(%rip),%rdi
mov    $0xd,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1040 <fwrite@plt>
lea    0xeae(%rip),%rdi
mov    $0xa,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1040 <fwrite@plt>
lea    0xea0(%rip),%rdi
mov    $0x18,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1040 <fwrite@plt>
lea    0xea0(%rip),%rdi
mov    $0x26,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1040 <fwrite@plt>
lea    0xeae(%rip),%rdi
mov    $0x2f,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1040 <fwrite@plt>
lea    0xec5(%rip),%rdi
mov    $0x28,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1040 <fwrite@plt>
lea    0xed5(%rip),%rdi
mov    $0x2e,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1040 <fwrite@plt>
lea    0xeeb(%rip),%rdi
mov    $0x2a,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1040 <fwrite@plt>
lea    0xefd(%rip),%rdi
mov    $0x29,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1040 <fwrite@plt>
lea    0xf0e(%rip),%rdi
mov    $0x26,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1040 <fwrite@plt>
lea    0xf1c(%rip),%rdi
mov    $0x16,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1040 <fwrite@plt>
lea    0xf1a(%rip),%rdi
mov    $0x2d,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1040 <fwrite@plt>
lea    0xf2f(%rip),%rdi
mov    $0x28,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1040 <fwrite@plt>
lea    0xf3f(%rip),%rdi
mov    $0x10,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1040 <fwrite@plt>
lea    0xf37(%rip),%rdi
mov    $0xb,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1040 <fwrite@plt>
lea    0xf2a(%rip),%rdi
mov    $0x10,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
pop    %rbx
jmp    1040 <fwrite@plt>

LLVM IR (-O0):
@.str = [21 x i8] c"Usage: %s [options]\0A\00"
@.str.1 = [15 x i8] c"\09-4\09\09Use IPv4\0A\00"
@.str.2 = [15 x i8] c"\09-6\09\09Use IPv6\0A\00"
@.str.3 = [24 x i8] c"\09-a addr\09\09bind to addr\0A\00"
@.str.4 = [26 x i8] c"\09-p port\09\09listen on port\0A\00"
@.str.5 = [13 x i8] c"\09-s\09\09silent\0A\00"
@.str.6 = [14 x i8] c"\09-u\09\09use UDP\0A\00"
@.str.7 = [11 x i8] c"\09-e\09\09echo\0A\00"
@.str.8 = [25 x i8] c"\09-b len\09\09backlog length\0A\00"
@.str.9 = [39 x i8] c"\09-c cmd resp\09send resp if receive cmd\0A\00"
@.str.10 = [48 x i8] c"\09-v ver\09\09set HTML version to use (default 1.1)\0A\00"
@.str.11 = [41 x i8] c"\09-w url resp\09send HTTP response for url\0A\00"
@.str.12 = [47 x i8] c"\09-W\09\09send a pre-build HTTP response for GET /\0A\00"
@.str.13 = [43 x i8] c"\09-M[mail server name]\09\09be an email server\0A\00"
@.str.14 = [42 x i8] c"\09-l val\09\09ASCII value to use for EOL char\0A\00"
@.str.15 = [39 x i8] c"\09-d delay\09delay in ms before replying\0A\00"
@.str.16 = [23 x i8] c"\09-r\09\09use random delay\0A\00"
@.str.17 = [46 x i8] c"\09-m mod\09\09Only report every mod'th connection\0A\00"
@.str.18 = [41 x i8] c"\09-Z\09\09toggle close on send (default off)\0A\00"
@.str.19 = [17 x i8] c"\09-g\09\09debug data\0A\00"
@.str.20 = [12 x i8] c"\09-G\09\09debug\0A\00"
@.str.21 = [17 x i8] c"\09-h\09\09print this\0A\00"
define void @print_usage(i32* %0, i8* %1) {
%3 = alloca i32*
%4 = alloca i8*
store i32* %0, i32** %3
store i8* %1, i8** %4
%5 = load i32*, i32** %3
%6 = load i8*, i8** %4
%7 = call i32 (i32*, i8*, ...) @fprintf(i32* %5, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i8* %6)
%8 = load i32*, i32** %3
%9 = call i32 (i32*, i8*, ...) @fprintf(i32* %8, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0))
%10 = load i32*, i32** %3
%11 = call i32 (i32*, i8*, ...) @fprintf(i32* %10, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.2, i64 0, i64 0))
%12 = load i32*, i32** %3
%13 = call i32 (i32*, i8*, ...) @fprintf(i32* %12, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.3, i64 0, i64 0))
%14 = load i32*, i32** %3
%15 = call i32 (i32*, i8*, ...) @fprintf(i32* %14, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.4, i64 0, i64 0))
%16 = load i32*, i32** %3
%17 = call i32 (i32*, i8*, ...) @fprintf(i32* %16, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.5, i64 0, i64 0))
%18 = load i32*, i32** %3
%19 = call i32 (i32*, i8*, ...) @fprintf(i32* %18, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.6, i64 0, i64 0))
%20 = load i32*, i32** %3
%21 = call i32 (i32*, i8*, ...) @fprintf(i32* %20, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.7, i64 0, i64 0))
%22 = load i32*, i32** %3
%23 = call i32 (i32*, i8*, ...) @fprintf(i32* %22, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.8, i64 0, i64 0))
%24 = load i32*, i32** %3
%25 = call i32 (i32*, i8*, ...) @fprintf(i32* %24, i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.9, i64 0, i64 0))
%26 = load i32*, i32** %3
%27 = call i32 (i32*, i8*, ...) @fprintf(i32* %26, i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.10, i64 0, i64 0))
%28 = load i32*, i32** %3
%29 = call i32 (i32*, i8*, ...) @fprintf(i32* %28, i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.11, i64 0, i64 0))
%30 = load i32*, i32** %3
%31 = call i32 (i32*, i8*, ...) @fprintf(i32* %30, i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.12, i64 0, i64 0))
%32 = load i32*, i32** %3
%33 = call i32 (i32*, i8*, ...) @fprintf(i32* %32, i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.13, i64 0, i64 0))
%34 = load i32*, i32** %3
%35 = call i32 (i32*, i8*, ...) @fprintf(i32* %34, i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.14, i64 0, i64 0))
%36 = load i32*, i32** %3
%37 = call i32 (i32*, i8*, ...) @fprintf(i32* %36, i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.15, i64 0, i64 0))
%38 = load i32*, i32** %3
%39 = call i32 (i32*, i8*, ...) @fprintf(i32* %38, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.16, i64 0, i64 0))
%40 = load i32*, i32** %3
%41 = call i32 (i32*, i8*, ...) @fprintf(i32* %40, i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.17, i64 0, i64 0))
%42 = load i32*, i32** %3
%43 = call i32 (i32*, i8*, ...) @fprintf(i32* %42, i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.18, i64 0, i64 0))
%44 = load i32*, i32** %3
%45 = call i32 (i32*, i8*, ...) @fprintf(i32* %44, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.19, i64 0, i64 0))
%46 = load i32*, i32** %3
%47 = call i32 (i32*, i8*, ...) @fprintf(i32* %46, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.20, i64 0, i64 0))
%48 = load i32*, i32** %3
%49 = call i32 (i32*, i8*, ...) @fprintf(i32* %48, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.21, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [21 x i8] c"Usage: %s [options]\0A\00"
@.str.1 = [15 x i8] c"\09-4\09\09Use IPv4\0A\00"
@.str.2 = [15 x i8] c"\09-6\09\09Use IPv6\0A\00"
@.str.3 = [24 x i8] c"\09-a addr\09\09bind to addr\0A\00"
@.str.4 = [26 x i8] c"\09-p port\09\09listen on port\0A\00"
@.str.5 = [13 x i8] c"\09-s\09\09silent\0A\00"
@.str.6 = [14 x i8] c"\09-u\09\09use UDP\0A\00"
@.str.7 = [11 x i8] c"\09-e\09\09echo\0A\00"
@.str.8 = [25 x i8] c"\09-b len\09\09backlog length\0A\00"
@.str.9 = [39 x i8] c"\09-c cmd resp\09send resp if receive cmd\0A\00"
@.str.10 = [48 x i8] c"\09-v ver\09\09set HTML version to use (default 1.1)\0A\00"
@.str.11 = [41 x i8] c"\09-w url resp\09send HTTP response for url\0A\00"
@.str.12 = [47 x i8] c"\09-W\09\09send a pre-build HTTP response for GET /\0A\00"
@.str.13 = [43 x i8] c"\09-M[mail server name]\09\09be an email server\0A\00"
@.str.14 = [42 x i8] c"\09-l val\09\09ASCII value to use for EOL char\0A\00"
@.str.15 = [39 x i8] c"\09-d delay\09delay in ms before replying\0A\00"
@.str.16 = [23 x i8] c"\09-r\09\09use random delay\0A\00"
@.str.17 = [46 x i8] c"\09-m mod\09\09Only report every mod'th connection\0A\00"
@.str.18 = [41 x i8] c"\09-Z\09\09toggle close on send (default off)\0A\00"
@.str.19 = [17 x i8] c"\09-g\09\09debug data\0A\00"
@.str.20 = [12 x i8] c"\09-G\09\09debug\0A\00"
@.str.21 = [17 x i8] c"\09-h\09\09print this\0A\00"
define void @print_usage(i32* %0, i8* %1) {
%3 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %0, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i8* %1)
%4 = tail call i64 @fwrite(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0), i64 14, i64 1, i32* %0)
%5 = tail call i64 @fwrite(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.2, i64 0, i64 0), i64 14, i64 1, i32* %0)
%6 = tail call i64 @fwrite(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.3, i64 0, i64 0), i64 23, i64 1, i32* %0)
%7 = tail call i64 @fwrite(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.4, i64 0, i64 0), i64 25, i64 1, i32* %0)
%8 = tail call i64 @fwrite(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.5, i64 0, i64 0), i64 12, i64 1, i32* %0)
%9 = tail call i64 @fwrite(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.6, i64 0, i64 0), i64 13, i64 1, i32* %0)
%10 = tail call i64 @fwrite(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.7, i64 0, i64 0), i64 10, i64 1, i32* %0)
%11 = tail call i64 @fwrite(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.8, i64 0, i64 0), i64 24, i64 1, i32* %0)
%12 = tail call i64 @fwrite(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.9, i64 0, i64 0), i64 38, i64 1, i32* %0)
%13 = tail call i64 @fwrite(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.10, i64 0, i64 0), i64 47, i64 1, i32* %0)
%14 = tail call i64 @fwrite(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.11, i64 0, i64 0), i64 40, i64 1, i32* %0)
%15 = tail call i64 @fwrite(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.12, i64 0, i64 0), i64 46, i64 1, i32* %0)
%16 = tail call i64 @fwrite(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.13, i64 0, i64 0), i64 42, i64 1, i32* %0)
%17 = tail call i64 @fwrite(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.14, i64 0, i64 0), i64 41, i64 1, i32* %0)
%18 = tail call i64 @fwrite(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.15, i64 0, i64 0), i64 38, i64 1, i32* %0)
%19 = tail call i64 @fwrite(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.16, i64 0, i64 0), i64 22, i64 1, i32* %0)
%20 = tail call i64 @fwrite(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.17, i64 0, i64 0), i64 45, i64 1, i32* %0)
%21 = tail call i64 @fwrite(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.18, i64 0, i64 0), i64 40, i64 1, i32* %0)
%22 = tail call i64 @fwrite(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.19, i64 0, i64 0), i64 16, i64 1, i32* %0)
%23 = tail call i64 @fwrite(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.20, i64 0, i64 0), i64 11, i64 1, i32* %0)
%24 = tail call i64 @fwrite(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.21, i64 0, i64 0), i64 16, i64 1, i32* %0)
ret void
}