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

```asm
<btea>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  mov    %rdi,-0x28(%rbp)
  mov    %esi,-0x2c(%rbp)
  mov    %rdx,-0x38(%rbp)
  cmpl   $0x1,-0x2c(%rbp)
  jle    L56
  movl   $0x6,-0x8(%rbp)
  movl   $0x0,-0x10(%rbp)
  mov    -0x2c(%rbp),%eax
  cltq
  shl    $0x2,%rax
  lea    -0x4(%rax),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  mov    %eax,-0x14(%rbp)
L10:
  mov    -0x10(%rbp),%eax
  sub    $0x61c88647,%eax
  mov    %eax,-0x10(%rbp)
  mov    -0x10(%rbp),%eax
  sar    $0x2,%eax
  and    $0x3,%eax
  mov    %eax,-0x4(%rbp)
  movl   $0x0,-0xc(%rbp)
  jmp    L81
L80:
  mov    -0xc(%rbp),%eax
  cltq
  add    $0x1,%rax
  lea    0x0(,%rax,4),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  mov    %eax,-0x18(%rbp)
  mov    -0xc(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%edx
  mov    -0x14(%rbp),%eax
  sar    $0x5,%eax
  mov    %eax,%ecx
  mov    -0x18(%rbp),%eax
  shl    $0x2,%eax
  xor    %eax,%ecx
  mov    -0x18(%rbp),%eax
  sar    $0x3,%eax
  mov    %eax,%esi
  mov    -0x14(%rbp),%eax
  shl    $0x4,%eax
  xor    %esi,%eax
  lea    (%rcx,%rax,1),%esi
  mov    -0x10(%rbp),%eax
  xor    -0x18(%rbp),%eax
  mov    %eax,%ecx
  mov    -0xc(%rbp),%eax
  and    $0x3,%eax
  xor    -0x4(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdi
  mov    -0x38(%rbp),%rax
  add    %rdi,%rax
  mov    (%rax),%eax
  xor    -0x14(%rbp),%eax
  add    %ecx,%eax
  xor    %eax,%esi
  mov    %esi,%ecx
  mov    -0xc(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rsi
  mov    -0x28(%rbp),%rax
  add    %rsi,%rax
  add    %ecx,%edx
  mov    %edx,(%rax)
  mov    (%rax),%eax
  mov    %eax,-0x14(%rbp)
  addl   $0x1,-0xc(%rbp)
L81:
  mov    -0x2c(%rbp),%eax
  sub    $0x1,%eax
  cmp    %eax,-0xc(%rbp)
  jl     L80
  mov    -0x28(%rbp),%rax
  mov    (%rax),%eax
  mov    %eax,-0x18(%rbp)
  mov    -0x2c(%rbp),%eax
  cltq
  shl    $0x2,%rax
  lea    -0x4(%rax),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%edx
  mov    -0x14(%rbp),%eax
  sar    $0x5,%eax
  mov    %eax,%ecx
  mov    -0x18(%rbp),%eax
  shl    $0x2,%eax
  xor    %eax,%ecx
  mov    -0x18(%rbp),%eax
  sar    $0x3,%eax
  mov    %eax,%esi
  mov    -0x14(%rbp),%eax
  shl    $0x4,%eax
  xor    %esi,%eax
  lea    (%rcx,%rax,1),%esi
  mov    -0x10(%rbp),%eax
  xor    -0x18(%rbp),%eax
  mov    %eax,%ecx
  mov    -0xc(%rbp),%eax
  and    $0x3,%eax
  xor    -0x4(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdi
  mov    -0x38(%rbp),%rax
  add    %rdi,%rax
  mov    (%rax),%eax
  xor    -0x14(%rbp),%eax
  add    %ecx,%eax
  xor    %eax,%esi
  mov    %esi,%ecx
  mov    -0x2c(%rbp),%eax
  cltq
  shl    $0x2,%rax
  lea    -0x4(%rax),%rsi
  mov    -0x28(%rbp),%rax
  add    %rsi,%rax
  add    %ecx,%edx
  mov    %edx,(%rax)
  mov    (%rax),%eax
  mov    %eax,-0x14(%rbp)
  subl   $0x1,-0x8(%rbp)
  cmpl   $0x0,-0x8(%rbp)
  jne    L10
  jmp    L6
L56:
  cmpl   $0xffffffff,-0x2c(%rbp)
  jge    L6
  negl   -0x2c(%rbp)
  movl   $0x6,-0x8(%rbp)
  mov    -0x8(%rbp),%eax
  imul   $0x9e3779b9,%eax,%eax
  mov    %eax,-0x10(%rbp)
  mov    -0x28(%rbp),%rax
  mov    (%rax),%eax
  mov    %eax,-0x18(%rbp)
L13:
  mov    -0x10(%rbp),%eax
  sar    $0x2,%eax
  and    $0x3,%eax
  mov    %eax,-0x4(%rbp)
  mov    -0x2c(%rbp),%eax
  sub    $0x1,%eax
  mov    %eax,-0xc(%rbp)
  jmp    L35
L65:
  mov    -0xc(%rbp),%eax
  cltq
  shl    $0x2,%rax
  lea    -0x4(%rax),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  mov    %eax,-0x14(%rbp)
  mov    -0xc(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%edx
  mov    -0x14(%rbp),%eax
  sar    $0x5,%eax
  mov    %eax,%ecx
  mov    -0x18(%rbp),%eax
  shl    $0x2,%eax
  xor    %eax,%ecx
  mov    -0x18(%rbp),%eax
  sar    $0x3,%eax
  mov    %eax,%esi
  mov    -0x14(%rbp),%eax
  shl    $0x4,%eax
  xor    %esi,%eax
  lea    (%rcx,%rax,1),%esi
  mov    -0x10(%rbp),%eax
  xor    -0x18(%rbp),%eax
  mov    %eax,%ecx
  mov    -0xc(%rbp),%eax
  and    $0x3,%eax
  xor    -0x4(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdi
  mov    -0x38(%rbp),%rax
  add    %rdi,%rax
  mov    (%rax),%eax
  xor    -0x14(%rbp),%eax
  add    %ecx,%eax
  xor    %eax,%esi
  mov    %esi,%ecx
  mov    -0xc(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rsi
  mov    -0x28(%rbp),%rax
  add    %rsi,%rax
  sub    %ecx,%edx
  mov    %edx,(%rax)
  mov    (%rax),%eax
  mov    %eax,-0x18(%rbp)
  subl   $0x1,-0xc(%rbp)
L35:
  cmpl   $0x0,-0xc(%rbp)
  jg     L65
  mov    -0x2c(%rbp),%eax
  cltq
  shl    $0x2,%rax
  lea    -0x4(%rax),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  mov    %eax,-0x14(%rbp)
  mov    -0x28(%rbp),%rax
  mov    (%rax),%edx
  mov    -0x14(%rbp),%eax
  sar    $0x5,%eax
  mov    %eax,%ecx
  mov    -0x18(%rbp),%eax
  shl    $0x2,%eax
  xor    %eax,%ecx
  mov    -0x18(%rbp),%eax
  sar    $0x3,%eax
  mov    %eax,%esi
  mov    -0x14(%rbp),%eax
  shl    $0x4,%eax
  xor    %esi,%eax
  lea    (%rcx,%rax,1),%esi
  mov    -0x10(%rbp),%eax
  xor    -0x18(%rbp),%eax
  mov    %eax,%ecx
  mov    -0xc(%rbp),%eax
  and    $0x3,%eax
  xor    -0x4(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdi
  mov    -0x38(%rbp),%rax
  add    %rdi,%rax
  mov    (%rax),%eax
  xor    -0x14(%rbp),%eax
  add    %ecx,%eax
  xor    %esi,%eax
  sub    %eax,%edx
  mov    -0x28(%rbp),%rax
  mov    %edx,(%rax)
  mov    -0x28(%rbp),%rax
  mov    (%rax),%eax
  mov    %eax,-0x18(%rbp)
  mov    -0x10(%rbp),%eax
  add    $0x61c88647,%eax
  mov    %eax,-0x10(%rbp)
  subl   $0x1,-0x8(%rbp)
  cmpl   $0x0,-0x8(%rbp)
  jne    L13
L6:
  nop
  pop    %rbp
  ret
```

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