// File: /workspace/github_cpp_makefile_star2_O3/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 0x2e9be(%rip), %rax     # 0x34fb0
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
addq $0x18, %rsi
movq %r12, %rdi
callq 0x9390
movq 0x8(%rsp), %r13
movq 0x10(%rsp), %rbx
testq %r13, %r13
je 0x6662
movq %r13, %rdi
callq 0x5240
subq %r13, %rbx
sarq $0x2, %rbx
cmpq %rbx, %rbp
jae 0x66a8
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 0x9436
incq %rbp
movq 0x18(%r15), %rsi
jmp 0x663f
xorl %ebp, %ebp
leaq 0x8(%rsp), %r12
movq 0x18(%r15), %rsi
addq $0x30, %rsi
movq %r12, %rdi
callq 0x9390
movq 0x8(%rsp), %r13
movq 0x10(%rsp), %rbx
testq %r13, %r13
je 0x66d6
movq %r13, %rdi
callq 0x5240
subq %r13, %rbx
sarq $0x2, %rbx
cmpq %rbx, %rbp
jae 0x6716
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 0x9436
incq %rbp
jmp 0x66af
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 0x5030
movq %r12, (%rax)
testq %r12, %r12
xorps %xmm0, %xmm0
je 0x678a
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 0x6765
addq $0x8, %rax
movq %rax, 0x70(%r15,%rbx,8)
incq %rbx
cmpq $0x9, %rbx
jne 0x674b
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x67b3
jmp 0x67b3
jmp 0x67b3
jmp 0x67b3
movq %rax, %r15
movq (%r14), %rdi
testq %rdi, %rdi
je 0x67c3
callq 0x5240
movq 0x20(%rsp), %rax
movq (%rax), %rdi
testq %rdi, %rdi
je 0x67d5
callq 0x5240
movq %r15, %rdi
callq 0x5440