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
  push   %r14
  push   %r13
  push   %r12
  push   %rbx
  sub    $0x98,%rsp
  mov    %edi,-0x88(%rbp)
  mov    %esi,-0x8c(%rbp)
  mov    %edx,-0x90(%rbp)
  mov    %ecx,-0x84(%rbp)
  mov    %r8d,-0x70(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x38(%rbp)
  xor    %eax,%eax
  cmp    $0x1,%edi
  je     L28
  mov    -0x84(%rbp),%edi
  call   <initialize_dobldobl_sampler@plt>
L149:
  mov    -0x70(%rbp),%ebx
  mov    -0x8c(%rbp),%r15d
  mov    -0x84(%rbp),%edx
  mov    %ebx,%esi
  mov    %r15d,%edi
  call   <initialize_dobldobl_monodromy@plt>
  lea    D88(%rip),%rdi
  call   <puts@plt>
  xor    %eax,%eax
  call   <store_dobldobl_solutions@plt>
  lea    D67(%rip),%rdi
  call   <puts@plt>
  mov    $0x1,%edi
  call   <set_dobldobl_trace_slice@plt>
  mov    -0x90(%rbp),%r12d
  mov    %r12d,%edi
  call   <store_dobldobl_gammas@plt>
  mov    -0x88(%rbp),%r14d
  mov    %r14d,%edi
  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    %r12d,%edi
  call   <store_dobldobl_gammas@plt>
  mov    %r14d,%edi
  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    D135(%rip),%rdi
  mov    %eax,%r12d
  call   <puts@plt>
  movsd  -0x50(%rbp),%xmm0
  mov    $0x1,%eax
  lea    D63(%rip),%rdi
  call   <printf@plt>
  movsd  -0x48(%rbp),%xmm0
  mov    $0x1,%eax
  lea    D48(%rip),%rdi
  call   <printf@plt>
  movl   $0x0,-0x5c(%rbp)
  test   %r15d,%r15d
  jle    L68
  lea    -0x1(%rbx),%ecx
  movslq %ebx,%rax
  movl   $0x1,-0x6c(%rbp)
  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)
