#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*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, ...);
char *strippath(char *);
void usage(char **argv) {
  printf("usage: %s [options] inputfiles outputfile.cab\n", strippath(argv[0]));
  printf("\nlcab will create a Cabinet File from inputfiles.\n");
  printf("Inputfiles can also be directories together with option -r.\n");
  printf("\nOptions:\n");
  printf("     -r        loop recursive through directories\n");
  printf("     -n        create files without pathnames\n");
  printf("     -q        be quiet!\n");
  printf("\n%s v%s (2003) by Rien (rien@geekshop.be)\n", strippath(argv[0]),
         "1.0b11");
  exit(0);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rdi
call   1040 <strippath@plt>
mov    %rax,%rsi
lea    0xeae(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xecf(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xef4(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf23(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf20(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf45(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf66(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%rax
mov    (%rax),%rdi
call   1040 <strippath@plt>
mov    %rax,%rsi
lea    0xf63(%rip),%rdi
lea    0xf87(%rip),%rdx
mov    $0x0,%al
call   1030 <printf@plt>
xor    %edi,%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rbx
mov    %rdi,%rbx
mov    (%rdi),%rdi
call   1050 <strippath@plt>
lea    0xead(%rip),%rdi
mov    %rax,%rsi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xefd(%rip),%rdi
call   1030 <puts@plt>
lea    0xf23(%rip),%rdi
call   1030 <puts@plt>
lea    0xf53(%rip),%rdi
call   1030 <puts@plt>
lea    0xf51(%rip),%rdi
call   1030 <puts@plt>
lea    0xf77(%rip),%rdi
call   1030 <puts@plt>
lea    0xf99(%rip),%rdi
call   1030 <puts@plt>
mov    (%rbx),%rdi
call   1050 <strippath@plt>
lea    0xe7b(%rip),%rdi
lea    0xe9f(%rip),%rdx
mov    %rax,%rsi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %edi,%edi
call   1060 <exit@plt>

LLVM IR (-O0):
@.str = [47 x i8] c"usage: %s [options] inputfiles outputfile.cab\0A\00"
@.str.1 = [51 x i8] c"\0Alcab will create a Cabinet File from inputfiles.\0A\00"
@.str.2 = [61 x i8] c"Inputfiles can also be directories together with option -r.\0A\00"
@.str.3 = [11 x i8] c"\0AOptions:\0A\00"
@.str.4 = [51 x i8] c" -r loop recursive through directories\0A\00"
@.str.5 = [47 x i8] c" -n create files without pathnames\0A\00"
@.str.6 = [26 x i8] c" -q be quiet!\0A\00"
@.str.7 = [43 x i8] c"\0A%s v%s (2003) by Rien (rien@geekshop.be)\0A\00"
@.str.8 = [7 x i8] c"1.0b11\00"
define void @usage(i8** %0) {
%2 = alloca i8**
store i8** %0, i8*** %2
%3 = load i8**, i8*** %2
%4 = getelementptr inbounds i8*, i8** %3, i64 0
%5 = load i8*, i8** %4
%6 = call i8* @strippath(i8* %5)
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0), i8* %6)
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str.1, i64 0, i64 0))
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([61 x i8], [61 x i8]* @.str.2, i64 0, i64 0))
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.3, i64 0, i64 0))
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str.4, i64 0, i64 0))
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.5, i64 0, i64 0))
%13 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.6, i64 0, i64 0))
%14 = load i8**, i8*** %2
%15 = getelementptr inbounds i8*, i8** %14, i64 0
%16 = load i8*, i8** %15
%17 = call i8* @strippath(i8* %16)
%18 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.7, i64 0, i64 0), i8* %17, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.8, i64 0, i64 0))
%19 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@.str = [47 x i8] c"usage: %s [options] inputfiles outputfile.cab\0A\00"
@.str.7 = [43 x i8] c"\0A%s v%s (2003) by Rien (rien@geekshop.be)\0A\00"
@.str.8 = [7 x i8] c"1.0b11\00"
@str = [50 x i8] c"\0Alcab will create a Cabinet File from inputfiles.\00"
@str.9 = [60 x i8] c"Inputfiles can also be directories together with option -r.\00"
@str.10 = [10 x i8] c"\0AOptions:\00"
@str.11 = [50 x i8] c" -r loop recursive through directories\00"
@str.12 = [46 x i8] c" -n create files without pathnames\00"
@str.13 = [25 x i8] c" -q be quiet!\00"
define void @usage(i8** nocapture %0) {
%2 = load i8*, i8** %0
%3 = tail call i8* @strippath(i8* %2)
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([50 x i8], [50 x i8]* @str, i64 0, i64 0))
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([60 x i8], [60 x i8]* @str.9, i64 0, i64 0))
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @str.10, i64 0, i64 0))
%8 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([50 x i8], [50 x i8]* @str.11, i64 0, i64 0))
%9 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([46 x i8], [46 x i8]* @str.12, i64 0, i64 0))
%10 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @str.13, i64 0, i64 0))
%11 = load i8*, i8** %0
%12 = tail call i8* @strippath(i8* %11)
%13 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([43 x i8], [43 x i8]* @.str.7, i64 0, i64 0), i8* %12, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.8, i64 0, i64 0))
%14 = tail call i32 @exit(i32 0)
unreachable
}