user: Converte this assembly snippet into its equivalent C code:

```asm
<factorial_for_big_number>:
  endbr64
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x978,%rsp
  mov    %edi,%r8d
  mov    %fs:0x28,%rax
  mov    %rax,0x968(%rsp)
  xor    %eax,%eax
  mov    %rsp,%rdi
  mov    $0x96,%ecx
  rep stos %rax,%es:(%rdi)
  movl   $0x6,0x8(%rsp)
  movl   $0x1,0xc(%rsp)
  movl   $0x9,0x18(%rsp)
  movl   $0x7,0x1c(%rsp)
  movl   $0x4,0x20(%rsp)
  lea    0x4b0(%rsp),%rdi
  mov    $0x96,%ecx
  rep stos %rax,%es:(%rdi)
  cmp    $0xc,%r8d
  jle    L103
  lea    0x1(%r8),%r10d
  mov    $0xd,%edi
  lea    0x960(%rsp),%r9
  jmp    L77
L57:
  add    $0x4,%r11
  add    $0x4,%rcx
  cmp    %r9,%rcx
  je     L51
L94:
  mov    %edi,%edx
  imul   (%r11),%edx
  add    %eax,%edx
  movslq %edx,%rax
  imul   $0x66666667,%rax,%rax
  sar    $0x22,%rax
  mov    %edx,%esi
  sar    $0x1f,%esi
  sub    %esi,%eax
  cmp    $0x9,%edx
  jle    L57
  movslq %edx,%rsi
  imul   $0x66666667,%rsi,%rsi
  sar    $0x22,%rsi
  mov    %edx,%ebx
  sar    $0x1f,%ebx
  sub    %ebx,%esi
  lea    (%rsi,%rsi,4),%esi
  add    %esi,%esi
  sub    %esi,%edx
  mov    %edx,-0x4(%rcx)
  add    %eax,(%rcx)
  jmp    L57
L51:
  mov    $0x0,%edx
L71:
  mov    0x4b0(%rsp,%rdx,1),%ecx
  mov    %ecx,(%rsp,%rdx,1)
  add    $0x4,%rdx
  cmp    $0x4b0,%rdx
  jne    L71
  add    $0x1,%edi
  cmp    %r10d,%edi
  je     L103
L77:
  mov    %rsp,%r11
  lea    0x4b4(%rsp),%rcx
  jmp    L94
L103:
  mov    %r8d,%esi
  lea    D1(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    $0x1,%r12d
  mov    $0x12b,%ebp
  lea    D9(%rip),%r13
  jmp    L175
L106:
  movslq %ebp,%rax
  cmpl   $0x0,0x4b0(%rsp,%rax,4)
  jne    L153
  lea    -0x1(%rbp),%eax
  cltq
  lea    0x4b0(%rsp),%rdx
L179:
  mov    %eax,%ebp
  sub    $0x1,%rax
  cmpl   $0x0,0x4(%rdx,%rax,4)
  je     L179
L153:
  add    $0x1,%r12d
  jmp    L73
L67:
  sub    $0x1,%ebp
  js     L123
L175:
  cmp    $0x1,%r12d
  jle    L106
L73:
  movslq %ebp,%rbx
  mov    0x4b0(%rsp,%rbx,4),%esi
  mov    %r13,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  imul   $0x55555556,%rbx,%rbx
  shr    $0x20,%rbx
  mov    %ebp,%eax
  sar    $0x1f,%eax
  sub    %eax,%ebx
  lea    (%rbx,%rbx,2),%eax
  cmp    %eax,%ebp
  jne    L67
  test   %ebp,%ebp
  je     L67
  mov    $0x2c,%edi
  call   <putchar@plt>
  jmp    L67
L123:
  mov    0x968(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L105
  add    $0x978,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
L105:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: read_data
arguments: data_label: D1
type_infered: string
name: read_data
arguments: data_label: D9
type_infered: string

tool: D1: %d!:

tool: D9: %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--;
  }
}
```