#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*/ EXIT_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *, char *);
int /*<<< orphan*/ stderr;
void print_usage_and_exit(int argc, char **argv) {
  if (argc > 0) {
    fprintf(stderr,
            "ECQV Public/Private Key Pair Generator %s\n"
            "Create EC key pair with implicit certificate.\n"
            "Usage: %s [OPTION...] FILE\n"
            "  -i <arg>                       Identity file, default: STDIN\n"
            "  -o <arg>                       Output file, default: STDOUT\n"
            "  -l <arg>                       Log file, default: no logging\n"
            "  -h <arg>                       Hash function, default: SHA-1\n"
            "Reads the private key of CA from the PEM file denoted by FILE.\n",
            "0.1", argv[0]);
  }
  exit(EXIT_FAILURE);
}


x86 assembly (clang, -O0):
<print_usage_and_exit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x0,-0x4(%rbp)
jle    115c <print_usage_and_exit+0x3c>
mov    0x2ea0(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rax
mov    (%rax),%rcx
lea    0xeb0(%rip),%rsi
lea    0x1057(%rip),%rdx
call   1030 <fprintf@plt>
mov    0x2e75(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<print_usage_and_exit>:
push   %rax
test   %edi,%edi
jle    1144 <print_usage_and_exit+0x24>
mov    0x2eb4(%rip),%rax
mov    (%rax),%edi
mov    (%rsi),%rcx
lea    0xec8(%rip),%rsi
lea    0x106f(%rip),%rdx
call   1030 <fprintf@plt>
mov    0x2e8d(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [430 x i8] c"ECQV Public/Private Key Pair Generator %s\0ACreate EC key pair with implicit certificate.\0AUsage: %s [OPTION...] FILE\0A -i <arg> Identity file, default: STDIN\0A -o <arg> Output file, default: STDOUT\0A -l <arg> Log file, default: no logging\0A -h <arg> Hash function, default: SHA-1\0AReads the private key of CA from the PEM file denoted by FILE.\0A\00"
@.str.1 = [4 x i8] c"0.1\00"
@EXIT_FAILURE = global i32 0
define void @print_usage_and_exit(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
store i32 %0, i32* %3
store i8** %1, i8*** %4
%5 = load i32, i32* %3
%6 = icmp sgt i32 %5, 0
br i1 %6, label %7, label %13
7: ; preds = %2
%8 = load i32, i32* @stderr
%9 = load i8**, i8*** %4
%10 = getelementptr inbounds i8*, i8** %9, i64 0
%11 = load i8*, i8** %10
%12 = call i32 @fprintf(i32 %8, i8* getelementptr inbounds ([430 x i8], [430 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %11)
br label %13
13: ; preds = %7, %2
%14 = load i32, i32* @EXIT_FAILURE
%15 = call i32 @exit(i32 %14)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [430 x i8] c"ECQV Public/Private Key Pair Generator %s\0ACreate EC key pair with implicit certificate.\0AUsage: %s [OPTION...] FILE\0A -i <arg> Identity file, default: STDIN\0A -o <arg> Output file, default: STDOUT\0A -l <arg> Log file, default: no logging\0A -h <arg> Hash function, default: SHA-1\0AReads the private key of CA from the PEM file denoted by FILE.\0A\00"
@.str.1 = [4 x i8] c"0.1\00"
@EXIT_FAILURE = global i32 0
define void @print_usage_and_exit(i32 %0, i8** nocapture %1) {
%3 = icmp sgt i32 %0, 0
br i1 %3, label %4, label %8
4: ; preds = %2
%5 = load i32, i32* @stderr
%6 = load i8*, i8** %1
%7 = tail call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([430 x i8], [430 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %6)
br label %8
8: ; preds = %4, %2
%9 = load i32, i32* @EXIT_FAILURE
%10 = tail call i32 @exit(i32 %9)
unreachable
}