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

```asm
<gui_main_get_password>:
  endbr64
  push   %r15
  xor    %eax,%eax
  push   %r14
  push   %r13
  mov    %edx,%r13d
  push   %r12
  mov    %rsi,%r12
  push   %rbp
  push   %rbx
  mov    %rdi,%rbx
  sub    $0x18,%rsp
  call   <initscr@plt>
  xor    %eax,%eax
  call   <cbreak@plt>
  xor    %eax,%eax
  call   <noecho@plt>
  xor    %eax,%eax
  call   <raw@plt>
  xor    %eax,%eax
  call   <clear@plt>
  mov    (%rbx),%rdx
  test   %rdx,%rdx
  je     L69
  add    $0x8,%rbx
  xor    %ebp,%ebp
L74:
  mov    %ebp,%edi
  xor    %esi,%esi
  add    $0x8,%rbx
  add    $0x1,%ebp
  call   <mvaddstr@plt>
  mov    -0x8(%rbx),%rdx
  test   %rdx,%rdx
  jne    L74
L85:
  lea    D11(%rip),%rdx
  xor    %esi,%esi
  mov    %ebp,%edi
  call   <mvaddstr@plt>
  xor    %eax,%eax
  call   <refresh@plt>
  mov    %r13d,%edx
  xor    %esi,%esi
  mov    %r12,%rdi
  call   <memset@plt>
  sub    $0x1,%r13d
  test   %r13d,%r13d
  jle    L78
  xor    %ebx,%ebx
  lea    D6(%rip),%r14
  lea    D18(%rip),%r15
  cs nopw 0x0(%rax,%rax,1)
L33:
  xor    %eax,%eax
  call   <getch@plt>
  cmp    $0xa,%eax
  je     L129
L80:
  cmp    $0x3,%eax
  je     L99
  cmp    $0x7f,%eax
  jne    L15
  test   %ebx,%ebx
  jne    L4
  xor    %eax,%eax
  call   <refresh@plt>
  xor    %eax,%eax
  call   <getch@plt>
  cmp    $0xa,%eax
  jne    L80
  nopl   0x0(%rax)
L129:
  movslq %ebx,%rbx
  add    %rbx,%r12
L78:
  movb   $0x0,(%r12)
  xor    %eax,%eax
  call   <refresh@plt>
  add    $0x18,%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  jmp    1150 <endwin@plt>
  nop
L15:
  movslq %ebx,%rdx
  lea    0x3(%rbx),%esi
  mov    %ebp,%edi
  add    $0x1,%ebx
  mov    %al,(%r12,%rdx,1)
  mov    %r14,%rdx
  call   <mvaddstr@plt>
L58:
  xor    %eax,%eax
  call   <refresh@plt>
  cmp    %r13d,%ebx
  jl     L33
  jmp    L129
  nopl   0x0(%rax)
L4:
  lea    -0x1(%rbx),%ecx
  add    $0x2,%ebx
  mov    %r15,%rdx
  mov    %ebp,%edi
  movslq %ecx,%rax
  mov    %ebx,%esi
  mov    %ecx,0xc(%rsp)
  movb   $0x0,(%r12,%rax,1)
  call   <mvaddstr@plt>
  mov    %ebx,%esi
  mov    %ebp,%edi
  call   <move@plt>
  mov    0xc(%rsp),%ebx
  jmp    L58
  nopl   (%rax)
L99:
  movb   $0x3,(%r12)
  add    $0x1,%r12
  jmp    L78
  xchg   %ax,%ax
L69:
  xor    %ebp,%ebp
  jmp    L85
```

tool_calls: name: unpack_data
arguments: data_label: D11
type_infered: string
name: unpack_data
arguments: data_label: D6
type_infered: string
name: unpack_data
arguments: data_label: D18
type_infered: string

tool: D11: => 

tool: D6: *

tool: D18:  

assistant: ```c
void gui_main_get_password(const char **prompt, char *password, int size) {
  int line, i, ch;
  initscr();
  cbreak();
  noecho();
  raw();
  clear();
  line = 0;
  while (prompt[line]) {
    mvaddstr(line, 0, prompt[line]);
    line++;
  }
  mvaddstr(line, 0, "=> ");
  refresh();
  memset(password, '\0', size);
  i = 0;
  while (i < size - 1) {
    ch = getch();
    if (ch == '\n')
      break;
    if (ch == 3) {
      password[0] = 3;
      i = 1;
      break;
    }
    if (ch == 127) {
      if (i > 0) {
        i--;
        password[i] = '\0';
        mvaddstr(line, 3 + i, " ");
        move(line, 3 + i);
      }
    } else {
      password[i] = ch;
      mvaddstr(line, 3 + i, "*");
      i++;
    }
    refresh();
  }
  password[i] = '\0';
  refresh();
  endwin();
}
```