// File: /workspace/github_cpp_makefile_star2_O1/jkom-cloud[P]mmseg/src/Mmseg.h
// Function: mmsegSpace::MMSeg::Chunk::Chunk(std::vector<std::pair<__gnu_cxx::__normal_iterator<char16_t const*, std::__cxx11::basic_string<char16_t, std::char_traits<char16_t>, std::allocator<char16_t>>>, __gnu_cxx::__normal_iterator<char16_t const*, std::__cxx11::basic_string<char16_t, std::char_traits<char16_t>, std::allocator<char16_t>>>>, std::allocator<std::pair<__gnu_cxx::__normal_iterator<char16_t const*, std::__cxx11::basic_string<char16_t, std::char_traits<char16_t>, std::allocator<char16_t>>>, __gnu_cxx::__normal_iterator<char16_t const*, std::__cxx11::basic_string<char16_t, std::char_traits<char16_t>, std::allocator<char16_t>>>>>>, std::vector<int, std::allocator<int>>, std::unordered_map<char16_t, int, std::hash<char16_t>, std::equal_to<char16_t>, std::allocator<std::pair<char16_t const, int>>> const&)
Chunk(std::vector<StringP> words, std::vector<int> inDict, const std::unordered_map<Char, int>& chars) : inDict_(std::move(inDict)),words_(std::move(words)) {
          length_ = std::accumulate(words_.begin(), words_.end(), size_t(0), [&](size_t n, const StringP& w) { return n + length(w); });
          mean_ = float(length_) / words_.size();
          var_ = - std::accumulate(words_.begin(), words_.end(), float(0), [&](size_t n, const StringP& w) { return  n + (length(w) - mean_) * (length(w) - mean_); }) / words_.size();

          // sum of degree of morphemic freedom of one-character words
          for (auto& w: words_) {
            if (length(w) != 1) continue;
            auto it = chars.find(*w.first);
            if (it != chars.end())
              degree_ += log(float(it->second));
          }
        }

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %r14
movq %rdi, %rbx
vmovdqu (%rdx), %xmm0
vmovdqu %xmm0, (%rdi)
movq 0x10(%rdx), %rax
movq %rax, 0x10(%rdi)
xorl %eax, %eax
movq %rax, 0x10(%rdx)
vpxor %xmm0, %xmm0, %xmm0
vmovdqu %xmm0, (%rdx)
vmovdqu (%rsi), %xmm1
vmovdqu %xmm1, 0x18(%rdi)
movq 0x10(%rsi), %rcx
movq %rcx, 0x28(%rdi)
movq %rax, 0x10(%rsi)
vmovdqu %xmm0, (%rsi)
vmovdqu %xmm0, 0x30(%rdi)
movl $0x0, 0x40(%rdi)
movq 0x18(%rdi), %r15
movq 0x20(%rdi), %r12
cmpq %r12, %r15
je 0x49a6
movq %r12, %rax
subq %r15, %rax
addq $-0x10, %rax
vpbroadcastq %rax, %zmm0
shrq $0x4, %rax
addq $0x8, %rax
andq $-0x8, %rax
vpsrlq $0x4, %zmm0, %zmm0
vpxor %xmm4, %xmm4, %xmm4
xorl %ecx, %ecx
vpmovsxbq 0x18af(%rip), %zmm1 # 0x61c4
vpmovsxbd 0x18ae(%rip), %ymm3 # 0x61cc
movq %r15, %rdx
vmovdqa64 %zmm4, %zmm2
vpbroadcastq %rcx, %zmm4
vporq %zmm1, %zmm4, %zmm4
vpcmpleuq %zmm0, %zmm4, %k1
kmovq %k1, %k2
vpxor %xmm4, %xmm4, %xmm4
vpgatherdq (%rdx,%ymm3), %zmm4 {%k2}
kmovq %k1, %k2
vpxor %xmm5, %xmm5, %xmm5
vpgatherdq 0x8(%rdx,%ymm3), %zmm5 {%k2}
vpsubq %zmm4, %zmm5, %zmm4
vpsraq $0x1, %zmm4, %zmm4
vpaddq %zmm2, %zmm4, %zmm4
addq $0x8, %rcx
subq $-0x80, %rdx
cmpq %rcx, %rax
jne 0x4921
vmovdqa64 %zmm4, %zmm2 {%k1}
vextracti64x4 $0x1, %zmm2, %ymm0
vpaddq %zmm0, %zmm2, %zmm0
vextracti128 $0x1, %ymm0, %xmm1
vpaddq %xmm1, %xmm0, %xmm0
vpshufd $0xee, %xmm0, %xmm1     # xmm1 = xmm0[2,3,2,3]
vpaddq %xmm1, %xmm0, %xmm0
vmovq %xmm0, %rax
movq %r12, %rcx
subq %r15, %rcx
sarq $0x4, %rcx
vcvtusi2ss %rax, %xmm6, %xmm1
movq %rax, 0x30(%rbx)
vcvtusi2ss %rcx, %xmm6, %xmm0
vdivss %xmm0, %xmm1, %xmm1
vmovss %xmm1, 0x38(%rbx)
vpxor %xmm2, %xmm2, %xmm2
cmpq %r15, %r12
je 0x49fd
movq %r15, %rax
vroundss $0xb, %xmm2, %xmm2, %xmm3
movq 0x8(%rax), %rcx
subq (%rax), %rcx
sarq %rcx
vcvtusi2ss %rcx, %xmm6, %xmm2
vsubss %xmm1, %xmm2, %xmm2
vfmadd213ss %xmm3, %xmm2, %xmm2 # xmm2 = (xmm2 * xmm2) + xmm3
addq $0x10, %rax
cmpq %r12, %rax
jne 0x49d5
vxorps 0x17b9(%rip){1to4}, %xmm2, %xmm1 # 0x61c0
vdivss %xmm0, %xmm1, %xmm0
vmovss %xmm0, 0x3c(%rbx)
cmpq %r12, %r15
je 0x4a71
movq (%r15), %rcx
movq 0x8(%r15), %rax
subq %rcx, %rax
cmpq $0x2, %rax
jne 0x4a6b
movzwl (%rcx), %r8d
movq %r8, %rax
xorl %edx, %edx
divq 0x8(%r14)
movq %r14, %rdi
movq %rdx, %rsi
movq %rcx, %rdx
movq %r8, %rcx
vzeroupper
callq 0x4aa6
testq %rax, %rax
je 0x4a50
movq (%rax), %rax
jmp 0x4a52
xorl %eax, %eax
testq %rax, %rax
je 0x4a6b
vcvtsi2ssl 0xc(%rax), %xmm6, %xmm0
callq 0x23e0
vaddss 0x40(%rbx), %xmm0, %xmm0
vmovss %xmm0, 0x40(%rbx)
addq $0x10, %r15
jmp 0x4a10
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
vzeroupper
retq
movq %rax, %r14
movq 0x18(%rbx), %rdi
testq %rdi, %rdi
je 0x4a91
callq 0x2240
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x4a9e
callq 0x2240
movq %r14, %rdi
callq 0x2390