#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 *, ...);
void usage(const char *cmd) {
  printf("Usage: %s -[LADIF] <table> <specification>\n", cmd);
  printf("       %s -I <table> <position> <specification>\n", cmd);
  printf("\n");
  printf("Commands: \n");
  printf("  --list     -L    List active policies.\n");
  printf("  --append   -A    Append a policy to the table.\n");
  printf("  --delete   -D    Delete a policy.\n");
  printf("  --insert   -I    Insert a policy at the given position.\n");
  printf("  --flush    -F    Flush the policy table.\n");
  printf("\n");
  printf("Table names:\n");
  printf("  INPUT | OUTPUT | ALL\n");
  printf("\n");
  printf("Specification:\n");
  printf("  --src address[/mask]\n");
  printf("  --dst address[/mask]\n");
  printf("  --proto TCP|UDP|ICMP\n");
  printf("  --sport port\n");
  printf("  --dport port\n");
  printf("  --action PASS|NAT|ENCAP|DECAP|LISP|DROP\n");
  printf("  --link-select rr|wrr|dynamic|random|first\n");
  printf("  --duplicate\n");
  printf("  --multipath\n");
  printf("  --retx           EXPERIMENTAL: May cause excessive traffic.\n");
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xed9(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%rsi
lea    0xef3(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf20(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf08(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf06(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf22(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf46(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf5d(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf8a(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xebe(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf9a(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf9a(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe94(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf96(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf98(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xfa2(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xfac(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xfb6(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xfb8(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xfba(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xfd7(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xff6(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xff7(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xff8(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<usage>:
push   %rbx
mov    %rdi,%rbx
lea    0xec5(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xee0(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1050 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xef6(%rip),%rdi
call   1040 <puts@plt>
lea    0xef5(%rip),%rdi
call   1040 <puts@plt>
lea    0xf12(%rip),%rdi
call   1040 <puts@plt>
lea    0xf37(%rip),%rdi
call   1040 <puts@plt>
lea    0xf4f(%rip),%rdi
call   1040 <puts@plt>
lea    0xf7d(%rip),%rdi
call   1040 <puts@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xf92(%rip),%rdi
call   1040 <puts@plt>
lea    0xf93(%rip),%rdi
call   1040 <puts@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xf94(%rip),%rdi
call   1040 <puts@plt>
lea    0xf97(%rip),%rdi
call   1040 <puts@plt>
lea    0xfa2(%rip),%rdi
call   1040 <puts@plt>
lea    0xfad(%rip),%rdi
call   1040 <puts@plt>
lea    0xfb8(%rip),%rdi
call   1040 <puts@plt>
lea    0xfbb(%rip),%rdi
call   1040 <puts@plt>
lea    0xfbe(%rip),%rdi
call   1040 <puts@plt>
lea    0xfdc(%rip),%rdi
call   1040 <puts@plt>
lea    0xffc(%rip),%rdi
call   1040 <puts@plt>
lea    0xffe(%rip),%rdi
call   1040 <puts@plt>
lea    0x1000(%rip),%rdi
pop    %rbx
jmp    1040 <puts@plt>

LLVM IR (-O0):
@.str = [44 x i8] c"Usage: %s -[LADIF] <table> <specification>\0A\00"
@.str.1 = [49 x i8] c" %s -I <table> <position> <specification>\0A\00"
@.str.2 = [2 x i8] c"\0A\00"
@.str.3 = [12 x i8] c"Commands: \0A\00"
@.str.4 = [42 x i8] c" --list -L List active policies.\0A\00"
@.str.5 = [50 x i8] c" --append -A Append a policy to the table.\0A\00"
@.str.6 = [37 x i8] c" --delete -D Delete a policy.\0A\00"
@.str.7 = [59 x i8] c" --insert -I Insert a policy at the given position.\0A\00"
@.str.8 = [44 x i8] c" --flush -F Flush the policy table.\0A\00"
@.str.9 = [14 x i8] c"Table names:\0A\00"
@.str.10 = [24 x i8] c" INPUT | OUTPUT | ALL\0A\00"
@.str.11 = [16 x i8] c"Specification:\0A\00"
@.str.12 = [24 x i8] c" --src address[/mask]\0A\00"
@.str.13 = [24 x i8] c" --dst address[/mask]\0A\00"
@.str.14 = [24 x i8] c" --proto TCP|UDP|ICMP\0A\00"
@.str.15 = [16 x i8] c" --sport port\0A\00"
@.str.16 = [16 x i8] c" --dport port\0A\00"
@.str.17 = [43 x i8] c" --action PASS|NAT|ENCAP|DECAP|LISP|DROP\0A\00"
@.str.18 = [45 x i8] c" --link-select rr|wrr|dynamic|random|first\0A\00"
@.str.19 = [15 x i8] c" --duplicate\0A\00"
@.str.20 = [15 x i8] c" --multipath\0A\00"
@.str.21 = [63 x i8] c" --retx EXPERIMENTAL: May cause excessive traffic.\0A\00"
define void @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = load i8*, i8** %2
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str.1, i64 0, i64 0), i8* %5)
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.3, i64 0, i64 0))
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.4, i64 0, i64 0))
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.5, i64 0, i64 0))
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.6, i64 0, i64 0))
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([59 x i8], [59 x i8]* @.str.7, i64 0, i64 0))
%13 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.8, i64 0, i64 0))
%14 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%15 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.9, i64 0, i64 0))
%16 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.10, i64 0, i64 0))
%17 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%18 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.11, i64 0, i64 0))
%19 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.12, i64 0, i64 0))
%20 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.13, i64 0, i64 0))
%21 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.14, i64 0, i64 0))
%22 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.15, i64 0, i64 0))
%23 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.16, i64 0, i64 0))
%24 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.17, i64 0, i64 0))
%25 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.18, i64 0, i64 0))
%26 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.19, i64 0, i64 0))
%27 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.20, i64 0, i64 0))
%28 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([63 x i8], [63 x i8]* @.str.21, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [44 x i8] c"Usage: %s -[LADIF] <table> <specification>\0A\00"
@.str.1 = [49 x i8] c" %s -I <table> <position> <specification>\0A\00"
@str = [11 x i8] c"Commands: \00"
@str.22 = [41 x i8] c" --list -L List active policies.\00"
@str.23 = [49 x i8] c" --append -A Append a policy to the table.\00"
@str.24 = [36 x i8] c" --delete -D Delete a policy.\00"
@str.25 = [58 x i8] c" --insert -I Insert a policy at the given position.\00"
@str.26 = [43 x i8] c" --flush -F Flush the policy table.\00"
@str.27 = [13 x i8] c"Table names:\00"
@str.28 = [23 x i8] c" INPUT | OUTPUT | ALL\00"
@str.29 = [15 x i8] c"Specification:\00"
@str.30 = [23 x i8] c" --src address[/mask]\00"
@str.31 = [23 x i8] c" --dst address[/mask]\00"
@str.32 = [23 x i8] c" --proto TCP|UDP|ICMP\00"
@str.33 = [15 x i8] c" --sport port\00"
@str.34 = [15 x i8] c" --dport port\00"
@str.35 = [42 x i8] c" --action PASS|NAT|ENCAP|DECAP|LISP|DROP\00"
@str.36 = [44 x i8] c" --link-select rr|wrr|dynamic|random|first\00"
@str.37 = [14 x i8] c" --duplicate\00"
@str.38 = [14 x i8] c" --multipath\00"
@str.39 = [62 x i8] c" --retx EXPERIMENTAL: May cause excessive traffic.\00"
define void @usage(i8* %0) {
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([44 x i8], [44 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([49 x i8], [49 x i8]* @.str.1, i64 0, i64 0), i8* %0)
%4 = tail call i32 @putchar(i32 10)
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @str, i64 0, i64 0))
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([41 x i8], [41 x i8]* @str.22, i64 0, i64 0))
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([49 x i8], [49 x i8]* @str.23, i64 0, i64 0))
%8 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @str.24, i64 0, i64 0))
%9 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([58 x i8], [58 x i8]* @str.25, i64 0, i64 0))
%10 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([43 x i8], [43 x i8]* @str.26, i64 0, i64 0))
%11 = tail call i32 @putchar(i32 10)
%12 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str.27, i64 0, i64 0))
%13 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @str.28, i64 0, i64 0))
%14 = tail call i32 @putchar(i32 10)
%15 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @str.29, i64 0, i64 0))
%16 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @str.30, i64 0, i64 0))
%17 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @str.31, i64 0, i64 0))
%18 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @str.32, i64 0, i64 0))
%19 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @str.33, i64 0, i64 0))
%20 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @str.34, i64 0, i64 0))
%21 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([42 x i8], [42 x i8]* @str.35, i64 0, i64 0))
%22 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([44 x i8], [44 x i8]* @str.36, i64 0, i64 0))
%23 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @str.37, i64 0, i64 0))
%24 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @str.38, i64 0, i64 0))
%25 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([62 x i8], [62 x i8]* @str.39, i64 0, i64 0))
ret void
}