#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 print_usage() {
  printf("usage:\n");
  printf("-i: interface i.e.:  /dev/ttyUSB0 \n");
  printf("-o: stat | param | all\n");
  printf("-d: read from: mppt | bmv | bs_inverter | mk2 | litrade_bms16p\n");
  printf(
      "-r: raw read from: mppt | bmv | bs_inverter | mk2 | litrade_bms16p\n");
  printf("Option \"-o\" only for BlueSolar Inverter:\n -o stat\n -o param\n -o "
         "all\n\n");
  printf("Examples:\n");
  printf("read from bmv: \"PV-SysReader -i /dev/ttyUSB0 -d bmv\"\n");
  printf("read from mppt charger: \"PV-SysReader -i /dev/ttyUSB0 -d mppt\"\n");
  printf("read from BlueSolar Inverter: \"PV-SysReader -i /dev/ttyUSB0 -o stat "
         "-d bs_inverter\"\n");
  printf("read from mk2: \"PV-SysReader -i /dev/ttyUSB0 -d mk2\"\n");
  printf("read from Litrade BMS: \"PV-SysReader -i /dev/ttyUSB0 -d "
         "litrade_bms16p\"\n\n");
  printf("Examples for raw rs2323 read, output will be in Hex:\n");
  printf("bmv: \"PV-SysReader -i /dev/ttyUSB0 -r bmv\" \n");
  printf("mppt: \"PV-SysReader -i /dev/ttyUSB0 -r mppt\" \n");
  printf("BlueSolar Grid Inverter: \"PV-SysReader -i /dev/ttyUSB0 -r "
         "bs_inverter\" \n");
  printf("mk2: \"PV-SysReader -i /dev/ttyUSB0 -r mk2\" \n");
  printf("Litrade BMS: \"PV-SysReader -i /dev/ttyUSB0 -r litrade_bms16p\" \n");
}


