#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 */
int /*<<< orphan*/ free(int *);
int /*<<< orphan*/ jerasure_bitmatrix_dotprod(int, int, int *, int *, int,
                                              char **, char **, int, int);
int *jerasure_erasures_to_erased(int, int, int *);
scalar_t__ jerasure_make_decoding_bitmatrix(int, int, int, int *, int *, int *,
                                            int *);
scalar_t__ malloc(int);
int jerasure_bitmatrix_decode(int k, int m, int w, int *bitmatrix,
                              int row_k_ones, int *erasures, char **data_ptrs,
                              char **coding_ptrs, int size, int packetsize) {
  int i, j;
  int *erased;
  int *decoding_matrix;
  int *dm_ids;
  int edd, *tmpids, lastdrive;
  erased = jerasure_erasures_to_erased(k, m, erasures);
  if (erased == NULL)
    return -1;
  lastdrive = k;
  edd = 0;
  for (i = 0; i < k; i++) {
    if (erased[i]) {
      edd++;
      lastdrive = i;
    }
  }
  if (row_k_ones != 1 || erased[k])
    lastdrive = k;
  dm_ids = NULL;
  decoding_matrix = NULL;
  if (edd > 1 || (edd > 0 && (row_k_ones != 1 || erased[k]))) {
    dm_ids = (int *)malloc(sizeof(int) * (k));
    if (dm_ids == NULL) {
      free(erased);
      return -1;
    }
    decoding_matrix = (int *)malloc(sizeof(int) * (k * k * w * w));
    if (decoding_matrix == NULL) {
      free(erased);
      free(dm_ids);
      return -1;
    }
    if (jerasure_make_decoding_bitmatrix(k, m, w, bitmatrix, erased,
                                         decoding_matrix, dm_ids) < 0) {
      free(erased);
      free(dm_ids);
      free(decoding_matrix);
      return -1;
    }
  }
  for (i = 0; edd > 0 && i < lastdrive; i++) {
    if (erased[i]) {
      jerasure_bitmatrix_dotprod(k, w, decoding_matrix + i * k * w * w, dm_ids,
                                 i, data_ptrs, coding_ptrs, size, packetsize);
      edd--;
    }
  }
  if (edd > 0) {
    tmpids = (int *)malloc(sizeof(int) * (k));
    for (i = 0; i < k; i++) {
      tmpids[i] = (i < lastdrive) ? i : i + 1;
    }
    jerasure_bitmatrix_dotprod(k, w, bitmatrix, tmpids, lastdrive, data_ptrs,
                               coding_ptrs, size, packetsize);
    free(tmpids);
  }
  for (i = 0; i < m; i++) {
    if (erased[k + i]) {
      jerasure_bitmatrix_dotprod(k, w, bitmatrix + i * k * w * w, NULL, k + i,
                                 data_ptrs, coding_ptrs, size, packetsize);
    }
  }
  free(erased);
  if (dm_ids != NULL)
    free(dm_ids);
  if (decoding_matrix != NULL)
    free(decoding_matrix);
  return 0;
}


