user: 请将以下的汇编代码转换成C语言代码:

```asm
<fib>:
  endbr64
  mov    %edi,%r10d
  test   %edi,%edi
  je     L478
  cmp    $0x1,%edi
  je     L478
  push   %r15
  lea    -0x2(%rdi),%eax
  xor    %r10d,%r10d
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x38,%rsp
  mov    %eax,0x4(%rsp)
  mov    %r10d,0x10(%rsp)
L341:
  mov    0x4(%rsp),%edi
  mov    %edi,%eax
  add    $0x1,%eax
  je     L212
  cmp    $0x1,%eax
  je     L0
  lea    -0x1(%rdi),%eax
  xor    %r8d,%r8d
  mov    %eax,0x8(%rsp)
  mov    %r8d,0x14(%rsp)
L425:
  mov    0x8(%rsp),%edi
  mov    %edi,%eax
  add    $0x1,%eax
  je     L335
  cmp    $0x1,%eax
  je     L503
  lea    -0x1(%rdi),%eax
  xor    %ecx,%ecx
  mov    %eax,0xc(%rsp)
  mov    %ecx,0x18(%rsp)
L394:
  mov    0xc(%rsp),%edi
  mov    %edi,%eax
  add    $0x1,%eax
  je     L145
  cmp    $0x1,%eax
  je     L39
  xor    %ecx,%ecx
  lea    -0x1(%rdi),%r8d
  mov    %ecx,0x1c(%rsp)
  mov    %r8d,%ecx
L528:
  mov    %ecx,%eax
  add    $0x1,%eax
  je     L422
  cmp    $0x1,%eax
  je     L365
  xor    %esi,%esi
  mov    %ecx,0x20(%rsp)
  lea    -0x1(%rcx),%r9d
  mov    %esi,(%rsp)
  mov    %r9d,%r15d
L57:
  mov    %r15d,%eax
  add    $0x1,%eax
  je     L33
  cmp    $0x1,%eax
  je     L325
  lea    -0x1(%r15),%r12d
  xor    %ecx,%ecx
  mov    %r15d,%esi
L484:
  mov    %r12d,%eax
  add    $0x1,%eax
  je     L457
  cmp    $0x1,%eax
  je     L468
  xor    %ebx,%ebx
  lea    -0x1(%r12),%ebp
  mov    %r12d,%edx
  mov    %ebx,%r12d
L40:
  mov    %ebp,%eax
  add    $0x1,%eax
  je     L376
  cmp    $0x1,%eax
  je     L483
  mov    %ebp,%eax
  lea    -0x1(%rbp),%ebx
  xor    %r14d,%r14d
  mov    %ecx,%ebp
  mov    %eax,%ecx
L110:
  mov    %ebx,%r13d
  add    $0x1,%r13d
  je     L505
  cmp    $0x1,%r13d
  je     L115
  mov    %ebx,0x24(%rsp)
  xor    %r15d,%r15d
  mov    %esi,%ebx
L11:
  lea    -0x1(%r13),%edi
  mov    %ecx,0x2c(%rsp)
  mov    %edx,0x28(%rsp)
  call   <fib>
  mov    0x28(%rsp),%edx
  mov    0x2c(%rsp),%ecx
  add    %eax,%r15d
  sub    $0x2,%r13d
  je     L147
  cmp    $0x1,%r13d
  jne    L11
  mov    %ebx,%esi
  mov    0x24(%rsp),%ebx
  add    $0x1,%r15d
L222:
  add    %r15d,%r14d
  test   %ebx,%ebx
  je     L371
  cmp    $0x1,%ebx
  jne    L505
L115:
  mov    %ecx,%eax
  add    $0x1,%r14d
  mov    %ebp,%ecx
  mov    %eax,%ebp
  add    %r14d,%r12d
  test   %ebp,%ebp
  je     L408
L7:
  cmp    $0x1,%ebp
  jne    L376
L483:
  mov    %r12d,%ebx
  mov    %edx,%r12d
  add    $0x1,%ebx
L315:
  add    %ebx,%ecx
  test   %r12d,%r12d
  jne    L131
  mov    %esi,%r15d
  mov    %ecx,%r14d
  add    %r14d,(%rsp)
  mov    (%rsp),%esi
  test   %r15d,%r15d
  jne    L395
L100:
  mov    0x20(%rsp),%ecx
  add    %esi,0x1c(%rsp)
  test   %ecx,%ecx
  je     L340
L421:
  cmp    $0x1,%ecx
  je     L365
L422:
  sub    $0x2,%ecx
  jmp    L528
L376:
  sub    $0x2,%ebp
  jmp    L40
L131:
  cmp    $0x1,%r12d
  jne    L457
L468:
  mov    %ecx,%r14d
  mov    %esi,%r15d
  add    $0x1,%r14d
  add    %r14d,(%rsp)
  mov    (%rsp),%esi
  test   %r15d,%r15d
  je     L100
L395:
  cmp    $0x1,%r15d
  je     L244
L33:
  sub    $0x2,%r15d
  jmp    L57
L457:
  sub    $0x2,%r12d
  jmp    L484
L371:
  mov    %ecx,%eax
  mov    %ebp,%ecx
  add    %r14d,%r12d
  mov    %eax,%ebp
  test   %ebp,%ebp
  jne    L7
L408:
  mov    %r12d,%ebx
  mov    %edx,%r12d
  jmp    L315
  nopl   (%rax)
L147:
  mov    %ebx,%esi
  mov    0x24(%rsp),%ebx
  jmp    L222
L325:
  mov    (%rsp),%esi
L244:
  mov    0x20(%rsp),%ecx
  add    $0x1,%esi
  add    %esi,0x1c(%rsp)
  test   %ecx,%ecx
  jne    L421
L340:
  mov    0x1c(%rsp),%ecx
  add    %ecx,0x18(%rsp)
  mov    0xc(%rsp),%ecx
  test   %ecx,%ecx
  jne    L406
L465:
  mov    0x8(%rsp),%edx
  mov    0x18(%rsp),%ecx
  add    %ecx,0x14(%rsp)
  test   %edx,%edx
  jne    L337
L479:
  mov    0x14(%rsp),%r8d
  jmp    L137
L505:
  sub    $0x2,%ebx
  jmp    L110
L365:
  mov    0x1c(%rsp),%ecx
  add    $0x1,%ecx
  add    %ecx,0x18(%rsp)
  mov    0xc(%rsp),%ecx
  test   %ecx,%ecx
  je     L465
L406:
  cmpl   $0x1,0xc(%rsp)
  je     L39
L145:
  subl   $0x2,0xc(%rsp)
  jmp    L394
L39:
  mov    0x18(%rsp),%ecx
  mov    0x8(%rsp),%edx
  add    $0x1,%ecx
  add    %ecx,0x14(%rsp)
  test   %edx,%edx
  je     L479
L337:
  cmpl   $0x1,0x8(%rsp)
  je     L503
L335:
  subl   $0x2,0x8(%rsp)
  jmp    L425
L503:
  mov    0x14(%rsp),%r8d
  add    $0x1,%r8d
L137:
  mov    0x4(%rsp),%eax
  add    %r8d,0x10(%rsp)
  test   %eax,%eax
  je     L65
  cmpl   $0x1,0x4(%rsp)
  jne    L212
L0:
  mov    0x10(%rsp),%r10d
  add    $0x1,%r10d
L396:
  add    $0x38,%rsp
  mov    %r10d,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L212:
  subl   $0x2,0x4(%rsp)
  jmp    L341
L478:
  mov    %r10d,%eax
  ret
L65:
  mov    0x10(%rsp),%r10d
  jmp    L396
```

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