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

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

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;
}
```