x86 assembly (clang, -O0):
<jerasure_bitmatrix_decode>:
push   %rbp
mov    %rsp,%rbp
sub    $0x80,%rsp
mov    0x28(%rbp),%eax
mov    0x20(%rbp),%eax
mov    0x18(%rbp),%rax
mov    0x10(%rbp),%rax
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %rcx,-0x18(%rbp)
mov    %r8d,-0x1c(%rbp)
mov    %r9,-0x28(%rbp)
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
mov    -0x28(%rbp),%rdx
call   1050 <jerasure_erasures_to_erased@plt>
mov    %rax,-0x38(%rbp)
cmpq   $0x0,-0x38(%rbp)
jne    11a8 <jerasure_bitmatrix_decode+0x58>
movl   $0xffffffff,-0x4(%rbp)
jmp    1547 <jerasure_bitmatrix_decode+0x3f7>
mov    -0x8(%rbp),%eax
mov    %eax,-0x5c(%rbp)
movl   $0x0,-0x4c(%rbp)
movl   $0x0,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    11fc <jerasure_bitmatrix_decode+0xac>
mov    -0x38(%rbp),%rax
movslq -0x2c(%rbp),%rcx
cmpl   $0x0,(%rax,%rcx,4)
je     11e9 <jerasure_bitmatrix_decode+0x99>
mov    -0x4c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4c(%rbp)
mov    -0x2c(%rbp),%eax
mov    %eax,-0x5c(%rbp)
jmp    11ee <jerasure_bitmatrix_decode+0x9e>
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    11bc <jerasure_bitmatrix_decode+0x6c>
cmpl   $0x1,-0x1c(%rbp)
jne    1218 <jerasure_bitmatrix_decode+0xc8>
mov    -0x38(%rbp),%rax
movslq -0x8(%rbp),%rcx
cmpl   $0x0,(%rax,%rcx,4)
je     121e <jerasure_bitmatrix_decode+0xce>
mov    -0x8(%rbp),%eax
mov    %eax,-0x5c(%rbp)
movq   $0x0,-0x48(%rbp)
movq   $0x0,-0x40(%rbp)
cmpl   $0x1,-0x4c(%rbp)
jg     125e <jerasure_bitmatrix_decode+0x10e>
cmpl   $0x0,-0x4c(%rbp)
jle    1332 <jerasure_bitmatrix_decode+0x1e2>
cmpl   $0x1,-0x1c(%rbp)
jne    125e <jerasure_bitmatrix_decode+0x10e>
mov    -0x38(%rbp),%rax
movslq -0x8(%rbp),%rcx
cmpl   $0x0,(%rax,%rcx,4)
je     1332 <jerasure_bitmatrix_decode+0x1e2>
movslq -0x8(%rbp),%rax
shl    $0x2,%rax
mov    %eax,%edi
call   1060 <malloc@plt>
mov    %rax,-0x48(%rbp)
cmpq   $0x0,-0x48(%rbp)
jne    1291 <jerasure_bitmatrix_decode+0x141>
mov    -0x38(%rbp),%rdi
call   1030 <free@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    1547 <jerasure_bitmatrix_decode+0x3f7>
mov    -0x8(%rbp),%eax
imul   -0x8(%rbp),%eax
imul   -0x10(%rbp),%eax
imul   -0x10(%rbp),%eax
cltq
shl    $0x2,%rax
mov    %eax,%edi
call   1060 <malloc@plt>
mov    %rax,-0x40(%rbp)
cmpq   $0x0,-0x40(%rbp)
jne    12da <jerasure_bitmatrix_decode+0x18a>
mov    -0x38(%rbp),%rdi
call   1030 <free@plt>
mov    -0x48(%rbp),%rdi
call   1030 <free@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    1547 <jerasure_bitmatrix_decode+0x3f7>
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
mov    -0x18(%rbp),%rcx
mov    -0x38(%rbp),%r8
mov    -0x40(%rbp),%r9
mov    -0x48(%rbp),%rax
mov    %rax,(%rsp)
call   1040 <jerasure_make_decoding_bitmatrix@plt>
cmp    $0x0,%rax
jge    132d <jerasure_bitmatrix_decode+0x1dd>
mov    -0x38(%rbp),%rdi
call   1030 <free@plt>
mov    -0x48(%rbp),%rdi
call   1030 <free@plt>
mov    -0x40(%rbp),%rdi
call   1030 <free@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    1547 <jerasure_bitmatrix_decode+0x3f7>
jmp    1332 <jerasure_bitmatrix_decode+0x1e2>
movl   $0x0,-0x2c(%rbp)
xor    %eax,%eax
cmpl   $0x0,-0x4c(%rbp)
mov    %al,-0x5d(%rbp)
jle    1354 <jerasure_bitmatrix_decode+0x204>
mov    -0x2c(%rbp),%eax
cmp    -0x5c(%rbp),%eax
setl   %al
mov    %al,-0x5d(%rbp)
mov    -0x5d(%rbp),%al
test   $0x1,%al
jne    1364 <jerasure_bitmatrix_decode+0x214>
jmp    13dd <jerasure_bitmatrix_decode+0x28d>
mov    -0x38(%rbp),%rax
movslq -0x2c(%rbp),%rcx
cmpl   $0x0,(%rax,%rcx,4)
je     13ca <jerasure_bitmatrix_decode+0x27a>
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%esi
mov    -0x40(%rbp),%rdx
mov    -0x2c(%rbp),%eax
imul   -0x8(%rbp),%eax
imul   -0x10(%rbp),%eax
imul   -0x10(%rbp),%eax
cltq
shl    $0x2,%rax
add    %rax,%rdx
mov    -0x48(%rbp),%rcx
mov    -0x2c(%rbp),%r8d
mov    0x10(%rbp),%r9
mov    0x18(%rbp),%r11
mov    0x20(%rbp),%r10d
mov    0x28(%rbp),%eax
mov    %r11,(%rsp)
mov    %r10d,0x8(%rsp)
mov    %eax,0x10(%rsp)
call   1070 <jerasure_bitmatrix_dotprod@plt>
mov    -0x4c(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x4c(%rbp)
jmp    13cf <jerasure_bitmatrix_decode+0x27f>
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    1339 <jerasure_bitmatrix_decode+0x1e9>
cmpl   $0x0,-0x4c(%rbp)
jle    1485 <jerasure_bitmatrix_decode+0x335>
movslq -0x8(%rbp),%rax
shl    $0x2,%rax
mov    %eax,%edi
call   1060 <malloc@plt>
mov    %rax,-0x58(%rbp)
movl   $0x0,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1449 <jerasure_bitmatrix_decode+0x2f9>
mov    -0x2c(%rbp),%eax
cmp    -0x5c(%rbp),%eax
jge    1424 <jerasure_bitmatrix_decode+0x2d4>
mov    -0x2c(%rbp),%eax
mov    %eax,-0x64(%rbp)
jmp    142d <jerasure_bitmatrix_decode+0x2dd>
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x64(%rbp)
mov    -0x64(%rbp),%edx
mov    -0x58(%rbp),%rax
movslq -0x2c(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    1401 <jerasure_bitmatrix_decode+0x2b1>
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%esi
mov    -0x18(%rbp),%rdx
mov    -0x58(%rbp),%rcx
mov    -0x5c(%rbp),%r8d
mov    0x10(%rbp),%r9
mov    0x18(%rbp),%r11
mov    0x20(%rbp),%r10d
mov    0x28(%rbp),%eax
mov    %r11,(%rsp)
mov    %r10d,0x8(%rsp)
mov    %eax,0x10(%rsp)
call   1070 <jerasure_bitmatrix_dotprod@plt>
mov    -0x58(%rbp),%rdi
call   1030 <free@plt>
movl   $0x0,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    150f <jerasure_bitmatrix_decode+0x3bf>
mov    -0x38(%rbp),%rax
mov    -0x8(%rbp),%ecx
add    -0x2c(%rbp),%ecx
movslq %ecx,%rcx
cmpl   $0x0,(%rax,%rcx,4)
je     14fc <jerasure_bitmatrix_decode+0x3ac>
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%esi
mov    -0x18(%rbp),%rdx
mov    -0x2c(%rbp),%eax
imul   -0x8(%rbp),%eax
imul   -0x10(%rbp),%eax
imul   -0x10(%rbp),%eax
cltq
shl    $0x2,%rax
add    %rax,%rdx
mov    -0x8(%rbp),%r8d
add    -0x2c(%rbp),%r8d
mov    0x10(%rbp),%r9
mov    0x18(%rbp),%r11
mov    0x20(%rbp),%r10d
mov    0x28(%rbp),%eax
xor    %ecx,%ecx
mov    %r11,(%rsp)
mov    %r10d,0x8(%rsp)
mov    %eax,0x10(%rsp)
call   1070 <jerasure_bitmatrix_dotprod@plt>
jmp    1501 <jerasure_bitmatrix_decode+0x3b1>
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    148c <jerasure_bitmatrix_decode+0x33c>
mov    -0x38(%rbp),%rdi
call   1030 <free@plt>
cmpq   $0x0,-0x48(%rbp)
je     152c <jerasure_bitmatrix_decode+0x3dc>
mov    -0x48(%rbp),%rdi
call   1030 <free@plt>
cmpq   $0x0,-0x40(%rbp)
je     1540 <jerasure_bitmatrix_decode+0x3f0>
mov    -0x40(%rbp),%rdi
call   1030 <free@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x80,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<jerasure_bitmatrix_decode>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x48,%rsp
mov    %r8d,%r15d
mov    %rcx,0x30(%rsp)
mov    %edx,%r14d
mov    %esi,%ebp
mov    %edi,%ebx
mov    %r9,%rdx
call   1050 <jerasure_erasures_to_erased@plt>
test   %rax,%rax
je     119d <jerasure_bitmatrix_decode+0x4d>
mov    %rax,%r13
mov    %ebx,%edi
test   %ebx,%ebx
mov    %r14d,0xc(%rsp)
jle    11a7 <jerasure_bitmatrix_decode+0x57>
cmp    $0x1,%ebx
jne    11af <jerasure_bitmatrix_decode+0x5f>
xor    %eax,%eax
mov    %ebx,%r14d
xor    %r12d,%r12d
test   $0x1,%dil
jne    11fe <jerasure_bitmatrix_decode+0xae>
jmp    1213 <jerasure_bitmatrix_decode+0xc3>
mov    $0xffffffff,%ebp
jmp    15a7 <jerasure_bitmatrix_decode+0x457>
xor    %r12d,%r12d
mov    %ebx,%r14d
jmp    1213 <jerasure_bitmatrix_decode+0xc3>
mov    %edi,%ecx
and    $0xfffffffe,%ecx
xor    %eax,%eax
mov    %rbx,%r8
mov    %ebx,%r14d
xor    %r12d,%r12d
nop
xor    %edx,%edx
cmpl   $0x0,0x0(%r13,%rax,4)
mov    %r14d,%esi
cmovne %eax,%esi
setne  %dl
add    %r12d,%edx
lea    0x1(%rax),%r14d
xor    %r12d,%r12d
cmpl   $0x0,0x4(%r13,%rax,4)
cmove  %esi,%r14d
setne  %r12b
add    %edx,%r12d
add    $0x2,%rax
cmp    %rcx,%rax
jne    11c0 <jerasure_bitmatrix_decode+0x70>
mov    %r8,%rbx
test   $0x1,%dil
je     1213 <jerasure_bitmatrix_decode+0xc3>
xor    %ecx,%ecx
cmpl   $0x0,0x0(%r13,%rax,4)
setne  %cl
cmove  %r14d,%eax
add    %ecx,%r12d
mov    %eax,%r14d
cmp    $0x1,%r15d
jne    1224 <jerasure_bitmatrix_decode+0xd4>
movslq %ebx,%rax
cmpl   $0x0,0x0(%r13,%rax,4)
je     1227 <jerasure_bitmatrix_decode+0xd7>
mov    %ebx,%r14d
cmp    $0x1,%r12d
mov    %rdi,0x38(%rsp)
mov    %ebp,0x24(%rsp)
ja     1251 <jerasure_bitmatrix_decode+0x101>
jne    13cb <jerasure_bitmatrix_decode+0x27b>
cmp    $0x1,%r15d
jne    1251 <jerasure_bitmatrix_decode+0x101>
movslq %ebx,%rax
cmpl   $0x0,0x0(%r13,%rax,4)
je     141b <jerasure_bitmatrix_decode+0x2cb>
lea    0x0(,%rbx,4),%edi
call   1060 <malloc@plt>
mov    $0xffffffff,%ebp
mov    %rax,0x18(%rsp)
test   %rax,%rax
je     13c3 <jerasure_bitmatrix_decode+0x273>
mov    0xc(%rsp),%r15d
mov    %r15d,%edi
imul   %ebx,%edi
imul   %edi,%edi
shl    $0x2,%edi
call   1060 <malloc@plt>
test   %rax,%rax
je     13eb <jerasure_bitmatrix_decode+0x29b>
sub    $0x8,%rsp
mov    %rbx,0x18(%rsp)
mov    %ebx,%edi
mov    0x2c(%rsp),%esi
mov    %r15d,%edx
mov    0x38(%rsp),%rcx
mov    %r13,%r8
mov    %rax,%rbx
mov    %rax,%r9
mov    0x20(%rsp),%r15
push   %r15
call   1040 <jerasure_make_decoding_bitmatrix@plt>
add    $0x10,%rsp
test   %rax,%rax
js     1403 <jerasure_bitmatrix_decode+0x2b3>
mov    %r15,0x28(%rsp)
mov    %rbx,0x18(%rsp)
mov    0x10(%rsp),%rbx
test   %r12d,%r12d
setg   %al
mov    %rbx,0x10(%rsp)
jle    137b <jerasure_bitmatrix_decode+0x22b>
test   %r14d,%r14d
jle    137b <jerasure_bitmatrix_decode+0x22b>
mov    0xc(%rsp),%ebx
imul   %ebx,%ebx
imul   0x10(%rsp),%ebx
mov    %r14d,%eax
mov    %rax,0x40(%rsp)
xor    %r15d,%r15d
xor    %ebp,%ebp
nopw   0x0(%rax,%rax,1)
cmpl   $0x0,0x0(%r13,%rbp,4)
je     1365 <jerasure_bitmatrix_decode+0x215>
movslq %r15d,%rax
mov    0x18(%rsp),%rcx
lea    (%rcx,%rax,4),%rdx
sub    $0x8,%rsp
mov    0x18(%rsp),%rdi
mov    0x14(%rsp),%esi
mov    0x30(%rsp),%rcx
mov    %ebp,%r8d
mov    0x88(%rsp),%r9
mov    0xa0(%rsp),%eax
push   %rax
mov    0xa0(%rsp),%eax
push   %rax
push   0xa0(%rsp)
call   1070 <jerasure_bitmatrix_dotprod@plt>
add    $0x20,%rsp
add    $0xffffffff,%r12d
test   %r12d,%r12d
setg   %al
jle    137b <jerasure_bitmatrix_decode+0x22b>
add    $0x1,%rbp
add    %ebx,%r15d
cmp    0x40(%rsp),%rbp
jb     1310 <jerasure_bitmatrix_decode+0x1c0>
test   %al,%al
je     13f2 <jerasure_bitmatrix_decode+0x2a2>
mov    0x10(%rsp),%rbx
lea    0x0(,%rbx,4),%edi
call   1060 <malloc@plt>
mov    %rax,%r12
test   %ebx,%ebx
mov    0xc(%rsp),%esi
mov    0x24(%rsp),%r15d
jle    14a9 <jerasure_bitmatrix_decode+0x359>
movslq %r14d,%r9
mov    0x38(%rsp),%r8
lea    -0x1(%r8),%rdx
mov    %r8d,%ecx
and    $0x3,%ecx
cmp    $0x3,%rdx
jae    142e <jerasure_bitmatrix_decode+0x2de>
xor    %edx,%edx
jmp    148b <jerasure_bitmatrix_decode+0x33b>
mov    %r13,%rbx
jmp    159f <jerasure_bitmatrix_decode+0x44f>
mov    %rbx,0x10(%rsp)
xor    %eax,%eax
mov    %rax,0x18(%rsp)
xor    %eax,%eax
mov    %rax,0x28(%rsp)
test   %ebp,%ebp
jg     14f8 <jerasure_bitmatrix_decode+0x3a8>
jmp    157c <jerasure_bitmatrix_decode+0x42c>
mov    0x18(%rsp),%rbx
jmp    140e <jerasure_bitmatrix_decode+0x2be>
mov    0x24(%rsp),%ebp
test   %ebp,%ebp
jg     14f8 <jerasure_bitmatrix_decode+0x3a8>
jmp    157c <jerasure_bitmatrix_decode+0x42c>
mov    %r13,%rdi
call   1030 <free@plt>
mov    %r15,%r13
mov    %r13,%rdi
call   1030 <free@plt>
jmp    159f <jerasure_bitmatrix_decode+0x44f>
xor    %eax,%eax
mov    %rax,0x18(%rsp)
xor    %eax,%eax
mov    %rax,0x28(%rsp)
jmp    12d7 <jerasure_bitmatrix_decode+0x187>
and    $0xfffffffc,%r8d
xor    %edx,%edx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %rdx,%rdi
add    $0x1,%rdx
cmp    %r9,%rdi
mov    %edx,%ebp
cmovl  %edi,%ebp
mov    %ebp,(%r12,%rdi,4)
lea    0x2(%rdi),%rbp
cmp    %r9,%rdx
mov    %ebp,%ebx
cmovl  %edx,%ebx
lea    0x3(%rdi),%rax
cmp    %r9,%rbp
mov    %eax,%edx
cmovl  %ebp,%edx
mov    %ebx,0x4(%r12,%rdi,4)
mov    %edx,0x8(%r12,%rdi,4)
lea    0x4(%rdi),%rdx
cmp    %r9,%rax
mov    %edx,%ebp
cmovl  %eax,%ebp
mov    %ebp,0xc(%r12,%rdi,4)
cmp    %r8,%rdx
jne    1440 <jerasure_bitmatrix_decode+0x2f0>
test   %rcx,%rcx
je     14a9 <jerasure_bitmatrix_decode+0x359>
lea    0x1(%rdx),%rbp
cmp    %r9,%rdx
mov    %ebp,%edi
cmovl  %edx,%edi
mov    %edi,(%r12,%rdx,4)
mov    %rbp,%rdx
add    $0xffffffffffffffff,%rcx
jne    1490 <jerasure_bitmatrix_decode+0x340>
sub    $0x8,%rsp
mov    0x18(%rsp),%rdi
mov    0x38(%rsp),%rdx
mov    %r12,%rcx
mov    %r14d,%r8d
mov    0x88(%rsp),%r9
mov    0xa0(%rsp),%eax
push   %rax
mov    0xa0(%rsp),%eax
push   %rax
push   0xa0(%rsp)
call   1070 <jerasure_bitmatrix_dotprod@plt>
add    $0x20,%rsp
mov    %r12,%rdi
call   1030 <free@plt>
mov    %r15d,%ebp
test   %ebp,%ebp
jle    157c <jerasure_bitmatrix_decode+0x42c>
mov    0xc(%rsp),%r12d
imul   %r12d,%r12d
mov    0x10(%rsp),%rax
imul   %eax,%r12d
cltq
mov    %ebp,%r14d
lea    0x0(,%rax,4),%r15
add    %r13,%r15
xor    %ebx,%ebx
xor    %ebp,%ebp
jmp    152c <jerasure_bitmatrix_decode+0x3dc>
add    $0x1,%rbp
add    %r12d,%ebx
cmp    %rbp,%r14
je     157c <jerasure_bitmatrix_decode+0x42c>
cmpl   $0x0,(%r15,%rbp,4)
je     1520 <jerasure_bitmatrix_decode+0x3d0>
movslq %ebx,%rax
mov    0x30(%rsp),%rcx
lea    (%rcx,%rax,4),%rdx
mov    0x38(%rsp),%rdi
lea    (%rdi,%rbp,1),%r8d
sub    $0x8,%rsp
mov    0x14(%rsp),%esi
xor    %ecx,%ecx
mov    0x88(%rsp),%r9
mov    0xa0(%rsp),%eax
push   %rax
mov    0xa0(%rsp),%eax
push   %rax
push   0xa0(%rsp)
call   1070 <jerasure_bitmatrix_dotprod@plt>
add    $0x20,%rsp
jmp    1520 <jerasure_bitmatrix_decode+0x3d0>
mov    %r13,%rdi
call   1030 <free@plt>
mov    0x28(%rsp),%rdi
test   %rdi,%rdi
je     1593 <jerasure_bitmatrix_decode+0x443>
call   1030 <free@plt>
xor    %ebp,%ebp
mov    0x18(%rsp),%rbx
test   %rbx,%rbx
je     15a7 <jerasure_bitmatrix_decode+0x457>
mov    %rbx,%rdi
call   1030 <free@plt>
mov    %ebp,%eax
add    $0x48,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

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