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

```asm
<process>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x1000,%rsp
  orq    $0x0,(%rsp)
  sub    $0xba8,%rsp
  mov    %rdi,0x10(%rsp)
  mov    %fs:0x28,%rax
  mov    %rax,0x1b98(%rsp)
  xor    %eax,%eax
  sub    $0x1,%esi
  mov    %esi,0x18(%rsp)
  je     L327
  mov    $0x0,%r14d
  lea    0x24(%rsp),%r12
  lea    0x810(%rsp),%rcx
  mov    %rcx,0x8(%rsp)
  mov    $0xfffffffd,%eax
  sub    %ecx,%eax
  mov    %eax,0x1c(%rsp)
  jmp    L237
L367:
  movzbl 0x24(%rsp),%eax
  cmp    $0x50,%al
  je     L37
  cmp    $0x1,%r14d
  je     L37
L3:
  cmp    $0x2,%r14d
  je     L38
L379:
  cmpb   $0xa,0x24(%rsp)
  sete   %al
  movzbl %al,%eax
  add    %eax,%ebx
L0:
  mov    $0x1,%edx
  mov    %r12,%rsi
  mov    %r13d,%edi
  call   <read@plt>
  test   %rax,%rax
  jle    L72
  cmp    $0x3,%ebx
  je     L367
  cmp    $0x4,%ebx
  jne    L3
  lea    0x31(%rsp),%rdi
  call   <strlen@plt>
  cmp    $0x2,%eax
  jle    L3
  mov    $0x0,%ebp
  lea    0x31(%rsp),%r15
  jmp    L144
L37:
  lea    0x1(%rbp),%edx
  cmp    $0x5,%edx
  jle    L28
  sub    $0x5,%ebp
  movslq %ebp,%rbp
  mov    %al,0x31(%rsp,%rbp,1)
  mov    %edx,%ebp
  mov    $0x1,%r14d
  jmp    L3
L202:
  movzbl 0x0(%rbp,%r15,1),%eax
  mov    %al,0x27(%rsp,%rbp,1)
  add    $0x1,%rbp
L144:
  mov    %r15,%rdi
  call   <strlen@plt>
  sub    $0x2,%eax
  cmp    %ebp,%eax
  jg     L202
  lea    0x27(%rsp),%rbp
  mov    %rbp,%rdi
  call   <strlen@plt>
  cltq
  movb   $0x0,0x27(%rsp,%rax,1)
  mov    %rbp,%rdi
  call   <strlen@plt>
  test   %eax,%eax
  jle    L55
  lea    0x27(%rsp),%rdi
  call   <strlen@plt>
  mov    $0x2,%r14d
  mov    $0x0,%ebp
  jmp    L379
L55:
  mov    $0x0,%ebp
  jmp    L3
L38:
  lea    0x27(%rsp),%rdi
  call   <strlen@plt>
  cmp    $0x8,%ebx
  jne    L379
  test   %eax,%eax
  jle    L379
  movslq %ebp,%rax
  movzbl 0x24(%rsp),%edx
  mov    %dl,0x40(%rsp,%rax,1)
  add    $0x1,%ebp
  jmp    L379
L72:
  lea    0x40(%rsp),%rdi
  call   <strlen@plt>
  test   %eax,%eax
  jg     L273
L11:
  lea    0x40(%rsp),%rdi
  call   <strlen@plt>
  test   %eax,%eax
  jg     L248
L66:
  mov    %r13d,%edi
  call   <close@plt>
  mov    %r12,%rdi
  call   <strlen@plt>
  mov    %eax,%edx
  mov    $0x0,%esi
  mov    %r12,%rdi
  call   <memset@plt>
  lea    0x40(%rsp),%rdi
  call   <strlen@plt>
  test   %eax,%eax
  jg     L193
L86:
  mov    0x8(%rsp),%rbx
  mov    %rbx,%rdi
  call   <strlen@plt>
  mov    %eax,%edx
  mov    $0x0,%esi
  mov    %rbx,%rdi
  call   <memset@plt>
  subl   $0x1,0x18(%rsp)
  je     L327
L237:
  mov    %r12,%rdi
  call   <strlen@plt>
  mov    %eax,%edx
  mov    $0x0,%esi
  mov    %r12,%rdi
  call   <memset@plt>
  lea    0x40(%rsp),%rbx
  mov    %rbx,%rdi
  call   <strlen@plt>
  mov    %eax,%edx
  mov    $0x0,%esi
  mov    %rbx,%rdi
  call   <memset@plt>
  lea    0x27(%rsp),%rbx
  mov    %rbx,%rdi
  call   <strlen@plt>
  mov    %eax,%edx
  mov    $0x0,%esi
  mov    %rbx,%rdi
  call   <memset@plt>
  mov    0x10(%rsp),%rdi
  call   <httpsqs_get@plt>
  mov    %eax,%r13d
  mov    $0x0,%ebx
  mov    $0x0,%ebp
  jmp    L0
L273:
  lea    0x40(%rsp),%rdi
  call   <strlen@plt>
  cltq
  movb   $0x0,0x40(%rsp,%rax,1)
  jmp    L11
L248:
  lea    0x27(%rsp),%rdi
  call   <strlen@plt>
  test   %eax,%eax
  jle    L66
  lea    0x40(%rsp),%rdx
  lea    0x27(%rsp),%rsi
  lea    D19(%rip),%rdi
  call   <printf@plt>
  jmp    L66
L193:
  lea    0x27(%rsp),%rdi
  call   <strlen@plt>
  test   %eax,%eax
  jle    L86
  lea    0x27(%rsp),%rdi
  call   <atoi@plt>
  mov    %eax,%ebp
  lea    D27(%rip),%rsi
  lea    D42(%rip),%rdi
  call   <fopen@plt>
  mov    %rax,%r13
  lea    0x40(%rsp),%rbx
  mov    %rbx,%rcx
  mov    %ebp,%edx
  lea    D29(%rip),%rsi
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <fprintf@plt>
  mov    %rbx,%rdi
  call   <http_post@plt>
  mov    %eax,%ebp
  mov    0x8(%rsp),%rbx
  jmp    L264
L300:
  mov    %al,(%rbx)
  add    $0x1,%rbx
L264:
  mov    $0x1,%edx
  mov    %r12,%rsi
  mov    %ebp,%edi
  call   <read@plt>
  test   %rax,%rax
  jle    L252
  movzbl 0x24(%rsp),%eax
  cmp    $0x7c,%al
  jne    L300
  cmpb   $0x44,-0x1(%rbx)
  jne    L300
  cmpb   $0x4e,-0x2(%rbx)
  jne    L300
  mov    0x1c(%rsp),%ecx
  add    %ebx,%ecx
  cmpb   $0x45,-0x3(%rbx)
  jne    L300
  movslq %ecx,%rcx
  movb   $0x0,0x810(%rsp,%rcx,1)
L252:
  mov    %r12,%rdi
  call   <strlen@plt>
  mov    %eax,%edx
  mov    $0x0,%esi
  mov    %r12,%rdi
  call   <memset@plt>
  mov    %ebp,%edi
  call   <close@plt>
  mov    0x8(%rsp),%rdi
  call   <strlen@plt>
  test   %eax,%eax
  je     L86
  lea    D48(%rip),%rsi
  mov    0x8(%rsp),%rbx
  mov    %rbx,%rdi
  call   <strstr@plt>
  mov    %eax,%esi
  mov    %rbx,%rdi
  call   <strcpy@plt>
  mov    %rbx,%rdx
  lea    D35(%rip),%rsi
  mov    %r13,%rdi
  mov    $0x0,%eax
  call   <fprintf@plt>
  mov    %r13,%rdi
  call   <fclose@plt>
  jmp    L86
L28:
  mov    %edx,%ebp
  mov    $0x1,%r14d
  jmp    L3
L327:
  mov    0x1b98(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L56
  add    $0x1ba8,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L56:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: extract_symbolic_data
arguments: data_tag: D19
type_guessed: string
name: extract_symbolic_data
arguments: data_tag: D27
type_guessed: string
name: extract_symbolic_data
arguments: data_tag: D42
type_guessed: string
name: extract_symbolic_data
arguments: data_tag: D29
type_guessed: string
name: extract_symbolic_data
arguments: data_tag: D48
type_guessed: string
name: extract_symbolic_data
arguments: data_tag: D35
type_guessed: string

tool: D19: POS:%s
DATA:%s


tool: D27: a

tool: D42: httpsqs_feed.log

tool: D29: GET FROM HTTPSQS:
POS:%d
DATA:%s


tool: D48: Array

tool: D35: POST TO REMOTE
%s


assistant: ```c
void process(char *queuename, int loop) {
  FILE *fp;
  int black_sock;
  char data[3];
  char posstr[15];
  char datastr[2000];
  char post[5000];
  int i = 0;
  int j = 0;
  int len = 0;
  int flag = 0;
  char pos[10];
  int p = 0;
  loop--;
  while (loop) {
    memset(data, 0, strlen(data));
    memset(datastr, 0, strlen(datastr));
    memset(pos, 0, strlen(pos));
    black_sock = httpsqs_get(queuename);
    i = 0;
    j = 0;
    while (read(black_sock, data, 1) > 0) {
      if (j == 3) {
        if (data[0] == 'P')
          flag = 1;
        if (flag == 1) {
          i++;
          if (i >= 6)
            posstr[i - 6] = data[0];
        }
      }
      if (j == 4 && strlen(posstr) > 2) {
        for (i = 0; i < strlen(posstr) - 2; i++)
          pos[i] = posstr[i];
        pos[strlen(pos)] = '\0';
        i = 0;
        if (strlen(pos) > 0)
          flag = 2;
      }
      if (flag == 2 && strlen(pos) > 0) {
        if (j == 8) {
          datastr[i] = data[0];
          i++;
        }
      }
      if (data[0] == '\n')
        j++;
    }
    if (strlen(datastr) > 0)
      datastr[strlen(datastr)] = '\0';
    if (strlen(datastr) > 0 && strlen(pos) > 0)
      printf("POS:%s\nDATA:%s\n", pos, datastr);
    close(black_sock);
    memset(data, 0, strlen(data));
    if (strlen(datastr) > 0 && strlen(pos) > 0) {
      p = atoi(pos);
      if ((fp = fopen("httpsqs_feed.log", "a")) >= 0)
        fprintf(fp, "GET FROM HTTPSQS:\r\nPOS:%d\nDATA:%s\r\n", p, datastr);
      black_sock = http_post(datastr);
      i = 0;
      while (read(black_sock, data, 1) > 0) {
        if (data[0] == '|') {
          if (post[i - 1] == 'D' && post[i - 2] == 'N' && post[i - 3] == 'E') {
            post[i - 3] = '\0';
            break;
          }
        }
        post[i] = data[0];
        i++;
      }
      memset(data, 0, strlen(data));
      close(black_sock);
      if (strlen(post)) {
        if (fp >= 0) {
          strcpy(post, strstr(post, "Array"));
          fprintf(fp, "POST TO REMOTE\r\n%s\r\n", post);
          fclose(fp);
        }
      }
    }
    memset(post, 0, strlen(post));
    loop--;
  }
  return;
}
```