// File: /workspace/github_cpp_makefile_star2_O3/murry2018[P]mogazi/kakaotalk_room.cpp
// Function: kakaotalk::room::room(std::istream&)
room::room(std::istream& in) {
    static regex const room_info("(.*) (\\d+?)( 님과)? 카카오톡 대화");
    chat c(in);
    std::smatch m_info;

    if (regex_match(c.content(), m_info, room_info)) {
      name = m_info[1];
      std::cout << "방제: " << name << std::endl;
      nmemb = std::stoi(m_info[2]);
      std::cout << "인원: " << nmemb << std::endl;
    } else {
      throw domain_error("Unexpected File Format(in Heading).");
    }

    while (in >> c) {
      if (c.isextra())
        continue;
      else if (c.istalk())
        // TODO: mem_info가 _nchat과 _nbyte를 갖도록 수정
        // members[c.name()]+=c.message().length(); // 글자 수로 기록
        ++members[c.name()];
      else if (c.isout())
        members[c.name()].out();
      else if (c.isin() && !c.ismyself())
        members[c.name()].in();
    }

    for (auto& each : members) {
      auto& m_name = each.first;
      auto& m_info = each.second;
      if (m_info)
        enrolls.push_back(std::make_pair(m_name, m_info));
    }

    typedef std::pair<std::string, kakaotalk::mem_info> pairtype;
    enrolls.sort([](const pairtype& x, const pairtype& y)
                 { return !(x.second < y.second); }); // 내림차순 정렬
  }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x6d8, %rsp            # imm = 0x6D8
