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

```asm
<fibonacci>:
  endbr64
  mov    %edi,%r10d
  test   %edi,%edi
  je     L224
  cmp    $0x1,%edi
  je     L224
  push   %r15
  lea    -0x2(%rdi),%eax
  xor    %r10d,%r10d
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x38,%rsp
  mov    %eax,0x8(%rsp)
  mov    %r10d,0x10(%rsp)
L315:
  mov    0x8(%rsp),%edi
  mov    %edi,%eax
  add    $0x1,%eax
  je     L529
  cmp    $0x1,%eax
  je     L350
  lea    -0x1(%rdi),%eax
  xor    %r8d,%r8d
  mov    %eax,0x4(%rsp)
  mov    %r8d,0x14(%rsp)
L388:
  mov    0x4(%rsp),%edi
  mov    %edi,%eax
  add    $0x1,%eax
  je     L495
  cmp    $0x1,%eax
  je     L129
  lea    -0x1(%rdi),%eax
  xor    %ecx,%ecx
  mov    %eax,0xc(%rsp)
  mov    %ecx,0x18(%rsp)
L156:
  mov    0xc(%rsp),%edi
  mov    %edi,%eax
  add    $0x1,%eax
  je     L170
  cmp    $0x1,%eax
  je     L199
  xor    %ecx,%ecx
  lea    -0x1(%rdi),%r8d
  mov    %ecx,0x1c(%rsp)
  mov    %r8d,%ecx
L330:
  mov    %ecx,%eax
  add    $0x1,%eax
  je     L72
  cmp    $0x1,%eax
  je     L90
  xor    %esi,%esi
  mov    %ecx,0x20(%rsp)
  lea    -0x1(%rcx),%r9d
  mov    %esi,(%rsp)
  mov    %r9d,%r15d
L490:
  mov    %r15d,%eax
  add    $0x1,%eax
  je     L82
  cmp    $0x1,%eax
  je     L394
  lea    -0x1(%r15),%r12d
  xor    %ecx,%ecx
  mov    %r15d,%esi
L487:
  mov    %r12d,%eax
  add    $0x1,%eax
  je     L322
  cmp    $0x1,%eax
  je     L39
  xor    %ebx,%ebx
  lea    -0x1(%r12),%ebp
  mov    %r12d,%edx
  mov    %ebx,%r12d
L527:
  mov    %ebp,%eax
  add    $0x1,%eax
  je     L274
  cmp    $0x1,%eax
  je     L111
  mov    %ebp,%eax
  lea    -0x1(%rbp),%ebx
  xor    %r14d,%r14d
  mov    %ecx,%ebp
  mov    %eax,%ecx
L134:
  mov    %ebx,%r13d
  add    $0x1,%r13d
  je     L184
  cmp    $0x1,%r13d
  je     L49
  mov    %ebx,0x24(%rsp)
  xor    %r15d,%r15d
  mov    %esi,%ebx
L264:
  lea    -0x1(%r13),%edi
  mov    %ecx,0x2c(%rsp)
  mov    %edx,0x28(%rsp)
  call   <fibonacci>
  mov    0x28(%rsp),%edx
  mov    0x2c(%rsp),%ecx
  add    %eax,%r15d
  sub    $0x2,%r13d
  je     L379
  cmp    $0x1,%r13d
  jne    L264
  mov    %ebx,%esi
  mov    0x24(%rsp),%ebx
  add    $0x1,%r15d
L521:
  add    %r15d,%r14d
  test   %ebx,%ebx
  je     L242
  cmp    $0x1,%ebx
  jne    L184
L49:
  mov    %ecx,%eax
  add    $0x1,%r14d
  mov    %ebp,%ecx
  mov    %eax,%ebp
  add    %r14d,%r12d
  test   %ebp,%ebp
  je     L425
L41:
  cmp    $0x1,%ebp
  jne    L274
L111:
  mov    %r12d,%ebx
  mov    %edx,%r12d
  add    $0x1,%ebx
L28:
  add    %ebx,%ecx
  test   %r12d,%r12d
  jne    L7
  mov    %esi,%r15d
  mov    %ecx,%r14d
  add    %r14d,(%rsp)
  mov    (%rsp),%esi
  test   %r15d,%r15d
  jne    L458
L319:
  mov    0x20(%rsp),%ecx
  add    %esi,0x1c(%rsp)
  test   %ecx,%ecx
  je     L391
L324:
  cmp    $0x1,%ecx
  je     L90
L72:
  sub    $0x2,%ecx
  jmp    L330
L274:
  sub    $0x2,%ebp
  jmp    L527
L7:
  cmp    $0x1,%r12d
  jne    L322
L39:
  mov    %ecx,%r14d
  mov    %esi,%r15d
  add    $0x1,%r14d
  add    %r14d,(%rsp)
  mov    (%rsp),%esi
  test   %r15d,%r15d
  je     L319
L458:
  cmp    $0x1,%r15d
  je     L394
L82:
  sub    $0x2,%r15d
  jmp    L490
L322:
  sub    $0x2,%r12d
  jmp    L487
L242:
  mov    %ecx,%eax
  mov    %ebp,%ecx
  add    %r14d,%r12d
  mov    %eax,%ebp
  test   %ebp,%ebp
  jne    L41
L425:
  mov    %r12d,%ebx
  mov    %edx,%r12d
  jmp    L28
  nopl   (%rax)
L379:
  mov    %ebx,%esi
  mov    0x24(%rsp),%ebx
  jmp    L521
L394:
  mov    (%rsp),%esi
  mov    0x20(%rsp),%ecx
  add    $0x1,%esi
  add    %esi,0x1c(%rsp)
  test   %ecx,%ecx
  jne    L324
L391:
  mov    0x1c(%rsp),%ecx
  add    %ecx,0x18(%rsp)
  mov    0xc(%rsp),%ecx
  test   %ecx,%ecx
  jne    L99
L308:
  mov    0x4(%rsp),%edx
  mov    0x18(%rsp),%ecx
  add    %ecx,0x14(%rsp)
  test   %edx,%edx
  jne    L327
L465:
  mov    0x14(%rsp),%r8d
  jmp    L201
L184:
  sub    $0x2,%ebx
  jmp    L134
L90:
  mov    0x1c(%rsp),%ecx
  add    $0x1,%ecx
  add    %ecx,0x18(%rsp)
  mov    0xc(%rsp),%ecx
  test   %ecx,%ecx
  je     L308
L99:
  cmpl   $0x1,0xc(%rsp)
  je     L199
L170:
  subl   $0x2,0xc(%rsp)
  jmp    L156
L199:
  mov    0x18(%rsp),%ecx
  mov    0x4(%rsp),%edx
  add    $0x1,%ecx
  add    %ecx,0x14(%rsp)
  test   %edx,%edx
  je     L465
L327:
  cmpl   $0x1,0x4(%rsp)
  je     L129
L495:
  subl   $0x2,0x4(%rsp)
  jmp    L388
L129:
  mov    0x14(%rsp),%r8d
  add    $0x1,%r8d
L201:
  mov    0x8(%rsp),%eax
  add    %r8d,0x10(%rsp)
  test   %eax,%eax
  je     L187
  cmpl   $0x1,0x8(%rsp)
  jne    L529
L350:
  mov    0x10(%rsp),%r10d
  add    $0x1,%r10d
L311:
  add    $0x38,%rsp
  mov    %r10d,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L529:
  subl   $0x2,0x8(%rsp)
  jmp    L315
L224:
  mov    %r10d,%eax
  ret
L187:
  mov    0x10(%rsp),%r10d
  jmp    L311
```

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