// File: /workspace/github_cpp_makefile_star2_O3/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 %r13
pushq %r12
pushq %rbx
subq $0xd0, %rsp
movq %rdi, %r14
movq 0x8(%rdi), %rax
movq 0x8(%rax), %rbx
xorps %xmm0, %xmm0
leaq 0x10(%rsp), %rdi
movaps %xmm0, (%rdi)
movslq %ebx, %r15
movl $0x1, %edx
movq %r15, %rsi
callq 0xdbd0
movq 0x8(%r14), %r12
movq 0x8(%r12), %rsi
cmpq %rsi, 0x18(%rsp)
je 0xea96
leaq 0x10(%rsp), %rdi
movl $0x1, %edx
callq 0xdbd0
movq 0x18(%rsp), %rsi
testq %rsi, %rsi
jle 0xead2
movq 0x10(%rsp), %rax
movq (%r12), %rcx
movq 0x8(%r12), %rdx
leaq (%rcx,%rdx,4), %rdx
xorl %edi, %edi
movss (%rcx,%rdi,4), %xmm0
mulss %xmm0, %xmm0
movss (%rdx,%rdi,4), %xmm1
mulss %xmm1, %xmm1
addss %xmm0, %xmm1
movss %xmm1, (%rax,%rdi,4)
incq %rdi
cmpq %rdi, %rsi
jne 0xeaaf
xorps %xmm0, %xmm0
leaq 0x20(%rsp), %r12
movaps %xmm0, (%r12)
movl $0x3, %edx
movq %r12, %rdi
movq %r15, %rsi
callq 0xdc20
movq 0x8(%r14), %rax
movq %r12, 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 %r12, 0x18(%r8)
xorps %xmm0, %xmm0
movups %xmm0, 0x20(%r8)
movq %rdi, 0x30(%r8)
movq (%rax), %rax
leaq 0xa8(%rsp), %rcx
movq %rax, (%rcx)
movq %rdx, 0x8(%rcx)
leaq 0xb8(%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(%r14), %rsi
addq $0x10, %rsi
leaq 0x30(%rsp), %rdi
callq 0xda20
shlq $0x20, %rbx
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
testq %rcx, %rcx
jle 0xebea
movss 0x50(%rsp,%rsi,4), %xmm0
xorl %edi, %edi
movss (%rax,%rdi,4), %xmm1
subss %xmm0, %xmm1
movss %xmm1, (%rax,%rdi,4)
incq %rdi
cmpq %rdi, %rcx
jne 0xebd4
incq %rsi
addq %rdx, %rax
cmpq $0x3, %rsi
jne 0xebc7
xorps %xmm0, %xmm0
leaq 0x70(%rsp), %rdi
movaps %xmm0, (%rdi)
movl $0x1, %edx
movq %r15, %rsi
callq 0xdbd0
movq 0x18(%rsp), %rax
testq %rax, %rax
jle 0xec66
movq 0x8(%r14), %rcx
movq 0x10(%rcx), %rcx
movss (%rcx), %xmm0
movq 0x10(%rsp), %rdx
movss (%rdx), %xmm1
movq 0x70(%rsp), %rsi
xorl %edi, %edi
movss 0x163c8(%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 0xec3c
movq 0x28(%rsp), %r12
movabsq $-0x100000000, %rax     # imm = 0xFFFFFFFF00000000
addq %rax, %rbx
sarq $0x20, %rbx
movq %r12, %r13
subq %rbx, %r13
shlq $0x2, %r13
addq 0x20(%rsp), %r13
leaq 0x10(%r14), %r15
movq %rbx, %rax
cmpq %rbx, 0x18(%r14)
je 0xecac
movl $0x3, %edx
movq %r15, %rdi
movq %rbx, %rsi
callq 0xdc20
movq 0x18(%r14), %rax
movq (%r15), %rcx
movl %eax, %edx
negl %edx
andl $0x3, %edx
shlq $0x2, %r12
leaq (,%rax,4), %rsi
xorl %edi, %edi
xorl %r8d, %r8d
testq %rdi, %rdi
jle 0xece4
xorl %r9d, %r9d
movss (%r13,%r9,4), %xmm0
movss %xmm0, (%rcx,%r9,4)
incq %r9
cmpq %r9, %rdi
jne 0xeccf
movq %rax, %r11
subq %rdi, %r11
andq $-0x4, %r11
leaq (%r11,%rdi), %r9
movq %rdi, %r10
testq %r11, %r11
jle 0xed20
movups (%r13,%r10,4), %xmm0
movaps %xmm0, (%rcx,%r10,4)
addq $0x4, %r10
cmpq %r9, %r10
jl 0xecfa
jmp 0xed20
movss (%r13,%r9,4), %xmm0
movss %xmm0, (%rcx,%r9,4)
incq %r9
cmpq %rax, %r9
jl 0xed10
leaq (%rdi,%rdx), %r9
addq $0x3, %r9
addq %rdx, %rdi
cmovnsq %rdi, %r9
andq $-0x4, %r9
subq %r9, %rdi
cmpq %rdi, %rax
cmovlq %rax, %rdi
incq %r8
addq %r12, %r13
addq %rsi, %rcx
cmpq $0x3, %r8
jne 0xecc7
movq 0x78(%rsp), %r12
subq %rbx, %r12
shlq $0x2, %r12
addq 0x70(%rsp), %r12
leaq 0x20(%r14), %r15
cmpq %rbx, 0x28(%r14)
je 0xed84
movl $0x1, %edx
movq %r15, %rdi
movq %rbx, %rsi
callq 0xdbd0
movq 0x28(%r14), %rbx
movq (%r15), %rax
leaq 0x3(%rbx), %rcx
testq %rbx, %rbx
cmovnsq %rbx, %rcx
andq $-0x4, %rcx
cmpq $0x4, %rbx
jl 0xedb0
xorl %edx, %edx
movups (%r12,%rdx,4), %xmm0
movaps %xmm0, (%rax,%rdx,4)
addq $0x4, %rdx
cmpq %rcx, %rdx
jl 0xed9e
cmpq %rbx, %rcx
jge 0xedc8
movss (%r12,%rcx,4), %xmm0
movss %xmm0, (%rax,%rcx,4)
incq %rcx
cmpq %rcx, %rbx
jne 0xedb5
movq 0x70(%rsp), %rdi
callq 0xd740
movq 0x20(%rsp), %rdi
callq 0xd740
movq 0x10(%rsp), %rdi
callq 0xd740
addq $0xd0, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
jmp 0xedfd
jmp 0xedfd
jmp 0xee1f
movq %rax, %rbx
movq 0x70(%rsp), %rdi
callq 0xd740
jmp 0xee13
jmp 0xee10
jmp 0xee10
movq %rax, %rbx
movq 0x20(%rsp), %rdi
callq 0xd740
jmp 0xee22
movq %rax, %rbx
movq 0x10(%rsp), %rdi
callq 0xd740
movq %rbx, %rdi
callq 0xdb20