// File: Joke-Shi[P]astrunc/sample/sample_all.cc
// Function: main
int main( int argc, const char **argv)
{
    std::string s_en = "The National People's Congress Standing Committee convened Monday to discuss amending "
                       "the Constitution.\n\n"
                       "Zhang Dejiang, chairman of the 12th NPC Standing Committee, presided over the meeting.\n\n"
                       "Li Zhanshu, member of the Standing Committee of the Political Bureau of the Communist "
                       "Party of China Central Committee, briefed lawmakers about a proposal by the Central "
                       "Committee on the revision to the Constitution.\n"
                       "The 19th CPC Central Committee adopted the proposal at its second plenary session this month.\n"
                       "\"Major theoretical achievements, principles and policies adopted at the 19th CPC National "
                       "Congress, particularly Xi Jinping Thought on Socialism with Chinese Characteristics for a New Era, "
                       "should be incorporated into the upcoming revision to the Constitution,\" said Li, also deputy head "
                       "of a group working on the revision.\n"
                       "\"We should keep pace with the times and improve the Constitution while maintaining its consistency, "
                       "stability and authority,\" Li said.\n"
                       "Amending of the Constitution should be done by adhering to the Party's leadership and socialist rule "
                       "of law, heading toward the correct political direction, following due process, being based on broad "
                       "consensus, embodying the will of the people and only amending part of it instead of revising it on a "
                       "large scale, Li said.\n"
                       "In 1982, the fifth NPC adopted the present Constitution, which underwent four amendments－in 1988, "
                       "1993, 1999 and 2004.\n"
                       "\"The Constitution has proved to be good legislation that fits in with China's reality and meets the "
                       "demands of the times,\" Li said, adding that because the Party and nation have undergone profound "
                       "changes since 2004, the Constitution should be adjusted accordingly.\n"
                       "Xinhua\n"
                       "He said: Chang suggested organizing a canine patrol squad at the museum and, in 1987, dogs came back. "
                       "At 1 year old, each dog is given a tailored training course. Most start their career as guard dogs "
                       "after three months of intense training.\n\n"
                       "Уорд Каннингем және оның соавторы Бо Леуф өздерінің « The Wiki Way: Quick Collaboration on the Web» "
                       "кітабында уики концепциясының мәнін былайша түсіндірген:\n"
                       "Уики әртүрлі беттер арасындағы байланысты оңай сітемелер жасау мүмкіндігі арқылы және сілтеме жасалған "
                       "беттердің бар-жоқтығын білдіру арқылы қамтамасыз етеді.";

    std::string s_zh = "Prometheus，它的价值在于可靠性，甚至在很恶劣的环境下，你都可以随时访问它和查看系统服务各种指标的统计信息。"
                       "如果你对统计数据需要100%的精确，它并不适用，例如：它不适用于实时计费系统。";

    std::string s_hy = "Chang- ը սկսեց աշխատել, երբ օգնում էր վերահսկել թանգարանը, երբ նա 20 տարեկան էր (abc): "
                       "1980-ական թվականներին մարդկային պահակները ցուցահանդեսային սրահներում միայն ձայնային "
                       "դետեկտորների օգնությամբ էին: Երբ ինչ-որ բան աննորմալ էր լսվում. նրանք գողություն կատարեցին դեպքի վայրում:";


    /** Begin split */
    { 
        std::vector< std::string > vs;
        int rc = astrunc::access::split( vs, s_en, astrunc::access::EN, -1);
        if ( 0 == rc) {
            for ( auto const &__s : vs ) {
                std::cout << ": -------------------------------------------------------------------------------[OK-EN]\n";
                std::cout << __s << std::endl;
            }
        } else { std::cerr << "[Error]: Split EN error\n"; }

        vs.clear();
        rc = astrunc::access::split( vs, s_zh, astrunc::access::ZH, 32);
        if ( 0 == rc) {
            for ( auto const &__s : vs ) {
                std::cout << ": -------------------------------------------------------------------------------[OK-ZH]\n";
                std::cout << __s << std::endl;
            }
        } else { std::cerr << "[Error]: Split ZH error\n"; }

        vs.clear();
        rc = astrunc::access::split( vs, s_hy, astrunc::access::HY, 32);
        if ( 0 == rc) {
            for ( auto const &__s : vs ) {
                std::cout << ": -------------------------------------------------------------------------------[OK-HY]\n";
                std::cout << __s << std::endl;
            }
        } else { std::cerr << "[Error]: Split HY error\n"; }

    }


    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x180, %rsp            # imm = 0x180
movl $0x0, -0x4(%rbp)
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
leaq -0x31(%rbp), %rdi
movq %rdi, -0x120(%rbp)
callq 0x22b0
movq -0x120(%rbp), %rdx
leaq 0x2281(%rip), %rsi      # 0xb208
leaq -0x30(%rbp), %rdi
callq 0x94c0
jmp 0x8f92
leaq -0x31(%rbp), %rdi
callq 0x21c0
leaq -0x69(%rbp), %rdi
movq %rdi, -0x128(%rbp)
callq 0x22b0
movq -0x128(%rbp), %rdx
leaq 0x2bf7(%rip), %rsi      # 0xbbb0
leaq -0x68(%rbp), %rdi
callq 0x94c0
jmp 0x8fc4
leaq -0x69(%rbp), %rdi
callq 0x21c0
leaq -0x91(%rbp), %rdi
movq %rdi, -0x130(%rbp)
callq 0x22b0
movq -0x130(%rbp), %rdx
leaq 0x2cca(%rip), %rsi      # 0xbcb8
leaq -0x90(%rbp), %rdi
callq 0x94c0
jmp 0x8ffc
leaq -0x91(%rbp), %rdi
callq 0x21c0
leaq -0xb0(%rbp), %rdi
movq %rdi, -0x140(%rbp)
callq 0x9660
movq -0x140(%rbp), %rdi
leaq -0x30(%rbp), %rsi
movl $0xe, %edx
movq $-0x1, %rcx
callq 0x49d0
movl %eax, -0x134(%rbp)
jmp 0x903f
movl -0x134(%rbp), %eax
movl %eax, -0xb4(%rbp)
xorl %eax, %eax
cmpl -0xb4(%rbp), %eax
jne 0x9191
leaq -0xb0(%rbp), %rax
movq %rax, -0xc0(%rbp)
movq -0xc0(%rbp), %rdi
callq 0x9680
movq %rax, -0xc8(%rbp)
movq -0xc0(%rbp), %rdi
callq 0x96b0
movq %rax, -0xd0(%rbp)
leaq -0xc8(%rbp), %rdi
leaq -0xd0(%rbp), %rsi
callq 0x96e0
testb $0x1, %al
jne 0x90a9
jmp 0x918f
leaq -0xc8(%rbp), %rdi
callq 0x9720
movq %rax, -0xd8(%rbp)
movq 0x6f0d(%rip), %rdi      # 0xffd0
leaq 0x2dda(%rip), %rsi      # 0xbea4
callq 0x2170
jmp 0x90d1
movq -0xd8(%rbp), %rsi
movq 0x6ef1(%rip), %rdi      # 0xffd0
callq 0x2160
movq %rax, -0x148(%rbp)
jmp 0x90ed
movq -0x148(%rbp), %rdi
movq 0x6ebd(%rip), %rsi      # 0xffb8
callq 0x21a0
jmp 0x9102
jmp 0x9104
leaq -0xc8(%rbp), %rdi
callq 0x9740
jmp 0x908d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x31(%rbp), %rdi
callq 0x21c0
jmp 0x943c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x69(%rbp), %rdi
callq 0x21c0
jmp 0x9433
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x91(%rbp), %rdi
callq 0x21c0
jmp 0x942a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0xb0(%rbp), %rdi
callq 0x9780
leaq -0x90(%rbp), %rdi
callq 0x22f8
jmp 0x942a
jmp 0x91a8
movq 0x6e58(%rip), %rdi      # 0xfff0
leaq 0x2d5f(%rip), %rsi      # 0xbefe
callq 0x2170
jmp 0x91a6
jmp 0x91a8
leaq -0xb0(%rbp), %rdi
movq %rdi, -0x158(%rbp)
callq 0x9760
movq -0x158(%rbp), %rdi
leaq -0x68(%rbp), %rsi
movl $0x46, %edx
movl $0x20, %ecx
callq 0x49d0
movl %eax, -0x14c(%rbp)
jmp 0x91dd
movl -0x14c(%rbp), %eax
movl %eax, -0xb4(%rbp)
xorl %eax, %eax
cmpl -0xb4(%rbp), %eax
jne 0x92b2
leaq -0xb0(%rbp), %rax
movq %rax, -0xe0(%rbp)
movq -0xe0(%rbp), %rdi
callq 0x9680
movq %rax, -0xe8(%rbp)
movq -0xe0(%rbp), %rdi
callq 0x96b0
movq %rax, -0xf0(%rbp)
leaq -0xe8(%rbp), %rdi
leaq -0xf0(%rbp), %rsi
callq 0x96e0
testb $0x1, %al
jne 0x9244
jmp 0x92b0
leaq -0xe8(%rbp), %rdi
callq 0x9720
movq %rax, -0xf8(%rbp)
movq 0x6d72(%rip), %rdi      # 0xffd0
leaq 0x2cb2(%rip), %rsi      # 0xbf17
callq 0x2170
jmp 0x926c
movq -0xf8(%rbp), %rsi
movq 0x6d56(%rip), %rdi      # 0xffd0
callq 0x2160
movq %rax, -0x160(%rbp)
jmp 0x9288
movq -0x160(%rbp), %rdi
movq 0x6d22(%rip), %rsi      # 0xffb8
callq 0x21a0
jmp 0x929d
jmp 0x929f
leaq -0xe8(%rbp), %rdi
callq 0x9740
jmp 0x922b
jmp 0x92c9
movq 0x6d37(%rip), %rdi      # 0xfff0
leaq 0x2cb1(%rip), %rsi      # 0xbf71
callq 0x2170
jmp 0x92c7
jmp 0x92c9
leaq -0xb0(%rbp), %rdi
movq %rdi, -0x170(%rbp)
callq 0x9760
movq -0x170(%rbp), %rdi
leaq -0x90(%rbp), %rsi
movl $0x1a, %edx
movl $0x20, %ecx
callq 0x49d0
movl %eax, -0x164(%rbp)
jmp 0x9301
movl -0x164(%rbp), %eax
movl %eax, -0xb4(%rbp)
xorl %eax, %eax
cmpl -0xb4(%rbp), %eax
jne 0x93d6
leaq -0xb0(%rbp), %rax
movq %rax, -0x100(%rbp)
movq -0x100(%rbp), %rdi
callq 0x9680
movq %rax, -0x108(%rbp)
movq -0x100(%rbp), %rdi
callq 0x96b0
movq %rax, -0x110(%rbp)
leaq -0x108(%rbp), %rdi
leaq -0x110(%rbp), %rsi
callq 0x96e0
testb $0x1, %al
jne 0x9368
jmp 0x93d4
leaq -0x108(%rbp), %rdi
callq 0x9720
movq %rax, -0x118(%rbp)
movq 0x6c4e(%rip), %rdi      # 0xffd0
leaq 0x2c01(%rip), %rsi      # 0xbf8a
callq 0x2170
jmp 0x9390
movq -0x118(%rbp), %rsi
movq 0x6c32(%rip), %rdi      # 0xffd0
callq 0x2160
movq %rax, -0x178(%rbp)
jmp 0x93ac
movq -0x178(%rbp), %rdi
movq 0x6bfe(%rip), %rsi      # 0xffb8
callq 0x21a0
jmp 0x93c1
jmp 0x93c3
leaq -0x108(%rbp), %rdi
callq 0x9740
jmp 0x934f
jmp 0x93ed
movq 0x6c13(%rip), %rdi      # 0xfff0
leaq 0x2c00(%rip), %rsi      # 0xbfe4
callq 0x2170
jmp 0x93eb
jmp 0x93ed
leaq -0xb0(%rbp), %rdi
callq 0x9780
movl $0x0, -0x4(%rbp)
leaq -0x90(%rbp), %rdi
callq 0x22f8
leaq -0x68(%rbp), %rdi
callq 0x22f8
leaq -0x30(%rbp), %rdi
callq 0x22f8
movl -0x4(%rbp), %eax
addq $0x180, %rsp            # imm = 0x180
popq %rbp
retq
leaq -0x68(%rbp), %rdi
callq 0x22f8
leaq -0x30(%rbp), %rdi
callq 0x22f8
movq -0x40(%rbp), %rdi
callq 0x22a0
nopw %cs:(%rax,%rax)
nop