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

```asm
<xor_chacha_sidm>:
  endbr64
  push   %r15
  mov    %rsi,%r15
  mov    $0x3,%esi
  push   %r14
  mov    %rdi,%r14
  mov    $0x2,%edi
  push   %r13
  mov    %r8,%r13
  mov    $0x6,%r8d
  push   %r12
  push   %rbp
  mov    %rdx,%rbp
  xor    %edx,%edx
  push   %rbx
  sub    $0x38,%rsp
  mov    %rcx,0x10(%rsp)
  mov    $0x1,%ecx
  mov    %r9,(%rsp)
  mov    $0x7,%r9d
  push   $0xd
  push   $0xc
  push   $0xf
  push   $0xe
  push   $0x9
  push   $0x8
  push   $0xb
  push   $0xa
  push   $0x5
  push   $0x4
  call   <_mm_setr_epi8@plt>
  add    $0x50,%rsp
  mov    $0x1,%edx
  xor    %esi,%esi
  push   $0xe
  mov    $0x4,%r9d
  mov    $0x7,%r8d
  mov    %eax,%ebx
  push   $0xd
  mov    $0x2,%ecx
  mov    $0x3,%edi
  push   $0xc
  push   $0xf
  push   $0xa
  push   $0x9
  push   $0x8
  push   $0xb
  push   $0x6
  push   $0x5
  call   <_mm_setr_epi8@plt>
  mov    0x0(%r13),%esi
  mov    (%r14),%edi
  add    $0x50,%rsp
  mov    %r13,0x8(%rsp)
  mov    %eax,%r12d
  mov    %r14,0x18(%rsp)
  call   <_mm_xor_si128@plt>
  mov    (%rsp),%rsi
  mov    (%r15),%edi
  mov    %r15,0x20(%rsp)
  mov    %eax,%r13d
  mov    (%rsi),%esi
  call   <_mm_xor_si128@plt>
  mov    0x70(%rsp),%rdi
  mov    %rbp,0x28(%rsp)
  mov    %eax,%r15d
  mov    (%rdi),%esi
  mov    0x0(%rbp),%edi
  call   <_mm_xor_si128@plt>
  mov    0x10(%rsp),%rcx
  mov    0x78(%rsp),%rdi
  mov    %eax,%ebp
  mov    (%rdi),%esi
  mov    (%rcx),%edi
  call   <_mm_xor_si128@plt>
  mov    0x8(%rsp),%rdx
  mov    %eax,%r14d
  mov    0x18(%rsp),%rax
  mov    (%rdx),%esi
  mov    (%rax),%edi
  call   <_mm_xor_si128@plt>
  mov    0x18(%rsp),%rcx
  mov    (%rsp),%rsi
  mov    %eax,(%rcx)
  mov    0x20(%rsp),%rax
  mov    (%rsi),%esi
  mov    (%rax),%edi
  call   <_mm_xor_si128@plt>
  mov    0x20(%rsp),%rcx
  mov    0x70(%rsp),%rdx
  mov    %eax,(%rcx)
  mov    0x28(%rsp),%rax
  mov    (%rdx),%esi
  mov    (%rax),%edi
  call   <_mm_xor_si128@plt>
  mov    0x28(%rsp),%rcx
  mov    %eax,(%rcx)
  mov    0x10(%rsp),%rcx
  mov    0x78(%rsp),%rax
  mov    (%rcx),%edi
  mov    (%rax),%esi
  call   <_mm_xor_si128@plt>
  mov    0x10(%rsp),%rcx
  mov    %eax,(%rcx)
  mov    0x80(%rsp),%eax
  test   %eax,%eax
  jle    L6
  xor    %edx,%edx
  nopl   0x0(%rax,%rax,1)
L5:
  mov    %r15d,%esi
  mov    %r13d,%edi
  mov    %edx,0x8(%rsp)
  call   <_mm_add_epi32@plt>
  mov    %r14d,%edi
  mov    %eax,%esi
  mov    %eax,(%rsp)
  call   <_mm_xor_si128@plt>
  mov    %ebx,%esi
  mov    %eax,%edi
  call   <_mm_shuffle_epi8@plt>
  mov    %ebp,%edi
  mov    %eax,%esi
  mov    %eax,%r13d
  call   <_mm_add_epi32@plt>
  mov    %r15d,%edi
  mov    %eax,%esi
  mov    %eax,%r14d
  call   <_mm_xor_si128@plt>
  mov    $0xc,%esi
  mov    %eax,%ebp
  mov    %eax,%edi
  call   <_mm_slli_epi32@plt>
  mov    %ebp,%edi
  mov    $0x14,%esi
  mov    %eax,%r15d
  call   <_mm_srli_epi32@plt>
  mov    %r15d,%edi
  mov    %eax,%esi
  call   <_mm_xor_si128@plt>
  mov    (%rsp),%edi
  mov    %eax,%esi
  mov    %eax,%r15d
  call   <_mm_add_epi32@plt>
  mov    %r13d,%edi
  mov    %eax,%esi
  mov    %eax,%ebp
  call   <_mm_xor_si128@plt>
  mov    %r12d,%esi
  mov    %eax,%edi
  call   <_mm_shuffle_epi8@plt>
  mov    %r14d,%edi
  mov    %eax,%esi
  mov    %eax,%r13d
  call   <_mm_add_epi32@plt>
  mov    %r15d,%edi
  mov    %eax,%esi
  mov    %eax,%r14d
  call   <_mm_xor_si128@plt>
  mov    $0x7,%esi
  mov    %eax,%r15d
  mov    %eax,%edi
  call   <_mm_slli_epi32@plt>
  mov    %r15d,%edi
  mov    $0x19,%esi
  mov    %eax,(%rsp)
  call   <_mm_srli_epi32@plt>
  mov    (%rsp),%edi
  mov    %eax,%esi
  call   <_mm_xor_si128@plt>
  mov    $0x39,%esi
  mov    %eax,%edi
  call   <_mm_shuffle_epi32@plt>
  mov    %r14d,%edi
  mov    $0x4e,%esi
  mov    %eax,%r15d
  call   <_mm_shuffle_epi32@plt>
  mov    %r13d,%edi
  mov    $0x93,%esi
  mov    %eax,(%rsp)
  call   <_mm_shuffle_epi32@plt>
  mov    %r15d,%esi
  mov    %ebp,%edi
  mov    %eax,%r14d
  call   <_mm_add_epi32@plt>
  mov    %r14d,%edi
  mov    %eax,%esi
  mov    %eax,%r13d
  call   <_mm_xor_si128@plt>
  mov    %ebx,%esi
  mov    %eax,%edi
  call   <_mm_shuffle_epi8@plt>
  mov    (%rsp),%edi
  mov    %eax,%esi
  mov    %eax,%r14d
  call   <_mm_add_epi32@plt>
  mov    %r15d,%edi
  mov    %eax,%esi
  mov    %eax,%ebp
  call   <_mm_xor_si128@plt>
  mov    $0xc,%esi
  mov    %eax,%r15d
  mov    %eax,%edi
  call   <_mm_slli_epi32@plt>
  mov    %r15d,%edi
  mov    $0x14,%esi
  mov    %eax,(%rsp)
  call   <_mm_srli_epi32@plt>
  mov    (%rsp),%edi
  mov    %eax,%esi
  call   <_mm_xor_si128@plt>
  mov    %r13d,%edi
  mov    %eax,%esi
  mov    %eax,%r15d
  call   <_mm_add_epi32@plt>
  mov    %r14d,%edi
  mov    %eax,%esi
  mov    %eax,%r13d
  call   <_mm_xor_si128@plt>
  mov    %r12d,%esi
  mov    %eax,%edi
  call   <_mm_shuffle_epi8@plt>
  mov    %ebp,%edi
  mov    %eax,%esi
  mov    %eax,%r14d
  call   <_mm_add_epi32@plt>
  mov    %r15d,%edi
  mov    %eax,%esi
  mov    %eax,%ebp
  call   <_mm_xor_si128@plt>
  mov    $0x7,%esi
  mov    %eax,%r15d
  mov    %eax,%edi
  call   <_mm_slli_epi32@plt>
  mov    %r15d,%edi
  mov    $0x19,%esi
  mov    %eax,(%rsp)
  call   <_mm_srli_epi32@plt>
  mov    (%rsp),%edi
  mov    %eax,%esi
  call   <_mm_xor_si128@plt>
  mov    $0x93,%esi
  mov    %eax,%edi
  call   <_mm_shuffle_epi32@plt>
  mov    %ebp,%edi
  mov    $0x4e,%esi
  mov    %eax,%r15d
  call   <_mm_shuffle_epi32@plt>
  mov    %r14d,%edi
  mov    $0x39,%esi
  mov    %eax,%ebp
  call   <_mm_shuffle_epi32@plt>
  mov    0x8(%rsp),%edx
  mov    %eax,%r14d
  add    $0x1,%edx
  cmp    %edx,0x80(%rsp)
  jne    L5
L6:
  mov    0x18(%rsp),%rbx
  mov    %r13d,%esi
  mov    (%rbx),%edi
  call   <_mm_add_epi32@plt>
  mov    %r15d,%esi
  mov    %eax,(%rbx)
  mov    0x20(%rsp),%rbx
  mov    (%rbx),%edi
  call   <_mm_add_epi32@plt>
  mov    %ebp,%esi
  mov    %eax,(%rbx)
  mov    0x28(%rsp),%rbx
  mov    (%rbx),%edi
  call   <_mm_add_epi32@plt>
  mov    %r14d,%esi
  mov    %eax,(%rbx)
  mov    0x10(%rsp),%rbx
  mov    (%rbx),%edi
  call   <_mm_add_epi32@plt>
  mov    %eax,(%rbx)
  add    $0x38,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
```

