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

```asm
<fib>:
  endbr64
  cmp    $0x1,%edi
  je     L79
  mov    %edi,%eax
  cmp    $0x2,%edi
  je     L337
  push   %r15
  sub    $0x2,%eax
  xor    %r9d,%r9d
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x38,%rsp
  mov    %eax,0xc(%rsp)
  mov    %r9d,0x10(%rsp)
L39:
  mov    0xc(%rsp),%edi
  lea    0x1(%rdi),%eax
  test   %edi,%edi
  je     L252
  cmp    $0x2,%eax
  je     L216
  movl   $0x0,0x4(%rsp)
  lea    -0x1(%rdi),%esi
L117:
  lea    0x1(%rsi),%eax
  test   %esi,%esi
  je     L278
  cmp    $0x2,%eax
  je     L342
  movl   $0x0,0x8(%rsp)
  lea    -0x1(%rsi),%ecx
  mov    %esi,0x18(%rsp)
L195:
  lea    0x1(%rcx),%eax
  test   %ecx,%ecx
  je     L289
  cmp    $0x2,%eax
  je     L460
  xor    %esi,%esi
  mov    %ecx,0x1c(%rsp)
  lea    -0x1(%rcx),%r8d
  mov    %esi,0x14(%rsp)
  mov    %r8d,%r15d
L211:
  lea    0x1(%r15),%eax
  test   %r15d,%r15d
  je     L492
  cmp    $0x2,%eax
  je     L222
  xor    %r9d,%r9d
  lea    -0x1(%r15),%r10d
  mov    %r15d,0x20(%rsp)
  mov    %r9d,(%rsp)
  mov    %r10d,%r15d
L38:
  lea    0x1(%r15),%eax
  test   %r15d,%r15d
  je     L503
  cmp    $0x2,%eax
  je     L242
  lea    -0x1(%r15),%r12d
  xor    %ecx,%ecx
  mov    %r15d,%esi
L408:
  lea    0x1(%r12),%eax
  test   %r12d,%r12d
  je     L50
  cmp    $0x2,%eax
  je     L87
  xor    %ebx,%ebx
  lea    -0x1(%r12),%ebp
  mov    %r12d,%edx
  mov    %ebx,%r12d
L444:
  lea    0x1(%rbp),%eax
  test   %ebp,%ebp
  je     L158
  cmp    $0x2,%eax
  je     L119
  mov    %ebp,%eax
  lea    -0x1(%rbp),%ebx
  xor    %r14d,%r14d
  mov    %ecx,%ebp
  mov    %eax,%ecx
L43:
  lea    0x1(%rbx),%r13d
  test   %ebx,%ebx
  je     L308
  cmp    $0x2,%r13d
  je     L307
  mov    %ebx,0x24(%rsp)
  xor    %r15d,%r15d
  mov    %esi,%ebx
L98:
  lea    -0x1(%r13),%edi
  mov    %ecx,0x2c(%rsp)
  sub    $0x2,%r13d
  mov    %edx,0x28(%rsp)
  call   <fib>
  mov    0x28(%rsp),%edx
  mov    0x2c(%rsp),%ecx
  add    %eax,%r15d
  cmp    $0x1,%r13d
  je     L392
  cmp    $0x2,%r13d
  jne    L98
  mov    %ebx,%esi
  mov    0x24(%rsp),%ebx
  add    $0x1,%r15d
L489:
  add    %r15d,%r14d
  cmp    $0x1,%ebx
  je     L68
  cmp    $0x2,%ebx
  jne    L308
L307:
  mov    %ecx,%eax
  add    $0x1,%r14d
  mov    %ebp,%ecx
  mov    %eax,%ebp
  add    %r14d,%r12d
  cmp    $0x1,%ebp
  je     L93
L305:
  cmp    $0x2,%ebp
  jne    L158
L119:
  mov    %r12d,%ebx
  mov    %edx,%r12d
  add    $0x1,%ebx
L520:
  add    %ebx,%ecx
  cmp    $0x1,%r12d
  jne    L409
  mov    %esi,%r15d
  mov    %ecx,%r14d
  add    %r14d,(%rsp)
  mov    (%rsp),%r9d
  cmp    $0x1,%r15d
  jne    L254
L474:
  mov    0x20(%rsp),%r15d
  add    %r9d,0x14(%rsp)
  cmp    $0x1,%r15d
  je     L215
L124:
  cmp    $0x2,%r15d
  je     L222
L492:
  sub    $0x2,%r15d
  jmp    L211
L158:
  sub    $0x2,%ebp
  jmp    L444
L409:
  cmp    $0x2,%r12d
  jne    L50
L87:
  mov    %ecx,%r14d
  mov    %esi,%r15d
  add    $0x1,%r14d
  add    %r14d,(%rsp)
  mov    (%rsp),%r9d
  cmp    $0x1,%r15d
  je     L474
L254:
  cmp    $0x2,%r15d
  je     L242
L503:
  sub    $0x2,%r15d
  jmp    L38
L50:
  sub    $0x2,%r12d
  jmp    L408
L68:
  mov    %ecx,%eax
  mov    %ebp,%ecx
  add    %r14d,%r12d
  mov    %eax,%ebp
  cmp    $0x1,%ebp
  jne    L305
L93:
  mov    %r12d,%ebx
  mov    %edx,%r12d
  jmp    L520
  nopl   0x0(%rax,%rax,1)
L392:
  mov    %ebx,%esi
  mov    0x24(%rsp),%ebx
  jmp    L489
L242:
  mov    (%rsp),%r9d
  mov    0x20(%rsp),%r15d
  add    $0x1,%r9d
  add    %r9d,0x14(%rsp)
  cmp    $0x1,%r15d
  jne    L124
L215:
  mov    0x1c(%rsp),%ecx
  mov    0x14(%rsp),%esi
  add    %esi,0x8(%rsp)
  cmp    $0x1,%ecx
  jne    L127
L266:
  mov    0x18(%rsp),%esi
  jmp    L391
  xchg   %ax,%ax
L308:
  sub    $0x2,%ebx
  jmp    L43
L222:
  mov    0x14(%rsp),%esi
  mov    0x1c(%rsp),%ecx
  add    $0x1,%esi
  add    %esi,0x8(%rsp)
  cmp    $0x1,%ecx
  je     L266
L127:
  cmp    $0x2,%ecx
  je     L460
L289:
  sub    $0x2,%ecx
  jmp    L195
L460:
  addl   $0x1,0x8(%rsp)
  mov    0x18(%rsp),%esi
L391:
  mov    0x8(%rsp),%edi
  add    %edi,0x4(%rsp)
  cmp    $0x1,%esi
  je     L267
  cmp    $0x2,%esi
  je     L342
L278:
  sub    $0x2,%esi
  jmp    L117
L342:
  addl   $0x1,0x4(%rsp)
L267:
  mov    0x4(%rsp),%edi
  add    %edi,0x10(%rsp)
  cmpl   $0x1,0xc(%rsp)
  je     L521
  cmpl   $0x2,0xc(%rsp)
  jne    L252
L216:
  mov    0x10(%rsp),%r9d
  add    $0x1,%r9d
L306:
  add    $0x38,%rsp
  mov    %r9d,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L252:
  subl   $0x2,0xc(%rsp)
  jmp    L39
L79:
  xor    %r9d,%r9d
L74:
  mov    %r9d,%eax
  ret
L337:
  mov    $0x1,%r9d
  jmp    L74
L521:
  mov    0x10(%rsp),%r9d
  jmp    L306
```

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