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

```asm
<jerasure_generate_decoding_schedule>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x90,%rsp
  mov    %edi,-0x74(%rbp)
  mov    %esi,-0x78(%rbp)
  mov    %edx,-0x7c(%rbp)
  mov    %rcx,-0x88(%rbp)
  mov    %r8,-0x90(%rbp)
  mov    %r9d,-0x80(%rbp)
  movl   $0x0,-0x58(%rbp)
  movl   $0x0,-0x54(%rbp)
  movl   $0x0,-0x6c(%rbp)
  jmp    L332
L73:
  mov    -0x6c(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x90(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  cmp    %eax,-0x74(%rbp)
  jle    L80
  addl   $0x1,-0x58(%rbp)
  jmp    L5
L80:
  addl   $0x1,-0x54(%rbp)
L5:
  addl   $0x1,-0x6c(%rbp)
L332:
  mov    -0x6c(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x90(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  cmp    $0xffffffff,%eax
  jne    L73
  mov    -0x74(%rbp),%edx
  mov    -0x78(%rbp),%eax
  add    %edx,%eax
  cltq
  shl    $0x2,%eax
  mov    %eax,%edi
  call   <malloc@plt>
  mov    %rax,-0x38(%rbp)
  mov    -0x74(%rbp),%edx
  mov    -0x78(%rbp),%eax
  add    %edx,%eax
  cltq
  shl    $0x2,%eax
  mov    %eax,%edi
  call   <malloc@plt>
  mov    %rax,-0x30(%rbp)
  mov    -0x30(%rbp),%rdi
  mov    -0x38(%rbp),%rcx
  mov    -0x90(%rbp),%rdx
  mov    -0x78(%rbp),%esi
  mov    -0x74(%rbp),%eax
  mov    %rdi,%r8
  mov    %eax,%edi
  call   <set_up_ids_for_scheduled_decoding@plt>
  test   %rax,%rax
  jns    L188
  mov    $0x0,%eax
  jmp    L192
L188:
  mov    -0x74(%rbp),%eax
  imul   -0x7c(%rbp),%eax
  mov    -0x54(%rbp),%ecx
  mov    -0x58(%rbp),%edx
  add    %ecx,%edx
  imul   %edx,%eax
  imul   -0x7c(%rbp),%eax
  cltq
  shl    $0x2,%eax
  mov    %eax,%edi
  call   <malloc@plt>
  mov    %rax,-0x28(%rbp)
  cmpl   $0x0,-0x58(%rbp)
  jle    L221
  mov    -0x74(%rbp),%eax
  imul   %eax,%eax
  imul   -0x7c(%rbp),%eax
  imul   -0x7c(%rbp),%eax
  cltq
  shl    $0x2,%eax
  mov    %eax,%edi
  call   <malloc@plt>
  mov    %rax,-0x20(%rbp)
  mov    -0x20(%rbp),%rax
  mov    %rax,-0x48(%rbp)
  movl   $0x0,-0x6c(%rbp)
  jmp    L289
L262:
  mov    -0x6c(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  cmp    %eax,-0x6c(%rbp)
  jne    L319
  mov    -0x74(%rbp),%eax
  imul   -0x7c(%rbp),%eax
  imul   -0x7c(%rbp),%eax
  cltq
  shl    $0x2,%eax
  mov    %eax,%edx
  mov    -0x48(%rbp),%rax
  mov    %edx,%esi
  mov    %rax,%rdi
  call   <bzero@plt>
  movl   $0x0,-0x64(%rbp)
  jmp    L154
L163:
  mov    -0x6c(%rbp),%eax
  imul   -0x7c(%rbp),%eax
  mov    %eax,%edx
  mov    -0x64(%rbp),%eax
  add    %eax,%edx
  mov    -0x64(%rbp),%eax
  imul   -0x74(%rbp),%eax
  imul   -0x7c(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  movl   $0x1,(%rax)
  addl   $0x1,-0x64(%rbp)
L154:
  mov    -0x64(%rbp),%eax
  cmp    -0x7c(%rbp),%eax
  jl     L163
  jmp    L303
L319:
  mov    -0x74(%rbp),%eax
  imul   -0x7c(%rbp),%eax
  imul   -0x7c(%rbp),%eax
  cltq
  shl    $0x2,%eax
  mov    %eax,%esi
  mov    -0x74(%rbp),%eax
  imul   -0x7c(%rbp),%eax
  imul   -0x7c(%rbp),%eax
  mov    %eax,%edx
  mov    -0x6c(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rcx
  mov    -0x38(%rbp),%rax
  add    %rcx,%rax
  mov    (%rax),%eax
  sub    -0x74(%rbp),%eax
  imul   %edx,%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x88(%rbp),%rax
  lea    (%rdx,%rax,1),%rcx
  mov    -0x48(%rbp),%rax
  mov    %esi,%edx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <memcpy@plt>
L303:
  mov    -0x74(%rbp),%eax
  imul   -0x7c(%rbp),%eax
  imul   -0x7c(%rbp),%eax
  cltq
  shl    $0x2,%rax
  add    %rax,-0x48(%rbp)
  addl   $0x1,-0x6c(%rbp)
L289:
  mov    -0x6c(%rbp),%eax
  cmp    -0x74(%rbp),%eax
  jl     L262
  mov    -0x74(%rbp),%eax
  imul   %eax,%eax
  imul   -0x7c(%rbp),%eax
  imul   -0x7c(%rbp),%eax
  cltq
  shl    $0x2,%eax
  mov    %eax,%edi
  call   <malloc@plt>
  mov    %rax,-0x18(%rbp)
  mov    -0x74(%rbp),%eax
  imul   -0x7c(%rbp),%eax
  mov    %eax,%edx
  mov    -0x18(%rbp),%rcx
  mov    -0x20(%rbp),%rax
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <jerasure_invert_bitmatrix@plt>
  mov    -0x20(%rbp),%rax
  mov    %rax,%rdi
  call   <free@plt>
  mov    -0x28(%rbp),%rax
  mov    %rax,-0x48(%rbp)
  movl   $0x0,-0x6c(%rbp)
  jmp    L20
L75:
  mov    -0x74(%rbp),%eax
  cltq
  mov    %eax,%edx
  mov    -0x7c(%rbp),%eax
  cltq
  imul   %edx,%eax
  mov    -0x7c(%rbp),%edx
  movslq %edx,%rdx
  imul   %edx,%eax
  shl    $0x2,%eax
  mov    %eax,%esi
  mov    -0x74(%rbp),%eax
  imul   -0x7c(%rbp),%eax
  imul   -0x7c(%rbp),%eax
  mov    %eax,%edx
  mov    -0x74(%rbp),%ecx
  mov    -0x6c(%rbp),%eax
  add    %ecx,%eax
  cltq
  lea    0x0(,%rax,4),%rcx
  mov    -0x38(%rbp),%rax
  add    %rcx,%rax
  mov    (%rax),%eax
  imul   %edx,%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x18(%rbp),%rax
  lea    (%rdx,%rax,1),%rcx
  mov    -0x48(%rbp),%rax
  mov    %esi,%edx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <memcpy@plt>
  mov    -0x74(%rbp),%eax
  imul   -0x7c(%rbp),%eax
  imul   -0x7c(%rbp),%eax
  cltq
  shl    $0x2,%rax
  add    %rax,-0x48(%rbp)
  addl   $0x1,-0x6c(%rbp)
L20:
  mov    -0x6c(%rbp),%eax
  cmp    -0x58(%rbp),%eax
  jl     L75
  mov    -0x18(%rbp),%rax
  mov    %rax,%rdi
  call   <free@plt>
L221:
  movl   $0x0,-0x64(%rbp)
  jmp    L261
L182:
  mov    -0x64(%rbp),%edx
  mov    -0x58(%rbp),%eax
  add    %eax,%edx
  mov    -0x74(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  sub    -0x74(%rbp),%eax
  mov    %eax,-0x50(%rbp)
  mov    -0x74(%rbp),%eax
  imul   -0x7c(%rbp),%eax
  imul   -0x7c(%rbp),%eax
  mov    -0x58(%rbp),%ecx
  mov    -0x64(%rbp),%edx
  add    %ecx,%edx
  imul   %edx,%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mov    %rax,-0x48(%rbp)
  mov    -0x74(%rbp),%eax
  cltq
  mov    %eax,%edx
  mov    -0x7c(%rbp),%eax
  cltq
  imul   %edx,%eax
  mov    -0x7c(%rbp),%edx
  movslq %edx,%rdx
  imul   %edx,%eax
  shl    $0x2,%eax
  mov    %eax,%edx
  mov    -0x50(%rbp),%eax
  imul   -0x74(%rbp),%eax
  imul   -0x7c(%rbp),%eax
  imul   -0x7c(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rcx
  mov    -0x88(%rbp),%rax
  add    %rax,%rcx
  mov    -0x48(%rbp),%rax
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <memcpy@plt>
  movl   $0x0,-0x6c(%rbp)
  jmp    L232
L336:
  mov    -0x6c(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  cmp    %eax,-0x6c(%rbp)
  je     L96
  movl   $0x0,-0x68(%rbp)
  jmp    L56
L288:
  mov    -0x7c(%rbp),%eax
  cltq
  shl    $0x2,%eax
  mov    %eax,%edx
  mov    -0x68(%rbp),%eax
  imul   -0x74(%rbp),%eax
  imul   -0x7c(%rbp),%eax
  movslq %eax,%rcx
  mov    -0x6c(%rbp),%eax
  imul   -0x7c(%rbp),%eax
  cltq
  add    %rcx,%rax
  lea    0x0(,%rax,4),%rcx
  mov    -0x48(%rbp),%rax
  add    %rcx,%rax
  mov    %edx,%esi
  mov    %rax,%rdi
  call   <bzero@plt>
  addl   $0x1,-0x68(%rbp)
L56:
  mov    -0x68(%rbp),%eax
  cmp    -0x7c(%rbp),%eax
  jl     L288
L96:
  addl   $0x1,-0x6c(%rbp)
L232:
  mov    -0x6c(%rbp),%eax
  cmp    -0x74(%rbp),%eax
  jl     L336
  mov    -0x50(%rbp),%eax
  imul   -0x74(%rbp),%eax
  imul   -0x7c(%rbp),%eax
  mov    -0x7c(%rbp),%edx
  imul   %edx,%eax
  mov    %eax,-0x4c(%rbp)
  movl   $0x0,-0x6c(%rbp)
  jmp    L265
L215:
  mov    -0x6c(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  cmp    %eax,-0x6c(%rbp)
  je     L139
  mov    -0x6c(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x30(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  sub    -0x74(%rbp),%eax
  imul   -0x74(%rbp),%eax
  imul   -0x7c(%rbp),%eax
  imul   -0x7c(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mov    %rax,-0x10(%rbp)
  movl   $0x0,-0x68(%rbp)
  jmp    L142
L245:
  mov    -0x68(%rbp),%eax
  imul   -0x74(%rbp),%eax
  imul   -0x7c(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  mov    %rax,-0x8(%rbp)
  movl   $0x0,-0x60(%rbp)
  jmp    L236
L110:
  mov    -0x68(%rbp),%eax
  imul   -0x74(%rbp),%eax
  imul   -0x7c(%rbp),%eax
  mov    %eax,%edx
  mov    -0x4c(%rbp),%eax
  add    %eax,%edx
  mov    -0x6c(%rbp),%eax
  imul   -0x7c(%rbp),%eax
  add    %eax,%edx
  mov    -0x60(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x88(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  test   %eax,%eax
  je     L281
  movl   $0x0,-0x5c(%rbp)
  jmp    L276
L259:
  mov    -0x5c(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x8(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%ecx
  mov    -0x60(%rbp),%eax
  imul   -0x74(%rbp),%eax
  imul   -0x7c(%rbp),%eax
  mov    %eax,%edx
  mov    -0x5c(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x10(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%edx
  mov    -0x5c(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rsi
  mov    -0x8(%rbp),%rax
  add    %rsi,%rax
  xor    %ecx,%edx
  mov    %edx,(%rax)
  addl   $0x1,-0x5c(%rbp)
L276:
  mov    -0x74(%rbp),%eax
  imul   -0x7c(%rbp),%eax
  cmp    %eax,-0x5c(%rbp)
  jl     L259
L281:
  addl   $0x1,-0x60(%rbp)
L236:
  mov    -0x60(%rbp),%eax
  cmp    -0x7c(%rbp),%eax
  jl     L110
  addl   $0x1,-0x68(%rbp)
L142:
  mov    -0x68(%rbp),%eax
  cmp    -0x7c(%rbp),%eax
  jl     L245
L139:
  addl   $0x1,-0x6c(%rbp)
L265:
  mov    -0x6c(%rbp),%eax
  cmp    -0x74(%rbp),%eax
  jl     L215
  addl   $0x1,-0x64(%rbp)
L261:
  mov    -0x64(%rbp),%eax
  cmp    -0x54(%rbp),%eax
  jl     L182
  cmpl   $0x0,-0x80(%rbp)
  je     L23
  mov    -0x58(%rbp),%edx
  mov    -0x54(%rbp),%eax
  lea    (%rdx,%rax,1),%esi
  mov    -0x28(%rbp),%rcx
  mov    -0x7c(%rbp),%edx
  mov    -0x74(%rbp),%eax
  mov    %eax,%edi
  call   <jerasure_smart_bitmatrix_to_schedule@plt>
  mov    %rax,-0x40(%rbp)
  jmp    L272
L23:
  mov    -0x58(%rbp),%edx
  mov    -0x54(%rbp),%eax
  lea    (%rdx,%rax,1),%esi
  mov    -0x28(%rbp),%rcx
  mov    -0x7c(%rbp),%edx
  mov    -0x74(%rbp),%eax
  mov    %eax,%edi
  call   <jerasure_dumb_bitmatrix_to_schedule@plt>
  mov    %rax,-0x40(%rbp)
L272:
  mov    -0x38(%rbp),%rax
  mov    %rax,%rdi
  call   <free@plt>
  mov    -0x30(%rbp),%rax
  mov    %rax,%rdi
  call   <free@plt>
  mov    -0x28(%rbp),%rax
  mov    %rax,%rdi
  call   <free@plt>
  mov    -0x40(%rbp),%rax
L192:
  leave
  ret
```

