user: 请从给定的汇编指令推导出C源代码：

```asm
<gen_idl2c_name>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x30,%rsp
  mov    %rdi,-0x28(%rbp)
  cmpq   $0x0,-0x28(%rbp)
  je     L5
  mov    -0x28(%rbp),%rax
  movzbl (%rax),%eax
  test   %al,%al
  jne    L60
L5:
  mov    $0x0,%eax
  jmp    L107
L60:
  mov    -0x28(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  mov    %eax,%esi
  mov    $0x2,%edi
  call   <calloc@plt>
  mov    %rax,-0x8(%rbp)
  mov    -0x8(%rbp),%rax
  mov    %rax,-0x10(%rbp)
  mov    -0x28(%rbp),%rax
  mov    %rax,-0x18(%rbp)
  movl   $0x1,-0x1c(%rbp)
  mov    -0x18(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x18(%rbp)
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,%edi
  call   <tolower@plt>
  mov    %rax,%rcx
  mov    -0x10(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x10(%rbp)
  mov    %ecx,%edx
  mov    %dl,(%rax)
  jmp    L110
L71:
  mov    -0x28(%rbp),%rax
  add    $0x4,%rax
  cmp    %rax,-0x18(%rbp)
  jne    L140
  mov    -0x28(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x48,%al
  jne    L140
  mov    -0x28(%rbp),%rax
  add    $0x1,%rax
  movzbl (%rax),%eax
  cmp    $0x54,%al
  jne    L140
  mov    -0x28(%rbp),%rax
  add    $0x2,%rax
  movzbl (%rax),%eax
  cmp    $0x4d,%al
  jne    L140
  mov    -0x28(%rbp),%rax
  add    $0x3,%rax
  movzbl (%rax),%eax
  cmp    $0x4c,%al
  jne    L140
  mov    -0x18(%rbp),%rax
  add    $0x1,%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,%edi
  call   <islower@plt>
  test   %rax,%rax
  jne    L140
  mov    -0x10(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x10(%rbp)
  movb   $0x5f,(%rax)
L140:
  mov    -0x18(%rbp),%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,%edi
  call   <islower@plt>
  test   %rax,%rax
  je     L39
  cmpl   $0x0,-0x1c(%rbp)
  jne    L33
  mov    -0x10(%rbp),%rax
  sub    -0x8(%rbp),%rax
  cmp    $0x3,%rax
  jle    L74
  mov    -0x10(%rbp),%rax
  sub    $0x3,%rax
  movzbl (%rax),%eax
  cmp    $0x5f,%al
  je     L33
L74:
  mov    -0x10(%rbp),%rax
  movzbl -0x1(%rax),%edx
  mov    -0x10(%rbp),%rax
  mov    %dl,(%rax)
  mov    -0x10(%rbp),%rax
  sub    $0x1,%rax
  movb   $0x5f,(%rax)
  addq   $0x1,-0x10(%rbp)
L33:
  movl   $0x1,-0x1c(%rbp)
  jmp    L88
L39:
  movl   $0x0,-0x1c(%rbp)
L88:
  mov    -0x18(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x18(%rbp)
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,%edi
  call   <tolower@plt>
  mov    %rax,%rcx
  mov    -0x10(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x10(%rbp)
  mov    %ecx,%edx
  mov    %dl,(%rax)
L110:
  mov    -0x18(%rbp),%rax
  movzbl (%rax),%eax
  test   %al,%al
  jne    L71
  mov    -0x8(%rbp),%rax
L107:
  leave
  ret
```

assistant: ```c
char *gen_idl2c_name(const char *idlname) {
  const char *inc;
  char *outc;
  char *name;
  int waslower;
  if ((idlname == NULL) || (idlname[0] == 0)) {
    return NULL;
  }
  name = calloc(2, strlen(idlname));
  outc = name;
  inc = idlname;
  waslower = 1;
  *outc++ = tolower(*inc++);
  while (*inc != 0) {
    if ((inc == (idlname + 4)) && (idlname[0] == 'H') && (idlname[1] == 'T') && (idlname[2] == 'M') && (idlname[3] == 'L') && (islower(inc[1]) == 0)) {
      *outc++ = '_';
    }
    if (islower(*inc) != 0) {
      if (waslower == 0) {
        if (((outc - name) <= 3) || (*(outc - 3) != '_')) {
          *outc = *(outc - 1);
          *(outc - 1) = '_';
          outc++;
        }
      }
      waslower = 1;
    } else {
      waslower = 0;
    }
    *outc++ = tolower(*inc++);
  }
  return name;
}
```