user: Converte this assembly snippet into its equivalent C code:

```asm
<ArraySort_String>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %rbx
  sub    $0xd8,%rsp
  mov    %edi,-0xc4(%rbp)
  mov    %rsi,-0xd0(%rbp)
  mov    %rdx,-0xd8(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x18(%rbp)
  xor    %eax,%eax
  mov    %rsp,%rax
  mov    %rax,%rbx
  mov    -0xc4(%rbp),%eax
  sub    $0x1,%eax
  mov    %eax,-0xb4(%rbp)
  movl   $0x0,-0xac(%rbp)
  movl   $0x0,-0xa8(%rbp)
  movl   $0x32,-0xa4(%rbp)
  mov    -0xa4(%rbp),%eax
  movslq %eax,%rdx
  sub    $0x1,%rdx
  mov    %rdx,-0x90(%rbp)
  movslq %eax,%rdx
  mov    %rdx,%r10
  mov    $0x0,%r11d
  movslq %eax,%rdx
  mov    %rdx,%r8
  mov    $0x0,%r9d
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    $0x10,%eax
  sub    $0x1,%rax
  add    %rdx,%rax
  mov    $0x10,%esi
  mov    $0x0,%edx
  div    %rsi
  imul   $0x10,%rax,%rax
  mov    %rax,%rcx
  and    $0xfffffffffffff000,%rcx
  mov    %rsp,%rdx
  sub    %rcx,%rdx
L156:
  cmp    %rdx,%rsp
  je     L68
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  jmp    L156
L68:
  mov    %rax,%rdx
  and    $0xfff,%edx
  sub    %rdx,%rsp
  mov    %rax,%rdx
  and    $0xfff,%edx
  test   %rdx,%rdx
  je     L11
  and    $0xfff,%eax
  sub    $0x8,%rax
  add    %rsp,%rax
  orq    $0x0,(%rax)
L11:
  mov    %rsp,%rax
  add    $0x3,%rax
  shr    $0x2,%rax
  shl    $0x2,%rax
  mov    %rax,-0x88(%rbp)
  movl   $0x7,-0xa0(%rbp)
L3:
  mov    -0xb4(%rbp),%eax
  sub    -0xac(%rbp),%eax
  cmp    %eax,-0xa0(%rbp)
  jle    L167
  mov    -0xac(%rbp),%eax
  add    $0x1,%eax
  mov    %eax,-0xb0(%rbp)
  jmp    L234
L79:
  mov    -0xb0(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0xd0(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  lea    -0x80(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcpy@plt>
  mov    -0xb0(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0xd8(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  mov    %eax,-0x94(%rbp)
  mov    -0xb0(%rbp),%eax
  sub    $0x1,%eax
  mov    %eax,-0xb8(%rbp)
  jmp    L102
L21:
  mov    -0xb8(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0xd0(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  lea    -0x80(%rbp),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jle    L195
  mov    -0xb8(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0xd0(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0xb8(%rbp),%eax
  cltq
  add    $0x1,%rax
  lea    0x0(,%rax,8),%rcx
  mov    -0xd0(%rbp),%rax
  add    %rcx,%rax
  mov    (%rax),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcpy@plt>
  mov    -0xb8(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0xd8(%rbp),%rax
  add    %rdx,%rax
  mov    -0xb8(%rbp),%edx
  movslq %edx,%rdx
  add    $0x1,%rdx
  lea    0x0(,%rdx,4),%rcx
  mov    -0xd8(%rbp),%rdx
  add    %rcx,%rdx
  mov    (%rax),%eax
  mov    %eax,(%rdx)
  subl   $0x1,-0xb8(%rbp)
L102:
  mov    -0xb8(%rbp),%eax
  cmp    -0xac(%rbp),%eax
  jge    L21
  jmp    L26
L195:
  nop
L26:
  mov    -0xb8(%rbp),%eax
  cltq
  add    $0x1,%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0xd0(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  lea    -0x80(%rbp),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcpy@plt>
  mov    -0xb8(%rbp),%eax
  cltq
  add    $0x1,%rax
  lea    0x0(,%rax,4),%rdx
  mov    -0xd8(%rbp),%rax
  add    %rax,%rdx
  mov    -0x94(%rbp),%eax
  mov    %eax,(%rdx)
  addl   $0x1,-0xb0(%rbp)
L234:
  mov    -0xb0(%rbp),%eax
  cmp    -0xb4(%rbp),%eax
  jle    L79
  cmpl   $0x0,-0xa8(%rbp)
  jne    L214
  mov    %rbx,%rsp
  nop
  mov    -0x18(%rbp),%rax
  sub    %fs:0x28,%rax
  je     L236
  jmp    L20
L214:
  mov    -0xa8(%rbp),%eax
  lea    -0x1(%rax),%edx
  mov    %edx,-0xa8(%rbp)
  mov    -0x88(%rbp),%rdx
  cltq
  mov    (%rdx,%rax,4),%eax
  mov    %eax,-0xb4(%rbp)
  mov    -0xa8(%rbp),%eax
  lea    -0x1(%rax),%edx
  mov    %edx,-0xa8(%rbp)
  mov    -0x88(%rbp),%rdx
  cltq
  mov    (%rdx,%rax,4),%eax
  mov    %eax,-0xac(%rbp)
  jmp    L3
L167:
  mov    -0xac(%rbp),%edx
  mov    -0xb4(%rbp),%eax
  add    %edx,%eax
  sar    %eax
  mov    %eax,-0x9c(%rbp)
  mov    -0xac(%rbp),%eax
  lea    0x1(%rax),%edx
  mov    -0x9c(%rbp),%ecx
  mov    -0xd0(%rbp),%rax
  mov    %ecx,%esi
  mov    %rax,%rdi
  call   <s_swap@plt>
  mov    -0x9c(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0xd8(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  mov    %eax,-0x98(%rbp)
  mov    -0xac(%rbp),%eax
  cltq
  add    $0x1,%rax
  lea    0x0(,%rax,4),%rdx
  mov    -0xd8(%rbp),%rax
  add    %rdx,%rax
  mov    -0x9c(%rbp),%edx
  movslq %edx,%rdx
  lea    0x0(,%rdx,4),%rcx
  mov    -0xd8(%rbp),%rdx
  add    %rcx,%rdx
  mov    (%rax),%eax
  mov    %eax,(%rdx)
  mov    -0xac(%rbp),%eax
  cltq
  add    $0x1,%rax
  lea    0x0(,%rax,4),%rdx
  mov    -0xd8(%rbp),%rax
  add    %rax,%rdx
  mov    -0x98(%rbp),%eax
  mov    %eax,(%rdx)
  mov    -0xb4(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0xd0(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0xac(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rcx
  mov    -0xd0(%rbp),%rax
  add    %rcx,%rax
  mov    (%rax),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jle    L239
  mov    -0xb4(%rbp),%edx
  mov    -0xac(%rbp),%ecx
  mov    -0xd0(%rbp),%rax
  mov    %ecx,%esi
  mov    %rax,%rdi
  call   <s_swap@plt>
  mov    -0xac(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0xd8(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  mov    %eax,-0x98(%rbp)
  mov    -0xb4(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0xd8(%rbp),%rax
  add    %rdx,%rax
  mov    -0xac(%rbp),%edx
  movslq %edx,%rdx
  lea    0x0(,%rdx,4),%rcx
  mov    -0xd8(%rbp),%rdx
  add    %rcx,%rdx
  mov    (%rax),%eax
  mov    %eax,(%rdx)
  mov    -0xb4(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0xd8(%rbp),%rax
  add    %rax,%rdx
  mov    -0x98(%rbp),%eax
  mov    %eax,(%rdx)
L239:
  mov    -0xb4(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0xd0(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0xac(%rbp),%eax
  cltq
  add    $0x1,%rax
  lea    0x0(,%rax,8),%rcx
  mov    -0xd0(%rbp),%rax
  add    %rcx,%rax
  mov    (%rax),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jle    L106
  mov    -0xac(%rbp),%eax
  lea    0x1(%rax),%ecx
  mov    -0xb4(%rbp),%edx
  mov    -0xd0(%rbp),%rax
  mov    %ecx,%esi
  mov    %rax,%rdi
  call   <s_swap@plt>
  mov    -0xac(%rbp),%eax
  cltq
  add    $0x1,%rax
  lea    0x0(,%rax,4),%rdx
  mov    -0xd8(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  mov    %eax,-0x98(%rbp)
  mov    -0xb4(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0xd8(%rbp),%rax
  add    %rdx,%rax
  mov    -0xac(%rbp),%edx
  movslq %edx,%rdx
  add    $0x1,%rdx
  lea    0x0(,%rdx,4),%rcx
  mov    -0xd8(%rbp),%rdx
  add    %rcx,%rdx
  mov    (%rax),%eax
  mov    %eax,(%rdx)
  mov    -0xb4(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0xd8(%rbp),%rax
  add    %rax,%rdx
  mov    -0x98(%rbp),%eax
  mov    %eax,(%rdx)
L106:
  mov    -0xac(%rbp),%eax
  cltq
  add    $0x1,%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0xd0(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0xac(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rcx
  mov    -0xd0(%rbp),%rax
  add    %rcx,%rax
  mov    (%rax),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jle    L142
  mov    -0xac(%rbp),%eax
  lea    0x1(%rax),%edx
  mov    -0xac(%rbp),%ecx
  mov    -0xd0(%rbp),%rax
  mov    %ecx,%esi
  mov    %rax,%rdi
  call   <s_swap@plt>
  mov    -0xac(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0xd8(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  mov    %eax,-0x98(%rbp)
  mov    -0xac(%rbp),%eax
  cltq
  add    $0x1,%rax
  lea    0x0(,%rax,4),%rdx
  mov    -0xd8(%rbp),%rax
  add    %rdx,%rax
  mov    -0xac(%rbp),%edx
  movslq %edx,%rdx
  lea    0x0(,%rdx,4),%rcx
  mov    -0xd8(%rbp),%rdx
  add    %rcx,%rdx
  mov    (%rax),%eax
  mov    %eax,(%rdx)
  mov    -0xac(%rbp),%eax
  cltq
  add    $0x1,%rax
  lea    0x0(,%rax,4),%rdx
  mov    -0xd8(%rbp),%rax
  add    %rax,%rdx
  mov    -0x98(%rbp),%eax
  mov    %eax,(%rdx)
L142:
  mov    -0xac(%rbp),%eax
  add    $0x1,%eax
  mov    %eax,-0xb8(%rbp)
  mov    -0xb4(%rbp),%eax
  mov    %eax,-0xb0(%rbp)
  mov    -0xac(%rbp),%eax
  cltq
  add    $0x1,%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0xd0(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  lea    -0x80(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcpy@plt>
  mov    -0xac(%rbp),%eax
  cltq
  add    $0x1,%rax
  lea    0x0(,%rax,4),%rdx
  mov    -0xd8(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  mov    %eax,-0x94(%rbp)
L52:
  addl   $0x1,-0xb8(%rbp)
  mov    -0xb8(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0xd0(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  lea    -0x80(%rbp),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  js     L52
L13:
  subl   $0x1,-0xb0(%rbp)
  mov    -0xb0(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0xd0(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  lea    -0x80(%rbp),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jg     L13
  mov    -0xb0(%rbp),%eax
  cmp    -0xb8(%rbp),%eax
  jl     L194
  mov    -0xb0(%rbp),%edx
  mov    -0xb8(%rbp),%ecx
  mov    -0xd0(%rbp),%rax
  mov    %ecx,%esi
  mov    %rax,%rdi
  call   <s_swap@plt>
  mov    -0xb8(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0xd8(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  mov    %eax,-0x98(%rbp)
  mov    -0xb0(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0xd8(%rbp),%rax
  add    %rdx,%rax
  mov    -0xb8(%rbp),%edx
  movslq %edx,%rdx
  lea    0x0(,%rdx,4),%rcx
  mov    -0xd8(%rbp),%rdx
  add    %rcx,%rdx
  mov    (%rax),%eax
  mov    %eax,(%rdx)
  mov    -0xb0(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0xd8(%rbp),%rax
  add    %rax,%rdx
  mov    -0x98(%rbp),%eax
  mov    %eax,(%rdx)
  jmp    L52
L194:
  nop
  mov    -0xb0(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0xd0(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0xac(%rbp),%eax
  cltq
  add    $0x1,%rax
  lea    0x0(,%rax,8),%rcx
  mov    -0xd0(%rbp),%rax
  add    %rcx,%rax
  mov    (%rax),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcpy@plt>
  mov    -0xb0(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0xd0(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  lea    -0x80(%rbp),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcpy@plt>
  mov    -0xb0(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0xd8(%rbp),%rax
  add    %rdx,%rax
  mov    -0xac(%rbp),%edx
  movslq %edx,%rdx
  add    $0x1,%rdx
  lea    0x0(,%rdx,4),%rcx
  mov    -0xd8(%rbp),%rdx
  add    %rcx,%rdx
  mov    (%rax),%eax
  mov    %eax,(%rdx)
  mov    -0xb0(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0xd8(%rbp),%rax
  add    %rax,%rdx
  mov    -0x94(%rbp),%eax
  mov    %eax,(%rdx)
  addl   $0x2,-0xa8(%rbp)
  mov    -0xa8(%rbp),%eax
  cmp    -0xa4(%rbp),%eax
  jle    L174
  lea    D4(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  mov    $0x0,%edi
  call   <exit@plt>
L174:
  mov    -0xb4(%rbp),%eax
  sub    -0xb8(%rbp),%eax
  lea    0x1(%rax),%edx
  mov    -0xb0(%rbp),%eax
  sub    -0xac(%rbp),%eax
  cmp    %eax,%edx
  jl     L54
  mov    -0x88(%rbp),%rax
  mov    -0xa8(%rbp),%edx
  movslq %edx,%rdx
  mov    -0xb4(%rbp),%ecx
  mov    %ecx,(%rax,%rdx,4)
  mov    -0xa8(%rbp),%eax
  lea    -0x1(%rax),%edx
  mov    -0x88(%rbp),%rax
  movslq %edx,%rdx
  mov    -0xb8(%rbp),%ecx
  mov    %ecx,(%rax,%rdx,4)
  mov    -0xb0(%rbp),%eax
  sub    $0x1,%eax
  mov    %eax,-0xb4(%rbp)
  jmp    L3
L54:
  mov    -0xb0(%rbp),%eax
  lea    -0x1(%rax),%ecx
  mov    -0x88(%rbp),%rax
  mov    -0xa8(%rbp),%edx
  movslq %edx,%rdx
  mov    %ecx,(%rax,%rdx,4)
  mov    -0xa8(%rbp),%eax
  lea    -0x1(%rax),%edx
  mov    -0x88(%rbp),%rax
  movslq %edx,%rdx
  mov    -0xac(%rbp),%ecx
  mov    %ecx,(%rax,%rdx,4)
  mov    -0xb8(%rbp),%eax
  mov    %eax,-0xac(%rbp)
  jmp    L3
L20:
  call   <__stack_chk_fail@plt>
L236:
  mov    -0x8(%rbp),%rbx
  leave
  ret
```

tool_calls: name: read_data
arguments: tag: D4
datatype: string

tool: D4: 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;
      }
    }
  }
}
```