user: 请显示与下面列出的汇编代码相匹配的C语言实现：

```asm
<morphological_feature_object_orientation>:
  endbr64
  push   %r15
  mov    %r8,%r15
  push   %r14
  mov    %edx,%r14d
  push   %r13
  mov    %esi,%r13d
  push   %r12
  push   %rbp
  push   %rbx
  mov    %ecx,%ebx
  lea    0x0(,%rbx,8),%r12d
  sub    $0x38,%rsp
  mov    %rdi,0x20(%rsp)
  mov    %r12d,%edi
  mov    %r9,0x28(%rsp)
  call   <malloc@plt>
  mov    %rax,0x8(%rsp)
  test   %rax,%rax
  je     L0
L91:
  mov    0x8(%rsp),%rdi
  mov    %r12d,%edx
  xor    %esi,%esi
  call   <memset@plt>
  mov    %r12d,%edi
  call   <malloc@plt>
  mov    %rax,%rbp
  test   %rax,%rax
  je     L10
L97:
  mov    %r12d,%edx
  xor    %esi,%esi
  mov    %rbp,%rdi
  call   <memset@plt>
  mov    %r12d,%edi
  call   <malloc@plt>
  mov    %rax,0x10(%rsp)
  test   %rax,%rax
  je     L92
L86:
  mov    0x10(%rsp),%rdi
  mov    %r12d,%edx
  xor    %esi,%esi
  call   <memset@plt>
  mov    %r12d,%edi
  call   <malloc@plt>
  mov    %rax,0x18(%rsp)
  test   %rax,%rax
  je     L22
L56:
  mov    0x18(%rsp),%rdi
  mov    %r12d,%edx
  xor    %esi,%esi
  call   <memset@plt>
  mov    0x20(%rsp),%r12
  pxor   %xmm1,%xmm1
  mov    %ebx,%ecx
  mov    0x8(%rsp),%r9
  movapd %xmm1,%xmm0
  mov    %r15,%r8
  mov    %r14d,%edx
  mov    %r13d,%esi
  mov    %r12,%rdi
  call   <morphological_feature_central_moments@plt>
  mov    %rbp,%r9
  mov    %r15,%r8
  mov    %ebx,%ecx
  movsd  D61(%rip),%xmm0
  mov    %r14d,%edx
  mov    %r13d,%esi
  mov    %r12,%rdi
  movapd %xmm0,%xmm1
  call   <morphological_feature_central_moments@plt>
  pxor   %xmm2,%xmm2
  mov    0x10(%rsp),%r9
  mov    %ebx,%ecx
  movapd %xmm2,%xmm1
  mov    %r15,%r8
  mov    %r14d,%edx
  mov    %r13d,%esi
  movsd  D4(%rip),%xmm0
  mov    %r12,%rdi
  call   <morphological_feature_central_moments@plt>
  pxor   %xmm2,%xmm2
  mov    0x18(%rsp),%r9
  mov    %ebx,%ecx
  mov    D4(%rip),%rax
  mov    %r15,%r8
  mov    %r14d,%edx
  mov    %r13d,%esi
  mov    %r12,%rdi
  movapd %xmm2,%xmm0
  movq   %rax,%xmm1
  call   <morphological_feature_central_moments@plt>
  test   %ebx,%ebx
  je     L72
  mov    0x18(%rsp),%rax
  mov    0x8(%rsp),%r13
  lea    0x0(%rbp,%rbx,8),%rcx
  mov    %rbp,%r14
  mov    0x10(%rsp),%r12
  mov    0x28(%rsp),%r15
  mov    %rbp,0x20(%rsp)
  mov    %rcx,%rbx
  sub    %rbp,%rax
  sub    %rbp,%r13
  sub    %rbp,%r12
  sub    %rbp,%r15
  mov    %rax,%rbp
  nopl   (%rax)
L59:
  movsd  0x0(%r13,%r14,1),%xmm3
  movsd  (%r14),%xmm0
  movsd  (%r12,%r14,1),%xmm1
  movsd  0x0(%rbp,%r14,1),%xmm2
  divsd  %xmm3,%xmm0
  divsd  %xmm3,%xmm1
  addsd  %xmm0,%xmm0
  divsd  %xmm3,%xmm2
  subsd  %xmm2,%xmm1
  divsd  %xmm1,%xmm0
  call   <atan@plt>
  mulsd  D50(%rip),%xmm0
  movsd  %xmm0,(%r15,%r14,1)
  add    $0x8,%r14
  cmp    %r14,%rbx
  jne    L59
  mov    0x20(%rsp),%rbp
L72:
  mov    0x8(%rsp),%rdi
  call   <free@plt>
  mov    %rbp,%rdi
  call   <free@plt>
  mov    0x10(%rsp),%rdi
  call   <free@plt>
  mov    0x18(%rsp),%rdi
  call   <free@plt>
  add    $0x38,%rsp
  mov    $0x1,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax)
L0:
  mov    %r12d,%esi
  lea    D35(%rip),%rdi
  call   <printf@plt>
  mov    $0xffffffff,%edi
  call   <exit@plt>
  jmp    L91
  cs nopw 0x0(%rax,%rax,1)
L22:
  mov    %r12d,%esi
  lea    D35(%rip),%rdi
  call   <printf@plt>
  mov    $0xffffffff,%edi
  call   <exit@plt>
  jmp    L56
  xchg   %ax,%ax
L92:
  mov    %r12d,%esi
  lea    D35(%rip),%rdi
  call   <printf@plt>
  mov    $0xffffffff,%edi
  call   <exit@plt>
  jmp    L86
  xchg   %ax,%ax
L10:
  mov    %r12d,%esi
  lea    D35(%rip),%rdi
  call   <printf@plt>
  mov    $0xffffffff,%edi
  call   <exit@plt>
  jmp    L97
```

