user: 请将这段汇编代码片段转换成等效的C代码:

```asm
<get_blocks>:
  endbr64
  push   %r15
  push   %r14
  lea    0x1(%rsi),%r14d
  push   %r13
  mov    %rdi,%r13
  mov    %r14d,%edi
  push   %r12
  mov    %esi,%r12d
  mov    $0x4,%esi
  push   %rbp
  push   %rbx
  mov    %rdx,%rbx
  sub    $0x38,%rsp
  mov    0x70(%rsp),%r15
  mov    0x78(%rsp),%rbp
  mov    %r8d,0x10(%rsp)
  mov    %ecx,0x18(%rsp)
  mov    %r9d,0x1c(%rsp)
  call   <calloc@plt>
  mov    %r14d,%edi
  mov    $0x4,%esi
  mov    %rax,0x8(%rsp)
  call   <calloc@plt>
  mov    0x80(%rsp),%edx
  mov    0x10(%rsp),%r8d
  mov    %rax,%r14
  xor    %eax,%eax
  movslq 0x80(%rsp),%rdi
  test   %edx,%edx
  jg     L61
  jmp    L153
  nopl   (%rax)
L215:
  cmp    $0x2d,%dl
  je     L161
  add    $0x1,%rax
  cmp    %rdi,%rax
  je     L153
L61:
  movzbl (%r15,%rax,1),%edx
  cmp    $0x4e,%dl
  jne    L215
L161:
  movslq 0x0(%rbp,%rax,4),%rdx
  add    $0x1,%rax
  movl   $0x1,-0x4(%r14,%rdx,4)
  cmp    %rdi,%rax
  jne    L61
L153:
  mov    0x18(%rsp),%eax
  test   %eax,%eax
  jle    L58
  mov    0x18(%rsp),%eax
  mov    %r8d,%ebp
  mov    %r13,0x20(%rsp)
  mov    %r12d,%esi
  shr    $0x1f,%ebp
  mov    %rbx,0x28(%rsp)
  mov    %rbx,%r12
  mov    %esi,%r15d
  sub    $0x1,%eax
  add    %r8d,%ebp
  lea    0x4(%rbx,%rax,4),%rax
  sar    %ebp
  mov    %rax,0x10(%rsp)
  mov    0x8(%rsp),%rax
  neg    %ebp
  add    $0x4,%rax
  mov    %rax,%rbx
L30:
  mov    (%r12),%edi
  mov    %r14,%rcx
  mov    %r15d,%edx
  lea    (%rdi,%rbp,1),%esi
  sub    $0x1,%edi
  call   <extend_lower_part_of_window@plt>
  mov    (%r12),%edi
  xor    %edx,%edx
  mov    %r14,%rcx
  test   %eax,%eax
  cmovns %eax,%edx
  mov    %edi,%esi
  add    $0x1,%edi
  sub    %ebp,%esi
  mov    %edx,%r13d
  mov    %r15d,%edx
  call   <extend_upper_part_of_window@plt>
  cmp    %eax,%r15d
  cmovle %r15d,%eax
  cmp    %r13d,%eax
  jle    L99
  sub    $0x1,%eax
  movslq %r13d,%rcx
  mov    0x8(%rsp),%rsi
  sub    %r13d,%eax
  add    %rcx,%rax
  lea    (%rsi,%rcx,4),%rdx
  lea    (%rbx,%rax,4),%rax
  nopw   0x0(%rax,%rax,1)
L213:
  addl   $0x1,(%rdx)
  add    $0x4,%rdx
  cmp    %rax,%rdx
  jne    L213
L99:
  add    $0x4,%r12
  cmp    0x10(%rsp),%r12
  jne    L30
  mov    0x20(%rsp),%r13
  mov    0x28(%rsp),%rbx
  mov    %r15d,%r12d
L58:
  xor    %r15d,%r15d
  test   %r12d,%r12d
  jle    L17
  mov    0x8(%rsp),%rsi
  xor    %eax,%eax
  mov    0x1c(%rsp),%edi
  xor    %r8d,%r8d
  xor    %edx,%edx
  xor    %r15d,%r15d
  lea    0x1(%rax),%ecx
  cmp    %edi,(%rsi)
  jle    L115
  nopw   0x0(%rax,%rax,1)
L39:
  test   %edx,%edx
  cmove  %eax,%r8d
  cmp    %ecx,%r12d
  je     L114
  add    $0x4,%rsi
  mov    $0x1,%edx
  mov    %ecx,%eax
L276:
  lea    0x1(%rax),%ecx
  cmp    %edi,(%rsi)
  jg     L39
L115:
  cmp    $0x1,%edx
  je     L114
  add    $0x4,%rsi
  cmp    %ecx,%r12d
  je     L232
L211:
  xor    %edx,%edx
  mov    %ecx,%eax
  jmp    L276
  nopl   0x0(%rax)
L114:
  mov    0x0(%r13),%r9
  movslq %r15d,%rdx
  sub    $0x1,%eax
  add    $0x1,%r15d
  add    $0x4,%rsi
  mov    %r8d,(%r9,%rdx,4)
  mov    0x8(%r13),%r9
  mov    %eax,(%r9,%rdx,4)
  cmp    %ecx,%r12d
  jne    L211
L232:
  test   %r15d,%r15d
  je     L17
  mov    0x18(%rsp),%esi
  movslq %r15d,%r9
  xor    %r8d,%r8d
  shl    $0x2,%r9
  lea    -0x1(%rsi),%eax
  mov    %rax,%r10
  lea    0x4(%rbx,%rax,4),%rdi
  nopl   0x0(%rax)
L10:
  test   %esi,%esi
  jle    L70
  mov    0x0(%r13),%r11
  mov    %rbx,%rax
  add    %r8,%r11
  mov    (%r11),%ecx
  jmp    L242
  nopl   0x0(%rax,%rax,1)
L218:
  add    $0x4,%rax
  cmp    %rax,%rdi
  je     L152
L242:
  mov    (%rax),%edx
  cmp    %ecx,%edx
  jl     L218
  mov    %edx,(%r11)
L152:
  mov    0x8(%r13),%r11
  movslq %r10d,%rax
  add    %r8,%r11
  mov    (%r11),%ecx
  jmp    L64
  nopl   0x0(%rax)
L38:
  sub    $0x1,%rax
  test   %eax,%eax
  js     L279
L64:
  mov    (%rbx,%rax,4),%edx
  cmp    %ecx,%edx
  jg     L38
  mov    %edx,(%r11)
L279:
  add    $0x4,%r8
  cmp    %r8,%r9
  jne    L10
L17:
  mov    %r14,%rdi
  call   <free@plt>
  mov    0x8(%rsp),%rdi
  call   <free@plt>
  add    $0x38,%rsp
  mov    %r15d,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L70:
  test   %r10d,%r10d
  js     L279
  jmp    L152
```

