#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*/ fprintf(int /*<<< orphan*/ *, char *, ...);
void printusage(FILE *fp) {
  fprintf(fp, "decrypt:\tsfet [-d] [-vf] [-p <fn>] [<input>] [<output>]\n");
  fprintf(fp, "encrypt:\tsfet -e [-vf] [-p <fn>] [-i <iter>] [-c <length>] "
              "[<input>] [<output>]\n");
  fprintf(fp, "show metadata:\tsfet -s [-v] [<input>]\n");
  fprintf(fp, "\n");
  fprintf(fp, "options:\n");
  fprintf(fp, "  -v\t\tincrease verbosity level\n");
  fprintf(fp, "  -f\t\toverwrite outputfile, if it already exists\n");
  fprintf(fp, "  -p <file>\tread password from <file> instead of %s\n",
          "/dev/tty");
  fprintf(fp,
          "  -i <n>\tset pbkdf2 iteration number to <n>, encryption only\n");
  fprintf(fp, "  -c <length>\tset chunk size to <length>, encryption only\n");
  fprintf(fp, "  -V\t\tshow version\n");
  fprintf(fp, "  -h\t\tshow this help message\n");
}


x86 assembly (clang, -O0):
<printusage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xed9(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0xf00(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0xf3f(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0xf5c(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0xf42(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0xf3a(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0xf48(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0xf68(%rip),%rsi
lea    0xf96(%rip),%rdx
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0xf8d(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0xfb9(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0xfe2(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0xfe4(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printusage>:
push   %rbx
mov    %rdi,%rbx
lea    0xec5(%rip),%rdi
mov    $0x38,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1050 <fwrite@plt>
lea    0xee5(%rip),%rdi
mov    $0x50,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1050 <fwrite@plt>
lea    0xf1d(%rip),%rdi
mov    $0x26,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1050 <fwrite@plt>
mov    $0xa,%edi
mov    %rbx,%rsi
call   1030 <fputc@plt>
lea    0xf1e(%rip),%rdi
mov    $0x9,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1050 <fwrite@plt>
lea    0xf0f(%rip),%rdi
mov    $0x1f,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1050 <fwrite@plt>
lea    0xf16(%rip),%rdi
mov    $0x31,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1050 <fwrite@plt>
lea    0xf2f(%rip),%rsi
lea    0xf5d(%rip),%rdx
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <fprintf@plt>
lea    0xf55(%rip),%rdi
mov    $0x3d,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1050 <fwrite@plt>
lea    0xf7a(%rip),%rdi
mov    $0x3a,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1050 <fwrite@plt>
lea    0xf9c(%rip),%rdi
mov    $0x13,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1050 <fwrite@plt>
lea    0xf97(%rip),%rdi
mov    $0x1d,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
pop    %rbx
jmp    1050 <fwrite@plt>

LLVM IR (-O0):
@.str = [57 x i8] c"decrypt:\09sfet [-d] [-vf] [-p <fn>] [<input>] [<output>]\0A\00"
@.str.1 = [81 x i8] c"encrypt:\09sfet -e [-vf] [-p <fn>] [-i <iter>] [-c <length>] [<input>] [<output>]\0A\00"
@.str.2 = [39 x i8] c"show metadata:\09sfet -s [-v] [<input>]\0A\00"
@.str.3 = [2 x i8] c"\0A\00"
@.str.4 = [10 x i8] c"options:\0A\00"
@.str.5 = [32 x i8] c" -v\09\09increase verbosity level\0A\00"
@.str.6 = [50 x i8] c" -f\09\09overwrite outputfile, if it already exists\0A\00"
@.str.7 = [53 x i8] c" -p <file>\09read password from <file> instead of %s\0A\00"
@.str.8 = [9 x i8] c"/dev/tty\00"
@.str.9 = [62 x i8] c" -i <n>\09set pbkdf2 iteration number to <n>, encryption only\0A\00"
@.str.10 = [59 x i8] c" -c <length>\09set chunk size to <length>, encryption only\0A\00"
@.str.11 = [20 x i8] c" -V\09\09show version\0A\00"
@.str.12 = [30 x i8] c" -h\09\09show this help message\0A\00"
define void @printusage(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = call i32 (i32*, i8*, ...) @fprintf(i32* %3, i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str, i64 0, i64 0))
%5 = load i32*, i32** %2
%6 = call i32 (i32*, i8*, ...) @fprintf(i32* %5, i8* getelementptr inbounds ([81 x i8], [81 x i8]* @.str.1, i64 0, i64 0))
%7 = load i32*, i32** %2
%8 = call i32 (i32*, i8*, ...) @fprintf(i32* %7, i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.2, i64 0, i64 0))
%9 = load i32*, i32** %2
%10 = call i32 (i32*, i8*, ...) @fprintf(i32* %9, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
%11 = load i32*, i32** %2
%12 = call i32 (i32*, i8*, ...) @fprintf(i32* %11, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.4, i64 0, i64 0))
%13 = load i32*, i32** %2
%14 = call i32 (i32*, i8*, ...) @fprintf(i32* %13, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.5, i64 0, i64 0))
%15 = load i32*, i32** %2
%16 = call i32 (i32*, i8*, ...) @fprintf(i32* %15, i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.6, i64 0, i64 0))
%17 = load i32*, i32** %2
%18 = call i32 (i32*, i8*, ...) @fprintf(i32* %17, i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str.7, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.8, i64 0, i64 0))
%19 = load i32*, i32** %2
%20 = call i32 (i32*, i8*, ...) @fprintf(i32* %19, i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str.9, i64 0, i64 0))
%21 = load i32*, i32** %2
%22 = call i32 (i32*, i8*, ...) @fprintf(i32* %21, i8* getelementptr inbounds ([59 x i8], [59 x i8]* @.str.10, i64 0, i64 0))
%23 = load i32*, i32** %2
%24 = call i32 (i32*, i8*, ...) @fprintf(i32* %23, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.11, i64 0, i64 0))
%25 = load i32*, i32** %2
%26 = call i32 (i32*, i8*, ...) @fprintf(i32* %25, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.12, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [57 x i8] c"decrypt:\09sfet [-d] [-vf] [-p <fn>] [<input>] [<output>]\0A\00"
@.str.1 = [81 x i8] c"encrypt:\09sfet -e [-vf] [-p <fn>] [-i <iter>] [-c <length>] [<input>] [<output>]\0A\00"
@.str.2 = [39 x i8] c"show metadata:\09sfet -s [-v] [<input>]\0A\00"
@.str.4 = [10 x i8] c"options:\0A\00"
@.str.5 = [32 x i8] c" -v\09\09increase verbosity level\0A\00"
@.str.6 = [50 x i8] c" -f\09\09overwrite outputfile, if it already exists\0A\00"
@.str.7 = [53 x i8] c" -p <file>\09read password from <file> instead of %s\0A\00"
@.str.8 = [9 x i8] c"/dev/tty\00"
@.str.9 = [62 x i8] c" -i <n>\09set pbkdf2 iteration number to <n>, encryption only\0A\00"
@.str.10 = [59 x i8] c" -c <length>\09set chunk size to <length>, encryption only\0A\00"
@.str.11 = [20 x i8] c" -V\09\09show version\0A\00"
@.str.12 = [30 x i8] c" -h\09\09show this help message\0A\00"
define void @printusage(i32* nocapture %0) {
%2 = tail call i64 @fwrite(i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str, i64 0, i64 0), i64 56, i64 1, i32* %0)
%3 = tail call i64 @fwrite(i8* getelementptr inbounds ([81 x i8], [81 x i8]* @.str.1, i64 0, i64 0), i64 80, i64 1, i32* %0)
%4 = tail call i64 @fwrite(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.2, i64 0, i64 0), i64 38, 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.4, i64 0, i64 0), i64 9, i64 1, i32* %0)
%7 = tail call i64 @fwrite(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.5, i64 0, i64 0), i64 31, i64 1, i32* %0)
%8 = tail call i64 @fwrite(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.6, i64 0, i64 0), i64 49, i64 1, i32* %0)
%9 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %0, i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str.7, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.8, i64 0, i64 0))
%10 = tail call i64 @fwrite(i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str.9, i64 0, i64 0), i64 61, i64 1, i32* %0)
%11 = tail call i64 @fwrite(i8* getelementptr inbounds ([59 x i8], [59 x i8]* @.str.10, i64 0, i64 0), i64 58, i64 1, i32* %0)
%12 = tail call i64 @fwrite(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.11, i64 0, i64 0), i64 19, i64 1, i32* %0)
%13 = tail call i64 @fwrite(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.12, i64 0, i64 0), i64 29, i64 1, i32* %0)
ret void
}