// File: nickgammon[P]tinymudserver/states.cpp
// Function: PlayerEnteredGame(tPlayer*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
void PlayerEnteredGame (tPlayer * p, const string & message)
{
  p->connstate = ePlaying;    // now normal player
  p->prompt = PROMPT;         // default prompt
  *p << "Welcome, " << p->playername << "\n\n"; // greet them
  *p << message;
  *p << messagemap ["motd"];  // message of the day
  p->DoCommand ("look");     // new player looks around

  // tell other players
  SendToAll (
    "Player " + p->playername + " has joined the game from " + p->GetAddress () + ".\n", 
    p);
  
  // log it
  cout << "Player " << p->playername << " has joined the game." << endl;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x140, %rsp            # imm = 0x140
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movl $0x5, 0x68(%rax)
movq -0x8(%rbp), %rdi
addq $0x70, %rdi
leaq 0x13543(%rip), %rsi     # 0x297e0
callq 0x4060
movq -0x8(%rbp), %rdi
leaq 0x6436(%rip), %rsi      # 0x1c6e3
callq 0x14160
movq %rax, %rdi
movq -0x8(%rbp), %rsi
addq $0x90, %rsi
callq 0xb450
movq %rax, %rdi
leaq 0x5e04(%rip), %rsi      # 0x1c0d3
callq 0x13f30
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0xb450
movq -0x8(%rbp), %rax
movq %rax, -0x120(%rbp)
leaq -0x31(%rbp), %rdi
movq %rdi, -0x118(%rbp)
callq 0x46e0
movq -0x118(%rbp), %rdx
leaq 0x63e3(%rip), %rsi      # 0x1c6ed
leaq -0x30(%rbp), %rdi
callq 0x67d0
jmp 0x16315
leaq 0x136bc(%rip), %rdi     # 0x299d8
leaq -0x30(%rbp), %rsi
callq 0xc500
movq %rax, -0x128(%rbp)
jmp 0x1632e
movq -0x128(%rbp), %rsi
movq -0x120(%rbp), %rdi
callq 0xb450
jmp 0x16343
leaq -0x30(%rbp), %rdi
callq 0x47d8
leaq -0x31(%rbp), %rdi
callq 0x44a0
movq -0x8(%rbp), %rax
movq %rax, -0x138(%rbp)
leaq -0x69(%rbp), %rdi
movq %rdi, -0x130(%rbp)
callq 0x46e0
movq -0x130(%rbp), %rdx
leaq 0x6018(%rip), %rsi      # 0x1c396
leaq -0x68(%rbp), %rdi
callq 0x67d0
jmp 0x16389
movq -0x138(%rbp), %rdi
leaq -0x68(%rbp), %rsi
callq 0x81c0
jmp 0x1639b
leaq -0x68(%rbp), %rdi
callq 0x47d8
leaq -0x69(%rbp), %rdi
callq 0x44a0
movq -0x8(%rbp), %rdx
addq $0x90, %rdx
leaq 0x5d56(%rip), %rsi      # 0x1c115
leaq -0xf0(%rbp), %rdi
movq %rdi, -0x140(%rbp)
callq 0x13750
movq -0x140(%rbp), %rsi
leaq 0x6312(%rip), %rdx      # 0x1c6f2
leaq -0xd0(%rbp), %rdi
callq 0xc6c0
jmp 0x163ee
movq -0x8(%rbp), %rsi
leaq -0x110(%rbp), %rdi
callq 0x177d0
jmp 0x16400
leaq -0xb0(%rbp), %rdi
leaq -0xd0(%rbp), %rsi
leaq -0x110(%rbp), %rdx
callq 0x17700
jmp 0x1641c
leaq 0x5c5c(%rip), %rdx      # 0x1c07f
leaq -0x90(%rbp), %rdi
leaq -0xb0(%rbp), %rsi
callq 0xc6c0
jmp 0x16438
movq -0x8(%rbp), %rsi
leaq -0x90(%rbp), %rdi
xorl %edx, %edx
callq 0x88a0
jmp 0x1644c
leaq -0x90(%rbp), %rdi
callq 0x47d8
leaq -0xb0(%rbp), %rdi
callq 0x47d8
leaq -0x110(%rbp), %rdi
callq 0x47d8
leaq -0xd0(%rbp), %rdi
callq 0x47d8
leaq -0xf0(%rbp), %rdi
callq 0x47d8
movq 0x12b31(%rip), %rdi     # 0x28fc0
leaq 0x5c7f(%rip), %rsi      # 0x1c115
callq 0x4410
movq %rax, %rdi
movq -0x8(%rbp), %rsi
addq $0x90, %rsi
callq 0x43d0
movq %rax, %rdi
leaq 0x6255(%rip), %rsi      # 0x1c70d
callq 0x4410
movq %rax, %rdi
movq 0x12ad1(%rip), %rsi     # 0x28f98
callq 0x4480
addq $0x140, %rsp            # imm = 0x140
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0x164f8
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x30(%rbp), %rdi
callq 0x47d8
leaq -0x31(%rbp), %rdi
callq 0x44a0
jmp 0x165b7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0x16529
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x68(%rbp), %rdi
callq 0x47d8
leaq -0x69(%rbp), %rdi
callq 0x44a0
jmp 0x165b7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0x165ab
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0x1659f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0x16593
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0x16587
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x90(%rbp), %rdi
callq 0x47d8
leaq -0xb0(%rbp), %rdi
callq 0x47d8
leaq -0x110(%rbp), %rdi
callq 0x47d8
leaq -0xd0(%rbp), %rdi
callq 0x47d8
leaq -0xf0(%rbp), %rdi
callq 0x47d8
movq -0x40(%rbp), %rdi
callq 0x46d0