user: Demonstrate the C code that generates the assembly output below:

```asm
<check_backup_name>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x270,%rsp
  mov    %edi,-0x264(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  lea    D33(%rip),%rax
  mov    %rax,%rdi
  call   <DataManager_GetStrValue@plt>
  mov    %eax,%edi
  call   <strlen@plt>
  mov    %eax,-0x258(%rbp)
  cmpl   $0x40,-0x258(%rbp)
  jle    L7
  cmpl   $0x0,-0x264(%rbp)
  je     L159
  lea    D38(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <ui_print@plt>
L159:
  mov    $0xfffffffe,%eax
  jmp    L53
L7:
  lea    D33(%rip),%rax
  mov    %rax,%rdi
  call   <DataManager_GetStrValue@plt>
  mov    %eax,%ecx
  mov    -0x258(%rbp),%edx
  lea    -0x250(%rbp),%rax
  mov    %ecx,%esi
  mov    %rax,%rdi
  call   <strncpy@plt>
  lea    -0x250(%rbp),%rax
  lea    D66(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L128
  mov    $0x0,%eax
  jmp    L53
L128:
  movl   $0x0,-0x25c(%rbp)
  jmp    L141
L182:
  mov    -0x25c(%rbp),%eax
  cltq
  movzbl -0x250(%rbp,%rax,1),%eax
  movsbl %al,%eax
  mov    %eax,-0x254(%rbp)
  cmpl   $0x2f,-0x254(%rbp)
  jle    L215
  cmpl   $0x39,-0x254(%rbp)
  jle    L228
L215:
  cmpl   $0x40,-0x254(%rbp)
  jle    L169
  cmpl   $0x5b,-0x254(%rbp)
  jle    L228
L169:
  cmpl   $0x5d,-0x254(%rbp)
  je     L228
  cmpl   $0x5f,-0x254(%rbp)
  je     L228
  cmpl   $0x60,-0x254(%rbp)
  jle    L174
  cmpl   $0x7b,-0x254(%rbp)
  jle    L228
L174:
  cmpl   $0x7d,-0x254(%rbp)
  je     L228
  cmpl   $0x2d,-0x254(%rbp)
  je     L228
  cmpl   $0x2e,-0x254(%rbp)
  je     L228
  cmpl   $0x0,-0x264(%rbp)
  je     L89
  mov    -0x254(%rbp),%eax
  movsbl %al,%edx
  lea    -0x250(%rbp),%rax
  mov    %rax,%rsi
  lea    D54(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <ui_print@plt>
L89:
  mov    $0xfffffffd,%eax
  jmp    L53
L228:
  addl   $0x1,-0x25c(%rbp)
L141:
  mov    -0x25c(%rbp),%eax
  cmp    -0x258(%rbp),%eax
  jl     L182
  lea    D52(%rip),%rax
  mov    %rax,%rdi
  call   <DataManager_GetStrValue@plt>
  mov    %eax,%edx
  lea    -0x210(%rbp),%rax
  mov    %edx,%esi
  mov    %rax,%rdi
  call   <strcpy@plt>
  lea    -0x250(%rbp),%rcx
  lea    -0x210(%rbp),%rdx
  lea    -0x110(%rbp),%rax
  lea    D73(%rip),%rsi
  mov    %rax,%rdi
  call   <sprintf@plt>
  lea    -0x260(%rbp),%rdx
  lea    -0x110(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <statfs@plt>
  test   %rax,%rax
  jne    L95
  cmpl   $0x0,-0x264(%rbp)
  je     L18
  lea    D27(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <ui_print@plt>
L18:
  mov    $0xfffffffc,%eax
  jmp    L53
L95:
  mov    $0x0,%eax
L53:
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L160
  call   <__stack_chk_fail@plt>
L160:
  leave
  ret
```

tool_calls: name: retrieve_data
arguments: label: D33
datatype: string
name: retrieve_data
arguments: label: D38
datatype: string
name: retrieve_data
arguments: label: D66
datatype: string
name: retrieve_data
arguments: label: D54
datatype: string
name: retrieve_data
arguments: label: D52
datatype: string
name: retrieve_data
arguments: label: D73
datatype: string
name: retrieve_data
arguments: label: D27
datatype: string

tool: D33: tw_backup_name

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


tool: D66: 0

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


tool: D52: tw_backups_folder

tool: D73: %s/%s/.

tool: D27: 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;
}
```