assistant: ```c
int get_blocks(int **block_coordinates, int genome_size, int *snp_site_coords, int number_of_branch_snps, int window_size, int cutoff, char *original_sequence, int *snp_locations, int number_of_snps) {
  int *window_count;
  window_count = (int *)calloc((genome_size + 1), sizeof(int));
  int *gaps_in_original_genome_space;
  gaps_in_original_genome_space = (int *)calloc((genome_size + 1), sizeof(int));
  int x = 0;
  for (x = 0; x < number_of_snps; x++) {
    if (original_sequence[x] == 'N' || original_sequence[x] == '-') {
      gaps_in_original_genome_space[snp_locations[x] - 1] = 1;
    }
  }
  int snp_counter = 0;
  for (snp_counter = 0; snp_counter < number_of_branch_snps; snp_counter++) {
    int j = 0;
    int snp_sliding_window_counter = snp_site_coords[snp_counter] - (window_size / 2);
    snp_sliding_window_counter = extend_lower_part_of_window(snp_site_coords[snp_counter] - 1, snp_sliding_window_counter, genome_size, gaps_in_original_genome_space);
    if (snp_sliding_window_counter < 0) {
      snp_sliding_window_counter = 0;
    }
    int max_snp_sliding_window_counter = snp_site_coords[snp_counter] + (window_size / 2);
    max_snp_sliding_window_counter = extend_upper_part_of_window(snp_site_coords[snp_counter] + 1, max_snp_sliding_window_counter, genome_size, gaps_in_original_genome_space);
    if (max_snp_sliding_window_counter > genome_size) {
      max_snp_sliding_window_counter = genome_size;
    }
    for (j = snp_sliding_window_counter; j < max_snp_sliding_window_counter; j++) {
      window_count[j] += 1;
    }
  }
  int number_of_blocks = 0;
  int in_block = 0;
  int block_lower_bound = 0;
  int i;
  for (i = 0; i < genome_size; i++) {
    if (window_count[i] > cutoff && in_block == 0) {
      block_lower_bound = i;
      in_block = 1;
    }
    if ((window_count[i] <= cutoff || i + 1 == genome_size) && in_block == 1) {
      block_coordinates[0][number_of_blocks] = block_lower_bound;
      block_coordinates[1][number_of_blocks] = i - 1;
      number_of_blocks++;
      in_block = 0;
    }
  }
  for (i = 0; i < number_of_blocks; i++) {
    for (snp_counter = 0; snp_counter < number_of_branch_snps; snp_counter++) {
      if (snp_site_coords[snp_counter] >= block_coordinates[0][i]) {
        block_coordinates[0][i] = snp_site_coords[snp_counter];
        break;
      }
    }
    for (snp_counter = number_of_branch_snps - 1; snp_counter >= 0; snp_counter--) {
      if (snp_site_coords[snp_counter] <= block_coordinates[1][i]) {
        block_coordinates[1][i] = snp_site_coords[snp_counter];
        break;
      }
    }
  }
  free(gaps_in_original_genome_space);
  free(window_count);
  return number_of_blocks;
}
```