// File: /workspace/github_cpp_makefile_star2_O2/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)
andq $0x0, 0x10(%rdi)
leaq 0x28fc7(%rip), %rax     # 0x2efb0
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), %rbp
leaq 0x58(%rdi), %r14
xorps %xmm0, %xmm0
movups %xmm0, 0x40(%rdi)
movups %xmm0, 0x50(%rdi)
movups %xmm0, 0x60(%rdi)
xorl %r13d, %r13d
leaq 0x8(%rsp), %r12
addq $0x18, %rsi
movq %r12, %rdi
callq 0x7e52
movq 0x10(%rsp), %rbx
subq 0x8(%rsp), %rbx
sarq $0x2, %rbx
movq %r12, %rdi
callq 0x7ea0
cmpq %rbx, %r13
jae 0x608e
movq 0x18(%r15), %rax
movq 0x18(%rax), %rax
movslq (%rax,%r13,4), %rax
xorl %edx, %edx
divq 0x30(%r15)
movw %ax, 0x8(%rsp)
movw %dx, 0xa(%rsp)
andl $0x0, 0xc(%rsp)
movq %rbp, %rdi
movq %r12, %rsi
callq 0x7f1a
incq %r13
movq 0x18(%r15), %rsi
jmp 0x6032
xorl %r13d, %r13d
leaq 0x8(%rsp), %r12
movq 0x18(%r15), %rsi
addq $0x30, %rsi
movq %r12, %rdi
callq 0x7e52
movq 0x10(%rsp), %rbx
subq 0x8(%rsp), %rbx
sarq $0x2, %rbx
movq %r12, %rdi
callq 0x7ea0
cmpq %rbx, %r13
jae 0x60f2
movq 0x18(%r15), %rax
movq 0x30(%rax), %rax
movslq (%rax,%r13,4), %rax
xorl %edx, %edx
divq 0x30(%r15)
movw %ax, 0x8(%rsp)
movw %dx, 0xa(%rsp)
andl $0x0, 0xc(%rsp)
movq %r14, %rdi
movq %r12, %rsi
callq 0x7f1a
incq %r13
jmp 0x6096
movq %rbp, 0x20(%rsp)
movq 0x30(%r15), %r12
imulq 0x28(%r15), %r12
pushq $0x38
popq %rcx
movq %r12, %rax
mulq %rcx
movq %rax, %r13
seto %al
addq $0x8, %r13
pushq $-0x1
popq %rcx
cmovbq %rcx, %r13
testb %al, %al
cmovneq %rcx, %r13
imulq $0x38, %r12, %rbp
xorl %ebx, %ebx
cmpq $0x9, %rbx
je 0x6179
movq %r13, %rdi
callq 0x5030
movq %r12, (%rax)
testq %r12, %r12
xorps %xmm0, %xmm0
je 0x616b
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 0x6146
addq $0x8, %rax
movq %rax, 0x70(%r15,%rbx,8)
incq %rbx
jmp 0x6126
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r15
movq 0x20(%rsp), %rbp
jmp 0x619b
jmp 0x6198
jmp 0x6198
jmp 0x6198
movq %rax, %r15
movq %r14, %rdi
callq 0x80aa
movq %rbp, %rdi
callq 0x80aa
movq %r15, %rdi
callq 0x5430