#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 const *, char const *);
int /*<<< orphan*/ puts(char *);
void printUsage(const char *command) {
  printf("Usage: %s -c [OPTION] [-i file.IFF] [-o file.IFF]\n"
         "  or: %s -d [OPTION] [-i file.IFF] [-o file.IFF]\n\n",
         command, command);
  puts(
      "The command `ilbmpack' compresses or decompresses all the BODY chunks "
      "of all\n"
      "ILBM forms in the given IFF file using the byte run (packbits) "
      "algorithm. If no\n"
      "IFF file is specified, it reads an IFF file from the standard input.\n");
  puts("Options:\n\n"
       "  -c, --compress          Compress the ILBM images\n"
       "  -d, --decompress        Decompress the ILBM images\n"
       "  -i, --input-file=FILE   Specifies the input IFF file. If no input "
       "file is\n"
       "                          given, then data will be read from the "
       "standard input");
  puts("  -o, --output-file=FILE  Specifies the output IFF file. If no output "
       "file is\n"
       "                          given, then data will be written to the "
       "standard\n"
       "                          output\n"
       "  -h, --help              Shows the usage of this command to the user\n"
       "  -v, --version           Shows the version of this command to the "
       "user");
}


x86 assembly (clang, -O0):
<printUsage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0x8(%rbp),%rdx
lea    0xec5(%rip),%rdi
call   1040 <printf@plt>
lea    0xf1e(%rip),%rdi
call   1030 <puts@plt>
lea    0xff5(%rip),%rdi
call   1030 <puts@plt>
lea    0x10f7(%rip),%rdi
call   1030 <puts@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printUsage>:
push   %rax
mov    %rdi,%rdx
lea    0xed5(%rip),%rdi
mov    %rdx,%rsi
call   1040 <printf@plt>
lea    0xf2b(%rip),%rdi
call   1030 <puts@plt>
lea    0x1002(%rip),%rdi
call   1030 <puts@plt>
lea    0x1104(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [101 x i8] c"Usage: %s -c [OPTION] [-i file.IFF] [-o file.IFF]\0A or: %s -d [OPTION] [-i file.IFF] [-o file.IFF]\0A\0A\00"
@.str.1 = [227 x i8] c"The command `ilbmpack' compresses or decompresses all the BODY chunks of all\0AILBM forms in the given IFF file using the byte run (packbits) algorithm. If no\0AIFF file is specified, it reads an IFF file from the standard input.\0A\00"
@.str.2 = [270 x i8] c"Options:\0A\0A -c, --compress Compress the ILBM images\0A -d, --decompress Decompress the ILBM images\0A -i, --input-file=FILE Specifies the input IFF file. If no input file is\0A given, then data will be read from the standard input\00"
@.str.3 = [328 x i8] c" -o, --output-file=FILE Specifies the output IFF file. If no output file is\0A given, then data will be written to the standard\0A output\0A -h, --help Shows the usage of this command to the user\0A -v, --version Shows the version of this command to the user\00"
define void @printUsage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i8*, i8** %2
%5 = call i32 @printf(i8* getelementptr inbounds ([101 x i8], [101 x i8]* @.str, i64 0, i64 0), i8* %3, i8* %4)
%6 = call i32 @puts(i8* getelementptr inbounds ([227 x i8], [227 x i8]* @.str.1, i64 0, i64 0))
%7 = call i32 @puts(i8* getelementptr inbounds ([270 x i8], [270 x i8]* @.str.2, i64 0, i64 0))
%8 = call i32 @puts(i8* getelementptr inbounds ([328 x i8], [328 x i8]* @.str.3, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [101 x i8] c"Usage: %s -c [OPTION] [-i file.IFF] [-o file.IFF]\0A or: %s -d [OPTION] [-i file.IFF] [-o file.IFF]\0A\0A\00"
@.str.1 = [227 x i8] c"The command `ilbmpack' compresses or decompresses all the BODY chunks of all\0AILBM forms in the given IFF file using the byte run (packbits) algorithm. If no\0AIFF file is specified, it reads an IFF file from the standard input.\0A\00"
@.str.2 = [270 x i8] c"Options:\0A\0A -c, --compress Compress the ILBM images\0A -d, --decompress Decompress the ILBM images\0A -i, --input-file=FILE Specifies the input IFF file. If no input file is\0A given, then data will be read from the standard input\00"
@.str.3 = [328 x i8] c" -o, --output-file=FILE Specifies the output IFF file. If no output file is\0A given, then data will be written to the standard\0A output\0A -h, --help Shows the usage of this command to the user\0A -v, --version Shows the version of this command to the user\00"
define void @printUsage(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([101 x i8], [101 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %0)
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([227 x i8], [227 x i8]* @.str.1, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([270 x i8], [270 x i8]* @.str.2, i64 0, i64 0))
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([328 x i8], [328 x i8]* @.str.3, i64 0, i64 0))
ret void
}