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

```asm
<compact_int>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x38,%rsp
  mov    %rdi,%r12
  mov    %rsi,%rbp
  mov    %rdx,%r15
  mov    %rcx,0x28(%rsp)
  mov    0x4(%rdi),%eax
  sub    (%rdi),%eax
  mov    %eax,0x10(%rsp)
  mov    0x4(%rsi),%eax
  sub    (%rsi),%eax
  mov    %eax,0x14(%rsp)
  mov    (%rcx),%eax
  cmp    $0x2,%eax
  jle    L76
  mov    $0x2,%ebx
  movl   $0x0,0x20(%rsp)
  movl   $0x0,0x24(%rsp)
  jmp    L50
L7:
  mov    0x24(%rsp),%r8d
  movslq %r8d,%rdx
  mov    0x20(%rsp),%edi
  movslq %edi,%rax
  lea    0x0(,%rax,4),%rcx
  mov    (%r12,%rdx,4),%esi
  mov    %esi,(%r12,%rax,4)
  mov    0x0(%rbp,%rdx,4),%esi
  mov    %esi,0x0(%rbp,%rax,4)
  mov    (%r15,%rdx,4),%edx
  mov    %edx,(%r15,%rax,4)
  mov    %edi,%esi
  lea    0x1(%rdi),%edx
  mov    0x18(%rsp),%eax
  sub    $0x1,%eax
  cmp    %r8d,%eax
  je     L68
  mov    -0x4(%r12,%rbx,4),%eax
  mov    %eax,0x4(%r12,%rcx,1)
  mov    -0x4(%rbp,%rbx,4),%eax
  mov    %eax,0x4(%rbp,%rcx,1)
  mov    -0x4(%r15,%rbx,4),%eax
  mov    %eax,0x4(%r15,%rcx,1)
  add    $0x2,%esi
  mov    %esi,0x20(%rsp)
  mov    0x1c(%rsp),%eax
  mov    %eax,0x24(%rsp)
  mov    %r14d,0x14(%rsp)
  mov    %r13d,0x10(%rsp)
L6:
  mov    0x28(%rsp),%rax
  mov    (%rax),%eax
  add    $0x1,%rbx
  cmp    %ebx,%eax
  jle    L54
L50:
  mov    %ebx,0x18(%rsp)
  mov    %ebx,0x1c(%rsp)
  mov    (%r12,%rbx,4),%r13d
  sub    -0x4(%r12,%rbx,4),%r13d
  mov    0x0(%rbp,%rbx,4),%r14d
  sub    -0x4(%rbp,%rbx,4),%r14d
  mov    %r13d,%edi
  sub    0x10(%rsp),%edi
  mov    $0x0,%eax
  call   <ABS@plt>
  mov    %eax,0xc(%rsp)
  mov    %r14d,%edi
  sub    0x14(%rsp),%edi
  mov    $0x0,%eax
  call   <ABS@plt>
  add    0xc(%rsp),%eax
  jne    L7
  cmpl   $0x0,(%r15,%rbx,4)
  je     L6
  jmp    L7
L68:
  mov    %edx,0x20(%rsp)
  mov    0x1c(%rsp),%eax
  mov    %eax,0x24(%rsp)
  mov    %r14d,0x14(%rsp)
  mov    %r13d,0x10(%rsp)
  jmp    L6
L76:
  movl   $0x0,0x20(%rsp)
L54:
  mov    0x20(%rsp),%esi
  movslq %esi,%rdx
  cltq
  mov    -0x4(%r12,%rax,4),%eax
  mov    %eax,(%r12,%rdx,4)
  mov    0x28(%rsp),%rcx
  movslq (%rcx),%rax
  mov    -0x4(%rbp,%rax,4),%eax
  mov    %eax,0x0(%rbp,%rdx,4)
  movslq (%rcx),%rax
  mov    -0x4(%r15,%rax,4),%eax
  mov    %eax,(%r15,%rdx,4)
  lea    0x1(%rsi),%edx
  mov    (%rcx),%eax
  mov    %edx,(%rcx)
  sub    %edx,%eax
  add    $0x38,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
```

assistant: ```c
int compact_int(xp, yp, isa_move, size)
int xp[], yp[], isa_move[], *size;
{
  int dx, dy, old_dx, old_dy, start, index, i, old_size;
  start = index = 0;
  old_dx = xp[1] - xp[0];
  old_dy = yp[1] - yp[0];
  for (i = 2; i < *size; i++) {
    dx = xp[i] - xp[i - 1];
    dy = yp[i] - yp[i - 1];
    if ((ABS(dx - old_dx) + ABS(dy - old_dy) != 0) || (isa_move[i])) {
      xp[index] = xp[start];
      yp[index] = yp[start];
      isa_move[index] = isa_move[start];
      index++;
      if (start != i - 1) {
        xp[index] = xp[i - 1];
        yp[index] = yp[i - 1];
        isa_move[index] = isa_move[i - 1];
        index++;
      }
      start = i;
      old_dx = dx;
      old_dy = dy;
    }
  }
  xp[index] = xp[*size - 1];
  yp[index] = yp[*size - 1];
  isa_move[index] = isa_move[*size - 1];
  index++;
  old_size = *size;
  *size = index;
  return (old_size - *size);
}
```