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

```asm
<UI_dup_input_boolean>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x50,%rsp
  mov    %rdi,-0x28(%rbp)
  mov    %rsi,-0x30(%rbp)
  mov    %rdx,-0x38(%rbp)
  mov    %rcx,-0x40(%rbp)
  mov    %r8,-0x48(%rbp)
  mov    %r9d,-0x4c(%rbp)
  movq   $0x0,-0x20(%rbp)
  movq   $0x0,-0x18(%rbp)
  movq   $0x0,-0x10(%rbp)
  movq   $0x0,-0x8(%rbp)
  cmpq   $0x0,-0x30(%rbp)
  je     L67
  mov    -0x30(%rbp),%rax
  mov    %rax,%rdi
  call   <BUF_strdup@plt>
  mov    %rax,-0x20(%rbp)
  cmpq   $0x0,-0x20(%rbp)
  jne    L67
  mov    D59(%rip),%rax
  mov    (%rax),%edx
  mov    D23(%rip),%rax
  mov    (%rax),%eax
  mov    %edx,%esi
  mov    %eax,%edi
  call   <UIerr@plt>
  jmp    L49
L67:
  cmpq   $0x0,-0x38(%rbp)
  je     L32
  mov    -0x38(%rbp),%rax
  mov    %rax,%rdi
  call   <BUF_strdup@plt>
  mov    %rax,-0x18(%rbp)
  cmpq   $0x0,-0x18(%rbp)
  jne    L32
  mov    D59(%rip),%rax
  mov    (%rax),%edx
  mov    D23(%rip),%rax
  mov    (%rax),%eax
  mov    %edx,%esi
  mov    %eax,%edi
  call   <UIerr@plt>
  jmp    L49
L32:
  cmpq   $0x0,-0x40(%rbp)
  je     L85
  mov    -0x40(%rbp),%rax
  mov    %rax,%rdi
  call   <BUF_strdup@plt>
  mov    %rax,-0x10(%rbp)
  cmpq   $0x0,-0x10(%rbp)
  jne    L85
  mov    D59(%rip),%rax
  mov    (%rax),%edx
  mov    D23(%rip),%rax
  mov    (%rax),%eax
  mov    %edx,%esi
  mov    %eax,%edi
  call   <UIerr@plt>
  jmp    L49
L85:
  cmpq   $0x0,-0x48(%rbp)
  je     L74
  mov    -0x48(%rbp),%rax
  mov    %rax,%rdi
  call   <BUF_strdup@plt>
  mov    %rax,-0x8(%rbp)
  cmpq   $0x0,-0x8(%rbp)
  jne    L74
  mov    D59(%rip),%rax
  mov    (%rax),%edx
  mov    D23(%rip),%rax
  mov    (%rax),%eax
  mov    %edx,%esi
  mov    %eax,%edi
  call   <UIerr@plt>
  jmp    L49
L74:
  mov    D79(%rip),%rax
  mov    (%rax),%edi
  mov    -0x8(%rbp),%r10
  mov    -0x10(%rbp),%rcx
  mov    -0x18(%rbp),%rdx
  mov    -0x20(%rbp),%rsi
  mov    -0x28(%rbp),%rax
  sub    $0x8,%rsp
  push   0x10(%rbp)
  mov    -0x4c(%rbp),%r8d
  push   %r8
  push   %rdi
  mov    $0x1,%r9d
  mov    %r10,%r8
  mov    %rax,%rdi
  call   <general_allocate_boolean@plt>
  add    $0x20,%rsp
  jmp    L116
L49:
  mov    -0x20(%rbp),%rax
  mov    %rax,%rdi
  call   <free@plt>
  mov    -0x18(%rbp),%rax
  mov    %rax,%rdi
  call   <free@plt>
  mov    -0x10(%rbp),%rax
  mov    %rax,%rdi
  call   <free@plt>
  mov    -0x8(%rbp),%rax
  mov    %rax,%rdi
  call   <free@plt>
  mov    $0xffffffff,%eax
L116:
  leave
  ret
```

assistant: ```c
int UI_dup_input_boolean(UI *ui, const char *prompt, const char *action_desc, const char *ok_chars, const char *cancel_chars, int flags, char *result_buf) {
  char *prompt_copy = NULL;
  char *action_desc_copy = NULL;
  char *ok_chars_copy = NULL;
  char *cancel_chars_copy = NULL;
  if (prompt) {
    prompt_copy = BUF_strdup(prompt);
    if (prompt_copy == NULL) {
      UIerr(UI_F_UI_DUP_INPUT_BOOLEAN, ERR_R_MALLOC_FAILURE);
      goto err;
    }
  }
  if (action_desc) {
    action_desc_copy = BUF_strdup(action_desc);
    if (action_desc_copy == NULL) {
      UIerr(UI_F_UI_DUP_INPUT_BOOLEAN, ERR_R_MALLOC_FAILURE);
      goto err;
    }
  }
  if (ok_chars) {
    ok_chars_copy = BUF_strdup(ok_chars);
    if (ok_chars_copy == NULL) {
      UIerr(UI_F_UI_DUP_INPUT_BOOLEAN, ERR_R_MALLOC_FAILURE);
      goto err;
    }
  }
  if (cancel_chars) {
    cancel_chars_copy = BUF_strdup(cancel_chars);
    if (cancel_chars_copy == NULL) {
      UIerr(UI_F_UI_DUP_INPUT_BOOLEAN, ERR_R_MALLOC_FAILURE);
      goto err;
    }
  }
  return general_allocate_boolean(ui, prompt_copy, action_desc_copy, ok_chars_copy, cancel_chars_copy, 1, UIT_BOOLEAN, flags, result_buf);
err:
  free(prompt_copy);
  free(action_desc_copy);
  free(ok_chars_copy);
  free(cancel_chars_copy);
  return -1;
}
```