#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*/ fprintf(int /*<<< orphan*/ *, char *);
void usage(FILE *file, int rc) {
  fprintf(file, "Usage:\n");
  fprintf(file, "uca-dump [options...] < /path/to/allkeys.txt\n");
  fprintf(file, "\n");
  fprintf(file, "Options:\n");
  fprintf(file, "--levels=NUM                 How many levels to dump, 1-4, "
                "default 1.\n");
  fprintf(file, "--contractions=NUM           Whether to dump comtractions, "
                "0-1, default 0.\n");
  fprintf(file, "--optimize-contractions=NUM  Whether to optimize "
                "contractions, 0-1, default 0.\n");
  fprintf(file, "--debug=NUM                  Print debug information, 0-1, "
                "default 0.\n");
  fprintf(file, "\n\n");
  exit(rc);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xec6(%rip),%rsi
call   1030 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0xebe(%rip),%rsi
call   1030 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0x1011(%rip),%rsi
call   1030 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0xec6(%rip),%rsi
call   1030 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0xefd(%rip),%rsi
call   1030 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0xf39(%rip),%rsi
call   1030 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0xf79(%rip),%rsi
call   1030 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0xfb0(%rip),%rsi
call   1030 <fprintf@plt>
mov    -0xc(%rbp),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %rdi,%rbx
lea    0xec1(%rip),%rdi
mov    $0x7,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1050 <fwrite@plt>
lea    0xeb0(%rip),%rdi
mov    $0x2d,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1050 <fwrite@plt>
mov    $0xa,%edi
mov    %rbx,%rsi
call   1030 <fputc@plt>
lea    0xeb8(%rip),%rdi
mov    $0x9,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1050 <fwrite@plt>
lea    0xea9(%rip),%rdi
mov    $0x46,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1050 <fwrite@plt>
lea    0xed7(%rip),%rdi
mov    $0x4b,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1050 <fwrite@plt>
lea    0xf0a(%rip),%rdi
mov    $0x4f,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1050 <fwrite@plt>
lea    0xf41(%rip),%rdi
mov    $0x46,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1050 <fwrite@plt>
lea    0xf6f(%rip),%rdi
mov    $0x2,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1050 <fwrite@plt>
mov    %ebp,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [8 x i8] c"Usage:\0A\00"
@.str.1 = [46 x i8] c"uca-dump [options...] < /path/to/allkeys.txt\0A\00"
@.str.2 = [2 x i8] c"\0A\00"
@.str.3 = [10 x i8] c"Options:\0A\00"
@.str.4 = [71 x i8] c"--levels=NUM How many levels to dump, 1-4, default 1.\0A\00"
@.str.5 = [76 x i8] c"--contractions=NUM Whether to dump comtractions, 0-1, default 0.\0A\00"
@.str.6 = [80 x i8] c"--optimize-contractions=NUM Whether to optimize contractions, 0-1, default 0.\0A\00"
@.str.7 = [71 x i8] c"--debug=NUM Print debug information, 0-1, default 0.\0A\00"
@.str.8 = [3 x i8] c"\0A\0A\00"
define void @usage(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
store i32* %0, i32** %3
store i32 %1, i32* %4
%5 = load i32*, i32** %3
%6 = call i32 @fprintf(i32* %5, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%7 = load i32*, i32** %3
%8 = call i32 @fprintf(i32* %7, i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.1, i64 0, i64 0))
%9 = load i32*, i32** %3
%10 = call i32 @fprintf(i32* %9, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%11 = load i32*, i32** %3
%12 = call i32 @fprintf(i32* %11, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.3, i64 0, i64 0))
%13 = load i32*, i32** %3
%14 = call i32 @fprintf(i32* %13, i8* getelementptr inbounds ([71 x i8], [71 x i8]* @.str.4, i64 0, i64 0))
%15 = load i32*, i32** %3
%16 = call i32 @fprintf(i32* %15, i8* getelementptr inbounds ([76 x i8], [76 x i8]* @.str.5, i64 0, i64 0))
%17 = load i32*, i32** %3
%18 = call i32 @fprintf(i32* %17, i8* getelementptr inbounds ([80 x i8], [80 x i8]* @.str.6, i64 0, i64 0))
%19 = load i32*, i32** %3
%20 = call i32 @fprintf(i32* %19, i8* getelementptr inbounds ([71 x i8], [71 x i8]* @.str.7, i64 0, i64 0))
%21 = load i32*, i32** %3
%22 = call i32 @fprintf(i32* %21, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.8, i64 0, i64 0))
%23 = load i32, i32* %4
%24 = call i32 @exit(i32 %23)
unreachable
}

LLVM IR (-O2):
@.str = [8 x i8] c"Usage:\0A\00"
@.str.1 = [46 x i8] c"uca-dump [options...] < /path/to/allkeys.txt\0A\00"
@.str.3 = [10 x i8] c"Options:\0A\00"
@.str.4 = [71 x i8] c"--levels=NUM How many levels to dump, 1-4, default 1.\0A\00"
@.str.5 = [76 x i8] c"--contractions=NUM Whether to dump comtractions, 0-1, default 0.\0A\00"
@.str.6 = [80 x i8] c"--optimize-contractions=NUM Whether to optimize contractions, 0-1, default 0.\0A\00"
@.str.7 = [71 x i8] c"--debug=NUM Print debug information, 0-1, default 0.\0A\00"
@.str.8 = [3 x i8] c"\0A\0A\00"
define void @usage(i32* nocapture %0, i32 %1) {
%3 = tail call i64 @fwrite(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i64 7, i64 1, i32* %0)
%4 = tail call i64 @fwrite(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.1, i64 0, i64 0), i64 45, i64 1, i32* %0)
%5 = tail call i32 @fputc(i32 10, i32* %0)
%6 = tail call i64 @fwrite(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.3, i64 0, i64 0), i64 9, i64 1, i32* %0)
%7 = tail call i64 @fwrite(i8* getelementptr inbounds ([71 x i8], [71 x i8]* @.str.4, i64 0, i64 0), i64 70, i64 1, i32* %0)
%8 = tail call i64 @fwrite(i8* getelementptr inbounds ([76 x i8], [76 x i8]* @.str.5, i64 0, i64 0), i64 75, i64 1, i32* %0)
%9 = tail call i64 @fwrite(i8* getelementptr inbounds ([80 x i8], [80 x i8]* @.str.6, i64 0, i64 0), i64 79, i64 1, i32* %0)
%10 = tail call i64 @fwrite(i8* getelementptr inbounds ([71 x i8], [71 x i8]* @.str.7, i64 0, i64 0), i64 70, i64 1, i32* %0)
%11 = tail call i64 @fwrite(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.8, i64 0, i64 0), i64 2, i64 1, i32* %0)
%12 = tail call i32 @exit(i32 %1)
unreachable
}