// File: /workspace/github_cpp_makefile_star2_O1/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 0x4f0e
movq %r14, 0x20(%rsp)
movl 0x8(%r14), %eax
decl %eax
movswl %ax, %r14d
testl %r14d, %r14d
js 0x4318
movw $0xc, %r15w
leaq 0x28(%rsp), %r12
movq %rsp, %r13
leaq 0x38(%rsp), %rax
movq %rax, 0x28(%rsp)
movq %r12, %rdi
leaq 0x1e63(%rip), %rdx      # 0x601d
movq %rdx, %rsi
callq 0x37b2
movzwl %r15w, %ebp
leal -0x1(%rbp), %ecx
movl %r14d, %eax
subl %ecx, %eax
jge 0x420b
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 0x4249
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x2130
jmp 0x4249
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 0x4244
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x2130
movw $0x9, %r15w
movq 0x30(%rsp), %rdx
cmpq $0xb, %rdx
ja 0x42e1
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 0x42e1
leaq 0x10(%rsp), %rax
movq %rax, (%rsp)
movq 0x28(%rsp), %rsi
addq %rsi, %rdx
movq %r13, %rdi
callq 0x3722
movq %r13, %rdi
leaq 0x1da7(%rip), %rsi      # 0x605d
callq 0x2200
movq %r12, %rdi
movq %r13, %rsi
callq 0x2160
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x42e1
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x2130
movq %rbx, %rdi
movq %r12, %rsi
callq 0x5086
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0x4308
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x2130
subl %ebp, %r14d
movswl %r14w, %r14d
testl %r14d, %r14d
jns 0x41a6
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 0x4358
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x2130
jmp 0x4358
jmp 0x4355
jmp 0x4355
jmp 0x4355
movq %rax, %r14
jmp 0x4374
movq %rax, %r14
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0x4374
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x2130
movq %rbx, %rdi
callq 0x4724
movq %r14, %rdi
callq 0x21d0