#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*/ fprintf(int /*<<< orphan*/, char const *, char const *);
int /*<<< orphan*/ stderr;
void usage(const char *name) {
  const char *msg =
      "Usage: %s [options] server:port\n"
      "\n"
      "  -l, --listen=ADDRESS       listen address, default: 0.0.0.0:3389\n"
      "  -e, --encryption=METHOD    preferred RDP encryption method, default: "
      "none,\n"
      "                             possible values are: "
      "none/40bit/56bit/128bit\n"
      "  -p, --password=PASSWORD    VNC server password, for VNC "
      "authentication\n"
      "  -s, --shared               connect to VNC server use share mode, "
      "share\n"
      "                             desktop with other clients (default)\n"
      "  -n, --noshared             connect to VNC server use exclusive mode "
      "by\n"
      "                             disconnect all other client\n"
      "  -v, --viewonly             disable transfer of mouse and keyboard "
      "events\n"
      "                             from the client to the server\n"
      "  -h, --help                 print this help message and exit\n"
      "\n";
  fprintf(stderr, msg, name);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xedd(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    0x2eb2(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rsi
mov    -0x8(%rbp),%rdx
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<usage>:
mov    %rdi,%rdx
mov    0x2ec6(%rip),%rax
mov    (%rax),%edi
lea    0xedd(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@.str = [791 x i8] c"Usage: %s [options] server:port\0A\0A -l, --listen=ADDRESS listen address, default: 0.0.0.0:3389\0A -e, --encryption=METHOD preferred RDP encryption method, default: none,\0A possible values are: none/40bit/56bit/128bit\0A -p, --password=PASSWORD VNC server password, for VNC authentication\0A -s, --shared connect to VNC server use share mode, share\0A desktop with other clients (default)\0A -n, --noshared connect to VNC server use exclusive mode by\0A disconnect all other client\0A -v, --viewonly disable transfer of mouse and keyboard events\0A from the client to the server\0A -h, --help print this help message and exit\0A\0A\00"
@stderr = global i32 0
define void @usage(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
store i8* getelementptr inbounds ([791 x i8], [791 x i8]* @.str, i64 0, i64 0), i8** %3
%4 = load i32, i32* @stderr
%5 = load i8*, i8** %3
%6 = load i8*, i8** %2
%7 = call i32 @fprintf(i32 %4, i8* %5, i8* %6)
ret void
}

LLVM IR (-O2):
@.str = [791 x i8] c"Usage: %s [options] server:port\0A\0A -l, --listen=ADDRESS listen address, default: 0.0.0.0:3389\0A -e, --encryption=METHOD preferred RDP encryption method, default: none,\0A possible values are: none/40bit/56bit/128bit\0A -p, --password=PASSWORD VNC server password, for VNC authentication\0A -s, --shared connect to VNC server use share mode, share\0A desktop with other clients (default)\0A -n, --noshared connect to VNC server use exclusive mode by\0A disconnect all other client\0A -v, --viewonly disable transfer of mouse and keyboard events\0A from the client to the server\0A -h, --help print this help message and exit\0A\0A\00"
@stderr = global i32 0
define void @usage(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([791 x i8], [791 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}