// File: /workspace/github_cpp_makefile_star2_O3/nickgammon[P]tinymudserver/load.cpp
// Function: LoadMessages()
void LoadMessages ()
{
  // format is: <code> <message>
  //  eg. motd Hi there!
  // Imbedded %r sequences will becomes new lines.
  ifstream fMessages (MESSAGES_FILE, ios::in);
  if (!fMessages)
    {
    cerr << "Could not open messages file: " << MESSAGES_FILE << endl;
    return;
    }

  while (!(fMessages.eof ()))
    {
    string sMessageCode, sMessageText;
    fMessages >> sMessageCode >> ws;
    getline (fMessages, sMessageText);
    if (!(sMessageCode.empty ()))
      messagemap [tolower (sMessageCode)] =
            FindAndReplace (sMessageText, "%r", "\n");
    } // end of read loop

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x2c8, %rsp            # imm = 0x2C8
leaq 0x973e(%rip), %rsi      # 0x10357
leaq -0x2f0(%rbp), %rbx
movq %rbx, %rdi
movl $0x8, %edx
callq 0x3570
movq (%rbx), %rax
movq -0x18(%rax), %rax
movl -0x2d0(%rbp,%rax), %eax
testb $0x5, %al
je 0x6ca2
movq 0xf3a2(%rip), %rdi      # 0x15fe8
leaq 0x9634(%rip), %rsi      # 0x10281
movl $0x1e, %edx
callq 0x3370
movq 0xf38a(%rip), %rbx      # 0x15fe8
leaq 0x96f2(%rip), %rsi      # 0x10357
movl $0x15, %edx
movq %rbx, %rdi
callq 0x3370
movq (%rbx), %rax
addq -0x18(%rax), %rbx
movq %rbx, %rdi
movl $0xa, %esi
callq 0x32d0
movsbl %al, %esi
movq 0xf358(%rip), %rdi      # 0x15fe8
callq 0x3030
movq %rax, %rdi
callq 0x3220
jmp 0x6e7f
testb $0x2, %al
jne 0x6e7f
xorl %r13d, %r13d
leaq -0x48(%rbp), %r14
leaq -0x68(%rbp), %r15
leaq -0x38(%rbp), %rax
movq %rax, -0x48(%rbp)
movq %r13, -0x40(%rbp)
movb %r13b, -0x38(%rbp)
leaq -0x58(%rbp), %rax
movq %rax, -0x68(%rbp)
movq %r13, -0x60(%rbp)
movb %r13b, -0x58(%rbp)
movq %rbx, %rdi
movq %r14, %rsi
callq 0x33b0
movq %rax, %rdi
callq 0x3280
movq -0x2f0(%rbp), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x32d0
movsbl %al, %edx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x3580
cmpq $0x0, -0x40(%rbp)
je 0x6e34
leaq -0x78(%rbp), %rax
movq %rax, -0x88(%rbp)
leaq -0x88(%rbp), %rdi
leaq 0x956e(%rip), %rsi      # 0x102a0
leaq 0x9569(%rip), %rdx      # 0x102a2
callq 0x4bc4
leaq -0x98(%rbp), %rax
movq %rax, -0xa8(%rbp)
leaq -0xa8(%rbp), %r12
movq %r12, %rdi
leaq 0x936f(%rip), %rsi      # 0x100cc
leaq 0x9369(%rip), %rdx      # 0x100cd
callq 0x4bc4
leaq -0xc8(%rbp), %rdi
movq %r15, %rsi
leaq -0x88(%rbp), %rdx
movq %r12, %rcx
callq 0x4c64
leaq -0xe8(%rbp), %r12
movq %r12, %rdi
movq %r14, %rsi
callq 0x4e3b
leaq 0xfb1d(%rip), %rdi      # 0x168b8
movq %r12, %rsi
callq 0x796a
movq %rax, %rdi
leaq -0xc8(%rbp), %rsi
callq 0x33a0
movq -0xe8(%rbp), %rdi
leaq -0xd8(%rbp), %rax
cmpq %rax, %rdi
je 0x6dd4
movq -0xd8(%rbp), %rsi
incq %rsi
callq 0x32f0
movq -0xc8(%rbp), %rdi
leaq -0xb8(%rbp), %rax
cmpq %rax, %rdi
je 0x6df6
movq -0xb8(%rbp), %rsi
incq %rsi
callq 0x32f0
movq -0xa8(%rbp), %rdi
leaq -0x98(%rbp), %rax
cmpq %rax, %rdi
je 0x6e18
movq -0x98(%rbp), %rsi
incq %rsi
callq 0x32f0
movq -0x88(%rbp), %rdi
leaq -0x78(%rbp), %rax
cmpq %rax, %rdi
je 0x6e34
movq -0x78(%rbp), %rsi
incq %rsi
callq 0x32f0
movq -0x68(%rbp), %rdi
leaq -0x58(%rbp), %rax
cmpq %rax, %rdi
je 0x6e4d
movq -0x58(%rbp), %rsi
incq %rsi
callq 0x32f0
movq -0x48(%rbp), %rdi
leaq -0x38(%rbp), %rax
cmpq %rax, %rdi
je 0x6e66
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x32f0
movq -0x2f0(%rbp), %rax
movq -0x18(%rax), %rax
testb $0x2, -0x2d0(%rbp,%rax)
je 0x6cb5
leaq -0x2f0(%rbp), %rdi
callq 0x30c0
addq $0x2c8, %rsp            # imm = 0x2C8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
jmp 0x6f72
movq %rax, %rbx
movq -0xe8(%rbp), %rdi
leaq -0xd8(%rbp), %rax
cmpq %rax, %rdi
je 0x6edb
movq -0xd8(%rbp), %rsi
incq %rsi
callq 0x32f0
jmp 0x6edb
jmp 0x6f3d
movq %rax, %rbx
jmp 0x6f1f
movq %rax, %rbx
jmp 0x6efd
movq %rax, %rbx
movq -0xc8(%rbp), %rdi
leaq -0xb8(%rbp), %rax
cmpq %rax, %rdi
je 0x6efd
movq -0xb8(%rbp), %rsi
incq %rsi
callq 0x32f0
movq -0xa8(%rbp), %rdi
leaq -0x98(%rbp), %rax
cmpq %rax, %rdi
je 0x6f1f
movq -0x98(%rbp), %rsi
incq %rsi
callq 0x32f0
movq -0x88(%rbp), %rdi
leaq -0x78(%rbp), %rax
cmpq %rax, %rdi
je 0x6f40
movq -0x78(%rbp), %rsi
incq %rsi
callq 0x32f0
jmp 0x6f40
movq %rax, %rbx
movq -0x68(%rbp), %rdi
leaq -0x58(%rbp), %rax
cmpq %rax, %rdi
je 0x6f59
movq -0x58(%rbp), %rsi
incq %rsi
callq 0x32f0
movq -0x48(%rbp), %rdi
leaq -0x38(%rbp), %rax
cmpq %rax, %rdi
je 0x6f72
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x32f0
leaq -0x2f0(%rbp), %rdi
callq 0x30c0
movq %rbx, %rdi
callq 0x3530