user: 下面的汇编指令对应的C源代码是什么：

```asm
<BtFLZH_EncBalanceTree_r>:
  endbr64
  xor    %eax,%eax
  test   %edx,%edx
  js     L67
  push   %r15
  add    %edx,%edx
  push   %r14
  push   %r13
  mov    %ecx,%r13d
  lea    0x1(%rcx),%ecx
  push   %r12
  mov    %rsi,%r12
  push   %rbp
  mov    %rdi,%rbp
  push   %rbx
  movslq %edx,%rbx
  lea    (%rdi,%rbx,2),%r9
  lea    0x2(%rbp,%rbx,2),%r15
  sub    $0x18,%rsp
  movswl (%r9),%edx
  mov    %r9,0x8(%rsp)
  mov    %r8d,(%rsp)
  mov    %ecx,0x4(%rsp)
  call   <BtFLZH_EncBalanceTree_r>
  movswl (%r15),%edx
  mov    (%rsp),%r8d
  mov    %r12,%rsi
  mov    0x4(%rsp),%ecx
  mov    %rbp,%rdi
  mov    %eax,%r14d
  call   <BtFLZH_EncBalanceTree_r>
  mov    (%rsp),%r8d
  cmp    %eax,%r14d
  mov    %eax,%edx
  mov    %eax,%ecx
  cmovge %r14d,%edx
  add    %r12,%rbx
  lea    0x1(%rdx),%eax
  add    %eax,%r13d
  mov    %ax,(%rbx)
  cmp    %r8d,%r13d
  jle    L85
  lea    0x1(%r14),%edx
  mov    0x8(%rsp),%r9
  cmp    %ecx,%edx
  jl     L15
  add    $0x1,%ecx
  cmp    %r14d,%ecx
  jge    L85
  movswl (%r9),%edx
  lea    (%rdx,%rdx,1),%eax
  mov    %edx,%edi
  cltq
  lea    0x0(%rbp,%rax,2),%rcx
  lea    0x2(%rbp,%rax,2),%rax
  movzwl (%rax),%r8d
  movzwl (%rcx),%esi
  mov    %r8w,(%rcx)
  movzwl (%r15),%r8d
  mov    %r8w,(%rax)
L25:
  mov    %si,(%r9)
  mov    %di,(%r15)
  movswq (%rcx),%rsi
  movswq (%rax),%rcx
  xor    %eax,%eax
  test   %si,%si
  js     L21
  movswl (%r12,%rsi,2),%eax
L21:
  xor    %esi,%esi
  test   %cx,%cx
  js     L19
  movswl (%r12,%rcx,2),%esi
L19:
  cmp    %esi,%eax
  movslq %edx,%rdx
  cmovl  %esi,%eax
  add    $0x1,%eax
  mov    %ax,(%r12,%rdx,2)
  movswq (%r9),%rcx
  xor    %eax,%eax
  movswq (%r15),%rdx
  test   %cx,%cx
  js     L70
  movswl (%r12,%rcx,2),%eax
L70:
  xor    %ecx,%ecx
  test   %dx,%dx
  js     L65
  movswl (%r12,%rdx,2),%ecx
L65:
  cmp    %ecx,%eax
  cmovl  %ecx,%eax
  add    $0x1,%eax
  mov    %ax,(%rbx)
L85:
  add    $0x18,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax)
L67:
  ret
  nopl   0x0(%rax)
L15:
  movswl (%r15),%edx
  lea    (%rdx,%rdx,1),%ecx
  mov    %edx,%esi
  movslq %ecx,%rcx
  lea    0x2(%rbp,%rcx,2),%rax
  lea    0x0(%rbp,%rcx,2),%rcx
  movzwl (%rcx),%r8d
  movzwl (%rax),%edi
  mov    %r8w,(%rax)
  movzwl (%r9),%r8d
  mov    %r8w,(%rcx)
  jmp    L25
```

assistant: ```c
int BtFLZH_EncBalanceTree_r(short *nodes, short *nlen, int root, int h, int ml) {
  int h0, h1, h2, h3;
  int l0, l1, l2;
  if (root < 0) {
    return (0);
  }
  h1 = BtFLZH_EncBalanceTree_r(nodes, nlen, nodes[root * 2 + 0], h + 1, ml);
  h2 = BtFLZH_EncBalanceTree_r(nodes, nlen, nodes[root * 2 + 1], h + 1, ml);
  h0 = ((h1 > h2) ? h1 : h2) + 1;
  nlen[root] = h0;
  if ((h + h0) <= ml) {
    return (h0);
  }
  if ((h1 + 1) < h2) {
    l0 = nodes[root * 2 + 1];
    l1 = nodes[l0 * 2 + 1];
    nodes[l0 * 2 + 1] = nodes[l0 * 2 + 0];
    nodes[l0 * 2 + 0] = nodes[root * 2 + 0];
    nodes[root * 2 + 0] = l0;
    nodes[root * 2 + 1] = l1;
  } else if ((h2 + 1) < h1) {
    l0 = nodes[root * 2 + 0];
    l1 = nodes[l0 * 2 + 0];
    nodes[l0 * 2 + 0] = nodes[l0 * 2 + 1];
    nodes[l0 * 2 + 1] = nodes[root * 2 + 1];
    nodes[root * 2 + 0] = l1;
    nodes[root * 2 + 1] = l0;
  } else {
    return (h0);
  }
  l1 = nodes[l0 * 2 + 0];
  l2 = nodes[l0 * 2 + 1];
  h1 = (l1 < 0) ? 0 : nlen[l1];
  h2 = (l2 < 0) ? 0 : nlen[l2];
  h3 = ((h1 > h2) ? h1 : h2) + 1;
  nlen[l0] = h3;
  l1 = nodes[root * 2 + 0];
  l2 = nodes[root * 2 + 1];
  h1 = (l1 < 0) ? 0 : nlen[l1];
  h2 = (l2 < 0) ? 0 : nlen[l2];
  h0 = ((h1 > h2) ? h1 : h2) + 1;
  nlen[root] = h0;
  return (h0);
}
```