#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*/ c_errmsg(char *, int);
double pow(double, double);
void c_getmom(int iphas, double gg, int nmom, double *pmom) {
  const double cldmom[299] = {
      2.544,  3.883,  4.568,  5.235,  5.887,  6.457,  7.177,  7.859,  8.494,
      9.286,  9.856,  10.615, 11.229, 11.851, 12.503, 13.058, 13.626, 14.209,
      14.660, 15.231, 15.641, 16.126, 16.539, 16.934, 17.325, 17.673, 17.999,
      18.329, 18.588, 18.885, 19.103, 19.345, 19.537, 19.721, 19.884, 20.024,
      20.145, 20.251, 20.330, 20.401, 20.444, 20.477, 20.489, 20.483, 20.467,
      20.427, 20.382, 20.310, 20.236, 20.136, 20.036, 19.909, 19.785, 19.632,
      19.486, 19.311, 19.145, 18.949, 18.764, 18.551, 18.348, 18.119, 17.901,
      17.659, 17.428, 17.174, 16.931, 16.668, 16.415, 16.144, 15.883, 15.606,
      15.338, 15.058, 14.784, 14.501, 14.225, 13.941, 13.662, 13.378, 13.098,
      12.816, 12.536, 12.257, 11.978, 11.703, 11.427, 11.156, 10.884, 10.618,
      10.350, 10.090, 9.827,  9.574,  9.318,  9.072,  8.822,  8.584,  8.340,
      8.110,  7.874,  7.652,  7.424,  7.211,  6.990,  6.785,  6.573,  6.377,
      6.173,  5.986,  5.790,  5.612,  5.424,  5.255,  5.075,  4.915,  4.744,
      4.592,  4.429,  4.285,  4.130,  3.994,  3.847,  3.719,  3.580,  3.459,
      3.327,  3.214,  3.090,  2.983,  2.866,  2.766,  2.656,  2.562,  2.459,
      2.372,  2.274,  2.193,  2.102,  2.025,  1.940,  1.869,  1.790,  1.723,
      1.649,  1.588,  1.518,  1.461,  1.397,  1.344,  1.284,  1.235,  1.179,
      1.134,  1.082,  1.040,  0.992,  0.954,  0.909,  0.873,  0.832,  0.799,
      0.762,  0.731,  0.696,  0.668,  0.636,  0.610,  0.581,  0.557,  0.530,
      0.508,  0.483,  0.463,  0.440,  0.422,  0.401,  0.384,  0.364,  0.349,
      0.331,  0.317,  0.301,  0.288,  0.273,  0.262,  0.248,  0.238,  0.225,
      0.215,  0.204,  0.195,  0.185,  0.177,  0.167,  0.160,  0.151,  0.145,
      0.137,  0.131,  0.124,  0.118,  0.112,  0.107,  0.101,  0.097,  0.091,
      0.087,  0.082,  0.079,  0.074,  0.071,  0.067,  0.064,  0.060,  0.057,
      0.054,  0.052,  0.049,  0.047,  0.044,  0.042,  0.039,  0.038,  0.035,
      0.034,  0.032,  0.030,  0.029,  0.027,  0.026,  0.024,  0.023,  0.022,
      0.021,  0.020,  0.018,  0.018,  0.017,  0.016,  0.015,  0.014,  0.013,
      0.013,  0.012,  0.011,  0.011,  0.010,  0.009,  0.009,  0.008,  0.008,
      0.008,  0.007,  0.007,  0.006,  0.006,  0.006,  0.005,  0.005,  0.005,
      0.005,  0.004,  0.004,  0.004,  0.004,  0.003,  0.003,  0.003,  0.003,
      0.003,  0.003,  0.002,  0.002,  0.002,  0.002,  0.002,  0.002,  0.002,
      0.002,  0.002,  0.001,  0.001,  0.001,  0.001,  0.001,  0.001,  0.001,
      0.001,  0.001,  0.001,  0.001,  0.001,  0.001,  0.001,  0.001,  0.001,
      0.001,  0.001};
  const double hazelm[82] = {
      2.41260, 3.23047, 3.37296, 3.23150, 2.89350, 2.49594, 2.11361, 1.74812,
      1.44692, 1.17714, 0.96643, 0.78237, 0.64114, 0.51966, 0.42563, 0.34688,
      0.28351, 0.23317, 0.18963, 0.15788, 0.12739, 0.10762, 0.08597, 0.07381,
      0.05828, 0.05089, 0.03971, 0.03524, 0.02720, 0.02451, 0.01874, 0.01711,
      0.01298, 0.01198, 0.00904, 0.00841, 0.00634, 0.00592, 0.00446, 0.00418,
      0.00316, 0.00296, 0.00225, 0.00210, 0.00160, 0.00150, 0.00115, 0.00107,
      0.00082, 0.00077, 0.00059, 0.00055, 0.00043, 0.00040, 0.00031, 0.00029,
      0.00023, 0.00021, 0.00017, 0.00015, 0.00012, 0.00011, 0.00009, 0.00008,
      0.00006, 0.00006, 0.00005, 0.00004, 0.00004, 0.00003, 0.00003, 0.00002,
      0.00002, 0.00002, 0.00001, 0.00001, 0.00001, 0.00001, 0.00001, 0.00001,
      0.00001, 0.00001};
  register int k;
  if (iphas < 1 || iphas > 5) {
    c_errmsg("getmom--bad input variable iphas", 1);
  }
  if (nmom < 2) {
    c_errmsg("getmom--bad input variable nmom", 1);
  }
  pmom[0] = 1.;
  for (k = 1; k < nmom; k++) {
    pmom[k] = 0.;
  }
  switch (iphas) {
  case 2:
    pmom[2] = 0.1;
    break;
  case 3:
    if (gg <= -1. || gg >= 1.) {
      c_errmsg("getmom--bad input variable gg", 1);
    }
    for (k = 1; k <= nmom; k++) {
      pmom[k] = pow(gg, (double)k);
    }
    break;
  case 4:
    for (k = 1; k <= ({
                  const int _i = (int)(82);
                  const int _j = (int)(nmom);
                  _i < _j ? _i : _j;
                });
         k++) {
      pmom[k] = hazelm[k - 1] / (double)(2 * k + 1);
    }
    break;
  case 5:
    for (k = 1; k <= ({
                  const int _i = (int)(298);
                  const int _j = (int)(nmom);
                  _i < _j ? _i : _j;
                });
         k++) {
      pmom[k] = cldmom[k - 1] / (double)(2 * k + 1);
    }
    break;
  }
  return;
}


