#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_SUCCESS;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
void usage(void) {
  printf(
      "Usage: arduino-serial -b <bps> -p <serialport> [OPTIONS]\n"
      "\n"
      "Options:\n"
      "  -h, --help                 Print this help message\n"
      "  -b, --baud=baudrate        Baudrate (bps) of Arduino (default 9600)\n"
      "  -p, --port=serialport      Serial port Arduino is connected to\n"
      "  -s, --send=string          Send string to Arduino\n"
      "  -S, --sendline=string      Send string with newline to Arduino\n"
      "  -r, --receive              Receive string from Arduino & print it "
      "out\n"
      "  -n  --num=num              Send a number as a single byte\n"
      "  -F  --flush                Flush serial port buffers for fresh "
      "reading\n"
      "  -d  --delay=millis         Delay for specified milliseconds\n"
      "  -e  --eolchar=char         Specify EOL char for reads (default "
      "'\\n')\n"
      "  -t  --timeout=millis       Timeout for reads in millisecs (default "
      "5000)\n"
      "  -q  --quiet                Don't print out as much info\n"
      "\n"
      "Note: Order is important. Set '-b' baudrate before opening port'-p'. \n"
      "      Used to make series of actions: '-d 2000 -s hello -d 100 -r' \n"
      "      means 'wait 2secs, send 'hello', wait 100msec, get reply'\n"
      "\n");
  exit(EXIT_SUCCESS);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
mov    0x2ea9(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
mov    0x2eac(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [1048 x i8] c"Usage: arduino-serial -b <bps> -p <serialport> [OPTIONS]\0A\0AOptions:\0A -h, --help Print this help message\0A -b, --baud=baudrate Baudrate (bps) of Arduino (default 9600)\0A -p, --port=serialport Serial port Arduino is connected to\0A -s, --send=string Send string to Arduino\0A -S, --sendline=string Send string with newline to Arduino\0A -r, --receive Receive string from Arduino & print it out\0A -n --num=num Send a number as a single byte\0A -F --flush Flush serial port buffers for fresh reading\0A -d --delay=millis Delay for specified milliseconds\0A -e --eolchar=char Specify EOL char for reads (default '\\n')\0A -t --timeout=millis Timeout for reads in millisecs (default 5000)\0A -q --quiet Don't print out as much info\0A\0ANote: Order is important. Set '-b' baudrate before opening port'-p'. \0A Used to make series of actions: '-d 2000 -s hello -d 100 -r' \0A means 'wait 2secs, send 'hello', wait 100msec, get reply'\0A\0A\00"
@EXIT_SUCCESS = global i32 0
define void @usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([1048 x i8], [1048 x i8]* @.str, i64 0, i64 0))
%2 = load i32, i32* @EXIT_SUCCESS
%3 = call i32 @exit(i32 %2)
unreachable
}

LLVM IR (-O2):
@EXIT_SUCCESS = global i32 0
@str = [1047 x i8] c"Usage: arduino-serial -b <bps> -p <serialport> [OPTIONS]\0A\0AOptions:\0A -h, --help Print this help message\0A -b, --baud=baudrate Baudrate (bps) of Arduino (default 9600)\0A -p, --port=serialport Serial port Arduino is connected to\0A -s, --send=string Send string to Arduino\0A -S, --sendline=string Send string with newline to Arduino\0A -r, --receive Receive string from Arduino & print it out\0A -n --num=num Send a number as a single byte\0A -F --flush Flush serial port buffers for fresh reading\0A -d --delay=millis Delay for specified milliseconds\0A -e --eolchar=char Specify EOL char for reads (default '\\n')\0A -t --timeout=millis Timeout for reads in millisecs (default 5000)\0A -q --quiet Don't print out as much info\0A\0ANote: Order is important. Set '-b' baudrate before opening port'-p'. \0A Used to make series of actions: '-d 2000 -s hello -d 100 -r' \0A means 'wait 2secs, send 'hello', wait 100msec, get reply'\0A\00"
define void @usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([1047 x i8], [1047 x i8]* @str, i64 0, i64 0))
%2 = load i32, i32* @EXIT_SUCCESS
%3 = tail call i32 @exit(i32 %2)
unreachable
}