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

```asm
<unroot>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %rbx
  sub    $0x68,%rsp
  mov    %rdi,-0x48(%rbp)
  mov    %esi,-0x4c(%rbp)
  mov    %rdx,-0x58(%rbp)
  mov    %rcx,-0x60(%rbp)
  mov    %r8,-0x68(%rbp)
  mov    %r9,-0x70(%rbp)
  movl   $0xffffffff,-0x30(%rbp)
  movl   $0xffffffff,-0x2c(%rbp)
  movl   $0xffffffff,-0x28(%rbp)
  movl   $0x0,-0x3c(%rbp)
  jmp    L201
L394:
  mov    -0x48(%rbp),%rax
  mov    (%rax),%rdx
  mov    -0x3c(%rbp),%eax
  cltq
  shl    $0x2,%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  test   %eax,%eax
  je     L253
  mov    $0x1,%eax
  jmp    L367
L253:
  addl   $0x1,-0x3c(%rbp)
L201:
  mov    -0x4c(%rbp),%eax
  sub    $0x2,%eax
  cmp    %eax,-0x3c(%rbp)
  jl     L394
  movl   $0x0,-0x38(%rbp)
  jmp    L303
L607:
  movl   $0x0,-0x24(%rbp)
  movl   $0x0,-0x40(%rbp)
  jmp    L260
L371:
  mov    -0x40(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x38(%rbp),%eax
  cltq
  shl    $0x2,%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  add    %eax,-0x24(%rbp)
  addl   $0x1,-0x40(%rbp)
L260:
  mov    -0x4c(%rbp),%eax
  cmp    -0x40(%rbp),%eax
  jge    L371
  mov    -0x4c(%rbp),%eax
  sub    $0x1,%eax
  cmp    %eax,-0x24(%rbp)
  jne    L391
  mov    -0x38(%rbp),%eax
  mov    %eax,-0x30(%rbp)
  cmpq   $0x0,-0x60(%rbp)
  je     L124
  mov    -0x38(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x58(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  movsd  %xmm0,-0x18(%rbp)
  movl   $0x1,-0x40(%rbp)
  jmp    L484
L403:
  mov    -0x40(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x38(%rbp),%eax
  cltq
  shl    $0x2,%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  test   %eax,%eax
  jne    L250
  mov    -0x40(%rbp),%eax
  mov    %eax,-0x2c(%rbp)
  nop
  jmp    L124
L250:
  addl   $0x1,-0x40(%rbp)
L484:
  mov    -0x4c(%rbp),%eax
  cmp    -0x40(%rbp),%eax
  jge    L403
  jmp    L124
L391:
  mov    -0x38(%rbp),%eax
  add    $0x1,%eax
  mov    %eax,-0x34(%rbp)
  jmp    L395
L252:
  movl   $0x0,-0x20(%rbp)
  movl   $0x0,-0x40(%rbp)
  jmp    L406
L247:
  mov    -0x40(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x34(%rbp),%eax
  cltq
  shl    $0x2,%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  add    %eax,-0x20(%rbp)
  addl   $0x1,-0x40(%rbp)
L406:
  mov    -0x4c(%rbp),%eax
  cmp    -0x40(%rbp),%eax
  jge    L247
  mov    -0x4c(%rbp),%eax
  sub    -0x20(%rbp),%eax
  cmp    %eax,-0x24(%rbp)
  jne    L405
  movl   $0x0,-0x1c(%rbp)
  movl   $0x1,-0x40(%rbp)
  jmp    L236
L77:
  mov    -0x40(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x38(%rbp),%eax
  cltq
  shl    $0x2,%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  mov    -0x40(%rbp),%edx
  movslq %edx,%rdx
  lea    0x0(,%rdx,8),%rcx
  mov    -0x48(%rbp),%rdx
  add    %rcx,%rdx
  mov    (%rdx),%rcx
  mov    -0x34(%rbp),%edx
  movslq %edx,%rdx
  shl    $0x2,%rdx
  add    %rcx,%rdx
  mov    (%rdx),%edx
  sub    %edx,%eax
  mov    %eax,%edx
  neg    %edx
  cmovns %edx,%eax
  cmp    $0x1,%eax
  je     L542
  movl   $0x1,-0x1c(%rbp)
L542:
  addl   $0x1,-0x40(%rbp)
L236:
  mov    -0x40(%rbp),%eax
  cmp    -0x4c(%rbp),%eax
  jl     L77
  cmpl   $0x0,-0x1c(%rbp)
  jne    L405
  mov    -0x38(%rbp),%eax
  mov    %eax,-0x30(%rbp)
  cmpq   $0x0,-0x58(%rbp)
  je     L377
  mov    -0x34(%rbp),%eax
  mov    %eax,-0x28(%rbp)
  mov    -0x38(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x58(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  movsd  %xmm0,-0x18(%rbp)
  jmp    L377
L405:
  cmpl   $0xffffffff,-0x30(%rbp)
  jne    L238
  addl   $0x1,-0x34(%rbp)
L395:
  mov    -0x4c(%rbp),%eax
  sub    $0x2,%eax
  cmp    %eax,-0x34(%rbp)
  jl     L252
  jmp    L366
L377:
  nop
  jmp    L366
L238:
  nop
L366:
  cmpl   $0xffffffff,-0x30(%rbp)
  jne    L456
  addl   $0x1,-0x38(%rbp)
L303:
  mov    -0x4c(%rbp),%eax
  sub    $0x3,%eax
  cmp    %eax,-0x38(%rbp)
  jl     L607
  jmp    L600
L124:
  nop
  jmp    L600
L456:
  nop
L600:
  cmpq   $0x0,0x20(%rbp)
  je     L157
  movl   $0x0,-0x34(%rbp)
  mov    -0x34(%rbp),%eax
  mov    %eax,-0x38(%rbp)
  movl   $0x1,-0x40(%rbp)
  jmp    L354
L56:
  mov    -0x40(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x30(%rbp),%eax
  cltq
  shl    $0x2,%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  test   %eax,%eax
  jne    L549
  mov    -0x40(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x70(%rbp),%rax
  add    %rdx,%rax
  mov    -0x38(%rbp),%edx
  movslq %edx,%rdx
  lea    0x0(,%rdx,8),%rcx
  mov    0x10(%rbp),%rdx
  add    %rcx,%rdx
  mov    (%rax),%rax
  mov    %rax,(%rdx)
  addl   $0x1,-0x38(%rbp)
  jmp    L596
L549:
  mov    -0x40(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x70(%rbp),%rax
  add    %rdx,%rax
  mov    -0x34(%rbp),%edx
  movslq %edx,%rdx
  lea    0x0(,%rdx,8),%rcx
  mov    0x18(%rbp),%rdx
  add    %rcx,%rdx
  mov    (%rax),%rax
  mov    %rax,(%rdx)
  addl   $0x1,-0x34(%rbp)
L596:
  addl   $0x1,-0x40(%rbp)
L354:
  mov    -0x40(%rbp),%eax
  cmp    -0x4c(%rbp),%eax
  jle    L56
  cmpl   $0x0,-0x38(%rbp)
  jle    L237
  cmpl   $0x0,-0x34(%rbp)
  jg     L206
L237:
  lea    D2(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
L206:
  mov    0x20(%rbp),%rax
  mov    -0x38(%rbp),%edx
  mov    %edx,(%rax)
  mov    0x28(%rbp),%rax
  mov    -0x34(%rbp),%edx
  mov    %edx,(%rax)
  cmpl   $0xffffffff,-0x2c(%rbp)
  je     L573
  mov    -0x2c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x60(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  mov    -0x2c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x60(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm1
  addsd  -0x18(%rbp),%xmm1
  divsd  %xmm1,%xmm0
  mov    0x30(%rbp),%rax
  movsd  %xmm0,(%rax)
L573:
  cmpl   $0xffffffff,-0x28(%rbp)
  je     L157
  mov    -0x28(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x58(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  mov    -0x28(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x58(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm1
  addsd  -0x18(%rbp),%xmm1
  divsd  %xmm1,%xmm0
  mov    0x30(%rbp),%rax
  movsd  %xmm0,(%rax)
L157:
  cmpl   $0xffffffff,-0x2c(%rbp)
  je     L215
  mov    -0x2c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x60(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  mov    -0x2c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x60(%rbp),%rax
  add    %rdx,%rax
  addsd  -0x18(%rbp),%xmm0
  movsd  %xmm0,(%rax)
L215:
  cmpl   $0xffffffff,-0x28(%rbp)
  je     L151
  mov    -0x28(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x58(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  mov    -0x28(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x58(%rbp),%rax
  add    %rdx,%rax
  addsd  -0x18(%rbp),%xmm0
  movsd  %xmm0,(%rax)
L151:
  mov    -0x30(%rbp),%eax
  mov    %eax,-0x40(%rbp)
  jmp    L504
L60:
  cmpq   $0x0,-0x58(%rbp)
  je     L468
  mov    -0x40(%rbp),%eax
  cltq
  add    $0x1,%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x58(%rbp),%rax
  add    %rax,%rdx
  mov    -0x40(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rcx
  mov    -0x58(%rbp),%rax
  add    %rcx,%rax
  movsd  (%rdx),%xmm0
  movsd  %xmm0,(%rax)
L468:
  cmpq   $0x0,-0x68(%rbp)
  je     L87
  mov    -0x40(%rbp),%eax
  cltq
  add    $0x1,%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x68(%rbp),%rax
  add    %rax,%rdx
  mov    -0x40(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rcx
  mov    -0x68(%rbp),%rax
  add    %rcx,%rax
  movsd  (%rdx),%xmm0
  movsd  %xmm0,(%rax)
L87:
  addl   $0x1,-0x40(%rbp)
L504:
  mov    -0x4c(%rbp),%eax
  sub    $0x3,%eax
  cmp    %eax,-0x40(%rbp)
  jl     L60
  cmpq   $0x0,-0x60(%rbp)
  je     L175
  movl   $0x0,-0x40(%rbp)
  jmp    L83
L291:
  mov    -0x40(%rbp),%eax
  cltq
  add    $0x1,%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x60(%rbp),%rax
  add    %rax,%rdx
  mov    -0x40(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rcx
  mov    -0x60(%rbp),%rax
  add    %rcx,%rax
  movsd  (%rdx),%xmm0
  movsd  %xmm0,(%rax)
  addl   $0x1,-0x40(%rbp)
L83:
  mov    -0x40(%rbp),%eax
  cmp    -0x4c(%rbp),%eax
  jl     L291
L175:
  cmpq   $0x0,-0x70(%rbp)
  je     L97
  mov    -0x70(%rbp),%rax
  mov    (%rax),%rax
  mov    %rax,%rdi
  call   <free@plt>
  movl   $0x0,-0x40(%rbp)
  jmp    L233
L222:
  mov    -0x40(%rbp),%eax
  cltq
  add    $0x1,%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x70(%rbp),%rax
  add    %rdx,%rax
  mov    -0x40(%rbp),%edx
  movslq %edx,%rdx
  lea    0x0(,%rdx,8),%rcx
  mov    -0x70(%rbp),%rdx
  add    %rcx,%rdx
  mov    (%rax),%rax
  mov    %rax,(%rdx)
  addl   $0x1,-0x40(%rbp)
L233:
  mov    -0x40(%rbp),%eax
  cmp    -0x4c(%rbp),%eax
  jl     L222
  mov    -0x4c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x70(%rbp),%rax
  lea    (%rdx,%rax,1),%rbx
  mov    $0x1,%esi
  mov    $0x65,%edi
  call   <check_alloc@plt>
  mov    %rax,(%rbx)
L97:
  movl   $0x1,-0x40(%rbp)
  jmp    L259
L262:
  movl   $0x0,-0x3c(%rbp)
  jmp    L191
L183:
  mov    -0x40(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x3c(%rbp),%eax
  cltq
  shl    $0x2,%rax
  add    %rdx,%rax
  mov    -0x40(%rbp),%edx
  movslq %edx,%rdx
  shl    $0x3,%rdx
  lea    -0x8(%rdx),%rcx
  mov    -0x48(%rbp),%rdx
  add    %rcx,%rdx
  mov    (%rdx),%rcx
  mov    -0x3c(%rbp),%edx
  movslq %edx,%rdx
  shl    $0x2,%rdx
  add    %rcx,%rdx
  mov    (%rax),%eax
  mov    %eax,(%rdx)
  addl   $0x1,-0x3c(%rbp)
L191:
  mov    -0x4c(%rbp),%eax
  sub    $0x2,%eax
  cmp    %eax,-0x3c(%rbp)
  jl     L183
  addl   $0x1,-0x40(%rbp)
L259:
  mov    -0x4c(%rbp),%eax
  cmp    -0x40(%rbp),%eax
  jge    L262
  mov    -0x30(%rbp),%eax
  add    $0x1,%eax
  mov    %eax,-0x3c(%rbp)
  jmp    L76
L459:
  movl   $0x0,-0x40(%rbp)
  jmp    L488
L47:
  mov    -0x40(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x3c(%rbp),%eax
  cltq
  shl    $0x2,%rax
  add    %rdx,%rax
  mov    -0x40(%rbp),%edx
  movslq %edx,%rdx
  lea    0x0(,%rdx,8),%rcx
  mov    -0x48(%rbp),%rdx
  add    %rcx,%rdx
  mov    (%rdx),%rcx
  mov    -0x3c(%rbp),%edx
  movslq %edx,%rdx
  shl    $0x2,%rdx
  sub    $0x4,%rdx
  add    %rcx,%rdx
  mov    (%rax),%eax
  mov    %eax,(%rdx)
  addl   $0x1,-0x40(%rbp)
L488:
  mov    -0x40(%rbp),%eax
  cmp    -0x4c(%rbp),%eax
  jl     L47
  addl   $0x1,-0x3c(%rbp)
L76:
  mov    -0x4c(%rbp),%eax
  sub    $0x2,%eax
  cmp    %eax,-0x3c(%rbp)
  jl     L459
  mov    $0x0,%eax
L367:
  mov    -0x8(%rbp),%rbx
  leave
  ret
```

