// File: /workspace/github_cpp_makefile_star2_O3/nickgammon[P]tinymudserver/states.cpp
// Function: ProcessConfirmPassword(tPlayer*, std::istream&)
void ProcessConfirmPassword (tPlayer * p, istream & sArgs)
{
   string password;
   sArgs >> password;
  
  // password must agree
  if (password != p->password)
    {
    p->connstate = eAwaitingNewPassword;
    p->prompt = "Choose a password for " + p->playername + " ... ";
    throw runtime_error ("Password and confirmation do not agree.");
    }
  
  // that player might have been created while we were choosing a password, so check again
  ifstream f ((PLAYER_DIR + tocapitals (password) + PLAYER_EXT).c_str (), ios::in);
  if (f || FindPlayer (password))  // player file on disk, or playing without saving yet
    {
    p->connstate = eAwaitingNewName;
    p->prompt = "Please choose a name for your new character ... ";  // re-prompt for name
    throw runtime_error ("That player already exists, please choose another name.");
    }
  
  // New player now in the game
  PlayerEnteredGame (p, messagemap ["new_player"]);
         
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x290, %rsp            # imm = 0x290
movq %rsi, %rax
movq %rdi, %rbx
leaq -0x50(%rbp), %r15
movq %r15, -0x10(%r15)
movq $0x0, -0x8(%r15)
movb $0x0, (%r15)
leaq -0x60(%rbp), %rsi
movq %rax, %rdi
callq 0x33b0
movq -0x58(%rbp), %rdx
cmpq 0xb8(%rbx), %rdx
jne 0xd0c5
testq %rdx, %rdx
je 0xcea9
movq 0xb0(%rbx), %rsi
movq -0x60(%rbp), %rdi
callq 0x3310
testl %eax, %eax
jne 0xd0c5
leaq -0xa0(%rbp), %rdi
leaq -0x60(%rbp), %rsi
callq 0x4e93
movq 0x9820(%rip), %rcx      # 0x166e0
movq 0x9821(%rip), %r8       # 0x166e8
leaq -0xa0(%rbp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x3360
leaq -0x70(%rbp), %r12
movq %r12, -0x10(%r12)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0xcefc
movq %rdx, -0x80(%rbp)
movq (%rcx), %rdx
movq %rdx, -0x70(%rbp)
jmp 0xcf04
movups (%rcx), %xmm0
movups %xmm0, (%r12)
movq 0x8(%rax), %rdx
leaq -0x80(%rbp), %rdi
movq %rdx, 0x8(%rdi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq 0x97da(%rip), %rsi      # 0x16700
movq 0x97db(%rip), %rdx      # 0x16708
callq 0x30f0
leaq -0x30(%rbp), %r14
movq %r14, -0x10(%r14)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0xcf56
movq %rdx, -0x40(%rbp)
movq (%rcx), %rdx
movq %rdx, -0x30(%rbp)
jmp 0xcf5d
movups (%rcx), %xmm0
movups %xmm0, (%r14)
movq 0x8(%rax), %rdx
movq %rdx, -0x38(%rbp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq -0x40(%rbp), %rsi
leaq -0x2a8(%rbp), %rdi
movl $0x8, %edx
callq 0x3570
movq -0x40(%rbp), %rdi
cmpq %r14, %rdi
je 0xcf9e
movq -0x30(%rbp), %rsi
incq %rsi
callq 0x32f0
movq -0x80(%rbp), %rdi
cmpq %r12, %rdi
je 0xcfb3
movq -0x70(%rbp), %rsi
incq %rsi
callq 0x32f0
leaq -0x90(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xcfd2
movq -0x90(%rbp), %rsi
incq %rsi
callq 0x32f0
movq -0x2a8(%rbp), %rax
movq -0x18(%rax), %rax
testb $0x5, -0x288(%rbp,%rax)
je 0xd074
leaq -0x60(%rbp), %rdi
callq 0x5260
testq %rax, %rax
jne 0xd074
leaq -0x40(%rbp), %rdi
movq %r14, (%rdi)
leaq 0x38ac(%rip), %rsi      # 0x108b3
leaq 0x38af(%rip), %rdx      # 0x108bd
callq 0x4bc4
leaq 0x989e(%rip), %rdi      # 0x168b8
leaq -0x40(%rbp), %rsi
callq 0x796a
movq %rbx, %rdi
movq %rax, %rsi
callq 0xc248
movq -0x40(%rbp), %rdi
cmpq %r14, %rdi
je 0xd043
movq -0x30(%rbp), %rsi
incq %rsi
callq 0x32f0
leaq -0x2a8(%rbp), %rdi
callq 0x30c0
movq -0x60(%rbp), %rdi
cmpq %r15, %rdi
je 0xd064
movq -0x50(%rbp), %rsi
incq %rsi
callq 0x32f0
addq $0x290, %rsp            # imm = 0x290
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movl $0x2, 0x68(%rbx)
addq $0x70, %rbx
leaq 0x3711(%rip), %rsi      # 0x10797
movq %rbx, %rdi
callq 0x33e0
movl $0x10, %edi
callq 0x3180
movq %rax, %r14
leaq 0x375b(%rip), %rsi      # 0x107fd
movq %rax, %rdi
callq 0x3130
movq 0x8f3f(%rip), %rsi      # 0x15ff0
movq 0x8ef8(%rip), %rdx      # 0x15fb0
movq %r14, %rdi
callq 0x3500
jmp 0xd1b8
movl $0x3, 0x68(%rbx)
leaq 0x90(%rbx), %rdx
leaq 0x375b(%rip), %rsi      # 0x10835
leaq -0x40(%rbp), %rdi
callq 0xadba
leaq 0x36f1(%rip), %rsi      # 0x107db
leaq -0x40(%rbp), %rdi
callq 0x35a0
leaq -0x298(%rbp), %r12
movq %r12, -0x10(%r12)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
jne 0xd118
movups (%rcx), %xmm0
movups %xmm0, (%r12)
jmp 0xd129
movq %rdx, -0x2a8(%rbp)
movq (%rcx), %rdx
movq %rdx, -0x298(%rbp)
movq 0x8(%rax), %rdx
leaq -0x2a8(%rbp), %r14
movq %rdx, 0x8(%r14)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
addq $0x70, %rbx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x33a0
movq (%r14), %rdi
cmpq %r12, %rdi
je 0xd16d
movq -0x298(%rbp), %rsi
incq %rsi
callq 0x32f0
leaq -0x30(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xd186
movq -0x30(%rbp), %rsi
incq %rsi
callq 0x32f0
movl $0x10, %edi
callq 0x3180
movq %rax, %r14
leaq 0x36f1(%rip), %rsi      # 0x1088b
movq %rax, %rdi
callq 0x3130
movq 0x8e47(%rip), %rsi      # 0x15ff0
movq 0x8e00(%rip), %rdx      # 0x15fb0
movq %r14, %rdi
callq 0x3500
movq %rax, %rbx
movq %r14, %rdi
callq 0x3250
jmp 0xd27e
movq %rax, %rbx
leaq -0x30(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xd27e
movq -0x30(%rbp), %rsi
jmp 0xd244
movq %rax, %rbx
movq %r14, %rdi
callq 0x3250
jmp 0xd272
jmp 0xd250
jmp 0xd26f
movq %rax, %rbx
movq -0x40(%rbp), %rdi
cmpq %r14, %rdi
je 0xd213
movq -0x30(%rbp), %rsi
incq %rsi
callq 0x32f0
jmp 0xd213
movq %rax, %rbx
movq -0x80(%rbp), %rdi
cmpq %r12, %rdi
je 0xd22d
movq -0x70(%rbp), %rsi
incq %rsi
callq 0x32f0
jmp 0xd22d
movq %rax, %rbx
leaq -0x90(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xd27e
movq -0x90(%rbp), %rsi
incq %rsi
callq 0x32f0
jmp 0xd27e
jmp 0xd250
movq %rax, %rbx
jmp 0xd27e
movq %rax, %rbx
movq -0x40(%rbp), %rdi
cmpq %r14, %rdi
je 0xd272
movq -0x30(%rbp), %rsi
incq %rsi
callq 0x32f0
jmp 0xd272
movq %rax, %rbx
leaq -0x2a8(%rbp), %rdi
callq 0x30c0
movq -0x60(%rbp), %rdi
cmpq %r15, %rdi
je 0xd293
movq -0x50(%rbp), %rsi
incq %rsi
callq 0x32f0
movq %rbx, %rdi
callq 0x3530