#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*/ commands();
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *);
void usage(int help) {
  if (help == 1)
    printf("FTPCLIENT HELP\n");
  printf("\nUsage:\n-with parameters:\t./ftpclient -p <port> -h <host>\n");
  printf("-without parameters:\t./ftpclient\n\n! If using without parameters, "
         "use: open <addr>:<port> when connecting !\n\n");
  printf("For help with program commands, use \"help\" command in program or "
         "./ftpclient --help\n\n");
  if (help == 1)
    commands();
  exit(1);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x1,-0x4(%rbp)
jne    1151 <usage+0x21>
lea    0xeb4(%rip),%rdi
call   1040 <printf@plt>
lea    0xeb8(%rip),%rdi
call   1040 <printf@plt>
lea    0xee7(%rip),%rdi
call   1040 <printf@plt>
lea    0xf48(%rip),%rdi
call   1040 <printf@plt>
cmpl   $0x1,-0x4(%rbp)
jne    1186 <usage+0x56>
mov    $0x0,%al
call   1030 <commands@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rax
cmp    $0x1,%edi
jne    1177 <usage+0x47>
lea    0xfbe(%rip),%rdi
call   1030 <puts@plt>
lea    0xeb7(%rip),%rdi
call   1030 <puts@plt>
lea    0xee5(%rip),%rdi
call   1030 <puts@plt>
lea    0xf45(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
call   1040 <commands@plt>
mov    $0x1,%edi
call   1050 <exit@plt>
lea    0xe82(%rip),%rdi
call   1030 <puts@plt>
lea    0xeb0(%rip),%rdi
call   1030 <puts@plt>
lea    0xf10(%rip),%rdi
call   1030 <puts@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [16 x i8] c"FTPCLIENT HELP\0A\00"
@.str.1 = [59 x i8] c"\0AUsage:\0A-with parameters:\09./ftpclient -p <port> -h <host>\0A\00"
@.str.2 = [109 x i8] c"-without parameters:\09./ftpclient\0A\0A! If using without parameters, use: open <addr>:<port> when connecting !\0A\0A\00"
@.str.3 = [86 x i8] c"For help with program commands, use \22help\22 command in program or ./ftpclient --help\0A\0A\00"
define void @usage(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp eq i32 %3, 1
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
br label %7
7: ; preds = %5, %1
%8 = call i32 @printf(i8* getelementptr inbounds ([59 x i8], [59 x i8]* @.str.1, i64 0, i64 0))
%9 = call i32 @printf(i8* getelementptr inbounds ([109 x i8], [109 x i8]* @.str.2, i64 0, i64 0))
%10 = call i32 @printf(i8* getelementptr inbounds ([86 x i8], [86 x i8]* @.str.3, i64 0, i64 0))
%11 = load i32, i32* %2
%12 = icmp eq i32 %11, 1
br i1 %12, label %13, label %15
13: ; preds = %7
%14 = call i32 (...) @commands()
br label %15
15: ; preds = %13, %7
%16 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@str = [58 x i8] c"\0AUsage:\0A-with parameters:\09./ftpclient -p <port> -h <host>\00"
@str.4 = [108 x i8] c"-without parameters:\09./ftpclient\0A\0A! If using without parameters, use: open <addr>:<port> when connecting !\0A\00"
@str.5 = [85 x i8] c"For help with program commands, use \22help\22 command in program or ./ftpclient --help\0A\00"
@str.6 = [15 x i8] c"FTPCLIENT HELP\00"
define void @usage(i32 %0) {
%2 = icmp eq i32 %0, 1
br i1 %2, label %3, label %9
3: ; preds = %1
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @str.6, i64 0, i64 0))
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([58 x i8], [58 x i8]* @str, i64 0, i64 0))
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([108 x i8], [108 x i8]* @str.4, i64 0, i64 0))
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([85 x i8], [85 x i8]* @str.5, i64 0, i64 0))
%8 = tail call i32 (...) @commands()
br label %13
9: ; preds = %1
%10 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([58 x i8], [58 x i8]* @str, i64 0, i64 0))
%11 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([108 x i8], [108 x i8]* @str.4, i64 0, i64 0))
%12 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([85 x i8], [85 x i8]* @str.5, i64 0, i64 0))
br label %13
13: ; preds = %9, %3
%14 = tail call i32 @exit(i32 1)
unreachable
}