#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("\n");
  printf(" Options\n");
  printf(" -c {channel}   Specify one channel from 1-8.\n");
  printf("                Otherwise all channels will be driven equally\n");
  printf(" -f {hz}        Specify pulse frequency, otherwise 50hz is used\n");
  printf(" -v             Enable 6V servo power rail\n");
  printf("                DO NOT use power option with ESCs\n");
  printf(" -p {position}  Drive servos to a position between -1.5 & 1.5\n");
  printf(" -e {throttle}  Drive ESCs at normalized throttle from 0-1\n");
  printf(" -u {width_us}  Send pulse width in microseconds (us)\n");
  printf(" -s {limit}     Sweep servo back/forth between +- limit\n");
  printf("                Limit can be between 0 & 1.5\n");
  printf(" -r             Use DSM radio input to set ESC speed\n");
  printf(" -h             Print this help messege \n\n");
  printf("sample use to center servo channel 1:\n");
  printf("   rc_test_servos -v -c 1 -p 0.0\n\n");
}


x86 assembly (clang, -O0):
<print_usage>:
push   %rbp
mov    %rsp,%rbp
lea    0x1175(%rip),%rdi
call   1030 <printf@plt>
lea    0xed9(%rip),%rdi
call   1030 <printf@plt>
lea    0xed7(%rip),%rdi
call   1030 <printf@plt>
lea    0xefa(%rip),%rdi
call   1030 <printf@plt>
lea    0xf2d(%rip),%rdi
call   1030 <printf@plt>
lea    0xf62(%rip),%rdi
call   1030 <printf@plt>
lea    0xf82(%rip),%rdi
call   1030 <printf@plt>
lea    0xfa9(%rip),%rdi
call   1030 <printf@plt>
lea    0xfdc(%rip),%rdi
call   1030 <printf@plt>
lea    0x100c(%rip),%rdi
call   1030 <printf@plt>
lea    0x1037(%rip),%rdi
call   1030 <printf@plt>
lea    0x1064(%rip),%rdi
call   1030 <printf@plt>
lea    0x1086(%rip),%rdi
call   1030 <printf@plt>
lea    0x10b0(%rip),%rdi
call   1030 <printf@plt>
lea    0x10cf(%rip),%rdi
call   1030 <printf@plt>
lea    0x10ea(%rip),%rdi
call   1030 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_usage>:
push   %rax
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xece(%rip),%rdi
call   1040 <puts@plt>
lea    0xecb(%rip),%rdi
call   1040 <puts@plt>
lea    0xeed(%rip),%rdi
call   1040 <puts@plt>
lea    0xf1f(%rip),%rdi
call   1040 <puts@plt>
lea    0xf53(%rip),%rdi
call   1040 <puts@plt>
lea    0xf72(%rip),%rdi
call   1040 <puts@plt>
lea    0xf98(%rip),%rdi
call   1040 <puts@plt>
lea    0xfca(%rip),%rdi
call   1040 <puts@plt>
lea    0xff9(%rip),%rdi
call   1040 <puts@plt>
lea    0x1023(%rip),%rdi
call   1040 <puts@plt>
lea    0x104f(%rip),%rdi
call   1040 <puts@plt>
lea    0x1070(%rip),%rdi
call   1040 <puts@plt>
lea    0x1099(%rip),%rdi
call   1040 <puts@plt>
lea    0x10b7(%rip),%rdi
call   1040 <puts@plt>
lea    0x10d1(%rip),%rdi
pop    %rax
jmp    1040 <puts@plt>

