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

```asm
<buildfname>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x18,%rsp
  mov    %rdi,%rbp
  mov    %rsi,%r14
  mov    %rdx,(%rsp)
  mov    %ecx,0xc(%rsp)
  cmpb   $0x2a,(%rdi)
  sete   %al
  movzbl %al,%eax
  add    %rax,%rbp
  movzbl 0x0(%rbp),%ebx
  cmp    $0x3b,%bl
  ja     L44
  movabs $0x800102000000001,%rax
  bt     %rbx,%rax
  jb     L10
  mov    %ebx,%eax
  mov    %rbp,%r12
  mov    $0x0,%r13d
  jmp    L23
L44:
  mov    %ebx,%eax
  mov    %rbp,%r12
  mov    $0x0,%r13d
L23:
  movabs $0x800102000000001,%r15
L2:
  cmp    $0x26,%al
  je     L43
  add    $0x1,%r13d
L113:
  add    $0x1,%r12
  movzbl (%r12),%eax
  cmp    $0x3b,%al
  ja     L2
  bt     %rax,%r15
  jae    L2
  cmp    0xc(%rsp),%r13d
  jge    L6
  mov    (%rsp),%r12
  lea    D10(%rip),%r15
  movabs $0x800102000000001,%r13
L100:
  cmp    $0x26,%bl
  je     L131
  mov    %bl,(%r12)
  lea    0x1(%r12),%r12
L142:
  add    $0x1,%rbp
  movzbl 0x0(%rbp),%ebx
  cmp    $0x3b,%bl
  ja     L100
  bt     %rbx,%r13
  jae    L100
L41:
  movb   $0x0,(%r12)
L46:
  add    $0x18,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L43:
  mov    %r14,%rdi
  call   <strlen@plt>
  add    %eax,%r13d
  jmp    L113
L6:
  movslq 0xc(%rsp),%rsi
  mov    %rbp,%rcx
  lea    D10(%rip),%rdx
  mov    (%rsp),%rdi
  mov    $0x0,%eax
  call   <snprintf@plt>
  jmp    L46
L131:
  mov    %r12,%rax
  sub    (%rsp),%rax
  mov    $0x8,%esi
  sub    %rax,%rsi
  mov    %r14,%rcx
  mov    %r15,%rdx
  mov    %r12,%rdi
  mov    $0x0,%eax
  call   <snprintf@plt>
  movsbl (%r12),%edi
  call   <toupper@plt>
  mov    %al,(%r12)
  mov    %r12,%rdi
  call   <strlen@plt>
  add    %rax,%r12
  jmp    L142
L10:
  cmpl   $0x0,0xc(%rsp)
  jle    L6
  mov    (%rsp),%r12
  jmp    L41
```

tool_calls: name: extract_symbolic_data
arguments: tag: D10
type_infered: string

tool: D10: %s

assistant: ```c
void buildfname(gecos, login, buf, buflen) register char *gecos;
char *login;
char *buf;
int buflen;
{
  register char *p;
  register char *bp = buf;
  int l;
  if (*gecos == '*')
    gecos++;
  l = 0;
  for (p = gecos; *p != '\0' && *p != ',' && *p != ';' && *p != '%'; p++) {
    if (*p == '&')
      l += strlen(login);
    else
      l++;
  }
  if (l > buflen - 1) {
    if (0)
      printf("snprintf (buf, buflen, format, gecos)\n");
    if (0)
      printf("sizeof (buf) = %d\n", sizeof(buf));
    if (0)
      printf("buflen = %d\n", buflen);
    if (0)
      printf("strlen (gecos)=%d\n", strlen(gecos));
    snprintf(buf, buflen, "%s", gecos);
    return;
  }
  for (p = gecos; *p != '\0' && *p != ',' && *p != ';' && *p != '%'; p++) {
    if (*p == '&') {
      if (0)
        printf("snprintf(bp, SPACELEFT(buf, bp), format, login)\n");
      if (0)
        printf("sizeof(bp) = %d\n", sizeof(bp));
      if (0)
        printf("SPACELEFT(buf,bp)=%d\n", (sizeof buf - ((bp)-buf)));
      if (0)
        printf("strlen(login)=%d\n", strlen(login));
      snprintf(bp, (sizeof buf - ((bp)-buf)), "%s", login);
      *bp = toupper(*bp);
      bp += strlen(bp);
    } else {
      if (0)
        printf("*bp++=*p\n:");
      if (0)
        printf("bp-buf=%d\n", (bp - buf));
      *bp++ = *p;
    }
  }
  *bp = '\0';
  if (0)
    printf("leaving buildfname\n");
}
```