// File: iZhangHui[P]CppPrimer/CH11_AssociativeContainers/examples/word_transform.cc
// Function: buildMap[abi:cxx11](std::basic_ifstream<char, std::char_traits<char>>&)
map<string, string> buildMap(ifstream& map_file)
{
	map<string, string> trans_map;   // holds the transformations
	string key;    // a word to transform
	string value;  // phrase to use instead
	// read the first word into key and the rest of the line into value
	while (map_file >> key && getline(map_file, value))
		if (value.size() > 1) // check that there is a transformation
			trans_map[key] = value.substr(1); // skip leading space
		else
			throw runtime_error("no rule for " + key);
	return trans_map;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xf0, %rsp
movq %rdi, -0xc0(%rbp)
movq %rdi, %rax
movq %rax, -0xb8(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movb $0x0, -0x11(%rbp)
callq 0x2cd0
leaq -0x38(%rbp), %rdi
callq 0x2240
leaq -0x58(%rbp), %rdi
callq 0x2240
movq -0x10(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0x2230
movq %rax, -0xc8(%rbp)
jmp 0x2495
movq -0xc8(%rbp), %rdi
movq (%rdi), %rax
movq -0x18(%rax), %rax
addq %rax, %rdi
callq 0x2220
movb %al, -0xc9(%rbp)
jmp 0x24b3
movb -0xc9(%rbp), %cl
xorl %eax, %eax
testb $0x1, %cl
movb %al, -0xca(%rbp)
jne 0x24c8
jmp 0x250a
movq -0x10(%rbp), %rdi
leaq -0x58(%rbp), %rsi
callq 0x2060
movq %rax, -0xd8(%rbp)
jmp 0x24de
movq -0xd8(%rbp), %rdi
movq (%rdi), %rax
movq -0x18(%rax), %rax
addq %rax, %rdi
callq 0x2220
movb %al, -0xd9(%rbp)
jmp 0x24fc
movb -0xd9(%rbp), %al
movb %al, -0xca(%rbp)
jmp 0x250a
movb -0xca(%rbp), %al
testb $0x1, %al
jne 0x2519
jmp 0x2665
leaq -0x58(%rbp), %rdi
callq 0x2150
cmpq $0x1, %rax
jbe 0x25b5
leaq -0x88(%rbp), %rdi
leaq -0x58(%rbp), %rsi
movl $0x1, %edx
movq $-0x1, %rcx
callq 0x21d0
jmp 0x254a
movq -0xc0(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0x2cf0
movq %rax, -0xe8(%rbp)
jmp 0x2563
movq -0xe8(%rbp), %rdi
leaq -0x88(%rbp), %rsi
callq 0x2210
leaq -0x88(%rbp), %rdi
callq 0x2130
jmp 0x2660
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0x2683
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
leaq -0x88(%rbp), %rdi
callq 0x2130
jmp 0x2683
movb $0x1, -0xa9(%rbp)
movl $0x10, %edi
callq 0x2110
movq %rax, -0xf0(%rbp)
leaq 0x2a30(%rip), %rsi      # 0x5004
leaq -0xa8(%rbp), %rdi
leaq -0x38(%rbp), %rdx
callq 0x2dd0
jmp 0x25e6
movq -0xf0(%rbp), %rdi
leaq -0xa8(%rbp), %rsi
callq 0x2280
jmp 0x25fb
movq -0xf0(%rbp), %rdi
movb $0x0, -0xa9(%rbp)
movq 0x59e0(%rip), %rsi      # 0x7ff0
movq 0x59b1(%rip), %rdx      # 0x7fc8
callq 0x22b0
jmp 0x26c8
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0x2647
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
leaq -0xa8(%rbp), %rdi
callq 0x2130
testb $0x1, -0xa9(%rbp)
jne 0x2652
jmp 0x265e
movq -0xf0(%rbp), %rdi
callq 0x2160
jmp 0x2683
jmp 0x247f
movb $0x1, -0x11(%rbp)
leaq -0x58(%rbp), %rdi
callq 0x2130
leaq -0x38(%rbp), %rdi
callq 0x2130
testb $0x1, -0x11(%rbp)
jne 0x26af
jmp 0x26a3
leaq -0x58(%rbp), %rdi
callq 0x2130
leaq -0x38(%rbp), %rdi
callq 0x2130
movq -0xc0(%rbp), %rdi
callq 0x2ee0
jmp 0x26bf
movq -0xc0(%rbp), %rdi
callq 0x2ee0
movq -0xb8(%rbp), %rax
addq $0xf0, %rsp
popq %rbp
retq
movq -0x60(%rbp), %rdi
callq 0x22d0
nopl (%rax,%rax)