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

```asm
<queens_arrangements_aux>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x118,%rsp
  movq   $0x1,(%rsp)
  cmp    %rdx,%rdi
  je     L15
  movq   $0x0,(%rsp)
  mov    %rdi,%r12
  test   %rdi,%rdi
  je     L15
  mov    %rdi,%rax
  mov    %rsi,%r13
  mov    %rdx,%r14
  xor    %r15d,%r15d
  imul   %rdx,%rax
  mov    %r14,0x88(%rsp)
  lea    (%rsi,%rax,4),%rax
  mov    %rax,0x10(%rsp)
  lea    0x1(%rdx),%rax
  mov    %rax,0x18(%rsp)
  imul   %rdi,%rax
  lea    (%rsi,%rax,4),%rcx
  add    %rdi,%rax
  lea    (%rsi,%rax,4),%rdi
  add    %r12,%rax
  lea    0x3(%rdx),%rsi
  mov    %rcx,0x20(%rsp)
  lea    0x2(%rdx),%rcx
  lea    0x0(%r13,%rax,4),%rdx
  add    %r12,%rax
  mov    %rdi,0x38(%rsp)
  lea    0x0(%r13,%rax,4),%rdi
  add    %r12,%rax
  mov    %rdx,0x50(%rsp)
  lea    0x0(%r13,%rax,4),%rdx
  add    %r12,%rax
  mov    %rcx,0x30(%rsp)
  lea    0x4(%r14),%rcx
  mov    %rdi,0x68(%rsp)
  lea    0x0(%r13,%rax,4),%rdi
  add    %r12,%rax
  mov    %rsi,0x48(%rsp)
  lea    0x5(%r14),%rsi
  mov    %rcx,0x60(%rsp)
  lea    0x6(%r14),%rcx
  mov    %rdx,0x78(%rsp)
  lea    0x0(%r13,%rax,4),%rdx
  add    %r12,%rax
  lea    0x0(%r13,%rax,4),%rax
  mov    %rsi,0x70(%rsp)
  lea    0x7(%r14),%rsi
  mov    %rcx,0x90(%rsp)
  lea    0x8(%r14),%rcx
  mov    %rax,0xb0(%rsp)
  lea    0x9(%r14),%rax
  mov    %r13,%r14
  mov    %rdi,0x98(%rsp)
  mov    %rsi,0xa0(%rsp)
  mov    %rdx,0xa8(%rsp)
  mov    %rcx,0xd0(%rsp)
  mov    %rax,0xd8(%rsp)
  mov    %r12,%rax
  mov    %r15,%r12
  mov    %rax,%r15
L127:
  mov    0x10(%rsp),%rax
  mov    (%rax,%r12,4),%r11d
  test   %r11d,%r11d
  je     L294
L140:
  add    $0x1,%r12
  cmp    %r12,%r15
  jne    L127
L15:
  mov    (%rsp),%rax
  add    $0x118,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax)
L294:
  mov    0x88(%rsp),%rdx
  mov    %r12,%rcx
  mov    %r14,%rsi
  mov    %r15,%rdi
  call   <place_queen@plt>
  movq   $0x1,0x8(%rsp)
  cmp    %r15,0x18(%rsp)
  je     L230
  movq   $0x0,0x8(%rsp)
  xor    %r13d,%r13d
  mov    %r14,%rax
  mov    %r15,%r14
  mov    %r12,0xc0(%rsp)
  mov    %r13,%r15
  mov    %rax,%r13
L226:
  mov    0x20(%rsp),%rax
  mov    (%rax,%r15,4),%r10d
  test   %r10d,%r10d
  je     L7
L356:
  add    $0x1,%r15
  cmp    %r15,%r14
  jne    L226
  mov    0xc0(%rsp),%r12
  mov    %r14,%r15
  mov    %r13,%r14
L230:
  mov    0x88(%rsp),%rdx
  mov    0x8(%rsp),%rcx
  mov    %r14,%rsi
  mov    %r15,%rdi
  add    %rcx,(%rsp)
  mov    %r12,%rcx
  call   <remove_queen@plt>
  jmp    L140
  nopw   0x0(%rax,%rax,1)
L7:
  mov    0x18(%rsp),%rdx
  mov    %r15,%rcx
  mov    %r13,%rsi
  mov    %r14,%rdi
  call   <place_queen@plt>
  movq   $0x1,0x28(%rsp)
  cmp    0x30(%rsp),%r14
  je     L339
  movq   $0x0,0x28(%rsp)
  xor    %r12d,%r12d
  mov    %r15,0xc8(%rsp)
  mov    %r14,%r15
  mov    %r12,%r14
L93:
  mov    0x38(%rsp),%rax
  mov    (%rax,%r14,4),%r9d
  test   %r9d,%r9d
  je     L364
L144:
  add    $0x1,%r14
  cmp    %r14,%r15
  jne    L93
  mov    %r15,%r14
  mov    0xc8(%rsp),%r15
L339:
  mov    0x18(%rsp),%rdx
  mov    0x28(%rsp),%rcx
  mov    %r13,%rsi
  mov    %r14,%rdi
  add    %rcx,0x8(%rsp)
  mov    %r15,%rcx
  call   <remove_queen@plt>
  jmp    L356
  nopl   0x0(%rax)
L364:
  mov    0x30(%rsp),%rdx
  mov    %r14,%rcx
  mov    %r13,%rsi
  mov    %r15,%rdi
  call   <place_queen@plt>
  movq   $0x1,0x40(%rsp)
  cmp    0x48(%rsp),%r15
  je     L152
  movq   $0x0,0x40(%rsp)
  xor    %ebp,%ebp
  mov    %r14,0xe0(%rsp)
L222:
  mov    0x50(%rsp),%rax
  mov    (%rax,%rbp,4),%r8d
  test   %r8d,%r8d
  je     L311
L366:
  add    $0x1,%rbp
  cmp    %rbp,%r15
  jne    L222
  mov    0xe0(%rsp),%r14
L152:
  mov    0x40(%rsp),%rdx
  add    %rdx,0x28(%rsp)
  mov    %r14,%rcx
  mov    %r13,%rsi
  mov    0x30(%rsp),%rdx
  mov    %r15,%rdi
  call   <remove_queen@plt>
  jmp    L144
  nop
L311:
  mov    0x48(%rsp),%rdx
  mov    %rbp,%rcx
  mov    %r13,%rsi
  mov    %r15,%rdi
  call   <place_queen@plt>
  movq   $0x1,0x58(%rsp)
  cmp    0x60(%rsp),%r15
  je     L71
  movq   $0x0,0x58(%rsp)
  xor    %ebx,%ebx
  mov    %rbp,0xe8(%rsp)
L4:
  mov    0x68(%rsp),%rax
  mov    (%rax,%rbx,4),%edi
  test   %edi,%edi
  je     L291
L159:
  add    $0x1,%rbx
  cmp    %rbx,%r15
  ja     L4
  mov    0xe8(%rsp),%rbp
L71:
  mov    0x48(%rsp),%rdx
  mov    0x58(%rsp),%rsi
  mov    %rbp,%rcx
  mov    %r15,%rdi
  add    %rsi,0x40(%rsp)
  mov    %r13,%rsi
  call   <remove_queen@plt>
  jmp    L366
  nopl   (%rax)
L291:
  mov    0x60(%rsp),%rdx
  mov    %rbx,%rcx
  mov    %r13,%rsi
  mov    %r15,%rdi
  call   <place_queen@plt>
  movq   $0x1,0x80(%rsp)
  cmp    0x70(%rsp),%r15
  je     L293
  movq   $0x0,0x80(%rsp)
  xor    %ebp,%ebp
  mov    %rbx,0xf0(%rsp)
  mov    %r15,%rbx
  mov    %rbp,%r15
L160:
  mov    0x78(%rsp),%rax
  mov    (%rax,%r15,4),%esi
  test   %esi,%esi
  je     L23
L125:
  add    $0x1,%r15
  cmp    %r15,%rbx
  ja     L160
  mov    %rbx,%r15
  mov    0xf0(%rsp),%rbx
L293:
  mov    0x60(%rsp),%rdx
  mov    0x80(%rsp),%rdi
  mov    %rbx,%rcx
  mov    %r13,%rsi
  add    %rdi,0x58(%rsp)
  mov    %r15,%rdi
  call   <remove_queen@plt>
  jmp    L159
L23:
  mov    0x70(%rsp),%rdx
  mov    %r15,%rcx
  mov    %r13,%rsi
  mov    %rbx,%rdi
  mov    $0x1,%r12d
  call   <place_queen@plt>
  cmp    0x90(%rsp),%rbx
  je     L343
  xor    %r12d,%r12d
  xor    %ebp,%ebp
  mov    %r15,0xf8(%rsp)
  mov    %r12,0xb8(%rsp)
  mov    %rbp,%r15
L96:
  mov    0x98(%rsp),%rax
  mov    (%rax,%r15,4),%ecx
  test   %ecx,%ecx
  je     L30
L211:
  add    $0x1,%r15
  cmp    %r15,%rbx
  ja     L96
  mov    0xf8(%rsp),%r15
  mov    0xb8(%rsp),%r12
L343:
  mov    0x70(%rsp),%rdx
  mov    %r15,%rcx
  mov    %r13,%rsi
  mov    %rbx,%rdi
  add    %r12,0x80(%rsp)
  call   <remove_queen@plt>
  jmp    L125
  nopl   0x0(%rax)
L30:
  mov    %r15,%rcx
  mov    %r13,%rsi
  mov    %rbx,%rdi
  mov    $0x1,%r14d
  mov    0x90(%rsp),%rdx
  call   <place_queen@plt>
  cmp    0xa0(%rsp),%rbx
  je     L60
  xor    %ebp,%ebp
  mov    %r15,0x100(%rsp)
  xor    %r14d,%r14d
  mov    %rbx,%r15
  mov    %rbp,%r12
L347:
  mov    0xa8(%rsp),%rax
  mov    (%rax,%r12,4),%edx
  test   %edx,%edx
  je     L120
L174:
  add    $0x1,%r12
  cmp    %r12,%r15
  ja     L347
  mov    %r15,%rbx
  mov    0x100(%rsp),%r15
L60:
  mov    0x90(%rsp),%rdx
  mov    %r15,%rcx
  mov    %r13,%rsi
  mov    %rbx,%rdi
  add    %r14,0xb8(%rsp)
  call   <remove_queen@plt>
  jmp    L211
  nopl   0x0(%rax,%rax,1)
L120:
  mov    %r12,%rcx
  mov    %r13,%rsi
  mov    %r15,%rdi
  mov    $0x1,%ebx
  mov    0xa0(%rsp),%rdx
  call   <place_queen@plt>
  mov    0xd0(%rsp),%rax
  cmp    %rax,%r15
  je     L55
  xor    %ebx,%ebx
  xor    %ebp,%ebp
  mov    %r12,0x108(%rsp)
  mov    %rbx,%r12
  mov    %rax,%rbx
  mov    %r15,%rax
  mov    %rbp,%r15
  mov    %rax,%rbp
L217:
  mov    0xb0(%rsp),%rax
  mov    (%rax,%r15,4),%eax
  test   %eax,%eax
  je     L313
L65:
  add    $0x1,%r15
  cmp    %r15,%rbp
  ja     L217
  mov    %r12,%rbx
  mov    0x108(%rsp),%r12
  mov    %rbp,%r15
L55:
  mov    %r12,%rcx
  mov    %r13,%rsi
  mov    %r15,%rdi
  add    %rbx,%r14
  mov    0xa0(%rsp),%rdx
  call   <remove_queen@plt>
  jmp    L174
  nopl   0x0(%rax,%rax,1)
L313:
  mov    %r15,%rcx
  mov    %rbx,%rdx
  mov    %r13,%rsi
  mov    %rbp,%rdi
  call   <place_queen@plt>
  mov    0xd8(%rsp),%rdx
  mov    %r13,%rsi
  mov    %rbp,%rdi
  call   <queens_arrangements_aux>
  mov    %r15,%rcx
  mov    %rbx,%rdx
  mov    %r13,%rsi
  mov    %rbp,%rdi
  add    %rax,%r12
  call   <remove_queen@plt>
  jmp    L65
```

assistant: ```c
unsigned long long queens_arrangements_aux(size_t x, unsigned board[x][x], size_t curr_row) {
  if (curr_row == x) {
    return 1;
  }
  unsigned long long res = 0;
  size_t i;
  for (i = 0; i < x; i++) {
    if (board[curr_row][i] == 0) {
      place_queen(x, board, curr_row, i);
      res += queens_arrangements_aux(x, board, curr_row + 1);
      remove_queen(x, board, curr_row, i);
    }
  }
  return res;
}
```