// File: /workspace/github_cpp_makefile_star2_O3/eva23511[P]OS-Virtual-Memory-Management/main.cpp
// Function: GetProcess(std::basic_ifstream<char, std::char_traits<char>>&)
vector<Process *> GetProcess(ifstream &input_file) {
    vector<Process *> processes;
    string line;
    int process_num;
    int vma_num;
    int s, e, w, f;
    
    SkipComments(input_file, line);
    
    istringstream input(line);
    input >> process_num;
    
    for (int i = 0; i < process_num; i++) {
        SkipComments(input_file, line);
        Process * process = new Process(i);
        istringstream input(line);
        input >> vma_num;
        
        for (int j = 0; j < vma_num; j++) {
            getline(input_file, line);
            istringstream input(line);
            input >> s >> e >> w >> f;
            process->AddVma(s, e, w, f);
        }
        processes.push_back(process);
    }
    return processes;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x4d8, %rsp            # imm = 0x4D8
movq %rsi, %r14
xorl %eax, %eax
movq %rax, 0x10(%rdi)
xorps %xmm0, %xmm0
movq %rdi, -0x38(%rbp)
movups %xmm0, (%rdi)
leaq -0x68(%rbp), %rcx
movq %rcx, -0x10(%rcx)
movq %rax, -0x8(%rcx)
movb $0x0, (%rcx)
leaq -0x78(%rbp), %rsi
movq %r14, %rdi
callq 0x396d
leaq -0x1f8(%rbp), %rdi
leaq -0x78(%rbp), %rsi
movl $0x8, %edx
callq 0x2220
leaq -0x1f8(%rbp), %rdi
leaq -0x40(%rbp), %rsi
callq 0x20e0
cmpl $0x0, -0x40(%rbp)
jle 0x3095
movl $0x0, -0x2c(%rbp)
leaq -0x78(%rbp), %r15
leaq -0x4f8(%rbp), %rbx
movq 0x6077(%rip), %r13      # 0x8fc8
movq %r14, %rdi
movq %r15, %rsi
callq 0x396d
movl $0x80, %edi
callq 0x2140
movq %rax, %r12
movq %rax, %rdi
movl -0x2c(%rbp), %esi
callq 0x41b4
movq %r12, -0x48(%rbp)
leaq -0x378(%rbp), %r12
movq %r12, %rdi
movq %r15, %rsi
movl $0x8, %edx
callq 0x2220
movq %r12, %rdi
leaq -0x3c(%rbp), %rsi
callq 0x20e0
cmpl $0x0, -0x3c(%rbp)
jle 0x3044
xorl %r12d, %r12d
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x2130
movsbl %al, %edx
movq %r14, %rdi
movq %r15, %rsi
callq 0x2250
movq %rbx, %rdi
movq %r15, %rsi
movl $0x8, %edx
callq 0x2220
movq %rbx, %rdi
leaq -0x58(%rbp), %rsi
callq 0x20e0
movq %rax, %rdi
leaq -0x54(%rbp), %rsi
callq 0x20e0
movq %rax, %rdi
leaq -0x50(%rbp), %rsi
callq 0x20e0
movq %rax, %rdi
leaq -0x4c(%rbp), %rsi
callq 0x20e0
movq -0x48(%rbp), %rdi
movl -0x58(%rbp), %esi
movl -0x54(%rbp), %edx
movl -0x50(%rbp), %ecx
movl -0x4c(%rbp), %r8d
callq 0x4288
movq %rbx, %rdi
movq %r13, %rsi
callq 0x21a0
leaq -0x480(%rbp), %rdi
callq 0x20a0
incl %r12d
cmpl -0x3c(%rbp), %r12d
jl 0x2fa8
movq -0x38(%rbp), %rdi
movq 0x8(%rdi), %rsi
cmpq 0x10(%rdi), %rsi
je 0x3060
movq -0x48(%rbp), %rax
movq %rax, (%rsi)
addq $0x8, 0x8(%rdi)
jmp 0x3069
leaq -0x48(%rbp), %rdx
callq 0x3f70
leaq -0x378(%rbp), %rdi
movq %r13, %rsi
callq 0x21a0
leaq -0x300(%rbp), %rdi
callq 0x20a0
movl -0x2c(%rbp), %eax
incl %eax
movl %eax, -0x2c(%rbp)
cmpl -0x40(%rbp), %eax
jl 0x2f51
movq 0x5f2c(%rip), %rsi      # 0x8fc8
leaq -0x1f8(%rbp), %rdi
callq 0x21a0
leaq -0x180(%rbp), %rdi
callq 0x20a0
movq -0x78(%rbp), %rdi
leaq -0x68(%rbp), %rax
cmpq %rax, %rdi
je 0x30cd
movq -0x68(%rbp), %rsi
incq %rsi
callq 0x2150
movq -0x38(%rbp), %rax
addq $0x4d8, %rsp            # imm = 0x4D8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x3105
jmp 0x30e7
movq %rax, %rbx
jmp 0x3173
jmp 0x3105
jmp 0x3105
movq %rax, %rbx
movl $0x80, %esi
movq %r12, %rdi
callq 0x2150
jmp 0x3154
movq %rax, %rbx
jmp 0x3154
jmp 0x310e
jmp 0x310e
movq %rax, %rbx
jmp 0x3135
movq %rax, %rbx
movq 0x5eab(%rip), %rsi      # 0x8fc8
leaq -0x4f8(%rbp), %rdi
callq 0x21a0
leaq -0x480(%rbp), %rdi
callq 0x20a0
movq 0x5e8c(%rip), %rsi      # 0x8fc8
leaq -0x378(%rbp), %rdi
callq 0x21a0
leaq -0x300(%rbp), %rdi
callq 0x20a0
movq 0x5e6d(%rip), %rsi      # 0x8fc8
leaq -0x1f8(%rbp), %rdi
callq 0x21a0
leaq -0x180(%rbp), %rdi
callq 0x20a0
movq -0x38(%rbp), %rax
movq -0x78(%rbp), %rdi
leaq -0x68(%rbp), %rcx
cmpq %rcx, %rdi
je 0x3194
movq -0x68(%rbp), %rsi
incq %rsi
callq 0x2150
movq -0x38(%rbp), %rax
movq (%rax), %rdi
testq %rdi, %rdi
je 0x31a8
movq 0x10(%rax), %rsi
subq %rdi, %rsi
callq 0x2150
movq %rbx, %rdi
callq 0x2230