#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 print_help(bool extended) {
  printf("Usage: cpext [options] <inputpath> <outputpath>");
  if (extended) {
    printf("\n\n");
    printf("Options:\n");
    printf("--help\t\t-h\tPrints this output.\n");
    printf("--recursive\t-r\tCopies files and directories recursive.\n");
  }
  printf("\n");
}


x86 assembly (clang, -O0):
<print_help>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    0xede(%rip),%rdi
call   1030 <printf@plt>
cmpl   $0x0,-0x4(%rbp)
je     1161 <print_help+0x51>
lea    0xef8(%rip),%rdi
call   1030 <printf@plt>
lea    0xeef(%rip),%rdi
call   1030 <printf@plt>
lea    0xeed(%rip),%rdi
call   1030 <printf@plt>
lea    0xf01(%rip),%rdi
call   1030 <printf@plt>
lea    0xec9(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_help>:
push   %rbx
mov    %edi,%ebx
lea    0xec6(%rip),%rdi
call   1050 <printf@plt>
test   %ebx,%ebx
je     1173 <print_help+0x43>
lea    0xee6(%rip),%rdi
call   1040 <puts@plt>
lea    0xedc(%rip),%rdi
call   1040 <puts@plt>
lea    0xed9(%rip),%rdi
call   1040 <puts@plt>
lea    0xeec(%rip),%rdi
call   1040 <puts@plt>
mov    $0xa,%edi
pop    %rbx
jmp    1030 <putchar@plt>

LLVM IR (-O0):
@.str = [48 x i8] c"Usage: cpext [options] <inputpath> <outputpath>\00"
@.str.1 = [3 x i8] c"\0A\0A\00"
@.str.2 = [10 x i8] c"Options:\0A\00"
@.str.3 = [32 x i8] c"--help\09\09-h\09Prints this output.\0A\00"
@.str.4 = [56 x i8] c"--recursive\09-r\09Copies files and directories recursive.\0A\00"
@.str.5 = [2 x i8] c"\0A\00"
define void @print_help(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @printf(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str, i64 0, i64 0))
%4 = load i32, i32* %2
%5 = icmp ne i32 %4, 0
br i1 %5, label %6, label %11
6: ; preds = %1
%7 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%8 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0))
%9 = call i32 @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.3, i64 0, i64 0))
%10 = call i32 @printf(i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str.4, i64 0, i64 0))
br label %11
11: ; preds = %6, %1
%12 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [48 x i8] c"Usage: cpext [options] <inputpath> <outputpath>\00"
@str = [2 x i8] c"\0A\00"
@str.6 = [9 x i8] c"Options:\00"
@str.7 = [31 x i8] c"--help\09\09-h\09Prints this output.\00"
@str.8 = [55 x i8] c"--recursive\09-r\09Copies files and directories recursive.\00"
define void @print_help(i32 %0) {
%2 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([48 x i8], [48 x i8]* @.str, i64 0, i64 0))
%3 = icmp eq i32 %0, 0
br i1 %3, label %9, label %4
4: ; preds = %1
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([2 x i8], [2 x i8]* @str, i64 0, i64 0))
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @str.6, i64 0, i64 0))
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @str.7, i64 0, i64 0))
%8 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([55 x i8], [55 x i8]* @str.8, i64 0, i64 0))
br label %9
9: ; preds = %4, %1
%10 = tail call i32 @putchar(i32 10)
ret void
}