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

```asm
<s_memcpy1oa>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  mov    %rdi,-0x28(%rbp)
  mov    %esi,-0x2c(%rbp)
  mov    %rdx,-0x38(%rbp)
  mov    %rcx,-0x40(%rbp)
  mov    %r8,-0x48(%rbp)
  mov    %r9d,-0x30(%rbp)
  mov    -0x38(%rbp),%rax
  mov    %rax,-0x18(%rbp)
  mov    -0x40(%rbp),%rax
  mov    %rax,-0x10(%rbp)
  mov    -0x48(%rbp),%rax
  mov    %rax,-0x8(%rbp)
  mov    $0x8,%eax
  sub    0x10(%rbp),%eax
  mov    %eax,0x10(%rbp)
  mov    $0x8,%eax
  sub    0x18(%rbp),%eax
  mov    %eax,0x18(%rbp)
  mov    $0x8,%eax
  sub    0x20(%rbp),%eax
  mov    %eax,0x20(%rbp)
  jmp    L5
L48:
  mov    -0x8(%rbp),%rax
  movzbl (%rax),%eax
  not    %eax
  mov    %al,-0x1f(%rbp)
  mov    -0x28(%rbp),%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  cmp    %eax,-0x2c(%rbp)
  jne    L58
  cmpb   $0xff,-0x1f(%rbp)
  je     L58
  cmpb   $0x0,-0x1f(%rbp)
  jne    L57
  mov    -0x10(%rbp),%rax
  movzbl (%rax),%edx
  mov    -0x18(%rbp),%rax
  mov    %dl,(%rax)
  jmp    L58
L57:
  mov    -0x18(%rbp),%rax
  movzbl (%rax),%eax
  movzbl %al,%edx
  mov    0x28(%rbp),%eax
  mov    %eax,%ecx
  sar    %cl,%edx
  mov    0x10(%rbp),%eax
  mov    %eax,%ecx
  shl    %cl,%edx
  mov    %edx,%eax
  mov    %al,-0x1e(%rbp)
  mov    -0x18(%rbp),%rax
  movzbl (%rax),%eax
  movzbl %al,%edx
  mov    0x30(%rbp),%eax
  mov    %eax,%ecx
  sar    %cl,%edx
  mov    0x18(%rbp),%eax
  mov    %eax,%ecx
  shl    %cl,%edx
  mov    %edx,%eax
  mov    %al,-0x1d(%rbp)
  mov    -0x18(%rbp),%rax
  movzbl (%rax),%eax
  movzbl %al,%edx
  mov    0x38(%rbp),%eax
  mov    %eax,%ecx
  sar    %cl,%edx
  mov    0x20(%rbp),%eax
  mov    %eax,%ecx
  shl    %cl,%edx
  mov    %edx,%eax
  mov    %al,-0x1c(%rbp)
  mov    -0x10(%rbp),%rax
  movzbl (%rax),%eax
  movzbl %al,%edx
  mov    0x28(%rbp),%eax
  mov    %eax,%ecx
  sar    %cl,%edx
  mov    0x10(%rbp),%eax
  mov    %eax,%ecx
  shl    %cl,%edx
  mov    %edx,%eax
  mov    %al,-0x1b(%rbp)
  mov    -0x10(%rbp),%rax
  movzbl (%rax),%eax
  movzbl %al,%edx
  mov    0x30(%rbp),%eax
  mov    %eax,%ecx
  sar    %cl,%edx
  mov    0x18(%rbp),%eax
  mov    %eax,%ecx
  shl    %cl,%edx
  mov    %edx,%eax
  mov    %al,-0x1a(%rbp)
  mov    -0x10(%rbp),%rax
  movzbl (%rax),%eax
  movzbl %al,%edx
  mov    0x38(%rbp),%eax
  mov    %eax,%ecx
  sar    %cl,%edx
  mov    0x20(%rbp),%eax
  mov    %eax,%ecx
  shl    %cl,%edx
  mov    %edx,%eax
  mov    %al,-0x19(%rbp)
  movzbl -0x1f(%rbp),%eax
  movzbl -0x1e(%rbp),%edx
  movzbl -0x1b(%rbp),%ecx
  sub    %ecx,%edx
  imul   %edx,%eax
  sar    $0x8,%eax
  mov    %eax,%edx
  movzbl -0x1b(%rbp),%eax
  add    %edx,%eax
  mov    %al,-0x1e(%rbp)
  movzbl -0x1f(%rbp),%eax
  movzbl -0x1d(%rbp),%edx
  movzbl -0x1a(%rbp),%ecx
  sub    %ecx,%edx
  imul   %edx,%eax
  sar    $0x8,%eax
  mov    %eax,%edx
  movzbl -0x1a(%rbp),%eax
  add    %edx,%eax
  mov    %al,-0x1d(%rbp)
  movzbl -0x1f(%rbp),%eax
  movzbl -0x1c(%rbp),%edx
  movzbl -0x19(%rbp),%ecx
  sub    %ecx,%edx
  imul   %edx,%eax
  sar    $0x8,%eax
  mov    %eax,%edx
  movzbl -0x19(%rbp),%eax
  add    %edx,%eax
  mov    %al,-0x1c(%rbp)
  movzbl -0x1e(%rbp),%edx
  mov    0x10(%rbp),%eax
  mov    %eax,%ecx
  sar    %cl,%edx
  mov    0x28(%rbp),%eax
  mov    %eax,%ecx
  shl    %cl,%edx
  mov    %edx,%eax
  mov    %eax,%esi
  movzbl -0x1d(%rbp),%edx
  mov    0x18(%rbp),%eax
  mov    %eax,%ecx
  sar    %cl,%edx
  mov    0x30(%rbp),%eax
  mov    %eax,%ecx
  shl    %cl,%edx
  mov    %edx,%eax
  or     %eax,%esi
  movzbl -0x1c(%rbp),%edx
  mov    0x20(%rbp),%eax
  mov    %eax,%ecx
  sar    %cl,%edx
  mov    0x38(%rbp),%eax
  mov    %eax,%ecx
  shl    %cl,%edx
  mov    %edx,%eax
  or     %esi,%eax
  mov    %eax,%edx
  mov    -0x18(%rbp),%rax
  mov    %dl,(%rax)
L58:
  addq   $0x1,-0x18(%rbp)
  addq   $0x1,-0x10(%rbp)
  addq   $0x1,-0x28(%rbp)
  addq   $0x1,-0x8(%rbp)
L5:
  mov    -0x30(%rbp),%eax
  lea    -0x1(%rax),%edx
  mov    %edx,-0x30(%rbp)
  test   %eax,%eax
  jne    L48
  nop
  nop
  pop    %rbp
  ret
```

