#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(char *proc) {
  printf("usage: %s\n", proc);
  printf("        -c rx              select rx [0..8]\n");
  printf("        -r rxfreq          set rx freq\n");
  printf("        -a rx rate         set rx rate\n");
  printf("        -t rxfreq          set tx freq\n");
  printf("        -b tx rate         set rx rate\n");
  printf("        -s samplerate      use sample rate\n");
  printf("        -u                 init clock chip\n");
  printf("        -p                 init adc and dac\n");
  printf("        -g gain (-9 ..32)  rx 1 gain\n");
  printf("        -k gain (-9 ..32)  rx 2 gain\n");
  printf("        -i att  (0..31)    rx 1 att\n");
  printf("        -j att  (0..31)    rx 2 att\n");
  printf("        -e                 read rx data to stdout\n");
  printf("        -f                 write 2 tone signal to tx data\n");
  printf("        -d reg             select reg\n");
  printf("        -l cnt             read from selected reg to reg+cnt\n");
  printf("        -w val             write val to selected reg\n");
  printf("        -h                 this usage\n");
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xed9(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xed6(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xef5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf0f(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf29(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf43(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf5d(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf7b(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf99(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xfb8(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xfd0(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xfe8(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xfff(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x1016(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x103b(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x1068(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x1081(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x10b1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x10d9(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<usage>:
push   %rax
mov    %rdi,%rsi
lea    0xed5(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xed2(%rip),%rdi
call   1030 <puts@plt>
lea    0xef2(%rip),%rdi
call   1030 <puts@plt>
lea    0xf0d(%rip),%rdi
call   1030 <puts@plt>
lea    0xf28(%rip),%rdi
call   1030 <puts@plt>
lea    0xf43(%rip),%rdi
call   1030 <puts@plt>
lea    0xf5e(%rip),%rdi
call   1030 <puts@plt>
lea    0xf7d(%rip),%rdi
call   1030 <puts@plt>
lea    0xf9c(%rip),%rdi
call   1030 <puts@plt>
lea    0xfbc(%rip),%rdi
call   1030 <puts@plt>
lea    0xfd5(%rip),%rdi
call   1030 <puts@plt>
lea    0xfee(%rip),%rdi
call   1030 <puts@plt>
lea    0x1006(%rip),%rdi
call   1030 <puts@plt>
lea    0x101e(%rip),%rdi
call   1030 <puts@plt>
lea    0x1044(%rip),%rdi
call   1030 <puts@plt>
lea    0x1072(%rip),%rdi
call   1030 <puts@plt>
lea    0x108c(%rip),%rdi
call   1030 <puts@plt>
lea    0x10bd(%rip),%rdi
call   1030 <puts@plt>
lea    0x10e6(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [11 x i8] c"usage: %s\0A\00"
@.str.1 = [45 x i8] c" -c rx select rx [0..8]\0A\00"
@.str.2 = [40 x i8] c" -r rxfreq set rx freq\0A\00"
@.str.3 = [40 x i8] c" -a rx rate set rx rate\0A\00"
@.str.4 = [40 x i8] c" -t rxfreq set tx freq\0A\00"
@.str.5 = [40 x i8] c" -b tx rate set rx rate\0A\00"
@.str.6 = [44 x i8] c" -s samplerate use sample rate\0A\00"
@.str.7 = [44 x i8] c" -u init clock chip\0A\00"
@.str.8 = [45 x i8] c" -p init adc and dac\0A\00"
@.str.9 = [38 x i8] c" -g gain (-9 ..32) rx 1 gain\0A\00"
@.str.10 = [38 x i8] c" -k gain (-9 ..32) rx 2 gain\0A\00"
@.str.11 = [37 x i8] c" -i att (0..31) rx 1 att\0A\00"
@.str.12 = [37 x i8] c" -j att (0..31) rx 2 att\0A\00"
@.str.13 = [51 x i8] c" -e read rx data to stdout\0A\00"
@.str.14 = [59 x i8] c" -f write 2 tone signal to tx data\0A\00"
@.str.15 = [39 x i8] c" -d reg select reg\0A\00"
@.str.16 = [62 x i8] c" -l cnt read from selected reg to reg+cnt\0A\00"
@.str.17 = [54 x i8] c" -w val write val to selected reg\0A\00"
@.str.18 = [39 x i8] c" -h this usage\0A\00"
define void @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.1, i64 0, i64 0))
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.2, i64 0, i64 0))
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.3, i64 0, i64 0))
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.4, i64 0, i64 0))
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.5, i64 0, i64 0))
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.6, i64 0, i64 0))
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.7, i64 0, i64 0))
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.8, i64 0, i64 0))
%13 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.9, i64 0, i64 0))
%14 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.10, i64 0, i64 0))
%15 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.11, i64 0, i64 0))
%16 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.12, i64 0, i64 0))
%17 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str.13, i64 0, i64 0))
%18 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([59 x i8], [59 x i8]* @.str.14, i64 0, i64 0))
%19 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.15, i64 0, i64 0))
%20 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str.16, i64 0, i64 0))
%21 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str.17, i64 0, i64 0))
%22 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.18, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [11 x i8] c"usage: %s\0A\00"
@str = [44 x i8] c" -c rx select rx [0..8]\00"
@str.19 = [39 x i8] c" -r rxfreq set rx freq\00"
@str.20 = [39 x i8] c" -a rx rate set rx rate\00"
@str.21 = [39 x i8] c" -t rxfreq set tx freq\00"
@str.22 = [39 x i8] c" -b tx rate set rx rate\00"
@str.23 = [43 x i8] c" -s samplerate use sample rate\00"
@str.24 = [43 x i8] c" -u init clock chip\00"
@str.25 = [44 x i8] c" -p init adc and dac\00"
@str.26 = [37 x i8] c" -g gain (-9 ..32) rx 1 gain\00"
@str.27 = [37 x i8] c" -k gain (-9 ..32) rx 2 gain\00"
@str.28 = [36 x i8] c" -i att (0..31) rx 1 att\00"
@str.29 = [36 x i8] c" -j att (0..31) rx 2 att\00"
@str.30 = [50 x i8] c" -e read rx data to stdout\00"
@str.31 = [58 x i8] c" -f write 2 tone signal to tx data\00"
@str.32 = [38 x i8] c" -d reg select reg\00"
@str.33 = [61 x i8] c" -l cnt read from selected reg to reg+cnt\00"
@str.34 = [53 x i8] c" -w val write val to selected reg\00"
@str.35 = [38 x i8] c" -h this usage\00"
define void @usage(i8* %0) {
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([44 x i8], [44 x i8]* @str, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([39 x i8], [39 x i8]* @str.19, i64 0, i64 0))
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([39 x i8], [39 x i8]* @str.20, i64 0, i64 0))
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([39 x i8], [39 x i8]* @str.21, i64 0, i64 0))
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([39 x i8], [39 x i8]* @str.22, i64 0, i64 0))
%8 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([43 x i8], [43 x i8]* @str.23, i64 0, i64 0))
%9 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([43 x i8], [43 x i8]* @str.24, i64 0, i64 0))
%10 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([44 x i8], [44 x i8]* @str.25, i64 0, i64 0))
%11 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([37 x i8], [37 x i8]* @str.26, i64 0, i64 0))
%12 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([37 x i8], [37 x i8]* @str.27, i64 0, i64 0))
%13 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @str.28, i64 0, i64 0))
%14 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @str.29, i64 0, i64 0))
%15 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([50 x i8], [50 x i8]* @str.30, i64 0, i64 0))
%16 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([58 x i8], [58 x i8]* @str.31, i64 0, i64 0))
%17 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([38 x i8], [38 x i8]* @str.32, i64 0, i64 0))
%18 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([61 x i8], [61 x i8]* @str.33, i64 0, i64 0))
%19 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([53 x i8], [53 x i8]* @str.34, i64 0, i64 0))
%20 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([38 x i8], [38 x i8]* @str.35, i64 0, i64 0))
ret void
}