#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 show_usage(int argc, char **argv) {
  printf("Usage: %s [options]\n", argv[0]);
  printf("Options:\n");
  printf("  --help\t Display this message and exit\n");
  printf("  -udp, --use-udp\t Use UDP instead of TCP\n");
  printf("  -f, --file [file]\t Read commands from a file instead of being "
         "interactive\n");
  printf("  -l, --log [file]\t Log to [file]\n");
  printf("  -p, --port [port]\t Connect to [port]\n");
  printf("  -h, --host [host]\t Connect to [host]\n");
  printf("  -v, --verbose\t Be verbose about what is going on\n");
  printf("\n");
  printf("Author(s):\n");
  printf("  Emilio Cobos Álvarez (<emiliocobos@usal.es>)\n");
}


x86 assembly (clang, -O0):
<show_usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rsi
lea    0xed3(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xeda(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xed6(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xef1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf0e(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf4d(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf62(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf7c(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf96(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xff7(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xfae(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xfac(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<show_usage>:
push   %rax
mov    (%rsi),%rsi
lea    0xec5(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xecc(%rip),%rdi
call   1040 <puts@plt>
lea    0xec9(%rip),%rdi
call   1040 <puts@plt>
lea    0xee5(%rip),%rdi
call   1040 <puts@plt>
lea    0xf03(%rip),%rdi
call   1040 <puts@plt>
lea    0xf43(%rip),%rdi
call   1040 <puts@plt>
lea    0xf59(%rip),%rdi
call   1040 <puts@plt>
lea    0xf74(%rip),%rdi
call   1040 <puts@plt>
lea    0xf8f(%rip),%rdi
call   1040 <puts@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xfac(%rip),%rdi
call   1040 <puts@plt>
lea    0xfab(%rip),%rdi
pop    %rax
jmp    1040 <puts@plt>

LLVM IR (-O0):
@.str = [21 x i8] c"Usage: %s [options]\0A\00"
@.str.1 = [10 x i8] c"Options:\0A\00"
@.str.2 = [41 x i8] c" --help\09 Display this message and exit\0A\00"
@.str.3 = [43 x i8] c" -udp, --use-udp\09 Use UDP instead of TCP\0A\00"
@.str.4 = [77 x i8] c" -f, --file [file]\09 Read commands from a file instead of being interactive\0A\00"
@.str.5 = [35 x i8] c" -l, --log [file]\09 Log to [file]\0A\00"
@.str.6 = [40 x i8] c" -p, --port [port]\09 Connect to [port]\0A\00"
@.str.7 = [40 x i8] c" -h, --host [host]\09 Connect to [host]\0A\00"
@.str.8 = [52 x i8] c" -v, --verbose\09 Be verbose about what is going on\0A\00"
@.str.9 = [2 x i8] c"\0A\00"
@.str.10 = [12 x i8] c"Author(s):\0A\00"
@.str.11 = [49 x i8] c" Emilio Cobos \C3\81lvarez (<emiliocobos@usal.es>)\0A\00"
define void @show_usage(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
store i32 %0, i32* %3
store i8** %1, i8*** %4
%5 = load i8**, i8*** %4
%6 = getelementptr inbounds i8*, i8** %5, i64 0
%7 = load i8*, i8** %6
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i8* %7)
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0))
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.2, i64 0, i64 0))
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.3, i64 0, i64 0))
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([77 x i8], [77 x i8]* @.str.4, i64 0, i64 0))
%13 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.5, i64 0, i64 0))
%14 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.6, i64 0, i64 0))
%15 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.7, i64 0, i64 0))
%16 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.8, i64 0, i64 0))
%17 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.9, i64 0, i64 0))
%18 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.10, i64 0, i64 0))
%19 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str.11, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [21 x i8] c"Usage: %s [options]\0A\00"
@str = [9 x i8] c"Options:\00"
@str.12 = [40 x i8] c" --help\09 Display this message and exit\00"
@str.13 = [42 x i8] c" -udp, --use-udp\09 Use UDP instead of TCP\00"
@str.14 = [76 x i8] c" -f, --file [file]\09 Read commands from a file instead of being interactive\00"
@str.15 = [34 x i8] c" -l, --log [file]\09 Log to [file]\00"
@str.16 = [39 x i8] c" -p, --port [port]\09 Connect to [port]\00"
@str.17 = [39 x i8] c" -h, --host [host]\09 Connect to [host]\00"
@str.18 = [51 x i8] c" -v, --verbose\09 Be verbose about what is going on\00"
@str.19 = [11 x i8] c"Author(s):\00"
@str.20 = [48 x i8] c" Emilio Cobos \C3\81lvarez (<emiliocobos@usal.es>)\00"
define void @show_usage(i32 %0, i8** nocapture %1) {
%3 = load i8*, i8** %1
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @str, i64 0, i64 0))
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([40 x i8], [40 x i8]* @str.12, i64 0, i64 0))
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([42 x i8], [42 x i8]* @str.13, i64 0, i64 0))
%8 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([76 x i8], [76 x i8]* @str.14, i64 0, i64 0))
%9 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @str.15, i64 0, i64 0))
%10 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([39 x i8], [39 x i8]* @str.16, i64 0, i64 0))
%11 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([39 x i8], [39 x i8]* @str.17, i64 0, i64 0))
%12 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([51 x i8], [51 x i8]* @str.18, i64 0, i64 0))
%13 = tail call i32 @putchar(i32 10)
%14 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @str.19, i64 0, i64 0))
%15 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([48 x i8], [48 x i8]* @str.20, i64 0, i64 0))
ret void
}