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

```asm
<parse_netmap>:
  endbr64
  push   %r15
  push   %r14
  lea    D48(%rip),%r14
  push   %r13
  push   %r12
  mov    %rsi,%r12
  push   %rbp
  mov    %rdx,%rbp
  push   %rbx
  mov    %rcx,%rbx
  sub    $0x198,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x188(%rsp)
  xor    %eax,%eax
  movl   $0x0,(%rsi)
  mov    %r14,%rsi
  movl   $0x0,(%rdx)
  movl   $0x0,(%rcx)
  call   <strtok@plt>
  test   %rax,%rax
  je     L16
  lea    0xb0(%rsp),%r15
  mov    %rax,%rsi
  mov    %r15,%rdi
  call   <strcpy@plt>
  mov    %r14,%rsi
  xor    %edi,%edi
  call   <strtok@plt>
  mov    %rax,%rsi
  test   %rax,%rax
  je     L16
  lea    0x120(%rsp),%r13
  mov    %r13,%rdi
  call   <strcpy@plt>
  lea    D12(%rip),%rsi
  mov    %r15,%rdi
  call   <strtok@plt>
  mov    %rax,%rsi
  test   %rax,%rax
  je     L16
  lea    0x10(%rsp),%r15
  mov    %r15,%rdi
  call   <strcpy@plt>
  mov    %r14,%rsi
  xor    %edi,%edi
  call   <strtok@plt>
  mov    %rax,%rsi
  test   %rax,%rax
  je     L16
  lea    0x30(%rsp),%r14
  mov    %r14,%rdi
  call   <strcpy@plt>
  lea    0x90(%rsp),%rdi
  mov    %r14,%rsi
  mov    %rdi,(%rsp)
  call   <strcpy@plt>
  mov    (%rsp),%rdi
  lea    D37(%rip),%rsi
  call   <strtok@plt>
  mov    %rax,%rsi
  test   %rax,%rax
  je     L69
  mov    %r14,%rdi
  call   <strcpy@plt>
L69:
  lea    D41(%rip),%r8
  mov    %r14,%rdi
  mov    %r8,%rsi
  call   <strtok@plt>
  mov    %rax,%rsi
  test   %rax,%rax
  je     L16
  lea    0x50(%rsp),%r14
  mov    %r14,%rdi
  call   <strcpy@plt>
  lea    D41(%rip),%r8
  xor    %edi,%edi
  mov    %r8,%rsi
  call   <strtok@plt>
  mov    %rax,%rsi
  test   %rax,%rax
  je     L16
  lea    0x70(%rsp),%r8
  mov    %r8,%rdi
  mov    %r8,(%rsp)
  call   <strcpy@plt>
  mov    %r14,%rdi
  call   <atoi@plt>
  mov    (%rsp),%rdi
  mov    %eax,%r14d
  call   <atoi@plt>
  movsbl 0x120(%rsp),%edi
  shl    $0x4,%eax
  add    %r14d,%eax
  xor    %r14d,%r14d
  mov    %eax,0xc(%rsp)
  test   %dil,%dil
  jne    L70
  jmp    L57
  nopl   0x0(%rax)
L61:
  add    $0x1,%r14
  movsbl 0x0(%r13,%r14,1),%edi
  test   %dil,%dil
  je     L57
L70:
  mov    %r14d,(%rsp)
  call   <isdigit@plt>
  test   %rax,%rax
  jne    L61
  movslq (%rsp),%r14
  movb   $0x0,0x120(%rsp,%r14,1)
L57:
  mov    %r15,%rdi
  call   <atoi@plt>
  mov    %r13,%rdi
  mov    %eax,(%r12)
  mov    0xc(%rsp),%eax
  mov    %eax,0x0(%rbp)
  call   <atoi@plt>
  mov    %eax,(%rbx)
  xor    %eax,%eax
  jmp    L35
  nopl   0x0(%rax,%rax,1)
L16:
  mov    $0x1,%eax
L35:
  mov    0x188(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L125
  add    $0x198,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L125:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: unpack_data
arguments: data_label: D48
datatype: string
name: unpack_data
arguments: data_label: D12
datatype: string
name: unpack_data
arguments: data_label: D37
datatype: string
name: unpack_data
arguments: data_label: D41
datatype: string

tool: D48:  

tool: D12: :

tool: D37: @

tool: D41: /

assistant: ```c
int parse_netmap(char *s, int *iouinst, int *iouintf, int *iouliveinst) {
  char Left[100], Right[100];
  char LeftInstance[20], RightInstance[20];
  char LeftIntf[20], IntMajor[20], IntMinor[20];
  char temps[30];
  int interface;
  char *t;
  int i;
  *iouinst = 0;
  *iouintf = 0;
  *iouliveinst = 0;
  t = strtok(s, " ");
  if (t != NULL)
    strcpy(Left, t);
  else
    return 1;
  t = strtok(NULL, " ");
  if (t != NULL)
    strcpy(Right, t);
  else
    return 1;
  t = strtok(Left, ":");
  if (t != NULL)
    strcpy(LeftInstance, t);
  else
    return 1;
  t = strtok(NULL, " ");
  if (t != NULL)
    strcpy(LeftIntf, t);
  else
    return 1;
  strcpy(temps, LeftIntf);
  t = strtok(temps, "@");
  if (t != NULL)
    strcpy(LeftIntf, t);
  t = strtok(LeftIntf, "/");
  if (t != NULL)
    strcpy(IntMajor, t);
  else
    return 1;
  t = strtok(NULL, "/");
  if (t != NULL)
    strcpy(IntMinor, t);
  else
    return 1;
  interface = atoi(IntMajor) + (atoi(IntMinor) * 16);
  i = 0;
  while (Right[i] != '\0') {
    if (isdigit(Right[i]))
      i++;
    else {
      Right[i] = '\0';
      break;
    }
  }
  *iouinst = atoi(LeftInstance);
  *iouintf = interface;
  *iouliveinst = atoi(Right);
  return 0;
}
```