user: 请将以下的汇编代码转换成C语言代码：

```asm
<packforblock40_64>:
  endbr64
  mov    %rsi,%r8
  push   %r14
  mov    %rdx,%rsi
  mov    %edi,%r14d
  mov    (%r8),%rax
  push   %rbp
  mov    $0x20,%ecx
  push   %rbx
  mov    (%rdx),%rdi
  mov    0x18(%rax),%ebx
  mov    0x1c(%rax),%edx
  mov    0x24(%rax),%r11d
  mov    0x30(%rax),%ebp
  sub    %r14d,%ebx
  sub    %r14d,%edx
  mov    0x4(%rax),%r10d
  mov    0x10(%rax),%r9d
  sar    $0x10,%ebx
  shl    $0x18,%edx
  sub    %r14d,%r11d
  sub    %r14d,%ebp
  or     %ebx,%edx
  sar    $0x18,%r11d
  mov    0x20(%rax),%ebx
  sub    %r14d,%r10d
  sar    %cl,%ebp
  movd   %edx,%xmm4
  mov    0x28(%rax),%edx
  sub    %r14d,%r9d
  sar    %cl,%r9d
  sub    %r14d,%ebx
  sar    $0x18,%r10d
  sub    %r14d,%edx
  movd   %ebx,%xmm7
  mov    0x44(%rax),%ebx
  shl    $0x10,%edx
  punpckldq %xmm7,%xmm4
  or     %r11d,%edx
  mov    0x2c(%rax),%r11d
  sub    %r14d,%ebx
  movd   %edx,%xmm0
  mov    0x34(%rax),%edx
  sar    $0x18,%ebx
  sub    %r14d,%r11d
  sub    %r14d,%edx
  sar    $0x8,%r11d
  shl    $0x8,%edx
  movd   %r11d,%xmm6
  mov    0x38(%rax),%r11d
  or     %ebp,%edx
  punpckldq %xmm6,%xmm0
  mov    0x64(%rax),%ebp
  movd   %edx,%xmm3
  mov    0x3c(%rax),%edx
  sub    %r14d,%r11d
  punpcklqdq %xmm0,%xmm4
  sar    $0x10,%r11d
  sub    %r14d,%edx
  shl    $0x18,%edx
  or     %r11d,%edx
  mov    0x40(%rax),%r11d
  movd   %edx,%xmm7
  mov    0x4c(%rax),%edx
  sub    %r14d,%r11d
  punpckldq %xmm7,%xmm3
  movd   %r11d,%xmm0
  mov    0x48(%rax),%r11d
  sub    %r14d,%r11d
  shl    $0x10,%r11d
  or     %ebx,%r11d
  sub    %r14d,%edx
  mov    0x58(%rax),%ebx
  sub    %r14d,%ebp
  sar    $0x8,%edx
  movd   %r11d,%xmm6
  mov    0x50(%rax),%r11d
  sar    $0x18,%ebp
  movd   %edx,%xmm1
  mov    0x54(%rax),%edx
  sub    %r14d,%ebx
  punpckldq %xmm6,%xmm0
  sub    %r14d,%r11d
  sar    $0x10,%ebx
  punpcklqdq %xmm0,%xmm3
  sub    %r14d,%edx
  sar    %cl,%r11d
  shl    $0x8,%edx
  or     %edx,%r11d
  mov    0x5c(%rax),%edx
  movd   %r11d,%xmm7
  mov    0x70(%rax),%r11d
  sub    %r14d,%edx
  punpckldq %xmm7,%xmm1
  shl    $0x18,%edx
  sub    %r14d,%r11d
  or     %ebx,%edx
  mov    0x60(%rax),%ebx
  sar    %cl,%r11d
  movd   %edx,%xmm0
  mov    0x68(%rax),%edx
  sub    %r14d,%ebx
  sub    %r14d,%edx
  movd   %ebx,%xmm6
  mov    0x78(%rax),%ebx
  shl    $0x10,%edx
  punpckldq %xmm6,%xmm0
  or     %ebp,%edx
  punpcklqdq %xmm0,%xmm1
  sub    %r14d,%ebx
  movd   %edx,%xmm0
  mov    0x6c(%rax),%edx
  sar    $0x10,%ebx
  sub    %r14d,%edx
  sar    $0x8,%edx
  movd   %edx,%xmm5
  mov    0x74(%rax),%edx
  punpckldq %xmm5,%xmm0
  sub    %r14d,%edx
  shl    $0x8,%edx
  or     %r11d,%edx
  mov    0x7c(%rax),%r11d
  mov    (%rax),%ecx
  movd   %edx,%xmm2
  mov    0x8(%rax),%edx
  sub    %r14d,%r11d
  sub    %r14d,%ecx
  shl    $0x18,%r11d
  or     %ebx,%r11d
  sub    %r14d,%edx
  sub    $0xffffffffffffff80,%rax
  movd   %r11d,%xmm6
  mov    -0x6c(%rax),%r11d
  shl    $0x10,%edx
  punpckldq %xmm6,%xmm2
  or     %edx,%r10d
  mov    -0x74(%rax),%edx
  movups %xmm4,0x10(%rdi)
  sub    %r14d,%r11d
  punpcklqdq %xmm2,%xmm0
  movd   %ecx,%xmm2
  movups %xmm3,0x20(%rdi)
  mov    %r11d,%ecx
  sub    %r14d,%edx
  movd   %r10d,%xmm6
  movups %xmm1,0x30(%rdi)
  shl    $0x8,%ecx
  sar    $0x8,%edx
  punpckldq %xmm6,%xmm2
  movups %xmm0,0x40(%rdi)
  or     %r9d,%ecx
  movd   %edx,%xmm5
  movd   %ecx,%xmm7
  punpckldq %xmm7,%xmm5
  punpcklqdq %xmm5,%xmm2
  movups %xmm2,(%rdi)
  pop    %rbx
  pop    %rbp
  mov    %rax,(%r8)
  pop    %r14
  addq   $0x280,(%rsi)
  ret
```

