user: What would the C source look like for the assembly code provided here:

```asm
<jerasure_matrix_decode>:
  endbr64
  push   %r15
  mov    %edx,%r15d
  mov    %r9,%rdx
  push   %r14
  lea    -0x8(%r15),%eax
  push   %r13
  push   %r12
  push   %rbp
  mov    %r8d,%ebp
  push   %rbx
  mov    %edi,%ebx
  sub    $0x48,%rsp
  and    $0xfffffff7,%eax
  mov    %esi,0x2c(%rsp)
  mov    %rcx,0x20(%rsp)
  je     L104
  cmp    $0x20,%r15d
  jne    L257
L104:
  mov    0x2c(%rsp),%esi
  mov    %ebx,%edi
  call   <jerasure_erasures_to_erased@plt>
  mov    %rax,%r13
  test   %rax,%rax
  je     L257
  test   %ebx,%ebx
  jle    L374
  movslq %ebx,%r14
  mov    %ebx,%r11d
  xor    %eax,%eax
  xor    %r12d,%r12d
  nopl   0x0(%rax,%rax,1)
L6:
  mov    0x0(%r13,%rax,4),%r8d
  test   %r8d,%r8d
  je     L0
  add    $0x1,%r12d
  mov    %eax,%r11d
L0:
  add    $0x1,%rax
  cmp    %rax,%r14
  jne    L6
  test   %ebp,%ebp
  je     L199
  mov    0x0(%r13,%r14,4),%edi
  test   %edi,%edi
  cmovne %ebx,%r11d
  cmp    $0x1,%r12d
  jg     L392
L138:
  je     L69
L305:
  movq   $0x0,0x8(%rsp)
  movq   $0x0,0x18(%rsp)
L402:
  mov    0x2c(%rsp),%edi
  test   %edi,%edi
  jle    L418
L263:
  lea    0x0(%r13,%r14,4),%rbp
  mov    0x2c(%rsp),%r14d
  mov    %r13,0x10(%rsp)
  xor    %r12d,%r12d
  add    %ebx,%r14d
  mov    %r14d,%r13d
  mov    %r15d,%r14d
  mov    %ebx,%r15d
  jmp    L350
  nopl   0x0(%rax,%rax,1)
L53:
  add    $0x1,%ebx
  add    $0x4,%rbp
  add    %r15d,%r12d
  cmp    %ebx,%r13d
  je     L74
L350:
  mov    0x0(%rbp),%esi
  test   %esi,%esi
  je     L53
  mov    0x20(%rsp),%rdi
  movslq %r12d,%rax
  mov    %ebx,%r8d
  xor    %ecx,%ecx
  mov    %r14d,%esi
  add    $0x1,%ebx
  add    $0x4,%rbp
  add    %r15d,%r12d
  lea    (%rdi,%rax,4),%rdx
  mov    0x90(%rsp),%eax
  mov    %r15d,%edi
  push   %rax
  push   0x90(%rsp)
  mov    0x90(%rsp),%r9
  call   <jerasure_matrix_dotprod@plt>
  pop    %rdx
  pop    %rcx
  cmp    %ebx,%r13d
  jne    L350
L74:
  mov    0x10(%rsp),%r13
L418:
  mov    %r13,%rdi
  call   <free@plt>
  cmpq   $0x0,0x8(%rsp)
  je     L349
  mov    0x8(%rsp),%rdi
  call   <free@plt>
L349:
  mov    0x18(%rsp),%rax
  xor    %r12d,%r12d
  test   %rax,%rax
  je     L163
  mov    %rax,%rdi
  call   <free@plt>
L163:
  add    $0x48,%rsp
  mov    %r12d,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax,%rax,1)
L199:
  mov    %ebx,%r11d
  cmp    $0x1,%r12d
  jle    L138
L392:
  lea    0x0(,%r14,4),%edi
  mov    %r11d,0x10(%rsp)
  call   <malloc@plt>
  mov    0x10(%rsp),%r11d
  test   %rax,%rax
  mov    %rax,0x8(%rsp)
  je     L211
  mov    %ebx,%edi
  mov    %r11d,0x10(%rsp)
  imul   %ebx,%edi
  shl    $0x2,%edi
  call   <malloc@plt>
  mov    0x10(%rsp),%r11d
  test   %rax,%rax
  mov    %rax,0x18(%rsp)
  je     L159
  mov    %r11d,0x10(%rsp)
  sub    $0x8,%rsp
  mov    %r15d,%edx
  mov    %r13,%r8
  push   0x10(%rsp)
  mov    0x28(%rsp),%r9
  mov    %ebx,%edi
  mov    0x30(%rsp),%rcx
  mov    0x3c(%rsp),%esi
  call   <jerasure_make_decoding_matrix@plt>
  pop    %rdx
  pop    %rcx
  test   %rax,%rax
  js     L78
  mov    0x10(%rsp),%r11d
  test   %r11d,%r11d
  jle    L353
L303:
  mov    %r13,%rbp
  xor    %r10d,%r10d
  xor    %r8d,%r8d
  mov    %r13,0x30(%rsp)
  mov    %r14,0x38(%rsp)
  mov    %r12d,%r13d
  mov    %r15d,%esi
  mov    %r10d,%r12d
  mov    %ebx,%r15d
  mov    %r11d,%r14d
  mov    %rbp,%rbx
  mov    %r8d,%ebp
  jmp    L388
  nopw   0x0(%rax,%rax,1)
L194:
  add    $0x1,%ebp
  add    $0x4,%rbx
  add    %r15d,%r12d
  test   %r13d,%r13d
  jle    L116
L175:
  cmp    %ebp,%r14d
  jle    L116
L388:
  mov    (%rbx),%eax
  test   %eax,%eax
  je     L194
  mov    0x18(%rsp),%rcx
  movslq %r12d,%rax
  mov    %ebp,%r8d
  mov    %r15d,%edi
  sub    $0x1,%r13d
  add    $0x1,%ebp
  add    $0x4,%rbx
  add    %r15d,%r12d
  lea    (%rcx,%rax,4),%rdx
  mov    0x90(%rsp),%eax
  push   %rax
  push   0x90(%rsp)
  mov    0x90(%rsp),%r9
  mov    0x18(%rsp),%rcx
  mov    %esi,0x20(%rsp)
  call   <jerasure_matrix_dotprod@plt>
  pop    %r10
  pop    %r11
  mov    0x10(%rsp),%esi
  test   %r13d,%r13d
  jg     L175
  nopl   0x0(%rax)
L116:
  mov    %r13d,%r12d
  mov    %r14d,%r11d
  mov    %r15d,%ebx
  mov    0x30(%rsp),%r13
  mov    0x38(%rsp),%r14
  mov    %esi,%r15d
  test   %r12d,%r12d
  je     L402
L353:
  lea    0x0(,%rbx,4),%edi
  mov    %r11d,0x10(%rsp)
  call   <malloc@plt>
  test   %ebx,%ebx
  mov    0x10(%rsp),%r11d
  mov    %rax,%rbp
  jle    L16
L206:
  mov    %rbp,%rcx
  xor    %eax,%eax
  nopl   0x0(%rax)
L319:
  mov    %eax,%edx
  add    $0x1,%eax
  cmp    %r11d,%edx
  cmovge %eax,%edx
  add    $0x4,%rcx
  mov    %edx,-0x4(%rcx)
  cmp    %eax,%ebx
  jne    L319
L16:
  mov    0x90(%rsp),%eax
  mov    %r11d,%r8d
  mov    %rbp,%rcx
  mov    %r15d,%esi
  mov    %ebx,%edi
  push   %rax
  push   0x90(%rsp)
  mov    0x90(%rsp),%r9
  mov    0x30(%rsp),%rdx
  call   <jerasure_matrix_dotprod@plt>
  mov    %rbp,%rdi
  call   <free@plt>
  pop    %r8
  pop    %r9
  jmp    L402
  nopl   0x0(%rax,%rax,1)
L69:
  test   %ebp,%ebp
  je     L392
  mov    0x0(%r13,%r14,4),%esi
  test   %esi,%esi
  jne    L392
  movq   $0x0,0x8(%rsp)
  movq   $0x0,0x18(%rsp)
  test   %r11d,%r11d
  jne    L303
  lea    0x0(,%rbx,4),%edi
  mov    %r11d,0x10(%rsp)
  call   <malloc@plt>
  mov    0x10(%rsp),%r11d
  mov    %rax,%rbp
  jmp    L206
  cs nopw 0x0(%rax,%rax,1)
L374:
  test   %ebp,%ebp
  jne    L415
  movq   $0x0,0x8(%rsp)
  mov    0x2c(%rsp),%eax
  movslq %ebx,%r14
  movq   $0x0,0x18(%rsp)
  test   %eax,%eax
  jg     L263
  jmp    L144
L415:
  movslq %ebx,%r14
  mov    (%rax,%r14,4),%eax
  test   %eax,%eax
  jne    L305
  movq   $0x0,0x8(%rsp)
  mov    0x2c(%rsp),%eax
  movq   $0x0,0x18(%rsp)
  test   %eax,%eax
  jg     L263
L144:
  mov    %r13,%rdi
  xor    %r12d,%r12d
  call   <free@plt>
  jmp    L163
L211:
  mov    %r13,%rdi
  call   <free@plt>
L257:
  mov    $0xffffffff,%r12d
  jmp    L163
L159:
  mov    %r13,%rdi
  mov    $0xffffffff,%r12d
  call   <free@plt>
  mov    0x8(%rsp),%rdi
  call   <free@plt>
  jmp    L163
L78:
  mov    %r13,%rdi
  mov    $0xffffffff,%r12d
  call   <free@plt>
  mov    0x8(%rsp),%rdi
  call   <free@plt>
  mov    0x18(%rsp),%rdi
  call   <free@plt>
  jmp    L163
```

