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

```asm
<morphological_feature_calculate_centroids>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x28,%rsp
  mov    %rdi,0x18(%rsp)
  mov    %esi,0x8(%rsp)
  mov    %edx,0xc(%rsp)
  mov    %ecx,%ebx
  mov    %r8,0x10(%rsp)
  mov    %r9,%r15
  lea    0x0(,%rcx,8),%ebp
  mov    %ebp,%edi
  call   <malloc@plt>
  mov    %rax,%r14
  test   %rax,%rax
  je     L52
L16:
  mov    %ebp,%edx
  mov    $0x0,%esi
  mov    %r14,%rdi
  call   <memset@plt>
  mov    %ebp,%edi
  call   <malloc@plt>
  mov    %rax,%r13
  test   %rax,%rax
  je     L55
L71:
  mov    %ebp,%edx
  mov    $0x0,%esi
  mov    %r13,%rdi
  call   <memset@plt>
  mov    %ebp,%edi
  call   <malloc@plt>
  mov    %rax,%r12
  test   %rax,%rax
  je     L9
L40:
  mov    %ebp,%edx
  mov    $0x0,%esi
  mov    %r12,%rdi
  call   <memset@plt>
  mov    %r14,%r9
  mov    0x10(%rsp),%r8
  mov    %ebx,%ecx
  mov    0xc(%rsp),%edx
  mov    0x8(%rsp),%esi
  mov    0x18(%rsp),%rbp
  mov    %rbp,%rdi
  pxor   %xmm1,%xmm1
  pxor   %xmm0,%xmm0
  call   <morphological_feature_object_moment@plt>
  mov    %r13,%r9
  mov    0x10(%rsp),%r8
  mov    %ebx,%ecx
  mov    0xc(%rsp),%edx
  mov    0x8(%rsp),%esi
  mov    %rbp,%rdi
  pxor   %xmm1,%xmm1
  mov    D23(%rip),%rax
  movq   %rax,%xmm0
  call   <morphological_feature_object_moment@plt>
  mov    %r12,%r9
  mov    0x10(%rsp),%r8
  mov    %ebx,%ecx
  mov    0xc(%rsp),%edx
  mov    0x8(%rsp),%esi
  mov    %rbp,%rdi
  mov    D23(%rip),%rax
  movq   %rax,%xmm1
  pxor   %xmm0,%xmm0
  call   <morphological_feature_object_moment@plt>
  test   %ebx,%ebx
  je     L57
  lea    -0x1(%rbx),%eax
  lea    0x8(%r15,%rax,8),%r9
  mov    %r15,%rax
  mov    %r14,%r8
  sub    %r15,%r8
  mov    %r13,%rdi
  sub    %r15,%rdi
  mov    %r12,%rsi
  sub    %r15,%rsi
L49:
  lea    (%r8,%rax,1),%rdx
  mov    (%rax),%rcx
  movsd  (%rdi,%rax,1),%xmm0
  divsd  (%rdx),%xmm0
  movsd  %xmm0,(%rcx)
  mov    (%rax),%rcx
  movsd  (%rsi,%rax,1),%xmm0
  divsd  (%rdx),%xmm0
  movsd  %xmm0,0x8(%rcx)
  add    $0x8,%rax
  cmp    %r9,%rax
  jne    L49
L57:
  mov    %r14,%rdi
  call   <free@plt>
  mov    %r13,%rdi
  call   <free@plt>
  mov    %r12,%rdi
  call   <free@plt>
  mov    $0x1,%eax
  add    $0x28,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L52:
  mov    %ebp,%esi
  lea    D35(%rip),%rdi
  call   <printf@plt>
  mov    $0xffffffff,%edi
  call   <exit@plt>
  jmp    L16
L55:
  mov    %ebp,%esi
  lea    D35(%rip),%rdi
  call   <printf@plt>
  mov    $0xffffffff,%edi
  call   <exit@plt>
  jmp    L71
L9:
  mov    %ebp,%esi
  lea    D35(%rip),%rdi
  call   <printf@plt>
  mov    $0xffffffff,%edi
  call   <exit@plt>
  jmp    L40
```

tool_calls: name: parse_data
arguments: label: D23
type_guessed: f64
name: parse_data
arguments: label: D35
type_guessed: string

tool: D23: 1

tool: D35: Cannot allocate %d bytes for memory.


assistant: ```c
int morphological_feature_calculate_centroids(int **obj_id, int width, int height, int n_object, unsigned char *image, double **centroids) {
  unsigned int i = 0;
  double *moment00 = NULL;
  moment00 = (double *)malloc(n_object * sizeof(double));
  if (moment00 == NULL) {
    printf("Cannot allocate %d bytes for memory.\n", (n_object * sizeof(double)));
    exit(-1);
  }
  memset(moment00, 0, (n_object * sizeof(double)));
  double *moment10 = NULL;
  moment10 = (double *)malloc(n_object * sizeof(double));
  if (moment10 == NULL) {
    printf("Cannot allocate %d bytes for memory.\n", (n_object * sizeof(double)));
    exit(-1);
  }
  memset(moment10, 0, (n_object * sizeof(double)));
  double *moment01 = NULL;
  moment01 = (double *)malloc(n_object * sizeof(double));
  if (moment01 == NULL) {
    printf("Cannot allocate %d bytes for memory.\n", (n_object * sizeof(double)));
    exit(-1);
  }
  memset(moment01, 0, (n_object * sizeof(double)));
  morphological_feature_object_moment(0.0, 0.0, obj_id, width, height, n_object, image, moment00);
  morphological_feature_object_moment(1.0, 0.0, obj_id, width, height, n_object, image, moment10);
  morphological_feature_object_moment(0.0, 1.0, obj_id, width, height, n_object, image, moment01);
  for (i = 0; i < n_object; i++) {
    centroids[i][0] = moment10[i] / moment00[i];
    centroids[i][1] = moment01[i] / moment00[i];
  }
  free(moment00);
  free(moment10);
  free(moment01);
  return 1;
}
```