// File: /workspace/github_cpp_makefile_star2_O1/schuyler[P]quickfix/include/quickfix/difference.h
// Function: Beacon<float, 2>::DifferenceSolver::setCoefficients()
void Beacon<F, D>::DifferenceSolver::setCoefficients() {
    int n = B.A.rows();

    Matrix<F, Dynamic, 1> K(n, 1);
    K = B.A.array().pow(2.0).matrix().rowwise().sum();

    Matrix<F, Dynamic, D+1> G_(n, D+1);
    G_ << B.A, B.R;

    Matrix<F, 1, D+1> G_0 = G_.row(0);
    G_ = G_.rowwise() - G_0;

    Matrix<F, Dynamic, 1> h_(n, 1);
    h_ << -(1.0 / 2.0) * (
        ((B.R.array() - B.R[0]).pow(2.0) + K(0, 0)).matrix() - K
    );

    G = G_.bottomRows(n-1);
    h = h_.bottomRows(n-1);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0xd8, %rsp
movq %rdi, %rbx
movq 0x8(%rdi), %rax
movq 0x8(%rax), %r12
xorps %xmm0, %xmm0
leaq 0x10(%rsp), %rdi
movaps %xmm0, (%rdi)
movslq %r12d, %r14
movl $0x1, %edx
movq %r14, %rsi
callq 0xdc00
movq 0x8(%rbx), %r15
movq 0x8(%r15), %rsi
cmpq %rsi, 0x18(%rsp)
je 0xeace
leaq 0x10(%rsp), %rdi
movl $0x1, %edx
callq 0xdc00
movq 0x18(%rsp), %rax
testq %rax, %rax
jle 0xeb0d
movq 0x10(%rsp), %rcx
movq (%r15), %rdx
movq 0x8(%r15), %rsi
leaq (%rdx,%rsi,4), %rsi
xorl %edi, %edi
movss (%rdx,%rdi,4), %xmm0
mulss %xmm0, %xmm0
movss (%rsi,%rdi,4), %xmm1
mulss %xmm1, %xmm1
addss %xmm0, %xmm1
movss %xmm1, (%rcx,%rdi,4)
incq %rdi
cmpq %rdi, %rax
jne 0xeaea
xorps %xmm0, %xmm0
leaq 0x20(%rsp), %r15
movaps %xmm0, (%r15)
movl $0x3, %edx
movq %r15, %rdi
movq %r14, %rsi
callq 0xdc60
movq 0x8(%rbx), %rax
movq %r15, 0x30(%rsp)
movq $0x0, 0x38(%rsp)
movl $0x2, %ecx
movq %rcx, 0x40(%rsp)
movq 0x8(%rax), %rdx
movq %rdx, 0x48(%rsp)
movq 0x20(%rsp), %rsi
movq 0x28(%rsp), %rdi
leaq 0x70(%rsp), %r8
movq %rsi, (%r8)
movq %rdx, 0x8(%r8)
movq %rcx, 0x10(%r8)
movq %r15, 0x18(%r8)
xorps %xmm0, %xmm0
movups %xmm0, 0x20(%r8)
movq %rdi, 0x30(%r8)
movq (%rax), %rax
leaq 0xb0(%rsp), %rcx
movq %rax, (%rcx)
movq %rdx, 0x8(%rcx)
leaq 0xc0(%rsp), %rax
movq %rsi, (%rax)
movq %rdi, 0x10(%rax)
leaq 0x50(%rsp), %rdi
movq %rax, (%rdi)
movq %rcx, 0x8(%rdi)
leaq 0xf(%rsp), %rax
movq %rax, 0x10(%rdi)
movq %r8, 0x18(%rdi)
callq 0xd090
movq 0x8(%rbx), %rsi
addq $0x10, %rsi
leaq 0x30(%rsp), %rdi
callq 0xda30
movq 0x20(%rsp), %rax
movq 0x28(%rsp), %rcx
movss (%rax), %xmm0
movss %xmm0, 0x50(%rsp)
movss (%rax,%rcx,4), %xmm0
movss %xmm0, 0x54(%rsp)
movss (%rax,%rcx,8), %xmm0
movss %xmm0, 0x58(%rsp)
leaq (,%rcx,4), %rdx
xorl %esi, %esi
movq %rax, %rdi
testq %rcx, %rcx
jle 0xec26
movss 0x50(%rsp,%rsi,4), %xmm0
xorl %r8d, %r8d
movss (%rdi,%r8,4), %xmm1
subss %xmm0, %xmm1
movss %xmm1, (%rax,%r8,4)
incq %r8
cmpq %r8, %rcx
jne 0xec0e
incq %rsi
addq %rdx, %rdi
addq %rdx, %rax
cmpq $0x3, %rsi
jne 0xec00
xorps %xmm0, %xmm0
leaq 0x70(%rsp), %rdi
movaps %xmm0, (%rdi)
movl $0x1, %edx
movq %r14, %rsi
callq 0xdc00
movq 0x18(%rsp), %rax
testq %rax, %rax
jle 0xeca5
movq 0x8(%rbx), %rcx
movq 0x10(%rcx), %rcx
movss (%rcx), %xmm0
movq 0x10(%rsp), %rdx
movss (%rdx), %xmm1
movq 0x70(%rsp), %rsi
xorl %edi, %edi
movss 0x16389(%rip), %xmm2    # 0x25004
movss (%rcx,%rdi,4), %xmm3
subss %xmm0, %xmm3
mulss %xmm3, %xmm3
movaps %xmm1, %xmm4
subss (%rdx,%rdi,4), %xmm4
addss %xmm3, %xmm4
mulss %xmm2, %xmm4
movss %xmm4, (%rsi,%rdi,4)
incq %rdi
cmpq %rdi, %rax
jne 0xec7b
movq 0x28(%rsp), %r15
decl %r12d
movslq %r12d, %r14
movq %r15, %r12
subq %r14, %r12
shlq $0x2, %r12
addq 0x20(%rsp), %r12
cmpq %r14, 0x18(%rbx)
je 0xecd6
leaq 0x10(%rbx), %rdi
movl $0x3, %edx
movq %r14, %rsi
callq 0xdc60
movq 0x10(%rbx), %rax
movq 0x18(%rbx), %rcx
movl %ecx, %edx
negl %edx
andl $0x3, %edx
shlq $0x2, %r15
leaq (,%rcx,4), %rsi
xorl %edi, %edi
xorl %r8d, %r8d
testq %rdi, %rdi
jle 0xed12
xorl %r9d, %r9d
movss (%r12,%r9,4), %xmm0
movss %xmm0, (%rax,%r9,4)
incq %r9
cmpq %r9, %rdi
jne 0xecfe
movq %rcx, %r11
subq %rdi, %r11
andq $-0x4, %r11
leaq (%r11,%rdi), %r9
movq %rdi, %r10
testq %r11, %r11
jle 0xed4c
movups (%r12,%r10,4), %xmm0
movaps %xmm0, (%rax,%r10,4)
addq $0x4, %r10
cmpq %r9, %r10
jl 0xed28
jmp 0xed4c
movss (%r12,%r9,4), %xmm0
movss %xmm0, (%rax,%r9,4)
incq %r9
cmpq %rcx, %r9
jl 0xed3d
leaq (%rdi,%rdx), %r9
addq $0x3, %r9
addq %rdx, %rdi
cmovnsq %rdi, %r9
andq $-0x4, %r9
subq %r9, %rdi
cmpq %rdi, %rcx
cmovlq %rcx, %rdi
incq %r8
addq %r15, %r12
addq %rsi, %rax
cmpq $0x3, %r8
jne 0xecf6
movq 0x78(%rsp), %r15
subq %r14, %r15
shlq $0x2, %r15
addq 0x70(%rsp), %r15
cmpq %r14, 0x28(%rbx)
je 0xeda9
leaq 0x20(%rbx), %rdi
movl $0x1, %edx
movq %r14, %rsi
callq 0xdc00
movq 0x20(%rbx), %rax
movq 0x28(%rbx), %rcx
leaq 0x3(%rcx), %rdx
testq %rcx, %rcx
cmovnsq %rcx, %rdx
andq $-0x4, %rdx
cmpq $0x4, %rcx
jl 0xedda
xorl %esi, %esi
movups (%r15,%rsi,4), %xmm0
movaps %xmm0, (%rax,%rsi,4)
addq $0x4, %rsi
cmpq %rdx, %rsi
jl 0xedc8
cmpq %rcx, %rdx
jge 0xedf2
movss (%r15,%rdx,4), %xmm0
movss %xmm0, (%rax,%rdx,4)
incq %rdx
cmpq %rdx, %rcx
jne 0xeddf
movq 0x70(%rsp), %rdi
callq 0xd740
movq 0x20(%rsp), %rdi
callq 0xd740
movq 0x10(%rsp), %rdi
callq 0xd740
addq $0xd8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
jmp 0xee25
jmp 0xee25
jmp 0xee47
movq %rax, %rbx
movq 0x70(%rsp), %rdi
callq 0xd740
jmp 0xee3b
jmp 0xee38
jmp 0xee38
movq %rax, %rbx
movq 0x20(%rsp), %rdi
callq 0xd740
jmp 0xee4a
movq %rax, %rbx
movq 0x10(%rsp), %rdi
callq 0xd740
movq %rbx, %rdi
callq 0xdb50