// File: /workspace/github_cpp_makefile_star2_O3/DoubleString[P]RtConverter/src/Rtklib/lambda.cpp
// Function: bamboo::reduction(int, double*, double*, double*)
static void reduction(int n, double *L, double *D, double *Z)
{
    int i,j,k;
    double del;
    
    j=n-2; k=n-2;
    while (j>=0) {
        if (j<=k) for (i=j+1;i<n;i++) gauss(n,L,Z,i,j);
        del=D[j]+L[j+1+j*n]*L[j+1+j*n]*D[j+1];
        if (del+1E-6<D[j+1]) { /* compared considering numerical error */
            perm(n,L,D,j,del,Z);
            k=j; j=n-2;
        }
        else j--;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %rcx, -0x40(%rbp)
cmpl $0x2, %edi
jl 0x32d61
leal -0x2(%rdi), %eax
movl %edi, %r11d
leaq (,%r11,8), %r12
movl %eax, %r8d
movl %eax, -0x2c(%rbp)
movl %eax, %ecx
movq %rdx, -0x68(%rbp)
movq %rsi, -0x48(%rbp)
movq %rdi, -0x80(%rbp)
movq %r12, -0x78(%rbp)
movq %r11, -0x70(%rbp)
movl %r8d, -0x30(%rbp)
cmpl %r8d, %ecx
setle %al
movq %rcx, -0x60(%rbp)
leal 0x1(%rcx), %edx
cmpl %edi, %edx
setl %cl
andb %al, %cl
movq %rdx, -0x58(%rbp)
movl %edx, %eax
movq %rax, -0x50(%rbp)
cmpb $0x1, %cl
jne 0x32c03
movq -0x60(%rbp), %rax
imull %edi, %eax
movq -0x40(%rbp), %rdx
leaq (%rdx,%rax,8), %r15
movq -0x48(%rbp), %rsi
leaq (%rsi,%rax,8), %rcx
movq %rcx, -0x88(%rbp)
movq -0x58(%rbp), %r8
movslq %r8d, %r14
movq -0x50(%rbp), %r9
leaq (,%r9,8), %rcx
leaq (%rcx,%rax,8), %rbx
addq %rsi, %rbx
leaq (%rsi,%r9,8), %rsi
movl %edi, %r10d
imull %r8d, %r10d
movq %r12, %r13
imulq %r9, %r13
addq %rdx, %r13
movl %r10d, -0x34(%rbp)
movq -0x88(%rbp), %rax
movq %r9, -0x90(%rbp)
movsd (%rax,%r9,8), %xmm0
addsd 0x39113(%rip), %xmm0    # 0x6bc78
movq %rsi, %r12
callq 0x8ac0
movl -0x34(%rbp), %r10d
movq %r12, %rsi
movq -0x70(%rbp), %r11
movq -0x78(%rbp), %r12
movq -0x80(%rbp), %rdi
cvttsd2si %xmm0, %ecx
testl %ecx, %ecx
je 0x32bdf
movl %r10d, %eax
leaq (%rsi,%rax,8), %rax
xorps %xmm0, %xmm0
cvtsi2sd %ecx, %xmm0
xorpd 0x37f32(%rip), %xmm0    # 0x6aad0
xorl %ecx, %ecx
movsd (%rax,%rcx,8), %xmm1
mulsd %xmm0, %xmm1
addsd (%rbx,%rcx,8), %xmm1
movsd %xmm1, (%rbx,%rcx,8)
incq %rcx
leal (%rcx,%r14), %edx
cmpl %edi, %edx
jl 0x32ba0
xorl %eax, %eax
movsd (%r13,%rax,8), %xmm1
mulsd %xmm0, %xmm1
addsd (%r15,%rax,8), %xmm1
movsd %xmm1, (%r15,%rax,8)
incq %rax
cmpq %rax, %r11
jne 0x32bc0
movq -0x90(%rbp), %r9
incq %r9
incq %r14
addq $0x8, %rbx
addq $0x8, %rsi
addl %edi, %r10d
addq %r12, %r13
cmpl %edi, %r9d
jl 0x32b45
movq -0x60(%rbp), %r14
movl %r14d, %ecx
movq -0x68(%rbp), %rdx
movsd (%rdx,%rcx,8), %xmm0
movl %r14d, %eax
imull %edi, %eax
movq -0x58(%rbp), %r15
leal (%r15,%rax), %r8d
movq -0x48(%rbp), %rsi
movsd (%rsi,%r8,8), %xmm1
movapd %xmm1, %xmm2
mulsd %xmm1, %xmm2
movq -0x50(%rbp), %rbx
movsd (%rdx,%rbx,8), %xmm3
mulsd %xmm3, %xmm2
addsd %xmm0, %xmm2
movapd %xmm2, %xmm4
addsd 0x39ff0(%rip), %xmm4    # 0x6cc40
ucomisd %xmm4, %xmm3
jbe 0x32d4d
divsd %xmm2, %xmm0
mulsd %xmm3, %xmm1
divsd %xmm2, %xmm1
mulsd %xmm0, %xmm3
movsd %xmm3, (%rdx,%rcx,8)
movsd %xmm2, (%rdx,%rbx,8)
testl %r14d, %r14d
je 0x32cbd
movq %rsi, %r9
movq %rcx, %r10
movsd (%r9,%rcx,8), %xmm2
movsd (%r9,%rbx,8), %xmm3
movapd %xmm0, %xmm4
mulsd %xmm2, %xmm4
mulsd (%rsi,%r8,8), %xmm2
movapd %xmm1, %xmm5
mulsd %xmm3, %xmm5
subsd %xmm2, %xmm3
movsd %xmm3, (%r9,%rcx,8)
addsd %xmm4, %xmm5
movsd %xmm5, (%r9,%rbx,8)
addq %r12, %r9
decq %r10
jne 0x32c7f
movsd %xmm1, (%rsi,%r8,8)
leal 0x2(%r14), %ecx
movl %eax, %eax
cmpl %edi, %ecx
jge 0x32d12
movl %r15d, %r9d
imull %edi, %r9d
movl %ecx, %ecx
leaq (,%rcx,8), %r8
leaq (%r8,%r9,8), %r9
addq %rsi, %r9
leaq (%r8,%rax,8), %r10
addq %rsi, %r10
xorl %ebx, %ebx
movsd (%r10,%rbx,8), %xmm0
movsd (%r9,%rbx,8), %xmm1
movsd %xmm1, (%r10,%rbx,8)
movsd %xmm0, (%r9,%rbx,8)
incq %rbx
leal (%rbx,%rcx), %r8d
cmpl %edi, %r8d
jl 0x32cee
imull %edi, %r15d
movq -0x40(%rbp), %rcx
leaq (%rcx,%rax,8), %rax
leaq (%rcx,%r15,8), %rcx
xorl %r8d, %r8d
movsd (%rax,%r8,8), %xmm0
movsd (%rcx,%r8,8), %xmm1
movsd %xmm1, (%rax,%r8,8)
movsd %xmm0, (%rcx,%r8,8)
incq %r8
cmpq %r8, %r11
jne 0x32d25
movl -0x2c(%rbp), %eax
movl %r14d, %r8d
jmp 0x32d57
decl %r14d
movl %r14d, %eax
movl -0x30(%rbp), %r8d
movl %eax, %ecx
testl %eax, %eax
jns 0x32acd
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq