// File: /workspace/github_cpp_makefile_star2_O1/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 0xb386(%rip), %rdi      # 0x1bfc8
callq 0x3210
xorl %r12d, %r12d
leaq -0x1d8(%rbp), %rbx
leaq -0x50(%rbp), %r14
movq 0xb36c(%rip), %r15      # 0x1bfc8
leaq 0x63f4(%rip), %r13      # 0x17057
movq -0x1d8(%rbp), %rax
movq -0x18(%rax), %rax
testb $0x2, -0x1b8(%rbp,%rax)
jne 0x10cec
movq %rbx, %rdi
movq %r14, %rsi
callq 0x3240
movq -0x48(%rbp), %rdx
movslq %r12d, %r12
addq %rdx, %r12
cmpl $0x39, %r12d
jg 0x10c9f
movq -0x50(%rbp), %rsi
movq %r15, %rdi
callq 0x3210
cmpl $0x3a, %r12d
jl 0x10cd7
movsd -0x30(%rbp), %xmm0
callq 0x10b95
movl $0x1, %edx
movq %r15, %rdi
leaq 0x5c86(%rip), %rsi      # 0x16944
callq 0x3210
movq -0x50(%rbp), %rsi
movq -0x48(%rbp), %rdx
movq %r15, %rdi
callq 0x3210
movq -0x48(%rbp), %r12
movl $0x1, %edx
movq %r15, %rdi
movq %r13, %rsi
callq 0x3210
jmp 0x10c63
leaq (%rax,%rbp), %rdi
addq $-0x1d8, %rdi           # imm = 0xFE28
xorl %esi, %esi
callq 0x3300
movsd -0x30(%rbp), %xmm0
callq 0x10b95
movq 0xb2b9(%rip), %rdi      # 0x1bfc8
leaq 0x5c2e(%rip), %rsi      # 0x16944
movl $0x1, %edx
callq 0x3210
movq 0xb2a1(%rip), %rbx      # 0x1bfc8
leaq 0x5380(%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 0xb26f(%rip), %rdi      # 0x1bfc8
callq 0x3030
movq %rax, %rdi
callq 0x3140
movq -0x50(%rbp), %rdi
leaq -0x40(%rbp), %rax
cmpq %rax, %rdi
je 0x10d78
callq 0x31c0
movq 0xb221(%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 0x10dab
movq %rax, %rbx
movq -0x50(%rbp), %rdi
leaq -0x40(%rbp), %rax
cmpq %rax, %rdi
je 0x10dc0
callq 0x31c0
movq 0xb1d9(%rip), %rsi      # 0x1bfa0
leaq -0x1d8(%rbp), %rdi
callq 0x3170
leaq -0x158(%rbp), %rdi
callq 0x3090
movq %rbx, %rdi
callq 0x3320
nop