user: 请将这段汇编代码片段转换成等效的C代码:

```asm
<wlVXorEncode>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  mov    %rdi,%r12
  movslq %esi,%rdi
  push   %rbp
  mov    %rdi,%rbp
  push   %rbx
  sub    $0x18,%rsp
  mov    %edx,0x8(%rsp)
  call   <malloc@plt>
  mov    0x8(%rsp),%ecx
  mov    %rax,%rdi
  test   %ecx,%ecx
  jle    L157
  mov    %ebp,%eax
  mov    %ebp,%r15d
  lea    -0x1(%rbp),%r8d
  xor    %ebx,%ebx
  shr    $0x4,%eax
  and    $0xfffffff0,%r15d
  xor    %r13d,%r13d
  lea    -0x1(%rax),%r14d
  add    $0x1,%r14
  shl    $0x4,%r14
  nopl   0x0(%rax)
L147:
  test   %ebp,%ebp
  jle    L83
  test   %r13d,%r13d
  je     L53
  cmp    $0xe,%r8d
  jbe    L18
  movslq %ebx,%rdx
  xor    %eax,%eax
  add    %r12,%rdx
  nopl   0x0(%rax,%rax,1)
L24:
  movdqu (%rdx,%rax,1),%xmm1
  movdqu (%rdi,%rax,1),%xmm0
  pxor   %xmm1,%xmm0
  movups %xmm1,(%rdi,%rax,1)
  movups %xmm0,(%rdx,%rax,1)
  add    $0x10,%rax
  cmp    %r14,%rax
  jne    L24
  cmp    %ebp,%r15d
  je     L83
  mov    %r15d,%eax
  mov    %r15d,%edx
L149:
  mov    %ebp,%r9d
  sub    %eax,%r9d
  lea    -0x1(%r9),%esi
  cmp    $0x6,%esi
  jbe    L10
  movslq %ebx,%rsi
  add    %rax,%rsi
  add    %rdi,%rax
  add    %r12,%rsi
  movq   (%rax),%xmm0
  movq   (%rsi),%xmm1
  movq   %xmm1,(%rax)
  mov    %r9d,%eax
  pxor   %xmm1,%xmm0
  and    $0xfffffff8,%eax
  movq   %xmm0,(%rsi)
  add    %eax,%edx
  cmp    %eax,%r9d
  je     L83
L10:
  lea    (%rbx,%rdx,1),%eax
  movslq %edx,%rsi
  cltq
  add    %rdi,%rsi
  add    %r12,%rax
  movzbl (%rsi),%r10d
  movzbl (%rax),%r9d
  xor    %r9d,%r10d
  mov    %r9b,(%rsi)
  mov    %r10b,(%rax)
  lea    0x1(%rdx),%eax
  cmp    %eax,%ebp
  jle    L83
  lea    (%rbx,%rax,1),%esi
  cltq
  movslq %esi,%rsi
  add    %rdi,%rax
  add    %r12,%rsi
  movzbl (%rax),%r10d
  movzbl (%rsi),%r9d
  mov    %r9b,(%rax)
  xor    %r9d,%r10d
  lea    0x2(%rdx),%eax
  mov    %r10b,(%rsi)
  cmp    %eax,%ebp
  jle    L83
  lea    (%rbx,%rax,1),%esi
  cltq
  movslq %esi,%rsi
  add    %rdi,%rax
  add    %r12,%rsi
  movzbl (%rax),%r10d
  movzbl (%rsi),%r9d
  mov    %r9b,(%rax)
  xor    %r9d,%r10d
  lea    0x3(%rdx),%eax
  mov    %r10b,(%rsi)
  cmp    %eax,%ebp
  jle    L83
  lea    (%rbx,%rax,1),%esi
  cltq
  movslq %esi,%rsi
  add    %rdi,%rax
  add    %r12,%rsi
  movzbl (%rax),%r10d
  movzbl (%rsi),%r9d
  mov    %r9b,(%rax)
  xor    %r9d,%r10d
  lea    0x4(%rdx),%eax
  mov    %r10b,(%rsi)
  cmp    %eax,%ebp
  jle    L83
  lea    (%rbx,%rax,1),%esi
  cltq
  movslq %esi,%rsi
  add    %rdi,%rax
  add    %r12,%rsi
  movzbl (%rax),%r10d
  movzbl (%rsi),%r9d
  mov    %r9b,(%rax)
  xor    %r9d,%r10d
  lea    0x5(%rdx),%eax
  mov    %r10b,(%rsi)
  cmp    %eax,%ebp
  jle    L83
  lea    (%rbx,%rax,1),%esi
  cltq
  add    $0x6,%edx
  movslq %esi,%rsi
  add    %rdi,%rax
  add    %r12,%rsi
  movzbl (%rax),%r10d
  movzbl (%rsi),%r9d
  xor    %r9d,%r10d
  mov    %r9b,(%rax)
  mov    %r10b,(%rsi)
  cmp    %edx,%ebp
  jle    L83
  lea    (%rbx,%rdx,1),%eax
  movslq %edx,%rdx
  cltq
  add    %rdi,%rdx
  add    %r12,%rax
  movzbl (%rdx),%r9d
  movzbl (%rax),%esi
  xor    %esi,%r9d
  mov    %sil,(%rdx)
  mov    %r9b,(%rax)
L83:
  add    $0x1,%r13d
  add    %ebp,%ebx
  cmp    %r13d,%ecx
  jne    L147
L157:
  add    $0x18,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  jmp    1070 <free@plt>
  xchg   %ax,%ax
L53:
  mov    %r8d,%edx
  movslq %ebx,%rsi
  mov    %ecx,0xc(%rsp)
  add    $0x1,%rdx
  add    %r12,%rsi
  mov    %r8d,0x8(%rsp)
  call   <memcpy@plt>
  mov    0x8(%rsp),%r8d
  mov    0xc(%rsp),%ecx
  mov    %rax,%rdi
  jmp    L83
L18:
  xor    %eax,%eax
  xor    %edx,%edx
  jmp    L149
```

assistant: ```c
void wlVXorEncode(unsigned char *data, int width, int height) {
  unsigned char *xors, byte, xor;
  int x, y;
  xors = malloc(width * sizeof(unsigned char));
  for (y = 0; y < height; y++) {
    for (x = 0; x < width; x++) {
      byte = data[y * width + x];
      xor = y == 0 ? 0 : xors[x];
      data[y * width + x] = byte ^ xor;
      xors[x] = byte;
    }
  }
  free(xors);
}
```