user: What would the C source look like for the assembly code provided here?

```asm
<mp_toom_mul>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0xa8,%rsp
  mov    %rdi,%r14
  mov    %rsi,0x40(%rsp)
  mov    %rdx,0x48(%rsp)
  lea    (%rcx,%r8,1),%rax
  mov    %rax,0x68(%rsp)
  lea    0x4(%rax),%rdx
  movabs $0xaaaaaaaaaaaaaaab,%rax
  mul    %rdx
  mov    %rdx,%r13
  shr    $0x2,%r13
  lea    0x0(%r13,%r13,1),%rax
  sub    %rax,%rcx
  mov    %rcx,0x30(%rsp)
  sub    %rax,%r8
  mov    %r8,0x38(%rsp)
  lea    0x4(%r13,%r13,1),%rbp
  mov    %rbp,%rdi
  mov    $0x0,%eax
  call   <mp_malloc@plt>
  cltq
  mov    %rax,0x8(%rsp)
  mov    %rbp,%rdi
  mov    $0x0,%eax
  call   <mp_malloc@plt>
  movslq %eax,%rbx
  mov    %rbx,0x10(%rsp)
  lea    -0x2(%rbp),%r12
  mov    %r12,%rdi
  mov    $0x0,%eax
  call   <mp_malloc@plt>
  movslq %eax,%rbx
  mov    %r12,%rdi
  mov    $0x0,%eax
  call   <mp_malloc@plt>
  movslq %eax,%r15
  mov    %rbp,%rdi
  mov    $0x0,%eax
  call   <mp_malloc@plt>
  movslq %eax,%rdi
  mov    %rdi,0x20(%rsp)
  mov    %rbp,%rdi
  mov    $0x0,%eax
  call   <mp_malloc@plt>
  movslq %eax,%r11
  mov    %r11,0x28(%rsp)
  lea    -0x4(%rbp),%r9
  mov    0x40(%rsp),%r12
  mov    %r9,0x18(%rsp)
  add    %r9,%r12
  mov    $0x1,%ecx
  mov    %r13,%rdx
  mov    %r12,%rsi
  mov    %rbx,%rdi
  mov    $0x0,%eax
  call   <mp_lshift@plt>
  movslq %eax,%rbp
  mov    $0x2,%ecx
  mov    %r13,%rdx
  mov    0x40(%rsp),%rsi
  mov    0x8(%rsp),%rdi
  mov    $0x0,%eax
  call   <mp_lshift@plt>
  movslq %eax,%rcx
  mov    %rbp,%r8
  mov    %rbx,%rdx
  mov    0x8(%rsp),%rax
  mov    %rax,%rsi
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <mp_add@plt>
  lea    0x0(,%r13,4),%r10
  mov    %r10,0x50(%rsp)
  mov    0x18(%rsp),%r9
  lea    (%r12,%r9,1),%r10
  movslq %eax,%rcx
  mov    0x30(%rsp),%r8
  mov    %r10,0x58(%rsp)
  mov    %r10,%rdx
  mov    0x8(%rsp),%rax
  mov    %rax,%rsi
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <mp_add@plt>
  movslq %eax,%rcx
  mov    %rcx,0x78(%rsp)
  mov    $0x2,%ecx
  mov    0x30(%rsp),%rdx
  mov    0x58(%rsp),%rsi
  mov    0x20(%rsp),%rdi
  mov    $0x0,%eax
  call   <mp_lshift@plt>
  movslq %eax,%rcx
  mov    %rbp,%r8
  mov    %rbx,%rdx
  mov    0x20(%rsp),%rbp
  mov    %rbp,%rsi
  mov    %rbp,%rdi
  mov    $0x0,%eax
  call   <mp_add@plt>
  movslq %eax,%rcx
  mov    %r13,%r8
  mov    0x40(%rsp),%rdx
  mov    %rbp,%rsi
  mov    %rbp,0x20(%rsp)
  mov    %rbp,%rdi
  mov    $0x0,%eax
  call   <mp_add@plt>
  movslq %eax,%r11
  mov    %r11,0x80(%rsp)
  mov    %r13,%r8
  mov    %r13,%rcx
  mov    %r12,%rdx
  mov    0x40(%rsp),%rsi
  mov    %rbx,%rdi
  mov    $0x0,%eax
  call   <mp_add@plt>
  movslq %eax,%rcx
  mov    0x30(%rsp),%r8
  mov    0x58(%rsp),%rdx
  mov    %rbx,%rsi
  mov    %rbx,%rdi
  mov    $0x0,%eax
  call   <mp_add@plt>
  movslq %eax,%r10
  mov    %r10,0x88(%rsp)
  mov    0x48(%rsp),%r12
  add    0x18(%rsp),%r12
  mov    $0x1,%ecx
  mov    %r13,%rdx
  mov    %r12,%rsi
  mov    %r15,%rdi
  mov    $0x0,%eax
  call   <mp_lshift@plt>
  movslq %eax,%rbp
  mov    $0x2,%ecx
  mov    %r13,%rdx
  mov    0x48(%rsp),%rsi
  mov    0x10(%rsp),%rdi
  mov    $0x0,%eax
  call   <mp_lshift@plt>
  movslq %eax,%rcx
  mov    %rbp,%r8
  mov    %r15,%rdx
  mov    0x10(%rsp),%r10
  mov    %r10,%rsi
  mov    %r10,%rdi
  mov    $0x0,%eax
  call   <mp_add@plt>
  mov    0x18(%rsp),%rcx
  lea    (%r12,%rcx,1),%r9
  movslq %eax,%rcx
  mov    0x38(%rsp),%r8
  mov    %r9,0x60(%rsp)
  mov    %r9,%rdx
  mov    0x10(%rsp),%r10
  mov    %r10,%rsi
  mov    %r10,%rdi
  mov    $0x0,%eax
  call   <mp_add@plt>
  movslq %eax,%rcx
  mov    %rcx,0x90(%rsp)
  mov    $0x2,%ecx
  mov    0x38(%rsp),%rdx
  mov    0x60(%rsp),%rsi
  mov    0x28(%rsp),%rdi
  mov    $0x0,%eax
  call   <mp_lshift@plt>
  movslq %eax,%rcx
  mov    %rbp,%r8
  mov    %r15,%rdx
  mov    0x28(%rsp),%rbp
  mov    %rbp,%rsi
  mov    %rbp,%rdi
  mov    $0x0,%eax
  call   <mp_add@plt>
  movslq %eax,%rcx
  mov    %r13,%r8
  mov    0x48(%rsp),%rdx
  mov    %rbp,%rsi
  mov    %rbp,0x28(%rsp)
  mov    %rbp,%rdi
  mov    $0x0,%eax
  call   <mp_add@plt>
  movslq %eax,%rbp
  mov    %r13,%r8
  mov    %r13,%rcx
  mov    %r12,%rdx
  mov    0x48(%rsp),%rsi
  mov    %r15,%rdi
  mov    $0x0,%eax
  call   <mp_add@plt>
  movslq %eax,%rcx
  mov    0x38(%rsp),%r8
  mov    0x60(%rsp),%rdx
  mov    %r15,%rsi
  mov    %r15,0x70(%rsp)
  mov    %r15,%rdi
  mov    $0x0,%eax
  call   <mp_add@plt>
  movslq %eax,%r12
  mov    0x78(%rsp),%r9
  imul   0x90(%rsp),%r9
  mov    %r9,%rsi
  add    %rsi,%rsi
  mov    $0x1,%edi
  mov    $0x0,%eax
  call   <mp_calloc@plt>
  mov    %eax,0x9c(%rsp)
  movslq %eax,%r15
  mov    0x90(%rsp),%r8
  mov    0x78(%rsp),%rcx
  mov    0x10(%rsp),%rdx
  mov    0x8(%rsp),%rsi
  mov    %r15,%rdi
  mov    $0x0,%eax
  call   <mp_mul@plt>
  mov    %eax,0x78(%rsp)
  mov    0x8(%rsp),%rdi
  mov    $0x0,%eax
  call   <mp_free@plt>
  mov    0x10(%rsp),%rdi
  mov    $0x0,%eax
  call   <mp_free@plt>
  mov    0x88(%rsp),%r9
  imul   %r12,%r9
  mov    %r9,%rsi
  add    %rsi,%rsi
  mov    $0x1,%edi
  mov    $0x0,%eax
  call   <mp_calloc@plt>
  movslq %eax,%r9
  mov    %r12,%r8
  mov    0x88(%rsp),%rcx
  mov    0x70(%rsp),%rdx
  mov    %rbx,%rsi
  mov    %r9,0x8(%rsp)
  mov    %r9,%rdi
  mov    $0x0,%eax
  call   <mp_mul@plt>
  mov    %eax,%r12d
  mov    %rbx,%rdi
  mov    $0x0,%eax
  call   <mp_free@plt>
  mov    0x70(%rsp),%rdi
  mov    $0x0,%eax
  call   <mp_free@plt>
  mov    0x80(%rsp),%rbx
  imul   %rbp,%rbx
  mov    %rbx,%rsi
  add    %rsi,%rsi
  mov    $0x1,%edi
  mov    $0x0,%eax
  call   <mp_calloc@plt>
  movslq %eax,%rbx
  mov    %rbp,%r8
  mov    0x80(%rsp),%rcx
  mov    0x28(%rsp),%rdx
  mov    0x20(%rsp),%rsi
  mov    %rbx,%rdi
  mov    $0x0,%eax
  call   <mp_mul@plt>
  mov    %eax,%ebp
  mov    0x20(%rsp),%rdi
  mov    $0x0,%eax
  call   <mp_free@plt>
  mov    0x28(%rsp),%rdi
  mov    $0x0,%eax
  call   <mp_free@plt>
  mov    0x50(%rsp),%rsi
  mov    $0x1,%edi
  mov    $0x0,%eax
  call   <mp_calloc@plt>
  movslq %eax,%rcx
  mov    %rcx,%r11
  mov    %r13,%r8
  mov    %r13,%rcx
  mov    0x48(%rsp),%rdx
  mov    0x40(%rsp),%rsi
  mov    %r11,0x20(%rsp)
  mov    %r11,%rdi
  mov    $0x0,%eax
  call   <mp_mul@plt>
  movslq %eax,%rcx
  mov    %rcx,0x28(%rsp)
  mov    0x30(%rsp),%rsi
  add    0x38(%rsp),%rsi
  add    %rsi,%rsi
  mov    $0x1,%edi
  mov    $0x0,%eax
  call   <mp_calloc@plt>
  movslq %eax,%r10
  mov    0x38(%rsp),%r8
  mov    0x30(%rsp),%rcx
  mov    0x60(%rsp),%rdx
  mov    0x58(%rsp),%rsi
  mov    %r10,0x10(%rsp)
  mov    %r10,%rdi
  mov    $0x0,%eax
  call   <mp_mul@plt>
  movslq %eax,%rsi
  mov    %rsi,0x30(%rsp)
  mov    $0x4,%ecx
  mov    0x28(%rsp),%rdx
  mov    0x20(%rsp),%rsi
  mov    %r14,%rdi
  mov    $0x0,%eax
  call   <mp_lshift@plt>
  movslq 0x78(%rsp),%rcx
  movslq %eax,%r8
  mov    %r14,%rdx
  mov    %r15,%rsi
  mov    %r15,%rdi
  mov    $0x0,%eax
  call   <mp_sub@plt>
  movslq %eax,%rcx
  mov    0x30(%rsp),%r8
  mov    0x10(%rsp),%rdx
  mov    %r15,%rsi
  mov    %r15,%rdi
  mov    $0x0,%eax
  call   <mp_sub@plt>
  cltq
  mov    %rax,0x38(%rsp)
  movslq %r12d,%rcx
  mov    0x28(%rsp),%r8
  mov    0x20(%rsp),%rdx
  mov    0x8(%rsp),%r12
  mov    %r12,%rsi
  mov    %r12,%rdi
  mov    $0x0,%eax
  call   <mp_sub@plt>
  movslq %eax,%rcx
  mov    0x30(%rsp),%r8
  mov    0x10(%rsp),%rdx
  mov    %r12,%rsi
  mov    %r12,0x8(%rsp)
  mov    %r12,%rdi
  mov    $0x0,%eax
  call   <mp_sub@plt>
  movslq %eax,%r12
  movslq %ebp,%rcx
  mov    0x28(%rsp),%r8
  mov    0x20(%rsp),%rdx
  mov    %rbx,%rsi
  mov    %rbx,%rdi
  mov    $0x0,%eax
  call   <mp_sub@plt>
  mov    %eax,%ebp
  mov    $0x4,%ecx
  mov    0x30(%rsp),%rdx
  mov    0x10(%rsp),%rsi
  mov    %r14,%rdi
  mov    $0x0,%eax
  call   <mp_lshift@plt>
  movslq %ebp,%rcx
  movslq %eax,%r8
  mov    %r14,%rdx
  mov    %rbx,%rsi
  mov    %rbx,%rdi
  mov    $0x0,%eax
  call   <mp_sub@plt>
  movslq %eax,%rsi
  mov    %rsi,0x48(%rsp)
  mov    %rsi,%r8
  mov    0x38(%rsp),%rcx
  mov    %rbx,%rdx
  mov    %r15,%rsi
  mov    %r14,%rdi
  mov    $0x0,%eax
  call   <mp_add@plt>
  movslq %eax,%rbp
  lea    (%r14,%rbp,2),%rax
  mov    $0x3,%ecx
  mov    %r12,%rdx
  mov    0x8(%rsp),%rsi
  mov    %rax,0x40(%rsp)
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <mp_lshift@plt>
  movslq %eax,%r8
  mov    %rbp,%rcx
  mov    0x40(%rsp),%rdx
  mov    %r14,%rsi
  mov    %r14,%rdi
  mov    $0x0,%eax
  call   <mp_sub@plt>
  movslq %eax,%rbp
  lea    (%r14,%rbp,2),%rax
  mov    $0x1,%ecx
  mov    %r12,%rdx
  mov    0x8(%rsp),%rsi
  mov    %rax,0x40(%rsp)
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <mp_lshift@plt>
  movslq %eax,%rcx
  mov    %rbp,%r8
  mov    %r14,%rdx
  mov    0x40(%rsp),%rsi
  mov    %r14,%rdi
  mov    $0x0,%eax
  call   <mp_sub@plt>
  movslq %eax,%rbp
  mov    $0x1,%ecx
  mov    0x38(%rsp),%rdx
  mov    %r15,%rsi
  mov    %r15,%rdi
  mov    $0x0,%eax
  call   <mp_rshift@plt>
  movslq %eax,%rcx
  mov    %r12,%r8
  mov    0x8(%rsp),%rdx
  mov    %r15,%rsi
  mov    %r15,%rdi
  mov    $0x0,%eax
  call   <mp_sub@plt>
  mov    %eax,%r12d
  mov    $0x1,%ecx
  mov    %rbp,%rdx
  mov    %r14,%rsi
  mov    0x8(%rsp),%rdi
  mov    $0x0,%eax
  call   <mp_rshift@plt>
  movslq %eax,%r8
  mov    %r8,0x58(%rsp)
  movslq %r12d,%rcx
  mov    0x8(%rsp),%rdx
  mov    %r15,%rsi
  mov    %r15,%rdi
  mov    $0x0,%eax
  call   <mp_sub@plt>
  movslq %eax,%r12
  lea    -0x2(%r12,%r12,1),%r8
  lea    (%r15,%r8,1),%rsi
  movzwl (%rsi),%ecx
  movabs $0xaaaaaaaaaaaaaaab,%rax
  mul    %rcx
  shr    %rdx
  mov    %dx,(%rsi)
  mov    %r12,%rdi
  sub    $0x2,%rdi
  js     L0
  movslq 0x9c(%rsp),%rax
  lea    -0x2(%r8,%rax,1),%rsi
  movabs $0xaaaaaaaaaaaaaaab,%r8
L6:
  mov    %rcx,%rax
  mul    %r8
  mov    %rdx,%rax
  shr    %rax
  and    $0xfffffffffffffffe,%rdx
  add    %rax,%rdx
  sub    %rdx,%rcx
  shl    $0x10,%rcx
  movzwl (%rsi),%eax
  add    %rax,%rcx
  mov    %rcx,%rax
  mul    %r8
  shr    %rdx
  mov    %dx,(%rsi)
  sub    $0x2,%rsi
  sub    $0x1,%rdi
  jns    L6
L0:
  mov    $0x1,%ecx
  mov    0x48(%rsp),%rdx
  mov    %rbx,%rsi
  mov    %rbx,%rdi
  mov    $0x0,%eax
  call   <mp_rshift@plt>
  movslq %eax,%rcx
  mov    %r12,%r8
  mov    %r15,%rdx
  mov    %rbx,%rsi
  mov    %rbx,%rdi
  mov    $0x0,%eax
  call   <mp_sub@plt>
  movslq %eax,%rcx
  mov    %rbp,%r8
  mov    %r14,%rdx
  mov    %rbx,%rsi
  mov    %rbx,%rdi
  mov    $0x0,%eax
  call   <mp_sub@plt>
  movslq %eax,%rdx
  mov    $0x2,%ecx
  mov    %rbx,%rsi
  mov    %rbx,%rdi
  mov    $0x0,%eax
  call   <mp_rshift@plt>
  mov    %eax,0x40(%rsp)
  mov    0x68(%rsp),%rcx
  lea    (%rcx,%rcx,1),%rdx
  mov    $0x0,%esi
  mov    %r14,%rdi
  call   <memset@plt>
  lea    (%r14,%r13,8),%rbp
  mov    0x68(%rsp),%rcx
  sub    0x50(%rsp),%rcx
  mov    0x30(%rsp),%r8
  mov    0x10(%rsp),%rdx
  mov    %rbp,%rsi
  mov    %rbp,%rdi
  mov    $0x0,%eax
  call   <mp_add@plt>
  lea    0x0(%r13,%r13,2),%r11
  mov    %r13,%rsi
  neg    %rsi
  lea    (%rsi,%rsi,1),%rsi
  mov    %rsi,0x30(%rsp)
  add    %rsi,%rbp
  movslq %eax,%rcx
  add    0x50(%rsp),%rcx
  mov    %r11,0x38(%rsp)
  sub    %r11,%rcx
  movslq 0x40(%rsp),%r8
  mov    %rbx,%rdx
  mov    %rbp,%rsi
  mov    %rbp,%rdi
  mov    $0x0,%eax
  call   <mp_add@plt>
  add    0x30(%rsp),%rbp
  movslq %eax,%rcx
  add    0x38(%rsp),%rcx
  sub    0x18(%rsp),%rcx
  mov    0x58(%rsp),%r8
  mov    0x8(%rsp),%rdx
  mov    %rbp,%rsi
  mov    %rbp,%rdi
  mov    $0x0,%eax
  call   <mp_add@plt>
  mov    0x30(%rsp),%rsi
  lea    0x0(%rbp,%rsi,1),%rdi
  movslq %eax,%rcx
  add    0x18(%rsp),%rcx
  sub    %r13,%rcx
  mov    %r12,%r8
  mov    %r15,%rdx
  mov    %rdi,%rsi
  mov    $0x0,%eax
  call   <mp_add@plt>
  movslq %eax,%rcx
  add    %r13,%rcx
  mov    0x28(%rsp),%r8
  mov    0x20(%rsp),%r13
  mov    %r13,%rdx
  mov    %r14,%rsi
  mov    %r14,%rdi
  mov    $0x0,%eax
  call   <mp_add@plt>
  movslq %eax,%r12
  mov    0x10(%rsp),%rdi
  mov    $0x0,%eax
  call   <mp_free@plt>
  mov    %rbx,%rdi
  mov    $0x0,%eax
  call   <mp_free@plt>
  mov    0x8(%rsp),%rdi
  mov    $0x0,%eax
  call   <mp_free@plt>
  mov    %r15,%rdi
  mov    $0x0,%eax
  call   <mp_free@plt>
  mov    %r13,%rdi
  mov    $0x0,%eax
  call   <mp_free@plt>
  cmp    $0x1,%r12
  jle    L13
  cmpw   $0x1,-0x2(%r14,%r12,2)
  sbb    $0x0,%r12
L13:
  mov    %r12,%rax
  add    $0xa8,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
```

