#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 help() {
  printf(" Test programm for the serial port: A random string is sent and "
         "expected to be echoed back\n");
  printf("  -d s    Select serial port specified by device name s (default: "
         "/dev/ttymxc1)\n");
  printf("  -b s    Set Baud rate to x (default: 115200)\n");
  printf("  -c x    Repeat send and receive x times (default: 10)\n");
  printf("  -s x    Send x bytes per package (default: 32)\n");
  printf("  -o x    Set receive timeout to x milliseconds (default: 1000)\n");
  printf("  -fn     turn off flow control (default)\n");
  printf("  -fs     use software flow control (XON/XOFF)\n");
  printf("  -v      Be verbose. This will print out a status message for each "
         "package which is sent or received\n");
  printf("  -vv     Be really verbose. This will print out debug messages on "
         "stderr to trace what the programm currently does\n");
  printf("  -q      Be quiet. Only the test's pass/fail message is printed\n");
  printf("  -h      display this help message\n");
}


x86 assembly (clang, -O0):
<help>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
call   1030 <printf@plt>
lea    0xf35(%rip),%rdi
call   1030 <printf@plt>
lea    0xf7a(%rip),%rdi
call   1030 <printf@plt>
lea    0xf9e(%rip),%rdi
call   1030 <printf@plt>
lea    0xfcb(%rip),%rdi
call   1030 <printf@plt>
lea    0xff1(%rip),%rdi
call   1030 <printf@plt>
lea    0x1026(%rip),%rdi
call   1030 <printf@plt>
lea    0x1045(%rip),%rdi
call   1030 <printf@plt>
lea    0x1069(%rip),%rdi
call   1030 <printf@plt>
lea    0x10c4(%rip),%rdi
call   1030 <printf@plt>
lea    0x112d(%rip),%rdi
call   1030 <printf@plt>
lea    0x1163(%rip),%rdi
call   1030 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<help>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
lea    0xf37(%rip),%rdi
call   1030 <puts@plt>
lea    0xf7b(%rip),%rdi
call   1030 <puts@plt>
lea    0xf9e(%rip),%rdi
call   1030 <puts@plt>
lea    0xfca(%rip),%rdi
call   1030 <puts@plt>
lea    0xfef(%rip),%rdi
call   1030 <puts@plt>
lea    0x1023(%rip),%rdi
call   1030 <puts@plt>
lea    0x1041(%rip),%rdi
call   1030 <puts@plt>
lea    0x1064(%rip),%rdi
call   1030 <puts@plt>
lea    0x10be(%rip),%rdi
call   1030 <puts@plt>
lea    0x1126(%rip),%rdi
call   1030 <puts@plt>
lea    0x115b(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [92 x i8] c" Test programm for the serial port: A random string is sent and expected to be echoed back\0A\00"
@.str.1 = [81 x i8] c" -d s Select serial port specified by device name s (default: /dev/ttymxc1)\0A\00"
@.str.2 = [48 x i8] c" -b s Set Baud rate to x (default: 115200)\0A\00"
@.str.3 = [57 x i8] c" -c x Repeat send and receive x times (default: 10)\0A\00"
@.str.4 = [50 x i8] c" -s x Send x bytes per package (default: 32)\0A\00"
@.str.5 = [65 x i8] c" -o x Set receive timeout to x milliseconds (default: 1000)\0A\00"
@.str.6 = [43 x i8] c" -fn turn off flow control (default)\0A\00"
@.str.7 = [48 x i8] c" -fs use software flow control (XON/XOFF)\0A\00"
@.str.8 = [103 x i8] c" -v Be verbose. This will print out a status message for each package which is sent or received\0A\00"
@.str.9 = [117 x i8] c" -vv Be really verbose. This will print out debug messages on stderr to trace what the programm currently does\0A\00"
@.str.10 = [66 x i8] c" -q Be quiet. Only the test's pass/fail message is printed\0A\00"
@.str.11 = [37 x i8] c" -h display this help message\0A\00"
define void @help() {
%1 = call i32 @printf(i8* getelementptr inbounds ([92 x i8], [92 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([81 x i8], [81 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.2, i64 0, i64 0))
%4 = call i32 @printf(i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str.3, i64 0, i64 0))
%5 = call i32 @printf(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.4, i64 0, i64 0))
%6 = call i32 @printf(i8* getelementptr inbounds ([65 x i8], [65 x i8]* @.str.5, i64 0, i64 0))
%7 = call i32 @printf(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.6, i64 0, i64 0))
%8 = call i32 @printf(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.7, i64 0, i64 0))
%9 = call i32 @printf(i8* getelementptr inbounds ([103 x i8], [103 x i8]* @.str.8, i64 0, i64 0))
%10 = call i32 @printf(i8* getelementptr inbounds ([117 x i8], [117 x i8]* @.str.9, i64 0, i64 0))
%11 = call i32 @printf(i8* getelementptr inbounds ([66 x i8], [66 x i8]* @.str.10, i64 0, i64 0))
%12 = call i32 @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.11, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [91 x i8] c" Test programm for the serial port: A random string is sent and expected to be echoed back\00"
@str.12 = [80 x i8] c" -d s Select serial port specified by device name s (default: /dev/ttymxc1)\00"
@str.13 = [47 x i8] c" -b s Set Baud rate to x (default: 115200)\00"
@str.14 = [56 x i8] c" -c x Repeat send and receive x times (default: 10)\00"
@str.15 = [49 x i8] c" -s x Send x bytes per package (default: 32)\00"
@str.16 = [64 x i8] c" -o x Set receive timeout to x milliseconds (default: 1000)\00"
@str.17 = [42 x i8] c" -fn turn off flow control (default)\00"
@str.18 = [47 x i8] c" -fs use software flow control (XON/XOFF)\00"
@str.19 = [102 x i8] c" -v Be verbose. This will print out a status message for each package which is sent or received\00"
@str.20 = [116 x i8] c" -vv Be really verbose. This will print out debug messages on stderr to trace what the programm currently does\00"
@str.21 = [65 x i8] c" -q Be quiet. Only the test's pass/fail message is printed\00"
@str.22 = [36 x i8] c" -h display this help message\00"
define void @help() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([91 x i8], [91 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([80 x i8], [80 x i8]* @str.12, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([47 x i8], [47 x i8]* @str.13, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([56 x i8], [56 x i8]* @str.14, i64 0, i64 0))
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([49 x i8], [49 x i8]* @str.15, i64 0, i64 0))
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([64 x i8], [64 x i8]* @str.16, i64 0, i64 0))
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([42 x i8], [42 x i8]* @str.17, i64 0, i64 0))
%8 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([47 x i8], [47 x i8]* @str.18, i64 0, i64 0))
%9 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([102 x i8], [102 x i8]* @str.19, i64 0, i64 0))
%10 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([116 x i8], [116 x i8]* @str.20, i64 0, i64 0))
%11 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([65 x i8], [65 x i8]* @str.21, i64 0, i64 0))
%12 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @str.22, i64 0, i64 0))
ret void
}