#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 *);
void usage(int status) {
  printf(
      "\nConverts from DM to Dist and vice versa - electron density model\n");
  printf("Usage:\n");
  printf("ymw16 [-h] [-t text] [-d <dirname>] [-v] [-V] <mode> gl gb DM/Dist "
         "[DM_Host] ndir\n");
  printf("-h prints this help page\n");
  printf("-t <text>, where <text> (no spaces, max 64 char) is appended to the "
         "output line\n");
  printf("-d <dirname>, where <dirname> is a directory containing YMW16 data "
         "files\n");
  printf("-v prints diagnostics\n");
  printf("-V prints more diagnostics\n");
  printf("<mode> is Gal, MC, or IGM\n");
  printf("gl, gb in deg, DM in cm^-3 pc, Dist in pc (Gal, MC) or Mpc (IGM)\n");
  printf("DM_Host is the contribution of the FRB host galaxy to the observed "
         "DM\n");
  printf("Only used for IGM mode; optional input, default=100 cm^-3 pc\n");
  printf("ndir=1 for DM->Dist, ndir=2 for Dist->DM\n");
  printf("Output includes log(tau_sc) where tau_sc is scattering time in sec "
         "at 1 GHz\n");
  printf("\n");
  exit(status);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    0xece(%rip),%rdi
call   1030 <printf@plt>
lea    0xf05(%rip),%rdi
call   1030 <printf@plt>
lea    0xf01(%rip),%rdi
call   1030 <printf@plt>
lea    0xf48(%rip),%rdi
call   1030 <printf@plt>
lea    0xf56(%rip),%rdi
call   1030 <printf@plt>
lea    0xf9b(%rip),%rdi
call   1030 <printf@plt>
lea    0xfd9(%rip),%rdi
call   1030 <printf@plt>
lea    0xfe4(%rip),%rdi
call   1030 <printf@plt>
lea    0xff4(%rip),%rdi
call   1030 <printf@plt>
lea    0x1003(%rip),%rdi
call   1030 <printf@plt>
lea    0x1039(%rip),%rdi
call   1030 <printf@plt>
lea    0x1074(%rip),%rdi
call   1030 <printf@plt>
lea    0x10a6(%rip),%rdi
call   1030 <printf@plt>
lea    0x10c4(%rip),%rdi
call   1030 <printf@plt>
lea    0x1007(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rbx
mov    %edi,%ebx
lea    0xec6(%rip),%rdi
call   1040 <puts@plt>
lea    0xefc(%rip),%rdi
call   1040 <puts@plt>
lea    0xef7(%rip),%rdi
call   1040 <puts@plt>
lea    0xf3d(%rip),%rdi
call   1040 <puts@plt>
lea    0xf4a(%rip),%rdi
call   1040 <puts@plt>
lea    0xf8e(%rip),%rdi
call   1040 <puts@plt>
lea    0xfcb(%rip),%rdi
call   1040 <puts@plt>
lea    0xfd5(%rip),%rdi
call   1040 <puts@plt>
lea    0xfe4(%rip),%rdi
call   1040 <puts@plt>
lea    0xff2(%rip),%rdi
call   1040 <puts@plt>
lea    0x1027(%rip),%rdi
call   1040 <puts@plt>
lea    0x1061(%rip),%rdi
call   1040 <puts@plt>
lea    0x1092(%rip),%rdi
call   1040 <puts@plt>
lea    0x10af(%rip),%rdi
call   1040 <puts@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    %ebx,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [67 x i8] c"\0AConverts from DM to Dist and vice versa - electron density model\0A\00"
@.str.1 = [8 x i8] c"Usage:\0A\00"
@.str.2 = [83 x i8] c"ymw16 [-h] [-t text] [-d <dirname>] [-v] [-V] <mode> gl gb DM/Dist [DM_Host] ndir\0A\00"
@.str.3 = [26 x i8] c"-h prints this help page\0A\00"
@.str.4 = [81 x i8] c"-t <text>, where <text> (no spaces, max 64 char) is appended to the output line\0A\00"
@.str.5 = [74 x i8] c"-d <dirname>, where <dirname> is a directory containing YMW16 data files\0A\00"
@.str.6 = [23 x i8] c"-v prints diagnostics\0A\00"
@.str.7 = [28 x i8] c"-V prints more diagnostics\0A\00"
@.str.8 = [27 x i8] c"<mode> is Gal, MC, or IGM\0A\00"
@.str.9 = [66 x i8] c"gl, gb in deg, DM in cm^-3 pc, Dist in pc (Gal, MC) or Mpc (IGM)\0A\00"
@.str.10 = [71 x i8] c"DM_Host is the contribution of the FRB host galaxy to the observed DM\0A\00"
@.str.11 = [62 x i8] c"Only used for IGM mode; optional input, default=100 cm^-3 pc\0A\00"
@.str.12 = [42 x i8] c"ndir=1 for DM->Dist, ndir=2 for Dist->DM\0A\00"
@.str.13 = [77 x i8] c"Output includes log(tau_sc) where tau_sc is scattering time in sec at 1 GHz\0A\00"
@.str.14 = [2 x i8] c"\0A\00"
define void @usage(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @printf(i8* getelementptr inbounds ([67 x i8], [67 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
%5 = call i32 @printf(i8* getelementptr inbounds ([83 x i8], [83 x i8]* @.str.2, i64 0, i64 0))
%6 = call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.3, i64 0, i64 0))
%7 = call i32 @printf(i8* getelementptr inbounds ([81 x i8], [81 x i8]* @.str.4, i64 0, i64 0))
%8 = call i32 @printf(i8* getelementptr inbounds ([74 x i8], [74 x i8]* @.str.5, i64 0, i64 0))
%9 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.6, i64 0, i64 0))
%10 = call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.7, i64 0, i64 0))
%11 = call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.8, i64 0, i64 0))
%12 = call i32 @printf(i8* getelementptr inbounds ([66 x i8], [66 x i8]* @.str.9, i64 0, i64 0))
%13 = call i32 @printf(i8* getelementptr inbounds ([71 x i8], [71 x i8]* @.str.10, i64 0, i64 0))
%14 = call i32 @printf(i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str.11, i64 0, i64 0))
%15 = call i32 @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.12, i64 0, i64 0))
%16 = call i32 @printf(i8* getelementptr inbounds ([77 x i8], [77 x i8]* @.str.13, i64 0, i64 0))
%17 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.14, i64 0, i64 0))
%18 = load i32, i32* %2
%19 = call i32 @exit(i32 %18)
unreachable
}

