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

```asm
<check_backup_name>:
  endbr64
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x260,%rsp
  mov    %edi,%ebx
  mov    %fs:0x28,%rax
  mov    %rax,0x258(%rsp)
  xor    %eax,%eax
  lea    D4(%rip),%rdi
  call   <DataManager_GetStrValue@plt>
  mov    %eax,%edi
  call   <strlen@plt>
  cmp    $0x40,%eax
  jg     L16
  mov    %eax,%ebp
  lea    D4(%rip),%rdi
  call   <DataManager_GetStrValue@plt>
  mov    %eax,%esi
  lea    0x10(%rsp),%r12
  mov    %ebp,%edx
  mov    %r12,%rdi
  call   <strncpy@plt>
  lea    D45(%rip),%rsi
  mov    %r12,%rdi
  call   <strcmp@plt>
  mov    %rax,%rdx
  mov    $0x0,%eax
  test   %rdx,%rdx
  je     L33
  test   %ebp,%ebp
  jle    L187
  mov    %r12,%rdx
  lea    -0x1(%rbp),%eax
  lea    0x11(%rsp,%rax,1),%rdi
  movabs $0x17ffffff5,%r8
  jmp    L172
L16:
  mov    $0xfffffffe,%eax
  test   %ebx,%ebx
  je     L33
  lea    D64(%rip),%rdi
  mov    $0x0,%eax
  call   <ui_print@plt>
  mov    $0xfffffffe,%eax
  jmp    L33
L40:
  lea    -0x5d(%rcx),%eax
  cmp    $0x20,%al
  ja     L11
  bt     %rax,%r8
  jae    L11
L168:
  add    $0x1,%rdx
  cmp    %rdi,%rdx
  je     L187
L172:
  movzbl (%rdx),%ecx
  movsbl %cl,%eax
  lea    -0x30(%rax),%esi
  cmp    $0x9,%esi
  jbe    L168
  sub    $0x41,%eax
  cmp    $0x1a,%eax
  jbe    L168
  cmp    $0x2e,%cl
  jg     L40
  cmp    $0x2c,%cl
  jg     L168
L11:
  mov    $0xfffffffd,%eax
  test   %ebx,%ebx
  je     L33
  movsbl %cl,%edx
  lea    0x10(%rsp),%rsi
  lea    D58(%rip),%rdi
  mov    $0x0,%eax
  call   <ui_print@plt>
  mov    $0xfffffffd,%eax
  jmp    L33
L187:
  lea    D48(%rip),%rdi
  call   <DataManager_GetStrValue@plt>
  mov    %eax,%esi
  lea    0x50(%rsp),%r12
  mov    %r12,%rdi
  call   <strcpy@plt>
  lea    0x10(%rsp),%rcx
  lea    0x150(%rsp),%rbp
  mov    %r12,%rdx
  lea    D10(%rip),%rsi
  mov    %rbp,%rdi
  call   <sprintf@plt>
  lea    0xc(%rsp),%rsi
  mov    %rbp,%rdi
  call   <statfs@plt>
  test   %rax,%rax
  je     L82
  mov    $0x0,%eax
L33:
  mov    0x258(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L77
  add    $0x260,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  ret
L82:
  mov    $0xfffffffc,%eax
  test   %ebx,%ebx
  je     L33
  lea    D22(%rip),%rdi
  mov    $0x0,%eax
  call   <ui_print@plt>
  mov    $0xfffffffc,%eax
  jmp    L33
L77:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: extract_symbolic_data
arguments: tag: D4
type_guessed: string
name: extract_symbolic_data
arguments: tag: D45
type_guessed: string
name: extract_symbolic_data
arguments: tag: D64
type_guessed: string
name: extract_symbolic_data
arguments: tag: D58
type_guessed: string
name: extract_symbolic_data
arguments: tag: D48
type_guessed: string
name: extract_symbolic_data
arguments: tag: D10
type_guessed: string
name: extract_symbolic_data
arguments: tag: D22
type_guessed: string

tool: D4: tw_backup_name

tool: D45: 0

tool: D64: E:Backup name is too long.


tool: D58: E:Backup name '%s' contains invalid character: '%c'


tool: D48: tw_backups_folder

tool: D10: %s/%s/.

tool: D22: E:A backup with this name already exists.


assistant: ```c
int check_backup_name(int show_error) {
  char backup_name[64];
  char backup_loc[255], tw_image_dir[255];
  int copy_size = strlen(DataManager_GetStrValue("tw_backup_name"));
  int index, cur_char;
  struct statfs st;
  if (copy_size > 64) {
    if (show_error)
      ui_print("E:"
               "Backup name is too long.\n");
    return -2;
  }
  strncpy(backup_name, DataManager_GetStrValue("tw_backup_name"), copy_size);
  if (strcmp(backup_name, "0") == 0)
    return 0;
  for (index = 0; index < copy_size; index++) {
    cur_char = (int)backup_name[index];
    if ((cur_char >= 48 && cur_char <= 57) || (cur_char >= 65 && cur_char <= 91) || cur_char == 93 || cur_char == 95 || (cur_char >= 97 && cur_char <= 123) || cur_char == 125 || cur_char == 45 || cur_char == 46) {
    } else {
      if (show_error)
        ui_print("E:"
                 "Backup name '%s' contains invalid character: '%c'\n",
                 backup_name, (char)cur_char);
      return -3;
    }
  }
  strcpy(backup_loc, DataManager_GetStrValue("tw_backups_folder"));
  sprintf(tw_image_dir, "%s/%s/.", backup_loc, backup_name);
  if (statfs(tw_image_dir, &st) == 0) {
    if (show_error)
      ui_print("E:"
               "A backup with this name already exists.\n");
    return -4;
  }
  return 0;
}
```