// File: /workspace/github_cpp_makefile_star2_O3/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, %r12
movq (%rcx), %rax
cmpq %rax, 0x8(%rcx)
je 0x8e28
movq %rax, 0x8(%r14)
movzwl (%r12), %eax
cmpw 0x38(%rbx), %ax
jne 0x8f01
movzwl 0x2(%r12), %eax
cmpw 0x3a(%rbx), %ax
jne 0x8f01
movzwl 0x4(%r12), %eax
cmpw 0x3c(%rbx), %ax
jne 0x8f01
movzwl 0x6(%r12), %eax
cmpw 0x3e(%rbx), %ax
jne 0x8f01
movq 0x48(%rbx), %rsi
subq 0x40(%rbx), %rsi
sarq $0x3, %rsi
movq %r14, %rdi
callq 0x9594
movq 0x40(%rbx), %rax
movq 0x48(%rbx), %rcx
subq %rax, %rcx
je 0x9322
sarq $0x3, %rcx
xorl %r12d, %r12d
leaq 0x28(%rsp), %r15
testq %rcx, %rcx
js 0x8ea7
xorps %xmm0, %xmm0
cvtsi2ss %rcx, %xmm0
jmp 0x8ebf
movq %rcx, %rdx
shrq %rdx
andl $0x1, %ecx
orq %rdx, %rcx
xorps %xmm0, %xmm0
cvtsi2ss %rcx, %xmm0
addss %xmm0, %xmm0
movss 0x1e141(%rip), %xmm1    # 0x27008
divss %xmm0, %xmm1
movq (%rax,%r12,8), %rax
movq %rax, 0x28(%rsp)
movss %xmm1, 0x30(%rsp)
movq %r14, %rdi
movq %r15, %rsi
callq 0x99c8
incq %r12
movq 0x40(%rbx), %rax
movq 0x48(%rbx), %rcx
subq %rax, %rcx
sarq $0x3, %rcx
cmpq %rcx, %r12
jb 0x8e98
jmp 0x9322
movl $0x2, %esi
movq %r14, %rdi
callq 0x9594
movswq (%r12), %rax
imulq 0x30(%rbx), %rax
movswq 0x2(%r12), %rcx
addq %rax, %rcx
movzwl 0x4(%r12), %eax
shll $0x10, %eax
movzwl 0x6(%r12), %edx
cltq
orq %rdx, %rax
leaq 0x50(%rsp), %rsi
movq %rax, (%rsi)
movslq %ebp, %rbp
imulq $0x38, %rcx, %r15
movq 0x70(%rbx,%rbp,8), %rdi
addq %r15, %rdi
callq 0x9b60
testq %rax, %rax
je 0x905b
movq %rax, %r13
movss 0x20(%rbx), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm0, %xmm1
jae 0x8fd1
movq 0x10(%r13), %rax
leaq 0x28(%rsp), %rsi
movq %rax, (%rsi)
movss %xmm0, 0x8(%rsi)
movq %r14, %rdi
callq 0x99c8
movswl 0x10(%r13), %eax
testl %eax, %eax
js 0x9331
movswl 0x12(%r13), %ecx
testw %cx, %cx
js 0x9331
movq 0x18(%rbx), %rsi
cmpl %eax, 0x10(%rsi)
jle 0x9331
movl 0x14(%rsi), %edx
cmpl %ecx, %edx
jle 0x9331
movq 0x8(%rsi), %rsi
imull %eax, %edx
movl %ecx, %eax
addq %rdx, %rax
testb $0x1, (%rsi,%rax)
je 0x9331
movss 0x20(%rbx), %xmm0
ucomiss 0x1e030(%rip), %xmm0    # 0x27008
jae 0x9322
movss 0x1e022(%rip), %xmm1    # 0x27008
subss %xmm0, %xmm1
movq 0x18(%r13), %rax
leaq 0x28(%rsp), %rsi
movq %rax, (%rsi)
movss %xmm1, 0x8(%rsi)
movq %r14, %rdi
callq 0x99c8
movswl 0x18(%r13), %eax
testl %eax, %eax
js 0x903c
movswl 0x1a(%r13), %ecx
testw %cx, %cx
js 0x903c
movq 0x18(%rbx), %rsi
cmpl %eax, 0x10(%rsi)
jle 0x903c
movl 0x14(%rsi), %edx
cmpl %ecx, %edx
jle 0x903c
movq 0x8(%rsi), %rsi
imull %eax, %edx
movl %ecx, %eax
addq %rdx, %rax
testb $0x1, (%rsi,%rax)
jne 0x9322
leaq 0x1e316(%rip), %rdi     # 0x27359
leaq 0x1e295(%rip), %rsi     # 0x272df
leaq 0x1e297(%rip), %rcx     # 0x272e8
movl $0x95, %edx
callq 0x5190
movq %rbp, 0x20(%rsp)
xorl %ebp, %ebp
movw %bp, 0xa(%rsp)
movw %bp, 0x8(%rsp)
movss 0x20(%rbx), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm0, %xmm1
movl $0x0, %r8d
movl $0x0, %r13d
movl $0x0, %ecx
jae 0x91b1
movq 0x20(%rsp), %r13
imulq $0x55555556, %r13, %rbp # imm = 0x55555556
movq %rbp, %rax
shrq $0x3f, %rax
shrq $0x20, %rbp
addl %eax, %ebp
leal (%rbp,%rbp,2), %eax
subl %eax, %r13d
movswl (%r12), %esi
movswl 0x2(%r12), %edx
movq 0x18(%rbx), %rdi
addw 0x4(%r12), %bp
leal (%rsi,%rbp), %ecx
decl %ecx
addw 0x6(%r12), %r13w
leal (%rdx,%r13), %r8d
decl %r8d
leaq 0x8(%rsp), %rax
movq %rax, (%rsp)
movl %ecx, 0x10(%rsp)
movswl %cx, %ecx
movl %r8d, 0xc(%rsp)
movswl %r8w, %r8d
leaq 0xa(%rsp), %r9
callq 0x9626
testl %eax, %eax
je 0x910e
movzwl 0xa(%rsp), %edi
movzwl 0x8(%rsp), %r8d
xorl %r13d, %r13d
xorl %ebp, %ebp
jmp 0x911c
decl %ebp
decl %r13d
movl 0x10(%rsp), %edi
movl 0xc(%rsp), %r8d
movq %r15, 0x10(%rsp)
testw %di, %di
js 0x9350
testw %r8w, %r8w
js 0x9350
movq 0x18(%rbx), %rcx
movswl %di, %eax
cmpl %eax, 0x10(%rcx)
jle 0x9350
movswl %r8w, %esi
movl 0x14(%rcx), %edx
cmpl %esi, %edx
jle 0x9350
movq 0x8(%rcx), %rcx
imull %eax, %edx
movl %esi, %eax
addq %rdx, %rax
testb $0x1, (%rcx,%rax)
je 0x9350
leaq 0x28(%rsp), %rsi
movw %di, (%rsi)
movw %r8w, 0x2(%rsi)
movw %bp, 0x4(%rsi)
movw %r13w, 0x6(%rsi)
movss 0x20(%rbx), %xmm0
movss %xmm0, 0x8(%rsi)
movl %edi, %r15d
movq %r14, %rdi
movq %rbp, 0x18(%rsp)
movq %r13, %rbp
movl %r8d, %r13d
callq 0x99c8
movq 0x18(%rsp), %r8
movl %r15d, %ecx
movss 0x20(%rbx), %xmm0
movq 0x10(%rsp), %r15
ucomiss 0x1de50(%rip), %xmm0    # 0x27008
jae 0x922e
movq %rbp, 0x48(%rsp)
movq %r8, 0x18(%rsp)
movl %r13d, 0xc(%rsp)
movl %ecx, 0x10(%rsp)
movzwl 0x4(%r12), %r13d
movzwl 0x6(%r12), %eax
movswl (%r12), %esi
leal (%rsi,%r13), %ebp
movswl 0x2(%r12), %edx
movq %rax, 0x40(%rsp)
leal (%rdx,%rax), %r12d
movq 0x18(%rbx), %rdi
leaq 0x8(%rsp), %rax
movq %rax, (%rsp)
movswl %bp, %ecx
movswl %r12w, %r8d
leaq 0xa(%rsp), %r9
callq 0x9626
testl %eax, %eax
je 0x923e
movzwl 0xa(%rsp), %r9d
movzwl 0x8(%rsp), %r12d
xorl %edi, %edi
xorl %r8d, %r8d
movl 0x10(%rsp), %eax
movl 0xc(%rsp), %edx
jmp 0x9251
xorl %edi, %edi
xorl %r9d, %r9d
xorl %r11d, %r11d
xorl %r12d, %r12d
jmp 0x92de
movl 0x10(%rsp), %eax
movl 0xc(%rsp), %edx
movq 0x40(%rsp), %rdi
movq %r13, %r8
movl %ebp, %r9d
movq 0x18(%rbx), %rcx
movzwl %ax, %eax
cmpl %eax, 0x10(%rcx)
jle 0x936f
movzwl %dx, %esi
movl 0x14(%rcx), %edx
cmpl %esi, %edx
jle 0x936f
movq 0x8(%rcx), %rcx
imull %eax, %edx
movl %esi, %eax
addq %rdx, %rax
testb $0x1, (%rcx,%rax)
je 0x936f
movss 0x1dd7b(%rip), %xmm0    # 0x27008
subss 0x20(%rbx), %xmm0
leaq 0x28(%rsp), %rsi
movw %r9w, (%rsi)
movw %r12w, 0x2(%rsi)
movw %r8w, 0x4(%rsi)
movw %di, 0x6(%rsi)
movss %xmm0, 0x8(%rsi)
movq %rdi, %rbp
movq %r14, %rdi
movq %r8, %r14
movl %r12d, %r13d
movl %r9d, %r12d
callq 0x99c8
movl %r13d, %r11d
movq %r14, %r9
movq %rbp, %rdi
movl 0xc(%rsp), %r13d
movl 0x10(%rsp), %ecx
movq 0x18(%rsp), %r8
movq 0x48(%rsp), %rbp
movq 0x20(%rsp), %rax
addq 0x70(%rbx,%rax,8), %r15
movq 0x50(%rsp), %rax
leaq 0x28(%rsp), %rsi
movq %rax, (%rsi)
movw %cx, 0x8(%rsi)
movw %r13w, 0xa(%rsi)
movw %r8w, 0xc(%rsi)
movw %bp, 0xe(%rsi)
movw %r12w, 0x10(%rsi)
movw %r11w, 0x12(%rsi)
movw %r9w, 0x14(%rsi)
movw %di, 0x16(%rsi)
movq %r15, %rdi
callq 0x9bbc
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x1df6b(%rip), %rdi     # 0x272a3
leaq 0x1dfa0(%rip), %rsi     # 0x272df
leaq 0x1dfa2(%rip), %rcx     # 0x272e8
movl $0x91, %edx
callq 0x5190
leaq 0x1e040(%rip), %rdi     # 0x27397
leaq 0x1df81(%rip), %rsi     # 0x272df
leaq 0x1df83(%rip), %rcx     # 0x272e8
movl $0xa3, %edx
callq 0x5190
leaq 0x1e021(%rip), %rdi     # 0x27397
leaq 0x1df62(%rip), %rsi     # 0x272df
leaq 0x1df64(%rip), %rcx     # 0x272e8
movl $0xaf, %edx
callq 0x5190