user: Please show me the C implementation that matches the assembly code listed below:

```asm
<factorial_for_big_number>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x9a0,%rsp
  mov    %edi,-0x994(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  lea    -0x970(%rbp),%rdx
  mov    $0x0,%eax
  mov    $0x96,%ecx
  mov    %rdx,%rdi
  rep stos %rax,%es:(%rdi)
  movl   $0x6,-0x968(%rbp)
  movl   $0x1,-0x964(%rbp)
  movl   $0x9,-0x958(%rbp)
  movl   $0x7,-0x954(%rbp)
  movl   $0x4,-0x950(%rbp)
  lea    -0x4c0(%rbp),%rdx
  mov    $0x0,%eax
  mov    $0x96,%ecx
  mov    %rdx,%rdi
  rep stos %rax,%es:(%rdi)
  movl   $0xd,-0x990(%rbp)
  movl   $0x0,-0x978(%rbp)
  movl   $0x0,-0x980(%rbp)
  mov    -0x994(%rbp),%eax
  mov    %eax,-0x974(%rbp)
  movl   $0x1,-0x97c(%rbp)
  jmp    L7
L114:
  movl   $0x0,-0x98c(%rbp)
  jmp    L17
L86:
  mov    -0x98c(%rbp),%eax
  cltq
  mov    -0x970(%rbp,%rax,4),%eax
  imul   -0x990(%rbp),%eax
  mov    %eax,%edx
  mov    -0x980(%rbp),%eax
  add    %edx,%eax
  mov    %eax,-0x978(%rbp)
  mov    -0x978(%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,-0x980(%rbp)
  cmpl   $0x0,-0x980(%rbp)
  jle    L48
  mov    -0x978(%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    -0x98c(%rbp),%eax
  cltq
  mov    %edx,-0x4c0(%rbp,%rax,4)
  mov    -0x98c(%rbp),%eax
  add    $0x1,%eax
  cltq
  mov    -0x4c0(%rbp,%rax,4),%ecx
  mov    -0x98c(%rbp),%eax
  add    $0x1,%eax
  mov    -0x980(%rbp),%edx
  add    %ecx,%edx
  cltq
  mov    %edx,-0x4c0(%rbp,%rax,4)
L48:
  addl   $0x1,-0x98c(%rbp)
L17:
  cmpl   $0x12a,-0x98c(%rbp)
  jle    L86
  movl   $0x0,-0x984(%rbp)
  jmp    L43
L146:
  mov    -0x984(%rbp),%eax
  cltq
  mov    -0x4c0(%rbp,%rax,4),%edx
  mov    -0x984(%rbp),%eax
  cltq
  mov    %edx,-0x970(%rbp,%rax,4)
  addl   $0x1,-0x984(%rbp)
L43:
  cmpl   $0x12b,-0x984(%rbp)
  jle    L146
  subl   $0x1,-0x994(%rbp)
  addl   $0x1,-0x990(%rbp)
L7:
  cmpl   $0xc,-0x994(%rbp)
  jg     L114
  mov    -0x974(%rbp),%eax
  mov    %eax,%esi
  lea    D4(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  movl   $0x12b,-0x988(%rbp)
  jmp    L59
L107:
  cmpl   $0x1,-0x97c(%rbp)
  jg     L137
  jmp    L85
L77:
  subl   $0x1,-0x988(%rbp)
L85:
  mov    -0x988(%rbp),%eax
  cltq
  mov    -0x4c0(%rbp,%rax,4),%eax
  test   %eax,%eax
  je     L77
  addl   $0x1,-0x97c(%rbp)
L137:
  mov    -0x988(%rbp),%eax
  cltq
  mov    -0x4c0(%rbp,%rax,4),%eax
  mov    %eax,%esi
  lea    D13(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    -0x988(%rbp),%edx
  movslq %edx,%rax
  imul   $0x55555556,%rax,%rax
  shr    $0x20,%rax
  mov    %edx,%ecx
  sar    $0x1f,%ecx
  sub    %ecx,%eax
  mov    %eax,%ecx
  add    %ecx,%ecx
  add    %eax,%ecx
  mov    %edx,%eax
  sub    %ecx,%eax
  test   %eax,%eax
  jne    L49
  cmpl   $0x0,-0x988(%rbp)
  je     L49
  mov    $0x2c,%edi
  call   <putchar@plt>
L49:
  subl   $0x1,-0x988(%rbp)
L59:
  cmpl   $0x0,-0x988(%rbp)
  jns    L107
  nop
  mov    -0x8(%rbp),%rax
  sub    %fs:0x28,%rax
  je     L88
  call   <__stack_chk_fail@plt>
L88:
  leave
  ret
```

tool_calls: name: parse_data
arguments: data_label: D4
type_guessed: string
name: parse_data
arguments: data_label: D13
type_guessed: string

tool: D4: %d!:

tool: D13: %d

assistant: ```c
void factorial_for_big_number(int n) {
  int a[300] = {0, 0, 6, 1, 0, 0, 9, 7, 4};
  int array[300] = {0};
  int m = 13;
  int i, j, k;
  int x = 0;
  int remain = 0;
  int hold = n;
  int number = 1;
  while (n > 12) {
    for (i = 0; i < 300 - 1; i++) {
      x = remain + a[i] * m;
      remain = x / 10;
      if (remain > 0) {
        array[i] = x % 10;
        array[i + 1] += remain;
      }
    }
    for (k = 0; k <= 300 - 1; k++)
      a[k] = array[k];
    n--;
    m++;
  }
  printf("%d!:", hold);
  for (j = 300 - 1; j >= 0;) {
    if (number <= 1) {
      while (array[j] == 0)
        j--;
      number++;
    }
    printf("%d", array[j]);
    if (j % 3 == 0 && j != 0)
      printf(",");
    j--;
  }
}
```