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

```asm
<parseLine>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x40,%rsp
  mov    %rdi,-0x28(%rbp)
  mov    %rsi,-0x30(%rbp)
  mov    %rdx,-0x38(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  mov    -0x28(%rbp),%rax
  mov    %rax,-0x18(%rbp)
  movl   $0x0,-0x20(%rbp)
  movl   $0x0,-0x1c(%rbp)
  jmp    L113
L21:
  mov    -0x1c(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  cmp    $0x3a,%al
  jne    L52
  addl   $0x1,-0x20(%rbp)
L52:
  cmpl   $0x2,-0x20(%rbp)
  je     L82
  addl   $0x1,-0x1c(%rbp)
L113:
  mov    -0x1c(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  test   %al,%al
  jne    L21
  jmp    L51
L82:
  nop
L51:
  cmpl   $0x2,-0x20(%rbp)
  je     L30
  lea    D29(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <LOG@plt>
  mov    $0xffffffff,%eax
  jmp    L93
L30:
  addl   $0x1,-0x1c(%rbp)
  addl   $0x1,-0x1c(%rbp)
  mov    -0x1c(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x28(%rbp),%rax
  lea    (%rdx,%rax,1),%rcx
  lea    -0x18(%rbp),%rax
  mov    $0x10,%edx
  mov    %rax,%rsi
  mov    %rcx,%rdi
  call   <strtol@plt>
  mov    %rax,-0x10(%rbp)
  mov    -0x1c(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x28(%rbp),%rax
  add    %rax,%rdx
  mov    -0x18(%rbp),%rax
  cmp    %rax,%rdx
  jne    L114
  mov    -0x1c(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mov    %rax,%rsi
  lea    D25(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <LOG@plt>
  mov    $0xffffffff,%eax
  jmp    L93
L114:
  mov    -0x10(%rbp),%rax
  mov    %eax,%edx
  mov    -0x30(%rbp),%rax
  mov    %dx,(%rax)
  mov    -0x18(%rbp),%rax
  add    $0x1,%rax
  mov    %rax,-0x28(%rbp)
  lea    -0x18(%rbp),%rcx
  mov    -0x28(%rbp),%rax
  mov    $0x10,%edx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <strtol@plt>
  mov    %rax,-0x10(%rbp)
  mov    -0x1c(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x28(%rbp),%rax
  add    %rax,%rdx
  mov    -0x18(%rbp),%rax
  cmp    %rax,%rdx
  jne    L77
  mov    -0x1c(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mov    %rax,%rsi
  lea    D25(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <LOG@plt>
  mov    $0xffffffff,%eax
  jmp    L93
L77:
  mov    -0x10(%rbp),%rdx
  mov    -0x38(%rbp),%rax
  mov    %rdx,(%rax)
  mov    $0x0,%eax
L93:
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L105
  call   <__stack_chk_fail@plt>
L105:
  leave
  ret
```

tool_calls: name: retrieve_data
arguments: data_tag: D29
type_infered: string
name: retrieve_data
arguments: data_tag: D25
type_infered: string

tool: D29: Never found 3rd colon


tool: D25: couldn't get string out of %s


assistant: ```c
int parseLine(char *line, unsigned short *dstPort, unsigned long *srcAddy) {
  long int temp;
  char *ptr = line;
  int x;
  int i;
  x = 0;
  i = 0;
  while (line[i] != '\0') {
    if (line[i] == ':') {
      x++;
    }
    if (x == 2) {
      break;
    }
    i++;
  }
  if (x != 2) {
    LOG("Never found 3rd colon\n");
    return -1;
  }
  i++;
  temp = strtol(&line[++i], &ptr, 16);
  if (ptr == &line[i]) {
    LOG("couldn't get string out of %s\n", &line[i]);
    return -1;
  }
  *dstPort = (unsigned short)temp;
  line = &ptr[1];
  temp = strtol(line, &ptr, 16);
  if (ptr == &line[i]) {
    LOG("couldn't get string out of %s\n", &line[i]);
    return -1;
  }
  *srcAddy = (unsigned long)temp;
  return 0;
}
```