// File: iZhangHui[P]CppPrimer/CH11_AssociativeContainers/exercises/ex11_07.cc
// Function: main
int main(int argc, char const *argv[])
{
	map<string, vector<string>> families;

	for (string last_name; cout << "Input family's last name:" << endl, cin >> last_name;) {
		for (string child_name; cout << "Input children's name:" << endl, cin >> child_name;) {
			families[last_name].push_back(child_name);
		}
		cin.clear();
	}
	cout << "===========================" << endl;

	for (const auto& family : families) {
		cout << family.first << ":" << endl;
		for (const auto& child : family.second)
			cout << child << " ";
		cout << endl;
	}
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x130, %rsp            # imm = 0x130
movl $0x0, -0x4(%rbp)
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
leaq -0x40(%rbp), %rdi
callq 0x26f0
leaq -0x60(%rbp), %rdi
callq 0x2180
movq 0x5c7e(%rip), %rdi      # 0x7fd0
leaq 0x2cab(%rip), %rsi      # 0x5004
callq 0x2110
movq %rax, -0xd8(%rbp)
jmp 0x2367
movq -0xd8(%rbp), %rdi
movq 0x5c4b(%rip), %rsi      # 0x7fc0
callq 0x2150
jmp 0x237c
movq 0x5c5d(%rip), %rdi      # 0x7fe0
leaq -0x60(%rbp), %rsi
callq 0x2170
movq %rax, -0xe0(%rbp)
jmp 0x2395
movq -0xe0(%rbp), %rdi
movq (%rdi), %rax
movq -0x18(%rax), %rax
addq %rax, %rdi
callq 0x2160
movb %al, -0xe1(%rbp)
jmp 0x23b3
movb -0xe1(%rbp), %al
testb $0x1, %al
jne 0x23e5
jmp 0x23bf
movl $0x2, -0x70(%rbp)
leaq -0x60(%rbp), %rdi
callq 0x20c0
jmp 0x24f4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
jmp 0x24e6
leaq -0x90(%rbp), %rdi
callq 0x2180
movq 0x5bd8(%rip), %rdi      # 0x7fd0
leaq 0x2c1f(%rip), %rsi      # 0x501e
callq 0x2110
movq %rax, -0xf0(%rbp)
jmp 0x240d
movq -0xf0(%rbp), %rdi
movq 0x5ba5(%rip), %rsi      # 0x7fc0
callq 0x2150
jmp 0x2422
movq 0x5bb7(%rip), %rdi      # 0x7fe0
leaq -0x90(%rbp), %rsi
callq 0x2170
movq %rax, -0xf8(%rbp)
jmp 0x243e
movq -0xf8(%rbp), %rdi
movq (%rdi), %rax
movq -0x18(%rax), %rax
addq %rax, %rdi
callq 0x2160
movb %al, -0xf9(%rbp)
jmp 0x245c
movb -0xf9(%rbp), %al
testb $0x1, %al
jne 0x2497
jmp 0x2468
movl $0x4, -0x70(%rbp)
leaq -0x90(%rbp), %rdi
callq 0x20c0
jmp 0x24c7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
leaq -0x90(%rbp), %rdi
callq 0x20c0
jmp 0x24e6
leaq -0x40(%rbp), %rdi
leaq -0x60(%rbp), %rsi
callq 0x2710
movq %rax, -0x108(%rbp)
jmp 0x24ad
movq -0x108(%rbp), %rdi
leaq -0x90(%rbp), %rsi
callq 0x27f0
jmp 0x24c2
jmp 0x23f1
movq 0x5b12(%rip), %rdi      # 0x7fe0
movq (%rdi), %rax
movq -0x18(%rax), %rax
addq %rax, %rdi
xorl %esi, %esi
callq 0x21c0
jmp 0x24e1
jmp 0x234b
leaq -0x60(%rbp), %rdi
callq 0x20c0
jmp 0x26d0
movq 0x5ad5(%rip), %rdi      # 0x7fd0
leaq 0x2b33(%rip), %rsi      # 0x5035
callq 0x2110
movq %rax, -0x110(%rbp)
jmp 0x2510
movq -0x110(%rbp), %rdi
movq 0x5aa2(%rip), %rsi      # 0x7fc0
callq 0x2150
jmp 0x2525
leaq -0x40(%rbp), %rax
movq %rax, -0x98(%rbp)
movq -0x98(%rbp), %rdi
callq 0x2860
movq %rax, -0xa0(%rbp)
movq -0x98(%rbp), %rdi
callq 0x2890
movq %rax, -0xa8(%rbp)
leaq -0xa0(%rbp), %rdi
leaq -0xa8(%rbp), %rsi
callq 0x28c0
testb $0x1, %al
jne 0x2572
jmp 0x26ad
leaq -0xa0(%rbp), %rdi
callq 0x28f0
movq %rax, -0xb0(%rbp)
movq -0xb0(%rbp), %rsi
movq 0x5a3d(%rip), %rdi      # 0x7fd0
callq 0x2100
movq %rax, -0x118(%rbp)
jmp 0x25a1
movq -0x118(%rbp), %rdi
leaq 0x2a84(%rip), %rsi      # 0x5033
callq 0x2110
movq %rax, -0x120(%rbp)
jmp 0x25bd
movq -0x120(%rbp), %rdi
movq 0x59f5(%rip), %rsi      # 0x7fc0
callq 0x2150
jmp 0x25d2
movq -0xb0(%rbp), %rax
addq $0x20, %rax
movq %rax, -0xb8(%rbp)
movq -0xb8(%rbp), %rdi
callq 0x2910
movq %rax, -0xc0(%rbp)
movq -0xb8(%rbp), %rdi
callq 0x2940
movq %rax, -0xc8(%rbp)
leaq -0xc0(%rbp), %rdi
leaq -0xc8(%rbp), %rsi
callq 0x2970
testb $0x1, %al
jne 0x2623
jmp 0x2685
leaq -0xc0(%rbp), %rdi
callq 0x29b0
movq %rax, -0xd0(%rbp)
movq -0xd0(%rbp), %rsi
movq 0x598c(%rip), %rdi      # 0x7fd0
callq 0x2100
movq %rax, -0x128(%rbp)
jmp 0x2652
movq -0x128(%rbp), %rdi
leaq 0x29f1(%rip), %rsi      # 0x5051
callq 0x2110
jmp 0x2667
jmp 0x2669
leaq -0xc0(%rbp), %rdi
callq 0x29d0
jmp 0x260a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
jmp 0x26d0
movq 0x5944(%rip), %rdi      # 0x7fd0
movq 0x592d(%rip), %rsi      # 0x7fc0
callq 0x2150
jmp 0x269a
jmp 0x269c
leaq -0xa0(%rbp), %rdi
callq 0x29f0
jmp 0x2556
movl $0x0, -0x4(%rbp)
movl $0x1, -0x70(%rbp)
leaq -0x40(%rbp), %rdi
callq 0x2a20
movl -0x4(%rbp), %eax
addq $0x130, %rsp            # imm = 0x130
popq %rbp
retq
leaq -0x40(%rbp), %rdi
callq 0x2a20
movq -0x68(%rbp), %rdi
callq 0x21d0
nopw %cs:(%rax,%rax)
nopl (%rax)