LLVM IR (-O2):
@str = [66 x i8] c"\0AConverts from DM to Dist and vice versa - electron density model\00"
@str.15 = [7 x i8] c"Usage:\00"
@str.16 = [82 x i8] c"ymw16 [-h] [-t text] [-d <dirname>] [-v] [-V] <mode> gl gb DM/Dist [DM_Host] ndir\00"
@str.17 = [25 x i8] c"-h prints this help page\00"
@str.18 = [80 x i8] c"-t <text>, where <text> (no spaces, max 64 char) is appended to the output line\00"
@str.19 = [73 x i8] c"-d <dirname>, where <dirname> is a directory containing YMW16 data files\00"
@str.20 = [22 x i8] c"-v prints diagnostics\00"
@str.21 = [27 x i8] c"-V prints more diagnostics\00"
@str.22 = [26 x i8] c"<mode> is Gal, MC, or IGM\00"
@str.23 = [65 x i8] c"gl, gb in deg, DM in cm^-3 pc, Dist in pc (Gal, MC) or Mpc (IGM)\00"
@str.24 = [70 x i8] c"DM_Host is the contribution of the FRB host galaxy to the observed DM\00"
@str.25 = [61 x i8] c"Only used for IGM mode; optional input, default=100 cm^-3 pc\00"
@str.26 = [41 x i8] c"ndir=1 for DM->Dist, ndir=2 for Dist->DM\00"
@str.27 = [76 x i8] c"Output includes log(tau_sc) where tau_sc is scattering time in sec at 1 GHz\00"
define void @usage(i32 %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([66 x i8], [66 x i8]* @str, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @str.15, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([82 x i8], [82 x i8]* @str.16, i64 0, i64 0))
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @str.17, i64 0, i64 0))
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([80 x i8], [80 x i8]* @str.18, i64 0, i64 0))
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([73 x i8], [73 x i8]* @str.19, i64 0, i64 0))
%8 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @str.20, i64 0, i64 0))
%9 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @str.21, i64 0, i64 0))
%10 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @str.22, i64 0, i64 0))
%11 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([65 x i8], [65 x i8]* @str.23, i64 0, i64 0))
%12 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([70 x i8], [70 x i8]* @str.24, i64 0, i64 0))
%13 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([61 x i8], [61 x i8]* @str.25, i64 0, i64 0))
%14 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([41 x i8], [41 x i8]* @str.26, i64 0, i64 0))
%15 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([76 x i8], [76 x i8]* @str.27, i64 0, i64 0))
%16 = tail call i32 @putchar(i32 10)
%17 = tail call i32 @exit(i32 %0)
unreachable
}