#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*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, ...);
void print_usage(FILE *stream, int exit_code, const char *program_name) {
  fprintf(stream, "\nUsage:  %s [options]... [inputfile]...\n", program_name);
  fprintf(
      stream,
      "  {-h  --help}                       Display this usage information.\n"
      "  {-e  --encrypt} [inputfile]        Encrypt a plaintext using AES.\n"
      "  {-d  --decrypt} [inputfile]        Decrypt a ciphertext using AES.\n"
      "                                                                    \n");
  exit(exit_code);
}


x86 assembly (clang, -O0):
<print_usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rdx
lea    0xebe(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0xed5(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    -0xc(%rbp),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<print_usage>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %rdi,%rbx
lea    0xec1(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
lea    0xedc(%rip),%rdi
mov    $0x113,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1050 <fwrite@plt>
mov    %ebp,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [41 x i8] c"\0AUsage: %s [options]... [inputfile]...\0A\00"
@.str.1 = [276 x i8] c" {-h --help} Display this usage information.\0A {-e --encrypt} [inputfile] Encrypt a plaintext using AES.\0A {-d --decrypt} [inputfile] Decrypt a ciphertext using AES.\0A \0A\00"
define void @print_usage(i32* %0, i32 %1, i8* %2) {
%4 = alloca i32*
%5 = alloca i32
%6 = alloca i8*
store i32* %0, i32** %4
store i32 %1, i32* %5
store i8* %2, i8** %6
%7 = load i32*, i32** %4
%8 = load i8*, i8** %6
%9 = call i32 (i32*, i8*, ...) @fprintf(i32* %7, i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0), i8* %8)
%10 = load i32*, i32** %4
%11 = call i32 (i32*, i8*, ...) @fprintf(i32* %10, i8* getelementptr inbounds ([276 x i8], [276 x i8]* @.str.1, i64 0, i64 0))
%12 = load i32, i32* %5
%13 = call i32 @exit(i32 %12)
unreachable
}

LLVM IR (-O2):
@.str = [41 x i8] c"\0AUsage: %s [options]... [inputfile]...\0A\00"
@.str.1 = [276 x i8] c" {-h --help} Display this usage information.\0A {-e --encrypt} [inputfile] Encrypt a plaintext using AES.\0A {-d --decrypt} [inputfile] Decrypt a ciphertext using AES.\0A \0A\00"
define void @print_usage(i32* nocapture %0, i32 %1, i8* %2) {
%4 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %0, i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0), i8* %2)
%5 = tail call i64 @fwrite(i8* getelementptr inbounds ([276 x i8], [276 x i8]* @.str.1, i64 0, i64 0), i64 275, i64 1, i32* %0)
%6 = tail call i32 @exit(i32 %1)
unreachable
}