user: 请显示与下面列出的汇编代码相匹配的C语言实现:

```asm
<format_replace_emails>:
  endbr64
  push   %r15
  mov    %rdi,%r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  mov    %rsi,%rbp
  push   %rbx
  sub    $0x58,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x48(%rsp)
  xor    %eax,%eax
  call   <strlen@plt>
  test   %eax,%eax
  jle    L261
  mov    %eax,%r14d
  xor    %r12d,%r12d
  xor    %edx,%edx
  xor    %eax,%eax
  jmp    L49
  nopl   0x0(%rax)
L241:
  movslq %edx,%rax
  add    $0x1,%edx
  mov    %cl,0x0(%rbp,%rax,1)
  mov    %esi,%eax
L31:
  cmp    %eax,%r14d
  jle    L147
L49:
  movslq %eax,%rcx
  lea    0x1(%rax),%esi
  movzbl (%r15,%rcx,1),%ecx
  test   %eax,%eax
  jle    L241
  cmp    $0x40,%cl
  jne    L241
  lea    -0x2(%r14),%edi
  cmp    %eax,%edi
  jle    L241
  cmp    %esi,%r14d
  jle    L149
  movslq %esi,%rdi
  mov    %esi,%ebx
  add    %r15,%rdi
  jmp    L95
  nopl   0x0(%rax)
L119:
  cmp    $0x2e,%r10b
  sete   %r10b
  movzbl %r10b,%r10d
  add    %r10d,%r12d
L219:
  add    $0x1,%ebx
  add    $0x1,%rdi
  cmp    %ebx,%r14d
  je     L22
L95:
  movzbl (%rdi),%r10d
  cmp    $0x2c,%r10b
  ja     L119
  movabs $0xffffeffeffffdbff,%rcx
  bt     %r10,%rcx
  jb     L219
L22:
  test   %r12d,%r12d
  jne    L69
  movslq %edx,%rax
  add    $0x1,%edx
  movb   $0x40,0x0(%rbp,%rax,1)
  mov    %esi,%eax
  cmp    %eax,%r14d
  jg     L49
L147:
  movslq %edx,%rdx
  add    %rdx,%rbp
L261:
  movb   $0x0,0x0(%rbp)
  mov    0x48(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L0
  add    $0x58,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   (%rax)
L69:
  mov    %eax,%r11d
  sub    $0x1,%r11d
  je     L74
  movslq %r11d,%rsi
  jmp    L217
  nopw   0x0(%rax,%rax,1)
L199:
  sub    $0x1,%rsi
  test   %esi,%esi
  je     L74
L217:
  movzbl (%r15,%rsi,1),%edi
  cmp    $0x2c,%dil
  ja     L199
  movabs $0xffffeffeffffdbff,%rcx
  bt     %rdi,%rcx
  jb     L199
  lea    0x1(%rsi),%edi
  mov    %edi,0x1c(%rsp)
  sub    %edi,%eax
  mov    %eax,%r11d
L273:
  sub    %r11d,%edx
  mov    $0x0,%eax
  lea    0x20(%rsp),%rdi
  mov    %edx,%r13d
  lea    D16(%rip),%rsi
  lea    D11(%rip),%rdx
  mov    %rdi,(%rsp)
  cmovs  %eax,%r13d
  call   <sprintf@plt>
  mov    (%rsp),%rdi
  movslq %r13d,%rsi
  lea    0x0(%rbp,%rsi,1),%rdx
  xor    %esi,%esi
  jmp    L204
  cs nopw 0x0(%rax,%rax,1)
L210:
  movzbl (%rdi,%rsi,1),%eax
  add    $0x1,%rdx
  add    $0x1,%rsi
  mov    %r11d,%r13d
  mov    %al,-0x1(%rdx)
L204:
  mov    %rsi,0x10(%rsp)
  mov    %rdx,0x8(%rsp)
  mov    %rdi,(%rsp)
  call   <strlen@plt>
  mov    0x10(%rsp),%rsi
  mov    (%rsp),%rdi
  lea    0x1(%r13),%r11d
  mov    0x8(%rsp),%rdx
  cmp    %esi,%eax
  jg     L210
  movslq 0x1c(%rsp),%rax
  cmp    %eax,%ebx
  jle    L270
  movslq %r13d,%rsi
  mov    %rax,%rdx
  sub    %rax,%rsi
  lea    0x0(%rbp,%rsi,1),%rdi
  cs nopw 0x0(%rax,%rax,1)
L263:
  movzbl (%r15,%rdx,1),%esi
  mov    %sil,(%rdi,%rdx,1)
  add    $0x1,%rdx
  cmp    %edx,%ebx
  jg     L263
  mov    %ebx,%edi
  sub    0x1c(%rsp),%edi
  lea    0x0(%r13,%rdi,1),%edx
  movslq %edx,%rsi
  lea    0x2(%rdx),%r11d
  add    $0x1,%edx
  movslq %edx,%rdx
  movb   $0x22,0x0(%rbp,%rsi,1)
  movslq %r11d,%rsi
  movb   $0x3e,0x0(%rbp,%rdx,1)
  sub    %rax,%rsi
  add    %rbp,%rsi
  nopl   0x0(%rax)
L104:
  movzbl (%r15,%rax,1),%edx
  mov    %dl,(%rsi,%rax,1)
  add    $0x1,%rax
  cmp    %eax,%ebx
  jg     L104
  lea    (%rdi,%r11,1),%eax
L134:
  movslq %eax,%rdx
  movb   $0x3c,0x0(%rbp,%rdx,1)
  lea    0x1(%rax),%edx
  movslq %edx,%rdx
  movb   $0x2f,0x0(%rbp,%rdx,1)
  lea    0x2(%rax),%edx
  movslq %edx,%rdx
  movb   $0x61,0x0(%rbp,%rdx,1)
  lea    0x4(%rax),%edx
  add    $0x3,%eax
  cltq
  movb   $0x3e,0x0(%rbp,%rax,1)
  mov    %ebx,%eax
  jmp    L31
L74:
  movl   $0x1,0x1c(%rsp)
  jmp    L273
L270:
  movslq %r11d,%r11
  movb   $0x22,(%rdx)
  lea    0x2(%r13),%eax
  movb   $0x3e,0x0(%rbp,%r11,1)
  jmp    L134
L149:
  mov    %esi,%ebx
  jmp    L22
L0:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: parse_data
arguments: data_tag: D16
datatype: string
name: parse_data
arguments: data_tag: D11
datatype: string

tool: D16: %s

tool: D11: <a href="mailto:

assistant: ```c
void format_replace_emails(char *text, char *result) {
  char str[32];
  int i, start, end, k, length = strlen(text);
  int ctr = 0, dots = 0;
  for (i = 0; i < length; i++) {
    if ((text[i] == '@') && (i > 0) && (i < length - 2)) {
      end = i + 1;
      while (end < length) {
        if ((text[end] == ' ') || (text[end] == ',') || (text[end] == 10) || (text[end] == 13)) {
          break;
        }
        if (text[end] == '.')
          dots++;
        end++;
      }
      if (dots == 0) {
        result[ctr++] = text[i];
        continue;
      }
      start = i - 1;
      while (start >= 1) {
        if ((text[start] == ' ') || (text[start] == ',') || (text[start] == 10) || (text[start] == 13)) {
          break;
        }
        start--;
      }
      start++;
      ctr -= (i - start);
      if (ctr < 0)
        ctr = 0;
      sprintf(str, "%s", "<a href=\"mailto:");
      for (k = 0; k < strlen(str); k++) {
        result[ctr++] = str[k];
      }
      for (k = start; k < end; k++) {
        result[ctr++] = text[k];
      }
      result[ctr++] = '"';
      result[ctr++] = '>';
      for (k = start; k < end; k++) {
        result[ctr++] = text[k];
      }
      result[ctr++] = '<';
      result[ctr++] = '/';
      result[ctr++] = 'a';
      result[ctr++] = '>';
      i = end - 1;
    } else {
      result[ctr++] = text[i];
    }
  }
  result[ctr] = 0;
}
```