#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 *, char const *, ...);
void usage(FILE *f, const char *p, int q) {
  if (q) {
    fprintf(f, "Try '%s --help' for more information.\n", p);
    return;
  }
  fprintf(f,
          "Usage:\n\n"
          "Generating a public key from your private key:\n"
          "  %s [OPT]... [FMT] <private key> [FMT]\n\n"
          "Obtain shared secret from <public key> with your private key:\n"
          "  %s [OPT]... [FMT] <private key> [FMT] <public key> [FMT]\n\n"
          "FMT specifies the format used for the keys.\n"
          "It is one of the options:\n"
          "  --b32: base32-encoded (default)\n"
          "  --ibh: inverted-bytes hexadecimal\n"
          "  --hex: hexadecimal\n\n"
          "OPT is one of the options:\n"
          "  --safe: abort program when potentially unsafe keys are seen\n"
          "  --warn: just warn about it (default)\n"
          "  --unsafe: do not perform any key validation\n\n",
          p, p, p);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
je     1148 <usage+0x38>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rdx
lea    0xec4(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
jmp    1166 <usage+0x56>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rdx
mov    -0x10(%rbp),%rcx
mov    -0x10(%rbp),%r8
lea    0xec8(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<usage>:
mov    %edx,%eax
mov    %rsi,%rdx
test   %eax,%eax
je     1127 <usage+0x17>
lea    0xee0(%rip),%rsi
xor    %eax,%eax
jmp    1030 <fprintf@plt>
lea    0xef9(%rip),%rsi
mov    %rdx,%rcx
mov    %rdx,%r8
xor    %eax,%eax
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@.str = [39 x i8] c"Try '%s --help' for more information.\0A\00"
@.str.1 = [556 x i8] c"Usage:\0A\0AGenerating a public key from your private key:\0A %s [OPT]... [FMT] <private key> [FMT]\0A\0AObtain shared secret from <public key> with your private key:\0A %s [OPT]... [FMT] <private key> [FMT] <public key> [FMT]\0A\0AFMT specifies the format used for the keys.\0AIt is one of the options:\0A --b32: base32-encoded (default)\0A --ibh: inverted-bytes hexadecimal\0A --hex: hexadecimal\0A\0AOPT is one of the options:\0A --safe: abort program when potentially unsafe keys are seen\0A --warn: just warn about it (default)\0A --unsafe: do not perform any key validation\0A\0A\00"
define void @usage(i32* %0, i8* %1, i32 %2) {
%4 = alloca i32*
%5 = alloca i8*
%6 = alloca i32
store i32* %0, i32** %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%7 = load i32, i32* %6
%8 = icmp ne i32 %7, 0
br i1 %8, label %9, label %13
9: ; preds = %3
%10 = load i32*, i32** %4
%11 = load i8*, i8** %5
%12 = call i32 (i32*, i8*, i8*, ...) @fprintf(i32* %10, i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0), i8* %11)
br label %19
13: ; preds = %3
%14 = load i32*, i32** %4
%15 = load i8*, i8** %5
%16 = load i8*, i8** %5
%17 = load i8*, i8** %5
%18 = call i32 (i32*, i8*, i8*, ...) @fprintf(i32* %14, i8* getelementptr inbounds ([556 x i8], [556 x i8]* @.str.1, i64 0, i64 0), i8* %15, i8* %16, i8* %17)
br label %19
19: ; preds = %13, %9
ret void
}

LLVM IR (-O2):
@.str = [39 x i8] c"Try '%s --help' for more information.\0A\00"
@.str.1 = [556 x i8] c"Usage:\0A\0AGenerating a public key from your private key:\0A %s [OPT]... [FMT] <private key> [FMT]\0A\0AObtain shared secret from <public key> with your private key:\0A %s [OPT]... [FMT] <private key> [FMT] <public key> [FMT]\0A\0AFMT specifies the format used for the keys.\0AIt is one of the options:\0A --b32: base32-encoded (default)\0A --ibh: inverted-bytes hexadecimal\0A --hex: hexadecimal\0A\0AOPT is one of the options:\0A --safe: abort program when potentially unsafe keys are seen\0A --warn: just warn about it (default)\0A --unsafe: do not perform any key validation\0A\0A\00"
define void @usage(i32* nocapture %0, i8* %1, i32 %2) {
%4 = icmp eq i32 %2, 0
br i1 %4, label %7, label %5
5: ; preds = %3
%6 = tail call i32 (i32*, i8*, i8*, ...) @fprintf(i32* %0, i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0), i8* %1)
br label %9
7: ; preds = %3
%8 = tail call i32 (i32*, i8*, i8*, ...) @fprintf(i32* %0, i8* getelementptr inbounds ([556 x i8], [556 x i8]* @.str.1, i64 0, i64 0), i8* %1, i8* %1, i8* %1)
br label %9
9: ; preds = %7, %5
ret void
}