#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*/ printf(char *);
int /*<<< orphan*/ stderr;
int /*<<< orphan*/ stdout;
void usage(int code) {
  if (code != 0) {
    stdout = stderr;
  }
  printf("\nUsage: sprintars2nc [options] infile outfile\n\n");
  printf("options:\n");
  printf("-c | --compress            (default: off)   "
         "enable compression (implies -f nc4)\n");
  printf("-f | --format nc2 | nc4    (default: nc2)   "
         "create NetCDF v2 or v4 file?\n");
  printf("-h | --help                                 "
         "print this message and exit\n");
  printf("-p | --progress            (default: off)   "
         "enable progress bar\n");
  printf("-v | --verbose                              "
         "increase verbosity; may be repeated\n");
  printf("-v                                          "
         "print version and exit\n");
  printf("--clobber                  (default: off)   "
         "overwrite output file if it exists\n");
  printf("--lonfile <file>           (mandatory)      "
         "file specifying the longitude dim\n");
  printf("--latfile <file>           (mandatory)      "
         "file specifying the latitude dim\n");
  printf("--pfile <file> | --sigmafile <file>         "
         "file specifying the vertical dim\n"
         "                                            "
         " (mandatory for 3D fields)\n");
  printf("--tfile <file> | --t0 <t0> --tstep <step>   "
         "specification of the time dim\n"
         "                                            "
         "<t0>:   start date (as \n"
         "                                            "
         "        'YYYY-mm-dd HH:MM:SS' UTC)\n"
         "                                            "
         "<step>: time step in seconds\n");
  printf("--varname <name>           (mandatory)      "
         "variable name in NetCDF output file\n");
  printf("--varunits <units>         (mandatory)      "
         "variable units in NetCDF output file\n");
  printf("\n"
         "infile:    unformatted FORTRAN big-endian SPRINTARS output\n"
         "outfile:   NetCDF output file\n");
  printf("\n\nExample:\n"
         "sprintars2nc -vvv -f nc4 -c -p --clobber \\\n"
         "  --lonfile GLON640.txt --latfile GGLA320.txt \\\n"
         "  --t0=\"2000-01-01 00:00:00\" --tstep=$((3 * 3600)) \\\n"
         "  --varname=ps --varunits=hPa \\\n"
         "  ps_3hr ps_3hr.nc\n");
  exit(code);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     1147 <usage+0x27>
mov    0x2ea4(%rip),%rax
mov    (%rax),%ecx
mov    0x2e93(%rip),%rax
mov    %ecx,(%rax)
lea    0xeb2(%rip),%rdi
call   1030 <printf@plt>
lea    0xed6(%rip),%rdi
call   1030 <printf@plt>
lea    0xed4(%rip),%rdi
call   1030 <printf@plt>
lea    0xf19(%rip),%rdi
call   1030 <printf@plt>
lea    0xf57(%rip),%rdi
call   1030 <printf@plt>
lea    0xf94(%rip),%rdi
call   1030 <printf@plt>
lea    0xfc9(%rip),%rdi
call   1030 <printf@plt>
lea    0x100e(%rip),%rdi
call   1030 <printf@plt>
lea    0x1046(%rip),%rdi
call   1030 <printf@plt>
lea    0x108a(%rip),%rdi
call   1030 <printf@plt>
lea    0x10cd(%rip),%rdi
call   1030 <printf@plt>
lea    0x110f(%rip),%rdi
call   1030 <printf@plt>
lea    0x1198(%rip),%rdi
call   1030 <printf@plt>
lea    0x12b3(%rip),%rdi
call   1030 <printf@plt>
lea    0x12f8(%rip),%rdi
call   1030 <printf@plt>
lea    0x133e(%rip),%rdi
call   1030 <printf@plt>
lea    0x138d(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rbx
mov    %edi,%ebx
test   %edi,%edi
je     1139 <usage+0x19>
mov    0x2eb2(%rip),%rax
mov    (%rax),%eax
mov    0x2ea1(%rip),%rcx
mov    %eax,(%rcx)
lea    0xec0(%rip),%rdi
call   1030 <puts@plt>
lea    0xee3(%rip),%rdi
call   1030 <puts@plt>
lea    0xee0(%rip),%rdi
call   1030 <puts@plt>
lea    0xf24(%rip),%rdi
call   1030 <puts@plt>
lea    0xf61(%rip),%rdi
call   1030 <puts@plt>
lea    0xf9d(%rip),%rdi
call   1030 <puts@plt>
lea    0xfd1(%rip),%rdi
call   1030 <puts@plt>
lea    0x1015(%rip),%rdi
call   1030 <puts@plt>
lea    0x104c(%rip),%rdi
call   1030 <puts@plt>
lea    0x108f(%rip),%rdi
call   1030 <puts@plt>
lea    0x10d1(%rip),%rdi
call   1030 <puts@plt>
lea    0x1112(%rip),%rdi
call   1030 <puts@plt>
lea    0x119a(%rip),%rdi
call   1030 <puts@plt>
lea    0x12b4(%rip),%rdi
call   1030 <puts@plt>
lea    0x12f8(%rip),%rdi
call   1030 <puts@plt>
lea    0x133d(%rip),%rdi
call   1030 <puts@plt>
lea    0x138b(%rip),%rdi
call   1030 <puts@plt>
mov    %ebx,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@stdout = global i32 0
@.str = [48 x i8] c"\0AUsage: sprintars2nc [options] infile outfile\0A\0A\00"
@.str.1 = [10 x i8] c"options:\0A\00"
@.str.2 = [81 x i8] c"-c | --compress (default: off) enable compression (implies -f nc4)\0A\00"
@.str.3 = [74 x i8] c"-f | --format nc2 | nc4 (default: nc2) create NetCDF v2 or v4 file?\0A\00"
@.str.4 = [73 x i8] c"-h | --help print this message and exit\0A\00"
@.str.5 = [65 x i8] c"-p | --progress (default: off) enable progress bar\0A\00"
@.str.6 = [81 x i8] c"-v | --verbose increase verbosity; may be repeated\0A\00"
@.str.7 = [68 x i8] c"-v print version and exit\0A\00"
@.str.8 = [80 x i8] c"--clobber (default: off) overwrite output file if it exists\0A\00"
@.str.9 = [79 x i8] c"--lonfile <file> (mandatory) file specifying the longitude dim\0A\00"
@.str.10 = [78 x i8] c"--latfile <file> (mandatory) file specifying the latitude dim\0A\00"
@.str.11 = [149 x i8] c"--pfile <file> | --sigmafile <file> file specifying the vertical dim\0A (mandatory for 3D fields)\0A\00"
@.str.12 = [295 x i8] c"--tfile <file> | --t0 <t0> --tstep <step> specification of the time dim\0A <t0>: start date (as \0A 'YYYY-mm-dd HH:MM:SS' UTC)\0A <step>: time step in seconds\0A\00"
@.str.13 = [81 x i8] c"--varname <name> (mandatory) variable name in NetCDF output file\0A\00"
@.str.14 = [82 x i8] c"--varunits <units> (mandatory) variable units in NetCDF output file\0A\00"
@.str.15 = [91 x i8] c"\0Ainfile: unformatted FORTRAN big-endian SPRINTARS output\0Aoutfile: NetCDF output file\0A\00"
@.str.16 = [207 x i8] c"\0A\0AExample:\0Asprintars2nc -vvv -f nc4 -c -p --clobber \\\0A --lonfile GLON640.txt --latfile GGLA320.txt \\\0A --t0=\222000-01-01 00:00:00\22 --tstep=$((3 * 3600)) \\\0A --varname=ps --varunits=hPa \\\0A ps_3hr ps_3hr.nc\0A\00"
define void @usage(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp ne i32 %3, 0
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = load i32, i32* @stderr
store i32 %6, i32* @stdout
br label %7
7: ; preds = %5, %1
%8 = call i32 @printf(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str, i64 0, i64 0))
%9 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0))
%10 = call i32 @printf(i8* getelementptr inbounds ([81 x i8], [81 x i8]* @.str.2, i64 0, i64 0))
%11 = call i32 @printf(i8* getelementptr inbounds ([74 x i8], [74 x i8]* @.str.3, i64 0, i64 0))
%12 = call i32 @printf(i8* getelementptr inbounds ([73 x i8], [73 x i8]* @.str.4, i64 0, i64 0))
%13 = call i32 @printf(i8* getelementptr inbounds ([65 x i8], [65 x i8]* @.str.5, i64 0, i64 0))
%14 = call i32 @printf(i8* getelementptr inbounds ([81 x i8], [81 x i8]* @.str.6, i64 0, i64 0))
%15 = call i32 @printf(i8* getelementptr inbounds ([68 x i8], [68 x i8]* @.str.7, i64 0, i64 0))
%16 = call i32 @printf(i8* getelementptr inbounds ([80 x i8], [80 x i8]* @.str.8, i64 0, i64 0))
%17 = call i32 @printf(i8* getelementptr inbounds ([79 x i8], [79 x i8]* @.str.9, i64 0, i64 0))
%18 = call i32 @printf(i8* getelementptr inbounds ([78 x i8], [78 x i8]* @.str.10, i64 0, i64 0))
%19 = call i32 @printf(i8* getelementptr inbounds ([149 x i8], [149 x i8]* @.str.11, i64 0, i64 0))
%20 = call i32 @printf(i8* getelementptr inbounds ([295 x i8], [295 x i8]* @.str.12, i64 0, i64 0))
%21 = call i32 @printf(i8* getelementptr inbounds ([81 x i8], [81 x i8]* @.str.13, i64 0, i64 0))
%22 = call i32 @printf(i8* getelementptr inbounds ([82 x i8], [82 x i8]* @.str.14, i64 0, i64 0))
%23 = call i32 @printf(i8* getelementptr inbounds ([91 x i8], [91 x i8]* @.str.15, i64 0, i64 0))
%24 = call i32 @printf(i8* getelementptr inbounds ([207 x i8], [207 x i8]* @.str.16, i64 0, i64 0))
%25 = load i32, i32* %2
%26 = call i32 @exit(i32 %25)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@stdout = global i32 0
@str = [47 x i8] c"\0AUsage: sprintars2nc [options] infile outfile\0A\00"
@str.17 = [9 x i8] c"options:\00"
@str.18 = [80 x i8] c"-c | --compress (default: off) enable compression (implies -f nc4)\00"
@str.19 = [73 x i8] c"-f | --format nc2 | nc4 (default: nc2) create NetCDF v2 or v4 file?\00"
@str.20 = [72 x i8] c"-h | --help print this message and exit\00"
@str.21 = [64 x i8] c"-p | --progress (default: off) enable progress bar\00"
@str.22 = [80 x i8] c"-v | --verbose increase verbosity; may be repeated\00"
@str.23 = [67 x i8] c"-v print version and exit\00"
@str.24 = [79 x i8] c"--clobber (default: off) overwrite output file if it exists\00"
@str.25 = [78 x i8] c"--lonfile <file> (mandatory) file specifying the longitude dim\00"
@str.26 = [77 x i8] c"--latfile <file> (mandatory) file specifying the latitude dim\00"
@str.27 = [148 x i8] c"--pfile <file> | --sigmafile <file> file specifying the vertical dim\0A (mandatory for 3D fields)\00"
@str.28 = [294 x i8] c"--tfile <file> | --t0 <t0> --tstep <step> specification of the time dim\0A <t0>: start date (as \0A 'YYYY-mm-dd HH:MM:SS' UTC)\0A <step>: time step in seconds\00"
@str.29 = [80 x i8] c"--varname <name> (mandatory) variable name in NetCDF output file\00"
@str.30 = [81 x i8] c"--varunits <units> (mandatory) variable units in NetCDF output file\00"
@str.31 = [90 x i8] c"\0Ainfile: unformatted FORTRAN big-endian SPRINTARS output\0Aoutfile: NetCDF output file\00"
@str.32 = [206 x i8] c"\0A\0AExample:\0Asprintars2nc -vvv -f nc4 -c -p --clobber \\\0A --lonfile GLON640.txt --latfile GGLA320.txt \\\0A --t0=\222000-01-01 00:00:00\22 --tstep=$((3 * 3600)) \\\0A --varname=ps --varunits=hPa \\\0A ps_3hr ps_3hr.nc\00"
define void @usage(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = load i32, i32* @stderr
store i32 %4, i32* @stdout
br label %5
5: ; preds = %3, %1
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([47 x i8], [47 x i8]* @str, i64 0, i64 0))
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @str.17, i64 0, i64 0))
%8 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([80 x i8], [80 x i8]* @str.18, i64 0, i64 0))
%9 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([73 x i8], [73 x i8]* @str.19, i64 0, i64 0))
%10 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([72 x i8], [72 x i8]* @str.20, i64 0, i64 0))
%11 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([64 x i8], [64 x i8]* @str.21, i64 0, i64 0))
%12 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([80 x i8], [80 x i8]* @str.22, i64 0, i64 0))
%13 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([67 x i8], [67 x i8]* @str.23, i64 0, i64 0))
%14 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([79 x i8], [79 x i8]* @str.24, i64 0, i64 0))
%15 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([78 x i8], [78 x i8]* @str.25, i64 0, i64 0))
%16 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([77 x i8], [77 x i8]* @str.26, i64 0, i64 0))
%17 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([148 x i8], [148 x i8]* @str.27, i64 0, i64 0))
%18 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([294 x i8], [294 x i8]* @str.28, i64 0, i64 0))
%19 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([80 x i8], [80 x i8]* @str.29, i64 0, i64 0))
%20 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([81 x i8], [81 x i8]* @str.30, i64 0, i64 0))
%21 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([90 x i8], [90 x i8]* @str.31, i64 0, i64 0))
%22 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([206 x i8], [206 x i8]* @str.32, i64 0, i64 0))
%23 = tail call i32 @exit(i32 %0)
unreachable
}