// File: /workspace/github_cpp_makefile_star2_O1/bonetblai[P]mdp-engine/race/./race.h
// Function: problem_t::problem_t(grid_t&, float, float)
problem_t(grid_t &grid, float p = 1.0, float dead_end_value = 1e3)
      : Problem::problem_t<state_t>(DISCOUNT, dead_end_value),
        grid_(grid), p_(p), rows_(grid.rows()), cols_(grid.cols()),
        init_(std::numeric_limits<short>::max(), std::numeric_limits<short>::max(),
              std::numeric_limits<short>::max(), std::numeric_limits<short>::max()) {
        for( size_t i = 0; i < grid_.starts().size(); ++i ) {
            size_t s = grid_.start(i);
            inits_.push_back(state_t(s / cols_, s % cols_));
        }
        for( size_t i = 0; i < grid_.goals().size(); ++i ) {
            size_t s = grid_.goal(i);
            goals_.push_back(state_t(s / cols_, s % cols_));
        }
        for( size_t i = 0; i < 9; ++i )
            ecache_[i] = new ecache_t[rows_*cols_];
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, %r15
movl $0x3f800000, 0x8(%rdi)  # imm = 0x3F800000
movss %xmm1, 0xc(%rdi)
movq $0x0, 0x10(%rdi)
leaq 0x2f5f6(%rip), %rax     # 0x36c80
movq %rax, (%rdi)
movq %rsi, 0x18(%rdi)
movss %xmm0, 0x20(%rdi)
movslq 0x10(%rsi), %rax
movq %rax, 0x28(%rdi)
movslq 0x14(%rsi), %rax
movq %rax, 0x30(%rdi)
movabsq $0x7fff7fff7fff7fff, %rax # imm = 0x7FFF7FFF7FFF7FFF
movq %rax, 0x38(%rdi)
leaq 0x40(%rdi), %rax
movq %rax, 0x20(%rsp)
leaq 0x58(%rdi), %r14
xorps %xmm0, %xmm0
movups %xmm0, 0x40(%rdi)
movups %xmm0, 0x50(%rdi)
movups %xmm0, 0x60(%rdi)
xorl %ebp, %ebp
leaq 0x8(%rsp), %r12
movq 0x18(%r15), %rsi
addq $0x18, %rsi
movq %r12, %rdi
callq 0xa45c
movq 0x8(%rsp), %r13
movq 0x10(%rsp), %rbx
testq %r13, %r13
je 0x76fe
movq %r13, %rdi
callq 0x6240
subq %r13, %rbx
sarq $0x2, %rbx
cmpq %rbx, %rbp
jae 0x7740
movq 0x18(%r15), %rax
movq 0x18(%rax), %rax
movslq (%rax,%rbp,4), %rax
xorl %edx, %edx
divq 0x30(%r15)
movw %ax, 0x8(%rsp)
movw %dx, 0xa(%rsp)
movl $0x0, 0xc(%rsp)
movq 0x20(%rsp), %rdi
movq %r12, %rsi
callq 0xa502
incq %rbp
jmp 0x76d7
xorl %ebp, %ebp
leaq 0x8(%rsp), %r12
movq 0x18(%r15), %rsi
addq $0x30, %rsi
movq %r12, %rdi
callq 0xa45c
movq 0x8(%rsp), %r13
movq 0x10(%rsp), %rbx
testq %r13, %r13
je 0x776e
movq %r13, %rdi
callq 0x6240
subq %r13, %rbx
sarq $0x2, %rbx
cmpq %rbx, %rbp
jae 0x77ae
movq 0x18(%r15), %rax
movq 0x30(%rax), %rax
movslq (%rax,%rbp,4), %rax
xorl %edx, %edx
divq 0x30(%r15)
movw %ax, 0x8(%rsp)
movw %dx, 0xa(%rsp)
movl $0x0, 0xc(%rsp)
movq %r14, %rdi
movq %r12, %rsi
callq 0xa502
incq %rbp
jmp 0x7747
movq 0x30(%r15), %r12
imulq 0x28(%r15), %r12
movl $0x38, %ecx
movq %r12, %rax
mulq %rcx
movq %rax, %r13
seto %al
addq $0x8, %r13
movq $-0x1, %rcx
cmovbq %rcx, %r13
testb %al, %al
cmovneq %rcx, %r13
imulq $0x38, %r12, %rbp
xorl %ebx, %ebx
movq %r13, %rdi
callq 0x6030
movq %r12, (%rax)
testq %r12, %r12
xorps %xmm0, %xmm0
je 0x7822
leaq 0x38(%rax), %rcx
movq %rbp, %rdx
movq %rcx, -0x30(%rcx)
movq $0x1, -0x28(%rcx)
movups %xmm0, -0x20(%rcx)
movl $0x3f800000, -0x10(%rcx) # imm = 0x3F800000
movups %xmm0, -0x8(%rcx)
addq $0x38, %rcx
addq $-0x38, %rdx
jne 0x77fd
addq $0x8, %rax
movq %rax, 0x70(%r15,%rbx,8)
incq %rbx
cmpq $0x9, %rbx
jne 0x77e3
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x784b
jmp 0x784b
jmp 0x784b
jmp 0x784b
movq %rax, %r15
movq (%r14), %rdi
testq %rdi, %rdi
je 0x785b
callq 0x6240
movq 0x20(%rsp), %rax
movq (%rax), %rdi
testq %rdi, %rdi
je 0x786d
callq 0x6240
movq %r15, %rdi
callq 0x6440