#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 */
typedef int int64_t;

/* Variables and functions */
scalar_t__ stdlib_base_is_nan(double);
int stdlib_base_is_negative_zero(double);
void c_dsort2ins(const int64_t N, const double order, double *X,
                 const int64_t strideX, double *Y, const int64_t strideY) {
  int64_t sx;
  int64_t sy;
  int64_t ix;
  int64_t jx;
  int64_t fx;
  int64_t lx;
  int64_t iy;
  int64_t jy;
  int64_t fy;
  int64_t ly;
  int64_t i;
  double vx;
  double vy;
  double ux;
  bool flg;
  if (N <= 0 || order == 0.0) {
    return;
  }
  if (order < 0.0) {
    sx = -strideX;
    sy = -strideY;
  } else {
    sx = strideX;
    sy = strideY;
  }
  if (sy < 0) {
    fy = (1 - N) * sy;
    ly = 0;
  } else {
    fy = 0;
    ly = (N - 1) * sy;
  }
  iy = fy + sy;
  if (sx < 0) {
    fx = (1 - N) * sx;
    lx = 0;
    ix = fx + sx;
    for (i = 1; i < N; i++) {
      vx = X[ix];
      vy = Y[iy];
      if (stdlib_base_is_nan(vx)) {
        jx = ix;
        jy = iy;
        while (jx > lx) {
          X[jx] = X[jx + sx];
          Y[jy] = Y[jy + sy];
          jx += sx;
          jy += sy;
        }
        X[lx] = vx;
        Y[ly] = vy;
      } else {
        flg = stdlib_base_is_negative_zero(vx);
        jx = ix - sx;
        jy = iy - sy;
        while (jx <= fx) {
          ux = X[jx];
          if (ux <= vx &&
              !(flg && ux == vx && !stdlib_base_is_negative_zero(ux))) {
            break;
          }
          X[jx + sx] = ux;
          Y[jy + sy] = Y[jy];
          jx -= sx;
          jy -= sy;
        }
        X[jx + sx] = vx;
        Y[jy + sy] = vy;
        ix += sx;
        iy += sy;
      }
    }
    return;
  }
  fx = 0;
  lx = (N - 1) * sx;
  ix = fx + sx;
  for (i = 1; i < N; i++) {
    vx = X[ix];
    vy = Y[iy];
    if (stdlib_base_is_nan(vx)) {
      jx = ix;
      jy = iy;
      while (jx < lx) {
        X[jx] = X[jx + sx];
        Y[jy] = Y[jy + sy];
        jx += sx;
        jy += sy;
      }
      X[lx] = vx;
      Y[ly] = vy;
    } else {
      flg = stdlib_base_is_negative_zero(vx);
      jx = ix - sx;
      jy = iy - sy;
      while (jx >= fx) {
        ux = X[jx];
        if (ux <= vx &&
            !(flg && ux == vx && !stdlib_base_is_negative_zero(ux))) {
          break;
        }
        X[jx + sx] = ux;
        Y[jy + sy] = Y[jy];
        jx -= sx;
        jy -= sy;
      }
      X[jx + sx] = vx;
      Y[jy + sy] = vy;
      ix += sx;
      iy += sy;
    }
  }
  return;
}


