user: 请从给定的汇编指令推导出C源代码：

```asm
<init_flag>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  mov    %ecx,%ebx
  sub    $0xc8,%rsp
  mov    %esi,0x2c(%rsp)
  mov    %edx,0x50(%rsp)
  mov    %ecx,0x58(%rsp)
  mov    %r8,0x68(%rsp)
  mov    %r9d,0x74(%rsp)
  mov    %fs:0x28,%rax
  mov    %rax,0xb8(%rsp)
  movabs $0x200000001,%rax
  movl   $0x8,0xa8(%rsp)
  mov    %rax,0x90(%rsp)
  movabs $0x300000000,%rax
  mov    %rax,0x98(%rsp)
  movabs $0x700000004,%rax
  mov    %rax,0xa0(%rsp)
  xor    %eax,%eax
  call   <read_pgm@plt>
  mov    %eax,0x70(%rsp)
  lea    0x1(%rbx),%eax
  mov    %eax,0x84(%rsp)
  test   %ebx,%ebx
  jle    L295
  mov    0x50(%rsp),%eax
  movl   $0x0,0x5c(%rsp)
  lea    0x2(%rax),%ecx
  add    %eax,%eax
  mov    %ecx,0x88(%rsp)
  mov    %eax,0x8c(%rsp)
  xor    %eax,%eax
  nopl   (%rax)
L363:
  mov    0x50(%rsp),%r11d
  test   %r11d,%r11d
  jle    L360
  mov    0x5c(%rsp),%edx
  mov    0x88(%rsp),%ecx
  add    $0x1,%rax
  movl   $0x0,0x54(%rsp)
  mov    0x8c(%rsp),%esi
  mov    %rax,0x78(%rsp)
  shl    $0x2,%rax
  add    %edx,%ecx
  mov    %rax,0x48(%rsp)
  lea    0x4(%rdx,%rsi,1),%edx
  lea    0x1(%rcx),%eax
  mov    %ecx,0x80(%rsp)
  mov    %edx,0x60(%rsp)
  mov    %eax,0x64(%rsp)
  nopw   0x0(%rax,%rax,1)
L8:
  mov    0x2c(%rsp),%ebx
  test   %ebx,%ebx
  jle    L220
  mov    0x54(%rsp),%eax
  mov    0x64(%rsp),%r12d
  mov    $0x1,%r13d
  add    %eax,%r12d
  movslq %r12d,%r12
  shl    $0x2,%r12
  lea    -0x4(%r12),%rcx
  mov    %rcx,0x10(%rsp)
  lea    0x4(%r12),%rcx
  mov    %rcx,0x18(%rsp)
  mov    %eax,%ecx
  mov    0x5c(%rsp),%eax
  lea    0x1(%rcx,%rax,1),%eax
  cltq
  shl    $0x2,%rax
  mov    %rax,0x30(%rsp)
  mov    0x60(%rsp),%eax
  lea    0x1(%rcx,%rax,1),%eax
  cltq
  shl    $0x2,%rax
  mov    %rax,0x20(%rsp)
  mov    0x50(%rsp),%eax
  sub    %ecx,%eax
  mov    0x68(%rsp),%rcx
  cltq
  shl    $0x3,%rax
  mov    %rax,0x38(%rsp)
  movslq 0x70(%rsp),%rax
  sub    %rax,%rcx
  lea    0x8(%rax),%r15
  mov    %rcx,0x40(%rsp)
  jmp    L47
  nopw   0x0(%rax,%rax,1)
L509:
  mov    %ebx,%edi
  xor    %eax,%eax
  call   <getcelltype@plt>
  mov    %ebx,%edx
  sar    $0xc,%edx
  and    $0xf,%edx
  cmp    $0x8,%edx
  je     L110
L108:
  mov    0x8(%rsp),%rcx
  mov    0x40(%rsp),%rax
  add    $0x1,%r13d
  mov    (%rax,%rcx,1),%rax
  mov    0x38(%rsp),%rcx
  mov    (%rax,%rcx,1),%rax
  mov    0x48(%rsp),%rcx
  mov    %ebx,(%rax,%rcx,1)
  cmp    %r13d,0x2c(%rsp)
  jl     L220
L47:
  mov    (%r15),%rax
  mov    $0xc,%esi
  mov    $0x2,%edi
  mov    %r15,%r14
  movslq (%rax,%r12,1),%rax
  mov    0x90(%rsp,%rax,4),%ebx
  xor    %eax,%eax
  call   <pow2@plt>
  mov    %r15,0x8(%rsp)
  add    $0x8,%r15
  mov    $0x3,%esi
  imul   %eax,%ebx
  mov    (%r15),%rax
  mov    (%rax,%r12,1),%edi
  xor    %eax,%eax
  add    $0x1,%edi
  call   <min@plt>
  mov    $0xa,%esi
  mov    $0x2,%edi
  mov    %eax,%ebp
  xor    %eax,%eax
  call   <pow2@plt>
  mov    $0x3,%esi
  imul   %eax,%ebp
  mov    -0x8(%r14),%rax
  mov    (%rax,%r12,1),%edi
  xor    %eax,%eax
  add    %ebx,%ebp
  add    $0x1,%edi
  call   <min@plt>
  mov    $0x8,%esi
  mov    $0x2,%edi
  mov    %eax,%ebx
  xor    %eax,%eax
  call   <pow2@plt>
  mov    0x10(%rsp),%rcx
  mov    $0x3,%esi
  imul   %eax,%ebx
  mov    (%r14),%rax
  mov    (%rax,%rcx,1),%edi
  xor    %eax,%eax
  add    %ebp,%ebx
  add    $0x1,%edi
  call   <min@plt>
  mov    $0x6,%esi
  mov    $0x2,%edi
  mov    %eax,%ebp
  xor    %eax,%eax
  call   <pow2@plt>
  mov    0x18(%rsp),%rdx
  mov    $0x3,%esi
  imul   %eax,%ebp
  mov    (%r14),%rax
  mov    (%rax,%rdx,1),%edi
  xor    %eax,%eax
  add    %ebx,%ebp
  add    $0x1,%edi
  call   <min@plt>
  mov    $0x4,%esi
  mov    $0x2,%edi
  mov    %eax,%ebx
  xor    %eax,%eax
  call   <pow2@plt>
  mov    $0x3,%esi
  imul   %eax,%ebx
  mov    (%r14),%rax
  add    %ebp,%ebx
  mov    0x30(%rsp),%rbp
  mov    (%rax,%rbp,1),%edi
  add    $0x1,%edi
  xor    %eax,%eax
  call   <min@plt>
  mov    0x20(%rsp),%rsi
  lea    (%rbx,%rax,4),%ebx
  mov    (%r14),%rax
  mov    (%rax,%rsi,1),%edi
  xor    %eax,%eax
  mov    $0x3,%esi
  add    $0x1,%edi
  call   <min@plt>
  add    %eax,%ebx
  mov    (%r14),%rax
  cmpl   $0x1,(%rax,%r12,1)
  jle    L509
  mov    -0x8(%r14),%rdi
  mov    (%r15),%rsi
  mov    0x10(%rsp),%rcx
  mov    0x18(%rsp),%rdx
  mov    (%rsi,%r12,1),%esi
  add    (%rdi,%r12,1),%esi
  mov    (%rax,%rcx,1),%edi
  add    (%rax,%rdx,1),%edi
  xor    %eax,%eax
  call   <min@plt>
  test   %eax,%eax
  je     L518
  mov    (%r14),%rax
  mov    0x20(%rsp),%rsi
  mov    (%rax,%rsi,1),%edx
  add    (%rax,%rbp,1),%edx
  jne    L509
L518:
  lea    D2(%rip),%rdx
  lea    D8(%rip),%rsi
  mov    $0xf6,%edi
  xor    %eax,%eax
  call   <errhandler@plt>
  jmp    L509
  nopl   0x0(%rax,%rax,1)
L110:
  cltd
  shr    $0x1c,%edx
  add    %edx,%eax
  and    $0xf,%eax
  sub    %edx,%eax
  sub    $0x5,%eax
  and    $0xfffffffa,%eax
  jne    L108
  lea    D2(%rip),%rdx
  lea    D8(%rip),%rsi
  mov    $0xfa,%edi
  xor    %eax,%eax
  call   <errhandler@plt>
  jmp    L108
  xchg   %ax,%ax
L220:
  mov    0x54(%rsp),%eax
  lea    0x1(%rax),%edx
  add    $0x2,%eax
  cmp    0x50(%rsp),%eax
  jg     L213
  mov    %edx,0x54(%rsp)
  jmp    L8
L360:
  add    $0x1,%rax
  mov    0x88(%rsp),%ecx
  mov    %rax,0x78(%rsp)
  mov    0x5c(%rsp),%eax
  add    %ecx,%eax
  mov    %eax,0x80(%rsp)
  cs nopw 0x0(%rax,%rax,1)
L213:
  mov    0x78(%rsp),%rax
  mov    0x80(%rsp),%ecx
  lea    0x1(%rax),%edx
  mov    %ecx,0x5c(%rsp)
  cmp    %edx,0x58(%rsp)
  jge    L363
L349:
  movslq 0x50(%rsp),%rax
  mov    0x68(%rsp),%r14
  xor    %edx,%edx
  mov    0x108(%rsp),%r15d
  mov    0x110(%rsp),%r13d
  lea    0x8(,%rax,8),%r12
  movslq 0x2c(%rsp),%rax
  lea    0x8(%r14,%rax,8),%rbp
  nopl   0x0(%rax,%rax,1)
L155:
  mov    (%r14),%rax
  lea    0x0(,%rdx,4),%rbx
  mov    %r15d,%edi
  mov    %rdx,0x10(%rsp)
  mov    (%rax),%rcx
  xor    %eax,%eax
  add    %rbx,%rcx
  mov    %rcx,0x8(%rsp)
  call   <getbit@plt>
  mov    0x8(%rsp),%rcx
  mov    %r13d,%edi
  mov    %eax,(%rcx)
  mov    (%r14),%rax
  mov    (%rax,%r12,1),%rcx
  xor    %eax,%eax
  add    %rbx,%rcx
  mov    %rcx,0x8(%rsp)
  call   <getbit@plt>
  mov    0x8(%rsp),%rcx
  mov    %r15d,%edi
  mov    %eax,(%rcx)
  mov    0x0(%rbp),%rax
  mov    (%rax),%rcx
  xor    %eax,%eax
  add    %rbx,%rcx
  mov    %rcx,0x8(%rsp)
  call   <getbit@plt>
  mov    0x8(%rsp),%rcx
  mov    %r13d,%edi
  mov    %eax,(%rcx)
  mov    0x0(%rbp),%rax
  add    (%rax,%r12,1),%rbx
  xor    %eax,%eax
  call   <getbit@plt>
  mov    0x10(%rsp),%rdx
  mov    %eax,(%rbx)
  add    $0x1,%rdx
  cmp    %edx,0x84(%rsp)
  jge    L155
L237:
  cmpl   $0xffffffff,0x50(%rsp)
  jl     L219
  movslq 0x84(%rsp),%rbp
  movslq 0x2c(%rsp),%rax
  xor    %ebx,%ebx
  mov    0x68(%rsp),%r13
  mov    0x118(%rsp),%r14d
  mov    0x120(%rsp),%r15d
  shl    $0x2,%rbp
  lea    0x8(%r13,%rax,8),%r12
  xchg   %ax,%ax
L211:
  mov    0x0(%r13),%rax
  mov    %r15d,%edi
  mov    (%rax,%rbx,8),%rdx
  xor    %eax,%eax
  mov    %rdx,0x8(%rsp)
  call   <getbit@plt>
  mov    0x8(%rsp),%rdx
  mov    %r14d,%edi
  mov    %eax,(%rdx)
  mov    0x0(%r13),%rax
  mov    (%rax,%rbx,8),%rdx
  xor    %eax,%eax
  add    %rbp,%rdx
  mov    %rdx,0x8(%rsp)
  call   <getbit@plt>
  mov    0x8(%rsp),%rdx
  mov    %r15d,%edi
  mov    %eax,(%rdx)
  mov    (%r12),%rax
  mov    (%rax,%rbx,8),%rdx
  xor    %eax,%eax
  mov    %rdx,0x8(%rsp)
  call   <getbit@plt>
  mov    0x8(%rsp),%rdx
  mov    %r14d,%edi
  mov    %eax,(%rdx)
  mov    (%r12),%rax
  mov    (%rax,%rbx,8),%rdx
  xor    %eax,%eax
  add    $0x1,%rbx
  add    %rbp,%rdx
  mov    %rdx,0x8(%rsp)
  call   <getbit@plt>
  mov    0x8(%rsp),%rdx
  mov    %eax,(%rdx)
  lea    -0x1(%rbx),%eax
  cmp    0x50(%rsp),%eax
  jle    L211
L219:
  cmpl   $0xffffffff,0x2c(%rsp)
  jl     L134
  movslq 0x50(%rsp),%rax
  mov    0x68(%rsp),%r13
  xor    %r12d,%r12d
  movslq 0x84(%rsp),%rbx
  mov    0x108(%rsp),%r14d
  mov    0x110(%rsp),%r15d
  lea    0x8(,%rax,8),%rbp
  shl    $0x2,%rbx
  nopl   0x0(%rax,%rax,1)
L82:
  mov    0x0(%r13,%r12,8),%rax
  mov    %r14d,%edi
  mov    (%rax),%rcx
  xor    %eax,%eax
  mov    %rcx,0x8(%rsp)
  call   <getbit@plt>
  mov    0x8(%rsp),%rcx
  mov    %r15d,%edi
  mov    %eax,(%rcx)
  mov    0x0(%r13,%r12,8),%rax
  mov    (%rax,%rbp,1),%rcx
  xor    %eax,%eax
  mov    %rcx,0x8(%rsp)
  call   <getbit@plt>
  mov    0x8(%rsp),%rcx
  mov    %r14d,%edi
  mov    %eax,(%rcx)
  mov    0x0(%r13,%r12,8),%rax
  mov    (%rax),%rcx
  xor    %eax,%eax
  add    %rbx,%rcx
  mov    %rcx,0x8(%rsp)
  call   <getbit@plt>
  mov    0x8(%rsp),%rcx
  mov    %r15d,%edi
  mov    %eax,(%rcx)
  mov    0x0(%r13,%r12,8),%rax
  add    $0x1,%r12
  mov    (%rax,%rbp,1),%rcx
  xor    %eax,%eax
  add    %rbx,%rcx
  mov    %rcx,0x8(%rsp)
  call   <getbit@plt>
  mov    0x8(%rsp),%rcx
  mov    %eax,(%rcx)
  lea    -0x1(%r12),%eax
  cmp    0x2c(%rsp),%eax
  jle    L82
L134:
  mov    0x2c(%rsp),%r9d
  test   %r9d,%r9d
  jle    L85
  mov    0x68(%rsp),%rax
  movslq 0x58(%rsp),%rbp
  movl   $0x1,0x8(%rsp)
  add    $0x8,%rax
  shl    $0x2,%rbp
  mov    %rax,0x10(%rsp)
  lea    0x4(%rbp),%r14
  mov    %rax,%r13
  nopw   0x0(%rax,%rax,1)
L440:
  mov    0x50(%rsp),%r8d
  xor    %ebx,%ebx
  mov    %r13,%r15
  test   %r8d,%r8d
  jg     L137
  jmp    L199
  nopl   0x0(%rax,%rax,1)
L55:
  xor    %edi,%edi
  xor    %eax,%eax
  call   <getbit@plt>
  mov    $0xc,%esi
  mov    $0x2,%edi
  mov    %eax,%r12d
  mov    (%r15),%rax
  mov    (%rax,%rbx,8),%rax
  mov    0x4(%rax),%r13d
  xor    %eax,%eax
  call   <pow2@plt>
  mov    %eax,%r8d
  mov    (%r15),%rax
  mov    (%rax,%rbx,8),%rcx
  mov    %r8d,%eax
  shl    $0x4,%eax
  sub    %r8d,%eax
  and    %r13d,%eax
  add    %r12d,%eax
  mov    %eax,(%rcx)
L366:
  mov    $0xc,%esi
  mov    $0x2,%edi
  xor    %eax,%eax
  call   <pow2@plt>
  mov    $0xd,%esi
  mov    $0x2,%edi
  mov    %eax,%r12d
  xor    %eax,%eax
  call   <pow2@plt>
  mov    %eax,%r8d
  mov    (%r15),%rax
  xor    %r8d,%r12d
  mov    (%rax,%rbx,8),%rax
  and    (%rax,%rbp,1),%r12d
  jne    L502
  xor    %edi,%edi
  xor    %eax,%eax
  call   <getbit@plt>
  mov    $0xc,%esi
  mov    $0x2,%edi
  mov    %eax,%r12d
  mov    (%r15),%rax
  mov    (%rax,%rbx,8),%rax
  mov    (%rax,%rbp,1),%r13d
  xor    %eax,%eax
  call   <pow2@plt>
  mov    %eax,%r8d
  mov    (%r15),%rax
  mov    (%rax,%rbx,8),%rcx
  mov    %r8d,%eax
  shl    $0x4,%eax
  sub    %r8d,%eax
  and    %r13d,%eax
  add    %r12d,%eax
  mov    %eax,(%rcx,%r14,1)
  lea    0x1(%rbx),%eax
  cmp    %eax,0x50(%rsp)
  jl     L411
L137:
  mov    $0xc,%esi
  mov    $0x2,%edi
  xor    %eax,%eax
  add    $0x1,%rbx
  call   <pow2@plt>
  mov    $0xd,%esi
  mov    $0x2,%edi
  mov    %eax,%r12d
  xor    %eax,%eax
  call   <pow2@plt>
  mov    %eax,%r8d
  mov    (%r15),%rax
  xor    %r8d,%r12d
  mov    (%rax,%rbx,8),%rax
  and    0x4(%rax),%r12d
  je     L55
  mov    0x120(%rsp),%edi
  xor    %eax,%eax
  call   <getbit@plt>
  mov    %eax,%r8d
  mov    (%r15),%rax
  mov    (%rax,%rbx,8),%rcx
  mov    0x4(%rcx),%eax
  and    $0x3,%eax
  lea    -0x3(%rax,%r8,1),%eax
  mov    %eax,(%rcx)
  jmp    L366
  nopl   0x0(%rax,%rax,1)
L502:
  mov    0x118(%rsp),%edi
  xor    %eax,%eax
  call   <getbit@plt>
  mov    %eax,%r8d
  mov    (%r15),%rax
  mov    (%rax,%rbx,8),%rcx
  mov    (%rcx,%rbp,1),%eax
  and    $0xc,%eax
  lea    -0xc(%rax,%r8,1),%eax
  mov    %eax,(%rcx,%r14,1)
  lea    0x1(%rbx),%eax
  cmp    %eax,0x50(%rsp)
  jge    L137
L411:
  mov    %r15,%r13
L199:
  addl   $0x1,0x8(%rsp)
  add    $0x8,%r13
  mov    0x8(%rsp),%eax
  cmp    %eax,0x2c(%rsp)
  jge    L440
  mov    0x50(%rsp),%edx
  test   %edx,%edx
  jle    L153
L120:
  movslq 0x2c(%rsp),%rax
  mov    0x68(%rsp),%rcx
  xor    %edx,%edx
  shl    $0x3,%rax
  lea    0x8(%rcx,%rax,1),%r14
  lea    (%rcx,%rax,1),%r13
  mov    %r14,0x8(%rsp)
  mov    %rcx,%r14
  nopl   0x0(%rax,%rax,1)
L287:
  mov    0x58(%rsp),%edi
  lea    0x1(%rdx),%rax
  xor    %r15d,%r15d
  mov    %rax,0x10(%rsp)
  lea    0x0(,%rax,8),%rbp
  test   %edi,%edi
  jg     L221
  jmp    L136
  nopl   (%rax)
L294:
  xor    %edi,%edi
  xor    %eax,%eax
  call   <getbit@plt>
  mov    $0xc,%esi
  mov    $0x2,%edi
  mov    %eax,%r12d
  mov    0x8(%r14),%rax
  mov    (%rax,%rbp,1),%rax
  mov    (%rax,%rbx,4),%r15d
  xor    %eax,%eax
  call   <pow2@plt>
  mov    %eax,%r8d
  mov    (%r14),%rax
  mov    (%rax,%rbp,1),%rdx
  mov    %r8d,%eax
  shl    $0x4,%eax
  sub    %r8d,%eax
  and    %r15d,%eax
  add    %r12d,%eax
  mov    %eax,(%rdx,%rbx,4)
L326:
  mov    $0xc,%esi
  mov    $0x2,%edi
  xor    %eax,%eax
  call   <pow2@plt>
  mov    $0xd,%esi
  mov    $0x2,%edi
  mov    %eax,%r12d
  xor    %eax,%eax
  call   <pow2@plt>
  mov    %eax,%r8d
  mov    0x0(%r13),%rax
  xor    %r8d,%r12d
  mov    (%rax,%rbp,1),%rax
  and    (%rax,%rbx,4),%r12d
  jne    L378
  xor    %edi,%edi
  xor    %eax,%eax
  call   <getbit@plt>
  mov    $0xc,%esi
  mov    $0x2,%edi
  mov    %eax,%r12d
  mov    0x0(%r13),%rax
  mov    (%rax,%rbp,1),%rax
  mov    (%rax,%rbx,4),%r15d
  xor    %eax,%eax
  call   <pow2@plt>
  mov    %eax,%r8d
  mov    0x8(%rsp),%rax
  mov    (%rax),%rax
  mov    (%rax,%rbp,1),%rdx
  mov    %r8d,%eax
  shl    $0x4,%eax
  sub    %r8d,%eax
  and    %r15d,%eax
  mov    %rbx,%r15
  add    %r12d,%eax
  mov    %eax,(%rdx,%rbx,4)
  lea    0x1(%rbx),%eax
  cmp    %eax,0x58(%rsp)
  jl     L136
L221:
  mov    $0xc,%esi
  mov    $0x2,%edi
  lea    0x1(%r15),%rbx
  xor    %eax,%eax
  call   <pow2@plt>
  mov    $0xd,%esi
  mov    $0x2,%edi
  mov    %eax,%r12d
  xor    %eax,%eax
  call   <pow2@plt>
  mov    %eax,%r8d
  mov    0x8(%r14),%rax
  xor    %r8d,%r12d
  mov    (%rax,%rbp,1),%rax
  and    0x4(%rax,%r15,4),%r12d
  je     L294
  mov    0x74(%rsp),%edi
  xor    %eax,%eax
  call   <getbit@plt>
  mov    $0xa,%esi
  mov    $0x2,%edi
  mov    %eax,%r12d
  xor    %eax,%eax
  call   <pow2@plt>
  mov    $0xa,%esi
  mov    $0x2,%edi
  lea    0x0(,%rax,4),%edx
  sub    %edx,%eax
  add    %eax,%r12d
  mov    0x8(%r14),%rax
  mov    (%rax,%rbp,1),%rax
  mov    (%rax,%rbx,4),%r15d
  xor    %eax,%eax
  call   <pow2@plt>
  mov    (%r14),%rdx
  lea    (%rax,%rax,2),%eax
  mov    (%rdx,%rbp,1),%rdx
  and    %r15d,%eax
  add    %r12d,%eax
  mov    %eax,(%rdx,%rbx,4)
  jmp    L326
  cs nopw 0x0(%rax,%rax,1)
L378:
  mov    0x100(%rsp),%edi
  xor    %eax,%eax
  call   <getbit@plt>
  mov    $0x8,%esi
  mov    $0x2,%edi
  mov    %eax,%r12d
  xor    %eax,%eax
  call   <pow2@plt>
  mov    $0x8,%esi
  mov    $0x2,%edi
  lea    0x0(,%rax,4),%edx
  sub    %edx,%eax
  add    %eax,%r12d
  mov    0x0(%r13),%rax
  mov    (%rax,%rbp,1),%rax
  mov    (%rax,%rbx,4),%r15d
  xor    %eax,%eax
  call   <pow2@plt>
  mov    0x8(%rsp),%rcx
  lea    (%rax,%rax,2),%eax
  mov    (%rcx),%rdx
  and    %r15d,%eax
  mov    %rbx,%r15
  add    %r12d,%eax
  mov    (%rdx,%rbp,1),%rdx
  mov    %eax,(%rdx,%rbx,4)
  lea    0x1(%rbx),%eax
  cmp    %eax,0x58(%rsp)
  jge    L221
L136:
  mov    0x10(%rsp),%rdx
  lea    0x1(%rdx),%eax
  cmp    %eax,0x50(%rsp)
  jge    L287
  mov    0x68(%rsp),%rax
  mov    0x2c(%rsp),%esi
  add    $0x8,%rax
  mov    %rax,0x10(%rsp)
  test   %esi,%esi
  jle    L101
L153:
  movslq 0x50(%rsp),%rbp
  mov    0x10(%rsp),%r14
  movl   $0x1,0x8(%rsp)
  shl    $0x3,%rbp
  mov    %r14,%r15
  lea    0x8(%rbp),%r13
  nopl   0x0(%rax)
L389:
  mov    0x58(%rsp),%ecx
  xor    %r14d,%r14d
  test   %ecx,%ecx
  jg     L20
  jmp    L18
  nopl   0x0(%rax)
L465:
  xor    %edi,%edi
  xor    %eax,%eax
  call   <getbit@plt>
  mov    $0xc,%esi
  mov    $0x2,%edi
  mov    %eax,%r12d
  mov    (%r15),%rax
  mov    0x8(%rax),%rax
  mov    (%rax,%rbx,4),%r14d
  xor    %eax,%eax
  call   <pow2@plt>
  mov    %eax,%r8d
  mov    (%r15),%rax
  mov    (%rax),%rcx
  mov    %r8d,%eax
  shl    $0x4,%eax
  sub    %r8d,%eax
  and    %r14d,%eax
  add    %r12d,%eax
  mov    %eax,(%rcx,%rbx,4)
L115:
  mov    $0xc,%esi
  mov    $0x2,%edi
  xor    %eax,%eax
  call   <pow2@plt>
  mov    $0xd,%esi
  mov    $0x2,%edi
  mov    %eax,%r12d
  xor    %eax,%eax
  call   <pow2@plt>
  mov    %eax,%r8d
  mov    (%r15),%rax
  xor    %r8d,%r12d
  mov    (%rax,%rbp,1),%rax
  and    (%rax,%rbx,4),%r12d
  jne    L409
  xor    %edi,%edi
  xor    %eax,%eax
  call   <getbit@plt>
  mov    $0xc,%esi
  mov    $0x2,%edi
  mov    %eax,%r12d
  mov    (%r15),%rax
  mov    (%rax,%rbp,1),%rax
  mov    (%rax,%rbx,4),%r14d
  xor    %eax,%eax
  call   <pow2@plt>
  mov    %eax,%r8d
  mov    (%r15),%rax
  mov    (%rax,%r13,1),%rcx
  mov    %r8d,%eax
  shl    $0x4,%eax
  sub    %r8d,%eax
  and    %r14d,%eax
  mov    %rbx,%r14
  add    %r12d,%eax
  mov    %eax,(%rcx,%rbx,4)
  lea    0x1(%rbx),%eax
  cmp    0x58(%rsp),%eax
  jg     L18
L20:
  mov    $0xc,%esi
  mov    $0x2,%edi
  lea    0x1(%r14),%rbx
  xor    %eax,%eax
  call   <pow2@plt>
  mov    $0xd,%esi
  mov    $0x2,%edi
  mov    %eax,%r12d
  xor    %eax,%eax
  call   <pow2@plt>
  mov    %eax,%r8d
  mov    (%r15),%rax
  xor    %r8d,%r12d
  mov    0x8(%rax),%rax
  and    0x4(%rax,%r14,4),%r12d
  je     L465
  mov    0x108(%rsp),%edi
  xor    %eax,%eax
  call   <getbit@plt>
  mov    %eax,%r8d
  mov    (%r15),%rax
  mov    (%rax),%rcx
  mov    0x8(%rax),%rax
  mov    (%rax,%rbx,4),%eax
  and    $0xc0,%eax
  lea    -0xc0(%rax,%r8,1),%eax
  mov    %eax,(%rcx,%rbx,4)
  jmp    L115
  nop
L409:
  mov    0x110(%rsp),%edi
  xor    %eax,%eax
  mov    %rbx,%r14
  call   <getbit@plt>
  mov    %eax,%r8d
  mov    (%r15),%rax
  mov    (%rax,%r13,1),%rcx
  mov    (%rax,%rbp,1),%rax
  mov    (%rax,%rbx,4),%eax
  and    $0x30,%eax
  lea    -0x30(%rax,%r8,1),%eax
  mov    %eax,(%rcx,%rbx,4)
  lea    0x1(%rbx),%eax
  cmp    0x58(%rsp),%eax
  jle    L20
L18:
  addl   $0x1,0x8(%rsp)
  add    $0x8,%r15
  mov    0x8(%rsp),%eax
  cmp    %eax,0x2c(%rsp)
  jge    L389
L101:
  mov    0xb8(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L174
  add    $0xc8,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L295:
  mov    0x84(%rsp),%r10d
  test   %r10d,%r10d
  js     L237
  jmp    L349
  nopl   0x0(%rax)
L85:
  mov    0x50(%rsp),%eax
  test   %eax,%eax
  jg     L120
  jmp    L101
L174:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: unpack_data
arguments: data_tag: D2
type_infered: string
name: unpack_data
arguments: data_tag: D8
type_infered: string

tool: D2: Invalid geometry! Forbidden boundary cell found.


tool: D8: /scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/EvaBr/CFD-Lab/refs/heads/master/Backup/FinalProjectBackup/init.c

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 temp, temp2;
  int tarr[] = {1, 2, 0, 3, 4, 7, 8};
  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++) {
        temp = tarr[Pic[i][j + k * (jmax + 2)]] * pow2(2, 12) + min(Pic[i + 1][j + k * (jmax + 2)] + 1, 3) * pow2(2, 10) + min(Pic[i - 1][j + k * (jmax + 2)] + 1, 3) * pow2(2, 8) + min(Pic[i][j + k * (jmax + 2) - 1] + 1, 3) * pow2(2, 6) + min(Pic[i][j + k * (jmax + 2) + 1] + 1, 3) * pow2(2, 4) + min(Pic[i][j + (k - 1) * (jmax + 2)] + 1, 3) * 4 + min(Pic[i][j + (k + 1) * (jmax + 2)] + 1, 3);
        if (Pic[i][j + k * (jmax + 2)] > 1 && (min(Pic[i][j + k * (jmax + 2) + 1] + Pic[i][j + k * (jmax + 2) - 1], Pic[i - 1][j + k * (jmax + 2)] + Pic[i + 1][j + k * (jmax + 2)]) == 0 || !(Pic[i][j + (k - 1) * (jmax + 2)] + Pic[i][j + (k + 1) * (jmax + 2)]))) {
          errhandler(246, "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/EvaBr/CFD-Lab/refs/heads/master/Backup/FinalProjectBackup/init.c", "Invalid geometry! Forbidden boundary cell found.\n");
        }
        temp2 = getcelltype(temp) % 16;
        if ((((temp >> 12) & 15) == 8) && (temp2 == 5 || temp2 == 6 || temp2 == 9 || temp2 == 10)) {
          errhandler(250, "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/EvaBr/CFD-Lab/refs/heads/master/Backup/FinalProjectBackup/init.c", "Invalid geometry! Forbidden boundary cell found.\n");
        }
        Flag[i][jmax + 1 - j][k] = temp;
      }
    }
  }
  for (k = 0; k < kmax + 2; k++) {
    Flag[0][0][k] = getbit(wf);
    Flag[0][jmax + 1][k] = getbit(wh);
    Flag[imax + 1][0][k] = getbit(wf);
    Flag[imax + 1][jmax + 1][k] = getbit(wh);
  }
  for (j = 0; j < jmax + 2; j++) {
    Flag[0][j][0] = getbit(wb);
    Flag[0][j][kmax + 1] = getbit(wt);
    Flag[imax + 1][j][0] = getbit(wb);
    Flag[imax + 1][j][kmax + 1] = getbit(wt);
  }
  for (i = 0; i < imax + 2; i++) {
    Flag[i][0][0] = getbit(wf);
    Flag[i][jmax + 1][0] = getbit(wh);
    Flag[i][0][kmax + 1] = getbit(wf);
    Flag[i][jmax + 1][kmax + 1] = getbit(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] = getbit(0) + (Flag[i][j][1] & (pow2(2, 12) * 15));
      } else {
        Flag[i][j][0] = (getbit(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] = getbit(0) + (Flag[i][j][kmax] & (pow2(2, 12) * 15));
      } else {
        Flag[i][j][kmax + 1] = (getbit(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] = getbit(0) + (Flag[1][j][k] & (pow2(2, 12) * 15));
      } else {
        Flag[0][j][k] = (getbit(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] = getbit(0) + (Flag[imax][j][k] & (pow2(2, 12) * 15));
      } else {
        Flag[imax + 1][j][k] = (getbit(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] = getbit(0) + (Flag[i][1][k] & (pow2(2, 12) * 15));
      } else {
        Flag[i][0][k] = (getbit(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] = getbit(0) + (Flag[i][jmax][k] & (pow2(2, 12) * 15));
      } else {
        Flag[i][jmax + 1][k] = (getbit(wh) - 16 * 3) + (Flag[i][jmax][k] & (16 * 3));
      }
    }
  }
}
```