#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 *);
void display_help(void) {
  printf("Usage: linux-serial-test [OPTION]\n"
         "\n"
         "  -h, --help\n"
         "  -b, --baud         Baud rate, 115200, etc (115200 is default)\n"
         "  -p, --port         Port (/dev/ttyS0, etc) (must be specified)\n"
         "  -d, --divisor      UART Baud rate divisor (can be used to set "
         "custom baud rates)\n"
         "  -R, --rx_dump      Dump Rx data (ascii, raw)\n"
         "  -T, --detailed_tx  Detailed Tx data\n"
         "  -s, --stats        Dump serial port stats every 5s\n"
         "  -S, --stop-on-err  Stop program if we encounter an error\n"
         "  -y, --single-byte  Send specified byte to the serial port\n"
         "  -z, --second-byte  Send another specified byte to the serial port\n"
         "  -c, --rts-cts      Enable RTS/CTS flow control\n"
         "  -B, --2-stop-bit   Use two stop bits per character\n"
         "  -P, --parity       Use parity bit (odd, even, mark, space)\n"
         "  -k, --loopback     Use internal hardware loop back\n"
         "  -K, --write-follow Write follows the read count (can be used for "
         "multi-serial loopback)\n"
         "  -e, --dump-err     Display errors\n"
         "  -r, --no-rx        Don't receive data (can be used to test flow "
         "control)\n"
         "                     when serial driver buffer is full\n"
         "  -t, --no-tx        Don't transmit data\n"
         "  -l, --rx-delay     Delay between reading data (ms) (can be used to "
         "test flow control)\n"
         "  -a, --tx-delay     Delay between writing data (ms)\n"
         "  -w, --tx-bytes     Number of bytes for each write (default is to "
         "repeatedly write 1024 bytes\n"
         "                     until no more are accepted)\n"
         "  -q, --rs485        Enable RS485 direction control on port, and set "
         "delay from when TX is\n"
         "                     finished and RS485 driver enable is "
         "de-asserted. Delay is specified in\n"
         "                     bit times. To optionally specify a delay from "
         "when the driver is enabled\n"
         "                     to start of TX use 'after_delay.before_delay' "
         "(-q 1.1)\n"
         "  -Q, --rs485_rts    Deassert RTS on send, assert after send. "
         "Omitting -Q inverts this logic.\n"
         "  -o, --tx-time      Number of seconds to transmit for (defaults to "
         "0, meaning no limit)\n"
         "  -i, --rx-time      Number of seconds to receive for (defaults to "
         "0, meaning no limit)\n"
         "  -A, --ascii        Output bytes range from 32 to 126 (default is 0 "
         "to 255)\n"
         "\n");
}


x86 assembly (clang, -O0):
<display_help>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
call   1030 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<display_help>:
lea    0xee9(%rip),%rdi
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [2085 x i8] c"Usage: linux-serial-test [OPTION]\0A\0A -h, --help\0A -b, --baud Baud rate, 115200, etc (115200 is default)\0A -p, --port Port (/dev/ttyS0, etc) (must be specified)\0A -d, --divisor UART Baud rate divisor (can be used to set custom baud rates)\0A -R, --rx_dump Dump Rx data (ascii, raw)\0A -T, --detailed_tx Detailed Tx data\0A -s, --stats Dump serial port stats every 5s\0A -S, --stop-on-err Stop program if we encounter an error\0A -y, --single-byte Send specified byte to the serial port\0A -z, --second-byte Send another specified byte to the serial port\0A -c, --rts-cts Enable RTS/CTS flow control\0A -B, --2-stop-bit Use two stop bits per character\0A -P, --parity Use parity bit (odd, even, mark, space)\0A -k, --loopback Use internal hardware loop back\0A -K, --write-follow Write follows the read count (can be used for multi-serial loopback)\0A -e, --dump-err Display errors\0A -r, --no-rx Don't receive data (can be used to test flow control)\0A when serial driver buffer is full\0A -t, --no-tx Don't transmit data\0A -l, --rx-delay Delay between reading data (ms) (can be used to test flow control)\0A -a, --tx-delay Delay between writing data (ms)\0A -w, --tx-bytes Number of bytes for each write (default is to repeatedly write 1024 bytes\0A until no more are accepted)\0A -q, --rs485 Enable RS485 direction control on port, and set delay from when TX is\0A finished and RS485 driver enable is de-asserted. Delay is specified in\0A bit times. To optionally specify a delay from when the driver is enabled\0A to start of TX use 'after_delay.before_delay' (-q 1.1)\0A -Q, --rs485_rts Deassert RTS on send, assert after send. Omitting -Q inverts this logic.\0A -o, --tx-time Number of seconds to transmit for (defaults to 0, meaning no limit)\0A -i, --rx-time Number of seconds to receive for (defaults to 0, meaning no limit)\0A -A, --ascii Output bytes range from 32 to 126 (default is 0 to 255)\0A\0A\00"
define void @display_help() {
%1 = call i32 @printf(i8* getelementptr inbounds ([2085 x i8], [2085 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [2084 x i8] c"Usage: linux-serial-test [OPTION]\0A\0A -h, --help\0A -b, --baud Baud rate, 115200, etc (115200 is default)\0A -p, --port Port (/dev/ttyS0, etc) (must be specified)\0A -d, --divisor UART Baud rate divisor (can be used to set custom baud rates)\0A -R, --rx_dump Dump Rx data (ascii, raw)\0A -T, --detailed_tx Detailed Tx data\0A -s, --stats Dump serial port stats every 5s\0A -S, --stop-on-err Stop program if we encounter an error\0A -y, --single-byte Send specified byte to the serial port\0A -z, --second-byte Send another specified byte to the serial port\0A -c, --rts-cts Enable RTS/CTS flow control\0A -B, --2-stop-bit Use two stop bits per character\0A -P, --parity Use parity bit (odd, even, mark, space)\0A -k, --loopback Use internal hardware loop back\0A -K, --write-follow Write follows the read count (can be used for multi-serial loopback)\0A -e, --dump-err Display errors\0A -r, --no-rx Don't receive data (can be used to test flow control)\0A when serial driver buffer is full\0A -t, --no-tx Don't transmit data\0A -l, --rx-delay Delay between reading data (ms) (can be used to test flow control)\0A -a, --tx-delay Delay between writing data (ms)\0A -w, --tx-bytes Number of bytes for each write (default is to repeatedly write 1024 bytes\0A until no more are accepted)\0A -q, --rs485 Enable RS485 direction control on port, and set delay from when TX is\0A finished and RS485 driver enable is de-asserted. Delay is specified in\0A bit times. To optionally specify a delay from when the driver is enabled\0A to start of TX use 'after_delay.before_delay' (-q 1.1)\0A -Q, --rs485_rts Deassert RTS on send, assert after send. Omitting -Q inverts this logic.\0A -o, --tx-time Number of seconds to transmit for (defaults to 0, meaning no limit)\0A -i, --rx-time Number of seconds to receive for (defaults to 0, meaning no limit)\0A -A, --ascii Output bytes range from 32 to 126 (default is 0 to 255)\0A\00"
define void @display_help() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([2084 x i8], [2084 x i8]* @str, i64 0, i64 0))
ret void
}