#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*/ exit(int);
int /*<<< orphan*/ printf(char *, ...);
void usage(int rc) {
  printf("Usage: %s [-h?tvVPRCcs] [-p <public.key>] [-k <zImage>] "
         "[-f <fs.bin>] <file.sgu>\n",
         "sgutool");
  printf("\n\t-h?\t\tthis help\n"
         "\t-v\t\tverbose output\n"
         "\t-t\t\ttrace output\n"
         "\t-V\t\treport VENDOR type of image\n"
         "\t-P\t\treport PRODUCT type of image\n"
         "\t-R\t\treport VERSION stamped in image\n"
         "\t-C\t\treport CHECKSUM stamped in image\n"
         "\t-c\t\treport generated image checksum\n"
         "\t-s\t\treport checksum status (good/bad)\n"
         "\t-p <public.key>\tkey file to use (default /etc/publickey.pem)\n"
         "\t-k <zImage>\twrite out kernel to file <zImage>\n"
         "\t-f <fs.bin>\twrite out filesystem to file <fs.bin>\n");
  exit(rc);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    0xece(%rip),%rdi
lea    0xf19(%rip),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf13(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x4(%rbp),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rbx
mov    %edi,%ebx
lea    0xec6(%rip),%rdi
lea    0xf11(%rip),%rsi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xf0b(%rip),%rdi
call   1030 <puts@plt>
mov    %ebx,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [82 x i8] c"Usage: %s [-h?tvVPRCcs] [-p <public.key>] [-k <zImage>] [-f <fs.bin>] <file.sgu>\0A\00"
@.str.1 = [8 x i8] c"sgutool\00"
@.str.2 = [434 x i8] c"\0A\09-h?\09\09this help\0A\09-v\09\09verbose output\0A\09-t\09\09trace output\0A\09-V\09\09report VENDOR type of image\0A\09-P\09\09report PRODUCT type of image\0A\09-R\09\09report VERSION stamped in image\0A\09-C\09\09report CHECKSUM stamped in image\0A\09-c\09\09report generated image checksum\0A\09-s\09\09report checksum status (good/bad)\0A\09-p <public.key>\09key file to use (default /etc/publickey.pem)\0A\09-k <zImage>\09write out kernel to file <zImage>\0A\09-f <fs.bin>\09write out filesystem to file <fs.bin>\0A\00"
define void @usage(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([82 x i8], [82 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([434 x i8], [434 x i8]* @.str.2, i64 0, i64 0))
%5 = load i32, i32* %2
%6 = call i32 @exit(i32 %5)
unreachable
}

LLVM IR (-O2):
@.str = [82 x i8] c"Usage: %s [-h?tvVPRCcs] [-p <public.key>] [-k <zImage>] [-f <fs.bin>] <file.sgu>\0A\00"
@.str.1 = [8 x i8] c"sgutool\00"
@str = [433 x i8] c"\0A\09-h?\09\09this help\0A\09-v\09\09verbose output\0A\09-t\09\09trace output\0A\09-V\09\09report VENDOR type of image\0A\09-P\09\09report PRODUCT type of image\0A\09-R\09\09report VERSION stamped in image\0A\09-C\09\09report CHECKSUM stamped in image\0A\09-c\09\09report generated image checksum\0A\09-s\09\09report checksum status (good/bad)\0A\09-p <public.key>\09key file to use (default /etc/publickey.pem)\0A\09-k <zImage>\09write out kernel to file <zImage>\0A\09-f <fs.bin>\09write out filesystem to file <fs.bin>\00"
define void @usage(i32 %0) {
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([82 x i8], [82 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([433 x i8], [433 x i8]* @str, i64 0, i64 0))
%4 = tail call i32 @exit(i32 %0)
unreachable
}