// File: 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
subq $0x210, %rsp            # imm = 0x210
movq %rdi, -0x1e0(%rbp)
movq %rsi, -0x1e8(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movsd %xmm0, -0x18(%rbp)
leaq -0x1a0(%rbp), %rdi
callq 0x3180
leaq -0x1c0(%rbp), %rdi
callq 0x3300
movq -0x1e0(%rbp), %rsi
movl $0x0, -0x1c4(%rbp)
leaq -0x190(%rbp), %rdi
callq 0x31e0
jmp 0x1896d
movq -0x1e8(%rbp), %rsi
movq 0x1064d(%rip), %rdi     # 0x28fc8
callq 0x31e0
jmp 0x18982
jmp 0x18984
movq -0x1a0(%rbp), %rax
movq -0x18(%rax), %rax
leaq -0x1a0(%rbp,%rax), %rdi
callq 0x33f0
movb %al, -0x1e9(%rbp)
jmp 0x189a4
movb -0x1e9(%rbp), %al
xorb $-0x1, %al
testb $0x1, %al
jne 0x189b5
jmp 0x18ac1
leaq -0x1a0(%rbp), %rdi
leaq -0x1c0(%rbp), %rsi
callq 0x3290
jmp 0x189ca
leaq -0x1c0(%rbp), %rdi
callq 0x3170
movq %rax, %rcx
movslq -0x1c4(%rbp), %rax
addq %rcx, %rax
movl %eax, -0x1c4(%rbp)
cmpl $0x3a, -0x1c4(%rbp)
jge 0x18a38
movq 0x105cf(%rip), %rdi     # 0x28fc8
leaq -0x1c0(%rbp), %rsi
callq 0x31e0
jmp 0x18a07
jmp 0x18a38
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1d0(%rbp)
movl %eax, -0x1d4(%rbp)
leaq -0x1c0(%rbp), %rdi
callq 0x3448
leaq -0x1a0(%rbp), %rdi
callq 0x3190
jmp 0x18b57
cmpl $0x3a, -0x1c4(%rbp)
jl 0x18aa7
movsd -0x18(%rbp), %xmm0
callq 0x188c0
jmp 0x18a4d
movq 0x10574(%rip), %rdi     # 0x28fc8
leaq 0x6ee9(%rip), %rsi      # 0x1f944
callq 0x3210
movq %rax, -0x1f8(%rbp)
jmp 0x18a69
movq -0x1f8(%rbp), %rdi
leaq -0x1c0(%rbp), %rsi
callq 0x31e0
jmp 0x18a7e
movl $0x0, -0x1c4(%rbp)
leaq -0x1c0(%rbp), %rdi
callq 0x3170
movq %rax, %rcx
movslq -0x1c4(%rbp), %rax
addq %rcx, %rax
movl %eax, -0x1c4(%rbp)
movq 0x1051a(%rip), %rdi     # 0x28fc8
leaq 0x75a2(%rip), %rsi      # 0x20057
callq 0x3210
jmp 0x18abc
jmp 0x18984
movq -0x1a0(%rbp), %rax
movq -0x18(%rax), %rax
leaq -0x1a0(%rbp,%rax), %rdi
xorl %esi, %esi
callq 0x33a0
jmp 0x18add
movsd -0x18(%rbp), %xmm0
callq 0x188c0
jmp 0x18ae9
movq 0x104d8(%rip), %rdi     # 0x28fc8
leaq 0x6e4d(%rip), %rsi      # 0x1f944
callq 0x3210
movq %rax, -0x200(%rbp)
jmp 0x18b05
movq -0x200(%rbp), %rdi
leaq 0x65c0(%rip), %rsi      # 0x1f0d3
callq 0x3210
movq %rax, -0x208(%rbp)
jmp 0x18b21
movq -0x208(%rbp), %rdi
movq 0x10481(%rip), %rsi     # 0x28fb0
callq 0x3240
jmp 0x18b36
leaq -0x1c0(%rbp), %rdi
callq 0x3448
leaq -0x1a0(%rbp), %rdi
callq 0x3190
addq $0x210, %rsp            # imm = 0x210
popq %rbp
retq
movq -0x1d0(%rbp), %rdi
callq 0x33c0
nopw %cs:(%rax,%rax)
nopl (%rax)