x86 assembly (clang, -O0):
<print_usage>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
call   1030 <printf@plt>
lea    0xee1(%rip),%rdi
call   1030 <printf@plt>
lea    0xef9(%rip),%rdi
call   1030 <printf@plt>
lea    0xf05(%rip),%rdi
call   1030 <printf@plt>
lea    0xf39(%rip),%rdi
call   1030 <printf@plt>
lea    0xf71(%rip),%rdi
call   1030 <printf@plt>
lea    0xfab(%rip),%rdi
call   1030 <printf@plt>
lea    0xfaa(%rip),%rdi
call   1030 <printf@plt>
lea    0xfd4(%rip),%rdi
call   1030 <printf@plt>
lea    0x1008(%rip),%rdi
call   1030 <printf@plt>
lea    0x1051(%rip),%rdi
call   1030 <printf@plt>
lea    0x107b(%rip),%rdi
call   1030 <printf@plt>
lea    0x10b9(%rip),%rdi
call   1030 <printf@plt>
lea    0x10e3(%rip),%rdi
call   1030 <printf@plt>
lea    0x1104(%rip),%rdi
call   1030 <printf@plt>
lea    0x1127(%rip),%rdi
call   1030 <printf@plt>
lea    0x1164(%rip),%rdi
call   1030 <printf@plt>
lea    0x1185(%rip),%rdi
call   1030 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_usage>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
lea    0xee3(%rip),%rdi
call   1030 <puts@plt>
lea    0xefa(%rip),%rdi
call   1030 <puts@plt>
lea    0xf05(%rip),%rdi
call   1030 <puts@plt>
lea    0xf38(%rip),%rdi
call   1030 <puts@plt>
lea    0xf6f(%rip),%rdi
call   1030 <puts@plt>
lea    0xfa8(%rip),%rdi
call   1030 <puts@plt>
lea    0xfa6(%rip),%rdi
call   1030 <puts@plt>
lea    0xfcf(%rip),%rdi
call   1030 <puts@plt>
lea    0x1002(%rip),%rdi
call   1030 <puts@plt>
lea    0x104a(%rip),%rdi
call   1030 <puts@plt>
lea    0x1073(%rip),%rdi
call   1030 <puts@plt>
lea    0x10b0(%rip),%rdi
call   1030 <puts@plt>
lea    0x10d9(%rip),%rdi
call   1030 <puts@plt>
lea    0x10f9(%rip),%rdi
call   1030 <puts@plt>
lea    0x111b(%rip),%rdi
call   1030 <puts@plt>
lea    0x1157(%rip),%rdi
call   1030 <puts@plt>
lea    0x1177(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [8 x i8] c"usage:\0A\00"
@.str.1 = [36 x i8] c"-i: interface i.e.: /dev/ttyUSB0 \0A\00"
@.str.2 = [24 x i8] c"-o: stat | param | all\0A\00"
@.str.3 = [64 x i8] c"-d: read from: mppt | bmv | bs_inverter | mk2 | litrade_bms16p\0A\00"
@.str.4 = [68 x i8] c"-r: raw read from: mppt | bmv | bs_inverter | mk2 | litrade_bms16p\0A\00"
@.str.5 = [70 x i8] c"Option \22-o\22 only for BlueSolar Inverter:\0A -o stat\0A -o param\0A -o all\0A\0A\00"
@.str.6 = [11 x i8] c"Examples:\0A\00"
@.str.7 = [54 x i8] c"read from bmv: \22PV-SysReader -i /dev/ttyUSB0 -d bmv\22\0A\00"
@.str.8 = [64 x i8] c"read from mppt charger: \22PV-SysReader -i /dev/ttyUSB0 -d mppt\22\0A\00"
@.str.9 = [85 x i8] c"read from BlueSolar Inverter: \22PV-SysReader -i /dev/ttyUSB0 -o stat -d bs_inverter\22\0A\00"
@.str.10 = [54 x i8] c"read from mk2: \22PV-SysReader -i /dev/ttyUSB0 -d mk2\22\0A\00"
@.str.11 = [74 x i8] c"read from Litrade BMS: \22PV-SysReader -i /dev/ttyUSB0 -d litrade_bms16p\22\0A\0A\00"
@.str.12 = [54 x i8] c"Examples for raw rs2323 read, output will be in Hex:\0A\00"
@.str.13 = [45 x i8] c"bmv: \22PV-SysReader -i /dev/ttyUSB0 -r bmv\22 \0A\00"
@.str.14 = [47 x i8] c"mppt: \22PV-SysReader -i /dev/ttyUSB0 -r mppt\22 \0A\00"
@.str.15 = [73 x i8] c"BlueSolar Grid Inverter: \22PV-SysReader -i /dev/ttyUSB0 -r bs_inverter\22 \0A\00"
@.str.16 = [45 x i8] c"mk2: \22PV-SysReader -i /dev/ttyUSB0 -r mk2\22 \0A\00"
@.str.17 = [64 x i8] c"Litrade BMS: \22PV-SysReader -i /dev/ttyUSB0 -r litrade_bms16p\22 \0A\00"
define void @print_usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.2, i64 0, i64 0))
%4 = call i32 @printf(i8* getelementptr inbounds ([64 x i8], [64 x i8]* @.str.3, i64 0, i64 0))
%5 = call i32 @printf(i8* getelementptr inbounds ([68 x i8], [68 x i8]* @.str.4, i64 0, i64 0))
%6 = call i32 @printf(i8* getelementptr inbounds ([70 x i8], [70 x i8]* @.str.5, i64 0, i64 0))
%7 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.6, i64 0, i64 0))
%8 = call i32 @printf(i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str.7, i64 0, i64 0))
%9 = call i32 @printf(i8* getelementptr inbounds ([64 x i8], [64 x i8]* @.str.8, i64 0, i64 0))
%10 = call i32 @printf(i8* getelementptr inbounds ([85 x i8], [85 x i8]* @.str.9, i64 0, i64 0))
%11 = call i32 @printf(i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str.10, i64 0, i64 0))
%12 = call i32 @printf(i8* getelementptr inbounds ([74 x i8], [74 x i8]* @.str.11, i64 0, i64 0))
%13 = call i32 @printf(i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str.12, i64 0, i64 0))
%14 = call i32 @printf(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.13, i64 0, i64 0))
%15 = call i32 @printf(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.14, i64 0, i64 0))
%16 = call i32 @printf(i8* getelementptr inbounds ([73 x i8], [73 x i8]* @.str.15, i64 0, i64 0))
%17 = call i32 @printf(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.16, i64 0, i64 0))
%18 = call i32 @printf(i8* getelementptr inbounds ([64 x i8], [64 x i8]* @.str.17, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [7 x i8] c"usage:\00"
@str.18 = [35 x i8] c"-i: interface i.e.: /dev/ttyUSB0 \00"
@str.19 = [23 x i8] c"-o: stat | param | all\00"
@str.20 = [63 x i8] c"-d: read from: mppt | bmv | bs_inverter | mk2 | litrade_bms16p\00"
@str.21 = [67 x i8] c"-r: raw read from: mppt | bmv | bs_inverter | mk2 | litrade_bms16p\00"
@str.22 = [69 x i8] c"Option \22-o\22 only for BlueSolar Inverter:\0A -o stat\0A -o param\0A -o all\0A\00"
@str.23 = [10 x i8] c"Examples:\00"
@str.24 = [53 x i8] c"read from bmv: \22PV-SysReader -i /dev/ttyUSB0 -d bmv\22\00"
@str.25 = [63 x i8] c"read from mppt charger: \22PV-SysReader -i /dev/ttyUSB0 -d mppt\22\00"
@str.26 = [84 x i8] c"read from BlueSolar Inverter: \22PV-SysReader -i /dev/ttyUSB0 -o stat -d bs_inverter\22\00"
@str.27 = [53 x i8] c"read from mk2: \22PV-SysReader -i /dev/ttyUSB0 -d mk2\22\00"
@str.28 = [73 x i8] c"read from Litrade BMS: \22PV-SysReader -i /dev/ttyUSB0 -d litrade_bms16p\22\0A\00"
@str.29 = [53 x i8] c"Examples for raw rs2323 read, output will be in Hex:\00"
@str.30 = [44 x i8] c"bmv: \22PV-SysReader -i /dev/ttyUSB0 -r bmv\22 \00"
@str.31 = [46 x i8] c"mppt: \22PV-SysReader -i /dev/ttyUSB0 -r mppt\22 \00"
@str.32 = [72 x i8] c"BlueSolar Grid Inverter: \22PV-SysReader -i /dev/ttyUSB0 -r bs_inverter\22 \00"
@str.33 = [44 x i8] c"mk2: \22PV-SysReader -i /dev/ttyUSB0 -r mk2\22 \00"
@str.34 = [63 x i8] c"Litrade BMS: \22PV-SysReader -i /dev/ttyUSB0 -r litrade_bms16p\22 \00"
define void @print_usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @str.18, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @str.19, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([63 x i8], [63 x i8]* @str.20, i64 0, i64 0))
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([67 x i8], [67 x i8]* @str.21, i64 0, i64 0))
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([69 x i8], [69 x i8]* @str.22, i64 0, i64 0))
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @str.23, i64 0, i64 0))
%8 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([53 x i8], [53 x i8]* @str.24, i64 0, i64 0))
%9 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([63 x i8], [63 x i8]* @str.25, i64 0, i64 0))
%10 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([84 x i8], [84 x i8]* @str.26, i64 0, i64 0))
%11 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([53 x i8], [53 x i8]* @str.27, i64 0, i64 0))
%12 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([73 x i8], [73 x i8]* @str.28, i64 0, i64 0))
%13 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([53 x i8], [53 x i8]* @str.29, i64 0, i64 0))
%14 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([44 x i8], [44 x i8]* @str.30, i64 0, i64 0))
%15 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([46 x i8], [46 x i8]* @str.31, i64 0, i64 0))
%16 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([72 x i8], [72 x i8]* @str.32, i64 0, i64 0))
%17 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([44 x i8], [44 x i8]* @str.33, i64 0, i64 0))
%18 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([63 x i8], [63 x i8]* @str.34, i64 0, i64 0))
ret void
}