// File: j84guo[P]cake/cake.cpp
// Function: main
int main()
{
    vector<string> lines;
    if (!readFile("Cakefile", lines)) {
        perror("readFile");
        return 1;
    }

    TargetMap nodes;
    if (!parseTargets(nodes, lines))
        return 1;

    vector<string> order;
    sortTargets(nodes, order);

    cout << "[...Target Order...]\n";
    for (auto& name : order)
        cout << name << "\n";

    cout << "[...Processing...]\n";
    return processTargets(nodes, order) ? 0 : 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x100, %rsp            # imm = 0x100
movl $0x0, -0x4(%rbp)
leaq -0x20(%rbp), %rdi
callq 0x3ca0
leaq -0x41(%rbp), %rdi
movq %rdi, -0xd0(%rbp)
callq 0x23a0
movq -0xd0(%rbp), %rdx
leaq 0x4c74(%rip), %rsi      # 0x807d
leaq -0x40(%rbp), %rdi
callq 0x37d0
jmp 0x3414
leaq -0x40(%rbp), %rdi
leaq -0x20(%rbp), %rsi
callq 0x2770
movb %al, -0xd1(%rbp)
jmp 0x3429
movb -0xd1(%rbp), %al
xorb $-0x1, %al
movb %al, -0xd2(%rbp)
leaq -0x40(%rbp), %rdi
callq 0x2140
leaq -0x41(%rbp), %rdi
callq 0x2270
movb -0xd2(%rbp), %al
testb $0x1, %al
jne 0x3455
jmp 0x34b8
leaq 0x4c2a(%rip), %rdi      # 0x8086
callq 0x21b0
jmp 0x3463
movl $0x1, -0x4(%rbp)
movl $0x1, -0x58(%rbp)
jmp 0x3680
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
jmp 0x3499
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
leaq -0x40(%rbp), %rdi
callq 0x2140
leaq -0x41(%rbp), %rdi
callq 0x2270
jmp 0x3695
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
jmp 0x3695
leaq -0x90(%rbp), %rdi
movq %rdi, -0xe0(%rbp)
callq 0x3cc0
movq -0xe0(%rbp), %rdi
leaq -0x20(%rbp), %rsi
callq 0x2c60
movb %al, -0xd3(%rbp)
jmp 0x34e3
movb -0xd3(%rbp), %al
testb $0x1, %al
jne 0x3513
jmp 0x34ef
movl $0x1, -0x4(%rbp)
movl $0x1, -0x58(%rbp)
jmp 0x3664
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
jmp 0x3672
leaq -0xa8(%rbp), %rdi
movq %rdi, -0xe8(%rbp)
callq 0x3ca0
movq -0xe8(%rbp), %rsi
leaq -0x90(%rbp), %rdi
callq 0x3080
jmp 0x353b
movq 0x9a8e(%rip), %rdi      # 0xcfd0
leaq 0x4b46(%rip), %rsi      # 0x808f
callq 0x2210
jmp 0x3550
leaq -0xa8(%rbp), %rax
movq %rax, -0xb0(%rbp)
movq -0xb0(%rbp), %rdi
callq 0x3920
movq %rax, -0xb8(%rbp)
movq -0xb0(%rbp), %rdi
callq 0x3990
movq %rax, -0xc0(%rbp)
leaq -0xb8(%rbp), %rdi
leaq -0xc0(%rbp), %rsi
callq 0x3950
testb $0x1, %al
jne 0x359d
jmp 0x360b
leaq -0xb8(%rbp), %rdi
callq 0x3a80
movq %rax, -0xc8(%rbp)
movq -0xc8(%rbp), %rsi
movq 0x9a12(%rip), %rdi      # 0xcfd0
callq 0x21f0
movq %rax, -0xf0(%rbp)
jmp 0x35cc
movq -0xf0(%rbp), %rdi
leaq 0x4add(%rip), %rsi      # 0x80b7
callq 0x2210
jmp 0x35e1
jmp 0x35e3
leaq -0xb8(%rbp), %rdi
callq 0x39e0
jmp 0x3584
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
leaq -0xa8(%rbp), %rdi
callq 0x3ce0
jmp 0x3672
movq 0x99be(%rip), %rdi      # 0xcfd0
leaq 0x4a8c(%rip), %rsi      # 0x80a5
callq 0x2210
jmp 0x3620
leaq -0x90(%rbp), %rdi
leaq -0xa8(%rbp), %rsi
callq 0x3330
movb %al, -0xf1(%rbp)
jmp 0x363b
movb -0xf1(%rbp), %dl
movl $0x1, %eax
xorl %ecx, %ecx
testb $0x1, %dl
cmovnel %ecx, %eax
movl %eax, -0x4(%rbp)
movl $0x1, -0x58(%rbp)
leaq -0xa8(%rbp), %rdi
callq 0x3ce0
leaq -0x90(%rbp), %rdi
callq 0x3d40
jmp 0x3680
leaq -0x90(%rbp), %rdi
callq 0x3d40
jmp 0x3695
leaq -0x20(%rbp), %rdi
callq 0x3ce0
movl -0x4(%rbp), %eax
addq $0x100, %rsp            # imm = 0x100
popq %rbp
retq
leaq -0x20(%rbp), %rdi
callq 0x3ce0
movq -0x50(%rbp), %rdi
callq 0x2390
nopw (%rax,%rax)