#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*/ fprintf(int /*<<< orphan*/, char *, ...);
int /*<<< orphan*/ stderr;
void Usage(char *me) {
  fprintf(stderr,
          "usage: %s [-p | -f | (-F [-L|-S|-M] -d<destination file>)] "
          "[-E<key-file] [-e<key>] [-v] [-D] [-Z%s] [-h<extra-header>] "
          "[-o<output file>] <binary-image>\n",
          me, "");
  fprintf(stderr,
          "       %s  [-E<key-file] [-e<key>] [-v] [-s] -u [-o<output file>] "
          "<zzip-file>\n",
          me);
  fprintf(
      stderr,
      "      -s Use stupid short DOS filenames.\n"
      "      -Z Dont compress.\n"
      "      -v Show Version number\n"
      "      -h<extra-header> Adds <extra-header> to the zzip header. This "
      "must be\n"
      "                       a complete header, eg. \"key = value\".\n"
      "      -E<key-file> Use this file to get the encryption key out of.\n"
      "      -e<key> Encrypt image with key index of <key> (from key file).\n"
      "      -u Unzip instead of zip. (Implied if the program name contains "
      "\"zunzip\").\n"
      "\n"
      "      -p preferences\n"
      "      -f firmware\n"
      "      -l loader\n"
      "      -F file upload\n"
      "         -L large file\n"
      "         -S small file\n"
      "         -M edium file\n"
      "      -d<destination> This is the filename used when the file is "
      "uploaded.\n"
      "      -o<output file> The output is written to this file instead of the "
      "default.\n"
      "                      Use '-' for stdout.\n"
      "      <binary-image>  The file to zzip.     Use - for stdin.\n"
      "      <zzip-file>     The file to un-zzip.\n");
  fprintf(stderr,
          "\nThis program converts a file to a compressed/encrypted file with\n"
          "extensible, easily parsed meta-data\n\n"
          "There are 2 keyfile formats. Version 1:\n"
          "  The key file is just a list of keys. Keys can be any length.\n"
          "  Each key is separated by a single null.\n"
          "  Keys are specified (with -e) by the numeric index of the key "
          "based on the\n"
          "  order of the file.\n"
          "Version 2:\n"
          "  The first line must be exactly \"Version 2 Keyfile:\"\n"
          "  Each line after that should be \"xx yyyyyyyyyy\" where 'xx' is "
          "the index and\n"
          "  'yyyyy' is the key. The index can be any string that doesn't "
          "contain a space\n"
          "  character.  The key, however, *can* contain spaces. The key is "
          "terminated by\n"
          "  an end of line character.  As a special case, if the key passed "
          "by the -e flag\n"
          "  is numeric then the index string will be compared as if it were a "
          "number.\n"
          "  The maintains backwards compatibility with older version 2 key "
          "files (the\n"
          "  keys used to be exclusively numeric).\n");
  exit(1);
}


