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

```asm
<autolink_delim>:
  endbr64
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  test   %rsi,%rsi
  je     L157
  mov    %rdi,%r13
  mov    $0x0,%ebx
L125:
  cmpb   $0x3c,0x0(%r13,%rbx,1)
  je     L200
  add    $0x1,%rbx
  cmp    %rbx,%rsi
  jne    L125
  mov    %rsi,%rbx
  jmp    L286
L200:
  test   %rbx,%rbx
  je     L157
L286:
  lea    D6(%rip),%r14
  jmp    L218
L35:
  cmp    %rbp,%rbx
  ja     L28
L64:
  test   %r12,%r12
  je     L157
L111:
  mov    %r12,%rbx
L218:
  lea    -0x1(%rbx),%r12
  lea    0x0(%r13,%r12,1),%rbp
  movsbl 0x0(%rbp),%esi
  mov    %r14,%rdi
  call   <strchr@plt>
  test   %rax,%rax
  jne    L64
  movzbl 0x0(%rbp),%edx
  cmp    $0x3b,%dl
  jne    L121
  sub    $0x2,%rbx
  mov    %rbx,%rbp
  je     L111
L306:
  movsbl 0x0(%r13,%rbp,1),%edi
  call   <isalpha@plt>
  test   %rax,%rax
  je     L35
  sub    $0x1,%rbp
  jne    L306
  cmpb   $0x26,0x0(%r13)
  jne    L64
L157:
  mov    $0x0,%ebx
  jmp    L246
L28:
  cmpb   $0x26,0x0(%r13,%rbp,1)
  cmove  %rbp,%r12
  jmp    L64
L121:
  test   %rbx,%rbx
  je     L246
  cmp    $0x29,%dl
  je     L26
  jle    L124
  cmp    $0x5d,%dl
  je     L89
  cmp    $0x7d,%dl
  jne    L246
  mov    $0x7b,%edi
  jmp    L224
L124:
  cmp    $0x22,%dl
  je     L25
  cmp    $0x27,%dl
  jne    L246
  mov    %edx,%edi
L224:
  mov    %r13,%rax
  add    %rbx,%r13
  mov    $0x0,%r8d
  mov    $0x0,%esi
  jmp    L145
L285:
  add    $0x1,%r8
L4:
  add    $0x1,%rax
  cmp    %r13,%rax
  je     L209
L145:
  movzbl (%rax),%ecx
  cmp    %dil,%cl
  je     L285
  cmp    %cl,%dl
  sete   %cl
  movzbl %cl,%ecx
  add    %rcx,%rsi
  jmp    L4
L26:
  mov    $0x28,%edi
  jmp    L224
L25:
  mov    %edx,%edi
  jmp    L224
L89:
  mov    $0x5b,%edi
  jmp    L224
L209:
  cmp    %r8,%rsi
  cmovne %r12,%rbx
L246:
  mov    %rbx,%rax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
```

tool_calls: name: parse_data
arguments: data_tag: D6
type: string

tool: D6: ?!.,

assistant: ```c
size_t autolink_delim(char *data, size_t link_end, size_t offset, size_t size) {
  char cclose, copen = 0;
  size_t i;
  for (i = 0; i < link_end; ++i)
    if (data[i] == '<') {
      link_end = i;
      break;
    }
  while (link_end > 0) {
    if (strchr("?!.,", data[link_end - 1]) != NULL)
      link_end--;
    else if (data[link_end - 1] == ';') {
      size_t new_end = link_end - 2;
      while (new_end > 0 && isalpha(data[new_end]))
        new_end--;
      if (new_end < link_end - 2 && data[new_end] == '&')
        link_end = new_end;
      else
        link_end--;
    } else
      break;
  }
  if (link_end == 0)
    return 0;
  cclose = data[link_end - 1];
  switch (cclose) {
  case '"':
    copen = '"';
    break;
  case '\'':
    copen = '\'';
    break;
  case ')':
    copen = '(';
    break;
  case ']':
    copen = '[';
    break;
  case '}':
    copen = '{';
    break;
  }
  if (copen != 0) {
    size_t closing = 0;
    size_t opening = 0;
    size_t i = 0;
    while (i < link_end) {
      if (data[i] == copen)
        opening++;
      else if (data[i] == cclose)
        closing++;
      i++;
    }
    if (closing != opening)
      link_end--;
  }
  return link_end;
}
```