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

```asm
<mp_add>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  mov    %rdi,-0x38(%rbp)
  mov    %rsi,-0x40(%rbp)
  mov    %rdx,-0x48(%rbp)
  mov    %rcx,-0x50(%rbp)
  mov    %r8,-0x58(%rbp)
  mov    -0x50(%rbp),%rax
  cmp    -0x58(%rbp),%rax
  jae    L94
  mov    -0x40(%rbp),%rax
  mov    %rax,-0x18(%rbp)
  mov    -0x50(%rbp),%rax
  mov    %rax,-0x10(%rbp)
  mov    -0x48(%rbp),%rax
  mov    %rax,-0x40(%rbp)
  mov    -0x58(%rbp),%rax
  mov    %rax,-0x50(%rbp)
  mov    -0x18(%rbp),%rax
  mov    %rax,-0x48(%rbp)
  mov    -0x10(%rbp),%rax
  mov    %rax,-0x58(%rbp)
L94:
  mov    -0x40(%rbp),%rax
  movzwl (%rax),%eax
  movzwl %ax,%edx
  mov    -0x48(%rbp),%rax
  movzwl (%rax),%eax
  movzwl %ax,%eax
  add    %rdx,%rax
  mov    %rax,-0x8(%rbp)
  mov    -0x8(%rbp),%rax
  mov    %eax,%edx
  mov    -0x38(%rbp),%rax
  mov    %dx,(%rax)
  mov    -0x8(%rbp),%rax
  shr    $0x10,%rax
  mov    %ax,-0x22(%rbp)
  movq   $0x1,-0x20(%rbp)
  jmp    L4
L7:
  mov    -0x20(%rbp),%rax
  lea    (%rax,%rax,1),%rdx
  mov    -0x40(%rbp),%rax
  add    %rdx,%rax
  movzwl (%rax),%eax
  movzwl %ax,%edx
  mov    -0x20(%rbp),%rax
  lea    (%rax,%rax,1),%rcx
  mov    -0x48(%rbp),%rax
  add    %rcx,%rax
  movzwl (%rax),%eax
  movzwl %ax,%eax
  add    %rax,%rdx
  movzwl -0x22(%rbp),%eax
  add    %rdx,%rax
  mov    %rax,-0x8(%rbp)
  mov    -0x20(%rbp),%rax
  lea    (%rax,%rax,1),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  mov    -0x8(%rbp),%rdx
  mov    %dx,(%rax)
  mov    -0x8(%rbp),%rax
  shr    $0x10,%rax
  mov    %ax,-0x22(%rbp)
  addq   $0x1,-0x20(%rbp)
L4:
  mov    -0x20(%rbp),%rax
  cmp    %rax,-0x58(%rbp)
  ja     L7
  mov    -0x38(%rbp),%rax
  cmp    -0x40(%rbp),%rax
  je     L98
  jmp    L97
L71:
  mov    -0x20(%rbp),%rax
  lea    (%rax,%rax,1),%rdx
  mov    -0x40(%rbp),%rax
  add    %rdx,%rax
  movzwl (%rax),%eax
  movzwl %ax,%edx
  movzwl -0x22(%rbp),%eax
  add    %rdx,%rax
  mov    %rax,-0x8(%rbp)
  mov    -0x20(%rbp),%rax
  lea    (%rax,%rax,1),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  mov    -0x8(%rbp),%rdx
  mov    %dx,(%rax)
  mov    -0x8(%rbp),%rax
  shr    $0x10,%rax
  mov    %ax,-0x22(%rbp)
  addq   $0x1,-0x20(%rbp)
L97:
  mov    -0x20(%rbp),%rax
  cmp    %rax,-0x50(%rbp)
  ja     L71
  jmp    L78
L70:
  mov    -0x20(%rbp),%rax
  lea    (%rax,%rax,1),%rdx
  mov    -0x40(%rbp),%rax
  add    %rdx,%rax
  movzwl (%rax),%eax
  movzwl %ax,%edx
  movzwl -0x22(%rbp),%eax
  add    %rdx,%rax
  mov    %rax,-0x8(%rbp)
  mov    -0x20(%rbp),%rax
  lea    (%rax,%rax,1),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  mov    -0x8(%rbp),%rdx
  mov    %dx,(%rax)
  mov    -0x8(%rbp),%rax
  shr    $0x10,%rax
  mov    %ax,-0x22(%rbp)
  addq   $0x1,-0x20(%rbp)
L98:
  cmpw   $0x0,-0x22(%rbp)
  je     L57
  mov    -0x20(%rbp),%rax
  cmp    %rax,-0x50(%rbp)
  ja     L70
L57:
  mov    -0x50(%rbp),%rax
  mov    %rax,-0x20(%rbp)
L78:
  cmpw   $0x0,-0x22(%rbp)
  je     L72
  mov    -0x20(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x20(%rbp)
  lea    (%rax,%rax,1),%rdx
  mov    -0x38(%rbp),%rax
  add    %rax,%rdx
  movzwl -0x22(%rbp),%eax
  mov    %ax,(%rdx)
L72:
  mov    -0x20(%rbp),%rax
  pop    %rbp
  ret
```

assistant: ```c
long mp_add(unsigned short *rop, unsigned short *op1, unsigned short *op2, unsigned long len1, unsigned long len2) {
  unsigned long value;
  unsigned short carry;
  long size;
  if (len1 < len2) {
    unsigned short *top = op1;
    unsigned long tlen = len1;
    op1 = op2;
    len1 = len2;
    op2 = top;
    len2 = tlen;
  };
  value = (unsigned long)op1[0] + op2[0];
  rop[0] = value;
  carry = value >> 16;
  for (size = 1; size < len2; size++) {
    value = (unsigned long)op1[size] + op2[size] + carry;
    rop[size] = value;
    carry = value >> 16;
  }
  if (rop != op1) {
    for (; size < len1; size++) {
      value = (unsigned long)op1[size] + carry;
      rop[size] = value;
      carry = value >> 16;
    }
  } else {
    for (; carry && size < len1; size++) {
      value = (unsigned long)op1[size] + carry;
      rop[size] = value;
      carry = value >> 16;
    }
    size = len1;
  }
  if (carry)
    rop[size++] = carry;
  return (size);
}
```