// File: /workspace/github_cpp_makefile_star2_O3/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 0x1944f(%rip), %al      # 0x1f6f0
testb %al, %al
je 0x67b5
movb 0x19469(%rip), %al      # 0x1f718
testb %al, %al
je 0x680c
movb 0x19483(%rip), %al      # 0x1f740
testb %al, %al
je 0x6863
movb 0x1949d(%rip), %al      # 0x1f768
testb %al, %al
je 0x68ba
movb 0x194b7(%rip), %al      # 0x1f790
testb %al, %al
je 0x6911
movb 0x194d1(%rip), %al      # 0x1f7b8
testb %al, %al
je 0x6978
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 0x193bf(%rip), %rcx     # 0x1f6d0
xorl %r8d, %r8d
callq 0x1228c
testb %al, %al
je 0x6357
movq -0xa0(%rbp), %rax
movq -0x98(%rbp), %rcx
subq %rax, %rcx
je 0x6363
movq %rcx, %rdx
sarq $0x3, %rdx
movabsq $-0x5555555555555555, %rsi # imm = 0xAAAAAAAAAAAAAAAB
imulq %rdx, %rsi
addq $-0xb, %rsi
cmpq $-0x9, %rsi
ja 0x6363
addq $0xa8, %rax
jmp 0x636a
movl $0x3, 0x20(%rbx)
jmp 0x6733
addq %rcx, %rax
addq $-0x48, %rax
cmpb $0x1, 0x10(%rax)
jne 0x6392
movq (%rax), %rsi
movq 0x8(%rax), %rdx
leaq -0x70(%rbp), %rax
movq %rax, -0x10(%rax)
leaq -0x80(%rbp), %rdi
callq 0x143da
movq -0x80(%rbp), %rdi
movq -0x78(%rbp), %rsi
jmp 0x63a7
leaq -0x70(%rbp), %rdi
movq %rdi, -0x10(%rdi)
movq $0x0, -0x8(%rdi)
movb $0x0, (%rdi)
xorl %esi, %esi
xorps %xmm0, %xmm0
leaq -0x60(%rbp), %rdx
movaps %xmm0, 0x10(%rdx)
movaps %xmm0, (%rdx)
addq %rdi, %rsi
leaq 0x19389(%rip), %rcx     # 0x1f748
xorl %r8d, %r8d
callq 0x1228c
testb %al, %al
je 0x6408
movl $0x2, 0x20(%rbx)
movq -0x60(%rbp), %rax
movq -0x58(%rbp), %rcx
subq %rax, %rcx
je 0x6472
movq %rcx, %rdx
sarq $0x3, %rdx
movabsq $-0x5555555555555555, %rsi # imm = 0xAAAAAAAAAAAAAAAB
imulq %rdx, %rsi
addq $-0x5, %rsi
cmpq $-0x3, %rsi
ja 0x6472
addq $0x18, %rax
jmp 0x6479
movq -0x80(%rbp), %rdi
movq -0x78(%rbp), %rsi
addq %rdi, %rsi
leaq 0x192de(%rip), %rcx     # 0x1f6f8
leaq -0x60(%rbp), %rdx
xorl %r8d, %r8d
callq 0x1228c
testb %al, %al
je 0x6584
movl $0x0, 0x20(%rbx)
movq -0x60(%rbp), %rax
movq -0x58(%rbp), %rcx
subq %rax, %rcx
je 0x65ee
movq %rcx, %rdx
sarq $0x3, %rdx
movabsq $-0x5555555555555555, %rsi # imm = 0xAAAAAAAAAAAAAAAB
imulq %rdx, %rsi
addq $-0x5, %rsi
cmpq $-0x3, %rsi
ja 0x65ee
addq $0x18, %rax
jmp 0x65f5
addq %rcx, %rax
addq $-0x48, %rax
cmpb $0x1, 0x10(%rax)
jne 0x6499
movq (%rax), %rsi
movq 0x8(%rax), %rdx
leaq -0x28(%rbp), %rax
movq %rax, -0x10(%rax)
leaq -0x38(%rbp), %rdi
callq 0x143da
jmp 0x64ac
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 -0x60(%rbp), %rax
movq -0x58(%rbp), %rcx
subq %rax, %rcx
je 0x64eb
movq %rcx, %rdx
sarq $0x3, %rdx
movabsq $-0x5555555555555555, %rsi # imm = 0xAAAAAAAAAAAAAAAB
imulq %rdx, %rsi
addq $-0x6, %rsi
cmpq $-0x4, %rsi
ja 0x64eb
addq $0x30, %rax
jmp 0x64f2
addq %rcx, %rax
addq $-0x48, %rax
cmpb $0x1, 0x10(%rax)
jne 0x6518
movq (%rax), %rsi
movq 0x8(%rax), %rdx
leaq -0xb0(%rbp), %rax
movq %rax, -0x10(%rax)
leaq -0xc0(%rbp), %rdi
callq 0x143da
jmp 0x652e
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 0x6562
movq -0xb0(%rbp), %rsi
incq %rsi
callq 0x42f0
leaq -0x28(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x6705
movq -0x28(%rbp), %rsi
incq %rsi
callq 0x42f0
jmp 0x6705
movq -0x80(%rbp), %rdi
movq -0x78(%rbp), %rsi
addq %rdi, %rsi
leaq 0x1918a(%rip), %rcx     # 0x1f720
leaq -0x60(%rbp), %rdx
xorl %r8d, %r8d
callq 0x1228c
testb %al, %al
je 0x669f
movl $0x1, 0x20(%rbx)
movq -0x60(%rbp), %rax
movq -0x58(%rbp), %rcx
subq %rax, %rcx
je 0x675c
movq %rcx, %rdx
sarq $0x3, %rdx
movabsq $-0x5555555555555555, %rsi # imm = 0xAAAAAAAAAAAAAAAB
imulq %rdx, %rsi
addq $-0x5, %rsi
cmpq $-0x3, %rsi
ja 0x675c
addq $0x18, %rax
jmp 0x6763
addq %rcx, %rax
addq $-0x48, %rax
cmpb $0x1, 0x10(%rax)
jne 0x6615
movq (%rax), %rsi
movq 0x8(%rax), %rdx
leaq -0x28(%rbp), %rax
movq %rax, -0x10(%rax)
leaq -0x38(%rbp), %rdi
callq 0x143da
jmp 0x6628
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 0x6650
movq -0x28(%rbp), %rsi
incq %rsi
callq 0x42f0
movq -0x60(%rbp), %rdi
movq -0x58(%rbp), %rax
subq %rdi, %rax
je 0x6682
movq %rax, %rcx
sarq $0x3, %rcx
movabsq $-0x5555555555555555, %rdx # imm = 0xAAAAAAAAAAAAAAAB
imulq %rcx, %rdx
addq $-0x6, %rdx
cmpq $-0x4, %rdx
ja 0x6682
addq $0x30, %rdi
jmp 0x6689
addq %rax, %rdi
addq $-0x48, %rdi
leaq 0xfd51(%rip), %rsi      # 0x163e1
callq 0x1445c
testl %eax, %eax
je 0x6701
movb $0x1, 0x68(%rbx)
jmp 0x6705
movq -0x78(%rbp), %r14
cmpq 0x190ce(%rip), %r14     # 0x1f778
jne 0x66c8
testq %r14, %r14
je 0x66f8
movq 0x190b8(%rip), %rsi     # 0x1f770
movq -0x80(%rbp), %rdi
movq %r14, %rdx
callq 0x4310
testl %eax, %eax
je 0x66f8
cmpq 0x190d1(%rip), %r14     # 0x1f7a0
jne 0x69df
testq %r14, %r14
je 0x66f8
movq 0x190b7(%rip), %rsi     # 0x1f798
movq -0x80(%rbp), %r15
movq %r15, %rdi
movq %r14, %rdx
callq 0x4310
testl %eax, %eax
jne 0x69e3
movl $0x3, 0x20(%rbx)
jmp 0x6705
movb $0x0, 0x68(%rbx)
movq -0x60(%rbp), %rdi
testq %rdi, %rdi
je 0x671a
movq -0x50(%rbp), %rsi
subq %rdi, %rsi
callq 0x42f0
leaq -0x70(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x6733
movq -0x70(%rbp), %rsi
incq %rsi
callq 0x42f0
movq -0xa0(%rbp), %rdi
testq %rdi, %rdi
je 0x674e
movq -0x90(%rbp), %rsi
subq %rdi, %rsi
callq 0x42f0
addq $0xa8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
addq %rcx, %rax
addq $-0x48, %rax
cmpb $0x1, 0x10(%rax)
jne 0x6783
movq (%rax), %rsi
movq 0x8(%rax), %rdx
leaq -0x28(%rbp), %rax
movq %rax, -0x10(%rax)
leaq -0x38(%rbp), %rdi
callq 0x143da
jmp 0x6796
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 0x656a
leaq 0x18f34(%rip), %rdi     # 0x1f6f0
callq 0x44d0
testl %eax, %eax
je 0x62a9
leaq 0x18f00(%rip), %rdi     # 0x1f6d0
leaq 0xfa14(%rip), %rsi      # 0x161eb
movl $0x10, %edx
callq 0x6cda
leaq 0x55e(%rip), %rdi       # 0x6d46
leaq 0x18ee1(%rip), %rsi     # 0x1f6d0
leaq 0x18ab2(%rip), %rdx     # 0x1f2a8
callq 0x42b0
leaq 0x18eee(%rip), %rdi     # 0x1f6f0
callq 0x4210
jmp 0x62a9
leaq 0x18f05(%rip), %rdi     # 0x1f718
callq 0x44d0
testl %eax, %eax
je 0x62b7
leaq 0x18ed1(%rip), %rdi     # 0x1f6f8
leaq 0xfa02(%rip), %rsi      # 0x16230
movl $0x10, %edx
callq 0x6cda
leaq 0x507(%rip), %rdi       # 0x6d46
leaq 0x18eb2(%rip), %rsi     # 0x1f6f8
leaq 0x18a5b(%rip), %rdx     # 0x1f2a8
callq 0x42b0
leaq 0x18ebf(%rip), %rdi     # 0x1f718
callq 0x4210
jmp 0x62b7
leaq 0x18ed6(%rip), %rdi     # 0x1f740
callq 0x44d0
testl %eax, %eax
je 0x62c5
leaq 0x18ea2(%rip), %rdi     # 0x1f720
leaq 0xfa10(%rip), %rsi      # 0x16295
movl $0x10, %edx
callq 0x6cda
leaq 0x4b0(%rip), %rdi       # 0x6d46
leaq 0x18e83(%rip), %rsi     # 0x1f720
leaq 0x18a04(%rip), %rdx     # 0x1f2a8
callq 0x42b0
leaq 0x18e90(%rip), %rdi     # 0x1f740
callq 0x4210
jmp 0x62c5
leaq 0x18ea7(%rip), %rdi     # 0x1f768
callq 0x44d0
testl %eax, %eax
je 0x62d3
leaq 0x18e73(%rip), %rdi     # 0x1f748
leaq 0xf9f2(%rip), %rsi      # 0x162ce
movl $0x10, %edx
callq 0x6cda
leaq 0x459(%rip), %rdi       # 0x6d46
leaq 0x18e54(%rip), %rsi     # 0x1f748
leaq 0x189ad(%rip), %rdx     # 0x1f2a8
callq 0x42b0
leaq 0x18e61(%rip), %rdi     # 0x1f768
callq 0x4210
jmp 0x62d3
leaq 0x18e78(%rip), %rdi     # 0x1f790
callq 0x44d0
testl %eax, %eax
je 0x62e1
leaq 0x18e54(%rip), %rax     # 0x1f780
movq %rax, 0x18e3d(%rip)     # 0x1f770
leaq 0x18e36(%rip), %rdi     # 0x1f770
leaq 0xf9a8(%rip), %rsi      # 0x162e9
leaq 0xf9be(%rip), %rdx      # 0x16306
callq 0x53f0
movq 0x1861c(%rip), %rdi     # 0x1ef70
leaq 0x18e15(%rip), %rsi     # 0x1f770
leaq 0x18946(%rip), %rdx     # 0x1f2a8
callq 0x42b0
leaq 0x18e22(%rip), %rdi     # 0x1f790
callq 0x4210
jmp 0x62e1
leaq 0x18e39(%rip), %rdi     # 0x1f7b8
callq 0x44d0
testl %eax, %eax
je 0x62ef
leaq 0x18e15(%rip), %rax     # 0x1f7a8
movq %rax, 0x18dfe(%rip)     # 0x1f798
leaq 0x18df7(%rip), %rdi     # 0x1f798
leaq 0xf95f(%rip), %rsi      # 0x16307
leaq 0xf98c(%rip), %rdx      # 0x1633b
callq 0x53f0
movq 0x185b5(%rip), %rdi     # 0x1ef70
leaq 0x18dd6(%rip), %rsi     # 0x1f798
leaq 0x188df(%rip), %rdx     # 0x1f2a8
callq 0x42b0
leaq 0x18de3(%rip), %rdi     # 0x1f7b8
callq 0x4210
jmp 0x62ef
movq -0x80(%rbp), %r15
movq 0x185ce(%rip), %rdi     # 0x1efb8
movq %r15, %rsi
movq %r14, %rdx
callq 0x4360
movq %rax, %rdi
callq 0x4160
movl $0x10, %edi
callq 0x4170
movq %rax, %r14
leaq 0xf92b(%rip), %rsi      # 0x1633c
movq %rax, %rdi
callq 0x4110
movq 0x185d0(%rip), %rsi     # 0x1eff0
movq 0x18579(%rip), %rdx     # 0x1efa0
movq %r14, %rdi
callq 0x4480
movq %rax, %rbx
leaq 0x18d7f(%rip), %rdi     # 0x1f7b8
jmp 0x6a75
movq %rax, %rbx
leaq 0x18d4b(%rip), %rdi     # 0x1f790
jmp 0x6a75
movq %rax, %rbx
leaq 0x18d17(%rip), %rdi     # 0x1f768
jmp 0x6a75
movq %rax, %rbx
leaq 0x18ce3(%rip), %rdi     # 0x1f740
jmp 0x6a75
movq %rax, %rbx
leaq 0x18caf(%rip), %rdi     # 0x1f718
jmp 0x6a75
movq %rax, %rbx
leaq 0x18c7b(%rip), %rdi     # 0x1f6f0
callq 0x41f0
jmp 0x6b03
movq %rax, %rbx
movq %r14, %rdi
callq 0x4270
jmp 0x6ab5
jmp 0x6ab2
jmp 0x6ab2
movq %rax, %rbx
leaq -0x28(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x6ab5
movq -0x28(%rbp), %rsi
incq %rsi
callq 0x42f0
jmp 0x6ab5
jmp 0x6ab2
jmp 0x6ae5
movq %rax, %rbx
movq -0x60(%rbp), %rdi
testq %rdi, %rdi
je 0x6aca
movq -0x50(%rbp), %rsi
subq %rdi, %rsi
callq 0x42f0
leaq -0x70(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x6ae8
movq -0x70(%rbp), %rsi
incq %rsi
callq 0x42f0
jmp 0x6ae8
movq %rax, %rbx
movq -0xa0(%rbp), %rdi
testq %rdi, %rdi
je 0x6b03
movq -0x90(%rbp), %rsi
subq %rdi, %rsi
callq 0x42f0
movq %rbx, %rdi
callq 0x44a0