// File: tscott8706[P]cpp-csv-col-replacer/src/CsvProcessor.cpp
// Function: CsvProcessor::replaceAllCols(int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
std::string CsvProcessor::replaceAllCols(int colNum,
    const std::string &replaceVal)
{
    std::string line;
    std::string word;
    std::string output;

    while (getline(inputData, line))
    {
        std::istringstream colProcessor(line);
        for (int col = 0; col < numCols; col++)
        {
            checkedGetNextWord(word, colProcessor, line, (col != numCols - 1));
            output += (determineNextColWord(col, colNum, replaceVal, word) +
                getOutputWordDelimiter(col));
        }
    }

    return output;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x290, %rsp            # imm = 0x290
movq %rdi, -0x268(%rbp)
movq %rdi, %rax
movq %rax, -0x278(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq %rcx, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x270(%rbp)
leaq -0x40(%rbp), %rdi
callq 0x3290
leaq -0x60(%rbp), %rdi
callq 0x3290
movq -0x268(%rbp), %rdi
movb $0x0, -0x61(%rbp)
callq 0x3290
movq -0x270(%rbp), %rax
movq (%rax), %rdi
leaq -0x40(%rbp), %rsi
callq 0x3070
movq %rax, -0x280(%rbp)
jmp 0x43c4
movq -0x280(%rbp), %rdi
movq (%rdi), %rax
movq -0x18(%rax), %rax
addq %rax, %rdi
callq 0x3250
movb %al, -0x281(%rbp)
jmp 0x43e2
movb -0x281(%rbp), %al
testb $0x1, %al
jne 0x43f1
jmp 0x458f
leaq -0x1f8(%rbp), %rdi
leaq -0x40(%rbp), %rsi
movl $0x8, %edx
callq 0x3300
jmp 0x4408
movl $0x0, -0x1fc(%rbp)
movq -0x270(%rbp), %rcx
movl -0x1fc(%rbp), %eax
cmpl 0x28(%rcx), %eax
jge 0x4570
movq -0x270(%rbp), %rdi
movl -0x1fc(%rbp), %eax
movl 0x28(%rdi), %ecx
decl %ecx
subl %ecx, %eax
setne %al
movzbl %al, %r8d
leaq -0x60(%rbp), %rsi
leaq -0x1f8(%rbp), %rdx
leaq -0x40(%rbp), %rcx
callq 0x4680
jmp 0x4459
movq -0x270(%rbp), %rsi
movl -0x1fc(%rbp), %edx
movl -0x14(%rbp), %ecx
movq -0x20(%rbp), %r8
leaq -0x240(%rbp), %rdi
leaq -0x60(%rbp), %r9
callq 0x4820
jmp 0x447f
movq -0x270(%rbp), %rsi
movl -0x1fc(%rbp), %edx
leaq -0x260(%rbp), %rdi
callq 0x4880
jmp 0x449a
leaq -0x220(%rbp), %rdi
leaq -0x240(%rbp), %rsi
leaq -0x260(%rbp), %rdx
callq 0x4930
jmp 0x44b6
movq -0x268(%rbp), %rdi
leaq -0x220(%rbp), %rsi
callq 0x3260
jmp 0x44cb
leaq -0x220(%rbp), %rdi
callq 0x3160
leaq -0x260(%rbp), %rdi
callq 0x3160
leaq -0x240(%rbp), %rdi
callq 0x3160
movl -0x1fc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1fc(%rbp)
jmp 0x4412
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x70(%rbp)
movl %eax, -0x74(%rbp)
jmp 0x45c7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x70(%rbp)
movl %eax, -0x74(%rbp)
jmp 0x4581
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x70(%rbp)
movl %eax, -0x74(%rbp)
jmp 0x4562
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x70(%rbp)
movl %eax, -0x74(%rbp)
jmp 0x4556
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x70(%rbp)
movl %eax, -0x74(%rbp)
leaq -0x220(%rbp), %rdi
callq 0x3160
leaq -0x260(%rbp), %rdi
callq 0x3160
leaq -0x240(%rbp), %rdi
callq 0x3160
jmp 0x4581
leaq -0x1f8(%rbp), %rdi
callq 0x3120
jmp 0x43a8
leaq -0x1f8(%rbp), %rdi
callq 0x3120
jmp 0x45c7
movb $0x1, -0x61(%rbp)
testb $0x1, -0x61(%rbp)
jne 0x45a5
movq -0x268(%rbp), %rdi
callq 0x3160
leaq -0x60(%rbp), %rdi
callq 0x3160
leaq -0x40(%rbp), %rdi
callq 0x3160
movq -0x278(%rbp), %rax
addq $0x290, %rsp            # imm = 0x290
popq %rbp
retq
movq -0x268(%rbp), %rdi
callq 0x3160
leaq -0x60(%rbp), %rdi
callq 0x3160
leaq -0x40(%rbp), %rdi
callq 0x3160
movq -0x70(%rbp), %rdi
callq 0x3360
nop