// File: /workspace/github_cpp_makefile_star2_O2/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 0x7a00
movq %rax, 0x8(%r14)
leaq 0x38(%rbx), %rsi
movq %r12, %rdi
callq 0x8110
testb %al, %al
je 0x7a94
movq 0x48(%rbx), %rsi
subq 0x40(%rbx), %rsi
sarq $0x3, %rsi
movq %r14, %rdi
callq 0x811a
xorl %r12d, %r12d
leaq 0x30(%rsp), %r15
movq 0x40(%rbx), %rax
movq 0x48(%rbx), %rcx
subq %rax, %rcx
sarq $0x3, %rcx
cmpq %rcx, %r12
jae 0x7de3
testq %rcx, %rcx
js 0x7a54
cvtsi2ss %rcx, %xmm0
jmp 0x7a69
movq %rcx, %rdx
shrq %rdx
andl $0x1, %ecx
orq %rdx, %rcx
cvtsi2ss %rcx, %xmm0
addss %xmm0, %xmm0
movss 0x15597(%rip), %xmm1    # 0x1d008
divss %xmm0, %xmm1
movq (%rax,%r12,8), %rax
movq %rax, 0x30(%rsp)
movss %xmm1, 0x38(%rsp)
movq %r14, %rdi
movq %r15, %rsi
callq 0x85e2
incq %r12
jmp 0x7a30
pushq $0x2
popq %rsi
movq %r14, %rdi
callq 0x811a
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)
movq %r12, 0x18(%rsp)
movslq %ebp, %r15
imulq $0x38, %rcx, %r12
movq 0x70(%rbx,%r15,8), %rdi
addq %r12, %rdi
callq 0x874e
testq %rax, %rax
je 0x7ba5
movq %rax, %r13
movss 0x20(%rbx), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm0, %xmm1
jae 0x7b39
movq 0x10(%r13), %rax
leaq 0x30(%rsp), %rsi
movq %rax, (%rsi)
movss %xmm0, 0x8(%rsi)
movq %r14, %rdi
callq 0x85e2
movq 0x18(%rbx), %rdi
movswl 0x10(%r13), %esi
movswl 0x12(%r13), %edx
callq 0x81a4
testb %al, %al
je 0x7df2
movss 0x20(%rbx), %xmm0
ucomiss 0x154c8(%rip), %xmm0    # 0x1d008
jae 0x7de3
movss 0x154ba(%rip), %xmm1    # 0x1d008
subss %xmm0, %xmm1
movq 0x18(%r13), %rax
leaq 0x30(%rsp), %rsi
movq %rax, (%rsi)
movss %xmm1, 0x8(%rsi)
movq %r14, %rdi
callq 0x85e2
movq 0x18(%rbx), %rdi
movswl 0x18(%r13), %esi
movswl 0x1a(%r13), %edx
callq 0x81a4
testb %al, %al
jne 0x7de3
leaq 0x157a4(%rip), %rdi     # 0x1d331
leaq 0x15723(%rip), %rsi     # 0x1d2b7
leaq 0x15725(%rip), %rcx     # 0x1d2c0
movl $0x95, %edx
callq 0x5170
movq 0x18(%rsp), %rsi
movq %r12, 0x20(%rsp)
movq %r15, 0x28(%rsp)
andw $0x0, 0xa(%rsp)
andw $0x0, 0x8(%rsp)
movss 0x20(%rbx), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm0, %xmm1
jae 0x7c3e
pushq $0x3
popq %rcx
movl %ebp, %eax
cltd
idivl %ecx
movl %eax, %r13d
movl %edx, %r12d
movq %rsi, %rbp
movswl (%rsi), %esi
movswl 0x2(%rbp), %edx
movq 0x18(%rbx), %rdi
addw 0x4(%rbp), %r13w
leal (%rsi,%r13), %r15d
decl %r15d
addw 0x6(%rbp), %r12w
leal (%rdx,%r12), %r8d
decl %r8d
leaq 0x8(%rsp), %rax
movq %rax, (%rsp)
movswl %r15w, %ecx
movl %r8d, 0xc(%rsp)
movswl %r8w, %r8d
leaq 0xa(%rsp), %r9
callq 0x81d0
testl %eax, %eax
je 0x7c4e
movzwl 0xa(%rsp), %r15d
movzwl 0x8(%rsp), %eax
movq $0x0, 0x10(%rsp)
xorl %r13d, %r13d
jmp 0x7c5d
xorl %r15d, %r15d
xorl %r13d, %r13d
xorl %ecx, %ecx
xorl %r12d, %r12d
movq %rsi, %rbp
jmp 0x7cb8
decl %r13d
decl %r12d
movq %r12, 0x10(%rsp)
movl 0xc(%rsp), %eax
movq 0x18(%rbx), %rdi
movswl %r15w, %esi
movswl %ax, %edx
movl %eax, %r12d
callq 0x81a4
testb %al, %al
je 0x7e11
leaq 0x30(%rsp), %rsi
movw %r15w, (%rsi)
movw %r12w, 0x2(%rsi)
movw %r13w, 0x4(%rsi)
movl %r12d, 0xc(%rsp)
movl %r15d, %r12d
movq 0x10(%rsp), %r15
movw %r15w, 0x6(%rsi)
movss 0x20(%rbx), %xmm0
movss %xmm0, 0x8(%rsi)
movq %r14, %rdi
callq 0x85e2
movss 0x20(%rbx), %xmm0
movl 0xc(%rsp), %ecx
movl %r12d, 0x18(%rsp)
movq %r13, 0x48(%rsp)
ucomiss 0x1533f(%rip), %xmm0    # 0x1d008
jae 0x7d8c
movq %r15, 0x10(%rsp)
movl %ecx, 0xc(%rsp)
movzwl 0x4(%rbp), %r13d
movzwl 0x6(%rbp), %r15d
movswl (%rbp), %esi
leal (%rsi,%r13), %r12d
movswl 0x2(%rbp), %edx
leal (%rdx,%r15), %ebp
movq 0x18(%rbx), %rdi
leaq 0x8(%rsp), %rax
movq %rax, (%rsp)
movswl %r12w, %ecx
movswl %bp, %r8d
leaq 0xa(%rsp), %r9
callq 0x81d0
testl %eax, %eax
je 0x7d26
movzwl 0xa(%rsp), %r12d
movzwl 0x8(%rsp), %ebp
xorl %r15d, %r15d
xorl %r13d, %r13d
movl 0xc(%rsp), %eax
movq 0x18(%rbx), %rdi
movswl 0x18(%rsp), %esi
movswl %ax, %edx
callq 0x81a4
testb %al, %al
je 0x7e30
movss 0x152bd(%rip), %xmm0    # 0x1d008
subss 0x20(%rbx), %xmm0
leaq 0x30(%rsp), %rsi
movw %r12w, (%rsi)
movw %bp, 0x2(%rsi)
movw %r13w, 0x4(%rsi)
movw %r15w, 0x6(%rsi)
movss %xmm0, 0x8(%rsi)
movq %r14, %rdi
callq 0x85e2
movq %r15, %rdx
movq 0x28(%rsp), %rax
movq 0x20(%rsp), %rdi
movl 0xc(%rsp), %ecx
movq 0x10(%rsp), %r15
jmp 0x7da0
xorl %edx, %edx
xorl %r13d, %r13d
xorl %ebp, %ebp
xorl %r12d, %r12d
movq 0x28(%rsp), %rax
movq 0x20(%rsp), %rdi
addq 0x70(%rbx,%rax,8), %rdi
movq 0x50(%rsp), %rax
leaq 0x30(%rsp), %rsi
movq %rax, (%rsi)
movl 0x18(%rsp), %eax
movw %ax, 0x8(%rsi)
movw %cx, 0xa(%rsi)
movq 0x48(%rsp), %rax
movw %ax, 0xc(%rsi)
movw %r15w, 0xe(%rsi)
movw %r12w, 0x10(%rsi)
movw %bp, 0x12(%rsi)
movw %r13w, 0x14(%rsi)
movw %dx, 0x16(%rsi)
callq 0x87ca
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x15482(%rip), %rdi     # 0x1d27b
leaq 0x154b7(%rip), %rsi     # 0x1d2b7
leaq 0x154b9(%rip), %rcx     # 0x1d2c0
movl $0x91, %edx
callq 0x5170
leaq 0x15557(%rip), %rdi     # 0x1d36f
leaq 0x15498(%rip), %rsi     # 0x1d2b7
leaq 0x1549a(%rip), %rcx     # 0x1d2c0
movl $0xa3, %edx
callq 0x5170
leaq 0x15538(%rip), %rdi     # 0x1d36f
leaq 0x15479(%rip), %rsi     # 0x1d2b7
leaq 0x1547b(%rip), %rcx     # 0x1d2c0
movl $0xaf, %edx
callq 0x5170
nop