// File: /workspace/github_cpp_makefile_star2_O1/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 $0x6e8, %rsp            # imm = 0x6E8
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, -0x60(%rbp)
leaq 0x30(%rdi), %rcx
movq %rcx, -0x98(%rbp)
movq %rcx, 0x20(%rdi)
movq %rax, 0x28(%rdi)
movb $0x0, 0x30(%rdi)
leaq 0x40(%rdi), %rcx
movq %rcx, -0x58(%rbp)
leaq 0x48(%rdi), %rcx
movl $0x0, 0x48(%rdi)
movq %rax, 0x50(%rdi)
movq %rcx, 0x58(%rdi)
movq %rcx, -0x68(%rbp)
movq %rcx, 0x60(%rdi)
movq %rax, 0x68(%rdi)
movb 0xb32d(%rip), %al       # 0x1f828
testb %al, %al
movq %rdi, -0x30(%rbp)
je 0x14b8c
leaq -0x108(%rbp), %rdi
movq %r13, %rsi
callq 0x6118
xorps %xmm0, %xmm0
movaps %xmm0, -0x80(%rbp)
movaps %xmm0, -0x90(%rbp)
leaq -0x108(%rbp), %rdi
callq 0x6c9a
movq (%rax), %rdi
movq 0x8(%rax), %rsi
addq %rdi, %rsi
leaq 0xb2c7(%rip), %rcx      # 0x1f808
leaq -0x90(%rbp), %rdx
xorl %r8d, %r8d
callq 0x12254
testb %al, %al
je 0x14be7
movq -0x90(%rbp), %rcx
movq -0x88(%rbp), %rax
movabsq $-0x5555555555555555, %r15 # imm = 0xAAAAAAAAAAAAAAAB
cmpq %rax, %rcx
je 0x14590
movq %rax, %rdx
subq %rcx, %rdx
sarq $0x3, %rdx
imulq %r15, %rdx
addq $-0x5, %rdx
cmpq $-0x2, %rdx
setb %dl
jmp 0x14592
xorl %edx, %edx
addq $0x18, %rcx
addq $-0x48, %rax
testb %dl, %dl
cmovneq %rcx, %rax
cmpb $0x1, 0x10(%rax)
jne 0x145c6
movq (%rax), %rsi
movq 0x8(%rax), %rdx
leaq -0x700(%rbp), %rax
movq %rax, -0x10(%rax)
leaq -0x710(%rbp), %rdi
callq 0x1437c
jmp 0x145dc
leaq -0x700(%rbp), %rax
movq %rax, -0x10(%rax)
movq $0x0, -0x8(%rax)
movb $0x0, (%rax)
leaq -0x710(%rbp), %r14
movq -0x60(%rbp), %rdi
movq %r14, %rsi
callq 0x43a0
movq (%r14), %rdi
leaq -0x700(%rbp), %r12
cmpq %r12, %rdi
je 0x1460d
movq -0x700(%rbp), %rsi
incq %rsi
callq 0x42f0
movq 0xa9a4(%rip), %rdi      # 0x1efb8
leaq 0x2ba0(%rip), %rsi      # 0x171bb
movl $0x8, %edx
callq 0x4360
movq 0x20(%rbx), %rsi
movq 0x28(%rbx), %rdx
movq 0xa984(%rip), %rdi      # 0x1efb8
callq 0x4360
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
movq -0x90(%rbp), %rcx
movq -0x88(%rbp), %rax
cmpq %rax, %rcx
je 0x14691
movq %rax, %rdx
subq %rcx, %rdx
sarq $0x3, %rdx
imulq %r15, %rdx
addq $-0x6, %rdx
cmpq $-0x3, %rdx
setb %dl
jmp 0x14693
xorl %edx, %edx
addq $0x30, %rcx
addq $-0x48, %rax
testb %dl, %dl
cmovneq %rcx, %rax
cmpb $0x1, 0x10(%rax)
jne 0x146bf
movq (%rax), %rsi
movq 0x8(%rax), %rdx
leaq -0x710(%rbp), %rdi
movq %r12, (%rdi)
callq 0x1437c
jmp 0x146d8
movq %r12, -0x710(%rbp)
movq $0x0, -0x708(%rbp)
movb $0x0, -0x700(%rbp)
movq -0x710(%rbp), %r15
callq 0x4060
movq %rax, %r14
movl (%rax), %eax
movl %eax, -0x4c(%rbp)
movl $0x0, (%r14)
leaq -0x48(%rbp), %rbx
movq %r15, %rdi
movq %rbx, %rsi
movl $0xa, %edx
callq 0x43f0
cmpq %r15, (%rbx)
je 0x14c1d
movslq %eax, %rcx
cmpq %rax, %rcx
jne 0x14c29
movl (%r14), %ecx
cmpl $0x22, %ecx
je 0x14c29
testl %ecx, %ecx
jne 0x14732
movl -0x4c(%rbp), %ecx
movl %ecx, (%r14)
cltq
movq -0x30(%rbp), %rbx
movq %rax, 0x18(%rbx)
movq -0x710(%rbp), %rdi
cmpq %r12, %rdi
je 0x14757
movq -0x700(%rbp), %rsi
incq %rsi
callq 0x42f0
movq 0xa85a(%rip), %rdi      # 0x1efb8
leaq 0x2a5f(%rip), %rsi      # 0x171c4
movl $0x8, %edx
callq 0x4360
movq 0x18(%rbx), %rsi
movq 0xa83e(%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 -0x108(%rbp), %r14
movq %r13, %rdi
movq %r14, %rsi
callq 0x6b90
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x1486e
movq %r14, %rdi
callq 0x6c82
testb %al, %al
jne 0x147b0
movq %r14, %rdi
callq 0x6c74
testb %al, %al
je 0x14803
movq %r14, %rdi
callq 0x6d02
movq -0x58(%rbp), %rdi
movq %rax, %rsi
callq 0x14ec2
movq %rax, %rdi
callq 0x60b4
jmp 0x147b0
movq %r14, %rdi
callq 0x6c66
testb %al, %al
je 0x1482d
movq %r14, %rdi
callq 0x6d02
movq -0x58(%rbp), %rdi
movq %rax, %rsi
callq 0x14ec2
movq %rax, %rdi
callq 0x6096
jmp 0x147b0
movq %r14, %rdi
callq 0x6c58
testb %al, %al
je 0x147b0
movq %r14, %rdi
callq 0x6c90
testb %al, %al
jne 0x147b0
movq %r14, %rdi
callq 0x6d02
movq -0x58(%rbp), %rdi
movq %rax, %rsi
callq 0x14ec2
movq %rax, %rdi
callq 0x608c
jmp 0x147b0
movq 0x58(%rbx), %r14
cmpq -0x68(%rbp), %r14
je 0x14963
leaq -0x710(%rbp), %r13
leaq 0x40(%r14), %r15
movq %r15, %rdi
callq 0x6084
testb %al, %al
je 0x1494e
movq %r12, -0x710(%rbp)
movq 0x20(%r14), %rsi
movq 0x28(%r14), %rdx
addq %rsi, %rdx
movq %r13, %rdi
callq 0x56fa
movq (%r15), %rax
movq %rax, -0x6f0(%rbp)
movl $0x38, %edi
callq 0x42e0
movq %rax, %rcx
addq $0x20, %rcx
movq %rcx, 0x10(%rax)
movq -0x710(%rbp), %rdx
cmpq %r12, %rdx
je 0x148ed
movq %rdx, 0x10(%rax)
movq -0x700(%rbp), %rcx
movq %rcx, 0x20(%rax)
jmp 0x148f5
movups (%r12), %xmm0
movups %xmm0, (%rcx)
movq -0x708(%rbp), %rcx
movq %rcx, 0x18(%rax)
movq %r12, -0x710(%rbp)
movq $0x0, -0x708(%rbp)
movb $0x0, -0x700(%rbp)
movq -0x6f0(%rbp), %rcx
movq %rcx, 0x30(%rax)
movq %rax, %rdi
movq %rbx, %rsi
callq 0x4070
incq 0x10(%rbx)
movq -0x710(%rbp), %rdi
cmpq %r12, %rdi
je 0x1494e
movq -0x700(%rbp), %rsi
incq %rsi
callq 0x42f0
movq %r14, %rdi
callq 0x4240
movq %rax, %r14
cmpq -0x68(%rbp), %rax
jne 0x14883
movq (%rbx), %rax
cmpq %rbx, %rax
je 0x14b05
cmpq %rbx, (%rax)
je 0x14b05
leaq -0x48(%rbp), %rax
movq %rax, -0x40(%rbp)
movq %rax, -0x48(%rbp)
movq $0x0, -0x38(%rbp)
xorl %eax, %eax
leaq (%rax,%rbp), %rcx
addq $-0x710, %rcx           # imm = 0xF8F0
movq %rcx, 0x8(%rcx)
movq %rcx, (%rcx)
movq $0x0, 0x10(%rcx)
addq $0x18, %rax
cmpq $0x600, %rax            # imm = 0x600
jne 0x1498e
leaq -0x710(%rbp), %r12
movq -0x30(%rbp), %r8
movq %r12, %r14
movq -0x48(%rbp), %rdi
movq (%r8), %rsi
movq (%rsi), %rdx
cmpq %rsi, %rdi
sete %al
cmpq %rdi, %rdx
sete %cl
orb %al, %cl
jne 0x149ec
movq %r8, %rbx
callq 0x4180
incq -0x38(%rbp)
decq 0x10(%rbx)
leaq -0x710(%rbp), %rax
cmpq %r14, %rax
sete %bl
leaq -0x48(%rbp), %r15
je 0x14a47
cmpq %rax, -0x710(%rbp)
je 0x14a52
movq %rax, %r13
movq %rax, %rdi
movq %r15, %rsi
callq 0x14dec
movq %r15, %rdi
movq %r13, %rsi
callq 0x44c0
movq 0x10(%r13), %rax
movq -0x38(%rbp), %rcx
movq %rcx, 0x10(%r13)
movq %rax, -0x38(%rbp)
leaq 0x18(%r13), %rax
cmpq %r14, %rax
sete %bl
je 0x14a5a
cmpq %rax, (%rax)
jne 0x14a08
xorl %r12d, %r12d
jmp 0x14a60
movq %rax, %r13
movl $0x18, %r12d
jmp 0x14a64
movq %rax, %r13
xorl %r12d, %r12d
jmp 0x14a64
movl $0x18, %r12d
addq $0x18, %r13
leaq -0x48(%rbp), %rdi
movq %r13, %rsi
callq 0x44c0
movq 0x10(%r13), %rax
movq -0x38(%rbp), %rcx
movq %rcx, 0x10(%r13)
movq %rax, -0x38(%rbp)
addq %r14, %r12
movq -0x30(%rbp), %r8
cmpq %r8, (%r8)
jne 0x149bf
leaq -0x710(%rbp), %rsi
leaq 0x18(%rsi), %r15
cmpq %r12, %r15
je 0x14aad
movq %r15, %rdi
callq 0x14dec
movq %r15, %rsi
jmp 0x14a97
leaq -0x18(%r14), %rsi
leaq -0x8(%r14), %rax
leaq 0x10(%r14), %r15
testb %bl, %bl
cmovneq %r14, %rsi
cmoveq %rax, %r15
movq -0x30(%rbp), %rbx
movq %rbx, %rdi
callq 0x44c0
movq (%r15), %rax
movq 0x10(%rbx), %rcx
movq %rcx, (%r15)
movq %rax, 0x10(%rbx)
movl $0x5e8, %ebx            # imm = 0x5E8
leaq (%rbx,%rbp), %rdi
addq $-0x710, %rdi           # imm = 0xF8F0
callq 0x53a8
addq $-0x18, %rbx
cmpq $-0x18, %rbx
jne 0x14ae2
leaq -0x48(%rbp), %rdi
callq 0x53a8
movq -0x90(%rbp), %rdi
testq %rdi, %rdi
je 0x14b1d
movq -0x80(%rbp), %rsi
subq %rdi, %rsi
callq 0x42f0
leaq -0xb0(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x14b3c
movq -0xb0(%rbp), %rsi
incq %rsi
callq 0x42f0
leaq -0xd0(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x14b5b
movq -0xd0(%rbp), %rsi
incq %rsi
callq 0x42f0
leaq -0xf8(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x14b7a
movq -0xf8(%rbp), %rsi
incq %rsi
callq 0x42f0
addq $0x6e8, %rsp            # imm = 0x6E8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0xac95(%rip), %rdi      # 0x1f828
callq 0x44d0
testl %eax, %eax
je 0x14507
leaq 0xac61(%rip), %rdi      # 0x1f808
leaq 0x25e3(%rip), %rsi      # 0x17191
movl $0x10, %edx
callq 0x6d60
leaq -0xddf3(%rip), %rdi     # 0x6dcc
leaq 0xac42(%rip), %rsi      # 0x1f808
leaq 0xa6db(%rip), %rdx      # 0x1f2a8
callq 0x42b0
leaq 0xac4f(%rip), %rdi      # 0x1f828
callq 0x4210
movq -0x30(%rbp), %rbx
jmp 0x14507
movl $0x10, %edi
callq 0x4170
movq %rax, %r14
leaq 0x25d2(%rip), %rsi      # 0x171cd
movq %rax, %rdi
callq 0x4200
movq 0xa36e(%rip), %rsi      # 0x1ef78
movq 0xa37f(%rip), %rdx      # 0x1ef90
movq %r14, %rdi
movq -0x30(%rbp), %rbx
callq 0x4480
leaq 0x25cd(%rip), %rdi      # 0x171f1
callq 0x41d0
leaq 0x25c1(%rip), %rdi      # 0x171f1
callq 0x4420
movq %rax, %r15
leaq 0xabe9(%rip), %rdi      # 0x1f828
callq 0x41f0
movq -0x30(%rbp), %rbx
jmp 0x14da0
jmp 0x14c7d
jmp 0x14d79
movq %rax, %r15
movq %r14, %rdi
callq 0x4270
jmp 0x14d6b
movq %rax, %r15
jmp 0x14da0
movq %rax, %r15
cmpl $0x0, (%r14)
jne 0x14c88
movl -0x4c(%rbp), %eax
movl %eax, (%r14)
jmp 0x14c88
movq %rax, %r15
jmp 0x14d6b
movq %rax, %r15
movq -0x710(%rbp), %rdi
cmpq %r12, %rdi
je 0x14d6b
movq -0x700(%rbp), %rsi
incq %rsi
callq 0x42f0
jmp 0x14d6b
leaq -0x48(%rbp), %r15
jmp 0x14cbc
jmp 0x14d79
jmp 0x14d79
movq %rax, %rdi
callq 0x4120
movq -0x48(%rbp), %rsi
cmpq %r15, %rsi
je 0x14cf0
leaq -0x48(%rbp), %r14
movq -0x30(%rbp), %rbx
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 $-0x710, %rdx           # imm = 0xF8F0
movq (%rdx), %rsi
cmpq %rsi, %rdx
je 0x14d29
movq %r14, %rdi
callq 0x4180
movq -0x700(%rbp,%rbx), %rax
addq %rax, 0x10(%r14)
movq $0x0, -0x700(%rbp,%rbx)
addq $0x18, %rbx
cmpq $0x600, %rbx            # imm = 0x600
jne 0x14cf6
callq 0x4430
movq %rax, %r15
callq 0x4460
movl $0x5e8, %ebx            # imm = 0x5E8
leaq (%rbx,%rbp), %rdi
addq $-0x710, %rdi           # imm = 0xF8F0
callq 0x53a8
addq $-0x18, %rbx
cmpq $-0x18, %rbx
jne 0x14d48
leaq -0x48(%rbp), %rdi
callq 0x53a8
movq -0x30(%rbp), %rbx
jmp 0x14d7c
movq %rax, %rdi
callq 0x5365
movq %rax, %r15
movq -0x90(%rbp), %rdi
testq %rdi, %rdi
je 0x14d94
movq -0x80(%rbp), %rsi
subq %rdi, %rsi
callq 0x42f0
leaq -0x108(%rbp), %rdi
callq 0x14f42
movq -0x58(%rbp), %rdi
callq 0x530a
movq -0x60(%rbp), %rax
movq (%rax), %rdi
movq -0x98(%rbp), %rax
cmpq %rax, %rdi
je 0x14dc7
movq (%rax), %rsi
incq %rsi
callq 0x42f0
movq %rbx, %rdi
callq 0x53a8
movq %r15, %rdi
callq 0x44a0
nop