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

```asm
<color_feature_standard_deviation>:
  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     L91
L66:
  xor    %esi,%esi
  mov    $0x8,%edx
  mov    %r12,%rdi
  call   <memset@plt>
  test   %r15d,%r15d
  je     L70
  lea    0x0(%r13,%r13,2),%r10d
  lea    -0x1(%r15),%eax
  movsd  D34(%rip),%xmm3
  movsd  D17(%rip),%xmm2
  movsd  D35(%rip),%xmm1
  lea    0x8(%r14,%rax,8),%r15
  mov    %r10d,%r9d
  xor    %r11d,%r11d
  nopl   0x0(%rax)
L96:
  test   %r13d,%r13d
  je     L74
  mov    (%r14),%rcx
  lea    (%r11,%r11,2),%edx
  nopl   0x0(%rax,%rax,1)
L88:
  movslq (%rcx),%rsi
  test   %esi,%esi
  je     L47
  lea    0x1(%rdx),%eax
  pxor   %xmm0,%xmm0
  movzbl (%rbx,%rax,1),%eax
  cvtsi2sd %eax,%xmm0
  mov    %edx,%eax
  movzbl (%rbx,%rax,1),%eax
  mulsd  %xmm3,%xmm0
  cvttsd2si %xmm0,%edi
  pxor   %xmm0,%xmm0
  cvtsi2sd %eax,%xmm0
  mulsd  %xmm2,%xmm0
  cvttsd2si %xmm0,%eax
  pxor   %xmm0,%xmm0
  add    %edi,%eax
  lea    0x2(%rdx),%edi
  movzbl (%rbx,%rdi,1),%edi
  cvtsi2sd %edi,%xmm0
  mulsd  %xmm1,%xmm0
  cvttsd2si %xmm0,%edi
  pxor   %xmm0,%xmm0
  add    %edi,%eax
  movzbl %al,%eax
  cvtsi2sd %eax,%xmm0
  subsd  -0x8(%rbp,%rsi,8),%xmm0
  lea    -0x8(%r12,%rsi,8),%rax
  mulsd  %xmm0,%xmm0
  addsd  (%rax),%xmm0
  movsd  %xmm0,(%rax)
L47:
  add    $0x3,%edx
  add    $0x4,%rcx
  cmp    %r9d,%edx
  jne    L88
L74:
  add    $0x8,%r14
  add    %r10d,%r9d
  add    %r13d,%r11d
  cmp    %r15,%r14
  jne    L96
L70:
  mov    (%rsp),%eax
  test   %eax,%eax
  je     L95
  mov    (%rsp),%ebp
  mov    0x8(%rsp),%r13
  mov    %r12,%rbx
  pxor   %xmm2,%xmm2
  lea    (%r12,%rbp,8),%r14
  mov    0x58(%rsp),%rbp
  sub    %r12,%rbp
  nopw   0x0(%rax,%rax,1)
L9:
  pxor   %xmm1,%xmm1
  movsd  (%rbx),%xmm0
  cvtsi2sdl 0x0(%r13),%xmm1
  divsd  %xmm1,%xmm0
  ucomisd %xmm0,%xmm2
  ja     L75
  sqrtsd %xmm0,%xmm0
L45:
  movsd  %xmm0,0x0(%rbp,%rbx,1)
  add    $0x8,%rbx
  add    $0x4,%r13
  cmp    %rbx,%r14
  jne    L9
L95:
  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
L91:
  lea    D8(%rip),%rdi
  call   <printf@plt>
  mov    $0xffffffff,%edi
  call   <exit@plt>
  jmp    L66
L75:
  call   <sqrt@plt>
  pxor   %xmm2,%xmm2
  jmp    L45
```

tool_calls: name: unpack_data
arguments: data_label: D34
type_infered: f64
name: unpack_data
arguments: data_label: D17
type_infered: f64
name: unpack_data
arguments: data_label: D35
type_infered: f64
name: unpack_data
arguments: data_label: D8
type_infered: string

tool: D34: 0.7152

tool: D17: 0.2126

tool: D35: 0.0722

tool: D8: color_feature_standard_deviation:Cannot allocate %d bytes for memory.


assistant: ```c
int color_feature_standard_deviation(int **obj_id, int width, int height, int n_object, int *area, unsigned char *image, double *mean, double *color_std_dev) {
  unsigned int i = 0, j = 0;
  double *sum = NULL;
  sum = (double *)malloc(n_object * sizeof(double));
  if (sum == NULL) {
    printf("color_feature_standard_deviation: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);
    }
  }
  for (i = 0; i < n_object; i++) {
    color_std_dev[i] = sqrt(sum[i] / area[i]);
  }
  free(sum);
  return 1;
}
```