user: Translate the below assembly code into C programming language:

```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    L909
  mov    %edi,%eax
  movl   $0x1,0x34(%rsp)
  sub    $0x1,%eax
  movl   $0x0,0x48(%rsp)
  movl   $0x1,0x30(%rsp)
  mov    %eax,0x4c(%rsp)
L175:
  mov    0x44(%rsp),%eax
  sub    0x34(%rsp),%eax
  mov    %eax,0x40(%rsp)
  cmp    $0x1,%eax
  jle    L676
  mov    0x4c(%rsp),%eax
  sub    0x34(%rsp),%eax
  movl   $0x0,0x3c(%rsp)
  mov    %eax,0x28(%rsp)
  movl   $0x1,0x20(%rsp)
  movl   $0x1,0x24(%rsp)
L550:
  cmpl   $0x1,0x28(%rsp)
  jle    L95
  mov    0x28(%rsp),%eax
  movl   $0x0,0x1c(%rsp)
  movl   $0x1,0x8(%rsp)
  sub    $0x1,%eax
  movl   $0x1,0xc(%rsp)
  mov    %eax,0x14(%rsp)
L669:
  cmpl   $0x1,0x14(%rsp)
  jle    L142
  mov    0x14(%rsp),%eax
  mov    $0x1,%r13d
  mov    $0x1,%ebp
  movl   $0x0,0x4(%rsp)
  lea    -0x1(%rax),%r12d
L227:
  cmp    $0x1,%r12d
  jle    L117
  xor    %r15d,%r15d
  mov    $0x1,%r14d
L1030:
  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    L1030
  imul   %r15d,%ebp
L117:
  add    %ebp,0x4(%rsp)
  lea    0x1(%r13),%r14d
  cmp    %r14d,0x14(%rsp)
  jl     L729
  sub    $0x1,%r12d
  cmp    $0x1,%r13d
  je     L598
  sub    $0x1,%r13d
  xor    %ebp,%ebp
  mov    %r13d,%r15d
L1106:
  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    L1106
L702:
  mov    %r14d,%r13d
  jmp    L227
  nopl   0x0(%rax,%rax,1)
L729:
  mov    0xc(%rsp),%eax
  imul   0x4(%rsp),%eax
  mov    %eax,0xc(%rsp)
L142:
  mov    0x8(%rsp),%eax
  mov    0xc(%rsp),%esi
  add    %esi,0x1c(%rsp)
  add    $0x1,%eax
  mov    %eax,0x18(%rsp)
  cmp    0x28(%rsp),%eax
  jg     L1007
  subl   $0x1,0x14(%rsp)
  cmpl   $0x1,0x8(%rsp)
  je     L665
  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    L762
L963:
  xor    %r12d,%r12d
  mov    $0x1,%ebp
L1060:
  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    L1060
  imul   0x4(%rsp),%r12d
  add    %r12d,0xc(%rsp)
L871:
  subl   $0x1,0x10(%rsp)
  cmpl   $0x1,0x8(%rsp)
  je     L196
  mov    0x8(%rsp),%eax
  mov    $0x1,%r14d
  mov    $0x1,%ebp
  movl   $0x0,0x4(%rsp)
  lea    -0x1(%rax),%r12d
  cmp    $0x1,%r12d
  jle    L905
L114:
  xor    %r13d,%r13d
  mov    $0x1,%r15d
L213:
  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    L213
  mov    %r13d,%edx
  imul   %ebp,%edx
  add    %edx,0x4(%rsp)
L339:
  sub    $0x1,%r12d
  cmp    $0x1,%r14d
  je     L1058
  lea    -0x1(%r14),%r15d
  xor    %ebp,%ebp
  mov    %r15d,%r13d
L814:
  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    L814
L547:
  add    $0x1,%r14d
  cmp    $0x1,%r12d
  jg     L114
L905:
  add    %ebp,0x4(%rsp)
  test   %r12d,%r12d
  jne    L339
L867:
  mov    0x10(%rsp),%r13d
  addl   $0x1,0x8(%rsp)
  cmp    $0x1,%r13d
  jg     L963
L762:
  mov    0x10(%rsp),%eax
  mov    0x4(%rsp),%ecx
  add    %ecx,0xc(%rsp)
  test   %eax,%eax
  jne    L871
L361:
  mov    0x18(%rsp),%eax
  mov    %eax,0x8(%rsp)
  jmp    L669
  nopl   0x0(%rax)
L1007:
  mov    0x24(%rsp),%eax
  imul   0x1c(%rsp),%eax
  mov    %eax,0x24(%rsp)
L95:
  mov    0x20(%rsp),%eax
  mov    0x24(%rsp),%ecx
  add    %ecx,0x3c(%rsp)
  add    $0x1,%eax
  mov    %eax,0x38(%rsp)
  cmp    0x40(%rsp),%eax
  jg     L977
  subl   $0x1,0x28(%rsp)
  cmpl   $0x1,0x20(%rsp)
  je     L1086
  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    L993
L137:
  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)
L603:
  cmpl   $0x1,0x8(%rsp)
  jle    L186
  mov    0x8(%rsp),%eax
  mov    $0x1,%r13d
  mov    $0x1,%ebp
  movl   $0x0,0xc(%rsp)
  lea    -0x1(%rax),%r12d
L1129:
  cmp    $0x1,%r12d
  jle    L604
  xor    %r15d,%r15d
  mov    $0x1,%r14d
L257:
  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    L257
  imul   %r15d,%ebp
L604:
  add    %ebp,0xc(%rsp)
  lea    0x1(%r13),%r14d
  cmp    %r14d,0x8(%rsp)
  jl     L399
  sub    $0x1,%r12d
  cmp    $0x1,%r13d
  je     L401
  sub    $0x1,%r13d
  xor    %ebp,%ebp
  mov    %r13d,%r15d
L855:
  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    L855
L844:
  mov    %r14d,%r13d
  jmp    L1129
  nopl   0x0(%rax,%rax,1)
L399:
  mov    0x4(%rsp),%eax
  imul   0xc(%rsp),%eax
  mov    %eax,0x4(%rsp)
L186:
  mov    0x10(%rsp),%eax
  mov    0x4(%rsp),%ecx
  add    %ecx,0x1c(%rsp)
  add    $0x1,%eax
  mov    %eax,0xc(%rsp)
  cmp    0x14(%rsp),%eax
  jg     L584
  subl   $0x1,0x8(%rsp)
  cmpl   $0x1,0x10(%rsp)
  je     L713
  mov    0x10(%rsp),%r12d
  mov    $0x1,%r14d
  mov    $0x1,%ebp
  movl   $0x0,0x4(%rsp)
  sub    $0x1,%r12d
  cmp    $0x1,%r12d
  jle    L823
L365:
  xor    %r13d,%r13d
  mov    $0x1,%r15d
L38:
  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    L38
  mov    %r13d,%edx
  imul   %ebp,%edx
  add    %edx,0x4(%rsp)
L472:
  sub    $0x1,%r12d
  cmp    $0x1,%r14d
  je     L322
  lea    -0x1(%r14),%r15d
  xor    %ebp,%ebp
  mov    %r15d,%r13d
L944:
  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    L944
L497:
  add    $0x1,%r14d
  cmp    $0x1,%r12d
  jg     L365
L823:
  add    %ebp,0x4(%rsp)
  test   %r12d,%r12d
  jne    L472
L877:
  mov    0xc(%rsp),%eax
  mov    %eax,0x10(%rsp)
  jmp    L603
  nopl   0x0(%rax,%rax,1)
L584:
  mov    0x1c(%rsp),%eax
  imul   0x18(%rsp),%eax
  add    %eax,0x24(%rsp)
L582:
  mov    0x2c(%rsp),%eax
  cmpl   $0x1,0x20(%rsp)
  mov    %eax,0x14(%rsp)
  je     L841
  mov    0x20(%rsp),%eax
  mov    $0x1,%r14d
  mov    $0x1,%ebp
  movl   $0x0,0x18(%rsp)
  lea    -0x1(%rax),%r12d
  cmp    $0x1,%r12d
  jle    L654
L901:
  xor    %r13d,%r13d
  mov    $0x1,%r15d
L151:
  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    L151
  mov    %r13d,%edx
  imul   %ebp,%edx
  add    %edx,0x18(%rsp)
L225:
  sub    $0x1,%r12d
  cmp    $0x1,%r14d
  je     L311
  lea    -0x1(%r14),%r15d
  xor    %ebp,%ebp
  mov    %r15d,%r13d
L937:
  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    L937
L785:
  add    $0x1,%r14d
  cmp    $0x1,%r12d
  jg     L901
L654:
  add    %ebp,0x18(%rsp)
  test   %r12d,%r12d
  jne    L225
L914:
  addl   $0x1,0x20(%rsp)
  cmpl   $0x1,0x14(%rsp)
  jg     L137
L993:
  mov    0x14(%rsp),%edx
  mov    0x18(%rsp),%ecx
  add    %ecx,0x24(%rsp)
  test   %edx,%edx
  jne    L912
L1061:
  mov    0x38(%rsp),%eax
  mov    %eax,0x20(%rsp)
  jmp    L550
L977:
  mov    0x30(%rsp),%eax
  imul   0x3c(%rsp),%eax
  mov    %eax,0x30(%rsp)
L676:
  mov    0x34(%rsp),%eax
  mov    0x30(%rsp),%ecx
  add    %ecx,0x48(%rsp)
  add    $0x1,%eax
  mov    %eax,0x28(%rsp)
  cmp    %eax,0x44(%rsp)
  jl     L909
  cmpl   $0x1,0x34(%rsp)
  je     L956
  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    L829
L1064:
  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)
L465:
  cmpl   $0x1,0x8(%rsp)
  jle    L355
  mov    0x8(%rsp),%eax
  mov    $0x1,%r13d
  mov    $0x1,%ebp
  movl   $0x0,0xc(%rsp)
  lea    -0x1(%rax),%r12d
L195:
  cmp    $0x1,%r12d
  jle    L990
  xor    %r15d,%r15d
  mov    $0x1,%r14d
L652:
  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    L652
  imul   %r15d,%ebp
L990:
  add    %ebp,0xc(%rsp)
  lea    0x1(%r13),%r14d
  cmp    %r14d,0x8(%rsp)
  jl     L1036
  sub    $0x1,%r12d
  cmp    $0x1,%r13d
  je     L2
  sub    $0x1,%r13d
  xor    %ebp,%ebp
  mov    %r13d,%r15d
L1107:
  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    L1107
L596:
  mov    %r14d,%r13d
  jmp    L195
  nopw   0x0(%rax,%rax,1)
L1036:
  mov    0x4(%rsp),%eax
  imul   0xc(%rsp),%eax
  mov    %eax,0x4(%rsp)
L355:
  mov    0x10(%rsp),%eax
  mov    0x4(%rsp),%esi
  add    %esi,0x1c(%rsp)
  add    $0x1,%eax
  mov    %eax,0xc(%rsp)
  cmp    0x14(%rsp),%eax
  jg     L29
  subl   $0x1,0x8(%rsp)
  cmpl   $0x1,0x10(%rsp)
  je     L177
  mov    0x10(%rsp),%r12d
  mov    $0x1,%r14d
  mov    $0x1,%ebp
  movl   $0x0,0x4(%rsp)
  sub    $0x1,%r12d
  cmp    $0x1,%r12d
  jle    L1102
L766:
  xor    %r13d,%r13d
  mov    $0x1,%r15d
L407:
  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    L407
  mov    %r13d,%edx
  imul   %ebp,%edx
  add    %edx,0x4(%rsp)
L662:
  sub    $0x1,%r12d
  cmp    $0x1,%r14d
  je     L215
  lea    -0x1(%r14),%r15d
  xor    %ebp,%ebp
  mov    %r15d,%r13d
L813:
  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    L813
L84:
  add    $0x1,%r14d
  cmp    $0x1,%r12d
  jg     L766
L1102:
  add    %ebp,0x4(%rsp)
  test   %r12d,%r12d
  jne    L662
L119:
  mov    0xc(%rsp),%eax
  mov    %eax,0x10(%rsp)
  jmp    L465
  nopl   0x0(%rax,%rax,1)
L29:
  mov    0x1c(%rsp),%eax
  imul   0x18(%rsp),%eax
  add    %eax,0x30(%rsp)
L202:
  mov    0x24(%rsp),%eax
  cmpl   $0x1,0x20(%rsp)
  mov    %eax,0x14(%rsp)
  je     L460
  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    L1062
L679:
  mov    0x4(%rsp),%eax
  mov    $0x1,%r13d
  mov    $0x1,%ebp
  movl   $0x0,0xc(%rsp)
  sub    $0x1,%eax
  mov    %eax,0x1c(%rsp)
  mov    %eax,%r12d
L686:
  cmp    $0x1,%r12d
  jle    L612
  xor    %r15d,%r15d
  mov    $0x1,%r14d
L822:
  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    L822
  imul   %r15d,%ebp
L612:
  add    %ebp,0xc(%rsp)
  lea    0x1(%r13),%r14d
  cmp    0x4(%rsp),%r14d
  jg     L709
  sub    $0x1,%r12d
  cmp    $0x1,%r13d
  je     L146
  sub    $0x1,%r13d
  xor    %ebp,%ebp
  mov    %r13d,%r15d
L72:
  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    L72
L50:
  mov    %r14d,%r13d
  jmp    L686
  nopl   (%rax)
L709:
  mov    0xc(%rsp),%r14d
  imul   0x8(%rsp),%r14d
  add    %r14d,0x18(%rsp)
L650:
  mov    0x1c(%rsp),%eax
  cmpl   $0x1,0x10(%rsp)
  mov    %eax,0x4(%rsp)
  je     L171
  mov    0x10(%rsp),%eax
  mov    $0x1,%r14d
  mov    $0x1,%ebp
  movl   $0x0,0x8(%rsp)
  lea    -0x1(%rax),%r12d
  cmp    $0x1,%r12d
  jle    L239
L410:
  xor    %r13d,%r13d
  mov    $0x1,%r15d
L242:
  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    L242
  mov    %r13d,%edx
  imul   %ebp,%edx
  add    %edx,0x8(%rsp)
L531:
  sub    $0x1,%r12d
  cmp    $0x1,%r14d
  je     L24
  lea    -0x1(%r14),%r15d
  xor    %ebp,%ebp
  mov    %r15d,%r13d
L367:
  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    L367
L444:
  add    $0x1,%r14d
  cmp    $0x1,%r12d
  jg     L410
L239:
  add    %ebp,0x8(%rsp)
  test   %r12d,%r12d
  jne    L531
L805:
  addl   $0x1,0x10(%rsp)
  cmpl   $0x1,0x4(%rsp)
  jg     L679
L1062:
  mov    0x4(%rsp),%esi
  mov    0x8(%rsp),%ecx
  add    %ecx,0x18(%rsp)
  test   %esi,%esi
  jne    L532
L1093:
  addl   $0x1,0x20(%rsp)
  cmpl   $0x1,0x14(%rsp)
  jg     L1064
L829:
  mov    0x14(%rsp),%ecx
  mov    0x18(%rsp),%esi
  add    %esi,0x30(%rsp)
  test   %ecx,%ecx
  jne    L858
L241:
  mov    0x28(%rsp),%eax
  mov    %eax,0x34(%rsp)
  jmp    L175
L909:
  mov    0x48(%rsp),%eax
  add    $0x58,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L598:
  mov    $0x1,%ebp
  jmp    L702
L858:
  mov    0x14(%rsp),%eax
  sub    $0x1,%eax
  mov    %eax,0x24(%rsp)
  jmp    L202
L532:
  mov    0x4(%rsp),%eax
  sub    $0x1,%eax
  mov    %eax,0x1c(%rsp)
  jmp    L650
L24:
  mov    $0x1,%ebp
  jmp    L444
L171:
  movl   $0x1,0x8(%rsp)
  jmp    L805
L146:
  mov    $0x1,%ebp
  jmp    L50
L460:
  movl   $0x1,0x18(%rsp)
  jmp    L1093
L215:
  mov    $0x1,%ebp
  jmp    L84
L177:
  movl   $0x1,0x4(%rsp)
  jmp    L119
L2:
  mov    $0x1,%ebp
  jmp    L596
L956:
  movl   $0x1,0x30(%rsp)
  jmp    L241
L912:
  mov    0x14(%rsp),%eax
  sub    $0x1,%eax
  mov    %eax,0x2c(%rsp)
  jmp    L582
L311:
  mov    $0x1,%ebp
  jmp    L785
L841:
  movl   $0x1,0x18(%rsp)
  jmp    L914
L322:
  mov    $0x1,%ebp
  jmp    L497
L713:
  movl   $0x1,0x4(%rsp)
  jmp    L877
L401:
  mov    $0x1,%ebp
  jmp    L844
L1086:
  movl   $0x1,0x24(%rsp)
  jmp    L1061
L1058:
  mov    $0x1,%ebp
  jmp    L547
L196:
  movl   $0x1,0x4(%rsp)
  jmp    L867
L665:
  movl   $0x1,0xc(%rsp)
  jmp    L361
```

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;
}
```