// File: /workspace/github_cpp_makefile_star2_O1/murry2018[P]mogazi/kakaotalk_chat.cpp
// Function: kakaotalk::chat::analyse()
void chat::analyse() {
    static const regex pattern_common("\
^(\\d+)년 (\\d+)월 (\\d+)일 (오전|오후) (\\d+):(\\d+), ((?:.|\\n)*)");
    static const regex pattern_in("(?:([^:]*)님이 들어왔습니다\\.((?:.|\\n)*)|(?:[^:]*)님이 ([^:]*)님을 초대했습니다\\.)");
    static const regex pattern_out("([^:]*)님(이 나갔습니다|을 내보냈습니다)\\.");
    static const regex pattern_talk("(?:([^:]*) : ?)((?:.|\\n)*)");
    static const string pattern_extra1("삭제된 메시지입니다.");
    static const string pattern_extra2("채팅방 관리자가 메시지를 가렸습니다.");
    
    std::smatch m_common;
    if (regex_match(full_content, m_common, pattern_common)) {
      string chat_content = m_common[7];
      std::smatch m_content;
      if (regex_match(chat_content, m_content, pattern_talk)) {
        /* 떠드는 패턴인 경우: 

           '2019년 5월 27일 오전 12:22, 악성유저 : 악성유저님이 나갔습니다.'

           이와 같은 특수 케이스로부터 방어하기 위해 떠드는 패턴을
           우선적으로 체크한다. */
        type = chat::TALK;
        _name = m_content[1], _content = m_content[2];
      } else if (regex_match(chat_content, m_content, pattern_in)) {
        // 들어온 패턴인 경우 (나가는 패턴과의 확인 순서는 중요치 않다)
        type = chat::IN;
        _name = m_content[1];
        if (m_content[2] != "") {
          /* 들어온 사람이 자기자신인지 확인: 자기 자신은 들어올땐
             이름으로 표시되고 떠들땐 회원님이라 표시되기 때문에 이를
             구분해주지 않으면 가만히 있는 사람 한명이 더 생긴다. */
          _myself = true;
        } else {
          _myself = false;
        }
      } else if (regex_match(chat_content, m_content, pattern_out)) {
        // 나가는 패턴인 경우
        type = chat::OUT;
        _name = m_content[1];
      } else if (chat_content == pattern_extra1
                 || chat_content == pattern_extra2) {
        type = chat::EXTRA;
      } else {
        // '2019년 5월 27일 오전 12:22, 이런시발' 과 같은 잘못된 형식인 경우
        std::cout << chat_content << std::endl;
        throw runtime_error("Unexpected Chat Pattern");
      }
    } else {
      /* 채팅 내용이 아닌 패턴 */
      type = chat::EXTRA;
    }
  }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0xa8, %rsp