L171:
  mov    -0x6c(%rbp),%esi
  lea    D76(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  mov    -0x90(%rbp),%ebx
  mov    -0x84(%rbp),%edi
  mov    %ebx,%esi
  call   <new_dobldobl_slices@plt>
  mov    %ebx,%edi
  call   <store_dobldobl_gammas@plt>
  mov    -0x88(%rbp),%r15d
  mov    %r15d,%edi
  call   <dobldobl_track_paths@plt>
  xor    %eax,%eax
  call   <solcon_clear_dobldobl_solutions@plt>
  mov    %ebx,%edi
  call   <store_dobldobl_gammas@plt>
  mov    %r15d,%edi
  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     L93
L179:
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  cmp    %rax,%rsp
  jne    L179
L93:
  mov    -0xa8(%rbp),%rax
  sub    %rax,%rsp
  test   %rax,%rax
  je     L164
  mov    -0xb8(%rbp),%rax
  orq    $0x0,(%rsp,%rax,1)
L164:
  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    D69(%rip),%rdi
  call   <printf@plt>
  test   %ebx,%ebx
  jle    L25
  mov    -0xa0(%rbp),%rax
  lea    D71(%rip),%rbx
  lea    0x4(%r13,%rax,4),%r12
  nop
L197:
  mov    0x0(%r13),%esi
  mov    %rbx,%rdi
  xor    %eax,%eax
  add    $0x4,%r13
  call   <printf@plt>
  cmp    %r13,%r12
  jne    L197
L25:
  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     L152
L30:
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  cmp    %rax,%rsp
  jne    L30
L152:
  mov    -0xa8(%rbp),%rax
  sub    %rax,%rsp
  test   %rax,%rax
  je     L217
  mov    -0xb8(%rbp),%rax
  orq    $0x0,(%rsp,%rax,1)
L217:
  mov    -0xb0(%rbp),%rdi
  mov    %rsp,%rbx
  call   <number_of_dobldobl_factors@plt>
  mov    -0x58(%rbp),%esi
  lea    D29(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  mov    -0x58(%rbp),%eax
  test   %eax,%eax
  jle    L144
  lea    -0x40(%rbp),%rax
  mov    $0x1,%r13d
  lea    -0x54(%rbp),%r15
  mov    %rax,-0x68(%rbp)
  lea    D71(%rip),%r12
  nopl   0x0(%rax)
L194:
  mov    %rbx,%rdx
  mov    %r15,%rsi
  mov    %r13d,%edi
  call   <witness_points_of_dobldobl_factor@plt>
  lea    D51(%rip),%rdi
  mov    %r13d,%esi
  xor    %eax,%eax
  call   <printf@plt>
  mov    -0x54(%rbp),%edi
  test   %edi,%edi
  jle    L132
  xor    %r14d,%r14d
  nopl   0x0(%rax)
L23:
  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     L23
L132:
  mov    -0x68(%rbp),%rdx
  mov    %rbx,%rsi
  add    $0x1,%r13d
  call   <dobldobl_trace_sum_difference@plt>
  movsd  -0x40(%rbp),%xmm0
  mov    $0x1,%eax
  lea    D114(%rip),%rdi
  call   <printf@plt>
  cmp    %r13d,-0x58(%rbp)
  jge    L194
L144:
  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,-0x8c(%rbp)
  jl     L117
  test   %edx,%edx
  jne    L117
  mov    %ecx,-0x6c(%rbp)
  jmp    L171
L117:
  mov    %eax,%r12d
  cmp    $0x1,%edx
  je     L53
L178:
  mov    -0x6c(%rbp),%esi
  lea    D21(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
L156:
  mov    -0x38(%rbp),%rax
  sub    %fs:0x28,%rax
  jne    L141
  lea    -0x28(%rbp),%rsp
  mov    %r12d,%eax
  pop    %rbx
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  pop    %rbp
  ret
L28:
  mov    %ecx,%edi
  call   <initialize_dobldobl_Laurent_sampler@plt>
  jmp    L149
L53:
  mov    -0x6c(%rbp),%esi
  lea    D56(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  jmp    L156
L68:
  movl   $0x0,-0x6c(%rbp)
  jmp    L178
L141:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: parse_data
arguments: tag: D88
data_type: string
name: parse_data
arguments: tag: D67
data_type: string
name: parse_data
arguments: tag: D135
data_type: string
name: parse_data
arguments: tag: D63
data_type: string
name: parse_data
arguments: tag: D48
data_type: string
name: parse_data
arguments: tag: D76
data_type: string
name: parse_data
arguments: tag: D69
data_type: string
name: parse_data
arguments: tag: D71
data_type: string
name: parse_data
arguments: tag: D29
data_type: string
name: parse_data
arguments: tag: D51
data_type: string
name: parse_data
arguments: tag: D114
data_type: string
name: parse_data
arguments: tag: D21
data_type: string
name: parse_data
arguments: tag: D56
data_type: string

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

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

tool: D135: Trace grid diagnostics : 

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


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


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


tool: D69: the permutation at step %d:

tool: D71:  %d

tool: D29: number of irreducible factors : %d


tool: D51:  %d :

tool: D114:  : %.3e


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


tool: D56: Found factorization using %d loops.


assistant: ```c
int dobldobl_monodromy_breakup(int islaurent, int nbloops, int n, int k, int d) {
  int fail, i, j, done;
  double err, dis;
  if (islaurent == 1)
    fail = initialize_dobldobl_Laurent_sampler(k);
  else
    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(islaurent);
    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(islaurent);
    fail = solcon_clear_dobldobl_solutions();
    fail = store_dobldobl_gammas(n);
    fail = dobldobl_track_paths(islaurent);
    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;
}
```