user: 请显示与下面列出的汇编代码相匹配的C语言实现:

```asm
<mp_unexp_sub>:
  endbr64
  cmp    %edi,%edx
  lea    -0x1(%rdi),%r11d
  push   %r12
  mov    %rcx,%r10
  cmovg  %edi,%edx
  push   %rbp
  push   %rbx
  mov    %edx,%r12d
  cmp    %r11d,%edx
  jg     L2
  movslq %edx,%rax
  mov    %esi,%ebp
  movslq %r11d,%rcx
  xor    %edx,%edx
  neg    %rax
  lea    (%r8,%rax,2),%rbx
  nopl   0x0(%rax)
L127:
  movswl (%rbx,%rcx,2),%r8d
  movswl (%r10,%rcx,2),%eax
  sub    %r8d,%eax
  mov    %ebp,%r8d
  add    %edx,%eax
  cltd
  and    %edx,%r8d
  add    %r8d,%eax
  mov    %ax,(%r9,%rcx,2)
  sub    $0x1,%rcx
  cmp    %ecx,%r12d
  jle    L127
L214:
  sub    $0x1,%r12d
  mov    %esi,%r8d
  movslq %r12d,%rax
  js     L106
  nopl   0x0(%rax,%rax,1)
L205:
  movswl (%r10,%rax,2),%ecx
  mov    %r8d,%esi
  add    %edx,%ecx
  mov    %ecx,%edx
  sar    $0x1f,%edx
  and    %edx,%esi
  add    %esi,%ecx
  mov    %cx,(%r9,%rax,2)
  sub    $0x1,%rax
  test   %eax,%eax
  jns    L205
L106:
  test   %edi,%edi
  jle    L190
  mov    %r9,%rax
  xor    %r12d,%r12d
  jmp    L14
L82:
  add    $0x1,%r12d
  add    $0x2,%rax
  cmp    %r12d,%edi
  je     L43
L14:
  cmpw   $0x0,(%rax)
  je     L82
  test   %r12d,%r12d
  jle    L43
  cmp    %r12d,%edi
  jle    L43
  mov    %edi,%edx
  sub    %r12d,%edx
  test   %edx,%edx
  jle    L115
  movslq %r12d,%rcx
  lea    -0x1(%rdx),%esi
  mov    %edx,%r8d
  lea    0x2(%rcx,%rcx,1),%rax
  cmp    $0x2,%esi
  jbe    L113
  cmp    $0x6,%esi
  jbe    L40
  mov    %edx,%esi
  lea    -0x2(%r9,%rax,1),%r8
  xor    %eax,%eax
  shr    $0x3,%esi
  shl    $0x4,%rsi
  cs nopw 0x0(%rax,%rax,1)
L180:
  movdqu (%r8,%rax,1),%xmm0
  movups %xmm0,(%r9,%rax,1)
  add    $0x10,%rax
  cmp    %rax,%rsi
  jne    L180
  mov    %edx,%esi
  and    $0xfffffff8,%esi
  mov    %esi,%eax
  cmp    %edx,%esi
  je     L225
  mov    %edx,%r8d
  sub    %esi,%r8d
  lea    -0x1(%r8),%r10d
  cmp    $0x2,%r10d
  jbe    L122
L22:
  add    %rsi,%rcx
  mov    (%r9,%rcx,2),%rcx
  mov    %rcx,(%r9,%rsi,2)
  mov    %r8d,%ecx
  and    $0xfffffffc,%ecx
  add    %ecx,%eax
  cmp    %ecx,%r8d
  je     L225
L122:
  lea    (%r12,%rax,1),%ecx
  movslq %eax,%r8
  movslq %ecx,%rcx
  lea    (%r8,%r8,1),%rsi
  movzwl (%r9,%rcx,2),%ecx
  mov    %cx,(%r9,%r8,2)
  lea    0x1(%rax),%ecx
  cmp    %ecx,%edx
  jle    L225
  add    %r12d,%ecx
  add    $0x2,%eax
  movslq %ecx,%rcx
  movzwl (%r9,%rcx,2),%ecx
  mov    %cx,0x2(%r9,%rsi,1)
  cmp    %eax,%edx
  jle    L225
  add    %r12d,%eax
  cltq
  movzwl (%r9,%rax,2),%eax
  mov    %ax,0x4(%r9,%rsi,1)
L225:
  cmp    %edx,%edi
  jle    L43
L115:
  sub    %edx,%r11d
  movslq %edx,%rdx
  xor    %esi,%esi
  lea    0x2(%r11,%r11,1),%r8
  lea    (%r9,%rdx,2),%rdi
  mov    %r8,%rdx
  call   <memset@plt>
L43:
  mov    %r12d,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  ret
  nopl   0x0(%rax,%rax,1)
L2:
  xor    %edx,%edx
  jmp    L214
L113:
  add    %rcx,%rsi
  neg    %rcx
  lea    -0x2(%r9,%rax,1),%rax
  lea    0x2(%r9,%rsi,2),%r8
  add    %rcx,%rcx
  nopw   0x0(%rax,%rax,1)
L164:
  movzwl (%rax),%esi
  add    $0x2,%rax
  mov    %si,-0x2(%rax,%rcx,1)
  cmp    %r8,%rax
  jne    L164
  jmp    L225
L190:
  xor    %r12d,%r12d
  jmp    L43
L40:
  xor    %eax,%eax
  xor    %esi,%esi
  jmp    L22
```

assistant: ```c
int mp_unexp_sub(int n, int radix, int expdif, short int in1[], short int in2[], short int out[]) {
  int j, x, borrow, ncancel;
  if (expdif > n) {
    expdif = n;
  }
  borrow = 0;
  for (j = n - 1; j >= expdif; j--) {
    x = in1[j] - in2[j - expdif] + borrow;
    borrow = x < 0 ? -1 : 0;
    out[j] = (short int)(x + (radix & borrow));
  }
  for (j = expdif - 1; j >= 0; j--) {
    x = in1[j] + borrow;
    borrow = x < 0 ? -1 : 0;
    out[j] = (short int)(x + (radix & borrow));
  }
  ncancel = 0;
  for (j = 0; j < n && out[j] == 0; j++) {
    ncancel = j + 1;
  }
  if (ncancel > 0 && ncancel < n) {
    for (j = 0; j < n - ncancel; j++) {
      out[j] = out[j + ncancel];
    }
    for (j = n - ncancel; j < n; j++) {
      out[j] = 0;
    }
  }
  return ncancel;
}
```