// File: /workspace/github_cpp_makefile_star2_O2/j84guo[P]cake/cake.cpp
// Function: parseTargets(std::unordered_map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, Target, std::hash<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, std::equal_to<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, Target>>>&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>&)
bool parseTargets(TargetMap& nodes, vector<string>& lines)
{
    unsigned int lineNo = 1;
    auto it = lines.begin();

    while (it != lines.end()) {
        if (it->find_first_not_of(' ') == string::npos) {
            ++it; ++lineNo;
            continue;
        }

        auto pos = it->find(":");
        if ((pos == string::npos) || !pos) {
            lineError(lineNo, "no target");
            return false;
        }

        string name = it->substr(0, pos);
        nodes.emplace(name, name);
        parseAdjacent(it->substr(pos + 1), nodes.at(name));

        while (++it != lines.end() && ++lineNo) {
            if (!parseTask(*it, nodes.at(name).tasks))
                break;
        }
    }

    return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rsi, %r13
movq %rdi, -0x40(%rbp)
movq (%rsi), %rbx
pushq $0x1
popq %r14
movq %rsi, -0x38(%rbp)
movq 0x8(%r13), %r12
cmpq %r12, %rbx
je 0x29ea
movq %rbx, %rdi
pushq $0x20
popq %rsi
xorl %edx, %edx
callq 0x21a0
cmpq $-0x1, %rax
je 0x29a5
movq %rbx, %rdi
leaq 0x175d(%rip), %rsi      # 0x404d
xorl %edx, %edx
callq 0x22d0
movq %rax, %r13
decq %rax
cmpq $-0x2, %rax
jae 0x29c1
leaq -0x60(%rbp), %r15
movq %r15, %rdi
movq %rbx, %rsi
xorl %edx, %edx
movq %r13, %rcx
callq 0x21e0
movq -0x40(%rbp), %r12
movq %r12, %rdi
movq %r15, %rsi
movq %r15, %rdx
callq 0x3528
incq %r13
leaq -0x80(%rbp), %rdi
movq %rbx, %rsi
movq %r13, %rdx
pushq $-0x1
popq %rcx
callq 0x21e0
movq %r12, %rdi
movq %r15, %rsi
callq 0x3a30
leaq -0x80(%rbp), %r13
movq %r13, %rdi
movq %rax, %rsi
callq 0x276c
movq %r13, %rdi
callq 0x20d0
addq $0x20, %rbx
movq %rbx, %rcx
movq -0x38(%rbp), %r13
movq %rcx, %rbx
cmpq 0x8(%r13), %rcx
je 0x29b4
cmpl $-0x1, %r14d
je 0x29b1
movq %r12, %rdi
movq %r15, %rsi
callq 0x3a30
addq $0x38, %rax
movq %rbx, %rdi
movq %rax, %rsi
callq 0x2819
leaq 0x20(%rbx), %rcx
incl %r14d
testb %al, %al
jne 0x296f
jmp 0x29b4
addq $0x20, %rbx
incl %r14d
jmp 0x28c2
xorl %r14d, %r14d
movq %r15, %rdi
callq 0x20d0
jmp 0x28c2
leaq 0x1687(%rip), %rsi      # 0x404f
leaq -0x60(%rbp), %rdi
leaq -0x29(%rbp), %rdx
callq 0x2e70
leaq -0x60(%rbp), %rsi
movl %r14d, %edi
callq 0x269c
leaq -0x60(%rbp), %rdi
callq 0x20d0
cmpq %r12, %rbx
sete %al
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x2a16
movq %rax, %rbx
jmp 0x2a22
jmp 0x2a16
movq %rax, %rbx
leaq -0x80(%rbp), %rdi
callq 0x20d0
jmp 0x2a19
movq %rax, %rbx
leaq -0x60(%rbp), %rdi
callq 0x20d0
movq %rbx, %rdi
callq 0x22a0