#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*/ fprintf(int /*<<< orphan*/, char *, char const *);
int /*<<< orphan*/ stdout;
void usage(const char *name) {
  fprintf(stdout,
          "usage: %s <command> [<args>]\n\n"
          "Commands are:\n"
          "  cbc_enc <key> <buffer>     AES-128-CBC encrypt (IV=0)\n"
          "  cbc_dec <key> <buffer>     AES-128-CBC decrypt (IV=0)\n"
          "  ecb_enc <key> <buffer>     AES-128-ECB encrypt (IV=0)\n"
          "  ecb_dec <key> <buffer>     AES-128-ECB decrypt (IV=0)\n"
          "  mac <file> <key> <iv>      AES-128-CBC-MAC for file\n"
          "  mac0 <size> <key> <iv>     AES-128-CBC-MAC for zeroed file\n"
          "  rsa <p> <q> <d> <buffer>   RSA decryption: buffer^d (mod p*q)\n"
          "  ctr_enc <filein> <fileout> <key> <iv>  AES-128-CTR encrypt\n"
          "\nNotes:\n"
          "- <key> & <iv> are 32-digit hexstring. For example: "
          "93C467E37DB0C7A4D1BE3F810152CB56\n"
          "- <buffer> are also hexstring (length multiple of 32)\n",
          name);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ebd(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xed0(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<usage>:
mov    %rdi,%rdx
mov    0x2ec6(%rip),%rax
mov    (%rax),%edi
lea    0xedd(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stdout = global i32 0
@.str = [656 x i8] c"usage: %s <command> [<args>]\0A\0ACommands are:\0A cbc_enc <key> <buffer> AES-128-CBC encrypt (IV=0)\0A cbc_dec <key> <buffer> AES-128-CBC decrypt (IV=0)\0A ecb_enc <key> <buffer> AES-128-ECB encrypt (IV=0)\0A ecb_dec <key> <buffer> AES-128-ECB decrypt (IV=0)\0A mac <file> <key> <iv> AES-128-CBC-MAC for file\0A mac0 <size> <key> <iv> AES-128-CBC-MAC for zeroed file\0A rsa <p> <q> <d> <buffer> RSA decryption: buffer^d (mod p*q)\0A ctr_enc <filein> <fileout> <key> <iv> AES-128-CTR encrypt\0A\0ANotes:\0A- <key> & <iv> are 32-digit hexstring. For example: 93C467E37DB0C7A4D1BE3F810152CB56\0A- <buffer> are also hexstring (length multiple of 32)\0A\00"
define void @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stdout
%4 = load i8*, i8** %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([656 x i8], [656 x i8]* @.str, i64 0, i64 0), i8* %4)
ret void
}

LLVM IR (-O2):
@stdout = global i32 0
@.str = [656 x i8] c"usage: %s <command> [<args>]\0A\0ACommands are:\0A cbc_enc <key> <buffer> AES-128-CBC encrypt (IV=0)\0A cbc_dec <key> <buffer> AES-128-CBC decrypt (IV=0)\0A ecb_enc <key> <buffer> AES-128-ECB encrypt (IV=0)\0A ecb_dec <key> <buffer> AES-128-ECB decrypt (IV=0)\0A mac <file> <key> <iv> AES-128-CBC-MAC for file\0A mac0 <size> <key> <iv> AES-128-CBC-MAC for zeroed file\0A rsa <p> <q> <d> <buffer> RSA decryption: buffer^d (mod p*q)\0A ctr_enc <filein> <fileout> <key> <iv> AES-128-CTR encrypt\0A\0ANotes:\0A- <key> & <iv> are 32-digit hexstring. For example: 93C467E37DB0C7A4D1BE3F810152CB56\0A- <buffer> are also hexstring (length multiple of 32)\0A\00"
define void @usage(i8* %0) {
%2 = load i32, i32* @stdout
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([656 x i8], [656 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}