// File: Manca[P]algorithms2/./assignment1.hpp
// Function: assignment1::scheduling_problem::run_algorithm(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
void run_algorithm(const std::string& inputFile)
        {
            std::vector<job> jobs;
            std::ifstream file(inputFile, std::ios::in);

            if (file.is_open())
            {
                int n;
                int job_weight, job_length;

                file >> n;
                while (file >> job_weight >> job_length)
                {
                    std::tuple<int, int> job = std::make_tuple(job_weight, job_length);

                    jobs.push_back(job);
                }
                file.close();

                // Schedule by difference total weighted sum
                long long schedule_by_diff_sum = schedule_by_difference(jobs);
                std::cout << "Schedule by difference total weighted sum: " << schedule_by_diff_sum << std::endl;

                assert(schedule_by_diff_sum == 69119377652);

                // Schedule by ratio total weighted sum
                long long schedule_by_ratio_sum = schedule_by_ratio(jobs);
                std::cout << "Schedule by ratio total weighted sum: " << schedule_by_ratio_sum << std::endl;

                assert(schedule_by_ratio_sum == 67311454237);
            }
        }

// Assembly:
subq $0x2a8, %rsp            # imm = 0x2A8
movq %rdi, 0x2a0(%rsp)
leaq 0x288(%rsp), %rdi
callq 0x100c0
movq 0x2a0(%rsp), %rsi
leaq 0x80(%rsp), %rdi
movl $0x8, %edx
callq 0x33e0
jmp 0x3ca8
leaq 0x80(%rsp), %rdi
callq 0x33d0
movb %al, 0x4f(%rsp)
jmp 0x3cbb
movb 0x4f(%rsp), %al
testb $0x1, %al
jne 0x3cc8
jmp 0x3ec5
leaq 0x80(%rsp), %rdi
leaq 0x70(%rsp), %rsi
callq 0x31e0
jmp 0x3cdc
jmp 0x3cde
leaq 0x80(%rsp), %rdi
leaq 0x6c(%rsp), %rsi
callq 0x31e0
movq %rax, 0x40(%rsp)
jmp 0x3cf7
movq 0x40(%rsp), %rdi
leaq 0x68(%rsp), %rsi
callq 0x31e0
movq %rax, 0x38(%rsp)
jmp 0x3d0d
movq 0x38(%rsp), %rdi
movq (%rdi), %rax
movq -0x18(%rax), %rax
addq %rax, %rdi
callq 0x3310
movb %al, 0x37(%rsp)
jmp 0x3d27
movb 0x37(%rsp), %al
testb $0x1, %al
jne 0x3d31
jmp 0x3d90
leaq 0x60(%rsp), %rdi
leaq 0x6c(%rsp), %rsi
leaq 0x68(%rsp), %rdx
callq 0x100d0
jmp 0x3d47
leaq 0x288(%rsp), %rdi
leaq 0x60(%rsp), %rsi
callq 0x10110
jmp 0x3d5b
jmp 0x3cde
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x78(%rsp)
movl %eax, 0x74(%rsp)
jmp 0x3ee7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x78(%rsp)
movl %eax, 0x74(%rsp)
leaq 0x80(%rsp), %rdi
callq 0x30f0
jmp 0x3ee7
leaq 0x80(%rsp), %rdi
callq 0x30a0
jmp 0x3d9f
leaq 0x288(%rsp), %rdi
callq 0x3930
movq %rax, 0x28(%rsp)
jmp 0x3db3
movq 0x28(%rsp), %rax
movq %rax, 0x58(%rsp)
movq 0x40214(%rip), %rdi     # 0x43fd8
leaq 0x2c2c6(%rip), %rsi     # 0x30091
callq 0x32c0
movq %rax, 0x20(%rsp)
jmp 0x3dd7
movq 0x20(%rsp), %rdi
movq 0x58(%rsp), %rsi
callq 0x3180
movq %rax, 0x18(%rsp)
jmp 0x3ded
movq 0x18(%rsp), %rdi
movq 0x401cf(%rip), %rsi     # 0x43fc8
callq 0x32f0
jmp 0x3e00
movabsq $0x1017d600f4, %rax     # imm = 0x1017D600F4
cmpq %rax, 0x58(%rsp)
jne 0x3e13
jmp 0x3e32
leaq 0x2c2a3(%rip), %rdi     # 0x300bd
leaq 0x2c2c0(%rip), %rsi     # 0x300e1
movl $0xb3, %edx
leaq 0x2c2c6(%rip), %rcx     # 0x300f3
callq 0x3200
leaq 0x288(%rsp), %rdi
callq 0x3ad0
movq %rax, 0x10(%rsp)
jmp 0x3e46
movq 0x10(%rsp), %rax
movq %rax, 0x50(%rsp)
movq 0x40181(%rip), %rdi     # 0x43fd8
leaq 0x2c2de(%rip), %rsi     # 0x3013c
callq 0x32c0
movq %rax, 0x8(%rsp)
jmp 0x3e6a
movq 0x8(%rsp), %rdi
movq 0x50(%rsp), %rsi
callq 0x3180
movq %rax, (%rsp)
jmp 0x3e7f
movq (%rsp), %rdi
movq 0x4013e(%rip), %rsi     # 0x43fc8
callq 0x32f0
jmp 0x3e91
movabsq $0xfac13481d, %rax      # imm = 0xFAC13481D
cmpq %rax, 0x50(%rsp)
jne 0x3ea4
jmp 0x3ec3
leaq 0x2c2b8(%rip), %rdi     # 0x30163
leaq 0x2c22f(%rip), %rsi     # 0x300e1
movl $0xb9, %edx
leaq 0x2c235(%rip), %rcx     # 0x300f3
callq 0x3200
jmp 0x3ec5
leaq 0x80(%rsp), %rdi
callq 0x30f0
leaq 0x288(%rsp), %rdi
callq 0x10180
addq $0x2a8, %rsp            # imm = 0x2A8
retq
leaq 0x288(%rsp), %rdi
callq 0x10180
movq 0x78(%rsp), %rdi
callq 0x3460
nop