#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
scalar_t__ calculate_block_size_without_gaps(char *, int *, int, int, int);
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;
}


x86 assembly (clang, -O0):
<calculate_number_of_bases_in_recombations_excluding_gaps>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8d,-0x24(%rbp)
movl   $0x0,-0x28(%rbp)
movl   $0x1,-0x2c(%rbp)
movl   $0x0,-0x30(%rbp)
movl   $0x0,-0x30(%rbp)
mov    -0x30(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1307 <calculate_number_of_bases_in_recombations_excluding_gaps+0x1f7>
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
movslq -0x30(%rbp),%rcx
cmpl   $0xffffffff,(%rax,%rcx,4)
je     117e <calculate_number_of_bases_in_recombations_excluding_gaps+0x6e>
mov    -0x8(%rbp),%rax
mov    0x8(%rax),%rax
movslq -0x30(%rbp),%rcx
cmpl   $0xffffffff,(%rax,%rcx,4)
jne    1183 <calculate_number_of_bases_in_recombations_excluding_gaps+0x73>
jmp    12f9 <calculate_number_of_bases_in_recombations_excluding_gaps+0x1e9>
movl   $0x0,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    12f4 <calculate_number_of_bases_in_recombations_excluding_gaps+0x1e4>
mov    -0x2c(%rbp),%eax
cmp    -0x30(%rbp),%eax
jne    11a7 <calculate_number_of_bases_in_recombations_excluding_gaps+0x97>
jmp    12e6 <calculate_number_of_bases_in_recombations_excluding_gaps+0x1d6>
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
movslq -0x2c(%rbp),%rcx
cmpl   $0xffffffff,(%rax,%rcx,4)
je     11d2 <calculate_number_of_bases_in_recombations_excluding_gaps+0xc2>
mov    -0x8(%rbp),%rax
mov    0x8(%rax),%rax
movslq -0x2c(%rbp),%rcx
cmpl   $0xffffffff,(%rax,%rcx,4)
jne    11d7 <calculate_number_of_bases_in_recombations_excluding_gaps+0xc7>
jmp    12e6 <calculate_number_of_bases_in_recombations_excluding_gaps+0x1d6>
movl   $0x0,-0x34(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
movslq -0x30(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    -0x8(%rbp),%rcx
mov    (%rcx),%rcx
movslq -0x2c(%rbp),%rdx
cmp    (%rcx,%rdx,4),%eax
jl     1246 <calculate_number_of_bases_in_recombations_excluding_gaps+0x136>
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
movslq -0x30(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    -0x8(%rbp),%rcx
mov    0x8(%rcx),%rcx
movslq -0x2c(%rbp),%rdx
cmp    (%rcx,%rdx,4),%eax
jg     1246 <calculate_number_of_bases_in_recombations_excluding_gaps+0x136>
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
movslq -0x2c(%rbp),%rcx
mov    (%rax,%rcx,4),%edx
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
movslq -0x30(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
movl   $0x1,-0x34(%rbp)
mov    -0x8(%rbp),%rax
mov    0x8(%rax),%rax
movslq -0x30(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    -0x8(%rbp),%rcx
mov    (%rcx),%rcx
movslq -0x2c(%rbp),%rdx
cmp    (%rcx,%rdx,4),%eax
jl     12b2 <calculate_number_of_bases_in_recombations_excluding_gaps+0x1a2>
mov    -0x8(%rbp),%rax
mov    0x8(%rax),%rax
movslq -0x30(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    -0x8(%rbp),%rcx
mov    0x8(%rcx),%rcx
movslq -0x2c(%rbp),%rdx
cmp    (%rcx,%rdx,4),%eax
jg     12b2 <calculate_number_of_bases_in_recombations_excluding_gaps+0x1a2>
mov    -0x8(%rbp),%rax
mov    0x8(%rax),%rax
movslq -0x2c(%rbp),%rcx
mov    (%rax,%rcx,4),%edx
mov    -0x8(%rbp),%rax
mov    0x8(%rax),%rax
movslq -0x30(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
movl   $0x1,-0x34(%rbp)
cmpl   $0x1,-0x34(%rbp)
jne    12e1 <calculate_number_of_bases_in_recombations_excluding_gaps+0x1d1>
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
movslq -0x2c(%rbp),%rcx
movl   $0xffffffff,(%rax,%rcx,4)
mov    -0x8(%rbp),%rax
mov    0x8(%rax),%rax
movslq -0x2c(%rbp),%rcx
movl   $0xffffffff,(%rax,%rcx,4)
jmp    12e6 <calculate_number_of_bases_in_recombations_excluding_gaps+0x1d6>
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    118a <calculate_number_of_bases_in_recombations_excluding_gaps+0x7a>
jmp    12f9 <calculate_number_of_bases_in_recombations_excluding_gaps+0x1e9>
mov    -0x30(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x30(%rbp)
jmp    1147 <calculate_number_of_bases_in_recombations_excluding_gaps+0x37>
movl   $0x0,-0x30(%rbp)
mov    -0x30(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1393 <calculate_number_of_bases_in_recombations_excluding_gaps+0x283>
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
movslq -0x30(%rbp),%rcx
cmpl   $0xffffffff,(%rax,%rcx,4)
je     1345 <calculate_number_of_bases_in_recombations_excluding_gaps+0x235>
mov    -0x8(%rbp),%rax
mov    0x8(%rax),%rax
movslq -0x30(%rbp),%rcx
cmpl   $0xffffffff,(%rax,%rcx,4)
jne    134a <calculate_number_of_bases_in_recombations_excluding_gaps+0x23a>
jmp    1385 <calculate_number_of_bases_in_recombations_excluding_gaps+0x275>
mov    -0x18(%rbp),%rdi
mov    -0x20(%rbp),%rsi
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
movslq -0x30(%rbp),%rcx
mov    (%rax,%rcx,4),%edx
mov    -0x8(%rbp),%rax
mov    0x8(%rax),%rax
movslq -0x30(%rbp),%rcx
mov    (%rax,%rcx,4),%ecx
mov    -0x24(%rbp),%r8d
call   1030 <calculate_block_size_without_gaps@plt>
mov    %rax,%rcx
movslq -0x28(%rbp),%rax
add    %rcx,%rax
mov    %eax,-0x28(%rbp)
mov    -0x30(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x30(%rbp)
jmp    130e <calculate_number_of_bases_in_recombations_excluding_gaps+0x1fe>
mov    -0x28(%rbp),%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<calculate_number_of_bases_in_recombations_excluding_gaps>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
mov    %rcx,0x10(%rsp)
mov    %rdx,0x8(%rsp)
test   %esi,%esi
jle    1219 <calculate_number_of_bases_in_recombations_excluding_gaps+0x109>
mov    %rdi,%r15
mov    %r8d,%r10d
mov    (%rdi),%r9
mov    %esi,%r12d
xor    %ecx,%ecx
jmp    114d <calculate_number_of_bases_in_recombations_excluding_gaps+0x3d>
add    $0x1,%rcx
cmp    %r12,%rcx
je     11d0 <calculate_number_of_bases_in_recombations_excluding_gaps+0xc0>
cmpl   $0xffffffff,(%r9,%rcx,4)
je     1140 <calculate_number_of_bases_in_recombations_excluding_gaps+0x30>
mov    0x8(%r15),%r8
cmpl   $0xffffffff,(%r8,%rcx,4)
je     1140 <calculate_number_of_bases_in_recombations_excluding_gaps+0x30>
xor    %edi,%edi
jmp    1189 <calculate_number_of_bases_in_recombations_excluding_gaps+0x79>
mov    %ebx,(%r8,%rcx,4)
movl   $0xffffffff,(%r9,%rdi,4)
ff
movl   $0xffffffff,(%r8,%rdi,4)
ff
nopw   0x0(%rax,%rax,1)
add    $0x1,%rdi
cmp    %rdi,%r12
je     1140 <calculate_number_of_bases_in_recombations_excluding_gaps+0x30>
cmp    %rdi,%rcx
je     1180 <calculate_number_of_bases_in_recombations_excluding_gaps+0x70>
mov    (%r9,%rdi,4),%ebx
cmp    $0xffffffff,%ebx
je     1180 <calculate_number_of_bases_in_recombations_excluding_gaps+0x70>
mov    (%r8,%rdi,4),%edx
cmp    $0xffffffff,%edx
je     1180 <calculate_number_of_bases_in_recombations_excluding_gaps+0x70>
mov    (%r9,%rcx,4),%ebp
cmp    %ebx,%ebp
setl   %al
cmp    %edx,%ebp
setg   %dl
or     %al,%dl
jne    11ba <calculate_number_of_bases_in_recombations_excluding_gaps+0xaa>
mov    %ebx,(%r9,%rcx,4)
mov    (%r9,%rdi,4),%ebx
mov    (%r8,%rcx,4),%ebp
cmp    %ebx,%ebp
jl     11ca <calculate_number_of_bases_in_recombations_excluding_gaps+0xba>
mov    (%r8,%rdi,4),%ebx
cmp    %ebx,%ebp
jle    1163 <calculate_number_of_bases_in_recombations_excluding_gaps+0x53>
test   %dl,%dl
je     1167 <calculate_number_of_bases_in_recombations_excluding_gaps+0x57>
jmp    1180 <calculate_number_of_bases_in_recombations_excluding_gaps+0x70>
test   %esi,%esi
jle    1219 <calculate_number_of_bases_in_recombations_excluding_gaps+0x109>
xor    %r14d,%r14d
xor    %r13d,%r13d
mov    %r10d,%ebx
jmp    11e9 <calculate_number_of_bases_in_recombations_excluding_gaps+0xd9>
nop
add    $0x1,%r14
cmp    %r14,%r12
je     121c <calculate_number_of_bases_in_recombations_excluding_gaps+0x10c>
mov    (%r15),%rax
mov    (%rax,%r14,4),%edx
cmp    $0xffffffff,%edx
je     11e0 <calculate_number_of_bases_in_recombations_excluding_gaps+0xd0>
mov    0x8(%r15),%rax
mov    (%rax,%r14,4),%ecx
cmp    $0xffffffff,%ecx
je     11e0 <calculate_number_of_bases_in_recombations_excluding_gaps+0xd0>
mov    0x8(%rsp),%rdi
mov    0x10(%rsp),%rsi
mov    %ebx,%r8d
call   1030 <calculate_block_size_without_gaps@plt>
add    %eax,%r13d
jmp    11e0 <calculate_number_of_bases_in_recombations_excluding_gaps+0xd0>
xor    %r13d,%r13d
mov    %r13d,%eax
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define i32 @calculate_number_of_bases_in_recombations_excluding_gaps(i32** %0, i32 %1, i8* %2, i32* %3, i32 %4) {
%6 = alloca i32**
%7 = alloca i32
%8 = alloca i8*
%9 = alloca i32*
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
store i32** %0, i32*** %6
store i32 %1, i32* %7
store i8* %2, i8** %8
store i32* %3, i32** %9
store i32 %4, i32* %10
store i32 0, i32* %11
store i32 1, i32* %12
store i32 0, i32* %13
store i32 0, i32* %13
br label %15
15: ; preds = %180, %5
%16 = load i32, i32* %13
%17 = load i32, i32* %7
%18 = icmp slt i32 %16, %17
br i1 %18, label %19, label %183
19: ; preds = %15
%20 = load i32**, i32*** %6
%21 = getelementptr inbounds i32*, i32** %20, i64 0
%22 = load i32*, i32** %21
%23 = load i32, i32* %13
%24 = sext i32 %23 to i64
%25 = getelementptr inbounds i32, i32* %22, i64 %24
%26 = load i32, i32* %25
%27 = icmp eq i32 %26, -1
br i1 %27, label %37, label %28
28: ; preds = %19
%29 = load i32**, i32*** %6
%30 = getelementptr inbounds i32*, i32** %29, i64 1
%31 = load i32*, i32** %30
%32 = load i32, i32* %13
%33 = sext i32 %32 to i64
%34 = getelementptr inbounds i32, i32* %31, i64 %33
%35 = load i32, i32* %34
%36 = icmp eq i32 %35, -1
br i1 %36, label %37, label %38
37: ; preds = %28, %19
br label %180
38: ; preds = %28
store i32 0, i32* %12
br label %39
39: ; preds = %176, %38
%40 = load i32, i32* %12
%41 = load i32, i32* %7
%42 = icmp slt i32 %40, %41
br i1 %42, label %43, label %179
43: ; preds = %39
%44 = load i32, i32* %12
%45 = load i32, i32* %13
%46 = icmp eq i32 %44, %45
br i1 %46, label %47, label %48
47: ; preds = %43
br label %176
48: ; preds = %43
%49 = load i32**, i32*** %6
%50 = getelementptr inbounds i32*, i32** %49, i64 0
%51 = load i32*, i32** %50
%52 = load i32, i32* %12
%53 = sext i32 %52 to i64
%54 = getelementptr inbounds i32, i32* %51, i64 %53
%55 = load i32, i32* %54
%56 = icmp eq i32 %55, -1
br i1 %56, label %66, label %57
57: ; preds = %48
%58 = load i32**, i32*** %6
%59 = getelementptr inbounds i32*, i32** %58, i64 1
%60 = load i32*, i32** %59
%61 = load i32, i32* %12
%62 = sext i32 %61 to i64
%63 = getelementptr inbounds i32, i32* %60, i64 %62
%64 = load i32, i32* %63
%65 = icmp eq i32 %64, -1
br i1 %65, label %66, label %67
66: ; preds = %57, %48
br label %176
67: ; preds = %57
store i32 0, i32* %14
%68 = load i32**, i32*** %6
%69 = getelementptr inbounds i32*, i32** %68, i64 0
%70 = load i32*, i32** %69
%71 = load i32, i32* %13
%72 = sext i32 %71 to i64
%73 = getelementptr inbounds i32, i32* %70, i64 %72
%74 = load i32, i32* %73
%75 = load i32**, i32*** %6
%76 = getelementptr inbounds i32*, i32** %75, i64 0
%77 = load i32*, i32** %76
%78 = load i32, i32* %12
%79 = sext i32 %78 to i64
%80 = getelementptr inbounds i32, i32* %77, i64 %79
%81 = load i32, i32* %80
%82 = icmp sge i32 %74, %81
br i1 %82, label %83, label %113
83: ; preds = %67
%84 = load i32**, i32*** %6
%85 = getelementptr inbounds i32*, i32** %84, i64 0
%86 = load i32*, i32** %85
%87 = load i32, i32* %13
%88 = sext i32 %87 to i64
%89 = getelementptr inbounds i32, i32* %86, i64 %88
%90 = load i32, i32* %89
%91 = load i32**, i32*** %6
%92 = getelementptr inbounds i32*, i32** %91, i64 1
%93 = load i32*, i32** %92
%94 = load i32, i32* %12
%95 = sext i32 %94 to i64
%96 = getelementptr inbounds i32, i32* %93, i64 %95
%97 = load i32, i32* %96
%98 = icmp sle i32 %90, %97
br i1 %98, label %99, label %113
99: ; preds = %83
%100 = load i32**, i32*** %6
%101 = getelementptr inbounds i32*, i32** %100, i64 0
%102 = load i32*, i32** %101
%103 = load i32, i32* %12
%104 = sext i32 %103 to i64
%105 = getelementptr inbounds i32, i32* %102, i64 %104
%106 = load i32, i32* %105
%107 = load i32**, i32*** %6
%108 = getelementptr inbounds i32*, i32** %107, i64 0
%109 = load i32*, i32** %108
%110 = load i32, i32* %13
%111 = sext i32 %110 to i64
%112 = getelementptr inbounds i32, i32* %109, i64 %111
store i32 %106, i32* %112
store i32 1, i32* %14
br label %113
113: ; preds = %99, %83, %67
%114 = load i32**, i32*** %6
%115 = getelementptr inbounds i32*, i32** %114, i64 1
%116 = load i32*, i32** %115
%117 = load i32, i32* %13
%118 = sext i32 %117 to i64
%119 = getelementptr inbounds i32, i32* %116, i64 %118
%120 = load i32, i32* %119
%121 = load i32**, i32*** %6
%122 = getelementptr inbounds i32*, i32** %121, i64 0
%123 = load i32*, i32** %122
%124 = load i32, i32* %12
%125 = sext i32 %124 to i64
%126 = getelementptr inbounds i32, i32* %123, i64 %125
%127 = load i32, i32* %126
%128 = icmp sge i32 %120, %127
br i1 %128, label %129, label %159
129: ; preds = %113
%130 = load i32**, i32*** %6
%131 = getelementptr inbounds i32*, i32** %130, i64 1
%132 = load i32*, i32** %131
%133 = load i32, i32* %13
%134 = sext i32 %133 to i64
%135 = getelementptr inbounds i32, i32* %132, i64 %134
%136 = load i32, i32* %135
%137 = load i32**, i32*** %6
%138 = getelementptr inbounds i32*, i32** %137, i64 1
%139 = load i32*, i32** %138
%140 = load i32, i32* %12
%141 = sext i32 %140 to i64
%142 = getelementptr inbounds i32, i32* %139, i64 %141
%143 = load i32, i32* %142
%144 = icmp sle i32 %136, %143
br i1 %144, label %145, label %159
145: ; preds = %129
%146 = load i32**, i32*** %6
%147 = getelementptr inbounds i32*, i32** %146, i64 1
%148 = load i32*, i32** %147
%149 = load i32, i32* %12
%150 = sext i32 %149 to i64
%151 = getelementptr inbounds i32, i32* %148, i64 %150
%152 = load i32, i32* %151
%153 = load i32**, i32*** %6
%154 = getelementptr inbounds i32*, i32** %153, i64 1
%155 = load i32*, i32** %154
%156 = load i32, i32* %13
%157 = sext i32 %156 to i64
%158 = getelementptr inbounds i32, i32* %155, i64 %157
store i32 %152, i32* %158
store i32 1, i32* %14
br label %159
159: ; preds = %145, %129, %113
%160 = load i32, i32* %14
%161 = icmp eq i32 %160, 1
br i1 %161, label %162, label %175
162: ; preds = %159
%163 = load i32**, i32*** %6
%164 = getelementptr inbounds i32*, i32** %163, i64 0
%165 = load i32*, i32** %164
%166 = load i32, i32* %12
%167 = sext i32 %166 to i64
%168 = getelementptr inbounds i32, i32* %165, i64 %167
store i32 -1, i32* %168
%169 = load i32**, i32*** %6
%170 = getelementptr inbounds i32*, i32** %169, i64 1
%171 = load i32*, i32** %170
%172 = load i32, i32* %12
%173 = sext i32 %172 to i64
%174 = getelementptr inbounds i32, i32* %171, i64 %173
store i32 -1, i32* %174
br label %175
175: ; preds = %162, %159
br label %176
176: ; preds = %175, %66, %47
%177 = load i32, i32* %12
%178 = add nsw i32 %177, 1
store i32 %178, i32* %12
br label %39
179: ; preds = %39
br label %180
180: ; preds = %179, %37
%181 = load i32, i32* %13
%182 = add nsw i32 %181, 1
store i32 %182, i32* %13
br label %15
183: ; preds = %15
store i32 0, i32* %13
br label %184
184: ; preds = %230, %183
%185 = load i32, i32* %13
%186 = load i32, i32* %7
%187 = icmp slt i32 %185, %186
br i1 %187, label %188, label %233
188: ; preds = %184
%189 = load i32**, i32*** %6
%190 = getelementptr inbounds i32*, i32** %189, i64 0
%191 = load i32*, i32** %190
%192 = load i32, i32* %13
%193 = sext i32 %192 to i64
%194 = getelementptr inbounds i32, i32* %191, i64 %193
%195 = load i32, i32* %194
%196 = icmp eq i32 %195, -1
br i1 %196, label %206, label %197
197: ; preds = %188
%198 = load i32**, i32*** %6
%199 = getelementptr inbounds i32*, i32** %198, i64 1
%200 = load i32*, i32** %199
%201 = load i32, i32* %13
%202 = sext i32 %201 to i64
%203 = getelementptr inbounds i32, i32* %200, i64 %202
%204 = load i32, i32* %203
%205 = icmp eq i32 %204, -1
br i1 %205, label %206, label %207
206: ; preds = %197, %188
br label %230
207: ; preds = %197
%208 = load i8*, i8** %8
%209 = load i32*, i32** %9
%210 = load i32**, i32*** %6
%211 = getelementptr inbounds i32*, i32** %210, i64 0
%212 = load i32*, i32** %211
%213 = load i32, i32* %13
%214 = sext i32 %213 to i64
%215 = getelementptr inbounds i32, i32* %212, i64 %214
%216 = load i32, i32* %215
%217 = load i32**, i32*** %6
%218 = getelementptr inbounds i32*, i32** %217, i64 1
%219 = load i32*, i32** %218
%220 = load i32, i32* %13
%221 = sext i32 %220 to i64
%222 = getelementptr inbounds i32, i32* %219, i64 %221
%223 = load i32, i32* %222
%224 = load i32, i32* %10
%225 = call i64 @calculate_block_size_without_gaps(i8* %208, i32* %209, i32 %216, i32 %223, i32 %224)
%226 = load i32, i32* %11
%227 = sext i32 %226 to i64
%228 = add nsw i64 %227, %225
%229 = trunc i64 %228 to i32
store i32 %229, i32* %11
br label %230
230: ; preds = %207, %206
%231 = load i32, i32* %13
%232 = add nsw i32 %231, 1
store i32 %232, i32* %13
br label %184
233: ; preds = %184
%234 = load i32, i32* %11
ret i32 %234
}

LLVM IR (-O2):
define i32 @calculate_number_of_bases_in_recombations_excluding_gaps(i32** nocapture %0, i32 %1, i8* %2, i32* %3, i32 %4) {
%6 = icmp sgt i32 %1, 0
br i1 %6, label %7, label %79
7: ; preds = %5
%8 = load i32*, i32** %0
%9 = getelementptr inbounds i32*, i32** %0, i64 1
%10 = zext i32 %1 to i64
br label %15
11: ; preds = %56
br i1 %6, label %12, label %79
12: ; preds = %11
%13 = getelementptr inbounds i32*, i32** %0, i64 1
%14 = zext i32 %1 to i64
br label %59
15: ; preds = %7, %56
%16 = phi i64 [ 0, %7 ], [ %57, %56 ]
%17 = getelementptr inbounds i32, i32* %8, i64 %16
%18 = load i32, i32* %17
%19 = icmp eq i32 %18, -1
br i1 %19, label %56, label %20
20: ; preds = %15
%21 = load i32*, i32** %9
%22 = getelementptr inbounds i32, i32* %21, i64 %16
%23 = load i32, i32* %22
%24 = icmp eq i32 %23, -1
br i1 %24, label %56, label %25
25: ; preds = %20, %53
%26 = phi i64 [ %54, %53 ], [ 0, %20 ]
%27 = icmp eq i64 %26, %16
br i1 %27, label %53, label %28
28: ; preds = %25
%29 = getelementptr inbounds i32, i32* %8, i64 %26
%30 = load i32, i32* %29
%31 = icmp eq i32 %30, -1
br i1 %31, label %53, label %32
32: ; preds = %28
%33 = getelementptr inbounds i32, i32* %21, i64 %26
%34 = load i32, i32* %33
%35 = icmp eq i32 %34, -1
br i1 %35, label %53, label %36
36: ; preds = %32
%37 = load i32, i32* %17
%38 = icmp slt i32 %37, %30
%39 = icmp sgt i32 %37, %34
%40 = select i1 %38, i1 true, i1 %39
br i1 %40, label %43, label %41
41: ; preds = %36
store i32 %30, i32* %17
%42 = load i32, i32* %29
br label %43
43: ; preds = %41, %36
%44 = phi i32 [ %42, %41 ], [ %30, %36 ]
%45 = load i32, i32* %22
%46 = icmp slt i32 %45, %44
br i1 %46, label %51, label %47
47: ; preds = %43
%48 = load i32, i32* %33
%49 = icmp sgt i32 %45, %48
br i1 %49, label %51, label %50
50: ; preds = %47
store i32 %48, i32* %22
br label %52
51: ; preds = %47, %43
br i1 %40, label %53, label %52
52: ; preds = %50, %51
store i32 -1, i32* %29
store i32 -1, i32* %33
br label %53
53: ; preds = %51, %52, %28, %32, %25
%54 = add nuw nsw i64 %26, 1
%55 = icmp eq i64 %54, %10
br i1 %55, label %56, label %25
56: ; preds = %53, %20, %15
%57 = add nuw nsw i64 %16, 1
%58 = icmp eq i64 %57, %10
br i1 %58, label %11, label %15
59: ; preds = %12, %75
%60 = phi i64 [ 0, %12 ], [ %77, %75 ]
%61 = phi i32 [ 0, %12 ], [ %76, %75 ]
%62 = load i32*, i32** %0
%63 = getelementptr inbounds i32, i32* %62, i64 %60
%64 = load i32, i32* %63
%65 = icmp eq i32 %64, -1
br i1 %65, label %75, label %66
66: ; preds = %59
%67 = load i32*, i32** %13
%68 = getelementptr inbounds i32, i32* %67, i64 %60
%69 = load i32, i32* %68
%70 = icmp eq i32 %69, -1
br i1 %70, label %75, label %71
71: ; preds = %66
%72 = tail call i64 @calculate_block_size_without_gaps(i8* %2, i32* %3, i32 %64, i32 %69, i32 %4)
%73 = trunc i64 %72 to i32
%74 = add i32 %61, %73
br label %75
75: ; preds = %59, %66, %71
%76 = phi i32 [ %61, %59 ], [ %61, %66 ], [ %74, %71 ]
%77 = add nuw nsw i64 %60, 1
%78 = icmp eq i64 %77, %14
br i1 %78, label %79, label %59
79: ; preds = %75, %5, %11
%80 = phi i32 [ 0, %11 ], [ 0, %5 ], [ %76, %75 ]
ret i32 %80
}