user: Please show me the C implementation that matches the assembly code listed below:

```asm
<packforblock24_64>:
  endbr64
  push   %r15
  mov    %edi,%ecx
  push   %r14
  mov    %rdx,%r14
  push   %r13
  mov    %rsi,%r13
  push   %r12
  push   %rbp
  push   %rbx
  mov    (%rsi),%rax
  mov    (%rdx),%rdx
  mov    0x8(%rax),%esi
  mov    0xc(%rax),%r12d
  mov    (%rax),%ebx
  mov    0x18(%rax),%ebp
  sub    %edi,%esi
  sub    %edi,%r12d
  mov    0x2c(%rax),%r11d
  mov    0x38(%rax),%r10d
  sar    $0x10,%esi
  shl    $0x8,%r12d
  sub    %edi,%ebx
  sub    %edi,%ebp
  or     %esi,%r12d
  mov    0x14(%rax),%esi
  mov    %ebx,-0xc(%rsp)
  shl    $0x10,%ebp
  mov    0x24(%rax),%ebx
  sub    %edi,%r11d
  sub    %edi,%r10d
  mov    0x44(%rax),%r9d
  sub    %edi,%esi
  shl    $0x8,%r11d
  mov    0x64(%rax),%r8d
  mov    0x6c(%rax),%r15d
  sar    $0x8,%esi
  sub    %edi,%ebx
  shl    $0x10,%r10d
  sub    %edi,%r9d
  shl    $0x18,%ebx
  or     %esi,%ebp
  mov    0x20(%rax),%esi
  shl    $0x18,%r9d
  sub    %edi,%esi
  or     %esi,%ebx
  mov    0x28(%rax),%esi
  sub    %edi,%esi
  sar    $0x10,%esi
  or     %esi,%r11d
  mov    0x34(%rax),%esi
  sub    %edi,%esi
  sar    $0x8,%esi
  or     %esi,%r10d
  mov    0x40(%rax),%esi
  sub    %edi,%esi
  or     %esi,%r9d
  mov    0x48(%rax),%esi
  sub    %edi,%esi
  mov    0x4c(%rax),%edi
  sar    $0x10,%esi
  sub    %ecx,%edi
  shl    $0x8,%edi
  sub    %ecx,%r8d
  sub    %ecx,%r15d
  sub    $0xffffffffffffff80,%rax
  or     %esi,%edi
  mov    -0x2c(%rax),%esi
  shl    $0x18,%r8d
  mov    %edi,-0x8(%rsp)
  mov    -0x28(%rax),%edi
  sub    %ecx,%esi
  sub    %ecx,%edi
  sar    $0x8,%esi
  shl    $0x10,%edi
  or     %esi,%edi
  mov    -0x20(%rax),%esi
  mov    %edi,-0x4(%rsp)
  mov    %r15d,%edi
  sub    %ecx,%esi
  shl    $0x8,%edi
  or     %esi,%r8d
  mov    -0x18(%rax),%esi
  mov    -0xc(%rax),%r15d
  sub    %ecx,%esi
  sub    %ecx,%r15d
  sar    $0x10,%esi
  sar    $0x8,%r15d
  or     %esi,%edi
  mov    -0x8(%rax),%esi
  sub    %ecx,%esi
  shl    $0x10,%esi
  or     %r15d,%esi
  mov    -0x7c(%rax),%r15d
  mov    %ebx,0xc(%rdx)
  mov    -0x8(%rsp),%ebx
  mov    %r12d,0x4(%rdx)
  sub    %ecx,%r15d
  mov    %ebp,0x8(%rdx)
  mov    %ebx,0x1c(%rdx)
  mov    -0x4(%rsp),%ebx
  shl    $0x18,%r15d
  or     -0xc(%rsp),%r15d
  mov    %r11d,0x10(%rdx)
  mov    %r15d,(%rdx)
  mov    %r10d,0x14(%rdx)
  mov    %r9d,0x18(%rdx)
  mov    %ebx,0x20(%rdx)
  mov    %r8d,0x24(%rdx)
  mov    %edi,0x28(%rdx)
  mov    %esi,0x2c(%rdx)
  pop    %rbx
  mov    %rax,0x0(%r13)
  pop    %rbp
  addq   $0x180,(%r14)
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
```

assistant: ```c
void packforblock24_64(const uint64_t base, const uint64_t **pin, uint8_t **pw) {
  uint64_t *pw64 = *(uint64_t **)pw;
  const uint64_t *in = *pin;
  uint64_t w0;
  uint64_t w1;
  uint64_t w2;
  uint64_t w3;
  uint64_t w4;
  uint64_t w5;
  uint64_t w6;
  uint64_t w7;
  uint64_t w8;
  uint64_t w9;
  uint64_t w10;
  uint64_t w11;
  w0 = (in[0] - base);
  w0 |= (in[1] - base) << 24;
  w0 |= (in[2] - base) << 48;
  w1 = (in[2] - base) >> 16;
  w1 |= (in[3] - base) << 8;
  w1 |= (in[4] - base) << 32;
  w1 |= (in[5] - base) << 56;
  w2 = (in[5] - base) >> 8;
  w2 |= (in[6] - base) << 16;
  w2 |= (in[7] - base) << 40;
  w3 = (in[8] - base);
  w3 |= (in[9] - base) << 24;
  w3 |= (in[10] - base) << 48;
  w4 = (in[10] - base) >> 16;
  w4 |= (in[11] - base) << 8;
  w4 |= (in[12] - base) << 32;
  w4 |= (in[13] - base) << 56;
  w5 = (in[13] - base) >> 8;
  w5 |= (in[14] - base) << 16;
  w5 |= (in[15] - base) << 40;
  w6 = (in[16] - base);
  w6 |= (in[17] - base) << 24;
  w6 |= (in[18] - base) << 48;
  w7 = (in[18] - base) >> 16;
  w7 |= (in[19] - base) << 8;
  w7 |= (in[20] - base) << 32;
  w7 |= (in[21] - base) << 56;
  w8 = (in[21] - base) >> 8;
  w8 |= (in[22] - base) << 16;
  w8 |= (in[23] - base) << 40;
  w9 = (in[24] - base);
  w9 |= (in[25] - base) << 24;
  w9 |= (in[26] - base) << 48;
  w10 = (in[26] - base) >> 16;
  w10 |= (in[27] - base) << 8;
  w10 |= (in[28] - base) << 32;
  w10 |= (in[29] - base) << 56;
  w11 = (in[29] - base) >> 8;
  w11 |= (in[30] - base) << 16;
  w11 |= (in[31] - base) << 40;
  pw64[0] = w0;
  pw64[1] = w1;
  pw64[2] = w2;
  pw64[3] = w3;
  pw64[4] = w4;
  pw64[5] = w5;
  pw64[6] = w6;
  pw64[7] = w7;
  pw64[8] = w8;
  pw64[9] = w9;
  pw64[10] = w10;
  pw64[11] = w11;
  *pin += 32;
  *pw += 96;
}
```