// File: 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:
subq $0x2f8, %rsp            # imm = 0x2F8
movq %rdi, 0xd8(%rsp)
movq %rdi, %rax
movq %rax, 0xe0(%rsp)
movq %rdi, 0x2f0(%rsp)
movq %rsi, 0x2e8(%rsp)
movb $0x0, 0x2e7(%rsp)
callq 0x11a90
movq 0x2e8(%rsp), %rdi
callq 0x11320
movq %rax, 0xe8(%rsp)
jmp 0x5d1e
movq 0xe8(%rsp), %rsi
leaq 0x2b0(%rsp), %rdi
callq 0x11ad0
jmp 0x5d35
leaq 0x27f(%rsp), %rdi
movq %rdi, 0xd0(%rsp)
callq 0x4630
movq 0xd0(%rsp), %rdx
leaq 0x30bc8(%rip), %rsi     # 0x36921
leaq 0x280(%rsp), %rdi
callq 0x44f0
jmp 0x5d68
leaq 0x2b0(%rsp), %rdi
leaq 0x280(%rsp), %rsi
callq 0x113b0
movq %rax, 0xc8(%rsp)
jmp 0x5d87
movq 0xc8(%rsp), %rdi
callq 0x114a0
movq %rax, 0xc0(%rsp)
jmp 0x5d9e
movq 0xd8(%rsp), %rax
movq 0xc0(%rsp), %rcx
movl (%rcx), %ecx
movl %ecx, (%rax)
leaq 0x280(%rsp), %rdi
callq 0x4700
leaq 0x27f(%rsp), %rdi
callq 0x4430
leaq 0x24f(%rsp), %rdi
movq %rdi, 0xb8(%rsp)
callq 0x4630
movq 0xb8(%rsp), %rdx
leaq 0x30677(%rip), %rsi     # 0x36467
leaq 0x250(%rsp), %rdi
callq 0x44f0
jmp 0x5dff
leaq 0x2b0(%rsp), %rdi
leaq 0x250(%rsp), %rsi
callq 0x113b0
movq %rax, 0xb0(%rsp)
jmp 0x5e1e
movq 0xb0(%rsp), %rdi
callq 0x115d0
movq %rax, 0xa8(%rsp)
jmp 0x5e35
leaq 0x250(%rsp), %rdi
callq 0x4700
leaq 0x24f(%rsp), %rdi
callq 0x4430
movq 0xa8(%rsp), %rax
movq %rax, 0x270(%rsp)
movq 0x270(%rsp), %rdi
callq 0x11660
movq %rax, 0x240(%rsp)
movq 0x270(%rsp), %rdi
callq 0x11690
movq %rax, 0x238(%rsp)
leaq 0x240(%rsp), %rdi
leaq 0x238(%rsp), %rsi
callq 0x116c0
testb $0x1, %al
jne 0x5ea7
jmp 0x600a
leaq 0x240(%rsp), %rdi
callq 0x11700
movq %rax, %rcx
movq 0xd8(%rsp), %rax
movq %rcx, 0x230(%rsp)
addq $0x8, %rax
movq %rax, 0xa0(%rsp)
movq 0x230(%rsp), %rsi
leaq 0x208(%rsp), %rdi
callq 0x5600
jmp 0x5eea
movq 0xa0(%rsp), %rdi
leaq 0x208(%rsp), %rsi
callq 0x11b00
jmp 0x5f01
leaq 0x208(%rsp), %rdi
callq 0x11a80
leaq 0x240(%rsp), %rdi
callq 0x11740
jmp 0x5e89
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x2a8(%rsp)
movl %eax, 0x2a4(%rsp)
jmp 0x65df
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x2a8(%rsp)
movl %eax, 0x2a4(%rsp)
jmp 0x5f70
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x2a8(%rsp)
movl %eax, 0x2a4(%rsp)
leaq 0x280(%rsp), %rdi
callq 0x4700
leaq 0x27f(%rsp), %rdi
callq 0x4430
jmp 0x65b3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x2a8(%rsp)
movl %eax, 0x2a4(%rsp)
jmp 0x5fb9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x2a8(%rsp)
movl %eax, 0x2a4(%rsp)
leaq 0x250(%rsp), %rdi
callq 0x4700
leaq 0x24f(%rsp), %rdi
callq 0x4430
jmp 0x65b3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x2a8(%rsp)
movl %eax, 0x2a4(%rsp)
jmp 0x65b3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x2a8(%rsp)
movl %eax, 0x2a4(%rsp)
leaq 0x208(%rsp), %rdi
callq 0x11a80
jmp 0x65b3
leaq 0x1e7(%rsp), %rdi
movq %rdi, 0x98(%rsp)
callq 0x4630
movq 0x98(%rsp), %rdx
leaq 0x3043f(%rip), %rsi     # 0x3646d
leaq 0x1e8(%rsp), %rdi
callq 0x44f0
jmp 0x603d
leaq 0x2b0(%rsp), %rdi
leaq 0x1e8(%rsp), %rsi
callq 0x113b0
movq %rax, 0x90(%rsp)
jmp 0x605c
movq 0x90(%rsp), %rdi
callq 0x114a0
movq %rax, 0x88(%rsp)
jmp 0x6073
movq 0xd8(%rsp), %rax
movq 0x88(%rsp), %rcx
movl (%rcx), %ecx
movl %ecx, 0x20(%rax)
leaq 0x1e8(%rsp), %rdi
callq 0x4700
leaq 0x1e7(%rsp), %rdi
callq 0x4430
leaq 0x1bf(%rsp), %rdi
movq %rdi, 0x80(%rsp)
callq 0x4630
movq 0x80(%rsp), %rdx
leaq 0x303ad(%rip), %rsi     # 0x36473
leaq 0x1c0(%rsp), %rdi
callq 0x44f0
jmp 0x60d5
leaq 0x2b0(%rsp), %rdi
leaq 0x1c0(%rsp), %rsi
callq 0x113b0
movq %rax, 0x78(%rsp)
jmp 0x60f1
movq 0x78(%rsp), %rdi
callq 0x114a0
movq %rax, 0x70(%rsp)
jmp 0x6102
movq 0xd8(%rsp), %rax
movq 0x70(%rsp), %rcx
movl (%rcx), %ecx
movl %ecx, 0x24(%rax)
leaq 0x1c0(%rsp), %rdi
callq 0x4700
leaq 0x1bf(%rsp), %rdi
callq 0x4430
leaq 0x18f(%rsp), %rdi
movq %rdi, 0x68(%rsp)
callq 0x4630
movq 0x68(%rsp), %rdx
leaq 0x3032e(%rip), %rsi     # 0x3647a
leaq 0x190(%rsp), %rdi
callq 0x44f0
jmp 0x615b
leaq 0x2b0(%rsp), %rdi
leaq 0x190(%rsp), %rsi
callq 0x113b0
movq %rax, 0x60(%rsp)
jmp 0x6177
movq 0x60(%rsp), %rdi
callq 0x115d0
movq %rax, 0x58(%rsp)
jmp 0x6188
leaq 0x190(%rsp), %rdi
callq 0x4700
leaq 0x18f(%rsp), %rdi
callq 0x4430
movq 0x58(%rsp), %rax
movq %rax, 0x1b0(%rsp)
movq 0x1b0(%rsp), %rdi
callq 0x11660
movq %rax, 0x180(%rsp)
movq 0x1b0(%rsp), %rdi
callq 0x11690
movq %rax, 0x178(%rsp)
leaq 0x180(%rsp), %rdi
leaq 0x178(%rsp), %rsi
callq 0x116c0
testb $0x1, %al
jne 0x61f7
jmp 0x6344
leaq 0x180(%rsp), %rdi
callq 0x11700
movq %rax, %rcx
movq 0xd8(%rsp), %rax
movq %rcx, 0x170(%rsp)
addq $0x28, %rax
movq %rax, 0x48(%rsp)
movq 0x170(%rsp), %rdi
callq 0x5400
movq %rax, 0x50(%rsp)
jmp 0x6234
movq 0x48(%rsp), %rdi
movq 0x50(%rsp), %rax
movq %rax, 0x168(%rsp)
leaq 0x168(%rsp), %rsi
callq 0x11710
jmp 0x6255
jmp 0x6257
leaq 0x180(%rsp), %rdi
callq 0x11740
jmp 0x61d9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x2a8(%rsp)
movl %eax, 0x2a4(%rsp)
jmp 0x62a0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x2a8(%rsp)
movl %eax, 0x2a4(%rsp)
leaq 0x1e8(%rsp), %rdi
callq 0x4700
leaq 0x1e7(%rsp), %rdi
callq 0x4430
jmp 0x65b3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x2a8(%rsp)
movl %eax, 0x2a4(%rsp)
jmp 0x62e9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x2a8(%rsp)
movl %eax, 0x2a4(%rsp)
leaq 0x1c0(%rsp), %rdi
callq 0x4700
leaq 0x1bf(%rsp), %rdi
callq 0x4430
jmp 0x65b3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x2a8(%rsp)
movl %eax, 0x2a4(%rsp)
jmp 0x6332
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x2a8(%rsp)
movl %eax, 0x2a4(%rsp)
leaq 0x190(%rsp), %rdi
callq 0x4700
leaq 0x18f(%rsp), %rdi
callq 0x4430
jmp 0x65b3
leaq 0x147(%rsp), %rdi
movq %rdi, 0x40(%rsp)
callq 0x4630
movq 0x40(%rsp), %rdx
leaq 0x3011f(%rip), %rsi     # 0x36481
leaq 0x148(%rsp), %rdi
callq 0x44f0
jmp 0x6371
leaq 0x2b0(%rsp), %rdi
leaq 0x148(%rsp), %rsi
callq 0x113b0
movq %rax, 0x38(%rsp)
jmp 0x638d
movq 0x38(%rsp), %rdi
callq 0x114a0
movq %rax, 0x30(%rsp)
jmp 0x639e
movq 0xd8(%rsp), %rax
movq 0x30(%rsp), %rcx
movl (%rcx), %ecx
movl %ecx, 0x40(%rax)
leaq 0x148(%rsp), %rdi
callq 0x4700
leaq 0x147(%rsp), %rdi
callq 0x4430
leaq 0x117(%rsp), %rdi
movq %rdi, 0x28(%rsp)
callq 0x4630
movq 0x28(%rsp), %rdx
leaq 0x300a6(%rip), %rsi     # 0x3648e
leaq 0x118(%rsp), %rdi
callq 0x44f0
jmp 0x63f7
leaq 0x2b0(%rsp), %rdi
leaq 0x118(%rsp), %rsi
callq 0x113b0
movq %rax, 0x20(%rsp)
jmp 0x6413
movq 0x20(%rsp), %rdi
callq 0x115d0
movq %rax, 0x18(%rsp)
jmp 0x6424
leaq 0x118(%rsp), %rdi
callq 0x4700
leaq 0x117(%rsp), %rdi
callq 0x4430
movq 0x18(%rsp), %rax
movq %rax, 0x138(%rsp)
movq 0x138(%rsp), %rdi
callq 0x11660
movq %rax, 0x108(%rsp)
movq 0x138(%rsp), %rdi
callq 0x11690
movq %rax, 0x100(%rsp)
leaq 0x108(%rsp), %rdi
leaq 0x100(%rsp), %rsi
callq 0x116c0
testb $0x1, %al
jne 0x6493
jmp 0x6592
leaq 0x108(%rsp), %rdi
callq 0x11700
movq %rax, %rcx
movq 0xd8(%rsp), %rax
movq %rcx, 0xf8(%rsp)
addq $0x48, %rax
movq %rax, 0x8(%rsp)
movq 0xf8(%rsp), %rdi
callq 0x114a0
movq %rax, 0x10(%rsp)
jmp 0x64d0
movq 0x8(%rsp), %rdi
movq 0x10(%rsp), %rax
movl (%rax), %eax
movl %eax, 0xf4(%rsp)
leaq 0xf4(%rsp), %rsi
callq 0x11b30
jmp 0x64f2
jmp 0x64f4
leaq 0x108(%rsp), %rdi
callq 0x11740
jmp 0x6475
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x2a8(%rsp)
movl %eax, 0x2a4(%rsp)
jmp 0x653d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x2a8(%rsp)
movl %eax, 0x2a4(%rsp)
leaq 0x148(%rsp), %rdi
callq 0x4700
leaq 0x147(%rsp), %rdi
callq 0x4430
jmp 0x65b3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x2a8(%rsp)
movl %eax, 0x2a4(%rsp)
jmp 0x6583
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x2a8(%rsp)
movl %eax, 0x2a4(%rsp)
leaq 0x118(%rsp), %rdi
callq 0x4700
leaq 0x117(%rsp), %rdi
callq 0x4430
jmp 0x65b3
movb $0x1, 0x2e7(%rsp)
leaq 0x2b0(%rsp), %rdi
callq 0x11b60
testb $0x1, 0x2e7(%rsp)
jne 0x65cf
jmp 0x65c2
leaq 0x2b0(%rsp), %rdi
callq 0x11b60
jmp 0x65df
movq 0xd8(%rsp), %rdi
callq 0x11b70
movq 0xe0(%rsp), %rax
addq $0x2f8, %rsp            # imm = 0x2F8
retq
movq 0xd8(%rsp), %rdi
callq 0x11b70
movq 0x2a8(%rsp), %rdi
callq 0x4620
nopl (%rax)