user: Converte this assembly snippet into its equivalent C code:

```asm
<inverse_pair>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x30,%rsp
  mov    %rdi,-0x18(%rbp)
  mov    %esi,-0x1c(%rbp)
  mov    %edx,-0x20(%rbp)
  mov    %rcx,-0x28(%rbp)
  mov    %r8,-0x30(%rbp)
  mov    -0x20(%rbp),%eax
  sub    -0x1c(%rbp),%eax
  cmp    $0x1,%eax
  jle    L53
  mov    -0x20(%rbp),%eax
  sub    -0x1c(%rbp),%eax
  mov    %eax,%edx
  shr    $0x1f,%edx
  add    %edx,%eax
  sar    %eax
  mov    %eax,%edx
  mov    -0x1c(%rbp),%eax
  add    %edx,%eax
  mov    %eax,-0x4(%rbp)
  mov    -0x1c(%rbp),%eax
  mov    %eax,-0x10(%rbp)
  mov    -0x4(%rbp),%eax
  mov    %eax,-0xc(%rbp)
  mov    -0x1c(%rbp),%eax
  mov    %eax,-0x8(%rbp)
  mov    -0x30(%rbp),%rdi
  mov    -0x28(%rbp),%rcx
  mov    -0x4(%rbp),%edx
  mov    -0x1c(%rbp),%esi
  mov    -0x18(%rbp),%rax
  mov    %rdi,%r8
  mov    %rax,%rdi
  call   <inverse_pair>
  mov    -0x30(%rbp),%rdi
  mov    -0x28(%rbp),%rcx
  mov    -0x20(%rbp),%edx
  mov    -0x4(%rbp),%esi
  mov    -0x18(%rbp),%rax
  mov    %rdi,%r8
  mov    %rax,%rdi
  call   <inverse_pair>
  jmp    L86
L15:
  mov    -0xc(%rbp),%eax
  cmp    -0x20(%rbp),%eax
  jge    L35
  mov    -0x10(%rbp),%eax
  cmp    -0x4(%rbp),%eax
  jge    L42
  mov    -0x10(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%edx
  mov    -0xc(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rcx
  mov    -0x18(%rbp),%rax
  add    %rcx,%rax
  mov    (%rax),%eax
  cmp    %eax,%edx
  jg     L42
L35:
  mov    -0x10(%rbp),%eax
  lea    0x1(%rax),%edx
  mov    %edx,-0x10(%rbp)
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x18(%rbp),%rax
  lea    (%rdx,%rax,1),%rcx
  mov    -0x8(%rbp),%eax
  lea    0x1(%rax),%edx
  mov    %edx,-0x8(%rbp)
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x30(%rbp),%rax
  add    %rax,%rdx
  mov    (%rcx),%eax
  mov    %eax,(%rdx)
  jmp    L86
L42:
  mov    -0xc(%rbp),%eax
  lea    0x1(%rax),%edx
  mov    %edx,-0xc(%rbp)
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x18(%rbp),%rax
  lea    (%rdx,%rax,1),%rcx
  mov    -0x8(%rbp),%eax
  lea    0x1(%rax),%edx
  mov    %edx,-0x8(%rbp)
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x30(%rbp),%rax
  add    %rax,%rdx
  mov    (%rcx),%eax
  mov    %eax,(%rdx)
  mov    -0x28(%rbp),%rax
  mov    (%rax),%edx
  mov    -0x4(%rbp),%eax
  sub    -0x10(%rbp),%eax
  add    %eax,%edx
  mov    -0x28(%rbp),%rax
  mov    %edx,(%rax)
L86:
  mov    -0x10(%rbp),%eax
  cmp    -0x4(%rbp),%eax
  jl     L15
  mov    -0xc(%rbp),%eax
  cmp    -0x20(%rbp),%eax
  jl     L15
  mov    -0x1c(%rbp),%eax
  mov    %eax,-0x8(%rbp)
  jmp    L39
L20:
  mov    -0x8(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x30(%rbp),%rax
  add    %rdx,%rax
  mov    -0x8(%rbp),%edx
  movslq %edx,%rdx
  lea    0x0(,%rdx,4),%rcx
  mov    -0x18(%rbp),%rdx
  add    %rcx,%rdx
  mov    (%rax),%eax
  mov    %eax,(%rdx)
  addl   $0x1,-0x8(%rbp)
L39:
  mov    -0x8(%rbp),%eax
  cmp    -0x20(%rbp),%eax
  jl     L20
L53:
  nop
  leave
  ret
```

assistant: ```c
void inverse_pair(int *A, int x, int y, int *cnt, int *T) {
  if (y - x > 1) {
    int m = x + (y - x) / 2;
    int p = x, q = m, i = x;
    inverse_pair(A, x, m, cnt, T);
    inverse_pair(A, m, y, cnt, T);
    while (p < m || q < y) {
      if (q >= y || (p < m && A[p] <= A[q]))
        T[i++] = A[p++];
      else {
        T[i++] = A[q++];
        *cnt += m - p;
      }
    }
    for (i = x; i < y; i++)
      A[i] = T[i];
  }
}
```