user: 请从给定的汇编指令推导出C源代码:

```asm
<jerasure_generate_decoding_schedule>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  mov    %r8,%r13
  push   %r12
  mov    %esi,%r12d
  push   %rbp
  push   %rbx
  sub    $0x118,%rsp
  mov    (%r8),%eax
  mov    %edi,0x94(%rsp)
  mov    %edx,0x24(%rsp)
  mov    %rcx,0xa0(%rsp)
  mov    %r9d,0x10c(%rsp)
  cmp    $0xffffffff,%eax
  je     L54
  lea    0x4(%r8),%rdx
  xor    %r15d,%r15d
  xor    %ebx,%ebx
  jmp    L307
L172:
  mov    (%rdx),%eax
  add    $0x4,%rdx
  add    $0x1,%ebx
  cmp    $0xffffffff,%eax
  je     L195
L307:
  cmp    0x94(%rsp),%eax
  jl     L172
  mov    (%rdx),%eax
  add    $0x4,%rdx
  add    $0x1,%r15d
  cmp    $0xffffffff,%eax
  jne    L307
L195:
  mov    0x94(%rsp),%ebp
  mov    %ebp,%r14d
  add    %r12d,%r14d
  shl    $0x2,%r14d
  mov    %r14d,%edi
  call   <malloc@plt>
  mov    %r14d,%edi
  mov    %rax,0x98(%rsp)
  call   <malloc@plt>
  mov    %r12d,%esi
  mov    %r13,%rdx
  mov    %ebp,%edi
  mov    0x98(%rsp),%rcx
  mov    %rax,%r8
  mov    %rax,0xd8(%rsp)
  xor    %r12d,%r12d
  call   <set_up_ids_for_scheduled_decoding@plt>
  test   %rax,%rax
  js     L458
  mov    0x24(%rsp),%r12d
  mov    %ebp,%edi
  lea    (%r15,%rbx,1),%eax
  mov    %ebp,%r14d
  mov    %eax,0xe0(%rsp)
  imul   %r12d,%edi
  mov    %edi,0x20(%rsp)
  imul   %eax,%edi
  imul   %r12d,%edi
  shl    $0x2,%edi
  call   <malloc@plt>
  mov    %rax,%rbp
  test   %ebx,%ebx
  jne    L328
L20:
  test   %r15d,%r15d
  je     L200
  mov    0x24(%rsp),%esi
  movslq 0x94(%rsp),%rcx
  mov    0x20(%rsp),%edi
  mov    %esi,%eax
  mov    %rcx,%r11
  imul   %esi,%eax
  mov    %edi,%edx
  imul   %esi,%edx
  imul   %esi,%r11d
  imul   %ecx,%eax
  mov    %r11d,%r13d
  shl    $0x2,%eax
  mov    %eax,0xe4(%rsp)
  lea    0x0(,%rsi,4),%eax
  mov    %eax,0x108(%rsp)
  movslq %ebx,%rax
  add    %rcx,%rax
  mov    0x98(%rsp),%rcx
  lea    (%rcx,%rax,4),%r10
  mov    %r10,0xd0(%rsp)
  movslq %edx,%r10
  imul   %ebx,%edx
  mov    %r10,0xf0(%rsp)
  shl    $0x2,%r10
  mov    %r10,0xf8(%rsp)
  movslq %edx,%rbx
  lea    -0x1(%r15),%edx
  add    %rdx,%rax
  mov    %rbx,0x68(%rsp)
  lea    0x0(%rbp,%rbx,4),%r12
  mov    %edi,%ebx
  lea    0x4(%rcx,%rax,4),%rax
  mov    %rax,0x100(%rsp)
  movslq %edi,%rax
  mov    %rax,0x78(%rsp)
  shl    $0x2,%rax
  mov    %rax,0x70(%rsp)
  lea    -0x1(%rdi),%eax
  shr    $0x2,%edi
  mov    %eax,0x28(%rsp)
  mov    %rax,0xe8(%rsp)
  mov    %edi,%eax
  mov    %ebx,%edi
  sub    $0x1,%eax
  and    $0xfffffffc,%edi
  mov    %rax,0xc0(%rsp)
  mov    %edi,0x18(%rsp)
L399:
  mov    0xd0(%rsp),%rax
  mov    0x24(%rsp),%ebx
  mov    %r12,%rdi
  mov    0x94(%rsp),%r15d
  mov    0xe4(%rsp),%edx
  mov    (%rax),%eax
  mov    %eax,(%rsp)
  sub    %r15d,%eax
  imul   %r15d,%eax
  imul   %ebx,%eax
  imul   %ebx,%eax
  mov    0xa0(%rsp),%rbx
  cltq
  lea    (%rbx,%rax,4),%rsi
  mov    %rax,0xb8(%rsp)
  call   <memcpy@plt>
  movl   $0x0,(%rsp)
  mov    0x98(%rsp),%rbx
  movl   $0x0,0x54(%rsp)
  test   %r15d,%r15d
  jle    L154
  mov    %rbp,0x10(%rsp)
  mov    0x54(%rsp),%eax
  mov    %r13d,0x30(%rsp)
  mov    0x24(%rsp),%ebp
  mov    %r12,0x8(%rsp)
  mov    0x70(%rsp),%r13
  mov    0x108(%rsp),%r12d
  jmp    L113
  nopl   0x0(%rax)
L220:
  mov    0x54(%rsp),%eax
  add    %ebp,(%rsp)
  add    $0x4,%rbx
  add    $0x1,%eax
  cmp    %eax,0x94(%rsp)
  je     L308
  mov    %eax,0x54(%rsp)
L113:
  cmp    %eax,(%rbx)
  je     L220
  test   %ebp,%ebp
  jle    L220
  movslq (%rsp),%rax
  mov    0x8(%rsp),%rdi
  xor    %r15d,%r15d
  lea    (%rdi,%rax,4),%r14
  nop
L155:
  mov    %r14,%rdi
  mov    %r12d,%esi
  add    $0x1,%r15d
  add    %r13,%r14
  call   <bzero@plt>
  cmp    %r15d,%ebp
  jne    L155
  jmp    L220
L154:
  mov    0xf0(%rsp),%rdi
  add    0xf8(%rsp),%r12
  addq   $0x4,0xd0(%rsp)
  mov    0xd0(%rsp),%rax
  add    %rdi,0x68(%rsp)
  cmp    0x100(%rsp),%rax
  jne    L399
L200:
  mov    0x10c(%rsp),%edi
  test   %edi,%edi
  jne    L402
  mov    0x24(%rsp),%edx
  mov    0xe0(%rsp),%esi
  mov    %rbp,%rcx
  mov    0x94(%rsp),%edi
  call   <jerasure_dumb_bitmatrix_to_schedule@plt>
  mov    %rax,%r12
L65:
  mov    0x98(%rsp),%rdi
  call   <free@plt>
  mov    0xd8(%rsp),%rdi
  call   <free@plt>
  mov    %rbp,%rdi
  call   <free@plt>
L458:
  add    $0x118,%rsp
  mov    %r12,%rax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L308:
  mov    0x8(%rsp),%r12
  mov    %eax,0xac(%rsp)
  mov    0xe8(%rsp),%rax
  mov    0x10(%rsp),%rbp
  movl   $0x0,0x90(%rsp)
  mov    0xd8(%rsp),%rbx
  mov    0x30(%rsp),%r13d
  movl   $0x0,0xa8(%rsp)
  lea    0x4(%r12,%rax,4),%rax
  mov    %rax,0xc8(%rsp)
  mov    0x68(%rsp),%rax
  lea    0x0(%rbp,%rax,4),%rax
  mov    %rax,0x48(%rsp)
  mov    0x98(%rsp),%rax
  sub    %rax,%rbx
  mov    %rax,0x88(%rsp)
  mov    %rbp,%rax
  sub    %r12,%rax
  mov    %rbx,0xb0(%rsp)
  mov    0x90(%rsp),%ebx
  mov    %rax,0x80(%rsp)
  jmp    L367
  nopw   0x0(%rax,%rax,1)
L120:
  mov    0x90(%rsp),%ebx
  mov    0x24(%rsp),%ecx
  addq   $0x4,0x88(%rsp)
  add    %ecx,0xa8(%rsp)
  lea    0x1(%rbx),%eax
  cmp    %ebx,0x54(%rsp)
  je     L154
  mov    %eax,0x90(%rsp)
  mov    %eax,%ebx
L367:
  mov    0x88(%rsp),%rax
  cmp    %ebx,(%rax)
  je     L120
  mov    %rax,%rbx
  mov    0xb0(%rsp),%rax
  mov    (%rax,%rbx,1),%eax
  mov    0x24(%rsp),%ebx
  mov    %eax,%edi
  mov    %eax,(%rsp)
  mov    0xac(%rsp),%eax
  sub    %eax,%edi
  imul   %eax,%edi
  imul   %ebx,%edi
  imul   %ebx,%edi
  movslq %edi,%rdi
  test   %ebx,%ebx
  jle    L120
  mov    0xb8(%rsp),%rsi
  lea    -0x1(%rbx),%edx
  movslq 0xa8(%rsp),%rax
  movq   $0x0,0x10(%rsp)
  mov    0xa0(%rsp),%rcx
  movl   $0x0,0x8(%rsp)
  xor    %r8d,%r8d
  add    %rsi,%rdx
  mov    0x48(%rsp),%r11
  add    %rax,%rdx
  add    %rsi,%rax
  lea    (%rcx,%rax,4),%rax
  lea    0x4(%rcx,%rdx,4),%rbx
  mov    %rax,0x58(%rsp)
  mov    0xc8(%rsp),%rax
  mov    %rax,0x30(%rsp)
  mov    0xc0(%rsp),%rax
  add    $0x1,%rax
  shl    $0x4,%rax
  mov    %rax,0x60(%rsp)
  mov    0x20(%rsp),%eax
  sub    0x18(%rsp),%eax
  mov    %eax,0x50(%rsp)
  cs nopw 0x0(%rax,%rax,1)
L375:
  mov    0x68(%rsp),%rsi
  mov    0x60(%rsp),%rcx
  mov    0x10(%rsp),%rax
  mov    0x58(%rsp),%rdx
  add    %r8,%rsi
  lea    (%rcx,%r11,1),%r10
  mov    0x48(%rsp),%rcx
  mov    %rsi,(%rsp)
  mov    0x80(%rsp),%rsi
  add    %rax,%rdx
  add    %rax,%rcx
  sub    %rax,%rsi
  mov    %rcx,0x38(%rsp)
  xor    %ecx,%ecx
  mov    %rsi,0x40(%rsp)
  jmp    L345
  nopl   0x0(%rax,%rax,1)
L414:
  add    $0x4,%rdx
  add    %r13d,%ecx
  cmp    %rdx,%rbx
  je     L332
  nopl   0x0(%rax,%rax,1)
L345:
  mov    (%rdx),%esi
  test   %esi,%esi
  je     L414
  mov    0x20(%rsp),%eax
  test   %eax,%eax
  jle    L414
  movslq %ecx,%r9
  mov    %r11,%r14
  add    %rdi,%r9
  lea    0x0(,%r9,4),%rsi
  lea    (%rsi,%rbp,1),%rax
  lea    0x4(%rax),%r15
  sub    %r15,%r14
  cmp    $0x8,%r14
  jbe    L70
  cmpl   $0x1,0x20(%rsp)
  je     L70
  cmpl   $0x2,0x28(%rsp)
  jbe    L331
  mov    %r11,%rsi
  sub    %r11,%rax
L93:
  movdqu (%rax,%rsi,1),%xmm0
  movdqu (%rsi),%xmm2
  add    $0x10,%rsi
  pxor   %xmm2,%xmm0
  movups %xmm0,-0x10(%rsi)
  cmp    %rsi,%r10
  jne    L93
  mov    0x18(%rsp),%eax
  mov    0x20(%rsp),%esi
  cmp    %esi,%eax
  je     L414
  mov    0x50(%rsp),%esi
  mov    %esi,%r15d
  cmp    $0x1,%esi
  je     L336
  mov    %eax,%esi
L351:
  mov    (%rsp),%r14
  add    %rsi,%r14
  add    %r9,%rsi
  lea    0x0(%rbp,%r14,4),%r14
  movq   0x0(%rbp,%rsi,4),%xmm0
  mov    %r15d,%esi
  movq   (%r14),%xmm1
  and    $0xfffffffe,%esi
  add    %esi,%eax
  pxor   %xmm1,%xmm0
  movq   %xmm0,(%r14)
  cmp    %r15d,%esi
  je     L414
L336:
  movslq %eax,%rsi
  add    %ecx,%eax
  add    $0x4,%rdx
  add    %r13d,%ecx
  cltq
  add    %r8,%rsi
  add    %rdi,%rax
  mov    0x0(%rbp,%rax,4),%eax
  xor    %eax,(%r12,%rsi,4)
  cmp    %rdx,%rbx
  jne    L345
L332:
  mov    0x70(%rsp),%rax
  addl   $0x1,0x8(%rsp)
  add    %rax,0x10(%rsp)
  mov    0x8(%rsp),%ecx
  add    %rax,0x30(%rsp)
  add    %rax,%rbx
  add    0x78(%rsp),%r8
  add    %rax,%r11
  cmp    %ecx,0x24(%rsp)
  jne    L375
  jmp    L120
  nopl   0x0(%rax,%rax,1)
L70:
  mov    0x38(%rsp),%rax
  mov    0x30(%rsp),%r14
  add    0x40(%rsp),%rsi
  nopw   0x0(%rax,%rax,1)
L434:
  mov    (%rax,%rsi,1),%r9d
  xor    %r9d,(%rax)
  add    $0x4,%rax
  cmp    %rax,%r14
  jne    L434
  jmp    L414
L331:
  mov    0x20(%rsp),%r15d
  xor    %eax,%eax
  xor    %esi,%esi
  jmp    L351
L402:
  mov    0x24(%rsp),%edx
  mov    0xe0(%rsp),%esi
  mov    %rbp,%rcx
  mov    0x94(%rsp),%edi
  call   <jerasure_smart_bitmatrix_to_schedule@plt>
  mov    %rax,%r12
  jmp    L65
L328:
  mov    %r14d,%eax
  imul   %r12d,%eax
  imul   %eax,%eax
  lea    0x0(,%rax,4),%r13d
  mov    %r13d,%edi
  call   <malloc@plt>
  mov    %rax,%r12
  test   %r14d,%r14d
  jle    L369
  mov    0x20(%rsp),%edi
  mov    0x24(%rsp),%ecx
  xor    %r14d,%r14d
  mov    %rbp,0x30(%rsp)
  mov    %r12,0x38(%rsp)
  mov    %r12,%rbp
  mov    %r14d,%r12d
  mov    %ebx,%r14d
  imul   %edi,%ecx
  movl   $0x0,0x8(%rsp)
  movslq %ecx,%rax
  lea    0x0(,%rcx,4),%edx
  mov    %ecx,0x10(%rsp)
  shl    $0x2,%rax
  mov    %edx,%ebx
  mov    %rax,0x18(%rsp)
  mov    0x98(%rsp),%rax
  mov    %rax,(%rsp)
  movslq %edi,%rax
  lea    0x4(,%rax,4),%rax
  mov    %rax,0x28(%rsp)
  jmp    L142
L424:
  sub    0x94(%rsp),%eax
  imul   0x10(%rsp),%eax
  mov    %ebx,%edx
  mov    0xa0(%rsp),%rdi
  cltq
  lea    (%rdi,%rax,4),%rsi
  mov    %rbp,%rdi
  call   <memcpy@plt>
L320:
  mov    0x24(%rsp),%edi
  addq   $0x4,(%rsp)
  add    $0x1,%r12d
  add    %edi,0x8(%rsp)
  add    0x18(%rsp),%rbp
  cmp    %r12d,0x94(%rsp)
  je     L241
L142:
  mov    (%rsp),%rax
  mov    (%rax),%eax
  cmp    %r12d,%eax
  jne    L424
  mov    %ebx,%esi
  mov    %rbp,%rdi
  call   <bzero@plt>
  mov    0x24(%rsp),%r8d
  test   %r8d,%r8d
  jle    L320
  movslq 0x8(%rsp),%rax
  lea    0x0(%rbp,%rax,4),%rsi
  xor    %eax,%eax
L167:
  movl   $0x1,(%rsi)
  add    $0x1,%eax
  add    0x28(%rsp),%rsi
  cmp    %eax,0x24(%rsp)
  jne    L167
  jmp    L320
L241:
  mov    0x30(%rsp),%rbp
  mov    0x38(%rsp),%r12
  mov    %r14d,%ebx
L369:
  mov    %r13d,%edi
  call   <malloc@plt>
  mov    0x20(%rsp),%r14d
  mov    %r12,%rdi
  mov    %rax,%rsi
  mov    %rax,%r13
  mov    %r14d,%edx
  call   <jerasure_invert_bitmatrix@plt>
  mov    %r12,%rdi
  call   <free@plt>
  mov    0x24(%rsp),%edi
  mov    %ebx,0x10(%rsp)
  movslq 0x94(%rsp),%rax
  mov    %r15d,0x18(%rsp)
  mov    %rbp,%r15
  mov    %edi,%ecx
  imul   %edi,%r14d
  imul   %edi,%ecx
  mov    %ecx,%edx
  movslq %r14d,%rcx
  imul   %eax,%edx
  lea    0x0(,%rcx,4),%rdi
  mov    %rdi,(%rsp)
  mov    0x98(%rsp),%rdi
  lea    -0x1(%rbx),%ecx
  mov    %rbp,%rbx
  lea    (%rdi,%rax,4),%r12
  add    %rcx,%rax
  shl    $0x2,%edx
  lea    0x4(%rdi,%rax,4),%rax
  mov    %edx,%ebp
  mov    %rax,0x8(%rsp)
L21:
  mov    (%r12),%eax
  mov    %rbx,%rdi
  mov    %ebp,%edx
  add    $0x4,%r12
  imul   %r14d,%eax
  cltq
  lea    0x0(%r13,%rax,4),%rsi
  call   <memcpy@plt>
  add    (%rsp),%rbx
  cmp    0x8(%rsp),%r12
  jne    L21
  mov    %r13,%rdi
  mov    %r15,%rbp
  mov    0x10(%rsp),%ebx
  mov    0x18(%rsp),%r15d
  call   <free@plt>
  jmp    L20
L54:
  xor    %r15d,%r15d
  xor    %ebx,%ebx
  jmp    L195
```

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;
}
```