#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*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
void show_help() {
  printf("Usage: serialtrigger [OPTION] DEVICE\n");
  printf("\n Actions on signals from DCE:\n");
  printf("  -c, --cts-exec=COMMAND  Execute command on clear to send (CTS)\n");
  printf("  -C, --cts-exit          Exit on clear to send (CTS)\n");
  printf("  -a, --dcd-exec=COMMAND  Execute command on data carrier detect "
         "(DCD)\n");
  printf("  -A, --dcd-exit          Exit on data carrier detect (DCD)\n");
  printf("  -s, --dsr-exec=COMMAND  Execute command on data set ready (DSR)\n");
  printf("  -S, --dsr-exit          Exit on data set ready (DSR)\n");
  printf("  -i, --ri-exec=COMMAND   Execute command on ring indicator (RI)\n");
  printf("  -I, --ri-exit           Exit on ring indicator (RI)\n");
  printf("\n Output signals from DTE:\n");
  printf("  -d, --dtr               Set data terminal ready (DTR)\n");
  printf("  -r, --rts               Set ready to send (RTS)\n");
  printf("  -D, --clear-dtr         Clear data terminal ready (DTR) while "
         "executing\n");
  printf("                          commands\n");
  printf("  -R, --clear-rts         Clear ready to send (RTS) while executing "
         "commands\n");
  printf("\n Control:\n");
  printf("  -o, --once              Exit after executing command once\n");
  printf("  -w, --retest-wait=TIME  Microseconds to wait before retesting\n");
  printf("\n Help and debug:\n");
  printf("  -h, --help              Display this help text\n");
  printf("      --pinout            Show DB-25 and DE-9 pinout\n");
  printf("  -v, --verbose           Show debug output (repeat for more "
         "verbosity)\n");
  printf("  -V, --version           Show version information\n");
  printf("\n");
  printf("All triggered commands are executed before triggered exits.\n");
  printf("\n");
  exit(0);
}


