user: 下面的汇编指令对应的C源代码是什么:

```asm
<check2dsurface>:
  endbr64
  push   %r15
  mov    %rdx,%r15
  push   %r14
  push   %r13
  mov    %rsi,%r13
  push   %r12
  mov    %r8d,%r12d
  push   %rbp
  push   %rbx
  mov    %rcx,%rbx
  sub    $0x18,%rsp
  mov    (%rdx),%eax
  mov    (%rdi),%r14d
  mov    %rdi,0x8(%rsp)
  lea    (%rax,%rax,2),%edx
  mov    %r9d,0x4(%rsp)
  test   %edx,%edx
  jle    L223
  sub    $0x1,%edx
  mov    %rcx,%rax
  lea    0x4(%rcx,%rdx,4),%rdx
  nop
L57:
  sub    %r12d,(%rax)
  add    $0x4,%rax
  cmp    %rdx,%rax
  jne    L57
L223:
  lea    0x0(,%r14,4),%edi
  call   <libaft_malloc@plt>
  mov    %r13,%rsi
  mov    %r14d,%edi
  mov    %rax,%rdx
  mov    %rax,%rbp
  call   <check_xyz@plt>
  test   %rax,%rax
  jne    L246
  mov    0x50(%rsp),%edi
  test   %edi,%edi
  jne    L215
  mov    (%r15),%r14d
  xor    %ecx,%ecx
  mov    %r12d,%edx
  mov    %rbx,%rsi
  mov    %r14d,%edi
  call   <check_tri@plt>
  xor    %r8d,%r8d
  test   %rax,%rax
  je     L19
L146:
  mov    0x4(%rsp),%edx
  test   %edx,%edx
  je     L154
  xor    %r8d,%r8d
L278:
  mov    0x8(%rsp),%rdi
  mov    %rbx,%rcx
  mov    %r15,%rdx
  mov    %r13,%rsi
  mov    %r8d,0x4(%rsp)
  call   <fix_tri@plt>
  mov    0x4(%rsp),%r8d
  test   %rax,%rax
  je     L280
L211:
  add    $0x1,%r8d
  jmp    L19
  nopl   0x0(%rax)
L246:
  mov    0x4(%rsp),%esi
  test   %esi,%esi
  jne    L244
  mov    (%r15),%r14d
  mov    0x50(%rsp),%ecx
  mov    %r12d,%edx
  mov    %rbx,%rsi
  mov    %r14d,%edi
  call   <check_tri@plt>
  test   %rax,%rax
  je     L165
  mov    $0x2,%r8d
L19:
  mov    %rbp,%rdi
  mov    %r8d,0x4(%rsp)
  call   <libaft_free@plt>
  lea    (%r14,%r14,2),%eax
  mov    0x4(%rsp),%r8d
  test   %eax,%eax
  jle    L108
  sub    $0x1,%eax
  lea    0x4(%rbx,%rax,4),%rax
  cs nopw 0x0(%rax,%rax,1)
L166:
  add    %r12d,(%rbx)
  add    $0x4,%rbx
  cmp    %rbx,%rax
  jne    L166
L108:
  add    $0x18,%rsp
  mov    %r8d,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  xchg   %ax,%ax
L244:
  mov    0x8(%rsp),%rdi
  mov    %rbp,%r8
  mov    %rbx,%rcx
  mov    %r15,%rdx
  mov    %r13,%rsi
  call   <fix_xyz@plt>
  test   %rax,%rax
  jne    L84
  mov    0x50(%rsp),%ecx
  test   %ecx,%ecx
  jne    L1
  mov    (%r15),%r14d
  xor    %ecx,%ecx
  mov    %r12d,%edx
  mov    %rbx,%rsi
  mov    %r14d,%edi
  call   <check_tri@plt>
  xor    %r8d,%r8d
  test   %rax,%rax
  je     L19
  mov    0x8(%rsp),%rdi
  mov    %rbx,%rcx
  mov    %r15,%rdx
  mov    %r13,%rsi
  mov    %r8d,0x4(%rsp)
  call   <fix_tri@plt>
  mov    0x4(%rsp),%r8d
  test   %rax,%rax
  je     L19
  jmp    L211
  nopl   (%rax)
L215:
  lea    D33(%rip),%rdi
  call   <libaft_3d_warn@plt>
  mov    (%r15),%r14d
  mov    0x50(%rsp),%ecx
  mov    %r12d,%edx
  mov    %rbx,%rsi
  mov    %r14d,%edi
  call   <check_tri@plt>
  xor    %r8d,%r8d
  test   %rax,%rax
  jne    L146
L126:
  lea    D17(%rip),%rdi
  mov    %r8d,0x4(%rsp)
  call   <libaft_3d_warn@plt>
  mov    0x4(%rsp),%r8d
  jmp    L19
L84:
  mov    (%r15),%r14d
  mov    0x50(%rsp),%ecx
  mov    %r12d,%edx
  mov    %rbx,%rsi
  mov    %r14d,%edi
  call   <check_tri@plt>
  test   %rax,%rax
  je     L165
  mov    $0x1,%r8d
  jmp    L278
L280:
  mov    0x50(%rsp),%eax
  test   %eax,%eax
  je     L19
L238:
  lea    D27(%rip),%rdi
  mov    %r8d,0x4(%rsp)
  call   <libaft_3d_warn@plt>
  mov    0x4(%rsp),%r8d
  jmp    L19
L1:
  lea    D3(%rip),%rdi
  call   <libaft_3d_warn@plt>
  mov    (%r15),%r14d
  mov    0x50(%rsp),%ecx
  mov    %r12d,%edx
  mov    %rbx,%rsi
  mov    %r14d,%edi
  call   <check_tri@plt>
  xor    %r8d,%r8d
  test   %rax,%rax
  je     L126
  mov    0x8(%rsp),%rdi
  mov    %rbx,%rcx
  mov    %r15,%rdx
  mov    %r13,%rsi
  mov    %r8d,0x4(%rsp)
  call   <fix_tri@plt>
  mov    0x4(%rsp),%r8d
  test   %rax,%rax
  je     L238
  jmp    L211
L154:
  mov    $0x1,%r8d
  jmp    L19
L165:
  cmpl   $0x0,0x50(%rsp)
  mov    $0x1,%r8d
  jne    L126
  jmp    L19
```

