#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 */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *);
int /*<<< orphan*/ *stderr;
int /*<<< orphan*/ *stdout;
void usage(int exit_val) {
  FILE *out_file;
  out_file = (exit_val > 0 ? stderr : stdout);
  fprintf(
      out_file,
      "Usage: htprox [ -bhv ] [ -p local_port ] [ remote_host remote_port ]\n");
  fprintf(out_file,
          "  -b:  write data from remote host in binary format to stdout\n");
  fprintf(out_file, "  -h:  print this output\n");
  fprintf(out_file, "  -p:  tcp port for data connections\n");
  fprintf(out_file, "  -v:  print version information\n");
  exit(exit_val);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jle    1148 <usage+0x28>
mov    0x2ea4(%rip),%rax
mov    (%rax),%rax
mov    %rax,-0x18(%rbp)
jmp    1156 <usage+0x36>
mov    0x2e89(%rip),%rax
mov    (%rax),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xe97(%rip),%rsi
call   1030 <fprintf@plt>
mov    -0x10(%rbp),%rdi
lea    0xecd(%rip),%rsi
call   1030 <fprintf@plt>
mov    -0x10(%rbp),%rdi
lea    0xefc(%rip),%rsi
call   1030 <fprintf@plt>
mov    -0x10(%rbp),%rdi
lea    0xf06(%rip),%rsi
call   1030 <fprintf@plt>
mov    -0x10(%rbp),%rdi
lea    0xf1c(%rip),%rsi
call   1030 <fprintf@plt>
mov    -0x4(%rbp),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebp
test   %edi,%edi
jle    1132 <usage+0x12>
mov    0x2eb0(%rip),%rax
jmp    1139 <usage+0x19>
mov    0x2e9f(%rip),%rax
mov    (%rax),%rbx
lea    0xebd(%rip),%rdi
mov    $0x45,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1040 <fwrite@plt>
lea    0xeea(%rip),%rdi
mov    $0x3e,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1040 <fwrite@plt>
lea    0xf10(%rip),%rdi
mov    $0x19,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1040 <fwrite@plt>
lea    0xf11(%rip),%rdi
mov    $0x25,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1040 <fwrite@plt>
lea    0xf1e(%rip),%rdi
mov    $0x21,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1040 <fwrite@plt>
mov    %ebp,%edi
call   1030 <exit@plt>

LLVM IR (-O0):
@stderr = global i32* null
@stdout = global i32* null
@.str = [70 x i8] c"Usage: htprox [ -bhv ] [ -p local_port ] [ remote_host remote_port ]\0A\00"
@.str.1 = [63 x i8] c" -b: write data from remote host in binary format to stdout\0A\00"
@.str.2 = [26 x i8] c" -h: print this output\0A\00"
@.str.3 = [38 x i8] c" -p: tcp port for data connections\0A\00"
@.str.4 = [34 x i8] c" -v: print version information\0A\00"
define void @usage(i32 %0) {
%2 = alloca i32
%3 = alloca i32*
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = icmp sgt i32 %4, 0
br i1 %5, label %6, label %8
6: ; preds = %1
%7 = load i32*, i32** @stderr
br label %10
8: ; preds = %1
%9 = load i32*, i32** @stdout
br label %10
10: ; preds = %8, %6
%11 = phi i32* [ %7, %6 ], [ %9, %8 ]
store i32* %11, i32** %3
%12 = load i32*, i32** %3
%13 = call i32 @fprintf(i32* %12, i8* getelementptr inbounds ([70 x i8], [70 x i8]* @.str, i64 0, i64 0))
%14 = load i32*, i32** %3
%15 = call i32 @fprintf(i32* %14, i8* getelementptr inbounds ([63 x i8], [63 x i8]* @.str.1, i64 0, i64 0))
%16 = load i32*, i32** %3
%17 = call i32 @fprintf(i32* %16, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.2, i64 0, i64 0))
%18 = load i32*, i32** %3
%19 = call i32 @fprintf(i32* %18, i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.3, i64 0, i64 0))
%20 = load i32*, i32** %3
%21 = call i32 @fprintf(i32* %20, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.4, i64 0, i64 0))
%22 = load i32, i32* %2
%23 = call i32 @exit(i32 %22)
unreachable
}

LLVM IR (-O2):
@stderr = global i32* null
@stdout = global i32* null
@.str = [70 x i8] c"Usage: htprox [ -bhv ] [ -p local_port ] [ remote_host remote_port ]\0A\00"
@.str.1 = [63 x i8] c" -b: write data from remote host in binary format to stdout\0A\00"
@.str.2 = [26 x i8] c" -h: print this output\0A\00"
@.str.3 = [38 x i8] c" -p: tcp port for data connections\0A\00"
@.str.4 = [34 x i8] c" -v: print version information\0A\00"
define void @usage(i32 %0) {
%2 = icmp sgt i32 %0, 0
%3 = load i32*, i32** @stderr
%4 = load i32*, i32** @stdout
%5 = select i1 %2, i32* %3, i32* %4
%6 = tail call i64 @fwrite(i8* getelementptr inbounds ([70 x i8], [70 x i8]* @.str, i64 0, i64 0), i64 69, i64 1, i32* %5)
%7 = tail call i64 @fwrite(i8* getelementptr inbounds ([63 x i8], [63 x i8]* @.str.1, i64 0, i64 0), i64 62, i64 1, i32* %5)
%8 = tail call i64 @fwrite(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.2, i64 0, i64 0), i64 25, i64 1, i32* %5)
%9 = tail call i64 @fwrite(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.3, i64 0, i64 0), i64 37, i64 1, i32* %5)
%10 = tail call i64 @fwrite(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.4, i64 0, i64 0), i64 33, i64 1, i32* %5)
%11 = tail call i32 @exit(i32 %0)
unreachable
}