x86 assembly (clang, -O0):
<show_help>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
lea    0xeef(%rip),%rdi
call   1030 <printf@plt>
lea    0xf03(%rip),%rdi
call   1030 <printf@plt>
lea    0xf39(%rip),%rdi
call   1030 <printf@plt>
lea    0xf64(%rip),%rdi
call   1030 <printf@plt>
lea    0xfa0(%rip),%rdi
call   1030 <printf@plt>
lea    0xfd1(%rip),%rdi
call   1030 <printf@plt>
lea    0x1008(%rip),%rdi
call   1030 <printf@plt>
lea    0x1034(%rip),%rdi
call   1030 <printf@plt>
lea    0x106a(%rip),%rdi
call   1030 <printf@plt>
lea    0x1095(%rip),%rdi
call   1030 <printf@plt>
lea    0x10a5(%rip),%rdi
call   1030 <printf@plt>
lea    0x10d2(%rip),%rdi
call   1030 <printf@plt>
lea    0x10f9(%rip),%rdi
call   1030 <printf@plt>
lea    0x1138(%rip),%rdi
call   1030 <printf@plt>
lea    0x1150(%rip),%rdi
call   1030 <printf@plt>
lea    0x1192(%rip),%rdi
call   1030 <printf@plt>
lea    0x1192(%rip),%rdi
call   1030 <printf@plt>
lea    0x11c3(%rip),%rdi
call   1030 <printf@plt>
lea    0x11f8(%rip),%rdi
call   1030 <printf@plt>
lea    0x11ff(%rip),%rdi
call   1030 <printf@plt>
lea    0x1225(%rip),%rdi
call   1030 <printf@plt>
lea    0x124f(%rip),%rdi
call   1030 <printf@plt>
lea    0x128c(%rip),%rdi
call   1030 <printf@plt>
lea    0xeba(%rip),%rdi
call   1030 <printf@plt>
lea    0x12a8(%rip),%rdi
call   1030 <printf@plt>
lea    0xea2(%rip),%rdi
call   1030 <printf@plt>
xor    %edi,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<show_help>:
push   %rax
lea    0xec8(%rip),%rdi
call   1040 <puts@plt>
lea    0xee1(%rip),%rdi
call   1040 <puts@plt>
lea    0xef4(%rip),%rdi
call   1040 <puts@plt>
lea    0xf29(%rip),%rdi
call   1040 <puts@plt>
lea    0xf53(%rip),%rdi
call   1040 <puts@plt>
lea    0xf8e(%rip),%rdi
call   1040 <puts@plt>
lea    0xfbe(%rip),%rdi
call   1040 <puts@plt>
lea    0xff4(%rip),%rdi
call   1040 <puts@plt>
lea    0x101f(%rip),%rdi
call   1040 <puts@plt>
lea    0x1054(%rip),%rdi
call   1040 <puts@plt>
lea    0x107e(%rip),%rdi
call   1040 <puts@plt>
lea    0x108d(%rip),%rdi
call   1040 <puts@plt>
lea    0x10b9(%rip),%rdi
call   1040 <puts@plt>
lea    0x10df(%rip),%rdi
call   1040 <puts@plt>
lea    0x111d(%rip),%rdi
call   1040 <puts@plt>
lea    0x1134(%rip),%rdi
call   1040 <puts@plt>
lea    0x1175(%rip),%rdi
call   1040 <puts@plt>
lea    0x1174(%rip),%rdi
call   1040 <puts@plt>
lea    0x11a4(%rip),%rdi
call   1040 <puts@plt>
lea    0x11d8(%rip),%rdi
call   1040 <puts@plt>
lea    0x11de(%rip),%rdi
call   1040 <puts@plt>
lea    0x1203(%rip),%rdi
call   1040 <puts@plt>
lea    0x122c(%rip),%rdi
call   1040 <puts@plt>
lea    0x1268(%rip),%rdi
call   1040 <puts@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0x1285(%rip),%rdi
call   1040 <puts@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
xor    %edi,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [38 x i8] c"Usage: serialtrigger [OPTION] DEVICE\0A\00"
@.str.1 = [32 x i8] c"\0A Actions on signals from DCE:\0A\00"
@.str.2 = [66 x i8] c" -c, --cts-exec=COMMAND Execute command on clear to send (CTS)\0A\00"
@.str.3 = [55 x i8] c" -C, --cts-exit Exit on clear to send (CTS)\0A\00"
@.str.4 = [72 x i8] c" -a, --dcd-exec=COMMAND Execute command on data carrier detect (DCD)\0A\00"
@.str.5 = [61 x i8] c" -A, --dcd-exit Exit on data carrier detect (DCD)\0A\00"
@.str.6 = [67 x i8] c" -s, --dsr-exec=COMMAND Execute command on data set ready (DSR)\0A\00"
@.str.7 = [56 x i8] c" -S, --dsr-exit Exit on data set ready (DSR)\0A\00"
@.str.8 = [66 x i8] c" -i, --ri-exec=COMMAND Execute command on ring indicator (RI)\0A\00"
@.str.9 = [55 x i8] c" -I, --ri-exit Exit on ring indicator (RI)\0A\00"
@.str.10 = [28 x i8] c"\0A Output signals from DTE:\0A\00"
@.str.11 = [57 x i8] c" -d, --dtr Set data terminal ready (DTR)\0A\00"
@.str.12 = [51 x i8] c" -r, --rts Set ready to send (RTS)\0A\00"
@.str.13 = [75 x i8] c" -D, --clear-dtr Clear data terminal ready (DTR) while executing\0A\00"
@.str.14 = [36 x i8] c" commands\0A\00"
@.str.15 = [78 x i8] c" -R, --clear-rts Clear ready to send (RTS) while executing commands\0A\00"
@.str.16 = [12 x i8] c"\0A Control:\0A\00"
@.str.17 = [61 x i8] c" -o, --once Exit after executing command once\0A\00"
@.str.18 = [65 x i8] c" -w, --retest-wait=TIME Microseconds to wait before retesting\0A\00"
@.str.19 = [19 x i8] c"\0A Help and debug:\0A\00"
@.str.20 = [50 x i8] c" -h, --help Display this help text\0A\00"
@.str.21 = [54 x i8] c" --pinout Show DB-25 and DE-9 pinout\0A\00"
@.str.22 = [73 x i8] c" -v, --verbose Show debug output (repeat for more verbosity)\0A\00"
@.str.23 = [52 x i8] c" -V, --version Show version information\0A\00"
@.str.24 = [2 x i8] c"\0A\00"
@.str.25 = [61 x i8] c"All triggered commands are executed before triggered exits.\0A\00"
define void @show_help() {
%1 = call i32 @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([66 x i8], [66 x i8]* @.str.2, i64 0, i64 0))
%4 = call i32 @printf(i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str.3, i64 0, i64 0))
%5 = call i32 @printf(i8* getelementptr inbounds ([72 x i8], [72 x i8]* @.str.4, i64 0, i64 0))
%6 = call i32 @printf(i8* getelementptr inbounds ([61 x i8], [61 x i8]* @.str.5, i64 0, i64 0))
%7 = call i32 @printf(i8* getelementptr inbounds ([67 x i8], [67 x i8]* @.str.6, i64 0, i64 0))
%8 = call i32 @printf(i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str.7, i64 0, i64 0))
%9 = call i32 @printf(i8* getelementptr inbounds ([66 x i8], [66 x i8]* @.str.8, i64 0, i64 0))
%10 = call i32 @printf(i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str.9, i64 0, i64 0))
%11 = call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.10, i64 0, i64 0))
%12 = call i32 @printf(i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str.11, i64 0, i64 0))
%13 = call i32 @printf(i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str.12, i64 0, i64 0))
%14 = call i32 @printf(i8* getelementptr inbounds ([75 x i8], [75 x i8]* @.str.13, i64 0, i64 0))
%15 = call i32 @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.14, i64 0, i64 0))
%16 = call i32 @printf(i8* getelementptr inbounds ([78 x i8], [78 x i8]* @.str.15, i64 0, i64 0))
%17 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.16, i64 0, i64 0))
%18 = call i32 @printf(i8* getelementptr inbounds ([61 x i8], [61 x i8]* @.str.17, i64 0, i64 0))
%19 = call i32 @printf(i8* getelementptr inbounds ([65 x i8], [65 x i8]* @.str.18, i64 0, i64 0))
%20 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.19, i64 0, i64 0))
%21 = call i32 @printf(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.20, i64 0, i64 0))
%22 = call i32 @printf(i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str.21, i64 0, i64 0))
%23 = call i32 @printf(i8* getelementptr inbounds ([73 x i8], [73 x i8]* @.str.22, i64 0, i64 0))
%24 = call i32 @printf(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.23, i64 0, i64 0))
%25 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.24, i64 0, i64 0))
%26 = call i32 @printf(i8* getelementptr inbounds ([61 x i8], [61 x i8]* @.str.25, i64 0, i64 0))
%27 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.24, i64 0, i64 0))
%28 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@str = [37 x i8] c"Usage: serialtrigger [OPTION] DEVICE\00"
@str.26 = [31 x i8] c"\0A Actions on signals from DCE:\00"
@str.27 = [65 x i8] c" -c, --cts-exec=COMMAND Execute command on clear to send (CTS)\00"
@str.28 = [54 x i8] c" -C, --cts-exit Exit on clear to send (CTS)\00"
@str.29 = [71 x i8] c" -a, --dcd-exec=COMMAND Execute command on data carrier detect (DCD)\00"
@str.30 = [60 x i8] c" -A, --dcd-exit Exit on data carrier detect (DCD)\00"
@str.31 = [66 x i8] c" -s, --dsr-exec=COMMAND Execute command on data set ready (DSR)\00"
@str.32 = [55 x i8] c" -S, --dsr-exit Exit on data set ready (DSR)\00"
@str.33 = [65 x i8] c" -i, --ri-exec=COMMAND Execute command on ring indicator (RI)\00"
@str.34 = [54 x i8] c" -I, --ri-exit Exit on ring indicator (RI)\00"
@str.35 = [27 x i8] c"\0A Output signals from DTE:\00"
@str.36 = [56 x i8] c" -d, --dtr Set data terminal ready (DTR)\00"
@str.37 = [50 x i8] c" -r, --rts Set ready to send (RTS)\00"
@str.38 = [74 x i8] c" -D, --clear-dtr Clear data terminal ready (DTR) while executing\00"
@str.39 = [35 x i8] c" commands\00"
@str.40 = [77 x i8] c" -R, --clear-rts Clear ready to send (RTS) while executing commands\00"
@str.41 = [11 x i8] c"\0A Control:\00"
@str.42 = [60 x i8] c" -o, --once Exit after executing command once\00"
@str.43 = [64 x i8] c" -w, --retest-wait=TIME Microseconds to wait before retesting\00"
@str.44 = [18 x i8] c"\0A Help and debug:\00"
@str.45 = [49 x i8] c" -h, --help Display this help text\00"
@str.46 = [53 x i8] c" --pinout Show DB-25 and DE-9 pinout\00"
@str.47 = [72 x i8] c" -v, --verbose Show debug output (repeat for more verbosity)\00"
@str.48 = [51 x i8] c" -V, --version Show version information\00"
@str.49 = [60 x i8] c"All triggered commands are executed before triggered exits.\00"
define void @show_help() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([37 x i8], [37 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @str.26, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([65 x i8], [65 x i8]* @str.27, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([54 x i8], [54 x i8]* @str.28, i64 0, i64 0))
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([71 x i8], [71 x i8]* @str.29, i64 0, i64 0))
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([60 x i8], [60 x i8]* @str.30, i64 0, i64 0))
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([66 x i8], [66 x i8]* @str.31, i64 0, i64 0))
%8 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([55 x i8], [55 x i8]* @str.32, i64 0, i64 0))
%9 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([65 x i8], [65 x i8]* @str.33, i64 0, i64 0))
%10 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([54 x i8], [54 x i8]* @str.34, i64 0, i64 0))
%11 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @str.35, i64 0, i64 0))
%12 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([56 x i8], [56 x i8]* @str.36, i64 0, i64 0))
%13 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([50 x i8], [50 x i8]* @str.37, i64 0, i64 0))
%14 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([74 x i8], [74 x i8]* @str.38, i64 0, i64 0))
%15 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @str.39, i64 0, i64 0))
%16 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([77 x i8], [77 x i8]* @str.40, i64 0, i64 0))
%17 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @str.41, i64 0, i64 0))
%18 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([60 x i8], [60 x i8]* @str.42, i64 0, i64 0))
%19 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([64 x i8], [64 x i8]* @str.43, i64 0, i64 0))
%20 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @str.44, i64 0, i64 0))
%21 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([49 x i8], [49 x i8]* @str.45, i64 0, i64 0))
%22 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([53 x i8], [53 x i8]* @str.46, i64 0, i64 0))
%23 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([72 x i8], [72 x i8]* @str.47, i64 0, i64 0))
%24 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([51 x i8], [51 x i8]* @str.48, i64 0, i64 0))
%25 = tail call i32 @putchar(i32 10)
%26 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([60 x i8], [60 x i8]* @str.49, i64 0, i64 0))
%27 = tail call i32 @putchar(i32 10)
%28 = tail call i32 @exit(i32 0)
unreachable
}