user: Demonstrate the C code that generates the assembly output below:

```asm
<move_blocks_inwards_while_likelihood_improves>:
  endbr64
  push   %r15
  mov    %edi,%eax
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x58,%rsp
  mov    %rsi,0x48(%rsp)
  mov    %edx,0x30(%rsp)
  test   %eax,%eax
  jle    L8
  lea    -0x1(%rax),%ebx
  mov    %rax,0x18(%rsp)
  mov    (%rsi),%rdx
  mov    %rcx,%r14
  mov    %rbx,0x20(%rsp)
  mov    0x8(%rsi),%rax
  mov    %r8d,%ebp
  xor    %r13d,%r13d
  mov    %r9,0x28(%rsp)
  mov    %rsi,%rbx
  jmp    L302
  nopl   0x0(%rax)
L34:
  mov    0x8(%rbx),%rax
  lea    (%rdx,%r15,1),%r10
  mov    (%r10),%esi
  lea    (%rax,%r15,1),%r9
  mov    (%r9),%edi
  cmp    0x8(%rsp),%esi
  je     L201
  mov    %edi,0x14(%rsp)
  mov    %esi,0x8(%rsp)
L100:
  add    $0x1,%r13
  cmp    %r13,0x18(%rsp)
  je     L261
L302:
  mov    (%rdx,%r13,4),%edi
  mov    (%rax,%r13,4),%r12d
  mov    %ebp,%ecx
  xor    %edx,%edx
  mov    %r14,%rsi
  lea    0x0(,%r13,4),%r15
  call   <find_starting_index@plt>
  mov    %ebp,%ecx
  mov    %r14,%rsi
  mov    %r12d,%edi
  mov    %eax,%edx
  call   <find_starting_index@plt>
  mov    (%rbx),%rdx
  mov    %rdx,%rcx
  test   %r13,%r13
  jne    L34
  mov    (%rdx,%r13,4),%eax
  mov    %eax,0x8(%rsp)
  mov    0x8(%rbx),%rax
  mov    (%rax,%r13,4),%esi
  add    $0x1,%r13
  mov    %esi,0x14(%rsp)
  cmp    %r13,0x18(%rsp)
  jne    L302
L261:
  mov    0x20(%rsp),%rdx
  mov    0x28(%rsp),%r15
  movq   $0x0,0x28(%rsp)
  shl    $0x2,%rdx
  mov    %rdx,0x40(%rsp)
  jmp    L174
  nopw   0x0(%rax,%rax,1)
L292:
  mov    0x28(%rsp),%rbx
  cmp    %rbx,0x40(%rsp)
  je     L8
L274:
  add    $0x4,%rbx
  mov    %rbx,0x28(%rsp)
L174:
  mov    0x28(%rsp),%rsi
  mov    (%rcx,%rsi,1),%r10d
  cmp    $0xffffffff,%r10d
  je     L292
  mov    (%rax,%rsi,1),%ebx
  cmp    $0xffffffff,%ebx
  je     L292
  mov    0x48(%rsp),%rax
  mov    %r10d,%edi
  xor    %edx,%edx
  mov    %ebp,%ecx
  mov    %r10d,0x8(%rsp)
  mov    0x18(%rax),%rax
  mov    (%rax,%rsi,1),%eax
  mov    %r14,%rsi
  mov    %eax,0x14(%rsp)
  call   <find_starting_index@plt>
  mov    %ebp,%ecx
  mov    %r14,%rsi
  mov    %ebx,%edi
  mov    %eax,%edx
  mov    %eax,0x18(%rsp)
  mov    %eax,%r13d
  call   <find_starting_index@plt>
  sub    $0x8,%rsp
  mov    %r15,%rcx
  mov    %ebx,%esi
  mov    %eax,0x44(%rsp)
  mov    %r13d,%r9d
  mov    %ebp,%r8d
  mov    %r14,%rdx
  push   %rax
  mov    0x18(%rsp),%edi
  call   <find_number_of_snps_in_block_with_start_end_index@plt>
  pop    %rcx
  pop    %rsi
  cmpl   $0xffffffff,0x14(%rsp)
  mov    0x8(%rsp),%r10d
  mov    %eax,%r12d
  je     L36
L299:
  mov    0x14(%rsp),%edx
  mov    0x98(%rsp),%edi
  mov    %r12d,%ecx
  mov    %ebp,%esi
  mov    %r10d,0x20(%rsp)
  call   <get_block_likelihood@plt>
  mov    0x20(%rsp),%r10d
  movsd  %xmm0,0x8(%rsp)
  cmp    %ebx,%r10d
  jge    L166
  cmp    0x30(%rsp),%r12d
  jl     L166
  mov    %r12d,0x38(%rsp)
  mov    %r10d,%r13d
  jmp    L121
  nopl   0x0(%rax)
L230:
  cmp    %r12d,%eax
  jle    L79
  sub    $0x8,%rsp
  mov    %ebp,%r8d
  mov    %r15,%rcx
  mov    %r14,%rdx
  mov    0x44(%rsp),%eax
  mov    %ebx,%esi
  mov    %r13d,%edi
  push   %rax
  mov    0x28(%rsp),%r9d
  call   <find_number_of_snps_in_block_with_start_end_index@plt>
  mov    0xb8(%rsp),%r8d
  mov    %ebx,%ecx
  mov    %r13d,%edx
  mov    0xa0(%rsp),%rsi
  mov    0xb0(%rsp),%rdi
  mov    %eax,%r12d
  call   <calculate_block_size_without_gaps@plt>
  mov    0xa8(%rsp),%edi
  mov    %r12d,%ecx
  mov    %ebp,%esi
  mov    %eax,%edx
  mov    %eax,0x30(%rsp)
  call   <get_block_likelihood@plt>
  pop    %rax
  pop    %rdx
  movsd  0x8(%rsp),%xmm1
  comisd %xmm0,%xmm1
  jb     L79
  addl   $0x1,0x18(%rsp)
  cmp    %r12d,0x30(%rsp)
  mov    0x20(%rsp),%eax
  jg     L258
  mov    %r12d,0x38(%rsp)
  mov    %eax,0x14(%rsp)
  movsd  %xmm0,0x8(%rsp)
L121:
  lea    0x1(%r13),%edi
  mov    %ebp,%ecx
  mov    %r15,%rdx
  mov    %r14,%rsi
  mov    %r13d,0x34(%rsp)
  mov    %r13d,%r12d
  call   <advance_window_start_to_next_snp@plt>
  mov    %eax,%r13d
  cmp    %eax,%ebx
  jg     L230
L79:
  mov    0x38(%rsp),%r12d
  mov    0x34(%rsp),%r13d
  mov    %r14,0x20(%rsp)
  jmp    L195
  nopl   0x0(%rax)
L33:
  cmp    %eax,%ebx
  jle    L56
  mov    %r12,%rdx
  mov    %ebp,%r8d
  mov    %r15,%rcx
  mov    %eax,%esi
  mov    %r13d,%edi
  call   <find_number_of_snps_in_block@plt>
  mov    0xa8(%rsp),%r8d
  mov    %r14d,%ecx
  mov    %r13d,%edx
  mov    0x90(%rsp),%rsi
  mov    0xa0(%rsp),%rdi
  mov    %eax,%r12d
  call   <calculate_block_size_without_gaps@plt>
  mov    0x98(%rsp),%edi
  mov    %r12d,%ecx
  mov    %ebp,%esi
  mov    %eax,%edx
  mov    %eax,0x18(%rsp)
  call   <get_block_likelihood@plt>
  movsd  0x8(%rsp),%xmm2
  comisd %xmm0,%xmm2
  jb     L56
  mov    0x18(%rsp),%eax
  movsd  %xmm0,0x8(%rsp)
  mov    %r14d,%ebx
  mov    %eax,0x14(%rsp)
L195:
  cmp    %r13d,%ebx
  jle    L56
  cmp    0x30(%rsp),%r12d
  jl     L56
  mov    0x20(%rsp),%r12
  lea    -0x1(%rbx),%edi
  mov    %ebp,%ecx
  mov    %r15,%rdx
  mov    %r12,%rsi
  call   <rewind_window_end_to_last_snp@plt>
  mov    %eax,%r14d
  cmp    %r13d,%eax
  jg     L33
L56:
  mov    0x20(%rsp),%r14
L290:
  mov    0x48(%rsp),%r11
  cvttsd2si 0x8(%rsp),%esi
  mov    0x28(%rsp),%rdi
  movsd  0x8(%rsp),%xmm3
  mov    (%r11),%rcx
  mov    0x8(%r11),%rax
  mov    0x10(%r11),%rdx
  mov    %r13d,(%rcx,%rdi,1)
  mov    %ebx,(%rax,%rdi,1)
  mov    0x28(%rsp),%rbx
  mov    %esi,(%rdx,%rdi,1)
  mov    0x18(%r11),%rdx
  mov    0x14(%rsp),%esi
  mov    %esi,(%rdx,%rdi,1)
  mov    0xb0(%rsp),%rdx
  movsd  %xmm3,(%rdx,%rdi,2)
  cmp    %rbx,0x40(%rsp)
  jne    L274
L8:
  add    $0x58,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax)
L201:
  cmp    %edi,0x14(%rsp)
  je     L90
  mov    %edi,0x14(%rsp)
  jmp    L100
  nop
L258:
  mov    %eax,0x14(%rsp)
  mov    %r14,0x20(%rsp)
  movsd  %xmm0,0x8(%rsp)
  jmp    L195
  nopl   0x0(%rax)
L90:
  movl   $0xffffffff,(%r10)
  movl   $0xffffffff,(%r9)
  jmp    L100
  nopl   0x0(%rax,%rax,1)
L36:
  mov    0x90(%rsp),%rsi
  mov    0xa8(%rsp),%r8d
  mov    %r10d,%edx
  mov    %ebx,%ecx
  mov    0xa0(%rsp),%rdi
  call   <calculate_block_size_without_gaps@plt>
  mov    0x48(%rsp),%rcx
  mov    0x28(%rsp),%rdx
  mov    %eax,%esi
  mov    %eax,0x14(%rsp)
  mov    0x8(%rsp),%r10d
  mov    0x10(%rcx),%rax
  movl   $0x0,(%rax,%rdx,1)
  mov    0x18(%rcx),%rax
  mov    %esi,(%rax,%rdx,1)
  jmp    L299
L166:
  mov    %r10d,%r13d
  jmp    L290
```

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;
  }
}
```