x86 assembly (clang, -O0):
<c_dsort2ins>:
push   %rbp
mov    %rsp,%rbp
sub    $0x80,%rsp
mov    %edi,-0x4(%rbp)
movsd  %xmm0,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %edx,-0x1c(%rbp)
mov    %rcx,-0x28(%rbp)
mov    %r8d,-0x2c(%rbp)
cmpl   $0x0,-0x4(%rbp)
jle    1164 <c_dsort2ins+0x44>
movsd  -0x10(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    1169 <c_dsort2ins+0x49>
jp     1169 <c_dsort2ins+0x49>
jmp    1646 <c_dsort2ins+0x526>
xorps  %xmm0,%xmm0
ucomisd -0x10(%rbp),%xmm0
jbe    118c <c_dsort2ins+0x6c>
xor    %eax,%eax
sub    -0x1c(%rbp),%eax
mov    %eax,-0x30(%rbp)
xor    %eax,%eax
sub    -0x2c(%rbp),%eax
mov    %eax,-0x34(%rbp)
jmp    1198 <c_dsort2ins+0x78>
mov    -0x1c(%rbp),%eax
mov    %eax,-0x30(%rbp)
mov    -0x2c(%rbp),%eax
mov    %eax,-0x34(%rbp)
cmpl   $0x0,-0x34(%rbp)
jge    11bd <c_dsort2ins+0x9d>
mov    $0x1,%eax
sub    -0x4(%rbp),%eax
imul   -0x34(%rbp),%eax
mov    %eax,-0x50(%rbp)
movl   $0x0,-0x54(%rbp)
jmp    11d1 <c_dsort2ins+0xb1>
movl   $0x0,-0x50(%rbp)
mov    -0x4(%rbp),%eax
sub    $0x1,%eax
imul   -0x34(%rbp),%eax
mov    %eax,-0x54(%rbp)
mov    -0x50(%rbp),%eax
add    -0x34(%rbp),%eax
mov    %eax,-0x48(%rbp)
cmpl   $0x0,-0x30(%rbp)
jge    1416 <c_dsort2ins+0x2f6>
mov    $0x1,%eax
sub    -0x4(%rbp),%eax
imul   -0x30(%rbp),%eax
mov    %eax,-0x40(%rbp)
movl   $0x0,-0x44(%rbp)
mov    -0x40(%rbp),%eax
add    -0x30(%rbp),%eax
mov    %eax,-0x38(%rbp)
movl   $0x1,-0x58(%rbp)
mov    -0x58(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    1411 <c_dsort2ins+0x2f1>
mov    -0x18(%rbp),%rax
movslq -0x38(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x60(%rbp)
mov    -0x28(%rbp),%rax
movslq -0x48(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  -0x60(%rbp),%xmm0
call   1040 <stdlib_base_is_nan@plt>
cmp    $0x0,%rax
je     12e4 <c_dsort2ins+0x1c4>
mov    -0x38(%rbp),%eax
mov    %eax,-0x3c(%rbp)
mov    -0x48(%rbp),%eax
mov    %eax,-0x4c(%rbp)
mov    -0x3c(%rbp),%eax
cmp    -0x44(%rbp),%eax
jle    12bb <c_dsort2ins+0x19b>
mov    -0x18(%rbp),%rax
mov    -0x3c(%rbp),%ecx
add    -0x30(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x18(%rbp),%rax
movslq -0x3c(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x28(%rbp),%rax
mov    -0x4c(%rbp),%ecx
add    -0x34(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x28(%rbp),%rax
movslq -0x4c(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x30(%rbp),%eax
add    -0x3c(%rbp),%eax
mov    %eax,-0x3c(%rbp)
mov    -0x34(%rbp),%eax
add    -0x4c(%rbp),%eax
mov    %eax,-0x4c(%rbp)
jmp    125a <c_dsort2ins+0x13a>
movsd  -0x60(%rbp),%xmm0
mov    -0x18(%rbp),%rax
movslq -0x44(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0x68(%rbp),%xmm0
mov    -0x28(%rbp),%rax
movslq -0x54(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
jmp    13fe <c_dsort2ins+0x2de>
movsd  -0x60(%rbp),%xmm0
call   1030 <stdlib_base_is_negative_zero@plt>
mov    %eax,-0x74(%rbp)
mov    -0x38(%rbp),%eax
sub    -0x30(%rbp),%eax
mov    %eax,-0x3c(%rbp)
mov    -0x48(%rbp),%eax
sub    -0x34(%rbp),%eax
mov    %eax,-0x4c(%rbp)
mov    -0x3c(%rbp),%eax
cmp    -0x40(%rbp),%eax
jg     13be <c_dsort2ins+0x29e>
mov    -0x18(%rbp),%rax
movslq -0x3c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x70(%rbp)
movsd  -0x70(%rbp),%xmm1
movsd  -0x60(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jb     136d <c_dsort2ins+0x24d>
cmpl   $0x0,-0x74(%rbp)
je     1368 <c_dsort2ins+0x248>
movsd  -0x70(%rbp),%xmm0
ucomisd -0x60(%rbp),%xmm0
jne    1368 <c_dsort2ins+0x248>
jp     1368 <c_dsort2ins+0x248>
movsd  -0x70(%rbp),%xmm0
call   1030 <stdlib_base_is_negative_zero@plt>
cmp    $0x0,%eax
je     136d <c_dsort2ins+0x24d>
jmp    13be <c_dsort2ins+0x29e>
movsd  -0x70(%rbp),%xmm0
mov    -0x18(%rbp),%rax
mov    -0x3c(%rbp),%ecx
add    -0x30(%rbp),%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x28(%rbp),%rax
movslq -0x4c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x28(%rbp),%rax
mov    -0x4c(%rbp),%ecx
add    -0x34(%rbp),%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x30(%rbp),%ecx
mov    -0x3c(%rbp),%eax
sub    %ecx,%eax
mov    %eax,-0x3c(%rbp)
mov    -0x34(%rbp),%ecx
mov    -0x4c(%rbp),%eax
sub    %ecx,%eax
mov    %eax,-0x4c(%rbp)
jmp    1303 <c_dsort2ins+0x1e3>
movsd  -0x60(%rbp),%xmm0
mov    -0x18(%rbp),%rax
mov    -0x3c(%rbp),%ecx
add    -0x30(%rbp),%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0x68(%rbp),%xmm0
mov    -0x28(%rbp),%rax
mov    -0x4c(%rbp),%ecx
add    -0x34(%rbp),%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x30(%rbp),%eax
add    -0x38(%rbp),%eax
mov    %eax,-0x38(%rbp)
mov    -0x34(%rbp),%eax
add    -0x48(%rbp),%eax
mov    %eax,-0x48(%rbp)
jmp    1403 <c_dsort2ins+0x2e3>
mov    -0x58(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x58(%rbp)
jmp    120a <c_dsort2ins+0xea>
jmp    1646 <c_dsort2ins+0x526>
movl   $0x0,-0x40(%rbp)
mov    -0x4(%rbp),%eax
sub    $0x1,%eax
imul   -0x30(%rbp),%eax
mov    %eax,-0x44(%rbp)
mov    -0x40(%rbp),%eax
add    -0x30(%rbp),%eax
mov    %eax,-0x38(%rbp)
movl   $0x1,-0x58(%rbp)
mov    -0x58(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    1641 <c_dsort2ins+0x521>
mov    -0x18(%rbp),%rax
movslq -0x38(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x60(%rbp)
mov    -0x28(%rbp),%rax
movslq -0x48(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  -0x60(%rbp),%xmm0
call   1040 <stdlib_base_is_nan@plt>
cmp    $0x0,%rax
je     1514 <c_dsort2ins+0x3f4>
mov    -0x38(%rbp),%eax
mov    %eax,-0x3c(%rbp)
mov    -0x48(%rbp),%eax
mov    %eax,-0x4c(%rbp)
mov    -0x3c(%rbp),%eax
cmp    -0x44(%rbp),%eax
jge    14eb <c_dsort2ins+0x3cb>
mov    -0x18(%rbp),%rax
mov    -0x3c(%rbp),%ecx
add    -0x30(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x18(%rbp),%rax
movslq -0x3c(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x28(%rbp),%rax
mov    -0x4c(%rbp),%ecx
add    -0x34(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x28(%rbp),%rax
movslq -0x4c(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x30(%rbp),%eax
add    -0x3c(%rbp),%eax
mov    %eax,-0x3c(%rbp)
mov    -0x34(%rbp),%eax
add    -0x4c(%rbp),%eax
mov    %eax,-0x4c(%rbp)
jmp    148a <c_dsort2ins+0x36a>
movsd  -0x60(%rbp),%xmm0
mov    -0x18(%rbp),%rax
movslq -0x44(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0x68(%rbp),%xmm0
mov    -0x28(%rbp),%rax
movslq -0x54(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
jmp    162e <c_dsort2ins+0x50e>
movsd  -0x60(%rbp),%xmm0
call   1030 <stdlib_base_is_negative_zero@plt>
mov    %eax,-0x74(%rbp)
mov    -0x38(%rbp),%eax
sub    -0x30(%rbp),%eax
mov    %eax,-0x3c(%rbp)
mov    -0x48(%rbp),%eax
sub    -0x34(%rbp),%eax
mov    %eax,-0x4c(%rbp)
mov    -0x3c(%rbp),%eax
cmp    -0x40(%rbp),%eax
jl     15ee <c_dsort2ins+0x4ce>
mov    -0x18(%rbp),%rax
movslq -0x3c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x70(%rbp)
movsd  -0x70(%rbp),%xmm1
movsd  -0x60(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jb     159d <c_dsort2ins+0x47d>
cmpl   $0x0,-0x74(%rbp)
je     1598 <c_dsort2ins+0x478>
movsd  -0x70(%rbp),%xmm0
ucomisd -0x60(%rbp),%xmm0
jne    1598 <c_dsort2ins+0x478>
jp     1598 <c_dsort2ins+0x478>
movsd  -0x70(%rbp),%xmm0
call   1030 <stdlib_base_is_negative_zero@plt>
cmp    $0x0,%eax
je     159d <c_dsort2ins+0x47d>
jmp    15ee <c_dsort2ins+0x4ce>
movsd  -0x70(%rbp),%xmm0
mov    -0x18(%rbp),%rax
mov    -0x3c(%rbp),%ecx
add    -0x30(%rbp),%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x28(%rbp),%rax
movslq -0x4c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x28(%rbp),%rax
mov    -0x4c(%rbp),%ecx
add    -0x34(%rbp),%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x30(%rbp),%ecx
mov    -0x3c(%rbp),%eax
sub    %ecx,%eax
mov    %eax,-0x3c(%rbp)
mov    -0x34(%rbp),%ecx
mov    -0x4c(%rbp),%eax
sub    %ecx,%eax
mov    %eax,-0x4c(%rbp)
jmp    1533 <c_dsort2ins+0x413>
movsd  -0x60(%rbp),%xmm0
mov    -0x18(%rbp),%rax
mov    -0x3c(%rbp),%ecx
add    -0x30(%rbp),%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0x68(%rbp),%xmm0
mov    -0x28(%rbp),%rax
mov    -0x4c(%rbp),%ecx
add    -0x34(%rbp),%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x30(%rbp),%eax
add    -0x38(%rbp),%eax
mov    %eax,-0x38(%rbp)
mov    -0x34(%rbp),%eax
add    -0x48(%rbp),%eax
mov    %eax,-0x48(%rbp)
jmp    1633 <c_dsort2ins+0x513>
mov    -0x58(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x58(%rbp)
jmp    143a <c_dsort2ins+0x31a>
jmp    1646 <c_dsort2ins+0x526>
add    $0x80,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<c_dsort2ins>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x98,%rsp
test   %edi,%edi
jle    160b <c_dsort2ins+0x4eb>
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    1149 <c_dsort2ins+0x29>
jnp    160b <c_dsort2ins+0x4eb>
mov    %rcx,%r14
mov    %rsi,%r12
mov    %edx,%eax
neg    %eax
mov    %r8d,%ecx
neg    %ecx
ucomisd %xmm0,%xmm1
cmovbe %edx,%eax
mov    %rax,0x8(%rsp)
cmovbe %r8d,%ecx
test   %ecx,%ecx
js     117d <c_dsort2ins+0x5d>
lea    -0x1(%rdi),%eax
imul   %ecx,%eax
cltq
mov    %rax,0x78(%rsp)
xor    %edx,%edx
jmp    118e <c_dsort2ins+0x6e>
mov    $0x1,%edx
sub    %edi,%edx
imul   %ecx,%edx
xor    %eax,%eax
mov    %rax,0x78(%rsp)
add    %ecx,%edx
cmpl   $0x0,0x8(%rsp)
mov    %rdi,0x40(%rsp)
mov    %ecx,0x14(%rsp)
js     13e7 <c_dsort2ins+0x2c7>
cmp    $0x2,%edi
jb     160b <c_dsort2ins+0x4eb>
lea    -0x1(%rdi),%eax
mov    0x8(%rsp),%rbp
imul   %ebp,%eax
mov    %eax,0x70(%rsp)
cltq
mov    %rax,0x68(%rsp)
movslq %ecx,%rax
mov    %ebp,%r8d
lea    (%r12,%r8,8),%r10
mov    %rax,0x60(%rsp)
lea    (%r14,%rax,8),%rsi
mov    %ebp,%eax
neg    %eax
mov    %rax,0x30(%rsp)
mov    %ecx,%eax
neg    %eax
mov    %rax,0x80(%rsp)
mov    $0x1,%eax
mov    %ebp,%r15d
mov    %r8,0x38(%rsp)
mov    %r10,0x58(%rsp)
mov    %rsi,0x90(%rsp)
jmp    1247 <c_dsort2ins+0x127>
nopw   0x0(%rax,%rax,1)
movsd  0x18(%rsp),%xmm0
movsd  %xmm0,(%r12,%rcx,8)
mov    0x78(%rsp),%rax
movsd  0x48(%rsp),%xmm0
movsd  %xmm0,(%r14,%rax,8)
mov    %r9d,%r15d
mov    0x40(%rsp),%rdi
mov    %r13d,%edx
mov    0x50(%rsp),%eax
add    $0x1,%eax
cmp    %edi,%eax
je     160b <c_dsort2ins+0x4eb>
mov    %eax,0x50(%rsp)
movslq %r15d,%rbp
movsd  (%r12,%rbp,8),%xmm1
movsd  %xmm1,0x18(%rsp)
mov    %edx,%r13d
movslq %edx,%rbx
movsd  (%r14,%rbx,8),%xmm0
movsd  %xmm0,0x48(%rsp)
movapd %xmm1,%xmm0
call   1040 <stdlib_base_is_nan@plt>
test   %rax,%rax
movsd  0x18(%rsp),%xmm0
je     12e0 <c_dsort2ins+0x1c0>
mov    %r15d,%r9d
cmp    0x70(%rsp),%r15d
mov    0x68(%rsp),%rcx
mov    0x60(%rsp),%rdx
mov    0x38(%rsp),%r8
mov    0x58(%rsp),%r10
mov    0x90(%rsp),%rsi
jge    1210 <c_dsort2ins+0xf0>
nopw   0x0(%rax,%rax,1)
movsd  (%r10,%rbp,8),%xmm0
movsd  %xmm0,(%r12,%rbp,8)
lea    (%r8,%rbp,1),%rax
movsd  (%rsi,%rbx,8),%xmm0
movsd  %xmm0,(%r14,%rbx,8)
add    %rdx,%rbx
mov    %rax,%rbp
cmp    %rcx,%rax
jl     12b0 <c_dsort2ins+0x190>
jmp    1210 <c_dsort2ins+0xf0>
nopl   0x0(%rax,%rax,1)
call   1030 <stdlib_base_is_negative_zero@plt>
mov    %eax,0x2c(%rsp)
cmp    0x8(%rsp),%r15d
mov    0x40(%rsp),%rdi
mov    %r13d,%edx
movsd  0x18(%rsp),%xmm1
js     13c7 <c_dsort2ins+0x2a7>
mov    %r15d,0x8c(%rsp)
mov    %edx,0x4(%rsp)
mov    %edx,%r13d
mov    0x8(%rsp),%rbx
mov    0x14(%rsp),%ebp
mov    0x30(%rsp),%rdx
jmp    1368 <c_dsort2ins+0x248>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    %r13d,%eax
sub    %ebp,%eax
mov    0x80(%rsp),%rcx
add    %r13d,%ecx
movslq %r15d,%r15
movsd  %xmm0,(%r12,%r15,8)
movslq %ecx,%rcx
movsd  (%r14,%rcx,8),%xmm0
movslq %r13d,%rcx
movsd  %xmm0,(%r14,%rcx,8)
sub    %ebx,%r15d
mov    %edx,%ecx
add    %r15d,%ecx
mov    %eax,%r13d
js     13b0 <c_dsort2ins+0x290>
lea    (%rdx,%r15,1),%eax
movsd  (%r12,%rax,8),%xmm0
ucomisd %xmm0,%xmm1
jb     1330 <c_dsort2ins+0x210>
cmpl   $0x0,0x2c(%rsp)
je     13ad <c_dsort2ins+0x28d>
ucomisd %xmm1,%xmm0
jne    13ad <c_dsort2ins+0x28d>
jp     13ad <c_dsort2ins+0x28d>
movsd  %xmm0,0x20(%rsp)
movsd  0x20(%rsp),%xmm0
call   1030 <stdlib_base_is_negative_zero@plt>
movsd  0x20(%rsp),%xmm0
movsd  0x18(%rsp),%xmm1
mov    0x30(%rsp),%rdx
test   %eax,%eax
je     1330 <c_dsort2ins+0x210>
mov    %r13d,%eax
movslq %r15d,%rbp
movslq %eax,%rbx
mov    0x40(%rsp),%rdi
mov    0x4(%rsp),%edx
mov    0x8c(%rsp),%r15d
movsd  %xmm1,(%r12,%rbp,8)
movsd  0x48(%rsp),%xmm0
movsd  %xmm0,(%r14,%rbx,8)
add    0x8(%rsp),%r15d
add    0x14(%rsp),%edx
jmp    1238 <c_dsort2ins+0x118>
cmp    $0x2,%edi
jb     160b <c_dsort2ins+0x4eb>
mov    $0x1,%eax
mov    $0x1,%ebp
sub    %edi,%ebp
mov    0x8(%rsp),%rsi
imul   %esi,%ebp
mov    %rbp,0x38(%rsp)
lea    (%rsi,%rbp,1),%ebx
movslq %ecx,%rbp
movslq %esi,%rdi
mov    %rdi,0x70(%rsp)
lea    (%r12,%rdi,8),%rdi
mov    %rdi,0x68(%rsp)
mov    %rbp,0x48(%rsp)
lea    (%r14,%rbp,8),%rdi
mov    %rdi,0x60(%rsp)
neg    %esi
neg    %ecx
mov    %rcx,0x80(%rsp)
mov    %rsi,0x50(%rsp)
mov    0x38(%rsp),%r15
jmp    1484 <c_dsort2ins+0x364>
mov    %ebx,%eax
movslq %ebp,%r13
movslq %eax,%rbp
mov    0x8(%rsp),%rcx
mov    0x58(%rsp),%ebx
movsd  %xmm1,(%r12,%r13,8)
movsd  0x30(%rsp),%xmm0
movsd  %xmm0,(%r14,%rbp,8)
add    %ecx,%ebx
mov    0x4(%rsp),%edx
add    0x14(%rsp),%edx
mov    0x2c(%rsp),%eax
add    $0x1,%eax
cmp    0x40(%rsp),%eax
je     160b <c_dsort2ins+0x4eb>
mov    %eax,0x2c(%rsp)
movslq %ebx,%r13
movsd  (%r12,%r13,8),%xmm1
movsd  %xmm1,0x20(%rsp)
mov    %edx,0x4(%rsp)
movslq %edx,%rbp
movsd  (%r14,%rbp,8),%xmm0
movsd  %xmm0,0x30(%rsp)
movapd %xmm1,%xmm0
call   1040 <stdlib_base_is_nan@plt>
test   %rax,%rax
movsd  0x20(%rsp),%xmm0
je     1530 <c_dsort2ins+0x410>
mov    %ebx,%ecx
test   %ebx,%ebx
mov    0x48(%rsp),%rdx
mov    0x70(%rsp),%rsi
mov    0x68(%rsp),%rdi
mov    0x60(%rsp),%rbx
jle    1506 <c_dsort2ins+0x3e6>
nopl   0x0(%rax,%rax,1)
movsd  (%rdi,%r13,8),%xmm0
movsd  %xmm0,(%r12,%r13,8)
lea    (%rsi,%r13,1),%rax
movsd  (%rbx,%rbp,8),%xmm0
movsd  %xmm0,(%r14,%rbp,8)
add    %rdx,%rbp
mov    %rax,%r13
test   %rax,%rax
jg     14e0 <c_dsort2ins+0x3c0>
movsd  0x20(%rsp),%xmm0
movsd  %xmm0,(%r12)
mov    0x78(%rsp),%rax
movsd  0x30(%rsp),%xmm0
movsd  %xmm0,(%r14,%rax,8)
mov    0x4(%rsp),%edx
mov    %ecx,%ebx
jmp    1473 <c_dsort2ins+0x353>
xchg   %ax,%ax
call   1030 <stdlib_base_is_negative_zero@plt>
mov    %eax,%edx
mov    %ebx,%eax
mov    0x8(%rsp),%rcx
sub    %ecx,%eax
cmp    0x38(%rsp),%eax
mov    0x50(%rsp),%rsi
movsd  0x20(%rsp),%xmm1
jg     1457 <c_dsort2ins+0x337>
mov    %ebx,0x58(%rsp)
mov    %ebx,%ebp
mov    0x4(%rsp),%eax
mov    %eax,%ebx
jmp    15ad <c_dsort2ins+0x48d>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %ebx,%eax
sub    0x14(%rsp),%eax
mov    0x80(%rsp),%rcx
add    %ebx,%ecx
movslq %ebp,%rbp
movsd  %xmm0,(%r12,%rbp,8)
movslq %ecx,%rcx
movsd  (%r14,%rcx,8),%xmm0
movslq %ebx,%rcx
movsd  %xmm0,(%r14,%rcx,8)
sub    0x8(%rsp),%ebp
lea    (%rsi,%rbp,1),%ecx
mov    %eax,%ebx
cmp    %r15d,%ecx
jg     1448 <c_dsort2ins+0x328>
lea    (%rsi,%rbp,1),%eax
cltq
movsd  (%r12,%rax,8),%xmm0
ucomisd %xmm0,%xmm1
jb     1570 <c_dsort2ins+0x450>
test   %edx,%edx
je     1446 <c_dsort2ins+0x326>
ucomisd %xmm1,%xmm0
jne    1446 <c_dsort2ins+0x326>
jp     1446 <c_dsort2ins+0x326>
movsd  %xmm0,0x18(%rsp)
movsd  0x18(%rsp),%xmm0
mov    %edx,%r13d
call   1030 <stdlib_base_is_negative_zero@plt>
movsd  0x18(%rsp),%xmm0
mov    %r13d,%edx
movsd  0x20(%rsp),%xmm1
mov    0x50(%rsp),%rsi
test   %eax,%eax
je     1570 <c_dsort2ins+0x450>
jmp    1446 <c_dsort2ins+0x326>
add    $0x98,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
define void @c_dsort2ins(i32 %0, double %1, double* nocapture %2, i32 %3, double* nocapture %4, i32 %5) {
%7 = icmp slt i32 %0, 1
%8 = fcmp oeq double %1, 0.000000e+00
%9 = or i1 %7, %8
br i1 %9, label %198, label %10
10: ; preds = %6
%11 = fcmp olt double %1, 0.000000e+00
%12 = sub nsw i32 0, %3
%13 = sub nsw i32 0, %5
%14 = select i1 %11, i32 %12, i32 %3
%15 = select i1 %11, i32 %13, i32 %5
%16 = icmp slt i32 %15, 0
br i1 %16, label %17, label %20
17: ; preds = %10
%18 = sub nsw i32 1, %0
%19 = mul nsw i32 %15, %18
br label %24
20: ; preds = %10
%21 = add nsw i32 %0, -1
%22 = mul nsw i32 %15, %21
%23 = sext i32 %22 to i64
br label %24
24: ; preds = %20, %17
%25 = phi i32 [ %19, %17 ], [ 0, %20 ]
%26 = phi i64 [ 0, %17 ], [ %23, %20 ]
%27 = add nsw i32 %25, %15
%28 = icmp slt i32 %14, 0
br i1 %28, label %29, label %113
29: ; preds = %24
%30 = sub nsw i32 1, %0
%31 = mul nsw i32 %14, %30
%32 = icmp ugt i32 %0, 1
br i1 %32, label %33, label %198
33: ; preds = %29
%34 = add nsw i32 %31, %14
%35 = getelementptr inbounds double, double* %4, i64 %26
%36 = sext i32 %15 to i64
%37 = sext i32 %14 to i64
br label %38
38: ; preds = %33, %108
%39 = phi i32 [ 1, %33 ], [ %111, %108 ]
%40 = phi i32 [ %27, %33 ], [ %110, %108 ]
%41 = phi i32 [ %34, %33 ], [ %109, %108 ]
%42 = sext i32 %41 to i64
%43 = getelementptr inbounds double, double* %2, i64 %42
%44 = load double, double* %43
%45 = sext i32 %40 to i64
%46 = getelementptr inbounds double, double* %4, i64 %45
%47 = load double, double* %46
%48 = tail call i64 @stdlib_base_is_nan(double %44)
%49 = icmp eq i64 %48, 0
br i1 %49, label %65, label %50
50: ; preds = %38
%51 = icmp sgt i32 %41, 0
br i1 %51, label %52, label %64
52: ; preds = %50, %52
%53 = phi i64 [ %55, %52 ], [ %42, %50 ]
%54 = phi i64 [ %59, %52 ], [ %45, %50 ]
%55 = add i64 %53, %37
%56 = getelementptr inbounds double, double* %2, i64 %55
%57 = load double, double* %56
%58 = getelementptr inbounds double, double* %2, i64 %53
store double %57, double* %58
%59 = add i64 %54, %36
%60 = getelementptr inbounds double, double* %4, i64 %59
%61 = load double, double* %60
%62 = getelementptr inbounds double, double* %4, i64 %54
store double %61, double* %62
%63 = icmp sgt i64 %55, 0
br i1 %63, label %52, label %64
64: ; preds = %52, %50
store double %44, double* %2
store double %47, double* %35
br label %108
65: ; preds = %38
%66 = tail call i32 @stdlib_base_is_negative_zero(double %44)
%67 = sub nsw i32 %41, %14
%68 = icmp sgt i32 %67, %31
br i1 %68, label %101, label %69
69: ; preds = %65
%70 = icmp ne i32 %66, 0
br label %71
71: ; preds = %69, %86
%72 = phi i32 [ %67, %69 ], [ %94, %86 ]
%73 = phi i32 [ %40, %69 ], [ %75, %86 ]
%74 = phi i32 [ %41, %69 ], [ %72, %86 ]
%75 = sub nsw i32 %73, %15
%76 = sext i32 %72 to i64
%77 = getelementptr inbounds double, double* %2, i64 %76
%78 = load double, double* %77
%79 = fcmp ugt double %78, %44
br i1 %79, label %86, label %80
80: ; preds = %71
%81 = fcmp oeq double %78, %44
%82 = select i1 %70, i1 %81, i1 false
br i1 %82, label %83, label %96
83: ; preds = %80
%84 = tail call i32 @stdlib_base_is_negative_zero(double %78)
%85 = icmp eq i32 %84, 0
br i1 %85, label %86, label %96
86: ; preds = %83, %71
%87 = sext i32 %74 to i64
%88 = getelementptr inbounds double, double* %2, i64 %87
store double %78, double* %88
%89 = sext i32 %75 to i64
%90 = getelementptr inbounds double, double* %4, i64 %89
%91 = load double, double* %90
%92 = sext i32 %73 to i64
%93 = getelementptr inbounds double, double* %4, i64 %92
store double %91, double* %93
%94 = sub nsw i32 %72, %14
%95 = icmp sgt i32 %94, %31
br i1 %95, label %96, label %71
96: ; preds = %80, %83, %86
%97 = phi i32 [ %72, %86 ], [ %74, %83 ], [ %74, %80 ]
%98 = phi i32 [ %75, %86 ], [ %73, %83 ], [ %73, %80 ]
%99 = sext i32 %97 to i64
%100 = sext i32 %98 to i64
br label %101
101: ; preds = %96, %65
%102 = phi i64 [ %100, %96 ], [ %45, %65 ]
%103 = phi i64 [ %99, %96 ], [ %42, %65 ]
%104 = getelementptr inbounds double, double* %2, i64 %103
store double %44, double* %104
%105 = getelementptr inbounds double, double* %4, i64 %102
store double %47, double* %105
%106 = add nsw i32 %41, %14
%107 = add nsw i32 %40, %15
br label %108
108: ; preds = %64, %101
%109 = phi i32 [ %41, %64 ], [ %106, %101 ]
%110 = phi i32 [ %40, %64 ], [ %107, %101 ]
%111 = add nuw nsw i32 %39, 1
%112 = icmp eq i32 %111, %0
br i1 %112, label %198, label %38
113: ; preds = %24
%114 = add nsw i32 %0, -1
%115 = mul nsw i32 %14, %114
%116 = icmp ugt i32 %0, 1
br i1 %116, label %117, label %198
117: ; preds = %113
%118 = sext i32 %115 to i64
%119 = getelementptr inbounds double, double* %2, i64 %118
%120 = getelementptr inbounds double, double* %4, i64 %26
%121 = sext i32 %15 to i64
%122 = zext i32 %14 to i64
br label %123
123: ; preds = %117, %193
%124 = phi i32 [ 1, %117 ], [ %196, %193 ]
%125 = phi i32 [ %27, %117 ], [ %195, %193 ]
%126 = phi i32 [ %14, %117 ], [ %194, %193 ]
%127 = sext i32 %126 to i64
%128 = getelementptr inbounds double, double* %2, i64 %127
%129 = load double, double* %128
%130 = sext i32 %125 to i64
%131 = getelementptr inbounds double, double* %4, i64 %130
%132 = load double, double* %131
%133 = tail call i64 @stdlib_base_is_nan(double %129)
%134 = icmp eq i64 %133, 0
br i1 %134, label %150, label %135
135: ; preds = %123
%136 = icmp slt i32 %126, %115
br i1 %136, label %137, label %149
137: ; preds = %135, %137
%138 = phi i64 [ %140, %137 ], [ %127, %135 ]
%139 = phi i64 [ %144, %137 ], [ %130, %135 ]
%140 = add i64 %138, %122
%141 = getelementptr inbounds double, double* %2, i64 %140
%142 = load double, double* %141
%143 = getelementptr inbounds double, double* %2, i64 %138
store double %142, double* %143
%144 = add i64 %139, %121
%145 = getelementptr inbounds double, double* %4, i64 %144
%146 = load double, double* %145
%147 = getelementptr inbounds double, double* %4, i64 %139
store double %146, double* %147
%148 = icmp slt i64 %140, %118
br i1 %148, label %137, label %149
149: ; preds = %137, %135
store double %129, double* %119
store double %132, double* %120
br label %193
150: ; preds = %123
%151 = tail call i32 @stdlib_base_is_negative_zero(double %129)
%152 = sub nsw i32 %126, %14
%153 = icmp sgt i32 %152, -1
br i1 %153, label %154, label %186
154: ; preds = %150
%155 = icmp ne i32 %151, 0
br label %156
156: ; preds = %154, %171
%157 = phi i32 [ %152, %154 ], [ %179, %171 ]
%158 = phi i32 [ %125, %154 ], [ %160, %171 ]
%159 = phi i32 [ %126, %154 ], [ %157, %171 ]
%160 = sub nsw i32 %158, %15
%161 = zext i32 %157 to i64
%162 = getelementptr inbounds double, double* %2, i64 %161
%163 = load double, double* %162
%164 = fcmp ugt double %163, %129
br i1 %164, label %171, label %165
165: ; preds = %156
%166 = fcmp oeq double %163, %129
%167 = select i1 %155, i1 %166, i1 false
br i1 %167, label %168, label %181
168: ; preds = %165
%169 = tail call i32 @stdlib_base_is_negative_zero(double %163)
%170 = icmp eq i32 %169, 0
br i1 %170, label %171, label %181
171: ; preds = %168, %156
%172 = sext i32 %159 to i64
%173 = getelementptr inbounds double, double* %2, i64 %172
store double %163, double* %173
%174 = sext i32 %160 to i64
%175 = getelementptr inbounds double, double* %4, i64 %174
%176 = load double, double* %175
%177 = sext i32 %158 to i64
%178 = getelementptr inbounds double, double* %4, i64 %177
store double %176, double* %178
%179 = sub nsw i32 %157, %14
%180 = icmp sgt i32 %179, -1
br i1 %180, label %156, label %181
181: ; preds = %165, %168, %171
%182 = phi i32 [ %157, %171 ], [ %159, %168 ], [ %159, %165 ]
%183 = phi i32 [ %160, %171 ], [ %158, %168 ], [ %158, %165 ]
%184 = sext i32 %182 to i64
%185 = sext i32 %183 to i64
br label %186
186: ; preds = %181, %150
%187 = phi i64 [ %185, %181 ], [ %130, %150 ]
%188 = phi i64 [ %184, %181 ], [ %127, %150 ]
%189 = getelementptr inbounds double, double* %2, i64 %188
store double %129, double* %189
%190 = getelementptr inbounds double, double* %4, i64 %187
store double %132, double* %190
%191 = add nsw i32 %126, %14
%192 = add nsw i32 %125, %15
br label %193
193: ; preds = %149, %186
%194 = phi i32 [ %126, %149 ], [ %191, %186 ]
%195 = phi i32 [ %125, %149 ], [ %192, %186 ]
%196 = add nuw nsw i32 %124, 1
%197 = icmp eq i32 %196, %0
br i1 %197, label %198, label %123
198: ; preds = %193, %108, %113, %29, %6
ret void
}