user: 请将以下的汇编代码转换成C语言代码：

```asm
<init_tap>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0xe8,%rsp
  mov    %edi,0x24(%rsp)
  mov    %esi,0x64(%rsp)
  mov    %edx,0x88(%rsp)
  mov    %rcx,0x18(%rsp)
  cmp    $0x1,%edx
  je     L27
L155:
  mov    0x88(%rsp),%ecx
  mov    0x64(%rsp),%edx
  mov    %ecx,%eax
  lea    (%rdx,%rdx,1),%edi
  shr    $0x1f,%eax
  mov    %edi,0x90(%rsp)
  add    %ecx,%eax
  sar    %eax
  mov    %eax,0xa4(%rsp)
  mov    %eax,0x88(%rsp)
  cmp    $0x1,%eax
  je     L100
  mov    %edi,0x58(%rsp)
  mov    0x24(%rsp),%edx
  mov    0x18(%rsp),%rdi
  mov    %eax,0x78(%rsp)
  mov    %edx,0x74(%rsp)
  mov    %rdi,0x50(%rsp)
L75:
  mov    0x78(%rsp),%edi
  mov    0x58(%rsp),%esi
  mov    %edi,%eax
  add    %esi,%esi
  shr    $0x1f,%eax
  mov    %esi,0x94(%rsp)
  add    %edi,%eax
  sar    %eax
  mov    %eax,0xa8(%rsp)
  mov    %eax,0x78(%rsp)
  cmp    $0x1,%eax
  je     L51
  mov    0x50(%rsp),%rdi
  mov    0x74(%rsp),%edx
  mov    %esi,0x5c(%rsp)
  mov    %eax,0x7c(%rsp)
  mov    %rdi,0x38(%rsp)
  mov    %edx,0x70(%rsp)
L160:
  mov    0x7c(%rsp),%esi
  mov    0x5c(%rsp),%ecx
  mov    %esi,%eax
  add    %ecx,%ecx
  shr    $0x1f,%eax
  mov    %ecx,0x98(%rsp)
  add    %esi,%eax
  sar    %eax
  mov    %eax,0xac(%rsp)
  mov    %eax,0x7c(%rsp)
  cmp    $0x1,%eax
  je     L2
  mov    0x38(%rsp),%rsi
  mov    0x70(%rsp),%edi
  mov    %ecx,0x60(%rsp)
  mov    %eax,0x80(%rsp)
  mov    %rsi,0x48(%rsp)
  mov    %edi,0x6c(%rsp)
L110:
  mov    0x80(%rsp),%ecx
  mov    %ecx,%eax
  shr    $0x1f,%eax
  add    %ecx,%eax
  mov    %eax,%r10d
  mov    0x60(%rsp),%eax
  sar    %r10d
  add    %eax,%eax
  mov    %r10d,0xb0(%rsp)
  mov    %r10d,0x80(%rsp)
  mov    %eax,0x9c(%rsp)
  cmp    $0x1,%r10d
  je     L144
  mov    %eax,(%rsp)
  mov    0x48(%rsp),%r11
  mov    0x6c(%rsp),%eax
  mov    %r11,0x8(%rsp)
  mov    %eax,0x10(%rsp)
L13:
  mov    %r10d,%eax
  shr    $0x1f,%eax
  add    %r10d,%eax
  sar    %eax
  mov    %eax,0x20(%rsp)
  mov    %eax,%r10d
  mov    (%rsp),%eax
  lea    (%rax,%rax,1),%r11d
  mov    %r11d,0x14(%rsp)
  cmp    $0x1,%r10d
  je     L23
  mov    0x8(%rsp),%r9
  mov    0x10(%rsp),%r15d
  mov    %r10d,%r8d
  mov    %r11d,%eax
  mov    %r10d,0x28(%rsp)
  mov    %r9,%r11
  mov    %r15d,%r10d
  mov    %r8d,%r9d
  mov    %eax,%r8d
L37:
  mov    %r9d,%eax
  shr    $0x1f,%eax
  add    %r9d,%eax
  sar    %eax
  mov    %eax,0x68(%rsp)
  mov    %eax,%r9d
  lea    (%r8,%r8,1),%eax
  mov    %eax,0x40(%rsp)
  cmp    $0x1,%r9d
  je     L19
  mov    %r9d,0x44(%rsp)
  mov    %r11,%r15
  mov    %r9d,0x2c(%rsp)
  mov    %eax,0x4(%rsp)
  mov    %r10d,%eax
  mov    %r11,0x30(%rsp)
  mov    %r10d,%r11d
  mov    %r8d,%r10d
L49:
  mov    0x44(%rsp),%edi
  mov    %edi,%edx
  shr    $0x1f,%edx
  add    %edi,%edx
  mov    %edx,%ebx
  mov    0x4(%rsp),%edx
  sar    %ebx
  lea    (%rdx,%rdx,1),%r13d
  mov    %ebx,0x8c(%rsp)
  mov    %ebx,0x44(%rsp)
  mov    %r13d,0x84(%rsp)
  cmp    $0x1,%ebx
  je     L169
  mov    %r15,%r12
  mov    %eax,%r9d
  mov    %r11d,%r15d
  mov    %r10d,%r11d
  mov    %r12,%r8
  mov    %r12,%r10
L141:
  mov    %ebx,%ebp
  lea    0x0(%r13,%r13,1),%r12d
  shr    $0x1f,%ebp
  add    %ebx,%ebp
  sar    %ebp
  mov    %ebp,%ebx
  cmp    $0x1,%ebp
  je     L88
  mov    %r12d,%esi
  mov    %r8,%rcx
  mov    %r9d,%edi
  mov    %ebp,%r14d
L22:
  mov    %r14d,%edx
  mov    %esi,0xa0(%rsp)
  add    %esi,%esi
  shr    $0x1f,%edx
  mov    %r8,0xd8(%rsp)
  add    %r14d,%edx
  mov    %r9d,0xd4(%rsp)
  sar    %edx
  mov    %r10,0xc8(%rsp)
  mov    %edx,%r14d
  mov    %eax,0xd0(%rsp)
  mov    %r11d,0xc4(%rsp)
  mov    %rcx,0xb8(%rsp)
  mov    %esi,0xc0(%rsp)
  mov    %edi,0xb4(%rsp)
  call   <init_tap>
  mov    0xb8(%rsp),%rcx
  movslq %r14d,%rdx
  mov    0xb4(%rsp),%edi
  add    0xa0(%rsp),%edi
  cmp    $0x1,%r14d
  mov    0xc0(%rsp),%esi
  mov    0xc4(%rsp),%r11d
  mov    0xd0(%rsp),%eax
  lea    (%rcx,%rdx,4),%rcx
  mov    0xc8(%rsp),%r10
  mov    0xd4(%rsp),%r9d
  mov    0xd8(%rsp),%r8
  jne    L22
  movslq %ebp,%rbp
  add    %r13d,%r9d
  mov    %edi,(%rcx)
  mov    %r12d,%r13d
  lea    (%r8,%rbp,4),%r8
  jmp    L141
L19:
  mov    %r10d,%r15d
  mov    0x8(%rsp),%rsi
  mov    (%rsp),%edx
  lea    (%r15,%r8,1),%eax
  add    %edx,0x10(%rsp)
  mov    0x28(%rsp),%r10d
  mov    %eax,0x4(%r11)
  movslq 0x20(%rsp),%rax
  mov    %r15d,(%r11)
  lea    (%rsi,%rax,4),%rax
  mov    %rax,0x8(%rsp)
  mov    0x14(%rsp),%eax
  mov    %eax,(%rsp)
  jmp    L13
  nopl   (%rax)
L169:
  mov    %eax,(%r15)
  add    0x4(%rsp),%eax
  mov    %r10d,%r8d
  mov    %r11d,%r10d
  mov    %eax,0x4(%r15)
  mov    0x30(%rsp),%r11
  add    %r8d,%r10d
  movslq 0x68(%rsp),%rax
  mov    0x2c(%rsp),%r9d
  mov    0x40(%rsp),%r8d
  lea    (%r11,%rax,4),%r11
  jmp    L37
  nopl   0x0(%rax)
L88:
  movslq 0x8c(%rsp),%rdx
  mov    0x84(%rsp),%edi
  mov    %r10,%rcx
  mov    %r9d,(%r8)
  add    %r13d,%r9d
  mov    %r11d,%r10d
  add    0x4(%rsp),%eax
  mov    %r15d,%r11d
  mov    %r9d,0x4(%r8)
  lea    (%rcx,%rdx,4),%r15
  mov    %edi,0x4(%rsp)
  jmp    L49
L23:
  mov    0x8(%rsp),%r11
  mov    0x10(%rsp),%eax
  mov    0x48(%rsp),%rcx
  mov    0x60(%rsp),%esi
  mov    %eax,(%r11)
  add    (%rsp),%eax
  mov    %eax,0x4(%r11)
  movslq 0xb0(%rsp),%rax
  add    %esi,0x6c(%rsp)
  lea    (%rcx,%rax,4),%rax
  mov    %rax,0x48(%rsp)
  mov    0x9c(%rsp),%eax
  mov    %eax,0x60(%rsp)
  jmp    L110
L144:
  mov    0x48(%rsp),%rcx
  mov    0x6c(%rsp),%eax
  mov    0x38(%rsp),%rbx
  mov    0x5c(%rsp),%edx
  mov    %eax,(%rcx)
  add    0x60(%rsp),%eax
  mov    %eax,0x4(%rcx)
  movslq 0xac(%rsp),%rax
  add    %edx,0x70(%rsp)
  lea    (%rbx,%rax,4),%rax
  mov    %rax,0x38(%rsp)
  mov    0x98(%rsp),%eax
  mov    %eax,0x5c(%rsp)
  jmp    L160
L2:
  mov    0x38(%rsp),%rsi
  mov    0x70(%rsp),%eax
  mov    0x58(%rsp),%edi
  add    %edi,0x74(%rsp)
  mov    %eax,(%rsi)
  add    0x5c(%rsp),%eax
  mov    %eax,0x4(%rsi)
  mov    0x50(%rsp),%rsi
  movslq 0xa8(%rsp),%rax
  lea    (%rsi,%rax,4),%rax
  mov    %rax,0x50(%rsp)
  mov    0x94(%rsp),%eax
  mov    %eax,0x58(%rsp)
  jmp    L75
L51:
  mov    0x50(%rsp),%rdi
  mov    0x74(%rsp),%eax
  mov    0x18(%rsp),%rbx
  mov    0x64(%rsp),%ecx
  mov    %eax,(%rdi)
  add    0x58(%rsp),%eax
  mov    %eax,0x4(%rdi)
  movslq 0xa4(%rsp),%rax
  add    %ecx,0x24(%rsp)
  lea    (%rbx,%rax,4),%rax
  mov    %rax,0x18(%rsp)
  mov    0x90(%rsp),%eax
  mov    %eax,0x64(%rsp)
  jmp    L155
L100:
  mov    0x18(%rsp),%rax
  mov    0x24(%rsp),%esi
  add    $0x4,%rax
  mov    %esi,-0x4(%rax)
  mov    %rax,0x18(%rsp)
  mov    0x64(%rsp),%eax
  add    %eax,%esi
  mov    %esi,0x24(%rsp)
L27:
  mov    0x18(%rsp),%rax
  mov    0x24(%rsp),%edx
  mov    %edx,(%rax)
  add    $0xe8,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
```

assistant: ```c
void init_tap(int a, int d, int n, int *x) {
  if (n == 1)
    *x = a;
  else {
    init_tap(a, d * 2, n / 2, x);
    init_tap(a + d, d * 2, n / 2, x + n / 2);
  }
}
```