#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 show_usage() {
  printf("Usage: seriald [options] <TTY device>\n");
  printf("\n");
  printf("Options:\n");
  printf("  -b <baudrate>\n");
  printf("    baudrate should be one of: 0, 50, 75, 110, 134, 150, 200, 300, "
         "600,\n");
  printf("    1200, 1800, 2400, 4800, 9600, 19200, 38400, 57600, 115200, "
         "230400\n");
  printf("    default to 115200\n");
  printf("  -f s (=soft) | h (=hard) | n (=none)\n");
  printf("    default to n\n");
  printf("  -s <ubus socket>\n");
  printf("    no need to give if you use the default one\n");
  printf("\n");
  printf("Examples:\n");
  printf("  Get data:\n");
  printf("    ubus listen serial\n");
  printf("  Send data (replace <data> with the data you want to send):\n");
  printf("    ubus call serial send '{\"data\": \"<data>\"}'\n");
}


x86 assembly (clang, -O0):
<show_usage>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
call   1030 <printf@plt>
lea    0x10dc(%rip),%rdi
call   1030 <printf@plt>
lea    0xef4(%rip),%rdi
call   1030 <printf@plt>
lea    0xef2(%rip),%rdi
call   1030 <printf@plt>
lea    0xef7(%rip),%rdi
call   1030 <printf@plt>
lea    0xf34(%rip),%rdi
call   1030 <printf@plt>
lea    0xf6f(%rip),%rdi
call   1030 <printf@plt>
lea    0xf7a(%rip),%rdi
call   1030 <printf@plt>
lea    0xf96(%rip),%rdi
call   1030 <printf@plt>
lea    0xf9c(%rip),%rdi
call   1030 <printf@plt>
lea    0xfa4(%rip),%rdi
call   1030 <printf@plt>
lea    0x1064(%rip),%rdi
call   1030 <printf@plt>
lea    0xfbc(%rip),%rdi
call   1030 <printf@plt>
lea    0xfbb(%rip),%rdi
call   1030 <printf@plt>
lea    0xfbc(%rip),%rdi
call   1030 <printf@plt>
lea    0xfc8(%rip),%rdi
call   1030 <printf@plt>
lea    0xffa(%rip),%rdi
call   1030 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<show_usage>:
push   %rax
lea    0xed8(%rip),%rdi
call   1040 <puts@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xee8(%rip),%rdi
call   1040 <puts@plt>
lea    0xee5(%rip),%rdi
call   1040 <puts@plt>
lea    0xee9(%rip),%rdi
call   1040 <puts@plt>
lea    0xf25(%rip),%rdi
call   1040 <puts@plt>
lea    0xf5f(%rip),%rdi
call   1040 <puts@plt>
lea    0xf69(%rip),%rdi
call   1040 <puts@plt>
lea    0xf84(%rip),%rdi
call   1040 <puts@plt>
lea    0xf89(%rip),%rdi
call   1040 <puts@plt>
lea    0xf90(%rip),%rdi
call   1040 <puts@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xfa9(%rip),%rdi
call   1040 <puts@plt>
lea    0xfa7(%rip),%rdi
call   1040 <puts@plt>
lea    0xfa7(%rip),%rdi
call   1040 <puts@plt>
lea    0xfb2(%rip),%rdi
call   1040 <puts@plt>
lea    0xfe3(%rip),%rdi
pop    %rax
jmp    1040 <puts@plt>

