#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 *, char *);
void usage(char **args) {
  printf(
      "Usage: %s [OPTIONS] <src>\n\n"
      "Extracts the kernel, ramdisk, and second-stage bootloader from the\n"
      "provided Android boot image, and outputs them to the same directory.\n"
      "Furthermore, this also creates a remake script that recombines these\n"
      "extracted images into newboot.img, by running mkbootimg with the\n"
      "parameters extracted from the original image header of src.\n\n"
      "OPTIONS:\n"
      "\t<src>: The source Android boot image file to extract from.\n"
      "\t-d <destDir>: Output extracted images here instead.\n"
      "\t-v: Verbose.\n"
      "\t-i: Print header information only, then exit.\n"
      "\t-r <remakeScript>: Save the remake script using this filename\n"
      "\t\tinstead.\n"
      "\t-m <mkbootimgCmd>: Use this command in the remake script for\n"
      "\t\tmkbootimg instead.\n"
      "\t-n <newBootImgName>: Direct the remake script to output the\n"
      "\t\tremade boot image using this filename instead, rather than\n"
      "\t\tnewboot.img.\n",
      args[0]);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rsi
lea    0xed6(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<usage>:
mov    (%rdi),%rsi
lea    0xee6(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [836 x i8] c"Usage: %s [OPTIONS] <src>\0A\0AExtracts the kernel, ramdisk, and second-stage bootloader from the\0Aprovided Android boot image, and outputs them to the same directory.\0AFurthermore, this also creates a remake script that recombines these\0Aextracted images into newboot.img, by running mkbootimg with the\0Aparameters extracted from the original image header of src.\0A\0AOPTIONS:\0A\09<src>: The source Android boot image file to extract from.\0A\09-d <destDir>: Output extracted images here instead.\0A\09-v: Verbose.\0A\09-i: Print header information only, then exit.\0A\09-r <remakeScript>: Save the remake script using this filename\0A\09\09instead.\0A\09-m <mkbootimgCmd>: Use this command in the remake script for\0A\09\09mkbootimg instead.\0A\09-n <newBootImgName>: Direct the remake script to output the\0A\09\09remade boot image using this filename instead, rather than\0A\09\09newboot.img.\0A\00"
define void @usage(i8** %0) {
%2 = alloca i8**
store i8** %0, i8*** %2
%3 = load i8**, i8*** %2
%4 = getelementptr inbounds i8*, i8** %3, i64 0
%5 = load i8*, i8** %4
%6 = call i32 @printf(i8* getelementptr inbounds ([836 x i8], [836 x i8]* @.str, i64 0, i64 0), i8* %5)
ret void
}

LLVM IR (-O2):
@.str = [836 x i8] c"Usage: %s [OPTIONS] <src>\0A\0AExtracts the kernel, ramdisk, and second-stage bootloader from the\0Aprovided Android boot image, and outputs them to the same directory.\0AFurthermore, this also creates a remake script that recombines these\0Aextracted images into newboot.img, by running mkbootimg with the\0Aparameters extracted from the original image header of src.\0A\0AOPTIONS:\0A\09<src>: The source Android boot image file to extract from.\0A\09-d <destDir>: Output extracted images here instead.\0A\09-v: Verbose.\0A\09-i: Print header information only, then exit.\0A\09-r <remakeScript>: Save the remake script using this filename\0A\09\09instead.\0A\09-m <mkbootimgCmd>: Use this command in the remake script for\0A\09\09mkbootimg instead.\0A\09-n <newBootImgName>: Direct the remake script to output the\0A\09\09remade boot image using this filename instead, rather than\0A\09\09newboot.img.\0A\00"
define void @usage(i8** nocapture %0) {
%2 = load i8*, i8** %0
%3 = tail call i32 @printf(i8* getelementptr inbounds ([836 x i8], [836 x i8]* @.str, i64 0, i64 0), i8* %2)
ret void
}