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

```asm
<separation_dissimilarites_bete>:
  endbr64
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  mov    %rdx,%rbx
  cmp    $0x1,%edi
  jle    L50
  mov    %rsi,%rax
  mov    %edi,%r8d
  lea    0x8(%rsi),%rsi
  mov    $0x1,%r10d
  lea    -0x1(%rdi),%edi
  pxor   %xmm2,%xmm2
  lea    0x10(%rax),%r9
  mov    $0x1,%ecx
  movsd  D4(%rip),%xmm3
  mov    $0x1,%r11d
  nopl   0x0(%rax)
L125:
  cmp    $0x1,%ecx
  je     L116
  mov    %ecx,%ebp
  mov    %rax,%rdx
  movapd %xmm2,%xmm0
  shr    %ebp
  sub    $0x1,%ebp
  shl    $0x4,%rbp
  add    %r9,%rbp
  cs nopw 0x0(%rax,%rax,1)
L164:
  movsd  (%rdx),%xmm1
  add    $0x10,%rdx
  addsd  %xmm1,%xmm0
  movsd  -0x8(%rdx),%xmm1
  addsd  %xmm1,%xmm0
  cmp    %rdx,%rbp
  jne    L164
  mov    %ecx,%edx
  and    $0xfffffffe,%edx
  test   $0x1,%cl
  je     L127
L193:
  movslq %edx,%rdx
  addsd  (%rax,%rdx,8),%xmm0
L127:
  pxor   %xmm1,%xmm1
  cmp    %r8d,%ecx
  movapd %xmm0,%xmm5
  mov    %r11d,%ebp
  cvtsi2sd %ecx,%xmm1
  cmovl  %edi,%ebp
  setge  %r12b
  cmp    $0x1,%edi
  sete   %dl
  divsd  %xmm1,%xmm5
  or     %dl,%r12b
  jne    L177
  mov    %ebp,%edx
  movapd %xmm2,%xmm0
  shr    %edx
  sub    $0x1,%edx
  shl    $0x4,%rdx
  lea    0x10(%rsi,%rdx,1),%r13
  mov    %rsi,%rdx
  nop
L48:
  movsd  (%rdx),%xmm1
  add    $0x10,%rdx
  addsd  %xmm1,%xmm0
  movsd  -0x8(%rdx),%xmm1
  addsd  %xmm1,%xmm0
  cmp    %rdx,%r13
  jne    L48
  mov    %ebp,%r13d
  and    $0xfffffffe,%r13d
  lea    0x0(%r13,%rcx,1),%edx
  cmp    %r13d,%ebp
  je     L166
L98:
  movslq %edx,%rdx
  addsd  (%rax,%rdx,8),%xmm0
L166:
  pxor   %xmm1,%xmm1
  movapd %xmm0,%xmm4
  cvtsi2sd %edi,%xmm1
  divsd  %xmm1,%xmm4
  cmp    $0x1,%ecx
  je     L160
  mov    %ecx,%r13d
  movapd %xmm5,%xmm7
  movapd %xmm2,%xmm1
  mov    %rax,%rdx
  shr    %r13d
  unpcklpd %xmm7,%xmm7
  sub    $0x1,%r13d
  shl    $0x4,%r13
  add    %r9,%r13
  nopl   0x0(%rax)
L23:
  movupd (%rdx),%xmm0
  add    $0x10,%rdx
  subpd  %xmm7,%xmm0
  mulpd  %xmm0,%xmm0
  addsd  %xmm0,%xmm1
  unpckhpd %xmm0,%xmm0
  addsd  %xmm0,%xmm1
  cmp    %r13,%rdx
  jne    L23
  mov    %ecx,%edx
  and    $0xfffffffe,%edx
  test   $0x1,%cl
  je     L187
L29:
  movslq %edx,%rdx
  movsd  (%rax,%rdx,8),%xmm0
  subsd  %xmm5,%xmm0
  mulsd  %xmm0,%xmm0
  addsd  %xmm0,%xmm1
L187:
  test   %r12b,%r12b
  jne    L189
  mov    %ebp,%edx
  movapd %xmm4,%xmm6
  shr    %edx
  unpcklpd %xmm6,%xmm6
  sub    $0x1,%edx
  shl    $0x4,%rdx
  lea    0x10(%rsi,%rdx,1),%r12
  mov    %rsi,%rdx
  nopl   0x0(%rax,%rax,1)
L49:
  movupd (%rdx),%xmm0
  add    $0x10,%rdx
  subpd  %xmm6,%xmm0
  mulpd  %xmm0,%xmm0
  addsd  %xmm0,%xmm1
  unpckhpd %xmm0,%xmm0
  addsd  %xmm0,%xmm1
  cmp    %rdx,%r12
  jne    L49
  mov    %ebp,%r12d
  and    $0xfffffffe,%r12d
  lea    (%r12,%rcx,1),%edx
  cmp    %r12d,%ebp
  je     L180
L94:
  movslq %edx,%rdx
  movsd  (%rax,%rdx,8),%xmm0
  subsd  %xmm4,%xmm0
  mulsd  %xmm0,%xmm0
  addsd  %xmm0,%xmm1
L180:
  comisd %xmm3,%xmm2
  ja     L120
  comisd %xmm1,%xmm3
  minsd  %xmm3,%xmm1
  cmova  %ecx,%r10d
  movapd %xmm1,%xmm3
L146:
  add    $0x1,%ecx
  add    $0x8,%rsi
  sub    $0x1,%edi
  cmp    %ecx,%r8d
  jne    L125
  mov    %r10d,(%rbx)
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
L120:
  movapd %xmm1,%xmm3
  mov    %ecx,%r10d
  jmp    L146
  nopl   0x0(%rax)
L189:
  mov    %ecx,%edx
  jmp    L94
  nopl   0x0(%rax)
L160:
  movapd %xmm2,%xmm1
  xor    %edx,%edx
  jmp    L29
  nopl   0x0(%rax,%rax,1)
L177:
  mov    %ecx,%edx
  movapd %xmm2,%xmm0
  jmp    L98
  nopl   0x0(%rax,%rax,1)
L116:
  movapd %xmm2,%xmm0
  xor    %edx,%edx
  jmp    L193
L50:
  mov    $0x1,%r10d
  mov    %r10d,(%rbx)
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
```

tool_calls: name: disassemble_data
arguments: data_label: D4
type: byte[8]

tool: {"D4": [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;
}
```