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

```asm
<sort>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x50,%rsp
  mov    %rdi,-0x48(%rbp)
  mov    %rsi,-0x50(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  movl   $0x0,-0x40(%rbp)
  jmp    L29
L58:
  mov    -0x40(%rbp),%eax
  mov    %eax,-0x38(%rbp)
  mov    -0x40(%rbp),%eax
  mov    %eax,-0x3c(%rbp)
  jmp    L0
L43:
  mov    -0x38(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%edx
  mov    -0x3c(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rcx
  mov    -0x48(%rbp),%rax
  add    %rcx,%rax
  mov    (%rax),%eax
  cmp    %eax,%edx
  jle    L36
  mov    -0x3c(%rbp),%eax
  mov    %eax,-0x38(%rbp)
L36:
  addl   $0x1,-0x3c(%rbp)
L0:
  cmpl   $0x9,-0x3c(%rbp)
  jle    L43
  mov    -0x40(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  mov    %eax,-0x34(%rbp)
  mov    -0x38(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  mov    -0x40(%rbp),%edx
  movslq %edx,%rdx
  lea    0x0(,%rdx,4),%rcx
  mov    -0x48(%rbp),%rdx
  add    %rcx,%rdx
  mov    (%rax),%eax
  mov    %eax,(%rdx)
  mov    -0x38(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x48(%rbp),%rax
  add    %rax,%rdx
  mov    -0x34(%rbp),%eax
  mov    %eax,(%rdx)
  mov    -0x40(%rbp),%eax
  movslq %eax,%rdx
  mov    %rdx,%rax
  shl    $0x4,%rax
  sub    %rdx,%rax
  add    %rax,%rax
  mov    %rax,%rdx
  mov    -0x50(%rbp),%rax
  add    %rax,%rdx
  lea    -0x30(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcpy@plt>
  mov    -0x38(%rbp),%eax
  movslq %eax,%rdx
  mov    %rdx,%rax
  shl    $0x4,%rax
  sub    %rdx,%rax
  add    %rax,%rax
  mov    %rax,%rdx
  mov    -0x50(%rbp),%rax
  add    %rax,%rdx
  mov    -0x40(%rbp),%eax
  movslq %eax,%rcx
  mov    %rcx,%rax
  shl    $0x4,%rax
  sub    %rcx,%rax
  add    %rax,%rax
  mov    %rax,%rcx
  mov    -0x50(%rbp),%rax
  add    %rcx,%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcpy@plt>
  mov    -0x38(%rbp),%eax
  movslq %eax,%rdx
  mov    %rdx,%rax
  shl    $0x4,%rax
  sub    %rdx,%rax
  add    %rax,%rax
  mov    %rax,%rdx
  mov    -0x50(%rbp),%rax
  add    %rax,%rdx
  lea    -0x30(%rbp),%rax
  mov    %rax,%rsi
  mov    %rdx,%rdi
  call   <strcpy@plt>
  addl   $0x1,-0x40(%rbp)
L29:
  cmpl   $0x8,-0x40(%rbp)
  jle    L58
  lea    D17(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  movl   $0x0,-0x40(%rbp)
  jmp    L79
L63:
  mov    -0x40(%rbp),%eax
  movslq %eax,%rdx
  mov    %rdx,%rax
  shl    $0x4,%rax
  sub    %rdx,%rax
  add    %rax,%rax
  mov    %rax,%rdx
  mov    -0x50(%rbp),%rax
  add    %rax,%rdx
  mov    -0x40(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rcx
  mov    -0x48(%rbp),%rax
  add    %rcx,%rax
  mov    (%rax),%eax
  mov    %eax,%esi
  lea    D7(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  addl   $0x1,-0x40(%rbp)
L79:
  cmpl   $0x9,-0x40(%rbp)
  jle    L63
  mov    $0xa,%edi
  call   <putchar@plt>
  nop
  mov    -0x8(%rbp),%rax
  sub    %fs:0x28,%rax
  je     L26
  call   <__stack_chk_fail@plt>
L26:
  leave
  ret
```

tool_calls: name: unpack_data
arguments: data_label: D17
datatype: string
name: unpack_data
arguments: data_label: D7
datatype: string

tool: D17: result:

tool: D7: 
%d %s

assistant: ```c
void sort(int num[], char name[][30]) {
  int i, j, min, temp;
  char copy[30];
  for (i = 0; i < 10 - 1; i++) {
    min = i;
    for (j = i; j < 10; j++) {
      if (num[min] > num[j])
        min = j;
    }
    temp = num[i];
    num[i] = num[min];
    num[min] = temp;
    strcpy(copy, name[i]);
    strcpy(name[i], name[min]);
    strcpy(name[min], copy);
  }
  printf("result:\n");
  for (i = 0; i < 10; i++) {
    printf("\n%d %s", num[i], name[i]);
  }
  printf("\n");
}
```