user: 请将这段汇编代码片段转换成等效的C代码：

```asm
<center_of_mass>:
  endbr64
  push   %r15
  mov    %r9,%rax
  mov    %esi,%r10d
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x40,%rsp
  test   %ecx,%ecx
  mov    (%r8),%esi
  mov    %r9,0x30(%rsp)
  lea    0x3(%rcx),%r9d
  cmovns %ecx,%r9d
  mov    %r8,0x28(%rsp)
  mov    (%rax),%ecx
  sar    $0x2,%r9d
  test   %edx,%edx
  jle    L275
  lea    -0x1(%r10),%eax
  movd   %r9d,%xmm6
  mov    %r10d,%r14d
  mov    %rdi,%rbx
  mov    %eax,0x1c(%rsp)
  mov    %r10d,%eax
  pshufd $0x0,%xmm6,%xmm13
  mov    %rdi,%r11
  shr    $0x4,%eax
  mov    %edx,%r12d
  movslq %r10d,%r15
  and    $0xfffffff0,%r14d
  sub    $0x1,%eax
  xor    %r8d,%r8d
  movdqa %xmm13,%xmm15
  mov    $0x1,%edi
  add    $0x1,%rax
  shl    $0x4,%rax
  mov    %rax,0x20(%rsp)
  cs nopw 0x0(%rax,%rax,1)
L53:
  mov    %r11,%rdx
  sub    %rbx,%rdx
  test   %r10d,%r10d
  jle    L282
  cmpl   $0xe,0x1c(%rsp)
  jbe    L276
  movd   %r8d,%xmm6
  mov    0x20(%rsp),%rax
  movdqa D7(%rip),%xmm7
  pshufd $0x0,%xmm6,%xmm9
  pxor   %xmm6,%xmm6
  movdqa %xmm9,%xmm10
  lea    (%rax,%r11,1),%rbp
  movaps %xmm7,-0x48(%rsp)
  mov    %r11,%rax
  movaps %xmm6,-0x68(%rsp)
  psrlq  $0x20,%xmm10
  movaps %xmm6,-0x78(%rsp)
  movaps %xmm6,-0x58(%rsp)
  movaps %xmm9,0x8(%rsp)
  nopw   0x0(%rax,%rax,1)
L56:
  movdqu (%rax),%xmm0
  pxor   %xmm7,%xmm7
  pxor   %xmm4,%xmm4
  add    $0x10,%rax
  movdqa -0x48(%rsp),%xmm6
  movdqa D32(%rip),%xmm3
  movdqa %xmm0,%xmm1
  punpckhbw %xmm7,%xmm0
  movdqa 0x8(%rsp),%xmm13
  movdqa %xmm6,%xmm2
  punpcklbw %xmm7,%xmm1
  paddd  D12(%rip),%xmm6
  movdqa %xmm1,%xmm7
  punpckhwd %xmm4,%xmm1
  paddd  %xmm2,%xmm3
  movaps %xmm6,-0x48(%rsp)
  movdqa %xmm1,%xmm8
  movdqa %xmm0,%xmm6
  punpcklwd %xmm4,%xmm7
  punpcklwd %xmm4,%xmm6
  punpckhwd %xmm4,%xmm0
  movdqa %xmm3,%xmm4
  psrlq  $0x20,%xmm8
  psrlq  $0x20,%xmm3
  movdqa %xmm7,%xmm12
  pmuludq %xmm8,%xmm3
  pmuludq %xmm1,%xmm4
  pmuludq %xmm13,%xmm12
  pmuludq %xmm10,%xmm8
  pshufd $0x8,%xmm3,%xmm3
  pshufd $0x8,%xmm4,%xmm4
  punpckldq %xmm3,%xmm4
  pshufd $0x8,%xmm12,%xmm12
  pshufd $0x8,%xmm8,%xmm8
  movdqa D16(%rip),%xmm3
  movdqa %xmm4,%xmm9
  movdqa %xmm6,%xmm4
  paddd  %xmm2,%xmm3
  psrlq  $0x20,%xmm4
  movdqa %xmm3,%xmm5
  psrlq  $0x20,%xmm3
  pmuludq %xmm4,%xmm3
  pmuludq %xmm6,%xmm5
  pmuludq %xmm10,%xmm4
  pshufd $0x8,%xmm3,%xmm3
  pshufd $0x8,%xmm5,%xmm5
  punpckldq %xmm3,%xmm5
  movdqa %xmm0,%xmm3
  pshufd $0x8,%xmm4,%xmm4
  movdqa %xmm5,%xmm14
  movdqa D46(%rip),%xmm5
  psrlq  $0x20,%xmm3
  paddd  %xmm2,%xmm5
  movdqa %xmm5,%xmm11
  psrlq  $0x20,%xmm5
  pmuludq %xmm3,%xmm5
  pmuludq %xmm0,%xmm11
  pmuludq %xmm10,%xmm3
  pshufd $0x8,%xmm5,%xmm5
  pshufd $0x8,%xmm11,%xmm11
  punpckldq %xmm5,%xmm11
  movdqa %xmm7,%xmm5
  pshufd $0x8,%xmm3,%xmm3
  psrlq  $0x20,%xmm5
  movaps %xmm11,-0x38(%rsp)
  movdqa %xmm5,%xmm11
  pmuludq %xmm10,%xmm11
  pshufd $0x8,%xmm11,%xmm11
  punpckldq %xmm11,%xmm12
  movdqa %xmm1,%xmm11
  pmuludq %xmm13,%xmm11
  movaps %xmm12,-0x28(%rsp)
  movdqa %xmm13,%xmm12
  pshufd $0x8,%xmm11,%xmm11
  movdqa %xmm11,%xmm13
  punpckldq %xmm8,%xmm13
  movdqa %xmm6,%xmm8
  pmuludq %xmm12,%xmm8
  movaps %xmm13,-0x18(%rsp)
  pshufd $0x8,%xmm8,%xmm8
  punpckldq %xmm4,%xmm8
  movdqa %xmm15,%xmm4
  movaps %xmm8,-0x8(%rsp)
  movdqa %xmm0,%xmm8
  pcmpgtd %xmm7,%xmm4
  pmuludq %xmm12,%xmm8
  pshufd $0x8,%xmm8,%xmm8
  punpckldq %xmm3,%xmm8
  movdqa %xmm2,%xmm3
  psrlq  $0x20,%xmm2
  pmuludq %xmm7,%xmm3
  pmuludq %xmm5,%xmm2
  movdqa %xmm4,%xmm5
  pshufd $0x8,%xmm3,%xmm3
  pshufd $0x8,%xmm2,%xmm2
  punpckldq %xmm2,%xmm3
  movdqa %xmm15,%xmm2
  pandn  %xmm3,%xmm5
  pcmpgtd %xmm6,%xmm2
  movdqa %xmm15,%xmm3
  pcmpgtd %xmm1,%xmm3
  movdqa %xmm5,%xmm13
  paddd  -0x58(%rsp),%xmm13
  movdqa %xmm3,%xmm5
  pandn  %xmm9,%xmm5
  movdqa %xmm5,%xmm12
  movdqa %xmm2,%xmm5
  pandn  %xmm14,%xmm5
  paddd  %xmm13,%xmm12
  movdqa %xmm5,%xmm11
  movdqa %xmm15,%xmm5
  pcmpgtd %xmm0,%xmm5
  paddd  %xmm12,%xmm11
  movdqa %xmm3,%xmm12
  pandn  -0x18(%rsp),%xmm12
  pandn  %xmm1,%xmm3
  movdqa %xmm5,%xmm9
  pandn  -0x38(%rsp),%xmm9
  movdqa %xmm5,%xmm14
  pandn  %xmm8,%xmm14
  pandn  %xmm0,%xmm5
  paddd  %xmm11,%xmm9
  movdqa %xmm2,%xmm11
  pandn  %xmm6,%xmm2
  movaps %xmm9,-0x58(%rsp)
  movdqa %xmm4,%xmm9
  pandn  -0x28(%rsp),%xmm9
  pandn  %xmm7,%xmm4
  paddd  -0x68(%rsp),%xmm4
  pandn  -0x8(%rsp),%xmm11
  movdqa %xmm9,%xmm13
  paddd  -0x78(%rsp),%xmm13
  paddd  %xmm4,%xmm3
  paddd  %xmm13,%xmm12
  paddd  %xmm3,%xmm2
  paddd  %xmm12,%xmm11
  paddd  %xmm2,%xmm5
  paddd  %xmm11,%xmm14
  movaps %xmm5,-0x68(%rsp)
  movaps %xmm14,-0x78(%rsp)
  cmp    %rbp,%rax
  jne    L56
  movdqa %xmm5,%xmm0
  movdqa -0x58(%rsp),%xmm14
  psrldq $0x8,%xmm0
  paddd  %xmm5,%xmm0
  movdqa %xmm0,%xmm1
  psrldq $0x4,%xmm1
  paddd  %xmm1,%xmm0
  movdqa -0x78(%rsp),%xmm1
  movd   %xmm0,%eax
  movdqa %xmm1,%xmm0
  add    %eax,%edi
  psrldq $0x8,%xmm0
  paddd  %xmm1,%xmm0
  movdqa %xmm0,%xmm1
  psrldq $0x4,%xmm1
  paddd  %xmm1,%xmm0
  movd   %xmm0,%eax
  movdqa %xmm14,%xmm0
  psrldq $0x8,%xmm0
  add    %eax,%ecx
  paddd  %xmm14,%xmm0
  movdqa %xmm0,%xmm1
  psrldq $0x4,%xmm1
  paddd  %xmm1,%xmm0
  movd   %xmm0,%eax
  add    %eax,%esi
  cmp    %r14d,%r10d
  je     L282
  mov    %r14d,%eax
L107:
  movslq %eax,%rbp
  add    %rbx,%rdx
  movzbl (%rdx,%rbp,1),%ebp
  cmp    %r9d,%ebp
  jl     L331
  mov    %ebp,%r13d
  add    %ebp,%edi
  imul   %eax,%r13d
  add    %r13d,%esi
  mov    %ebp,%r13d
  imul   %r8d,%r13d
  add    %r13d,%ecx
L331:
  lea    0x1(%rax),%ebp
  cmp    %r10d,%ebp
  jge    L282
  movslq %ebp,%r13
  movzbl (%rdx,%r13,1),%r13d
  cmp    %r13d,%r9d
  jg     L2
  imul   %r13d,%ebp
  add    %r13d,%edi
  add    %ebp,%esi
  mov    %r13d,%ebp
  imul   %r8d,%ebp
  add    %ebp,%ecx
L2:
  lea    0x2(%rax),%ebp
  cmp    %r10d,%ebp
  jge    L282
  movslq %ebp,%r13
  movzbl (%rdx,%r13,1),%r13d
  cmp    %r9d,%r13d
  jl     L263
  imul   %r13d,%ebp
  add    %r13d,%edi
  add    %ebp,%esi
  mov    %r13d,%ebp
  imul   %r8d,%ebp
  add    %ebp,%ecx
L263:
  lea    0x3(%rax),%ebp
  cmp    %ebp,%r10d
  jle    L282
  movslq %ebp,%r13
  movzbl (%rdx,%r13,1),%r13d
  cmp    %r13d,%r9d
  jg     L242
  imul   %r13d,%ebp
  add    %r13d,%edi
  add    %ebp,%esi
  mov    %r8d,%ebp
  imul   %r13d,%ebp
  add    %ebp,%ecx
L242:
  lea    0x4(%rax),%ebp
  cmp    %ebp,%r10d
  jle    L282
  movslq %ebp,%r13
  movzbl (%rdx,%r13,1),%r13d
  cmp    %r13d,%r9d
  jg     L288
  imul   %r13d,%ebp
  add    %r13d,%edi
  add    %ebp,%esi
  mov    %r8d,%ebp
  imul   %r13d,%ebp
  add    %ebp,%ecx
L288:
  lea    0x5(%rax),%ebp
  cmp    %ebp,%r10d
  jle    L282
  movslq %ebp,%r13
  movzbl (%rdx,%r13,1),%r13d
  cmp    %r13d,%r9d
  jg     L118
  imul   %r13d,%ebp
  add    %r13d,%edi
  add    %ebp,%esi
  mov    %r8d,%ebp
  imul   %r13d,%ebp
  add    %ebp,%ecx
L118:
  lea    0x6(%rax),%ebp
  cmp    %ebp,%r10d
  jle    L282
  movslq %ebp,%r13
  movzbl (%rdx,%r13,1),%r13d
  cmp    %r13d,%r9d
  jg     L298
  imul   %r13d,%ebp
  add    %r13d,%edi
  add    %ebp,%esi
  mov    %r8d,%ebp
  imul   %r13d,%ebp
  add    %ebp,%ecx
L298:
  lea    0x7(%rax),%ebp
  cmp    %ebp,%r10d
  jle    L282
  movslq %ebp,%r13
  movzbl (%rdx,%r13,1),%r13d
  cmp    %r13d,%r9d
  jg     L100
  imul   %r13d,%ebp
  add    %r13d,%edi
  add    %ebp,%esi
  mov    %r8d,%ebp
  imul   %r13d,%ebp
  add    %ebp,%ecx
L100:
  lea    0x8(%rax),%ebp
  cmp    %ebp,%r10d
  jle    L282
  movslq %ebp,%r13
  movzbl (%rdx,%r13,1),%r13d
  cmp    %r13d,%r9d
  jg     L64
  imul   %r13d,%ebp
  add    %r13d,%edi
  add    %ebp,%esi
  mov    %r8d,%ebp
  imul   %r13d,%ebp
  add    %ebp,%ecx
L64:
  lea    0x9(%rax),%ebp
  cmp    %ebp,%r10d
  jle    L282
  movslq %ebp,%r13
  movzbl (%rdx,%r13,1),%r13d
  cmp    %r13d,%r9d
  jg     L99
  imul   %r13d,%ebp
  add    %r13d,%edi
  add    %ebp,%esi
  mov    %r8d,%ebp
  imul   %r13d,%ebp
  add    %ebp,%ecx
L99:
  lea    0xa(%rax),%ebp
  cmp    %ebp,%r10d
  jle    L282
  movslq %ebp,%r13
  movzbl (%rdx,%r13,1),%r13d
  cmp    %r13d,%r9d
  jg     L341
  imul   %r13d,%ebp
  add    %r13d,%edi
  add    %ebp,%esi
  mov    %r8d,%ebp
  imul   %r13d,%ebp
  add    %ebp,%ecx
L341:
  lea    0xb(%rax),%ebp
  cmp    %ebp,%r10d
  jle    L282
  movslq %ebp,%r13
  movzbl (%rdx,%r13,1),%r13d
  cmp    %r13d,%r9d
  jg     L215
  imul   %r13d,%ebp
  add    %r13d,%edi
  add    %ebp,%esi
  mov    %r8d,%ebp
  imul   %r13d,%ebp
  add    %ebp,%ecx
L215:
  lea    0xc(%rax),%ebp
  cmp    %ebp,%r10d
  jle    L282
  movslq %ebp,%r13
  movzbl (%rdx,%r13,1),%r13d
  cmp    %r13d,%r9d
  jg     L223
  imul   %r13d,%ebp
  add    %r13d,%edi
  add    %ebp,%esi
  mov    %r8d,%ebp
  imul   %r13d,%ebp
  add    %ebp,%ecx
L223:
  lea    0xd(%rax),%ebp
  cmp    %ebp,%r10d
  jle    L282
  movslq %ebp,%r13
  movzbl (%rdx,%r13,1),%r13d
  cmp    %r13d,%r9d
  jg     L66
  imul   %r13d,%ebp
  add    %r13d,%edi
  add    %ebp,%esi
  mov    %r8d,%ebp
  imul   %r13d,%ebp
  add    %ebp,%ecx
L66:
  add    $0xe,%eax
  cmp    %eax,%r10d
  jle    L282
  movslq %eax,%rbp
  movzbl (%rdx,%rbp,1),%edx
  cmp    %edx,%r9d
  jg     L282
  imul   %edx,%eax
  add    %edx,%edi
  add    %eax,%esi
  mov    %r8d,%eax
  imul   %edx,%eax
  add    %eax,%ecx
  nopw   0x0(%rax,%rax,1)
L282:
  add    $0x1,%r8d
  add    %r15,%r11
  cmp    %r8d,%r12d
  jne    L53
  mov    %esi,%eax
  cltd
  idiv   %edi
  mov    %eax,%esi
  mov    %ecx,%eax
  cltd
  idiv   %edi
  mov    %eax,%ecx
L275:
  mov    0x28(%rsp),%rax
  mov    %esi,(%rax)
  mov    0x30(%rsp),%rax
  mov    %ecx,(%rax)
  add    $0x40,%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L276:
  xor    %eax,%eax
  jmp    L107
```

