user: Converte this assembly snippet into its equivalent C code:

```asm
<fib>:
  endbr64
  push   %r15
  mov    $0x1,%eax
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x58,%rsp
  movl   $0x0,0x14(%rsp)
  cmp    $0x2,%edi
  jbe    L14
  mov    %edi,%eax
L17:
  cmp    $0x3,%eax
  je     L5
  sub    $0x2,%eax
  movl   $0x0,0x18(%rsp)
  mov    %eax,0xc(%rsp)
  cmpl   $0x2,0xc(%rsp)
  mov    %eax,0x30(%rsp)
  je     L134
L109:
  mov    0xc(%rsp),%eax
  movl   $0x0,0x1c(%rsp)
  sub    $0x1,%eax
  mov    %eax,0x10(%rsp)
  cmpl   $0x2,0x10(%rsp)
  mov    %eax,0x24(%rsp)
  je     L148
L75:
  mov    0x10(%rsp),%eax
  movl   $0x0,0x20(%rsp)
  sub    $0x1,%eax
  mov    %eax,0x28(%rsp)
  mov    %eax,%r11d
L128:
  cmp    $0x2,%r11d
  je     L232
  lea    -0x1(%r11),%eax
  xor    %ecx,%ecx
  mov    %eax,0x2c(%rsp)
  mov    %eax,%ebp
L64:
  cmp    $0x2,%ebp
  je     L202
  lea    -0x1(%rbp),%esi
  xor    %r12d,%r12d
  mov    %esi,%edx
L294:
  cmp    $0x2,%edx
  je     L125
  lea    -0x2(%rdx),%r8d
  xor    %r15d,%r15d
  mov    %r8d,%r9d
L157:
  mov    %r9d,%ebx
  xor    %r13d,%r13d
  cmp    $0x1,%r9d
  je     L280
  mov    %ebx,%r10d
  xor    %r14d,%r14d
  cmp    $0x2,%ebx
  je     L92
  xchg   %ax,%ax
L243:
  lea    -0x1(%r10),%edi
  mov    %r8d,0x4c(%rsp)
  mov    %esi,0x48(%rsp)
  mov    %r9d,0x44(%rsp)
  mov    %edx,0x40(%rsp)
  mov    %r11d,0x3c(%rsp)
  mov    %ecx,0x38(%rsp)
  mov    %r10d,0x34(%rsp)
  call   <fib>
  mov    0x34(%rsp),%r10d
  mov    0x38(%rsp),%ecx
  add    %eax,%r14d
  mov    0x3c(%rsp),%r11d
  mov    0x40(%rsp),%edx
  sub    $0x2,%r10d
  mov    0x44(%rsp),%r9d
  mov    0x48(%rsp),%esi
  cmp    $0x2,%r10d
  mov    0x4c(%rsp),%r8d
  ja     L243
  add    $0x1,%r14d
  lea    -0x2(%rbx),%eax
  sub    $0x1,%ebx
  add    %r14d,%r13d
  cmp    $0x2,%ebx
  jbe    L241
L261:
  mov    %eax,%ebx
  xor    %r14d,%r14d
  mov    %ebx,%r10d
  cmp    $0x2,%ebx
  jne    L243
L92:
  mov    $0x1,%r14d
  lea    -0x2(%rbx),%eax
  sub    $0x1,%ebx
  add    %r14d,%r13d
  cmp    $0x2,%ebx
  ja     L261
L241:
  add    $0x1,%r13d
  lea    -0x2(%r9),%eax
  add    %r13d,%r15d
  cmp    $0x2,%r9d
  ja     L36
L129:
  add    $0x1,%r15d
  sub    $0x1,%edx
  add    %r15d,%r12d
  cmp    $0x2,%edx
  ja     L42
L138:
  add    $0x1,%r12d
L182:
  add    %r12d,%ecx
  sub    $0x2,%ebp
  cmp    $0x2,%esi
  ja     L64
  add    $0x1,%ecx
L186:
  add    %ecx,0x20(%rsp)
  sub    $0x2,%r11d
  cmpl   $0x2,0x2c(%rsp)
  ja     L128
  mov    0x20(%rsp),%eax
  add    $0x1,%eax
L190:
  add    %eax,0x1c(%rsp)
  mov    0x10(%rsp),%eax
  sub    $0x2,%eax
  cmpl   $0x2,0x28(%rsp)
  jbe    L264
  mov    %eax,0x10(%rsp)
  cmpl   $0x2,0x10(%rsp)
  jne    L75
L148:
  movl   $0x1,0x28(%rsp)
  mov    $0x1,%eax
  jmp    L190
L125:
  mov    $0x1,%r15d
  sub    $0x1,%edx
  xor    %r8d,%r8d
  add    %r15d,%r12d
  cmp    $0x2,%edx
  jbe    L138
L42:
  mov    %r8d,%edx
  jmp    L294
  nopl   (%rax)
L280:
  mov    $0x1,%r13d
  lea    -0x2(%r9),%eax
  add    %r13d,%r15d
  cmp    $0x2,%r9d
  jbe    L129
L36:
  mov    %eax,%r9d
  jmp    L157
L202:
  mov    $0x1,%r12d
  mov    $0x1,%esi
  jmp    L182
L232:
  movl   $0x1,0x2c(%rsp)
  mov    $0x1,%ecx
  jmp    L186
L264:
  mov    0x1c(%rsp),%eax
  add    $0x1,%eax
L298:
  add    %eax,0x18(%rsp)
  mov    0xc(%rsp),%eax
  sub    $0x2,%eax
  cmpl   $0x2,0x24(%rsp)
  jbe    L112
  mov    %eax,0xc(%rsp)
  cmpl   $0x2,0xc(%rsp)
  jne    L109
L134:
  movl   $0x1,0x24(%rsp)
  mov    $0x1,%eax
  jmp    L298
L5:
  movl   $0x1,0x30(%rsp)
  mov    $0x1,%edx
L3:
  mov    0x30(%rsp),%eax
  add    %edx,0x14(%rsp)
  cmp    $0x2,%eax
  ja     L17
  mov    0x14(%rsp),%eax
  add    $0x1,%eax
L14:
  add    $0x58,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L112:
  mov    0x18(%rsp),%edx
  add    $0x1,%edx
  jmp    L3
```

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