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

```asm
<hanoi>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x98,%rsp
  mov    %rsi,(%rsp)
  mov    %rcx,0x20(%rsp)
  cmp    $0x1,%edi
  je     L27
  mov    %edi,%eax
  mov    %rdx,%rbx
  cmp    $0x2,%edi
  je     L140
  sub    $0x2,%eax
  mov    %rdx,0x28(%rsp)
  cmp    $0x1,%eax
  je     L96
L71:
  mov    0x20(%rsp),%rcx
  sub    $0x1,%eax
  mov    %eax,0x68(%rsp)
  mov    %rcx,0x18(%rsp)
  mov    (%rsp),%rcx
  mov    %rcx,0x48(%rsp)
  cmp    $0x1,%eax
  je     L134
L112:
  mov    0x28(%rsp),%rbx
  mov    0x48(%rsp),%rcx
  sub    $0x1,%eax
  mov    %eax,0x6c(%rsp)
  mov    %rcx,0x40(%rsp)
  mov    %rbx,0x30(%rsp)
  cmp    $0x1,%eax
  je     L141
L79:
  mov    0x18(%rsp),%rbx
  mov    0x40(%rsp),%rcx
  sub    $0x1,%eax
  mov    %eax,0x88(%rsp)
  mov    %rcx,0x50(%rsp)
  mov    %rbx,%r15
  cmp    $0x1,%eax
  je     L108
L34:
  mov    0x50(%rsp),%r14
  sub    $0x1,%eax
  mov    0x30(%rsp),%r13
  mov    %r15,0x8(%rsp)
  mov    %eax,%ebx
  mov    %eax,0x64(%rsp)
  mov    %r14,%r15
  mov    %r13,%r14
  cmp    $0x1,%ebx
  je     L60
L95:
  lea    -0x1(%rbx),%eax
  mov    %r15,0x38(%rsp)
  mov    0x8(%rsp),%rbp
  mov    %r15,%r13
  mov    %eax,0x58(%rsp)
  mov    %eax,%ebx
  mov    %r14,0x10(%rsp)
L77:
  cmp    $0x1,%ebx
  je     L62
  lea    -0x1(%rbx),%eax
  mov    %r13,0x70(%rsp)
  mov    0x10(%rsp),%r12
  mov    %r13,%r15
  mov    %eax,0x60(%rsp)
  mov    %eax,0x5c(%rsp)
  mov    0x5c(%rsp),%eax
  cmp    $0x1,%eax
  je     L18
L31:
  mov    %rbp,0x78(%rsp)
  mov    %r15,%r14
  mov    %eax,%r13d
  mov    %r15,0x80(%rsp)
  mov    %rbp,%r15
L66:
  mov    %r12,%rbp
  mov    %r14,%rbx
  mov    %r13d,%r9d
L157:
  sub    $0x1,%r9d
  mov    %rbp,%rcx
  mov    %r15,%rdx
  mov    %rbx,%rsi
  mov    %r9d,%edi
  mov    %r9d,0x8c(%rsp)
  call   <hanoi>
  mov    %r15,%rsi
  mov    %rbx,%rdi
  call   <move@plt>
  mov    0x8c(%rsp),%r9d
  cmp    $0x1,%r9d
  je     L142
  mov    %rbx,%rax
  mov    %rbp,%rbx
  mov    %rax,%rbp
  jmp    L157
L62:
  mov    0x10(%rsp),%r14
  mov    %r13,%rdi
  mov    0x38(%rsp),%r15
  mov    %r14,%rsi
  call   <move@plt>
  mov    %rbp,%rsi
  mov    %r13,%rdi
  call   <move@plt>
  mov    %r14,%rdi
  mov    %rbp,%rsi
  call   <move@plt>
  mov    %r14,%rsi
  mov    %r13,%rdi
  call   <move@plt>
  mov    %r13,%rsi
  mov    %rbp,%rdi
  call   <move@plt>
  mov    %r14,%rsi
  mov    %rbp,%rdi
  call   <move@plt>
  mov    %r14,%rsi
  mov    %r13,%rdi
  call   <move@plt>
  mov    0x8(%rsp),%rsi
  mov    %r15,%rdi
  call   <move@plt>
  mov    0x58(%rsp),%ebx
  mov    %r15,%rax
  mov    %r14,%r15
  mov    %rax,%r14
  cmp    $0x1,%ebx
  jne    L95
L60:
  mov    %r14,%r13
  mov    %r15,%r14
  mov    0x8(%rsp),%r15
  mov    %r14,%rdi
  mov    %r15,%rsi
  call   <move@plt>
  mov    %r13,%rsi
  mov    %r14,%rdi
  call   <move@plt>
  mov    %r15,%rdi
  mov    %r13,%rsi
  call   <move@plt>
  mov    %r15,%rsi
  mov    %r14,%rdi
  call   <move@plt>
  mov    %r14,%rsi
  mov    %r13,%rdi
  call   <move@plt>
  mov    %r15,%rsi
  mov    %r13,%rdi
  call   <move@plt>
  mov    %r15,%rsi
  mov    %r14,%rdi
  call   <move@plt>
  mov    0x50(%rsp),%rbx
  mov    0x30(%rsp),%rsi
  mov    %rbx,%rdi
  call   <move@plt>
  mov    0x64(%rsp),%eax
  mov    %r15,0x50(%rsp)
  mov    %rbx,%r15
  cmp    $0x1,%eax
  jne    L34
L108:
  mov    0x50(%rsp),%rbp
  mov    %r15,%rbx
  mov    0x30(%rsp),%r15
  mov    %rbp,%rdi
  mov    %r15,%rsi
  call   <move@plt>
  mov    %rbx,%rsi
  mov    %rbp,%rdi
  call   <move@plt>
  mov    %rbx,%rsi
  mov    %r15,%rdi
  call   <move@plt>
  mov    %r15,%rsi
  mov    %rbp,%rdi
  call   <move@plt>
  mov    %rbx,%rdi
  mov    %rbp,%rsi
  call   <move@plt>
  mov    %r15,%rsi
  mov    %rbx,%rdi
  mov    %r15,%rbx
  call   <move@plt>
  mov    %r15,%rsi
  mov    %rbp,%rdi
  call   <move@plt>
  mov    0x40(%rsp),%r15
  mov    0x18(%rsp),%rsi
  mov    %r15,%rdi
  call   <move@plt>
  mov    0x88(%rsp),%eax
  mov    %rbx,0x40(%rsp)
  mov    %r15,0x30(%rsp)
  cmp    $0x1,%eax
  jne    L79
L141:
  mov    0x18(%rsp),%r15
  mov    0x40(%rsp),%rbp
  mov    0x30(%rsp),%rbx
  mov    %r15,%rsi
  mov    %rbp,%rdi
  call   <move@plt>
  mov    %rbx,%rsi
  mov    %rbp,%rdi
  call   <move@plt>
  mov    %rbx,%rsi
  mov    %r15,%rdi
  call   <move@plt>
  mov    %r15,%rsi
  mov    %rbp,%rdi
  call   <move@plt>
  mov    %rbp,%rsi
  mov    %rbx,%rdi
  call   <move@plt>
  mov    %r15,%rsi
  mov    %rbx,%rdi
  call   <move@plt>
  mov    %r15,%rsi
  mov    %rbp,%rdi
  call   <move@plt>
  mov    0x48(%rsp),%r14
  mov    0x28(%rsp),%rsi
  mov    %r14,%rdi
  call   <move@plt>
  mov    0x6c(%rsp),%eax
  mov    %r15,0x48(%rsp)
  mov    %r14,0x18(%rsp)
  cmp    $0x1,%eax
  jne    L112
L134:
  mov    0x28(%rsp),%rbx
  mov    0x48(%rsp),%r15
  mov    %rbx,%rsi
  mov    %r15,%rdi
  call   <move@plt>
  mov    0x18(%rsp),%r14
  mov    %r15,%rdi
  mov    %r14,%rsi
  call   <move@plt>
  mov    %r14,%rsi
  mov    %rbx,%rdi
  call   <move@plt>
  mov    %r15,%rdi
  mov    %rbx,%rsi
  call   <move@plt>
  mov    %r15,%rsi
  mov    %r14,%rdi
  call   <move@plt>
  mov    %rbx,%rsi
  mov    %r14,%rdi
  call   <move@plt>
  mov    %r15,%rdi
  mov    %rbx,%rsi
  call   <move@plt>
  mov    (%rsp),%r15
  mov    0x20(%rsp),%rsi
  mov    %r15,%rdi
  call   <move@plt>
  mov    0x68(%rsp),%eax
  mov    %rbx,(%rsp)
  mov    %r15,0x28(%rsp)
  cmp    $0x1,%eax
  jne    L71
L96:
  mov    (%rsp),%r14
  mov    0x20(%rsp),%r15
  mov    0x28(%rsp),%rbx
  mov    %r15,%rsi
  mov    %r14,%rdi
  call   <move@plt>
  mov    %rbx,%rsi
  mov    %r14,%rdi
  call   <move@plt>
  mov    %rbx,%rsi
  mov    %r15,%rdi
  call   <move@plt>
  mov    %r15,%rsi
  mov    %r14,%rdi
  call   <move@plt>
  mov    %rbx,(%rsp)
  mov    %r14,%rbx
L140:
  mov    (%rsp),%r15
  mov    %rbx,%rsi
  mov    %r15,%rdi
  call   <move@plt>
  mov    0x20(%rsp),%rsi
  mov    %r15,%rdi
  call   <move@plt>
  mov    %rbx,(%rsp)
L27:
  mov    0x20(%rsp),%rsi
  mov    (%rsp),%rdi
  add    $0x98,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  jmp    1050 <move@plt>
L142:
  mov    %r15,%rsi
  mov    %rbp,%rdi
  sub    $0x1,%r13d
  call   <move@plt>
  mov    %r12,%rsi
  mov    %r14,%rdi
  call   <move@plt>
  cmp    $0x1,%r13d
  je     L163
  mov    %r14,%rax
  mov    %r15,%r14
  mov    %rax,%r15
  jmp    L66
  xchg   %ax,%ax
L163:
  mov    %r15,%r13
  mov    %r14,%rsi
  mov    0x78(%rsp),%rbp
  mov    0x80(%rsp),%r15
  mov    %r13,%rdi
  call   <move@plt>
  mov    %r12,%rsi
  mov    %r13,%rdi
  call   <move@plt>
  mov    %r12,%rsi
  mov    %r14,%rdi
  call   <move@plt>
  mov    %r15,%rdi
  mov    %rbp,%rsi
  call   <move@plt>
  mov    %r15,%rax
  subl   $0x1,0x5c(%rsp)
  mov    %r12,%r15
  mov    %rax,%r12
  mov    0x5c(%rsp),%eax
  cmp    $0x1,%eax
  jne    L31
L18:
  mov    %rbp,%rsi
  mov    %r15,%rdi
  mov    0x70(%rsp),%r13
  call   <move@plt>
  mov    %r12,%rsi
  mov    %r15,%rdi
  call   <move@plt>
  mov    %rbp,%rdi
  mov    %r12,%rsi
  call   <move@plt>
  mov    %rbp,%rsi
  mov    %r15,%rdi
  call   <move@plt>
  mov    %r15,%rsi
  mov    %r12,%rdi
  call   <move@plt>
  mov    %rbp,%rsi
  mov    %r12,%rdi
  call   <move@plt>
  mov    %rbp,%rsi
  mov    %r15,%rdi
  call   <move@plt>
  mov    0x10(%rsp),%rsi
  mov    %r13,%rdi
  call   <move@plt>
  mov    %r13,%rax
  mov    0x60(%rsp),%ebx
  mov    %rbp,%r13
  mov    %rax,%rbp
  jmp    L77
```

assistant: ```c
void hanoi(int n, struct stack *from, struct stack *mid, struct stack *to) {
  if (n == 1) {
    move(from, to);
  } else {
    hanoi(n - 1, from, to, mid);
    move(from, to);
    hanoi(n - 1, mid, from, to);
  }
}
```