user: 请将以下的汇编代码转换成C语言代码：

```asm
<init_flag>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %r12
  push   %rbx
  sub    $0x40,%rsp
  mov    %rdi,-0x38(%rbp)
  mov    %esi,-0x3c(%rbp)
  mov    %edx,-0x40(%rbp)
  mov    %ecx,-0x44(%rbp)
  mov    %r8,-0x50(%rbp)
  mov    %r9d,-0x48(%rbp)
  mov    -0x38(%rbp),%rax
  mov    %rax,%rdi
  call   <read_pgm@plt>
  mov    %rax,-0x18(%rbp)
  movl   $0x1,-0x24(%rbp)
  jmp    L243
L152:
  movl   $0x1,-0x20(%rbp)
  jmp    L203
L330:
  movl   $0x1,-0x1c(%rbp)
  jmp    L65
L109:
  mov    -0x1c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x50(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x40(%rbp),%eax
  add    $0x1,%eax
  sub    -0x20(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x24(%rbp),%eax
  cltq
  shl    $0x2,%rax
  lea    (%rdx,%rax,1),%rbx
  mov    -0x40(%rbp),%r9d
  mov    -0x3c(%rbp),%r8d
  mov    -0x24(%rbp),%ecx
  mov    -0x20(%rbp),%edx
  mov    -0x1c(%rbp),%esi
  mov    -0x18(%rbp),%rax
  sub    $0x8,%rsp
  mov    -0x44(%rbp),%edi
  push   %rdi
  mov    %rax,%rdi
  call   <createflag@plt>
  add    $0x10,%rsp
  mov    %eax,(%rbx)
  addl   $0x1,-0x1c(%rbp)
L65:
  mov    -0x3c(%rbp),%eax
  cmp    -0x1c(%rbp),%eax
  jge    L109
  addl   $0x1,-0x20(%rbp)
L203:
  mov    -0x40(%rbp),%eax
  cmp    -0x20(%rbp),%eax
  jge    L330
  addl   $0x1,-0x24(%rbp)
L243:
  mov    -0x44(%rbp),%eax
  cmp    -0x24(%rbp),%eax
  jge    L152
  movl   $0x0,-0x24(%rbp)
  jmp    L145
L204:
  mov    -0x50(%rbp),%rax
  mov    (%rax),%rax
  mov    (%rax),%rdx
  mov    -0x24(%rbp),%eax
  cltq
  shl    $0x2,%rax
  lea    (%rdx,%rax,1),%rbx
  mov    0x18(%rbp),%eax
  mov    %eax,%edi
  call   <getwallbit@plt>
  mov    %eax,(%rbx)
  mov    -0x50(%rbp),%rax
  mov    (%rax),%rdx
  mov    -0x40(%rbp),%eax
  cltq
  add    $0x1,%rax
  shl    $0x3,%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x24(%rbp),%eax
  cltq
  shl    $0x2,%rax
  lea    (%rdx,%rax,1),%rbx
  mov    0x20(%rbp),%eax
  mov    %eax,%edi
  call   <getwallbit@plt>
  mov    %eax,(%rbx)
  mov    -0x3c(%rbp),%eax
  cltq
  add    $0x1,%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x50(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  mov    (%rax),%rdx
  mov    -0x24(%rbp),%eax
  cltq
  shl    $0x2,%rax
  lea    (%rdx,%rax,1),%rbx
  mov    0x18(%rbp),%eax
  mov    %eax,%edi
  call   <getwallbit@plt>
  mov    %eax,(%rbx)
  mov    -0x3c(%rbp),%eax
  cltq
  add    $0x1,%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x50(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x40(%rbp),%eax
  cltq
  add    $0x1,%rax
  shl    $0x3,%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x24(%rbp),%eax
  cltq
  shl    $0x2,%rax
  lea    (%rdx,%rax,1),%rbx
  mov    0x20(%rbp),%eax
  mov    %eax,%edi
  call   <getwallbit@plt>
  mov    %eax,(%rbx)
  addl   $0x1,-0x24(%rbp)
L145:
  mov    -0x44(%rbp),%eax
  add    $0x1,%eax
  cmp    %eax,-0x24(%rbp)
  jle    L204
  movl   $0x0,-0x28(%rbp)
  jmp    L266
L17:
  mov    -0x50(%rbp),%rax
  mov    (%rax),%rdx
  mov    -0x28(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rdx,%rax
  mov    (%rax),%rbx
  mov    0x30(%rbp),%eax
  mov    %eax,%edi
  call   <getwallbit@plt>
  mov    %eax,(%rbx)
  mov    -0x50(%rbp),%rax
  mov    (%rax),%rdx
  mov    -0x28(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x44(%rbp),%eax
  cltq
  add    $0x1,%rax
  shl    $0x2,%rax
  lea    (%rdx,%rax,1),%rbx
  mov    0x28(%rbp),%eax
  mov    %eax,%edi
  call   <getwallbit@plt>
  mov    %eax,(%rbx)
  mov    -0x3c(%rbp),%eax
  cltq
  add    $0x1,%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x50(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x28(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rdx,%rax
  mov    (%rax),%rbx
  mov    0x30(%rbp),%eax
  mov    %eax,%edi
  call   <getwallbit@plt>
  mov    %eax,(%rbx)
  mov    -0x3c(%rbp),%eax
  cltq
  add    $0x1,%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x50(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x28(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x44(%rbp),%eax
  cltq
  add    $0x1,%rax
  shl    $0x2,%rax
  lea    (%rdx,%rax,1),%rbx
  mov    0x28(%rbp),%eax
  mov    %eax,%edi
  call   <getwallbit@plt>
  mov    %eax,(%rbx)
  addl   $0x1,-0x28(%rbp)
L266:
  mov    -0x40(%rbp),%eax
  add    $0x1,%eax
  cmp    %eax,-0x28(%rbp)
  jle    L17
  movl   $0x0,-0x2c(%rbp)
  jmp    L322
L309:
  mov    -0x2c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x50(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  mov    (%rax),%rbx
  mov    0x18(%rbp),%eax
  mov    %eax,%edi
  call   <getwallbit@plt>
  mov    %eax,(%rbx)
  mov    -0x2c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x50(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x40(%rbp),%eax
  cltq
  add    $0x1,%rax
  shl    $0x3,%rax
  add    %rdx,%rax
  mov    (%rax),%rbx
  mov    0x20(%rbp),%eax
  mov    %eax,%edi
  call   <getwallbit@plt>
  mov    %eax,(%rbx)
  mov    -0x2c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x50(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  mov    (%rax),%rdx
  mov    -0x44(%rbp),%eax
  cltq
  add    $0x1,%rax
  shl    $0x2,%rax
  lea    (%rdx,%rax,1),%rbx
  mov    0x18(%rbp),%eax
  mov    %eax,%edi
  call   <getwallbit@plt>
  mov    %eax,(%rbx)
  mov    -0x2c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x50(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x40(%rbp),%eax
  cltq
  add    $0x1,%rax
  shl    $0x3,%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x44(%rbp),%eax
  cltq
  add    $0x1,%rax
  shl    $0x2,%rax
  lea    (%rdx,%rax,1),%rbx
  mov    0x20(%rbp),%eax
  mov    %eax,%edi
  call   <getwallbit@plt>
  mov    %eax,(%rbx)
  addl   $0x1,-0x2c(%rbp)
L322:
  mov    -0x3c(%rbp),%eax
  add    $0x1,%eax
  cmp    %eax,-0x2c(%rbp)
  jle    L309
  movl   $0x1,-0x2c(%rbp)
  jmp    L177
L323:
  movl   $0x1,-0x28(%rbp)
  jmp    L134
L189:
  mov    $0xc,%esi
  mov    $0x2,%edi
  call   <pow2@plt>
  mov    %eax,%ebx
  mov    $0xd,%esi
  mov    $0x2,%edi
  call   <pow2@plt>
  mov    %ebx,%ecx
  xor    %eax,%ecx
  mov    -0x2c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x50(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x28(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  add    $0x4,%rax
  mov    (%rax),%eax
  and    %ecx,%eax
  test   %eax,%eax
  jne    L211
  mov    $0x0,%edi
  call   <getwallbit@plt>
  mov    %eax,%ebx
  mov    -0x2c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x50(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x28(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  add    $0x4,%rax
  mov    (%rax),%r12d
  mov    $0xc,%esi
  mov    $0x2,%edi
  call   <pow2@plt>
  mov    %eax,%edx
  mov    %edx,%eax
  shl    $0x4,%eax
  sub    %edx,%eax
  mov    %r12d,%ecx
  and    %eax,%ecx
  mov    -0x2c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x50(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x28(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  lea    (%rbx,%rcx,1),%edx
  mov    %edx,(%rax)
  jmp    L49
L211:
  mov    0x30(%rbp),%eax
  mov    %eax,%edi
  call   <getwallbit@plt>
  lea    -0x3(%rax),%esi
  mov    -0x2c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x50(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x28(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  add    $0x4,%rax
  mov    (%rax),%eax
  and    $0x3,%eax
  mov    %eax,%ecx
  mov    -0x2c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x50(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x28(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  lea    (%rsi,%rcx,1),%edx
  mov    %edx,(%rax)
L49:
  mov    $0xc,%esi
  mov    $0x2,%edi
  call   <pow2@plt>
  mov    %eax,%ebx
  mov    $0xd,%esi
  mov    $0x2,%edi
  call   <pow2@plt>
  mov    %ebx,%ecx
  xor    %eax,%ecx
  mov    -0x2c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x50(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x28(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x44(%rbp),%eax
  cltq
  shl    $0x2,%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  and    %ecx,%eax
  test   %eax,%eax
  jne    L112
  mov    $0x0,%edi
  call   <getwallbit@plt>
  mov    %eax,%ebx
  mov    -0x2c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x50(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x28(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x44(%rbp),%eax
  cltq
  shl    $0x2,%rax
  add    %rdx,%rax
  mov    (%rax),%r12d
  mov    $0xc,%esi
  mov    $0x2,%edi
  call   <pow2@plt>
  mov    %eax,%edx
  mov    %edx,%eax
  shl    $0x4,%eax
  sub    %edx,%eax
  mov    %r12d,%ecx
  and    %eax,%ecx
  mov    -0x2c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x50(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x28(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x44(%rbp),%eax
  cltq
  add    $0x1,%rax
  shl    $0x2,%rax
  add    %rdx,%rax
  lea    (%rbx,%rcx,1),%edx
  mov    %edx,(%rax)
  jmp    L321
L112:
  mov    0x28(%rbp),%eax
  mov    %eax,%edi
  call   <getwallbit@plt>
  lea    -0xc(%rax),%esi
  mov    -0x2c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x50(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x28(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x44(%rbp),%eax
  cltq
  shl    $0x2,%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  and    $0xc,%eax
  mov    %eax,%ecx
  mov    -0x2c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x50(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x28(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x44(%rbp),%eax
  cltq
  add    $0x1,%rax
  shl    $0x2,%rax
  add    %rdx,%rax
  lea    (%rsi,%rcx,1),%edx
  mov    %edx,(%rax)
L321:
  addl   $0x1,-0x28(%rbp)
L134:
  mov    -0x28(%rbp),%eax
  cmp    -0x40(%rbp),%eax
  jle    L189
  addl   $0x1,-0x2c(%rbp)
L177:
  mov    -0x2c(%rbp),%eax
  cmp    -0x3c(%rbp),%eax
  jle    L323
  movl   $0x1,-0x28(%rbp)
  jmp    L325
L129:
  movl   $0x1,-0x24(%rbp)
  jmp    L150
L154:
  mov    $0xc,%esi
  mov    $0x2,%edi
  call   <pow2@plt>
  mov    %eax,%ebx
  mov    $0xd,%esi
  mov    $0x2,%edi
  call   <pow2@plt>
  mov    %ebx,%ecx
  xor    %eax,%ecx
  mov    -0x50(%rbp),%rax
  add    $0x8,%rax
  mov    (%rax),%rdx
  mov    -0x28(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x24(%rbp),%eax
  cltq
  shl    $0x2,%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  and    %ecx,%eax
  test   %eax,%eax
  jne    L102
  mov    $0x0,%edi
  call   <getwallbit@plt>
  mov    %eax,%ebx
  mov    -0x50(%rbp),%rax
  add    $0x8,%rax
  mov    (%rax),%rdx
  mov    -0x28(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x24(%rbp),%eax
  cltq
  shl    $0x2,%rax
  add    %rdx,%rax
  mov    (%rax),%r12d
  mov    $0xc,%esi
  mov    $0x2,%edi
  call   <pow2@plt>
  mov    %eax,%edx
  mov    %edx,%eax
  shl    $0x4,%eax
  sub    %edx,%eax
  mov    %r12d,%ecx
  and    %eax,%ecx
  mov    -0x50(%rbp),%rax
  mov    (%rax),%rdx
  mov    -0x28(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x24(%rbp),%eax
  cltq
  shl    $0x2,%rax
  add    %rdx,%rax
  lea    (%rbx,%rcx,1),%edx
  mov    %edx,(%rax)
  jmp    L173
L102:
  mov    -0x48(%rbp),%eax
  mov    %eax,%edi
  call   <getwallbit@plt>
  mov    %eax,%ebx
  mov    $0xa,%esi
  mov    $0x2,%edi
  call   <pow2@plt>
  mov    %eax,%ecx
  lea    0x0(,%rax,4),%edx
  mov    %ecx,%eax
  sub    %edx,%eax
  lea    (%rbx,%rax,1),%r12d
  mov    -0x50(%rbp),%rax
  add    $0x8,%rax
  mov    (%rax),%rdx
  mov    -0x28(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x24(%rbp),%eax
  cltq
  shl    $0x2,%rax
  add    %rdx,%rax
  mov    (%rax),%ebx
  mov    $0xa,%esi
  mov    $0x2,%edi
  call   <pow2@plt>
  mov    %eax,%edx
  mov    %edx,%eax
  add    %eax,%eax
  add    %edx,%eax
  and    %eax,%ebx
  mov    %ebx,%ecx
  mov    -0x50(%rbp),%rax
  mov    (%rax),%rdx
  mov    -0x28(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x24(%rbp),%eax
  cltq
  shl    $0x2,%rax
  add    %rdx,%rax
  lea    (%r12,%rcx,1),%edx
  mov    %edx,(%rax)
L173:
  mov    $0xc,%esi
  mov    $0x2,%edi
  call   <pow2@plt>
  mov    %eax,%ebx
  mov    $0xd,%esi
  mov    $0x2,%edi
  call   <pow2@plt>
  xor    %eax,%ebx
  mov    %ebx,%ecx
  mov    -0x3c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x50(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x28(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x24(%rbp),%eax
  cltq
  shl    $0x2,%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  and    %ecx,%eax
  test   %eax,%eax
  jne    L96
  mov    $0x0,%edi
  call   <getwallbit@plt>
  mov    %eax,%ebx
  mov    -0x3c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x50(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x28(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x24(%rbp),%eax
  cltq
  shl    $0x2,%rax
  add    %rdx,%rax
  mov    (%rax),%r12d
  mov    $0xc,%esi
  mov    $0x2,%edi
  call   <pow2@plt>
  mov    %eax,%edx
  mov    %edx,%eax
  shl    $0x4,%eax
  sub    %edx,%eax
  mov    %r12d,%ecx
  and    %eax,%ecx
  mov    -0x3c(%rbp),%eax
  cltq
  add    $0x1,%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x50(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x28(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x24(%rbp),%eax
  cltq
  shl    $0x2,%rax
  add    %rdx,%rax
  lea    (%rbx,%rcx,1),%edx
  mov    %edx,(%rax)
  jmp    L1
L96:
  mov    0x10(%rbp),%edi
  call   <getwallbit@plt>
  mov    %eax,%ebx
  mov    $0x8,%esi
  mov    $0x2,%edi
  call   <pow2@plt>
  mov    %eax,%ecx
  lea    0x0(,%rax,4),%edx
  mov    %ecx,%eax
  sub    %edx,%eax
  lea    (%rbx,%rax,1),%r12d
  mov    -0x3c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x50(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x28(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x24(%rbp),%eax
  cltq
  shl    $0x2,%rax
  add    %rdx,%rax
  mov    (%rax),%ebx
  mov    $0x8,%esi
  mov    $0x2,%edi
  call   <pow2@plt>
  mov    %eax,%edx
  mov    %edx,%eax
  add    %eax,%eax
  add    %edx,%eax
  and    %eax,%ebx
  mov    %ebx,%ecx
  mov    -0x3c(%rbp),%eax
  cltq
  add    $0x1,%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x50(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x28(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x24(%rbp),%eax
  cltq
  shl    $0x2,%rax
  add    %rdx,%rax
  lea    (%r12,%rcx,1),%edx
  mov    %edx,(%rax)
L1:
  addl   $0x1,-0x24(%rbp)
L150:
  mov    -0x24(%rbp),%eax
  cmp    -0x44(%rbp),%eax
  jle    L154
  addl   $0x1,-0x28(%rbp)
L325:
  mov    -0x28(%rbp),%eax
  cmp    -0x40(%rbp),%eax
  jle    L129
  movl   $0x1,-0x2c(%rbp)
  jmp    L90
L63:
  movl   $0x1,-0x24(%rbp)
  jmp    L86
L194:
  mov    $0xc,%esi
  mov    $0x2,%edi
  call   <pow2@plt>
  mov    %eax,%ebx
  mov    $0xd,%esi
  mov    $0x2,%edi
  call   <pow2@plt>
  mov    %ebx,%ecx
  xor    %eax,%ecx
  mov    -0x2c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x50(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  add    $0x8,%rax
  mov    (%rax),%rdx
  mov    -0x24(%rbp),%eax
  cltq
  shl    $0x2,%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  and    %ecx,%eax
  test   %eax,%eax
  jne    L13
  mov    $0x0,%edi
  call   <getwallbit@plt>
  mov    %eax,%ebx
  mov    -0x2c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x50(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  add    $0x8,%rax
  mov    (%rax),%rdx
  mov    -0x24(%rbp),%eax
  cltq
  shl    $0x2,%rax
  add    %rdx,%rax
  mov    (%rax),%r12d
  mov    $0xc,%esi
  mov    $0x2,%edi
  call   <pow2@plt>
  mov    %eax,%edx
  mov    %edx,%eax
  shl    $0x4,%eax
  sub    %edx,%eax
  mov    %r12d,%ecx
  and    %eax,%ecx
  mov    -0x2c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x50(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  mov    (%rax),%rdx
  mov    -0x24(%rbp),%eax
  cltq
  shl    $0x2,%rax
  add    %rdx,%rax
  lea    (%rbx,%rcx,1),%edx
  mov    %edx,(%rax)
  jmp    L334
L13:
  mov    0x18(%rbp),%eax
  mov    %eax,%edi
  call   <getwallbit@plt>
  lea    -0xc0(%rax),%esi
  mov    -0x2c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x50(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  add    $0x8,%rax
  mov    (%rax),%rdx
  mov    -0x24(%rbp),%eax
  cltq
  shl    $0x2,%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  and    $0xc0,%eax
  mov    %eax,%ecx
  mov    -0x2c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x50(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  mov    (%rax),%rdx
  mov    -0x24(%rbp),%eax
  cltq
  shl    $0x2,%rax
  add    %rdx,%rax
  lea    (%rsi,%rcx,1),%edx
  mov    %edx,(%rax)
L334:
  mov    $0xc,%esi
  mov    $0x2,%edi
  call   <pow2@plt>
  mov    %eax,%ebx
  mov    $0xd,%esi
  mov    $0x2,%edi
  call   <pow2@plt>
  xor    %eax,%ebx
  mov    %ebx,%ecx
  mov    -0x2c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x50(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x40(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x24(%rbp),%eax
  cltq
  shl    $0x2,%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  and    %ecx,%eax
  test   %eax,%eax
  jne    L346
  mov    $0x0,%edi
  call   <getwallbit@plt>
  mov    %eax,%ebx
  mov    -0x2c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x50(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x40(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x24(%rbp),%eax
  cltq
  shl    $0x2,%rax
  add    %rdx,%rax
  mov    (%rax),%r12d
  mov    $0xc,%esi
  mov    $0x2,%edi
  call   <pow2@plt>
  mov    %eax,%edx
  mov    %edx,%eax
  shl    $0x4,%eax
  sub    %edx,%eax
  mov    %r12d,%ecx
  and    %eax,%ecx
  mov    -0x2c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x50(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x40(%rbp),%eax
  cltq
  add    $0x1,%rax
  shl    $0x3,%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x24(%rbp),%eax
  cltq
  shl    $0x2,%rax
  add    %rdx,%rax
  lea    (%rbx,%rcx,1),%edx
  mov    %edx,(%rax)
  jmp    L254
L346:
  mov    0x20(%rbp),%eax
  mov    %eax,%edi
  call   <getwallbit@plt>
  lea    -0x30(%rax),%esi
  mov    -0x2c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x50(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x40(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x24(%rbp),%eax
  cltq
  shl    $0x2,%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  and    $0x30,%eax
  mov    %eax,%ecx
  mov    -0x2c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x50(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x40(%rbp),%eax
  cltq
  add    $0x1,%rax
  shl    $0x3,%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x24(%rbp),%eax
  cltq
  shl    $0x2,%rax
  add    %rdx,%rax
  lea    (%rsi,%rcx,1),%edx
  mov    %edx,(%rax)
L254:
  addl   $0x1,-0x24(%rbp)
L86:
  mov    -0x24(%rbp),%eax
  cmp    -0x44(%rbp),%eax
  jle    L194
  addl   $0x1,-0x2c(%rbp)
L90:
  mov    -0x2c(%rbp),%eax
  cmp    -0x3c(%rbp),%eax
  jle    L63
  nop
  nop
  lea    -0x10(%rbp),%rsp
  pop    %rbx
  pop    %r12
  pop    %rbp
  ret
```