tool_calls: name: parse_data
arguments: data_label: D61
type: f64
name: parse_data
arguments: data_label: D4
type: f64
name: parse_data
arguments: data_label: D50
type: f64
name: parse_data
arguments: data_label: D35
type: string

tool: D61: 1

tool: D4: 2

tool: D50: 0.5

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


assistant: ```c
int morphological_feature_object_orientation(int **obj_id, int width, int height, int n_object, unsigned char *image, double *object_orientation) {
  unsigned int i = 0;
  double *mi00 = NULL;
  mi00 = (double *)malloc(n_object * sizeof(double));
  if (mi00 == NULL) {
    printf("Cannot allocate %d bytes for memory.\n", (n_object * sizeof(double)));
    exit(-1);
  }
  memset(mi00, 0, (n_object * sizeof(double)));
  double *mi11 = NULL;
  mi11 = (double *)malloc(n_object * sizeof(double));
  if (mi11 == NULL) {
    printf("Cannot allocate %d bytes for memory.\n", (n_object * sizeof(double)));
    exit(-1);
  }
  memset(mi11, 0, (n_object * sizeof(double)));
  double *mi20 = NULL;
  mi20 = (double *)malloc(n_object * sizeof(double));
  if (mi20 == NULL) {
    printf("Cannot allocate %d bytes for memory.\n", (n_object * sizeof(double)));
    exit(-1);
  }
  memset(mi20, 0, (n_object * sizeof(double)));
  double *mi02 = NULL;
  mi02 = (double *)malloc(n_object * sizeof(double));
  if (mi02 == NULL) {
    printf("Cannot allocate %d bytes for memory.\n", (n_object * sizeof(double)));
    exit(-1);
  }
  memset(mi02, 0, (n_object * sizeof(double)));
  morphological_feature_central_moments(0.0, 0.0, obj_id, width, height, n_object, image, mi00);
  morphological_feature_central_moments(1.0, 1.0, obj_id, width, height, n_object, image, mi11);
  morphological_feature_central_moments(2.0, 0.0, obj_id, width, height, n_object, image, mi20);
  morphological_feature_central_moments(0.0, 2.0, obj_id, width, height, n_object, image, mi02);
  for (i = 0; i < n_object; i++) {
    object_orientation[i] = 0.5 * atan((2.0 * (mi11[i] / mi00[i])) / ((mi20[i] / mi00[i]) - (mi02[i] / mi00[i])));
  }
  free(mi00);
  free(mi11);
  free(mi20);
  free(mi02);
  return 1;
}
```