x86 assembly (clang, -O0):
<Usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ead(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xec0(%rip),%rsi
lea    0x16b7(%rip),%rcx
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2e8b(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xf37(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2e70(%rip),%rax
mov    (%rax),%edi
lea    0xf6f(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2e59(%rip),%rax
mov    (%rax),%edi
lea    0x12d8(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<Usage>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
mov    0x2eb2(%rip),%r14
mov    (%r14),%edi
lea    0xec8(%rip),%rsi
lea    0x16bf(%rip),%rcx
mov    %rbx,%rdx
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%r14),%edi
lea    0xf46(%rip),%rsi
mov    %rbx,%rdx
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%r14),%edi
lea    0xf81(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%r14),%edi
lea    0x12f0(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [153 x i8] c"usage: %s [-p | -f | (-F [-L|-S|-M] -d<destination file>)] [-E<key-file] [-e<key>] [-v] [-D] [-Z%s] [-h<extra-header>] [-o<output file>] <binary-image>\0A\00"
@.str.1 = [1 x i8] zeroinitializer
@.str.2 = [79 x i8] c" %s [-E<key-file] [-e<key>] [-v] [-s] -u [-o<output file>] <zzip-file>\0A\00"
@.str.3 = [896 x i8] c" -s Use stupid short DOS filenames.\0A -Z Dont compress.\0A -v Show Version number\0A -h<extra-header> Adds <extra-header> to the zzip header. This must be\0A a complete header, eg. \22key = value\22.\0A -E<key-file> Use this file to get the encryption key out of.\0A -e<key> Encrypt image with key index of <key> (from key file).\0A -u Unzip instead of zip. (Implied if the program name contains \22zunzip\22).\0A\0A -p preferences\0A -f firmware\0A -l loader\0A -F file upload\0A -L large file\0A -S small file\0A -M edium file\0A -d<destination> This is the filename used when the file is uploaded.\0A -o<output file> The output is written to this file instead of the default.\0A Use '-' for stdout.\0A <binary-image> The file to zzip. Use - for stdin.\0A <zzip-file> The file to un-zzip.\0A\00"
@.str.4 = [919 x i8] c"\0AThis program converts a file to a compressed/encrypted file with\0Aextensible, easily parsed meta-data\0A\0AThere are 2 keyfile formats. Version 1:\0A The key file is just a list of keys. Keys can be any length.\0A Each key is separated by a single null.\0A Keys are specified (with -e) by the numeric index of the key based on the\0A order of the file.\0AVersion 2:\0A The first line must be exactly \22Version 2 Keyfile:\22\0A Each line after that should be \22xx yyyyyyyyyy\22 where 'xx' is the index and\0A 'yyyyy' is the key. The index can be any string that doesn't contain a space\0A character. The key, however, *can* contain spaces. The key is terminated by\0A an end of line character. As a special case, if the key passed by the -e flag\0A is numeric then the index string will be compared as if it were a number.\0A The maintains backwards compatibility with older version 2 key files (the\0A keys used to be exclusively numeric).\0A\00"
define void @Usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 (i32, i8*, ...) @fprintf(i32 %3, i8* getelementptr inbounds ([153 x i8], [153 x i8]* @.str, i64 0, i64 0), i8* %4, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0))
%6 = load i32, i32* @stderr
%7 = load i8*, i8** %2
%8 = call i32 (i32, i8*, ...) @fprintf(i32 %6, i8* getelementptr inbounds ([79 x i8], [79 x i8]* @.str.2, i64 0, i64 0), i8* %7)
%9 = load i32, i32* @stderr
%10 = call i32 (i32, i8*, ...) @fprintf(i32 %9, i8* getelementptr inbounds ([896 x i8], [896 x i8]* @.str.3, i64 0, i64 0))
%11 = load i32, i32* @stderr
%12 = call i32 (i32, i8*, ...) @fprintf(i32 %11, i8* getelementptr inbounds ([919 x i8], [919 x i8]* @.str.4, i64 0, i64 0))
%13 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [153 x i8] c"usage: %s [-p | -f | (-F [-L|-S|-M] -d<destination file>)] [-E<key-file] [-e<key>] [-v] [-D] [-Z%s] [-h<extra-header>] [-o<output file>] <binary-image>\0A\00"
@.str.1 = [1 x i8] zeroinitializer
@.str.2 = [79 x i8] c" %s [-E<key-file] [-e<key>] [-v] [-s] -u [-o<output file>] <zzip-file>\0A\00"
@.str.3 = [896 x i8] c" -s Use stupid short DOS filenames.\0A -Z Dont compress.\0A -v Show Version number\0A -h<extra-header> Adds <extra-header> to the zzip header. This must be\0A a complete header, eg. \22key = value\22.\0A -E<key-file> Use this file to get the encryption key out of.\0A -e<key> Encrypt image with key index of <key> (from key file).\0A -u Unzip instead of zip. (Implied if the program name contains \22zunzip\22).\0A\0A -p preferences\0A -f firmware\0A -l loader\0A -F file upload\0A -L large file\0A -S small file\0A -M edium file\0A -d<destination> This is the filename used when the file is uploaded.\0A -o<output file> The output is written to this file instead of the default.\0A Use '-' for stdout.\0A <binary-image> The file to zzip. Use - for stdin.\0A <zzip-file> The file to un-zzip.\0A\00"
@.str.4 = [919 x i8] c"\0AThis program converts a file to a compressed/encrypted file with\0Aextensible, easily parsed meta-data\0A\0AThere are 2 keyfile formats. Version 1:\0A The key file is just a list of keys. Keys can be any length.\0A Each key is separated by a single null.\0A Keys are specified (with -e) by the numeric index of the key based on the\0A order of the file.\0AVersion 2:\0A The first line must be exactly \22Version 2 Keyfile:\22\0A Each line after that should be \22xx yyyyyyyyyy\22 where 'xx' is the index and\0A 'yyyyy' is the key. The index can be any string that doesn't contain a space\0A character. The key, however, *can* contain spaces. The key is terminated by\0A an end of line character. As a special case, if the key passed by the -e flag\0A is numeric then the index string will be compared as if it were a number.\0A The maintains backwards compatibility with older version 2 key files (the\0A keys used to be exclusively numeric).\0A\00"
define void @Usage(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 (i32, i8*, ...) @fprintf(i32 %2, i8* getelementptr inbounds ([153 x i8], [153 x i8]* @.str, i64 0, i64 0), i8* %0, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0))
%4 = load i32, i32* @stderr
%5 = tail call i32 (i32, i8*, ...) @fprintf(i32 %4, i8* getelementptr inbounds ([79 x i8], [79 x i8]* @.str.2, i64 0, i64 0), i8* %0)
%6 = load i32, i32* @stderr
%7 = tail call i32 (i32, i8*, ...) @fprintf(i32 %6, i8* getelementptr inbounds ([896 x i8], [896 x i8]* @.str.3, i64 0, i64 0))
%8 = load i32, i32* @stderr
%9 = tail call i32 (i32, i8*, ...) @fprintf(i32 %8, i8* getelementptr inbounds ([919 x i8], [919 x i8]* @.str.4, i64 0, i64 0))
%10 = tail call i32 @exit(i32 1)
unreachable
}