// File: /workspace/github_cpp_makefile_star2_O3/dnegovan[P]Intruder-On-Donnar-V/dansLibrary.cpp
// Function: printString(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, double)
void printString(std::string str, std::string color, double seconds)
{
    std::stringstream ss;
    std::string temp;
    int counter = 0;

    ss << str;

    std::cout << color;

    //read full string
    while (!ss.eof())
    {
        //keep a character count, newline if we hit the end
        ss >> temp;  //goes until it hits a space
        counter += temp.size();
        if (counter < LINE_WIDTH)
        {
            //print the word
            std::cout << temp;
        }
        if (counter >= LINE_WIDTH)
        {
            //wait to print next line, for drama purposes
            wait(seconds);
            //newline, then the word
            std::cout << "\n" << temp;
            //reset counter for next line
            counter = 0;
            counter += temp.size();
        }
        //put the space back in
        std::cout << " ";
    }

    ss.clear();
    //newline at end of this function needs to wait, too, for consistency
    wait(seconds);
    std::cout << "\n" << RESET << std::endl;

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1b8, %rsp            # imm = 0x1B8
movsd %xmm0, -0x30(%rbp)
movq %rsi, %rbx
movq %rdi, %r14
leaq -0x1d8(%rbp), %rdi
callq 0x3150
leaq -0x40(%rbp), %rax
movq %rax, -0x10(%rax)
movq $0x0, -0x8(%rax)
movb $0x0, (%rax)
leaq -0x1c8(%rbp), %rdi
movq (%r14), %rsi
movq 0x8(%r14), %rdx
callq 0x3210
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
movq 0xb5bb(%rip), %rdi      # 0x1bfc8
callq 0x3210
xorl %r13d, %r13d
leaq -0x1d8(%rbp), %rbx
leaq -0x50(%rbp), %r14
movq 0xb5a1(%rip), %r15      # 0x1bfc8
leaq 0x6629(%rip), %r12      # 0x17057
movq -0x1d8(%rbp), %rax
movq -0x18(%rax), %rax
testb $0x2, -0x1b8(%rbp,%rax)
jne 0x10ab3
movq %rbx, %rdi
movq %r14, %rsi
callq 0x3240
movq -0x48(%rbp), %rdx
movslq %r13d, %r13
addq %rdx, %r13
cmpl $0x39, %r13d
jg 0x10a6c
movq -0x50(%rbp), %rsi
movq %r15, %rdi
callq 0x3210
jmp 0x10a9e
movsd -0x30(%rbp), %xmm0
callq 0x10960
movl $0x1, %edx
movq %r15, %rdi
leaq 0x5ebf(%rip), %rsi      # 0x16944
callq 0x3210
movq -0x50(%rbp), %rsi
movq -0x48(%rbp), %rdx
movq %r15, %rdi
callq 0x3210
movq -0x48(%rbp), %r13
movl $0x1, %edx
movq %r15, %rdi
movq %r12, %rsi
callq 0x3210
jmp 0x10a2e
leaq (%rax,%rbp), %rdi
addq $-0x1d8, %rdi           # imm = 0xFE28
xorl %esi, %esi
callq 0x3300
movsd -0x30(%rbp), %xmm0
callq 0x10960
movq 0xb4f2(%rip), %rdi      # 0x1bfc8
leaq 0x5e67(%rip), %rsi      # 0x16944
movl $0x1, %edx
callq 0x3210
movq 0xb4da(%rip), %rbx      # 0x1bfc8
leaq 0x55b9(%rip), %rsi      # 0x160ae
movl $0x4, %edx
movq %rbx, %rdi
callq 0x3210
movq (%rbx), %rax
addq -0x18(%rax), %rbx
movq %rbx, %rdi
movl $0xa, %esi
callq 0x31d0
movsbl %al, %esi
movq 0xb4a8(%rip), %rdi      # 0x1bfc8
callq 0x3030
movq %rax, %rdi
callq 0x3140
movq -0x50(%rbp), %rdi
leaq -0x40(%rbp), %rax
cmpq %rax, %rdi
je 0x10b3f
callq 0x31c0
movq 0xb45a(%rip), %rsi      # 0x1bfa0
leaq -0x1d8(%rbp), %rdi
callq 0x3170
leaq -0x158(%rbp), %rdi
callq 0x3090
addq $0x1b8, %rsp            # imm = 0x1B8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x10b72
movq %rax, %rbx
movq -0x50(%rbp), %rdi
leaq -0x40(%rbp), %rax
cmpq %rax, %rdi
je 0x10b87
callq 0x31c0
movq 0xb412(%rip), %rsi      # 0x1bfa0
leaq -0x1d8(%rbp), %rdi
callq 0x3170
leaq -0x158(%rbp), %rdi
callq 0x3090
movq %rbx, %rdi
callq 0x3320
nop