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

```asm
<gf8_muladd_A3>:
  endbr64
  test   %edx,%edx
  je     L1
  mov    %rdi,%rax
  lea    (%rdx,%rdx,1),%edi
  push   %r15
  mov    %rsi,%rcx
  push   %r14
  push   %r13
  push   %r12
  mov    %edx,%r12d
  push   %rbp
  shl    $0x2,%r12
  push   %rbx
  lea    0x0(,%rdi,4),%rbx
  add    %edx,%edi
  mov    %rdi,%rsi
  lea    0x0(,%rdi,4),%rbp
  mov    %r12d,%edi
  add    %esi,%esi
  shl    $0x2,%rdi
  lea    0x0(,%rsi,4),%r13
  lea    0x0(,%rdx,8),%esi
  mov    %rdi,-0x18(%rsp)
  sub    %edx,%esi
  lea    (%rdx,%rdx,4),%edi
  lea    0x0(,%rsi,4),%r15
  lea    (%rax,%r12,1),%rsi
  mov    %rsi,-0x8(%rsp)
  lea    0x0(,%rdi,4),%r14
  cs nopw 0x0(%rax,%rax,1)
L17:
  mov    (%rax,%rbx,1),%edx
  mov    (%rax,%r12,1),%r10d
  add    $0x4,%rcx
  add    $0x4,%rax
  mov    -0x4(%rax,%r13,1),%edi
  mov    -0x4(%rax,%r14,1),%r9d
  mov    %edx,%r11d
  mov    -0x4(%rax,%rbp,1),%r8d
  mov    %r10d,-0x10(%rsp)
  mov    %edi,-0x1c(%rsp)
  xor    %edi,%r11d
  mov    %r10d,%edi
  mov    -0x4(%rax,%r15,1),%esi
  xor    %r9d,%edi
  mov    %r8d,-0xc(%rsp)
  xor    %edx,%r8d
  mov    %edi,%r10d
  mov    -0x4(%rax),%edi
  mov    %r9d,-0x20(%rsp)
  mov    %r10d,-0x24(%rsp)
  xor    %r10d,%r8d
  mov    -0x18(%rsp),%r10
  xor    %r11d,%edi
  mov    -0x4(%rax,%r10,1),%r9d
  xor    %edi,%r9d
  xor    %r8d,%edi
  mov    %r9d,%r10d
  mov    -0x4(%rcx),%r9d
  xor    %esi,%edi
  xor    -0x10(%rsp),%esi
  xor    %edi,%r9d
  mov    %r9d,-0x4(%rax)
  xor    -0x4(%rcx,%r12,1),%esi
  xor    %r10d,%esi
  mov    -0x1c(%rsp),%r9d
  mov    %esi,-0x4(%rax,%r12,1)
  xor    -0x4(%rcx,%rbx,1),%r11d
  mov    %r11d,-0x4(%rax,%rbx,1)
  mov    -0x18(%rsp),%r11
  xor    -0x4(%rcx,%rbp,1),%r9d
  xor    -0x24(%rsp),%r9d
  mov    %r9d,-0x4(%rax,%rbp,1)
  xor    -0x4(%rcx,%r11,1),%r8d
  mov    %r8d,-0x4(%rax,%r11,1)
  mov    -0xc(%rsp),%esi
  xor    -0x4(%rcx,%r14,1),%esi
  xor    %r10d,%esi
  mov    %esi,-0x4(%rax,%r14,1)
  xor    -0x4(%rcx,%r13,1),%edx
  xor    %r10d,%edx
  xor    %edi,%edx
  mov    %edx,-0x4(%rax,%r13,1)
  mov    -0x20(%rsp),%edx
  xor    -0x4(%rcx,%r15,1),%edx
  xor    %r10d,%edx
  mov    %edx,-0x4(%rax,%r15,1)
  cmp    -0x8(%rsp),%rax
  jne    L17
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax,%rax,1)
L1:
  ret
```

assistant: ```c
void gf8_muladd_A3(uint8_t *out, uint8_t *in, unsigned int width) {
  unsigned int i;
  uint64_t *in_ptr = (uint64_t *)in;
  uint64_t *out_ptr = (uint64_t *)out;
  for (i = 0; i < width; i++) {
    uint64_t out0, out1, out2, out3, out4, out5, out6, out7;
    uint64_t tmp0, tmp1;
    uint64_t in0 = out_ptr[0];
    uint64_t in1 = out_ptr[width];
    uint64_t in2 = out_ptr[width * 2];
    uint64_t in3 = out_ptr[width * 3];
    uint64_t in4 = out_ptr[width * 4];
    uint64_t in5 = out_ptr[width * 5];
    uint64_t in6 = out_ptr[width * 6];
    uint64_t in7 = out_ptr[width * 7];
    out2 = in2 ^ in6;
    out3 = in1 ^ in5 ^ in6;
    tmp0 = out2 ^ in0;
    out4 = out2 ^ out3 ^ in3;
    tmp1 = tmp0 ^ in4;
    out0 = tmp0 ^ out4 ^ in7;
    out5 = tmp1 ^ in3;
    out7 = tmp1 ^ in5;
    out1 = tmp1 ^ in1 ^ in7;
    out6 = tmp1 ^ out0 ^ in2;
    out_ptr[0] = out0 ^ in_ptr[0];
    out_ptr[width] = out1 ^ in_ptr[width];
    out_ptr[width * 2] = out2 ^ in_ptr[width * 2];
    out_ptr[width * 3] = out3 ^ in_ptr[width * 3];
    out_ptr[width * 4] = out4 ^ in_ptr[width * 4];
    out_ptr[width * 5] = out5 ^ in_ptr[width * 5];
    out_ptr[width * 6] = out6 ^ in_ptr[width * 6];
    out_ptr[width * 7] = out7 ^ in_ptr[width * 7];
    in_ptr++;
    out_ptr++;
  }
}
```