user: What would the C source look like for the assembly code provided here:

```asm
<move_blocks_inwards_while_likelihood_improves>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x58,%rsp
  mov    %edx,0x30(%rsp)
  mov    %rcx,0x18(%rsp)
  mov    %r9,0x10(%rsp)
  test   %edi,%edi
  jle    L141
  mov    %rsi,%r15
  mov    %r8d,%r12d
  mov    %edi,%eax
  mov    %rax,0x20(%rsp)
  mov    $0x0,%ebx
  jmp    L223
L39:
  mov    (%r15),%rax
  mov    (%rax,%rbx,4),%eax
  mov    %eax,0x8(%rsp)
  mov    0x8(%r15),%rax
  mov    (%rax,%rbx,4),%r13d
  jmp    L76
L66:
  mov    0x8(%r15),%rdx
  mov    (%rdx,%rbp,1),%r13d
  mov    %eax,0x8(%rsp)
L76:
  add    $0x1,%rbx
  cmp    0x20(%rsp),%rbx
  je     L73
L223:
  lea    0x0(,%rbx,4),%rbp
  mov    0x8(%r15),%rax
  mov    (%rax,%rbx,4),%r14d
  mov    (%r15),%rax
  mov    (%rax,%rbx,4),%edi
  mov    %r12d,%ecx
  mov    $0x0,%edx
  mov    0x18(%rsp),%rsi
  call   <find_starting_index@plt>
  mov    %eax,%edx
  mov    %r12d,%ecx
  mov    0x18(%rsp),%rsi
  mov    %r14d,%edi
  call   <find_starting_index@plt>
  test   %ebx,%ebx
  je     L39
  mov    %rbp,%rdx
  add    (%r15),%rdx
  mov    (%rdx),%eax
  cmp    0x8(%rsp),%eax
  jne    L66
  mov    0x8(%r15),%rsi
  cmp    %r13d,(%rsi,%rbp,1)
  jne    L66
  test   %ebx,%ebx
  jle    L66
  movl   $0xffffffff,(%rdx)
  mov    0x8(%r15),%rax
  movl   $0xffffffff,(%rax,%rbp,1)
  jmp    L76
L73:
  mov    0x20(%rsp),%rax
  shl    $0x2,%rax
  mov    %rax,0x48(%rsp)
  movq   $0x0,0x28(%rsp)
  mov    %r15,0x40(%rsp)
  jmp    L160
L47:
  mov    0xa8(%rsp),%r8d
  mov    %ebp,%ecx
  mov    %ebx,%edx
  mov    0x90(%rsp),%rsi
  mov    0xa0(%rsp),%rdi
  call   <calculate_block_size_without_gaps@plt>
  mov    %eax,%edi
  mov    %eax,0x20(%rsp)
  mov    0x40(%rsp),%rdx
  mov    0x10(%rdx),%rax
  mov    0x28(%rsp),%rsi
  movl   $0x0,(%rax,%rsi,1)
  mov    0x18(%rdx),%rax
  mov    %edi,(%rax,%rsi,1)
  jmp    L265
L263:
  mov    %r13d,0x34(%rsp)
  mov    %r15d,0x20(%rsp)
  movsd  %xmm0,0x8(%rsp)
L215:
  lea    0x1(%rbx),%edi
  mov    %ebx,%r15d
  mov    %ebx,0x38(%rsp)
  mov    %r12d,%ecx
  mov    0x10(%rsp),%rdx
  mov    0x18(%rsp),%r13
  mov    %r13,%rsi
  call   <advance_window_start_to_next_snp@plt>
  mov    %eax,%ebx
  cmp    %r15d,%eax
  jle    L180
  cmp    %eax,%ebp
  jle    L145
  sub    $0x8,%rsp
  mov    0x44(%rsp),%eax
  push   %rax
  mov    %r14d,%r9d
  mov    %r12d,%r8d
  mov    0x20(%rsp),%rcx
  mov    %r13,%rdx
  mov    %ebp,%esi
  mov    %ebx,%edi
  call   <find_number_of_snps_in_block_with_start_end_index@plt>
  mov    %eax,%r13d
  mov    0xb8(%rsp),%r8d
  mov    %ebp,%ecx
  mov    %ebx,%edx
  mov    0xa0(%rsp),%rsi
  mov    0xb0(%rsp),%rdi
  call   <calculate_block_size_without_gaps@plt>
  mov    %eax,%r15d
  mov    %r13d,%ecx
  mov    %eax,%edx
  mov    %r12d,%esi
  mov    0xa8(%rsp),%edi
  call   <get_block_likelihood@plt>
  add    $0x10,%rsp
  movsd  0x8(%rsp),%xmm1
  comisd %xmm0,%xmm1
  jb     L110
  add    $0x1,%r14d
  cmp    %r13d,0x30(%rsp)
  jle    L263
  mov    %r13d,%r14d
  mov    %ebx,%r13d
  mov    %r15d,0x20(%rsp)
  movsd  %xmm0,0x8(%rsp)
  jmp    L36
L180:
  mov    0x34(%rsp),%r14d
  mov    0x38(%rsp),%r13d
L36:
  cmp    %r13d,%ebp
  jle    L172
  cmp    0x30(%rsp),%r14d
  jl     L172
  lea    -0x1(%rbp),%edi
  mov    %r12d,%ecx
  mov    0x10(%rsp),%r15
  mov    %r15,%rdx
  mov    0x18(%rsp),%r14
  mov    %r14,%rsi
  call   <rewind_window_end_to_last_snp@plt>
  mov    %eax,%ebx
  cmp    %eax,%ebp
  jle    L172
  cmp    %r13d,%eax
  jle    L172
  mov    %r12d,%r8d
  mov    %r15,%rcx
  mov    %r14,%rdx
  mov    %eax,%esi
  mov    %r13d,%edi
  call   <find_number_of_snps_in_block@plt>
  mov    %eax,%r14d
  mov    0xa8(%rsp),%r8d
  mov    %ebx,%ecx
  mov    %r13d,%edx
  mov    0x90(%rsp),%rsi
  mov    0xa0(%rsp),%rdi
  call   <calculate_block_size_without_gaps@plt>
  mov    %eax,%r15d
  mov    %r14d,%ecx
  mov    %eax,%edx
  mov    %r12d,%esi
  mov    0x98(%rsp),%edi
  call   <get_block_likelihood@plt>
  movsd  0x8(%rsp),%xmm2
  comisd %xmm0,%xmm2
  jb     L172
  mov    %r15d,0x20(%rsp)
  movsd  %xmm0,0x8(%rsp)
  mov    %ebx,%ebp
  jmp    L36
L145:
  mov    0x34(%rsp),%r14d
  mov    0x38(%rsp),%r13d
  jmp    L36
L110:
  mov    0x34(%rsp),%r14d
  mov    0x38(%rsp),%r13d
  jmp    L36
L199:
  mov    %ebx,%r13d
L172:
  mov    0x40(%rsp),%rcx
  mov    (%rcx),%rax
  mov    0x28(%rsp),%rsi
  mov    %r13d,(%rax,%rsi,1)
  mov    0x8(%rcx),%rax
  mov    %ebp,(%rax,%rsi,1)
  mov    0x10(%rcx),%rax
  cvttsd2si 0x8(%rsp),%edx
  mov    %edx,(%rax,%rsi,1)
  mov    0x18(%rcx),%rax
  mov    %rsi,%rdx
  mov    0x20(%rsp),%esi
  mov    %esi,(%rax,%rdx,1)
  mov    0xb0(%rsp),%rax
  movsd  0x8(%rsp),%xmm3
  movsd  %xmm3,(%rax,%rdx,2)
L273:
  addq   $0x4,0x28(%rsp)
  mov    0x28(%rsp),%rax
  cmp    0x48(%rsp),%rax
  je     L141
L160:
  mov    0x40(%rsp),%rsi
  mov    (%rsi),%rax
  mov    0x28(%rsp),%rcx
  mov    (%rax,%rcx,1),%ebx
  cmp    $0xffffffff,%ebx
  je     L273
  mov    0x8(%rsi),%rax
  mov    (%rax,%rcx,1),%ebp
  cmp    $0xffffffff,%ebp
  je     L273
  mov    0x18(%rsi),%rax
  mov    (%rax,%rcx,1),%r13d
  mov    %r13d,0x20(%rsp)
  mov    %r12d,%ecx
  mov    $0x0,%edx
  mov    0x18(%rsp),%r15
  mov    %r15,%rsi
  mov    %ebx,%edi
  call   <find_starting_index@plt>
  mov    %eax,%r14d
  mov    %r12d,%ecx
  mov    %eax,%edx
  mov    %r15,%rsi
  mov    %ebp,%edi
  call   <find_starting_index@plt>
  mov    %eax,0x3c(%rsp)
  sub    $0x8,%rsp
  push   %rax
  mov    %r14d,%r9d
  mov    %r12d,%r8d
  mov    0x20(%rsp),%rcx
  mov    %r15,%rdx
  mov    %ebp,%esi
  mov    %ebx,%edi
  call   <find_number_of_snps_in_block_with_start_end_index@plt>
  mov    %eax,0x44(%rsp)
  add    $0x10,%rsp
  cmp    $0xffffffff,%r13d
  je     L47
L265:
  mov    0x34(%rsp),%r15d
  mov    %r15d,%ecx
  mov    0x20(%rsp),%edx
  mov    %r12d,%esi
  mov    0x98(%rsp),%edi
  call   <get_block_likelihood@plt>
  movsd  %xmm0,0x8(%rsp)
  cmp    %ebp,%ebx
  jge    L199
  mov    0x30(%rsp),%eax
  cmp    %eax,%r15d
  jge    L215
  jmp    L199
L141:
  add    $0x58,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
```