assistant: ```c
int **jerasure_generate_decoding_schedule(int k, int m, int w, int *bitmatrix, int *erasures, int smart) {
  int i, j, x, drive, y, index, z;
  int *decoding_matrix, *inverse, *real_decoding_matrix;
  int *ptr;
  int *row_ids;
  int *ind_to_row;
  int ddf, cdf;
  int **schedule;
  int *b1, *b2;
  ddf = 0;
  cdf = 0;
  for (i = 0; erasures[i] != -1; i++) {
    if (erasures[i] < k)
      ddf++;
    else
      cdf++;
  }
  row_ids = (int *)malloc(sizeof(int) * (k + m));
  ind_to_row = (int *)malloc(sizeof(int) * (k + m));
  if (set_up_ids_for_scheduled_decoding(k, m, erasures, row_ids, ind_to_row) < 0)
    return NULL;
  real_decoding_matrix = (int *)malloc(sizeof(int) * (k * w * (cdf + ddf) * w));
  if (ddf > 0) {
    decoding_matrix = (int *)malloc(sizeof(int) * (k * k * w * w));
    ptr = decoding_matrix;
    for (i = 0; i < k; i++) {
      if (row_ids[i] == i) {
        bzero(ptr, k * w * w * sizeof(int));
        for (x = 0; x < w; x++) {
          ptr[x + i * w + x * k * w] = 1;
        }
      } else {
        memcpy(ptr, bitmatrix + k * w * w * (row_ids[i] - k), k * w * w * sizeof(int));
      }
      ptr += (k * w * w);
    }
    inverse = (int *)malloc(sizeof(int) * (k * k * w * w));
    jerasure_invert_bitmatrix(decoding_matrix, inverse, k * w);
    free(decoding_matrix);
    ptr = real_decoding_matrix;
    for (i = 0; i < ddf; i++) {
      memcpy(ptr, inverse + k * w * w * row_ids[k + i], sizeof(int) * k * w * w);
      ptr += (k * w * w);
    }
    free(inverse);
  }
  for (x = 0; x < cdf; x++) {
    drive = row_ids[x + ddf + k] - k;
    ptr = real_decoding_matrix + k * w * w * (ddf + x);
    memcpy(ptr, bitmatrix + drive * k * w * w, sizeof(int) * k * w * w);
    for (i = 0; i < k; i++) {
      if (row_ids[i] != i) {
        for (j = 0; j < w; j++) {
          bzero(ptr + j * k * w + i * w, sizeof(int) * w);
        }
      }
    }
    index = drive * k * w * w;
    for (i = 0; i < k; i++) {
      if (row_ids[i] != i) {
        b1 = real_decoding_matrix + (ind_to_row[i] - k) * k * w * w;
        for (j = 0; j < w; j++) {
          b2 = ptr + j * k * w;
          for (y = 0; y < w; y++) {
            if (bitmatrix[index + j * k * w + i * w + y]) {
              for (z = 0; z < k * w; z++) {
                b2[z] = b2[z] ^ b1[z + y * k * w];
              }
            }
          }
        }
      }
    }
  }
  if (smart) {
    schedule = jerasure_smart_bitmatrix_to_schedule(k, ddf + cdf, w, real_decoding_matrix);
  } else {
    schedule = jerasure_dumb_bitmatrix_to_schedule(k, ddf + cdf, w, real_decoding_matrix);
  }
  free(row_ids);
  free(ind_to_row);
  free(real_decoding_matrix);
  return schedule;
}
```