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

```asm
<nc_uri>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x30,%rsp
  mov    %rdi,-0x28(%rbp)
  mov    %rsi,-0x30(%rbp)
  mov    -0x30(%rbp),%rax
  mov    0x8(%rax),%rax
  mov    %rax,-0x10(%rbp)
  mov    -0x28(%rbp),%rax
  mov    0x8(%rax),%rax
  mov    %rax,-0x8(%rbp)
  mov    -0x8(%rbp),%rax
  mov    $0x3a,%esi
  mov    %rax,%rdi
  call   <strchr@plt>
  mov    %rax,-0x18(%rbp)
  cmpq   $0x0,-0x18(%rbp)
  je     L106
  mov    -0x18(%rbp),%rax
  add    $0x1,%rax
  movzbl (%rax),%eax
  cmp    $0x2f,%al
  jne    L106
  mov    -0x18(%rbp),%rax
  add    $0x2,%rax
  movzbl (%rax),%eax
  cmp    $0x2f,%al
  je     L65
L106:
  mov    D44(%rip),%rax
  mov    (%rax),%eax
  jmp    L14
L65:
  mov    -0x18(%rbp),%rax
  add    $0x3,%rax
  mov    %rax,-0x8(%rbp)
  mov    -0x8(%rbp),%rax
  mov    $0x3a,%esi
  mov    %rax,%rdi
  call   <strchr@plt>
  mov    %rax,-0x18(%rbp)
  cmpq   $0x0,-0x18(%rbp)
  jne    L92
  mov    -0x8(%rbp),%rax
  mov    $0x2f,%esi
  mov    %rax,%rdi
  call   <strchr@plt>
  mov    %rax,-0x18(%rbp)
L92:
  cmpq   $0x0,-0x18(%rbp)
  jne    L54
  mov    -0x8(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  mov    %eax,-0x1c(%rbp)
  jmp    L164
L54:
  mov    -0x18(%rbp),%rax
  sub    -0x8(%rbp),%rax
  mov    %eax,-0x1c(%rbp)
L164:
  cmpl   $0x0,-0x1c(%rbp)
  jne    L128
  mov    D44(%rip),%rax
  mov    (%rax),%eax
  jmp    L14
L128:
  mov    -0x10(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x2e,%al
  jne    L150
  mov    -0x30(%rbp),%rax
  mov    (%rax),%eax
  cmp    %eax,-0x1c(%rbp)
  jle    L104
  mov    -0x1c(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x30(%rbp),%rax
  mov    (%rax),%eax
  cltq
  sub    %rax,%rdx
  mov    -0x8(%rbp),%rax
  add    %rdx,%rax
  mov    %rax,-0x18(%rbp)
  mov    -0x30(%rbp),%rax
  mov    (%rax),%edx
  mov    -0x10(%rbp),%rcx
  mov    -0x18(%rbp),%rax
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <strncasecmp@plt>
  test   %rax,%rax
  jne    L104
  mov    D0(%rip),%rax
  mov    (%rax),%eax
  jmp    L14
L104:
  mov    D30(%rip),%rax
  mov    (%rax),%eax
  jmp    L14
L150:
  mov    -0x30(%rbp),%rax
  mov    (%rax),%eax
  cmp    %eax,-0x1c(%rbp)
  jne    L121
  mov    -0x1c(%rbp),%edx
  mov    -0x10(%rbp),%rcx
  mov    -0x8(%rbp),%rax
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <strncasecmp@plt>
  test   %rax,%rax
  je     L46
L121:
  mov    D30(%rip),%rax
  mov    (%rax),%eax
  jmp    L14
L46:
  mov    D0(%rip),%rax
  mov    (%rax),%eax
L14:
  leave
  ret
```

assistant: ```c
int nc_uri(ASN1_IA5STRING *uri, ASN1_IA5STRING *base) {
  const char *baseptr = (char *)base->data;
  const char *hostptr = (char *)uri->data;
  const char *p = strchr(hostptr, ':');
  int hostlen;
  if (!p || (p[1] != '/') || (p[2] != '/'))
    return X509_V_ERR_UNSUPPORTED_NAME_SYNTAX;
  hostptr = p + 3;
  p = strchr(hostptr, ':');
  if (!p)
    p = strchr(hostptr, '/');
  if (!p)
    hostlen = strlen(hostptr);
  else
    hostlen = p - hostptr;
  if (hostlen == 0)
    return X509_V_ERR_UNSUPPORTED_NAME_SYNTAX;
  if (*baseptr == '.') {
    if (hostlen > base->length) {
      p = hostptr + hostlen - base->length;
      if (!strncasecmp(p, baseptr, base->length))
        return X509_V_OK;
    }
    return X509_V_ERR_PERMITTED_VIOLATION;
  }
  if ((base->length != (int)hostlen) || strncasecmp(hostptr, baseptr, hostlen))
    return X509_V_ERR_PERMITTED_VIOLATION;
  return X509_V_OK;
}
```