#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*/ stdprintf(char *, ...);
void show_help() {
  stdprintf("BSP->bitmap, version %d.%d.%d%s\n", 0, 0, 15, "d");
  stdprintf("Copyright (c) 1999-2004, Matthew Wong\n\n");
  stdprintf("Usage:\n");
  stdprintf("  %s [options] <bspfile> [outfile]\n\n", "bsp2bmp");
  stdprintf("Options:\n");
  stdprintf("    -s<scaledown>     default: 4, ie 1/4 scale\n");
  stdprintf("    -z<z_scaling>     default: 0 for flat map, >0 for iso 3d, -1 "
            "for auto\n");
  stdprintf(
      "    -p<padding>       default: 16-pixel border around final image\n");
  stdprintf("    -d<direction>     iso 3d direction: 7  0  1\n");
  stdprintf("                                         \\ | /\n");
  stdprintf("                                        6--+--2\n");
  stdprintf("                                         / | \\\n");
  stdprintf("                                        5  4  3\n");
  stdprintf("                      default: 7\n");
  stdprintf("    -c<camera_axis>   default: +Z (+/- X/Y/Z axis)\n");
  stdprintf(
      "    -t<flatness>      threshold of dot product for edge removal;\n");
  stdprintf("                      default is 0.90\n");
  stdprintf("    -e                disable extraneous edges removal\n");
  stdprintf("    -a<area>          minimum area for a polygon to be drawn\n");
  stdprintf("                      default is 0\n");
  stdprintf("    -l<length>        minimum length for an edge to be drawn\n");
  stdprintf("                      default is 0\n");
  stdprintf("    -n                negative image (black on white\n");
  stdprintf("    -r                write raw data, rather than bmp file\n");
  stdprintf("    -q                quiet output\n");
  stdprintf("\n");
  stdprintf("If [outfile] is omitted, then program will create .bmp file in "
            "the same directory as .bsp file.\n");
  return;
}


