#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 help(char *app) {
  printf("Usage:\n%s server [-h] [-d] [-P port] [-g] | [-p] [file-name] [-w "
         "size] [-l length] [-o] [-n]\n",
         app);
  printf("Options:\n-h (help; this message)\n-d (Debug mode)\n-P port(Port "
         "number default is 69)\n-g (get a file from the server)\n-p (send a "
         "file to the server)\n");
  printf("-w size (set window size, default is 1)\n-l len (set max packet "
         "length, default is 512 bytes)\n");
  printf(
      "-o for octet file transfer (default).\n-n for netascii file transfer\n");
}


x86 assembly (clang, -O0):
<help>:
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>
lea    0xf29(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xfaf(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xfff(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<help>:
push   %rax
mov    %rdi,%rsi
lea    0xed5(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xf25(%rip),%rdi
call   1030 <puts@plt>
lea    0xfac(%rip),%rdi
call   1030 <puts@plt>
lea    0xffd(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [94 x i8] c"Usage:\0A%s server [-h] [-d] [-P port] [-g] | [-p] [file-name] [-w size] [-l length] [-o] [-n]\0A\00"
@.str.1 = [148 x i8] c"Options:\0A-h (help; this message)\0A-d (Debug mode)\0A-P port(Port number default is 69)\0A-g (get a file from the server)\0A-p (send a file to the server)\0A\00"
@.str.2 = [94 x i8] c"-w size (set window size, default is 1)\0A-l len (set max packet length, default is 512 bytes)\0A\00"
@.str.3 = [69 x i8] c"-o for octet file transfer (default).\0A-n for netascii file transfer\0A\00"
define void @help(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([94 x i8], [94 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([148 x i8], [148 x i8]* @.str.1, i64 0, i64 0))
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([94 x i8], [94 x i8]* @.str.2, i64 0, i64 0))
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([69 x i8], [69 x i8]* @.str.3, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [94 x i8] c"Usage:\0A%s server [-h] [-d] [-P port] [-g] | [-p] [file-name] [-w size] [-l length] [-o] [-n]\0A\00"
@str = [147 x i8] c"Options:\0A-h (help; this message)\0A-d (Debug mode)\0A-P port(Port number default is 69)\0A-g (get a file from the server)\0A-p (send a file to the server)\00"
@str.4 = [93 x i8] c"-w size (set window size, default is 1)\0A-l len (set max packet length, default is 512 bytes)\00"
@str.5 = [68 x i8] c"-o for octet file transfer (default).\0A-n for netascii file transfer\00"
define void @help(i8* %0) {
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([94 x i8], [94 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([147 x i8], [147 x i8]* @str, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([93 x i8], [93 x i8]* @str.4, i64 0, i64 0))
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([68 x i8], [68 x i8]* @str.5, i64 0, i64 0))
ret void
}