assistant: ```c
void s_memcpy1oa(unsigned char *m, int id, void *dest, void *src, unsigned char *mask, int n, int rl, int gl, int bl, int ro, int go, int bo) {
  unsigned char a;
  unsigned char sr;
  unsigned char sg;
  unsigned char sb;
  unsigned char dr;
  unsigned char dg;
  unsigned char db;
  unsigned char *d = (unsigned char *)dest;
  unsigned char *s = (unsigned char *)src;
  unsigned char *m_ = (unsigned char *)mask;
  rl = 8 - rl;
  gl = 8 - gl;
  bl = 8 - bl;
  while (n--) {
    a = ~*m_;
    if ((*m == id) && (a != 0xff)) {
      if (a == 0x00) {
        *d = *s;
      } else {
        dr = (*d >> ro) << rl;
        dg = (*d >> go) << gl;
        db = (*d >> bo) << bl;
        sr = (*s >> ro) << rl;
        sg = (*s >> go) << gl;
        sb = (*s >> bo) << bl;
        dr = (a * (dr - sr) >> 8) + sr;
        dg = (a * (dg - sg) >> 8) + sg;
        db = (a * (db - sb) >> 8) + sb;
        *d = ((dr >> rl) << ro) | ((dg >> gl) << go) | ((db >> bl) << bo);
      }
    }
    d++;
    s++;
    m++;
    m_++;
  };
}
```