assistant: ```c
void init_flag(char *problem, int imax, int jmax, int kmax, int ***Flag, int wl, int wr, int wf, int wh, int wt, int wb) {
  int i, j, k;
  int **Pic = read_pgm(problem);
  for (k = 1; k < kmax + 1; k++) {
    for (int j = 1; j < jmax + 1; j++) {
      for (int i = 1; i < imax + 1; i++) {
        Flag[i][jmax + 1 - j][k] = createflag(Pic, i, j, k, imax, jmax, kmax);
      }
    }
  }
  for (k = 0; k < kmax + 2; k++) {
    Flag[0][0][k] = getwallbit(wf);
    Flag[0][jmax + 1][k] = getwallbit(wh);
    Flag[imax + 1][0][k] = getwallbit(wf);
    Flag[imax + 1][jmax + 1][k] = getwallbit(wh);
  }
  for (j = 0; j < jmax + 2; j++) {
    Flag[0][j][0] = getwallbit(wb);
    Flag[0][j][kmax + 1] = getwallbit(wt);
    Flag[imax + 1][j][0] = getwallbit(wb);
    Flag[imax + 1][j][kmax + 1] = getwallbit(wt);
  }
  for (i = 0; i < imax + 2; i++) {
    Flag[i][0][0] = getwallbit(wf);
    Flag[i][jmax + 1][0] = getwallbit(wh);
    Flag[i][0][kmax + 1] = getwallbit(wf);
    Flag[i][jmax + 1][kmax + 1] = getwallbit(wh);
  }
  for (i = 1; i <= imax; i++) {
    for (j = 1; j <= jmax; j++) {
      if ((Flag[i][j][1] & pow2(2, 12)) == (Flag[i][j][1] & pow2(2, 13))) {
        Flag[i][j][0] = getwallbit(0) + (Flag[i][j][1] & (pow2(2, 12) * 15));
      } else {
        Flag[i][j][0] = (getwallbit(wb) - 3) + (Flag[i][j][1] & 3);
      }
      if ((Flag[i][j][kmax] & pow2(2, 12)) == (Flag[i][j][kmax] & pow2(2, 13))) {
        Flag[i][j][kmax + 1] = getwallbit(0) + (Flag[i][j][kmax] & (pow2(2, 12) * 15));
      } else {
        Flag[i][j][kmax + 1] = (getwallbit(wt) - 12) + (Flag[i][j][kmax] & 12);
      }
    }
  }
  for (j = 1; j <= jmax; j++) {
    for (k = 1; k <= kmax; k++) {
      if ((Flag[1][j][k] & pow2(2, 12)) == (Flag[1][j][k] & pow2(2, 13))) {
        Flag[0][j][k] = getwallbit(0) + (Flag[1][j][k] & (pow2(2, 12) * 15));
      } else {
        Flag[0][j][k] = (getwallbit(wl) - 3 * pow2(2, 10)) + (Flag[1][j][k] & (3 * pow2(2, 10)));
      }
      if ((Flag[imax][j][k] & pow2(2, 12)) == (Flag[imax][j][k] & pow2(2, 13))) {
        Flag[imax + 1][j][k] = getwallbit(0) + (Flag[imax][j][k] & (pow2(2, 12) * 15));
      } else {
        Flag[imax + 1][j][k] = (getwallbit(wr) - 3 * pow2(2, 8)) + (Flag[imax][j][k] & (3 * pow2(2, 8)));
      }
    }
  }
  for (i = 1; i <= imax; i++) {
    for (k = 1; k <= kmax; k++) {
      if ((Flag[i][1][k] & pow2(2, 12)) == (Flag[i][1][k] & pow2(2, 13))) {
        Flag[i][0][k] = getwallbit(0) + (Flag[i][1][k] & (pow2(2, 12) * 15));
      } else {
        Flag[i][0][k] = (getwallbit(wf) - 64 * 3) + (Flag[i][1][k] & (64 * 3));
      }
      if ((Flag[i][jmax][k] & pow2(2, 12)) == (Flag[i][jmax][k] & pow2(2, 13))) {
        Flag[i][jmax + 1][k] = getwallbit(0) + (Flag[i][jmax][k] & (pow2(2, 12) * 15));
      } else {
        Flag[i][jmax + 1][k] = (getwallbit(wh) - 16 * 3) + (Flag[i][jmax][k] & (16 * 3));
      }
    }
  }
}
```