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

```asm
<fac>:
  endbr64
  push   %rbp
  push   %rbx
  sub    $0x28,%rsp
  mov    %edi,0xc(%rsp)
  mov    %fs:0x28,%rax
  mov    %rax,0x18(%rsp)
  xor    %eax,%eax
  mov    $0x1,%esi
  mov    $0x2,%edi
  call   <__CrestCall@plt>
  lea    0xc(%rsp),%rbx
  mov    %rbx,%rsi
  mov    $0x1,%edi
  call   <__CrestStore@plt>
  movslq 0xc(%rsp),%rdx
  mov    %rbx,%rsi
  mov    $0x5,%edi
  call   <__CrestLoad@plt>
  mov    $0x0,%edx
  mov    $0x0,%esi
  mov    $0x4,%edi
  call   <__CrestLoad@plt>
  cmpl   $0x0,0xc(%rsp)
  sete   %dl
  movzbl %dl,%edx
  mov    $0xc,%esi
  mov    $0x3,%edi
  call   <__CrestApply2@plt>
  cmpl   $0x0,0xc(%rsp)
  jne    L13
  mov    $0x1,%edx
  mov    $0x2,%esi
  mov    $0x6,%edi
  call   <__CrestBranch@plt>
  mov    $0x1,%edx
  mov    $0x0,%esi
  mov    $0x8,%edi
  call   <__CrestLoad@plt>
  lea    0x14(%rsp),%rsi
  mov    $0x9,%edi
  call   <__CrestStore@plt>
  mov    $0x1,%edx
L5:
  mov    %edx,0x14(%rsp)
  movslq %edx,%rdx
  lea    0x14(%rsp),%rsi
  mov    $0x13,%edi
  call   <__CrestLoad@plt>
  mov    $0x14,%edi
  call   <__CrestReturn@plt>
  mov    0x14(%rsp),%eax
  mov    0x18(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L15
  add    $0x28,%rsp
  pop    %rbx
  pop    %rbp
  ret
L13:
  mov    $0x0,%edx
  mov    $0x4,%esi
  mov    $0x7,%edi
  call   <__CrestBranch@plt>
  movslq 0xc(%rsp),%rdx
  mov    %rbx,%rsi
  mov    $0xc,%edi
  call   <__CrestLoad@plt>
  mov    $0x1,%edx
  mov    $0x0,%esi
  mov    $0xb,%edi
  call   <__CrestLoad@plt>
  mov    0xc(%rsp),%eax
  lea    -0x1(%rax),%edx
  movslq %edx,%rdx
  mov    $0x1,%esi
  mov    $0xa,%edi
  call   <__CrestApply2@plt>
  mov    0xc(%rsp),%eax
  lea    -0x1(%rax),%edi
  call   <fac>
  mov    %eax,0x10(%rsp)
  movslq %eax,%rsi
  mov    $0xe,%edi
  call   <__CrestHandleReturn@plt>
  lea    0x10(%rsp),%rbp
  mov    %rbp,%rsi
  mov    $0xd,%edi
  call   <__CrestStore@plt>
  movslq 0xc(%rsp),%rdx
  mov    %rbx,%rsi
  mov    $0x11,%edi
  call   <__CrestLoad@plt>
  movslq 0x10(%rsp),%rdx
  mov    %rbp,%rsi
  mov    $0x10,%edi
  call   <__CrestLoad@plt>
  mov    0x10(%rsp),%edx
  add    0xc(%rsp),%edx
  movslq %edx,%rdx
  mov    $0x0,%esi
  mov    $0xf,%edi
  call   <__CrestApply2@plt>
  lea    0x14(%rsp),%rsi
  mov    $0x12,%edi
  call   <__CrestStore@plt>
  mov    0x10(%rsp),%edx
  add    0xc(%rsp),%edx
  jmp    L5
L15:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
int fac(int n) {
  int tmp;
  int __retres3;
  {
    __CrestCall(2, 1);
    __CrestStore(1, (unsigned long)(&n));
    {
      __CrestLoad(5, (unsigned long)(&n), (long long)n);
      __CrestLoad(4, (unsigned long)0, (long long)0);
      __CrestApply2(3, 12, (long long)(n == 0));
      if (n == 0) {
        __CrestBranch(6, 2, 1);
        __CrestLoad(8, (unsigned long)0, (long long)1);
        __CrestStore(9, (unsigned long)(&__retres3));
        __retres3 = 1;
        goto return_label;
      } else {
        __CrestBranch(7, 4, 0);
        __CrestLoad(12, (unsigned long)(&n), (long long)n);
        __CrestLoad(11, (unsigned long)0, (long long)1);
        __CrestApply2(10, 1, (long long)(n - 1));
        tmp = fac(n - 1);
        __CrestHandleReturn(14, (long long)tmp);
        __CrestStore(13, (unsigned long)(&tmp));
        __CrestLoad(17, (unsigned long)(&n), (long long)n);
        __CrestLoad(16, (unsigned long)(&tmp), (long long)tmp);
        __CrestApply2(15, 0, (long long)(n + tmp));
        __CrestStore(18, (unsigned long)(&__retres3));
        __retres3 = n + tmp;
        goto return_label;
      }
    }
  return_label : {
    __CrestLoad(19, (unsigned long)(&__retres3), (long long)__retres3);
    __CrestReturn(20);
    return (__retres3);
  }
  }
}
```