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

```asm
<ArraySort_String>:
  endbr64
  push   %r15
  xor    %r15d,%r15d
  push   %r14
  push   %r13
  mov    %rdx,%r13
  push   %r12
  mov    %rsi,%r12
  push   %rbp
  push   %rbx
  sub    $0x198,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x188(%rsp)
  xor    %eax,%eax
  lea    -0x1(%rdi),%eax
  movl   $0x0,0x24(%rsp)
  mov    %eax,0x20(%rsp)
  movl   $0x1,0x40(%rsp)
L221:
  mov    0x20(%rsp),%ecx
  mov    %ecx,%eax
  sub    %r15d,%eax
  cmp    $0x6,%eax
  jg     L4
L70:
  movslq 0x40(%rsp),%rbx
  mov    %r15d,0x8(%rsp)
  lea    0x120(%rsp),%rbp
  cmp    %ebx,%ecx
  jl     L45
  nopl   0x0(%rax)
L90:
  mov    (%r12,%rbx,8),%rsi
  mov    %rbp,%rdi
  call   <strcpy@plt>
  mov    0x0(%r13,%rbx,4),%eax
  movslq 0x8(%rsp),%r14
  mov    %eax,0x10(%rsp)
  cmp    %r14d,%r15d
  jle    L0
  jmp    L153
  nopl   0x0(%rax)
L194:
  mov    (%r12,%r14,8),%rsi
  mov    0x8(%r12,%r14,8),%rdi
  call   <strcpy@plt>
  mov    0x0(%r13,%r14,4),%eax
  mov    %eax,0x4(%r13,%r14,4)
  lea    -0x1(%r14),%eax
  sub    $0x1,%r14
  cmp    %r14d,%r15d
  jg     L73
L0:
  mov    (%r12,%r14,8),%rdi
  mov    %rbp,%rsi
  call   <strcmp@plt>
  test   %rax,%rax
  jg     L194
L117:
  lea    0x1(%r14),%rdx
  mov    %rbp,%rsi
  add    $0x1,%rbx
  mov    (%r12,%rdx,8),%rdi
  mov    %rdx,0x18(%rsp)
  call   <strcpy@plt>
  mov    0x10(%rsp),%eax
  mov    0x18(%rsp),%rdx
  addl   $0x1,0x8(%rsp)
  mov    %eax,0x0(%r13,%rdx,4)
  cmp    %ebx,0x20(%rsp)
  jge    L90
L45:
  mov    0x24(%rsp),%eax
  test   %eax,%eax
  je     L15
  movslq 0x24(%rsp),%rdx
  lea    -0x1(%rdx),%eax
  mov    %rdx,%rcx
  mov    0x50(%rsp,%rdx,4),%edx
  cltq
  sub    $0x2,%ecx
  mov    0x50(%rsp,%rax,4),%r15d
  mov    %edx,0x20(%rsp)
  mov    %ecx,0x24(%rsp)
  mov    0x20(%rsp),%ecx
  lea    0x1(%r15),%eax
  mov    %eax,0x40(%rsp)
  mov    %ecx,%eax
  sub    %r15d,%eax
  cmp    $0x6,%eax
  jle    L70
L4:
  movslq 0x20(%rsp),%r14
  mov    0x40(%rsp),%edx
  mov    %r12,%rdi
  lea    (%r14,%r15,1),%ebx
  sar    %ebx
  mov    %ebx,%esi
  movslq %ebx,%rbx
  call   <s_swap@plt>
  movslq %r15d,%rax
  lea    0x0(%r13,%rbx,4),%rdx
  lea    (%r12,%r14,8),%r8
  lea    0x4(,%rax,4),%rbx
  mov    (%rdx),%esi
  shl    $0x3,%rax
  mov    %r8,0x10(%rsp)
  lea    0x0(%r13,%rbx,1),%rcx
  lea    (%r12,%rax,1),%rbp
  mov    %r14d,0x20(%rsp)
  mov    (%rcx),%edi
  mov    %rcx,0x30(%rsp)
  mov    %rax,0x8(%rsp)
  mov    %edi,(%rdx)
  mov    0x0(%rbp),%rdi
  mov    %esi,(%rcx)
  mov    (%r8),%rsi
  call   <strcmp@plt>
  mov    0x10(%rsp),%r8
  test   %rax,%rax
  jle    L207
  mov    0x20(%rsp),%edx
  mov    %r15d,%esi
  mov    %r12,%rdi
  call   <s_swap@plt>
  lea    -0x4(%r13,%rbx,1),%rdx
  lea    0x0(%r13,%r14,4),%rax
  mov    0x10(%rsp),%r8
  mov    (%rdx),%esi
  mov    (%rax),%edi
  mov    %edi,(%rdx)
  mov    %esi,(%rax)
L207:
  mov    0x8(%rsp),%rax
  mov    (%r8),%rsi
  lea    0x8(%r12,%rax,1),%rax
  mov    (%rax),%rdi
  mov    %rax,0x38(%rsp)
  call   <strcmp@plt>
  test   %rax,%rax
  jle    L44
  mov    0x20(%rsp),%edx
  mov    0x40(%rsp),%esi
  mov    %r12,%rdi
  call   <s_swap@plt>
  mov    0x30(%rsp),%rcx
  lea    0x0(%r13,%r14,4),%rax
  mov    (%rax),%esi
  mov    (%rcx),%edx
  mov    %esi,(%rcx)
  mov    %edx,(%rax)
L44:
  mov    0x38(%rsp),%rax
  mov    0x0(%rbp),%rdi
  mov    (%rax),%rsi
  call   <strcmp@plt>
  test   %rax,%rax
  jle    L158
  mov    0x40(%rsp),%edx
  mov    %r15d,%esi
  mov    %r12,%rdi
  call   <s_swap@plt>
  mov    0x30(%rsp),%rcx
  lea    -0x4(%r13,%rbx,1),%rax
  mov    (%rax),%edx
  mov    (%rcx),%esi
  mov    %esi,(%rax)
  mov    %edx,(%rcx)
L158:
  mov    0x38(%rsp),%rax
  lea    0x120(%rsp),%rbp
  mov    %rbp,%rdi
  mov    (%rax),%rsi
  call   <strcpy@plt>
  mov    0x30(%rsp),%rax
  mov    %r15d,0x48(%rsp)
  mov    %r12,0x8(%rsp)
  movslq 0x20(%rsp),%rbx
  mov    (%rax),%eax
  mov    %r13,0x28(%rsp)
  mov    %eax,0x44(%rsp)
  lea    0x2(%r15),%eax
  cltq
  mov    %rax,%r13
  nopl   0x0(%rax)
L83:
  mov    0x8(%rsp),%r15
  mov    %rbp,%rsi
  mov    %r13d,0x10(%rsp)
  mov    (%r15,%r13,8),%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  js     L21
  lea    -0x1(%rbx),%edx
  lea    -0x8(%r15,%rbx,8),%r12
  mov    %r13,0x18(%rsp)
  movslq %edx,%r14
  mov    %r12,%r13
  nopw   0x0(%rax,%rax,1)
L63:
  mov    0x0(%r13),%rdi
  mov    %rbp,%rsi
  mov    %r14d,%r15d
  movslq %r14d,%rbx
  mov    %r13,%r12
  sub    $0x8,%r13
  call   <strcmp@plt>
  mov    %r14,%rsi
  sub    $0x1,%r14
  test   %rax,%rax
  jg     L63
  mov    0x28(%rsp),%r14
  mov    0x18(%rsp),%r13
  mov    %r12,%rax
  lea    (%r14,%rsi,4),%r8
  cmp    %r13d,%ebx
  jl     L232
  mov    0x10(%rsp),%esi
  mov    0x8(%rsp),%rdi
  mov    %ebx,%edx
  mov    %r8,0x18(%rsp)
  call   <s_swap@plt>
  mov    0x18(%rsp),%r8
  mov    (%r14,%r13,4),%eax
  mov    (%r8),%edx
  mov    %edx,(%r14,%r13,4)
  mov    %eax,(%r8)
L21:
  add    $0x1,%r13
  jmp    L83
  nopl   0x0(%rax)
L73:
  movslq %eax,%r14
  jmp    L117
L153:
  lea    -0x1(%rbx),%r14
  jmp    L117
L232:
  mov    (%rax),%rsi
  mov    0x8(%rsp),%r12
  mov    %ebx,0x18(%rsp)
  mov    %rax,%rbx
  mov    0x38(%rsp),%rax
  mov    0x28(%rsp),%r13
  mov    %r15d,%r14d
  mov    0x48(%rsp),%r15d
  mov    %r8,0x48(%rsp)
  mov    (%rax),%rdi
  call   <strcpy@plt>
  mov    (%rbx),%rdi
  mov    %rbp,%rsi
  call   <strcpy@plt>
  mov    0x48(%rsp),%r8
  mov    0x30(%rsp),%rcx
  mov    (%r8),%eax
  mov    %eax,(%rcx)
  mov    0x44(%rsp),%eax
  mov    %eax,(%r8)
  mov    0x24(%rsp),%eax
  lea    0x2(%rax),%ebp
  cmp    $0x32,%ebp
  jg     L96
L168:
  mov    0x20(%rsp),%ecx
  mov    0x10(%rsp),%esi
  sub    $0x1,%r14d
  mov    0x18(%rsp),%ebx
  mov    0x24(%rsp),%eax
  mov    %ecx,%edx
  sub    %esi,%edx
  sub    %r15d,%ebx
  add    $0x1,%eax
  add    $0x1,%edx
  cmp    %ebx,%edx
  movslq %ebp,%rdx
  jl     L161
  cltq
  mov    %ecx,0x50(%rsp,%rdx,4)
  mov    %ebp,0x24(%rsp)
  mov    %esi,0x50(%rsp,%rax,4)
  mov    %r14d,0x20(%rsp)
  jmp    L221
L15:
  mov    0x188(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L222
  add    $0x198,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L161:
  cltq
  mov    %r14d,0x50(%rsp,%rdx,4)
  mov    %r15d,0x50(%rsp,%rax,4)
  mov    0x10(%rsp),%r15d
  mov    %ebp,0x24(%rsp)
  lea    0x1(%r15),%eax
  mov    %eax,0x40(%rsp)
  jmp    L221
L96:
  lea    D5(%rip),%rdi
  call   <printf@plt>
  xor    %edi,%edi
  call   <exit@plt>
  jmp    L168
L222:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: parse_data
arguments: data_tag: D5
datatype: string

tool: D5: Stack error: NSTACK too small


assistant: ```c
void ArraySort_String(int n, char **Pair_Name, int *brr) {
  int i, ir = n - 1, j, k, m = 0, jstack = 0, b, NSTACK = 50, istack[NSTACK];
  int temp, MIN = 7;
  char p[100];
  for (;;) {
    if (ir - m < MIN) {
      for (j = m + 1; j <= ir; j++) {
        strcpy(p, Pair_Name[j]);
        b = brr[j];
        for (i = j - 1; i >= m; i--) {
          if (strcmp(Pair_Name[i], p) <= 0)
            break;
          strcpy(Pair_Name[i + 1], Pair_Name[i]);
          brr[i + 1] = brr[i];
        }
        strcpy(Pair_Name[i + 1], p);
        brr[i + 1] = b;
      }
      if (!jstack)
        return;
      ir = istack[jstack--];
      m = istack[jstack--];
    } else {
      k = (m + ir) >> 1;
      s_swap(Pair_Name, k, m + 1);
      temp = (brr[k]);
      (brr[k]) = brr[m + 1];
      (brr[m + 1]) = temp;
      ;
      if (strcmp(Pair_Name[m], Pair_Name[ir]) > 0) {
        s_swap(Pair_Name, m, ir);
        temp = (brr[m]);
        (brr[m]) = brr[ir];
        (brr[ir]) = temp;
        ;
      }
      if (strcmp(Pair_Name[m + 1], Pair_Name[ir]) > 0) {
        s_swap(Pair_Name, m + 1, ir);
        temp = (brr[m + 1]);
        (brr[m + 1]) = brr[ir];
        (brr[ir]) = temp;
        ;
      }
      if (strcmp(Pair_Name[m], Pair_Name[m + 1]) > 0) {
        s_swap(Pair_Name, m, m + 1);
        temp = (brr[m]);
        (brr[m]) = brr[m + 1];
        (brr[m + 1]) = temp;
        ;
      }
      i = m + 1;
      j = ir;
      strcpy(p, Pair_Name[m + 1]);
      b = brr[m + 1];
      for (;;) {
        do
          i++;
        while (strcmp(Pair_Name[i], p) < 0);
        do
          j--;
        while (strcmp(Pair_Name[j], p) > 0);
        if (j < i)
          break;
        s_swap(Pair_Name, i, j);
        temp = (brr[i]);
        (brr[i]) = brr[j];
        (brr[j]) = temp;
        ;
      }
      strcpy(Pair_Name[m + 1], Pair_Name[j]);
      strcpy(Pair_Name[j], p);
      brr[m + 1] = brr[j];
      brr[j] = b;
      jstack += 2;
      if (jstack > NSTACK) {
        printf("Stack error: NSTACK too small\n");
        exit(0);
      }
      if (ir - i + 1 >= j - m) {
        istack[jstack] = ir;
        istack[jstack - 1] = i;
        ir = j - 1;
      } else {
        istack[jstack] = j - 1;
        istack[jstack - 1] = m;
        m = i;
      }
    }
  }
}
```