user: 请将这段汇编代码片段转换成等效的C代码:

```asm
<fib>:
  endbr64
  test   %edi,%edi
  je     L335
  mov    %edi,%eax
  cmp    $0x1,%edi
  je     L274
  push   %r15
  sub    $0x2,%eax
  xor    %r10d,%r10d
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x58,%rsp
  mov    %eax,0x14(%rsp)
  mov    %r10,0x20(%rsp)
L18:
  mov    0x14(%rsp),%edi
  mov    %edi,%eax
  add    $0x1,%eax
  je     L196
  cmp    $0x1,%eax
  je     L395
  lea    -0x1(%rdi),%eax
  xor    %r8d,%r8d
  mov    %eax,0x18(%rsp)
  mov    %r8,0x28(%rsp)
L277:
  mov    0x18(%rsp),%edi
  mov    %edi,%eax
  add    $0x1,%eax
  je     L304
  cmp    $0x1,%eax
  je     L128
  lea    -0x1(%rdi),%eax
  xor    %ecx,%ecx
  mov    %eax,0x1c(%rsp)
  mov    %rcx,0x30(%rsp)
L363:
  mov    0x1c(%rsp),%edi
  mov    %edi,%eax
  add    $0x1,%eax
  je     L481
  cmp    $0x1,%eax
  je     L364
  xor    %ecx,%ecx
  lea    -0x1(%rdi),%r8d
  mov    %rcx,0x38(%rsp)
  mov    %r8d,%ecx
L528:
  mov    %ecx,%eax
  add    $0x1,%eax
  je     L236
  cmp    $0x1,%eax
  je     L235
  xor    %esi,%esi
  mov    %ecx,0x40(%rsp)
  lea    -0x1(%rcx),%r9d
  mov    %rsi,0x8(%rsp)
  mov    %r9d,%r15d
L384:
  mov    %r15d,%eax
  add    $0x1,%eax
  je     L502
  cmp    $0x1,%eax
  je     L376
  lea    -0x1(%r15),%r12d
  xor    %ecx,%ecx
  mov    %r15d,%esi
L195:
  mov    %r12d,%eax
  add    $0x1,%eax
  je     L479
  cmp    $0x1,%eax
  je     L92
  xor    %ebx,%ebx
  lea    -0x1(%r12),%ebp
  mov    %r12d,%edx
  mov    %rbx,%r12
L207:
  mov    %ebp,%eax
  add    $0x1,%eax
  je     L34
  cmp    $0x1,%eax
  je     L498
  mov    %ebp,%eax
  lea    -0x1(%rbp),%ebx
  xor    %r14d,%r14d
  mov    %rcx,%rbp
  mov    %eax,%ecx
L286:
  mov    %ebx,%r13d
  add    $0x1,%r13d
  je     L283
  cmp    $0x1,%r13d
  je     L299
  mov    %ebx,0x44(%rsp)
  xor    %r15d,%r15d
  mov    %esi,%ebx
L271:
  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     L199
  cmp    $0x1,%r13d
  jne    L271
  mov    %ebx,%esi
  mov    0x44(%rsp),%ebx
  add    $0x1,%r15
L468:
  add    %r15,%r14
  test   %ebx,%ebx
  je     L292
  cmp    $0x1,%ebx
  jne    L283
L299:
  mov    %ecx,%eax
  add    $0x1,%r14
  mov    %rbp,%rcx
  mov    %eax,%ebp
  add    %r14,%r12
  test   %ebp,%ebp
  je     L53
L265:
  cmp    $0x1,%ebp
  jne    L34
L498:
  mov    %r12,%rbx
  mov    %edx,%r12d
  add    $0x1,%rbx
L260:
  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    L359
L459:
  mov    0x40(%rsp),%ecx
  add    %rsi,0x38(%rsp)
  test   %ecx,%ecx
  je     L104
L315:
  cmp    $0x1,%ecx
  je     L235
L236:
  sub    $0x2,%ecx
  jmp    L528
L34:
  sub    $0x2,%ebp
  jmp    L207
L261:
  cmp    $0x1,%r12d
  jne    L479
L92:
  mov    %rcx,%r14
  mov    %esi,%r15d
  add    $0x1,%r14
  add    %r14,0x8(%rsp)
  mov    0x8(%rsp),%rsi
  test   %r15d,%r15d
  je     L459
L359:
  cmp    $0x1,%r15d
  je     L291
L502:
  sub    $0x2,%r15d
  jmp    L384
L479:
  sub    $0x2,%r12d
  jmp    L195
L292:
  mov    %ecx,%eax
  mov    %rbp,%rcx
  add    %r14,%r12
  mov    %eax,%ebp
  test   %ebp,%ebp
  jne    L265
L53:
  mov    %r12,%rbx
  mov    %edx,%r12d
  jmp    L260
  nopl   0x0(%rax)
L199:
  mov    %ebx,%esi
  mov    0x44(%rsp),%ebx
  jmp    L468
L376:
  mov    0x8(%rsp),%rsi
L291:
  mov    0x40(%rsp),%ecx
  add    $0x1,%rsi
  add    %rsi,0x38(%rsp)
  test   %ecx,%ecx
  jne    L315
L104:
  mov    0x38(%rsp),%rcx
  add    %rcx,0x30(%rsp)
  mov    0x1c(%rsp),%ecx
  test   %ecx,%ecx
  jne    L173
L233:
  mov    0x18(%rsp),%edx
  mov    0x30(%rsp),%rcx
  add    %rcx,0x28(%rsp)
  test   %edx,%edx
  jne    L62
L254:
  mov    0x28(%rsp),%r8
  jmp    L175
  nopl   0x0(%rax,%rax,1)
L283:
  sub    $0x2,%ebx
  jmp    L286
L235:
  mov    0x38(%rsp),%rcx
  add    $0x1,%rcx
  add    %rcx,0x30(%rsp)
  mov    0x1c(%rsp),%ecx
  test   %ecx,%ecx
  je     L233
L173:
  cmpl   $0x1,0x1c(%rsp)
  je     L364
L481:
  subl   $0x2,0x1c(%rsp)
  jmp    L363
L364:
  mov    0x30(%rsp),%rcx
  mov    0x18(%rsp),%edx
  add    $0x1,%rcx
  add    %rcx,0x28(%rsp)
  test   %edx,%edx
  je     L254
L62:
  cmpl   $0x1,0x18(%rsp)
  je     L128
L304:
  subl   $0x2,0x18(%rsp)
  jmp    L277
L128:
  mov    0x28(%rsp),%r8
  add    $0x1,%r8
L175:
  mov    0x14(%rsp),%eax
  add    %r8,0x20(%rsp)
  test   %eax,%eax
  je     L487
  cmpl   $0x1,0x14(%rsp)
  jne    L196
L395:
  mov    0x20(%rsp),%r10
  add    $0x1,%r10
L330:
  add    $0x58,%rsp
  mov    %r10,%rax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L196:
  subl   $0x2,0x14(%rsp)
  jmp    L18
L335:
  xor    %r10d,%r10d
L145:
  mov    %r10,%rax
  ret
L274:
  mov    $0x1,%r10d
  jmp    L145
L487:
  mov    0x20(%rsp),%r10
  jmp    L330
```

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