#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*/ write(int, char *, int);
void help(void) {
  write(1, "Usage: chat [-h] -s|<host> <port>\n", 34);
  write(1, "-h     print this help text\n", 28);
  write(1, "-s     start server mode\n", 25);
  write(1, "<host> start client mode, connect to host\n", 42);
  write(1, "<port> to listen or connect\n", 28);
  write(1, "\n", 1);
  write(1, "In client mode your terminal is set to raw mode\n", 48);
  write(1, "thus every byte you type is immediately sent.\n", 46);
  write(1, "There is no line editing, not even Backspace.\n", 46);
  write(1, "\n", 1);
  write(1, "Quit client with Ctrl-D.\n", 25);
}


x86 assembly (clang, -O0):
<help>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%edi
lea    0xee0(%rip),%rsi
mov    $0x22,%edx
call   1030 <write@plt>
mov    $0x1,%edi
lea    0xeed(%rip),%rsi
mov    $0x1c,%edx
call   1030 <write@plt>
mov    $0x1,%edi
lea    0xef4(%rip),%rsi
mov    $0x19,%edx
call   1030 <write@plt>
mov    $0x1,%edi
lea    0xef8(%rip),%rsi
mov    $0x2a,%edx
call   1030 <write@plt>
mov    $0x1,%edi
lea    0xf0d(%rip),%rsi
mov    $0x1c,%edx
call   1030 <write@plt>
mov    $0x1,%edx
lea    0xfbb(%rip),%rsi
mov    %edx,%edi
call   1030 <write@plt>
mov    $0x1,%edi
lea    0xf01(%rip),%rsi
mov    $0x30,%edx
call   1030 <write@plt>
mov    $0x1,%edi
lea    0xf1c(%rip),%rsi
mov    $0x2e,%edx
call   1030 <write@plt>
mov    $0x1,%edi
lea    0xf35(%rip),%rsi
mov    $0x2e,%edx
call   1030 <write@plt>
mov    $0x1,%edx
lea    0xf66(%rip),%rsi
mov    %edx,%edi
call   1030 <write@plt>
mov    $0x1,%edi
lea    0xf3b(%rip),%rsi
mov    $0x19,%edx
call   1030 <write@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<help>:
push   %rbx
lea    0xee8(%rip),%rsi
mov    $0x1,%edi
mov    $0x22,%edx
call   1030 <write@plt>
lea    0xef5(%rip),%rsi
mov    $0x1,%edi
mov    $0x1c,%edx
call   1030 <write@plt>
lea    0xefc(%rip),%rsi
mov    $0x1,%edi
mov    $0x19,%edx
call   1030 <write@plt>
lea    0xf00(%rip),%rsi
mov    $0x1,%edi
mov    $0x2a,%edx
call   1030 <write@plt>
lea    0xf15(%rip),%rsi
mov    $0x1,%edi
mov    $0x1c,%edx
call   1030 <write@plt>
lea    0xfc3(%rip),%rbx
mov    $0x1,%edi
mov    %rbx,%rsi
mov    $0x1,%edx
call   1030 <write@plt>
lea    0xf03(%rip),%rsi
mov    $0x1,%edi
mov    $0x30,%edx
call   1030 <write@plt>
lea    0xf1e(%rip),%rsi
mov    $0x1,%edi
mov    $0x2e,%edx
call   1030 <write@plt>
lea    0xf37(%rip),%rsi
mov    $0x1,%edi
mov    $0x2e,%edx
call   1030 <write@plt>
mov    $0x1,%edi
mov    %rbx,%rsi
mov    $0x1,%edx
call   1030 <write@plt>
lea    0xf3e(%rip),%rsi
mov    $0x1,%edi
mov    $0x19,%edx
pop    %rbx
jmp    1030 <write@plt>

LLVM IR (-O0):
@.str = [35 x i8] c"Usage: chat [-h] -s|<host> <port>\0A\00"
@.str.1 = [29 x i8] c"-h print this help text\0A\00"
@.str.2 = [26 x i8] c"-s start server mode\0A\00"
@.str.3 = [43 x i8] c"<host> start client mode, connect to host\0A\00"
@.str.4 = [29 x i8] c"<port> to listen or connect\0A\00"
@.str.5 = [2 x i8] c"\0A\00"
@.str.6 = [49 x i8] c"In client mode your terminal is set to raw mode\0A\00"
@.str.7 = [47 x i8] c"thus every byte you type is immediately sent.\0A\00"
@.str.8 = [47 x i8] c"There is no line editing, not even Backspace.\0A\00"
@.str.9 = [26 x i8] c"Quit client with Ctrl-D.\0A\00"
define void @help() {
%1 = call i32 @write(i32 1, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0), i32 34)
%2 = call i32 @write(i32 1, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0), i32 28)
%3 = call i32 @write(i32 1, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.2, i64 0, i64 0), i32 25)
%4 = call i32 @write(i32 1, i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.3, i64 0, i64 0), i32 42)
%5 = call i32 @write(i32 1, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.4, i64 0, i64 0), i32 28)
%6 = call i32 @write(i32 1, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0), i32 1)
%7 = call i32 @write(i32 1, i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str.6, i64 0, i64 0), i32 48)
%8 = call i32 @write(i32 1, i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.7, i64 0, i64 0), i32 46)
%9 = call i32 @write(i32 1, i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.8, i64 0, i64 0), i32 46)
%10 = call i32 @write(i32 1, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0), i32 1)
%11 = call i32 @write(i32 1, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.9, i64 0, i64 0), i32 25)
ret void
}

LLVM IR (-O2):
@.str = [35 x i8] c"Usage: chat [-h] -s|<host> <port>\0A\00"
@.str.1 = [29 x i8] c"-h print this help text\0A\00"
@.str.2 = [26 x i8] c"-s start server mode\0A\00"
@.str.3 = [43 x i8] c"<host> start client mode, connect to host\0A\00"
@.str.4 = [29 x i8] c"<port> to listen or connect\0A\00"
@.str.5 = [2 x i8] c"\0A\00"
@.str.6 = [49 x i8] c"In client mode your terminal is set to raw mode\0A\00"
@.str.7 = [47 x i8] c"thus every byte you type is immediately sent.\0A\00"
@.str.8 = [47 x i8] c"There is no line editing, not even Backspace.\0A\00"
@.str.9 = [26 x i8] c"Quit client with Ctrl-D.\0A\00"
define void @help() {
%1 = tail call i32 @write(i32 1, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0), i32 34)
%2 = tail call i32 @write(i32 1, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0), i32 28)
%3 = tail call i32 @write(i32 1, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.2, i64 0, i64 0), i32 25)
%4 = tail call i32 @write(i32 1, i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.3, i64 0, i64 0), i32 42)
%5 = tail call i32 @write(i32 1, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.4, i64 0, i64 0), i32 28)
%6 = tail call i32 @write(i32 1, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0), i32 1)
%7 = tail call i32 @write(i32 1, i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str.6, i64 0, i64 0), i32 48)
%8 = tail call i32 @write(i32 1, i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.7, i64 0, i64 0), i32 46)
%9 = tail call i32 @write(i32 1, i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.8, i64 0, i64 0), i32 46)
%10 = tail call i32 @write(i32 1, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0), i32 1)
%11 = tail call i32 @write(i32 1, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.9, i64 0, i64 0), i32 25)
ret void
}