assistant: ```c
void xor_chacha_sidm(__m128i *calc_16, __m128i *calc_12, __m128i *calc_8, __m128i *calc_7, __m128i *calc_1, __m128i *calc_2, __m128i *calc_3, __m128i *calc_4, uint32_t double_rounds) {
  int i;
  __m128i _calc;
  __m128i _rotate_16 = _mm_setr_epi8(2, 3, 0, 1, 6, 7, 4, 5, 10, 11, 8, 9, 14, 15, 12, 13);
  __m128i _rotate_8 = _mm_setr_epi8(3, 0, 1, 2, 7, 4, 5, 6, 11, 8, 9, 10, 15, 12, 13, 14);
  __m128i rowa = _mm_xor_si128(*calc_16, *calc_1);
  ;
  __m128i rowb = _mm_xor_si128(*calc_12, *calc_2);
  ;
  __m128i rowc = _mm_xor_si128(*calc_8, *calc_3);
  ;
  __m128i rowd = _mm_xor_si128(*calc_7, *calc_4);
  ;
  *calc_16 = _mm_xor_si128(*calc_16, *calc_1);
  *calc_12 = _mm_xor_si128(*calc_12, *calc_2);
  *calc_8 = _mm_xor_si128(*calc_8, *calc_3);
  *calc_7 = _mm_xor_si128(*calc_7, *calc_4);
  for (i = 0; i < double_rounds; i++) {
    rowa = _mm_add_epi32(rowa, rowb);
    rowd = _mm_xor_si128(rowd, rowa);
    rowd = _mm_shuffle_epi8(rowd, _rotate_16);
    rowc = _mm_add_epi32(rowc, rowd);
    _calc = _mm_xor_si128(rowb, rowc);
    rowb = _mm_slli_epi32(_calc, (12));
    _calc = _mm_srli_epi32(_calc, (32 - 12));
    rowb = _mm_xor_si128(rowb, _calc);
    rowa = _mm_add_epi32(rowa, rowb);
    rowd = _mm_xor_si128(rowd, rowa);
    rowd = _mm_shuffle_epi8(rowd, _rotate_8);
    rowc = _mm_add_epi32(rowc, rowd);
    _calc = _mm_xor_si128(rowb, rowc);
    rowb = _mm_slli_epi32(_calc, (7));
    _calc = _mm_srli_epi32(_calc, (32 - 7));
    rowb = _mm_xor_si128(rowb, _calc);
    rowb = _mm_shuffle_epi32(rowb, 0x39);
    rowc = _mm_shuffle_epi32(rowc, 0x4e);
    rowd = _mm_shuffle_epi32(rowd, 0x93);
    rowa = _mm_add_epi32(rowa, rowb);
    rowd = _mm_xor_si128(rowd, rowa);
    rowd = _mm_shuffle_epi8(rowd, _rotate_16);
    rowc = _mm_add_epi32(rowc, rowd);
    _calc = _mm_xor_si128(rowb, rowc);
    rowb = _mm_slli_epi32(_calc, (12));
    _calc = _mm_srli_epi32(_calc, (32 - 12));
    rowb = _mm_xor_si128(rowb, _calc);
    rowa = _mm_add_epi32(rowa, rowb);
    rowd = _mm_xor_si128(rowd, rowa);
    rowd = _mm_shuffle_epi8(rowd, _rotate_8);
    rowc = _mm_add_epi32(rowc, rowd);
    _calc = _mm_xor_si128(rowb, rowc);
    rowb = _mm_slli_epi32(_calc, (7));
    _calc = _mm_srli_epi32(_calc, (32 - 7));
    rowb = _mm_xor_si128(rowb, _calc);
    rowb = _mm_shuffle_epi32(rowb, 0x93);
    rowc = _mm_shuffle_epi32(rowc, 0x4e);
    rowd = _mm_shuffle_epi32(rowd, 0x39);
  }
  *calc_16 = _mm_add_epi32(*calc_16, rowa);
  *calc_12 = _mm_add_epi32(*calc_12, rowb);
  *calc_8 = _mm_add_epi32(*calc_8, rowc);
  *calc_7 = _mm_add_epi32(*calc_7, rowd);
}
```