#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*/ print_version();
int /*<<< orphan*/ printf(char *, ...);
void print_usage(char *prog) {
  print_version();
  printf("usage: %s [switches] [inputfiles]\n", prog);
  printf("  -d directory  Set the output directory.\n");
  printf("  -f            Force overwrite of existing output files.\n");
  printf("  -h            Display this help message and exit.\n");
  printf("  -p prefix     Set the output filename prefix.\n");
  printf("  -q quality    Set the output quality.\n");
  printf("  -s size       Set the size of the longest output dimension. ");
  printf(" (See -H and -V)\n");
  printf("  -v            Verbosity level. (May be used multiple times.)\n");
  printf("  -H            Make the -s switch refer to the output height.\n");
  printf("  -S            Process only one file and output to stdout.\n");
  printf("  -W            Make the -s switch refer to the output width.\n");
  printf("  -V            Display version and exit.\n");
  printf("\nSee jpgtn(1) for more details.\n\n");
}


x86 assembly (clang, -O0):
<print_usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x0,%al
call   1030 <print_version@plt>
mov    -0x8(%rbp),%rsi
lea    0xec2(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xed7(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xef4(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xf21(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xf48(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xf6b(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xf86(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xfb7(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xfbb(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xfed(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0x101f(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0x104e(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0x107f(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0x109c(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_usage>:
push   %rbx
mov    %rdi,%rbx
xor    %eax,%eax
call   1040 <print_version@plt>
lea    0xebe(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xf0f(%rip),%rdi
call   1030 <puts@plt>
lea    0xf2d(%rip),%rdi
call   1030 <puts@plt>
lea    0xf5b(%rip),%rdi
call   1030 <puts@plt>
lea    0xf83(%rip),%rdi
call   1030 <puts@plt>
lea    0xfa7(%rip),%rdi
call   1030 <puts@plt>
lea    0xe94(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xfb5(%rip),%rdi
call   1030 <puts@plt>
lea    0xfba(%rip),%rdi
call   1030 <puts@plt>
lea    0xfed(%rip),%rdi
call   1030 <puts@plt>
lea    0x1020(%rip),%rdi
call   1030 <puts@plt>
lea    0x1050(%rip),%rdi
call   1030 <puts@plt>
lea    0x1082(%rip),%rdi
call   1030 <puts@plt>
lea    0x10a0(%rip),%rdi
pop    %rbx
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [35 x i8] c"usage: %s [switches] [inputfiles]\0A\00"
@.str.1 = [43 x i8] c" -d directory Set the output directory.\0A\00"
@.str.2 = [59 x i8] c" -f Force overwrite of existing output files.\0A\00"
@.str.3 = [53 x i8] c" -h Display this help message and exit.\0A\00"
@.str.4 = [49 x i8] c" -p prefix Set the output filename prefix.\0A\00"
@.str.5 = [41 x i8] c" -q quality Set the output quality.\0A\00"
@.str.6 = [63 x i8] c" -s size Set the size of the longest output dimension. \00"
@.str.7 = [18 x i8] c" (See -H and -V)\0A\00"
@.str.8 = [64 x i8] c" -v Verbosity level. (May be used multiple times.)\0A\00"
@.str.9 = [64 x i8] c" -H Make the -s switch refer to the output height.\0A\00"
@.str.10 = [61 x i8] c" -S Process only one file and output to stdout.\0A\00"
@.str.11 = [63 x i8] c" -W Make the -s switch refer to the output width.\0A\00"
@.str.12 = [43 x i8] c" -V Display version and exit.\0A\00"
@.str.13 = [34 x i8] c"\0ASee jpgtn(1) for more details.\0A\0A\00"
define void @print_usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 (...) @print_version()
%4 = load i8*, i8** %2
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.1, i64 0, i64 0))
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([59 x i8], [59 x i8]* @.str.2, i64 0, i64 0))
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str.3, i64 0, i64 0))
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str.4, i64 0, i64 0))
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.5, i64 0, i64 0))
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([63 x i8], [63 x i8]* @.str.6, i64 0, i64 0))
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.7, i64 0, i64 0))
%13 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([64 x i8], [64 x i8]* @.str.8, i64 0, i64 0))
%14 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([64 x i8], [64 x i8]* @.str.9, i64 0, i64 0))
%15 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([61 x i8], [61 x i8]* @.str.10, i64 0, i64 0))
%16 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([63 x i8], [63 x i8]* @.str.11, i64 0, i64 0))
%17 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.12, i64 0, i64 0))
%18 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.13, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [35 x i8] c"usage: %s [switches] [inputfiles]\0A\00"
@.str.6 = [63 x i8] c" -s size Set the size of the longest output dimension. \00"
@str = [42 x i8] c" -d directory Set the output directory.\00"
@str.14 = [58 x i8] c" -f Force overwrite of existing output files.\00"
@str.15 = [52 x i8] c" -h Display this help message and exit.\00"
@str.16 = [48 x i8] c" -p prefix Set the output filename prefix.\00"
@str.17 = [40 x i8] c" -q quality Set the output quality.\00"
@str.18 = [17 x i8] c" (See -H and -V)\00"
@str.19 = [63 x i8] c" -v Verbosity level. (May be used multiple times.)\00"
@str.20 = [63 x i8] c" -H Make the -s switch refer to the output height.\00"
@str.21 = [60 x i8] c" -S Process only one file and output to stdout.\00"
@str.22 = [62 x i8] c" -W Make the -s switch refer to the output width.\00"
@str.23 = [42 x i8] c" -V Display version and exit.\00"
@str.24 = [33 x i8] c"\0ASee jpgtn(1) for more details.\0A\00"
define void @print_usage(i8* %0) {
%2 = tail call i32 (...) @print_version()
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([42 x i8], [42 x i8]* @str, i64 0, i64 0))
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([58 x i8], [58 x i8]* @str.14, i64 0, i64 0))
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([52 x i8], [52 x i8]* @str.15, i64 0, i64 0))
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([48 x i8], [48 x i8]* @str.16, i64 0, i64 0))
%8 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([40 x i8], [40 x i8]* @str.17, i64 0, i64 0))
%9 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([63 x i8], [63 x i8]* @.str.6, i64 0, i64 0))
%10 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @str.18, i64 0, i64 0))
%11 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([63 x i8], [63 x i8]* @str.19, i64 0, i64 0))
%12 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([63 x i8], [63 x i8]* @str.20, i64 0, i64 0))
%13 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([60 x i8], [60 x i8]* @str.21, i64 0, i64 0))
%14 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([62 x i8], [62 x i8]* @str.22, i64 0, i64 0))
%15 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([42 x i8], [42 x i8]* @str.23, i64 0, i64 0))
%16 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @str.24, i64 0, i64 0))
ret void
}