assistant: ```c
void move_blocks_inwards_while_likelihood_improves(int number_of_blocks, int **block_coordinates, int min_snps, int *snp_site_coords, int number_of_branch_snps, char *branch_snp_sequence, int *snp_locations, int branch_genome_size, char *child_sequence, int length_of_sequence, double *block_likelihoods, int cutoff_value) {
  int i;
  int previous_start;
  int previous_end;
  for (i = 0; i < number_of_blocks; i++) {
    int current_start = block_coordinates[0][i];
    int current_end = block_coordinates[1][i];
    int start_index = find_starting_index(current_start, snp_site_coords, 0, number_of_branch_snps);
    int end_index = find_starting_index(current_end, snp_site_coords, start_index, number_of_branch_snps);
    if (i == 0) {
      previous_start = block_coordinates[0][i];
      previous_end = block_coordinates[1][i];
    } else if (previous_start == block_coordinates[0][i] && previous_end == block_coordinates[1][i] && i > 0) {
      block_coordinates[0][i] = -1;
      block_coordinates[1][i] = -1;
    } else {
      previous_start = block_coordinates[0][i];
      previous_end = block_coordinates[1][i];
    }
  }
  for (i = 0; i < number_of_blocks; i++) {
    if (block_coordinates[0][i] == -1 || block_coordinates[1][i] == -1) {
      continue;
    }
    int current_start = block_coordinates[0][i];
    int current_end = block_coordinates[1][i];
    double current_block_likelihood = 0;
    int block_genome_size_without_gaps = block_coordinates[3][i];
    int block_snp_count;
    int next_start_position = current_start;
    int start_index = find_starting_index(current_start, snp_site_coords, 0, number_of_branch_snps);
    int end_index = find_starting_index(current_end, snp_site_coords, start_index, number_of_branch_snps);
    block_snp_count = find_number_of_snps_in_block_with_start_end_index(current_start, current_end, snp_site_coords, branch_snp_sequence, number_of_branch_snps, start_index, end_index);
    if (block_genome_size_without_gaps == -1) {
      block_genome_size_without_gaps = calculate_block_size_without_gaps(child_sequence, snp_locations, current_start, current_end, length_of_sequence);
      block_coordinates[2][i] = current_block_likelihood;
      block_coordinates[3][i] = block_genome_size_without_gaps;
    }
    current_block_likelihood = get_block_likelihood(branch_genome_size, number_of_branch_snps, block_genome_size_without_gaps, block_snp_count);
    while (current_start < current_end && block_snp_count >= min_snps) {
      next_start_position++;
      next_start_position = advance_window_start_to_next_snp(next_start_position, snp_site_coords, branch_snp_sequence, number_of_branch_snps);
      if (next_start_position >= current_end) {
        break;
      }
      if (next_start_position <= current_start) {
        break;
      }
      int previous_block_snp_count = block_snp_count;
      int previous_block_genome_size_without_gaps = block_genome_size_without_gaps;
      block_snp_count = find_number_of_snps_in_block_with_start_end_index(next_start_position, current_end, snp_site_coords, branch_snp_sequence, number_of_branch_snps, start_index, end_index);
      block_genome_size_without_gaps = calculate_block_size_without_gaps(child_sequence, snp_locations, next_start_position, current_end, length_of_sequence);
      double next_block_likelihood = get_block_likelihood(branch_genome_size, number_of_branch_snps, block_genome_size_without_gaps, block_snp_count);
      if (next_block_likelihood <= current_block_likelihood) {
        current_block_likelihood = next_block_likelihood;
        current_start = next_start_position;
        start_index++;
      } else {
        block_snp_count = previous_block_snp_count;
        block_genome_size_without_gaps = previous_block_genome_size_without_gaps;
        break;
      }
    }
    int next_end_position = current_end;
    while (current_start < current_end && block_snp_count >= min_snps) {
      next_end_position--;
      next_end_position = rewind_window_end_to_last_snp(next_end_position, snp_site_coords, branch_snp_sequence, number_of_branch_snps);
      if (next_end_position <= current_start) {
        break;
      }
      if (next_end_position >= current_end) {
        break;
      }
      int previous_block_snp_count = block_snp_count;
      int previous_block_genome_size_without_gaps = block_genome_size_without_gaps;
      block_snp_count = find_number_of_snps_in_block(current_start, next_end_position, snp_site_coords, branch_snp_sequence, number_of_branch_snps);
      block_genome_size_without_gaps = calculate_block_size_without_gaps(child_sequence, snp_locations, current_start, next_end_position, length_of_sequence);
      double next_block_likelihood = get_block_likelihood(branch_genome_size, number_of_branch_snps, block_genome_size_without_gaps, block_snp_count);
      if (next_block_likelihood <= current_block_likelihood) {
        current_block_likelihood = next_block_likelihood;
        current_end = next_end_position;
        end_index--;
      } else {
        block_snp_count = previous_block_snp_count;
        block_genome_size_without_gaps = previous_block_genome_size_without_gaps;
        break;
      }
    }
    block_coordinates[0][i] = current_start;
    block_coordinates[1][i] = current_end;
    block_coordinates[2][i] = (int)current_block_likelihood;
    block_coordinates[3][i] = block_genome_size_without_gaps;
    block_likelihoods[i] = current_block_likelihood;
  }
}
```