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

```asm
<separation_dissimilarites_bete>:
  endbr64
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  mov    %rdx,%rbp
  cmp    $0x1,%edi
  jle    L88
  mov    %rsi,%rcx
  lea    0x8(%rsi),%r11
  mov    %edi,%r10d
  mov    %r11,%rdx
  mov    $0x1,%esi
  movsd  D9(%rip),%xmm4
  mov    $0x1,%r9d
  pxor   %xmm6,%xmm6
  lea    -0x1(%rdi),%ebx
  movapd %xmm6,%xmm5
  jmp    L29
L50:
  pxor   %xmm2,%xmm2
  jmp    L121
L131:
  movapd %xmm1,%xmm4
  mov    %r8d,%r9d
L83:
  add    $0x8,%rdx
  add    $0x1,%rsi
  cmp    %r10,%rsi
  je     L90
L29:
  mov    %esi,%r14d
  mov    %esi,%r8d
  mov    %edi,%r13d
  sub    %esi,%r13d
  mov    %esi,%r12d
  test   %esi,%esi
  jle    L50
  mov    %rcx,%rax
  pxor   %xmm2,%xmm2
L105:
  addsd  (%rax),%xmm2
  add    $0x8,%rax
  cmp    %rdx,%rax
  jne    L105
L121:
  pxor   %xmm1,%xmm1
  cvtsi2sd %r8d,%xmm1
  divsd  %xmm1,%xmm2
  cmp    %r12d,%edi
  jle    L97
  mov    %ebx,%eax
  sub    %r14d,%eax
  add    %rsi,%rax
  lea    (%r11,%rax,8),%r14
  mov    %rdx,%rax
  pxor   %xmm3,%xmm3
L136:
  addsd  (%rax),%xmm3
  add    $0x8,%rax
  cmp    %r14,%rax
  jne    L136
  pxor   %xmm1,%xmm1
  cvtsi2sd %r13d,%xmm1
  divsd  %xmm1,%xmm3
  pxor   %xmm1,%xmm1
  test   %r12d,%r12d
  jle    L75
L77:
  mov    $0x0,%eax
  pxor   %xmm1,%xmm1
L82:
  movsd  (%rcx,%rax,8),%xmm0
  subsd  %xmm2,%xmm0
  mulsd  %xmm0,%xmm0
  addsd  %xmm0,%xmm1
  add    $0x1,%rax
  cmp    %eax,%r12d
  jg     L82
  cmp    %r12d,%edi
  jle    L107
L75:
  mov    %rsi,%rax
L70:
  movsd  (%rcx,%rax,8),%xmm0
  subsd  %xmm3,%xmm0
  mulsd  %xmm0,%xmm0
  addsd  %xmm0,%xmm1
  add    $0x1,%rax
  cmp    %eax,%edi
  jg     L70
L107:
  comisd %xmm4,%xmm5
  ja     L131
  comisd %xmm1,%xmm4
  minsd  %xmm4,%xmm1
  movapd %xmm1,%xmm4
  cmova  %r8d,%r9d
  jmp    L83
L88:
  mov    $0x1,%r9d
L90:
  mov    %r9d,0x0(%rbp)
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
L97:
  pxor   %xmm0,%xmm0
  cvtsi2sd %r13d,%xmm0
  movapd %xmm6,%xmm3
  divsd  %xmm0,%xmm3
  jmp    L77
```

tool_calls: name: parse_data
arguments: data_tag: D9
type_guessed: byte[8]

tool: {"D9": [0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0xbf]}

assistant: ```c
void separation_dissimilarites_bete(int nb_dissimilarites, double *historique_dissimilarites, int *nb_dissimilarites_premier_groupe) {
  int i, j, nb_dissimilarites_valeur_minimum, nb_dissimilarites1, nb_dissimilarites2;
  double valeur_courante, valeur_minimum, centre_gravite_tot, centre_gravite1, centre_gravite2;
  valeur_minimum = -1;
  nb_dissimilarites_valeur_minimum = 1;
  for (i = 1; i < nb_dissimilarites; i++) {
    nb_dissimilarites1 = i;
    nb_dissimilarites2 = nb_dissimilarites - nb_dissimilarites1;
    centre_gravite1 = 0;
    for (j = 0; j < nb_dissimilarites1; j++) {
      centre_gravite1 += historique_dissimilarites[j];
    }
    centre_gravite1 /= (double)nb_dissimilarites1;
    centre_gravite2 = 0;
    for (j = nb_dissimilarites1; j < nb_dissimilarites; j++) {
      centre_gravite2 += historique_dissimilarites[j];
    }
    centre_gravite2 /= (double)nb_dissimilarites2;
    valeur_courante = 0;
    for (j = 0; j < nb_dissimilarites1; j++) {
      valeur_courante += ((double)(historique_dissimilarites[j] - centre_gravite1)) * ((double)(historique_dissimilarites[j] - centre_gravite1));
    }
    for (j = nb_dissimilarites1; j < nb_dissimilarites; j++) {
      valeur_courante += ((double)(historique_dissimilarites[j] - centre_gravite2)) * ((double)(historique_dissimilarites[j] - centre_gravite2));
    }
    if ((valeur_minimum < 0) || (valeur_courante < valeur_minimum)) {
      valeur_minimum = valeur_courante;
      nb_dissimilarites_valeur_minimum = nb_dissimilarites1;
    }
  }
  *nb_dissimilarites_premier_groupe = nb_dissimilarites_valeur_minimum;
}
```