user: 请将以下的汇编代码转换成C语言代码：

```asm
<UI_dup_input_boolean>:
  endbr64
  push   %r15
  mov    %rcx,%r15
  push   %r14
  mov    %rdi,%r14
  push   %r13
  mov    %rdx,%r13
  push   %r12
  mov    %rsi,%r12
  push   %rbp
  mov    %r8,%rbp
  push   %rbx
  mov    %r9d,%ebx
  sub    $0x8,%rsp
  test   %rsi,%rsi
  je     L61
  mov    %rsi,%rdi
  call   <OPENSSL_strdup@plt>
  mov    %rax,%r12
  test   %rax,%rax
  je     L8
L61:
  test   %r13,%r13
  je     L91
  mov    %r13,%rdi
  call   <OPENSSL_strdup@plt>
  mov    %rax,%r13
  test   %rax,%rax
  je     L26
L91:
  test   %r15,%r15
  je     L52
  mov    %r15,%rdi
  call   <OPENSSL_strdup@plt>
  mov    %rax,%r15
  test   %rax,%rax
  je     L46
L52:
  test   %rbp,%rbp
  je     L39
  mov    %rbp,%rdi
  call   <OPENSSL_strdup@plt>
  mov    %rax,%rbp
  test   %rax,%rax
  je     L46
L39:
  mov    D12(%rip),%rax
  mov    %rbp,%r8
  mov    %r15,%rcx
  mov    %r13,%rdx
  sub    $0x8,%rsp
  mov    $0x1,%r9d
  mov    %r12,%rsi
  mov    %r14,%rdi
  push   0x48(%rsp)
  push   %rbx
  mov    (%rax),%eax
  push   %rax
  call   <general_allocate_boolean@plt>
  add    $0x20,%rsp
L60:
  add    $0x8,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L46:
  mov    D26(%rip),%rax
  mov    (%rax),%esi
  mov    D36(%rip),%rax
  mov    (%rax),%edi
  call   <UIerr@plt>
L73:
  mov    %r12,%rdi
  call   <OPENSSL_free@plt>
  mov    %r13,%rdi
  call   <OPENSSL_free@plt>
  mov    %r15,%rdi
  call   <OPENSSL_free@plt>
  xor    %edi,%edi
  call   <OPENSSL_free@plt>
  mov    $0xffffffff,%eax
  jmp    L60
L26:
  mov    D26(%rip),%rax
  xor    %r15d,%r15d
  mov    (%rax),%esi
  mov    D36(%rip),%rax
  mov    (%rax),%edi
  call   <UIerr@plt>
  jmp    L73
L8:
  mov    D26(%rip),%rax
  xor    %r15d,%r15d
  xor    %r13d,%r13d
  mov    (%rax),%esi
  mov    D36(%rip),%rax
  mov    (%rax),%edi
  call   <UIerr@plt>
  jmp    L73
```

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 = OPENSSL_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 = OPENSSL_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 = OPENSSL_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 = OPENSSL_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:
  OPENSSL_free(prompt_copy);
  OPENSSL_free(action_desc_copy);
  OPENSSL_free(ok_chars_copy);
  OPENSSL_free(cancel_chars_copy);
  return -1;
}
```