#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 /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, ...);
void usage(char *pname) {
  char *usagestring =
      "usage: %s [-s saddr] <-t daddr | -C netaddr> [I:S:qvr:T:a129dDlh]\n";
  char *optstring[] = {
      "\tI  - interface name (default the first not lo interface)\n",
      "\ts  - source host (default the addr. of used interface)\n",
      "\tt  - target host\n",
      "\tS  - source port (default random)\n",
      "\tq  - quiet mode\n",
      "\tv  - verbose mode (logs SYN|RST)\n",
      "\tvv - more verbose mode (logs a lot of stuffs)\n",
      "\tp  - port range x-y, x (default 1-1024)\n",
      "\tT  - sending interval utime among packets\n",
      "\ta  - try to uncover ACLed port (only with SYN scan)\n",
      "\t1  - SYN scan (default)\n",
      "\t2  - FIN scan\n",
      "\t9  - SYN|FIN OS probing *sperimental*\n",
      "\tC  - target-net/mask (if omitted default mask is /24)\n",
      "\td  - sensitive mode, logs all unexpected packets from target host\n",
      "\tD  - debug mode, logs all received packets in raw format\n",
      "\tl  - don't skip loopback interface\n",
      "\th  - this help\n",
      NULL};
  int index = 0;
  printf(usagestring, pname);
  while (optstring[index]) {
    printf(optstring[index]);
    index++;
  }
  exit(0);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0xc0,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xeba(%rip),%rax
mov    %rax,-0x10(%rbp)
lea    -0xb0(%rbp),%rdi
lea    0x2c28(%rip),%rsi
mov    $0x98,%edx
call   1040 <memcpy@plt>
movl   $0x0,-0xb4(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
movslq -0xb4(%rbp),%rax
cmpq   $0x0,-0xb0(%rbp,%rax,8)
je     11bb <usage+0x8b>
movslq -0xb4(%rbp),%rax
mov    -0xb0(%rbp,%rax,8),%rdi
ff
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0xb4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xb4(%rbp)
jmp    117b <usage+0x4b>
xor    %edi,%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rax
mov    %rdi,%rsi
lea    0xec5(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xefa(%rip),%rdi
call   1030 <puts@plt>
lea    0xf28(%rip),%rdi
call   1030 <puts@plt>
lea    0xf54(%rip),%rdi
call   1030 <puts@plt>
lea    0xf5a(%rip),%rdi
call   1030 <puts@plt>
lea    0xf71(%rip),%rdi
call   1030 <puts@plt>
lea    0xf76(%rip),%rdi
call   1030 <puts@plt>
lea    0xf8c(%rip),%rdi
call   1030 <puts@plt>
lea    0xfaf(%rip),%rdi
call   1030 <puts@plt>
lea    0xfcc(%rip),%rdi
call   1030 <puts@plt>
lea    0xfeb(%rip),%rdi
call   1030 <puts@plt>
lea    0x1014(%rip),%rdi
call   1030 <puts@plt>
lea    0x1021(%rip),%rdi
call   1030 <puts@plt>
lea    0x1024(%rip),%rdi
call   1030 <puts@plt>
lea    0x103f(%rip),%rdi
call   1030 <puts@plt>
lea    0x106a(%rip),%rdi
call   1030 <puts@plt>
lea    0x10a1(%rip),%rdi
call   1030 <puts@plt>
lea    0x10cf(%rip),%rdi
call   1030 <puts@plt>
lea    0x10e7(%rip),%rdi
call   1030 <puts@plt>
xor    %edi,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [67 x i8] c"usage: %s [-s saddr] <-t daddr | -C netaddr> [I:S:qvr:T:a129dDlh]\0A\00"
@.str.1 = [59 x i8] c"\09I - interface name (default the first not lo interface)\0A\00"
@.str.2 = [57 x i8] c"\09s - source host (default the addr. of used interface)\0A\00"
@.str.3 = [19 x i8] c"\09t - target host\0A\00"
@.str.4 = [36 x i8] c"\09S - source port (default random)\0A\00"
@.str.5 = [18 x i8] c"\09q - quiet mode\0A\00"
@.str.6 = [35 x i8] c"\09v - verbose mode (logs SYN|RST)\0A\00"
@.str.7 = [48 x i8] c"\09vv - more verbose mode (logs a lot of stuffs)\0A\00"
@.str.8 = [42 x i8] c"\09p - port range x-y, x (default 1-1024)\0A\00"
@.str.9 = [44 x i8] c"\09T - sending interval utime among packets\0A\00"
@.str.10 = [54 x i8] c"\09a - try to uncover ACLed port (only with SYN scan)\0A\00"
@.str.11 = [26 x i8] c"\091 - SYN scan (default)\0A\00"
@.str.12 = [16 x i8] c"\092 - FIN scan\0A\00"
@.str.13 = [40 x i8] c"\099 - SYN|FIN OS probing *sperimental*\0A\00"
@.str.14 = [56 x i8] c"\09C - target-net/mask (if omitted default mask is /24)\0A\00"
@.str.15 = [68 x i8] c"\09d - sensitive mode, logs all unexpected packets from target host\0A\00"
@.str.16 = [59 x i8] c"\09D - debug mode, logs all received packets in raw format\0A\00"
@.str.17 = [37 x i8] c"\09l - don't skip loopback interface\0A\00"
@.str.18 = [17 x i8] c"\09h - this help\0A\00"
@__const.usage.optstring = [19 x i8*] [i8* getelementptr inbounds ([59 x i8], [59 x i8]* @.str.1, i32 0, i32 0), i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str.2, i32 0, i32 0), i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.3, i32 0, i32 0), i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.4, i32 0, i32 0), i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.5, i32 0, i32 0), i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.6, i32 0, i32 0), i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.7, i32 0, i32 0), i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.8, i32 0, i32 0), i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.9, i32 0, i32 0), i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str.10, i32 0, i32 0), i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.11, i32 0, i32 0), i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.12, i32 0, i32 0), i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.13, i32 0, i32 0), i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str.14, i32 0, i32 0), i8* getelementptr inbounds ([68 x i8], [68 x i8]* @.str.15, i32 0, i32 0), i8* getelementptr inbounds ([59 x i8], [59 x i8]* @.str.16, i32 0, i32 0), i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.17, i32 0, i32 0), i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.18, i32 0, i32 0), i8* null]
define void @usage(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca [19 x i8*]
%5 = alloca i32
store i8* %0, i8** %2
store i8* getelementptr inbounds ([67 x i8], [67 x i8]* @.str, i64 0, i64 0), i8** %3
%6 = bitcast [19 x i8*]* %4 to i8*
store i32 0, i32* %5
%7 = load i8*, i8** %3
%8 = load i8*, i8** %2
%9 = call i32 (i8*, ...) @printf(i8* %7, i8* %8)
br label %10
10: ; preds = %16, %1
%11 = load i32, i32* %5
%12 = sext i32 %11 to i64
%13 = getelementptr inbounds [19 x i8*], [19 x i8*]* %4, i64 0, i64 %12
%14 = load i8*, i8** %13
%15 = icmp ne i8* %14, null
br i1 %15, label %16, label %24
16: ; preds = %10
%17 = load i32, i32* %5
%18 = sext i32 %17 to i64
%19 = getelementptr inbounds [19 x i8*], [19 x i8*]* %4, i64 0, i64 %18
%20 = load i8*, i8** %19
%21 = call i32 (i8*, ...) @printf(i8* %20)
%22 = load i32, i32* %5
%23 = add nsw i32 %22, 1
store i32 %23, i32* %5
br label %10
24: ; preds = %10
%25 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@.str = [67 x i8] c"usage: %s [-s saddr] <-t daddr | -C netaddr> [I:S:qvr:T:a129dDlh]\0A\00"
@str = [58 x i8] c"\09I - interface name (default the first not lo interface)\00"
@str.19 = [56 x i8] c"\09s - source host (default the addr. of used interface)\00"
@str.20 = [18 x i8] c"\09t - target host\00"
@str.21 = [35 x i8] c"\09S - source port (default random)\00"
@str.22 = [17 x i8] c"\09q - quiet mode\00"
@str.23 = [34 x i8] c"\09v - verbose mode (logs SYN|RST)\00"
@str.24 = [47 x i8] c"\09vv - more verbose mode (logs a lot of stuffs)\00"
@str.25 = [41 x i8] c"\09p - port range x-y, x (default 1-1024)\00"
@str.26 = [43 x i8] c"\09T - sending interval utime among packets\00"
@str.27 = [53 x i8] c"\09a - try to uncover ACLed port (only with SYN scan)\00"
@str.28 = [25 x i8] c"\091 - SYN scan (default)\00"
@str.29 = [15 x i8] c"\092 - FIN scan\00"
@str.30 = [39 x i8] c"\099 - SYN|FIN OS probing *sperimental*\00"
@str.31 = [55 x i8] c"\09C - target-net/mask (if omitted default mask is /24)\00"
@str.32 = [67 x i8] c"\09d - sensitive mode, logs all unexpected packets from target host\00"
@str.33 = [58 x i8] c"\09D - debug mode, logs all received packets in raw format\00"
@str.34 = [36 x i8] c"\09l - don't skip loopback interface\00"
@str.35 = [16 x i8] c"\09h - this help\00"
define void @usage(i8* %0) {
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([67 x i8], [67 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([58 x i8], [58 x i8]* @str, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([56 x i8], [56 x i8]* @str.19, i64 0, i64 0))
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @str.20, i64 0, i64 0))
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @str.21, i64 0, i64 0))
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @str.22, i64 0, i64 0))
%8 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @str.23, i64 0, i64 0))
%9 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([47 x i8], [47 x i8]* @str.24, i64 0, i64 0))
%10 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([41 x i8], [41 x i8]* @str.25, i64 0, i64 0))
%11 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([43 x i8], [43 x i8]* @str.26, i64 0, i64 0))
%12 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([53 x i8], [53 x i8]* @str.27, i64 0, i64 0))
%13 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @str.28, i64 0, i64 0))
%14 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @str.29, i64 0, i64 0))
%15 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([39 x i8], [39 x i8]* @str.30, i64 0, i64 0))
%16 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([55 x i8], [55 x i8]* @str.31, i64 0, i64 0))
%17 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([67 x i8], [67 x i8]* @str.32, i64 0, i64 0))
%18 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([58 x i8], [58 x i8]* @str.33, i64 0, i64 0))
%19 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @str.34, i64 0, i64 0))
%20 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @str.35, i64 0, i64 0))
%21 = tail call i32 @exit(i32 0)
unreachable
}