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

```asm
<Valid_User>:
  endbr64
  push   %r15
  mov    %rcx,%r15
  push   %r14
  mov    %rsi,%r14
  push   %r13
  mov    %rdi,%r13
  push   %r12
  mov    %r8,%r12
  push   %rbp
  mov    %rdx,%rbp
  sub    $0x50,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x48(%rsp)
  lea    D7(%rip),%rax
  movq   $0x0,0x40(%rsp)
  mov    %rax,(%rsp)
  lea    D77(%rip),%rax
  mov    %rax,0x8(%rsp)
  lea    D73(%rip),%rax
  mov    %rax,0x10(%rsp)
  lea    D61(%rip),%rax
  mov    %rax,0x18(%rsp)
  lea    D53(%rip),%rax
  mov    %rax,0x20(%rsp)
  lea    D72(%rip),%rax
  mov    %rax,0x28(%rsp)
  lea    D13(%rip),%rax
  mov    %rax,0x30(%rsp)
  lea    D38(%rip),%rax
  mov    %rax,0x38(%rsp)
  xor    %eax,%eax
  call   <SMB_Init@plt>
  mov    %rbp,%rsi
  mov    %r12,%rdx
  xor    %edi,%edi
  call   <SMB_Connect_Server@plt>
  mov    %rax,%rbp
  test   %rax,%rax
  je     L3
L53:
  mov    %rsp,%rsi
  mov    %rbp,%rdi
  call   <SMB_Negotiate@plt>
  test   %rax,%rax
  js     L43
  mov    %r13,%rsi
  mov    %rbp,%rdi
  mov    %r14,%rdx
  call   <SMB_Logon_Server@plt>
  xor    %esi,%esi
  mov    %rbp,%rdi
  test   %rax,%rax
  js     L16
  call   <SMB_Discon@plt>
  xor    %eax,%eax
L25:
  mov    0x48(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L49
  add    $0x50,%rsp
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nop
L3:
  mov    %r12,%rdx
  mov    %r15,%rsi
  xor    %edi,%edi
  call   <SMB_Connect_Server@plt>
  mov    %rax,%rbp
  test   %rax,%rax
  jne    L53
  mov    $0x1,%eax
  jmp    L25
  nopl   0x0(%rax)
L43:
  xor    %esi,%esi
  mov    %rbp,%rdi
  call   <SMB_Discon@plt>
  mov    $0x2,%eax
  jmp    L25
  nopl   0x0(%rax)
L16:
  call   <SMB_Discon@plt>
  mov    $0x3,%eax
  jmp    L25
L49:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: extract_symbolic_data
arguments: data_tag: D7
type_guessed: string
name: extract_symbolic_data
arguments: data_tag: D77
type_guessed: string
name: extract_symbolic_data
arguments: data_tag: D73
type_guessed: string
name: extract_symbolic_data
arguments: data_tag: D61
type_guessed: string
name: extract_symbolic_data
arguments: data_tag: D53
type_guessed: string
name: extract_symbolic_data
arguments: data_tag: D72
type_guessed: string
name: extract_symbolic_data
arguments: data_tag: D13
type_guessed: string
name: extract_symbolic_data
arguments: data_tag: D38
type_guessed: string

tool: D7: PC NETWORK PROGRAM 1.0

tool: D77: MICROSOFT NETWORKS 1.03

tool: D73: MICROSOFT NETWORKS 3.0

tool: D61: LANMAN1.0

tool: D53: LM1.2X002

tool: D72: Samba

tool: D13: NT LM 0.12

tool: D38: NT LANMAN 1.0

assistant: ```c
int Valid_User(char *USERNAME, char *PASSWORD, char *SERVER, char *BACKUP, char *DOMAIN) {
  const char *SMB_Prots[] = {"PC NETWORK PROGRAM 1.0", "MICROSOFT NETWORKS 1.03", "MICROSOFT NETWORKS 3.0", "LANMAN1.0", "LM1.2X002", "Samba", "NT LM 0.12", "NT LANMAN 1.0", NULL};
  void *con;
  SMB_Init();
  con = SMB_Connect_Server(NULL, SERVER, DOMAIN);
  if (con == NULL) {
    con = SMB_Connect_Server(NULL, BACKUP, DOMAIN);
    if (con == NULL) {
      return (1);
    }
  }
  if (SMB_Negotiate(con, SMB_Prots) < 0) {
    SMB_Discon(con, 0);
    return (2);
  }
  if (SMB_Logon_Server(con, USERNAME, PASSWORD) < 0) {
    SMB_Discon(con, 0);
    return (3);
  }
  SMB_Discon(con, 0);
  return (0);
}
```