#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 *name) {
  printf("%s - Version %s\n", name, "0.2");
  printf(
      "%s -C cylinders [-H heads] [-S sectors] [-A adapter] [-l size] [ -s ] "
      "infile.img outfile.vmdk\n\n"
      "-C  Number of cylinders in infile.img\n"
      "-H  Number of heads in infile.img\n"
      "-S  Number of sectors in infile.img\n"
      "-A  Adapter: legal values are ide, lsilogic or buslogic\n"
      "-l  Size of the input image (optional if input is a file)\n"
      "-s  Use streamOptimized format rather than monolithicSparse\n"
      "-V  Virtual hardware version: 7, 8, 9 or 10 (default: %d)\n"
      "infile.img    RAW disk image, or - for standard input\n"
      "outfile.vmdk  VMware virtual disk\n\n",
      name, 7);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xed9(%rip),%rdi
lea    0xee3(%rip),%rdx
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%rsi
lea    0xed5(%rip),%rdi
mov    $0x7,%edx
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<usage>:
push   %rbx
mov    %rdi,%rbx
lea    0xee5(%rip),%rdi
lea    0xeef(%rip),%rdx
mov    %rbx,%rsi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xee2(%rip),%rdi
mov    %rbx,%rsi
mov    $0x7,%edx
xor    %eax,%eax
pop    %rbx
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [17 x i8] c"%s - Version %s\0A\00"
@.str.1 = [4 x i8] c"0.2\00"
@.str.2 = [525 x i8] c"%s -C cylinders [-H heads] [-S sectors] [-A adapter] [-l size] [ -s ] infile.img outfile.vmdk\0A\0A-C Number of cylinders in infile.img\0A-H Number of heads in infile.img\0A-S Number of sectors in infile.img\0A-A Adapter: legal values are ide, lsilogic or buslogic\0A-l Size of the input image (optional if input is a file)\0A-s Use streamOptimized format rather than monolithicSparse\0A-V Virtual hardware version: 7, 8, 9 or 10 (default: %d)\0Ainfile.img RAW disk image, or - for standard input\0Aoutfile.vmdk VMware virtual disk\0A\0A\00"
define void @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* %3, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
%5 = load i8*, i8** %2
%6 = call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([525 x i8], [525 x i8]* @.str.2, i64 0, i64 0), i8* %5, i32 7)
ret void
}

LLVM IR (-O2):
@.str = [17 x i8] c"%s - Version %s\0A\00"
@.str.1 = [4 x i8] c"0.2\00"
@.str.2 = [525 x i8] c"%s -C cylinders [-H heads] [-S sectors] [-A adapter] [-l size] [ -s ] infile.img outfile.vmdk\0A\0A-C Number of cylinders in infile.img\0A-H Number of heads in infile.img\0A-S Number of sectors in infile.img\0A-A Adapter: legal values are ide, lsilogic or buslogic\0A-l Size of the input image (optional if input is a file)\0A-s Use streamOptimized format rather than monolithicSparse\0A-V Virtual hardware version: 7, 8, 9 or 10 (default: %d)\0Ainfile.img RAW disk image, or - for standard input\0Aoutfile.vmdk VMware virtual disk\0A\0A\00"
define void @usage(i8* %0) {
%2 = tail call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* %0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
%3 = tail call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([525 x i8], [525 x i8]* @.str.2, i64 0, i64 0), i8* %0, i32 7)
ret void
}