#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*/ printf(char *);
int /*<<< orphan*/ synopsis(char *);
int /*<<< orphan*/ version(char *);
void usage(char *progname) {
  version(progname);
  printf("Usage:\n");
  synopsis(progname);
  printf("-r machinename		The remote machine name to connect to. "
         " If not\n");
  printf("			specified, then this is the server side.\n");
  printf("-p netport		Specifiy IP port# (default 23000)\n");
  printf("-s \"stty params\"	If serial port, specify stty parameters, see "
         "man stty\n");
  printf("-m max-connections	Maximum number of simultaneous client "
         "connections to allow\n");
  printf("-d			Run as a daemon program\n");
  printf("-e			Prints usage examples and exits.\n");
  printf("-q			Quiet, no chatty messages that flood the "
         "console\n");
  printf("-x debuglevel		Set debug level, 0 is default, 1,2 give more "
         "info\n");
  printf("-l linkname		If the device name is a pseudo-tty, create a "
         "link to the slave\n");
  printf("-t			print time stamps in hexview.\n");
  printf("-? or -u       		Prints Usage (this) and exits.\n");
  printf("-v          		Prints Version and exits\n");
  printf("-w          		Only write to the device, no reading\n");
  printf("-h          		Prints a Hexdump of the communication (in/out) "
         "to the console\n");
  printf("-H          		Prints a Hexdump of the communication (in/out) "
         "to syslog\n");
  printf("device			I/O device, either serial port or "
         "pseudo-tty master\n");
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1050 <version@plt>
lea    0xeb4(%rip),%rdi
call   1040 <printf@plt>
mov    -0x8(%rbp),%rdi
call   1030 <synopsis@plt>
lea    0xea7(%rip),%rdi
call   1040 <printf@plt>
lea    0xedb(%rip),%rdi
call   1040 <printf@plt>
lea    0xefc(%rip),%rdi
call   1040 <printf@plt>
lea    0xf1f(%rip),%rdi
call   1040 <printf@plt>
lea    0xf5b(%rip),%rdi
call   1040 <printf@plt>
lea    0xf9e(%rip),%rdi
call   1040 <printf@plt>
lea    0xfb0(%rip),%rdi
call   1040 <printf@plt>
lea    0xfcb(%rip),%rdi
call   1040 <printf@plt>
lea    0xff6(%rip),%rdi
call   1040 <printf@plt>
lea    0x102c(%rip),%rdi
call   1040 <printf@plt>
lea    0x106d(%rip),%rdi
call   1040 <printf@plt>
lea    0x1085(%rip),%rdi
call   1040 <printf@plt>
lea    0x10aa(%rip),%rdi
call   1040 <printf@plt>
lea    0x10c6(%rip),%rdi
call   1040 <printf@plt>
lea    0x10ee(%rip),%rdi
call   1040 <printf@plt>
lea    0x112f(%rip),%rdi
call   1040 <printf@plt>
lea    0x116b(%rip),%rdi
call   1040 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<usage>:
push   %rbx
mov    %rdi,%rbx
call   1050 <version@plt>
lea    0xec0(%rip),%rdi
call   1030 <puts@plt>
mov    %rbx,%rdi
call   1040 <synopsis@plt>
lea    0xeb3(%rip),%rdi
call   1030 <puts@plt>
lea    0xee6(%rip),%rdi
call   1030 <puts@plt>
lea    0xf06(%rip),%rdi
call   1030 <puts@plt>
lea    0xf28(%rip),%rdi
call   1030 <puts@plt>
lea    0xf63(%rip),%rdi
call   1030 <puts@plt>
lea    0xfa5(%rip),%rdi
call   1030 <puts@plt>
lea    0xfb6(%rip),%rdi
call   1030 <puts@plt>
lea    0xfd0(%rip),%rdi
call   1030 <puts@plt>
lea    0xffa(%rip),%rdi
call   1030 <puts@plt>
lea    0x102f(%rip),%rdi
call   1030 <puts@plt>
lea    0x106f(%rip),%rdi
call   1030 <puts@plt>
lea    0x1086(%rip),%rdi
call   1030 <puts@plt>
lea    0x10aa(%rip),%rdi
call   1030 <puts@plt>
lea    0x10c5(%rip),%rdi
call   1030 <puts@plt>
lea    0x10ec(%rip),%rdi
call   1030 <puts@plt>
lea    0x112c(%rip),%rdi
call   1030 <puts@plt>
lea    0x1167(%rip),%rdi
pop    %rbx
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [8 x i8] c"Usage:\0A\00"
@.str.1 = [64 x i8] c"-r machinename\09\09The remote machine name to connect to. If not\0A\00"
@.str.2 = [45 x i8] c"\09\09\09specified, then this is the server side.\0A\00"
@.str.3 = [47 x i8] c"-p netport\09\09Specifiy IP port# (default 23000)\0A\00"
@.str.4 = [72 x i8] c"-s \22stty params\22\09If serial port, specify stty parameters, see man stty\0A\00"
@.str.5 = [79 x i8] c"-m max-connections\09Maximum number of simultaneous client connections to allow\0A\00"
@.str.6 = [30 x i8] c"-d\09\09\09Run as a daemon program\0A\00"
@.str.7 = [39 x i8] c"-e\09\09\09Prints usage examples and exits.\0A\00"
@.str.8 = [55 x i8] c"-q\09\09\09Quiet, no chatty messages that flood the console\0A\00"
@.str.9 = [66 x i8] c"-x debuglevel\09\09Set debug level, 0 is default, 1,2 give more info\0A\00"
@.str.10 = [77 x i8] c"-l linkname\09\09If the device name is a pseudo-tty, create a link to the slave\0A\00"
@.str.11 = [36 x i8] c"-t\09\09\09print time stamps in hexview.\0A\00"
@.str.12 = [49 x i8] c"-? or -u \09\09Prints Usage (this) and exits.\0A\00"
@.str.13 = [40 x i8] c"-v \09\09Prints Version and exits\0A\00"
@.str.14 = [52 x i8] c"-w \09\09Only write to the device, no reading\0A\00"
@.str.15 = [77 x i8] c"-h \09\09Prints a Hexdump of the communication (in/out) to the console\0A\00"
@.str.16 = [72 x i8] c"-H \09\09Prints a Hexdump of the communication (in/out) to syslog\0A\00"
@.str.17 = [62 x i8] c"device\09\09\09I/O device, either serial port or pseudo-tty master\0A\00"
define void @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @version(i8* %3)
%5 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%6 = load i8*, i8** %2
%7 = call i32 @synopsis(i8* %6)
%8 = call i32 @printf(i8* getelementptr inbounds ([64 x i8], [64 x i8]* @.str.1, i64 0, i64 0))
%9 = call i32 @printf(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.2, i64 0, i64 0))
%10 = call i32 @printf(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.3, i64 0, i64 0))
%11 = call i32 @printf(i8* getelementptr inbounds ([72 x i8], [72 x i8]* @.str.4, i64 0, i64 0))
%12 = call i32 @printf(i8* getelementptr inbounds ([79 x i8], [79 x i8]* @.str.5, i64 0, i64 0))
%13 = call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.6, i64 0, i64 0))
%14 = call i32 @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.7, i64 0, i64 0))
%15 = call i32 @printf(i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str.8, i64 0, i64 0))
%16 = call i32 @printf(i8* getelementptr inbounds ([66 x i8], [66 x i8]* @.str.9, i64 0, i64 0))
%17 = call i32 @printf(i8* getelementptr inbounds ([77 x i8], [77 x i8]* @.str.10, i64 0, i64 0))
%18 = call i32 @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.11, i64 0, i64 0))
%19 = call i32 @printf(i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str.12, i64 0, i64 0))
%20 = call i32 @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.13, i64 0, i64 0))
%21 = call i32 @printf(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.14, i64 0, i64 0))
%22 = call i32 @printf(i8* getelementptr inbounds ([77 x i8], [77 x i8]* @.str.15, i64 0, i64 0))
%23 = call i32 @printf(i8* getelementptr inbounds ([72 x i8], [72 x i8]* @.str.16, i64 0, i64 0))
%24 = call i32 @printf(i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str.17, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [7 x i8] c"Usage:\00"
@str.18 = [63 x i8] c"-r machinename\09\09The remote machine name to connect to. If not\00"
@str.19 = [44 x i8] c"\09\09\09specified, then this is the server side.\00"
@str.20 = [46 x i8] c"-p netport\09\09Specifiy IP port# (default 23000)\00"
@str.21 = [71 x i8] c"-s \22stty params\22\09If serial port, specify stty parameters, see man stty\00"
@str.22 = [78 x i8] c"-m max-connections\09Maximum number of simultaneous client connections to allow\00"
@str.23 = [29 x i8] c"-d\09\09\09Run as a daemon program\00"
@str.24 = [38 x i8] c"-e\09\09\09Prints usage examples and exits.\00"
@str.25 = [54 x i8] c"-q\09\09\09Quiet, no chatty messages that flood the console\00"
@str.26 = [65 x i8] c"-x debuglevel\09\09Set debug level, 0 is default, 1,2 give more info\00"
@str.27 = [76 x i8] c"-l linkname\09\09If the device name is a pseudo-tty, create a link to the slave\00"
@str.28 = [35 x i8] c"-t\09\09\09print time stamps in hexview.\00"
@str.29 = [48 x i8] c"-? or -u \09\09Prints Usage (this) and exits.\00"
@str.30 = [39 x i8] c"-v \09\09Prints Version and exits\00"
@str.31 = [51 x i8] c"-w \09\09Only write to the device, no reading\00"
@str.32 = [76 x i8] c"-h \09\09Prints a Hexdump of the communication (in/out) to the console\00"
@str.33 = [71 x i8] c"-H \09\09Prints a Hexdump of the communication (in/out) to syslog\00"
@str.34 = [61 x i8] c"device\09\09\09I/O device, either serial port or pseudo-tty master\00"
define void @usage(i8* %0) {
%2 = tail call i32 @version(i8* %0)
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @str, i64 0, i64 0))
%4 = tail call i32 @synopsis(i8* %0)
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([63 x i8], [63 x i8]* @str.18, i64 0, i64 0))
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([44 x i8], [44 x i8]* @str.19, i64 0, i64 0))
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([46 x i8], [46 x i8]* @str.20, i64 0, i64 0))
%8 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([71 x i8], [71 x i8]* @str.21, i64 0, i64 0))
%9 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([78 x i8], [78 x i8]* @str.22, i64 0, i64 0))
%10 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @str.23, i64 0, i64 0))
%11 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([38 x i8], [38 x i8]* @str.24, i64 0, i64 0))
%12 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([54 x i8], [54 x i8]* @str.25, i64 0, i64 0))
%13 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([65 x i8], [65 x i8]* @str.26, i64 0, i64 0))
%14 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([76 x i8], [76 x i8]* @str.27, i64 0, i64 0))
%15 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @str.28, i64 0, i64 0))
%16 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([48 x i8], [48 x i8]* @str.29, i64 0, i64 0))
%17 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([39 x i8], [39 x i8]* @str.30, i64 0, i64 0))
%18 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([51 x i8], [51 x i8]* @str.31, i64 0, i64 0))
%19 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([76 x i8], [76 x i8]* @str.32, i64 0, i64 0))
%20 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([71 x i8], [71 x i8]* @str.33, i64 0, i64 0))
%21 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([61 x i8], [61 x i8]* @str.34, i64 0, i64 0))
ret void
}