user: 请从给定的汇编指令推导出C源代码：

```asm
<fib>:
  endbr64
  test   %edi,%edi
  je     L191
  mov    %edi,%eax
  cmp    $0x1,%edi
  je     L1
  push   %r15
  sub    $0x2,%eax
  xor    %r10d,%r10d
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x58,%rsp
  mov    %eax,0x18(%rsp)
  mov    %r10,0x20(%rsp)
L116:
  mov    0x18(%rsp),%edi
  mov    %edi,%eax
  add    $0x1,%eax
  je     L497
  cmp    $0x1,%eax
  je     L509
  lea    -0x1(%rdi),%eax
  xor    %r8d,%r8d
  mov    %eax,0x14(%rsp)
  mov    %r8,0x28(%rsp)
L14:
  mov    0x14(%rsp),%edi
  mov    %edi,%eax
  add    $0x1,%eax
  je     L138
  cmp    $0x1,%eax
  je     L51
  lea    -0x1(%rdi),%eax
  xor    %ecx,%ecx
  mov    %eax,0x1c(%rsp)
  mov    %rcx,0x30(%rsp)
L302:
  mov    0x1c(%rsp),%edi
  mov    %edi,%eax
  add    $0x1,%eax
  je     L102
  cmp    $0x1,%eax
  je     L133
  xor    %ecx,%ecx
  lea    -0x1(%rdi),%r8d
  mov    %rcx,0x38(%rsp)
  mov    %r8d,%ecx
L100:
  mov    %ecx,%eax
  add    $0x1,%eax
  je     L60
  cmp    $0x1,%eax
  je     L46
  xor    %esi,%esi
  mov    %ecx,0x40(%rsp)
  lea    -0x1(%rcx),%r9d
  mov    %rsi,0x8(%rsp)
  mov    %r9d,%r15d
L483:
  mov    %r15d,%eax
  add    $0x1,%eax
  je     L213
  cmp    $0x1,%eax
  je     L521
  lea    -0x1(%r15),%r12d
  xor    %ecx,%ecx
  mov    %r15d,%esi
L466:
  mov    %r12d,%eax
  add    $0x1,%eax
  je     L6
  cmp    $0x1,%eax
  je     L189
  xor    %ebx,%ebx
  lea    -0x1(%r12),%ebp
  mov    %r12d,%edx
  mov    %rbx,%r12
L68:
  mov    %ebp,%eax
  add    $0x1,%eax
  je     L488
  cmp    $0x1,%eax
  je     L22
  mov    %ebp,%eax
  lea    -0x1(%rbp),%ebx
  xor    %r14d,%r14d
  mov    %rcx,%rbp
  mov    %eax,%ecx
L297:
  mov    %ebx,%r13d
  add    $0x1,%r13d
  je     L146
  cmp    $0x1,%r13d
  je     L42
  mov    %ebx,0x44(%rsp)
  xor    %r15d,%r15d
  mov    %esi,%ebx
L516:
  lea    -0x1(%r13),%edi
  mov    %ecx,0x4c(%rsp)
  mov    %edx,0x48(%rsp)
  call   <fib>
  mov    0x48(%rsp),%edx
  mov    0x4c(%rsp),%ecx
  add    %rax,%r15
  sub    $0x2,%r13d
  je     L171
  cmp    $0x1,%r13d
  jne    L516
  mov    %ebx,%esi
  mov    0x44(%rsp),%ebx
  add    $0x1,%r15
L205:
  add    %r15,%r14
  test   %ebx,%ebx
  je     L294
  cmp    $0x1,%ebx
  jne    L146
L42:
  mov    %ecx,%eax
  add    $0x1,%r14
  mov    %rbp,%rcx
  mov    %eax,%ebp
  add    %r14,%r12
  test   %ebp,%ebp
  je     L372
L317:
  cmp    $0x1,%ebp
  jne    L488
L22:
  mov    %r12,%rbx
  mov    %edx,%r12d
  add    $0x1,%rbx
L316:
  add    %rbx,%rcx
  test   %r12d,%r12d
  jne    L261
  mov    %esi,%r15d
  mov    %rcx,%r14
  add    %r14,0x8(%rsp)
  mov    0x8(%rsp),%rsi
  test   %r15d,%r15d
  jne    L512
L478:
  mov    0x40(%rsp),%ecx
  add    %rsi,0x38(%rsp)
  test   %ecx,%ecx
  je     L292
L484:
  cmp    $0x1,%ecx
  je     L46
L60:
  sub    $0x2,%ecx
  jmp    L100
L488:
  sub    $0x2,%ebp
  jmp    L68
L261:
  cmp    $0x1,%r12d
  jne    L6
L189:
  mov    %rcx,%r14
  mov    %esi,%r15d
  add    $0x1,%r14
  add    %r14,0x8(%rsp)
  mov    0x8(%rsp),%rsi
  test   %r15d,%r15d
  je     L478
L512:
  cmp    $0x1,%r15d
  je     L521
L213:
  sub    $0x2,%r15d
  jmp    L483
L6:
  sub    $0x2,%r12d
  jmp    L466
L294:
  mov    %ecx,%eax
  mov    %rbp,%rcx
  add    %r14,%r12
  mov    %eax,%ebp
  test   %ebp,%ebp
  jne    L317
L372:
  mov    %r12,%rbx
  mov    %edx,%r12d
  jmp    L316
  nopl   0x0(%rax)
L171:
  mov    %ebx,%esi
  mov    0x44(%rsp),%ebx
  jmp    L205
L521:
  mov    0x8(%rsp),%rsi
  mov    0x40(%rsp),%ecx
  add    $0x1,%rsi
  add    %rsi,0x38(%rsp)
  test   %ecx,%ecx
  jne    L484
L292:
  mov    0x38(%rsp),%rcx
  add    %rcx,0x30(%rsp)
  mov    0x1c(%rsp),%ecx
  test   %ecx,%ecx
  jne    L480
L492:
  mov    0x14(%rsp),%edx
  mov    0x30(%rsp),%rcx
  add    %rcx,0x28(%rsp)
  test   %edx,%edx
  jne    L454
L209:
  mov    0x28(%rsp),%r8
  jmp    L364
  nopl   0x0(%rax,%rax,1)
L146:
  sub    $0x2,%ebx
  jmp    L297
L46:
  mov    0x38(%rsp),%rcx
  add    $0x1,%rcx
  add    %rcx,0x30(%rsp)
  mov    0x1c(%rsp),%ecx
  test   %ecx,%ecx
  je     L492
L480:
  cmpl   $0x1,0x1c(%rsp)
  je     L133
L102:
  subl   $0x2,0x1c(%rsp)
  jmp    L302
L133:
  mov    0x30(%rsp),%rcx
  mov    0x14(%rsp),%edx
  add    $0x1,%rcx
  add    %rcx,0x28(%rsp)
  test   %edx,%edx
  je     L209
L454:
  cmpl   $0x1,0x14(%rsp)
  je     L51
L138:
  subl   $0x2,0x14(%rsp)
  jmp    L14
L51:
  mov    0x28(%rsp),%r8
  add    $0x1,%r8
L364:
  mov    0x18(%rsp),%eax
  add    %r8,0x20(%rsp)
  test   %eax,%eax
  je     L179
  cmpl   $0x1,0x18(%rsp)
  jne    L497
L509:
  mov    0x20(%rsp),%r10
  add    $0x1,%r10
L339:
  add    $0x58,%rsp
  mov    %r10,%rax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L497:
  subl   $0x2,0x18(%rsp)
  jmp    L116
L191:
  xor    %r10d,%r10d
L299:
  mov    %r10,%rax
  ret
L1:
  mov    $0x1,%r10d
  jmp    L299
L179:
  mov    0x20(%rsp),%r10
  jmp    L339
```

assistant: ```c
long fib(int n) {
  if (n == 0)
    return 0l;
  else if (n == 1)
    return 1l;
  else
    return fib(n - 1) + fib(n - 2);
}
```