// File: /workspace/github_cpp_makefile_star2_O1/bonetblai[P]mdp-engine/race/./race.h
// Function: problem_t::next(state_t const&, int, std::vector<std::pair<state_t, float>, std::allocator<std::pair<state_t, float>>>&) const
virtual void next(const state_t &s, Problem::action_t a, std::vector<std::pair<state_t, float> > &outcomes) const {
        ++expansions_;
        outcomes.clear();
        if( s == init_ ) {
            outcomes.reserve(inits_.size());
            for( size_t j = 0; j < inits_.size(); ++j )
                outcomes.push_back(std::make_pair(inits_[j], 1.0 / (float)inits_.size()));
        } else {
            outcomes.reserve(2);
            size_t off = s.x() * cols_ + s.y();
            size_t key = (((unsigned short)s.dx()) << 16) | (unsigned short)s.dy();
            ecache_t::const_iterator ci = ecache_[a][off].find(key);
            if( ci != ecache_[a][off].end() ) {
                if( p_ > 0.0 ) {
                    outcomes.push_back(std::make_pair(ci->second.first, p_));
                    assert(grid_.valid_pos(ci->second.first.x(), ci->second.first.y()));
                }
                if( 1 - p_ > 0.0 ) {
                    outcomes.push_back(std::make_pair(ci->second.second, 1 - p_));
                    assert(grid_.valid_pos(ci->second.second.x(), ci->second.second.y()));
                }
            } else {
                std::pair<state_t, state_t> entry;
                short ox = 0, oy = 0, ux = (a/3) - 1, uy = (a%3) - 1;
                if( p_ > 0.0 ) {
                    int dx = s.dx() + ux, dy = s.dy() + uy;
                    int x = s.x() + dx, y = s.y() + dy;
                    int rv = grid_.valid_path(s.x(), s.y(), x, y, ox, oy);
                    if( rv == 0 ) {
                        entry.first = state_t(x, y, dx, dy);
                    } else {
                        entry.first = state_t(ox, oy, 0, 0);
                    }
                    assert(grid_.valid_pos(entry.first.x(), entry.first.y()));
                    outcomes.push_back(std::make_pair(entry.first, p_));
                }
                if( 1 - p_ > 0.0 ) {
                    int dx = s.dx(), dy = s.dy();
                    int x = s.x() + dx, y = s.y() + dy;
                    int rv = grid_.valid_path(s.x(), s.y(), x, y, ox, oy);
                    if( rv == 0 ) {
                        entry.second = state_t(x, y, dx, dy);
                    } else {
                        entry.second = state_t(ox, oy, 0, 0);
                    }
                    assert(grid_.valid_pos(entry.first.x(), entry.first.y()));
                    outcomes.push_back(std::make_pair(entry.second, 1 - p_));
                }
                ecache_[a][off].insert(std::make_pair(key, entry));
            }
        }
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rcx, %r14
movl %edx, %ebp
movq %rdi, %rbx
incq 0x10(%rdi)
movq %rsi, %r13
movq (%rcx), %rax
cmpq %rax, 0x8(%rcx)
je 0x9e96
movq %rax, 0x8(%r14)
movzwl (%r13), %eax
cmpw 0x38(%rbx), %ax
jne 0x9f6c
movzwl 0x2(%r13), %eax
cmpw 0x3a(%rbx), %ax
jne 0x9f6c
movzwl 0x4(%r13), %eax
cmpw 0x3c(%rbx), %ax
jne 0x9f6c
movzwl 0x6(%r13), %eax
cmpw 0x3e(%rbx), %ax
jne 0x9f6c
movq 0x48(%rbx), %rsi
subq 0x40(%rbx), %rsi
sarq $0x3, %rsi
movq %r14, %rdi
callq 0xa660
movq 0x40(%rbx), %rax
movq 0x48(%rbx), %rcx
subq %rax, %rcx
je 0xa3ec
sarq $0x3, %rcx
xorl %r12d, %r12d
leaq 0x38(%rsp), %r15
testq %rcx, %rcx
js 0x9f12
xorps %xmm0, %xmm0
cvtsi2ss %rcx, %xmm0
jmp 0x9f2a
movq %rcx, %rdx
shrq %rdx
andl $0x1, %ecx
orq %rdx, %rcx
xorps %xmm0, %xmm0
cvtsi2ss %rcx, %xmm0
addss %xmm0, %xmm0
movss 0x1e0d6(%rip), %xmm1    # 0x28008
divss %xmm0, %xmm1
movq (%rax,%r12,8), %rax
movq %rax, 0x38(%rsp)
movss %xmm1, 0x40(%rsp)
movq %r14, %rdi
movq %r15, %rsi
callq 0xab84
incq %r12
movq 0x40(%rbx), %rax
movq 0x48(%rbx), %rcx
subq %rax, %rcx
sarq $0x3, %rcx
cmpq %rcx, %r12
jb 0x9f03
jmp 0xa3ec
movl $0x2, %esi
movq %r14, %rdi
callq 0xa660
movswq (%r13), %rcx
movq 0x30(%rbx), %rax
movq %rcx, 0x18(%rsp)
imulq %rcx, %rax
movswq 0x2(%r13), %r10
addq %r10, %rax
movzwl 0x4(%r13), %ecx
movq %rcx, %r9
shll $0x10, %ecx
movzwl 0x6(%r13), %edx
movq %rdx, %r15
orl %edx, %ecx
movslq %ecx, %r12
movslq %ebp, %rcx
movq %rcx, 0x30(%rsp)
movq 0x70(%rbx,%rcx,8), %rcx
imulq $0x38, %rax, %rax
movq (%rcx,%rax), %rsi
movq %rax, 0x50(%rsp)
movq 0x8(%rcx,%rax), %rdi
xorl %r11d, %r11d
movq %r12, %rax
xorl %edx, %edx
divq %rdi
movq (%rsi,%rdx,8), %rax
testq %rax, %rax
je 0xa01c
movq (%rax), %r8
movq %rax, %r11
cmpq %r12, 0x8(%r8)
je 0xa01c
movq %rdx, %rcx
movq %r8, %rbp
movq (%r8), %r8
testq %r8, %r8
je 0xa019
movq 0x8(%r8), %rsi
movq %rsi, %rax
xorl %edx, %edx
divq %rdi
movl $0x0, %r11d
cmpq %rcx, %rdx
jne 0xa01c
movq %rbp, %r11
cmpq %r12, %rsi
jne 0x9fed
jmp 0xa01c
xorl %r11d, %r11d
testq %r11, %r11
je 0xa026
movq (%r11), %rbp
jmp 0xa028
xorl %ebp, %ebp
testq %rbp, %rbp
je 0xa127
movss 0x20(%rbx), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm0, %xmm1
jae 0xa09e
movq 0x10(%rbp), %rax
leaq 0x38(%rsp), %rsi
movq %rax, (%rsi)
movss %xmm0, 0x8(%rsi)
movq %r14, %rdi
callq 0xab84
movswl 0x10(%rbp), %eax
testl %eax, %eax
js 0xa3fb
movswl 0x12(%rbp), %ecx
testw %cx, %cx
js 0xa3fb
movq 0x18(%rbx), %rsi
cmpl %eax, 0x10(%rsi)
jle 0xa3fb
movl 0x14(%rsi), %edx
cmpl %ecx, %edx
jle 0xa3fb
movq 0x8(%rsi), %rsi
imull %eax, %edx
movl %ecx, %eax
addq %rdx, %rax
testb $0x1, (%rsi,%rax)
je 0xa3fb
movss 0x20(%rbx), %xmm1
movss 0x1df5d(%rip), %xmm0    # 0x28008
ucomiss %xmm1, %xmm0
jbe 0xa3ec
subss %xmm1, %xmm0
movq 0x18(%rbp), %rax
leaq 0x38(%rsp), %rsi
movq %rax, (%rsi)
movss %xmm0, 0x8(%rsi)
movq %r14, %rdi
callq 0xab84
movswl 0x18(%rbp), %eax
testl %eax, %eax
js 0xa108
movswl 0x1a(%rbp), %ecx
testw %cx, %cx
js 0xa108
movq 0x18(%rbx), %rsi
cmpl %eax, 0x10(%rsi)
jle 0xa108
movl 0x14(%rsi), %edx
cmpl %ecx, %edx
jle 0xa108
movq 0x8(%rsi), %rsi
imull %eax, %edx
movl %ecx, %eax
addq %rdx, %rax
testb $0x1, (%rsi,%rax)
jne 0xa3ec
leaq 0x1e23a(%rip), %rdi     # 0x28349
leaq 0x1e1b9(%rip), %rsi     # 0x282cf
leaq 0x1e1bb(%rip), %rcx     # 0x282d8
movl $0x95, %edx
callq 0x6190
xorl %edx, %edx
movw %dx, 0xa(%rsp)
movw %dx, 0x8(%rsp)
xorps %xmm0, %xmm0
ucomiss 0x20(%rbx), %xmm0
movl $0x0, %r11d
movl $0x0, %ecx
movl $0x0, %r8d
jae 0xa28f
movq 0x30(%rsp), %rcx
imulq $0x55555556, %rcx, %rbp # imm = 0x55555556
movq %rbp, %rax
shrq $0x3f, %rax
shrq $0x20, %rbp
addl %eax, %ebp
leal (%rbp,%rbp,2), %eax
subl %eax, %ecx
movq 0x18(%rbx), %rdi
movl %ebp, %eax
addl %r9d, %eax
movq 0x18(%rsp), %rdx
leal (%rdx,%rax), %esi
decl %esi
movq %rcx, 0x28(%rsp)
leal (%rcx,%r15), %eax
leal -0x1(%r10,%rax), %r8d
leaq 0x8(%rsp), %rax
movq %rax, (%rsp)
movl %esi, 0xc(%rsp)
movswl %si, %ecx
movl %r8d, 0x10(%rsp)
movswl %r8w, %r8d
movq %r15, 0x20(%rsp)
movq %r9, %r15
movswl %dx, %esi
movswl %r10w, %edx
leaq 0xa(%rsp), %r9
callq 0xa6f2
testl %eax, %eax
je 0xa1da
movzwl 0xa(%rsp), %r11d
movzwl 0x8(%rsp), %r8d
xorl %ebp, %ebp
xorl %r10d, %r10d
jmp 0xa1fa
leal (%r15,%rbp), %r10d
decl %r10d
movq 0x28(%rsp), %rax
movq 0x20(%rsp), %rcx
leal (%rcx,%rax), %ebp
decl %ebp
movl 0xc(%rsp), %r11d
movl 0x10(%rsp), %r8d
testw %r11w, %r11w
js 0xa41a
testw %r8w, %r8w
js 0xa41a
movq 0x18(%rbx), %rcx
movswl %r11w, %eax
cmpl %eax, 0x10(%rcx)
jle 0xa41a
movswl %r8w, %esi
movl 0x14(%rcx), %edx
cmpl %esi, %edx
jle 0xa41a
movq 0x8(%rcx), %rcx
imull %eax, %edx
movl %esi, %eax
addq %rdx, %rax
testb $0x1, (%rcx,%rax)
je 0xa41a
leaq 0x38(%rsp), %rsi
movw %r11w, (%rsi)
movw %r8w, 0x2(%rsi)
movw %r10w, 0x4(%rsi)
movw %bp, 0x6(%rsi)
movss 0x20(%rbx), %xmm0
movss %xmm0, 0x8(%rsi)
movq %r14, %rdi
movl %r8d, %r15d
movq %r14, 0x10(%rsp)
movl %r10d, 0x18(%rsp)
movl %r11d, %r14d
callq 0xab84
movl %r14d, %r8d
movl %ebp, %edx
movl 0x18(%rsp), %r11d
movq 0x10(%rsp), %r14
movl %r15d, %ecx
movss 0x1dd71(%rip), %xmm0    # 0x28008
ucomiss 0x20(%rbx), %xmm0
jbe 0xa30e
movl %r11d, 0x18(%rsp)
movl %r8d, 0xc(%rsp)
movl %edx, 0x28(%rsp)
movl %ecx, 0x10(%rsp)
movzwl 0x4(%r13), %eax
movzwl 0x6(%r13), %ebp
movswl (%r13), %esi
movq %rax, 0x20(%rsp)
leal (%rsi,%rax), %r15d
movswl 0x2(%r13), %edx
leal (%rdx,%rbp), %r13d
movq 0x18(%rbx), %rdi
leaq 0x8(%rsp), %rax
movq %rax, (%rsp)
movswl %r15w, %ecx
movswl %r13w, %r8d
leaq 0xa(%rsp), %r9
callq 0xa6f2
testl %eax, %eax
je 0xa31e
movzwl 0xa(%rsp), %r15d
movzwl 0x8(%rsp), %r13d
xorl %r8d, %r8d
xorl %ebp, %ebp
movl 0x10(%rsp), %edx
movl 0xc(%rsp), %eax
jmp 0xa32e
xorl %r9d, %r9d
xorl %ebp, %ebp
xorl %r13d, %r13d
xorl %r15d, %r15d
jmp 0xa3ab
movl 0x10(%rsp), %edx
movl 0xc(%rsp), %eax
movq %rbp, %r8
movq 0x20(%rsp), %rbp
movq 0x18(%rbx), %rcx
movzwl %ax, %eax
cmpl %eax, 0x10(%rcx)
movss 0x1dcc8(%rip), %xmm0    # 0x28008
jle 0xa439
movzwl %dx, %esi
movl 0x14(%rcx), %edx
cmpl %esi, %edx
jle 0xa439
movq 0x8(%rcx), %rcx
imull %eax, %edx
movl %esi, %eax
addq %rdx, %rax
testb $0x1, (%rcx,%rax)
je 0xa439
subss 0x20(%rbx), %xmm0
leaq 0x38(%rsp), %rsi
movw %r15w, (%rsi)
movw %r13w, 0x2(%rsi)
movw %bp, 0x4(%rsi)
movw %r8w, 0x6(%rsi)
movss %xmm0, 0x8(%rsi)
movq %r14, %rdi
movq %r8, %r14
callq 0xab84
movq %r14, %r9
movl 0x10(%rsp), %ecx
movl 0x28(%rsp), %edx
movl 0xc(%rsp), %r8d
movl 0x18(%rsp), %r11d
movq 0x50(%rsp), %rdi
movq 0x30(%rsp), %rax
addq 0x70(%rbx,%rax,8), %rdi
leaq 0x38(%rsp), %rsi
movq %r12, (%rsi)
movw %r8w, 0x8(%rsi)
movw %cx, 0xa(%rsi)
movw %r11w, 0xc(%rsi)
movw %dx, 0xe(%rsi)
movw %r15w, 0x10(%rsi)
movw %r13w, 0x12(%rsi)
movw %bp, 0x14(%rsi)
movw %r9w, 0x16(%rsi)
callq 0xad64
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x1de91(%rip), %rdi     # 0x28293
leaq 0x1dec6(%rip), %rsi     # 0x282cf
leaq 0x1dec8(%rip), %rcx     # 0x282d8
movl $0x91, %edx
callq 0x6190
leaq 0x1df66(%rip), %rdi     # 0x28387
leaq 0x1dea7(%rip), %rsi     # 0x282cf
leaq 0x1dea9(%rip), %rcx     # 0x282d8
movl $0xa3, %edx
callq 0x6190
leaq 0x1df47(%rip), %rdi     # 0x28387
leaq 0x1de88(%rip), %rsi     # 0x282cf
leaq 0x1de8a(%rip), %rcx     # 0x282d8
movl $0xaf, %edx
callq 0x6190