assistant: ```c
long mp_toom_mul(unsigned short *rop, unsigned short *op1, unsigned short *op2, unsigned long len1, unsigned long len2) {
  long size, xsize, i;
  unsigned long value;
  unsigned short carry;
  unsigned long x;
  unsigned long l1, l2;
  unsigned long al, bl, cl, dl, el, Ul[3], Vl[3];
  unsigned short *a, *b, *c, *d, *e, *U[3], *V[3];
  x = (len1 + len2 + 4) / 6;
  l1 = len1 - (x << 1);
  l2 = len2 - (x << 1);
  U[0] = mp_malloc(sizeof(unsigned short) * (x + 2));
  V[0] = mp_malloc(sizeof(unsigned short) * (x + 2));
  U[1] = mp_malloc(sizeof(unsigned short) * (x + 1));
  V[1] = mp_malloc(sizeof(unsigned short) * (x + 1));
  U[2] = mp_malloc(sizeof(unsigned short) * (x + 2));
  V[2] = mp_malloc(sizeof(unsigned short) * (x + 2));
  Ul[1] = mp_lshift(U[1], op1 + x, x, 1);
  Ul[0] = mp_lshift(U[0], op1, x, 2);
  Ul[0] = mp_add(U[0], U[0], U[1], Ul[0], Ul[1]);
  Ul[0] = mp_add(U[0], U[0], op1 + x + x, Ul[0], l1);
  Ul[2] = mp_lshift(U[2], op1 + x + x, l1, 2);
  Ul[2] = mp_add(U[2], U[2], U[1], Ul[2], Ul[1]);
  Ul[2] = mp_add(U[2], U[2], op1, Ul[2], x);
  Ul[1] = mp_add(U[1], op1, op1 + x, x, x);
  Ul[1] = mp_add(U[1], U[1], op1 + x + x, Ul[1], l1);
  Vl[1] = mp_lshift(V[1], op2 + x, x, 1);
  Vl[0] = mp_lshift(V[0], op2, x, 2);
  Vl[0] = mp_add(V[0], V[0], V[1], Vl[0], Vl[1]);
  Vl[0] = mp_add(V[0], V[0], op2 + x + x, Vl[0], l2);
  Vl[2] = mp_lshift(V[2], op2 + x + x, l2, 2);
  Vl[2] = mp_add(V[2], V[2], V[1], Vl[2], Vl[1]);
  Vl[2] = mp_add(V[2], V[2], op2, Vl[2], x);
  Vl[1] = mp_add(V[1], op2, op2 + x, x, x);
  Vl[1] = mp_add(V[1], V[1], op2 + x + x, Vl[1], l2);
  b = mp_calloc(1, sizeof(unsigned short) * (Ul[0] * Vl[0]));
  bl = mp_mul(b, U[0], V[0], Ul[0], Vl[0]);
  mp_free(U[0]);
  mp_free(V[0]);
  c = mp_calloc(1, sizeof(unsigned short) * (Ul[1] * Vl[1]));
  cl = mp_mul(c, U[1], V[1], Ul[1], Vl[1]);
  mp_free(U[1]);
  mp_free(V[1]);
  d = mp_calloc(1, sizeof(unsigned short) * (Ul[2] * Vl[2]));
  dl = mp_mul(d, U[2], V[2], Ul[2], Vl[2]);
  mp_free(U[2]);
  mp_free(V[2]);
  a = mp_calloc(1, sizeof(unsigned short) * (x + x));
  al = mp_mul(a, op1, op2, x, x);
  e = mp_calloc(1, sizeof(unsigned short) * (l1 + l2));
  el = mp_mul(e, op1 + x + x, op2 + x + x, l1, l2);
  size = mp_lshift(rop, a, al, 4);
  bl = mp_sub(b, b, rop, bl, size);
  bl = mp_sub(b, b, e, bl, el);
  cl = mp_sub(c, c, a, cl, al);
  cl = mp_sub(c, c, e, cl, el);
  dl = mp_sub(d, d, a, dl, al);
  size = mp_lshift(rop, e, el, 4);
  dl = mp_sub(d, d, rop, dl, size);
  size = mp_add(rop, b, d, bl, dl);
  xsize = mp_lshift(rop + size, c, cl, 3);
  size = mp_sub(rop, rop, rop + size, size, xsize);
  xsize = mp_lshift(rop + size, c, cl, 1);
  size = mp_sub(rop, rop + size, rop, xsize, size);
  bl = mp_rshift(b, b, bl, 1);
  bl = mp_sub(b, b, c, bl, cl);
  cl = mp_rshift(c, rop, size, 1);
  bl = mp_sub(b, b, c, bl, cl);
  i = bl - 1;
  value = b[i];
  b[i] = value / 3;
  for (--i; i >= 0; i--) {
    carry = value % 3;
    value = ((unsigned long)carry << 16) + b[i];
    b[i] = (unsigned short)(value / 3);
  }
  dl = mp_rshift(d, d, dl, 1);
  dl = mp_sub(d, d, b, dl, bl);
  dl = mp_sub(d, d, rop, dl, size);
  dl = mp_rshift(d, d, dl, 2);
  memset(rop, '\0', sizeof(unsigned short) * (len1 + len2));
  i = x * 4;
  xsize = (len1 + len2) - i;
  size = mp_add(rop + i, rop + i, e, xsize, el) + i;
  i = x * 3;
  xsize = size - i;
  size = mp_add(rop + i, rop + i, d, xsize, dl) + i;
  i = x * 2;
  xsize = size - i;
  size = mp_add(rop + i, rop + i, c, xsize, cl) + i;
  i = x;
  xsize = size - i;
  size = mp_add(rop + i, rop + i, b, xsize, bl) + i;
  size = mp_add(rop, rop, a, size, al);
  mp_free(e);
  mp_free(d);
  mp_free(c);
  mp_free(b);
  mp_free(a);
  if (size > 1 && rop[size - 1] == 0)
    --size;
  return (size);
}
```