#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*/ PrintVersion();
int /*<<< orphan*/ printf(char *);
void Help() {
  PrintVersion();
  printf("Usage: ./rly08 [port /dev/ttyN] [dir n] command [parameters]:\n\n");
  printf("\tif no port is specified /dev/ttyUSB0 will be used.\n\n");
  printf("\tif no dir is specified (1-8) 1 will be used.\n\n");
  printf("Commands:\n");
  printf("=========\n\n");
  printf("\ton [1,2,3,n]\n");
  printf("\t\tThis command will turn on the specified reles.\n");
  printf("\t\tExample: ./rly08 on 4,5,6 (will turn on reles 4, 5 and 6 and do "
         "nothing with the rest).\n");
  printf("\toff [1,2,3,n]\n");
  printf("\t\tThis command will turn off the specified reles.\n");
  printf("\t\tExample: ./rly08 off 4,5,6 (will turn off reles 4, 5 and 6 and "
         "do nothing with the rest).\n");
  printf("\tset 1111111\n");
  printf("\t\tThis command must have 8 binary digit as input. Each bit will "
         "represent the state of the associated rele.\n");
  printf("\t\tExample: ./rly08 set 11110000  (will turn on reles 1-4, and turn "
         "off reles 5-8).\n");
  printf("\tget n\n");
  printf("\t\tThis command will display the state of the specified rele and "
         "exit.\n");
  printf("\t\tExample: ./rly08 get 3  (will display 0 or 1, and also will use "
         "it as the exit code).\n");
  printf("\tversion\n");
  printf("\t\tThis command will display Module ID and Software version of the "
         "rele and exit.\n");
  printf("\t\tExample: ./rly08 version\n");
  printf("\n\n");
}


