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

```asm
<catalan>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x58,%rsp
  mov    %edi,0x44(%rsp)
  movl   $0x1,0x48(%rsp)
  cmp    $0x1,%edi
  jle    L608
  mov    %edi,%eax
  movl   $0x1,0x34(%rsp)
  sub    $0x1,%eax
  movl   $0x0,0x48(%rsp)
  movl   $0x1,0x30(%rsp)
  mov    %eax,0x4c(%rsp)
L169:
  mov    0x44(%rsp),%eax
  sub    0x34(%rsp),%eax
  mov    %eax,0x40(%rsp)
  cmp    $0x1,%eax
  jle    L388
  mov    0x4c(%rsp),%eax
  sub    0x34(%rsp),%eax
  movl   $0x0,0x3c(%rsp)
  mov    %eax,0x28(%rsp)
  movl   $0x1,0x20(%rsp)
  movl   $0x1,0x24(%rsp)
L794:
  cmpl   $0x1,0x28(%rsp)
  jle    L1129
  mov    0x28(%rsp),%eax
  movl   $0x0,0x1c(%rsp)
  movl   $0x1,0x8(%rsp)
  sub    $0x1,%eax
  movl   $0x1,0xc(%rsp)
  mov    %eax,0x14(%rsp)
L25:
  cmpl   $0x1,0x14(%rsp)
  jle    L818
  mov    0x14(%rsp),%eax
  mov    $0x1,%r13d
  mov    $0x1,%ebp
  movl   $0x0,0x4(%rsp)
  lea    -0x1(%rax),%r12d
L1025:
  cmp    $0x1,%r12d
  jle    L385
  xor    %r15d,%r15d
  mov    $0x1,%r14d
L1019:
  lea    -0x1(%r14),%edi
  call   <catalan>
  mov    %r12d,%edi
  sub    %r14d,%edi
  mov    %eax,%ebx
  add    $0x1,%r14d
  call   <catalan>
  imul   %eax,%ebx
  add    %ebx,%r15d
  cmp    %r14d,%r12d
  jge    L1019
  imul   %r15d,%ebp
L385:
  add    %ebp,0x4(%rsp)
  lea    0x1(%r13),%r14d
  cmp    %r14d,0x14(%rsp)
  jl     L48
  sub    $0x1,%r12d
  cmp    $0x1,%r13d
  je     L566
  sub    $0x1,%r13d
  xor    %ebp,%ebp
  mov    %r13d,%r15d
L755:
  mov    %r13d,%edi
  sub    %r15d,%edi
  call   <catalan>
  mov    %r15d,%edi
  mov    %eax,%ebx
  call   <catalan>
  imul   %eax,%ebx
  add    %ebx,%ebp
  sub    $0x1,%r15d
  jae    L755
L252:
  mov    %r14d,%r13d
  jmp    L1025
  nopl   0x0(%rax,%rax,1)
L48:
  mov    0xc(%rsp),%eax
  imul   0x4(%rsp),%eax
  mov    %eax,0xc(%rsp)
L818:
  mov    0x8(%rsp),%eax
  mov    0xc(%rsp),%esi
  add    %esi,0x1c(%rsp)
  add    $0x1,%eax
  mov    %eax,0x18(%rsp)
  cmp    0x28(%rsp),%eax
  jg     L409
  subl   $0x1,0x14(%rsp)
  cmpl   $0x1,0x8(%rsp)
  je     L476
  mov    0x8(%rsp),%eax
  movl   $0x0,0xc(%rsp)
  movl   $0x1,0x8(%rsp)
  sub    $0x1,%eax
  movl   $0x1,0x4(%rsp)
  mov    %eax,0x10(%rsp)
  mov    0x10(%rsp),%r13d
  cmp    $0x1,%r13d
  jle    L145
L76:
  xor    %r12d,%r12d
  mov    $0x1,%ebp
L822:
  lea    -0x1(%rbp),%edi
  call   <catalan>
  mov    %r13d,%edi
  sub    %ebp,%edi
  mov    %eax,%ebx
  add    $0x1,%ebp
  call   <catalan>
  imul   %eax,%ebx
  add    %ebx,%r12d
  cmp    %r13d,%ebp
  jle    L822
  imul   0x4(%rsp),%r12d
  add    %r12d,0xc(%rsp)
L693:
  subl   $0x1,0x10(%rsp)
  cmpl   $0x1,0x8(%rsp)
  je     L1120
  mov    0x8(%rsp),%eax
  mov    $0x1,%r14d
  mov    $0x1,%ebp
  movl   $0x0,0x4(%rsp)
  lea    -0x1(%rax),%r12d
  cmp    $0x1,%r12d
  jle    L113
L796:
  xor    %r13d,%r13d
  mov    $0x1,%r15d
L239:
  lea    -0x1(%r15),%edi
  call   <catalan>
  mov    %r12d,%edi
  sub    %r15d,%edi
  mov    %eax,%ebx
  add    $0x1,%r15d
  call   <catalan>
  imul   %eax,%ebx
  add    %ebx,%r13d
  cmp    %r15d,%r12d
  jge    L239
  mov    %r13d,%edx
  imul   %ebp,%edx
  add    %edx,0x4(%rsp)
L657:
  sub    $0x1,%r12d
  cmp    $0x1,%r14d
  je     L912
  lea    -0x1(%r14),%r15d
  xor    %ebp,%ebp
  mov    %r15d,%r13d
L469:
  mov    %r15d,%edi
  sub    %r13d,%edi
  call   <catalan>
  mov    %r13d,%edi
  mov    %eax,%ebx
  call   <catalan>
  imul   %eax,%ebx
  add    %ebx,%ebp
  sub    $0x1,%r13d
  jae    L469
L329:
  add    $0x1,%r14d
  cmp    $0x1,%r12d
  jg     L796
L113:
  add    %ebp,0x4(%rsp)
  test   %r12d,%r12d
  jne    L657
L819:
  mov    0x10(%rsp),%r13d
  addl   $0x1,0x8(%rsp)
  cmp    $0x1,%r13d
  jg     L76
L145:
  mov    0x10(%rsp),%eax
  mov    0x4(%rsp),%ecx
  add    %ecx,0xc(%rsp)
  test   %eax,%eax
  jne    L693
L831:
  mov    0x18(%rsp),%eax
  mov    %eax,0x8(%rsp)
  jmp    L25
  nopl   0x0(%rax)
L409:
  mov    0x24(%rsp),%eax
  imul   0x1c(%rsp),%eax
  mov    %eax,0x24(%rsp)
L1129:
  mov    0x20(%rsp),%eax
  mov    0x24(%rsp),%ecx
  add    %ecx,0x3c(%rsp)
  add    $0x1,%eax
  mov    %eax,0x38(%rsp)
  cmp    0x40(%rsp),%eax
  jg     L357
  subl   $0x1,0x28(%rsp)
  cmpl   $0x1,0x20(%rsp)
  je     L183
  mov    0x20(%rsp),%eax
  movl   $0x0,0x24(%rsp)
  movl   $0x1,0x20(%rsp)
  sub    $0x1,%eax
  movl   $0x1,0x18(%rsp)
  mov    %eax,0x14(%rsp)
  cmpl   $0x1,0x14(%rsp)
  jle    L309
L221:
  mov    0x14(%rsp),%eax
  movl   $0x0,0x1c(%rsp)
  movl   $0x1,0x10(%rsp)
  sub    $0x1,%eax
  movl   $0x1,0x4(%rsp)
  mov    %eax,0x2c(%rsp)
  mov    %eax,0x8(%rsp)
L436:
  cmpl   $0x1,0x8(%rsp)
  jle    L394
  mov    0x8(%rsp),%eax
  mov    $0x1,%r13d
  mov    $0x1,%ebp
  movl   $0x0,0xc(%rsp)
  lea    -0x1(%rax),%r12d
L335:
  cmp    $0x1,%r12d
  jle    L207
  xor    %r15d,%r15d
  mov    $0x1,%r14d
L578:
  lea    -0x1(%r14),%edi
  call   <catalan>
  mov    %r12d,%edi
  sub    %r14d,%edi
  mov    %eax,%ebx
  add    $0x1,%r14d
  call   <catalan>
  imul   %eax,%ebx
  add    %ebx,%r15d
  cmp    %r12d,%r14d
  jle    L578
  imul   %r15d,%ebp
L207:
  add    %ebp,0xc(%rsp)
  lea    0x1(%r13),%r14d
  cmp    %r14d,0x8(%rsp)
  jl     L75
  sub    $0x1,%r12d
  cmp    $0x1,%r13d
  je     L340
  sub    $0x1,%r13d
  xor    %ebp,%ebp
  mov    %r13d,%r15d
L892:
  mov    %r13d,%edi
  sub    %r15d,%edi
  call   <catalan>
  mov    %r15d,%edi
  mov    %eax,%ebx
  call   <catalan>
  imul   %eax,%ebx
  add    %ebx,%ebp
  sub    $0x1,%r15d
  jae    L892
L667:
  mov    %r14d,%r13d
  jmp    L335
  nopl   0x0(%rax,%rax,1)
L75:
  mov    0x4(%rsp),%eax
  imul   0xc(%rsp),%eax
  mov    %eax,0x4(%rsp)
L394:
  mov    0x10(%rsp),%eax
  mov    0x4(%rsp),%ecx
  add    %ecx,0x1c(%rsp)
  add    $0x1,%eax
  mov    %eax,0xc(%rsp)
  cmp    0x14(%rsp),%eax
  jg     L235
  subl   $0x1,0x8(%rsp)
  cmpl   $0x1,0x10(%rsp)
  je     L4
  mov    0x10(%rsp),%r12d
  mov    $0x1,%r14d
  mov    $0x1,%ebp
  movl   $0x0,0x4(%rsp)
  sub    $0x1,%r12d
  cmp    $0x1,%r12d
  jle    L13
L256:
  xor    %r13d,%r13d
  mov    $0x1,%r15d
L511:
  lea    -0x1(%r15),%edi
  call   <catalan>
  mov    %r12d,%edi
  sub    %r15d,%edi
  mov    %eax,%ebx
  add    $0x1,%r15d
  call   <catalan>
  imul   %eax,%ebx
  add    %ebx,%r13d
  cmp    %r12d,%r15d
  jle    L511
  mov    %r13d,%edx
  imul   %ebp,%edx
  add    %edx,0x4(%rsp)
L42:
  sub    $0x1,%r12d
  cmp    $0x1,%r14d
  je     L862
  lea    -0x1(%r14),%r15d
  xor    %ebp,%ebp
  mov    %r15d,%r13d
L38:
  mov    %r15d,%edi
  sub    %r13d,%edi
  call   <catalan>
  mov    %r13d,%edi
  mov    %eax,%ebx
  call   <catalan>
  imul   %eax,%ebx
  add    %ebx,%ebp
  sub    $0x1,%r13d
  jae    L38
L672:
  add    $0x1,%r14d
  cmp    $0x1,%r12d
  jg     L256
L13:
  add    %ebp,0x4(%rsp)
  test   %r12d,%r12d
  jne    L42
L1040:
  mov    0xc(%rsp),%eax
  mov    %eax,0x10(%rsp)
  jmp    L436
  nopl   0x0(%rax,%rax,1)
L235:
  mov    0x1c(%rsp),%eax
  imul   0x18(%rsp),%eax
  add    %eax,0x24(%rsp)
L551:
  mov    0x2c(%rsp),%eax
  cmpl   $0x1,0x20(%rsp)
  mov    %eax,0x14(%rsp)
  je     L512
  mov    0x20(%rsp),%eax
  mov    $0x1,%r14d
  mov    $0x1,%ebp
  movl   $0x0,0x18(%rsp)
  lea    -0x1(%rax),%r12d
  cmp    $0x1,%r12d
  jle    L1045
L879:
  xor    %r13d,%r13d
  mov    $0x1,%r15d
L856:
  lea    -0x1(%r15),%edi
  call   <catalan>
  mov    %r12d,%edi
  sub    %r15d,%edi
  mov    %eax,%ebx
  add    $0x1,%r15d
  call   <catalan>
  imul   %eax,%ebx
  add    %ebx,%r13d
  cmp    %r12d,%r15d
  jle    L856
  mov    %r13d,%edx
  imul   %ebp,%edx
  add    %edx,0x18(%rsp)
L824:
  sub    $0x1,%r12d
  cmp    $0x1,%r14d
  je     L270
  lea    -0x1(%r14),%r15d
  xor    %ebp,%ebp
  mov    %r15d,%r13d
L135:
  mov    %r15d,%edi
  sub    %r13d,%edi
  call   <catalan>
  mov    %r13d,%edi
  mov    %eax,%ebx
  call   <catalan>
  imul   %eax,%ebx
  add    %ebx,%ebp
  sub    $0x1,%r13d
  jae    L135
L594:
  add    $0x1,%r14d
  cmp    $0x1,%r12d
  jg     L879
L1045:
  add    %ebp,0x18(%rsp)
  test   %r12d,%r12d
  jne    L824
L479:
  addl   $0x1,0x20(%rsp)
  cmpl   $0x1,0x14(%rsp)
  jg     L221
L309:
  mov    0x14(%rsp),%edx
  mov    0x18(%rsp),%ecx
  add    %ecx,0x24(%rsp)
  test   %edx,%edx
  jne    L162
L73:
  mov    0x38(%rsp),%eax
  mov    %eax,0x20(%rsp)
  jmp    L794
L357:
  mov    0x30(%rsp),%eax
  imul   0x3c(%rsp),%eax
  mov    %eax,0x30(%rsp)
L388:
  mov    0x34(%rsp),%eax
  mov    0x30(%rsp),%ecx
  add    %ecx,0x48(%rsp)
  add    $0x1,%eax
  mov    %eax,0x28(%rsp)
  cmp    %eax,0x44(%rsp)
  jl     L608
  cmpl   $0x1,0x34(%rsp)
  je     L342
  mov    0x34(%rsp),%eax
  movl   $0x1,0x20(%rsp)
  movl   $0x0,0x30(%rsp)
  sub    $0x1,%eax
  movl   $0x1,0x18(%rsp)
  mov    %eax,0x14(%rsp)
  cmpl   $0x1,0x14(%rsp)
  jle    L625
L2:
  mov    0x14(%rsp),%eax
  movl   $0x0,0x1c(%rsp)
  movl   $0x1,0x10(%rsp)
  sub    $0x1,%eax
  movl   $0x1,0x4(%rsp)
  mov    %eax,0x24(%rsp)
  mov    %eax,0x8(%rsp)
L290:
  cmpl   $0x1,0x8(%rsp)
  jle    L1060
  mov    0x8(%rsp),%eax
  mov    $0x1,%r13d
  mov    $0x1,%ebp
  movl   $0x0,0xc(%rsp)
  lea    -0x1(%rax),%r12d
L814:
  cmp    $0x1,%r12d
  jle    L529
  xor    %r15d,%r15d
  mov    $0x1,%r14d
L761:
  lea    -0x1(%r14),%edi
  call   <catalan>
  mov    %r12d,%edi
  sub    %r14d,%edi
  mov    %eax,%ebx
  add    $0x1,%r14d
  call   <catalan>
  imul   %eax,%ebx
  add    %ebx,%r15d
  cmp    %r12d,%r14d
  jle    L761
  imul   %r15d,%ebp
L529:
  add    %ebp,0xc(%rsp)
  lea    0x1(%r13),%r14d
  cmp    0x8(%rsp),%r14d
  jg     L845
  sub    $0x1,%r12d
  cmp    $0x1,%r13d
  je     L451
  sub    $0x1,%r13d
  xor    %ebp,%ebp
  mov    %r13d,%r15d
L536:
  mov    %r13d,%edi
  sub    %r15d,%edi
  call   <catalan>
  mov    %r15d,%edi
  mov    %eax,%ebx
  call   <catalan>
  imul   %eax,%ebx
  add    %ebx,%ebp
  sub    $0x1,%r15d
  jae    L536
L759:
  mov    %r14d,%r13d
  jmp    L814
  nopw   0x0(%rax,%rax,1)
L845:
  mov    0x4(%rsp),%eax
  imul   0xc(%rsp),%eax
  mov    %eax,0x4(%rsp)
L1060:
  mov    0x10(%rsp),%eax
  mov    0x4(%rsp),%esi
  add    %esi,0x1c(%rsp)
  add    $0x1,%eax
  mov    %eax,0xc(%rsp)
  cmp    0x14(%rsp),%eax
  jg     L875
  subl   $0x1,0x8(%rsp)
  cmpl   $0x1,0x10(%rsp)
  je     L208
  mov    0x10(%rsp),%r12d
  mov    $0x1,%r14d
  mov    $0x1,%ebp
  movl   $0x0,0x4(%rsp)
  sub    $0x1,%r12d
  cmp    $0x1,%r12d
  jle    L337
L1027:
  xor    %r13d,%r13d
  mov    $0x1,%r15d
L773:
  lea    -0x1(%r15),%edi
  call   <catalan>
  mov    %r12d,%edi
  sub    %r15d,%edi
  mov    %eax,%ebx
  add    $0x1,%r15d
  call   <catalan>
  imul   %eax,%ebx
  add    %ebx,%r13d
  cmp    %r12d,%r15d
  jle    L773
  mov    %r13d,%edx
  imul   %ebp,%edx
  add    %edx,0x4(%rsp)
L886:
  sub    $0x1,%r12d
  cmp    $0x1,%r14d
  je     L284
  lea    -0x1(%r14),%r15d
  xor    %ebp,%ebp
  mov    %r15d,%r13d
L1009:
  mov    %r15d,%edi
  sub    %r13d,%edi
  call   <catalan>
  mov    %r13d,%edi
  mov    %eax,%ebx
  call   <catalan>
  imul   %eax,%ebx
  add    %ebx,%ebp
  sub    $0x1,%r13d
  jae    L1009
L537:
  add    $0x1,%r14d
  cmp    $0x1,%r12d
  jg     L1027
L337:
  add    %ebp,0x4(%rsp)
  test   %r12d,%r12d
  jne    L886
L528:
  mov    0xc(%rsp),%eax
  mov    %eax,0x10(%rsp)
  jmp    L290
  nopl   0x0(%rax,%rax,1)
L875:
  mov    0x1c(%rsp),%eax
  imul   0x18(%rsp),%eax
  add    %eax,0x30(%rsp)
L1038:
  mov    0x24(%rsp),%eax
  cmpl   $0x1,0x20(%rsp)
  mov    %eax,0x14(%rsp)
  je     L786
  mov    0x20(%rsp),%eax
  movl   $0x1,0x10(%rsp)
  movl   $0x0,0x18(%rsp)
  sub    $0x1,%eax
  movl   $0x1,0x8(%rsp)
  mov    %eax,0x4(%rsp)
  cmpl   $0x1,0x4(%rsp)
  jle    L1073
L463:
  mov    0x4(%rsp),%eax
  mov    $0x1,%r13d
  mov    $0x1,%ebp
  movl   $0x0,0xc(%rsp)
  sub    $0x1,%eax
  mov    %eax,0x1c(%rsp)
  mov    %eax,%r12d
L66:
  cmp    $0x1,%r12d
  jle    L203
  xor    %r15d,%r15d
  mov    $0x1,%r14d
L515:
  lea    -0x1(%r14),%edi
  call   <catalan>
  mov    %r12d,%edi
  sub    %r14d,%edi
  mov    %eax,%ebx
  add    $0x1,%r14d
  call   <catalan>
  imul   %eax,%ebx
  add    %ebx,%r15d
  cmp    %r12d,%r14d
  jle    L515
  imul   %r15d,%ebp
L203:
  add    %ebp,0xc(%rsp)
  lea    0x1(%r13),%r14d
  cmp    %r14d,0x4(%rsp)
  jl     L499
  sub    $0x1,%r12d
  cmp    $0x1,%r13d
  je     L1056
  sub    $0x1,%r13d
  xor    %ebp,%ebp
  mov    %r13d,%r15d
L574:
  mov    %r13d,%edi
  sub    %r15d,%edi
  call   <catalan>
  mov    %r15d,%edi
  mov    %eax,%ebx
  call   <catalan>
  imul   %eax,%ebx
  add    %ebx,%ebp
  sub    $0x1,%r15d
  jae    L574
L754:
  mov    %r14d,%r13d
  jmp    L66
  nopl   (%rax)
L499:
  mov    0xc(%rsp),%r14d
  imul   0x8(%rsp),%r14d
  add    %r14d,0x18(%rsp)
L258:
  mov    0x1c(%rsp),%eax
  cmpl   $0x1,0x10(%rsp)
  mov    %eax,0x4(%rsp)
  je     L1047
  mov    0x10(%rsp),%eax
  mov    $0x1,%r14d
  mov    $0x1,%ebp
  movl   $0x0,0x8(%rsp)
  lea    -0x1(%rax),%r12d
  cmp    $0x1,%r12d
  jle    L826
L738:
  xor    %r13d,%r13d
  mov    $0x1,%r15d
L426:
  lea    -0x1(%r15),%edi
  call   <catalan>
  mov    %r12d,%edi
  sub    %r15d,%edi
  mov    %eax,%ebx
  add    $0x1,%r15d
  call   <catalan>
  imul   %eax,%ebx
  add    %ebx,%r13d
  cmp    %r12d,%r15d
  jle    L426
  mov    %r13d,%edx
  imul   %ebp,%edx
  add    %edx,0x8(%rsp)
L866:
  sub    $0x1,%r12d
  cmp    $0x1,%r14d
  je     L651
  lea    -0x1(%r14),%r15d
  xor    %ebp,%ebp
  mov    %r15d,%r13d
L587:
  mov    %r15d,%edi
  sub    %r13d,%edi
  call   <catalan>
  mov    %r13d,%edi
  mov    %eax,%ebx
  call   <catalan>
  imul   %eax,%ebx
  add    %ebx,%ebp
  sub    $0x1,%r13d
  jae    L587
L546:
  add    $0x1,%r14d
  cmp    $0x1,%r12d
  jg     L738
L826:
  add    %ebp,0x8(%rsp)
  test   %r12d,%r12d
  jne    L866
L291:
  addl   $0x1,0x10(%rsp)
  cmpl   $0x1,0x4(%rsp)
  jg     L463
L1073:
  mov    0x4(%rsp),%esi
  mov    0x8(%rsp),%ecx
  add    %ecx,0x18(%rsp)
  test   %esi,%esi
  jne    L1046
L306:
  addl   $0x1,0x20(%rsp)
  cmpl   $0x1,0x14(%rsp)
  jg     L2
L625:
  mov    0x14(%rsp),%ecx
  mov    0x18(%rsp),%esi
  add    %esi,0x30(%rsp)
  test   %ecx,%ecx
  jne    L389
L781:
  mov    0x28(%rsp),%eax
  mov    %eax,0x34(%rsp)
  jmp    L169
L608:
  mov    0x48(%rsp),%eax
  add    $0x58,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L566:
  mov    $0x1,%ebp
  jmp    L252
L389:
  mov    0x14(%rsp),%eax
  sub    $0x1,%eax
  mov    %eax,0x24(%rsp)
  jmp    L1038
L1046:
  mov    0x4(%rsp),%eax
  sub    $0x1,%eax
  mov    %eax,0x1c(%rsp)
  jmp    L258
L651:
  mov    $0x1,%ebp
  jmp    L546
L1047:
  movl   $0x1,0x8(%rsp)
  jmp    L291
L1056:
  mov    $0x1,%ebp
  jmp    L754
L786:
  movl   $0x1,0x18(%rsp)
  jmp    L306
L284:
  mov    $0x1,%ebp
  jmp    L537
L208:
  movl   $0x1,0x4(%rsp)
  jmp    L528
L451:
  mov    $0x1,%ebp
  jmp    L759
L342:
  movl   $0x1,0x30(%rsp)
  jmp    L781
L162:
  mov    0x14(%rsp),%eax
  sub    $0x1,%eax
  mov    %eax,0x2c(%rsp)
  jmp    L551
L270:
  mov    $0x1,%ebp
  jmp    L594
L512:
  movl   $0x1,0x18(%rsp)
  jmp    L479
L862:
  mov    $0x1,%ebp
  jmp    L672
L4:
  movl   $0x1,0x4(%rsp)
  jmp    L1040
L340:
  mov    $0x1,%ebp
  jmp    L667
L183:
  movl   $0x1,0x24(%rsp)
  jmp    L73
L912:
  mov    $0x1,%ebp
  jmp    L329
L1120:
  movl   $0x1,0x4(%rsp)
  jmp    L819
L476:
  movl   $0x1,0xc(%rsp)
  jmp    L831
```

assistant: ```c
int catalan(int n) {
  if (n <= 1)
    return 1;
  int total = 0;
  for (int i = 1; i <= n; i++) {
    int nl = i - 1;
    int nr = n - i;
    total += catalan(nl) * catalan(nr);
  }
  return total;
}
```