user: 请将这段汇编代码片段转换成等效的C代码：

```asm
<setup_add_owner>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x160,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  mov    $0xa,%edi
  call   <putchar@plt>
  lea    D58(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  lea    D170(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  lea    D73(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  lea    D106(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  lea    D105(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  lea    D121(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  lea    D157(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  lea    -0x150(%rbp),%rax
  mov    $0x0,%ecx
  mov    $0x20,%edx
  mov    %rax,%rsi
  lea    D3(%rip),%rax
  mov    %rax,%rdi
  call   <text_input@plt>
  lea    -0x110(%rbp),%rax
  mov    $0x0,%ecx
  mov    $0x100,%edx
  mov    %rax,%rsi
  lea    D178(%rip),%rax
  mov    %rax,%rdi
  call   <text_input@plt>
  lea    D173(%rip),%rax
  mov    %rax,%rdi
  call   <system@plt>
  lea    -0x130(%rbp),%rax
  mov    $0x0,%ecx
  mov    $0x20,%edx
  mov    %rax,%rsi
  lea    D120(%rip),%rax
  mov    %rax,%rdi
  call   <text_input@plt>
  lea    D171(%rip),%rax
  mov    %rax,%rdi
  call   <system@plt>
  lea    D56(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  movzbl -0x150(%rbp),%eax
  test   %al,%al
  je     L82
  movzbl -0x110(%rbp),%eax
  test   %al,%al
  jne    L45
L82:
  lea    D119(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  mov    $0xffffffff,%eax
  jmp    L78
L45:
  lea    -0x150(%rbp),%rax
  mov    %rax,%rdi
  call   <userdb_find_byname@plt>
  test   %rax,%rax
  je     L61
  lea    -0x150(%rbp),%rax
  mov    %rax,%rsi
  lea    D37(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  jmp    L62
L61:
  lea    -0x110(%rbp),%rdx
  lea    -0x150(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <userdb_add@plt>
  mov    %eax,-0x154(%rbp)
  cmpl   $0x0,-0x154(%rbp)
  jne    L85
  lea    -0x150(%rbp),%rax
  mov    %rax,%rsi
  lea    D127(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    $0xffffffff,%eax
  jmp    L78
L85:
  lea    -0x110(%rbp),%rdx
  lea    -0x150(%rbp),%rax
  mov    %rax,%rsi
  lea    D117(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    -0x154(%rbp),%eax
  mov    $0x0,%r8d
  lea    D0(%rip),%rdx
  mov    %rdx,%rcx
  mov    $0x0,%edx
  mov    $0x0,%esi
  mov    %eax,%edi
  call   <mode_set@plt>
  movzbl -0x130(%rbp),%eax
  test   %al,%al
  je     L62
  lea    -0x130(%rbp),%rdx
  mov    -0x154(%rbp),%eax
  mov    %rdx,%rsi
  mov    %eax,%edi
  call   <userdb_set_password@plt>
  lea    D70(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
L62:
  mov    $0x0,%eax
L78:
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L10
  call   <__stack_chk_fail@plt>
L10:
  leave
  ret
```

tool_calls: name: unpack_data
arguments: label: D58
type_infered: string
name: unpack_data
arguments: label: D170
type_infered: string
name: unpack_data
arguments: label: D73
type_infered: string
name: unpack_data
arguments: label: D106
type_infered: string
name: unpack_data
arguments: label: D105
type_infered: string
name: unpack_data
arguments: label: D121
type_infered: string
name: unpack_data
arguments: label: D157
type_infered: string
name: unpack_data
arguments: label: D3
type_infered: string
name: unpack_data
arguments: label: D178
type_infered: string
name: unpack_data
arguments: label: D173
type_infered: string
name: unpack_data
arguments: label: D120
type_infered: string
name: unpack_data
arguments: label: D171
type_infered: string
name: unpack_data
arguments: label: D56
type_infered: string
name: unpack_data
arguments: label: D119
type_infered: string
name: unpack_data
arguments: label: D37
type_infered: string
name: unpack_data
arguments: label: D127
type_infered: string
name: unpack_data
arguments: label: D117
type_infered: string
name: unpack_data
arguments: label: D0
type_infered: string
name: unpack_data
arguments: label: D70
type_infered: string

tool: D58: This will add an owner to your database.


tool: D170: It is important for security that you use the most specific

tool: D73: mask possible.


tool: D106: It is highly recommended that you set a password for this

tool: D105: user.  Users with passwords will have to authenticate with

tool: D121: the bot using the `auth' command before using any privileged

tool: D157: commands.


tool: D3: Handle

tool: D178: Mask

tool: D173: stty -echo

tool: D120: Password

tool: D171: stty echo

tool: D56: 


tool: D119: Canceled.

tool: D37: User `%s' already exists.


tool: D127: Could not add bot user `%s' to database.


tool: D117: Added owner `%s' with mask `%s'.


tool: D0: +w

tool: D70: Set password.

assistant: ```c
int setup_add_owner(void) {
  char name[32], mask[256], pass[32];
  int id;
  putchar('\n');
  printf("This will add an owner to your database.\n\n");
  printf("It is important for security that you use the most specific\n");
  printf("mask possible.\n\n");
  printf("It is highly recommended that you set a password for this\n");
  printf("user.  Users with passwords will have to authenticate with\n");
  printf("the bot using the `auth' command before using any privileged\n");
  printf("commands.\n\n");
  text_input("Handle", name, 32, NULL);
  text_input("Mask", mask, 256, NULL);
  system("stty -echo");
  text_input("Password", pass, 32, NULL);
  system("stty echo");
  printf("\n\n");
  if ((name[0] == 0) || (mask[0] == 0)) {
    printf("Canceled.\n");
    return -1;
  }
  if (userdb_find_byname(name)) {
    printf("User `%s' already exists.\n", name);
  } else {
    id = userdb_add(name, mask);
    if (id == 0) {
      printf("Could not add bot user `%s' to database.\n", name);
      return -1;
    }
    printf("Added owner `%s' with mask `%s'.\n", name, mask);
    mode_set(id, NULL, NULL, "+w", NULL);
    if (pass[0] != 0) {
      userdb_set_password(id, pass);
      printf("Set password.\n");
    }
  }
  return 0;
}
```