user: Demonstrate the C code that generates the assembly output below:

```asm
<jerasure_make_decoding_matrix>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x40,%rsp
  mov    %edi,-0x14(%rbp)
  mov    %esi,-0x18(%rbp)
  mov    %edx,-0x1c(%rbp)
  mov    %rcx,-0x28(%rbp)
  mov    %r8,-0x30(%rbp)
  mov    %r9,-0x38(%rbp)
  movl   $0x0,-0xc(%rbp)
  movl   $0x0,-0x10(%rbp)
  jmp    L50
L118:
  mov    -0x10(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x30(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  test   %eax,%eax
  jne    L86
  mov    -0xc(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    0x10(%rbp),%rax
  add    %rax,%rdx
  mov    -0x10(%rbp),%eax
  mov    %eax,(%rdx)
  addl   $0x1,-0xc(%rbp)
L86:
  addl   $0x1,-0x10(%rbp)
L50:
  mov    -0xc(%rbp),%eax
  cmp    -0x14(%rbp),%eax
  jl     L118
  mov    -0x14(%rbp),%eax
  imul   %eax,%eax
  cltq
  shl    $0x2,%eax
  mov    %eax,%edi
  call   <malloc@plt>
  mov    %rax,-0x8(%rbp)
  cmpq   $0x0,-0x8(%rbp)
  jne    L117
  mov    $0xffffffff,%eax
  jmp    L43
L117:
  movl   $0x0,-0x10(%rbp)
  jmp    L47
L21:
  mov    -0x10(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    0x10(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  cmp    %eax,-0x14(%rbp)
  jle    L104
  movl   $0x0,-0xc(%rbp)
  jmp    L36
L26:
  mov    -0x10(%rbp),%eax
  imul   -0x14(%rbp),%eax
  mov    %eax,%edx
  mov    -0xc(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x8(%rbp),%rax
  add    %rdx,%rax
  movl   $0x0,(%rax)
  addl   $0x1,-0xc(%rbp)
L36:
  mov    -0xc(%rbp),%eax
  cmp    -0x14(%rbp),%eax
  jl     L26
  mov    -0x10(%rbp),%eax
  imul   -0x14(%rbp),%eax
  mov    %eax,%edx
  mov    -0x10(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rcx
  mov    0x10(%rbp),%rax
  add    %rcx,%rax
  mov    (%rax),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x8(%rbp),%rax
  add    %rdx,%rax
  movl   $0x1,(%rax)
  jmp    L28
L104:
  movl   $0x0,-0xc(%rbp)
  jmp    L39
L68:
  mov    -0x10(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    0x10(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  sub    -0x14(%rbp),%eax
  imul   -0x14(%rbp),%eax
  mov    %eax,%edx
  mov    -0xc(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x28(%rbp),%rax
  lea    (%rdx,%rax,1),%rcx
  mov    -0x10(%rbp),%eax
  imul   -0x14(%rbp),%eax
  mov    %eax,%edx
  mov    -0xc(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x8(%rbp),%rax
  add    %rax,%rdx
  mov    (%rcx),%eax
  mov    %eax,(%rdx)
  addl   $0x1,-0xc(%rbp)
L39:
  mov    -0xc(%rbp),%eax
  cmp    -0x14(%rbp),%eax
  jl     L68
L28:
  addl   $0x1,-0x10(%rbp)
L47:
  mov    -0x10(%rbp),%eax
  cmp    -0x14(%rbp),%eax
  jl     L21
  mov    -0x1c(%rbp),%ecx
  mov    -0x14(%rbp),%edx
  mov    -0x38(%rbp),%rsi
  mov    -0x8(%rbp),%rax
  mov    %rax,%rdi
  call   <jerasure_invert_matrix@plt>
  mov    %eax,-0x10(%rbp)
  mov    -0x8(%rbp),%rax
  mov    %rax,%rdi
  call   <free@plt>
  mov    -0x10(%rbp),%eax
L43:
  leave
  ret
```

assistant: ```c
int jerasure_make_decoding_matrix(int k, int m, int w, int *matrix, int *erased, int *decoding_matrix, int *dm_ids) {
  int i, j, *tmpmat;
  j = 0;
  for (i = 0; j < k; i++) {
    if (erased[i] == 0) {
      dm_ids[j] = i;
      j++;
    }
  }
  tmpmat = (int *)malloc(sizeof(int) * (k * k));
  if (tmpmat == NULL) {
    return -1;
  }
  for (i = 0; i < k; i++) {
    if (dm_ids[i] < k) {
      for (j = 0; j < k; j++)
        tmpmat[i * k + j] = 0;
      tmpmat[i * k + dm_ids[i]] = 1;
    } else {
      for (j = 0; j < k; j++) {
        tmpmat[i * k + j] = matrix[(dm_ids[i] - k) * k + j];
      }
    }
  }
  i = jerasure_invert_matrix(tmpmat, decoding_matrix, k, w);
  free(tmpmat);
  return i;
}
```