#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 *strrchr(char *, char);
void print_usage(int argc, char *argv[]) {
  char *name = NULL;
  name = strrchr(argv[0], '/');
  printf("Usage: %s -i|--infile FILE [-o|--outfile FILE] [-d|--debug]\n",
         (name ? name + 1 : argv[0]));
  printf("Convert a plist FILE from binary to XML format or vice-versa.\n\n");
  printf("  -i, --infile FILE\tThe FILE to convert from\n");
  printf("  -o, --outfile FILE\tOptional FILE to convert to or stdout if not "
         "used\n");
  printf("  -d, --debug\t\tEnable extended debug output\n");
  printf("\n");
}


x86 assembly (clang, -O0):
<print_usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
movq   $0x0,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
mov    $0x2f,%esi
call   1040 <strrchr@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     1168 <print_usage+0x48>
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x20(%rbp)
jmp    1173 <print_usage+0x53>
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rsi
lea    0xe82(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xeb1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xee3(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf03(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf3d(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xeb7(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_usage>:
push   %rbx
mov    (%rsi),%rbx
mov    %rbx,%rdi
mov    $0x2f,%esi
call   1060 <strrchr@plt>
lea    0x1(%rax),%rsi
test   %rax,%rax
cmove  %rbx,%rsi
lea    0xe9d(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xecc(%rip),%rdi
call   1040 <puts@plt>
lea    0xeff(%rip),%rdi
call   1040 <puts@plt>
lea    0xf20(%rip),%rdi
call   1040 <puts@plt>
lea    0xf5b(%rip),%rdi
call   1040 <puts@plt>
mov    $0xa,%edi
pop    %rbx
jmp    1030 <putchar@plt>

LLVM IR (-O0):
@.str = [61 x i8] c"Usage: %s -i|--infile FILE [-o|--outfile FILE] [-d|--debug]\0A\00"
@.str.1 = [64 x i8] c"Convert a plist FILE from binary to XML format or vice-versa.\0A\0A\00"
@.str.2 = [46 x i8] c" -i, --infile FILE\09The FILE to convert from\0A\00"
@.str.3 = [72 x i8] c" -o, --outfile FILE\09Optional FILE to convert to or stdout if not used\0A\00"
@.str.4 = [45 x i8] c" -d, --debug\09\09Enable extended debug output\0A\00"
@.str.5 = [2 x i8] c"\0A\00"
define void @print_usage(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
%5 = alloca i8*
store i32 %0, i32* %3
store i8** %1, i8*** %4
store i8* null, i8** %5
%6 = load i8**, i8*** %4
%7 = getelementptr inbounds i8*, i8** %6, i64 0
%8 = load i8*, i8** %7
%9 = call i8* @strrchr(i8* %8, i8 signext 47)
store i8* %9, i8** %5
%10 = load i8*, i8** %5
%11 = icmp ne i8* %10, null
br i1 %11, label %12, label %15
12: ; preds = %2
%13 = load i8*, i8** %5
%14 = getelementptr inbounds i8, i8* %13, i64 1
br label %19
15: ; preds = %2
%16 = load i8**, i8*** %4
%17 = getelementptr inbounds i8*, i8** %16, i64 0
%18 = load i8*, i8** %17
br label %19
19: ; preds = %15, %12
%20 = phi i8* [ %14, %12 ], [ %18, %15 ]
%21 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([61 x i8], [61 x i8]* @.str, i64 0, i64 0), i8* %20)
%22 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([64 x i8], [64 x i8]* @.str.1, i64 0, i64 0))
%23 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.2, i64 0, i64 0))
%24 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([72 x i8], [72 x i8]* @.str.3, i64 0, i64 0))
%25 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.4, i64 0, i64 0))
%26 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [61 x i8] c"Usage: %s -i|--infile FILE [-o|--outfile FILE] [-d|--debug]\0A\00"
@str = [63 x i8] c"Convert a plist FILE from binary to XML format or vice-versa.\0A\00"
@str.6 = [45 x i8] c" -i, --infile FILE\09The FILE to convert from\00"
@str.7 = [71 x i8] c" -o, --outfile FILE\09Optional FILE to convert to or stdout if not used\00"
@str.8 = [44 x i8] c" -d, --debug\09\09Enable extended debug output\00"
define void @print_usage(i32 %0, i8** nocapture %1) {
%3 = load i8*, i8** %1
%4 = tail call i8* @strrchr(i8* dereferenceable(1) %3, i8 signext 47)
%5 = icmp eq i8* %4, null
%6 = getelementptr inbounds i8, i8* %4, i64 1
%7 = select i1 %5, i8* %3, i8* %6
%8 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([61 x i8], [61 x i8]* @.str, i64 0, i64 0), i8* %7)
%9 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([63 x i8], [63 x i8]* @str, i64 0, i64 0))
%10 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([45 x i8], [45 x i8]* @str.6, i64 0, i64 0))
%11 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([71 x i8], [71 x i8]* @str.7, i64 0, i64 0))
%12 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([44 x i8], [44 x i8]* @str.8, i64 0, i64 0))
%13 = tail call i32 @putchar(i32 10)
ret void
}