// File: /workspace/github_cpp_makefile_star2_O3/Manca[P]algorithms2/./assignment6.hpp
// Function: assignment6::readFile(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::unordered_map<int, std::vector<int, std::allocator<int>>, std::hash<int>, std::equal_to<int>, std::allocator<std::pair<int const, std::vector<int, std::allocator<int>>>>>&, std::unordered_map<int, std::vector<int, std::allocator<int>>, std::hash<int>, std::equal_to<int>, std::allocator<std::pair<int const, std::vector<int, std::allocator<int>>>>>&)
void readFile(const std::string& fileName, Graph& GOrig, Graph& GRev)
    {
        std::ifstream file(fileName, std::ios::in);
        int n;
        file >> n;

        PROFILE("Reading file: " + fileName);
        if (file.is_open())
        {
            int tail, head;
            while (file >> tail >> head)
            {
                // two edges per x,y pair
                GOrig[-tail].push_back(head);   // 1) notX => y
                if (GOrig.count(head) == 0)
                    GOrig[head] = std::vector<int>();

                GOrig[-head].push_back(tail);   // 2) notY => x
                if (GOrig.count(tail) == 0)
                    GOrig[tail] = std::vector<int>();

                // the same for reversed graph
                GRev[head].push_back(-tail);
                if (GRev.count(-tail) == 0)
                    GRev[-tail] = std::vector<int>();

                GRev[tail].push_back(-head);
                if (GRev.count(-head) == 0)
                    GRev[-head] = std::vector<int>();

            }
            file.close();
        }
        PROFILE_STOP();
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x238, %rsp            # imm = 0x238
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
leaq 0x30(%rsp), %r12
movq %r12, %rdi
movq %r15, %rsi
movl $0x8, %edx
callq 0x22f0
leaq 0x2c(%rsp), %rsi
movq %r12, %rdi
callq 0x2160
callq 0x88f8
movq %rax, %r12
leaq 0x8a56(%rip), %rsi      # 0xe8fa
leaq 0x8(%rsp), %rdi
movq %r15, %rdx
callq 0x8ccc
leaq 0x8(%rsp), %rsi
movq %r12, %rdi
callq 0x8942
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x5ed1
callq 0x21f0
leaq 0xa8(%rsp), %rdi
callq 0x20b0
testb %al, %al
je 0x610f
leaq 0x30(%rsp), %r15
leaq 0x8(%rsp), %r12
leaq 0x4(%rsp), %r13
movq %rsp, %rbp
movq %r15, %rdi
movq %r12, %rsi
callq 0x2160
movq %rax, %rdi
movq %r13, %rsi
callq 0x2160
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x6105
xorl %eax, %eax
subl 0x8(%rsp), %eax
movl %eax, (%rsp)
movq %r14, %rdi
movq %rbp, %rsi
callq 0xd1d6
movq 0x8(%rax), %rsi
cmpq 0x10(%rax), %rsi
je 0x5f4e
movl 0x4(%rsp), %ecx
movl %ecx, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x8(%rax)
jmp 0x5f59
movq %rax, %rdi
movq %r13, %rdx
callq 0xb90c
movq %r14, %rdi
movq %r13, %rsi
callq 0xd4a2
testq %rax, %rax
jne 0x5f8f
movq %r14, %rdi
movq %r13, %rsi
callq 0xd4fe
movq (%rax), %rdi
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
movq $0x0, 0x10(%rax)
testq %rdi, %rdi
je 0x5f8f
callq 0x21f0
xorl %eax, %eax
subl 0x4(%rsp), %eax
movl %eax, (%rsp)
movq %r14, %rdi
movq %rbp, %rsi
callq 0xd1d6
movq 0x8(%rax), %rsi
cmpq 0x10(%rax), %rsi
je 0x5fbd
movl 0x8(%rsp), %ecx
movl %ecx, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x8(%rax)
jmp 0x5fc8
movq %rax, %rdi
movq %r12, %rdx
callq 0xb90c
movq %r14, %rdi
movq %r12, %rsi
callq 0xd4a2
testq %rax, %rax
jne 0x5ffe
movq %r14, %rdi
movq %r12, %rsi
callq 0xd4fe
movq (%rax), %rdi
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
movq $0x0, 0x10(%rax)
testq %rdi, %rdi
je 0x5ffe
callq 0x21f0
movq %rbx, %rdi
movq %r13, %rsi
callq 0xd4fe
xorl %ecx, %ecx
subl 0x8(%rsp), %ecx
movl %ecx, (%rsp)
movq 0x8(%rax), %rsi
cmpq 0x10(%rax), %rsi
je 0x6028
movl %ecx, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x8(%rax)
jmp 0x6033
movq %rax, %rdi
movq %rbp, %rdx
callq 0xd5d4
xorl %eax, %eax
subl 0x8(%rsp), %eax
movl %eax, (%rsp)
movq %rbx, %rdi
movq %rbp, %rsi
callq 0xd4a2
testq %rax, %rax
jne 0x607b
xorl %eax, %eax
subl 0x8(%rsp), %eax
movl %eax, (%rsp)
movq %rbx, %rdi
movq %rbp, %rsi
callq 0xd1d6
movq (%rax), %rdi
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
movq $0x0, 0x10(%rax)
testq %rdi, %rdi
je 0x607b
callq 0x21f0
movq %rbx, %rdi
movq %r12, %rsi
callq 0xd4fe
xorl %ecx, %ecx
subl 0x4(%rsp), %ecx
movl %ecx, (%rsp)
movq 0x8(%rax), %rsi
cmpq 0x10(%rax), %rsi
je 0x60a5
movl %ecx, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x8(%rax)
jmp 0x60b0
movq %rax, %rdi
movq %rbp, %rdx
callq 0xd5d4
xorl %eax, %eax
subl 0x4(%rsp), %eax
movl %eax, (%rsp)
movq %rbx, %rdi
movq %rbp, %rsi
callq 0xd4a2
testq %rax, %rax
jne 0x5ef8
xorl %eax, %eax
subl 0x4(%rsp), %eax
movl %eax, (%rsp)
movq %rbx, %rdi
movq %rbp, %rsi
callq 0xd1d6
movq (%rax), %rdi
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
movq $0x0, 0x10(%rax)
testq %rdi, %rdi
je 0x5ef8
callq 0x21f0
jmp 0x5ef8
leaq 0x30(%rsp), %rdi
callq 0x2090
callq 0x88f8
movq %rax, %rdi
callq 0x898c
leaq 0x30(%rsp), %rdi
callq 0x20c0
addq $0x238, %rsp            # imm = 0x238
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x616a
movq %rax, %rbx
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x616d
callq 0x21f0
jmp 0x616d
jmp 0x616a
jmp 0x616a
jmp 0x616a
jmp 0x616a
jmp 0x616a
jmp 0x616a
jmp 0x616a
jmp 0x616a
jmp 0x616a
jmp 0x616a
jmp 0x616a
jmp 0x616a
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0x20c0
movq %rbx, %rdi
callq 0x2350