user: Translate the below assembly code into C programming language:

```asm
<calculate_number_of_bases_in_recombations_excluding_gaps>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x30,%rsp
  mov    %rdi,-0x18(%rbp)
  mov    %esi,-0x1c(%rbp)
  mov    %rdx,-0x28(%rbp)
  mov    %rcx,-0x30(%rbp)
  mov    %r8d,-0x20(%rbp)
  movl   $0x0,-0x10(%rbp)
  movl   $0x1,-0xc(%rbp)
  movl   $0x0,-0x8(%rbp)
  movl   $0x0,-0x8(%rbp)
  jmp    L62
L151:
  mov    -0x18(%rbp),%rax
  mov    (%rax),%rdx
  mov    -0x8(%rbp),%eax
  cltq
  shl    $0x2,%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  cmp    $0xffffffff,%eax
  je     L92
  mov    -0x18(%rbp),%rax
  add    $0x8,%rax
  mov    (%rax),%rdx
  mov    -0x8(%rbp),%eax
  cltq
  shl    $0x2,%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  cmp    $0xffffffff,%eax
  je     L92
  movl   $0x0,-0xc(%rbp)
  jmp    L105
L171:
  mov    -0xc(%rbp),%eax
  cmp    -0x8(%rbp),%eax
  je     L48
  mov    -0x18(%rbp),%rax
  mov    (%rax),%rdx
  mov    -0xc(%rbp),%eax
  cltq
  shl    $0x2,%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  cmp    $0xffffffff,%eax
  je     L122
  mov    -0x18(%rbp),%rax
  add    $0x8,%rax
  mov    (%rax),%rdx
  mov    -0xc(%rbp),%eax
  cltq
  shl    $0x2,%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  cmp    $0xffffffff,%eax
  je     L122
  movl   $0x0,-0x4(%rbp)
  mov    -0x18(%rbp),%rax
  mov    (%rax),%rdx
  mov    -0x8(%rbp),%eax
  cltq
  shl    $0x2,%rax
  add    %rdx,%rax
  mov    (%rax),%edx
  mov    -0x18(%rbp),%rax
  mov    (%rax),%rcx
  mov    -0xc(%rbp),%eax
  cltq
  shl    $0x2,%rax
  add    %rcx,%rax
  mov    (%rax),%eax
  cmp    %eax,%edx
  jl     L22
  mov    -0x18(%rbp),%rax
  mov    (%rax),%rdx
  mov    -0x8(%rbp),%eax
  cltq
  shl    $0x2,%rax
  add    %rdx,%rax
  mov    (%rax),%edx
  mov    -0x18(%rbp),%rax
  add    $0x8,%rax
  mov    (%rax),%rcx
  mov    -0xc(%rbp),%eax
  cltq
  shl    $0x2,%rax
  add    %rcx,%rax
  mov    (%rax),%eax
  cmp    %eax,%edx
  jg     L22
  mov    -0x18(%rbp),%rax
  mov    (%rax),%rdx
  mov    -0xc(%rbp),%eax
  cltq
  shl    $0x2,%rax
  lea    (%rdx,%rax,1),%rcx
  mov    -0x18(%rbp),%rax
  mov    (%rax),%rdx
  mov    -0x8(%rbp),%eax
  cltq
  shl    $0x2,%rax
  add    %rax,%rdx
  mov    (%rcx),%eax
  mov    %eax,(%rdx)
  movl   $0x1,-0x4(%rbp)
L22:
  mov    -0x18(%rbp),%rax
  add    $0x8,%rax
  mov    (%rax),%rdx
  mov    -0x8(%rbp),%eax
  cltq
  shl    $0x2,%rax
  add    %rdx,%rax
  mov    (%rax),%edx
  mov    -0x18(%rbp),%rax
  mov    (%rax),%rcx
  mov    -0xc(%rbp),%eax
  cltq
  shl    $0x2,%rax
  add    %rcx,%rax
  mov    (%rax),%eax
  cmp    %eax,%edx
  jl     L117
  mov    -0x18(%rbp),%rax
  add    $0x8,%rax
  mov    (%rax),%rdx
  mov    -0x8(%rbp),%eax
  cltq
  shl    $0x2,%rax
  add    %rdx,%rax
  mov    (%rax),%edx
  mov    -0x18(%rbp),%rax
  add    $0x8,%rax
  mov    (%rax),%rcx
  mov    -0xc(%rbp),%eax
  cltq
  shl    $0x2,%rax
  add    %rcx,%rax
  mov    (%rax),%eax
  cmp    %eax,%edx
  jg     L117
  mov    -0x18(%rbp),%rax
  add    $0x8,%rax
  mov    (%rax),%rdx
  mov    -0xc(%rbp),%eax
  cltq
  shl    $0x2,%rax
  add    %rdx,%rax
  mov    -0x18(%rbp),%rdx
  add    $0x8,%rdx
  mov    (%rdx),%rcx
  mov    -0x8(%rbp),%edx
  movslq %edx,%rdx
  shl    $0x2,%rdx
  add    %rcx,%rdx
  mov    (%rax),%eax
  mov    %eax,(%rdx)
  movl   $0x1,-0x4(%rbp)
L117:
  cmpl   $0x1,-0x4(%rbp)
  jne    L147
  mov    -0x18(%rbp),%rax
  mov    (%rax),%rdx
  mov    -0xc(%rbp),%eax
  cltq
  shl    $0x2,%rax
  add    %rdx,%rax
  movl   $0xffffffff,(%rax)
  mov    -0x18(%rbp),%rax
  add    $0x8,%rax
  mov    (%rax),%rdx
  mov    -0xc(%rbp),%eax
  cltq
  shl    $0x2,%rax
  add    %rdx,%rax
  movl   $0xffffffff,(%rax)
  jmp    L147
L48:
  nop
  jmp    L147
L122:
  nop
L147:
  addl   $0x1,-0xc(%rbp)
L105:
  mov    -0xc(%rbp),%eax
  cmp    -0x1c(%rbp),%eax
  jl     L171
  jmp    L85
L92:
  nop
L85:
  addl   $0x1,-0x8(%rbp)
L62:
  mov    -0x8(%rbp),%eax
  cmp    -0x1c(%rbp),%eax
  jl     L151
  movl   $0x0,-0x8(%rbp)
  jmp    L148
L208:
  mov    -0x18(%rbp),%rax
  mov    (%rax),%rdx
  mov    -0x8(%rbp),%eax
  cltq
  shl    $0x2,%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  cmp    $0xffffffff,%eax
  je     L139
  mov    -0x18(%rbp),%rax
  add    $0x8,%rax
  mov    (%rax),%rdx
  mov    -0x8(%rbp),%eax
  cltq
  shl    $0x2,%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  cmp    $0xffffffff,%eax
  je     L139
  mov    -0x18(%rbp),%rax
  add    $0x8,%rax
  mov    (%rax),%rdx
  mov    -0x8(%rbp),%eax
  cltq
  shl    $0x2,%rax
  add    %rdx,%rax
  mov    (%rax),%ecx
  mov    -0x18(%rbp),%rax
  mov    (%rax),%rdx
  mov    -0x8(%rbp),%eax
  cltq
  shl    $0x2,%rax
  add    %rdx,%rax
  mov    (%rax),%edx
  mov    -0x20(%rbp),%edi
  mov    -0x30(%rbp),%rsi
  mov    -0x28(%rbp),%rax
  mov    %edi,%r8d
  mov    %rax,%rdi
  call   <calculate_block_size_without_gaps@plt>
  mov    %eax,%edx
  mov    -0x10(%rbp),%eax
  add    %edx,%eax
  mov    %eax,-0x10(%rbp)
  jmp    L155
L139:
  nop
L155:
  addl   $0x1,-0x8(%rbp)
L148:
  mov    -0x8(%rbp),%eax
  cmp    -0x1c(%rbp),%eax
  jl     L208
  mov    -0x10(%rbp),%eax
  leave
  ret
```

