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

```asm
<autolink_delim>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  xor    %r12d,%r12d
  push   %rbp
  mov    %rdi,%rbp
  push   %rbx
  sub    $0x8,%rsp
  test   %rsi,%rsi
  jne    L177
  jmp    L73
  nopw   0x0(%rax,%rax,1)
L164:
  add    $0x1,%r12
  cmp    %r12,%rsi
  je     L23
L177:
  cmpb   $0x3c,0x0(%rbp,%r12,1)
  jne    L164
  test   %r12,%r12
  je     L73
L23:
  lea    D4(%rip),%r14
  jmp    L249
  nopl   0x0(%rax,%rax,1)
L297:
  test   %r13,%r13
  je     L73
L36:
  mov    %r13,%r12
L249:
  lea    -0x1(%r12),%r13
  mov    %r14,%rdi
  lea    0x0(%rbp,%r13,1),%rbx
  movsbl (%rbx),%esi
  call   <strchr@plt>
  test   %rax,%rax
  jne    L297
  movzbl (%rbx),%ecx
  cmp    $0x3b,%cl
  jne    L298
  sub    $0x2,%r12
  mov    %r12,%rbx
  jne    L306
  jmp    L36
  nopl   (%rax)
L153:
  sub    $0x1,%rbx
  je     L160
L306:
  movsbl 0x0(%rbp,%rbx,1),%edi
  lea    0x0(%rbp,%rbx,1),%r15
  call   <isalpha@plt>
  test   %rax,%rax
  jne    L153
  cmp    %rbx,%r12
  jbe    L297
  cmpb   $0x26,(%r15)
  jne    L297
  mov    %rbx,%r13
  jmp    L36
  nopw   0x0(%rax,%rax,1)
L160:
  cmpb   $0x26,0x0(%rbp)
  jne    L297
L73:
  xor    %r12d,%r12d
L253:
  add    $0x8,%rsp
  mov    %r12,%rax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L298:
  cmp    $0x29,%cl
  je     L59
  jle    L193
  cmp    $0x5d,%cl
  je     L208
  cmp    $0x7d,%cl
  jne    L253
  mov    $0x7b,%edi
L109:
  xor    %eax,%eax
  xor    %r8d,%r8d
  xor    %esi,%esi
  jmp    L24
  nopw   0x0(%rax,%rax,1)
L292:
  cmp    %dl,%cl
  sete   %dl
  add    $0x1,%rax
  movzbl %dl,%edx
  add    %rdx,%rsi
  cmp    %r12,%rax
  jae    L91
L24:
  movzbl 0x0(%rbp,%rax,1),%edx
  cmp    %dil,%dl
  jne    L292
  add    $0x1,%rax
  add    $0x1,%r8
  cmp    %r12,%rax
  jb     L24
L91:
  cmp    %r8,%rsi
  cmovne %r13,%r12
  jmp    L253
  nopl   0x0(%rax)
L193:
  cmp    $0x22,%cl
  je     L41
  cmp    $0x27,%cl
  jne    L253
  mov    $0x27,%edi
  jmp    L109
  nopl   0x0(%rax)
L41:
  mov    $0x22,%edi
  jmp    L109
  nop
L208:
  mov    $0x5b,%edi
  jmp    L109
L59:
  mov    $0x28,%edi
  jmp    L109
```

tool_calls: name: disassemble_data
arguments: data_tag: D4
datatype: string

tool: D4: ?!.,

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;
}
```