#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*/ isinf(double);
int /*<<< orphan*/ isnan(double);
double sqrt(double);
double stddev_sysrem(int, double *);
void get_magave_std_sysrem(double **mag, double **sig, double *mag_ave,
                           int numLC, int numJD, double sigma_clip1,
                           int useweights) {
  int j, k, num;
  double tempmean, std_val, stdval2;
  for (j = 0; j < numLC; j++) {
    mag_ave[j] = 0.0;
    tempmean = 0.0;
    std_val = stddev_sysrem(numJD, mag[j]);
    num = 0;
    for (k = 0; k < numJD; k++)
      if (!isnan(mag[j][k]) && !isinf(mag[j][k]))
        num++;
    for (k = 0; k < numJD; k++)
      if (!isnan(mag[j][k]) && !isinf(mag[j][k]))
        tempmean += mag[j][k] / ((double)num);
    num = 0;
    for (k = 0; k < numJD; k++)
      if (!isnan(mag[j][k]) && !isinf(mag[j][k]) &&
          (((mag[j][k] - tempmean) > 0
                ? (mag[j][k] - tempmean)
                : (-(mag[j][k] - tempmean))) < sigma_clip1 * std_val ||
           sigma_clip1 < 0))
        num++;
    stdval2 = 0.;
    for (k = 0; k < numJD; k++)
      if (!isnan(mag[j][k]) && !isinf(mag[j][k]) &&
          (((mag[j][k] - tempmean) > 0
                ? (mag[j][k] - tempmean)
                : (-(mag[j][k] - tempmean))) < sigma_clip1 * std_val ||
           sigma_clip1 < 0)) {
        mag_ave[j] += mag[j][k] / ((double)num);
        stdval2 += mag[j][k] * mag[j][k] / ((double)num);
      }
    stdval2 = sqrt(stdval2 - (mag_ave[j] * mag_ave[j]));
    if (!useweights) {
      for (k = 0; k < numJD; k++)
        sig[j][k] = 1.;
    } else if (useweights == 1) {
      for (k = 0; k < numJD; k++)
        sig[j][k] = stdval2;
    }
  }
}


