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

```asm
<countSort>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x30,%rsp
  mov    %rdi,-0x28(%rbp)
  mov    %esi,-0x2c(%rbp)
  mov    %edx,-0x30(%rbp)
  mov    -0x30(%rbp),%eax
  cltq
  shl    $0x2,%eax
  mov    %eax,%edi
  call   <malloc@plt>
  mov    %rax,-0x10(%rbp)
  cmpq   $0x0,-0x10(%rbp)
  jne    L95
  mov    $0xffffffff,%eax
  jmp    L8
L95:
  mov    -0x2c(%rbp),%eax
  cltq
  shl    $0x2,%eax
  mov    %eax,%edi
  call   <malloc@plt>
  mov    %rax,-0x8(%rbp)
  cmpq   $0x0,-0x8(%rbp)
  jne    L52
  mov    -0x10(%rbp),%rax
  mov    %rax,%rdi
  call   <free@plt>
  mov    $0xffffffff,%eax
  jmp    L8
L52:
  movl   $0x0,-0x18(%rbp)
  jmp    L74
L114:
  mov    -0x18(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x10(%rbp),%rax
  add    %rdx,%rax
  movl   $0x0,(%rax)
  addl   $0x1,-0x18(%rbp)
L74:
  mov    -0x18(%rbp),%eax
  cmp    -0x30(%rbp),%eax
  jl     L114
  movl   $0x0,-0x14(%rbp)
  jmp    L27
L28:
  mov    -0x14(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x10(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%edx
  mov    -0x14(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rcx
  mov    -0x28(%rbp),%rax
  add    %rcx,%rax
  mov    (%rax),%eax
  cltq
  lea    0x0(,%rax,4),%rcx
  mov    -0x10(%rbp),%rax
  add    %rcx,%rax
  add    $0x1,%edx
  mov    %edx,(%rax)
  addl   $0x1,-0x14(%rbp)
L27:
  mov    -0x14(%rbp),%eax
  cmp    -0x2c(%rbp),%eax
  jl     L28
  movl   $0x1,-0x18(%rbp)
  jmp    L26
L113:
  mov    -0x18(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x10(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%ecx
  mov    -0x18(%rbp),%eax
  cltq
  shl    $0x2,%rax
  lea    -0x4(%rax),%rdx
  mov    -0x10(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%edx
  mov    -0x18(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rsi
  mov    -0x10(%rbp),%rax
  add    %rsi,%rax
  add    %ecx,%edx
  mov    %edx,(%rax)
  addl   $0x1,-0x18(%rbp)
L26:
  mov    -0x18(%rbp),%eax
  cmp    -0x30(%rbp),%eax
  jl     L113
  mov    -0x2c(%rbp),%eax
  sub    $0x1,%eax
  mov    %eax,-0x14(%rbp)
  jmp    L12
L90:
  mov    -0x14(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mov    -0x14(%rbp),%edx
  movslq %edx,%rdx
  lea    0x0(,%rdx,4),%rcx
  mov    -0x28(%rbp),%rdx
  add    %rcx,%rdx
  mov    (%rdx),%edx
  movslq %edx,%rdx
  lea    0x0(,%rdx,4),%rcx
  mov    -0x10(%rbp),%rdx
  add    %rcx,%rdx
  mov    (%rdx),%edx
  movslq %edx,%rdx
  shl    $0x2,%rdx
  lea    -0x4(%rdx),%rcx
  mov    -0x8(%rbp),%rdx
  add    %rcx,%rdx
  mov    (%rax),%eax
  mov    %eax,(%rdx)
  mov    -0x14(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x10(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%edx
  mov    -0x14(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rcx
  mov    -0x28(%rbp),%rax
  add    %rcx,%rax
  mov    (%rax),%eax
  cltq
  lea    0x0(,%rax,4),%rcx
  mov    -0x10(%rbp),%rax
  add    %rcx,%rax
  sub    $0x1,%edx
  mov    %edx,(%rax)
  subl   $0x1,-0x14(%rbp)
L12:
  cmpl   $0x0,-0x14(%rbp)
  jns    L90
  mov    -0x2c(%rbp),%eax
  cltq
  shl    $0x2,%eax
  mov    %eax,%edx
  mov    -0x8(%rbp),%rcx
  mov    -0x28(%rbp),%rax
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <memcpy@plt>
  mov    -0x10(%rbp),%rax
  mov    %rax,%rdi
  call   <free@plt>
  mov    -0x8(%rbp),%rax
  mov    %rax,%rdi
  call   <free@plt>
  lea    D19(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  movl   $0x0,-0x18(%rbp)
  jmp    L34
L115:
  mov    -0x18(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  mov    %eax,%esi
  lea    D14(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  addl   $0x1,-0x18(%rbp)
L34:
  mov    -0x18(%rbp),%eax
  cmp    -0x2c(%rbp),%eax
  jl     L115
  mov    $0xa,%edi
  call   <putchar@plt>
L8:
  leave
  ret
```

tool_calls: name: parse_data
arguments: data_tag: D19
type_guessed: string
name: parse_data
arguments: data_tag: D14
type_guessed: string

tool: D19: Count sort 

tool: D14: %3d

assistant: ```c
int countSort(int *data, int size, int k) {
  int *counts, *temp;
  int i, j;
  if ((counts = (int *)malloc(k * sizeof(int))) == NULL)
    return -1;
  if ((temp = (int *)malloc(size * sizeof(int))) == NULL) {
    free(counts);
    return -1;
  }
  for (i = 0; i < k; i++)
    counts[i] = 0;
  for (j = 0; j < size; j++)
    counts[data[j]] = counts[data[j]] + 1;
  for (i = 1; i < k; i++)
    counts[i] = counts[i] + counts[i - 1];
  for (j = size - 1; j >= 0; j--) {
    temp[counts[data[j]] - 1] = data[j];
    counts[data[j]] = counts[data[j]] - 1;
  }
  memcpy(data, temp, size * sizeof(int));
  free(counts);
  free(temp);
  printf("Count sort ");
  for (i = 0; i < size; i++) {
    printf("%3d", data[i]);
  }
  printf("\n");
}
```