#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*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ stderr;
void usage(int status, char *program_name) {
  if (status != 0) {
    fprintf(stderr, "Try '%s --help' for more information.\n", program_name);
  } else {
    printf("\nADMesh version %s\nCopyright (C) 1995, 1996  Anthony D. "
           "Martin\nUsage: %s [OPTION]... file\n",
           "0.96", program_name);
    printf(
        "\n     --x-rotate=angle     Rotate CCW about x-axis by angle "
        "degrees\n     --y-rotate=angle     Rotate CCW about y-axis by angle "
        "degrees\n     --z-rotate=angle     Rotate CCW about z-axis by angle "
        "degrees\n     --xy-mirror          Mirror about the xy plane\n     "
        "--yz-mirror          Mirror about the yz plane\n     --xz-mirror      "
        "    Mirror about the xz plane\n     --scale=factor       Scale the "
        "file by factor (multiply by factor)\n     --translate=x,y,z    "
        "Translate the file to x, y, and z\n     --merge=name         Merge "
        "file called name with input file\n -e, --exact              Only "
        "check for perfectly matched edges\n -n, --nearby             Find and "
        "connect nearby facets. Correct bad facets\n -t, --tolerance=tol      "
        "Initial tolerance to use for nearby check = tol\n -i, --iterations=i  "
        "     Number of iterations for nearby check = i\n -m, --increment=inc  "
        "    Amount to increment tolerance after iteration=inc\n -u, "
        "--remove-unconnected Remove facets that have 0 neighbors\n -f, "
        "--fill-holes         Add facets to fill holes\n -d, "
        "--normal-directions  Check and fix direction of normals(ie cw, ccw)\n "
        "    --reverse-all        Reverse the directions of all facets and "
        "normals\n -v, --normal-values      Check and fix normal values\n -c, "
        "--no-check           Don't do any check on input file\n -b, "
        "--write-binary-stl=name   Output a binary STL file called name\n -a, "
        "--write-ascii-stl=name    Output an ascii STL file called name\n     "
        "--write-off=name     Output a Geomview OFF format file called name\n  "
        "   --write-dxf=name     Output a DXF format file called name\n     "
        "--write-vrml=name    Output a VRML format file called name\n     "
        "--help               Display this help and exit\n     --version       "
        "     Output version information and exit\n\nThe functions are "
        "executed in the same order as the options shown here.\nSo check here "
        "to find what happens if, for example, --translate and "
        "--merge\noptions are specified together.  The order of the options "
        "specified on the\ncommand line is not important.\n");
  }
  exit(status);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     1167 <usage+0x37>
mov    0x2e90(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rdx
lea    0xea3(%rip),%rsi
call   1040 <fprintf@plt>
jmp    118e <usage+0x5e>
mov    -0x10(%rbp),%rdx
lea    0xeb5(%rip),%rdi
lea    0xf09(%rip),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf00(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x4(%rbp),%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rbx
mov    %rsi,%rdx
mov    %edi,%ebx
test   %edi,%edi
jne    1172 <usage+0x32>
lea    0xed6(%rip),%rdi
lea    0xf2a(%rip),%rsi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xf21(%rip),%rdi
call   1030 <puts@plt>
mov    %ebx,%edi
call   1060 <exit@plt>
mov    0x2e67(%rip),%rax
mov    (%rax),%edi
lea    0xe7e(%rip),%rsi
call   1050 <fprintf@plt>
mov    %ebx,%edi
call   1060 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [39 x i8] c"Try '%s --help' for more information.\0A\00"
@.str.1 = [91 x i8] c"\0AADMesh version %s\0ACopyright (C) 1995, 1996 Anthony D. Martin\0AUsage: %s [OPTION]... file\0A\00"
@.str.2 = [5 x i8] c"0.96\00"
@.str.3 = [1995 x i8] c"\0A --x-rotate=angle Rotate CCW about x-axis by angle degrees\0A --y-rotate=angle Rotate CCW about y-axis by angle degrees\0A --z-rotate=angle Rotate CCW about z-axis by angle degrees\0A --xy-mirror Mirror about the xy plane\0A --yz-mirror Mirror about the yz plane\0A --xz-mirror Mirror about the xz plane\0A --scale=factor Scale the file by factor (multiply by factor)\0A --translate=x,y,z Translate the file to x, y, and z\0A --merge=name Merge file called name with input file\0A -e, --exact Only check for perfectly matched edges\0A -n, --nearby Find and connect nearby facets. Correct bad facets\0A -t, --tolerance=tol Initial tolerance to use for nearby check = tol\0A -i, --iterations=i Number of iterations for nearby check = i\0A -m, --increment=inc Amount to increment tolerance after iteration=inc\0A -u, --remove-unconnected Remove facets that have 0 neighbors\0A -f, --fill-holes Add facets to fill holes\0A -d, --normal-directions Check and fix direction of normals(ie cw, ccw)\0A --reverse-all Reverse the directions of all facets and normals\0A -v, --normal-values Check and fix normal values\0A -c, --no-check Don't do any check on input file\0A -b, --write-binary-stl=name Output a binary STL file called name\0A -a, --write-ascii-stl=name Output an ascii STL file called name\0A --write-off=name Output a Geomview OFF format file called name\0A --write-dxf=name Output a DXF format file called name\0A --write-vrml=name Output a VRML format file called name\0A --help Display this help and exit\0A --version Output version information and exit\0A\0AThe functions are executed in the same order as the options shown here.\0ASo check here to find what happens if, for example, --translate and --merge\0Aoptions are specified together. The order of the options specified on the\0Acommand line is not important.\0A\00"
define void @usage(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
store i32 %0, i32* %3
store i8* %1, i8** %4
%5 = load i32, i32* %3
%6 = icmp ne i32 %5, 0
br i1 %6, label %7, label %11
7: ; preds = %2
%8 = load i32, i32* @stderr
%9 = load i8*, i8** %4
%10 = call i32 @fprintf(i32 %8, i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0), i8* %9)
br label %15
11: ; preds = %2
%12 = load i8*, i8** %4
%13 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([91 x i8], [91 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i8* %12)
%14 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([1995 x i8], [1995 x i8]* @.str.3, i64 0, i64 0))
br label %15
15: ; preds = %11, %7
%16 = load i32, i32* %3
%17 = call i32 @exit(i32 %16)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [39 x i8] c"Try '%s --help' for more information.\0A\00"
@.str.1 = [91 x i8] c"\0AADMesh version %s\0ACopyright (C) 1995, 1996 Anthony D. Martin\0AUsage: %s [OPTION]... file\0A\00"
@.str.2 = [5 x i8] c"0.96\00"
@str = [1994 x i8] c"\0A --x-rotate=angle Rotate CCW about x-axis by angle degrees\0A --y-rotate=angle Rotate CCW about y-axis by angle degrees\0A --z-rotate=angle Rotate CCW about z-axis by angle degrees\0A --xy-mirror Mirror about the xy plane\0A --yz-mirror Mirror about the yz plane\0A --xz-mirror Mirror about the xz plane\0A --scale=factor Scale the file by factor (multiply by factor)\0A --translate=x,y,z Translate the file to x, y, and z\0A --merge=name Merge file called name with input file\0A -e, --exact Only check for perfectly matched edges\0A -n, --nearby Find and connect nearby facets. Correct bad facets\0A -t, --tolerance=tol Initial tolerance to use for nearby check = tol\0A -i, --iterations=i Number of iterations for nearby check = i\0A -m, --increment=inc Amount to increment tolerance after iteration=inc\0A -u, --remove-unconnected Remove facets that have 0 neighbors\0A -f, --fill-holes Add facets to fill holes\0A -d, --normal-directions Check and fix direction of normals(ie cw, ccw)\0A --reverse-all Reverse the directions of all facets and normals\0A -v, --normal-values Check and fix normal values\0A -c, --no-check Don't do any check on input file\0A -b, --write-binary-stl=name Output a binary STL file called name\0A -a, --write-ascii-stl=name Output an ascii STL file called name\0A --write-off=name Output a Geomview OFF format file called name\0A --write-dxf=name Output a DXF format file called name\0A --write-vrml=name Output a VRML format file called name\0A --help Display this help and exit\0A --version Output version information and exit\0A\0AThe functions are executed in the same order as the options shown here.\0ASo check here to find what happens if, for example, --translate and --merge\0Aoptions are specified together. The order of the options specified on the\0Acommand line is not important.\00"
define void @usage(i32 %0, i8* %1) {
%3 = icmp eq i32 %0, 0
br i1 %3, label %7, label %4
4: ; preds = %2
%5 = load i32, i32* @stderr
%6 = tail call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0), i8* %1)
br label %10
7: ; preds = %2
%8 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([91 x i8], [91 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i8* %1)
%9 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([1994 x i8], [1994 x i8]* @str, i64 0, i64 0))
br label %10
10: ; preds = %7, %4
%11 = tail call i32 @exit(i32 %0)
unreachable
}