user: Translate the below assembly code into C programming language:

```asm
<_get_str2int>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0xa8,%rsp
  mov    %rdi,%rbx
  mov    %rsi,%r14
  mov    %fs:0x28,%rax
  mov    %rax,0x98(%rsp)
  xor    %eax,%eax
  mov    $0x5,%edx
  lea    D26(%rip),%rsi
  call   <strncmp@plt>
  mov    %eax,0x8(%rsp)
  test   %eax,%eax
  jne    L91
  movzbl 0x5(%rbx),%eax
  and    $0xffffffdf,%eax
  cmp    $0x50,%al
  jne    L445
  lea    0x7(%rbx),%rcx
  movzbl 0x6(%rbx),%eax
  mov    %eax,%edx
  and    $0xffffffdf,%edx
  cmp    $0x4f,%dl
  je     L317
L541:
  lea    -0x41(%rax),%edx
  cmp    $0x19,%dl
  jbe    L263
  lea    -0x61(%rax),%edx
  cmp    $0x19,%dl
  ja     L425
  movsbl %al,%eax
  sub    $0x60,%eax
  jmp    L362
L91:
  mov    $0x7,%edx
  lea    D21(%rip),%rsi
  mov    %rbx,%rdi
  call   <strncmp@plt>
  lea    0x7(%rbx),%rcx
  test   %eax,%eax
  je     L174
  movzbl (%rbx),%eax
  cmp    $0x22,%al
  je     L24
  cmp    $0x30,%al
  je     L877
  lea    -0x30(%rax),%edx
  cmp    $0x9,%dl
  jbe    L859
  movzbl 0x1(%rbx),%edi
  lea    -0x30(%rdi),%edx
  cmp    $0x9,%dl
  ja     L100
  cmp    $0x2d,%al
  je     L716
L100:
  test   %al,%al
  jne    L218
  movl   $0x1,(%r14)
  mov    $0x5,%eax
  jmp    L140
L24:
  lea    0x1(%rbx),%rcx
  mov    %rcx,%rdx
  mov    $0x0,%eax
L479:
  cmpb   $0x22,(%rdx)
  je     L370
  add    $0x1,%eax
  add    $0x1,%rdx
  cmp    $0x80,%eax
  jne    L479
  movb   $0x0,0x81(%rbx)
L567:
  add    $0x4,%eax
  jmp    L726
L877:
  movzbl 0x1(%rbx),%eax
  and    $0xffffffdf,%eax
  cmp    $0x58,%al
  jne    L872
  movzbl 0x2(%rbx),%eax
  add    $0x3,%rbx
  mov    $0x0,%edx
  test   %al,%al
  jne    L830
L825:
  mov    %edx,(%r14)
  mov    $0x1,%eax
  jmp    L140
L716:
  add    $0x1,%rbx
  mov    $0xffffffff,%esi
  jmp    L257
L45:
  test   $0x3,%al
  je     L274
  and    $0xfffffffc,%eax
  add    $0x4,%eax
L668:
  sar    $0x2,%eax
  mov    %eax,(%r14)
  cmp    %rcx,%rbx
  je     L262
  movl   $0x0,0x4(%r14)
  mov    $0x2,%eax
L140:
  mov    0x98(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L706
  add    $0xa8,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L262:
  movl   $0x1,0x4(%r14)
  mov    $0x2,%eax
  jmp    L140
L370:
  movslq %eax,%rdx
  movb   $0x0,(%rcx,%rdx,1)
  test   $0x3,%al
  je     L567
  and    $0xfffffffc,%eax
  add    $0x4,%eax
L726:
  sar    $0x2,%eax
  mov    %eax,(%r14)
  movl   $0x5,0x4(%r14)
  mov    $0x2,%eax
  jmp    L140
L395:
  lea    -0x41(%rax),%ecx
  cmp    $0x5,%cl
  ja     L209
  shl    $0x4,%edx
  movsbl %al,%eax
  lea    -0x37(%rdx,%rax,1),%edx
  mov    %rbx,%rax
L375:
  movzbl (%rax),%eax
  add    $0x1,%rbx
  test   %al,%al
  je     L825
L830:
  mov    %eax,%esi
  lea    -0x30(%rax),%ecx
  cmp    $0x9,%cl
  ja     L395
  shl    $0x4,%edx
  movsbl %al,%eax
  lea    -0x30(%rdx,%rax,1),%edx
  mov    %rbx,%rax
  jmp    L375
L209:
  sub    $0x61,%esi
  cmp    $0x5,%sil
  ja     L342
  shl    $0x4,%edx
  movsbl %al,%eax
  lea    -0x57(%rdx,%rax,1),%edx
  mov    %rbx,%rax
  jmp    L375
L317:
  movzbl 0x7(%rbx),%eax
  mov    %eax,%edx
  and    $0xffffffdf,%edx
  cmp    $0x57,%dl
  jne    L541
  movzbl 0x8(%rbx),%eax
  mov    %eax,%edx
  and    $0xffffffdf,%edx
  cmp    $0x45,%dl
  jne    L541
  movzbl 0x9(%rbx),%eax
  mov    %eax,%edx
  and    $0xffffffdf,%edx
  cmp    $0x52,%dl
  jne    L541
  lea    0xa(%rbx),%rcx
  mov    $0xffff,%eax
  jmp    L362
L263:
  movsbl %al,%eax
  sub    $0x40,%eax
L362:
  mov    %eax,(%r14)
  lea    0x1(%rcx),%rdx
  movzbl (%rcx),%eax
  mov    $0x0,%ecx
  cmp    $0x3c,%al
  je     L125
  lea    -0x30(%rax),%esi
  mov    $0x0,%ecx
  cmp    $0x9,%sil
  ja     L146
L251:
  lea    (%rcx,%rcx,4),%ecx
  movsbl %al,%eax
  lea    -0x30(%rax,%rcx,2),%ecx
  add    $0x1,%rdx
  movzbl -0x1(%rdx),%eax
  cmp    $0x3c,%al
  je     L125
  lea    -0x30(%rax),%esi
  cmp    $0x9,%sil
  jbe    L251
L146:
  test   %al,%al
  jne    L800
  sub    $0x1,%rdx
L125:
  mov    %ecx,0x4(%r14)
  lea    0x1(%rdx),%rbp
  movzbl (%rdx),%ebx
  test   %bl,%bl
  je     L603
  lea    0x8(%r14),%r13
  movl   $0x1,0xc(%rsp)
  mov    $0x2,%r15d
  lea    0x10(%rsp),%r12
  jmp    L505
L217:
  mov    0x8(%rsp),%edx
  mov    %rbp,%rbx
  jmp    L762
L313:
  lea    D51(%rip),%rsi
  mov    %r12,%rdi
  call   <strcmp@plt>
  test   %eax,%eax
  jne    L97
  movl   $0xffffffff,0x0(%r13)
  jmp    L201
L97:
  lea    D34(%rip),%rsi
  mov    %r12,%rdi
  call   <strcmp@plt>
  test   %eax,%eax
  jne    L193
  movl   $0xffffffff,0x0(%r13)
  jmp    L201
L193:
  lea    D38(%rip),%rsi
  mov    %r12,%rdi
  call   <strcmp@plt>
  test   %eax,%eax
  jne    L447
  movl   $0xffffffff,0x0(%r13)
  jmp    L201
L447:
  movzbl 0x10(%rsp),%eax
  mov    $0x1,%edx
  cmp    $0x2d,%al
  je     L4
L586:
  test   %al,%al
  je     L98
  lea    -0x30(%rax),%ecx
  cmp    $0x9,%cl
  ja     L651
  movslq %edx,%rdx
  add    %r12,%rdx
  mov    $0x0,%ecx
L421:
  lea    (%rcx,%rcx,4),%ecx
  movsbl %al,%eax
  lea    -0x30(%rax,%rcx,2),%ecx
  movzbl (%rdx),%eax
  test   %al,%al
  je     L842
  add    $0x1,%rdx
  lea    -0x30(%rax),%esi
  cmp    $0x9,%sil
  jbe    L421
  mov    $0xffffffff,%eax
  jmp    L140
L4:
  movzbl 0x11(%rsp),%eax
  movl   $0xffffffff,0xc(%rsp)
  mov    $0x2,%edx
  jmp    L586
L98:
  mov    $0x0,%ecx
L842:
  imul   0xc(%rsp),%ecx
  mov    %ecx,0x0(%r13)
  jmp    L201
L8:
  lea    0x2(%rbx),%rbp
  movzbl 0x1(%rbx),%ebx
  add    $0x4,%r13
  test   %bl,%bl
  je     L28
L505:
  mov    $0x80,%edx
  mov    $0x0,%esi
  mov    %r12,%rdi
  call   <memset@plt>
  cmp    $0x3e,%bl
  je     L217
  mov    $0x1,%eax
  lea    0xf(%rsp),%rsi
L297:
  lea    -0x41(%rbx),%ecx
  lea    0x20(%rbx),%edx
  cmp    $0x1a,%cl
  cmovb  %edx,%ebx
  mov    %eax,%edx
  mov    %bl,(%rsi,%rax,1)
  add    $0x1,%rbp
  movzbl -0x1(%rbp),%ebx
  add    $0x1,%rax
  cmp    $0x3e,%bl
  jne    L297
  mov    %rbp,%rbx
L762:
  movslq %edx,%rdx
  movb   $0x0,0x10(%rsp,%rdx,1)
  lea    D4(%rip),%rsi
  mov    %r12,%rdi
  call   <strcmp@plt>
  test   %eax,%eax
  jne    L313
  movl   $0xffffffff,0x0(%r13)
L201:
  add    $0x1,%r15d
  movzbl (%rbx),%eax
  cmp    $0x3c,%al
  je     L8
  test   %al,%al
  jne    L711
L28:
  cmp    $0x5,%r15d
  je     L791
  jg     L7
  cmp    $0x3,%r15d
  je     L552
  cmp    $0x4,%r15d
  jne    L23
L608:
  movl   $0xffffffff,0x10(%r14)
L791:
  movl   $0xffffffff,0x14(%r14)
  mov    $0x4,%eax
  jmp    L140
L23:
  mov    $0xffffffff,%eax
  jmp    L140
L7:
  cmp    $0x6,%r15d
  sete   %al
  movzbl %al,%eax
  lea    -0x1(%rax,%rax,4),%eax
  jmp    L140
L552:
  movl   $0xffffffff,0xc(%r14)
  jmp    L608
L363:
  mov    $0xffffffff,%eax
  jmp    L140
L342:
  mov    $0xffffffff,%eax
  jmp    L140
L425:
  mov    $0xffffffff,%eax
  jmp    L140
L800:
  mov    $0xffffffff,%eax
  jmp    L140
L603:
  mov    $0xffffffff,%eax
  jmp    L140
L651:
  mov    $0xffffffff,%eax
  jmp    L140
L711:
  mov    $0xffffffff,%eax
  jmp    L140
L859:
  mov    $0x1,%esi
L257:
  movzbl (%rbx),%eax
  mov    $0x0,%edx
  test   %al,%al
  je     L530
L387:
  mov    $0x0,%edx
L304:
  lea    -0x30(%rax),%ecx
  cmp    $0x9,%cl
  ja     L363
  lea    (%rdx,%rdx,4),%edx
  movsbl %al,%eax
  lea    -0x30(%rax,%rdx,2),%edx
  add    $0x1,%rbx
  movzbl (%rbx),%eax
  test   %al,%al
  jne    L304
L530:
  mov    %esi,%eax
  imul   %edx,%eax
  mov    %eax,(%r14)
  mov    $0x1,%eax
  jmp    L140
L445:
  mov    %rbx,%rcx
L174:
  mov    %rcx,%rdx
  mov    $0x0,%eax
L402:
  cmpb   $0x0,(%rdx)
  je     L45
  add    $0x1,%eax
  add    $0x1,%rdx
  cmp    $0x80,%eax
  jne    L402
L274:
  add    $0x4,%eax
  jmp    L668
L218:
  mov    %rbx,%rcx
  jmp    L174
L872:
  movzbl (%rbx),%eax
  mov    $0x1,%esi
  jmp    L387
L706:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: retrieve_data
arguments: data_tag: D26
data_type: string
name: retrieve_data
arguments: data_tag: D21
data_type: string
name: retrieve_data
arguments: data_tag: D51
data_type: string
name: retrieve_data
arguments: data_tag: D34
data_type: string
name: retrieve_data
arguments: data_tag: D38
data_type: string
name: retrieve_data
arguments: data_tag: D4
data_type: string

tool: D26: port:

tool: D21: string:

tool: D51: none

tool: D34: null

tool: D38: -1

tool: D4: default

assistant: ```c
int _get_str2int(char *saddr, int value[]) {
  char *src;
  char off, ch;
  unsigned int tmp_value = 0;
  int data_count, i;
  char tmp_str[128];
  int sign = 1;
  data_count = 2;
  src = saddr;
  off = 0;
  if (!strncmp(src, "port:", 5)) {
    if ((src[5] == 'P') || (src[5] == 'p')) {
      off = 3;
      src += 6;
    }
  } else if (!strncmp(src, "string:", 7)) {
    off = 0;
    src += 7;
  } else if (src[0] == '"') {
    off = 5;
    src += 1;
  } else if ((src[0] == '0') && ((src[1] == 'x') || (src[1] == 'X'))) {
    src += 2;
    off = 2;
  } else if ((src[0] >= '0') && (src[0] <= '9')) {
    off = 1;
  } else if (((src[1] >= '0') && (src[1] <= '9')) && (src[0] == '-')) {
    src++;
    off = 1;
    sign = -1;
  } else if (src[0] == '\0') {
    src++;
    off = 4;
  }
  if (off == 0) {
    data_count = 0;
    while (src[data_count] != '\0') {
      data_count++;
      if (data_count > 127) {
        break;
      }
    }
    if (data_count & 0x03) {
      data_count = (data_count & (~0x03)) + 4;
    } else {
      data_count = data_count + 4;
    }
    value[0] = data_count >> 2;
    if (saddr != src) {
      value[1] = 0;
    } else {
      value[1] = 1;
    }
    return (2);
  } else if (off == 5) {
    data_count = 0;
    while (src[data_count] != '"') {
      data_count++;
      if (data_count > 127) {
        break;
      }
    }
    src[data_count] = '\0';
    if (data_count & 0x03) {
      data_count = (data_count & (~0x03)) + 4;
    } else {
      data_count = data_count + 4;
    }
    value[0] = data_count >> 2;
    value[1] = 5;
    return (2);
  } else if (off == 1) {
    while (*src != '\0') {
      if ((*src >= '0') && (*src <= '9')) {
        tmp_value = tmp_value * 10 + (*src - '0');
        src++;
      } else {
        return -1;
      }
    }
    value[0] = tmp_value * sign;
    return (1);
  } else if (off == 2) {
    while (*src != '\0') {
      if ((*src >= '0') && (*src <= '9')) {
        tmp_value = tmp_value * 16 + (*src - '0');
        src++;
      } else if ((*src >= 'A') && (*src <= 'F')) {
        tmp_value = tmp_value * 16 + (*src - 'A' + 10);
        src++;
      } else if ((*src >= 'a') && (*src <= 'f')) {
        tmp_value = tmp_value * 16 + (*src - 'a' + 10);
        src++;
      } else {
        return -1;
      }
    }
    value[0] = tmp_value;
    return (1);
  } else if (off == 3) {
    int tmp_flag = 0;
    ch = *src++;
    if ((ch == 'o') || (ch == 'O')) {
      ch = src[0];
      if ((ch == 'w') || (ch == 'W')) {
        ch = src[1];
        if ((ch == 'e') || (ch == 'E')) {
          ch = src[2];
          if ((ch == 'r') || (ch == 'R')) {
            value[0] = 0xffff;
            src += 3;
            tmp_flag = 1;
          }
        }
      }
    }
    if (!tmp_flag) {
      if ((ch >= 'A') && (ch <= 'Z')) {
        value[0] = ch - 'A' + 1;
      } else if ((ch >= 'a') && (ch <= 'z')) {
        value[0] = ch - 'a' + 1;
      } else {
        return -1;
      }
    }
    ch = *src++;
    tmp_value = 0;
    while (ch != '<') {
      if ((ch >= '0') && (ch <= '9')) {
        tmp_value = tmp_value * 10 + (ch - '0');
        ch = *src++;
      } else if (ch == 0) {
        src--;
        break;
      } else {
        return -1;
      }
    }
    value[1] = tmp_value;
    ch = *src++;
    while (ch != '\0') {
      i = 0;
      memset(tmp_str, 0, sizeof(tmp_str));
      while (ch != '>') {
        if ((ch >= 'A') && (ch <= 'Z')) {
          ch += 'a' - 'A';
        }
        tmp_str[i++] = ch;
        ch = *src++;
      }
      tmp_str[i] = '\0';
      if (!strcmp(tmp_str, "default")) {
        value[data_count] = -1;
      } else if (!strcmp(tmp_str, "none")) {
        value[data_count] = -1;
      } else if (!strcmp(tmp_str, "null")) {
        value[data_count] = -1;
      } else if (!strcmp(tmp_str, "-1")) {
        value[data_count] = -1;
      } else {
        i = 0;
        ch = tmp_str[i++];
        tmp_value = 0;
        if (ch == '-') {
          sign = -1;
          ch = tmp_str[i++];
        }
        while (ch != '\0') {
          if ((ch >= '0') && (ch <= '9')) {
            tmp_value = tmp_value * 10 + (ch - '0');
          } else {
            return -1;
          }
          ch = tmp_str[i++];
        }
        value[data_count] = tmp_value * sign;
      }
      data_count++;
      ch = *src++;
      if (ch == '<') {
        ch = *src++;
      } else if (ch == '\0') {
        ;
      } else {
        return -1;
      }
    }
    switch (data_count) {
    case 3:
      value[3] = -1;
    case 4:
      value[4] = -1;
    case 5:
      value[5] = -1;
    case 6:
      break;
    default:
      return -1;
    }
    return (4);
  } else if (off == 4) {
    value[0] = 4 >> 2;
    return (5);
  } else {
    return -1;
  }
}
```