user: 请将这段汇编代码片段转换成等效的C代码:

```asm
<packforblock18>:
  endbr64
  mov    %rdi,%rcx
  mov    %rsi,%rdi
  push   %r14
  mov    %rdx,%r8
  mov    (%rdi),%rax
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  mov    (%rdx),%rsi
  mov    0x20(%rax),%r11d
  mov    0x18(%rax),%edx
  mov    0x58(%rax),%r9d
  mov    0x90(%rax),%r13d
  sub    %ecx,%edx
  sub    %ecx,%r11d
  mov    0xb0(%rax),%r12d
  mov    0x70(%rax),%r14d
  sar    $0xa,%edx
  shl    $0x8,%r11d
  sub    %ecx,%r9d
  sub    %ecx,%r13d
  or     %edx,%r11d
  mov    0x50(%rax),%edx
  shl    $0x6,%r9d
  sub    %ecx,%r12d
  shl    $0x4,%r13d
  shl    $0xc,%r12d
  mov    0xc8(%rax),%ebp
  mov    (%rax),%ebx
  sub    %ecx,%edx
  mov    0x38(%rax),%r10d
  sub    %ecx,%r14d
  sar    $0xc,%edx
  sub    %ecx,%ebp
  sar    $0x4,%r14d
  sub    %ecx,%ebx
  or     %edx,%r9d
  mov    0x88(%rax),%edx
  shl    $0x2,%ebp
  sub    %ecx,%r10d
  sar    $0x2,%r10d
  sub    %ecx,%edx
  sar    $0xe,%edx
  or     %edx,%r13d
  mov    0xa8(%rax),%edx
  sub    %ecx,%edx
  sar    $0x6,%edx
  or     %edx,%r12d
  mov    0xc0(%rax),%edx
  sub    %ecx,%edx
  sar    $0x10,%edx
  or     %edx,%ebp
  mov    0x78(%rax),%edx
  sub    %ecx,%edx
  shl    $0xe,%edx
  or     %r14d,%edx
  add    $0x100,%rax
  add    $0x120,%rsi
  movd   %edx,%xmm0
  mov    -0x68(%rax),%edx
  sub    %ecx,%edx
  shl    $0x16,%edx
  or     %edx,%r13d
  mov    -0x48(%rax),%edx
  movd   %r13d,%xmm4
  sub    %ecx,%edx
  punpckldq %xmm4,%xmm0
  shl    $0x1e,%edx
  or     %r12d,%edx
  mov    -0x30(%rax),%r12d
  movd   %edx,%xmm1
  mov    -0x18(%rax),%edx
  sub    %ecx,%r12d
  shl    $0x14,%r12d
  sub    %ecx,%edx
  or     %ebp,%r12d
  mov    -0x20(%rax),%ebp
  shl    $0xa,%edx
  movd   %r12d,%xmm3
  sub    %ecx,%ebp
  punpckldq %xmm3,%xmm1
  sar    $0x8,%ebp
  punpcklqdq %xmm1,%xmm0
  or     %ebp,%edx
  mov    -0x10(%rax),%ebp
  sub    %ecx,%ebp
  shl    $0x1c,%ebp
  or     %edx,%ebp
  mov    -0xf8(%rax),%edx
  sub    %ecx,%edx
  shl    $0x12,%edx
  or     %ebx,%edx
  movd   %edx,%xmm1
  mov    -0xd8(%rax),%edx
  sub    %ecx,%edx
  shl    $0x1a,%edx
  or     %edx,%r11d
  mov    -0xc0(%rax),%edx
  movd   %r11d,%xmm6
  sub    %ecx,%edx
  punpckldq %xmm6,%xmm1
  shl    $0x10,%edx
  or     %r10d,%edx
  mov    -0xa0(%rax),%r10d
  movd   %edx,%xmm2
  sub    %ecx,%r10d
  mov    %r10d,%ecx
  shl    $0x18,%ecx
  or     %r9d,%ecx
  movd   %ecx,%xmm5
  punpckldq %xmm5,%xmm2
  punpcklqdq %xmm2,%xmm1
  movups %xmm1,-0x120(%rsi)
  movups %xmm0,-0x110(%rsi)
  mov    %ebp,-0x100(%rsi)
  pop    %rbx
  mov    %rax,(%rdi)
  pop    %rbp
  mov    %rsi,(%r8)
  pop    %r12
  pop    %r13
  pop    %r14
  ret
```

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