x86 assembly (clang, -O0):
<Help>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <PrintVersion@plt>
lea    0xece(%rip),%rdi
call   1030 <printf@plt>
lea    0xf02(%rip),%rdi
call   1030 <printf@plt>
lea    0xf2c(%rip),%rdi
call   1030 <printf@plt>
lea    0xf50(%rip),%rdi
call   1030 <printf@plt>
lea    0xf4f(%rip),%rdi
call   1030 <printf@plt>
lea    0xf4f(%rip),%rdi
call   1030 <printf@plt>
lea    0xf52(%rip),%rdi
call   1030 <printf@plt>
lea    0xf78(%rip),%rdi
call   1030 <printf@plt>
lea    0xfc7(%rip),%rdi
call   1030 <printf@plt>
lea    0xfcb(%rip),%rdi
call   1030 <printf@plt>
lea    0xff2(%rip),%rdi
call   1030 <printf@plt>
lea    0x1043(%rip),%rdi
call   1030 <printf@plt>
lea    0x1045(%rip),%rdi
call   1030 <printf@plt>
lea    0x10a6(%rip),%rdi
call   1030 <printf@plt>
lea    0x10ee(%rip),%rdi
call   1030 <printf@plt>
lea    0x10ea(%rip),%rdi
call   1030 <printf@plt>
lea    0x1125(%rip),%rdi
call   1030 <printf@plt>
lea    0x1172(%rip),%rdi
call   1030 <printf@plt>
lea    0x1170(%rip),%rdi
call   1030 <printf@plt>
lea    0x11b6(%rip),%rdi
call   1030 <printf@plt>
lea    0xe51(%rip),%rdi
call   1030 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<Help>:
push   %rax
xor    %eax,%eax
call   1040 <PrintVersion@plt>
lea    0xed1(%rip),%rdi
call   1030 <puts@plt>
lea    0xf04(%rip),%rdi
call   1030 <puts@plt>
lea    0xf2d(%rip),%rdi
call   1030 <puts@plt>
lea    0xf50(%rip),%rdi
call   1030 <puts@plt>
lea    0xf4e(%rip),%rdi
call   1030 <puts@plt>
lea    0xf4d(%rip),%rdi
call   1030 <puts@plt>
lea    0xf4f(%rip),%rdi
call   1030 <puts@plt>
lea    0xf74(%rip),%rdi
call   1030 <puts@plt>
lea    0xfc2(%rip),%rdi
call   1030 <puts@plt>
lea    0xfc5(%rip),%rdi
call   1030 <puts@plt>
lea    0xfeb(%rip),%rdi
call   1030 <puts@plt>
lea    0x103b(%rip),%rdi
call   1030 <puts@plt>
lea    0x103c(%rip),%rdi
call   1030 <puts@plt>
lea    0x109c(%rip),%rdi
call   1030 <puts@plt>
lea    0x10e3(%rip),%rdi
call   1030 <puts@plt>
lea    0x10de(%rip),%rdi
call   1030 <puts@plt>
lea    0x1118(%rip),%rdi
call   1030 <puts@plt>
lea    0x1164(%rip),%rdi
call   1030 <puts@plt>
lea    0x1161(%rip),%rdi
call   1030 <puts@plt>
lea    0x11a6(%rip),%rdi
call   1030 <puts@plt>
lea    0xe53(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [64 x i8] c"Usage: ./rly08 [port /dev/ttyN] [dir n] command [parameters]:\0A\0A\00"
@.str.1 = [54 x i8] c"\09if no port is specified /dev/ttyUSB0 will be used.\0A\0A\00"
@.str.2 = [48 x i8] c"\09if no dir is specified (1-8) 1 will be used.\0A\0A\00"
@.str.3 = [11 x i8] c"Commands:\0A\00"
@.str.4 = [12 x i8] c"=========\0A\0A\00"
@.str.5 = [15 x i8] c"\09on [1,2,3,n]\0A\00"
@.str.6 = [50 x i8] c"\09\09This command will turn on the specified reles.\0A\00"
@.str.7 = [91 x i8] c"\09\09Example: ./rly08 on 4,5,6 (will turn on reles 4, 5 and 6 and do nothing with the rest).\0A\00"
@.str.8 = [16 x i8] c"\09off [1,2,3,n]\0A\00"
@.str.9 = [51 x i8] c"\09\09This command will turn off the specified reles.\0A\00"
@.str.10 = [93 x i8] c"\09\09Example: ./rly08 off 4,5,6 (will turn off reles 4, 5 and 6 and do nothing with the rest).\0A\00"
@.str.11 = [14 x i8] c"\09set 1111111\0A\00"
@.str.12 = [109 x i8] c"\09\09This command must have 8 binary digit as input. Each bit will represent the state of the associated rele.\0A\00"
@.str.13 = [84 x i8] c"\09\09Example: ./rly08 set 11110000 (will turn on reles 1-4, and turn off reles 5-8).\0A\00"
@.str.14 = [8 x i8] c"\09get n\0A\00"
@.str.15 = [71 x i8] c"\09\09This command will display the state of the specified rele and exit.\0A\00"
@.str.16 = [89 x i8] c"\09\09Example: ./rly08 get 3 (will display 0 or 1, and also will use it as the exit code).\0A\00"
@.str.17 = [10 x i8] c"\09version\0A\00"
@.str.18 = [82 x i8] c"\09\09This command will display Module ID and Software version of the rele and exit.\0A\00"
@.str.19 = [28 x i8] c"\09\09Example: ./rly08 version\0A\00"
@.str.20 = [3 x i8] c"\0A\0A\00"
define void @Help() {
%1 = call i32 (...) @PrintVersion()
%2 = call i32 @printf(i8* getelementptr inbounds ([64 x i8], [64 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str.1, i64 0, i64 0))
%4 = call i32 @printf(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.2, i64 0, i64 0))
%5 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.3, i64 0, i64 0))
%6 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.4, i64 0, i64 0))
%7 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.5, i64 0, i64 0))
%8 = call i32 @printf(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.6, i64 0, i64 0))
%9 = call i32 @printf(i8* getelementptr inbounds ([91 x i8], [91 x i8]* @.str.7, i64 0, i64 0))
%10 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.8, i64 0, i64 0))
%11 = call i32 @printf(i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str.9, i64 0, i64 0))
%12 = call i32 @printf(i8* getelementptr inbounds ([93 x i8], [93 x i8]* @.str.10, i64 0, i64 0))
%13 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.11, i64 0, i64 0))
%14 = call i32 @printf(i8* getelementptr inbounds ([109 x i8], [109 x i8]* @.str.12, i64 0, i64 0))
%15 = call i32 @printf(i8* getelementptr inbounds ([84 x i8], [84 x i8]* @.str.13, i64 0, i64 0))
%16 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.14, i64 0, i64 0))
%17 = call i32 @printf(i8* getelementptr inbounds ([71 x i8], [71 x i8]* @.str.15, i64 0, i64 0))
%18 = call i32 @printf(i8* getelementptr inbounds ([89 x i8], [89 x i8]* @.str.16, i64 0, i64 0))
%19 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.17, i64 0, i64 0))
%20 = call i32 @printf(i8* getelementptr inbounds ([82 x i8], [82 x i8]* @.str.18, i64 0, i64 0))
%21 = call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.19, i64 0, i64 0))
%22 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.20, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [63 x i8] c"Usage: ./rly08 [port /dev/ttyN] [dir n] command [parameters]:\0A\00"
@str.21 = [53 x i8] c"\09if no port is specified /dev/ttyUSB0 will be used.\0A\00"
@str.22 = [47 x i8] c"\09if no dir is specified (1-8) 1 will be used.\0A\00"
@str.23 = [10 x i8] c"Commands:\00"
@str.24 = [11 x i8] c"=========\0A\00"
@str.25 = [14 x i8] c"\09on [1,2,3,n]\00"
@str.26 = [49 x i8] c"\09\09This command will turn on the specified reles.\00"
@str.27 = [90 x i8] c"\09\09Example: ./rly08 on 4,5,6 (will turn on reles 4, 5 and 6 and do nothing with the rest).\00"
@str.28 = [15 x i8] c"\09off [1,2,3,n]\00"
@str.29 = [50 x i8] c"\09\09This command will turn off the specified reles.\00"
@str.30 = [92 x i8] c"\09\09Example: ./rly08 off 4,5,6 (will turn off reles 4, 5 and 6 and do nothing with the rest).\00"
@str.31 = [13 x i8] c"\09set 1111111\00"
@str.32 = [108 x i8] c"\09\09This command must have 8 binary digit as input. Each bit will represent the state of the associated rele.\00"
@str.33 = [83 x i8] c"\09\09Example: ./rly08 set 11110000 (will turn on reles 1-4, and turn off reles 5-8).\00"
@str.34 = [7 x i8] c"\09get n\00"
@str.35 = [70 x i8] c"\09\09This command will display the state of the specified rele and exit.\00"
@str.36 = [88 x i8] c"\09\09Example: ./rly08 get 3 (will display 0 or 1, and also will use it as the exit code).\00"
@str.37 = [9 x i8] c"\09version\00"
@str.38 = [81 x i8] c"\09\09This command will display Module ID and Software version of the rele and exit.\00"
@str.39 = [27 x i8] c"\09\09Example: ./rly08 version\00"
@str.40 = [2 x i8] c"\0A\00"
define void @Help() {
%1 = tail call i32 (...) @PrintVersion()
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([63 x i8], [63 x i8]* @str, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([53 x i8], [53 x i8]* @str.21, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([47 x i8], [47 x i8]* @str.22, i64 0, i64 0))
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @str.23, i64 0, i64 0))
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @str.24, i64 0, i64 0))
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @str.25, i64 0, i64 0))
%8 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([49 x i8], [49 x i8]* @str.26, i64 0, i64 0))
%9 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([90 x i8], [90 x i8]* @str.27, i64 0, i64 0))
%10 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @str.28, i64 0, i64 0))
%11 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([50 x i8], [50 x i8]* @str.29, i64 0, i64 0))
%12 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([92 x i8], [92 x i8]* @str.30, i64 0, i64 0))
%13 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str.31, i64 0, i64 0))
%14 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([108 x i8], [108 x i8]* @str.32, i64 0, i64 0))
%15 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([83 x i8], [83 x i8]* @str.33, i64 0, i64 0))
%16 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @str.34, i64 0, i64 0))
%17 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([70 x i8], [70 x i8]* @str.35, i64 0, i64 0))
%18 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([88 x i8], [88 x i8]* @str.36, i64 0, i64 0))
%19 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @str.37, i64 0, i64 0))
%20 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([81 x i8], [81 x i8]* @str.38, i64 0, i64 0))
%21 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @str.39, i64 0, i64 0))
%22 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([2 x i8], [2 x i8]* @str.40, i64 0, i64 0))
ret void
}