#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 *, ...);
void usage(const char *msg) {
  if (msg != NULL) {
    printf("\n");
    printf("%s\n", msg);
    printf("\n");
  }
  printf("\n");
  printf("MultiCopy (mcp) copies a single file to a specified set of "
         "destination directories (which have to exist)\n");
  printf("or destination files (which have to be created if they do not exist, "
         "otherwise they will be overwritten).\n");
  printf("\n");
  printf("Usage examples:\n");
  printf("mcp file1 dest1 dest2 : copy file1 to both dest1 and dest2\n");
  printf("mcp -b 2048 file1 dest1 dest2: copy file1 to both dest1 and dest2 "
         "reading 2048 bytes at time\n");
  printf("\n");
  printf("If the parameter -- is used each element after it will be considered "
         "as a filename\n");
  printf("Example: mcp -- -b dest1 dest2 : copy a file named -b to dest1 and "
         "to dest2\n");
  printf("\n");
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1155 <usage+0x45>
lea    0xf3e(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%rsi
lea    0xec0(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf1e(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf10(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe9a(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xef6(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xee6(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf45(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf48(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf76(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xeae(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xfb8(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xffe(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe84(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<usage>:
push   %rbx
test   %rdi,%rdi
je     1145 <usage+0x25>
mov    %rdi,%rbx
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    %rbx,%rdi
call   1040 <puts@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xeaa(%rip),%rdi
call   1040 <puts@plt>
lea    0xf07(%rip),%rdi
call   1040 <puts@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xf5b(%rip),%rdi
call   1040 <puts@plt>
lea    0xf5f(%rip),%rdi
call   1040 <puts@plt>
lea    0xf8e(%rip),%rdi
call   1040 <puts@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xfd5(%rip),%rdi
call   1040 <puts@plt>
lea    0x101c(%rip),%rdi
call   1040 <puts@plt>
mov    $0xa,%edi
pop    %rbx
jmp    1030 <putchar@plt>

LLVM IR (-O0):
@.str = [2 x i8] c"\0A\00"
@.str.1 = [4 x i8] c"%s\0A\00"
@.str.2 = [106 x i8] c"MultiCopy (mcp) copies a single file to a specified set of destination directories (which have to exist)\0A\00"
@.str.3 = [107 x i8] c"or destination files (which have to be created if they do not exist, otherwise they will be overwritten).\0A\00"
@.str.4 = [17 x i8] c"Usage examples:\0A\00"
@.str.5 = [60 x i8] c"mcp file1 dest1 dest2 : copy file1 to both dest1 and dest2\0A\00"
@.str.6 = [94 x i8] c"mcp -b 2048 file1 dest1 dest2: copy file1 to both dest1 and dest2 reading 2048 bytes at time\0A\00"
@.str.7 = [84 x i8] c"If the parameter -- is used each element after it will be considered as a filename\0A\00"
@.str.8 = [77 x i8] c"Example: mcp -- -b dest1 dest2 : copy a file named -b to dest1 and to dest2\0A\00"
define void @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = icmp ne i8* %3, null
br i1 %4, label %5, label %10
5: ; preds = %1
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%7 = load i8*, i8** %2
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %7)
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
br label %10
10: ; preds = %5, %1
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([106 x i8], [106 x i8]* @.str.2, i64 0, i64 0))
%13 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([107 x i8], [107 x i8]* @.str.3, i64 0, i64 0))
%14 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%15 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.4, i64 0, i64 0))
%16 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str.5, i64 0, i64 0))
%17 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([94 x i8], [94 x i8]* @.str.6, i64 0, i64 0))
%18 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%19 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([84 x i8], [84 x i8]* @.str.7, i64 0, i64 0))
%20 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([77 x i8], [77 x i8]* @.str.8, i64 0, i64 0))
%21 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [105 x i8] c"MultiCopy (mcp) copies a single file to a specified set of destination directories (which have to exist)\00"
@str.9 = [106 x i8] c"or destination files (which have to be created if they do not exist, otherwise they will be overwritten).\00"
@str.10 = [16 x i8] c"Usage examples:\00"
@str.11 = [59 x i8] c"mcp file1 dest1 dest2 : copy file1 to both dest1 and dest2\00"
@str.12 = [93 x i8] c"mcp -b 2048 file1 dest1 dest2: copy file1 to both dest1 and dest2 reading 2048 bytes at time\00"
@str.13 = [83 x i8] c"If the parameter -- is used each element after it will be considered as a filename\00"
@str.14 = [76 x i8] c"Example: mcp -- -b dest1 dest2 : copy a file named -b to dest1 and to dest2\00"
define void @usage(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %7, label %3
3: ; preds = %1
%4 = tail call i32 @putchar(i32 10)
%5 = tail call i32 @puts(i8* %0)
%6 = tail call i32 @putchar(i32 10)
br label %7
7: ; preds = %3, %1
%8 = tail call i32 @putchar(i32 10)
%9 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([105 x i8], [105 x i8]* @str, i64 0, i64 0))
%10 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([106 x i8], [106 x i8]* @str.9, i64 0, i64 0))
%11 = tail call i32 @putchar(i32 10)
%12 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @str.10, i64 0, i64 0))
%13 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([59 x i8], [59 x i8]* @str.11, i64 0, i64 0))
%14 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([93 x i8], [93 x i8]* @str.12, i64 0, i64 0))
%15 = tail call i32 @putchar(i32 10)
%16 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([83 x i8], [83 x i8]* @str.13, i64 0, i64 0))
%17 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([76 x i8], [76 x i8]* @str.14, i64 0, i64 0))
%18 = tail call i32 @putchar(i32 10)
ret void
}