LLVM IR (-O0):
@.str = [39 x i8] c"Usage: seriald [options] <TTY device>\0A\00"
@.str.1 = [2 x i8] c"\0A\00"
@.str.2 = [10 x i8] c"Options:\0A\00"
@.str.3 = [17 x i8] c" -b <baudrate>\0A\00"
@.str.4 = [73 x i8] c" baudrate should be one of: 0, 50, 75, 110, 134, 150, 200, 300, 600,\0A\00"
@.str.5 = [71 x i8] c" 1200, 1800, 2400, 4800, 9600, 19200, 38400, 57600, 115200, 230400\0A\00"
@.str.6 = [23 x i8] c" default to 115200\0A\00"
@.str.7 = [40 x i8] c" -f s (=soft) | h (=hard) | n (=none)\0A\00"
@.str.8 = [18 x i8] c" default to n\0A\00"
@.str.9 = [20 x i8] c" -s <ubus socket>\0A\00"
@.str.10 = [48 x i8] c" no need to give if you use the default one\0A\00"
@.str.11 = [11 x i8] c"Examples:\0A\00"
@.str.12 = [13 x i8] c" Get data:\0A\00"
@.str.13 = [24 x i8] c" ubus listen serial\0A\00"
@.str.14 = [62 x i8] c" Send data (replace <data> with the data you want to send):\0A\00"
@.str.15 = [48 x i8] c" ubus call serial send '{\22data\22: \22<data>\22}'\0A\00"
define void @show_usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0))
%4 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.3, i64 0, i64 0))
%5 = call i32 @printf(i8* getelementptr inbounds ([73 x i8], [73 x i8]* @.str.4, i64 0, i64 0))
%6 = call i32 @printf(i8* getelementptr inbounds ([71 x i8], [71 x i8]* @.str.5, i64 0, i64 0))
%7 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.6, i64 0, i64 0))
%8 = call i32 @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.7, i64 0, i64 0))
%9 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.8, i64 0, i64 0))
%10 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.9, i64 0, i64 0))
%11 = call i32 @printf(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.10, i64 0, i64 0))
%12 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%13 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.11, i64 0, i64 0))
%14 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.12, i64 0, i64 0))
%15 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.13, i64 0, i64 0))
%16 = call i32 @printf(i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str.14, i64 0, i64 0))
%17 = call i32 @printf(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.15, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [38 x i8] c"Usage: seriald [options] <TTY device>\00"
@str.16 = [9 x i8] c"Options:\00"
@str.17 = [16 x i8] c" -b <baudrate>\00"
@str.18 = [72 x i8] c" baudrate should be one of: 0, 50, 75, 110, 134, 150, 200, 300, 600,\00"
@str.19 = [70 x i8] c" 1200, 1800, 2400, 4800, 9600, 19200, 38400, 57600, 115200, 230400\00"
@str.20 = [22 x i8] c" default to 115200\00"
@str.21 = [39 x i8] c" -f s (=soft) | h (=hard) | n (=none)\00"
@str.22 = [17 x i8] c" default to n\00"
@str.23 = [19 x i8] c" -s <ubus socket>\00"
@str.24 = [47 x i8] c" no need to give if you use the default one\00"
@str.25 = [10 x i8] c"Examples:\00"
@str.26 = [12 x i8] c" Get data:\00"
@str.27 = [23 x i8] c" ubus listen serial\00"
@str.28 = [61 x i8] c" Send data (replace <data> with the data you want to send):\00"
@str.29 = [47 x i8] c" ubus call serial send '{\22data\22: \22<data>\22}'\00"
define void @show_usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([38 x i8], [38 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @putchar(i32 10)
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @str.16, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @str.17, i64 0, i64 0))
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([72 x i8], [72 x i8]* @str.18, i64 0, i64 0))
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([70 x i8], [70 x i8]* @str.19, i64 0, i64 0))
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @str.20, i64 0, i64 0))
%8 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([39 x i8], [39 x i8]* @str.21, i64 0, i64 0))
%9 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @str.22, i64 0, i64 0))
%10 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @str.23, i64 0, i64 0))
%11 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([47 x i8], [47 x i8]* @str.24, i64 0, i64 0))
%12 = tail call i32 @putchar(i32 10)
%13 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @str.25, i64 0, i64 0))
%14 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @str.26, i64 0, i64 0))
%15 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @str.27, i64 0, i64 0))
%16 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([61 x i8], [61 x i8]* @str.28, i64 0, i64 0))
%17 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([47 x i8], [47 x i8]* @str.29, i64 0, i64 0))
ret void
}