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

```asm
<_get_str2int>:
  endbr64
  push   %r15
  mov    $0x5,%edx
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  mov    %rdi,%rbx
  sub    $0xa8,%rsp
  mov    %rsi,(%rsp)
  lea    D11(%rip),%rsi
  mov    %fs:0x28,%rax
  mov    %rax,0x98(%rsp)
  xor    %eax,%eax
  call   <strncmp@plt>
  test   %eax,%eax
  jne    L755
  movzbl 0x5(%rbx),%eax
  and    $0xffffffdf,%eax
  cmp    $0x50,%al
  jne    L760
  movzbl 0x6(%rbx),%eax
  lea    0x7(%rbx),%rdi
  mov    %eax,%edx
  and    $0xffffffdf,%edx
  cmp    $0x4f,%dl
  jne    L646
  movzbl 0x7(%rbx),%eax
  mov    %eax,%edx
  and    $0xffffffdf,%edx
  cmp    $0x57,%dl
  jne    L646
  movzbl 0x8(%rbx),%eax
  mov    %eax,%edx
  and    $0xffffffdf,%edx
  cmp    $0x45,%dl
  jne    L646
  movzbl 0x9(%rbx),%eax
  mov    %eax,%edx
  and    $0xffffffdf,%edx
  cmp    $0x52,%dl
  jne    L646
  lea    0xa(%rbx),%rdi
  mov    $0xffff,%eax
L59:
  mov    (%rsp),%rcx
  lea    0x1(%rdi),%r12
  mov    %eax,(%rcx)
  movsbl (%rdi),%eax
  cmp    $0x3c,%al
  je     L485
  lea    -0x30(%rax),%esi
  xor    %edx,%edx
  cmp    $0x9,%sil
  jbe    L886
  jmp    L196
  nopl   0x0(%rax)
L489:
  lea    -0x30(%rax),%esi
  cmp    $0x9,%sil
  ja     L196
L886:
  mov    %r12,%rdi
  lea    (%rdx,%rdx,4),%edx
  add    $0x1,%r12
  lea    -0x30(%rax,%rdx,2),%edx
  movsbl -0x1(%r12),%eax
  cmp    $0x3c,%al
  jne    L489
  lea    0x2(%rdi),%rax
  mov    %r12,%rdi
  mov    %rax,%r12
L497:
  mov    (%rsp),%rax
  mov    %edx,0x4(%rax)
  movzbl (%rdi),%ebx
  test   %bl,%bl
  je     L785
  lea    0x8(%rax),%r13
  mov    $0x2,%ebp
  lea    0x10(%rsp),%r15
  movl   $0x1,0xc(%rsp)
  movabs $0x746c7561666564,%r14
  nopl   0x0(%rax)
L697:
  xor    %esi,%esi
  mov    $0x80,%edx
  mov    %r15,%rdi
  call   <memset@plt>
  cmp    $0x3e,%bl
  je     L153
  mov    $0x1,%eax
  lea    0xf(%rsp),%rsi
  nopw   0x0(%rax,%rax,1)
L843:
  lea    -0x41(%rbx),%edx
  cmp    $0x19,%dl
  movslq %eax,%rdx
  ja     L573
  add    $0x20,%ebx
L573:
  add    $0x1,%r12
  mov    %bl,(%rsi,%rax,1)
  add    $0x1,%rax
  movzbl -0x1(%r12),%ebx
  cmp    $0x3e,%bl
  jne    L843
L411:
  movb   $0x0,0x10(%rsp,%rdx,1)
  cmp    %r14,(%r15)
  je     L841
  cmpl   $0x656e6f6e,(%r15)
  je     L875
L605:
  cmpl   $0x6c6c756e,(%r15)
  je     L736
  cmpw   $0x312d,(%r15)
  je     L35
L74:
  movsbl 0x10(%rsp),%eax
  mov    $0x1,%edx
  cmp    $0x2d,%al
  je     L888
L519:
  test   %al,%al
  je     L900
  lea    -0x30(%rax),%esi
  cmp    $0x9,%sil
  ja     L785
  add    %r15,%rdx
  xor    %esi,%esi
  jmp    L521
  xchg   %ax,%ax
L845:
  lea    -0x30(%rax),%r8d
  add    $0x1,%rdx
  cmp    $0x9,%r8b
  ja     L785
L521:
  lea    (%rsi,%rsi,4),%esi
  lea    -0x30(%rax,%rsi,2),%esi
  movsbl (%rdx),%eax
  test   %al,%al
  jne    L845
  imul   0xc(%rsp),%esi
L465:
  mov    %esi,0x0(%r13)
  movzbl (%r12),%eax
  add    $0x1,%ebp
  cmp    $0x3c,%al
  je     L880
  nopl   0x0(%rax)
L125:
  test   %al,%al
  jne    L785
L609:
  cmp    $0x5,%ebp
  je     L320
  jg     L340
  cmp    $0x3,%ebp
  je     L568
  cmp    $0x4,%ebp
  jne    L785
L127:
  mov    (%rsp),%rax
  movl   $0xffffffff,0x10(%rax)
L320:
  mov    (%rsp),%rax
  movl   $0xffffffff,0x14(%rax)
  mov    $0x4,%eax
  jmp    L434
  nopw   0x0(%rax,%rax,1)
L760:
  mov    %rbx,%rcx
L501:
  xor    %eax,%eax
  jmp    L783
  nop
L159:
  add    $0x1,%rax
  cmp    $0x80,%rax
  je     L382
L783:
  cmpb   $0x0,(%rcx,%rax,1)
  mov    %eax,%edx
  jne    L159
  test   $0x3,%al
  je     L80
  and    $0xfffffffc,%edx
L80:
  add    $0x4,%edx
  sar    $0x2,%edx
L883:
  mov    (%rsp),%rax
  mov    %edx,(%rax)
  cmp    %rcx,%rbx
  je     L824
  movl   $0x0,0x4(%rax)
  mov    $0x2,%eax
L434:
  mov    0x98(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L468
  add    $0xa8,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax)
L755:
  mov    $0x7,%edx
  lea    D2(%rip),%rsi
  mov    %rbx,%rdi
  call   <strncmp@plt>
  lea    0x7(%rbx),%rcx
  test   %eax,%eax
  je     L501
  movsbl (%rbx),%eax
  cmp    $0x22,%al
  je     L496
  cmp    $0x30,%al
  je     L336
  lea    -0x30(%rax),%edx
  cmp    $0x9,%dl
  jbe    L44
  movzbl 0x1(%rbx),%edx
  lea    -0x30(%rdx),%ecx
  cmp    $0x9,%cl
  ja     L133
  cmp    $0x2d,%al
  je     L169
L133:
  test   %al,%al
  jne    L760
  mov    (%rsp),%rax
  movl   $0x1,(%rax)
  mov    $0x5,%eax
  jmp    L434
  nopl   0x0(%rax,%rax,1)
L646:
  lea    -0x41(%rax),%edx
  cmp    $0x19,%dl
  jbe    L714
  lea    -0x61(%rax),%edx
  cmp    $0x19,%dl
  ja     L785
  sub    $0x60,%eax
  movsbl %al,%eax
  jmp    L59
L824:
  movl   $0x1,0x4(%rax)
  mov    $0x2,%eax
  jmp    L434
L496:
  lea    0x1(%rbx),%rdx
  xor    %eax,%eax
  jmp    L132
  nopl   0x0(%rax,%rax,1)
L161:
  add    $0x1,%rdx
  cmp    $0x80,%eax
  je     L111
L132:
  mov    %eax,%ecx
  add    $0x1,%eax
  cmpb   $0x22,(%rdx)
  jne    L161
  movb   $0x0,(%rdx)
  test   $0x3,%cl
  je     L285
  mov    %ecx,%eax
  and    $0xfffffffc,%eax
  add    $0x4,%eax
  sar    $0x2,%eax
L790:
  mov    (%rsp),%rdi
  mov    %eax,(%rdi)
  mov    $0x2,%eax
  movl   $0x5,0x4(%rdi)
  jmp    L434
L714:
  sub    $0x40,%eax
  movsbl %al,%eax
  jmp    L59
L285:
  lea    0x4(%rcx),%eax
  sar    $0x2,%eax
  jmp    L790
  cs nopw 0x0(%rax,%rax,1)
L875:
  cmpb   $0x0,0x4(%r15)
  jne    L605
  nopl   0x0(%rax,%rax,1)
L841:
  movl   $0xffffffff,0x0(%r13)
  movzbl (%r12),%eax
  add    $0x1,%ebp
  cmp    $0x3c,%al
  jne    L125
L880:
  movzbl 0x1(%r12),%ebx
  lea    0x2(%r12),%rax
  add    $0x4,%r13
  test   %bl,%bl
  je     L609
  mov    %rax,%r12
  jmp    L697
  nopw   0x0(%rax,%rax,1)
L153:
  xor    %edx,%edx
  jmp    L411
L336:
  movzbl 0x1(%rbx),%edx
  and    $0xffffffdf,%edx
  cmp    $0x58,%dl
  je     L364
L44:
  mov    $0x1,%esi
L431:
  xor    %edx,%edx
  jmp    L188
L637:
  lea    (%rdx,%rdx,4),%edx
  add    $0x1,%rbx
  lea    -0x30(%rax,%rdx,2),%edx
  movsbl (%rbx),%eax
  test   %al,%al
  je     L816
L188:
  lea    -0x30(%rax),%ecx
  cmp    $0x9,%cl
  jbe    L637
L785:
  mov    $0xffffffff,%eax
  jmp    L434
  nopl   0x0(%rax,%rax,1)
L736:
  cmpb   $0x0,0x4(%r15)
  je     L841
  cmpw   $0x312d,(%r15)
  jne    L74
L35:
  cmpb   $0x0,0x2(%r15)
  jne    L74
  jmp    L841
L196:
  test   %al,%al
  je     L497
  jmp    L785
  nopl   0x0(%rax)
L340:
  xor    %eax,%eax
  cmp    $0x6,%ebp
  sete   %al
  lea    -0x1(%rax,%rax,4),%eax
  jmp    L434
L364:
  movsbl 0x2(%rbx),%eax
  xor    %edx,%edx
  add    $0x3,%rbx
  test   %al,%al
  jne    L772
  jmp    L1
  nopl   0x0(%rax)
L856:
  shl    $0x4,%edx
  lea    -0x30(%rdx,%rax,1),%edx
L713:
  movsbl (%rbx),%eax
  add    $0x1,%rbx
  test   %al,%al
  je     L1
L772:
  lea    -0x30(%rax),%ecx
  cmp    $0x9,%cl
  jbe    L856
  lea    -0x41(%rax),%ecx
  cmp    $0x5,%cl
  ja     L594
  shl    $0x4,%edx
  add    $0x1,%rbx
  lea    -0x37(%rdx,%rax,1),%edx
  movsbl -0x1(%rbx),%eax
  test   %al,%al
  jne    L772
L1:
  mov    (%rsp),%rax
  mov    %edx,(%rax)
  mov    $0x1,%eax
  jmp    L434
  nopl   (%rax)
L594:
  lea    -0x61(%rax),%ecx
  cmp    $0x5,%cl
  ja     L785
  shl    $0x4,%edx
  lea    -0x57(%rdx,%rax,1),%edx
  jmp    L713
L816:
  mov    %esi,%eax
  mov    (%rsp),%rdi
  imul   %edx,%eax
  mov    %eax,(%rdi)
  mov    $0x1,%eax
  jmp    L434
L382:
  mov    $0x21,%edx
  jmp    L883
L888:
  movl   $0xffffffff,0xc(%rsp)
  movsbl 0x11(%rsp),%eax
  mov    $0x2,%edx
  jmp    L519
L568:
  mov    (%rsp),%rax
  movl   $0xffffffff,0xc(%rax)
  jmp    L127
L111:
  movb   $0x0,0x81(%rbx)
  mov    $0x21,%eax
  jmp    L790
L485:
  lea    0x2(%rdi),%rax
  xor    %edx,%edx
  mov    %r12,%rdi
  mov    %rax,%r12
  jmp    L497
L169:
  add    $0x1,%rbx
  movsbl %dl,%eax
  mov    $0xffffffff,%esi
  jmp    L431
L900:
  xor    %esi,%esi
  jmp    L465
L468:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: unpack_data
arguments: tag: D11
type: string
name: unpack_data
arguments: tag: D2
type: string

tool: D11: port:

tool: D2: string:

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;
  }
}
```