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

```asm
<packforblock18_64>:
  endbr64
  push   %r15
  mov    %edi,%ecx
  push   %r14
  push   %r13
  mov    %rdx,%r13
  push   %r12
  mov    %rsi,%r12
  push   %rbp
  push   %rbx
  mov    (%rsi),%rax
  mov    (%rdx),%rdx
  mov    (%rax),%r14d
  mov    0x10(%rax),%esi
  mov    0x14(%rax),%ebp
  mov    0x20(%rax),%ebx
  sub    %edi,%r14d
  mov    0xc(%rax),%edi
  sub    %ecx,%esi
  mov    0x30(%rax),%r11d
  sub    %ecx,%ebp
  shl    $0x8,%esi
  sub    %ecx,%ebx
  mov    0x3c(%rax),%r10d
  sub    %ecx,%edi
  shl    $0x1a,%ebp
  sub    %ecx,%r11d
  mov    0x4c(%rax),%r9d
  sar    $0xa,%edi
  shl    $0x10,%ebx
  sub    %ecx,%r10d
  mov    0x5c(%rax),%r8d
  shl    $0x18,%r11d
  or     %edi,%esi
  mov    0x28(%rax),%edi
  shl    $0xe,%r10d
  or     %esi,%ebp
  mov    0x1c(%rax),%esi
  mov    0x74(%rax),%r15d
  sub    %ecx,%edi
  sub    %ecx,%esi
  sar    $0xc,%edi
  sar    $0x2,%esi
  or     %esi,%ebx
  mov    0x2c(%rax),%esi
  sub    %ecx,%esi
  shl    $0x6,%esi
  or     %edi,%esi
  mov    0x44(%rax),%edi
  or     %esi,%r11d
  mov    0x38(%rax),%esi
  sub    %ecx,%edi
  sub    %ecx,%esi
  sar    $0xe,%edi
  sar    $0x4,%esi
  or     %esi,%r10d
  mov    0x48(%rax),%esi
  sub    %ecx,%esi
  shl    $0x4,%esi
  or     %edi,%esi
  sub    %ecx,%r9d
  mov    0x54(%rax),%edi
  sub    %ecx,%r8d
  shl    $0x16,%r9d
  shl    $0x1e,%r8d
  sub    %ecx,%r15d
  sub    $0xffffffffffffff80,%rax
  or     %esi,%r9d
  mov    -0x28(%rax),%esi
  sub    %ecx,%edi
  shl    $0xa,%r15d
  sar    $0x6,%edi
  sub    %ecx,%esi
  shl    $0xc,%esi
  or     %edi,%esi
  mov    -0x20(%rax),%edi
  or     %esi,%r8d
  mov    -0x1c(%rax),%esi
  sub    %ecx,%edi
  sub    %ecx,%esi
  sar    $0x10,%edi
  shl    $0x2,%esi
  or     %edi,%esi
  mov    -0x18(%rax),%edi
  sub    %ecx,%edi
  shl    $0x14,%edi
  or     %esi,%edi
  mov    -0x10(%rax),%esi
  sub    %ecx,%esi
  sar    $0x8,%esi
  or     %esi,%r15d
  mov    -0x8(%rax),%esi
  sub    %ecx,%esi
  shl    $0x1c,%esi
  or     %r15d,%esi
  mov    -0x7c(%rax),%r15d
  sub    %ecx,%r15d
  mov    %r15d,%ecx
  shl    $0x12,%ecx
  or     %r14d,%ecx
  mov    %ecx,(%rdx)
  mov    %ebp,0x4(%rdx)
  mov    %ebx,0x8(%rdx)
  mov    %r11d,0xc(%rdx)
  mov    %r10d,0x10(%rdx)
  mov    %r9d,0x14(%rdx)
  mov    %r8d,0x18(%rdx)
  mov    %edi,0x1c(%rdx)
  mov    %esi,0x20(%rdx)
  pop    %rbx
  mov    %rax,(%r12)
  pop    %rbp
  addq   $0x120,0x0(%r13)
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
```

assistant: ```c
void packforblock18_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;
  w0 = (in[0] - base);
  w0 |= (in[1] - base) << 18;
  w0 |= (in[2] - base) << 36;
  w0 |= (in[3] - base) << 54;
  w1 = (in[3] - base) >> 10;
  w1 |= (in[4] - base) << 8;
  w1 |= (in[5] - base) << 26;
  w1 |= (in[6] - base) << 44;
  w1 |= (in[7] - base) << 62;
  w2 = (in[7] - base) >> 2;
  w2 |= (in[8] - base) << 16;
  w2 |= (in[9] - base) << 34;
  w2 |= (in[10] - base) << 52;
  w3 = (in[10] - base) >> 12;
  w3 |= (in[11] - base) << 6;
  w3 |= (in[12] - base) << 24;
  w3 |= (in[13] - base) << 42;
  w3 |= (in[14] - base) << 60;
  w4 = (in[14] - base) >> 4;
  w4 |= (in[15] - base) << 14;
  w4 |= (in[16] - base) << 32;
  w4 |= (in[17] - base) << 50;
  w5 = (in[17] - base) >> 14;
  w5 |= (in[18] - base) << 4;
  w5 |= (in[19] - base) << 22;
  w5 |= (in[20] - base) << 40;
  w5 |= (in[21] - base) << 58;
  w6 = (in[21] - base) >> 6;
  w6 |= (in[22] - base) << 12;
  w6 |= (in[23] - base) << 30;
  w6 |= (in[24] - base) << 48;
  w7 = (in[24] - base) >> 16;
  w7 |= (in[25] - base) << 2;
  w7 |= (in[26] - base) << 20;
  w7 |= (in[27] - base) << 38;
  w7 |= (in[28] - base) << 56;
  w8 = (in[28] - base) >> 8;
  w8 |= (in[29] - base) << 10;
  w8 |= (in[30] - base) << 28;
  w8 |= (in[31] - base) << 46;
  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;
  *pin += 32;
  *pw += 72;
}
```