#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 usage(FILE *f, int errcode) {
  fprintf(
      f, "Usage: \n  fntconv -o <to> <from>\n    converts BDOS font between "
         "types C, TXT, FNT.\n    the file types are inferred from the file "
         "extensions.\n    (not all combinations are allowed.)\nOptions:\n  "
         "-o, --output <file>   write output to <file>\n  -a, --aranym         "
         " output C sourcecode for AraNYM\n  -A, --all-chars       output data "
         "also for non-existent chars\n  -v, --varname <name>  set the name of "
         "the font header variable\n  -O, --no-offtable     do not write the "
         "offsets table\n  -s, --scale <factor>  scale picture up (BMP only)\n "
         " -g, --grid <width>    draw grid around characters (BMP only)\n");
  exit(errcode);
}


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

x86 assembly (clang, -O2):
<usage>:
push   %rbx
mov    %esi,%ebx
mov    %rdi,%rcx
lea    0xed3(%rip),%rdi
mov    $0x24f,%esi
mov    $0x1,%edx
call   1040 <fwrite@plt>
mov    %ebx,%edi
call   1030 <exit@plt>

LLVM IR (-O0):
@.str = [592 x i8] c"Usage: \0A fntconv -o <to> <from>\0A converts BDOS font between types C, TXT, FNT.\0A the file types are inferred from the file extensions.\0A (not all combinations are allowed.)\0AOptions:\0A -o, --output <file> write output to <file>\0A -a, --aranym output C sourcecode for AraNYM\0A -A, --all-chars output data also for non-existent chars\0A -v, --varname <name> set the name of the font header variable\0A -O, --no-offtable do not write the offsets table\0A -s, --scale <factor> scale picture up (BMP only)\0A -g, --grid <width> draw grid around characters (BMP only)\0A\00"
define void @usage(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
store i32* %0, i32** %3
store i32 %1, i32* %4
%5 = load i32*, i32** %3
%6 = call i32 @fprintf(i32* %5, i8* getelementptr inbounds ([592 x i8], [592 x i8]* @.str, i64 0, i64 0))
%7 = load i32, i32* %4
%8 = call i32 @exit(i32 %7)
unreachable
}

LLVM IR (-O2):
@.str = [592 x i8] c"Usage: \0A fntconv -o <to> <from>\0A converts BDOS font between types C, TXT, FNT.\0A the file types are inferred from the file extensions.\0A (not all combinations are allowed.)\0AOptions:\0A -o, --output <file> write output to <file>\0A -a, --aranym output C sourcecode for AraNYM\0A -A, --all-chars output data also for non-existent chars\0A -v, --varname <name> set the name of the font header variable\0A -O, --no-offtable do not write the offsets table\0A -s, --scale <factor> scale picture up (BMP only)\0A -g, --grid <width> draw grid around characters (BMP only)\0A\00"
define void @usage(i32* nocapture %0, i32 %1) {
%3 = tail call i64 @fwrite(i8* getelementptr inbounds ([592 x i8], [592 x i8]* @.str, i64 0, i64 0), i64 591, i64 1, i32* %0)
%4 = tail call i32 @exit(i32 %1)
unreachable
}