#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 print_usage(void) {
  printf("\n");
  printf("Marvell doimage Tool version %s\n", "1.00");
  printf("Supported SoC devices: \n");
  printf("    Marvell 88F6082 - A1\n");
  printf("    Marvell 88F6180 - A0\n");
  printf("    Marvell 88F6192 - A0\n");
  printf("    Marvell 88F6190 - A0\n");
  printf("    Marvell 88F6281 - A0\n");
  printf("\n");
  printf("usage: \n");
  printf("doimage <must_options> [other_options] image_in image_out "
         "[header_out]\n");
  printf("\n<must_options> - can be one or more of the following:\n\n");
  printf("-T image_type:   sata\\uart\\flash\\bootrom\\nand\\hex\\pex\n");
  printf("                 if image_type is sata, the image_out will\n");
  printf("                 include header only.\n");
  printf("-D image_dest:   image destination in dram (in hex)\n");
  printf("-E image_exec:   execution address in dram (in hex)\n");
  printf("                 if image_type is 'flash' and image_dest is "
         "0xffffffff\n");
  printf("                 then execution address on the flash\n");
  printf(
      "-S image_source: if image_type is sata then the starting sector of\n");
  printf(
      "                 the source image on the disk - mandatory for sata\n");
  printf("                 if image_type is flash\\nand then the starting "
         "offset of\n");
  printf("                 the source image at the flash - optional for "
         "flash\\nand\n");
  printf("-W hex_width :   HEX file width, can be 8,16,32,64 \n");
  printf("-M twsi_file:    ascii file name that contains the I2C init regs set "
         "by h/w.\n");
  printf("                 this is used in i2c boot only\n");
  printf("\n<other_options> - optional and can be one or more of the "
         "following:\n\n");
  printf("-R dram_file: ascii file name that contains the list of dram regs\n");
  printf("-P nand_page_size (decimal 512, 2048, ..): NAND Page size\n");
  printf("-C nand_ecc_mode (1=Hamming, 2=RS, 3=None)\n");
  printf("-L delay in mili seconds before DRAM init\n");
  printf("-I copy image in PIO mode (valid for SATA only)\n");
  printf("-X pre_padding_size (hex)\n");
  printf("-Y post_padding_size (hex)\n");
  printf("-H header_mode: Header mode, can be:\n");
  printf("   -H 1 :will create one file (image_out) for header and image\n");
  printf("   -H 2 :will create two files, (image_out) for image , (header_out) "
         "for header\n");
  printf("   -H 3 :will create one file (image_out) for header only \n");
  printf("   -H 4 :will create one file (image_out) for image only \n");
  printf("\ncommand possibilities: \n\n");
  printf("doimage -T hex -W width image_in image_out\n");
  printf("doimage -T bootrom image_in image_out\n");
  printf("doimage -T sata -S sector -D image_dest -E image_exec\n");
  printf("         [other_options] image_in image_out header_out\n\n");
  printf("doimage -T flash -D image_dest -E image_exec [-S address]\n");
  printf("         [other_options] image_in image_out\n\n");
  printf("doimage -T pex -D image_dest -E image_exec \n");
  printf("         [other_options] image_in image_out\n\n");
  printf("doimage -T nand -D image_dest -E image_exec [-S address] -P "
         "page_size\n");
  printf("         [other_options] image_in image_out\n\n");
  printf("doimage -T uart -D image_dest -E image_exec\n");
  printf("         [other_options] image_in image_out\n\n");
  printf("doimage -T pex -D image_dest -E image_exec \n");
  printf("         [other_options] image_in image_out\n\n");
  printf("doimage -T i2c -D image_dest -E image_exec -M twsi_init_file\n");
  printf("         [other_options] image_in image_out\n\n");
  printf("\n\n\n");
}


