#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*/ fprintf(int /*<<< orphan*/, char *, char const *,
                           char const *, char const *);
int /*<<< orphan*/ stderr;
void usage(const char *argv_0) {
  fprintf(stderr,
          "Usage: %s PATH_TO_PROGRAM ROOT_PATH\n\n"
          "Description:"
          "\n\tLdcopy is a small program to copy (tree) all shared "
          "library "
          "\n\tinto destination directory ROOT_PATH. If in destination "
          "\n\tdirectory existing another version of library, then don't "
          "\n\tcopy, but create symbolic link. existing library."
          "\n"
          "\nArguments:"
          "\n\tPATH_TO_PROGRAM:"
          "\n\t   - Full path to binary program, where will copy library"
          "\n"
          "\n"
          "\tROOT_PATH:"
          "\n\t   - Root path, where will then store library"
          "\n\t   - If no exist, then will created."
          "\n"
          "\nVersion:"
          "\n\t"
          "0.2"
          "\n"
          "\nExample:\n"
          "\t%s /bin/bash /tmp/"
          "\n"
          "\n"
          "Contact:\n"
          "\t"
          "chrootlinux@krehel.sk"
          "\n",
          argv_0, argv_0, argv_0);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ebd(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
mov    -0x8(%rbp),%rcx
mov    -0x8(%rbp),%r8
lea    0xec8(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<usage>:
mov    %rdi,%rcx
mov    0x2ec6(%rip),%rax
mov    (%rax),%edi
lea    0xedd(%rip),%rsi
mov    %rcx,%rdx
mov    %rcx,%r8
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [547 x i8] c"Usage: %s PATH_TO_PROGRAM ROOT_PATH\0A\0ADescription:\0A\09Ldcopy is a small program to copy (tree) all shared library \0A\09into destination directory ROOT_PATH. If in destination \0A\09directory existing another version of library, then don't \0A\09copy, but create symbolic link. existing library.\0A\0AArguments:\0A\09PATH_TO_PROGRAM:\0A\09 - Full path to binary program, where will copy library\0A\0A\09ROOT_PATH:\0A\09 - Root path, where will then store library\0A\09 - If no exist, then will created.\0A\0AVersion:\0A\090.2\0A\0AExample:\0A\09%s /bin/bash /tmp/\0A\0AContact:\0A\09chrootlinux@krehel.sk\0A\00"
define void @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = load i8*, i8** %2
%6 = load i8*, i8** %2
%7 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([547 x i8], [547 x i8]* @.str, i64 0, i64 0), i8* %4, i8* %5, i8* %6)
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [547 x i8] c"Usage: %s PATH_TO_PROGRAM ROOT_PATH\0A\0ADescription:\0A\09Ldcopy is a small program to copy (tree) all shared library \0A\09into destination directory ROOT_PATH. If in destination \0A\09directory existing another version of library, then don't \0A\09copy, but create symbolic link. existing library.\0A\0AArguments:\0A\09PATH_TO_PROGRAM:\0A\09 - Full path to binary program, where will copy library\0A\0A\09ROOT_PATH:\0A\09 - Root path, where will then store library\0A\09 - If no exist, then will created.\0A\0AVersion:\0A\090.2\0A\0AExample:\0A\09%s /bin/bash /tmp/\0A\0AContact:\0A\09chrootlinux@krehel.sk\0A\00"
define void @usage(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([547 x i8], [547 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %0, i8* %0)
ret void
}