user: Please show me the C implementation that matches the assembly code listed below:

```asm
<color_feature_skewness>:
  endbr64
  push   %r15
  mov    %edx,%r15d
  push   %r14
  mov    %rdi,%r14
  push   %r13
  mov    %esi,%r13d
  lea    0x0(,%rcx,8),%esi
  push   %r12
  mov    %esi,%edi
  push   %rbp
  push   %rbx
  mov    %r9,%rbx
  sub    $0x18,%rsp
  mov    %esi,0x4(%rsp)
  mov    0x50(%rsp),%rbp
  mov    %ecx,(%rsp)
  mov    %r8,0x8(%rsp)
  call   <malloc@plt>
  mov    0x4(%rsp),%esi
  test   %rax,%rax
  mov    %rax,%r12
  je     L46
L48:
  xor    %esi,%esi
  mov    $0x8,%edx
  mov    %r12,%rdi
  call   <memset@plt>
  test   %r15d,%r15d
  je     L55
  test   %r13d,%r13d
  je     L55
  lea    0x0(%r13,%r13,2),%r11d
  lea    -0x1(%r15),%eax
  movsd  D9(%rip),%xmm4
  movsd  D7(%rip),%xmm3
  movsd  D38(%rip),%xmm2
  lea    0x8(%r14,%rax,8),%r15
  mov    %r11d,%r9d
  xor    %r10d,%r10d
  nopw   0x0(%rax,%rax,1)
L44:
  mov    (%r14),%rcx
  lea    (%r10,%r10,2),%edx
  nopw   0x0(%rax,%rax,1)
L81:
  movslq (%rcx),%rsi
  test   %esi,%esi
  je     L31
  lea    0x1(%rdx),%eax
  pxor   %xmm0,%xmm0
  pxor   %xmm1,%xmm1
  movzbl (%rbx,%rax,1),%eax
  cvtsi2sd %eax,%xmm0
  mov    %edx,%eax
  movzbl (%rbx,%rax,1),%eax
  mulsd  %xmm4,%xmm0
  cvttsd2si %xmm0,%edi
  pxor   %xmm0,%xmm0
  cvtsi2sd %eax,%xmm0
  mulsd  %xmm3,%xmm0
  cvttsd2si %xmm0,%eax
  pxor   %xmm0,%xmm0
  add    %edi,%eax
  lea    0x2(%rdx),%edi
  movzbl (%rbx,%rdi,1),%edi
  cvtsi2sd %edi,%xmm0
  mulsd  %xmm2,%xmm0
  cvttsd2si %xmm0,%edi
  add    %edi,%eax
  movzbl %al,%eax
  cvtsi2sd %eax,%xmm1
  subsd  -0x8(%rbp,%rsi,8),%xmm1
  lea    -0x8(%r12,%rsi,8),%rax
  movapd %xmm1,%xmm0
  mulsd  %xmm1,%xmm0
  mulsd  %xmm1,%xmm0
  addsd  (%rax),%xmm0
  movsd  %xmm0,(%rax)
L31:
  add    $0x3,%edx
  add    $0x4,%rcx
  cmp    %edx,%r9d
  jne    L81
  add    $0x8,%r14
  add    %r11d,%r9d
  add    %r13d,%r10d
  cmp    %r14,%r15
  jne    L44
L55:
  mov    (%rsp),%eax
  test   %eax,%eax
  je     L34
  mov    %eax,%ebp
  mov    0x8(%rsp),%r14
  mov    %r12,%rbx
  lea    (%r12,%rbp,8),%r13
  mov    0x58(%rsp),%rbp
  sub    %r12,%rbp
  nopl   0x0(%rax)
L86:
  pxor   %xmm1,%xmm1
  movsd  (%rbx),%xmm0
  add    $0x4,%r14
  cvtsi2sdl -0x4(%r14),%xmm1
  divsd  %xmm1,%xmm0
  call   <fabs@plt>
  mov    %eax,%edi
  mov    D13(%rip),%rax
  movq   %rax,%xmm0
  call   <pow@plt>
  movsd  %xmm0,0x0(%rbp,%rbx,1)
  add    $0x8,%rbx
  cmp    %rbx,%r13
  jne    L86
L34:
  mov    %r12,%rdi
  call   <free@plt>
  add    $0x18,%rsp
  mov    $0x1,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L46:
  lea    D34(%rip),%rdi
  call   <printf@plt>
  mov    $0xffffffff,%edi
  call   <exit@plt>
  jmp    L48
```

tool_calls: name: read_data
arguments: tag: D9
type_guessed: f64
name: read_data
arguments: tag: D7
type_guessed: f64
name: read_data
arguments: tag: D38
type_guessed: f64
name: read_data
arguments: tag: D13
type_guessed: byte[8]
name: read_data
arguments: tag: D34
type_guessed: string

tool: D9: 0.7152

tool: D7: 0.2126

tool: D38: 0.0722

tool: {"D13": [0x55,0x55,0x55,0x55,0x55,0x55,0xd5,0x3f]}

tool: D34: color_feature_skewness:Cannot allocate %d bytes for memory.


assistant: ```c
int color_feature_skewness(int **obj_id, int width, int height, int n_object, int *area, unsigned char *image, double *mean, double *color_skew) {
  unsigned int i = 0, j = 0;
  double *sum = NULL;
  sum = (double *)malloc(n_object * sizeof(double));
  if (sum == NULL) {
    printf("color_feature_skewness:Cannot allocate %d bytes for memory.\n", (n_object * sizeof(double)));
    exit(-1);
  }
  memset(sum, 0, sizeof(n_object * sizeof(double)));
  for (i = 0; i < height; i++) {
    for (j = 0; j < width; j++) {
      if (!obj_id[i][j])
        continue;
      register unsigned int idx = (j + i * width) * 3;
      unsigned char val = ((unsigned char)(0.2126 * (double)(image[idx])) + (unsigned char)(0.7152 * (double)(image[idx + 1])) + (unsigned char)(0.0722 * (double)(image[idx + 2])));
      double tmp = ((double)val - mean[obj_id[i][j] - 1]);
      sum[obj_id[i][j] - 1] += (tmp * tmp * tmp);
    }
  }
  for (i = 0; i < n_object; i++) {
    color_skew[i] = pow(fabs((sum[i] / area[i])), 1.0 / 3.0);
  }
  free(sum);
  return 1;
}
```