assistant: ```c
void packforblock40_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;
  uint64_t w12;
  uint64_t w13;
  uint64_t w14;
  uint64_t w15;
  uint64_t w16;
  uint64_t w17;
  uint64_t w18;
  uint64_t w19;
  w0 = (in[0] - base);
  w0 |= (in[1] - base) << 40;
  w1 = (in[1] - base) >> 24;
  w1 |= (in[2] - base) << 16;
  w1 |= (in[3] - base) << 56;
  w2 = (in[3] - base) >> 8;
  w2 |= (in[4] - base) << 32;
  w3 = (in[4] - base) >> 32;
  w3 |= (in[5] - base) << 8;
  w3 |= (in[6] - base) << 48;
  w4 = (in[6] - base) >> 16;
  w4 |= (in[7] - base) << 24;
  w5 = (in[8] - base);
  w5 |= (in[9] - base) << 40;
  w6 = (in[9] - base) >> 24;
  w6 |= (in[10] - base) << 16;
  w6 |= (in[11] - base) << 56;
  w7 = (in[11] - base) >> 8;
  w7 |= (in[12] - base) << 32;
  w8 = (in[12] - base) >> 32;
  w8 |= (in[13] - base) << 8;
  w8 |= (in[14] - base) << 48;
  w9 = (in[14] - base) >> 16;
  w9 |= (in[15] - base) << 24;
  w10 = (in[16] - base);
  w10 |= (in[17] - base) << 40;
  w11 = (in[17] - base) >> 24;
  w11 |= (in[18] - base) << 16;
  w11 |= (in[19] - base) << 56;
  w12 = (in[19] - base) >> 8;
  w12 |= (in[20] - base) << 32;
  w13 = (in[20] - base) >> 32;
  w13 |= (in[21] - base) << 8;
  w13 |= (in[22] - base) << 48;
  w14 = (in[22] - base) >> 16;
  w14 |= (in[23] - base) << 24;
  w15 = (in[24] - base);
  w15 |= (in[25] - base) << 40;
  w16 = (in[25] - base) >> 24;
  w16 |= (in[26] - base) << 16;
  w16 |= (in[27] - base) << 56;
  w17 = (in[27] - base) >> 8;
  w17 |= (in[28] - base) << 32;
  w18 = (in[28] - base) >> 32;
  w18 |= (in[29] - base) << 8;
  w18 |= (in[30] - base) << 48;
  w19 = (in[30] - base) >> 16;
  w19 |= (in[31] - base) << 24;
  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;
  pw64[12] = w12;
  pw64[13] = w13;
  pw64[14] = w14;
  pw64[15] = w15;
  pw64[16] = w16;
  pw64[17] = w17;
  pw64[18] = w18;
  pw64[19] = w19;
  *pin += 32;
  *pw += 160;
}
```