#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(int);
int /*<<< orphan*/ printf(char *, char const *);
void usage(const char *cmd, int status) {
  printf(
      "picotls-esni - generates an ESNI Resource Record\n"
      "\n"
      "Usage: %s [options]\n"
      "Options:\n"
      "  -n <published-sni>  published sni value\n"
      "  -K <key-file>       private key files (repeat the option to include "
      "multiple\n"
      "                      keys)\n"
      "  -c <cipher-suite>   aes128-gcm, chacha20-poly1305, ...\n"
      "  -d <days>           number of days until expiration (default: 90)\n"
      "  -p <padded-length>  padded length (default: 260)\n"
      "  -o <output-file>    write output to specified file instead of stdout\n"
      "                      (use on Windows as stdout is not binary there)\n"
      "  -h                  prints this help\n"
      "\n"
      "-c and -x can be used multiple times.\n"
      "\n",
      cmd);
  exit(status);
}


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

x86 assembly (clang, -O2):
<usage>:
push   %rbx
mov    %esi,%ebx
mov    %rdi,%rsi
lea    0xed3(%rip),%rdi
call   1030 <printf@plt>
mov    %ebx,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [624 x i8] c"picotls-esni - generates an ESNI Resource Record\0A\0AUsage: %s [options]\0AOptions:\0A -n <published-sni> published sni value\0A -K <key-file> private key files (repeat the option to include multiple\0A keys)\0A -c <cipher-suite> aes128-gcm, chacha20-poly1305, ...\0A -d <days> number of days until expiration (default: 90)\0A -p <padded-length> padded length (default: 260)\0A -o <output-file> write output to specified file instead of stdout\0A (use on Windows as stdout is not binary there)\0A -h prints this help\0A\0A-c and -x can be used multiple times.\0A\0A\00"
define void @usage(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i8*, i8** %3
%6 = call i32 @printf(i8* getelementptr inbounds ([624 x i8], [624 x i8]* @.str, i64 0, i64 0), i8* %5)
%7 = load i32, i32* %4
%8 = call i32 @exit(i32 %7)
unreachable
}

LLVM IR (-O2):
@.str = [624 x i8] c"picotls-esni - generates an ESNI Resource Record\0A\0AUsage: %s [options]\0AOptions:\0A -n <published-sni> published sni value\0A -K <key-file> private key files (repeat the option to include multiple\0A keys)\0A -c <cipher-suite> aes128-gcm, chacha20-poly1305, ...\0A -d <days> number of days until expiration (default: 90)\0A -p <padded-length> padded length (default: 260)\0A -o <output-file> write output to specified file instead of stdout\0A (use on Windows as stdout is not binary there)\0A -h prints this help\0A\0A-c and -x can be used multiple times.\0A\0A\00"
define void @usage(i8* %0, i32 %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([624 x i8], [624 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = tail call i32 @exit(i32 %1)
unreachable
}