user: What would the C source look like for the assembly code provided here?

```asm
<lucas>:
  endbr64
  test   %edi,%edi
  je     L150
  mov    %edi,%eax
  cmp    $0x1,%edi
  je     L59
  push   %r15
  sub    $0x2,%eax
  xor    %r8d,%r8d
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x38,%rsp
  mov    %eax,0x8(%rsp)
  mov    0x8(%rsp),%edi
  mov    %r8d,(%rsp)
  mov    %edi,%eax
  add    $0x1,%eax
  je     L279
L140:
  cmp    $0x1,%eax
  je     L396
  lea    -0x1(%rdi),%eax
  xor    %ecx,%ecx
  mov    %eax,0xc(%rsp)
  mov    0xc(%rsp),%edi
  mov    %ecx,0x4(%rsp)
  mov    %edi,%eax
  add    $0x1,%eax
  je     L61
L218:
  cmp    $0x1,%eax
  je     L132
  lea    -0x1(%rdi),%eax
  xor    %edx,%edx
  mov    %eax,0x10(%rsp)
  mov    0x10(%rsp),%edi
  mov    %edi,%eax
  add    $0x1,%eax
  je     L245
L83:
  cmp    $0x1,%eax
  je     L617
  lea    -0x1(%rdi),%esi
  xor    %ecx,%ecx
  mov    %edx,0x14(%rsp)
  mov    %esi,%eax
  mov    %ecx,%r13d
  add    $0x1,%eax
  je     L473
L540:
  cmp    $0x1,%eax
  je     L435
  mov    %esi,0x1c(%rsp)
  lea    -0x1(%rsi),%r9d
  xor    %r8d,%r8d
  mov    %r13d,0x18(%rsp)
  mov    %r9d,%r14d
  mov    %r8d,%r13d
L599:
  mov    %r14d,%eax
  add    $0x1,%eax
  je     L289
  cmp    $0x1,%eax
  je     L547
  lea    -0x1(%r14),%ebp
  xor    %esi,%esi
  mov    %r13d,%ecx
  mov    %r14d,%r8d
L60:
  mov    %ebp,%eax
  add    $0x1,%eax
  je     L214
  cmp    $0x1,%eax
  je     L452
  lea    -0x1(%rbp),%ebx
  xor    %r12d,%r12d
  mov    %ebp,%r9d
L583:
  mov    %ebx,%eax
  add    $0x1,%eax
  je     L174
  cmp    $0x1,%eax
  je     L28
  mov    %ebx,%eax
  lea    -0x1(%rbx),%r15d
  xor    %r14d,%r14d
  mov    %ecx,%ebx
  mov    %r12d,%ecx
  mov    %esi,%r12d
  mov    %eax,%esi
L143:
  mov    %r15d,%ebp
  add    $0x1,%ebp
  je     L511
  cmp    $0x1,%ebp
  je     L96
  mov    %r15d,0x20(%rsp)
  xor    %r13d,%r13d
  mov    %r14d,%r15d
  mov    %ecx,%r14d
L1:
  lea    -0x1(%rbp),%edi
  mov    %esi,0x2c(%rsp)
  mov    %r9d,0x28(%rsp)
  mov    %r8d,0x24(%rsp)
  call   <lucas>
  mov    0x24(%rsp),%r8d
  mov    0x28(%rsp),%r9d
  add    %eax,%r13d
  sub    $0x2,%ebp
  mov    0x2c(%rsp),%esi
  je     L557
  cmp    $0x1,%ebp
  jne    L1
  mov    %r14d,%ecx
  mov    %r15d,%r14d
  mov    0x20(%rsp),%r15d
L349:
  add    %ebp,%r13d
  mov    %r15d,%edx
  add    %r13d,%r14d
  test   %r15d,%r15d
  je     L95
  cmp    $0x1,%r15d
  jne    L334
  mov    %esi,%eax
  mov    %r12d,%esi
  mov    %ecx,%r12d
  mov    %ebx,%ecx
  mov    %eax,%ebx
L463:
  add    %r14d,%edx
  mov    %ebx,%eax
  add    %edx,%r12d
  test   %ebx,%ebx
  je     L538
L376:
  cmp    $0x1,%ebx
  jne    L395
  mov    %r9d,%ebp
L136:
  add    %r12d,%eax
  mov    %ebp,%edx
  add    %eax,%esi
  test   %ebp,%ebp
  jne    L55
L454:
  mov    %ecx,%r13d
  mov    %r8d,%r14d
  mov    $0x2,%edx
L182:
  add    %esi,%edx
  mov    %r14d,%r10d
  add    %edx,%r13d
  test   %r14d,%r14d
  jne    L155
L260:
  mov    %r13d,%r8d
  mov    0x1c(%rsp),%esi
  mov    0x18(%rsp),%r13d
  mov    $0x2,%r10d
L222:
  add    %r8d,%r10d
  mov    %esi,%eax
  add    %r10d,%r13d
  test   %esi,%esi
  je     L107
L412:
  cmp    $0x1,%esi
  je     L542
L422:
  sub    $0x2,%esi
  mov    %esi,%eax
  add    $0x1,%eax
  jne    L540
L473:
  add    $0x2,%r13d
  jmp    L422
L174:
  add    $0x2,%r12d
L395:
  sub    $0x2,%ebx
  jmp    L583
  nopl   (%rax)
L511:
  add    $0x2,%r14d
L334:
  sub    $0x2,%r15d
  jmp    L143
L95:
  mov    %esi,%eax
  mov    $0x2,%edx
  mov    %r12d,%esi
  mov    %ecx,%r12d
  add    %r14d,%edx
  mov    %ebx,%ecx
  mov    %eax,%ebx
  mov    %ebx,%eax
  add    %edx,%r12d
  test   %ebx,%ebx
  jne    L376
L538:
  mov    $0x2,%eax
  mov    %r9d,%ebp
  add    %r12d,%eax
  mov    %ebp,%edx
  add    %eax,%esi
  test   %ebp,%ebp
  je     L454
L55:
  cmp    $0x1,%ebp
  jne    L250
  mov    %ecx,%r13d
  mov    %r8d,%r14d
  add    %esi,%edx
  mov    %r14d,%r10d
  add    %edx,%r13d
  test   %r14d,%r14d
  je     L260
L155:
  cmp    $0x1,%r14d
  jne    L22
  mov    %r13d,%r8d
  mov    0x1c(%rsp),%esi
  mov    0x18(%rsp),%r13d
  add    %r8d,%r10d
  mov    %esi,%eax
  add    %r10d,%r13d
  test   %esi,%esi
  jne    L412
L107:
  mov    0x14(%rsp),%edx
  mov    %r13d,%ecx
  mov    $0x2,%eax
  mov    0x10(%rsp),%esi
  add    %ecx,%eax
  add    %eax,%edx
  test   %esi,%esi
  jne    L278
L134:
  mov    $0x2,%esi
L189:
  mov    0xc(%rsp),%eax
  add    %edx,%esi
  add    %esi,0x4(%rsp)
  test   %eax,%eax
  je     L341
L106:
  cmpl   $0x1,0xc(%rsp)
  je     L424
L80:
  subl   $0x2,0xc(%rsp)
  mov    0xc(%rsp),%edi
  mov    %edi,%eax
  add    $0x1,%eax
  jne    L218
L61:
  addl   $0x2,0x4(%rsp)
  jmp    L80
L28:
  mov    %r9d,%ebp
  add    $0x1,%r12d
  mov    $0x2,%eax
  jmp    L136
L214:
  add    $0x2,%esi
L250:
  sub    $0x2,%ebp
  jmp    L60
L452:
  mov    %ecx,%r13d
  mov    %r8d,%r14d
  add    $0x1,%esi
  mov    $0x2,%edx
  jmp    L182
  nopl   0x0(%rax,%rax,1)
L557:
  mov    %r14d,%ecx
  mov    $0x2,%ebp
  mov    %r15d,%r14d
  mov    0x20(%rsp),%r15d
  jmp    L349
L547:
  mov    %r13d,%r8d
  mov    0x1c(%rsp),%esi
  mov    0x18(%rsp),%r13d
  mov    $0x2,%r10d
  add    $0x1,%r8d
  jmp    L222
L289:
  add    $0x2,%r13d
L22:
  sub    $0x2,%r14d
  jmp    L599
  nopl   (%rax)
L96:
  mov    %esi,%eax
  add    $0x1,%r14d
  mov    %r12d,%esi
  mov    $0x2,%edx
  mov    %ecx,%r12d
  mov    %ebx,%ecx
  mov    %eax,%ebx
  jmp    L463
L435:
  mov    %r13d,%ecx
  mov    0x14(%rsp),%edx
  mov    $0x2,%eax
  add    $0x1,%ecx
L51:
  mov    0x10(%rsp),%esi
  add    %ecx,%eax
  add    %eax,%edx
  test   %esi,%esi
  je     L134
L278:
  cmpl   $0x1,0x10(%rsp)
  je     L189
L198:
  subl   $0x2,0x10(%rsp)
  mov    0x10(%rsp),%edi
  mov    %edi,%eax
  add    $0x1,%eax
  jne    L83
L245:
  add    $0x2,%edx
  jmp    L198
L542:
  mov    0x14(%rsp),%edx
  mov    %r13d,%ecx
  jmp    L51
L424:
  mov    0x4(%rsp),%ecx
L627:
  add    %ecx,%eax
  add    %eax,(%rsp)
  mov    0x8(%rsp),%eax
  test   %eax,%eax
  je     L343
  cmpl   $0x1,0x8(%rsp)
  je     L336
L536:
  subl   $0x2,0x8(%rsp)
  mov    0x8(%rsp),%edi
  mov    %edi,%eax
  add    $0x1,%eax
  jne    L140
L279:
  addl   $0x2,(%rsp)
  jmp    L536
  nopl   0x0(%rax)
L617:
  mov    0xc(%rsp),%eax
  add    $0x1,%edx
  mov    $0x2,%esi
  add    %edx,%esi
  add    %esi,0x4(%rsp)
  test   %eax,%eax
  jne    L106
L341:
  mov    0x4(%rsp),%ecx
  mov    $0x2,%eax
  jmp    L627
L132:
  mov    0x4(%rsp),%ecx
  mov    $0x2,%eax
  add    $0x1,%ecx
  jmp    L627
L336:
  mov    (%rsp),%r8d
  lea    0x1(%r8),%eax
L491:
  add    $0x38,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L396:
  mov    (%rsp),%r8d
  add    $0x38,%rsp
  pop    %rbx
  pop    %rbp
  lea    0x3(%r8),%eax
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L150:
  mov    $0x2,%eax
  ret
L59:
  ret
L343:
  mov    (%rsp),%r8d
  lea    0x2(%r8),%eax
  jmp    L491
```

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