user: 请显示与下面列出的汇编代码相匹配的C语言实现：

```asm
<key_schedule_block>:
  endbr64
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x1f8,%rsp
  mov    %rsi,%r9
  mov    %fs:0x28,%rax
  mov    %rax,0x1e8(%rsp)
  xor    %eax,%eax
  movzbl (%rdi),%eax
  mov    %eax,0xc0(%rsp)
  movzbl 0x1(%rdi),%eax
  mov    %eax,0xc4(%rsp)
  movzbl 0x2(%rdi),%eax
  mov    %eax,0xc8(%rsp)
  movzbl 0x3(%rdi),%eax
  mov    %eax,0xcc(%rsp)
  movzbl 0x4(%rdi),%eax
  mov    %eax,0xd0(%rsp)
  movzbl 0x5(%rdi),%eax
  mov    %eax,0xd4(%rsp)
  movzbl 0x6(%rdi),%eax
  mov    %eax,0xd8(%rsp)
  movzbl 0x7(%rdi),%eax
  mov    %eax,0xdc(%rsp)
  mov    %rsp,%rbx
  lea    0xc0(%rsp),%r8
  lea    D14(%rip),%r11
  lea    0x1e0(%rsp),%r10
  mov    $0x7,%edi
L58:
  lea    D7(%rip),%rbp
  mov    %r8,%r12
L11:
  mov    (%r12),%esi
  mov    %rbp,%rdx
  mov    $0x7,%ecx
L50:
  movzbl (%rdx),%eax
  sub    $0x1,%eax
  cltq
  mov    %esi,%r13d
  sar    %cl,%r13d
  and    $0x1,%r13d
  mov    %r13d,0xe0(%rsp,%rax,4)
  sub    $0x1,%ecx
  add    $0x1,%rdx
  cmp    $0xffffffff,%ecx
  jne    L50
  add    $0x4,%r12
  add    $0x8,%rbp
  cmp    %r11,%rbp
  jne    L11
  lea    -0x20(%r8),%r12
  lea    0xe0(%rsp),%rbp
L8:
  mov    %r12,%r13
  mov    $0x0,%eax
  mov    $0x0,%esi
L55:
  mov    %edi,%ecx
  sub    %eax,%ecx
  mov    0x0(%rbp,%rax,4),%edx
  shl    %cl,%edx
  or     %edx,%esi
  add    $0x1,%rax
  cmp    $0x8,%rax
  jne    L55
  mov    %esi,0x0(%r13)
  add    $0x4,%r12
  add    $0x20,%rbp
  cmp    %r10,%rbp
  jne    L8
  sub    $0x20,%r8
  cmp    %rbx,%r8
  jne    L58
  mov    $0x0,%ecx
L45:
  mov    $0x0,%eax
L30:
  mov    %ecx,%edx
  xor    (%r8,%rax,4),%dl
  mov    %dl,(%r9,%rax,1)
  add    $0x1,%rax
  cmp    $0x8,%rax
  jne    L30
  add    $0x1,%ecx
  add    $0x20,%r8
  add    $0x8,%r9
  cmp    $0x7,%ecx
  jne    L45
  mov    0x1e8(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L21
  add    $0x1f8,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
L21:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
void key_schedule_block(unsigned char *ck, unsigned char *kk) {
  static const unsigned char key_perm[0x40] = {
      0x12, 0x24, 0x09, 0x07, 0x2A, 0x31, 0x1D, 0x15, 0x1C, 0x36, 0x3E, 0x32, 0x13, 0x21, 0x3B, 0x40, 0x18, 0x14, 0x25, 0x27, 0x02, 0x35, 0x1B, 0x01, 0x22, 0x04, 0x0D, 0x0E, 0x39, 0x28, 0x1A, 0x29, 0x33, 0x23, 0x34, 0x0C, 0x16, 0x30, 0x1E, 0x3A, 0x2D, 0x1F, 0x08, 0x19, 0x17, 0x2F, 0x3D, 0x11, 0x3C, 0x05, 0x38, 0x2B, 0x0B, 0x06, 0x0A, 0x2C, 0x20, 0x3F, 0x2E, 0x0F, 0x03, 0x26, 0x10, 0x37,
  };
  int i, j, k;
  int bit[64];
  int newbit[64];
  int kb[7][8];
  kb[6][0] = ck[0];
  kb[6][1] = ck[1];
  kb[6][2] = ck[2];
  kb[6][3] = ck[3];
  kb[6][4] = ck[4];
  kb[6][5] = ck[5];
  kb[6][6] = ck[6];
  kb[6][7] = ck[7];
  for (i = 5; i >= 0; i--) {
    for (j = 0; j < 8; j++) {
      for (k = 0; k < 8; k++) {
        bit[j * 8 + k] = (kb[i + 1][j] >> (7 - k)) & 1;
        newbit[key_perm[j * 8 + k] - 1] = bit[j * 8 + k];
      }
    }
    for (j = 0; j < 8; j++) {
      kb[i][j] = 0;
      for (k = 0; k < 8; k++) {
        kb[i][j] |= newbit[j * 8 + k] << (7 - k);
      }
    }
  }
  for (i = 0; i < 7; i++) {
    for (j = 0; j < 8; j++) {
      kk[i * 8 + j] = kb[i][j] ^ i;
    }
  }
}
```