assistant: ```c
int calculate_number_of_bases_in_recombations_excluding_gaps(int **block_coordinates, int num_blocks, char *child_sequence, int *snp_locations, int length_of_original_genome) {
  int total_bases = 0;
  int current_block = 1;
  int start_block = 0;
  for (start_block = 0; start_block < num_blocks; start_block++) {
    if (block_coordinates[0][start_block] == -1 || block_coordinates[1][start_block] == -1) {
      continue;
    }
    for (current_block = 0; current_block < num_blocks; current_block++) {
      if (current_block == start_block) {
        continue;
      }
      if (block_coordinates[0][current_block] == -1 || block_coordinates[1][current_block] == -1) {
        continue;
      }
      int found_overlap = 0;
      if (block_coordinates[0][start_block] >= block_coordinates[0][current_block] && block_coordinates[0][start_block] <= block_coordinates[1][current_block]) {
        block_coordinates[0][start_block] = block_coordinates[0][current_block];
        found_overlap = 1;
      }
      if (block_coordinates[1][start_block] >= block_coordinates[0][current_block] && block_coordinates[1][start_block] <= block_coordinates[1][current_block]) {
        block_coordinates[1][start_block] = block_coordinates[1][current_block];
        found_overlap = 1;
      }
      if (found_overlap == 1) {
        block_coordinates[0][current_block] = -1;
        block_coordinates[1][current_block] = -1;
      }
    }
  }
  for (start_block = 0; start_block < num_blocks; start_block++) {
    if (block_coordinates[0][start_block] == -1 || block_coordinates[1][start_block] == -1) {
      continue;
    }
    total_bases += calculate_block_size_without_gaps(child_sequence, snp_locations, block_coordinates[0][start_block], block_coordinates[1][start_block], length_of_original_genome);
  }
  return total_bases;
}
```