#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, char *program_name, int exit_code) {
  fprintf(stream, "Usage:  %s options [filename]\n", program_name);
  fprintf(stream,
          "  -e  --extract filename   Extract logo from config file.\n"
          "  -c  --change  filename   Change logo in config file.\n"
          "  -k  --dmk                Specify logo type as DMK.\n"
          "  -v  --version            Display version information.\n"
          "  -h  --help               Display this usage information.\n");
  exit(exit_code);
}


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

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

LLVM IR (-O0):
@.str = [31 x i8] c"Usage: %s options [filename]\0A\00"
@.str.1 = [282 x i8] c" -e --extract filename Extract logo from config file.\0A -c --change filename Change logo in config file.\0A -k --dmk Specify logo type as DMK.\0A -v --version Display version information.\0A -h --help Display this usage information.\0A\00"
define void @print_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** %4
%8 = load i8*, i8** %5
%9 = call i32 (i32*, i8*, ...) @fprintf(i32* %7, i8* getelementptr inbounds ([31 x i8], [31 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 ([282 x i8], [282 x i8]* @.str.1, i64 0, i64 0))
%12 = load i32, i32* %6
%13 = call i32 @exit(i32 %12)
unreachable
}

LLVM IR (-O2):
@.str = [31 x i8] c"Usage: %s options [filename]\0A\00"
@.str.1 = [282 x i8] c" -e --extract filename Extract logo from config file.\0A -c --change filename Change logo in config file.\0A -k --dmk Specify logo type as DMK.\0A -v --version Display version information.\0A -h --help Display this usage information.\0A\00"
define void @print_usage(i32* nocapture %0, i8* %1, i32 %2) {
%4 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %0, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0), i8* %1)
%5 = tail call i64 @fwrite(i8* getelementptr inbounds ([282 x i8], [282 x i8]* @.str.1, i64 0, i64 0), i64 281, i64 1, i32* %0)
%6 = tail call i32 @exit(i32 %2)
unreachable
}