movq %rdi, %rbx
movb 0x193e7(%rip), %al      # 0x1f6f0
testb %al, %al
je 0x6841
movb 0x19401(%rip), %al      # 0x1f718
testb %al, %al
je 0x6898
movb 0x1941b(%rip), %al      # 0x1f740
testb %al, %al
je 0x68ef
movb 0x19435(%rip), %al      # 0x1f768
testb %al, %al
je 0x6946
movb 0x1944f(%rip), %al      # 0x1f790
testb %al, %al
je 0x699d
movb 0x19469(%rip), %al      # 0x1f7b8
testb %al, %al
je 0x6a04
xorps %xmm0, %xmm0
leaq -0xa0(%rbp), %rdx
movaps %xmm0, 0x10(%rdx)
movaps %xmm0, (%rdx)
movq (%rbx), %rdi
movq 0x8(%rbx), %rsi
addq %rdi, %rsi
leaq 0x19357(%rip), %rcx     # 0x1f6d0
xorl %r8d, %r8d
callq 0x12254
testb %al, %al
je 0x63bd
movq -0xa0(%rbp), %rcx
movq -0x98(%rbp), %rax
cmpq %rax, %rcx
je 0x63c9
movq %rax, %rdx
subq %rcx, %rdx
sarq $0x3, %rdx
movabsq $-0x5555555555555555, %rsi # imm = 0xAAAAAAAAAAAAAAAB
imulq %rdx, %rsi
addq $-0xb, %rsi
cmpq $-0x8, %rsi
setb %dl
jmp 0x63cb
movl $0x3, 0x20(%rbx)
jmp 0x67b6
xorl %edx, %edx
addq $0xa8, %rcx
addq $-0x48, %rax
testb %dl, %dl
cmovneq %rcx, %rax
cmpb $0x1, 0x10(%rax)
leaq -0x48(%rbp), %r15
jne 0x63fb
movq (%rax), %rsi
movq 0x8(%rax), %rdx
leaq -0x58(%rbp), %rdi
movq %r15, (%rdi)
callq 0x1437c
jmp 0x640b
movq %r15, -0x58(%rbp)
movq $0x0, -0x50(%rbp)
movb $0x0, -0x48(%rbp)
xorps %xmm0, %xmm0
leaq -0x80(%rbp), %rdx
movaps %xmm0, 0x10(%rdx)
movaps %xmm0, (%rdx)
movq -0x58(%rbp), %rdi
movq -0x50(%rbp), %rsi
addq %rdi, %rsi
leaq 0x1931d(%rip), %rcx     # 0x1f748
xorl %r8d, %r8d
callq 0x12254
testb %al, %al
je 0x6477
movl $0x2, 0x20(%rbx)
movq -0x80(%rbp), %rcx
movq -0x78(%rbp), %rax
cmpq %rax, %rcx
je 0x653f
movq %rax, %rdx
subq %rcx, %rdx
sarq $0x3, %rdx
movabsq $-0x5555555555555555, %rsi # imm = 0xAAAAAAAAAAAAAAAB
imulq %rdx, %rsi
addq $-0x5, %rsi
cmpq $-0x2, %rsi
setb %dl
jmp 0x6541
movq -0x58(%rbp), %rdi
movq -0x50(%rbp), %rsi
addq %rdi, %rsi
leaq 0x1926f(%rip), %rcx     # 0x1f6f8
leaq -0x80(%rbp), %rdx
xorl %r8d, %r8d
callq 0x12254
testb %al, %al
je 0x64d9
movl $0x0, 0x20(%rbx)
movq -0x80(%rbp), %rcx
movq -0x78(%rbp), %rax
cmpq %rax, %rcx
je 0x66c5
movq %rax, %rdx
subq %rcx, %rdx
sarq $0x3, %rdx
movabsq $-0x5555555555555555, %rsi # imm = 0xAAAAAAAAAAAAAAAB
imulq %rdx, %rsi
addq $-0x5, %rsi
cmpq $-0x2, %rsi
setb %dl
jmp 0x66c7
movq -0x58(%rbp), %rdi
movq -0x50(%rbp), %rsi
addq %rdi, %rsi
leaq 0x19235(%rip), %rcx     # 0x1f720
leaq -0x80(%rbp), %rdx
xorl %r8d, %r8d
callq 0x12254
testb %al, %al
je 0x6663
movl $0x1, 0x20(%rbx)
movq -0x80(%rbp), %rcx
movq -0x78(%rbp), %rax
cmpq %rax, %rcx
je 0x67df
movq %rax, %rdx
subq %rcx, %rdx
sarq $0x3, %rdx
movabsq $-0x5555555555555555, %rsi # imm = 0xAAAAAAAAAAAAAAAB
imulq %rdx, %rsi
addq $-0x5, %rsi
cmpq $-0x2, %rsi
setb %dl
jmp 0x67e1
xorl %edx, %edx
addq $0x18, %rcx
addq $-0x48, %rax
testb %dl, %dl
cmovneq %rcx, %rax
cmpb $0x1, 0x10(%rax)
jne 0x656f
movq (%rax), %rsi
movq 0x8(%rax), %rdx
leaq -0x28(%rbp), %rax
movq %rax, -0x10(%rax)
leaq -0x38(%rbp), %rdi
callq 0x1437c
jmp 0x6582
leaq -0x28(%rbp), %rax
movq %rax, -0x10(%rax)
movq $0x0, -0x8(%rax)
movb $0x0, (%rax)
leaq 0x48(%rbx), %rdi
leaq -0x38(%rbp), %rsi
callq 0x43a0
movq -0x80(%rbp), %rcx
movq -0x78(%rbp), %rax
cmpq %rax, %rcx
je 0x65c1
movq %rax, %rdx
subq %rcx, %rdx
sarq $0x3, %rdx
movabsq $-0x5555555555555555, %rsi # imm = 0xAAAAAAAAAAAAAAAB
imulq %rdx, %rsi
addq $-0x6, %rsi
cmpq $-0x3, %rsi
setb %dl
jmp 0x65c3
xorl %edx, %edx
addq $0x30, %rcx
addq $-0x48, %rax
testb %dl, %dl
cmovneq %rcx, %rax
cmpb $0x1, 0x10(%rax)
jne 0x65f7
movq (%rax), %rsi
movq 0x8(%rax), %rdx
leaq -0xb0(%rbp), %rax
movq %rax, -0x10(%rax)
leaq -0xc0(%rbp), %rdi
callq 0x1437c
jmp 0x660d
leaq -0xb0(%rbp), %rax
movq %rax, -0x10(%rax)
movq $0x0, -0x8(%rax)
movb $0x0, (%rax)
addq $0x28, %rbx
leaq -0xc0(%rbp), %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x43a0
movq (%r14), %rdi
leaq -0xb0(%rbp), %rax
cmpq %rax, %rdi
je 0x6641
movq -0xb0(%rbp), %rsi
incq %rsi
callq 0x42f0
leaq -0x28(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x678c
movq -0x28(%rbp), %rsi
incq %rsi
callq 0x42f0
jmp 0x678c
movq -0x50(%rbp), %r14
cmpq 0x1910a(%rip), %r14     # 0x1f778
jne 0x668c
testq %r14, %r14
je 0x66b9
movq 0x190f4(%rip), %rsi     # 0x1f770
movq -0x58(%rbp), %rdi
movq %r14, %rdx
callq 0x4310
testl %eax, %eax
je 0x66b9
cmpq 0x1910d(%rip), %r14     # 0x1f7a0
jne 0x6a6b
testq %r14, %r14
je 0x66b9
movq 0x190f3(%rip), %rsi     # 0x1f798
movq -0x58(%rbp), %rdi
movq %r14, %rdx
callq 0x4310
testl %eax, %eax
jne 0x6a6b
movl $0x3, 0x20(%rbx)
jmp 0x678c
xorl %edx, %edx
addq $0x18, %rcx
addq $-0x48, %rax
testb %dl, %dl
cmovneq %rcx, %rax
cmpb $0x1, 0x10(%rax)
jne 0x66f5
movq (%rax), %rsi
movq 0x8(%rax), %rdx
leaq -0x28(%rbp), %rax
movq %rax, -0x10(%rax)
leaq -0x38(%rbp), %rdi
callq 0x1437c
jmp 0x6708
leaq -0x28(%rbp), %rax
movq %rax, -0x10(%rax)
movq $0x0, -0x8(%rax)
movb $0x0, (%rax)
leaq 0x48(%rbx), %rdi
leaq -0x38(%rbp), %r14
movq %r14, %rsi
callq 0x43a0
movq (%r14), %rdi
leaq -0x28(%rbp), %rax
cmpq %rax, %rdi
je 0x6730
movq -0x28(%rbp), %rsi
incq %rsi
callq 0x42f0
movq -0x80(%rbp), %rax
movq -0x78(%rbp), %rdi
cmpq %rdi, %rax
je 0x6762
movq %rdi, %rcx
subq %rax, %rcx
sarq $0x3, %rcx
movabsq $-0x5555555555555555, %rdx # imm = 0xAAAAAAAAAAAAAAAB
imulq %rcx, %rdx
addq $-0x6, %rdx
cmpq $-0x3, %rdx
setb %cl
jmp 0x6764
xorl %ecx, %ecx
addq $0x30, %rax
addq $-0x48, %rdi
testb %cl, %cl
cmovneq %rax, %rdi
leaq 0xfc68(%rip), %rsi      # 0x163e1
callq 0x143fa
testl %eax, %eax
je 0x6788
movb $0x1, 0x68(%rbx)
jmp 0x678c
movb $0x0, 0x68(%rbx)
movq -0x80(%rbp), %rdi
testq %rdi, %rdi
je 0x67a1
movq -0x70(%rbp), %rsi
subq %rdi, %rsi
callq 0x42f0
movq -0x58(%rbp), %rdi
cmpq %r15, %rdi
je 0x67b6
movq -0x48(%rbp), %rsi
incq %rsi
callq 0x42f0
movq -0xa0(%rbp), %rdi
testq %rdi, %rdi
je 0x67d1
movq -0x90(%rbp), %rsi
subq %rdi, %rsi
callq 0x42f0
addq $0xa8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
xorl %edx, %edx
addq $0x18, %rcx
addq $-0x48, %rax
testb %dl, %dl
cmovneq %rcx, %rax
cmpb $0x1, 0x10(%rax)
jne 0x680f
movq (%rax), %rsi
movq 0x8(%rax), %rdx
leaq -0x28(%rbp), %rax
movq %rax, -0x10(%rax)
leaq -0x38(%rbp), %rdi
callq 0x1437c
jmp 0x6822
leaq -0x28(%rbp), %rax
movq %rax, -0x10(%rax)
movq $0x0, -0x8(%rax)
movb $0x0, (%rax)
addq $0x48, %rbx
leaq -0x38(%rbp), %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x43a0
movq (%r14), %rdi
leaq -0x28(%rbp), %rax
jmp 0x6649
leaq 0x18ea8(%rip), %rdi     # 0x1f6f0
callq 0x44d0
testl %eax, %eax
je 0x6311
leaq 0x18e74(%rip), %rdi     # 0x1f6d0
leaq 0xf988(%rip), %rsi      # 0x161eb
movl $0x10, %edx
callq 0x6d60
leaq 0x558(%rip), %rdi       # 0x6dcc
leaq 0x18e55(%rip), %rsi     # 0x1f6d0
leaq 0x18a26(%rip), %rdx     # 0x1f2a8
callq 0x42b0
leaq 0x18e62(%rip), %rdi     # 0x1f6f0
callq 0x4210
jmp 0x6311
leaq 0x18e79(%rip), %rdi     # 0x1f718
callq 0x44d0
testl %eax, %eax
je 0x631f
leaq 0x18e45(%rip), %rdi     # 0x1f6f8
leaq 0xf976(%rip), %rsi      # 0x16230
movl $0x10, %edx
callq 0x6d60
leaq 0x501(%rip), %rdi       # 0x6dcc
leaq 0x18e26(%rip), %rsi     # 0x1f6f8
leaq 0x189cf(%rip), %rdx     # 0x1f2a8
callq 0x42b0
leaq 0x18e33(%rip), %rdi     # 0x1f718
callq 0x4210
jmp 0x631f
leaq 0x18e4a(%rip), %rdi     # 0x1f740
callq 0x44d0
testl %eax, %eax
je 0x632d
leaq 0x18e16(%rip), %rdi     # 0x1f720
leaq 0xf984(%rip), %rsi      # 0x16295
movl $0x10, %edx
callq 0x6d60
leaq 0x4aa(%rip), %rdi       # 0x6dcc
leaq 0x18df7(%rip), %rsi     # 0x1f720
leaq 0x18978(%rip), %rdx     # 0x1f2a8
callq 0x42b0
leaq 0x18e04(%rip), %rdi     # 0x1f740
callq 0x4210
jmp 0x632d
leaq 0x18e1b(%rip), %rdi     # 0x1f768
callq 0x44d0
testl %eax, %eax
je 0x633b
leaq 0x18de7(%rip), %rdi     # 0x1f748
leaq 0xf966(%rip), %rsi      # 0x162ce
movl $0x10, %edx
callq 0x6d60
leaq 0x453(%rip), %rdi       # 0x6dcc
leaq 0x18dc8(%rip), %rsi     # 0x1f748
leaq 0x18921(%rip), %rdx     # 0x1f2a8
callq 0x42b0
leaq 0x18dd5(%rip), %rdi     # 0x1f768
callq 0x4210
jmp 0x633b
leaq 0x18dec(%rip), %rdi     # 0x1f790
callq 0x44d0
testl %eax, %eax
je 0x6349
leaq 0x18dc8(%rip), %rax     # 0x1f780
movq %rax, 0x18db1(%rip)     # 0x1f770
leaq 0x18daa(%rip), %rdi     # 0x1f770
leaq 0xf91c(%rip), %rsi      # 0x162e9
leaq 0xf932(%rip), %rdx      # 0x16306
callq 0x53f8
movq 0x18590(%rip), %rdi     # 0x1ef70
leaq 0x18d89(%rip), %rsi     # 0x1f770
leaq 0x188ba(%rip), %rdx     # 0x1f2a8
callq 0x42b0
leaq 0x18d96(%rip), %rdi     # 0x1f790
callq 0x4210
jmp 0x6349
leaq 0x18dad(%rip), %rdi     # 0x1f7b8
callq 0x44d0
testl %eax, %eax
je 0x6357
leaq 0x18d89(%rip), %rax     # 0x1f7a8
movq %rax, 0x18d72(%rip)     # 0x1f798
leaq 0x18d6b(%rip), %rdi     # 0x1f798
leaq 0xf8d3(%rip), %rsi      # 0x16307
leaq 0xf900(%rip), %rdx      # 0x1633b
callq 0x53f8
movq 0x18529(%rip), %rdi     # 0x1ef70
leaq 0x18d4a(%rip), %rsi     # 0x1f798
leaq 0x18853(%rip), %rdx     # 0x1f2a8
callq 0x42b0
leaq 0x18d57(%rip), %rdi     # 0x1f7b8
callq 0x4210
jmp 0x6357
movq -0x58(%rbp), %rsi
movq 0x18542(%rip), %rdi     # 0x1efb8
movq %r14, %rdx
callq 0x4360
movq %rax, %rdi
callq 0x4160
movl $0x10, %edi
callq 0x4170
movq %rax, %r14
leaq 0xf8a2(%rip), %rsi      # 0x1633c
movq %rax, %rdi
callq 0x4110
movq 0x18547(%rip), %rsi     # 0x1eff0
movq 0x184f0(%rip), %rdx     # 0x1efa0
movq %r14, %rdi
callq 0x4480
movq %rax, %rbx
leaq 0x18cf6(%rip), %rdi     # 0x1f7b8
jmp 0x6afe
movq %rax, %rbx
leaq 0x18cc2(%rip), %rdi     # 0x1f790
jmp 0x6afe
movq %rax, %rbx
leaq 0x18c8e(%rip), %rdi     # 0x1f768
jmp 0x6afe
movq %rax, %rbx
leaq 0x18c5a(%rip), %rdi     # 0x1f740
jmp 0x6afe
movq %rax, %rbx
leaq 0x18c26(%rip), %rdi     # 0x1f718
jmp 0x6afe
movq %rax, %rbx
leaq 0x18bf2(%rip), %rdi     # 0x1f6f0
callq 0x41f0
jmp 0x6b88
movq %rax, %rbx
movq %r14, %rdi
callq 0x4270
jmp 0x6b3e
jmp 0x6b3b
jmp 0x6b3b
movq %rax, %rbx
leaq -0x28(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x6b3e
movq -0x28(%rbp), %rsi
incq %rsi
callq 0x42f0
jmp 0x6b3e
jmp 0x6b3b
jmp 0x6b6a
movq %rax, %rbx
movq -0x80(%rbp), %rdi
testq %rdi, %rdi
je 0x6b53
movq -0x70(%rbp), %rsi
subq %rdi, %rsi
callq 0x42f0
movq -0x58(%rbp), %rdi
cmpq %r15, %rdi
je 0x6b6d
movq -0x48(%rbp), %rsi
incq %rsi
callq 0x42f0
jmp 0x6b6d
movq %rax, %rbx
movq -0xa0(%rbp), %rdi
testq %rdi, %rdi
je 0x6b88
movq -0x90(%rbp), %rsi
subq %rdi, %rsi
callq 0x42f0
movq %rbx, %rdi
callq 0x44a0