#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(const char *app) {
  printf("Usage: %s -d <rpmsg_device_path> [<options>]\n", app);
  printf("Common options:\n");
  printf("\t-d <rpmsg_device_path>         - Rpmsg device path (Mandatory)\n");
  printf("\t-h                             - Display this help (Optional)\n");
  printf("\t-r <rpmsg_max_kernel_buf_size> - Rpmsg max kernel buffer size "
         "(Optional)\n");
  printf("\t-s                             - Server mode (Optional)\n");
  printf("\t-v                             - Verbose (Optional)\n");
  printf("Client options:\n");
  printf("\t-f <fixed_payload_size>        - Use specified fixed payload size "
         "(Optional)\n");
  printf(
      "\t-i                             - Check data integrity (Optional)\n");
  printf("\t-l <local_address>             - Use specified local address "
         "(Optional)\n");
  printf("\t-n <number_of_rounds>          - Number of rounds (Optional)\n");
  printf("\t-p <payloads_per_round>        - Number of payloads per round "
         "(Optional)\n");
  printf("\t-u                             - Unidirectional transfer "
         "(Optional)\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    0xef9(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xefc(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf2f(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf61(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf9e(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xfca(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xff2(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xff5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x1036(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x106b(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x10a7(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x10d8(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x1115(%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    0xef5(%rip),%rdi
call   1030 <puts@plt>
lea    0xef9(%rip),%rdi
call   1030 <puts@plt>
lea    0xf2d(%rip),%rdi
call   1030 <puts@plt>
lea    0xf60(%rip),%rdi
call   1030 <puts@plt>
lea    0xf9e(%rip),%rdi
call   1030 <puts@plt>
lea    0xfcb(%rip),%rdi
call   1030 <puts@plt>
lea    0xff4(%rip),%rdi
call   1030 <puts@plt>
lea    0xff8(%rip),%rdi
call   1030 <puts@plt>
lea    0x103a(%rip),%rdi
call   1030 <puts@plt>
lea    0x1070(%rip),%rdi
call   1030 <puts@plt>
lea    0x10ad(%rip),%rdi
call   1030 <puts@plt>
lea    0x10df(%rip),%rdi
call   1030 <puts@plt>
lea    0x111d(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [46 x i8] c"Usage: %s -d <rpmsg_device_path> [<options>]\0A\00"
@.str.1 = [17 x i8] c"Common options:\0A\00"
@.str.2 = [65 x i8] c"\09-d <rpmsg_device_path> - Rpmsg device path (Mandatory)\0A\00"
@.str.3 = [64 x i8] c"\09-h - Display this help (Optional)\0A\00"
@.str.4 = [75 x i8] c"\09-r <rpmsg_max_kernel_buf_size> - Rpmsg max kernel buffer size (Optional)\0A\00"
@.str.5 = [58 x i8] c"\09-s - Server mode (Optional)\0A\00"
@.str.6 = [54 x i8] c"\09-v - Verbose (Optional)\0A\00"
@.str.7 = [17 x i8] c"Client options:\0A\00"
@.str.8 = [79 x i8] c"\09-f <fixed_payload_size> - Use specified fixed payload size (Optional)\0A\00"
@.str.9 = [67 x i8] c"\09-i - Check data integrity (Optional)\0A\00"
@.str.10 = [74 x i8] c"\09-l <local_address> - Use specified local address (Optional)\0A\00"
@.str.11 = [63 x i8] c"\09-n <number_of_rounds> - Number of rounds (Optional)\0A\00"
@.str.12 = [75 x i8] c"\09-p <payloads_per_round> - Number of payloads per round (Optional)\0A\00"
@.str.13 = [70 x i8] c"\09-u - Unidirectional transfer (Optional)\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 ([46 x i8], [46 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0))
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([65 x i8], [65 x i8]* @.str.2, i64 0, i64 0))
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([64 x i8], [64 x i8]* @.str.3, i64 0, i64 0))
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([75 x i8], [75 x i8]* @.str.4, i64 0, i64 0))
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str.5, i64 0, i64 0))
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str.6, i64 0, i64 0))
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.7, i64 0, i64 0))
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([79 x i8], [79 x i8]* @.str.8, i64 0, i64 0))
%13 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([67 x i8], [67 x i8]* @.str.9, i64 0, i64 0))
%14 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([74 x i8], [74 x i8]* @.str.10, i64 0, i64 0))
%15 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([63 x i8], [63 x i8]* @.str.11, i64 0, i64 0))
%16 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([75 x i8], [75 x i8]* @.str.12, i64 0, i64 0))
%17 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([70 x i8], [70 x i8]* @.str.13, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [46 x i8] c"Usage: %s -d <rpmsg_device_path> [<options>]\0A\00"
@str = [16 x i8] c"Common options:\00"
@str.14 = [64 x i8] c"\09-d <rpmsg_device_path> - Rpmsg device path (Mandatory)\00"
@str.15 = [63 x i8] c"\09-h - Display this help (Optional)\00"
@str.16 = [74 x i8] c"\09-r <rpmsg_max_kernel_buf_size> - Rpmsg max kernel buffer size (Optional)\00"
@str.17 = [57 x i8] c"\09-s - Server mode (Optional)\00"
@str.18 = [53 x i8] c"\09-v - Verbose (Optional)\00"
@str.19 = [16 x i8] c"Client options:\00"
@str.20 = [78 x i8] c"\09-f <fixed_payload_size> - Use specified fixed payload size (Optional)\00"
@str.21 = [66 x i8] c"\09-i - Check data integrity (Optional)\00"
@str.22 = [73 x i8] c"\09-l <local_address> - Use specified local address (Optional)\00"
@str.23 = [62 x i8] c"\09-n <number_of_rounds> - Number of rounds (Optional)\00"
@str.24 = [74 x i8] c"\09-p <payloads_per_round> - Number of payloads per round (Optional)\00"
@str.25 = [69 x i8] c"\09-u - Unidirectional transfer (Optional)\00"
define void @usage(i8* %0) {
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([46 x i8], [46 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @str, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([64 x i8], [64 x i8]* @str.14, i64 0, i64 0))
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([63 x i8], [63 x i8]* @str.15, i64 0, i64 0))
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([74 x i8], [74 x i8]* @str.16, i64 0, i64 0))
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([57 x i8], [57 x i8]* @str.17, i64 0, i64 0))
%8 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([53 x i8], [53 x i8]* @str.18, i64 0, i64 0))
%9 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @str.19, i64 0, i64 0))
%10 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([78 x i8], [78 x i8]* @str.20, i64 0, i64 0))
%11 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([66 x i8], [66 x i8]* @str.21, i64 0, i64 0))
%12 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([73 x i8], [73 x i8]* @str.22, i64 0, i64 0))
%13 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([62 x i8], [62 x i8]* @str.23, i64 0, i64 0))
%14 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([74 x i8], [74 x i8]* @str.24, i64 0, i64 0))
%15 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([69 x i8], [69 x i8]* @str.25, i64 0, i64 0))
ret void
}