movq %rsi, %r13
movq %rdi, %rbx
movq %rdi, 0x8(%rdi)
movq %rdi, (%rdi)
xorl %eax, %eax
movq %rax, 0x10(%rdi)
leaq 0x20(%rdi), %rcx
movq %rcx, -0x58(%rbp)
leaq 0x30(%rdi), %rcx
movq %rcx, -0x88(%rbp)
movq %rcx, 0x20(%rdi)
movq %rax, 0x28(%rdi)
movb $0x0, 0x30(%rdi)
leaq 0x40(%rdi), %rcx
movq %rcx, -0x50(%rbp)
leaq 0x48(%rdi), %rcx
movl $0x0, 0x48(%rdi)
movq %rax, 0x50(%rdi)
movq %rcx, 0x58(%rdi)
movq %rcx, -0x60(%rbp)
movq %rcx, 0x60(%rdi)
movq %rax, 0x68(%rdi)
movb 0xb2d5(%rip), %al       # 0x1f828
testb %al, %al
movq %rdi, -0x30(%rbp)
je 0x14ba5
leaq -0xf8(%rbp), %rdi
movq %r13, %rsi
callq 0x60b0
xorps %xmm0, %xmm0
movaps %xmm0, -0x70(%rbp)
movaps %xmm0, -0x80(%rbp)
leaq -0xf8(%rbp), %rdi
callq 0x6c14
movq (%rax), %rdi
movq 0x8(%rax), %rsi
addq %rdi, %rsi
leaq 0xb272(%rip), %rcx      # 0x1f808
leaq -0x80(%rbp), %rdx
xorl %r8d, %r8d
callq 0x1228c
testb %al, %al
je 0x14c00
movq -0x80(%rbp), %rax
movq -0x78(%rbp), %rcx
movabsq $-0x5555555555555555, %r12 # imm = 0xAAAAAAAAAAAAAAAB
subq %rax, %rcx
je 0x145dc
movq %rcx, %rdx
sarq $0x3, %rdx
imulq %r12, %rdx
addq $-0x5, %rdx
cmpq $-0x3, %rdx
ja 0x145dc
addq $0x18, %rax
jmp 0x145e3
addq %rcx, %rax
addq $-0x48, %rax
cmpb $0x1, 0x10(%rax)
leaq -0x6f0(%rbp), %r14
jne 0x14610
movq (%rax), %rsi
movq 0x8(%rax), %rdx
leaq -0x6f0(%rbp), %rax
movq %rax, -0x10(%rax)
leaq -0x700(%rbp), %rdi
callq 0x143da
jmp 0x14629
movq %r14, -0x700(%rbp)
movq $0x0, -0x6f8(%rbp)
movb $0x0, -0x6f0(%rbp)
leaq -0x700(%rbp), %r15
movq -0x58(%rbp), %rdi
movq %r15, %rsi
callq 0x43a0
movq (%r15), %rdi
cmpq %r14, %rdi
je 0x14653
movq -0x6f0(%rbp), %rsi
incq %rsi
callq 0x42f0
movq 0xa95e(%rip), %rdi      # 0x1efb8
leaq 0x2b5a(%rip), %rsi      # 0x171bb
movl $0x8, %edx
callq 0x4360
movq 0x20(%rbx), %rsi
movq 0x28(%rbx), %rdx
movq 0xa93e(%rip), %rdi      # 0x1efb8
callq 0x4360
movq %rax, %r15
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x42d0
movsbl %al, %esi
movq %r15, %rdi
callq 0x4040
movq %rax, %rdi
callq 0x4230
movq -0x80(%rbp), %rax
movq -0x78(%rbp), %rcx
subq %rax, %rcx
je 0x146d1
movq %rcx, %rdx
sarq $0x3, %rdx
imulq %r12, %rdx
addq $-0x6, %rdx
cmpq $-0x4, %rdx
ja 0x146d1
addq $0x30, %rax
jmp 0x146d8
addq %rcx, %rax
addq $-0x48, %rax
cmpb $0x1, 0x10(%rax)
jne 0x14705
movq (%rax), %rsi
movq 0x8(%rax), %rdx
leaq -0x6f0(%rbp), %rax
movq %rax, -0x10(%rax)
leaq -0x700(%rbp), %rdi
callq 0x143da
movq -0x700(%rbp), %r14
jmp 0x1471e
movq %r14, -0x700(%rbp)
movq $0x0, -0x6f8(%rbp)
movb $0x0, -0x6f0(%rbp)
callq 0x4060
movq %rax, %r15
movl (%rax), %ebx
movl $0x0, (%rax)
leaq -0x48(%rbp), %r12
movq %r14, %rdi
movq %r12, %rsi
movl $0xa, %edx
callq 0x43f0
cmpq %r14, (%r12)
je 0x14c36
movslq %eax, %rcx
cmpq %rax, %rcx
jne 0x14c42
movl (%r15), %ecx
cmpl $0x22, %ecx
je 0x14c42
testl %ecx, %ecx
jne 0x1476b
movl %ebx, (%r15)
movq -0x30(%rbp), %rbx
movq %rax, 0x18(%rbx)
leaq -0x6f0(%rbp), %r12
movq -0x10(%r12), %rdi
cmpq %r12, %rdi
je 0x14793
movq -0x6f0(%rbp), %rsi
incq %rsi
callq 0x42f0
movq 0xa81e(%rip), %rdi      # 0x1efb8
leaq 0x2a23(%rip), %rsi      # 0x171c4
movl $0x8, %edx
callq 0x4360
movq 0x18(%rbx), %rsi
movq 0xa802(%rip), %rdi      # 0x1efb8
callq 0x4220
movq %rax, %r14
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x42d0
movsbl %al, %esi
movq %r14, %rdi
callq 0x4040
movq %rax, %rdi
callq 0x4230
leaq -0xf8(%rbp), %r14
movq %r13, %rdi
movq %r14, %rsi
callq 0x6b0b
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x148aa
movq %r14, %rdi
callq 0x6bfc
testb %al, %al
jne 0x147ec
movq %r14, %rdi
callq 0x6bee
testb %al, %al
je 0x1483f
movq %r14, %rdi
callq 0x6c7c
movq -0x50(%rbp), %rdi
movq %rax, %rsi
callq 0x14ee0
movq %rax, %rdi
callq 0x604c
jmp 0x147ec
movq %r14, %rdi
callq 0x6be0
testb %al, %al
je 0x14869
movq %r14, %rdi
callq 0x6c7c
movq -0x50(%rbp), %rdi
movq %rax, %rsi
callq 0x14ee0
movq %rax, %rdi
callq 0x602e
jmp 0x147ec
movq %r14, %rdi
callq 0x6bd2
testb %al, %al
je 0x147ec
movq %r14, %rdi
callq 0x6c0a
testb %al, %al
jne 0x147ec
movq %r14, %rdi
callq 0x6c7c
movq -0x50(%rbp), %rdi
movq %rax, %rsi
callq 0x14ee0
movq %rax, %rdi
callq 0x6024
jmp 0x147ec
movq 0x58(%rbx), %r14
cmpq -0x60(%rbp), %r14
je 0x1499f
leaq -0x700(%rbp), %r13
leaq 0x40(%r14), %r15
movq %r15, %rdi
callq 0x601c
testb %al, %al
je 0x1498a
movq %r12, -0x700(%rbp)
movq 0x20(%r14), %rsi
movq 0x28(%r14), %rdx
addq %rsi, %rdx
movq %r13, %rdi
callq 0x56d2
movq (%r15), %rax
movq %rax, -0x6e0(%rbp)
movl $0x38, %edi
callq 0x42e0
movq %rax, %rcx
addq $0x20, %rcx
movq %rcx, 0x10(%rax)
movq -0x700(%rbp), %rdx
cmpq %r12, %rdx
je 0x14929
movq %rdx, 0x10(%rax)
movq -0x6f0(%rbp), %rcx
movq %rcx, 0x20(%rax)
jmp 0x14931
movups (%r12), %xmm0
movups %xmm0, (%rcx)
movq -0x6f8(%rbp), %rcx
movq %rcx, 0x18(%rax)
movq %r12, -0x700(%rbp)
movq $0x0, -0x6f8(%rbp)
movb $0x0, -0x6f0(%rbp)
movq -0x6e0(%rbp), %rcx
movq %rcx, 0x30(%rax)
movq %rax, %rdi
movq %rbx, %rsi
callq 0x4070
incq 0x10(%rbx)
movq -0x700(%rbp), %rdi
cmpq %r12, %rdi
je 0x1498a
movq -0x6f0(%rbp), %rsi
incq %rsi
callq 0x42f0
movq %r14, %rdi
callq 0x4240
movq %rax, %r14
cmpq -0x60(%rbp), %rax
jne 0x148bf
movq (%rbx), %rsi
cmpq %rbx, %rsi
je 0x14b21
cmpq %rbx, (%rsi)
je 0x14b21
leaq -0x48(%rbp), %rax
movq %rax, -0x40(%rbp)
movq %rax, -0x48(%rbp)
movq $0x0, -0x38(%rbp)
xorl %eax, %eax
leaq (%rax,%rbp), %rcx
addq $-0x700, %rcx           # imm = 0xF900
movq %rcx, 0x8(%rcx)
movq %rcx, (%rcx)
movq $0x0, 0x10(%rcx)
addq $0x18, %rax
cmpq $0x600, %rax            # imm = 0x600
jne 0x149ca
leaq -0x48(%rbp), %r14
leaq -0x700(%rbp), %r13
movq %r13, %r12
movq -0x48(%rbp), %rdi
movq (%rsi), %rdx
cmpq %rsi, %rdi
sete %al
cmpq %rdi, %rdx
sete %cl
orb %al, %cl
jne 0x14a26
callq 0x4180
incq -0x38(%rbp)
movq -0x30(%rbp), %rax
decq 0x10(%rax)
movl $0x18, %r13d
leaq -0x700(%rbp), %r15
cmpq %r12, %r15
je 0x14a74
cmpq (%r15), %r15
setne %bl
je 0x14a78
movq %r15, %rdi
movq %r14, %rsi
callq 0x14e0a
movq %r14, %rdi
movq %r15, %rsi
callq 0x44c0
movq 0x10(%r15), %rax
movq -0x38(%rbp), %rcx
movq %rcx, 0x10(%r15)
movq %rax, -0x38(%rbp)
addq $0x18, %r15
cmpq %r12, %r15
jne 0x14a38
movq %r12, %r15
jmp 0x14a7b
movb $0x1, %bl
jmp 0x14a7b
xorl %r13d, %r13d
movq %r14, %rdi
movq %r15, %rsi
callq 0x44c0
movq 0x10(%r15), %rax
movq -0x38(%rbp), %rcx
movq %rcx, 0x10(%r15)
movq %rax, -0x38(%rbp)
addq %r12, %r13
movq -0x30(%rbp), %rax
movq (%rax), %rsi
cmpq %rax, %rsi
jne 0x149fb
leaq -0x700(%rbp), %rsi
leaq 0x18(%rsi), %r15
cmpq %r13, %r15
je 0x14ac6
movq %r15, %rdi
callq 0x14e0a
movq %r15, %rsi
jmp 0x14ab0
leaq -0x18(%r12), %rsi
leaq -0x8(%r12), %rax
leaq 0x10(%r12), %r14
testb %bl, %bl
cmovneq %r12, %rsi
cmoveq %rax, %r14
movq -0x30(%rbp), %rbx
movq %rbx, %rdi
callq 0x44c0
movq (%r14), %rax
movq 0x10(%rbx), %rcx
movq %rcx, (%r14)
movq %rax, 0x10(%rbx)
movl $0x5e8, %ebx            # imm = 0x5E8
leaq (%rbx,%rbp), %rdi
addq $-0x700, %rdi           # imm = 0xF900
callq 0x53a0
addq $-0x18, %rbx
cmpq $-0x18, %rbx
jne 0x14afe
leaq -0x48(%rbp), %rdi
callq 0x53a0
movq -0x80(%rbp), %rdi
testq %rdi, %rdi
je 0x14b36
movq -0x70(%rbp), %rsi
subq %rdi, %rsi
callq 0x42f0
leaq -0xa0(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x14b55
movq -0xa0(%rbp), %rsi
incq %rsi
callq 0x42f0
leaq -0xc0(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x14b74
movq -0xc0(%rbp), %rsi
incq %rsi
callq 0x42f0
leaq -0xe8(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x14b93
movq -0xe8(%rbp), %rsi
incq %rsi
callq 0x42f0
addq $0x6d8, %rsp            # imm = 0x6D8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0xac7c(%rip), %rdi      # 0x1f828
callq 0x44d0
testl %eax, %eax
je 0x1455f
leaq 0xac48(%rip), %rdi      # 0x1f808
leaq 0x25ca(%rip), %rsi      # 0x17191
movl $0x10, %edx
callq 0x6cda
leaq -0xde92(%rip), %rdi     # 0x6d46
leaq 0xac29(%rip), %rsi      # 0x1f808
leaq 0xa6c2(%rip), %rdx      # 0x1f2a8
callq 0x42b0
leaq 0xac36(%rip), %rdi      # 0x1f828
callq 0x4210
movq -0x30(%rbp), %rbx
jmp 0x1455f
movl $0x10, %edi
callq 0x4170
movq %rax, %r15
leaq 0x25b9(%rip), %rsi      # 0x171cd
movq %rax, %rdi
callq 0x4200
movq 0xa355(%rip), %rsi      # 0x1ef78
movq 0xa366(%rip), %rdx      # 0x1ef90
movq %r15, %rdi
movq -0x30(%rbp), %rbx
callq 0x4480
leaq 0x25b4(%rip), %rdi      # 0x171f1
callq 0x41d0
leaq 0x25a8(%rip), %rdi      # 0x171f1
callq 0x4420
movq %rax, %r14
leaq 0xabd0(%rip), %rdi      # 0x1f828
callq 0x41f0
movq -0x30(%rbp), %rbx
jmp 0x14db7
jmp 0x14ca6
jmp 0x14d5d
movq %rax, %r14
movq %r15, %rdi
callq 0x4270
jmp 0x14d92
movq %rax, %r14
jmp 0x14db7
movq %rax, %r14
cmpl $0x0, (%r15)
jne 0x14c91
movl %ebx, (%r15)
leaq -0x6f0(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
jne 0x14cc1
jmp 0x14d92
movq %rax, %r14
jmp 0x14d92
movq %rax, %r14
movq -0x700(%rbp), %rdi
cmpq %r12, %rdi
je 0x14d92
movq -0x6f0(%rbp), %rsi
incq %rsi
callq 0x42f0
jmp 0x14d92
jmp 0x14cde
jmp 0x14d5d
jmp 0x14d5d
movq -0x30(%rbp), %rbx
movq %rax, %rdi
callq 0x4120
movq -0x48(%rbp), %rsi
cmpq %r14, %rsi
je 0x14d12
leaq -0x48(%rbp), %r14
movq %rbx, %rdi
movq %r14, %rdx
callq 0x4180
movq 0x10(%r14), %rax
addq %rax, 0x10(%rbx)
movq $0x0, 0x10(%r14)
xorl %ebx, %ebx
movq -0x30(%rbp), %r14
leaq (%rbx,%rbp), %rdx
addq $-0x700, %rdx           # imm = 0xF900
movq (%rdx), %rsi
cmpq %rsi, %rdx
je 0x14d4b
movq %r14, %rdi
callq 0x4180
movq -0x6f0(%rbp,%rbx), %rax
addq %rax, 0x10(%r14)
movq $0x0, -0x6f0(%rbp,%rbx)
addq $0x18, %rbx
cmpq $0x600, %rbx            # imm = 0x600
jne 0x14d18
callq 0x4430
movq %rax, %r14
jmp 0x14d96
movq %rax, %r14
callq 0x4460
movl $0x5e8, %ebx            # imm = 0x5E8
leaq (%rbx,%rbp), %rdi
addq $-0x700, %rdi           # imm = 0xF900
callq 0x53a0
addq $-0x18, %rbx
cmpq $-0x18, %rbx
jne 0x14d6f
leaq -0x48(%rbp), %rdi
callq 0x53a0
movq -0x30(%rbp), %rbx
movq -0x80(%rbp), %rdi
testq %rdi, %rdi
je 0x14dab
movq -0x70(%rbp), %rsi
subq %rdi, %rsi
callq 0x42f0
leaq -0xf8(%rbp), %rdi
callq 0x14f60
movq -0x50(%rbp), %rdi
callq 0x5302
movq -0x58(%rbp), %rax
movq (%rax), %rdi
movq -0x88(%rbp), %rax
cmpq %rax, %rdi
je 0x14dde
movq (%rax), %rsi
incq %rsi
callq 0x42f0
movq %rbx, %rdi
callq 0x53a0
movq %r14, %rdi
callq 0x44a0
movq %rax, %rdi
callq 0x535d