user: 请将以下的汇编代码转换成C语言代码：

```asm
<mp_unexp_add>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  mov    %edi,-0x14(%rbp)
  mov    %esi,-0x18(%rbp)
  mov    %edx,-0x1c(%rbp)
  mov    %rcx,-0x28(%rbp)
  mov    %r8,-0x30(%rbp)
  mov    %r9,-0x38(%rbp)
  movl   $0x0,-0x8(%rbp)
  cmpl   $0x0,-0x1c(%rbp)
  jne    L149
  mov    -0x28(%rbp),%rax
  mov    (%rax),%edx
  mov    -0x30(%rbp),%rax
  mov    (%rax),%eax
  add    %edx,%eax
  cmp    %eax,-0x18(%rbp)
  jg     L149
  mov    -0x14(%rbp),%eax
  cltq
  shl    $0x2,%rax
  lea    -0x4(%rax),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%edx
  mov    -0x14(%rbp),%eax
  cltq
  shl    $0x2,%rax
  lea    -0x4(%rax),%rcx
  mov    -0x30(%rbp),%rax
  add    %rcx,%rax
  mov    (%rax),%eax
  add    %edx,%eax
  mov    %eax,-0x4(%rbp)
  mov    -0x4(%rbp),%eax
  cmp    -0x18(%rbp),%eax
  jl     L161
  mov    $0xffffffff,%eax
  jmp    L5
L161:
  mov    $0x0,%eax
L5:
  mov    %eax,-0x8(%rbp)
  mov    -0x14(%rbp),%eax
  sub    $0x1,%eax
  mov    %eax,-0xc(%rbp)
  jmp    L181
L159:
  mov    -0xc(%rbp),%eax
  cltq
  shl    $0x2,%rax
  lea    -0x4(%rax),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%edx
  mov    -0xc(%rbp),%eax
  cltq
  shl    $0x2,%rax
  lea    -0x4(%rax),%rcx
  mov    -0x30(%rbp),%rax
  add    %rcx,%rax
  mov    (%rax),%eax
  add    %edx,%eax
  sub    -0x8(%rbp),%eax
  mov    %eax,-0x4(%rbp)
  mov    -0x4(%rbp),%eax
  cmp    -0x18(%rbp),%eax
  jl     L118
  mov    $0xffffffff,%eax
  jmp    L39
L118:
  mov    $0x0,%eax
L39:
  mov    %eax,-0x8(%rbp)
  mov    -0x18(%rbp),%eax
  and    -0x8(%rbp),%eax
  mov    %eax,%ecx
  mov    -0xc(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  mov    -0x4(%rbp),%edx
  sub    %ecx,%edx
  mov    %edx,(%rax)
  subl   $0x1,-0xc(%rbp)
L181:
  cmpl   $0x0,-0xc(%rbp)
  jg     L159
  mov    -0x8(%rbp),%eax
  neg    %eax
  mov    %eax,%edx
  mov    -0x38(%rbp),%rax
  mov    %edx,(%rax)
  jmp    L124
L149:
  mov    -0x1c(%rbp),%eax
  cmp    -0x14(%rbp),%eax
  jle    L169
  mov    -0x14(%rbp),%eax
  mov    %eax,-0x1c(%rbp)
L169:
  mov    -0x14(%rbp),%eax
  sub    $0x1,%eax
  mov    %eax,-0xc(%rbp)
  jmp    L140
L146:
  mov    -0xc(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%edx
  mov    -0xc(%rbp),%eax
  sub    -0x1c(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rcx
  mov    -0x30(%rbp),%rax
  add    %rcx,%rax
  mov    (%rax),%eax
  add    %edx,%eax
  sub    -0x8(%rbp),%eax
  mov    %eax,-0x4(%rbp)
  mov    -0x4(%rbp),%eax
  cmp    -0x18(%rbp),%eax
  jl     L136
  mov    $0xffffffff,%eax
  jmp    L126
L136:
  mov    $0x0,%eax
L126:
  mov    %eax,-0x8(%rbp)
  mov    -0x18(%rbp),%eax
  and    -0x8(%rbp),%eax
  mov    %eax,%ecx
  mov    -0xc(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  mov    -0x4(%rbp),%edx
  sub    %ecx,%edx
  mov    %edx,(%rax)
  subl   $0x1,-0xc(%rbp)
L140:
  mov    -0xc(%rbp),%eax
  cmp    -0x1c(%rbp),%eax
  jge    L146
  mov    -0x1c(%rbp),%eax
  sub    $0x1,%eax
  mov    %eax,-0xc(%rbp)
  jmp    L205
L120:
  mov    -0xc(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  sub    -0x8(%rbp),%eax
  mov    %eax,-0x4(%rbp)
  mov    -0x4(%rbp),%eax
  cmp    -0x18(%rbp),%eax
  jl     L204
  mov    $0xffffffff,%eax
  jmp    L34
L204:
  mov    $0x0,%eax
L34:
  mov    %eax,-0x8(%rbp)
  mov    -0x18(%rbp),%eax
  and    -0x8(%rbp),%eax
  mov    %eax,%ecx
  mov    -0xc(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  mov    -0x4(%rbp),%edx
  sub    %ecx,%edx
  mov    %edx,(%rax)
  subl   $0x1,-0xc(%rbp)
L205:
  cmpl   $0x0,-0xc(%rbp)
  jns    L120
  cmpl   $0x0,-0x8(%rbp)
  je     L124
  mov    -0x14(%rbp),%eax
  sub    $0x1,%eax
  mov    %eax,-0xc(%rbp)
  jmp    L87
L162:
  mov    -0xc(%rbp),%eax
  cltq
  shl    $0x2,%rax
  lea    -0x4(%rax),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  mov    -0xc(%rbp),%edx
  movslq %edx,%rdx
  lea    0x0(,%rdx,4),%rcx
  mov    -0x38(%rbp),%rdx
  add    %rcx,%rdx
  mov    (%rax),%eax
  mov    %eax,(%rdx)
  subl   $0x1,-0xc(%rbp)
L87:
  cmpl   $0x0,-0xc(%rbp)
  jg     L162
  mov    -0x8(%rbp),%eax
  neg    %eax
  mov    %eax,%edx
  mov    -0x38(%rbp),%rax
  mov    %edx,(%rax)
L124:
  mov    -0x8(%rbp),%eax
  neg    %eax
  pop    %rbp
  ret
```

assistant: ```c
int mp_unexp_add(int n, int radix, int expdif, int in1[], int in2[], int out[]) {
  int j, x, carry;
  carry = 0;
  if (expdif == 0 && in1[0] + in2[0] >= radix) {
    x = in1[n - 1] + in2[n - 1];
    carry = x >= radix ? -1 : 0;
    for (j = n - 1; j > 0; j--) {
      x = in1[j - 1] + in2[j - 1] - carry;
      carry = x >= radix ? -1 : 0;
      out[j] = x - (radix & carry);
    }
    out[0] = -carry;
  } else {
    if (expdif > n) {
      expdif = n;
    }
    for (j = n - 1; j >= expdif; j--) {
      x = in1[j] + in2[j - expdif] - carry;
      carry = x >= radix ? -1 : 0;
      out[j] = x - (radix & carry);
    }
    for (j = expdif - 1; j >= 0; j--) {
      x = in1[j] - carry;
      carry = x >= radix ? -1 : 0;
      out[j] = x - (radix & carry);
    }
    if (carry != 0) {
      for (j = n - 1; j > 0; j--) {
        out[j] = out[j - 1];
      }
      out[0] = -carry;
    }
  }
  return -carry;
}
```