x86 assembly (clang, -O0):
<get_magave_std_sysrem>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    %r8d,-0x20(%rbp)
movsd  %xmm0,-0x28(%rbp)
mov    %r9d,-0x2c(%rbp)
movl   $0x0,-0x30(%rbp)
mov    -0x30(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jge    165c <get_magave_std_sysrem+0x51c>
mov    -0x18(%rbp),%rax
movslq -0x30(%rbp),%rcx
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x40(%rbp)
mov    -0x20(%rbp),%edi
mov    -0x8(%rbp),%rax
movslq -0x30(%rbp),%rcx
mov    (%rax,%rcx,8),%rsi
call   1030 <stddev_sysrem@plt>
movsd  %xmm0,-0x48(%rbp)
movl   $0x0,-0x38(%rbp)
movl   $0x0,-0x34(%rbp)
mov    -0x34(%rbp),%eax
cmp    -0x20(%rbp),%eax
jge    1224 <get_magave_std_sysrem+0xe4>
mov    -0x8(%rbp),%rax
movslq -0x30(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x34(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
call   1040 <isnan@plt>
cmp    $0x0,%eax
jne    1211 <get_magave_std_sysrem+0xd1>
mov    -0x8(%rbp),%rax
movslq -0x30(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x34(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
call   1060 <isinf@plt>
cmp    $0x0,%eax
jne    1211 <get_magave_std_sysrem+0xd1>
mov    -0x38(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x38(%rbp)
jmp    1216 <get_magave_std_sysrem+0xd6>
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    11b6 <get_magave_std_sysrem+0x76>
movl   $0x0,-0x34(%rbp)
mov    -0x34(%rbp),%eax
cmp    -0x20(%rbp),%eax
jge    12b8 <get_magave_std_sysrem+0x178>
mov    -0x8(%rbp),%rax
movslq -0x30(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x34(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
call   1040 <isnan@plt>
cmp    $0x0,%eax
jne    12a5 <get_magave_std_sysrem+0x165>
mov    -0x8(%rbp),%rax
movslq -0x30(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x34(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
call   1060 <isinf@plt>
cmp    $0x0,%eax
jne    12a5 <get_magave_std_sysrem+0x165>
mov    -0x8(%rbp),%rax
movslq -0x30(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x34(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
cvtsi2sdl -0x38(%rbp),%xmm1
divsd  %xmm1,%xmm0
addsd  -0x40(%rbp),%xmm0
movsd  %xmm0,-0x40(%rbp)
jmp    12aa <get_magave_std_sysrem+0x16a>
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    122b <get_magave_std_sysrem+0xeb>
movl   $0x0,-0x38(%rbp)
movl   $0x0,-0x34(%rbp)
mov    -0x34(%rbp),%eax
cmp    -0x20(%rbp),%eax
jge    13dc <get_magave_std_sysrem+0x29c>
mov    -0x8(%rbp),%rax
movslq -0x30(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x34(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
call   1040 <isnan@plt>
cmp    $0x0,%eax
jne    13c9 <get_magave_std_sysrem+0x289>
mov    -0x8(%rbp),%rax
movslq -0x30(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x34(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
call   1060 <isinf@plt>
cmp    $0x0,%eax
jne    13c9 <get_magave_std_sysrem+0x289>
mov    -0x8(%rbp),%rax
movslq -0x30(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x34(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
subsd  -0x40(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jbe    1363 <get_magave_std_sysrem+0x223>
mov    -0x8(%rbp),%rax
movslq -0x30(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x34(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
subsd  -0x40(%rbp),%xmm0
movsd  %xmm0,-0x58(%rbp)
jmp    1399 <get_magave_std_sysrem+0x259>
mov    -0x8(%rbp),%rax
movslq -0x30(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x34(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
subsd  -0x40(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  -0x58(%rbp),%xmm1
movsd  -0x28(%rbp),%xmm0
mulsd  -0x48(%rbp),%xmm0
ucomisd %xmm1,%xmm0
ja     13c0 <get_magave_std_sysrem+0x280>
xorps  %xmm0,%xmm0
ucomisd -0x28(%rbp),%xmm0
jbe    13c9 <get_magave_std_sysrem+0x289>
mov    -0x38(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x38(%rbp)
jmp    13ce <get_magave_std_sysrem+0x28e>
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    12c6 <get_magave_std_sysrem+0x186>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x50(%rbp)
movl   $0x0,-0x34(%rbp)
mov    -0x34(%rbp),%eax
cmp    -0x20(%rbp),%eax
jge    1565 <get_magave_std_sysrem+0x425>
mov    -0x8(%rbp),%rax
movslq -0x30(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x34(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
call   1040 <isnan@plt>
cmp    $0x0,%eax
jne    1552 <get_magave_std_sysrem+0x412>
mov    -0x8(%rbp),%rax
movslq -0x30(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x34(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
call   1060 <isinf@plt>
cmp    $0x0,%eax
jne    1552 <get_magave_std_sysrem+0x412>
mov    -0x8(%rbp),%rax
movslq -0x30(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x34(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
subsd  -0x40(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jbe    1488 <get_magave_std_sysrem+0x348>
mov    -0x8(%rbp),%rax
movslq -0x30(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x34(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
subsd  -0x40(%rbp),%xmm0
movsd  %xmm0,-0x60(%rbp)
jmp    14be <get_magave_std_sysrem+0x37e>
mov    -0x8(%rbp),%rax
movslq -0x30(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x34(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
subsd  -0x40(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  -0x60(%rbp),%xmm1
movsd  -0x28(%rbp),%xmm0
mulsd  -0x48(%rbp),%xmm0
ucomisd %xmm1,%xmm0
ja     14e5 <get_magave_std_sysrem+0x3a5>
xorps  %xmm0,%xmm0
ucomisd -0x28(%rbp),%xmm0
jbe    1552 <get_magave_std_sysrem+0x412>
mov    -0x8(%rbp),%rax
movslq -0x30(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x34(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
cvtsi2sdl -0x38(%rbp),%xmm1
divsd  %xmm1,%xmm0
mov    -0x18(%rbp),%rax
movslq -0x30(%rbp),%rcx
addsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x8(%rbp),%rax
movslq -0x30(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x34(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x8(%rbp),%rax
movslq -0x30(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x34(%rbp),%rcx
mulsd  (%rax,%rcx,8),%xmm0
cvtsi2sdl -0x38(%rbp),%xmm1
divsd  %xmm1,%xmm0
addsd  -0x50(%rbp),%xmm0
movsd  %xmm0,-0x50(%rbp)
jmp    1557 <get_magave_std_sysrem+0x417>
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    13eb <get_magave_std_sysrem+0x2ab>
movsd  -0x50(%rbp),%xmm1
mov    -0x18(%rbp),%rax
movslq -0x30(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x18(%rbp),%rax
movslq -0x30(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm2
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
call   1050 <sqrt@plt>
movsd  %xmm0,-0x50(%rbp)
cmpl   $0x0,-0x2c(%rbp)
jne    15fa <get_magave_std_sysrem+0x4ba>
movl   $0x0,-0x34(%rbp)
mov    -0x34(%rbp),%eax
cmp    -0x20(%rbp),%eax
jge    15f5 <get_magave_std_sysrem+0x4b5>
mov    -0x10(%rbp),%rax
movslq -0x30(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x34(%rbp),%rcx
movsd  0xa1e(%rip),%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    15be <get_magave_std_sysrem+0x47e>
jmp    1649 <get_magave_std_sysrem+0x509>
cmpl   $0x1,-0x2c(%rbp)
jne    1644 <get_magave_std_sysrem+0x504>
movl   $0x0,-0x34(%rbp)
mov    -0x34(%rbp),%eax
cmp    -0x20(%rbp),%eax
jge    163f <get_magave_std_sysrem+0x4ff>
movsd  -0x50(%rbp),%xmm0
mov    -0x10(%rbp),%rax
movslq -0x30(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x34(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    160b <get_magave_std_sysrem+0x4cb>
jmp    1644 <get_magave_std_sysrem+0x504>
jmp    1649 <get_magave_std_sysrem+0x509>
jmp    164e <get_magave_std_sysrem+0x50e>
mov    -0x30(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x30(%rbp)
jmp    116b <get_magave_std_sysrem+0x2b>
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_magave_std_sysrem>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x78,%rsp
movsd  %xmm0,0x20(%rsp)
mov    %r8d,0x4(%rsp)
mov    %rdx,0x28(%rsp)
mov    %rsi,0x48(%rsp)
test   %ecx,%ecx
jle    1772 <get_magave_std_sysrem+0x632>
mov    %r9d,%ebx
mov    %rdi,%r13
mov    %ecx,%eax
mov    %rax,0x70(%rsp)
mov    0x4(%rsp),%r15d
mov    %r15d,%eax
and    $0xfffffffc,%eax
mov    %rax,0x40(%rsp)
add    $0xfffffffffffffffc,%rax
mov    %rax,0x38(%rsp)
mov    %rax,%rcx
shr    $0x2,%rcx
add    $0x1,%rcx
mov    %ecx,%edx
and    $0x7,%edx
mov    %rcx,%rax
mov    %rcx,0x60(%rsp)
and    $0xfffffffffffffff8,%rcx
mov    %rcx,0x30(%rsp)
mov    %rdx,0x58(%rsp)
mov    %rdx,%rsi
shl    $0x5,%rsi
xor    %r14d,%r14d
mov    %rsi,0x50(%rsp)
jmp    11df <get_magave_std_sysrem+0x9f>
nopl   0x0(%rax,%rax,1)
add    $0x1,%r14
cmp    0x70(%rsp),%r14
je     1772 <get_magave_std_sysrem+0x632>
mov    0x28(%rsp),%rax
movq   $0x0,(%rax,%r14,8)
mov    0x0(%r13,%r14,8),%rsi
mov    0x4(%rsp),%ebp
mov    %ebp,%edi
call   1030 <stddev_sysrem@plt>
movsd  %xmm0,0x10(%rsp)
xorpd  %xmm0,%xmm0
test   %ebp,%ebp
jle    14b0 <get_magave_std_sysrem+0x370>
mov    %ebx,%r12d
xor    %ebx,%ebx
xor    %ebp,%ebp
jmp    1229 <get_magave_std_sysrem+0xe9>
nopw   0x0(%rax,%rax,1)
add    $0x1,%rbx
cmp    %rbx,%r15
je     1260 <get_magave_std_sysrem+0x120>
mov    0x0(%r13,%r14,8),%rax
movsd  (%rax,%rbx,8),%xmm0
call   1040 <isnan@plt>
test   %eax,%eax
jne    1220 <get_magave_std_sysrem+0xe0>
mov    0x0(%r13,%r14,8),%rax
movsd  (%rax,%rbx,8),%xmm0
call   1060 <isinf@plt>
cmp    $0x1,%eax
adc    $0x0,%ebp
jmp    1220 <get_magave_std_sysrem+0xe0>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
xorpd  %xmm0,%xmm0
cmpl   $0x0,0x4(%rsp)
mov    %r12d,%ebx
jle    14b0 <get_magave_std_sysrem+0x370>
xorps  %xmm0,%xmm0
cvtsi2sd %ebp,%xmm0
movsd  %xmm0,0x8(%rsp)
xorpd  %xmm0,%xmm0
movsd  %xmm0,0x18(%rsp)
xor    %ebp,%ebp
jmp    1299 <get_magave_std_sysrem+0x159>
nopl   (%rax)
add    $0x1,%rbp
cmp    %rbp,%r15
je     12f0 <get_magave_std_sysrem+0x1b0>
mov    0x0(%r13,%r14,8),%rax
movsd  (%rax,%rbp,8),%xmm0
call   1040 <isnan@plt>
test   %eax,%eax
jne    1290 <get_magave_std_sysrem+0x150>
mov    0x0(%r13,%r14,8),%rax
movsd  (%rax,%rbp,8),%xmm0
call   1060 <isinf@plt>
test   %eax,%eax
jne    1290 <get_magave_std_sysrem+0x150>
mov    0x0(%r13,%r14,8),%rax
movsd  (%rax,%rbp,8),%xmm0
divsd  0x8(%rsp),%xmm0
movsd  0x18(%rsp),%xmm1
addsd  %xmm0,%xmm1
movsd  %xmm1,0x18(%rsp)
jmp    1290 <get_magave_std_sysrem+0x150>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
xorpd  %xmm0,%xmm0
cmpl   $0x0,0x4(%rsp)
jle    14b0 <get_magave_std_sysrem+0x370>
movsd  0x10(%rsp),%xmm0
mulsd  0x20(%rsp),%xmm0
movsd  %xmm0,0x10(%rsp)
xor    %ebp,%ebp
xor    %r12d,%r12d
jmp    132d <get_magave_std_sysrem+0x1ed>
nopl   0x0(%rax,%rax,1)
add    $0x1,%rbp
cmp    %rbp,%r15
je     13b0 <get_magave_std_sysrem+0x270>
mov    0x0(%r13,%r14,8),%rax
movsd  (%rax,%rbp,8),%xmm0
call   1040 <isnan@plt>
test   %eax,%eax
jne    1320 <get_magave_std_sysrem+0x1e0>
mov    0x0(%r13,%r14,8),%rax
movsd  (%rax,%rbp,8),%xmm0
call   1060 <isinf@plt>
test   %eax,%eax
jne    1320 <get_magave_std_sysrem+0x1e0>
xorpd  %xmm0,%xmm0
ucomisd 0x20(%rsp),%xmm0
seta   %al
mov    0x0(%r13,%r14,8),%rcx
movsd  (%rcx,%rbp,8),%xmm0
subsd  0x18(%rsp),%xmm0
movapd %xmm0,%xmm1
xorpd  0xc84(%rip),%xmm1
xorpd  %xmm2,%xmm2
cmpltsd %xmm0,%xmm2
andpd  %xmm2,%xmm0
andnpd %xmm1,%xmm2
orpd   %xmm0,%xmm2
movsd  0x10(%rsp),%xmm0
ucomisd %xmm2,%xmm0
seta   %cl
or     %al,%cl
movzbl %cl,%eax
add    %eax,%r12d
jmp    1320 <get_magave_std_sysrem+0x1e0>
nopl   0x0(%rax,%rax,1)
cmpl   $0x0,0x4(%rsp)
xorpd  %xmm0,%xmm0
jle    14b0 <get_magave_std_sysrem+0x370>
xorps  %xmm0,%xmm0
cvtsi2sd %r12d,%xmm0
movsd  %xmm0,0x68(%rsp)
xorpd  %xmm0,%xmm0
xor    %r12d,%r12d
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
movsd  %xmm0,0x8(%rsp)
mov    0x0(%r13,%r14,8),%rax
movsd  (%rax,%r12,8),%xmm0
call   1040 <isnan@plt>
test   %eax,%eax
jne    1460 <get_magave_std_sysrem+0x320>
mov    0x0(%r13,%r14,8),%rax
movsd  (%rax,%r12,8),%xmm0
call   1060 <isinf@plt>
test   %eax,%eax
jne    1460 <get_magave_std_sysrem+0x320>
xorpd  %xmm0,%xmm0
ucomisd 0x20(%rsp),%xmm0
mov    0x0(%r13,%r14,8),%rax
movsd  (%rax,%r12,8),%xmm0
ja     1475 <get_magave_std_sysrem+0x335>
movapd %xmm0,%xmm1
subsd  0x18(%rsp),%xmm1
movapd %xmm1,%xmm2
xorpd  0xbc5(%rip),%xmm2
xorpd  %xmm3,%xmm3
cmpltsd %xmm1,%xmm3
andpd  %xmm3,%xmm1
andnpd %xmm2,%xmm3
orpd   %xmm1,%xmm3
movsd  0x10(%rsp),%xmm1
ucomisd %xmm3,%xmm1
ja     1475 <get_magave_std_sysrem+0x335>
nopl   0x0(%rax)
movsd  0x8(%rsp),%xmm0
add    $0x1,%r12
cmp    %r12,%r15
jne    13e0 <get_magave_std_sysrem+0x2a0>
jmp    14b0 <get_magave_std_sysrem+0x370>
movsd  0x68(%rsp),%xmm1
divsd  %xmm1,%xmm0
mov    0x28(%rsp),%rcx
addsd  (%rcx,%r14,8),%xmm0
movsd  %xmm0,(%rcx,%r14,8)
movsd  (%rax,%r12,8),%xmm0
mulsd  %xmm0,%xmm0
divsd  %xmm1,%xmm0
movsd  0x8(%rsp),%xmm1
addsd  %xmm0,%xmm1
movapd %xmm1,%xmm0
jmp    1466 <get_magave_std_sysrem+0x326>
xchg   %ax,%ax
mov    0x28(%rsp),%rax
movapd %xmm0,%xmm1
movsd  (%rax,%r14,8),%xmm0
mulsd  %xmm0,%xmm0
subsd  %xmm0,%xmm1
movapd %xmm1,%xmm0
ucomisd 0xb4d(%rip),%xmm1
jb     14e0 <get_magave_std_sysrem+0x3a0>
sqrtsd %xmm0,%xmm0
jmp    14e5 <get_magave_std_sysrem+0x3a5>
nopl   0x0(%rax,%rax,1)
call   1050 <sqrt@plt>
mov    0x50(%rsp),%rsi
movabs $0x3ff0000000000000,%rdi
test   %ebx,%ebx
je     1530 <get_magave_std_sysrem+0x3f0>
cmp    $0x1,%ebx
jne    11d0 <get_magave_std_sysrem+0x90>
cmpl   $0x0,0x4(%rsp)
jle    11d0 <get_magave_std_sysrem+0x90>
mov    0x48(%rsp),%rax
mov    (%rax,%r14,8),%rax
cmpl   $0x4,0x4(%rsp)
jae    1552 <get_magave_std_sysrem+0x412>
xor    %ecx,%ecx
jmp    1660 <get_magave_std_sysrem+0x520>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
cmpl   $0x0,0x4(%rsp)
jle    11d0 <get_magave_std_sysrem+0x90>
mov    0x48(%rsp),%rax
mov    (%rax,%r14,8),%rax
cmpl   $0x4,0x4(%rsp)
jae    1569 <get_magave_std_sysrem+0x429>
xor    %ecx,%ecx
jmp    1760 <get_magave_std_sysrem+0x620>
movapd %xmm0,%xmm1
unpcklpd %xmm0,%xmm1
cmpq   $0x1c,0x38(%rsp)
jae    1584 <get_magave_std_sysrem+0x444>
xor    %ecx,%ecx
jmp    1615 <get_magave_std_sysrem+0x4d5>
cmpq   $0x1c,0x38(%rsp)
jae    1673 <get_magave_std_sysrem+0x533>
xor    %ecx,%ecx
movapd 0xa91(%rip),%xmm0
jmp    1715 <get_magave_std_sysrem+0x5d5>
mov    0x30(%rsp),%rdx
xor    %ecx,%ecx
nopl   0x0(%rax,%rax,1)
movupd %xmm1,(%rax,%rcx,8)
movupd %xmm1,0x10(%rax,%rcx,8)
movupd %xmm1,0x20(%rax,%rcx,8)
movupd %xmm1,0x30(%rax,%rcx,8)
movupd %xmm1,0x40(%rax,%rcx,8)
movupd %xmm1,0x50(%rax,%rcx,8)
movupd %xmm1,0x60(%rax,%rcx,8)
movupd %xmm1,0x70(%rax,%rcx,8)
movupd %xmm1,0x80(%rax,%rcx,8)
movupd %xmm1,0x90(%rax,%rcx,8)
movupd %xmm1,0xa0(%rax,%rcx,8)
movupd %xmm1,0xb0(%rax,%rcx,8)
movupd %xmm1,0xc0(%rax,%rcx,8)
movupd %xmm1,0xd0(%rax,%rcx,8)
movupd %xmm1,0xe0(%rax,%rcx,8)
movupd %xmm1,0xf0(%rax,%rcx,8)
add    $0x20,%rcx
add    $0xfffffffffffffff8,%rdx
jne    1590 <get_magave_std_sysrem+0x450>
cmpq   $0x0,0x58(%rsp)
je     1644 <get_magave_std_sysrem+0x504>
lea    (%rax,%rcx,8),%rcx
add    $0x10,%rcx
xor    %edx,%edx
nopw   0x0(%rax,%rax,1)
movupd %xmm1,-0x10(%rcx,%rdx,1)
movupd %xmm1,(%rcx,%rdx,1)
add    $0x20,%rdx
cmp    %rdx,%rsi
jne    1630 <get_magave_std_sysrem+0x4f0>
mov    0x40(%rsp),%rdx
mov    %rdx,%rcx
cmp    %r15,%rdx
je     11d0 <get_magave_std_sysrem+0x90>
cs nopw 0x0(%rax,%rax,1)
nop
movsd  %xmm0,(%rax,%rcx,8)
add    $0x1,%rcx
cmp    %rcx,%r15
jne    1660 <get_magave_std_sysrem+0x520>
jmp    11d0 <get_magave_std_sysrem+0x90>
mov    0x30(%rsp),%rdx
xor    %ecx,%ecx
movapd 0x98e(%rip),%xmm0
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movupd %xmm0,(%rax,%rcx,8)
movupd %xmm0,0x10(%rax,%rcx,8)
movupd %xmm0,0x20(%rax,%rcx,8)
movupd %xmm0,0x30(%rax,%rcx,8)
movupd %xmm0,0x40(%rax,%rcx,8)
movupd %xmm0,0x50(%rax,%rcx,8)
movupd %xmm0,0x60(%rax,%rcx,8)
movupd %xmm0,0x70(%rax,%rcx,8)
movupd %xmm0,0x80(%rax,%rcx,8)
movupd %xmm0,0x90(%rax,%rcx,8)
movupd %xmm0,0xa0(%rax,%rcx,8)
movupd %xmm0,0xb0(%rax,%rcx,8)
movupd %xmm0,0xc0(%rax,%rcx,8)
movupd %xmm0,0xd0(%rax,%rcx,8)
movupd %xmm0,0xe0(%rax,%rcx,8)
movupd %xmm0,0xf0(%rax,%rcx,8)
add    $0x20,%rcx
add    $0xfffffffffffffff8,%rdx
jne    1690 <get_magave_std_sysrem+0x550>
testb  $0x7,0x60(%rsp)
je     1744 <get_magave_std_sysrem+0x604>
lea    (%rax,%rcx,8),%rcx
add    $0x10,%rcx
xor    %edx,%edx
cs nopw 0x0(%rax,%rax,1)
movupd %xmm0,-0x10(%rcx,%rdx,1)
movupd %xmm0,(%rcx,%rdx,1)
add    $0x20,%rdx
cmp    %rdx,%rsi
jne    1730 <get_magave_std_sysrem+0x5f0>
mov    0x40(%rsp),%rdx
mov    %rdx,%rcx
cmp    %r15,%rdx
je     11d0 <get_magave_std_sysrem+0x90>
cs nopw 0x0(%rax,%rax,1)
nop
mov    %rdi,(%rax,%rcx,8)
add    $0x1,%rcx
cmp    %rcx,%r15
jne    1760 <get_magave_std_sysrem+0x620>
jmp    11d0 <get_magave_std_sysrem+0x90>
add    $0x78,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define void @get_magave_std_sysrem(double** %0, double** %1, double* %2, i32 %3, i32 %4, double %5, i32 %6) {
%8 = alloca double**
%9 = alloca double**
%10 = alloca double*
%11 = alloca i32
%12 = alloca i32
%13 = alloca double
%14 = alloca i32
%15 = alloca i32
%16 = alloca i32
%17 = alloca i32
%18 = alloca double
%19 = alloca double
%20 = alloca double
store double** %0, double*** %8
store double** %1, double*** %9
store double* %2, double** %10
store i32 %3, i32* %11
store i32 %4, i32* %12
store double %5, double* %13
store i32 %6, i32* %14
store i32 0, i32* %15
br label %21
21: ; preds = %385, %7
%22 = load i32, i32* %15
%23 = load i32, i32* %11
%24 = icmp slt i32 %22, %23
br i1 %24, label %25, label %388
25: ; preds = %21
%26 = load double*, double** %10
%27 = load i32, i32* %15
%28 = sext i32 %27 to i64
%29 = getelementptr inbounds double, double* %26, i64 %28
store double 0.000000e+00, double* %29
store double 0.000000e+00, double* %18
%30 = load i32, i32* %12
%31 = load double**, double*** %8
%32 = load i32, i32* %15
%33 = sext i32 %32 to i64
%34 = getelementptr inbounds double*, double** %31, i64 %33
%35 = load double*, double** %34
%36 = call double @stddev_sysrem(i32 %30, double* %35)
store double %36, double* %19
store i32 0, i32* %17
store i32 0, i32* %16
br label %37
37: ; preds = %69, %25
%38 = load i32, i32* %16
%39 = load i32, i32* %12
%40 = icmp slt i32 %38, %39
br i1 %40, label %41, label %72
41: ; preds = %37
%42 = load double**, double*** %8
%43 = load i32, i32* %15
%44 = sext i32 %43 to i64
%45 = getelementptr inbounds double*, double** %42, i64 %44
%46 = load double*, double** %45
%47 = load i32, i32* %16
%48 = sext i32 %47 to i64
%49 = getelementptr inbounds double, double* %46, i64 %48
%50 = load double, double* %49
%51 = call i32 @isnan(double %50)
%52 = icmp ne i32 %51, 0
br i1 %52, label %68, label %53
53: ; preds = %41
%54 = load double**, double*** %8
%55 = load i32, i32* %15
%56 = sext i32 %55 to i64
%57 = getelementptr inbounds double*, double** %54, i64 %56
%58 = load double*, double** %57
%59 = load i32, i32* %16
%60 = sext i32 %59 to i64
%61 = getelementptr inbounds double, double* %58, i64 %60
%62 = load double, double* %61
%63 = call i32 @isinf(double %62)
%64 = icmp ne i32 %63, 0
br i1 %64, label %68, label %65
65: ; preds = %53
%66 = load i32, i32* %17
%67 = add nsw i32 %66, 1
store i32 %67, i32* %17
br label %68
68: ; preds = %65, %53, %41
br label %69
69: ; preds = %68
%70 = load i32, i32* %16
%71 = add nsw i32 %70, 1
store i32 %71, i32* %16
br label %37
72: ; preds = %37
store i32 0, i32* %16
br label %73
73: ; preds = %117, %72
%74 = load i32, i32* %16
%75 = load i32, i32* %12
%76 = icmp slt i32 %74, %75
br i1 %76, label %77, label %120
77: ; preds = %73
%78 = load double**, double*** %8
%79 = load i32, i32* %15
%80 = sext i32 %79 to i64
%81 = getelementptr inbounds double*, double** %78, i64 %80
%82 = load double*, double** %81
%83 = load i32, i32* %16
%84 = sext i32 %83 to i64
%85 = getelementptr inbounds double, double* %82, i64 %84
%86 = load double, double* %85
%87 = call i32 @isnan(double %86)
%88 = icmp ne i32 %87, 0
br i1 %88, label %116, label %89
89: ; preds = %77
%90 = load double**, double*** %8
%91 = load i32, i32* %15
%92 = sext i32 %91 to i64
%93 = getelementptr inbounds double*, double** %90, i64 %92
%94 = load double*, double** %93
%95 = load i32, i32* %16
%96 = sext i32 %95 to i64
%97 = getelementptr inbounds double, double* %94, i64 %96
%98 = load double, double* %97
%99 = call i32 @isinf(double %98)
%100 = icmp ne i32 %99, 0
br i1 %100, label %116, label %101
101: ; preds = %89
%102 = load double**, double*** %8
%103 = load i32, i32* %15
%104 = sext i32 %103 to i64
%105 = getelementptr inbounds double*, double** %102, i64 %104
%106 = load double*, double** %105
%107 = load i32, i32* %16
%108 = sext i32 %107 to i64
%109 = getelementptr inbounds double, double* %106, i64 %108
%110 = load double, double* %109
%111 = load i32, i32* %17
%112 = sitofp i32 %111 to double
%113 = fdiv double %110, %112
%114 = load double, double* %18
%115 = fadd double %114, %113
store double %115, double* %18
br label %116
116: ; preds = %101, %89, %77
br label %117
117: ; preds = %116
%118 = load i32, i32* %16
%119 = add nsw i32 %118, 1
store i32 %119, i32* %16
br label %73
120: ; preds = %73
store i32 0, i32* %17
store i32 0, i32* %16
br label %121
121: ; preds = %200, %120
%122 = load i32, i32* %16
%123 = load i32, i32* %12
%124 = icmp slt i32 %122, %123
br i1 %124, label %125, label %203
125: ; preds = %121
%126 = load double**, double*** %8
%127 = load i32, i32* %15
%128 = sext i32 %127 to i64
%129 = getelementptr inbounds double*, double** %126, i64 %128
%130 = load double*, double** %129
%131 = load i32, i32* %16
%132 = sext i32 %131 to i64
%133 = getelementptr inbounds double, double* %130, i64 %132
%134 = load double, double* %133
%135 = call i32 @isnan(double %134)
%136 = icmp ne i32 %135, 0
br i1 %136, label %199, label %137
137: ; preds = %125
%138 = load double**, double*** %8
%139 = load i32, i32* %15
%140 = sext i32 %139 to i64
%141 = getelementptr inbounds double*, double** %138, i64 %140
%142 = load double*, double** %141
%143 = load i32, i32* %16
%144 = sext i32 %143 to i64
%145 = getelementptr inbounds double, double* %142, i64 %144
%146 = load double, double* %145
%147 = call i32 @isinf(double %146)
%148 = icmp ne i32 %147, 0
br i1 %148, label %199, label %149
149: ; preds = %137
%150 = load double**, double*** %8
%151 = load i32, i32* %15
%152 = sext i32 %151 to i64
%153 = getelementptr inbounds double*, double** %150, i64 %152
%154 = load double*, double** %153
%155 = load i32, i32* %16
%156 = sext i32 %155 to i64
%157 = getelementptr inbounds double, double* %154, i64 %156
%158 = load double, double* %157
%159 = load double, double* %18
%160 = fsub double %158, %159
%161 = fcmp ogt double %160, 0.000000e+00
br i1 %161, label %162, label %174
162: ; preds = %149
%163 = load double**, double*** %8
%164 = load i32, i32* %15
%165 = sext i32 %164 to i64
%166 = getelementptr inbounds double*, double** %163, i64 %165
%167 = load double*, double** %166
%168 = load i32, i32* %16
%169 = sext i32 %168 to i64
%170 = getelementptr inbounds double, double* %167, i64 %169
%171 = load double, double* %170
%172 = load double, double* %18
%173 = fsub double %171, %172
br label %187
174: ; preds = %149
%175 = load double**, double*** %8
%176 = load i32, i32* %15
%177 = sext i32 %176 to i64
%178 = getelementptr inbounds double*, double** %175, i64 %177
%179 = load double*, double** %178
%180 = load i32, i32* %16
%181 = sext i32 %180 to i64
%182 = getelementptr inbounds double, double* %179, i64 %181
%183 = load double, double* %182
%184 = load double, double* %18
%185 = fsub double %183, %184
%186 = fneg double %185
br label %187
187: ; preds = %174, %162
%188 = phi double [ %173, %162 ], [ %186, %174 ]
%189 = load double, double* %13
%190 = load double, double* %19
%191 = fmul double %189, %190
%192 = fcmp olt double %188, %191
br i1 %192, label %196, label %193
193: ; preds = %187
%194 = load double, double* %13
%195 = fcmp olt double %194, 0.000000e+00
br i1 %195, label %196, label %199
196: ; preds = %193, %187
%197 = load i32, i32* %17
%198 = add nsw i32 %197, 1
store i32 %198, i32* %17
br label %199
199: ; preds = %196, %193, %137, %125
br label %200
200: ; preds = %199
%201 = load i32, i32* %16
%202 = add nsw i32 %201, 1
store i32 %202, i32* %16
br label %121
203: ; preds = %121
store double 0.000000e+00, double* %20
store i32 0, i32* %16
br label %204
204: ; preds = %323, %203
%205 = load i32, i32* %16
%206 = load i32, i32* %12
%207 = icmp slt i32 %205, %206
br i1 %207, label %208, label %326
208: ; preds = %204
%209 = load double**, double*** %8
%210 = load i32, i32* %15
%211 = sext i32 %210 to i64
%212 = getelementptr inbounds double*, double** %209, i64 %211
%213 = load double*, double** %212
%214 = load i32, i32* %16
%215 = sext i32 %214 to i64
%216 = getelementptr inbounds double, double* %213, i64 %215
%217 = load double, double* %216
%218 = call i32 @isnan(double %217)
%219 = icmp ne i32 %218, 0
br i1 %219, label %322, label %220
220: ; preds = %208
%221 = load double**, double*** %8
%222 = load i32, i32* %15
%223 = sext i32 %222 to i64
%224 = getelementptr inbounds double*, double** %221, i64 %223
%225 = load double*, double** %224
%226 = load i32, i32* %16
%227 = sext i32 %226 to i64
%228 = getelementptr inbounds double, double* %225, i64 %227
%229 = load double, double* %228
%230 = call i32 @isinf(double %229)
%231 = icmp ne i32 %230, 0
br i1 %231, label %322, label %232
232: ; preds = %220
%233 = load double**, double*** %8
%234 = load i32, i32* %15
%235 = sext i32 %234 to i64
%236 = getelementptr inbounds double*, double** %233, i64 %235
%237 = load double*, double** %236
%238 = load i32, i32* %16
%239 = sext i32 %238 to i64
%240 = getelementptr inbounds double, double* %237, i64 %239
%241 = load double, double* %240
%242 = load double, double* %18
%243 = fsub double %241, %242
%244 = fcmp ogt double %243, 0.000000e+00
br i1 %244, label %245, label %257
245: ; preds = %232
%246 = load double**, double*** %8
%247 = load i32, i32* %15
%248 = sext i32 %247 to i64
%249 = getelementptr inbounds double*, double** %246, i64 %248
%250 = load double*, double** %249
%251 = load i32, i32* %16
%252 = sext i32 %251 to i64
%253 = getelementptr inbounds double, double* %250, i64 %252
%254 = load double, double* %253
%255 = load double, double* %18
%256 = fsub double %254, %255
br label %270
257: ; preds = %232
%258 = load double**, double*** %8
%259 = load i32, i32* %15
%260 = sext i32 %259 to i64
%261 = getelementptr inbounds double*, double** %258, i64 %260
%262 = load double*, double** %261
%263 = load i32, i32* %16
%264 = sext i32 %263 to i64
%265 = getelementptr inbounds double, double* %262, i64 %264
%266 = load double, double* %265
%267 = load double, double* %18
%268 = fsub double %266, %267
%269 = fneg double %268
br label %270
270: ; preds = %257, %245
%271 = phi double [ %256, %245 ], [ %269, %257 ]
%272 = load double, double* %13
%273 = load double, double* %19
%274 = fmul double %272, %273
%275 = fcmp olt double %271, %274
br i1 %275, label %279, label %276
276: ; preds = %270
%277 = load double, double* %13
%278 = fcmp olt double %277, 0.000000e+00
br i1 %278, label %279, label %322
279: ; preds = %276, %270
%280 = load double**, double*** %8
%281 = load i32, i32* %15
%282 = sext i32 %281 to i64
%283 = getelementptr inbounds double*, double** %280, i64 %282
%284 = load double*, double** %283
%285 = load i32, i32* %16
%286 = sext i32 %285 to i64
%287 = getelementptr inbounds double, double* %284, i64 %286
%288 = load double, double* %287
%289 = load i32, i32* %17
%290 = sitofp i32 %289 to double
%291 = fdiv double %288, %290
%292 = load double*, double** %10
%293 = load i32, i32* %15
%294 = sext i32 %293 to i64
%295 = getelementptr inbounds double, double* %292, i64 %294
%296 = load double, double* %295
%297 = fadd double %296, %291
store double %297, double* %295
%298 = load double**, double*** %8
%299 = load i32, i32* %15
%300 = sext i32 %299 to i64
%301 = getelementptr inbounds double*, double** %298, i64 %300
%302 = load double*, double** %301
%303 = load i32, i32* %16
%304 = sext i32 %303 to i64
%305 = getelementptr inbounds double, double* %302, i64 %304
%306 = load double, double* %305
%307 = load double**, double*** %8
%308 = load i32, i32* %15
%309 = sext i32 %308 to i64
%310 = getelementptr inbounds double*, double** %307, i64 %309
%311 = load double*, double** %310
%312 = load i32, i32* %16
%313 = sext i32 %312 to i64
%314 = getelementptr inbounds double, double* %311, i64 %313
%315 = load double, double* %314
%316 = fmul double %306, %315
%317 = load i32, i32* %17
%318 = sitofp i32 %317 to double
%319 = fdiv double %316, %318
%320 = load double, double* %20
%321 = fadd double %320, %319
store double %321, double* %20
br label %322
322: ; preds = %279, %276, %220, %208
br label %323
323: ; preds = %322
%324 = load i32, i32* %16
%325 = add nsw i32 %324, 1
store i32 %325, i32* %16
br label %204
326: ; preds = %204
%327 = load double, double* %20
%328 = load double*, double** %10
%329 = load i32, i32* %15
%330 = sext i32 %329 to i64
%331 = getelementptr inbounds double, double* %328, i64 %330
%332 = load double, double* %331
%333 = load double*, double** %10
%334 = load i32, i32* %15
%335 = sext i32 %334 to i64
%336 = getelementptr inbounds double, double* %333, i64 %335
%337 = load double, double* %336
%338 = fneg double %332
%339 = call double @llvm.fmuladd.f64(double %338, double %337, double %327)
%340 = call double @sqrt(double %339)
store double %340, double* %20
%341 = load i32, i32* %14
%342 = icmp ne i32 %341, 0
br i1 %342, label %361, label %343
343: ; preds = %326
store i32 0, i32* %16
br label %344
344: ; preds = %357, %343
%345 = load i32, i32* %16
%346 = load i32, i32* %12
%347 = icmp slt i32 %345, %346
br i1 %347, label %348, label %360
348: ; preds = %344
%349 = load double**, double*** %9
%350 = load i32, i32* %15
%351 = sext i32 %350 to i64
%352 = getelementptr inbounds double*, double** %349, i64 %351
%353 = load double*, double** %352
%354 = load i32, i32* %16
%355 = sext i32 %354 to i64
%356 = getelementptr inbounds double, double* %353, i64 %355
store double 1.000000e+00, double* %356
br label %357
357: ; preds = %348
%358 = load i32, i32* %16
%359 = add nsw i32 %358, 1
store i32 %359, i32* %16
br label %344
360: ; preds = %344
br label %384
361: ; preds = %326
%362 = load i32, i32* %14
%363 = icmp eq i32 %362, 1
br i1 %363, label %364, label %383
364: ; preds = %361
store i32 0, i32* %16
br label %365
365: ; preds = %379, %364
%366 = load i32, i32* %16
%367 = load i32, i32* %12
%368 = icmp slt i32 %366, %367
br i1 %368, label %369, label %382
369: ; preds = %365
%370 = load double, double* %20
%371 = load double**, double*** %9
%372 = load i32, i32* %15
%373 = sext i32 %372 to i64
%374 = getelementptr inbounds double*, double** %371, i64 %373
%375 = load double*, double** %374
%376 = load i32, i32* %16
%377 = sext i32 %376 to i64
%378 = getelementptr inbounds double, double* %375, i64 %377
store double %370, double* %378
br label %379
379: ; preds = %369
%380 = load i32, i32* %16
%381 = add nsw i32 %380, 1
store i32 %381, i32* %16
br label %365
382: ; preds = %365
br label %383
383: ; preds = %382, %361
br label %384
384: ; preds = %383, %360
br label %385
385: ; preds = %384
%386 = load i32, i32* %15
%387 = add nsw i32 %386, 1
store i32 %387, i32* %15
br label %21
388: ; preds = %21
ret void
}

LLVM IR (-O2):
define void @get_magave_std_sysrem(double** nocapture %0, double** nocapture %1, double* nocapture %2, i32 %3, i32 %4, double %5, i32 %6) {
%8 = icmp sgt i32 %3, 0
br i1 %8, label %9, label %316
9: ; preds = %7
%10 = icmp sgt i32 %4, 0
%11 = fcmp olt double %5, 0.000000e+00
%12 = zext i32 %3 to i64
%13 = zext i32 %4 to i64
%14 = zext i32 %4 to i64
%15 = zext i32 %4 to i64
%16 = zext i32 %4 to i64
%17 = zext i32 %4 to i64
%18 = zext i32 %4 to i64
%19 = and i64 %13, 4294967292
%20 = add nsw i64 %19, -4
%21 = lshr exact i64 %20, 2
%22 = add nuw nsw i64 %21, 1
%23 = icmp ult i32 %4, 4
%24 = and i64 %13, 4294967292
%25 = and i64 %22, 7
%26 = icmp ult i64 %20, 28
%27 = and i64 %22, 9223372036854775800
%28 = icmp eq i64 %25, 0
%29 = icmp eq i64 %24, %13
%30 = icmp ult i32 %4, 4
%31 = and i64 %13, 4294967292
%32 = and i64 %22, 7
%33 = icmp ult i64 %20, 28
%34 = and i64 %22, 9223372036854775800
%35 = icmp eq i64 %32, 0
%36 = icmp eq i64 %31, %13
br label %37
37: ; preds = %9, %313
%38 = phi i64 [ 0, %9 ], [ %314, %313 ]
%39 = getelementptr inbounds double, double* %2, i64 %38
store double 0.000000e+00, double* %39
%40 = getelementptr inbounds double*, double** %0, i64 %38
%41 = load double*, double** %40
%42 = tail call double @stddev_sysrem(i32 %4, double* %41)
br i1 %10, label %46, label %163
43: ; preds = %62
br i1 %10, label %44, label %163
44: ; preds = %43
%45 = sitofp i32 %63 to double
br label %69
46: ; preds = %37, %62
%47 = phi i64 [ %64, %62 ], [ 0, %37 ]
%48 = phi i32 [ %63, %62 ], [ 0, %37 ]
%49 = load double*, double** %40
%50 = getelementptr inbounds double, double* %49, i64 %47
%51 = load double, double* %50
%52 = tail call i32 @isnan(double %51)
%53 = icmp eq i32 %52, 0
br i1 %53, label %54, label %62
54: ; preds = %46
%55 = load double*, double** %40
%56 = getelementptr inbounds double, double* %55, i64 %47
%57 = load double, double* %56
%58 = tail call i32 @isinf(double %57)
%59 = icmp eq i32 %58, 0
%60 = zext i1 %59 to i32
%61 = add nsw i32 %48, %60
br label %62
62: ; preds = %54, %46
%63 = phi i32 [ %48, %46 ], [ %61, %54 ]
%64 = add nuw nsw i64 %47, 1
%65 = icmp eq i64 %64, %13
br i1 %65, label %43, label %46
66: ; preds = %89
br i1 %10, label %67, label %163
67: ; preds = %66
%68 = fmul double %42, %5
br label %97
69: ; preds = %44, %89
%70 = phi i64 [ 0, %44 ], [ %91, %89 ]
%71 = phi double [ 0.000000e+00, %44 ], [ %90, %89 ]
%72 = load double*, double** %40
%73 = getelementptr inbounds double, double* %72, i64 %70
%74 = load double, double* %73
%75 = tail call i32 @isnan(double %74)
%76 = icmp eq i32 %75, 0
br i1 %76, label %77, label %89
77: ; preds = %69
%78 = load double*, double** %40
%79 = getelementptr inbounds double, double* %78, i64 %70
%80 = load double, double* %79
%81 = tail call i32 @isinf(double %80)
%82 = icmp eq i32 %81, 0
br i1 %82, label %83, label %89
83: ; preds = %77
%84 = load double*, double** %40
%85 = getelementptr inbounds double, double* %84, i64 %70
%86 = load double, double* %85
%87 = fdiv double %86, %45
%88 = fadd double %71, %87
br label %89
89: ; preds = %69, %77, %83
%90 = phi double [ %71, %69 ], [ %71, %77 ], [ %88, %83 ]
%91 = add nuw nsw i64 %70, 1
%92 = icmp eq i64 %91, %14
br i1 %92, label %66, label %69
93: ; preds = %123
br i1 %10, label %94, label %163
94: ; preds = %93
%95 = fmul double %42, %5
%96 = sitofp i32 %124 to double
br label %127
97: ; preds = %67, %123
%98 = phi i64 [ 0, %67 ], [ %125, %123 ]
%99 = phi i32 [ 0, %67 ], [ %124, %123 ]
%100 = load double*, double** %40
%101 = getelementptr inbounds double, double* %100, i64 %98
%102 = load double, double* %101
%103 = tail call i32 @isnan(double %102)
%104 = icmp eq i32 %103, 0
br i1 %104, label %105, label %123
105: ; preds = %97
%106 = load double*, double** %40
%107 = getelementptr inbounds double, double* %106, i64 %98
%108 = load double, double* %107
%109 = tail call i32 @isinf(double %108)
%110 = icmp eq i32 %109, 0
br i1 %110, label %111, label %123
111: ; preds = %105
%112 = load double*, double** %40
%113 = getelementptr inbounds double, double* %112, i64 %98
%114 = load double, double* %113
%115 = fsub double %114, %90
%116 = fcmp ogt double %115, 0.000000e+00
%117 = fneg double %115
%118 = select i1 %116, double %115, double %117
%119 = fcmp olt double %118, %68
%120 = or i1 %11, %119
%121 = zext i1 %120 to i32
%122 = add nsw i32 %99, %121
br label %123
123: ; preds = %111, %97, %105
%124 = phi i32 [ %99, %97 ], [ %99, %105 ], [ %122, %111 ]
%125 = add nuw nsw i64 %98, 1
%126 = icmp eq i64 %125, %15
br i1 %126, label %93, label %97
127: ; preds = %94, %159
%128 = phi i64 [ 0, %94 ], [ %161, %159 ]
%129 = phi double [ 0.000000e+00, %94 ], [ %160, %159 ]
%130 = load double*, double** %40
%131 = getelementptr inbounds double, double* %130, i64 %128
%132 = load double, double* %131
%133 = tail call i32 @isnan(double %132)
%134 = icmp eq i32 %133, 0
br i1 %134, label %135, label %159
135: ; preds = %127
%136 = load double*, double** %40
%137 = getelementptr inbounds double, double* %136, i64 %128
%138 = load double, double* %137
%139 = tail call i32 @isinf(double %138)
%140 = icmp eq i32 %139, 0
br i1 %140, label %141, label %159
141: ; preds = %135
%142 = load double*, double** %40
%143 = getelementptr inbounds double, double* %142, i64 %128
%144 = load double, double* %143
%145 = fsub double %144, %90
%146 = fcmp ogt double %145, 0.000000e+00
%147 = fneg double %145
%148 = select i1 %146, double %145, double %147
%149 = fcmp olt double %148, %95
%150 = or i1 %11, %149
br i1 %150, label %151, label %159
151: ; preds = %141
%152 = fdiv double %144, %96
%153 = load double, double* %39
%154 = fadd double %152, %153
store double %154, double* %39
%155 = load double, double* %143
%156 = fmul double %155, %155
%157 = fdiv double %156, %96
%158 = fadd double %129, %157
br label %159
159: ; preds = %127, %135, %151, %141
%160 = phi double [ %129, %127 ], [ %129, %135 ], [ %158, %151 ], [ %129, %141 ]
%161 = add nuw nsw i64 %128, 1
%162 = icmp eq i64 %161, %16
br i1 %162, label %163, label %127
163: ; preds = %159, %37, %43, %66, %93
%164 = phi double [ 0.000000e+00, %93 ], [ 0.000000e+00, %66 ], [ 0.000000e+00, %43 ], [ 0.000000e+00, %37 ], [ %160, %159 ]
%165 = load double, double* %39
%166 = fneg double %165
%167 = tail call double @llvm.fmuladd.f64(double %166, double %165, double %164)
%168 = tail call double @sqrt(double %167)
switch i32 %6, label %313 [
i32 0, label %238
i32 1, label %169
]
169: ; preds = %163
br i1 %10, label %170, label %313
170: ; preds = %169
%171 = getelementptr inbounds double*, double** %1, i64 %38
%172 = load double*, double** %171
br i1 %23, label %236, label %173
173: ; preds = %170
%174 = insertelement <2 x double> poison, double %168, i64 0
%175 = shufflevector <2 x double> %174, <2 x double> poison, <2 x i32> zeroinitializer
%176 = insertelement <2 x double> poison, double %168, i64 0
%177 = shufflevector <2 x double> %176, <2 x double> poison, <2 x i32> zeroinitializer
br i1 %26, label %223, label %178
178: ; preds = %173, %178
%179 = phi i64 [ %220, %178 ], [ 0, %173 ]
%180 = phi i64 [ %221, %178 ], [ 0, %173 ]
%181 = getelementptr inbounds double, double* %172, i64 %179
%182 = bitcast double* %181 to <2 x double>*
store <2 x double> %175, <2 x double>* %182
%183 = getelementptr inbounds double, double* %181, i64 2
%184 = bitcast double* %183 to <2 x double>*
store <2 x double> %177, <2 x double>* %184
%185 = or i64 %179, 4
%186 = getelementptr inbounds double, double* %172, i64 %185
%187 = bitcast double* %186 to <2 x double>*
store <2 x double> %175, <2 x double>* %187
%188 = getelementptr inbounds double, double* %186, i64 2
%189 = bitcast double* %188 to <2 x double>*
store <2 x double> %177, <2 x double>* %189
%190 = or i64 %179, 8
%191 = getelementptr inbounds double, double* %172, i64 %190
%192 = bitcast double* %191 to <2 x double>*
store <2 x double> %175, <2 x double>* %192
%193 = getelementptr inbounds double, double* %191, i64 2
%194 = bitcast double* %193 to <2 x double>*
store <2 x double> %177, <2 x double>* %194
%195 = or i64 %179, 12
%196 = getelementptr inbounds double, double* %172, i64 %195
%197 = bitcast double* %196 to <2 x double>*
store <2 x double> %175, <2 x double>* %197
%198 = getelementptr inbounds double, double* %196, i64 2
%199 = bitcast double* %198 to <2 x double>*
store <2 x double> %177, <2 x double>* %199
%200 = or i64 %179, 16
%201 = getelementptr inbounds double, double* %172, i64 %200
%202 = bitcast double* %201 to <2 x double>*
store <2 x double> %175, <2 x double>* %202
%203 = getelementptr inbounds double, double* %201, i64 2
%204 = bitcast double* %203 to <2 x double>*
store <2 x double> %177, <2 x double>* %204
%205 = or i64 %179, 20
%206 = getelementptr inbounds double, double* %172, i64 %205
%207 = bitcast double* %206 to <2 x double>*
store <2 x double> %175, <2 x double>* %207
%208 = getelementptr inbounds double, double* %206, i64 2
%209 = bitcast double* %208 to <2 x double>*
store <2 x double> %177, <2 x double>* %209
%210 = or i64 %179, 24
%211 = getelementptr inbounds double, double* %172, i64 %210
%212 = bitcast double* %211 to <2 x double>*
store <2 x double> %175, <2 x double>* %212
%213 = getelementptr inbounds double, double* %211, i64 2
%214 = bitcast double* %213 to <2 x double>*
store <2 x double> %177, <2 x double>* %214
%215 = or i64 %179, 28
%216 = getelementptr inbounds double, double* %172, i64 %215
%217 = bitcast double* %216 to <2 x double>*
store <2 x double> %175, <2 x double>* %217
%218 = getelementptr inbounds double, double* %216, i64 2
%219 = bitcast double* %218 to <2 x double>*
store <2 x double> %177, <2 x double>* %219
%220 = add nuw i64 %179, 32
%221 = add i64 %180, 8
%222 = icmp eq i64 %221, %27
br i1 %222, label %223, label %178
223: ; preds = %178, %173
%224 = phi i64 [ 0, %173 ], [ %220, %178 ]
br i1 %28, label %235, label %225
225: ; preds = %223, %225
%226 = phi i64 [ %232, %225 ], [ %224, %223 ]
%227 = phi i64 [ %233, %225 ], [ 0, %223 ]
%228 = getelementptr inbounds double, double* %172, i64 %226
%229 = bitcast double* %228 to <2 x double>*
store <2 x double> %175, <2 x double>* %229
%230 = getelementptr inbounds double, double* %228, i64 2
%231 = bitcast double* %230 to <2 x double>*
store <2 x double> %177, <2 x double>* %231
%232 = add nuw i64 %226, 4
%233 = add i64 %227, 1
%234 = icmp eq i64 %233, %25
br i1 %234, label %235, label %225
235: ; preds = %225, %223
br i1 %29, label %313, label %236
236: ; preds = %170, %235
%237 = phi i64 [ 0, %170 ], [ %24, %235 ]
br label %308
238: ; preds = %163
br i1 %10, label %239, label %313
239: ; preds = %238
%240 = getelementptr inbounds double*, double** %1, i64 %38
%241 = load double*, double** %240
br i1 %30, label %301, label %242
242: ; preds = %239
br i1 %33, label %288, label %243
243: ; preds = %242, %243
%244 = phi i64 [ %285, %243 ], [ 0, %242 ]
%245 = phi i64 [ %286, %243 ], [ 0, %242 ]
%246 = getelementptr inbounds double, double* %241, i64 %244
%247 = bitcast double* %246 to <2 x double>*
store <2 x double> <double 1.000000e+00, double 1.000000e+00>, <2 x double>* %247
%248 = getelementptr inbounds double, double* %246, i64 2
%249 = bitcast double* %248 to <2 x double>*
store <2 x double> <double 1.000000e+00, double 1.000000e+00>, <2 x double>* %249
%250 = or i64 %244, 4
%251 = getelementptr inbounds double, double* %241, i64 %250
%252 = bitcast double* %251 to <2 x double>*
store <2 x double> <double 1.000000e+00, double 1.000000e+00>, <2 x double>* %252
%253 = getelementptr inbounds double, double* %251, i64 2
%254 = bitcast double* %253 to <2 x double>*
store <2 x double> <double 1.000000e+00, double 1.000000e+00>, <2 x double>* %254
%255 = or i64 %244, 8
%256 = getelementptr inbounds double, double* %241, i64 %255
%257 = bitcast double* %256 to <2 x double>*
store <2 x double> <double 1.000000e+00, double 1.000000e+00>, <2 x double>* %257
%258 = getelementptr inbounds double, double* %256, i64 2
%259 = bitcast double* %258 to <2 x double>*
store <2 x double> <double 1.000000e+00, double 1.000000e+00>, <2 x double>* %259
%260 = or i64 %244, 12
%261 = getelementptr inbounds double, double* %241, i64 %260
%262 = bitcast double* %261 to <2 x double>*
store <2 x double> <double 1.000000e+00, double 1.000000e+00>, <2 x double>* %262
%263 = getelementptr inbounds double, double* %261, i64 2
%264 = bitcast double* %263 to <2 x double>*
store <2 x double> <double 1.000000e+00, double 1.000000e+00>, <2 x double>* %264
%265 = or i64 %244, 16
%266 = getelementptr inbounds double, double* %241, i64 %265
%267 = bitcast double* %266 to <2 x double>*
store <2 x double> <double 1.000000e+00, double 1.000000e+00>, <2 x double>* %267
%268 = getelementptr inbounds double, double* %266, i64 2
%269 = bitcast double* %268 to <2 x double>*
store <2 x double> <double 1.000000e+00, double 1.000000e+00>, <2 x double>* %269
%270 = or i64 %244, 20
%271 = getelementptr inbounds double, double* %241, i64 %270
%272 = bitcast double* %271 to <2 x double>*
store <2 x double> <double 1.000000e+00, double 1.000000e+00>, <2 x double>* %272
%273 = getelementptr inbounds double, double* %271, i64 2
%274 = bitcast double* %273 to <2 x double>*
store <2 x double> <double 1.000000e+00, double 1.000000e+00>, <2 x double>* %274
%275 = or i64 %244, 24
%276 = getelementptr inbounds double, double* %241, i64 %275
%277 = bitcast double* %276 to <2 x double>*
store <2 x double> <double 1.000000e+00, double 1.000000e+00>, <2 x double>* %277
%278 = getelementptr inbounds double, double* %276, i64 2
%279 = bitcast double* %278 to <2 x double>*
store <2 x double> <double 1.000000e+00, double 1.000000e+00>, <2 x double>* %279
%280 = or i64 %244, 28
%281 = getelementptr inbounds double, double* %241, i64 %280
%282 = bitcast double* %281 to <2 x double>*
store <2 x double> <double 1.000000e+00, double 1.000000e+00>, <2 x double>* %282
%283 = getelementptr inbounds double, double* %281, i64 2
%284 = bitcast double* %283 to <2 x double>*
store <2 x double> <double 1.000000e+00, double 1.000000e+00>, <2 x double>* %284
%285 = add nuw i64 %244, 32
%286 = add i64 %245, 8
%287 = icmp eq i64 %286, %34
br i1 %287, label %288, label %243
288: ; preds = %243, %242
%289 = phi i64 [ 0, %242 ], [ %285, %243 ]
br i1 %35, label %300, label %290
290: ; preds = %288, %290
%291 = phi i64 [ %297, %290 ], [ %289, %288 ]
%292 = phi i64 [ %298, %290 ], [ 0, %288 ]
%293 = getelementptr inbounds double, double* %241, i64 %291
%294 = bitcast double* %293 to <2 x double>*
store <2 x double> <double 1.000000e+00, double 1.000000e+00>, <2 x double>* %294
%295 = getelementptr inbounds double, double* %293, i64 2
%296 = bitcast double* %295 to <2 x double>*
store <2 x double> <double 1.000000e+00, double 1.000000e+00>, <2 x double>* %296
%297 = add nuw i64 %291, 4
%298 = add i64 %292, 1
%299 = icmp eq i64 %298, %32
br i1 %299, label %300, label %290
300: ; preds = %290, %288
br i1 %36, label %313, label %301
301: ; preds = %239, %300
%302 = phi i64 [ 0, %239 ], [ %31, %300 ]
br label %303
303: ; preds = %301, %303
%304 = phi i64 [ %306, %303 ], [ %302, %301 ]
%305 = getelementptr inbounds double, double* %241, i64 %304
store double 1.000000e+00, double* %305
%306 = add nuw nsw i64 %304, 1
%307 = icmp eq i64 %306, %18
br i1 %307, label %313, label %303
308: ; preds = %236, %308
%309 = phi i64 [ %311, %308 ], [ %237, %236 ]
%310 = getelementptr inbounds double, double* %172, i64 %309
store double %168, double* %310
%311 = add nuw nsw i64 %309, 1
%312 = icmp eq i64 %311, %17
br i1 %312, label %313, label %308
313: ; preds = %308, %303, %235, %300, %169, %238, %163
%314 = add nuw nsw i64 %38, 1
%315 = icmp eq i64 %314, %12
br i1 %315, label %316, label %37
316: ; preds = %313, %7
ret void
}