// File: /workspace/github_cpp_makefile_star2_O1/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 0x3909
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 0x304b
movl $0x0, -0x2c(%rbp)
leaq -0x78(%rbp), %r13
leaq -0x4f8(%rbp), %rbx
movq 0x60c1(%rip), %r12      # 0x8fc8
movq %r14, %rdi
movq %r13, %rsi
callq 0x3909
movl $0x80, %edi
callq 0x2140
movq %rax, %r15
movq %rax, %rdi
movl -0x2c(%rbp), %esi
callq 0x4140
movq %r15, -0x48(%rbp)
leaq -0x378(%rbp), %r15
movq %r15, %rdi
movq %r13, %rsi
movl $0x8, %edx
callq 0x2220
movq %r15, %rdi
leaq -0x3c(%rbp), %rsi
callq 0x20e0
cmpl $0x0, -0x3c(%rbp)
jle 0x2ffa
xorl %r15d, %r15d
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x2130
movsbl %al, %edx
movq %r14, %rdi
movq %r13, %rsi
callq 0x2250
movq %rbx, %rdi
movq %r13, %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 0x4214
movq %rbx, %rdi
movq %r12, %rsi
callq 0x21a0
leaq -0x480(%rbp), %rdi
callq 0x20a0
incl %r15d
cmpl -0x3c(%rbp), %r15d
jl 0x2f5e
movq -0x38(%rbp), %rdi
movq 0x8(%rdi), %rsi
cmpq 0x10(%rdi), %rsi
je 0x3016
movq -0x48(%rbp), %rax
movq %rax, (%rsi)
addq $0x8, 0x8(%rdi)
jmp 0x301f
leaq -0x48(%rbp), %rdx
callq 0x3efc
leaq -0x378(%rbp), %rdi
movq %r12, %rsi
callq 0x21a0
leaq -0x300(%rbp), %rdi
callq 0x20a0
movl -0x2c(%rbp), %eax
incl %eax
movl %eax, -0x2c(%rbp)
cmpl -0x40(%rbp), %eax
jl 0x2f07
movq 0x5f76(%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 0x3083
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 0x30bb
jmp 0x309d
movq %rax, %rbx
jmp 0x3129
jmp 0x30bb
jmp 0x30bb
movq %rax, %rbx
movl $0x80, %esi
movq %r15, %rdi
callq 0x2150
jmp 0x310a
movq %rax, %rbx
jmp 0x310a
jmp 0x30c4
jmp 0x30c4
movq %rax, %rbx
jmp 0x30eb
movq %rax, %rbx
movq 0x5ef5(%rip), %rsi      # 0x8fc8
leaq -0x4f8(%rbp), %rdi
callq 0x21a0
leaq -0x480(%rbp), %rdi
callq 0x20a0
movq 0x5ed6(%rip), %rsi      # 0x8fc8
leaq -0x378(%rbp), %rdi
callq 0x21a0
leaq -0x300(%rbp), %rdi
callq 0x20a0
movq 0x5eb7(%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 0x314a
movq -0x68(%rbp), %rsi
incq %rsi
callq 0x2150
movq -0x38(%rbp), %rax
movq (%rax), %rdi
testq %rdi, %rdi
je 0x315e
movq 0x10(%rax), %rsi
subq %rdi, %rsi
callq 0x2150
movq %rbx, %rdi
callq 0x2230