// File: /workspace/github_cpp_makefile_star2_O1/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 0x2300
leaq 0x2c(%rsp), %rsi
movq %r12, %rdi
callq 0x2160
callq 0x88b8
movq %rax, %r12
leaq 0x896e(%rip), %rsi      # 0xe8fa
leaq 0x8(%rsp), %rdi
movq %r15, %rdx
callq 0x8c8e
leaq 0x8(%rsp), %rsi
movq %r12, %rdi
callq 0x8904
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x5fb9
callq 0x2200
leaq 0xa8(%rsp), %rdi
callq 0x20b0
testb %al, %al
je 0x61f7
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 0x61ed
xorl %eax, %eax
subl 0x8(%rsp), %eax
movl %eax, (%rsp)
movq %r14, %rdi
movq %rbp, %rsi
callq 0xd1e2
movq 0x8(%rax), %rsi
cmpq 0x10(%rax), %rsi
je 0x6036
movl 0x4(%rsp), %ecx
movl %ecx, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x8(%rax)
jmp 0x6041
movq %rax, %rdi
movq %r13, %rdx
callq 0xb8d2
movq %r14, %rdi
movq %r13, %rsi
callq 0xd4e0
testq %rax, %rax
jne 0x6077
movq %r14, %rdi
movq %r13, %rsi
callq 0xd514
movq (%rax), %rdi
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
movq $0x0, 0x10(%rax)
testq %rdi, %rdi
je 0x6077
callq 0x2200
xorl %eax, %eax
subl 0x4(%rsp), %eax
movl %eax, (%rsp)
movq %r14, %rdi
movq %rbp, %rsi
callq 0xd1e2
movq 0x8(%rax), %rsi
cmpq 0x10(%rax), %rsi
je 0x60a5
movl 0x8(%rsp), %ecx
movl %ecx, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x8(%rax)
jmp 0x60b0
movq %rax, %rdi
movq %r12, %rdx
callq 0xb8d2
movq %r14, %rdi
movq %r12, %rsi
callq 0xd4e0
testq %rax, %rax
jne 0x60e6
movq %r14, %rdi
movq %r12, %rsi
callq 0xd514
movq (%rax), %rdi
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
movq $0x0, 0x10(%rax)
testq %rdi, %rdi
je 0x60e6
callq 0x2200
movq %rbx, %rdi
movq %r13, %rsi
callq 0xd514
xorl %ecx, %ecx
subl 0x8(%rsp), %ecx
movl %ecx, (%rsp)
movq 0x8(%rax), %rsi
cmpq 0x10(%rax), %rsi
je 0x6110
movl %ecx, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x8(%rax)
jmp 0x611b
movq %rax, %rdi
movq %rbp, %rdx
callq 0xd5d6
xorl %eax, %eax
subl 0x8(%rsp), %eax
movl %eax, (%rsp)
movq %rbx, %rdi
movq %rbp, %rsi
callq 0xd4e0
testq %rax, %rax
jne 0x6163
xorl %eax, %eax
subl 0x8(%rsp), %eax
movl %eax, (%rsp)
movq %rbx, %rdi
movq %rbp, %rsi
callq 0xd1e2
movq (%rax), %rdi
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
movq $0x0, 0x10(%rax)
testq %rdi, %rdi
je 0x6163
callq 0x2200
movq %rbx, %rdi
movq %r12, %rsi
callq 0xd514
xorl %ecx, %ecx
subl 0x4(%rsp), %ecx
movl %ecx, (%rsp)
movq 0x8(%rax), %rsi
cmpq 0x10(%rax), %rsi
je 0x618d
movl %ecx, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x8(%rax)
jmp 0x6198
movq %rax, %rdi
movq %rbp, %rdx
callq 0xd5d6
xorl %eax, %eax
subl 0x4(%rsp), %eax
movl %eax, (%rsp)
movq %rbx, %rdi
movq %rbp, %rsi
callq 0xd4e0
testq %rax, %rax
jne 0x5fe0
xorl %eax, %eax
subl 0x4(%rsp), %eax
movl %eax, (%rsp)
movq %rbx, %rdi
movq %rbp, %rsi
callq 0xd1e2
movq (%rax), %rdi
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
movq $0x0, 0x10(%rax)
testq %rdi, %rdi
je 0x5fe0
callq 0x2200
jmp 0x5fe0
leaq 0x30(%rsp), %rdi
callq 0x2090
callq 0x88b8
movq %rax, %rdi
callq 0x894e
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 0x6252
movq %rax, %rbx
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x6255
callq 0x2200
jmp 0x6255
jmp 0x6252
jmp 0x6252
jmp 0x6252
jmp 0x6252
jmp 0x6252
jmp 0x6252
jmp 0x6252
jmp 0x6252
jmp 0x6252
jmp 0x6252
jmp 0x6252
jmp 0x6252
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0x20c0
movq %rbx, %rdi
callq 0x2360