tool_calls: name: extract_symbolic_data
arguments: label: D7
type_guessed: byte[16]
name: extract_symbolic_data
arguments: label: D32
type_guessed: byte[16]
name: extract_symbolic_data
arguments: label: D12
type_guessed: byte[16]
name: extract_symbolic_data
arguments: label: D16
type_guessed: byte[16]
name: extract_symbolic_data
arguments: label: D46
type_guessed: byte[16]

tool: {"D7": [0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x03,0x00,0x00,0x00]}

tool: {"D32": [0x04,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x04,0x00,0x00,0x00]}

tool: {"D12": [0x10,0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x10,0x00,0x00,0x00]}

tool: {"D16": [0x08,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x08,0x00,0x00,0x00]}

tool: {"D46": [0x0c,0x00,0x00,0x00,0x0c,0x00,0x00,0x00,0x0c,0x00,0x00,0x00,0x0c,0x00,0x00,0x00]}

assistant: ```c
int center_of_mass(unsigned char *rep, int w, int h, int iter, int *markx, int *marky) {
  int sumx, sumy;
  int sumw;
  unsigned char *repo;
  int x, y;
  int iter2;
  iter2 = iter / 4;
  sumx = 0;
  sumy = 0;
  sumw = 0;
  sumx += markx[0];
  sumy += marky[0];
  sumw += 1;
  for (y = 0; y < h; y++) {
    repo = rep + y * w;
    for (x = 0; x < w; x++) {
      if (repo[x] < iter2)
        continue;
      sumx += x * ((int)repo[x]);
      sumy += y * ((int)repo[x]);
      sumw += repo[x];
    }
  }
  if (!sumw)
    return 1;
  (*markx) = sumx / sumw;
  (*marky) = sumy / sumw;
  return 0;
}
```