// File: /workspace/github_cpp_makefile_star2_O1/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 0xd13b
testq %rdx, %rdx
je 0xcf1f
movq 0xb0(%rbx), %rsi
movq -0x60(%rbp), %rdi
callq 0x3310
testl %eax, %eax
jne 0xd13b
leaq -0xa0(%rbp), %rdi
leaq -0x60(%rbp), %rsi
callq 0x4e91
movq 0x97aa(%rip), %rcx      # 0x166e0
movq 0x97ab(%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 0xcf72
movq %rdx, -0x80(%rbp)
movq (%rcx), %rdx
movq %rdx, -0x70(%rbp)
jmp 0xcf7a
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 0x9764(%rip), %rsi      # 0x16700
movq 0x9765(%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 0xcfcc
movq %rdx, -0x40(%rbp)
movq (%rcx), %rdx
movq %rdx, -0x30(%rbp)
jmp 0xcfd3
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 0xd014
movq -0x30(%rbp), %rsi
incq %rsi
callq 0x32f0
movq -0x80(%rbp), %rdi
cmpq %r12, %rdi
je 0xd029
movq -0x70(%rbp), %rsi
incq %rsi
callq 0x32f0
leaq -0x90(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xd048
movq -0x90(%rbp), %rsi
incq %rsi
callq 0x32f0
movq -0x2a8(%rbp), %rax
movq -0x18(%rax), %rax
testb $0x5, -0x288(%rbp,%rax)
je 0xd0ea
leaq -0x60(%rbp), %rdi
callq 0x527c
testq %rax, %rax
jne 0xd0ea
leaq -0x40(%rbp), %rdi
movq %r14, (%rdi)
leaq 0x3836(%rip), %rsi      # 0x108b3
leaq 0x3839(%rip), %rdx      # 0x108bd
callq 0x4bc4
leaq 0x9828(%rip), %rdi      # 0x168b8
leaq -0x40(%rbp), %rsi
callq 0x79b2
movq %rbx, %rdi
movq %rax, %rsi
callq 0xc2b4
movq -0x40(%rbp), %rdi
cmpq %r14, %rdi
je 0xd0b9
movq -0x30(%rbp), %rsi
incq %rsi
callq 0x32f0
leaq -0x2a8(%rbp), %rdi
callq 0x30c0
movq -0x60(%rbp), %rdi
cmpq %r15, %rdi
je 0xd0da
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 0x369b(%rip), %rsi      # 0x10797
movq %rbx, %rdi
callq 0x33e0
movl $0x10, %edi
callq 0x3180
movq %rax, %r14
leaq 0x36e5(%rip), %rsi      # 0x107fd
movq %rax, %rdi
callq 0x3130
movq 0x8ec9(%rip), %rsi      # 0x15ff0
movq 0x8e82(%rip), %rdx      # 0x15fb0
movq %r14, %rdi
callq 0x3500
jmp 0xd22e
movl $0x3, 0x68(%rbx)
leaq 0x90(%rbx), %rdx
leaq 0x36e5(%rip), %rsi      # 0x10835
leaq -0x40(%rbp), %rdi
callq 0xae25
leaq 0x367b(%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 0xd18e
movups (%rcx), %xmm0
movups %xmm0, (%r12)
jmp 0xd19f
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 0xd1e3
movq -0x298(%rbp), %rsi
incq %rsi
callq 0x32f0
leaq -0x30(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xd1fc
movq -0x30(%rbp), %rsi
incq %rsi
callq 0x32f0
movl $0x10, %edi
callq 0x3180
movq %rax, %r14
leaq 0x367b(%rip), %rsi      # 0x1088b
movq %rax, %rdi
callq 0x3130
movq 0x8dd1(%rip), %rsi      # 0x15ff0
movq 0x8d8a(%rip), %rdx      # 0x15fb0
movq %r14, %rdi
callq 0x3500
movq %rax, %rbx
movq %r14, %rdi
callq 0x3250
jmp 0xd2f4
movq %rax, %rbx
leaq -0x30(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xd2f4
movq -0x30(%rbp), %rsi
jmp 0xd2ba
movq %rax, %rbx
movq %r14, %rdi
callq 0x3250
jmp 0xd2e8
jmp 0xd2c6
jmp 0xd2e5
movq %rax, %rbx
movq -0x40(%rbp), %rdi
cmpq %r14, %rdi
je 0xd289
movq -0x30(%rbp), %rsi
incq %rsi
callq 0x32f0
jmp 0xd289
movq %rax, %rbx
movq -0x80(%rbp), %rdi
cmpq %r12, %rdi
je 0xd2a3
movq -0x70(%rbp), %rsi
incq %rsi
callq 0x32f0
jmp 0xd2a3
movq %rax, %rbx
leaq -0x90(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xd2f4
movq -0x90(%rbp), %rsi
incq %rsi
callq 0x32f0
jmp 0xd2f4
jmp 0xd2c6
movq %rax, %rbx
jmp 0xd2f4
movq %rax, %rbx
movq -0x40(%rbp), %rdi
cmpq %r14, %rdi
je 0xd2e8
movq -0x30(%rbp), %rsi
incq %rsi
callq 0x32f0
jmp 0xd2e8
movq %rax, %rbx
leaq -0x2a8(%rbp), %rdi
callq 0x30c0
movq -0x60(%rbp), %rdi
cmpq %r15, %rdi
je 0xd309
movq -0x50(%rbp), %rsi
incq %rsi
callq 0x32f0
movq %rbx, %rdi
callq 0x3530