// File: /workspace/github_cpp_makefile_star2_O3/tanakh[P]icfpc2015/main.cpp
// Function: to_problem(picojson::value&)
problem to_problem(value &v) {
  problem ret;

  object obj = v.get<object>();
  ret.id = obj["id"].get<int64_t>();
  for (auto &i: obj["units"].get<picojson::array>())
    ret.units.push_back(to_unit(i));
  ret.width = obj["width"].get<int64_t>();
  ret.height = obj["height"].get<int64_t>();
  for (auto &i: obj["filled"].get<picojson::array>())
    ret.filled.push_back(to_cell(i));
  ret.source_length = obj["sourceLength"].get<int64_t>();
  for (auto &i: obj["sourceSeeds"].get<picojson::array>())
    ret.source_seeds.push_back(i.get<int64_t>());

  return ret;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rdi, %rbx
xorl %eax, %eax
movq %rax, 0x18(%rdi)
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rdi)
movups %xmm0, 0x28(%rdi)
movq %rax, 0x38(%rdi)
movups %xmm0, 0x48(%rdi)
movq %rax, 0x58(%rdi)
cmpl $0x5, (%rsi)
jne 0x4873
movq 0x8(%rsi), %rsi
leaq 0x28(%rsp), %rdi
callq 0xca1c
leaq 0x10(%rsp), %r13
movq %r13, -0x10(%r13)
leaq 0x112ac(%rip), %rsi     # 0x1583a
leaq 0x112a7(%rip), %rdx     # 0x1583c
movq %rsp, %rdi
callq 0xfa08
leaq 0x28(%rsp), %rdi
movq %rsp, %rsi
callq 0xb84a
cmpl $0x6, (%rax)
jne 0x48a5
movl 0x8(%rax), %eax
movl %eax, (%rbx)
movq (%rsp), %rdi
cmpq %r13, %rdi
je 0x45c6
callq 0x32f0
movq %rsp, %rdi
movq %r13, (%rdi)
leaq 0x10db4(%rip), %rsi     # 0x15387
leaq 0x10db2(%rip), %rdx     # 0x1538c
callq 0xfa08
leaq 0x28(%rsp), %rdi
movq %rsp, %rsi
callq 0xb84a
cmpl $0x4, (%rax)
jne 0x48d7
movq 0x8(%rax), %r15
movq (%rsp), %rdi
cmpq %r13, %rdi
je 0x4607
callq 0x32f0
movq (%r15), %r14
movq 0x8(%r15), %rbp
cmpq %rbp, %r14
je 0x4647
leaq 0x8(%rbx), %r15
movq %rsp, %r12
movq %r12, %rdi
movq %r14, %rsi
callq 0x41e8
movq %r15, %rdi
movq %r12, %rsi
callq 0x1012a
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x463e
callq 0x32f0
addq $0x10, %r14
cmpq %rbp, %r14
jne 0x461a
movq %rsp, %rdi
movq %r13, (%rdi)
leaq 0x10d39(%rip), %rsi     # 0x1538d
leaq 0x10d37(%rip), %rdx     # 0x15392
callq 0xfa08
leaq 0x28(%rsp), %rdi
movq %rsp, %rsi
callq 0xb84a
cmpl $0x6, (%rax)
jne 0x4909
movl 0x8(%rax), %eax
movl %eax, 0x20(%rbx)
movq (%rsp), %rdi
cmpq %r13, %rdi
je 0x468a
callq 0x32f0
movq %rsp, %rdi
movq %r13, (%rdi)
leaq 0x10cfc(%rip), %rsi     # 0x15393
leaq 0x10cfb(%rip), %rdx     # 0x15399
callq 0xfa08
leaq 0x28(%rsp), %rdi
movq %rsp, %rsi
callq 0xb84a
cmpl $0x6, (%rax)
jne 0x493b
movl 0x8(%rax), %eax
movl %eax, 0x24(%rbx)
movq (%rsp), %rdi
cmpq %r13, %rdi
je 0x46cd
callq 0x32f0
movq %rsp, %rdi
movq %r13, (%rdi)
leaq 0x10cc0(%rip), %rsi     # 0x1539a
leaq 0x10cbf(%rip), %rdx     # 0x153a0
callq 0xfa08
leaq 0x28(%rsp), %rdi
movq %rsp, %rsi
callq 0xb84a
cmpl $0x4, (%rax)
jne 0x496d
movq 0x8(%rax), %r15
movq (%rsp), %rdi
cmpq %r13, %rdi
je 0x470e
callq 0x32f0
movq (%r15), %r14
movq 0x8(%r15), %rbp
cmpq %rbp, %r14
je 0x4755
leaq 0x28(%rbx), %r15
movq %rsp, %r12
movq %r14, %rdi
callq 0x4027
movq %rax, (%rsp)
movq 0x30(%rbx), %rsi
cmpq 0x38(%rbx), %rsi
je 0x4741
movq %rax, (%rsi)
addq $0x8, 0x30(%rbx)
jmp 0x474c
movq %r15, %rdi
movq %r12, %rdx
callq 0xfbfe
addq $0x10, %r14
cmpq %rbp, %r14
jne 0x4721
movq %rsp, %rdi
movq %r13, (%rdi)
leaq 0x10c3f(%rip), %rsi     # 0x153a1
leaq 0x10c44(%rip), %rdx     # 0x153ad
callq 0xfa08
leaq 0x28(%rsp), %rdi
movq %rsp, %rsi
callq 0xb84a
cmpl $0x6, (%rax)
jne 0x499f
movl 0x8(%rax), %eax
movl %eax, 0x40(%rbx)
movq (%rsp), %rdi
cmpq %r13, %rdi
je 0x4798
callq 0x32f0
movq %rsp, %rdi
movq %r13, (%rdi)
leaq 0x10c09(%rip), %rsi     # 0x153ae
leaq 0x10c0d(%rip), %rdx     # 0x153b9
callq 0xfa08
leaq 0x28(%rsp), %rdi
movq %rsp, %rsi
callq 0xb84a
cmpl $0x4, (%rax)
jne 0x49d1
movq 0x8(%rax), %r14
movq (%rsp), %rdi
cmpq %r13, %rdi
je 0x47d9
callq 0x32f0
movq (%r14), %r12
movq 0x8(%r14), %r13
cmpq %r13, %r12
je 0x4825
leaq 0x48(%rbx), %r14
movq %rsp, %r15
cmpl $0x6, (%r12)
jne 0x4841
movl 0x8(%r12), %eax
movl %eax, (%rsp)
movq 0x50(%rbx), %rsi
cmpq 0x58(%rbx), %rsi
je 0x4811
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x50(%rbx)
jmp 0x481c
movq %r14, %rdi
movq %r15, %rdx
callq 0x10328
addq $0x10, %r12
cmpq %r13, %r12
jne 0x47ec
leaq 0x28(%rsp), %rdi
callq 0xcfec
movq %rbx, %rax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x10, %edi
callq 0x3150
movq %rax, %r15
leaq 0x10ec4(%rip), %rsi     # 0x15719
movq %rax, %rdi
callq 0x3100
movq 0x1878c(%rip), %rsi     # 0x1cff0
movq 0x1874d(%rip), %rdx     # 0x1cfb8
movq %r15, %rdi
callq 0x3480
movl $0x10, %edi
callq 0x3150
movq %rax, %r15
leaq 0x10e4e(%rip), %rsi     # 0x156d5
movq %rax, %rdi
callq 0x3100
movq 0x1875a(%rip), %rsi     # 0x1cff0
movq 0x1871b(%rip), %rdx     # 0x1cfb8
movq %r15, %rdi
callq 0x3480
movl $0x10, %edi
callq 0x3150
movq %rax, %r15
leaq 0x10e60(%rip), %rsi     # 0x15719
movq %rax, %rdi
callq 0x3100
movq 0x18728(%rip), %rsi     # 0x1cff0
movq 0x186e9(%rip), %rdx     # 0x1cfb8
movq %r15, %rdi
callq 0x3480
movl $0x10, %edi
callq 0x3150
movq %rax, %r15
leaq 0x10e73(%rip), %rsi     # 0x1575e
movq %rax, %rdi
callq 0x3100
movq 0x186f6(%rip), %rsi     # 0x1cff0
movq 0x186b7(%rip), %rdx     # 0x1cfb8
movq %r15, %rdi
callq 0x3480
movl $0x10, %edi
callq 0x3150
movq %rax, %r15
leaq 0x10dfc(%rip), %rsi     # 0x15719
movq %rax, %rdi
callq 0x3100
movq 0x186c4(%rip), %rsi     # 0x1cff0
movq 0x18685(%rip), %rdx     # 0x1cfb8
movq %r15, %rdi
callq 0x3480
movl $0x10, %edi
callq 0x3150
movq %rax, %r15
leaq 0x10dca(%rip), %rsi     # 0x15719
movq %rax, %rdi
callq 0x3100
movq 0x18692(%rip), %rsi     # 0x1cff0
movq 0x18653(%rip), %rdx     # 0x1cfb8
movq %r15, %rdi
callq 0x3480
movl $0x10, %edi
callq 0x3150
movq %rax, %r15
leaq 0x10ddd(%rip), %rsi     # 0x1575e
movq %rax, %rdi
callq 0x3100
movq 0x18660(%rip), %rsi     # 0x1cff0
movq 0x18621(%rip), %rdx     # 0x1cfb8
movq %r15, %rdi
callq 0x3480
movl $0x10, %edi
callq 0x3150
movq %rax, %r15
leaq 0x10d66(%rip), %rsi     # 0x15719
movq %rax, %rdi
callq 0x3100
movq 0x1862e(%rip), %rsi     # 0x1cff0
movq 0x185ef(%rip), %rdx     # 0x1cfb8
movq %r15, %rdi
callq 0x3480
movl $0x10, %edi
callq 0x3150
movq %rax, %r15
leaq 0x10d79(%rip), %rsi     # 0x1575e
movq %rax, %rdi
callq 0x3100
movq 0x185fc(%rip), %rsi     # 0x1cff0
movq 0x185bd(%rip), %rdx     # 0x1cfb8
movq %r15, %rdi
callq 0x3480
jmp 0x4a0f
jmp 0x4a0f
jmp 0x4a0f
jmp 0x4a0f
jmp 0x4a0f
jmp 0x4a0f
movq %rax, %r14
movq %r15, %rdi
callq 0x3250
jmp 0x4a46
movq %rax, %r14
movq %r15, %rdi
callq 0x3250
jmp 0x4a89
jmp 0x4a7c
jmp 0x4a7c
jmp 0x4a7c
jmp 0x4a7c
jmp 0x4a7c
jmp 0x4a7c
jmp 0x4a7c
jmp 0x4a43
jmp 0x4a43
jmp 0x4a43
jmp 0x4a43
jmp 0x4a43
jmp 0x4a43
movq %rax, %r14
movq (%rsp), %rdi
cmpq %r13, %rdi
jne 0x4a75
jmp 0x4a7f
movq %rax, %r14
jmp 0x4a89
jmp 0x4a7c
jmp 0x4a7c
movq %rax, %r14
movq %r15, %rdi
callq 0x3250
jmp 0x4a7f
jmp 0x4a7c
movq %rax, %r14
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x4a7f
callq 0x32f0
jmp 0x4a7f
movq %rax, %r14
leaq 0x28(%rsp), %rdi
callq 0xcfec
movq %rbx, %rdi
callq 0xb8c6
movq %r14, %rdi
callq 0x34a0