tool_calls: name: read_data
arguments: data_tag: D33
data_type: string
name: read_data
arguments: data_tag: D17
data_type: string
name: read_data
arguments: data_tag: D27
data_type: string
name: read_data
arguments: data_tag: D3
data_type: string

tool: D33: Check: xyz coords - OK


tool: D17: Check: surface topology - OK


tool: D27: Check: updated surface topology


tool: D3: Check: updated xyz coords and topology


assistant: ```c
int check2dsurface(int *pnV, double *vertex, int *pnF, int *face, int indshift, int autofix, int verbose) {
  int nV = *pnV, nF = *pnF, i;
  int *index;
  int result;
  for (i = 0; i < 3 * nF; face[i++] -= indshift)
    ;
  index = (int *)libaft_malloc(sizeof(int) * nV);
  result = 0;
  if (check_xyz(nV, vertex, index) == 0) {
    if (verbose)
      libaft_3d_warn("Check: xyz coords - OK\n");
  } else if ((autofix) && (fix_xyz(pnV, vertex, pnF, face, index) == 0)) {
    if (verbose)
      libaft_3d_warn("Check: updated xyz coords and topology\n");
  } else {
    result++;
  }
  nV = *pnV;
  nF = *pnF;
  if (check_tri(nF, face, indshift, verbose) == 0) {
    if (verbose)
      libaft_3d_warn("Check: surface topology - OK\n");
  } else if ((autofix) && (fix_tri(pnV, vertex, pnF, face) == 0)) {
    if (verbose)
      libaft_3d_warn("Check: updated surface topology\n");
  } else {
    result++;
  }
  libaft_free(index);
  for (i = 0; i < 3 * nF; face[i++] += indshift)
    ;
  return result;
}
```