x86 assembly (clang, -O0):
<print_usage>:
push   %rbp
mov    %rsp,%rbp
lea    0x185b(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xed7(%rip),%rdi
lea    0xef1(%rip),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xee8(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xef3(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xeff(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf0b(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf17(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf23(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x17e4(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf21(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf1c(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf56(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf81(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xfaa(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xfd8(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xff1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x1018(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x103f(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x1079(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x10a1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x10d7(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x110d(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x1149(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x1185(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x11ac(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x11ec(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x120e(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x1247(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x127c(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x12a9(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x12c7(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x12e4(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x1307(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x1314(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x1322(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x133a(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x136c(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x13af(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x13dd(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x140a(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x1417(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x1435(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x144e(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x1477(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x14a2(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x14cf(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x14ef(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x14b3(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x1500(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x1497(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x152b(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x147b(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x149b(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x145f(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x1520(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x1443(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x1542(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_usage>:
push   %r14
push   %rbx
push   %rax
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xebb(%rip),%rdi
lea    0xed5(%rip),%rsi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xecc(%rip),%rdi
call   1040 <puts@plt>
lea    0xed8(%rip),%rdi
call   1040 <puts@plt>
lea    0xee5(%rip),%rdi
call   1040 <puts@plt>
lea    0xef2(%rip),%rdi
call   1040 <puts@plt>
lea    0xeff(%rip),%rdi
call   1040 <puts@plt>
lea    0xf0c(%rip),%rdi
call   1040 <puts@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xf0f(%rip),%rdi
call   1040 <puts@plt>
lea    0xf0b(%rip),%rdi
call   1040 <puts@plt>
lea    0xf46(%rip),%rdi
call   1040 <puts@plt>
lea    0xf72(%rip),%rdi
call   1040 <puts@plt>
lea    0xf9c(%rip),%rdi
call   1040 <puts@plt>
lea    0xfcb(%rip),%rdi
call   1040 <puts@plt>
lea    0xfe5(%rip),%rdi
call   1040 <puts@plt>
lea    0x100d(%rip),%rdi
call   1040 <puts@plt>
lea    0x1035(%rip),%rdi
call   1040 <puts@plt>
lea    0x1070(%rip),%rdi
call   1040 <puts@plt>
lea    0x1099(%rip),%rdi
call   1040 <puts@plt>
lea    0x10d0(%rip),%rdi
call   1040 <puts@plt>
lea    0x1107(%rip),%rdi
call   1040 <puts@plt>
lea    0x1144(%rip),%rdi
call   1040 <puts@plt>
lea    0x1181(%rip),%rdi
call   1040 <puts@plt>
lea    0x11a9(%rip),%rdi
call   1040 <puts@plt>
lea    0x11ea(%rip),%rdi
call   1040 <puts@plt>
lea    0x120d(%rip),%rdi
call   1040 <puts@plt>
lea    0x1247(%rip),%rdi
call   1040 <puts@plt>
lea    0x127d(%rip),%rdi
call   1040 <puts@plt>
lea    0x12ab(%rip),%rdi
call   1040 <puts@plt>
lea    0x12ca(%rip),%rdi
call   1040 <puts@plt>
lea    0x12e8(%rip),%rdi
call   1040 <puts@plt>
lea    0x130c(%rip),%rdi
call   1040 <puts@plt>
lea    0x131a(%rip),%rdi
call   1040 <puts@plt>
lea    0x1329(%rip),%rdi
call   1040 <puts@plt>
lea    0x1342(%rip),%rdi
call   1040 <puts@plt>
lea    0x1375(%rip),%rdi
call   1040 <puts@plt>
lea    0x13b9(%rip),%rdi
call   1040 <puts@plt>
lea    0x13e8(%rip),%rdi
call   1040 <puts@plt>
lea    0x1416(%rip),%rdi
call   1040 <puts@plt>
lea    0x1424(%rip),%rdi
call   1040 <puts@plt>
lea    0x1443(%rip),%rdi
call   1040 <puts@plt>
lea    0x145d(%rip),%rdi
call   1040 <puts@plt>
lea    0x1487(%rip),%rdi
call   1040 <puts@plt>
lea    0x14b3(%rip),%rdi
call   1040 <puts@plt>
lea    0x15bc(%rip),%rbx
mov    %rbx,%rdi
call   1040 <puts@plt>
lea    0x1544(%rip),%r14
mov    %r14,%rdi
call   1040 <puts@plt>
mov    %rbx,%rdi
call   1040 <puts@plt>
lea    0x14bb(%rip),%rdi
call   1040 <puts@plt>
mov    %rbx,%rdi
call   1040 <puts@plt>
lea    0x14ed(%rip),%rdi
call   1040 <puts@plt>
mov    %rbx,%rdi
call   1040 <puts@plt>
mov    %r14,%rdi
call   1040 <puts@plt>
mov    %rbx,%rdi
call   1040 <puts@plt>
lea    0x1521(%rip),%rdi
call   1040 <puts@plt>
mov    %rbx,%rdi
call   1040 <puts@plt>
lea    0x1577(%rip),%rdi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <puts@plt>

LLVM IR (-O0):
@.str = [2 x i8] c"\0A\00"
@.str.1 = [33 x i8] c"Marvell doimage Tool version %s\0A\00"
@.str.2 = [5 x i8] c"1.00\00"
@.str.3 = [25 x i8] c"Supported SoC devices: \0A\00"
@.str.4 = [26 x i8] c" Marvell 88F6082 - A1\0A\00"
@.str.5 = [26 x i8] c" Marvell 88F6180 - A0\0A\00"
@.str.6 = [26 x i8] c" Marvell 88F6192 - A0\0A\00"
@.str.7 = [26 x i8] c" Marvell 88F6190 - A0\0A\00"
@.str.8 = [26 x i8] c" Marvell 88F6281 - A0\0A\00"
@.str.9 = [9 x i8] c"usage: \0A\00"
@.str.10 = [72 x i8] c"doimage <must_options> [other_options] image_in image_out [header_out]\0A\00"
@.str.11 = [57 x i8] c"\0A<must_options> - can be one or more of the following:\0A\0A\00"
@.str.12 = [55 x i8] c"-T image_type: sata\\uart\\flash\\bootrom\\nand\\hex\\pex\0A\00"
@.str.13 = [60 x i8] c" if image_type is sata, the image_out will\0A\00"
@.str.14 = [39 x i8] c" include header only.\0A\00"
@.str.15 = [53 x i8] c"-D image_dest: image destination in dram (in hex)\0A\00"
@.str.16 = [53 x i8] c"-E image_exec: execution address in dram (in hex)\0A\00"
@.str.17 = [72 x i8] c" if image_type is 'flash' and image_dest is 0xffffffff\0A\00"
@.str.18 = [54 x i8] c" then execution address on the flash\0A\00"
@.str.19 = [68 x i8] c"-S image_source: if image_type is sata then the starting sector of\0A\00"
@.str.20 = [68 x i8] c" the source image on the disk - mandatory for sata\0A\00"
@.str.21 = [74 x i8] c" if image_type is flash\\nand then the starting offset of\0A\00"
@.str.22 = [74 x i8] c" the source image at the flash - optional for flash\\nand\0A\00"
@.str.23 = [53 x i8] c"-W hex_width : HEX file width, can be 8,16,32,64 \0A\00"
@.str.24 = [78 x i8] c"-M twsi_file: ascii file name that contains the I2C init regs set by h/w.\0A\00"
@.str.25 = [48 x i8] c" this is used in i2c boot only\0A\00"
@.str.26 = [71 x i8] c"\0A<other_options> - optional and can be one or more of the following:\0A\0A\00"
@.str.27 = [67 x i8] c"-R dram_file: ascii file name that contains the list of dram regs\0A\00"
@.str.28 = [59 x i8] c"-P nand_page_size (decimal 512, 2048, ..): NAND Page size\0A\00"
@.str.29 = [44 x i8] c"-C nand_ecc_mode (1=Hamming, 2=RS, 3=None)\0A\00"
@.str.30 = [43 x i8] c"-L delay in mili seconds before DRAM init\0A\00"
@.str.31 = [49 x i8] c"-I copy image in PIO mode (valid for SATA only)\0A\00"
@.str.32 = [27 x i8] c"-X pre_padding_size (hex)\0A\00"
@.str.33 = [28 x i8] c"-Y post_padding_size (hex)\0A\00"
@.str.34 = [38 x i8] c"-H header_mode: Header mode, can be:\0A\00"
@.str.35 = [64 x i8] c" -H 1 :will create one file (image_out) for header and image\0A\00"
@.str.36 = [81 x i8] c" -H 2 :will create two files, (image_out) for image , (header_out) for header\0A\00"
@.str.37 = [60 x i8] c" -H 3 :will create one file (image_out) for header only \0A\00"
@.str.38 = [59 x i8] c" -H 4 :will create one file (image_out) for image only \0A\00"
@.str.39 = [27 x i8] c"\0Acommand possibilities: \0A\0A\00"
@.str.40 = [44 x i8] c"doimage -T hex -W width image_in image_out\0A\00"
@.str.41 = [39 x i8] c"doimage -T bootrom image_in image_out\0A\00"
@.str.42 = [55 x i8] c"doimage -T sata -S sector -D image_dest -E image_exec\0A\00"
@.str.43 = [57 x i8] c" [other_options] image_in image_out header_out\0A\0A\00"
@.str.44 = [59 x i8] c"doimage -T flash -D image_dest -E image_exec [-S address]\0A\00"
@.str.45 = [46 x i8] c" [other_options] image_in image_out\0A\0A\00"
@.str.46 = [45 x i8] c"doimage -T pex -D image_dest -E image_exec \0A\00"
@.str.47 = [71 x i8] c"doimage -T nand -D image_dest -E image_exec [-S address] -P page_size\0A\00"
@.str.48 = [45 x i8] c"doimage -T uart -D image_dest -E image_exec\0A\00"
@.str.49 = [62 x i8] c"doimage -T i2c -D image_dest -E image_exec -M twsi_init_file\0A\00"
@.str.50 = [4 x i8] c"\0A\0A\0A\00"
define void @print_usage() {
%1 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%2 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.3, i64 0, i64 0))
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.4, i64 0, i64 0))
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.5, i64 0, i64 0))
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.6, i64 0, i64 0))
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.7, i64 0, i64 0))
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.8, i64 0, i64 0))
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.9, i64 0, i64 0))
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([72 x i8], [72 x i8]* @.str.10, i64 0, i64 0))
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str.11, i64 0, i64 0))
%13 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str.12, i64 0, i64 0))
%14 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str.13, i64 0, i64 0))
%15 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.14, i64 0, i64 0))
%16 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str.15, i64 0, i64 0))
%17 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str.16, i64 0, i64 0))
%18 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([72 x i8], [72 x i8]* @.str.17, i64 0, i64 0))
%19 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str.18, i64 0, i64 0))
%20 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([68 x i8], [68 x i8]* @.str.19, i64 0, i64 0))
%21 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([68 x i8], [68 x i8]* @.str.20, i64 0, i64 0))
%22 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([74 x i8], [74 x i8]* @.str.21, i64 0, i64 0))
%23 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([74 x i8], [74 x i8]* @.str.22, i64 0, i64 0))
%24 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str.23, i64 0, i64 0))
%25 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([78 x i8], [78 x i8]* @.str.24, i64 0, i64 0))
%26 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.25, i64 0, i64 0))
%27 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([71 x i8], [71 x i8]* @.str.26, i64 0, i64 0))
%28 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([67 x i8], [67 x i8]* @.str.27, i64 0, i64 0))
%29 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([59 x i8], [59 x i8]* @.str.28, i64 0, i64 0))
%30 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.29, i64 0, i64 0))
%31 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.30, i64 0, i64 0))
%32 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str.31, i64 0, i64 0))
%33 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.32, i64 0, i64 0))
%34 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.33, i64 0, i64 0))
%35 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.34, i64 0, i64 0))
%36 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([64 x i8], [64 x i8]* @.str.35, i64 0, i64 0))
%37 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([81 x i8], [81 x i8]* @.str.36, i64 0, i64 0))
%38 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str.37, i64 0, i64 0))
%39 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([59 x i8], [59 x i8]* @.str.38, i64 0, i64 0))
%40 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.39, i64 0, i64 0))
%41 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.40, i64 0, i64 0))
%42 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.41, i64 0, i64 0))
%43 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str.42, i64 0, i64 0))
%44 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str.43, i64 0, i64 0))
%45 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([59 x i8], [59 x i8]* @.str.44, i64 0, i64 0))
%46 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.45, i64 0, i64 0))
%47 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.46, i64 0, i64 0))
%48 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.45, i64 0, i64 0))
%49 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([71 x i8], [71 x i8]* @.str.47, i64 0, i64 0))
%50 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.45, i64 0, i64 0))
%51 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.48, i64 0, i64 0))
%52 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.45, i64 0, i64 0))
%53 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.46, i64 0, i64 0))
%54 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.45, i64 0, i64 0))
%55 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str.49, i64 0, i64 0))
%56 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.45, i64 0, i64 0))
%57 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.50, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str.1 = [33 x i8] c"Marvell doimage Tool version %s\0A\00"
@.str.2 = [5 x i8] c"1.00\00"
@str = [24 x i8] c"Supported SoC devices: \00"
@str.51 = [25 x i8] c" Marvell 88F6082 - A1\00"
@str.52 = [25 x i8] c" Marvell 88F6180 - A0\00"
@str.53 = [25 x i8] c" Marvell 88F6192 - A0\00"
@str.54 = [25 x i8] c" Marvell 88F6190 - A0\00"
@str.55 = [25 x i8] c" Marvell 88F6281 - A0\00"
@str.56 = [8 x i8] c"usage: \00"
@str.57 = [71 x i8] c"doimage <must_options> [other_options] image_in image_out [header_out]\00"
@str.58 = [56 x i8] c"\0A<must_options> - can be one or more of the following:\0A\00"
@str.59 = [54 x i8] c"-T image_type: sata\\uart\\flash\\bootrom\\nand\\hex\\pex\00"
@str.60 = [59 x i8] c" if image_type is sata, the image_out will\00"
@str.61 = [38 x i8] c" include header only.\00"
@str.62 = [52 x i8] c"-D image_dest: image destination in dram (in hex)\00"
@str.63 = [52 x i8] c"-E image_exec: execution address in dram (in hex)\00"
@str.64 = [71 x i8] c" if image_type is 'flash' and image_dest is 0xffffffff\00"
@str.65 = [53 x i8] c" then execution address on the flash\00"
@str.66 = [67 x i8] c"-S image_source: if image_type is sata then the starting sector of\00"
@str.67 = [67 x i8] c" the source image on the disk - mandatory for sata\00"
@str.68 = [73 x i8] c" if image_type is flash\\nand then the starting offset of\00"
@str.69 = [73 x i8] c" the source image at the flash - optional for flash\\nand\00"
@str.70 = [52 x i8] c"-W hex_width : HEX file width, can be 8,16,32,64 \00"
@str.71 = [77 x i8] c"-M twsi_file: ascii file name that contains the I2C init regs set by h/w.\00"
@str.72 = [47 x i8] c" this is used in i2c boot only\00"
@str.73 = [70 x i8] c"\0A<other_options> - optional and can be one or more of the following:\0A\00"
@str.74 = [66 x i8] c"-R dram_file: ascii file name that contains the list of dram regs\00"
@str.75 = [58 x i8] c"-P nand_page_size (decimal 512, 2048, ..): NAND Page size\00"
@str.76 = [43 x i8] c"-C nand_ecc_mode (1=Hamming, 2=RS, 3=None)\00"
@str.77 = [42 x i8] c"-L delay in mili seconds before DRAM init\00"
@str.78 = [48 x i8] c"-I copy image in PIO mode (valid for SATA only)\00"
@str.79 = [26 x i8] c"-X pre_padding_size (hex)\00"
@str.80 = [27 x i8] c"-Y post_padding_size (hex)\00"
@str.81 = [37 x i8] c"-H header_mode: Header mode, can be:\00"
@str.82 = [63 x i8] c" -H 1 :will create one file (image_out) for header and image\00"
@str.83 = [80 x i8] c" -H 2 :will create two files, (image_out) for image , (header_out) for header\00"
@str.84 = [59 x i8] c" -H 3 :will create one file (image_out) for header only \00"
@str.85 = [58 x i8] c" -H 4 :will create one file (image_out) for image only \00"
@str.86 = [26 x i8] c"\0Acommand possibilities: \0A\00"
@str.87 = [43 x i8] c"doimage -T hex -W width image_in image_out\00"
@str.88 = [38 x i8] c"doimage -T bootrom image_in image_out\00"
@str.89 = [54 x i8] c"doimage -T sata -S sector -D image_dest -E image_exec\00"
@str.90 = [56 x i8] c" [other_options] image_in image_out header_out\0A\00"
@str.91 = [58 x i8] c"doimage -T flash -D image_dest -E image_exec [-S address]\00"
@str.95 = [70 x i8] c"doimage -T nand -D image_dest -E image_exec [-S address] -P page_size\00"
@str.97 = [44 x i8] c"doimage -T uart -D image_dest -E image_exec\00"
@str.99 = [44 x i8] c"doimage -T pex -D image_dest -E image_exec \00"
@str.101 = [61 x i8] c"doimage -T i2c -D image_dest -E image_exec -M twsi_init_file\00"
@str.102 = [45 x i8] c" [other_options] image_in image_out\0A\00"
@str.103 = [3 x i8] c"\0A\0A\00"
define void @print_usage() {
%1 = tail call i32 @putchar(i32 10)
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @str, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @str.51, i64 0, i64 0))
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @str.52, i64 0, i64 0))
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @str.53, i64 0, i64 0))
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @str.54, i64 0, i64 0))
%8 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @str.55, i64 0, i64 0))
%9 = tail call i32 @putchar(i32 10)
%10 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @str.56, i64 0, i64 0))
%11 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([71 x i8], [71 x i8]* @str.57, i64 0, i64 0))
%12 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([56 x i8], [56 x i8]* @str.58, i64 0, i64 0))
%13 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([54 x i8], [54 x i8]* @str.59, i64 0, i64 0))
%14 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([59 x i8], [59 x i8]* @str.60, i64 0, i64 0))
%15 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([38 x i8], [38 x i8]* @str.61, i64 0, i64 0))
%16 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([52 x i8], [52 x i8]* @str.62, i64 0, i64 0))
%17 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([52 x i8], [52 x i8]* @str.63, i64 0, i64 0))
%18 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([71 x i8], [71 x i8]* @str.64, i64 0, i64 0))
%19 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([53 x i8], [53 x i8]* @str.65, i64 0, i64 0))
%20 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([67 x i8], [67 x i8]* @str.66, i64 0, i64 0))
%21 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([67 x i8], [67 x i8]* @str.67, i64 0, i64 0))
%22 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([73 x i8], [73 x i8]* @str.68, i64 0, i64 0))
%23 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([73 x i8], [73 x i8]* @str.69, i64 0, i64 0))
%24 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([52 x i8], [52 x i8]* @str.70, i64 0, i64 0))
%25 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([77 x i8], [77 x i8]* @str.71, i64 0, i64 0))
%26 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([47 x i8], [47 x i8]* @str.72, i64 0, i64 0))
%27 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([70 x i8], [70 x i8]* @str.73, i64 0, i64 0))
%28 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([66 x i8], [66 x i8]* @str.74, i64 0, i64 0))
%29 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([58 x i8], [58 x i8]* @str.75, i64 0, i64 0))
%30 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([43 x i8], [43 x i8]* @str.76, i64 0, i64 0))
%31 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([42 x i8], [42 x i8]* @str.77, i64 0, i64 0))
%32 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([48 x i8], [48 x i8]* @str.78, i64 0, i64 0))
%33 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @str.79, i64 0, i64 0))
%34 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @str.80, i64 0, i64 0))
%35 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([37 x i8], [37 x i8]* @str.81, i64 0, i64 0))
%36 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([63 x i8], [63 x i8]* @str.82, i64 0, i64 0))
%37 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([80 x i8], [80 x i8]* @str.83, i64 0, i64 0))
%38 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([59 x i8], [59 x i8]* @str.84, i64 0, i64 0))
%39 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([58 x i8], [58 x i8]* @str.85, i64 0, i64 0))
%40 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @str.86, i64 0, i64 0))
%41 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([43 x i8], [43 x i8]* @str.87, i64 0, i64 0))
%42 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([38 x i8], [38 x i8]* @str.88, i64 0, i64 0))
%43 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([54 x i8], [54 x i8]* @str.89, i64 0, i64 0))
%44 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([56 x i8], [56 x i8]* @str.90, i64 0, i64 0))
%45 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([58 x i8], [58 x i8]* @str.91, i64 0, i64 0))
%46 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([45 x i8], [45 x i8]* @str.102, i64 0, i64 0))
%47 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([44 x i8], [44 x i8]* @str.99, i64 0, i64 0))
%48 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([45 x i8], [45 x i8]* @str.102, i64 0, i64 0))
%49 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([70 x i8], [70 x i8]* @str.95, i64 0, i64 0))
%50 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([45 x i8], [45 x i8]* @str.102, i64 0, i64 0))
%51 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([44 x i8], [44 x i8]* @str.97, i64 0, i64 0))
%52 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([45 x i8], [45 x i8]* @str.102, i64 0, i64 0))
%53 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([44 x i8], [44 x i8]* @str.99, i64 0, i64 0))
%54 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([45 x i8], [45 x i8]* @str.102, i64 0, i64 0))
%55 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([61 x i8], [61 x i8]* @str.101, i64 0, i64 0))
%56 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([45 x i8], [45 x i8]* @str.102, i64 0, i64 0))
%57 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @str.103, i64 0, i64 0))
ret void
}