#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(void) {
  printf("amdfwtool: Create AMD Firmware combination\n");
  printf("Usage: amdfwtool [options] -f <size> -o <filename>\n");
  printf("-x | --xhci <FILE>             Add XHCI blob\n");
  printf("-i | --imc <FILE>              Add IMC blob\n");
  printf("-g | --gec <FILE>              Add GEC blob\n");
  printf("\nPSP options:\n");
  printf("-A | --combo-capable           Place PSP directory pointer at "
         "Embedded Firmware\n");
  printf("                               offset able to support combo "
         "directory\n");
  printf("-p | --pubkey <FILE>           Add pubkey\n");
  printf("-b | --bootloader <FILE>       Add bootloader\n");
  printf("-S | --subprogram <number>     Sets subprogram field for the next "
         "firmware\n");
  printf("-s | --smufirmware <FILE>      Add smufirmware\n");
  printf("-r | --recovery <FILE>         Add recovery\n");
  printf("-k | --rtmpubkey <FILE>        Add rtmpubkey\n");
  printf("-c | --secureos <FILE>         Add secureos\n");
  printf("-n | --nvram <FILE>            Add nvram\n");
  printf("-d | --securedebug <FILE>      Add securedebug\n");
  printf("-t | --trustlets <FILE>        Add trustlets\n");
  printf("-u | --trustletkey <FILE>      Add trustletkey\n");
  printf("-w | --smufirmware2 <FILE>     Add smufirmware2\n");
  printf("-m | --smuscs <FILE>           Add smuscs\n");
  printf("\n-o | --output <filename>     output filename\n");
  printf("-f | --flashsize <HEX_VAL>     ROM size in bytes\n");
  printf("                               size must be larger than %dKB\n", 256);
  printf("                               and must a multiple of 1024\n");
  printf("-l | --location                Location of Directory\n");
  printf("-h | --help                    show this help\n");
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf03(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf29(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf49(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf68(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf87(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf88(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xfcb(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x1004(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x1021(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x1042(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x1080(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x10a2(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x10c1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x10e1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x1100(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x111c(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x113e(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x115e(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x1180(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x11a3(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x11c0(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x11e1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x1205(%rip),%rdi
mov    $0x100,%esi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x1230(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x125e(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x1286(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<usage>:
push   %rax
lea    0xf16(%rip),%rdi
call   1030 <puts@plt>
lea    0xf35(%rip),%rdi
call   1030 <puts@plt>
lea    0xf5c(%rip),%rdi
call   1030 <puts@plt>
lea    0xf7d(%rip),%rdi
call   1030 <puts@plt>
lea    0xf9d(%rip),%rdi
call   1030 <puts@plt>
lea    0xfbd(%rip),%rdi
call   1030 <puts@plt>
lea    0xfbf(%rip),%rdi
call   1030 <puts@plt>
lea    0x1003(%rip),%rdi
call   1030 <puts@plt>
lea    0x103d(%rip),%rdi
call   1030 <puts@plt>
lea    0x105b(%rip),%rdi
call   1030 <puts@plt>
lea    0x107d(%rip),%rdi
call   1030 <puts@plt>
lea    0x10bc(%rip),%rdi
call   1030 <puts@plt>
lea    0x10df(%rip),%rdi
call   1030 <puts@plt>
lea    0x10ff(%rip),%rdi
call   1030 <puts@plt>
lea    0x1120(%rip),%rdi
call   1030 <puts@plt>
lea    0x1140(%rip),%rdi
call   1030 <puts@plt>
lea    0x115d(%rip),%rdi
call   1030 <puts@plt>
lea    0x1180(%rip),%rdi
call   1030 <puts@plt>
lea    0x11a1(%rip),%rdi
call   1030 <puts@plt>
lea    0x11c4(%rip),%rdi
call   1030 <puts@plt>
lea    0x11e8(%rip),%rdi
call   1030 <puts@plt>
lea    0x1206(%rip),%rdi
call   1030 <puts@plt>
lea    0x1228(%rip),%rdi
call   1030 <puts@plt>
lea    0xdc4(%rip),%rdi
mov    $0x100,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0x123a(%rip),%rdi
call   1030 <puts@plt>
lea    0x1269(%rip),%rdi
call   1030 <puts@plt>
lea    0x1292(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [44 x i8] c"amdfwtool: Create AMD Firmware combination\0A\00"
@.str.1 = [52 x i8] c"Usage: amdfwtool [options] -f <size> -o <filename>\0A\00"
@.str.2 = [46 x i8] c"-x | --xhci <FILE> Add XHCI blob\0A\00"
@.str.3 = [45 x i8] c"-i | --imc <FILE> Add IMC blob\0A\00"
@.str.4 = [45 x i8] c"-g | --gec <FILE> Add GEC blob\0A\00"
@.str.5 = [15 x i8] c"\0APSP options:\0A\00"
@.str.6 = [81 x i8] c"-A | --combo-capable Place PSP directory pointer at Embedded Firmware\0A\00"
@.str.7 = [71 x i8] c" offset able to support combo directory\0A\00"
@.str.8 = [43 x i8] c"-p | --pubkey <FILE> Add pubkey\0A\00"
@.str.9 = [47 x i8] c"-b | --bootloader <FILE> Add bootloader\0A\00"
@.str.10 = [76 x i8] c"-S | --subprogram <number> Sets subprogram field for the next firmware\0A\00"
@.str.11 = [48 x i8] c"-s | --smufirmware <FILE> Add smufirmware\0A\00"
@.str.12 = [45 x i8] c"-r | --recovery <FILE> Add recovery\0A\00"
@.str.13 = [46 x i8] c"-k | --rtmpubkey <FILE> Add rtmpubkey\0A\00"
@.str.14 = [45 x i8] c"-c | --secureos <FILE> Add secureos\0A\00"
@.str.15 = [42 x i8] c"-n | --nvram <FILE> Add nvram\0A\00"
@.str.16 = [48 x i8] c"-d | --securedebug <FILE> Add securedebug\0A\00"
@.str.17 = [46 x i8] c"-t | --trustlets <FILE> Add trustlets\0A\00"
@.str.18 = [48 x i8] c"-u | --trustletkey <FILE> Add trustletkey\0A\00"
@.str.19 = [49 x i8] c"-w | --smufirmware2 <FILE> Add smufirmware2\0A\00"
@.str.20 = [43 x i8] c"-m | --smuscs <FILE> Add smuscs\0A\00"
@.str.21 = [47 x i8] c"\0A-o | --output <filename> output filename\0A\00"
@.str.22 = [50 x i8] c"-f | --flashsize <HEX_VAL> ROM size in bytes\0A\00"
@.str.23 = [62 x i8] c" size must be larger than %dKB\0A\00"
@.str.24 = [60 x i8] c" and must a multiple of 1024\0A\00"
@.str.25 = [54 x i8] c"-l | --location Location of Directory\0A\00"
@.str.26 = [47 x i8] c"-h | --help show this help\0A\00"
define void @usage() {
%1 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str, i64 0, i64 0))
%2 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.2, i64 0, i64 0))
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.3, i64 0, i64 0))
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.4, i64 0, i64 0))
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.5, i64 0, i64 0))
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([81 x i8], [81 x i8]* @.str.6, i64 0, i64 0))
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([71 x i8], [71 x i8]* @.str.7, i64 0, i64 0))
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.8, i64 0, i64 0))
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.9, i64 0, i64 0))
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([76 x i8], [76 x i8]* @.str.10, i64 0, i64 0))
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.11, i64 0, i64 0))
%13 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.12, i64 0, i64 0))
%14 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.13, i64 0, i64 0))
%15 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.14, i64 0, i64 0))
%16 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.15, i64 0, i64 0))
%17 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.16, i64 0, i64 0))
%18 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.17, i64 0, i64 0))
%19 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.18, i64 0, i64 0))
%20 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str.19, i64 0, i64 0))
%21 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.20, i64 0, i64 0))
%22 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.21, i64 0, i64 0))
%23 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.22, i64 0, i64 0))
%24 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str.23, i64 0, i64 0), i32 256)
%25 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str.24, i64 0, i64 0))
%26 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str.25, i64 0, i64 0))
%27 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.26, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str.23 = [62 x i8] c" size must be larger than %dKB\0A\00"
@str = [43 x i8] c"amdfwtool: Create AMD Firmware combination\00"
@str.27 = [51 x i8] c"Usage: amdfwtool [options] -f <size> -o <filename>\00"
@str.28 = [45 x i8] c"-x | --xhci <FILE> Add XHCI blob\00"
@str.29 = [44 x i8] c"-i | --imc <FILE> Add IMC blob\00"
@str.30 = [44 x i8] c"-g | --gec <FILE> Add GEC blob\00"
@str.31 = [14 x i8] c"\0APSP options:\00"
@str.32 = [80 x i8] c"-A | --combo-capable Place PSP directory pointer at Embedded Firmware\00"
@str.33 = [70 x i8] c" offset able to support combo directory\00"
@str.34 = [42 x i8] c"-p | --pubkey <FILE> Add pubkey\00"
@str.35 = [46 x i8] c"-b | --bootloader <FILE> Add bootloader\00"
@str.36 = [75 x i8] c"-S | --subprogram <number> Sets subprogram field for the next firmware\00"
@str.37 = [47 x i8] c"-s | --smufirmware <FILE> Add smufirmware\00"
@str.38 = [44 x i8] c"-r | --recovery <FILE> Add recovery\00"
@str.39 = [45 x i8] c"-k | --rtmpubkey <FILE> Add rtmpubkey\00"
@str.40 = [44 x i8] c"-c | --secureos <FILE> Add secureos\00"
@str.41 = [41 x i8] c"-n | --nvram <FILE> Add nvram\00"
@str.42 = [47 x i8] c"-d | --securedebug <FILE> Add securedebug\00"
@str.43 = [45 x i8] c"-t | --trustlets <FILE> Add trustlets\00"
@str.44 = [47 x i8] c"-u | --trustletkey <FILE> Add trustletkey\00"
@str.45 = [48 x i8] c"-w | --smufirmware2 <FILE> Add smufirmware2\00"
@str.46 = [42 x i8] c"-m | --smuscs <FILE> Add smuscs\00"
@str.47 = [46 x i8] c"\0A-o | --output <filename> output filename\00"
@str.48 = [49 x i8] c"-f | --flashsize <HEX_VAL> ROM size in bytes\00"
@str.49 = [59 x i8] c" and must a multiple of 1024\00"
@str.50 = [53 x i8] c"-l | --location Location of Directory\00"
@str.51 = [46 x i8] c"-h | --help show this help\00"
define void @usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([43 x i8], [43 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([51 x i8], [51 x i8]* @str.27, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([45 x i8], [45 x i8]* @str.28, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([44 x i8], [44 x i8]* @str.29, i64 0, i64 0))
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([44 x i8], [44 x i8]* @str.30, i64 0, i64 0))
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @str.31, i64 0, i64 0))
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([80 x i8], [80 x i8]* @str.32, i64 0, i64 0))
%8 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([70 x i8], [70 x i8]* @str.33, i64 0, i64 0))
%9 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([42 x i8], [42 x i8]* @str.34, i64 0, i64 0))
%10 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([46 x i8], [46 x i8]* @str.35, i64 0, i64 0))
%11 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([75 x i8], [75 x i8]* @str.36, i64 0, i64 0))
%12 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([47 x i8], [47 x i8]* @str.37, i64 0, i64 0))
%13 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([44 x i8], [44 x i8]* @str.38, i64 0, i64 0))
%14 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([45 x i8], [45 x i8]* @str.39, i64 0, i64 0))
%15 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([44 x i8], [44 x i8]* @str.40, i64 0, i64 0))
%16 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([41 x i8], [41 x i8]* @str.41, i64 0, i64 0))
%17 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([47 x i8], [47 x i8]* @str.42, i64 0, i64 0))
%18 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([45 x i8], [45 x i8]* @str.43, i64 0, i64 0))
%19 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([47 x i8], [47 x i8]* @str.44, i64 0, i64 0))
%20 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([48 x i8], [48 x i8]* @str.45, i64 0, i64 0))
%21 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([42 x i8], [42 x i8]* @str.46, i64 0, i64 0))
%22 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([46 x i8], [46 x i8]* @str.47, i64 0, i64 0))
%23 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([49 x i8], [49 x i8]* @str.48, i64 0, i64 0))
%24 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([62 x i8], [62 x i8]* @.str.23, i64 0, i64 0), i32 256)
%25 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([59 x i8], [59 x i8]* @str.49, i64 0, i64 0))
%26 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([53 x i8], [53 x i8]* @str.50, i64 0, i64 0))
%27 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([46 x i8], [46 x i8]* @str.51, i64 0, i64 0))
ret void
}