user: 请将这段汇编代码片段转换成等效的C代码：

```asm
<test_sort>:
  endbr64
  push   %r15
  lea    D45(%rip),%r8
  xor    %esi,%esi
  lea    D84(%rip),%r15
  push   %r14
  lea    D35(%rip),%r14
  push   %r13
  lea    D7(%rip),%r13
  push   %r12
  push   %rbp
  lea    D32(%rip),%rbp
  push   %rbx
  lea    D30(%rip),%rbx
  sub    $0x78,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x68(%rsp)
  xor    %eax,%eax
  lea    0x10(%rsp),%r12
  mov    %rsp,%rdi
  mov    %r8,0x8(%rsp)
  lea    D54(%rip),%rax
  mov    %r12,%rdx
  mov    %rbx,0x20(%rsp)
  mov    %rbp,0x28(%rsp)
  mov    %r15,0x30(%rsp)
  mov    %r13,0x40(%rsp)
  mov    %rax,0x48(%rsp)
  mov    %r14,0x50(%rsp)
  mov    %rbp,0x58(%rsp)
  call   <array_sort@plt>
  lea    0x8(%rsp),%rdi
  mov    $0x1,%esi
  mov    %r12,%rdx
  call   <array_sort@plt>
  lea    D45(%rip),%r8
  mov    0x8(%rsp),%rdi
  mov    %r8,%rsi
  call   <str_cmp@plt>
  test   %rax,%rax
  jne    L78
L269:
  mov    0x10(%rsp),%ecx
  test   %ecx,%ecx
  jne    L209
L214:
  lea    0x20(%rsp),%rdi
  mov    $0x3,%esi
  mov    %r12,%rdx
  call   <array_sort@plt>
  mov    0x20(%rsp),%rdi
  mov    %rbp,%rsi
  call   <str_cmp@plt>
  test   %rax,%rax
  jne    L69
L119:
  mov    0x28(%rsp),%rdi
  mov    %rbx,%rsi
  call   <str_cmp@plt>
  test   %rax,%rax
  jne    L152
L199:
  mov    0x30(%rsp),%rdi
  mov    %r15,%rsi
  call   <str_cmp@plt>
  test   %rax,%rax
  jne    L138
L241:
  cmpl   $0x1,0x10(%rsp)
  jne    L81
  mov    0x14(%rsp),%edx
  test   %edx,%edx
  je     L0
L81:
  mov    $0x59,%edi
  call   <fail_test@plt>
L73:
  lea    0x40(%rsp),%rdi
  mov    $0x4,%esi
  mov    %r12,%rdx
  call   <array_sort@plt>
  mov    0x40(%rsp),%rdi
  mov    %r14,%rsi
  call   <str_cmp@plt>
  test   %rax,%rax
  jne    L194
L193:
  mov    0x48(%rsp),%rdi
  mov    %rbp,%rsi
  call   <str_cmp@plt>
  test   %rax,%rax
  jne    L101
L237:
  mov    0x50(%rsp),%rdi
  mov    %r13,%rsi
  call   <str_cmp@plt>
  test   %rax,%rax
  jne    L113
L108:
  mov    0x58(%rsp),%rdi
  lea    D54(%rip),%rsi
  call   <str_cmp@plt>
  test   %rax,%rax
  jne    L210
L86:
  cmpl   $0x2,0x10(%rsp)
  jne    L206
  cmpl   $0x3,0x14(%rsp)
  je     L258
L206:
  mov    $0x69,%edi
  call   <fail_test@plt>
L47:
  mov    0x68(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L9
  add    $0x78,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  cs nopw 0x0(%rax,%rax,1)
L0:
  cmpl   $0x2,0x18(%rsp)
  jne    L81
  jmp    L73
L152:
  mov    $0x51,%edi
  call   <fail_test@plt>
  jmp    L199
  nop
L69:
  mov    $0x4f,%edi
  call   <fail_test@plt>
  jmp    L119
  nop
L138:
  mov    $0x53,%edi
  call   <fail_test@plt>
  jmp    L241
  nop
L209:
  mov    $0x4b,%edi
  call   <fail_test@plt>
  jmp    L214
  nop
L78:
  mov    $0x49,%edi
  call   <fail_test@plt>
  jmp    L269
  nop
L210:
  mov    $0x63,%edi
  call   <fail_test@plt>
  jmp    L86
  nop
L113:
  mov    $0x61,%edi
  call   <fail_test@plt>
  jmp    L108
  nop
L101:
  mov    $0x5f,%edi
  call   <fail_test@plt>
  jmp    L237
  nop
L194:
  mov    $0x5d,%edi
  call   <fail_test@plt>
  jmp    L193
  nop
L258:
  mov    0x18(%rsp),%eax
  test   %eax,%eax
  jne    L206
  cmpl   $0x1,0x1c(%rsp)
  jne    L206
  jmp    L47
L9:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: read_data
arguments: label: D45
type_guessed: string
name: read_data
arguments: label: D84
type_guessed: string
name: read_data
arguments: label: D35
type_guessed: string
name: read_data
arguments: label: D7
type_guessed: string
name: read_data
arguments: label: D32
type_guessed: string
name: read_data
arguments: label: D30
type_guessed: string
name: read_data
arguments: label: D54
type_guessed: string

tool: D45: one

tool: D84: test

tool: 

tool: D7: aa

tool: D32: a

tool: D30: just

tool: D54: aaa

assistant: ```c
void test_sort() {
  char *empty_words[] = {};
  char *one_word[] = {"one"};
  char *three_words[] = {"just", "a", "test"};
  char *four_words[] = {"aa", "aaa", "", "a"};
  int map[4];
  array_sort(empty_words, 0, map);
  array_sort(one_word, 1, map);
  if (str_cmp(one_word[0], "one") != 0)
    fail_test(73);
  ;
  if (map[0] != 0)
    fail_test(75);
  ;
  array_sort(three_words, 3, map);
  if (str_cmp(three_words[0], "a") != 0)
    fail_test(79);
  ;
  if (str_cmp(three_words[1], "just") != 0)
    fail_test(81);
  ;
  if (str_cmp(three_words[2], "test") != 0)
    fail_test(83);
  ;
  if (map[0] != 1 || map[1] != 0 || map[2] != 2)
    fail_test(89);
  ;
  array_sort(four_words, 4, map);
  if (str_cmp(four_words[0], "") != 0)
    fail_test(93);
  ;
  if (str_cmp(four_words[1], "a") != 0)
    fail_test(95);
  ;
  if (str_cmp(four_words[2], "aa") != 0)
    fail_test(97);
  ;
  if (str_cmp(four_words[3], "aaa") != 0)
    fail_test(99);
  ;
  if (map[0] != 2 || map[1] != 3 || map[2] != 0 || map[3] != 1)
    fail_test(105);
  ;
}
```