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

```asm
<dobldobl_monodromy_breakup>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %r15
  mov    %edi,%r15d
  push   %r14
  mov    %esi,%r14d
  push   %r13
  push   %r12
  mov    %edx,%r12d
  push   %rbx
  mov    %ecx,%ebx
  sub    $0x98,%rsp
  mov    %ecx,-0x70(%rbp)
  mov    %edi,-0x84(%rbp)
  mov    %edx,%edi
  mov    %esi,-0x88(%rbp)
  mov    %edx,-0x8c(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x38(%rbp)
  xor    %eax,%eax
  call   <initialize_dobldobl_sampler@plt>
  mov    %r12d,%edx
  mov    %ebx,%esi
  mov    %r15d,%edi
  call   <initialize_dobldobl_monodromy@plt>
  lea    D25(%rip),%rdi
  call   <puts@plt>
  xor    %eax,%eax
  call   <store_dobldobl_solutions@plt>
  lea    D76(%rip),%rdi
  call   <puts@plt>
  mov    $0x1,%edi
  call   <set_dobldobl_trace_slice@plt>
  mov    %r14d,%edi
  call   <store_dobldobl_gammas@plt>
  xor    %eax,%eax
  call   <dobldobl_track_paths@plt>
  xor    %eax,%eax
  call   <store_dobldobl_solutions@plt>
  xor    %eax,%eax
  call   <restore_dobldobl_solutions@plt>
  xor    %eax,%eax
  call   <swap_dobldobl_slices@plt>
  mov    $0x2,%edi
  call   <set_dobldobl_trace_slice@plt>
  mov    %r14d,%edi
  call   <store_dobldobl_gammas@plt>
  xor    %eax,%eax
  call   <dobldobl_track_paths@plt>
  xor    %eax,%eax
  call   <store_dobldobl_solutions@plt>
  xor    %eax,%eax
  call   <restore_dobldobl_solutions@plt>
  xor    %eax,%eax
  call   <swap_dobldobl_slices@plt>
  lea    -0x48(%rbp),%rsi
  lea    -0x50(%rbp),%rdi
  call   <dobldobl_trace_grid_diagnostics@plt>
  lea    D70(%rip),%rdi
  mov    %eax,%r12d
  call   <puts@plt>
  movsd  -0x50(%rbp),%xmm0
  mov    $0x1,%eax
  lea    D124(%rip),%rdi
  call   <printf@plt>
  movsd  -0x48(%rbp),%xmm0
  mov    $0x1,%eax
  lea    D114(%rip),%rdi
  call   <printf@plt>
  movl   $0x0,-0x5c(%rbp)
  test   %r15d,%r15d
  jle    L101
  lea    -0x1(%rbx),%ecx
  movslq %ebx,%rax
  movl   $0x1,-0x6c(%rbp)
  mov    -0x6c(%rbp),%esi
  mov    %rcx,-0xa0(%rbp)
  lea    -0x5c(%rbp),%rcx
  lea    0xf(,%rax,4),%rax
  mov    %rcx,-0x98(%rbp)
  lea    -0x58(%rbp),%rcx
  mov    %rcx,-0xb0(%rbp)
  mov    %rax,%rcx
  and    $0xff0,%eax
  mov    %rax,-0xa8(%rbp)
  and    $0xfffffffffffff000,%rcx
  sub    $0x8,%rax
  mov    %rcx,-0x80(%rbp)
  mov    %rax,-0xb8(%rbp)
  nopl   0x0(%rax,%rax,1)
L107:
  lea    D88(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  mov    -0x88(%rbp),%ebx
  mov    -0x8c(%rbp),%edi
  mov    %ebx,%esi
  call   <new_dobldobl_slices@plt>
  mov    %ebx,%edi
  call   <store_dobldobl_gammas@plt>
  xor    %eax,%eax
  call   <dobldobl_track_paths@plt>
  xor    %eax,%eax
  call   <solcon_clear_dobldobl_solutions@plt>
  mov    %ebx,%edi
  call   <store_dobldobl_gammas@plt>
  xor    %eax,%eax
  call   <dobldobl_track_paths@plt>
  xor    %eax,%eax
  call   <store_dobldobl_solutions@plt>
  mov    %rsp,%rax
  sub    -0x80(%rbp),%rax
  mov    %rsp,-0x78(%rbp)
  cmp    %rax,%rsp
  je     L189
L68:
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  cmp    %rax,%rsp
  jne    L68
L189:
  mov    -0xa8(%rbp),%rax
  sub    %rax,%rsp
  test   %rax,%rax
  je     L66
  mov    -0xb8(%rbp),%rax
  orq    $0x0,(%rsp,%rax,1)
L66:
  mov    -0x70(%rbp),%ebx
  mov    %rsp,%r13
  mov    %r13,%rsi
  mov    %ebx,%edi
  call   <permutation_after_dobldobl_loop@plt>
  mov    -0x6c(%rbp),%esi
  xor    %eax,%eax
  lea    D129(%rip),%rdi
  call   <printf@plt>
  test   %ebx,%ebx
  jle    L191
  mov    -0xa0(%rbp),%rax
  lea    D11(%rip),%rbx
  lea    0x4(%r13,%rax,4),%r12
  nopl   0x0(%rax,%rax,1)
L52:
  mov    0x0(%r13),%esi
  mov    %rbx,%rdi
  xor    %eax,%eax
  add    $0x4,%r13
  call   <printf@plt>
  cmp    %r13,%r12
  jne    L52
L191:
  mov    $0xa,%edi
  call   <putchar@plt>
  mov    -0x78(%rbp),%rsp
  mov    -0x98(%rbp),%rsi
  mov    -0x70(%rbp),%edi
  call   <dobldobl_monodromy_permutation@plt>
  mov    %rsp,%rax
  sub    -0x80(%rbp),%rax
  cmp    %rax,%rsp
  je     L181
L12:
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  cmp    %rax,%rsp
  jne    L12
L181:
  mov    -0xa8(%rbp),%rax
  sub    %rax,%rsp
  test   %rax,%rax
  je     L149
  mov    -0xb8(%rbp),%rax
  orq    $0x0,(%rsp,%rax,1)
L149:
  mov    -0xb0(%rbp),%rdi
  mov    %rsp,%rbx
  call   <number_of_dobldobl_factors@plt>
  mov    -0x58(%rbp),%esi
  lea    D59(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  mov    -0x58(%rbp),%eax
  test   %eax,%eax
  jle    L62
  lea    -0x40(%rbp),%rax
  mov    $0x1,%r13d
  lea    -0x54(%rbp),%r15
  mov    %rax,-0x68(%rbp)
  lea    D11(%rip),%r12
  nopl   0x0(%rax)
L97:
  mov    %rbx,%rdx
  mov    %r15,%rsi
  mov    %r13d,%edi
  call   <witness_points_of_dobldobl_factor@plt>
  lea    D16(%rip),%rdi
  mov    %r13d,%esi
  xor    %eax,%eax
  call   <printf@plt>
  mov    -0x54(%rbp),%edi
  test   %edi,%edi
  jle    L152
  xor    %r14d,%r14d
  nopl   0x0(%rax)
L61:
  mov    (%rbx,%r14,4),%esi
  mov    %r12,%rdi
  xor    %eax,%eax
  add    $0x1,%r14
  call   <printf@plt>
  mov    -0x54(%rbp),%edi
  cmp    %r14d,%edi
  jg     L61
L152:
  mov    -0x68(%rbp),%rdx
  mov    %rbx,%rsi
  add    $0x1,%r13d
  call   <dobldobl_trace_sum_difference@plt>
  movsd  -0x40(%rbp),%xmm0
  mov    $0x1,%eax
  lea    D50(%rip),%rdi
  call   <printf@plt>
  cmp    %r13d,-0x58(%rbp)
  jge    L97
L62:
  mov    -0x78(%rbp),%rsp
  xor    %eax,%eax
  call   <restore_dobldobl_solutions@plt>
  mov    -0x6c(%rbp),%ecx
  mov    -0x5c(%rbp),%edx
  add    $0x1,%ecx
  cmp    %ecx,-0x84(%rbp)
  jl     L113
  test   %edx,%edx
  jne    L113
  mov    %ecx,-0x6c(%rbp)
  mov    %ecx,%esi
  jmp    L107
L113:
  mov    %eax,%r12d
  cmp    $0x1,%edx
  je     L186
L50:
  mov    -0x6c(%rbp),%esi
  lea    D132(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
L91:
  mov    -0x38(%rbp),%rax
  sub    %fs:0x28,%rax
  jne    L82
  lea    -0x28(%rbp),%rsp
  mov    %r12d,%eax
  pop    %rbx
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  pop    %rbp
  ret
L186:
  mov    -0x6c(%rbp),%esi
  lea    D125(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  jmp    L91
L101:
  movl   $0x0,-0x6c(%rbp)
  jmp    L50
L82:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: retrieve_data
arguments: data_tag: D25
datatype: string
name: retrieve_data
arguments: data_tag: D76
datatype: string
name: retrieve_data
arguments: data_tag: D70
datatype: string
name: retrieve_data
arguments: data_tag: D124
datatype: string
name: retrieve_data
arguments: data_tag: D114
datatype: string
name: retrieve_data
arguments: data_tag: D88
datatype: string
name: retrieve_data
arguments: data_tag: D129
datatype: string
name: retrieve_data
arguments: data_tag: D11
datatype: string
name: retrieve_data
arguments: data_tag: D59
datatype: string
name: retrieve_data
arguments: data_tag: D16
datatype: string
name: retrieve_data
arguments: data_tag: D50
datatype: string
name: retrieve_data
arguments: data_tag: D132
datatype: string
name: retrieve_data
arguments: data_tag: D125
datatype: string

tool: D25: 
Initialized sampler and monodromy permutations ...

tool: D76: ... initializing the grid in double double precision...

tool: D70: Trace grid diagnostics : 

tool: D124:   largest error of the samples : %.3e


tool: D114:   smallest distance between samples : %.3e


tool: D88: ... starting loop #%d in double double precision ...


tool: D129: the permutation at step %d:

tool: D11:  %d

tool: D59: number of irreducible factors : %d


tool: D16:  %d :

tool: D50:  : %.3e


tool: D132: Failed to factor using %d loops.


tool: D125: Found factorization using %d loops.


assistant: ```c
int dobldobl_monodromy_breakup(int nbloops, int n, int k, int d) {
  int fail, i, j, done;
  double err, dis;
  fail = initialize_dobldobl_sampler(k);
  fail = initialize_dobldobl_monodromy(nbloops, d, k);
  if (1 > 0)
    printf("\nInitialized sampler and monodromy permutations ...\n");
  fail = store_dobldobl_solutions();
  printf("... initializing the grid in double double precision...\n");
  for (i = 1; i <= 2; i++) {
    fail = set_dobldobl_trace_slice(i);
    fail = store_dobldobl_gammas(n);
    fail = dobldobl_track_paths();
    fail = store_dobldobl_solutions();
    fail = restore_dobldobl_solutions();
    fail = swap_dobldobl_slices();
  }
  fail = dobldobl_trace_grid_diagnostics(&err, &dis);
  printf("Trace grid diagnostics : \n");
  printf("  largest error of the samples : %.3e\n", err);
  printf("  smallest distance between samples : %.3e\n", dis);
  done = 0;
  for (i = 1; (i <= nbloops) && (done == 0); i++) {
    printf("... starting loop #\%d in double double precision ...\n", i);
    fail = new_dobldobl_slices(k, n);
    fail = store_dobldobl_gammas(n);
    fail = dobldobl_track_paths();
    fail = solcon_clear_dobldobl_solutions();
    fail = store_dobldobl_gammas(n);
    fail = dobldobl_track_paths();
    fail = store_dobldobl_solutions();
    {
      int permutation[d];
      fail = permutation_after_dobldobl_loop(d, permutation);
      printf("the permutation at step %d:", i);
      for (j = 0; j < d; j++)
        printf(" %d", permutation[j]);
      printf("\n");
    }
    fail = dobldobl_monodromy_permutation(d, &done);
    {
      int nf, deg, jp, w[d];
      double trace_difference;
      fail = number_of_dobldobl_factors(&nf);
      printf("number of irreducible factors : %d\n", nf);
      for (j = 1; j <= nf; j++) {
        fail = witness_points_of_dobldobl_factor(j, &deg, w);
        printf(" %d :", j);
        for (jp = 0; jp < deg; jp++)
          printf(" %d", w[jp]);
        fail = dobldobl_trace_sum_difference(deg, w, &trace_difference);
        printf(" : %.3e\n", trace_difference);
      }
    }
    fail = restore_dobldobl_solutions();
  }
  if (done == 1)
    printf("Found factorization using %d loops.\n", i - 1);
  else
    printf("Failed to factor using %d loops.\n", i - 1);
  return fail;
}
```