#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(const char *programName) {
  printf("Usage: %s -a <architecture> [option(s)] <file>\n", programName);
  printf("Disassembles program file <file>. Use - for standard input.\n\n");
  printf("ucdisasm version 1.0 - 02/04/2013.\n");
  printf("Written by Vanya A. Sergeev - <vsergeev@gmail.com>.\n\n");
  printf(
      "Additional Options:\n  -a, --architecture <arch>     Architecture to "
      "disassemble for.\n\n  -o, --out-file <file>         Write to file "
      "instead of standard output.\n\n  -t, --file-type <type>        Specify "
      "file type of the program file.\n\n  --assembly                    "
      "Produce assemble-able code with address labels.\n\n  --data-base-hex    "
      "           Represent data constants in hexadecimal\n                    "
      "              (default).\n  --data-base-bin               Represent "
      "data constants in binary.\n  --data-base-dec               Represent "
      "data constants in decimal.\n\n  --no-addresses                Do not "
      "display address alongside disassembly.\n  --no-opcodes                  "
      "Do not display original opcode alongside\n                              "
      "    disassembly.\n  --no-destination-comments     Do not display "
      "destination address comments\n                                  of "
      "relative branch/jump/call instructions.\n\n  -h, --help                 "
      "   Display this usage/help.\n  -v, --version                 Display "
      "the program's version.\n  --debug                       Run debugging "
      "tests.\n\n");
  printf("Supported architectures:\n  Atmel AVR8                avr\n  PIC "
         "Baseline              pic-baseline\n  PIC Midrange              "
         "pic-midrange\n  PIC Midrange Enhanced     pic-enhanced\n  PIC PIC18  "
         "               pic-18\n  8051                      8051\n\n");
  printf("Supported file types:\n  Atmel Generic             generic\n  Intel "
         "HEX8                ihex\n  Motorola S-Record         srec\n  Raw "
         "Binary                binary\n  ELF (64-bit)              elf\n  "
         "ASCII Hex                 ascii\n\n");
}


x86 assembly (clang, -O0):
<print_usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xed9(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xefb(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf2b(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf41(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf69(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x13a3(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x148f(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_usage>:
push   %rax
mov    %rdi,%rsi
lea    0xed5(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xef7(%rip),%rdi
call   1030 <puts@plt>
lea    0xf28(%rip),%rdi
call   1030 <puts@plt>
lea    0xf3f(%rip),%rdi
call   1030 <puts@plt>
lea    0xf68(%rip),%rdi
call   1030 <puts@plt>
lea    0x13a3(%rip),%rdi
call   1030 <puts@plt>
lea    0x1490(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [48 x i8] c"Usage: %s -a <architecture> [option(s)] <file>\0A\00"
@.str.1 = [62 x i8] c"Disassembles program file <file>. Use - for standard input.\0A\0A\00"
@.str.2 = [36 x i8] c"ucdisasm version 1.0 - 02/04/2013.\0A\00"
@.str.3 = [54 x i8] c"Written by Vanya A. Sergeev - <vsergeev@gmail.com>.\0A\0A\00"
@.str.4 = [1096 x i8] c"Additional Options:\0A -a, --architecture <arch> Architecture to disassemble for.\0A\0A -o, --out-file <file> Write to file instead of standard output.\0A\0A -t, --file-type <type> Specify file type of the program file.\0A\0A --assembly Produce assemble-able code with address labels.\0A\0A --data-base-hex Represent data constants in hexadecimal\0A (default).\0A --data-base-bin Represent data constants in binary.\0A --data-base-dec Represent data constants in decimal.\0A\0A --no-addresses Do not display address alongside disassembly.\0A --no-opcodes Do not display original opcode alongside\0A disassembly.\0A --no-destination-comments Do not display destination address comments\0A of relative branch/jump/call instructions.\0A\0A -h, --help Display this usage/help.\0A -v, --version Display the program's version.\0A --debug Run debugging tests.\0A\0A\00"
@.str.5 = [250 x i8] c"Supported architectures:\0A Atmel AVR8 avr\0A PIC Baseline pic-baseline\0A PIC Midrange pic-midrange\0A PIC Midrange Enhanced pic-enhanced\0A PIC PIC18 pic-18\0A 8051 8051\0A\0A\00"
@.str.6 = [227 x i8] c"Supported file types:\0A Atmel Generic generic\0A Intel HEX8 ihex\0A Motorola S-Record srec\0A Raw Binary binary\0A ELF (64-bit) elf\0A ASCII Hex ascii\0A\0A\00"
define void @print_usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str.1, i64 0, i64 0))
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.2, i64 0, i64 0))
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str.3, i64 0, i64 0))
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([1096 x i8], [1096 x i8]* @.str.4, i64 0, i64 0))
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([250 x i8], [250 x i8]* @.str.5, i64 0, i64 0))
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([227 x i8], [227 x i8]* @.str.6, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [48 x i8] c"Usage: %s -a <architecture> [option(s)] <file>\0A\00"
@str = [61 x i8] c"Disassembles program file <file>. Use - for standard input.\0A\00"
@str.7 = [35 x i8] c"ucdisasm version 1.0 - 02/04/2013.\00"
@str.8 = [53 x i8] c"Written by Vanya A. Sergeev - <vsergeev@gmail.com>.\0A\00"
@str.9 = [1095 x i8] c"Additional Options:\0A -a, --architecture <arch> Architecture to disassemble for.\0A\0A -o, --out-file <file> Write to file instead of standard output.\0A\0A -t, --file-type <type> Specify file type of the program file.\0A\0A --assembly Produce assemble-able code with address labels.\0A\0A --data-base-hex Represent data constants in hexadecimal\0A (default).\0A --data-base-bin Represent data constants in binary.\0A --data-base-dec Represent data constants in decimal.\0A\0A --no-addresses Do not display address alongside disassembly.\0A --no-opcodes Do not display original opcode alongside\0A disassembly.\0A --no-destination-comments Do not display destination address comments\0A of relative branch/jump/call instructions.\0A\0A -h, --help Display this usage/help.\0A -v, --version Display the program's version.\0A --debug Run debugging tests.\0A\00"
@str.10 = [249 x i8] c"Supported architectures:\0A Atmel AVR8 avr\0A PIC Baseline pic-baseline\0A PIC Midrange pic-midrange\0A PIC Midrange Enhanced pic-enhanced\0A PIC PIC18 pic-18\0A 8051 8051\0A\00"
@str.11 = [226 x i8] c"Supported file types:\0A Atmel Generic generic\0A Intel HEX8 ihex\0A Motorola S-Record srec\0A Raw Binary binary\0A ELF (64-bit) elf\0A ASCII Hex ascii\0A\00"
define void @print_usage(i8* %0) {
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([48 x i8], [48 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([61 x i8], [61 x i8]* @str, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @str.7, i64 0, i64 0))
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([53 x i8], [53 x i8]* @str.8, i64 0, i64 0))
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([1095 x i8], [1095 x i8]* @str.9, i64 0, i64 0))
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([249 x i8], [249 x i8]* @str.10, i64 0, i64 0))
%8 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([226 x i8], [226 x i8]* @str.11, i64 0, i64 0))
ret void
}