user: What would the C source look like for the assembly code provided here?

```asm
<yaffs_ecc_correct>:
  endbr64
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  mov    %rdx,%r12
  movzbl (%rsi),%edx
  xor    (%r12),%dl
  movzbl 0x1(%rsi),%r14d
  xor    0x1(%r12),%r14b
  movzbl 0x2(%rsi),%r13d
  xor    0x2(%r12),%r13b
  mov    %edx,%ecx
  or     %r14d,%ecx
  mov    $0x0,%eax
  or     %r13b,%cl
  je     L14
  mov    %rsi,%rbp
  mov    %edx,%eax
  shr    %al
  xor    %edx,%eax
  and    $0x55,%eax
  cmp    $0x55,%al
  jne    L51
  mov    %r14d,%eax
  shr    %al
  xor    %r14d,%eax
  and    $0x55,%eax
  cmp    $0x55,%al
  je     L13
L51:
  movzbl %dl,%edi
  call   <yaffs_hweight8@plt>
  mov    %eax,%ebx
  movzbl %r14b,%edi
  call   <yaffs_hweight8@plt>
  add    %eax,%ebx
  movzbl %r13b,%edi
  call   <yaffs_hweight8@plt>
  add    %ebx,%eax
  cmp    $0x1,%eax
  je     L64
  mov    $0xffffffff,%eax
L14:
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
L13:
  mov    %r13d,%eax
  shr    %al
  xor    %r13d,%eax
  and    $0x54,%eax
  cmp    $0x54,%al
  jne    L51
  mov    %r14d,%eax
  and    $0x80,%eax
  mov    %eax,%ecx
  or     $0x40,%ecx
  test   $0x20,%r14b
  cmovne %ecx,%eax
  mov    %eax,%ecx
  or     $0x20,%ecx
  test   $0x8,%r14b
  cmovne %ecx,%eax
  mov    %eax,%ecx
  or     $0x10,%ecx
  test   $0x2,%r14b
  cmovne %ecx,%eax
  mov    %eax,%ecx
  or     $0x8,%ecx
  test   %dl,%dl
  cmovs  %ecx,%eax
  mov    %eax,%ecx
  or     $0x4,%ecx
  test   $0x20,%dl
  cmovne %ecx,%eax
  mov    %eax,%ecx
  or     $0x2,%ecx
  test   $0x8,%dl
  cmovne %ecx,%eax
  mov    %eax,%ecx
  or     $0x1,%ecx
  test   $0x2,%dl
  cmovne %ecx,%eax
  mov    %r13d,%ecx
  shr    $0x5,%ecx
  and    $0x4,%ecx
  mov    %ecx,%edx
  or     $0x2,%edx
  test   $0x20,%r13b
  cmovne %edx,%ecx
  mov    %ecx,%edx
  or     $0x1,%edx
  test   $0x8,%r13b
  cmovne %edx,%ecx
  mov    %eax,%eax
  mov    $0x1,%edx
  shl    %cl,%edx
  xor    %dl,(%rdi,%rax,1)
  mov    $0x1,%eax
  jmp    L14
L64:
  movzbl (%r12),%edx
  mov    %dl,0x0(%rbp)
  movzbl 0x1(%r12),%edx
  mov    %dl,0x1(%rbp)
  movzbl 0x2(%r12),%edx
  mov    %dl,0x2(%rbp)
  jmp    L14
```

assistant: ```c
int yaffs_ecc_correct(unsigned char *data, unsigned char *read_ecc, const unsigned char *test_ecc) {
  unsigned char d0, d1, d2;
  d0 = read_ecc[0] ^ test_ecc[0];
  d1 = read_ecc[1] ^ test_ecc[1];
  d2 = read_ecc[2] ^ test_ecc[2];
  if ((d0 | d1 | d2) == 0)
    return 0;
  if (((d0 ^ (d0 >> 1)) & 0x55) == 0x55 && ((d1 ^ (d1 >> 1)) & 0x55) == 0x55 && ((d2 ^ (d2 >> 1)) & 0x54) == 0x54) {
    unsigned byte;
    unsigned bit;
    bit = byte = 0;
    if (d1 & 0x80)
      byte |= 0x80;
    if (d1 & 0x20)
      byte |= 0x40;
    if (d1 & 0x08)
      byte |= 0x20;
    if (d1 & 0x02)
      byte |= 0x10;
    if (d0 & 0x80)
      byte |= 0x08;
    if (d0 & 0x20)
      byte |= 0x04;
    if (d0 & 0x08)
      byte |= 0x02;
    if (d0 & 0x02)
      byte |= 0x01;
    if (d2 & 0x80)
      bit |= 0x04;
    if (d2 & 0x20)
      bit |= 0x02;
    if (d2 & 0x08)
      bit |= 0x01;
    data[byte] ^= (1 << bit);
    return 1;
  }
  if ((yaffs_hweight8(d0) + yaffs_hweight8(d1) + yaffs_hweight8(d2)) == 1) {
    read_ecc[0] = test_ecc[0];
    read_ecc[1] = test_ecc[1];
    read_ecc[2] = test_ecc[2];
    return 1;
  }
  return -1;
}
```