// File: /workspace/github_cpp_makefile_star2_O1/kmyk[P]codevs-for-student-2016/Main.cpp
// Function: initial_photon(int, int, primitive::blocks_t<16ul, 10ul> const&)
shared_ptr<photon_t> initial_photon(int turn, int obstacles, field_t const & field) {
    shared_ptr<photon_t> pho = make_shared<photon_t>();
    pho->turn = turn;
    pho->score = 0;
    pho->obstacles = obstacles;
    pho->dropped_obstacles = count_obstacle_blocks(field);
    pho->dropped_numbers = count_number_blocks(field);
    pho->field = field;
    pho->output = invalid_output;
    pho->result = {};
    pho->parent.reset();
    pho->beam_generation = 0;
    pho->cached = {};
    pho->next = {};
    // evaluation
    pho->evaluation.score = 0;
    pho->evaluation.permanent_bonus = 0;
    pho->evaluation.estimateds.emplace_back((result_t) { 0, 0 }, 0);
    return pho;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x318, %rsp            # imm = 0x318
movq %rcx, %rbp
movl %edx, 0x4(%rsp)
movl %esi, %r12d
movq %rdi, %r15
movq $0x0, (%rdi)
movl $0x448, %edi            # imm = 0x448
callq 0x2160
movq %rax, %r14
movabsq $0x100000001, %rax      # imm = 0x100000001
movq %rax, 0x8(%r14)
leaq 0x1193b(%rip), %rax     # 0x14cf8
movq %rax, (%r14)
leaq 0x10(%r14), %r13
xorl %ebx, %ebx
movl $0x438, %edx            # imm = 0x438
movq %r13, %rdi
xorl %esi, %esi
callq 0x20d0
movq %r14, 0x8(%r15)
movq %r15, 0x8(%rsp)
movq %r13, (%r15)
movl %r12d, 0x10(%r14)
movl $0x0, 0x14(%r14)
movl 0x4(%rsp), %eax
movl %eax, 0x18(%r14)
movq %rbp, %rax
xorl %ecx, %ecx
xorl %edx, %edx
xorl %edi, %edi
cmpb $0xb, (%rax,%rdx)
sete %dil
addl %edi, %ecx
incq %rdx
cmpq $0x10, %rdx
jne 0x33fc
incq %rbx
addq $0x10, %rax
cmpq $0xa, %rbx
jne 0x33fa
movl %ecx, 0x1c(%r14)
xorl %eax, %eax
movq %rbp, %rcx
xorl %edx, %edx
xorl %r9d, %r9d
movb (%rcx,%r9), %dil
testb %dil, %dil
setne %r8b
cmpb $0xb, %dil
setne %dil
andb %r8b, %dil
movzbl %dil, %edi
addl %edi, %edx
incq %r9
cmpq $0x10, %r9
jne 0x342c
incq %rax
addq $0x10, %rcx
cmpq $0xa, %rax
jne 0x3429
movl %edx, 0x20(%r14)
leaq 0x24(%r14), %rdi
movl $0xa0, %edx
movq %rbp, %rsi
callq 0x2120
movq $-0x21524111, 0xc4(%r14) # imm = 0xDEADBEEF
movq $0x0, 0xcc(%r14)
leaq 0x100(%r14), %rdi
callq 0x4d9a
movl $0x0, 0x110(%r14)
xorps %xmm0, %xmm0
movups %xmm0, 0x114(%r14)
movups %xmm0, 0x124(%r14)
movups %xmm0, 0x134(%r14)
leaq 0x18(%rsp), %r15
xorl %ebx, %ebx
movl $0x300, %edx            # imm = 0x300
movq %r15, %rdi
xorl %esi, %esi
callq 0x20d0
leaq 0x150(%r14), %r12
xorl %r13d, %r13d
movups (%r15,%r13), %xmm0
xorps %xmm1, %xmm1
movups %xmm1, (%r15,%r13)
movq (%r12,%r13), %rdi
movups %xmm0, -0x8(%r12,%r13)
testq %rdi, %rdi
je 0x34fc
callq 0x7136
addq $0x10, %r13
cmpq $0x40, %r13
jne 0x34db
incq %rbx
addq $0x40, %r15
addq $0x40, %r12
cmpq $0xc, %rbx
jne 0x34d8
leaq 0x318(%rsp), %rbx
leaq 0x310(%rsp), %r15
leaq 0x18(%rsp), %r12
xorl %r13d, %r13d
movq (%r15,%r13), %rdi
testq %rdi, %rdi
je 0x353d
callq 0x7136
addq $-0x10, %r13
cmpq $-0x40, %r13
jne 0x352f
addq $-0x40, %rbx
addq $-0x40, %r15
cmpq %r12, %rbx
jne 0x352c
movq %r14, %rdi
addq $0xe8, %rdi
xorps %xmm0, %xmm0
movups %xmm0, 0xd8(%r14)
leaq 0x18(%rsp), %rsi
movq $0x0, (%rsi)
leaq 0x14(%rsp), %rdx
movl $0x0, (%rdx)
callq 0x4bec
movq 0x8(%rsp), %rax
addq $0x318, %rsp            # imm = 0x318
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq %r14, %rdi
callq 0x7136
movq %rbx, %rdi
callq 0x2230