user: What is the c source code of the assembly code below?

```asm
<LongDiv>:
  endbr64
  push   %r15
  push   %r14
  mov    %rsi,%r14
  mov    %rcx,%rsi
  push   %r13
  push   %r12
  push   %rbp
  mov    %rcx,%rbp
  push   %rbx
  mov    %rdx,%rbx
  sub    $0xfe8,%rsp
  mov    %rdx,0x10(%rsp)
  mov    %fs:0x28,%rax
  mov    %rax,0xfd8(%rsp)
  xor    %eax,%eax
  call   <Copy@plt>
  mov    %rbx,%rdi
  call   <Initialize@plt>
  mov    %r14,%rsi
  mov    %rbp,%rdi
  call   <Compare@plt>
  cmp    $0xffffffff,%eax
  je     L175
  mov    %r14,%rdi
  xor    %r15d,%r15d
  call   <Degree@plt>
  mov    %eax,0x28(%rsp)
  cltq
  lea    (%r14,%rax,4),%rax
  mov    %rax,0x20(%rsp)
  mov    (%rax),%eax
  test   $0x80,%ah
  jne    L84
  nopl   0x0(%rax,%rax,1)
L143:
  add    %eax,%eax
  add    $0x1,%r15d
  test   $0x80,%ah
  je     L143
L84:
  mov    %r15d,%esi
  mov    %rbp,%rdi
  lea    0x30(%rsp),%rbx
  call   <LeftShift@plt>
  mov    %r15d,%esi
  mov    %r14,%rdi
  lea    0x800(%rsp),%r13
  call   <LeftShift@plt>
  mov    0x28(%rsp),%eax
  lea    0x4(,%rax,4),%rax
  mov    %rax,0x18(%rsp)
  jmp    L60
  nopl   0x0(%rax)
L80:
  mov    %rbx,%rdi
  call   <Initialize@plt>
  mov    0x8(%rsp),%ecx
  mov    0x28(%rsp),%eax
  sub    %eax,%ecx
  mov    %ecx,%r12d
  test   %eax,%eax
  js     L108
  movslq %ecx,%rax
  mov    0x18(%rsp),%rdx
  mov    %r14,%rsi
  lea    (%rbx,%rax,4),%rdi
  mov    %rax,0x8(%rsp)
  call   <memcpy@plt>
  mov    %rbx,%rsi
  mov    %rbp,%rdi
  call   <Compare@plt>
  cmp    $0x1,%eax
  ja     L50
L52:
  mov    0x10(%rsp),%rax
  mov    0x8(%rsp),%rdx
  mov    %rbx,%rsi
  mov    %rbp,%rdi
  movl   $0x1,(%rax,%rdx,4)
  call   <Sub@plt>
L14:
  mov    %r14,%rsi
  mov    %rbp,%rdi
  call   <Compare@plt>
  cmp    $0xffffffff,%eax
  je     L167
L60:
  mov    %rbp,%rdi
  call   <Degree@plt>
  mov    0x20(%rsp),%rsi
  mov    %eax,%ecx
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    (%rsi),%esi
  mov    0x0(%rbp,%rax,4),%eax
  mov    %ecx,0x8(%rsp)
  cmp    %esi,%eax
  jae    L80
  shl    $0x10,%eax
  add    -0x4(%rbp,%rdx,1),%eax
  xor    %edx,%edx
  mov    %rbx,%rdi
  div    %esi
  mov    %eax,0x2c(%rsp)
  mov    %eax,%r12d
  call   <Initialize@plt>
  mov    %r13,%rdi
  call   <Initialize@plt>
  mov    0x8(%rsp),%ecx
  mov    0x28(%rsp),%eax
  sub    %eax,%ecx
  mov    %ecx,0x8(%rsp)
  test   %eax,%eax
  js     L9
  mov    0x8(%rsp),%eax
  mov    0x18(%rsp),%rdx
  mov    %r14,%rsi
  sub    $0x1,%eax
  cltq
  lea    (%rbx,%rax,4),%rdi
  call   <memcpy@plt>
L9:
  mov    %r13,%rsi
  mov    %rbx,%rdi
  call   <Copy@plt>
  mov    0x2c(%rsp),%esi
  mov    %rbx,%rdi
  call   <Mul@plt>
  jmp    L21
  nopl   0x0(%rax)
L115:
  mov    %r13,%rsi
  mov    %rbx,%rdi
  sub    $0x1,%r12d
  call   <Sub@plt>
L21:
  mov    %rbx,%rsi
  mov    %rbp,%rdi
  call   <Compare@plt>
  cmp    $0x1,%eax
  ja     L115
  movslq 0x8(%rsp),%rax
  mov    0x10(%rsp),%rdx
  mov    %rbx,%rsi
  mov    %rbp,%rdi
  mov    %r12d,-0x4(%rdx,%rax,4)
  call   <Sub@plt>
  mov    %r14,%rsi
  mov    %rbp,%rdi
  call   <Compare@plt>
  cmp    $0xffffffff,%eax
  jne    L60
L167:
  mov    %r15d,%esi
  mov    %rbp,%rdi
  call   <RightShift@plt>
  mov    %r15d,%esi
  mov    %r14,%rdi
  call   <RightShift@plt>
L175:
  mov    0xfd8(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L174
  add    $0xfe8,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax)
L50:
  mov    %rbx,%rdi
  sub    $0x1,%r12d
  call   <Initialize@plt>
  mov    %r13,%rdi
  movslq %r12d,%r12
  call   <Initialize@plt>
  mov    0x18(%rsp),%rdx
  lea    (%rbx,%r12,4),%rdi
  mov    %r14,%rsi
  call   <memcpy@plt>
L61:
  mov    %r13,%rsi
  mov    %rbx,%rdi
  mov    $0xffff,%r12d
  call   <Copy@plt>
  mov    $0xffff,%esi
  mov    %rbx,%rdi
  call   <Mul@plt>
  jmp    L55
L156:
  mov    %r13,%rsi
  mov    %rbx,%rdi
  sub    $0x1,%r12d
  call   <Sub@plt>
L55:
  mov    %rbx,%rsi
  mov    %rbp,%rdi
  call   <Compare@plt>
  cmp    $0x1,%eax
  ja     L156
  mov    0x10(%rsp),%rax
  mov    0x8(%rsp),%rdx
  mov    %rbx,%rsi
  mov    %rbp,%rdi
  mov    %r12d,-0x4(%rax,%rdx,4)
  call   <Sub@plt>
  jmp    L14
  xchg   %ax,%ax
L108:
  mov    %rbx,%rsi
  mov    %rbp,%rdi
  call   <Compare@plt>
  movslq %r12d,%rdx
  mov    %rdx,0x8(%rsp)
  cmp    $0x1,%eax
  jbe    L52
  mov    %rbx,%rdi
  call   <Initialize@plt>
  mov    %r13,%rdi
  call   <Initialize@plt>
  jmp    L61
L174:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
void LongDiv(unsigned a[], unsigned b[], unsigned quot[], unsigned res[]) {
  int s, t, k, sh;
  int i;
  unsigned x, D, Q;
  unsigned c[500], d[500];
  Copy(a, res);
  Initialize(quot);
  if (Compare(res, b) == -1)
    return;
  t = Degree(b);
  sh = 0;
  x = b[t];
  while ((x & (0x8000)) == 0) {
    x = x << 1;
    sh++;
  }
  LeftShift(res, sh);
  LeftShift(b, sh);
  while (1) {
    s = Degree(res);
    if (res[s] >= b[t]) {
      Initialize(c);
      for (i = 0; i <= t; i++)
        c[s - t + i] = b[i];
      k = Compare(res, c);
      if (k == 1 || k == 0) {
        quot[s - t] = 1;
        Sub(res, c);
      } else {
        Initialize(c);
        Initialize(d);
        for (i = 0; i <= t; i++)
          c[s - t - 1 + i] = b[i];
        Copy(c, d);
        D = 0xffff;
        Mul(c, D);
        while (1) {
          k = Compare(res, c);
          if (k == 1 || k == 0)
            break;
          Sub(c, d);
          D--;
        }
        quot[s - t - 1] = D;
        Sub(res, c);
      }
    } else {
      x = (res[s] << 16) + res[s - 1];
      Q = x / b[t];
      Initialize(c);
      Initialize(d);
      for (i = 0; i <= t; i++)
        c[s - t - 1 + i] = b[i];
      Copy(c, d);
      Mul(c, Q);
      while (1) {
        k = Compare(res, c);
        if (k == 1 || k == 0)
          break;
        Sub(c, d);
        Q--;
      }
      quot[s - t - 1] = Q;
      Sub(res, c);
    }
    k = Compare(res, b);
    if (k == -1)
      break;
  }
  RightShift(res, sh);
  RightShift(b, sh);
}
```