user: What is the c source code of the assembly code below?

```asm
<createflag>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %r12
  push   %rbx
  sub    $0x60,%rsp
  mov    %rdi,-0x58(%rbp)
  mov    %esi,-0x5c(%rbp)
  mov    %edx,-0x60(%rbp)
  mov    %ecx,-0x64(%rbp)
  mov    %r8d,-0x68(%rbp)
  mov    %r9d,-0x6c(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x18(%rbp)
  xor    %eax,%eax
  movl   $0x1,-0x40(%rbp)
  movl   $0x2,-0x3c(%rbp)
  movl   $0x0,-0x38(%rbp)
  movl   $0x3,-0x34(%rbp)
  movl   $0x4,-0x30(%rbp)
  movl   $0x7,-0x2c(%rbp)
  movl   $0x8,-0x28(%rbp)
  mov    -0x5c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x58(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x6c(%rbp),%eax
  add    $0x2,%eax
  imul   -0x64(%rbp),%eax
  mov    %eax,%ecx
  mov    -0x60(%rbp),%eax
  add    %ecx,%eax
  cltq
  shl    $0x2,%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  cltq
  mov    -0x40(%rbp,%rax,4),%ebx
  mov    $0xc,%esi
  mov    $0x2,%edi
  call   <pow2@plt>
  imul   %eax,%ebx
  mov    %ebx,%r12d
  mov    -0x5c(%rbp),%eax
  cltq
  add    $0x1,%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x58(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x6c(%rbp),%eax
  add    $0x2,%eax
  imul   -0x64(%rbp),%eax
  mov    %eax,%ecx
  mov    -0x60(%rbp),%eax
  add    %ecx,%eax
  cltq
  shl    $0x2,%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  add    $0x1,%eax
  mov    $0x3,%esi
  mov    %eax,%edi
  call   <min@plt>
  mov    %eax,%ebx
  mov    $0xa,%esi
  mov    $0x2,%edi
  call   <pow2@plt>
  imul   %ebx,%eax
  add    %eax,%r12d
  mov    -0x5c(%rbp),%eax
  cltq
  shl    $0x3,%rax
  lea    -0x8(%rax),%rdx
  mov    -0x58(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x6c(%rbp),%eax
  add    $0x2,%eax
  imul   -0x64(%rbp),%eax
  mov    %eax,%ecx
  mov    -0x60(%rbp),%eax
  add    %ecx,%eax
  cltq
  shl    $0x2,%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  add    $0x1,%eax
  mov    $0x3,%esi
  mov    %eax,%edi
  call   <min@plt>
  mov    %eax,%ebx
  mov    $0x8,%esi
  mov    $0x2,%edi
  call   <pow2@plt>
  imul   %ebx,%eax
  add    %eax,%r12d
  mov    -0x5c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x58(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x6c(%rbp),%eax
  add    $0x2,%eax
  imul   -0x64(%rbp),%eax
  mov    %eax,%ecx
  mov    -0x60(%rbp),%eax
  add    %ecx,%eax
  cltq
  shl    $0x2,%rax
  sub    $0x4,%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  add    $0x1,%eax
  mov    $0x3,%esi
  mov    %eax,%edi
  call   <min@plt>
  mov    %eax,%ebx
  mov    $0x6,%esi
  mov    $0x2,%edi
  call   <pow2@plt>
  imul   %ebx,%eax
  add    %eax,%r12d
  mov    -0x5c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x58(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x6c(%rbp),%eax
  add    $0x2,%eax
  imul   -0x64(%rbp),%eax
  mov    %eax,%ecx
  mov    -0x60(%rbp),%eax
  add    %ecx,%eax
  cltq
  add    $0x1,%rax
  shl    $0x2,%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  add    $0x1,%eax
  mov    $0x3,%esi
  mov    %eax,%edi
  call   <min@plt>
  mov    %eax,%ebx
  mov    $0x4,%esi
  mov    $0x2,%edi
  call   <pow2@plt>
  imul   %ebx,%eax
  lea    (%r12,%rax,1),%ebx
  mov    -0x5c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x58(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rcx
  mov    -0x64(%rbp),%eax
  lea    -0x1(%rax),%edx
  mov    -0x6c(%rbp),%eax
  add    $0x2,%eax
  imul   %eax,%edx
  mov    -0x60(%rbp),%eax
  add    %edx,%eax
  cltq
  shl    $0x2,%rax
  add    %rcx,%rax
  mov    (%rax),%eax
  add    $0x1,%eax
  mov    $0x3,%esi
  mov    %eax,%edi
  call   <min@plt>
  shl    $0x2,%eax
  add    %eax,%ebx
  mov    -0x5c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x58(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rcx
  mov    -0x64(%rbp),%eax
  lea    0x1(%rax),%edx
  mov    -0x6c(%rbp),%eax
  add    $0x2,%eax
  imul   %eax,%edx
  mov    -0x60(%rbp),%eax
  add    %edx,%eax
  cltq
  shl    $0x2,%rax
  add    %rcx,%rax
  mov    (%rax),%eax
  add    $0x1,%eax
  mov    $0x3,%esi
  mov    %eax,%edi
  call   <min@plt>
  add    %ebx,%eax
  mov    %eax,-0x48(%rbp)
  mov    -0x5c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x58(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x6c(%rbp),%eax
  add    $0x2,%eax
  imul   -0x64(%rbp),%eax
  mov    %eax,%ecx
  mov    -0x60(%rbp),%eax
  add    %ecx,%eax
  cltq
  shl    $0x2,%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  cmp    $0x1,%eax
  jle    L14
  mov    -0x5c(%rbp),%eax
  cltq
  shl    $0x3,%rax
  lea    -0x8(%rax),%rdx
  mov    -0x58(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x6c(%rbp),%eax
  add    $0x2,%eax
  imul   -0x64(%rbp),%eax
  mov    %eax,%ecx
  mov    -0x60(%rbp),%eax
  add    %ecx,%eax
  cltq
  shl    $0x2,%rax
  add    %rdx,%rax
  mov    (%rax),%edx
  mov    -0x5c(%rbp),%eax
  cltq
  add    $0x1,%rax
  lea    0x0(,%rax,8),%rcx
  mov    -0x58(%rbp),%rax
  add    %rcx,%rax
  mov    (%rax),%rcx
  mov    -0x6c(%rbp),%eax
  add    $0x2,%eax
  imul   -0x64(%rbp),%eax
  mov    %eax,%esi
  mov    -0x60(%rbp),%eax
  add    %esi,%eax
  cltq
  shl    $0x2,%rax
  add    %rcx,%rax
  mov    (%rax),%eax
  add    %eax,%edx
  mov    -0x5c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rcx
  mov    -0x58(%rbp),%rax
  add    %rcx,%rax
  mov    (%rax),%rcx
  mov    -0x6c(%rbp),%eax
  add    $0x2,%eax
  imul   -0x64(%rbp),%eax
  mov    %eax,%esi
  mov    -0x60(%rbp),%eax
  add    %esi,%eax
  cltq
  add    $0x1,%rax
  shl    $0x2,%rax
  add    %rcx,%rax
  mov    (%rax),%ecx
  mov    -0x5c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rsi
  mov    -0x58(%rbp),%rax
  add    %rsi,%rax
  mov    (%rax),%rsi
  mov    -0x6c(%rbp),%eax
  add    $0x2,%eax
  imul   -0x64(%rbp),%eax
  mov    %eax,%edi
  mov    -0x60(%rbp),%eax
  add    %edi,%eax
  cltq
  shl    $0x2,%rax
  sub    $0x4,%rax
  add    %rsi,%rax
  mov    (%rax),%eax
  add    %ecx,%eax
  mov    %edx,%esi
  mov    %eax,%edi
  call   <min@plt>
  test   %eax,%eax
  je     L79
  mov    -0x5c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x58(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rcx
  mov    -0x64(%rbp),%eax
  lea    -0x1(%rax),%edx
  mov    -0x6c(%rbp),%eax
  add    $0x2,%eax
  imul   %eax,%edx
  mov    -0x60(%rbp),%eax
  add    %edx,%eax
  cltq
  shl    $0x2,%rax
  add    %rcx,%rax
  mov    (%rax),%ecx
  mov    -0x5c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x58(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rsi
  mov    -0x64(%rbp),%eax
  lea    0x1(%rax),%edx
  mov    -0x6c(%rbp),%eax
  add    $0x2,%eax
  imul   %eax,%edx
  mov    -0x60(%rbp),%eax
  add    %edx,%eax
  cltq
  shl    $0x2,%rax
  add    %rsi,%rax
  mov    (%rax),%eax
  add    %ecx,%eax
  test   %eax,%eax
  jne    L14
L79:
  lea    D1(%rip),%rax
  mov    %rax,%rdx
  lea    D8(%rip),%rax
  mov    %rax,%rsi
  mov    $0x13,%edi
  call   <errhandler@plt>
L14:
  mov    -0x48(%rbp),%eax
  mov    %eax,%edi
  call   <getboundarytype@plt>
  cltd
  shr    $0x1c,%edx
  add    %edx,%eax
  and    $0xf,%eax
  sub    %edx,%eax
  mov    %eax,-0x44(%rbp)
  mov    -0x48(%rbp),%eax
  sar    $0xc,%eax
  and    $0xf,%eax
  cmp    $0x8,%eax
  jne    L85
  cmpl   $0x5,-0x44(%rbp)
  je     L32
  cmpl   $0x6,-0x44(%rbp)
  je     L32
  cmpl   $0x9,-0x44(%rbp)
  je     L32
  cmpl   $0xa,-0x44(%rbp)
  jne    L85
L32:
  lea    D1(%rip),%rax
  mov    %rax,%rdx
  lea    D8(%rip),%rax
  mov    %rax,%rsi
  mov    $0x17,%edi
  call   <errhandler@plt>
L85:
  mov    -0x48(%rbp),%eax
  mov    -0x18(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L26
  call   <__stack_chk_fail@plt>
L26:
  add    $0x60,%rsp
  pop    %rbx
  pop    %r12
  pop    %rbp
  ret
```

tool_calls: name: retrieve_data
arguments: label: D1
type_guessed: string
name: retrieve_data
arguments: label: D8
type_guessed: string

tool: D1: 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/FinalProject/helper.c

assistant: ```c
int createflag(int **Pic, int i, int j, int k, int imax, int jmax, int kmax) {
  int temp, temp2;
  const int tarr[] = {1, 2, 0, 3, 4, 7, 8};
  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(19, "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/EvaBr/CFD-Lab/refs/heads/master/Backup/FinalProject/helper.c", "Invalid geometry! Forbidden boundary cell found.\n");
  }
  temp2 = getboundarytype(temp) % 16;
  if ((((temp >> 12) & 15) == 8) && (temp2 == 5 || temp2 == 6 || temp2 == 9 || temp2 == 10)) {
    errhandler(23, "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/EvaBr/CFD-Lab/refs/heads/master/Backup/FinalProject/helper.c", "Invalid geometry! Forbidden boundary cell found.\n");
  }
  return temp;
}
```