user: 请显示与下面列出的汇编代码相匹配的C语言实现：

```asm
<btea>:
  endbr64
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  mov    %rdi,%r8
  mov    %esi,%ebp
  mov    %rdx,%r11
  cmp    $0x1,%esi
  jle    L33
  movslq %esi,%rax
  lea    -0x4(%rdi,%rax,4),%r12
  mov    (%r12),%edx
  mov    $0x0,%r10d
  sub    $0x1,%ebp
  mov    %ebp,%ebx
L29:
  sub    $0x61c88647,%r10d
  mov    %r10d,%r9d
  sar    $0x2,%r9d
  mov    $0x0,%ecx
L20:
  mov    0x4(%r8,%rcx,4),%eax
  mov    %r9d,%esi
  xor    %ecx,%esi
  and    $0x3,%esi
  mov    %edx,%edi
  xor    (%r11,%rsi,4),%edi
  mov    %edi,%esi
  mov    %eax,%edi
  xor    %r10d,%edi
  add    %edi,%esi
  mov    %edx,%edi
  sar    $0x5,%edi
  lea    0x0(,%rax,4),%r13d
  xor    %r13d,%edi
  sar    $0x3,%eax
  shl    $0x4,%edx
  xor    %edx,%eax
  add    %edi,%eax
  xor    %eax,%esi
  mov    %esi,%edx
  add    (%r8,%rcx,4),%edx
  mov    %edx,(%r8,%rcx,4)
  add    $0x1,%rcx
  cmp    %rbx,%rcx
  jne    L20
  mov    (%r8),%eax
  xor    %ebp,%r9d
  and    $0x3,%r9d
  mov    %edx,%esi
  xor    (%r11,%r9,4),%esi
  mov    %eax,%ecx
  xor    %r10d,%ecx
  add    %ecx,%esi
  mov    %edx,%ecx
  sar    $0x5,%ecx
  lea    0x0(,%rax,4),%edi
  xor    %edi,%ecx
  sar    $0x3,%eax
  shl    $0x4,%edx
  xor    %edx,%eax
  add    %ecx,%eax
  xor    %esi,%eax
  add    (%r12),%eax
  mov    %eax,%edx
  mov    %eax,(%r12)
  cmp    $0xb54cda56,%r10d
  jne    L29
L53:
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
L33:
  cmp    $0xffffffff,%esi
  jge    L53
  mov    (%rdi),%eax
  mov    %esi,%edx
  neg    %edx
  movslq %edx,%rdx
  lea    -0x4(%rdi,%rdx,4),%r12
  mov    $0xb54cda56,%r9d
  mov    %esi,%r10d
  not    %r10d
  test   %r10d,%r10d
  mov    $0x1,%ecx
  cmovg  %r10d,%ecx
  mov    $0x1,%edx
  sub    %ecx,%edx
  sub    %esi,%edx
  lea    -0x2(%rdx),%ebx
L0:
  mov    %r9d,%edi
  sar    $0x2,%edi
  movslq %r10d,%rsi
L23:
  mov    -0x4(%r8,%rsi,4),%ecx
  mov    %edi,%edx
  xor    %esi,%edx
  and    $0x3,%edx
  mov    %ecx,%ebp
  xor    (%r11,%rdx,4),%ebp
  mov    %r9d,%r13d
  xor    %eax,%r13d
  lea    0x0(%rbp,%r13,1),%ebp
  mov    %ecx,%edx
  sar    $0x5,%edx
  lea    0x0(,%rax,4),%r13d
  xor    %r13d,%edx
  sar    $0x3,%eax
  shl    $0x4,%ecx
  xor    %ecx,%eax
  add    %edx,%eax
  mov    %ebp,%edx
  xor    %eax,%edx
  mov    (%r8,%rsi,4),%eax
  sub    %edx,%eax
  mov    %eax,(%r8,%rsi,4)
  sub    $0x1,%rsi
  test   %esi,%esi
  jg     L23
  mov    (%r12),%ecx
  xor    %ebx,%edi
  and    $0x3,%edi
  mov    %ecx,%edx
  xor    (%r11,%rdi,4),%edx
  mov    %eax,%edi
  xor    %r9d,%edi
  lea    (%rdx,%rdi,1),%esi
  mov    %ecx,%edx
  sar    $0x5,%edx
  lea    0x0(,%rax,4),%edi
  xor    %edi,%edx
  sar    $0x3,%eax
  shl    $0x4,%ecx
  xor    %ecx,%eax
  add    %edx,%eax
  xor    %eax,%esi
  mov    (%r8),%eax
  sub    %esi,%eax
  mov    %eax,(%r8)
  add    $0x61c88647,%r9d
  jne    L0
  jmp    L53
```

assistant: ```c
void btea(uint32_t *v, int8_t n, const uint32_t key[4]) {
  uint32_t y, z, sum;
  uint32_t p, rounds, e;
  if (n > 1) {
    rounds = 6;
    sum = 0;
    z = v[n - 1];
    do {
      sum += 0x9e3779b9;
      e = (sum >> 2) & 3;
      for (p = 0; p < n - 1; p++) {
        y = v[p + 1];
        z = v[p] += (((z >> 5 ^ y << 2) + (y >> 3 ^ z << 4)) ^ ((sum ^ y) + (key[(p & 3) ^ e] ^ z)));
      }
      y = v[0];
      z = v[n - 1] += (((z >> 5 ^ y << 2) + (y >> 3 ^ z << 4)) ^ ((sum ^ y) + (key[(p & 3) ^ e] ^ z)));
    } while (--rounds);
  } else if (n < -1) {
    n = -n;
    rounds = 6;
    sum = rounds * 0x9e3779b9;
    y = v[0];
    do {
      e = (sum >> 2) & 3;
      for (p = n - 1; p > 0; p--) {
        z = v[p - 1];
        y = v[p] -= (((z >> 5 ^ y << 2) + (y >> 3 ^ z << 4)) ^ ((sum ^ y) + (key[(p & 3) ^ e] ^ z)));
      }
      z = v[n - 1];
      y = v[0] -= (((z >> 5 ^ y << 2) + (y >> 3 ^ z << 4)) ^ ((sum ^ y) + (key[(p & 3) ^ e] ^ z)));
      sum -= 0x9e3779b9;
    } while (--rounds);
  }
}
```