// File: 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
subq $0x330, %rsp            # imm = 0x330
movq 0x1dd66(%rip), %rsi     # 0x29408
leaq -0x208(%rbp), %rdi
movl $0x8, %edx
callq 0x4730
movq -0x208(%rbp), %rax
movq -0x18(%rax), %rax
leaq -0x208(%rbp,%rax), %rdi
callq 0x4230
movb %al, -0x2e9(%rbp)
jmp 0xb6d3
movb -0x2e9(%rbp), %al
testb $0x1, %al
jne 0xb6df
jmp 0xb752
movq 0x1d902(%rip), %rdi     # 0x28fe8
leaq 0x10b82(%rip), %rsi     # 0x1c26f
callq 0x4410
movq %rax, -0x2f8(%rbp)
jmp 0xb6fb
movq -0x2f8(%rbp), %rdi
movq 0x1dcff(%rip), %rsi     # 0x29408
callq 0x4410
movq %rax, -0x300(%rbp)
jmp 0xb717
movq -0x300(%rbp), %rdi
movq 0x1d873(%rip), %rsi     # 0x28f98
callq 0x4480
jmp 0xb72c
movl $0x1, -0x218(%rbp)
jmp 0xba17
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x210(%rbp)
movl %eax, -0x214(%rbp)
jmp 0xba2c
jmp 0xb754
movq -0x208(%rbp), %rax
movq -0x18(%rax), %rax
leaq -0x208(%rbp,%rax), %rdi
callq 0x4740
movb %al, -0x301(%rbp)
jmp 0xb774
movb -0x301(%rbp), %al
xorb $-0x1, %al
testb $0x1, %al
jne 0xb785
jmp 0xba0d
leaq -0x238(%rbp), %rdi
movq %rdi, -0x318(%rbp)
callq 0x45b0
leaq -0x258(%rbp), %rdi
callq 0x45b0
movq -0x318(%rbp), %rsi
leaq -0x208(%rbp), %rdi
callq 0x4550
movq %rax, -0x310(%rbp)
jmp 0xb7c0
movq -0x310(%rbp), %rdi
movq 0x1d7e2(%rip), %rsi     # 0x28fb0
callq 0x4170
jmp 0xb7d5
leaq -0x208(%rbp), %rdi
leaq -0x258(%rbp), %rsi
callq 0x40e0
jmp 0xb7ea
leaq -0x238(%rbp), %rdi
callq 0x4660
testb $0x1, %al
jne 0xb9d6
leaq -0x299(%rbp), %rdi
movq %rdi, -0x320(%rbp)
callq 0x46e0
movq -0x320(%rbp), %rdx
leaq 0x10a6f(%rip), %rsi     # 0x1c28e
leaq -0x298(%rbp), %rdi
callq 0x67d0
jmp 0xb82d
leaq -0x2c1(%rbp), %rdi
movq %rdi, -0x328(%rbp)
callq 0x46e0
movq -0x328(%rbp), %rdx
leaq 0x10886(%rip), %rsi     # 0x1c0d4
leaq -0x2c0(%rbp), %rdi
callq 0x67d0
jmp 0xb85c
leaq -0x278(%rbp), %rdi
leaq -0x258(%rbp), %rsi
leaq -0x298(%rbp), %rdx
leaq -0x2c0(%rbp), %rcx
callq 0x6b20
jmp 0xb87f
leaq -0x2e8(%rbp), %rdi
leaq -0x238(%rbp), %rsi
callq 0x6d60
jmp 0xb894
leaq 0x1e13d(%rip), %rdi     # 0x299d8
leaq -0x2e8(%rbp), %rsi
callq 0xc500
movq %rax, -0x330(%rbp)
jmp 0xb8b0
movq -0x330(%rbp), %rdi
leaq -0x278(%rbp), %rsi
callq 0x4520
leaq -0x2e8(%rbp), %rdi
callq 0x47d8
leaq -0x278(%rbp), %rdi
callq 0x47d8
leaq -0x2c0(%rbp), %rdi
callq 0x47d8
leaq -0x2c1(%rbp), %rdi
callq 0x44a0
leaq -0x298(%rbp), %rdi
callq 0x47d8
leaq -0x299(%rbp), %rdi
callq 0x44a0
jmp 0xb9d6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x210(%rbp)
movl %eax, -0x214(%rbp)
jmp 0xb9f3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x210(%rbp)
movl %eax, -0x214(%rbp)
jmp 0xb9c8
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x210(%rbp)
movl %eax, -0x214(%rbp)
jmp 0xb9b0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x210(%rbp)
movl %eax, -0x214(%rbp)
jmp 0xb9a4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x210(%rbp)
movl %eax, -0x214(%rbp)
jmp 0xb998
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x210(%rbp)
movl %eax, -0x214(%rbp)
leaq -0x2e8(%rbp), %rdi
callq 0x47d8
leaq -0x278(%rbp), %rdi
callq 0x47d8
leaq -0x2c0(%rbp), %rdi
callq 0x47d8
leaq -0x2c1(%rbp), %rdi
callq 0x44a0
leaq -0x298(%rbp), %rdi
callq 0x47d8
leaq -0x299(%rbp), %rdi
callq 0x44a0
jmp 0xb9f3
leaq -0x258(%rbp), %rdi
callq 0x47d8
leaq -0x238(%rbp), %rdi
callq 0x47d8
jmp 0xb754
leaq -0x258(%rbp), %rdi
callq 0x47d8
leaq -0x238(%rbp), %rdi
callq 0x47d8
jmp 0xba2c
movl $0x0, -0x218(%rbp)
leaq -0x208(%rbp), %rdi
callq 0x4120
addq $0x330, %rsp            # imm = 0x330
popq %rbp
retq
leaq -0x208(%rbp), %rdi
callq 0x4120
movq -0x210(%rbp), %rdi
callq 0x46d0
nopw %cs:(%rax,%rax)