user: 这段汇编代码用C语言表示是什么样的？

```asm
<heap_down>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x50,%rsp
  mov    %edi,-0x34(%rbp)
  mov    %rsi,-0x40(%rbp)
  mov    %edx,-0x38(%rbp)
  mov    %rcx,-0x48(%rbp)
  mov    %r8,-0x50(%rbp)
  mov    -0x34(%rbp),%eax
  add    %eax,%eax
  mov    %eax,-0x24(%rbp)
  mov    -0x34(%rbp),%eax
  cltq
  imul   -0x48(%rbp),%rax
  mov    %rax,%rdx
  mov    -0x40(%rbp),%rax
  add    %rdx,%rax
  mov    %rax,-0x20(%rbp)
  mov    -0x48(%rbp),%rax
  lea    D39(%rip),%rdx
  lea    D5(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <malloc_error@plt>
  mov    %rax,-0x10(%rbp)
  mov    -0x48(%rbp),%rdx
  mov    -0x20(%rbp),%rcx
  mov    -0x10(%rbp),%rax
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <memcpy@plt>
  jmp    L59
L6:
  mov    -0x24(%rbp),%eax
  cltq
  imul   -0x48(%rbp),%rax
  mov    %rax,%rdx
  mov    -0x40(%rbp),%rax
  add    %rdx,%rax
  mov    %rax,-0x18(%rbp)
  mov    -0x18(%rbp),%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  mov    %rax,-0x8(%rbp)
  mov    -0x8(%rbp),%rdx
  mov    -0x18(%rbp),%rax
  mov    -0x50(%rbp),%rcx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   *%rcx
  test   %eax,%eax
  jns    L44
  addl   $0x1,-0x24(%rbp)
  mov    -0x8(%rbp),%rax
  mov    %rax,-0x18(%rbp)
L44:
  mov    -0x18(%rbp),%rdx
  mov    -0x10(%rbp),%rax
  mov    -0x50(%rbp),%rcx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   *%rcx
  test   %eax,%eax
  jns    L62
  mov    -0x48(%rbp),%rdx
  mov    -0x18(%rbp),%rcx
  mov    -0x20(%rbp),%rax
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <memcpy@plt>
  shll   -0x24(%rbp)
  mov    -0x18(%rbp),%rax
  mov    %rax,-0x20(%rbp)
L59:
  mov    -0x24(%rbp),%eax
  cmp    -0x38(%rbp),%eax
  jl     L6
  jmp    L58
L62:
  nop
L58:
  mov    -0x24(%rbp),%eax
  cmp    -0x38(%rbp),%eax
  jne    L17
  mov    -0x24(%rbp),%eax
  cltq
  imul   -0x48(%rbp),%rax
  mov    %rax,%rdx
  mov    -0x40(%rbp),%rax
  add    %rdx,%rax
  mov    %rax,-0x18(%rbp)
  mov    -0x18(%rbp),%rdx
  mov    -0x10(%rbp),%rax
  mov    -0x50(%rbp),%rcx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   *%rcx
  test   %eax,%eax
  jns    L17
  mov    -0x48(%rbp),%rdx
  mov    -0x18(%rbp),%rcx
  mov    -0x20(%rbp),%rax
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <memcpy@plt>
  mov    -0x18(%rbp),%rax
  mov    %rax,-0x20(%rbp)
L17:
  mov    -0x48(%rbp),%rdx
  mov    -0x10(%rbp),%rcx
  mov    -0x20(%rbp),%rax
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <memcpy@plt>
  mov    -0x10(%rbp),%rax
  lea    D39(%rip),%rdx
  lea    D5(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <free_error@plt>
  nop
  leave
  ret
```

tool_calls: name: parse_data
arguments: tag: D39
data_type: string
name: parse_data
arguments: tag: D5
data_type: string

tool: D39: heap_down()

tool: D5: elt

assistant: ```c
void heap_down(int position, void *heap, int count, size_t size, int (*compar)(const void *elt1, const void *elt2)) {
  void *elt;
  int child_idx = position * 2;
  void *parent;
  void *child_1;
  void *child_2;
  parent = (char *)heap + position * size;
  elt = malloc_error(size, "elt", "heap_down()");
  memcpy(elt, parent, size);
  while (child_idx < count) {
    child_1 = (char *)heap + child_idx * size;
    child_2 = (char *)child_1 + size;
    if ((*compar)(child_1, child_2) < 0) {
      ++child_idx;
      child_1 = child_2;
    }
    if ((*compar)(elt, child_1) < 0) {
      memcpy(parent, child_1, size);
      child_idx *= 2;
      parent = child_1;
    } else
      break;
  }
  if (child_idx == count) {
    child_1 = (char *)heap + child_idx * size;
    if ((*compar)(elt, child_1) < 0) {
      memcpy(parent, child_1, size);
      parent = child_1;
    }
  }
  memcpy(parent, elt, size);
  free_error(elt, "elt", "heap_down()");
}
```