// File: schuyler[P]quickfix/include/quickfix/particle_filter.h
// Function: ParticleFilter<float, 2>::Reset()
void ParticleFilter<F,D>::Reset() {
    Array<F, 1, D> range = bound.row(1) - bound.row(0);
    // FIXME: clean all this up
    Array<F, Dynamic, D> particles(N, D);
    particles << (Particles::Random(N, D).array() * 0.5 + 0.5);
    particles.col(0) = particles.col(0) * range(0) + bound(0, 0);
    particles.col(1) = particles.col(1) * range(1) + bound(0, 1);
    P.resize(N, D);
    P << particles.matrix();
    W.resize(N, 1);
    W << Weights::Zero(N, 1);
}

// Assembly:
subq $0x4f8, %rsp            # imm = 0x4F8
movq %rdi, 0x4f0(%rsp)
movq 0x4f0(%rsp), %rsi
movq %rsi, 0x60(%rsp)
addq $0x40, %rsi
movq %rsi, 0x40(%rsp)
leaq 0x450(%rsp), %rdi
movq %rdi, 0x48(%rsp)
movl $0x1, %edx
callq 0x2a0da0
movq 0x40(%rsp), %rsi
xorl %eax, %eax
movl %eax, %edx
leaq 0x420(%rsp), %rdi
movq %rdi, 0x50(%rsp)
callq 0x2a0da0
movq 0x48(%rsp), %rsi
movq 0x50(%rsp), %rdx
leaq 0x480(%rsp), %rdi
movq %rdi, 0x58(%rsp)
callq 0x2b8600
movq 0x58(%rsp), %rsi
leaq 0x4e8(%rsp), %rdi
callq 0x297150
movq 0x60(%rsp), %rsi
addq $0x30, %rsi
movl $0x2, 0x404(%rsp)
leaq 0x408(%rsp), %rdi
leaq 0x404(%rsp), %rdx
callq 0x290f20
movq 0x60(%rsp), %rax
movslq 0x30(%rax), %rsi
leaq 0x340(%rsp), %rdi
movl $0x2, %edx
callq 0x2901c0
jmp 0x31ecfb
leaq 0x350(%rsp), %rdi
leaq 0x340(%rsp), %rsi
callq 0x291b20
jmp 0x31ed12
movabsq $0x3fe0000000000000, %rax # imm = 0x3FE0000000000000
movq %rax, 0x328(%rsp)
leaq 0x360(%rsp), %rdi
leaq 0x350(%rsp), %rsi
leaq 0x328(%rsp), %rdx
callq 0x2b2ab0
jmp 0x31ed43
movabsq $0x3fe0000000000000, %rax # imm = 0x3FE0000000000000
movq %rax, 0x320(%rsp)
leaq 0x390(%rsp), %rdi
leaq 0x360(%rsp), %rsi
leaq 0x320(%rsp), %rdx
callq 0x2aeda0
jmp 0x31ed74
leaq 0x3e0(%rsp), %rdi
leaq 0x408(%rsp), %rsi
leaq 0x390(%rsp), %rdx
callq 0x2a61b0
jmp 0x31ed93
leaq 0x3e0(%rsp), %rdi
callq 0x2a7b60
xorl %eax, %eax
movl %eax, %edx
leaq 0x228(%rsp), %rdi
leaq 0x408(%rsp), %rsi
callq 0x2b9040
jmp 0x31edbb
xorl %eax, %eax
movl %eax, %esi
leaq 0x4e8(%rsp), %rdi
callq 0x2a0360
movq %rax, 0x38(%rsp)
jmp 0x31edd3
movq 0x38(%rsp), %rdx
leaq 0x260(%rsp), %rdi
leaq 0x228(%rsp), %rsi
callq 0x2ad090
jmp 0x31edef
movq 0x60(%rsp), %rdi
addq $0x40, %rdi
xorl %eax, %eax
movl %eax, %edx
movq %rdx, %rsi
callq 0x291740
movq %rax, 0x30(%rsp)
jmp 0x31ee0b
movq 0x30(%rsp), %rdx
leaq 0x2b0(%rsp), %rdi
leaq 0x260(%rsp), %rsi
callq 0x2b82c0
jmp 0x31ee27
xorl %eax, %eax
movl %eax, %edx
leaq 0x1f0(%rsp), %rdi
leaq 0x408(%rsp), %rsi
callq 0x2b9040
jmp 0x31ee42
leaq 0x1f0(%rsp), %rdi
leaq 0x2b0(%rsp), %rsi
callq 0x2ac830
jmp 0x31ee59
leaq 0xf8(%rsp), %rdi
leaq 0x408(%rsp), %rsi
movl $0x1, %edx
callq 0x2b9040
jmp 0x31ee75
leaq 0x4e8(%rsp), %rdi
movl $0x1, %esi
callq 0x2a0360
movq %rax, 0x28(%rsp)
jmp 0x31ee8e
movq 0x28(%rsp), %rdx
leaq 0x130(%rsp), %rdi
leaq 0xf8(%rsp), %rsi
callq 0x2ad090
jmp 0x31eeaa
movq 0x60(%rsp), %rdi
addq $0x40, %rdi
xorl %eax, %eax
movl %eax, %esi
movl $0x1, %edx
callq 0x291740
movq %rax, 0x20(%rsp)
jmp 0x31eec8
movq 0x20(%rsp), %rdx
leaq 0x180(%rsp), %rdi
leaq 0x130(%rsp), %rsi
callq 0x2b82c0
jmp 0x31eee4
leaq 0xc0(%rsp), %rdi
leaq 0x408(%rsp), %rsi
movl $0x1, %edx
callq 0x2b9040
jmp 0x31ef00
leaq 0xc0(%rsp), %rdi
leaq 0x180(%rsp), %rsi
callq 0x2ac830
jmp 0x31ef17
movq 0x60(%rsp), %rax
movq %rax, %rdi
addq $0x8, %rdi
movslq 0x30(%rax), %rsi
movl $0x2, %edx
callq 0x2928e0
jmp 0x31ef33
movq 0x60(%rsp), %rax
addq $0x8, %rax
movq %rax, 0x10(%rsp)
leaq 0x408(%rsp), %rdi
callq 0x2929b0
movq %rax, 0x18(%rsp)
jmp 0x31ef55
movq 0x10(%rsp), %rsi
movq 0x18(%rsp), %rax
movq %rax, 0x98(%rsp)
leaq 0xa0(%rsp), %rdi
leaq 0x98(%rsp), %rdx
callq 0x2b2ef0
jmp 0x31ef7e
leaq 0xa0(%rsp), %rdi
callq 0x2b5350
movq 0x60(%rsp), %rax
movq %rax, %rdi
addq $0x18, %rdi
movslq 0x30(%rax), %rsi
movl $0x1, %edx
callq 0x2b8a80
jmp 0x31efa7
movq 0x60(%rsp), %rax
movq %rax, %rcx
addq $0x18, %rcx
movq %rcx, 0x8(%rsp)
movslq 0x30(%rax), %rsi
leaq 0x68(%rsp), %rdi
movl $0x1, %edx
callq 0x293190
jmp 0x31efcd
movq 0x8(%rsp), %rsi
leaq 0x78(%rsp), %rdi
leaq 0x68(%rsp), %rdx
callq 0x2b8350
jmp 0x31efe3
leaq 0x78(%rsp), %rdi
callq 0x2b0550
leaq 0x408(%rsp), %rdi
callq 0x2aab70
addq $0x4f8, %rsp            # imm = 0x4F8
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x338(%rsp)
movl %eax, 0x334(%rsp)
leaq 0x408(%rsp), %rdi
callq 0x2aab70
movq 0x338(%rsp), %rdi
callq 0x2b6590