// File: /workspace/github_cpp_makefile_star2_O2/eva23511[P]OS-Virtual-Memory-Management/main.cpp
// Function: main
int main(int argc, char * argv[]) {
    string input_filename;
    string rand_filename;
    int num_frames = 0;
    string algo;
    
    ParseCommand(argc, argv, num_frames, algo, input_filename, rand_filename);
    
    // get randoms
    vector<int> randoms = ParseRandFile(rand_filename);
    
    // initialzie frames and pager
    initFrames(num_frames);
    Pager * pager = GetPager(algo, randoms, num_frames);
    
    
    // parse input_file and Initialzie process
    ifstream input_file (input_filename);
    vector<Process *> processes = GetProcess(input_file);
    
    Simulation(input_file, pager, processes);
    
    if (P_option) {
        PrintPagetable(processes);
    }
    
    if (F_option) {
        PrintFrameTable();
    }
    
    if (S_option) {
        PrintSummary(processes);
    }
    
    input_file.close();
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
subq $0x348, %rsp            # imm = 0x348
leaq -0xf0(%rbp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
xorl %ecx, %ecx
leaq -0xd0(%rbp), %r8
movq %r8, -0x10(%r8)
andq $0x0, -0x8(%r8)
leaq -0xc(%rbp), %rdx
andl $0x0, (%rdx)
movb %cl, (%rax)
movb %cl, (%r8)
leaq -0xb0(%rbp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movb %cl, (%rax)
leaq -0xc0(%rbp), %rcx
leaq -0x100(%rbp), %r8
leaq -0xe0(%rbp), %r9
callq 0x2716
leaq -0x140(%rbp), %rdi
leaq -0xe0(%rbp), %rsi
callq 0x21c0
leaq -0xa0(%rbp), %rdi
leaq -0x140(%rbp), %rsi
callq 0x2891
leaq -0x140(%rbp), %rdi
callq 0x20f0
movl -0xc(%rbp), %ebx
movl %ebx, %edi
callq 0x2975
leaq -0x120(%rbp), %rdi
leaq -0xc0(%rbp), %rsi
callq 0x21c0
leaq -0x88(%rbp), %rdi
leaq -0xa0(%rbp), %rsi
callq 0x3540
leaq -0x120(%rbp), %rdi
leaq -0x88(%rbp), %rsi
movl %ebx, %edx
callq 0x2a07
movq %rax, %rbx
leaq -0x88(%rbp), %rdi
callq 0x377c
leaq -0x120(%rbp), %rdi
callq 0x20f0
leaq -0x348(%rbp), %rdi
leaq -0x100(%rbp), %rsi
pushq $0x8
popq %rdx
callq 0x2220
leaq -0x28(%rbp), %rdi
leaq -0x348(%rbp), %rsi
callq 0x2b9e
leaq -0x70(%rbp), %rdi
leaq -0x28(%rbp), %rsi
callq 0x3598
leaq -0x348(%rbp), %rdi
leaq -0x70(%rbp), %rdx
movq %rbx, %rsi
callq 0x2d96
leaq -0x70(%rbp), %rdi
callq 0x382a
cmpl $0x0, 0x5bce(%rip)      # 0x8178
je 0x25cb
leaq -0x58(%rbp), %rdi
leaq -0x28(%rbp), %rsi
callq 0x3598
leaq -0x58(%rbp), %rdi
callq 0x30cd
leaq -0x58(%rbp), %rdi
callq 0x382a
cmpl $0x0, 0x5baa(%rip)      # 0x817c
je 0x25d9
callq 0x30f3
cmpl $0x0, 0x5ba0(%rip)      # 0x8180
je 0x2601
leaq -0x40(%rbp), %rdi
leaq -0x28(%rbp), %rsi
callq 0x3598
leaq -0x40(%rbp), %rdi
callq 0x3167
leaq -0x40(%rbp), %rdi
callq 0x382a
leaq -0x348(%rbp), %rdi
callq 0x2060
leaq -0x28(%rbp), %rdi
callq 0x382a
leaq -0x348(%rbp), %rdi
callq 0x2090
leaq -0xa0(%rbp), %rdi
callq 0x377c
leaq -0xc0(%rbp), %rdi
callq 0x20f0
leaq -0xe0(%rbp), %rdi
callq 0x20f0
leaq -0x100(%rbp), %rdi
callq 0x20f0
xorl %eax, %eax
addq $0x348, %rsp            # imm = 0x348
popq %rbx
popq %rbp
retq
movq %rax, %rbx
leaq -0x40(%rbp), %rdi
jmp 0x2677
movq %rax, %rbx
leaq -0x58(%rbp), %rdi
jmp 0x2677
movq %rax, %rbx
leaq -0x70(%rbp), %rdi
callq 0x382a
jmp 0x26c9
movq %rax, %rbx
jmp 0x26d2
jmp 0x26a9
movq %rax, %rbx
leaq -0x88(%rbp), %rdi
callq 0x377c
jmp 0x2699
movq %rax, %rbx
leaq -0x120(%rbp), %rdi
callq 0x20f0
jmp 0x26de
jmp 0x26a9
movq %rax, %rbx
jmp 0x26de
movq %rax, %rbx
leaq -0x140(%rbp), %rdi
callq 0x20f0
jmp 0x26ea
jmp 0x26c1
movq %rax, %rbx
jmp 0x26ea
movq %rax, %rbx
leaq -0x28(%rbp), %rdi
callq 0x382a
leaq -0x348(%rbp), %rdi
callq 0x2090
leaq -0xa0(%rbp), %rdi
callq 0x377c
leaq -0xc0(%rbp), %rdi
callq 0x20f0
leaq -0xe0(%rbp), %rdi
callq 0x20f0
leaq -0x100(%rbp), %rdi
callq 0x20f0
movq %rbx, %rdi
callq 0x2270