#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*/ fprintf(int /*<<< orphan*/, char *, ...);
int /*<<< orphan*/ stderr;
void usage(char *exec_name) {
  fprintf(stderr,
          "Usage\n"
          "  %s [options] data_in.dat > data_out.dat\n"
          "  %s [options] < data_in.dat > data_out.dat\n"
          "\n",
          exec_name, exec_name);
  fprintf(
      stderr,
      "General options\n"
      "  -help           Display this message\n"
      "  -repeat n       Repeat algorithm n times (for benchmarking)\n"
      "  -quiet          Don't report activity to stderr\n"
      "  -v1             Use version 1.x interpretation of first line of input "
      "file\n"
      "  -auto           Automatically select algorithm settings from "
      "wavelength etc\n"
      "  -radar          Use settings appropriate for radar\n"
      "  -lidar          Use settings appropriate for lidar\n"
      "  -algorithms <small_angle_algorithm> <wide_angle_algorithm>\n"
      "                  Manually select algorithm, where "
      "<small_angle_algorithm> is:\n"
      "      none     - No single or small-angle scattering\n"
      "      single   - Single scattering (no small-angle scattering)\n"
      "      original - Original Hogan (2006) algorithm: speed O(N^2)\n"
      "      fast     - Faster Hogan (2008) algorithm: speed O(N) DEFAULT\n"
      "      explicit - Eloranta-like explicit representation of each order of "
      "scattering\n"
      "      lag      - Hogan (2008) but also with lag calculation (m)\n"
      "                  ...and where <wide_angle_algorithm> is:\n"
      "      none     - No wide-angle scattering\n"
      "      tdts     - Time-dependent two stream (Hogan and Battaglia 2008)\n"
      "      lidar    - TDTS assuming forward lobe DEFAULT\n"
      "      radar    - TDTS assuming no forward lobe\n"
      "  -hsrl           Output particulate and air backscatter separately\n"
      "  -gaussian-receiver\n"
      "                  Receiver is Gaussian rather than top-hat shaped\n"
      "  -jacobian       Output the approximate but fast Jacobian\n"
      "  -numerical-jacobian\n"
      "                  Output the Jacobian calculated (slowly) using finite\n"
      "                  differences\n"
      "  -ext-only       Only calculate the Jacobian with respect to "
      "extinction\n"
      "  -adjoint        Output the adjoint as well\n"
      "  -check-adjoint  Calculate the adjoint and check it with a numerical "
      "Jacobian\n"
      "  -annular-detectors\n"
      "                  2nd and subsequent detectors are ring shaped\n"
      "\n");
  fprintf(
      stderr,
      "Options for ORIGINAL small-angle (SA) algorithm\n"
      "  -simple-optical-depth\n"
      "                  Use simple optical depth integration\n"
      "  -crude-optical-depth\n"
      "                  Use crude optical depth integration\n"
      "  -crude-integration\n"
      "                  Use crude double/multiple scattering integration\n");
  fprintf(
      stderr,
      "  -no-multiscat-within-gate\n"
      "                  Photon cannot be forward scattered more than once "
      "within a\n"
      "                  single gate; note that this has the opposite effect "
      "to\n"
      "                  \"-crude-integration\"\n"
      "  -double-scattering-only\n"
      "                  Don't include triple and higher-order scatterings\n");
  fprintf(stderr, "  -no-molecular-extinction\n"
                  "                  Molecules do not extinguish the beam\n"
                  "  -wide-angle-cutoff <theta>\n"
                  "                  Forward scattering at angles greater than "
                  "<theta> radians\n"
                  "                  are deemed to escape, a crude way to deal "
                  "with a problem\n"
                  "                  associated with aerosols\n");
  fprintf(stderr,
          "  -crude-double-scattering\n"
          "                  Don't use Eloranta's slow but accurate double "
          "scattering\n"
          "                 formulation\n"
          "  -approx-exp     Appriximate the exp() function call for speed\n"
          "\n");
  fprintf(
      stderr,
      "Options for EXPLICIT small-angle (SA) algorithm\n"
      "  -explicit n     Use an explicit model with n orders of scattering\n"
      "  -output-distribution n dx\n"
      "                  Output horizontal photon distributions at n points "
      "spaced\n"
      "                  dx apart, starting at dx/2\n"
      "\n");
  fprintf(
      stderr,
      "Options for wide-angle multiple-scattering\n"
      "  -ignore-source-widening\n"
      "                  Ignore widening effect of small-angle scattering on "
      "source beam for wide-angle calc\n"
      "  -optimize-wide-angle-gates\n"
      "                  Skip optically thin gates in wide-angle calculation\n"
      "  -simple-2s-coeffts\n"
      "                  Use the simple upwind Euler formulation (can be "
      "unstable\n"
      "                  for high optical depth)\n");
  fprintf(
      stderr,
      "  -ssa-scales-forward-lobe\n"
      "                  Single-scattering albedo less than unity reduces the\n"
      "                  forward scattering lobe as well as wide-angle "
      "scattering\n"
      "  -num-samples m  Output m samples, allowing sampling of signals "
      "appearing\n"
      "                  to originate below ground\n"
      "  -propagation-to-stderr\n"
      "                  Print the diffuse photon energies and variances to\n"
      "                  standard error\n"
      "\n");
  fprintf(
      stderr,
      "Input data\n"
      "  First line: 5 values\n"
      "    1: Number of range gates in profile\n"
      "    2: Wavelength (m)\n"
      "    3: Altitude of instrument (m)\n"
      "    4: Transmitter divergence, 1/e half-width (radians)\n"
      "    5: Receiver field-of-view, half-width of first receiver (radians)\n"
      "   6+: Fields-of-view for any other channels (radians)\n");
  fprintf(stderr, "  (note that with the \"-v1\" option, the version 1.x file "
                  "format is assumed,\n"
                  "   in which the order is (1) number of range gates, (2) "
                  "wavelength, (3) divergence,\n"
                  "   (4) field-of-view, (5) altitude, and only one field of "
                  "view is allowed)\n");
  fprintf(
      stderr,
      "  Subsequent lines: 4, 5, 8, 10 or more values (all 8 required for the "
      "wide-angle\n"
      "  calculation; all 10 to represent anisotropic phase functions near 180 "
      "deg);\n"
      "  more to calculate the adjoint\n"
      "    1: Range of gate above ground starting with nearest gate to "
      "instrument (m)\n"
      "    2: Extinction coefficient of cloud/aerosol only (m-1)\n"
      "    3: Equivalent-area cloud/aerosol radius (m)\n"
      "    4: Extinction-to-backscatter ratio of cloud/aerosol (sr)\n"
      "    5: Air extinction coefficient (m-1); optional (zero if missing)\n");
  fprintf(stderr, "    6: Single scattering albedo of cloud/aerosol\n"
                  "    7: Scattering asymmetry factor of cloud/aerosol\n"
                  "    8: Single scattering albedo of air\n");
  fprintf(
      stderr,
      "    9: Fraction of cloud/aerosol backscatter due to droplets (real "
      "number\n"
      "         between 0 and 1), for representing anisotropic near-180 phase\n"
      "         functions in the SA algorithm\n"
      "   10: Pristine ice fraction, for anisotropic near-180 phase functions\n"
      "         from Yang et al. (2000); note that irregular ice particles\n"
      "         are believed to have isotropic near-180 phase functions, in\n"
      "         which case set this variable to zero\n");
  fprintf(stderr, "  Subsequent lines (only with \"-adjoint\" option)\n"
                  " 11 to 10+n: Adjoint input for particulate backscatter of "
                  "the n fields-of-view\n"
                  " 11+n: Adjoint input for air backscatter of the first "
                  "field-of-view (for HSRL)\n"
                  "\n");
  fprintf(stderr,
          "Output data (without -jacobian or -numerical-jacobian option)\n"
          "  Default: 5 values per range gate\n"
          "    1: Index of range gate\n"
          "    2: Apparent range above ground (m)\n"
          "    3: Extinction coefficient (m-1)\n"
          "    4: Equivalent-area particle radius (microns)\n"
          "    5: Apparent backscatter (m-1 sr-1), for particulates only if "
          "with \"-hsrl\"\n");
  fprintf(stderr, "  With the \"-hsrl\" option\n"
                  "    6: Apparent backscatter of the air only (m-1 sr-1)\n");
  fprintf(
      stderr,
      "  With the \"-adjoint\" option (where n=6 if \"-hsrl\", n=5 otherwise)\n"
      "  n+1: Adjoint of extinction coefficient (m)\n"
      "  n+2: Adjoint of single-scattering albedo\n"
      "  n+3: Adjoint of asymmetry factor\n"
      "  n+4: Adjoint of extinction-to-backscatter ratio (m sr)\n"
      "\n");
  fprintf(
      stderr,
      "Output data (with -jacobian or -numerical-jacobian option)\n"
      "   n x m matrix: d(attenuated backscatter) / d(extinction coefficient)\n"
      "and if \"-ext-only\" is not set:\n"
      "   n x m matrix: d(attenuated backscatter) / d(single-scattering "
      "albedo)\n"
      "   n x m matrix: d(attenuated backscatter) / d(asymmetry factor)\n"
      "   n x m matrix: d(attenuated backscatter) / d(particle radius)\n"
      "   1 x m vector: d(attenuated backscatter) / d(ext-to-dirat ratio)\n");
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x3ebd(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
mov    -0x8(%rbp),%rcx
lea    0xecc(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x3e9e(%rip),%rax
mov    (%rax),%edi
lea    0xf13(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x3e87(%rip),%rax
mov    (%rax),%edi
lea    0x1636(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x3e70(%rip),%rax
mov    (%rax),%edi
lea    0x1744(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x3e59(%rip),%rax
mov    (%rax),%edi
lea    0x1865(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x3e42(%rip),%rax
mov    (%rax),%edi
lea    0x1980(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x3e2b(%rip),%rax
mov    (%rax),%edi
lea    0x1a2e(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x3e14(%rip),%rax
mov    (%rax),%edi
lea    0x1b22(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x3dfd(%rip),%rax
mov    (%rax),%edi
lea    0x1ca4(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x3de6(%rip),%rax
mov    (%rax),%edi
lea    0x1e32(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x3dcf(%rip),%rax
mov    (%rax),%edi
lea    0x1f53(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x3db8(%rip),%rax
mov    (%rax),%edi
lea    0x2028(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x3da1(%rip),%rax
mov    (%rax),%edi
lea    0x220c(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x3d8a(%rip),%rax
mov    (%rax),%edi
lea    0x2282(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x3d73(%rip),%rax
mov    (%rax),%edi
lea    0x2422(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x3d5c(%rip),%rax
mov    (%rax),%edi
lea    0x24dc(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x3d45(%rip),%rax
mov    (%rax),%edi
lea    0x260c(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x3d2e(%rip),%rax
mov    (%rax),%edi
lea    0x2647(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x3d17(%rip),%rax
mov    (%rax),%edi
lea    0x2729(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<usage>:
push   %rbx
mov    %rdi,%rcx
mov    0x3ec5(%rip),%rbx
mov    (%rbx),%edi
lea    0xedc(%rip),%rsi
mov    %rcx,%rdx
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0xf27(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0x1651(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0x1766(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0x188e(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0x19b0(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0x1a65(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0x1b60(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0x1ce9(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0x1e7e(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0x1fa6(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0x2082(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0x226d(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0x22ea(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0x2491(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0x2552(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0x2689(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0x26cb(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0x27b4(%rip),%rsi
xor    %eax,%eax
pop    %rbx
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [94 x i8] c"Usage\0A %s [options] data_in.dat > data_out.dat\0A %s [options] < data_in.dat > data_out.dat\0A\0A\00"
@.str.1 = [1850 x i8] c"General options\0A -help Display this message\0A -repeat n Repeat algorithm n times (for benchmarking)\0A -quiet Don't report activity to stderr\0A -v1 Use version 1.x interpretation of first line of input file\0A -auto Automatically select algorithm settings from wavelength etc\0A -radar Use settings appropriate for radar\0A -lidar Use settings appropriate for lidar\0A -algorithms <small_angle_algorithm> <wide_angle_algorithm>\0A Manually select algorithm, where <small_angle_algorithm> is:\0A none - No single or small-angle scattering\0A single - Single scattering (no small-angle scattering)\0A original - Original Hogan (2006) algorithm: speed O(N^2)\0A fast - Faster Hogan (2008) algorithm: speed O(N) DEFAULT\0A explicit - Eloranta-like explicit representation of each order of scattering\0A lag - Hogan (2008) but also with lag calculation (m)\0A ...and where <wide_angle_algorithm> is:\0A none - No wide-angle scattering\0A tdts - Time-dependent two stream (Hogan and Battaglia 2008)\0A lidar - TDTS assuming forward lobe DEFAULT\0A radar - TDTS assuming no forward lobe\0A -hsrl Output particulate and air backscatter separately\0A -gaussian-receiver\0A Receiver is Gaussian rather than top-hat shaped\0A -jacobian Output the approximate but fast Jacobian\0A -numerical-jacobian\0A Output the Jacobian calculated (slowly) using finite\0A differences\0A -ext-only Only calculate the Jacobian with respect to extinction\0A -adjoint Output the adjoint as well\0A -check-adjoint Calculate the adjoint and check it with a numerical Jacobian\0A -annular-detectors\0A 2nd and subsequent detectors are ring shaped\0A\0A\00"
@.str.2 = [293 x i8] c"Options for ORIGINAL small-angle (SA) algorithm\0A -simple-optical-depth\0A Use simple optical depth integration\0A -crude-optical-depth\0A Use crude optical depth integration\0A -crude-integration\0A Use crude double/multiple scattering integration\0A\00"
@.str.3 = [312 x i8] c" -no-multiscat-within-gate\0A Photon cannot be forward scattered more than once within a\0A single gate; note that this has the opposite effect to\0A \22-crude-integration\22\0A -double-scattering-only\0A Don't include triple and higher-order scatterings\0A\00"
@.str.4 = [306 x i8] c" -no-molecular-extinction\0A Molecules do not extinguish the beam\0A -wide-angle-cutoff <theta>\0A Forward scattering at angles greater than <theta> radians\0A are deemed to escape, a crude way to deal with a problem\0A associated with aerosols\0A\00"
@.str.5 = [197 x i8] c" -crude-double-scattering\0A Don't use Eloranta's slow but accurate double scattering\0A formulation\0A -approx-exp Appriximate the exp() function call for speed\0A\0A\00"
@.str.6 = [267 x i8] c"Options for EXPLICIT small-angle (SA) algorithm\0A -explicit n Use an explicit model with n orders of scattering\0A -output-distribution n dx\0A Output horizontal photon distributions at n points spaced\0A dx apart, starting at dx/2\0A\0A\00"
@.str.7 = [409 x i8] c"Options for wide-angle multiple-scattering\0A -ignore-source-widening\0A Ignore widening effect of small-angle scattering on source beam for wide-angle calc\0A -optimize-wide-angle-gates\0A Skip optically thin gates in wide-angle calculation\0A -simple-2s-coeffts\0A Use the simple upwind Euler formulation (can be unstable\0A for high optical depth)\0A\00"
@.str.8 = [421 x i8] c" -ssa-scales-forward-lobe\0A Single-scattering albedo less than unity reduces the\0A forward scattering lobe as well as wide-angle scattering\0A -num-samples m Output m samples, allowing sampling of signals appearing\0A to originate below ground\0A -propagation-to-stderr\0A Print the diffuse photon energies and variances to\0A standard error\0A\0A\00"
@.str.9 = [312 x i8] c"Input data\0A First line: 5 values\0A 1: Number of range gates in profile\0A 2: Wavelength (m)\0A 3: Altitude of instrument (m)\0A 4: Transmitter divergence, 1/e half-width (radians)\0A 5: Receiver field-of-view, half-width of first receiver (radians)\0A 6+: Fields-of-view for any other channels (radians)\0A\00"
@.str.10 = [236 x i8] c" (note that with the \22-v1\22 option, the version 1.x file format is assumed,\0A in which the order is (1) number of range gates, (2) wavelength, (3) divergence,\0A (4) field-of-view, (5) altitude, and only one field of view is allowed)\0A\00"
@.str.11 = [507 x i8] c" Subsequent lines: 4, 5, 8, 10 or more values (all 8 required for the wide-angle\0A calculation; all 10 to represent anisotropic phase functions near 180 deg);\0A more to calculate the adjoint\0A 1: Range of gate above ground starting with nearest gate to instrument (m)\0A 2: Extinction coefficient of cloud/aerosol only (m-1)\0A 3: Equivalent-area cloud/aerosol radius (m)\0A 4: Extinction-to-backscatter ratio of cloud/aerosol (sr)\0A 5: Air extinction coefficient (m-1); optional (zero if missing)\0A\00"
@.str.12 = [141 x i8] c" 6: Single scattering albedo of cloud/aerosol\0A 7: Scattering asymmetry factor of cloud/aerosol\0A 8: Single scattering albedo of air\0A\00"
@.str.13 = [439 x i8] c" 9: Fraction of cloud/aerosol backscatter due to droplets (real number\0A between 0 and 1), for representing anisotropic near-180 phase\0A functions in the SA algorithm\0A 10: Pristine ice fraction, for anisotropic near-180 phase functions\0A from Yang et al. (2000); note that irregular ice particles\0A are believed to have isotropic near-180 phase functions, in\0A which case set this variable to zero\0A\00"
@.str.14 = [209 x i8] c" Subsequent lines (only with \22-adjoint\22 option)\0A 11 to 10+n: Adjoint input for particulate backscatter of the n fields-of-view\0A 11+n: Adjoint input for air backscatter of the first field-of-view (for HSRL)\0A\0A\00"
@.str.15 = [327 x i8] c"Output data (without -jacobian or -numerical-jacobian option)\0A Default: 5 values per range gate\0A 1: Index of range gate\0A 2: Apparent range above ground (m)\0A 3: Extinction coefficient (m-1)\0A 4: Equivalent-area particle radius (microns)\0A 5: Apparent backscatter (m-1 sr-1), for particulates only if with \22-hsrl\22\0A\00"
@.str.16 = [82 x i8] c" With the \22-hsrl\22 option\0A 6: Apparent backscatter of the air only (m-1 sr-1)\0A\00"
@.str.17 = [249 x i8] c" With the \22-adjoint\22 option (where n=6 if \22-hsrl\22, n=5 otherwise)\0A n+1: Adjoint of extinction coefficient (m)\0A n+2: Adjoint of single-scattering albedo\0A n+3: Adjoint of asymmetry factor\0A n+4: Adjoint of extinction-to-backscatter ratio (m sr)\0A\0A\00"
@.str.18 = [431 x i8] c"Output data (with -jacobian or -numerical-jacobian option)\0A n x m matrix: d(attenuated backscatter) / d(extinction coefficient)\0Aand if \22-ext-only\22 is not set:\0A n x m matrix: d(attenuated backscatter) / d(single-scattering albedo)\0A n x m matrix: d(attenuated backscatter) / d(asymmetry factor)\0A n x m matrix: d(attenuated backscatter) / d(particle radius)\0A 1 x m vector: d(attenuated backscatter) / d(ext-to-dirat ratio)\0A\00"
define void @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = load i8*, i8** %2
%6 = call i32 (i32, i8*, ...) @fprintf(i32 %3, i8* getelementptr inbounds ([94 x i8], [94 x i8]* @.str, i64 0, i64 0), i8* %4, i8* %5)
%7 = load i32, i32* @stderr
%8 = call i32 (i32, i8*, ...) @fprintf(i32 %7, i8* getelementptr inbounds ([1850 x i8], [1850 x i8]* @.str.1, i64 0, i64 0))
%9 = load i32, i32* @stderr
%10 = call i32 (i32, i8*, ...) @fprintf(i32 %9, i8* getelementptr inbounds ([293 x i8], [293 x i8]* @.str.2, i64 0, i64 0))
%11 = load i32, i32* @stderr
%12 = call i32 (i32, i8*, ...) @fprintf(i32 %11, i8* getelementptr inbounds ([312 x i8], [312 x i8]* @.str.3, i64 0, i64 0))
%13 = load i32, i32* @stderr
%14 = call i32 (i32, i8*, ...) @fprintf(i32 %13, i8* getelementptr inbounds ([306 x i8], [306 x i8]* @.str.4, i64 0, i64 0))
%15 = load i32, i32* @stderr
%16 = call i32 (i32, i8*, ...) @fprintf(i32 %15, i8* getelementptr inbounds ([197 x i8], [197 x i8]* @.str.5, i64 0, i64 0))
%17 = load i32, i32* @stderr
%18 = call i32 (i32, i8*, ...) @fprintf(i32 %17, i8* getelementptr inbounds ([267 x i8], [267 x i8]* @.str.6, i64 0, i64 0))
%19 = load i32, i32* @stderr
%20 = call i32 (i32, i8*, ...) @fprintf(i32 %19, i8* getelementptr inbounds ([409 x i8], [409 x i8]* @.str.7, i64 0, i64 0))
%21 = load i32, i32* @stderr
%22 = call i32 (i32, i8*, ...) @fprintf(i32 %21, i8* getelementptr inbounds ([421 x i8], [421 x i8]* @.str.8, i64 0, i64 0))
%23 = load i32, i32* @stderr
%24 = call i32 (i32, i8*, ...) @fprintf(i32 %23, i8* getelementptr inbounds ([312 x i8], [312 x i8]* @.str.9, i64 0, i64 0))
%25 = load i32, i32* @stderr
%26 = call i32 (i32, i8*, ...) @fprintf(i32 %25, i8* getelementptr inbounds ([236 x i8], [236 x i8]* @.str.10, i64 0, i64 0))
%27 = load i32, i32* @stderr
%28 = call i32 (i32, i8*, ...) @fprintf(i32 %27, i8* getelementptr inbounds ([507 x i8], [507 x i8]* @.str.11, i64 0, i64 0))
%29 = load i32, i32* @stderr
%30 = call i32 (i32, i8*, ...) @fprintf(i32 %29, i8* getelementptr inbounds ([141 x i8], [141 x i8]* @.str.12, i64 0, i64 0))
%31 = load i32, i32* @stderr
%32 = call i32 (i32, i8*, ...) @fprintf(i32 %31, i8* getelementptr inbounds ([439 x i8], [439 x i8]* @.str.13, i64 0, i64 0))
%33 = load i32, i32* @stderr
%34 = call i32 (i32, i8*, ...) @fprintf(i32 %33, i8* getelementptr inbounds ([209 x i8], [209 x i8]* @.str.14, i64 0, i64 0))
%35 = load i32, i32* @stderr
%36 = call i32 (i32, i8*, ...) @fprintf(i32 %35, i8* getelementptr inbounds ([327 x i8], [327 x i8]* @.str.15, i64 0, i64 0))
%37 = load i32, i32* @stderr
%38 = call i32 (i32, i8*, ...) @fprintf(i32 %37, i8* getelementptr inbounds ([82 x i8], [82 x i8]* @.str.16, i64 0, i64 0))
%39 = load i32, i32* @stderr
%40 = call i32 (i32, i8*, ...) @fprintf(i32 %39, i8* getelementptr inbounds ([249 x i8], [249 x i8]* @.str.17, i64 0, i64 0))
%41 = load i32, i32* @stderr
%42 = call i32 (i32, i8*, ...) @fprintf(i32 %41, i8* getelementptr inbounds ([431 x i8], [431 x i8]* @.str.18, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [94 x i8] c"Usage\0A %s [options] data_in.dat > data_out.dat\0A %s [options] < data_in.dat > data_out.dat\0A\0A\00"
@.str.1 = [1850 x i8] c"General options\0A -help Display this message\0A -repeat n Repeat algorithm n times (for benchmarking)\0A -quiet Don't report activity to stderr\0A -v1 Use version 1.x interpretation of first line of input file\0A -auto Automatically select algorithm settings from wavelength etc\0A -radar Use settings appropriate for radar\0A -lidar Use settings appropriate for lidar\0A -algorithms <small_angle_algorithm> <wide_angle_algorithm>\0A Manually select algorithm, where <small_angle_algorithm> is:\0A none - No single or small-angle scattering\0A single - Single scattering (no small-angle scattering)\0A original - Original Hogan (2006) algorithm: speed O(N^2)\0A fast - Faster Hogan (2008) algorithm: speed O(N) DEFAULT\0A explicit - Eloranta-like explicit representation of each order of scattering\0A lag - Hogan (2008) but also with lag calculation (m)\0A ...and where <wide_angle_algorithm> is:\0A none - No wide-angle scattering\0A tdts - Time-dependent two stream (Hogan and Battaglia 2008)\0A lidar - TDTS assuming forward lobe DEFAULT\0A radar - TDTS assuming no forward lobe\0A -hsrl Output particulate and air backscatter separately\0A -gaussian-receiver\0A Receiver is Gaussian rather than top-hat shaped\0A -jacobian Output the approximate but fast Jacobian\0A -numerical-jacobian\0A Output the Jacobian calculated (slowly) using finite\0A differences\0A -ext-only Only calculate the Jacobian with respect to extinction\0A -adjoint Output the adjoint as well\0A -check-adjoint Calculate the adjoint and check it with a numerical Jacobian\0A -annular-detectors\0A 2nd and subsequent detectors are ring shaped\0A\0A\00"
@.str.2 = [293 x i8] c"Options for ORIGINAL small-angle (SA) algorithm\0A -simple-optical-depth\0A Use simple optical depth integration\0A -crude-optical-depth\0A Use crude optical depth integration\0A -crude-integration\0A Use crude double/multiple scattering integration\0A\00"
@.str.3 = [312 x i8] c" -no-multiscat-within-gate\0A Photon cannot be forward scattered more than once within a\0A single gate; note that this has the opposite effect to\0A \22-crude-integration\22\0A -double-scattering-only\0A Don't include triple and higher-order scatterings\0A\00"
@.str.4 = [306 x i8] c" -no-molecular-extinction\0A Molecules do not extinguish the beam\0A -wide-angle-cutoff <theta>\0A Forward scattering at angles greater than <theta> radians\0A are deemed to escape, a crude way to deal with a problem\0A associated with aerosols\0A\00"
@.str.5 = [197 x i8] c" -crude-double-scattering\0A Don't use Eloranta's slow but accurate double scattering\0A formulation\0A -approx-exp Appriximate the exp() function call for speed\0A\0A\00"
@.str.6 = [267 x i8] c"Options for EXPLICIT small-angle (SA) algorithm\0A -explicit n Use an explicit model with n orders of scattering\0A -output-distribution n dx\0A Output horizontal photon distributions at n points spaced\0A dx apart, starting at dx/2\0A\0A\00"
@.str.7 = [409 x i8] c"Options for wide-angle multiple-scattering\0A -ignore-source-widening\0A Ignore widening effect of small-angle scattering on source beam for wide-angle calc\0A -optimize-wide-angle-gates\0A Skip optically thin gates in wide-angle calculation\0A -simple-2s-coeffts\0A Use the simple upwind Euler formulation (can be unstable\0A for high optical depth)\0A\00"
@.str.8 = [421 x i8] c" -ssa-scales-forward-lobe\0A Single-scattering albedo less than unity reduces the\0A forward scattering lobe as well as wide-angle scattering\0A -num-samples m Output m samples, allowing sampling of signals appearing\0A to originate below ground\0A -propagation-to-stderr\0A Print the diffuse photon energies and variances to\0A standard error\0A\0A\00"
@.str.9 = [312 x i8] c"Input data\0A First line: 5 values\0A 1: Number of range gates in profile\0A 2: Wavelength (m)\0A 3: Altitude of instrument (m)\0A 4: Transmitter divergence, 1/e half-width (radians)\0A 5: Receiver field-of-view, half-width of first receiver (radians)\0A 6+: Fields-of-view for any other channels (radians)\0A\00"
@.str.10 = [236 x i8] c" (note that with the \22-v1\22 option, the version 1.x file format is assumed,\0A in which the order is (1) number of range gates, (2) wavelength, (3) divergence,\0A (4) field-of-view, (5) altitude, and only one field of view is allowed)\0A\00"
@.str.11 = [507 x i8] c" Subsequent lines: 4, 5, 8, 10 or more values (all 8 required for the wide-angle\0A calculation; all 10 to represent anisotropic phase functions near 180 deg);\0A more to calculate the adjoint\0A 1: Range of gate above ground starting with nearest gate to instrument (m)\0A 2: Extinction coefficient of cloud/aerosol only (m-1)\0A 3: Equivalent-area cloud/aerosol radius (m)\0A 4: Extinction-to-backscatter ratio of cloud/aerosol (sr)\0A 5: Air extinction coefficient (m-1); optional (zero if missing)\0A\00"
@.str.12 = [141 x i8] c" 6: Single scattering albedo of cloud/aerosol\0A 7: Scattering asymmetry factor of cloud/aerosol\0A 8: Single scattering albedo of air\0A\00"
@.str.13 = [439 x i8] c" 9: Fraction of cloud/aerosol backscatter due to droplets (real number\0A between 0 and 1), for representing anisotropic near-180 phase\0A functions in the SA algorithm\0A 10: Pristine ice fraction, for anisotropic near-180 phase functions\0A from Yang et al. (2000); note that irregular ice particles\0A are believed to have isotropic near-180 phase functions, in\0A which case set this variable to zero\0A\00"
@.str.14 = [209 x i8] c" Subsequent lines (only with \22-adjoint\22 option)\0A 11 to 10+n: Adjoint input for particulate backscatter of the n fields-of-view\0A 11+n: Adjoint input for air backscatter of the first field-of-view (for HSRL)\0A\0A\00"
@.str.15 = [327 x i8] c"Output data (without -jacobian or -numerical-jacobian option)\0A Default: 5 values per range gate\0A 1: Index of range gate\0A 2: Apparent range above ground (m)\0A 3: Extinction coefficient (m-1)\0A 4: Equivalent-area particle radius (microns)\0A 5: Apparent backscatter (m-1 sr-1), for particulates only if with \22-hsrl\22\0A\00"
@.str.16 = [82 x i8] c" With the \22-hsrl\22 option\0A 6: Apparent backscatter of the air only (m-1 sr-1)\0A\00"
@.str.17 = [249 x i8] c" With the \22-adjoint\22 option (where n=6 if \22-hsrl\22, n=5 otherwise)\0A n+1: Adjoint of extinction coefficient (m)\0A n+2: Adjoint of single-scattering albedo\0A n+3: Adjoint of asymmetry factor\0A n+4: Adjoint of extinction-to-backscatter ratio (m sr)\0A\0A\00"
@.str.18 = [431 x i8] c"Output data (with -jacobian or -numerical-jacobian option)\0A n x m matrix: d(attenuated backscatter) / d(extinction coefficient)\0Aand if \22-ext-only\22 is not set:\0A n x m matrix: d(attenuated backscatter) / d(single-scattering albedo)\0A n x m matrix: d(attenuated backscatter) / d(asymmetry factor)\0A n x m matrix: d(attenuated backscatter) / d(particle radius)\0A 1 x m vector: d(attenuated backscatter) / d(ext-to-dirat ratio)\0A\00"
define void @usage(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 (i32, i8*, ...) @fprintf(i32 %2, i8* getelementptr inbounds ([94 x i8], [94 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %0)
%4 = load i32, i32* @stderr
%5 = tail call i32 (i32, i8*, ...) @fprintf(i32 %4, i8* getelementptr inbounds ([1850 x i8], [1850 x i8]* @.str.1, i64 0, i64 0))
%6 = load i32, i32* @stderr
%7 = tail call i32 (i32, i8*, ...) @fprintf(i32 %6, i8* getelementptr inbounds ([293 x i8], [293 x i8]* @.str.2, i64 0, i64 0))
%8 = load i32, i32* @stderr
%9 = tail call i32 (i32, i8*, ...) @fprintf(i32 %8, i8* getelementptr inbounds ([312 x i8], [312 x i8]* @.str.3, i64 0, i64 0))
%10 = load i32, i32* @stderr
%11 = tail call i32 (i32, i8*, ...) @fprintf(i32 %10, i8* getelementptr inbounds ([306 x i8], [306 x i8]* @.str.4, i64 0, i64 0))
%12 = load i32, i32* @stderr
%13 = tail call i32 (i32, i8*, ...) @fprintf(i32 %12, i8* getelementptr inbounds ([197 x i8], [197 x i8]* @.str.5, i64 0, i64 0))
%14 = load i32, i32* @stderr
%15 = tail call i32 (i32, i8*, ...) @fprintf(i32 %14, i8* getelementptr inbounds ([267 x i8], [267 x i8]* @.str.6, i64 0, i64 0))
%16 = load i32, i32* @stderr
%17 = tail call i32 (i32, i8*, ...) @fprintf(i32 %16, i8* getelementptr inbounds ([409 x i8], [409 x i8]* @.str.7, i64 0, i64 0))
%18 = load i32, i32* @stderr
%19 = tail call i32 (i32, i8*, ...) @fprintf(i32 %18, i8* getelementptr inbounds ([421 x i8], [421 x i8]* @.str.8, i64 0, i64 0))
%20 = load i32, i32* @stderr
%21 = tail call i32 (i32, i8*, ...) @fprintf(i32 %20, i8* getelementptr inbounds ([312 x i8], [312 x i8]* @.str.9, i64 0, i64 0))
%22 = load i32, i32* @stderr
%23 = tail call i32 (i32, i8*, ...) @fprintf(i32 %22, i8* getelementptr inbounds ([236 x i8], [236 x i8]* @.str.10, i64 0, i64 0))
%24 = load i32, i32* @stderr
%25 = tail call i32 (i32, i8*, ...) @fprintf(i32 %24, i8* getelementptr inbounds ([507 x i8], [507 x i8]* @.str.11, i64 0, i64 0))
%26 = load i32, i32* @stderr
%27 = tail call i32 (i32, i8*, ...) @fprintf(i32 %26, i8* getelementptr inbounds ([141 x i8], [141 x i8]* @.str.12, i64 0, i64 0))
%28 = load i32, i32* @stderr
%29 = tail call i32 (i32, i8*, ...) @fprintf(i32 %28, i8* getelementptr inbounds ([439 x i8], [439 x i8]* @.str.13, i64 0, i64 0))
%30 = load i32, i32* @stderr
%31 = tail call i32 (i32, i8*, ...) @fprintf(i32 %30, i8* getelementptr inbounds ([209 x i8], [209 x i8]* @.str.14, i64 0, i64 0))
%32 = load i32, i32* @stderr
%33 = tail call i32 (i32, i8*, ...) @fprintf(i32 %32, i8* getelementptr inbounds ([327 x i8], [327 x i8]* @.str.15, i64 0, i64 0))
%34 = load i32, i32* @stderr
%35 = tail call i32 (i32, i8*, ...) @fprintf(i32 %34, i8* getelementptr inbounds ([82 x i8], [82 x i8]* @.str.16, i64 0, i64 0))
%36 = load i32, i32* @stderr
%37 = tail call i32 (i32, i8*, ...) @fprintf(i32 %36, i8* getelementptr inbounds ([249 x i8], [249 x i8]* @.str.17, i64 0, i64 0))
%38 = load i32, i32* @stderr
%39 = tail call i32 (i32, i8*, ...) @fprintf(i32 %38, i8* getelementptr inbounds ([431 x i8], [431 x i8]* @.str.18, i64 0, i64 0))
ret void
}