x86 assembly (clang, -O0):
<show_help>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
xor    %edx,%edx
mov    $0xf,%ecx
lea    0xef8(%rip),%r8
mov    %edx,%esi
mov    $0x0,%al
call   1030 <stdprintf@plt>
lea    0xeea(%rip),%rdi
mov    $0x0,%al
call   1030 <stdprintf@plt>
lea    0xf04(%rip),%rdi
mov    $0x0,%al
call   1030 <stdprintf@plt>
lea    0xefe(%rip),%rdi
lea    0xf1c(%rip),%rsi
mov    $0x0,%al
call   1030 <stdprintf@plt>
lea    0xf16(%rip),%rdi
mov    $0x0,%al
call   1030 <stdprintf@plt>
lea    0xf12(%rip),%rdi
mov    $0x0,%al
call   1030 <stdprintf@plt>
lea    0xf34(%rip),%rdi
mov    $0x0,%al
call   1030 <stdprintf@plt>
lea    0xf71(%rip),%rdi
mov    $0x0,%al
call   1030 <stdprintf@plt>
lea    0xfa6(%rip),%rdi
mov    $0x0,%al
call   1030 <stdprintf@plt>
lea    0xfc9(%rip),%rdi
mov    $0x0,%al
call   1030 <stdprintf@plt>
lea    0xfeb(%rip),%rdi
mov    $0x0,%al
call   1030 <stdprintf@plt>
lea    0x100e(%rip),%rdi
mov    $0x0,%al
call   1030 <stdprintf@plt>
lea    0x1030(%rip),%rdi
mov    $0x0,%al
call   1030 <stdprintf@plt>
lea    0x1053(%rip),%rdi
mov    $0x0,%al
call   1030 <stdprintf@plt>
lea    0x1067(%rip),%rdi
mov    $0x0,%al
call   1030 <stdprintf@plt>
lea    0x108d(%rip),%rdi
mov    $0x0,%al
call   1030 <stdprintf@plt>
lea    0x10c1(%rip),%rdi
mov    $0x0,%al
call   1030 <stdprintf@plt>
lea    0x10da(%rip),%rdi
mov    $0x0,%al
call   1030 <stdprintf@plt>
lea    0x1104(%rip),%rdi
mov    $0x0,%al
call   1030 <stdprintf@plt>
lea    0x1134(%rip),%rdi
mov    $0x0,%al
call   1030 <stdprintf@plt>
lea    0x114a(%rip),%rdi
mov    $0x0,%al
call   1030 <stdprintf@plt>
lea    0x1118(%rip),%rdi
mov    $0x0,%al
call   1030 <stdprintf@plt>
lea    0x116c(%rip),%rdi
mov    $0x0,%al
call   1030 <stdprintf@plt>
lea    0x1194(%rip),%rdi
mov    $0x0,%al
call   1030 <stdprintf@plt>
lea    0x11c2(%rip),%rdi
mov    $0x0,%al
call   1030 <stdprintf@plt>
lea    0xde6(%rip),%rdi
mov    $0x0,%al
call   1030 <stdprintf@plt>
lea    0x11ca(%rip),%rdi
mov    $0x0,%al
call   1030 <stdprintf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<show_help>:
push   %rbx
lea    0xee8(%rip),%rdi
lea    0xf02(%rip),%r8
xor    %esi,%esi
xor    %edx,%edx
mov    $0xf,%ecx
xor    %eax,%eax
call   1030 <stdprintf@plt>
lea    0xeed(%rip),%rdi
xor    %eax,%eax
call   1030 <stdprintf@plt>
lea    0xf07(%rip),%rdi
xor    %eax,%eax
call   1030 <stdprintf@plt>
lea    0xf01(%rip),%rdi
lea    0xf1f(%rip),%rsi
xor    %eax,%eax
call   1030 <stdprintf@plt>
lea    0xf19(%rip),%rdi
xor    %eax,%eax
call   1030 <stdprintf@plt>
lea    0xf15(%rip),%rdi
xor    %eax,%eax
call   1030 <stdprintf@plt>
lea    0xf37(%rip),%rdi
xor    %eax,%eax
call   1030 <stdprintf@plt>
lea    0xf74(%rip),%rdi
xor    %eax,%eax
call   1030 <stdprintf@plt>
lea    0xfa9(%rip),%rdi
xor    %eax,%eax
call   1030 <stdprintf@plt>
lea    0xfcc(%rip),%rdi
xor    %eax,%eax
call   1030 <stdprintf@plt>
lea    0xfee(%rip),%rdi
xor    %eax,%eax
call   1030 <stdprintf@plt>
lea    0x1011(%rip),%rdi
xor    %eax,%eax
call   1030 <stdprintf@plt>
lea    0x1033(%rip),%rdi
xor    %eax,%eax
call   1030 <stdprintf@plt>
lea    0x1056(%rip),%rdi
xor    %eax,%eax
call   1030 <stdprintf@plt>
lea    0x106a(%rip),%rdi
xor    %eax,%eax
call   1030 <stdprintf@plt>
lea    0x1090(%rip),%rdi
xor    %eax,%eax
call   1030 <stdprintf@plt>
lea    0x10c4(%rip),%rdi
xor    %eax,%eax
call   1030 <stdprintf@plt>
lea    0x10dd(%rip),%rdi
xor    %eax,%eax
call   1030 <stdprintf@plt>
lea    0x1107(%rip),%rdi
xor    %eax,%eax
call   1030 <stdprintf@plt>
lea    0x1137(%rip),%rbx
mov    %rbx,%rdi
xor    %eax,%eax
call   1030 <stdprintf@plt>
lea    0x114a(%rip),%rdi
xor    %eax,%eax
call   1030 <stdprintf@plt>
mov    %rbx,%rdi
xor    %eax,%eax
call   1030 <stdprintf@plt>
lea    0x1170(%rip),%rdi
xor    %eax,%eax
call   1030 <stdprintf@plt>
lea    0x1198(%rip),%rdi
xor    %eax,%eax
call   1030 <stdprintf@plt>
lea    0x11c6(%rip),%rdi
xor    %eax,%eax
call   1030 <stdprintf@plt>
lea    0xdea(%rip),%rdi
xor    %eax,%eax
call   1030 <stdprintf@plt>
lea    0x11ce(%rip),%rdi
xor    %eax,%eax
pop    %rbx
jmp    1030 <stdprintf@plt>

