user: Please show me the C implementation that matches the assembly code listed below:

```asm
<isIpv4>:
  endbr64
  push   %rbx
  mov    %rdi,%rbx
  call   <strlen@plt>
  test   %eax,%eax
  jle    L97
  lea    -0x1(%rax),%edx
  cmp    $0xe,%edx
  jbe    L82
  mov    %eax,%ecx
  pxor   %xmm8,%xmm8
  movdqa D18(%rip),%xmm7
  movdqa D4(%rip),%xmm5
  shr    $0x4,%ecx
  movdqa %xmm8,%xmm9
  pxor   %xmm4,%xmm4
  mov    %rbx,%rdx
  sub    $0x1,%ecx
  movdqa D25(%rip),%xmm6
  pxor   %xmm3,%xmm3
  shl    $0x4,%rcx
  lea    0x10(%rbx,%rcx,1),%rcx
  nop
L89:
  movdqu (%rdx),%xmm1
  movdqa %xmm4,%xmm2
  movdqa %xmm3,%xmm10
  add    $0x10,%rdx
  pcmpeqb %xmm7,%xmm1
  pand   %xmm5,%xmm1
  pcmpgtb %xmm1,%xmm2
  movdqa %xmm1,%xmm0
  punpcklbw %xmm2,%xmm0
  punpckhbw %xmm2,%xmm1
  pcmpgtw %xmm0,%xmm10
  movdqa %xmm0,%xmm2
  punpcklwd %xmm10,%xmm2
  punpckhwd %xmm10,%xmm0
  movdqa %xmm3,%xmm10
  paddd  %xmm8,%xmm2
  movdqa %xmm1,%xmm8
  paddd  %xmm0,%xmm2
  movdqa %xmm3,%xmm0
  pcmpgtw %xmm1,%xmm0
  punpcklwd %xmm0,%xmm8
  punpckhwd %xmm0,%xmm1
  movdqu -0x10(%rdx),%xmm0
  paddd  %xmm8,%xmm2
  pcmpeqb %xmm6,%xmm0
  paddd  %xmm1,%xmm2
  movdqa %xmm2,%xmm8
  movdqa %xmm4,%xmm2
  pand   %xmm5,%xmm0
  pcmpgtb %xmm0,%xmm2
  movdqa %xmm0,%xmm1
  punpcklbw %xmm2,%xmm1
  punpckhbw %xmm2,%xmm0
  pcmpgtw %xmm1,%xmm10
  movdqa %xmm1,%xmm2
  punpcklwd %xmm10,%xmm2
  punpckhwd %xmm10,%xmm1
  paddd  %xmm9,%xmm2
  movdqa %xmm0,%xmm9
  paddd  %xmm1,%xmm2
  movdqa %xmm3,%xmm1
  pcmpgtw %xmm0,%xmm1
  punpcklwd %xmm1,%xmm9
  punpckhwd %xmm1,%xmm0
  paddd  %xmm9,%xmm2
  paddd  %xmm0,%xmm2
  movdqa %xmm2,%xmm9
  cmp    %rcx,%rdx
  jne    L89
  movdqa %xmm2,%xmm0
  movdqa %xmm8,%xmm1
  mov    %eax,%edx
  psrldq $0x8,%xmm0
  and    $0xfffffff0,%edx
  paddd  %xmm0,%xmm9
  movdqa %xmm9,%xmm0
  psrldq $0x4,%xmm0
  paddd  %xmm0,%xmm9
  movdqa %xmm8,%xmm0
  psrldq $0x8,%xmm0
  movd   %xmm9,%esi
  paddd  %xmm0,%xmm1
  movdqa %xmm1,%xmm0
  psrldq $0x4,%xmm0
  paddd  %xmm0,%xmm1
  movd   %xmm1,%ecx
  test   $0xf,%al
  je     L29
L39:
  movslq %edx,%rdx
  jmp    L66
  nopl   0x0(%rax)
L5:
  cmp    $0x3a,%dil
  sete   %dil
  add    $0x1,%rdx
  movzbl %dil,%edi
  add    %edi,%ecx
  cmp    %edx,%eax
  jle    L29
L66:
  movzbl (%rbx,%rdx,1),%edi
  cmp    $0x2e,%dil
  jne    L5
  add    $0x1,%rdx
  add    $0x1,%esi
  cmp    %edx,%eax
  jg     L66
L29:
  mov    %ecx,%ebx
  mov    $0xffffffff,%eax
  or     %esi,%ebx
  je     L22
  xor    %eax,%eax
  cmp    %esi,%ecx
  setl   %al
L22:
  pop    %rbx
  ret
  nop
L97:
  mov    $0xffffffff,%eax
  pop    %rbx
  ret
L82:
  xor    %edx,%edx
  xor    %ecx,%ecx
  xor    %esi,%esi
  jmp    L39
```

tool_calls: name: unpack_data
arguments: tag: D18
type_infered: byte[16]
name: unpack_data
arguments: tag: D4
type_infered: byte[16]
name: unpack_data
arguments: tag: D25
type_infered: byte[16]

tool: {"D18": [0x3a,0x3a,0x3a,0x3a,0x3a,0x3a,0x3a,0x3a,0x3a,0x3a,0x3a,0x3a,0x3a,0x3a,0x3a,0x3a]}

tool: {"D4": [0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01]}

tool: {"D25": [0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e]}

assistant: ```c
int isIpv4(char *buf) {
  int len = strlen(buf);
  int dot_count = 0, colon_count = 0, i;
  for (i = 0; i < len; i++) {
    if (buf[i] == '.')
      dot_count++;
    if (buf[i] == ':')
      colon_count++;
  }
  if (dot_count == 0 && colon_count == 0)
    return -1;
  if (dot_count > colon_count)
    return 1;
  else
    return 0;
}
```