tool_calls: name: disassemble_data
arguments: data_tag: D2
type_infered: string

tool: D2: probleme


assistant: ```c
int unroot(int **treer, int notu, double *lgbi, double *lgbp, double *bootvals, char **nom, char **list1, char **list2, int *l1, int *l2, double *fracroot1) {
  int i, j, j1, j2, br_a_virer = -1, bp_a_modifier = -1, bi_a_modifier = -1, somme1, somme2, drapeau;
  double l;
  for (j = 0; j < notu - 2; j++)
    if (treer[0][j] != 0)
      return 1;
  for (j1 = 0; j1 < notu - 3; j1++) {
    somme1 = 0;
    for (i = 0; i < notu + 1; i++)
      somme1 += treer[i][j1];
    if (somme1 == notu - 1) {
      br_a_virer = j1;
      if (lgbp) {
        l = lgbi[j1];
        for (i = 1; i < notu + 1; i++)
          if (treer[i][j1] == 0) {
            bp_a_modifier = i;
            break;
          }
      }
      break;
    }
    for (j2 = j1 + 1; j2 < notu - 2; j2++) {
      somme2 = 0;
      for (i = 0; i < notu + 1; i++)
        somme2 += treer[i][j2];
      if (somme1 == notu - somme2) {
        drapeau = 0;
        for (i = 1; i < notu; i++)
          if (abs(treer[i][j1] - treer[i][j2]) != 1)
            drapeau = 1;
        if (drapeau == 0) {
          br_a_virer = j1;
          if (lgbi) {
            bi_a_modifier = j2;
            l = lgbi[j1];
          }
          break;
        }
      }
      if (br_a_virer != -1)
        break;
    }
    if (br_a_virer != -1)
      break;
  }
  if (l1) {
    j1 = j2 = 0;
    for (i = 1; i <= notu; i++) {
      if (treer[i][br_a_virer] == 0) {
        list1[j1] = nom[i];
        j1++;
      } else {
        list2[j2] = nom[i];
        j2++;
      }
    }
    if (j1 < 1 || j2 < 1)
      printf("probleme\n");
    *l1 = j1;
    *l2 = j2;
    if (bp_a_modifier != -1)
      *fracroot1 = lgbp[bp_a_modifier] / (lgbp[bp_a_modifier] + l);
    if (bi_a_modifier != -1)
      *fracroot1 = lgbi[bi_a_modifier] / (lgbi[bi_a_modifier] + l);
  }
  if (bp_a_modifier != -1)
    lgbp[bp_a_modifier] += l;
  if (bi_a_modifier != -1)
    lgbi[bi_a_modifier] += l;
  for (i = br_a_virer; i < notu - 3; i++) {
    if (lgbi)
      lgbi[i] = lgbi[i + 1];
    if (bootvals)
      bootvals[i] = bootvals[i + 1];
  }
  if (lgbp)
    for (i = 0; i < notu; i++)
      lgbp[i] = lgbp[i + 1];
  if (nom) {
    free(nom[0]);
    for (i = 0; i < notu; i++)
      nom[i] = nom[i + 1];
    nom[notu] = check_alloc(100 + 1, sizeof(char));
  }
  for (i = 1; i < notu + 1; i++)
    for (j = 0; j < notu - 2; j++)
      treer[i - 1][j] = treer[i][j];
  for (j = br_a_virer + 1; j < notu - 2; j++)
    for (i = 0; i < notu; i++)
      treer[i][j - 1] = treer[i][j];
  return 0;
}
```