// File: /workspace/github_cpp_makefile_star2_O2/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
andq $0x0, 0x10(%rdi)
xorps %xmm0, %xmm0
movq %rdi, -0x38(%rbp)
movups %xmm0, (%rdi)
leaq -0x68(%rbp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movb $0x0, (%rax)
leaq -0x78(%rbp), %rsi
movq %r14, %rdi
callq 0x3450
leaq -0x1f8(%rbp), %rdi
leaq -0x78(%rbp), %rsi
pushq $0x8
popq %rdx
callq 0x2260
leaq -0x1f8(%rbp), %rdi
leaq -0x50(%rbp), %rsi
callq 0x2120
xorl %eax, %eax
leaq -0x78(%rbp), %r12
pushq $0x8
popq %rbx
leaq -0x4f8(%rbp), %r13
movl %eax, -0x2c(%rbp)
cmpl -0x50(%rbp), %eax
jge 0x2cfd
movq %r14, %rdi
movq %r12, %rsi
callq 0x3450
movl $0x80, %edi
callq 0x2170
movq %rax, %r15
movq %rax, %rdi
movl -0x2c(%rbp), %esi
callq 0x3e64
movq %r15, -0x58(%rbp)
leaq -0x378(%rbp), %r15
movq %r15, %rdi
movq %r12, %rsi
movl %ebx, %edx
callq 0x2260
movq %r15, %rdi
leaq -0x4c(%rbp), %rsi
callq 0x2120
xorl %r15d, %r15d
cmpl -0x4c(%rbp), %r15d
jge 0x2cda
movq %r14, %rdi
movq %r12, %rsi
callq 0x2050
movq %r13, %rdi
movq %r12, %rsi
movl %ebx, %edx
callq 0x2260
movq %r13, %rdi
leaq -0x48(%rbp), %rsi
callq 0x2120
movq %rax, %rdi
leaq -0x44(%rbp), %rsi
callq 0x2120
movq %rax, %rdi
leaq -0x40(%rbp), %rsi
callq 0x2120
movq %rax, %rdi
leaq -0x3c(%rbp), %rsi
callq 0x2120
movq -0x58(%rbp), %rdi
movl -0x48(%rbp), %esi
movl -0x44(%rbp), %edx
movl -0x40(%rbp), %ecx
movl -0x3c(%rbp), %r8d
callq 0x3f16
movq %r13, %rdi
callq 0x2100
incl %r15d
jmp 0x2c69
movq -0x38(%rbp), %rdi
leaq -0x58(%rbp), %rsi
callq 0x3676
leaq -0x378(%rbp), %rdi
callq 0x2100
movl -0x2c(%rbp), %eax
incl %eax
jmp 0x2c13
leaq -0x1f8(%rbp), %rdi
callq 0x2100
leaq -0x78(%rbp), %rdi
callq 0x20f0
movq -0x38(%rbp), %rax
addq $0x4d8, %rsp            # imm = 0x4D8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x2d47
jmp 0x2d2c
movq %rax, %rbx
jmp 0x2d7c
movq %rax, %rbx
movl $0x80, %esi
movq %r15, %rdi
callq 0x2180
jmp 0x2d70
jmp 0x2d47
jmp 0x2d47
movq %rax, %rbx
jmp 0x2d70
jmp 0x2d50
jmp 0x2d50
movq %rax, %rbx
jmp 0x2d64
movq %rax, %rbx
leaq -0x4f8(%rbp), %rdi
callq 0x2100
leaq -0x378(%rbp), %rdi
callq 0x2100
leaq -0x1f8(%rbp), %rdi
callq 0x2100
leaq -0x78(%rbp), %rdi
callq 0x20f0
movq -0x38(%rbp), %rdi
callq 0x382a
movq %rbx, %rdi
callq 0x2270