// File: /workspace/github_cpp_makefile_star2_O3/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
vmovdqu (%rdx), %xmm0
movq %rcx, %r14
movq %rdi, %rbx
vmovdqu %xmm0, (%rdi)
vpxor %xmm0, %xmm0, %xmm0
movq 0x10(%rdx), %rax
movq %rax, 0x10(%rdi)
xorl %eax, %eax
movq %rax, 0x10(%rdx)
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 0x491a
vpmovsxbq 0x192c(%rip), %zmm1 # 0x618c
vpmovsxbd 0x192b(%rip), %ymm3 # 0x6194
movq %r12, %rax
subq %r15, %rax
vpxor %xmm4, %xmm4, %xmm4
xorl %ecx, %ecx
movq %r15, %rdx
addq $-0x10, %rax
vpbroadcastq %rax, %zmm0
shrq $0x4, %rax
addq $0x8, %rax
vpsrlq $0x4, %zmm0, %zmm0
andq $-0x8, %rax
vpbroadcastq %rcx, %zmm6
vmovdqa64 %zmm4, %zmm2
vpxor %xmm5, %xmm5, %xmm5
addq $0x8, %rcx
vporq %zmm1, %zmm6, %zmm4
vpcmpleuq %zmm0, %zmm4, %k1
vpxor %xmm4, %xmm4, %xmm4
kmovq %k1, %k2
vpgatherdq (%rdx,%ymm3), %zmm4 {%k2}
kmovq %k1, %k2
vpgatherdq 0x8(%rdx,%ymm3), %zmm5 {%k2}
subq $-0x80, %rdx
vpsubq %zmm4, %zmm5, %zmm4
vpsraq $0x1, %zmm4, %zmm4
vpaddq %zmm2, %zmm4, %zmm4
cmpq %rcx, %rax
jne 0x4895
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
vcvtusi2ss %rax, %xmm7, %xmm1
movq %rax, 0x30(%rbx)
sarq $0x4, %rcx
vcvtusi2ss %rcx, %xmm7, %xmm0
vdivss %xmm0, %xmm1, %xmm1
vmovss %xmm1, 0x38(%rbx)
cmpq %r15, %r12
je 0x49c7
vpxor %xmm2, %xmm2, %xmm2
movq %r15, %rax
movq 0x8(%rax), %rcx
vroundss $0xb, %xmm2, %xmm2, %xmm3
subq (%rax), %rcx
addq $0x10, %rax
sarq %rcx
vcvtusi2ss %rcx, %xmm7, %xmm2
vsubss %xmm1, %xmm2, %xmm2
vfmadd213ss %xmm3, %xmm2, %xmm2 # xmm2 = (xmm2 * xmm2) + xmm3
cmpq %r12, %rax
jne 0x494d
vxorps 0x1809(%rip){1to4}, %xmm2, %xmm1 # 0x6188
vdivss %xmm0, %xmm1, %xmm0
vmovss %xmm0, 0x3c(%rbx)
cmpq %r12, %r15
je 0x49ce
movq (%r15), %rsi
movq 0x8(%r15), %rax
subq %rsi, %rax
cmpq $0x2, %rax
jne 0x49c1
movq %r14, %rdi
vzeroupper
callq 0x4a04
testq %rax, %rax
je 0x49c1
vcvtsi2ssl 0xc(%rax), %xmm7, %xmm0
callq 0x23e0
vaddss 0x40(%rbx), %xmm0, %xmm0
vmovss %xmm0, 0x40(%rbx)
addq $0x10, %r15
jmp 0x4988
movl $0x0, 0x3c(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
vzeroupper
retq
movq 0x18(%rbx), %rdi
movq %rax, %r14
testq %rdi, %rdi
je 0x49ee
callq 0x2240
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x49fb
callq 0x2240
movq %r14, %rdi
callq 0x2390
nop