#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*/ fflush(int /*<<< orphan*/ *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, char const *);
void echo_client_usage(FILE *out) {
  static const char usage_str[] =
      ("Usage:                                                 \n"
       "  echo-client [options] [text] ...                    \n\n"
       "Options:                                                \n"
       "  -a | --address    echo server address/hostname        \n"
       "  -p | --port       echo server port/service            \n"
       "  -d | --debug      run the program in debug mode      \n"
       "  -v | --version    show the program version and exit   \n"
       "  -h | --help       show this help and exit           \n\n"
       "Examples:                                               \n"
       "  echo-client \"this text\" and this other text!        \n"
       "  echo-client -d -a localhost -p 7777 \"this text\"   \n\n");
  fprintf(out, "%s", usage_str);
  fflush(out);
  return;
}


x86 assembly (clang, -O0):
<echo_client_usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0x1134(%rip),%rsi
lea    0xec2(%rip),%rdx
call   1030 <fprintf@plt>
mov    -0x8(%rbp),%rdi
call   1040 <fflush@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<echo_client_usage>:
push   %rbx
mov    %rdi,%rbx
lea    0xed5(%rip),%rdi
mov    $0x26a,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1040 <fwrite@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <fflush@plt>

LLVM IR (-O0):
@echo_client_usage.usage_str = internal constant [619 x i8] c"Usage: \0A echo-client [options] [text] ... \0A\0AOptions: \0A -a | --address echo server address/hostname \0A -p | --port echo server port/service \0A -d | --debug run the program in debug mode \0A -v | --version show the program version and exit \0A -h | --help show this help and exit \0A\0AExamples: \0A echo-client \22this text\22 and this other text! \0A echo-client -d -a localhost -p 7777 \22this text\22 \0A\0A\00"
@.str = [3 x i8] c"%s\00"
define void @echo_client_usage(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = call i32 @fprintf(i32* %3, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([619 x i8], [619 x i8]* @echo_client_usage.usage_str, i64 0, i64 0))
%5 = load i32*, i32** %2
%6 = call i32 @fflush(i32* %5)
ret void
}

LLVM IR (-O2):
@echo_client_usage.usage_str = internal constant [619 x i8] c"Usage: \0A echo-client [options] [text] ... \0A\0AOptions: \0A -a | --address echo server address/hostname \0A -p | --port echo server port/service \0A -d | --debug run the program in debug mode \0A -v | --version show the program version and exit \0A -h | --help show this help and exit \0A\0AExamples: \0A echo-client \22this text\22 and this other text! \0A echo-client -d -a localhost -p 7777 \22this text\22 \0A\0A\00"
define void @echo_client_usage(i32* nocapture %0) {
%2 = tail call i64 @fwrite(i8* getelementptr inbounds ([619 x i8], [619 x i8]* @echo_client_usage.usage_str, i64 0, i64 0), i64 618, i64 1, i32* %0)
%3 = tail call i32 @fflush(i32* %0)
ret void
}