user: 请将以下的汇编代码转换成C语言代码：

```asm
<refscpy>:
  endbr64
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x50,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x48(%rsp)
  xor    %eax,%eax
  movzbl (%rdx),%eax
  test   %al,%al
  je     L298
  mov    %esi,%ebx
  mov    %rdx,%rcx
  lea    D4(%rip),%r13
  nopw   0x0(%rax,%rax,1)
L243:
  cmp    $0x3c,%al
  je     L342
  sub    $0x1,%ebx
  test   %ebx,%ebx
  jle    L298
  movb   $0x3c,(%rdi)
  movzbl (%rcx),%eax
  lea    0x1(%rdi),%r12
  mov    %rcx,%rbp
  test   $0xdf,%al
  je     L114
  cmp    $0x2c,%al
  je     L114
  xor    %esi,%esi
  xor    %edx,%edx
  jmp    L121
  nopw   0x0(%rax,%rax,1)
L229:
  cmp    $0x40,%al
  cmove  %rbp,%rsi
L200:
  sub    $0x1,%ebx
  je     L197
  add    $0x1,%rbp
  mov    %al,(%r12)
  add    $0x1,%r12
  movzbl 0x0(%rbp),%eax
  test   $0xdf,%al
  je     L48
  cmp    $0x2c,%al
  je     L48
L121:
  cmp    $0x2e,%al
  jne    L229
  mov    %rbp,%rdx
  jmp    L200
  nopl   0x0(%rax)
L213:
  sub    $0x1,%ebx
  test   %ebx,%ebx
  jle    L298
  add    $0x1,%rdi
  add    $0x1,%rcx
  mov    %al,-0x1(%rdi)
  cmp    $0x3e,%al
  je     L117
L342:
  movzbl (%rcx),%eax
  test   %al,%al
  jne    L213
  test   %ebx,%ebx
  jle    L298
L230:
  movzbl (%rcx),%eax
  test   %al,%al
  jne    L243
  nopl   0x0(%rax,%rax,1)
L298:
  mov    %rdi,%r12
L197:
  movb   $0x0,(%r12)
  mov    0x48(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L323
  add    $0x50,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
  nopl   0x0(%rax)
L48:
  test   %rdx,%rdx
  je     L114
  test   %rsi,%rsi
  jne    L114
  movb   $0x0,(%rdx)
  mov    %rsp,%r14
  add    $0x1,%rdx
  xor    %eax,%eax
  movb   $0x0,(%r12)
  mov    %r14,%rdi
  mov    %r13,%rsi
  call   <sprintf@plt>
  mov    %r14,%rdi
  call   <strlen@plt>
  cmp    %eax,%ebx
  jg     L355
L114:
  sub    $0x1,%ebx
  test   %ebx,%ebx
  jle    L197
  movb   $0x3e,(%r12)
  lea    0x1(%r12),%rdi
  mov    %rbp,%rcx
L117:
  movzbl (%rcx),%eax
  cmp    $0x2c,%al
  je     L217
  cmp    $0x20,%al
  jne    L215
  nopl   0x0(%rax)
L217:
  movzbl 0x1(%rcx),%eax
  add    $0x1,%rcx
  cmp    $0x20,%al
  je     L217
  cmp    $0x2c,%al
  je     L217
L215:
  test   %al,%al
  je     L230
  sub    $0x1,%ebx
  je     L230
  movb   $0x20,(%rdi)
  add    $0x1,%rdi
  jmp    L230
L355:
  lea    0x1(%rax),%rdx
  cmp    $0x8,%edx
  jb     L78
  mov    (%rsp),%rcx
  lea    0x8(%r12),%rdi
  and    $0xfffffffffffffff8,%rdi
  mov    %rcx,(%r12)
  mov    %edx,%ecx
  mov    -0x8(%r14,%rcx,1),%rsi
  mov    %rsi,-0x8(%r12,%rcx,1)
  mov    %r12,%rcx
  sub    %rdi,%rcx
  add    %ecx,%edx
  sub    %rcx,%r14
  and    $0xfffffff8,%edx
  cmp    $0x8,%edx
  jb     L308
  and    $0xfffffff8,%edx
  xor    %ecx,%ecx
L208:
  mov    %ecx,%esi
  add    $0x8,%ecx
  mov    (%r14,%rsi,1),%r8
  mov    %r8,(%rdi,%rsi,1)
  cmp    %edx,%ecx
  jb     L208
L308:
  add    %rax,%r12
  sub    %eax,%ebx
  jmp    L114
L78:
  test   $0x4,%dl
  jne    L104
  test   %edx,%edx
  je     L308
  movzbl (%rsp),%ecx
  mov    %cl,(%r12)
  test   $0x2,%dl
  je     L308
  mov    %edx,%edx
  movzwl -0x2(%r14,%rdx,1),%ecx
  mov    %cx,-0x2(%r12,%rdx,1)
  jmp    L308
L104:
  mov    (%rsp),%ecx
  mov    %edx,%edx
  mov    %ecx,(%r12)
  mov    -0x4(%r14,%rdx,1),%ecx
  mov    %ecx,-0x4(%r12,%rdx,1)
  jmp    L308
L323:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: retrieve_data
arguments: label: D4
type_guessed: string

tool: D4: %s@%s.UUCP

assistant: ```c
void refscpy(dest, destsize, src) register char *dest, *src;
register int destsize;
{
  register char *dot, *at, *beg;
  char tmpbuf[64];
  while (*src) {
    if (*src != '<') {
      if (--destsize <= 0)
        break;
      *dest++ = '<';
      at = dot = ((char *)0);
      beg = src;
      while (*src && *src != ' ' && *src != ',') {
        if (*src == '.')
          dot = src;
        else if (*src == '@')
          at = src;
        if (--destsize <= 0)
          break;
        *dest++ = *src++;
      }
      if (destsize <= 0)
        break;
      if (dot && !at) {
        int len;
        *dest = *dot++ = '\0';
        sprintf(tmpbuf, "%s@%s.UUCP", dot, beg);
        len = strlen(tmpbuf);
        if (destsize > len) {
          strcpy(dest, tmpbuf);
          dest = dest + len;
          destsize -= len;
        }
      }
      if (--destsize <= 0)
        break;
      *dest++ = '>';
    } else {
      while (*src && --destsize > 0 && (*dest++ = *src++) != '>')
        ;
      if (destsize <= 0)
        break;
    }
    while (*src == ' ' || *src == ',')
      src++;
    if (*src && --destsize > 0)
      *dest++ = ' ';
  }
  *dest = '\0';
}
```