user: 请从给定的汇编指令推导出C源代码:

```asm
<sort>:
  endbr64
  push   %r15
  push   %r14
  xor    %r14d,%r14d
  push   %r13
  movslq %esi,%r13
  push   %r12
  mov    %rdi,%r12
  push   %rbp
  mov    %edx,%ebp
  push   %rbx
  mov    %ecx,%ebx
  sub    $0x18,%rsp
  test   %ecx,%ecx
  jle    L59
  nopl   0x0(%rax,%rax,1)
L49:
  mov    $0x9,%edi
  add    $0x1,%r14d
  call   <putchar@plt>
  cmp    %r14d,%ebx
  jne    L49
L59:
  xor    %eax,%eax
  mov    %ebp,%edx
  lea    D13(%rip),%rdi
  mov    %r13d,%esi
  call   <printf@plt>
  cmp    %ebp,%r13d
  je     L157
  lea    0x0(%r13,%rbp,1),%eax
  lea    0x1(%rbx),%r14d
  mov    %r13d,%esi
  mov    %r12,%rdi
  mov    %eax,%r8d
  mov    %r14d,%ecx
  shr    $0x1f,%r8d
  add    %eax,%r8d
  sar    %r8d
  mov    %r8d,%edx
  mov    %r8d,0x8(%rsp)
  call   <sort>
  mov    0x8(%rsp),%r8d
  mov    %r14d,%ecx
  mov    %ebp,%r14d
  mov    %ebp,%edx
  mov    %r12,%rdi
  sub    %r13d,%r14d
  lea    0x1(%r8),%esi
  mov    %r8d,0xc(%rsp)
  mov    %esi,0x8(%rsp)
  call   <sort>
  lea    0x4(,%r14,4),%edi
  call   <malloc@plt>
  mov    0x8(%rsp),%esi
  mov    0xc(%rsp),%r8d
  mov    %rax,%r15
  cmp    %ebp,%esi
  jle    L75
  cmp    %r8d,%r13d
  jg     L55
L75:
  mov    %r15,%rcx
  mov    %esi,%edx
  lea    0x1(%rbp),%r10d
  mov    %r13d,%eax
  cs nopw 0x0(%rax,%rax,1)
L175:
  cmp    %eax,%esi
  je     L0
  movslq %eax,%rdi
  mov    (%r12,%rdi,4),%edi
  cmp    %edx,%r10d
  je     L20
  movslq %edx,%r9
  mov    (%r12,%r9,4),%r9d
  cmp    %edi,%r9d
  jg     L20
  add    $0x1,%edx
  mov    %r9d,%edi
L12:
  mov    %edi,(%rcx)
  add    $0x4,%rcx
  cmp    %r8d,%eax
  jle    L175
  cmp    %ebp,%edx
  jle    L175
L55:
  cmp    %ebp,%r13d
  jg     L122
  sub    %r13d,%ebp
  lea    (%r12,%r13,4),%rcx
  mov    %r15,%rax
  lea    0x4(%r15,%rbp,4),%rsi
  sub    %r15,%rcx
  nopl   0x0(%rax)
L137:
  mov    (%rax),%edx
  mov    %edx,(%rcx,%rax,1)
  add    $0x4,%rax
  cmp    %rax,%rsi
  jne    L137
L122:
  xor    %ebp,%ebp
  test   %ebx,%ebx
  jle    L29
  nopl   0x0(%rax)
L46:
  mov    $0x9,%edi
  add    $0x1,%ebp
  call   <putchar@plt>
  cmp    %ebp,%ebx
  jne    L46
L29:
  mov    %r15,%rbp
  xor    %ebx,%ebx
  lea    D18(%rip),%r12
  test   %r14d,%r14d
  js     L79
  nopw   0x0(%rax,%rax,1)
L171:
  mov    0x0(%rbp),%esi
  mov    %r12,%rdi
  xor    %eax,%eax
  add    $0x1,%ebx
  add    $0x4,%rbp
  call   <printf@plt>
  cmp    %ebx,%r14d
  jge    L171
L79:
  mov    $0xa,%edi
  call   <putchar@plt>
  add    $0x18,%rsp
  mov    %r15,%rdi
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  jmp    1080 <free@plt>
  nopl   0x0(%rax)
L20:
  add    $0x1,%eax
  jmp    L12
L0:
  movslq %edx,%rdi
  add    $0x1,%edx
  mov    (%r12,%rdi,4),%edi
  jmp    L12
  nop
L157:
  add    $0x18,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
```

tool_calls: name: disassemble_data
arguments: data_label: D13
type: string
name: disassemble_data
arguments: data_label: D18
type: string

tool: D13: MergeSort ( %i , %i )


tool: D18: %i || 

assistant: ```c
void sort(int *vetor, int posicaoInicio, int posicaoFim, int tabulacao) {
  int i, j, k, metadeTamanho, *vetorTemp;
  for (i = 0; i < tabulacao; i++)
    printf("\t");
  printf("MergeSort ( %i , %i )\n", posicaoInicio, posicaoFim);
  if (posicaoInicio == posicaoFim)
    return;
  metadeTamanho = (posicaoInicio + posicaoFim) / 2;
  sort(vetor, posicaoInicio, metadeTamanho, tabulacao + 1);
  sort(vetor, metadeTamanho + 1, posicaoFim, tabulacao + 1);
  i = posicaoInicio;
  j = metadeTamanho + 1;
  k = 0;
  vetorTemp = (int *)malloc(sizeof(int) * (posicaoFim - posicaoInicio + 1));
  while (i < metadeTamanho + 1 || j < posicaoFim + 1) {
    if (i == metadeTamanho + 1) {
      vetorTemp[k] = vetor[j];
      j++;
      k++;
    } else {
      if (j == posicaoFim + 1) {
        vetorTemp[k] = vetor[i];
        i++;
        k++;
      } else {
        if (vetor[i] < vetor[j]) {
          vetorTemp[k] = vetor[i];
          i++;
          k++;
        } else {
          vetorTemp[k] = vetor[j];
          j++;
          k++;
        }
      }
    }
  }
  for (i = posicaoInicio; i <= posicaoFim; i++) {
    vetor[i] = vetorTemp[i - posicaoInicio];
  }
  for (i = 0; i < tabulacao; i++)
    printf("\t");
  for (i = 0; i <= (posicaoFim - posicaoInicio); i++)
    printf("%i || ", vetorTemp[i]);
  printf("\n");
  free(vetorTemp);
}
```