#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*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void usage() {
  fprintf(stderr, "bbtool - bbupdater replacement under GPL license\n");
  fprintf(stderr,
          "Usage: bbtool [-v] [-h] [-D device] [-B baud rate] [-s secpack] [-b "
          "memory address] [-n length] [-r file | -x | -w file]\n");
  fprintf(stderr, "Address and length may be specified in decimal or hex (with "
                  "a preceding 0x).\n");
  fprintf(stderr, "If no operation (-x, -r or -w) is given, the baseband will "
                  "be reset and the boot loader version displayed.\n");
  fprintf(stderr, "   -D: set serial device\n");
  fprintf(stderr, "   -B: set baud rate\n");
  fprintf(stderr, "   -b: memory region start\n");
  fprintf(stderr, "   -n: length (can be omitted for write mode)\n");
  fprintf(stderr, "   -s: specify secpack for erase operation\n");
  fprintf(stderr, "   -r: read region into the given file\n");
  fprintf(stderr, "   -x: erase region\n");
  fprintf(stderr, "   -w: write region from the given file\n");
  fprintf(stderr, "   -h: show this help\n");
  fprintf(stderr,
          "   -v: increase verbosity (default is INFO, -v raises to DEBUG)\n");
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ec5(%rip),%rax
mov    (%rax),%edi
lea    0xedc(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2eb0(%rip),%rax
mov    (%rax),%edi
lea    0xef9(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e9b(%rip),%rax
mov    (%rax),%edi
lea    0xf5e(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e86(%rip),%rax
mov    (%rax),%edi
lea    0xf97(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e71(%rip),%rax
mov    (%rax),%edi
lea    0xfee(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e5c(%rip),%rax
mov    (%rax),%edi
lea    0xff3(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e47(%rip),%rax
mov    (%rax),%edi
lea    0xff4(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e32(%rip),%rax
mov    (%rax),%edi
lea    0xffb(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e1d(%rip),%rax
mov    (%rax),%edi
lea    0x1015(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e08(%rip),%rax
mov    (%rax),%edi
lea    0x102c(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2df3(%rip),%rax
mov    (%rax),%edi
lea    0x103f(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2dde(%rip),%rax
mov    (%rax),%edi
lea    0x103f(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2dc9(%rip),%rax
mov    (%rax),%edi
lea    0x1053(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2db4(%rip),%rax
mov    (%rax),%edi
lea    0x1055(%rip),%rsi
call   1030 <fprintf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<usage>:
push   %rbx
mov    0x2ec8(%rip),%rbx
mov    (%rbx),%edi
lea    0xedf(%rip),%rsi
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0xf03(%rip),%rsi
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0xf6f(%rip),%rsi
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0xfaf(%rip),%rsi
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0x100d(%rip),%rsi
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0x1019(%rip),%rsi
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0x1021(%rip),%rsi
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0x102f(%rip),%rsi
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0x1050(%rip),%rsi
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0x106e(%rip),%rsi
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0x1088(%rip),%rsi
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0x108f(%rip),%rsi
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0x10aa(%rip),%rsi
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0x10b3(%rip),%rsi
pop    %rbx
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [50 x i8] c"bbtool - bbupdater replacement under GPL license\0A\00"
@.str.1 = [122 x i8] c"Usage: bbtool [-v] [-h] [-D device] [-B baud rate] [-s secpack] [-b memory address] [-n length] [-r file | -x | -w file]\0A\00"
@.str.2 = [78 x i8] c"Address and length may be specified in decimal or hex (with a preceding 0x).\0A\00"
@.str.3 = [108 x i8] c"If no operation (-x, -r or -w) is given, the baseband will be reset and the boot loader version displayed.\0A\00"
@.str.4 = [26 x i8] c" -D: set serial device\0A\00"
@.str.5 = [22 x i8] c" -B: set baud rate\0A\00"
@.str.6 = [28 x i8] c" -b: memory region start\0A\00"
@.str.7 = [47 x i8] c" -n: length (can be omitted for write mode)\0A\00"
@.str.8 = [44 x i8] c" -s: specify secpack for erase operation\0A\00"
@.str.9 = [40 x i8] c" -r: read region into the given file\0A\00"
@.str.10 = [21 x i8] c" -x: erase region\0A\00"
@.str.11 = [41 x i8] c" -w: write region from the given file\0A\00"
@.str.12 = [23 x i8] c" -h: show this help\0A\00"
@.str.13 = [65 x i8] c" -v: increase verbosity (default is INFO, -v raises to DEBUG)\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* @stderr
%4 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([122 x i8], [122 x i8]* @.str.1, i64 0, i64 0))
%5 = load i32, i32* @stderr
%6 = call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([78 x i8], [78 x i8]* @.str.2, i64 0, i64 0))
%7 = load i32, i32* @stderr
%8 = call i32 @fprintf(i32 %7, i8* getelementptr inbounds ([108 x i8], [108 x i8]* @.str.3, i64 0, i64 0))
%9 = load i32, i32* @stderr
%10 = call i32 @fprintf(i32 %9, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.4, i64 0, i64 0))
%11 = load i32, i32* @stderr
%12 = call i32 @fprintf(i32 %11, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.5, i64 0, i64 0))
%13 = load i32, i32* @stderr
%14 = call i32 @fprintf(i32 %13, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.6, i64 0, i64 0))
%15 = load i32, i32* @stderr
%16 = call i32 @fprintf(i32 %15, i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.7, i64 0, i64 0))
%17 = load i32, i32* @stderr
%18 = call i32 @fprintf(i32 %17, i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.8, i64 0, i64 0))
%19 = load i32, i32* @stderr
%20 = call i32 @fprintf(i32 %19, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.9, i64 0, i64 0))
%21 = load i32, i32* @stderr
%22 = call i32 @fprintf(i32 %21, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.10, i64 0, i64 0))
%23 = load i32, i32* @stderr
%24 = call i32 @fprintf(i32 %23, i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.11, i64 0, i64 0))
%25 = load i32, i32* @stderr
%26 = call i32 @fprintf(i32 %25, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.12, i64 0, i64 0))
%27 = load i32, i32* @stderr
%28 = call i32 @fprintf(i32 %27, i8* getelementptr inbounds ([65 x i8], [65 x i8]* @.str.13, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [50 x i8] c"bbtool - bbupdater replacement under GPL license\0A\00"
@.str.1 = [122 x i8] c"Usage: bbtool [-v] [-h] [-D device] [-B baud rate] [-s secpack] [-b memory address] [-n length] [-r file | -x | -w file]\0A\00"
@.str.2 = [78 x i8] c"Address and length may be specified in decimal or hex (with a preceding 0x).\0A\00"
@.str.3 = [108 x i8] c"If no operation (-x, -r or -w) is given, the baseband will be reset and the boot loader version displayed.\0A\00"
@.str.4 = [26 x i8] c" -D: set serial device\0A\00"
@.str.5 = [22 x i8] c" -B: set baud rate\0A\00"
@.str.6 = [28 x i8] c" -b: memory region start\0A\00"
@.str.7 = [47 x i8] c" -n: length (can be omitted for write mode)\0A\00"
@.str.8 = [44 x i8] c" -s: specify secpack for erase operation\0A\00"
@.str.9 = [40 x i8] c" -r: read region into the given file\0A\00"
@.str.10 = [21 x i8] c" -x: erase region\0A\00"
@.str.11 = [41 x i8] c" -w: write region from the given file\0A\00"
@.str.12 = [23 x i8] c" -h: show this help\0A\00"
@.str.13 = [65 x i8] c" -v: increase verbosity (default is INFO, -v raises to DEBUG)\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* @stderr
%4 = tail call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([122 x i8], [122 x i8]* @.str.1, i64 0, i64 0))
%5 = load i32, i32* @stderr
%6 = tail call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([78 x i8], [78 x i8]* @.str.2, i64 0, i64 0))
%7 = load i32, i32* @stderr
%8 = tail call i32 @fprintf(i32 %7, i8* getelementptr inbounds ([108 x i8], [108 x i8]* @.str.3, i64 0, i64 0))
%9 = load i32, i32* @stderr
%10 = tail call i32 @fprintf(i32 %9, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.4, i64 0, i64 0))
%11 = load i32, i32* @stderr
%12 = tail call i32 @fprintf(i32 %11, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.5, i64 0, i64 0))
%13 = load i32, i32* @stderr
%14 = tail call i32 @fprintf(i32 %13, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.6, i64 0, i64 0))
%15 = load i32, i32* @stderr
%16 = tail call i32 @fprintf(i32 %15, i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.7, i64 0, i64 0))
%17 = load i32, i32* @stderr
%18 = tail call i32 @fprintf(i32 %17, i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.8, i64 0, i64 0))
%19 = load i32, i32* @stderr
%20 = tail call i32 @fprintf(i32 %19, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.9, i64 0, i64 0))
%21 = load i32, i32* @stderr
%22 = tail call i32 @fprintf(i32 %21, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.10, i64 0, i64 0))
%23 = load i32, i32* @stderr
%24 = tail call i32 @fprintf(i32 %23, i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.11, i64 0, i64 0))
%25 = load i32, i32* @stderr
%26 = tail call i32 @fprintf(i32 %25, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.12, i64 0, i64 0))
%27 = load i32, i32* @stderr
%28 = tail call i32 @fprintf(i32 %27, i8* getelementptr inbounds ([65 x i8], [65 x i8]* @.str.13, i64 0, i64 0))
ret void
}