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

```asm
<CalcNN>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0xfd0,%rsp
  mov    %edi,-0xfc4(%rbp)
  mov    %rsi,-0xfd0(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  cmpl   $0x1,-0xfc4(%rbp)
  jg     L63
  mov    -0xfc4(%rbp),%eax
  mov    %eax,%edi
  call   <CalcMM@plt>
  mov    %eax,%edx
  mov    -0xfd0(%rbp),%rax
  lea    D5(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <sprintf@plt>
  jmp    L57
L63:
  lea    -0xfb0(%rbp),%rdx
  mov    $0x0,%eax
  mov    $0x1f4,%ecx
  mov    %rdx,%rdi
  rep stos %rax,%es:(%rdi)
  movl   $0x6,-0xfb0(%rbp)
  movl   $0x4,-0xfc0(%rbp)
  movl   $0x1,-0xfb8(%rbp)
  jmp    L85
L36:
  movl   $0x0,-0xfbc(%rbp)
  movl   $0x0,-0xfb4(%rbp)
  jmp    L107
L73:
  mov    -0xfbc(%rbp),%eax
  cltq
  mov    -0xfb0(%rbp,%rax,4),%edx
  mov    -0xfc0(%rbp),%eax
  imul   %eax,%edx
  mov    -0xfb4(%rbp),%eax
  add    %eax,%edx
  mov    -0xfbc(%rbp),%eax
  cltq
  mov    %edx,-0xfb0(%rbp,%rax,4)
  mov    -0xfbc(%rbp),%eax
  cltq
  mov    -0xfb0(%rbp,%rax,4),%eax
  mov    %eax,%edx
  mov    $0xcccccccd,%eax
  imul   %rdx,%rax
  shr    $0x20,%rax
  shr    $0x3,%eax
  mov    %eax,-0xfb4(%rbp)
  mov    -0xfbc(%rbp),%eax
  cltq
  mov    -0xfb0(%rbp,%rax,4),%ecx
  mov    %ecx,%edx
  mov    $0xcccccccd,%eax
  imul   %rdx,%rax
  shr    $0x20,%rax
  mov    %eax,%edx
  shr    $0x3,%edx
  mov    %edx,%eax
  shl    $0x2,%eax
  add    %edx,%eax
  add    %eax,%eax
  sub    %eax,%ecx
  mov    %ecx,%edx
  mov    -0xfbc(%rbp),%eax
  cltq
  mov    %edx,-0xfb0(%rbp,%rax,4)
  addl   $0x1,-0xfbc(%rbp)
L107:
  mov    -0xfbc(%rbp),%eax
  cmp    -0xfb8(%rbp),%eax
  jl     L73
  jmp    L125
L24:
  mov    -0xfb4(%rbp),%ecx
  movslq %ecx,%rax
  imul   $0x66666667,%rax,%rax
  shr    $0x20,%rax
  sar    $0x2,%eax
  mov    %ecx,%esi
  sar    $0x1f,%esi
  sub    %esi,%eax
  mov    %eax,%edx
  mov    %edx,%eax
  shl    $0x2,%eax
  add    %edx,%eax
  add    %eax,%eax
  sub    %eax,%ecx
  mov    %ecx,%edx
  mov    -0xfb8(%rbp),%eax
  lea    0x1(%rax),%ecx
  mov    %ecx,-0xfb8(%rbp)
  cltq
  mov    %edx,-0xfb0(%rbp,%rax,4)
  mov    -0xfb4(%rbp),%eax
  movslq %eax,%rdx
  imul   $0x66666667,%rdx,%rdx
  shr    $0x20,%rdx
  sar    $0x2,%edx
  sar    $0x1f,%eax
  mov    %eax,%ecx
  mov    %edx,%eax
  sub    %ecx,%eax
  mov    %eax,-0xfb4(%rbp)
L125:
  cmpl   $0x0,-0xfb4(%rbp)
  jne    L24
  cmpl   $0x3e7,-0xfb8(%rbp)
  jle    L113
  lea    D11(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  jmp    L57
L113:
  addl   $0x1,-0xfc0(%rbp)
L85:
  mov    -0xfc0(%rbp),%eax
  cmp    -0xfc4(%rbp),%eax
  jle    L36
  movl   $0x0,-0xfc0(%rbp)
  mov    -0xfb8(%rbp),%eax
  movslq %eax,%rdx
  mov    -0xfd0(%rbp),%rax
  add    %rdx,%rax
  movb   $0x0,(%rax)
  jmp    L12
L119:
  mov    -0xfb8(%rbp),%eax
  cltq
  mov    -0xfb0(%rbp,%rax,4),%eax
  lea    0x30(%rax),%ecx
  mov    -0xfc0(%rbp),%eax
  lea    0x1(%rax),%edx
  mov    %edx,-0xfc0(%rbp)
  movslq %eax,%rdx
  mov    -0xfd0(%rbp),%rax
  add    %rdx,%rax
  mov    %ecx,%edx
  mov    %dl,(%rax)
L12:
  mov    -0xfb8(%rbp),%eax
  lea    -0x1(%rax),%edx
  mov    %edx,-0xfb8(%rbp)
  test   %eax,%eax
  jg     L119
L57:
  mov    -0x8(%rbp),%rax
  sub    %fs:0x28,%rax
  je     L64
  call   <__stack_chk_fail@plt>
L64:
  leave
  ret
```

tool_calls: name: parse_data
arguments: tag: D5
type_infered: string
name: parse_data
arguments: tag: D11
type_infered: string

tool: D5: %u

tool: D11: overflow!


assistant: ```c
void CalcNN(int n, char *pOut) {
  if (n < 2) {
    sprintf(pOut, "%u", CalcMM(n));
    return;
  }
  unsigned int res[1000] = {6};
  int i, j, len, carry;
  for (i = 4, len = 1; i <= n; ++i) {
    for (j = 0, carry = 0; j < len; ++j) {
      res[j] = res[j] * i + carry;
      carry = res[j] / 10;
      res[j] %= 10;
    }
    for (; carry; carry /= 10)
      res[len++] = carry % 10;
    if (len >= 1000) {
      printf("overflow!\n");
      return;
    }
  }
  i = 0;
  pOut[len] = '\0';
  while (len-- > 0)
    pOut[i++] = res[len] + '0';
}
```