#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 */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fputs(char *, int /*<<< orphan*/ *);
int /*<<< orphan*/ *stderr;
int /*<<< orphan*/ *stdout;
void usage(int mode) {
  FILE *fp = mode > 0 ? stderr : stdout;
  if (mode <= 0)
    fputs("mkportable"
          " "
          "1.0"
          "\n"
          "Copyright (C) 2013 g10 Code GmbH\n"
          "License GPLv3+: GNU GPL version 3 or later "
          "<http://gnu.org/licenses/gpl.html>.\n"
          "This is free software: you are free to change "
          "and redistribute it.\n"
          "There is NO WARRANTY, to the extent permitted by law.\n\n",
          fp);
  if (mode < 0)
    exit(0);
  fputs("Usage: mkportable [OPTIONS] TARGETDIR\n", fp);
  if (mode > 0)
    exit(1);
  fputs("Create a portable version of Gpg4win by copying the required\n"
        "files to TARGETDIR\n"
        "\n"
        "Options:\n"
        "  --vanilla   create a bare GnuPG version [default]\n"
        "  --full      create a full version\n"
        "  --verbose   enable extra informational output\n"
        "  --force     force installation to a non-empty directory\n"
        "  --version   print version of this program and exit\n"
        "  --help      print this help and exit\n",
        fp);
  exit(0);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jle    1148 <usage+0x28>
mov    0x2ea4(%rip),%rax
mov    (%rax),%rax
mov    %rax,-0x18(%rbp)
jmp    1156 <usage+0x36>
mov    0x2e89(%rip),%rax
mov    (%rax),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x10(%rbp)
cmpl   $0x0,-0x4(%rbp)
jg     1178 <usage+0x58>
mov    -0x10(%rbp),%rsi
lea    0xe8d(%rip),%rdi
call   1030 <fputs@plt>
cmpl   $0x0,-0x4(%rbp)
jge    1189 <usage+0x69>
xor    %edi,%edi
call   1040 <exit@plt>
mov    -0x10(%rbp),%rsi
lea    0xf66(%rip),%rdi
call   1030 <fputs@plt>
cmpl   $0x0,-0x4(%rbp)
jle    11ad <usage+0x8d>
mov    $0x1,%edi
call   1040 <exit@plt>
mov    -0x10(%rbp),%rsi
lea    0xf69(%rip),%rdi
call   1030 <fputs@plt>
xor    %edi,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %r14
push   %rbx
push   %rax
mov    %edi,%ebx
test   %edi,%edi
jle    1138 <usage+0x18>
mov    0x2eaf(%rip),%rax
mov    (%rax),%r14
jle    1144 <usage+0x24>
jmp    1161 <usage+0x41>
mov    0x2e99(%rip),%rax
mov    (%rax),%r14
jg     1161 <usage+0x41>
lea    0xeb5(%rip),%rdi
mov    $0xf9,%esi
mov    $0x1,%edx
mov    %r14,%rcx
call   1040 <fwrite@plt>
test   %ebx,%ebx
js     11a1 <usage+0x81>
lea    0xf92(%rip),%rdi
mov    $0x26,%esi
mov    $0x1,%edx
mov    %r14,%rcx
call   1040 <fwrite@plt>
test   %ebx,%ebx
jle    1188 <usage+0x68>
mov    $0x1,%edi
call   1030 <exit@plt>
lea    0xf92(%rip),%rdi
mov    $0x178,%esi
mov    $0x1,%edx
mov    %r14,%rcx
call   1040 <fwrite@plt>
xor    %edi,%edi
call   1030 <exit@plt>

LLVM IR (-O0):
@stderr = global i32* null
@stdout = global i32* null
@.str = [250 x i8] c"mkportable 1.0\0ACopyright (C) 2013 g10 Code GmbH\0ALicense GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.\0AThis is free software: you are free to change and redistribute it.\0AThere is NO WARRANTY, to the extent permitted by law.\0A\0A\00"
@.str.1 = [39 x i8] c"Usage: mkportable [OPTIONS] TARGETDIR\0A\00"
@.str.2 = [377 x i8] c"Create a portable version of Gpg4win by copying the required\0Afiles to TARGETDIR\0A\0AOptions:\0A --vanilla create a bare GnuPG version [default]\0A --full create a full version\0A --verbose enable extra informational output\0A --force force installation to a non-empty directory\0A --version print version of this program and exit\0A --help print this help and exit\0A\00"
define void @usage(i32 %0) {
%2 = alloca i32
%3 = alloca i32*
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = icmp sgt i32 %4, 0
br i1 %5, label %6, label %8
6: ; preds = %1
%7 = load i32*, i32** @stderr
br label %10
8: ; preds = %1
%9 = load i32*, i32** @stdout
br label %10
10: ; preds = %8, %6
%11 = phi i32* [ %7, %6 ], [ %9, %8 ]
store i32* %11, i32** %3
%12 = load i32, i32* %2
%13 = icmp sle i32 %12, 0
br i1 %13, label %14, label %17
14: ; preds = %10
%15 = load i32*, i32** %3
%16 = call i32 @fputs(i8* getelementptr inbounds ([250 x i8], [250 x i8]* @.str, i64 0, i64 0), i32* %15)
br label %17
17: ; preds = %14, %10
%18 = load i32, i32* %2
%19 = icmp slt i32 %18, 0
br i1 %19, label %20, label %22
20: ; preds = %17
%21 = call i32 @exit(i32 0)
unreachable
22: ; preds = %17
%23 = load i32*, i32** %3
%24 = call i32 @fputs(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.1, i64 0, i64 0), i32* %23)
%25 = load i32, i32* %2
%26 = icmp sgt i32 %25, 0
br i1 %26, label %27, label %29
27: ; preds = %22
%28 = call i32 @exit(i32 1)
unreachable
29: ; preds = %22
%30 = load i32*, i32** %3
%31 = call i32 @fputs(i8* getelementptr inbounds ([377 x i8], [377 x i8]* @.str.2, i64 0, i64 0), i32* %30)
%32 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@stderr = global i32* null
@stdout = global i32* null
@.str = [250 x i8] c"mkportable 1.0\0ACopyright (C) 2013 g10 Code GmbH\0ALicense GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.\0AThis is free software: you are free to change and redistribute it.\0AThere is NO WARRANTY, to the extent permitted by law.\0A\0A\00"
@.str.1 = [39 x i8] c"Usage: mkportable [OPTIONS] TARGETDIR\0A\00"
@.str.2 = [377 x i8] c"Create a portable version of Gpg4win by copying the required\0Afiles to TARGETDIR\0A\0AOptions:\0A --vanilla create a bare GnuPG version [default]\0A --full create a full version\0A --verbose enable extra informational output\0A --force force installation to a non-empty directory\0A --version print version of this program and exit\0A --help print this help and exit\0A\00"
define void @usage(i32 %0) {
%2 = icmp sgt i32 %0, 0
%3 = load i32*, i32** @stderr
%4 = load i32*, i32** @stdout
%5 = select i1 %2, i32* %3, i32* %4
%6 = icmp slt i32 %0, 1
br i1 %6, label %7, label %12
7: ; preds = %1
%8 = tail call i64 @fwrite(i8* getelementptr inbounds ([250 x i8], [250 x i8]* @.str, i64 0, i64 0), i64 249, i64 1, i32* %5)
%9 = icmp slt i32 %0, 0
br i1 %9, label %10, label %12
10: ; preds = %7
%11 = tail call i32 @exit(i32 0)
unreachable
12: ; preds = %1, %7
%13 = tail call i64 @fwrite(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.1, i64 0, i64 0), i64 38, i64 1, i32* %5)
br i1 %2, label %14, label %16
14: ; preds = %12
%15 = tail call i32 @exit(i32 1)
unreachable
16: ; preds = %12
%17 = tail call i64 @fwrite(i8* getelementptr inbounds ([377 x i8], [377 x i8]* @.str.2, i64 0, i64 0), i64 376, i64 1, i32* %5)
%18 = tail call i32 @exit(i32 0)
unreachable
}