#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 usage() {
  printf("usage   : uart_client_test <option> <cmd>\n");
  printf("<option -g:get cmd>\n");
  printf("cmd 1   : get firmware\n");
  printf("cmd 2   : get power percent\n");
  printf("cmd 3   : get button\n");
  printf("cmd 4   : get charg\n");
  printf("cmd 5   : get storage power\n");
  printf("cmd 6   : get pc detect\n");
  printf("cmd 7   : get storage direction\n");
  printf("cmd 8   : get power status\n");
  printf("cmd 9   : get host power status\n");
  printf("<option -s:set cmd>\n");
  printf("cmd 1   : upload stm8\n");
  printf("cmd 2   : set reset\n");
  printf("cmd 3   : set poweroff\n");
  printf("cmd 4   : set storage power off\n");
  printf("cmd 5   : set storage power on\n");
  printf("cmd 6   : set storage direction to pc\n");
  printf("cmd 7   : set storage direction to board\n");
  printf("cmd 8   : set reset led\n");
  printf("<option -c:input code>\n");
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
call   1030 <printf@plt>
lea    0xf04(%rip),%rdi
call   1030 <printf@plt>
lea    0xf0d(%rip),%rdi
call   1030 <printf@plt>
lea    0xf19(%rip),%rdi
call   1030 <printf@plt>
lea    0xf2a(%rip),%rdi
call   1030 <printf@plt>
lea    0xf34(%rip),%rdi
call   1030 <printf@plt>
lea    0xf3d(%rip),%rdi
call   1030 <printf@plt>
lea    0xf4e(%rip),%rdi
call   1030 <printf@plt>
lea    0xf5b(%rip),%rdi
call   1030 <printf@plt>
lea    0xf70(%rip),%rdi
call   1030 <printf@plt>
lea    0xf80(%rip),%rdi
call   1030 <printf@plt>
lea    0xf95(%rip),%rdi
call   1030 <printf@plt>
lea    0xf9e(%rip),%rdi
call   1030 <printf@plt>
lea    0xfa9(%rip),%rdi
call   1030 <printf@plt>
lea    0xfb2(%rip),%rdi
call   1030 <printf@plt>
lea    0xfbe(%rip),%rdi
call   1030 <printf@plt>
lea    0xfd3(%rip),%rdi
call   1030 <printf@plt>
lea    0xfe7(%rip),%rdi
call   1030 <printf@plt>
lea    0x1002(%rip),%rdi
call   1030 <printf@plt>
lea    0x1020(%rip),%rdi
call   1030 <printf@plt>
lea    0x102d(%rip),%rdi
call   1030 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<usage>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
lea    0xf06(%rip),%rdi
call   1030 <puts@plt>
lea    0xf0e(%rip),%rdi
call   1030 <puts@plt>
lea    0xf19(%rip),%rdi
call   1030 <puts@plt>
lea    0xf29(%rip),%rdi
call   1030 <puts@plt>
lea    0xf32(%rip),%rdi
call   1030 <puts@plt>
lea    0xf3a(%rip),%rdi
call   1030 <puts@plt>
lea    0xf4a(%rip),%rdi
call   1030 <puts@plt>
lea    0xf56(%rip),%rdi
call   1030 <puts@plt>
lea    0xf6a(%rip),%rdi
call   1030 <puts@plt>
lea    0xf79(%rip),%rdi
call   1030 <puts@plt>
lea    0xf8d(%rip),%rdi
call   1030 <puts@plt>
lea    0xf95(%rip),%rdi
call   1030 <puts@plt>
lea    0xf9f(%rip),%rdi
call   1030 <puts@plt>
lea    0xfa7(%rip),%rdi
call   1030 <puts@plt>
lea    0xfb2(%rip),%rdi
call   1030 <puts@plt>
lea    0xfc6(%rip),%rdi
call   1030 <puts@plt>
lea    0xfd9(%rip),%rdi
call   1030 <puts@plt>
lea    0xff3(%rip),%rdi
call   1030 <puts@plt>
lea    0x1010(%rip),%rdi
call   1030 <puts@plt>
lea    0x101c(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [43 x i8] c"usage : uart_client_test <option> <cmd>\0A\00"
@.str.1 = [21 x i8] c"<option -g:get cmd>\0A\00"
@.str.2 = [24 x i8] c"cmd 1 : get firmware\0A\00"
@.str.3 = [29 x i8] c"cmd 2 : get power percent\0A\00"
@.str.4 = [22 x i8] c"cmd 3 : get button\0A\00"
@.str.5 = [21 x i8] c"cmd 4 : get charg\0A\00"
@.str.6 = [29 x i8] c"cmd 5 : get storage power\0A\00"
@.str.7 = [25 x i8] c"cmd 6 : get pc detect\0A\00"
@.str.8 = [33 x i8] c"cmd 7 : get storage direction\0A\00"
@.str.9 = [28 x i8] c"cmd 8 : get power status\0A\00"
@.str.10 = [33 x i8] c"cmd 9 : get host power status\0A\00"
@.str.11 = [21 x i8] c"<option -s:set cmd>\0A\00"
@.str.12 = [23 x i8] c"cmd 1 : upload stm8\0A\00"
@.str.13 = [21 x i8] c"cmd 2 : set reset\0A\00"
@.str.14 = [24 x i8] c"cmd 3 : set poweroff\0A\00"
@.str.15 = [33 x i8] c"cmd 4 : set storage power off\0A\00"
@.str.16 = [32 x i8] c"cmd 5 : set storage power on\0A\00"
@.str.17 = [39 x i8] c"cmd 6 : set storage direction to pc\0A\00"
@.str.18 = [42 x i8] c"cmd 7 : set storage direction to board\0A\00"
@.str.19 = [25 x i8] c"cmd 8 : set reset led\0A\00"
@.str.20 = [24 x i8] c"<option -c:input code>\0A\00"
define void @usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 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 ([29 x i8], [29 x i8]* @.str.3, i64 0, i64 0))
%5 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.4, i64 0, i64 0))
%6 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.5, i64 0, i64 0))
%7 = call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.6, i64 0, i64 0))
%8 = call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.7, i64 0, i64 0))
%9 = call i32 @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.8, i64 0, i64 0))
%10 = call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.9, i64 0, i64 0))
%11 = call i32 @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.10, i64 0, i64 0))
%12 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.11, i64 0, i64 0))
%13 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.12, i64 0, i64 0))
%14 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.13, i64 0, i64 0))
%15 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.14, i64 0, i64 0))
%16 = call i32 @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.15, i64 0, i64 0))
%17 = call i32 @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.16, i64 0, i64 0))
%18 = call i32 @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.17, i64 0, i64 0))
%19 = call i32 @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.18, i64 0, i64 0))
%20 = call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.19, i64 0, i64 0))
%21 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.20, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [42 x i8] c"usage : uart_client_test <option> <cmd>\00"
@str.21 = [20 x i8] c"<option -g:get cmd>\00"
@str.22 = [23 x i8] c"cmd 1 : get firmware\00"
@str.23 = [28 x i8] c"cmd 2 : get power percent\00"
@str.24 = [21 x i8] c"cmd 3 : get button\00"
@str.25 = [20 x i8] c"cmd 4 : get charg\00"
@str.26 = [28 x i8] c"cmd 5 : get storage power\00"
@str.27 = [24 x i8] c"cmd 6 : get pc detect\00"
@str.28 = [32 x i8] c"cmd 7 : get storage direction\00"
@str.29 = [27 x i8] c"cmd 8 : get power status\00"
@str.30 = [32 x i8] c"cmd 9 : get host power status\00"
@str.31 = [20 x i8] c"<option -s:set cmd>\00"
@str.32 = [22 x i8] c"cmd 1 : upload stm8\00"
@str.33 = [20 x i8] c"cmd 2 : set reset\00"
@str.34 = [23 x i8] c"cmd 3 : set poweroff\00"
@str.35 = [32 x i8] c"cmd 4 : set storage power off\00"
@str.36 = [31 x i8] c"cmd 5 : set storage power on\00"
@str.37 = [38 x i8] c"cmd 6 : set storage direction to pc\00"
@str.38 = [41 x i8] c"cmd 7 : set storage direction to board\00"
@str.39 = [24 x i8] c"cmd 8 : set reset led\00"
@str.40 = [23 x i8] c"<option -c:input code>\00"
define void @usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([42 x i8], [42 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @str.21, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @str.22, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @str.23, i64 0, i64 0))
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @str.24, i64 0, i64 0))
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @str.25, i64 0, i64 0))
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @str.26, i64 0, i64 0))
%8 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @str.27, i64 0, i64 0))
%9 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @str.28, i64 0, i64 0))
%10 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @str.29, i64 0, i64 0))
%11 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @str.30, i64 0, i64 0))
%12 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @str.31, i64 0, i64 0))
%13 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @str.32, i64 0, i64 0))
%14 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @str.33, i64 0, i64 0))
%15 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @str.34, i64 0, i64 0))
%16 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @str.35, i64 0, i64 0))
%17 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @str.36, i64 0, i64 0))
%18 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([38 x i8], [38 x i8]* @str.37, i64 0, i64 0))
%19 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([41 x i8], [41 x i8]* @str.38, i64 0, i64 0))
%20 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @str.39, i64 0, i64 0))
%21 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @str.40, i64 0, i64 0))
ret void
}