LLVM IR (-O0):
@.str = [2 x i8] c"\0A\00"
@.str.1 = [10 x i8] c" Options\0A\00"
@.str.2 = [47 x i8] c" -c {channel} Specify one channel from 1-8.\0A\00"
@.str.3 = [63 x i8] c" Otherwise all channels will be driven equally\0A\00"
@.str.4 = [65 x i8] c" -f {hz} Specify pulse frequency, otherwise 50hz is used\0A\00"
@.str.5 = [44 x i8] c" -v Enable 6V servo power rail\0A\00"
@.str.6 = [51 x i8] c" DO NOT use power option with ESCs\0A\00"
@.str.7 = [63 x i8] c" -p {position} Drive servos to a position between -1.5 & 1.5\0A\00"
@.str.8 = [60 x i8] c" -e {throttle} Drive ESCs at normalized throttle from 0-1\0A\00"
@.str.9 = [55 x i8] c" -u {width_us} Send pulse width in microseconds (us)\0A\00"
@.str.10 = [57 x i8] c" -s {limit} Sweep servo back/forth between +- limit\0A\00"
@.str.11 = [46 x i8] c" Limit can be between 0 & 1.5\0A\00"
@.str.12 = [54 x i8] c" -r Use DSM radio input to set ESC speed\0A\00"
@.str.13 = [43 x i8] c" -h Print this help messege \0A\0A\00"
@.str.14 = [39 x i8] c"sample use to center servo channel 1:\0A\00"
@.str.15 = [35 x i8] c" rc_test_servos -v -c 1 -p 0.0\0A\0A\00"
define void @print_usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.2, i64 0, i64 0))
%4 = call i32 @printf(i8* getelementptr inbounds ([63 x i8], [63 x i8]* @.str.3, i64 0, i64 0))
%5 = call i32 @printf(i8* getelementptr inbounds ([65 x i8], [65 x i8]* @.str.4, i64 0, i64 0))
%6 = call i32 @printf(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.5, i64 0, i64 0))
%7 = call i32 @printf(i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str.6, i64 0, i64 0))
%8 = call i32 @printf(i8* getelementptr inbounds ([63 x i8], [63 x i8]* @.str.7, i64 0, i64 0))
%9 = call i32 @printf(i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str.8, i64 0, i64 0))
%10 = call i32 @printf(i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str.9, i64 0, i64 0))
%11 = call i32 @printf(i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str.10, i64 0, i64 0))
%12 = call i32 @printf(i8* getelementptr inbounds ([46 x i8], [46 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 ([43 x i8], [43 x i8]* @.str.13, i64 0, i64 0))
%15 = call i32 @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.14, i64 0, i64 0))
%16 = call i32 @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.15, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [9 x i8] c" Options\00"
@str.16 = [46 x i8] c" -c {channel} Specify one channel from 1-8.\00"
@str.17 = [62 x i8] c" Otherwise all channels will be driven equally\00"
@str.18 = [64 x i8] c" -f {hz} Specify pulse frequency, otherwise 50hz is used\00"
@str.19 = [43 x i8] c" -v Enable 6V servo power rail\00"
@str.20 = [50 x i8] c" DO NOT use power option with ESCs\00"
@str.21 = [62 x i8] c" -p {position} Drive servos to a position between -1.5 & 1.5\00"
@str.22 = [59 x i8] c" -e {throttle} Drive ESCs at normalized throttle from 0-1\00"
@str.23 = [54 x i8] c" -u {width_us} Send pulse width in microseconds (us)\00"
@str.24 = [56 x i8] c" -s {limit} Sweep servo back/forth between +- limit\00"
@str.25 = [45 x i8] c" Limit can be between 0 & 1.5\00"
@str.26 = [53 x i8] c" -r Use DSM radio input to set ESC speed\00"
@str.27 = [42 x i8] c" -h Print this help messege \0A\00"
@str.28 = [38 x i8] c"sample use to center servo channel 1:\00"
@str.29 = [34 x i8] c" rc_test_servos -v -c 1 -p 0.0\0A\00"
define void @print_usage() {
%1 = tail call i32 @putchar(i32 10)
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @str, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([46 x i8], [46 x i8]* @str.16, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([62 x i8], [62 x i8]* @str.17, i64 0, i64 0))
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([64 x i8], [64 x i8]* @str.18, i64 0, i64 0))
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([43 x i8], [43 x i8]* @str.19, i64 0, i64 0))
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([50 x i8], [50 x i8]* @str.20, i64 0, i64 0))
%8 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([62 x i8], [62 x i8]* @str.21, i64 0, i64 0))
%9 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([59 x i8], [59 x i8]* @str.22, i64 0, i64 0))
%10 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([54 x i8], [54 x i8]* @str.23, i64 0, i64 0))
%11 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([56 x i8], [56 x i8]* @str.24, i64 0, i64 0))
%12 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([45 x i8], [45 x i8]* @str.25, i64 0, i64 0))
%13 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([53 x i8], [53 x i8]* @str.26, i64 0, i64 0))
%14 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([42 x i8], [42 x i8]* @str.27, i64 0, i64 0))
%15 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([38 x i8], [38 x i8]* @str.28, i64 0, i64 0))
%16 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @str.29, i64 0, i64 0))
ret void
}