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

```asm
<f>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %r15
  push   %r14
  push   %r12
  push   %rbx
  sub    $0x70,%rsp
  mov    %edi,-0x74(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x28(%rbp)
  xor    %eax,%eax
  movl   $0x0,-0x68(%rbp)
  movl   $0x4,-0x64(%rbp)
  mov    %rsp,%rax
  mov    %rax,%rbx
  cmpl   $0x0,-0x68(%rbp)
  je     L38
  mov    $0x6,%edx
  jmp    L77
L38:
  mov    $0x0,%edx
L77:
  mov    -0x64(%rbp),%eax
  add    %edx,%eax
  movslq %eax,%rdx
  sub    $0x1,%rdx
  mov    %rdx,-0x60(%rbp)
  movslq %eax,%rdx
  mov    %rdx,%r10
  mov    $0x0,%r11d
  movslq %eax,%rdx
  mov    %rdx,%r8
  mov    $0x0,%r9d
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    $0x10,%eax
  sub    $0x1,%rax
  add    %rdx,%rax
  mov    $0x10,%esi
  mov    $0x0,%edx
  div    %rsi
  imul   $0x10,%rax,%rax
  mov    %rax,%rcx
  and    $0xfffffffffffff000,%rcx
  mov    %rsp,%rdx
  sub    %rcx,%rdx
L55:
  cmp    %rdx,%rsp
  je     L98
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  jmp    L55
L98:
  mov    %rax,%rdx
  and    $0xfff,%edx
  sub    %rdx,%rsp
  mov    %rax,%rdx
  and    $0xfff,%edx
  test   %rdx,%rdx
  je     L9
  and    $0xfff,%eax
  sub    $0x8,%rax
  add    %rsp,%rax
  orq    $0x0,(%rax)
L9:
  mov    %rsp,%rax
  add    $0x3,%rax
  shr    $0x2,%rax
  shl    $0x2,%rax
  mov    %rax,-0x58(%rbp)
  mov    -0x58(%rbp),%rax
  mov    %rax,%rdi
  call   <g@plt>
  mov    %eax,-0x68(%rbp)
  mov    %rsp,%rax
  mov    %rax,%r12
  mov    -0x74(%rbp),%eax
  movslq %eax,%rdx
  sub    $0x1,%rdx
  mov    %rdx,-0x50(%rbp)
  movslq %eax,%rdx
  mov    %rdx,-0x90(%rbp)
  movq   $0x0,-0x88(%rbp)
  movslq %eax,%rdx
  mov    %rdx,%r14
  mov    $0x0,%r15d
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    $0x10,%eax
  sub    $0x1,%rax
  add    %rdx,%rax
  mov    $0x10,%esi
  mov    $0x0,%edx
  div    %rsi
  imul   $0x10,%rax,%rax
  mov    %rax,%rcx
  and    $0xfffffffffffff000,%rcx
  mov    %rsp,%rdx
  sub    %rcx,%rdx
L56:
  cmp    %rdx,%rsp
  je     L5
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  jmp    L56
L5:
  mov    %rax,%rdx
  and    $0xfff,%edx
  sub    %rdx,%rsp
  mov    %rax,%rdx
  and    $0xfff,%edx
  test   %rdx,%rdx
  je     L18
  and    $0xfff,%eax
  sub    $0x8,%rax
  add    %rsp,%rax
  orq    $0x0,(%rax)
L18:
  mov    %rsp,%rax
  add    $0x3,%rax
  shr    $0x2,%rax
  shl    $0x2,%rax
  mov    %rax,-0x48(%rbp)
  mov    -0x48(%rbp),%rax
  mov    %rax,%rdi
  call   <g@plt>
  add    %eax,-0x68(%rbp)
  cmpl   $0x14,-0x74(%rbp)
  jle    L45
  mov    -0x48(%rbp),%rax
  mov    %rax,%rdi
  call   <g@plt>
  imul   $0x94,%eax,%eax
  add    %eax,-0x68(%rbp)
L45:
  mov    -0x48(%rbp),%rax
  mov    (%rax),%eax
  add    %eax,-0x68(%rbp)
  mov    %r12,%rsp
  mov    -0x58(%rbp),%rax
  mov    (%rax),%eax
  add    %eax,-0x68(%rbp)
  mov    %rbx,%rsp
  lea    -0x40(%rbp),%rax
  mov    %rax,%rdi
  call   <g@plt>
  add    %eax,-0x68(%rbp)
  mov    -0x40(%rbp),%eax
  add    %eax,-0x68(%rbp)
  mov    -0x68(%rbp),%eax
  mov    -0x28(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L29
  call   <__stack_chk_fail@plt>
L29:
  lea    -0x20(%rbp),%rsp
  pop    %rbx
  pop    %r12
  pop    %r14
  pop    %r15
  pop    %rbp
  ret
```

assistant: ```c
int f(int n) {
  int tt = 0;
  int t = 4;
  {
    int a[t + (tt != 0 ? 6 : 0)];
    tt = g(a);
    {
      int b[n];
      tt += g(b);
      if (n > 20)
        tt += 148 * g(b);
      tt += b[0];
    }
    tt += a[0];
  }
  {
    int a[4];
    tt += g(a);
    tt += a[0];
  }
  return tt;
}
```