LLVM IR (-O0):
@.str = [33 x i8] c"BSP->bitmap, version %d.%d.%d%s\0A\00"
@.str.1 = [2 x i8] c"d\00"
@.str.2 = [40 x i8] c"Copyright (c) 1999-2004, Matthew Wong\0A\0A\00"
@.str.3 = [8 x i8] c"Usage:\0A\00"
@.str.4 = [37 x i8] c" %s [options] <bspfile> [outfile]\0A\0A\00"
@.str.5 = [8 x i8] c"bsp2bmp\00"
@.str.6 = [10 x i8] c"Options:\0A\00"
@.str.7 = [48 x i8] c" -s<scaledown> default: 4, ie 1/4 scale\0A\00"
@.str.8 = [75 x i8] c" -z<z_scaling> default: 0 for flat map, >0 for iso 3d, -1 for auto\0A\00"
@.str.9 = [67 x i8] c" -p<padding> default: 16-pixel border around final image\0A\00"
@.str.10 = [49 x i8] c" -d<direction> iso 3d direction: 7 0 1\0A\00"
@.str.11 = [48 x i8] c" \\ | /\0A\00"
@.str.12 = [49 x i8] c" 6--+--2\0A\00"
@.str.13 = [48 x i8] c" / | \\\0A\00"
@.str.14 = [49 x i8] c" 5 4 3\0A\00"
@.str.15 = [34 x i8] c" default: 7\0A\00"
@.str.16 = [52 x i8] c" -c<camera_axis> default: +Z (+/- X/Y/Z axis)\0A\00"
@.str.17 = [66 x i8] c" -t<flatness> threshold of dot product for edge removal;\0A\00"
@.str.18 = [39 x i8] c" default is 0.90\0A\00"
@.str.19 = [56 x i8] c" -e disable extraneous edges removal\0A\00"
@.str.20 = [62 x i8] c" -a<area> minimum area for a polygon to be drawn\0A\00"
@.str.21 = [36 x i8] c" default is 0\0A\00"
@.str.22 = [62 x i8] c" -l<length> minimum length for an edge to be drawn\0A\00"
@.str.23 = [54 x i8] c" -n negative image (black on white\0A\00"
@.str.24 = [60 x i8] c" -r write raw data, rather than bmp file\0A\00"
@.str.25 = [36 x i8] c" -q quiet output\0A\00"
@.str.26 = [2 x i8] c"\0A\00"
@.str.27 = [97 x i8] c"If [outfile] is omitted, then program will create .bmp file in the same directory as .bsp file.\0A\00"
define void @show_help() {
%1 = call i32 (i8*, ...) @stdprintf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0), i32 0, i32 0, i32 15, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%2 = call i32 (i8*, ...) @stdprintf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.2, i64 0, i64 0))
%3 = call i32 (i8*, ...) @stdprintf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0))
%4 = call i32 (i8*, ...) @stdprintf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.5, i64 0, i64 0))
%5 = call i32 (i8*, ...) @stdprintf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.6, i64 0, i64 0))
%6 = call i32 (i8*, ...) @stdprintf(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.7, i64 0, i64 0))
%7 = call i32 (i8*, ...) @stdprintf(i8* getelementptr inbounds ([75 x i8], [75 x i8]* @.str.8, i64 0, i64 0))
%8 = call i32 (i8*, ...) @stdprintf(i8* getelementptr inbounds ([67 x i8], [67 x i8]* @.str.9, i64 0, i64 0))
%9 = call i32 (i8*, ...) @stdprintf(i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str.10, i64 0, i64 0))
%10 = call i32 (i8*, ...) @stdprintf(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.11, i64 0, i64 0))
%11 = call i32 (i8*, ...) @stdprintf(i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str.12, i64 0, i64 0))
%12 = call i32 (i8*, ...) @stdprintf(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.13, i64 0, i64 0))
%13 = call i32 (i8*, ...) @stdprintf(i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str.14, i64 0, i64 0))
%14 = call i32 (i8*, ...) @stdprintf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.15, i64 0, i64 0))
%15 = call i32 (i8*, ...) @stdprintf(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.16, i64 0, i64 0))
%16 = call i32 (i8*, ...) @stdprintf(i8* getelementptr inbounds ([66 x i8], [66 x i8]* @.str.17, i64 0, i64 0))
%17 = call i32 (i8*, ...) @stdprintf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.18, i64 0, i64 0))
%18 = call i32 (i8*, ...) @stdprintf(i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str.19, i64 0, i64 0))
%19 = call i32 (i8*, ...) @stdprintf(i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str.20, i64 0, i64 0))
%20 = call i32 (i8*, ...) @stdprintf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.21, i64 0, i64 0))
%21 = call i32 (i8*, ...) @stdprintf(i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str.22, i64 0, i64 0))
%22 = call i32 (i8*, ...) @stdprintf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.21, i64 0, i64 0))
%23 = call i32 (i8*, ...) @stdprintf(i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str.23, i64 0, i64 0))
%24 = call i32 (i8*, ...) @stdprintf(i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str.24, i64 0, i64 0))
%25 = call i32 (i8*, ...) @stdprintf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.25, i64 0, i64 0))
%26 = call i32 (i8*, ...) @stdprintf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.26, i64 0, i64 0))
%27 = call i32 (i8*, ...) @stdprintf(i8* getelementptr inbounds ([97 x i8], [97 x i8]* @.str.27, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [33 x i8] c"BSP->bitmap, version %d.%d.%d%s\0A\00"
@.str.1 = [2 x i8] c"d\00"
@.str.2 = [40 x i8] c"Copyright (c) 1999-2004, Matthew Wong\0A\0A\00"
@.str.3 = [8 x i8] c"Usage:\0A\00"
@.str.4 = [37 x i8] c" %s [options] <bspfile> [outfile]\0A\0A\00"
@.str.5 = [8 x i8] c"bsp2bmp\00"
@.str.6 = [10 x i8] c"Options:\0A\00"
@.str.7 = [48 x i8] c" -s<scaledown> default: 4, ie 1/4 scale\0A\00"
@.str.8 = [75 x i8] c" -z<z_scaling> default: 0 for flat map, >0 for iso 3d, -1 for auto\0A\00"
@.str.9 = [67 x i8] c" -p<padding> default: 16-pixel border around final image\0A\00"
@.str.10 = [49 x i8] c" -d<direction> iso 3d direction: 7 0 1\0A\00"
@.str.11 = [48 x i8] c" \\ | /\0A\00"
@.str.12 = [49 x i8] c" 6--+--2\0A\00"
@.str.13 = [48 x i8] c" / | \\\0A\00"
@.str.14 = [49 x i8] c" 5 4 3\0A\00"
@.str.15 = [34 x i8] c" default: 7\0A\00"
@.str.16 = [52 x i8] c" -c<camera_axis> default: +Z (+/- X/Y/Z axis)\0A\00"
@.str.17 = [66 x i8] c" -t<flatness> threshold of dot product for edge removal;\0A\00"
@.str.18 = [39 x i8] c" default is 0.90\0A\00"
@.str.19 = [56 x i8] c" -e disable extraneous edges removal\0A\00"
@.str.20 = [62 x i8] c" -a<area> minimum area for a polygon to be drawn\0A\00"
@.str.21 = [36 x i8] c" default is 0\0A\00"
@.str.22 = [62 x i8] c" -l<length> minimum length for an edge to be drawn\0A\00"
@.str.23 = [54 x i8] c" -n negative image (black on white\0A\00"
@.str.24 = [60 x i8] c" -r write raw data, rather than bmp file\0A\00"
@.str.25 = [36 x i8] c" -q quiet output\0A\00"
@.str.26 = [2 x i8] c"\0A\00"
@.str.27 = [97 x i8] c"If [outfile] is omitted, then program will create .bmp file in the same directory as .bsp file.\0A\00"
define void @show_help() {
%1 = tail call i32 (i8*, ...) @stdprintf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0), i32 0, i32 0, i32 15, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%2 = tail call i32 (i8*, ...) @stdprintf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.2, i64 0, i64 0))
%3 = tail call i32 (i8*, ...) @stdprintf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0))
%4 = tail call i32 (i8*, ...) @stdprintf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.5, i64 0, i64 0))
%5 = tail call i32 (i8*, ...) @stdprintf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.6, i64 0, i64 0))
%6 = tail call i32 (i8*, ...) @stdprintf(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.7, i64 0, i64 0))
%7 = tail call i32 (i8*, ...) @stdprintf(i8* getelementptr inbounds ([75 x i8], [75 x i8]* @.str.8, i64 0, i64 0))
%8 = tail call i32 (i8*, ...) @stdprintf(i8* getelementptr inbounds ([67 x i8], [67 x i8]* @.str.9, i64 0, i64 0))
%9 = tail call i32 (i8*, ...) @stdprintf(i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str.10, i64 0, i64 0))
%10 = tail call i32 (i8*, ...) @stdprintf(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.11, i64 0, i64 0))
%11 = tail call i32 (i8*, ...) @stdprintf(i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str.12, i64 0, i64 0))
%12 = tail call i32 (i8*, ...) @stdprintf(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.13, i64 0, i64 0))
%13 = tail call i32 (i8*, ...) @stdprintf(i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str.14, i64 0, i64 0))
%14 = tail call i32 (i8*, ...) @stdprintf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.15, i64 0, i64 0))
%15 = tail call i32 (i8*, ...) @stdprintf(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.16, i64 0, i64 0))
%16 = tail call i32 (i8*, ...) @stdprintf(i8* getelementptr inbounds ([66 x i8], [66 x i8]* @.str.17, i64 0, i64 0))
%17 = tail call i32 (i8*, ...) @stdprintf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.18, i64 0, i64 0))
%18 = tail call i32 (i8*, ...) @stdprintf(i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str.19, i64 0, i64 0))
%19 = tail call i32 (i8*, ...) @stdprintf(i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str.20, i64 0, i64 0))
%20 = tail call i32 (i8*, ...) @stdprintf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.21, i64 0, i64 0))
%21 = tail call i32 (i8*, ...) @stdprintf(i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str.22, i64 0, i64 0))
%22 = tail call i32 (i8*, ...) @stdprintf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.21, i64 0, i64 0))
%23 = tail call i32 (i8*, ...) @stdprintf(i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str.23, i64 0, i64 0))
%24 = tail call i32 (i8*, ...) @stdprintf(i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str.24, i64 0, i64 0))
%25 = tail call i32 (i8*, ...) @stdprintf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.25, i64 0, i64 0))
%26 = tail call i32 (i8*, ...) @stdprintf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.26, i64 0, i64 0))
%27 = tail call i32 (i8*, ...) @stdprintf(i8* getelementptr inbounds ([97 x i8], [97 x i8]* @.str.27, i64 0, i64 0))
ret void
}