// File: /workspace/github_cpp_makefile_star2_O2/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 $0x288, %rsp            # imm = 0x288
movq %rdi, %rbx
movq 0x8(%rdi), %rax
movl 0x8(%rax), %eax
leaq 0xc(%rsp), %rsi
movl %eax, (%rsi)
leaq 0x58(%rsp), %r15
movl $0x1, (%r15)
leaq 0x38(%rsp), %r14
movq %r14, %rdi
movq %r15, %rdx
callq 0x4f390
movq 0x8(%rbx), %rax
movq 0x8(%rax), %rcx
movq %rax, 0x8(%r15)
movq %rcx, 0x10(%r15)
movl $0x40000000, 0x1c(%r15) # imm = 0x40000000
leaq 0x58(%rsp), %rsi
movq %r14, %rdi
callq 0x4c570
leaq 0x58(%rsp), %rdx
movl $0x3, (%rdx)
leaq 0x10(%rsp), %rdi
leaq 0xc(%rsp), %rsi
callq 0x4ca60
movq 0x8(%rbx), %rdx
leaq 0x58(%rsp), %rdi
leaq 0x10(%rsp), %r15
movq %r15, %rsi
callq 0x4e9c0
movq 0x8(%rbx), %rsi
addq $0x10, %rsi
leaq 0x58(%rsp), %rdi
callq 0x4f4b0
movq 0x10(%rsp), %rax
leaq 0x58(%rsp), %rsi
movq %rax, (%rsi)
movq %r15, 0x10(%rsi)
xorps %xmm0, %xmm0
movups %xmm0, 0x18(%rsi)
movq $0x1, 0x28(%rsi)
leaq 0x4c(%rsp), %r12
movq %r12, %rdi
callq 0x4c490
movq 0x18(%rsp), %rax
leaq 0x58(%rsp), %rsi
movq %r15, (%rsi)
movq %r12, 0x8(%rsi)
movq %rax, 0x10(%rsi)
movq %r15, %rdi
callq 0x4c480
leaq 0x58(%rsp), %rdx
movl $0x1, (%rdx)
leaq 0x20(%rsp), %rdi
leaq 0xc(%rsp), %rsi
callq 0x4f390
movabsq $-0x4020000000000000, %rax # imm = 0xBFE0000000000000
movq %rax, 0x30(%rsp)
movq 0x8(%rbx), %rax
leaq 0x10(%rax), %rcx
movq 0x10(%rax), %rdx
movq 0x18(%rax), %rax
movss (%rdx), %xmm0
leaq 0x248(%rsp), %rsi
movq %rcx, 0x8(%rsi)
movq %rax, 0x10(%rsi)
movss %xmm0, 0x1c(%rsi)
movq %rax, 0x28(%rsi)
movl $0x40000000, 0x34(%rsi) # imm = 0x40000000
movq 0x38(%rsp), %rdx
leaq 0x110(%rsp), %rdi
callq 0x4c710
leaq 0x170(%rsp), %rdi
leaq 0x110(%rsp), %rsi
callq 0x4e5d0
leaq 0x1d8(%rsp), %rdi
leaq 0x170(%rsp), %rsi
callq 0x4e5d0
leaq 0x1d0(%rsp), %rdx
movq %r14, 0x68(%rdx)
leaq 0x58(%rsp), %rdi
leaq 0x30(%rsp), %rsi
callq 0x4ee40
leaq 0xf0(%rsp), %rdi
leaq 0x20(%rsp), %r14
leaq 0x58(%rsp), %rdx
movq %r14, %rsi
callq 0x4c100
movslq 0xc(%rsp), %rax
decq %rax
movq 0x18(%rsp), %rcx
movq %rcx, %rdx
subq %rax, %rdx
leaq (,%rdx,4), %rdi
addq 0x10(%rsp), %rdi
leaq 0x58(%rsp), %rsi
movq %rdi, (%rsi)
movq %rax, 0x8(%rsi)
movq %r15, 0x18(%rsi)
movq %rdx, 0x20(%rsi)
andq $0x0, 0x28(%rsi)
movq %rcx, 0x30(%rsi)
leaq 0x10(%rbx), %rdi
callq 0x4f810
movslq 0xc(%rsp), %rax
decq %rax
movq 0x28(%rsp), %rcx
movq %rcx, %rdx
subq %rax, %rdx
leaq (,%rdx,4), %rdi
addq 0x20(%rsp), %rdi
leaq 0x58(%rsp), %rsi
movq %rdi, (%rsi)
movq %rax, 0x8(%rsi)
movq %r14, 0x18(%rsi)
movq %rdx, 0x20(%rsi)
movq %rcx, 0x30(%rsi)
addq $0x20, %rbx
movq %rbx, %rdi
callq 0x4f750
movq 0x20(%rsp), %rdi
callq 0x4e5b0
movq 0x10(%rsp), %rdi
callq 0x4e5b0
movq 0x38(%rsp), %rdi
callq 0x4e5b0
addq $0x288, %rsp            # imm = 0x288
popq %rbx
popq %r12
popq %r14
popq %r15
retq
jmp 0x509d1
jmp 0x509d1
jmp 0x509c5
jmp 0x509c5
jmp 0x509c5
jmp 0x509c5
movq %rax, %rbx
jmp 0x509de
jmp 0x509cc
movq %rax, %rbx
jmp 0x509e8
movq %rax, %rbx
movq 0x20(%rsp), %rdi
callq 0x4e5b0
movq 0x10(%rsp), %rdi
callq 0x4e5b0
movq 0x38(%rsp), %rdi
callq 0x4e5b0
movq %rbx, %rdi
callq 0x4f920