x86 assembly (clang, -O0):
<c_getmom>:
push   %rbp
mov    %rsp,%rbp
sub    $0xc50,%rsp
mov    %edi,-0x4(%rbp)
movsd  %xmm0,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    %rdx,-0x20(%rbp)
lea    -0x980(%rbp),%rdi
lea    0xed8(%rip),%rsi
mov    $0x958,%edx
call   1030 <memcpy@plt>
lea    -0xc10(%rbp),%rdi
lea    0x1820(%rip),%rsi
mov    $0x290,%edx
call   1030 <memcpy@plt>
cmpl   $0x1,-0x4(%rbp)
jl     118e <c_getmom+0x5e>
cmpl   $0x5,-0x4(%rbp)
jle    119f <c_getmom+0x6f>
lea    0x1a8b(%rip),%rdi
mov    $0x1,%esi
call   1050 <c_errmsg@plt>
cmpl   $0x2,-0x14(%rbp)
jge    11ba <c_getmom+0x8a>
lea    0x1a91(%rip),%rdi
mov    $0x1,%esi
call   1050 <c_errmsg@plt>
mov    -0x20(%rbp),%rax
movsd  0xe3a(%rip),%xmm0
movsd  %xmm0,(%rax)
movl   $0x1,-0xc14(%rbp)
mov    -0xc14(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    120a <c_getmom+0xda>
mov    -0x20(%rbp),%rax
movslq -0xc14(%rbp),%rcx
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0xc14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc14(%rbp)
jmp    11d4 <c_getmom+0xa4>
mov    -0x4(%rbp),%eax
add    $0xfffffffe,%eax
mov    %eax,%ecx
mov    %rcx,-0xc38(%rbp)
sub    $0x3,%eax
ja     1468 <c_getmom+0x338>
mov    -0xc38(%rbp),%rax
lea    0xdf0(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
mov    -0x20(%rbp),%rax
movsd  0xdcb(%rip),%xmm0
movsd  %xmm0,0x10(%rax)
jmp    1468 <c_getmom+0x338>
movsd  0xdb1(%rip),%xmm0
ucomisd -0x10(%rbp),%xmm0
jae    1279 <c_getmom+0x149>
movsd  -0x10(%rbp),%xmm0
movsd  0xd91(%rip),%xmm1
ucomisd %xmm1,%xmm0
jb     128a <c_getmom+0x15a>
lea    0x19e1(%rip),%rdi
mov    $0x1,%esi
call   1050 <c_errmsg@plt>
movl   $0x1,-0xc14(%rbp)
mov    -0xc14(%rbp),%eax
cmp    -0x14(%rbp),%eax
jg     12d9 <c_getmom+0x1a9>
movsd  -0x10(%rbp),%xmm0
cvtsi2sdl -0xc14(%rbp),%xmm1
ff
call   1040 <pow@plt>
mov    -0x20(%rbp),%rax
movslq -0xc14(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0xc14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc14(%rbp)
jmp    1294 <c_getmom+0x164>
jmp    1468 <c_getmom+0x338>
movl   $0x1,-0xc14(%rbp)
mov    -0xc14(%rbp),%eax
mov    %eax,-0xc3c(%rbp)
movl   $0x52,-0xc18(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,-0xc1c(%rbp)
mov    $0x52,%eax
cmp    -0xc1c(%rbp),%eax
jge    1328 <c_getmom+0x1f8>
mov    $0x52,%eax
mov    %eax,-0xc40(%rbp)
jmp    1334 <c_getmom+0x204>
mov    -0xc1c(%rbp),%eax
mov    %eax,-0xc40(%rbp)
mov    -0xc3c(%rbp),%eax
mov    -0xc40(%rbp),%ecx
mov    %ecx,-0xc20(%rbp)
cmp    -0xc20(%rbp),%eax
jg     139e <c_getmom+0x26e>
mov    -0xc14(%rbp),%eax
sub    $0x1,%eax
cltq
movsd  -0xc10(%rbp,%rax,8),%xmm0
ff ff
mov    -0xc14(%rbp),%eax
shl    $0x1,%eax
add    $0x1,%eax
cvtsi2sd %eax,%xmm1
divsd  %xmm1,%xmm0
mov    -0x20(%rbp),%rax
movslq -0xc14(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0xc14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc14(%rbp)
jmp    12e8 <c_getmom+0x1b8>
jmp    1468 <c_getmom+0x338>
movl   $0x1,-0xc14(%rbp)
mov    -0xc14(%rbp),%eax
mov    %eax,-0xc44(%rbp)
movl   $0x12a,-0xc24(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,-0xc28(%rbp)
mov    $0x12a,%eax
cmp    -0xc28(%rbp),%eax
jge    13ed <c_getmom+0x2bd>
mov    $0x12a,%eax
mov    %eax,-0xc48(%rbp)
jmp    13f9 <c_getmom+0x2c9>
mov    -0xc28(%rbp),%eax
mov    %eax,-0xc48(%rbp)
mov    -0xc44(%rbp),%eax
mov    -0xc48(%rbp),%ecx
mov    %ecx,-0xc2c(%rbp)
cmp    -0xc2c(%rbp),%eax
jg     1463 <c_getmom+0x333>
mov    -0xc14(%rbp),%eax
sub    $0x1,%eax
cltq
movsd  -0x980(%rbp,%rax,8),%xmm0
ff ff
mov    -0xc14(%rbp),%eax
shl    $0x1,%eax
add    $0x1,%eax
cvtsi2sd %eax,%xmm1
divsd  %xmm1,%xmm0
mov    -0x20(%rbp),%rax
movslq -0xc14(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0xc14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc14(%rbp)
jmp    13ad <c_getmom+0x27d>
jmp    1468 <c_getmom+0x338>
add    $0xc50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<c_getmom>:
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x10,%rsp
mov    %rdx,%r15
mov    %esi,%r14d
movsd  %xmm0,0x8(%rsp)
mov    %edi,%ebx
lea    -0x6(%rbx),%eax
cmp    $0xfffffffa,%eax
ja     1164 <c_getmom+0x34>
lea    0x1b06(%rip),%rdi
mov    $0x1,%esi
call   1050 <c_errmsg@plt>
cmp    $0x1,%r14d
jg     118a <c_getmom+0x5a>
lea    0x1b10(%rip),%rdi
mov    $0x1,%esi
call   1050 <c_errmsg@plt>
movabs $0x3ff0000000000000,%rax
mov    %rax,(%r15)
jmp    11aa <c_getmom+0x7a>
movabs $0x3ff0000000000000,%rax
mov    %rax,(%r15)
lea    0x8(%r15),%rdi
lea    -0x1(%r14),%edx
shl    $0x3,%rdx
xor    %esi,%esi
call   1030 <memset@plt>
add    $0xfffffffe,%ebx
cmp    $0x3,%ebx
ja     1573 <c_getmom+0x443>
lea    0xea3(%rip),%rax
movslq (%rax,%rbx,4),%rcx
add    %rax,%rcx
jmp    *%rcx
movabs $0x3fb999999999999a,%rax
99 b9 3f
mov    %rax,0x10(%r15)
jmp    1573 <c_getmom+0x443>
movsd  0xe6f(%rip),%xmm0
movsd  0x8(%rsp),%xmm1
ucomisd %xmm1,%xmm0
jae    11f7 <c_getmom+0xc7>
ucomisd 0xe63(%rip),%xmm1
jb     1208 <c_getmom+0xd8>
lea    0x1aa3(%rip),%rdi
mov    $0x1,%esi
call   1050 <c_errmsg@plt>
test   %r14d,%r14d
jle    1573 <c_getmom+0x443>
mov    %r14d,%r12d
lea    -0x1(%r12),%rax
mov    %r12d,%r14d
and    $0x3,%r14d
mov    $0x1,%ebx
cmp    $0x3,%rax
jb     12b9 <c_getmom+0x189>
and    $0xfffffffc,%r12d
mov    $0x1,%ebx
xor    %r13d,%r13d
nopl   0x0(%rax,%rax,1)
xorps  %xmm1,%xmm1
cvtsi2sd %ebx,%xmm1
movsd  0x8(%rsp),%xmm0
call   1040 <pow@plt>
movsd  %xmm0,(%r15,%rbx,8)
lea    0x1(%rbx),%eax
xorps  %xmm1,%xmm1
cvtsi2sd %eax,%xmm1
movsd  0x8(%rsp),%xmm0
call   1040 <pow@plt>
movsd  %xmm0,0x8(%r15,%rbx,8)
lea    0x2(%rbx),%eax
xorps  %xmm1,%xmm1
cvtsi2sd %eax,%xmm1
movsd  0x8(%rsp),%xmm0
call   1040 <pow@plt>
movsd  %xmm0,0x10(%r15,%rbx,8)
lea    0x3(%rbx),%eax
xorps  %xmm1,%xmm1
cvtsi2sd %eax,%xmm1
movsd  0x8(%rsp),%xmm0
call   1040 <pow@plt>
movsd  %xmm0,0x18(%r15,%rbx,8)
add    $0x4,%rbx
add    $0x4,%r13
cmp    %r12,%r13
jne    1240 <c_getmom+0x110>
test   %r14,%r14
je     1573 <c_getmom+0x443>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
xorps  %xmm1,%xmm1
cvtsi2sd %ebx,%xmm1
movsd  0x8(%rsp),%xmm0
call   1040 <pow@plt>
movsd  %xmm0,(%r15,%rbx,8)
add    $0x1,%rbx
add    $0xffffffffffffffff,%r14
jne    12d0 <c_getmom+0x1a0>
jmp    1573 <c_getmom+0x443>
cmp    $0x52,%r14d
mov    $0x52,%edx
cmovl  %r14d,%edx
test   %edx,%edx
jle    1573 <c_getmom+0x443>
mov    %edx,%eax
mov    $0x1,%ecx
cmp    $0x2,%edx
jb     13fe <c_getmom+0x2ce>
mov    %eax,%ecx
and    $0xfffffffe,%ecx
lea    -0x2(%rcx),%rsi
mov    %rsi,%rdx
shr    %rdx
add    $0x1,%rdx
test   %rsi,%rsi
je     1581 <c_getmom+0x451>
mov    %rdx,%rdi
and    $0xfffffffffffffffe,%rdi
movdqa 0xcc9(%rip),%xmm0
xor    %esi,%esi
lea    0x1680(%rip),%rbx
movdqa 0xcc8(%rip),%xmm1
movdqa 0xcd0(%rip),%xmm2
movdqa 0xcd8(%rip),%xmm3
nopl   0x0(%rax,%rax,1)
movdqa %xmm0,%xmm4
paddd  %xmm0,%xmm4
movdqa %xmm4,%xmm5
por    %xmm1,%xmm5
cvtdq2pd %xmm5,%xmm5
movapd (%rbx,%rsi,8),%xmm6
divpd  %xmm5,%xmm6
movapd 0x10(%rbx,%rsi,8),%xmm5
movupd %xmm6,0x8(%r15,%rsi,8)
paddd  %xmm2,%xmm4
cvtdq2pd %xmm4,%xmm4
divpd  %xmm4,%xmm5
movupd %xmm5,0x18(%r15,%rsi,8)
add    $0x4,%rsi
paddd  %xmm3,%xmm0
add    $0xfffffffffffffffe,%rdi
jne    1370 <c_getmom+0x240>
paddd  %xmm0,%xmm0
por    0xc59(%rip),%xmm0
cvtdq2pd %xmm0,%xmm0
test   $0x1,%dl
je     13ee <c_getmom+0x2be>
lea    0x15f9(%rip),%rdx
movapd (%rdx,%rsi,8),%xmm1
shl    $0x3,%rsi
divpd  %xmm0,%xmm1
or     $0x8,%rsi
movupd %xmm1,(%r15,%rsi,1)
cmp    %rcx,%rax
je     1573 <c_getmom+0x443>
mov    %rax,%rcx
or     $0x1,%rcx
add    $0x1,%rax
lea    (%rcx,%rcx,1),%edx
add    $0x1,%edx
lea    0x15c1(%rip),%rsi
nop
movsd  -0x8(%rsi,%rcx,8),%xmm0
xorps  %xmm1,%xmm1
cvtsi2sd %edx,%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,(%r15,%rcx,8)
add    $0x1,%rcx
add    $0x2,%edx
cmp    %rcx,%rax
jne    1410 <c_getmom+0x2e0>
jmp    1573 <c_getmom+0x443>
cmp    $0x12a,%r14d
mov    $0x12a,%edx
cmovl  %r14d,%edx
test   %edx,%edx
jle    1573 <c_getmom+0x443>
mov    %edx,%eax
mov    $0x1,%ecx
cmp    $0x2,%edx
jb     153a <c_getmom+0x40a>
mov    %eax,%ecx
and    $0xfffffffe,%ecx
lea    -0x2(%rcx),%rsi
mov    %rsi,%rdx
shr    %rdx
add    $0x1,%rdx
test   %rsi,%rsi
je     1599 <c_getmom+0x469>
mov    %rdx,%rdi
and    $0xfffffffffffffffe,%rdi
movdqa 0xb85(%rip),%xmm0
xor    %esi,%esi
lea    0xbdc(%rip),%rbx
movdqa 0xb84(%rip),%xmm1
movdqa 0xb8c(%rip),%xmm2
movdqa 0xb94(%rip),%xmm3
nopl   0x0(%rax)
movdqa %xmm0,%xmm4
paddd  %xmm0,%xmm4
movdqa %xmm4,%xmm5
por    %xmm1,%xmm5
cvtdq2pd %xmm5,%xmm5
movapd (%rbx,%rsi,8),%xmm6
divpd  %xmm5,%xmm6
movapd 0x10(%rbx,%rsi,8),%xmm5
movupd %xmm6,0x8(%r15,%rsi,8)
paddd  %xmm2,%xmm4
cvtdq2pd %xmm4,%xmm4
divpd  %xmm4,%xmm5
movupd %xmm5,0x18(%r15,%rsi,8)
add    $0x4,%rsi
paddd  %xmm3,%xmm0
add    $0xfffffffffffffffe,%rdi
jne    14b0 <c_getmom+0x380>
paddd  %xmm0,%xmm0
por    0xb19(%rip),%xmm0
cvtdq2pd %xmm0,%xmm0
test   $0x1,%dl
je     152e <c_getmom+0x3fe>
lea    0xb59(%rip),%rdx
movapd (%rdx,%rsi,8),%xmm1
shl    $0x3,%rsi
divpd  %xmm0,%xmm1
or     $0x8,%rsi
movupd %xmm1,(%r15,%rsi,1)
cmp    %rcx,%rax
je     1573 <c_getmom+0x443>
mov    %rax,%rcx
or     $0x1,%rcx
add    $0x1,%rax
lea    (%rcx,%rcx,1),%edx
add    $0x1,%edx
lea    0xb25(%rip),%rsi
nopl   0x0(%rax,%rax,1)
movsd  -0x8(%rsi,%rcx,8),%xmm0
xorps  %xmm1,%xmm1
cvtsi2sd %edx,%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,(%r15,%rcx,8)
add    $0x1,%rcx
add    $0x2,%edx
cmp    %rcx,%rax
jne    1550 <c_getmom+0x420>
add    $0x10,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
ret
movapd 0xa77(%rip),%xmm0
xor    %esi,%esi
test   $0x1,%dl
jne    13d0 <c_getmom+0x2a0>
jmp    13ee <c_getmom+0x2be>
movapd 0xa5f(%rip),%xmm0
xor    %esi,%esi
test   $0x1,%dl
jne    1510 <c_getmom+0x3e0>
jmp    152e <c_getmom+0x3fe>

LLVM IR (-O0):
@__const.c_getmom.cldmom = [299 x double] [double 2.544000e+00, double 3.883000e+00, double 4.568000e+00, double 5.235000e+00, double 5.887000e+00, double 6.457000e+00, double 7.177000e+00, double 7.859000e+00, double 0x4020FCED916872B0, double 9.286000e+00, double 0x4023B645A1CAC083, double 1.061500e+01, double 1.122900e+01, double 1.185100e+01, double 1.250300e+01, double 1.305800e+01, double 1.362600e+01, double 1.420900e+01, double 1.466000e+01, double 1.523100e+01, double 1.564100e+01, double 1.612600e+01, double 1.653900e+01, double 1.693400e+01, double 1.732500e+01, double 1.767300e+01, double 1.799900e+01, double 1.832900e+01, double 1.858800e+01, double 1.888500e+01, double 1.910300e+01, double 1.934500e+01, double 1.953700e+01, double 1.972100e+01, double 1.988400e+01, double 2.002400e+01, double 2.014500e+01, double 2.025100e+01, double 2.033000e+01, double 2.040100e+01, double 2.044400e+01, double 2.047700e+01, double 2.048900e+01, double 2.048300e+01, double 2.046700e+01, double 2.042700e+01, double 2.038200e+01, double 2.031000e+01, double 2.023600e+01, double 2.013600e+01, double 2.003600e+01, double 1.990900e+01, double 1.978500e+01, double 1.963200e+01, double 1.948600e+01, double 1.931100e+01, double 1.914500e+01, double 1.894900e+01, double 1.876400e+01, double 1.855100e+01, double 1.834800e+01, double 1.811900e+01, double 1.790100e+01, double 1.765900e+01, double 1.742800e+01, double 1.717400e+01, double 1.693100e+01, double 1.666800e+01, double 1.641500e+01, double 1.614400e+01, double 1.588300e+01, double 1.560600e+01, double 1.533800e+01, double 1.505800e+01, double 1.478400e+01, double 1.450100e+01, double 1.422500e+01, double 1.394100e+01, double 1.366200e+01, double 1.337800e+01, double 1.309800e+01, double 1.281600e+01, double 1.253600e+01, double 1.225700e+01, double 1.197800e+01, double 1.170300e+01, double 1.142700e+01, double 1.115600e+01, double 1.088400e+01, double 1.061800e+01, double 1.035000e+01, double 1.009000e+01, double 0x4023A76C8B439581, double 0x402325E353F7CED9, double 9.318000e+00, double 0x402224DD2F1A9FBE, double 0x4021A4DD2F1A9FBE, double 0x40212B020C49BA5E, double 0x4020AE147AE147AE, double 8.110000e+00, double 0x401F7EF9DB22D0E5, double 7.652000e+00, double 7.424000e+00, double 7.211000e+00, double 6.990000e+00, double 6.785000e+00, double 6.573000e+00, double 6.377000e+00, double 6.173000e+00, double 5.986000e+00, double 5.790000e+00, double 5.612000e+00, double 5.424000e+00, double 5.255000e+00, double 5.075000e+00, double 4.915000e+00, double 4.744000e+00, double 4.592000e+00, double 4.429000e+00, double 4.285000e+00, double 4.130000e+00, double 3.994000e+00, double 3.847000e+00, double 3.719000e+00, double 3.580000e+00, double 3.459000e+00, double 3.327000e+00, double 3.214000e+00, double 3.090000e+00, double 2.983000e+00, double 2.866000e+00, double 2.766000e+00, double 2.656000e+00, double 2.562000e+00, double 2.459000e+00, double 2.372000e+00, double 2.274000e+00, double 2.193000e+00, double 2.102000e+00, double 2.025000e+00, double 1.940000e+00, double 1.869000e+00, double 1.790000e+00, double 1.723000e+00, double 1.649000e+00, double 1.588000e+00, double 1.518000e+00, double 1.461000e+00, double 1.397000e+00, double 1.344000e+00, double 1.284000e+00, double 1.235000e+00, double 1.179000e+00, double 1.134000e+00, double 1.082000e+00, double 1.040000e+00, double 0x3FEFBE76C8B43958, double 0x3FEE872B020C49BA, double 9.090000e-01, double 0x3FEBEF9DB22D0E56, double 8.320000e-01, double 7.990000e-01, double 7.620000e-01, double 7.310000e-01, double 0x3FE645A1CAC08312, double 6.680000e-01, double 6.360000e-01, double 6.100000e-01, double 5.810000e-01, double 5.570000e-01, double 5.300000e-01, double 5.080000e-01, double 4.830000e-01, double 4.630000e-01, double 4.400000e-01, double 4.220000e-01, double 4.010000e-01, double 3.840000e-01, double 3.640000e-01, double 3.490000e-01, double 3.310000e-01, double 3.170000e-01, double 3.010000e-01, double 2.880000e-01, double 2.730000e-01, double 2.620000e-01, double 2.480000e-01, double 2.380000e-01, double 2.250000e-01, double 2.150000e-01, double 2.040000e-01, double 1.950000e-01, double 1.850000e-01, double 1.770000e-01, double 1.670000e-01, double 1.600000e-01, double 1.510000e-01, double 1.450000e-01, double 1.370000e-01, double 1.310000e-01, double 1.240000e-01, double 1.180000e-01, double 1.120000e-01, double 1.070000e-01, double 1.010000e-01, double 9.700000e-02, double 0x3FB74BC6A7EF9DB2, double 0x3FB645A1CAC08312, double 8.200000e-02, double 7.900000e-02, double 0x3FB2F1A9FBE76C8B, double 0x3FB22D0E56041893, double 6.700000e-02, double 6.400000e-02, double 6.000000e-02, double 5.700000e-02, double 5.400000e-02, double 5.200000e-02, double 4.900000e-02, double 4.700000e-02, double 4.400000e-02, double 4.200000e-02, double 3.900000e-02, double 3.800000e-02, double 3.500000e-02, double 3.400000e-02, double 3.200000e-02, double 3.000000e-02, double 2.900000e-02, double 2.700000e-02, double 2.600000e-02, double 2.400000e-02, double 2.300000e-02, double 2.200000e-02, double 2.100000e-02, double 2.000000e-02, double 1.800000e-02, double 1.800000e-02, double 1.700000e-02, double 1.600000e-02, double 1.500000e-02, double 1.400000e-02, double 1.300000e-02, double 1.300000e-02, double 1.200000e-02, double 1.100000e-02, double 1.100000e-02, double 1.000000e-02, double 0x3F826E978D4FDF3B, double 0x3F826E978D4FDF3B, double 8.000000e-03, double 8.000000e-03, double 8.000000e-03, double 7.000000e-03, double 7.000000e-03, double 6.000000e-03, double 6.000000e-03, double 6.000000e-03, double 5.000000e-03, double 5.000000e-03, double 5.000000e-03, double 5.000000e-03, double 4.000000e-03, double 4.000000e-03, double 4.000000e-03, double 4.000000e-03, double 3.000000e-03, double 3.000000e-03, double 3.000000e-03, double 3.000000e-03, double 3.000000e-03, double 3.000000e-03, double 2.000000e-03, double 2.000000e-03, double 2.000000e-03, double 2.000000e-03, double 2.000000e-03, double 2.000000e-03, double 2.000000e-03, double 2.000000e-03, double 2.000000e-03, double 1.000000e-03, double 1.000000e-03, double 1.000000e-03, double 1.000000e-03, double 1.000000e-03, double 1.000000e-03, double 1.000000e-03, double 1.000000e-03, double 1.000000e-03, double 1.000000e-03, double 1.000000e-03, double 1.000000e-03, double 1.000000e-03, double 1.000000e-03, double 1.000000e-03, double 1.000000e-03, double 1.000000e-03, double 1.000000e-03]
@__const.c_getmom.hazelm = [82 x double] [double 2.412600e+00, double 3.230470e+00, double 3.372960e+00, double 3.231500e+00, double 2.893500e+00, double 2.495940e+00, double 2.113610e+00, double 1.748120e+00, double 1.446920e+00, double 1.177140e+00, double 9.664300e-01, double 7.823700e-01, double 6.411400e-01, double 5.196600e-01, double 4.256300e-01, double 3.468800e-01, double 2.835100e-01, double 2.331700e-01, double 1.896300e-01, double 1.578800e-01, double 1.273900e-01, double 1.076200e-01, double 8.597000e-02, double 7.381000e-02, double 5.828000e-02, double 5.089000e-02, double 3.971000e-02, double 3.524000e-02, double 2.720000e-02, double 2.451000e-02, double 1.874000e-02, double 1.711000e-02, double 1.298000e-02, double 1.198000e-02, double 0x3F82839042D8C2A4, double 8.410000e-03, double 6.340000e-03, double 5.920000e-03, double 4.460000e-03, double 4.180000e-03, double 3.160000e-03, double 2.960000e-03, double 2.250000e-03, double 2.100000e-03, double 1.600000e-03, double 1.500000e-03, double 1.150000e-03, double 1.070000e-03, double 0x3F4ADEA897635E74, double 7.700000e-04, double 5.900000e-04, double 5.500000e-04, double 4.300000e-04, double 4.000000e-04, double 3.100000e-04, double 2.900000e-04, double 2.300000e-04, double 2.100000e-04, double 1.700000e-04, double 1.500000e-04, double 1.200000e-04, double 1.100000e-04, double 9.000000e-05, double 8.000000e-05, double 6.000000e-05, double 6.000000e-05, double 5.000000e-05, double 4.000000e-05, double 4.000000e-05, double 3.000000e-05, double 3.000000e-05, double 2.000000e-05, double 2.000000e-05, double 2.000000e-05, double 1.000000e-05, double 1.000000e-05, double 1.000000e-05, double 1.000000e-05, double 1.000000e-05, double 1.000000e-05, double 1.000000e-05, double 1.000000e-05]
@.str = [33 x i8] c"getmom--bad input variable iphas\00"
@.str.1 = [32 x i8] c"getmom--bad input variable nmom\00"
@.str.2 = [30 x i8] c"getmom--bad input variable gg\00"
define void @c_getmom(i32 %0, double %1, i32 %2, double* %3) {
%5 = alloca i32
%6 = alloca double
%7 = alloca i32
%8 = alloca double*
%9 = alloca [299 x double]
%10 = alloca [82 x double]
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
%15 = alloca i32
%16 = alloca i32
%17 = alloca i32
store i32 %0, i32* %5
store double %1, double* %6
store i32 %2, i32* %7
store double* %3, double** %8
%18 = bitcast [299 x double]* %9 to i8*
%19 = bitcast [82 x double]* %10 to i8*
%20 = load i32, i32* %5
%21 = icmp slt i32 %20, 1
br i1 %21, label %25, label %22
22: ; preds = %4
%23 = load i32, i32* %5
%24 = icmp sgt i32 %23, 5
br i1 %24, label %25, label %27
25: ; preds = %22, %4
%26 = call i32 @c_errmsg(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0), i32 1)
br label %27
27: ; preds = %25, %22
%28 = load i32, i32* %7
%29 = icmp slt i32 %28, 2
br i1 %29, label %30, label %32
30: ; preds = %27
%31 = call i32 @c_errmsg(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.1, i64 0, i64 0), i32 1)
br label %32
32: ; preds = %30, %27
%33 = load double*, double** %8
%34 = getelementptr inbounds double, double* %33, i64 0
store double 1.000000e+00, double* %34
store i32 1, i32* %11
br label %35
35: ; preds = %44, %32
%36 = load i32, i32* %11
%37 = load i32, i32* %7
%38 = icmp slt i32 %36, %37
br i1 %38, label %39, label %47
39: ; preds = %35
%40 = load double*, double** %8
%41 = load i32, i32* %11
%42 = sext i32 %41 to i64
%43 = getelementptr inbounds double, double* %40, i64 %42
store double 0.000000e+00, double* %43
br label %44
44: ; preds = %39
%45 = load i32, i32* %11
%46 = add nsw i32 %45, 1
store i32 %46, i32* %11
br label %35
47: ; preds = %35
%48 = load i32, i32* %5
switch i32 %48, label %142 [
i32 2, label %49
i32 3, label %52
i32 4, label %78
i32 5, label %110
]
49: ; preds = %47
%50 = load double*, double** %8
%51 = getelementptr inbounds double, double* %50, i64 2
store double 1.000000e-01, double* %51
br label %142
52: ; preds = %47
%53 = load double, double* %6
%54 = fcmp ole double %53, -1.000000e+00
br i1 %54, label %58, label %55
55: ; preds = %52
%56 = load double, double* %6
%57 = fcmp oge double %56, 1.000000e+00
br i1 %57, label %58, label %60
58: ; preds = %55, %52
%59 = call i32 @c_errmsg(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.2, i64 0, i64 0), i32 1)
br label %60
60: ; preds = %58, %55
store i32 1, i32* %11
br label %61
61: ; preds = %74, %60
%62 = load i32, i32* %11
%63 = load i32, i32* %7
%64 = icmp sle i32 %62, %63
br i1 %64, label %65, label %77
65: ; preds = %61
%66 = load double, double* %6
%67 = load i32, i32* %11
%68 = sitofp i32 %67 to double
%69 = call double @pow(double %66, double %68)
%70 = load double*, double** %8
%71 = load i32, i32* %11
%72 = sext i32 %71 to i64
%73 = getelementptr inbounds double, double* %70, i64 %72
store double %69, double* %73
br label %74
74: ; preds = %65
%75 = load i32, i32* %11
%76 = add nsw i32 %75, 1
store i32 %76, i32* %11
br label %61
77: ; preds = %61
br label %142
78: ; preds = %47
store i32 1, i32* %11
br label %79
79: ; preds = %106, %78
%80 = load i32, i32* %11
store i32 82, i32* %12
%81 = load i32, i32* %7
store i32 %81, i32* %13
%82 = load i32, i32* %13
%83 = icmp slt i32 82, %82
br i1 %83, label %84, label %85
84: ; preds = %79
br label %87
85: ; preds = %79
%86 = load i32, i32* %13
br label %87
87: ; preds = %85, %84
%88 = phi i32 [ 82, %84 ], [ %86, %85 ]
store i32 %88, i32* %14
%89 = load i32, i32* %14
%90 = icmp sle i32 %80, %89
br i1 %90, label %91, label %109
91: ; preds = %87
%92 = load i32, i32* %11
%93 = sub nsw i32 %92, 1
%94 = sext i32 %93 to i64
%95 = getelementptr inbounds [82 x double], [82 x double]* %10, i64 0, i64 %94
%96 = load double, double* %95
%97 = load i32, i32* %11
%98 = mul nsw i32 2, %97
%99 = add nsw i32 %98, 1
%100 = sitofp i32 %99 to double
%101 = fdiv double %96, %100
%102 = load double*, double** %8
%103 = load i32, i32* %11
%104 = sext i32 %103 to i64
%105 = getelementptr inbounds double, double* %102, i64 %104
store double %101, double* %105
br label %106
106: ; preds = %91
%107 = load i32, i32* %11
%108 = add nsw i32 %107, 1
store i32 %108, i32* %11
br label %79
109: ; preds = %87
br label %142
110: ; preds = %47
store i32 1, i32* %11
br label %111
111: ; preds = %138, %110
%112 = load i32, i32* %11
store i32 298, i32* %15
%113 = load i32, i32* %7
store i32 %113, i32* %16
%114 = load i32, i32* %16
%115 = icmp slt i32 298, %114
br i1 %115, label %116, label %117
116: ; preds = %111
br label %119
117: ; preds = %111
%118 = load i32, i32* %16
br label %119
119: ; preds = %117, %116
%120 = phi i32 [ 298, %116 ], [ %118, %117 ]
store i32 %120, i32* %17
%121 = load i32, i32* %17
%122 = icmp sle i32 %112, %121
br i1 %122, label %123, label %141
123: ; preds = %119
%124 = load i32, i32* %11
%125 = sub nsw i32 %124, 1
%126 = sext i32 %125 to i64
%127 = getelementptr inbounds [299 x double], [299 x double]* %9, i64 0, i64 %126
%128 = load double, double* %127
%129 = load i32, i32* %11
%130 = mul nsw i32 2, %129
%131 = add nsw i32 %130, 1
%132 = sitofp i32 %131 to double
%133 = fdiv double %128, %132
%134 = load double*, double** %8
%135 = load i32, i32* %11
%136 = sext i32 %135 to i64
%137 = getelementptr inbounds double, double* %134, i64 %136
store double %133, double* %137
br label %138
138: ; preds = %123
%139 = load i32, i32* %11
%140 = add nsw i32 %139, 1
store i32 %140, i32* %11
br label %111
141: ; preds = %119
br label %142
142: ; preds = %47, %141, %109, %77, %49
ret void
}

LLVM IR (-O2):
@__const.c_getmom.cldmom = [299 x double] [double 2.544000e+00, double 3.883000e+00, double 4.568000e+00, double 5.235000e+00, double 5.887000e+00, double 6.457000e+00, double 7.177000e+00, double 7.859000e+00, double 0x4020FCED916872B0, double 9.286000e+00, double 0x4023B645A1CAC083, double 1.061500e+01, double 1.122900e+01, double 1.185100e+01, double 1.250300e+01, double 1.305800e+01, double 1.362600e+01, double 1.420900e+01, double 1.466000e+01, double 1.523100e+01, double 1.564100e+01, double 1.612600e+01, double 1.653900e+01, double 1.693400e+01, double 1.732500e+01, double 1.767300e+01, double 1.799900e+01, double 1.832900e+01, double 1.858800e+01, double 1.888500e+01, double 1.910300e+01, double 1.934500e+01, double 1.953700e+01, double 1.972100e+01, double 1.988400e+01, double 2.002400e+01, double 2.014500e+01, double 2.025100e+01, double 2.033000e+01, double 2.040100e+01, double 2.044400e+01, double 2.047700e+01, double 2.048900e+01, double 2.048300e+01, double 2.046700e+01, double 2.042700e+01, double 2.038200e+01, double 2.031000e+01, double 2.023600e+01, double 2.013600e+01, double 2.003600e+01, double 1.990900e+01, double 1.978500e+01, double 1.963200e+01, double 1.948600e+01, double 1.931100e+01, double 1.914500e+01, double 1.894900e+01, double 1.876400e+01, double 1.855100e+01, double 1.834800e+01, double 1.811900e+01, double 1.790100e+01, double 1.765900e+01, double 1.742800e+01, double 1.717400e+01, double 1.693100e+01, double 1.666800e+01, double 1.641500e+01, double 1.614400e+01, double 1.588300e+01, double 1.560600e+01, double 1.533800e+01, double 1.505800e+01, double 1.478400e+01, double 1.450100e+01, double 1.422500e+01, double 1.394100e+01, double 1.366200e+01, double 1.337800e+01, double 1.309800e+01, double 1.281600e+01, double 1.253600e+01, double 1.225700e+01, double 1.197800e+01, double 1.170300e+01, double 1.142700e+01, double 1.115600e+01, double 1.088400e+01, double 1.061800e+01, double 1.035000e+01, double 1.009000e+01, double 0x4023A76C8B439581, double 0x402325E353F7CED9, double 9.318000e+00, double 0x402224DD2F1A9FBE, double 0x4021A4DD2F1A9FBE, double 0x40212B020C49BA5E, double 0x4020AE147AE147AE, double 8.110000e+00, double 0x401F7EF9DB22D0E5, double 7.652000e+00, double 7.424000e+00, double 7.211000e+00, double 6.990000e+00, double 6.785000e+00, double 6.573000e+00, double 6.377000e+00, double 6.173000e+00, double 5.986000e+00, double 5.790000e+00, double 5.612000e+00, double 5.424000e+00, double 5.255000e+00, double 5.075000e+00, double 4.915000e+00, double 4.744000e+00, double 4.592000e+00, double 4.429000e+00, double 4.285000e+00, double 4.130000e+00, double 3.994000e+00, double 3.847000e+00, double 3.719000e+00, double 3.580000e+00, double 3.459000e+00, double 3.327000e+00, double 3.214000e+00, double 3.090000e+00, double 2.983000e+00, double 2.866000e+00, double 2.766000e+00, double 2.656000e+00, double 2.562000e+00, double 2.459000e+00, double 2.372000e+00, double 2.274000e+00, double 2.193000e+00, double 2.102000e+00, double 2.025000e+00, double 1.940000e+00, double 1.869000e+00, double 1.790000e+00, double 1.723000e+00, double 1.649000e+00, double 1.588000e+00, double 1.518000e+00, double 1.461000e+00, double 1.397000e+00, double 1.344000e+00, double 1.284000e+00, double 1.235000e+00, double 1.179000e+00, double 1.134000e+00, double 1.082000e+00, double 1.040000e+00, double 0x3FEFBE76C8B43958, double 0x3FEE872B020C49BA, double 9.090000e-01, double 0x3FEBEF9DB22D0E56, double 8.320000e-01, double 7.990000e-01, double 7.620000e-01, double 7.310000e-01, double 0x3FE645A1CAC08312, double 6.680000e-01, double 6.360000e-01, double 6.100000e-01, double 5.810000e-01, double 5.570000e-01, double 5.300000e-01, double 5.080000e-01, double 4.830000e-01, double 4.630000e-01, double 4.400000e-01, double 4.220000e-01, double 4.010000e-01, double 3.840000e-01, double 3.640000e-01, double 3.490000e-01, double 3.310000e-01, double 3.170000e-01, double 3.010000e-01, double 2.880000e-01, double 2.730000e-01, double 2.620000e-01, double 2.480000e-01, double 2.380000e-01, double 2.250000e-01, double 2.150000e-01, double 2.040000e-01, double 1.950000e-01, double 1.850000e-01, double 1.770000e-01, double 1.670000e-01, double 1.600000e-01, double 1.510000e-01, double 1.450000e-01, double 1.370000e-01, double 1.310000e-01, double 1.240000e-01, double 1.180000e-01, double 1.120000e-01, double 1.070000e-01, double 1.010000e-01, double 9.700000e-02, double 0x3FB74BC6A7EF9DB2, double 0x3FB645A1CAC08312, double 8.200000e-02, double 7.900000e-02, double 0x3FB2F1A9FBE76C8B, double 0x3FB22D0E56041893, double 6.700000e-02, double 6.400000e-02, double 6.000000e-02, double 5.700000e-02, double 5.400000e-02, double 5.200000e-02, double 4.900000e-02, double 4.700000e-02, double 4.400000e-02, double 4.200000e-02, double 3.900000e-02, double 3.800000e-02, double 3.500000e-02, double 3.400000e-02, double 3.200000e-02, double 3.000000e-02, double 2.900000e-02, double 2.700000e-02, double 2.600000e-02, double 2.400000e-02, double 2.300000e-02, double 2.200000e-02, double 2.100000e-02, double 2.000000e-02, double 1.800000e-02, double 1.800000e-02, double 1.700000e-02, double 1.600000e-02, double 1.500000e-02, double 1.400000e-02, double 1.300000e-02, double 1.300000e-02, double 1.200000e-02, double 1.100000e-02, double 1.100000e-02, double 1.000000e-02, double 0x3F826E978D4FDF3B, double 0x3F826E978D4FDF3B, double 8.000000e-03, double 8.000000e-03, double 8.000000e-03, double 7.000000e-03, double 7.000000e-03, double 6.000000e-03, double 6.000000e-03, double 6.000000e-03, double 5.000000e-03, double 5.000000e-03, double 5.000000e-03, double 5.000000e-03, double 4.000000e-03, double 4.000000e-03, double 4.000000e-03, double 4.000000e-03, double 3.000000e-03, double 3.000000e-03, double 3.000000e-03, double 3.000000e-03, double 3.000000e-03, double 3.000000e-03, double 2.000000e-03, double 2.000000e-03, double 2.000000e-03, double 2.000000e-03, double 2.000000e-03, double 2.000000e-03, double 2.000000e-03, double 2.000000e-03, double 2.000000e-03, double 1.000000e-03, double 1.000000e-03, double 1.000000e-03, double 1.000000e-03, double 1.000000e-03, double 1.000000e-03, double 1.000000e-03, double 1.000000e-03, double 1.000000e-03, double 1.000000e-03, double 1.000000e-03, double 1.000000e-03, double 1.000000e-03, double 1.000000e-03, double 1.000000e-03, double 1.000000e-03, double 1.000000e-03, double 1.000000e-03]
@__const.c_getmom.hazelm = [82 x double] [double 2.412600e+00, double 3.230470e+00, double 3.372960e+00, double 3.231500e+00, double 2.893500e+00, double 2.495940e+00, double 2.113610e+00, double 1.748120e+00, double 1.446920e+00, double 1.177140e+00, double 9.664300e-01, double 7.823700e-01, double 6.411400e-01, double 5.196600e-01, double 4.256300e-01, double 3.468800e-01, double 2.835100e-01, double 2.331700e-01, double 1.896300e-01, double 1.578800e-01, double 1.273900e-01, double 1.076200e-01, double 8.597000e-02, double 7.381000e-02, double 5.828000e-02, double 5.089000e-02, double 3.971000e-02, double 3.524000e-02, double 2.720000e-02, double 2.451000e-02, double 1.874000e-02, double 1.711000e-02, double 1.298000e-02, double 1.198000e-02, double 0x3F82839042D8C2A4, double 8.410000e-03, double 6.340000e-03, double 5.920000e-03, double 4.460000e-03, double 4.180000e-03, double 3.160000e-03, double 2.960000e-03, double 2.250000e-03, double 2.100000e-03, double 1.600000e-03, double 1.500000e-03, double 1.150000e-03, double 1.070000e-03, double 0x3F4ADEA897635E74, double 7.700000e-04, double 5.900000e-04, double 5.500000e-04, double 4.300000e-04, double 4.000000e-04, double 3.100000e-04, double 2.900000e-04, double 2.300000e-04, double 2.100000e-04, double 1.700000e-04, double 1.500000e-04, double 1.200000e-04, double 1.100000e-04, double 9.000000e-05, double 8.000000e-05, double 6.000000e-05, double 6.000000e-05, double 5.000000e-05, double 4.000000e-05, double 4.000000e-05, double 3.000000e-05, double 3.000000e-05, double 2.000000e-05, double 2.000000e-05, double 2.000000e-05, double 1.000000e-05, double 1.000000e-05, double 1.000000e-05, double 1.000000e-05, double 1.000000e-05, double 1.000000e-05, double 1.000000e-05, double 1.000000e-05]
@.str = [33 x i8] c"getmom--bad input variable iphas\00"
@.str.1 = [32 x i8] c"getmom--bad input variable nmom\00"
@.str.2 = [30 x i8] c"getmom--bad input variable gg\00"
define void @c_getmom(i32 %0, double %1, i32 %2, double* nocapture writeonly %3) {
%5 = add i32 %0, -6
%6 = icmp ult i32 %5, -5
br i1 %6, label %7, label %9
7: ; preds = %4
%8 = tail call i32 @c_errmsg(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0), i32 1)
br label %9
9: ; preds = %4, %7
%10 = icmp slt i32 %2, 2
br i1 %10, label %11, label %13
11: ; preds = %9
%12 = tail call i32 @c_errmsg(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.1, i64 0, i64 0), i32 1)
store double 1.000000e+00, double* %3
br label %19
13: ; preds = %9
store double 1.000000e+00, double* %3
%14 = getelementptr double, double* %3, i64 1
%15 = bitcast double* %14 to i8*
%16 = add nsw i32 %2, -1
%17 = zext i32 %16 to i64
%18 = shl nuw nsw i64 %17, 3
br label %19
19: ; preds = %11, %13
switch i32 %0, label %241 [
i32 2, label %158
i32 3, label %160
i32 4, label %89
i32 5, label %20
]
20: ; preds = %19
%21 = icmp slt i32 %2, 298
%22 = select i1 %21, i32 %2, i32 298
%23 = icmp slt i32 %22, 1
br i1 %23, label %241, label %24
24: ; preds = %20
%25 = add nuw nsw i32 %22, 1
%26 = zext i32 %25 to i64
%27 = add nsw i64 %26, -1
%28 = icmp ult i64 %27, 2
br i1 %28, label %87, label %29
29: ; preds = %24
%30 = and i64 %27, -2
%31 = or i64 %27, 1
%32 = add nsw i64 %30, -2
%33 = lshr exact i64 %32, 1
%34 = add nuw i64 %33, 1
%35 = and i64 %34, 1
%36 = icmp eq i64 %32, 0
br i1 %36, label %73, label %37
37: ; preds = %29
%38 = and i64 %34, -2
br label %39
39: ; preds = %39, %37
%40 = phi i64 [ 0, %37 ], [ %65, %39 ]
%41 = phi <2 x i32> [ <i32 1, i32 2>, %37 ], [ %66, %39 ]
%42 = phi i64 [ 0, %37 ], [ %67, %39 ]
%43 = or i64 %40, 1
%44 = getelementptr inbounds [299 x double], [299 x double]* @__const.c_getmom.cldmom, i64 0, i64 %40
%45 = bitcast double* %44 to <2 x double>*
%46 = load <2 x double>, <2 x double>* %45
%47 = shl <2 x i32> %41, <i32 1, i32 1>
%48 = or <2 x i32> %47, <i32 1, i32 1>
%49 = sitofp <2 x i32> %48 to <2 x double>
%50 = fdiv <2 x double> %46, %49
%51 = getelementptr inbounds double, double* %3, i64 %43
%52 = bitcast double* %51 to <2 x double>*
store <2 x double> %50, <2 x double>* %52
%53 = or i64 %40, 2
%54 = or i64 %40, 3
%55 = getelementptr inbounds [299 x double], [299 x double]* @__const.c_getmom.cldmom, i64 0, i64 %53
%56 = bitcast double* %55 to <2 x double>*
%57 = load <2 x double>, <2 x double>* %56
%58 = shl <2 x i32> %41, <i32 1, i32 1>
%59 = add <2 x i32> %58, <i32 4, i32 4>
%60 = or <2 x i32> %59, <i32 1, i32 1>
%61 = sitofp <2 x i32> %60 to <2 x double>
%62 = fdiv <2 x double> %57, %61
%63 = getelementptr inbounds double, double* %3, i64 %54
%64 = bitcast double* %63 to <2 x double>*
store <2 x double> %62, <2 x double>* %64
%65 = add nuw i64 %40, 4
%66 = add <2 x i32> %41, <i32 4, i32 4>
%67 = add nuw i64 %42, 2
%68 = icmp eq i64 %67, %38
br i1 %68, label %69, label %39
69: ; preds = %39
%70 = shl <2 x i32> %66, <i32 1, i32 1>
%71 = or <2 x i32> %70, <i32 1, i32 1>
%72 = sitofp <2 x i32> %71 to <2 x double>
br label %73
73: ; preds = %69, %29
%74 = phi i64 [ 0, %29 ], [ %65, %69 ]
%75 = phi <2 x double> [ <double 3.000000e+00, double 5.000000e+00>, %29 ], [ %72, %69 ]
%76 = icmp eq i64 %35, 0
br i1 %76, label %85, label %77
77: ; preds = %73
%78 = or i64 %74, 1
%79 = getelementptr inbounds [299 x double], [299 x double]* @__const.c_getmom.cldmom, i64 0, i64 %74
%80 = bitcast double* %79 to <2 x double>*
%81 = load <2 x double>, <2 x double>* %80
%82 = fdiv <2 x double> %81, %75
%83 = getelementptr inbounds double, double* %3, i64 %78
%84 = bitcast double* %83 to <2 x double>*
store <2 x double> %82, <2 x double>* %84
br label %85
85: ; preds = %73, %77
%86 = icmp eq i64 %27, %30
br i1 %86, label %241, label %87
87: ; preds = %24, %85
%88 = phi i64 [ 1, %24 ], [ %31, %85 ]
br label %215
89: ; preds = %19
%90 = icmp slt i32 %2, 82
%91 = select i1 %90, i32 %2, i32 82
%92 = icmp slt i32 %91, 1
br i1 %92, label %241, label %93
93: ; preds = %89
%94 = add nuw nsw i32 %91, 1
%95 = zext i32 %94 to i64
%96 = add nsw i64 %95, -1
%97 = icmp ult i64 %96, 2
br i1 %97, label %156, label %98
98: ; preds = %93
%99 = and i64 %96, -2
%100 = or i64 %96, 1
%101 = add nsw i64 %99, -2
%102 = lshr exact i64 %101, 1
%103 = add nuw i64 %102, 1
%104 = and i64 %103, 1
%105 = icmp eq i64 %101, 0
br i1 %105, label %142, label %106
106: ; preds = %98
%107 = and i64 %103, -2
br label %108
108: ; preds = %108, %106
%109 = phi i64 [ 0, %106 ], [ %134, %108 ]
%110 = phi <2 x i32> [ <i32 1, i32 2>, %106 ], [ %135, %108 ]
%111 = phi i64 [ 0, %106 ], [ %136, %108 ]
%112 = or i64 %109, 1
%113 = getelementptr inbounds [82 x double], [82 x double]* @__const.c_getmom.hazelm, i64 0, i64 %109
%114 = bitcast double* %113 to <2 x double>*
%115 = load <2 x double>, <2 x double>* %114
%116 = shl <2 x i32> %110, <i32 1, i32 1>
%117 = or <2 x i32> %116, <i32 1, i32 1>
%118 = sitofp <2 x i32> %117 to <2 x double>
%119 = fdiv <2 x double> %115, %118
%120 = getelementptr inbounds double, double* %3, i64 %112
%121 = bitcast double* %120 to <2 x double>*
store <2 x double> %119, <2 x double>* %121
%122 = or i64 %109, 2
%123 = or i64 %109, 3
%124 = getelementptr inbounds [82 x double], [82 x double]* @__const.c_getmom.hazelm, i64 0, i64 %122
%125 = bitcast double* %124 to <2 x double>*
%126 = load <2 x double>, <2 x double>* %125
%127 = shl <2 x i32> %110, <i32 1, i32 1>
%128 = add <2 x i32> %127, <i32 4, i32 4>
%129 = or <2 x i32> %128, <i32 1, i32 1>
%130 = sitofp <2 x i32> %129 to <2 x double>
%131 = fdiv <2 x double> %126, %130
%132 = getelementptr inbounds double, double* %3, i64 %123
%133 = bitcast double* %132 to <2 x double>*
store <2 x double> %131, <2 x double>* %133
%134 = add nuw i64 %109, 4
%135 = add <2 x i32> %110, <i32 4, i32 4>
%136 = add nuw i64 %111, 2
%137 = icmp eq i64 %136, %107
br i1 %137, label %138, label %108
138: ; preds = %108
%139 = shl <2 x i32> %135, <i32 1, i32 1>
%140 = or <2 x i32> %139, <i32 1, i32 1>
%141 = sitofp <2 x i32> %140 to <2 x double>
br label %142
142: ; preds = %138, %98
%143 = phi i64 [ 0, %98 ], [ %134, %138 ]
%144 = phi <2 x double> [ <double 3.000000e+00, double 5.000000e+00>, %98 ], [ %141, %138 ]
%145 = icmp eq i64 %104, 0
br i1 %145, label %154, label %146
146: ; preds = %142
%147 = or i64 %143, 1
%148 = getelementptr inbounds [82 x double], [82 x double]* @__const.c_getmom.hazelm, i64 0, i64 %143
%149 = bitcast double* %148 to <2 x double>*
%150 = load <2 x double>, <2 x double>* %149
%151 = fdiv <2 x double> %150, %144
%152 = getelementptr inbounds double, double* %3, i64 %147
%153 = bitcast double* %152 to <2 x double>*
store <2 x double> %151, <2 x double>* %153
br label %154
154: ; preds = %142, %146
%155 = icmp eq i64 %96, %99
br i1 %155, label %241, label %156
156: ; preds = %93, %154
%157 = phi i64 [ 1, %93 ], [ %100, %154 ]
br label %202
158: ; preds = %19
%159 = getelementptr inbounds double, double* %3, i64 2
store double 1.000000e-01, double* %159
br label %241
160: ; preds = %19
%161 = fcmp ole double %1, -1.000000e+00
%162 = fcmp oge double %1, 1.000000e+00
%163 = or i1 %161, %162
br i1 %163, label %164, label %166
164: ; preds = %160
%165 = tail call i32 @c_errmsg(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.2, i64 0, i64 0), i32 1)
br label %166
166: ; preds = %160, %164
%167 = icmp slt i32 %2, 1
br i1 %167, label %241, label %168
168: ; preds = %166
%169 = add nuw i32 %2, 1
%170 = zext i32 %169 to i64
%171 = add nsw i64 %170, -1
%172 = add nsw i64 %170, -2
%173 = and i64 %171, 3
%174 = icmp ult i64 %172, 3
br i1 %174, label %228, label %175
175: ; preds = %168
%176 = and i64 %171, -4
br label %177
177: ; preds = %177, %175
%178 = phi i64 [ 1, %175 ], [ %199, %177 ]
%179 = phi i64 [ 0, %175 ], [ %200, %177 ]
%180 = trunc i64 %178 to i32
%181 = sitofp i32 %180 to double
%182 = tail call double @pow(double %1, double %181)
%183 = getelementptr inbounds double, double* %3, i64 %178
store double %182, double* %183
%184 = add nuw nsw i64 %178, 1
%185 = trunc i64 %184 to i32
%186 = sitofp i32 %185 to double
%187 = tail call double @pow(double %1, double %186)
%188 = getelementptr inbounds double, double* %3, i64 %184
store double %187, double* %188
%189 = add nuw nsw i64 %178, 2
%190 = trunc i64 %189 to i32
%191 = sitofp i32 %190 to double
%192 = tail call double @pow(double %1, double %191)
%193 = getelementptr inbounds double, double* %3, i64 %189
store double %192, double* %193
%194 = add nuw nsw i64 %178, 3
%195 = trunc i64 %194 to i32
%196 = sitofp i32 %195 to double
%197 = tail call double @pow(double %1, double %196)
%198 = getelementptr inbounds double, double* %3, i64 %194
store double %197, double* %198
%199 = add nuw nsw i64 %178, 4
%200 = add i64 %179, 4
%201 = icmp eq i64 %200, %176
br i1 %201, label %228, label %177
202: ; preds = %156, %202
%203 = phi i64 [ %213, %202 ], [ %157, %156 ]
%204 = add nsw i64 %203, -1
%205 = getelementptr inbounds [82 x double], [82 x double]* @__const.c_getmom.hazelm, i64 0, i64 %204
%206 = load double, double* %205
%207 = trunc i64 %203 to i32
%208 = shl i32 %207, 1
%209 = or i32 %208, 1
%210 = sitofp i32 %209 to double
%211 = fdiv double %206, %210
%212 = getelementptr inbounds double, double* %3, i64 %203
store double %211, double* %212
%213 = add nuw nsw i64 %203, 1
%214 = icmp eq i64 %213, %95
br i1 %214, label %241, label %202
215: ; preds = %87, %215
%216 = phi i64 [ %226, %215 ], [ %88, %87 ]
%217 = add nsw i64 %216, -1
%218 = getelementptr inbounds [299 x double], [299 x double]* @__const.c_getmom.cldmom, i64 0, i64 %217
%219 = load double, double* %218
%220 = trunc i64 %216 to i32
%221 = shl i32 %220, 1
%222 = or i32 %221, 1
%223 = sitofp i32 %222 to double
%224 = fdiv double %219, %223
%225 = getelementptr inbounds double, double* %3, i64 %216
store double %224, double* %225
%226 = add nuw nsw i64 %216, 1
%227 = icmp eq i64 %226, %26
br i1 %227, label %241, label %215
228: ; preds = %177, %168
%229 = phi i64 [ 1, %168 ], [ %199, %177 ]
%230 = icmp eq i64 %173, 0
br i1 %230, label %241, label %231
231: ; preds = %228, %231
%232 = phi i64 [ %238, %231 ], [ %229, %228 ]
%233 = phi i64 [ %239, %231 ], [ 0, %228 ]
%234 = trunc i64 %232 to i32
%235 = sitofp i32 %234 to double
%236 = tail call double @pow(double %1, double %235)
%237 = getelementptr inbounds double, double* %3, i64 %232
store double %236, double* %237
%238 = add nuw nsw i64 %232, 1
%239 = add i64 %233, 1
%240 = icmp eq i64 %239, %173
br i1 %240, label %241, label %231
241: ; preds = %215, %202, %228, %231, %85, %154, %20, %89, %166, %19, %158
ret void
}