assistant: ```c
int jerasure_matrix_decode(int k, int m, int w, int *matrix, int row_k_ones, int *erasures, char **data_ptrs, char **coding_ptrs, int size) {
  int i, edd, lastdrive;
  int *tmpids;
  int *erased, *decoding_matrix, *dm_ids;
  if (w != 8 && w != 16 && w != 32)
    return -1;
  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 || erased[k])
    lastdrive = k;
  dm_ids = NULL;
  decoding_matrix = NULL;
  if (edd > 1 || (edd > 0 && (!row_k_ones || 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));
    if (decoding_matrix == NULL) {
      free(erased);
      free(dm_ids);
      return -1;
    }
    if (jerasure_make_decoding_matrix(k, m, w, matrix, 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_matrix_dotprod(k, w, decoding_matrix + (i * k), dm_ids, i, data_ptrs, coding_ptrs, size);
      edd--;
    }
  }
  if (edd > 0) {
    tmpids = (int *)malloc(sizeof(int) * (k));
    for (i = 0; i < k; i++) {
      tmpids[i] = (i < lastdrive) ? i : i + 1;
    }
    jerasure_matrix_dotprod(k, w, matrix, tmpids, lastdrive, data_ptrs, coding_ptrs, size);
    free(tmpids);
  }
  for (i = 0; i < m; i++) {
    if (erased[k + i]) {
      jerasure_matrix_dotprod(k, w, matrix + (i * k), NULL, i + k, data_ptrs, coding_ptrs, size);
    }
  }
  free(erased);
  if (dm_ids != NULL)
    free(dm_ids);
  if (decoding_matrix != NULL)
    free(decoding_matrix);
  return 0;
}
```