// File: /workspace/github_cpp_makefile_star2_O3/thuydx55[P]C-Number-to-Word/NumberRepresentation/Number.cpp
// Function: Number::divideStringToBigGroup(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
stack<string> Number::divideStringToBigGroup(const string &numStr) {
    stack<string> groups;

    short length = 12;
    for (short i = numStr.length()-1; i >= 0;) {
        string str = "";
        if (i >= length-1) {
            str = numStr.substr(i-(length-1), length);
            i -= length;
            length = 9;
        }
        else {
            str = numStr.substr(0, i+1);
            i -= length;
        }

        if (str.length() < 12 && groups.size() > 0)
            str = str + "000";
        groups.push(str);
    }

    return groups;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rdx, %r14
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, 0x40(%rdi)
movups %xmm0, 0x30(%rdi)
movups %xmm0, 0x20(%rdi)
movups %xmm0, 0x10(%rdi)
movups %xmm0, (%rdi)
xorl %esi, %esi
callq 0x4ef4
movq %r14, 0x20(%rsp)
movl 0x8(%r14), %eax
decl %eax
movswl %ax, %r14d
testl %r14d, %r14d
js 0x431e
movw $0xc, %r15w
leaq 0x28(%rsp), %r12
movq %rsp, %r13
leaq 0x38(%rsp), %rax
movq %rax, 0x28(%rsp)
movq %r12, %rdi
leaq 0x1e5d(%rip), %rdx      # 0x601d
movq %rdx, %rsi
callq 0x37ba
movzwl %r15w, %ebp
leal -0x1(%rbp), %ecx
movl %r14d, %eax
subl %ecx, %eax
jge 0x4211
leal 0x1(%r14), %ecx
movq %r13, %rdi
movq 0x20(%rsp), %rsi
xorl %edx, %edx
callq 0x2140
movq %r12, %rdi
movq %r13, %rsi
callq 0x2160
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x424f
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x2130
jmp 0x424f
movslq %eax, %rdx
movq %r13, %rdi
movq 0x20(%rsp), %rsi
movq %rbp, %rcx
callq 0x2140
movq %r12, %rdi
movq %r13, %rsi
callq 0x2160
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x424a
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x2130
movw $0x9, %r15w
movq 0x30(%rsp), %rdx
cmpq $0xb, %rdx
ja 0x42e7
movq 0x48(%rbx), %rax
movq %rax, %rcx
subq 0x28(%rbx), %rcx
shrq $0x3, %rcx
cmpq $0x1, %rax
adcq $-0x1, %rcx
shlq $0x4, %rcx
movq 0x20(%rbx), %rax
movq 0x30(%rbx), %rsi
subq 0x38(%rbx), %rsi
sarq $0x5, %rsi
addq %rcx, %rsi
subq 0x10(%rbx), %rax
sarq $0x5, %rax
addq %rsi, %rax
je 0x42e7
leaq 0x10(%rsp), %rax
movq %rax, (%rsp)
movq 0x28(%rsp), %rsi
addq %rsi, %rdx
movq %r13, %rdi
callq 0x3724
movq %r13, %rdi
leaq 0x1da1(%rip), %rsi      # 0x605d
callq 0x2200
movq %r12, %rdi
movq %r13, %rsi
callq 0x2160
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x42e7
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x2130
movq %rbx, %rdi
movq %r12, %rsi
callq 0x506c
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0x430e
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x2130
subl %ebp, %r14d
movswl %r14w, %r14d
testl %r14d, %r14d
jns 0x41ac
movq %rbx, %rax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x435e
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x2130
jmp 0x435e
jmp 0x435b
jmp 0x435b
jmp 0x435b
movq %rax, %r14
jmp 0x437a
movq %rax, %r14
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0x437a
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x2130
movq %rbx, %rdi
callq 0x472c
movq %r14, %rdi
callq 0x21d0