// File: joraso[P]Glassius/main.cpp
// Function: main
int main(int argc, const char * argv[]) {

    // Check:
    if(argc != 6){
        std::cout << "Error: wrong number of command line inputs!" << std::endl;
        return 1;
    }

    // Current command line arguments:
    int mode = std::stoi(argv[1]);
    double T = std::stod(argv[2]);
    double relax = std::stod(argv[3]);
    int record = std::stoi(argv[4]);
    int JobID = std::stoi(argv[5]);

    // start the clock
    Stopwatch timer;
    timer.StampLaunch();
    
    // seed the random number generator
    chaos::seed(JobID);
    
    // running the protocol
    
    if (mode==0) {Protocol::KobAndersonTest(T, relax, record, &timer);};
    if (mode==1) {Protocol::SzamelTest(T, relax, record, &timer);};
    //Protocol::LennardJonesTest(5.0 ,1000, &timer);
    //Protocol::DiffusionTest(T, relax, &timer);
    //Protocol::KobAndersonReplication(T, relax, &timer);
    
    // timestamping the end
    timer.EndStamp();
    
    return 0;
}

// Assembly:
subq $0x198, %rsp            # imm = 0x198
movl $0x0, 0x194(%rsp)
movl %edi, 0x190(%rsp)
movq %rsi, 0x188(%rsp)
cmpl $0x6, 0x190(%rsp)
je 0x256d
movq 0x9a8e(%rip), %rdi      # 0xbfd0
leaq 0x6abb(%rip), %rsi      # 0x9004
callq 0x2140
movq %rax, %rdi
movq 0x9a60(%rip), %rsi      # 0xbfb8
callq 0x2150
movl $0x1, 0x194(%rsp)
jmp 0x29f3
movq 0x188(%rsp), %rax
movq 0x8(%rax), %rax
movq %rax, 0x70(%rsp)
leaq 0x15f(%rsp), %rdi
movq %rdi, 0x78(%rsp)
callq 0x2220
movq 0x70(%rsp), %rsi
movq 0x78(%rsp), %rdx
leaq 0x160(%rsp), %rdi
callq 0x2190
jmp 0x25a9
xorl %eax, %eax
movl %eax, %esi
leaq 0x160(%rsp), %rdi
movl $0xa, %edx
callq 0x2a10
movl %eax, 0x6c(%rsp)
jmp 0x25c5
leaq 0x160(%rsp), %rdi
callq 0x20d0
leaq 0x15f(%rsp), %rdi
callq 0x2160
movl 0x6c(%rsp), %eax
movl %eax, 0x184(%rsp)
movq 0x188(%rsp), %rax
movq 0x10(%rax), %rax
movq %rax, 0x58(%rsp)
leaq 0x11f(%rsp), %rdi
movq %rdi, 0x60(%rsp)
callq 0x2220
movq 0x58(%rsp), %rsi
movq 0x60(%rsp), %rdx
leaq 0x120(%rsp), %rdi
callq 0x2190
jmp 0x2626
xorl %eax, %eax
movl %eax, %esi
leaq 0x120(%rsp), %rdi
callq 0x2a60
movsd %xmm0, 0x50(%rsp)
jmp 0x263f
leaq 0x120(%rsp), %rdi
callq 0x20d0
leaq 0x11f(%rsp), %rdi
callq 0x2160
movsd 0x50(%rsp), %xmm0
movsd %xmm0, 0x140(%rsp)
movq 0x188(%rsp), %rax
movq 0x18(%rax), %rax
movq %rax, 0x40(%rsp)
leaq 0xef(%rsp), %rdi
movq %rdi, 0x48(%rsp)
callq 0x2220
movq 0x40(%rsp), %rsi
movq 0x48(%rsp), %rdx
leaq 0xf0(%rsp), %rdi
callq 0x2190
jmp 0x26a4
xorl %eax, %eax
movl %eax, %esi
leaq 0xf0(%rsp), %rdi
callq 0x2a60
movsd %xmm0, 0x38(%rsp)
jmp 0x26bd
leaq 0xf0(%rsp), %rdi
callq 0x20d0
leaq 0xef(%rsp), %rdi
callq 0x2160
movsd 0x38(%rsp), %xmm0
movsd %xmm0, 0x110(%rsp)
movq 0x188(%rsp), %rax
movq 0x20(%rax), %rax
movq %rax, 0x28(%rsp)
leaq 0xc7(%rsp), %rdi
movq %rdi, 0x30(%rsp)
callq 0x2220
movq 0x28(%rsp), %rsi
movq 0x30(%rsp), %rdx
leaq 0xc8(%rsp), %rdi
callq 0x2190
jmp 0x2722
xorl %eax, %eax
movl %eax, %esi
leaq 0xc8(%rsp), %rdi
movl $0xa, %edx
callq 0x2a10
movl %eax, 0x24(%rsp)
jmp 0x273e
leaq 0xc8(%rsp), %rdi
callq 0x20d0
leaq 0xc7(%rsp), %rdi
callq 0x2160
movl 0x24(%rsp), %eax
movl %eax, 0xe8(%rsp)
movq 0x188(%rsp), %rax
movq 0x28(%rax), %rax
movq %rax, 0x10(%rsp)
leaq 0x9f(%rsp), %rdi
movq %rdi, 0x18(%rsp)
callq 0x2220
movq 0x10(%rsp), %rsi
movq 0x18(%rsp), %rdx
leaq 0xa0(%rsp), %rdi
callq 0x2190
jmp 0x279f
xorl %eax, %eax
movl %eax, %esi
leaq 0xa0(%rsp), %rdi
movl $0xa, %edx
callq 0x2a10
movl %eax, 0xc(%rsp)
jmp 0x27bb
leaq 0xa0(%rsp), %rdi
callq 0x20d0
leaq 0x9f(%rsp), %rdi
callq 0x2160
movl 0xc(%rsp), %eax
movl %eax, 0xc0(%rsp)
leaq 0x80(%rsp), %rdi
callq 0x3020
leaq 0x80(%rsp), %rdi
callq 0x3080
cvtsi2sdl 0xc0(%rsp), %xmm0
callq 0x2e20
cmpl $0x0, 0x184(%rsp)
jne 0x29ab
movsd 0x140(%rsp), %xmm0
movsd 0x110(%rsp), %xmm1
movl 0xe8(%rsp), %edi
leaq 0x80(%rsp), %rsi
callq 0x65c0
jmp 0x29ab
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x150(%rsp)
movl %eax, 0x14c(%rsp)
jmp 0x2878
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x150(%rsp)
movl %eax, 0x14c(%rsp)
leaq 0x160(%rsp), %rdi
callq 0x20d0
leaq 0x15f(%rsp), %rdi
callq 0x2160
jmp 0x2a02
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x150(%rsp)
movl %eax, 0x14c(%rsp)
jmp 0x28c1
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x150(%rsp)
movl %eax, 0x14c(%rsp)
leaq 0x120(%rsp), %rdi
callq 0x20d0
leaq 0x11f(%rsp), %rdi
callq 0x2160
jmp 0x2a02
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x150(%rsp)
movl %eax, 0x14c(%rsp)
jmp 0x290a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x150(%rsp)
movl %eax, 0x14c(%rsp)
leaq 0xf0(%rsp), %rdi
callq 0x20d0
leaq 0xef(%rsp), %rdi
callq 0x2160
jmp 0x2a02
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x150(%rsp)
movl %eax, 0x14c(%rsp)
jmp 0x2953
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x150(%rsp)
movl %eax, 0x14c(%rsp)
leaq 0xc8(%rsp), %rdi
callq 0x20d0
leaq 0xc7(%rsp), %rdi
callq 0x2160
jmp 0x2a02
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x150(%rsp)
movl %eax, 0x14c(%rsp)
jmp 0x299c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x150(%rsp)
movl %eax, 0x14c(%rsp)
leaq 0xa0(%rsp), %rdi
callq 0x20d0
leaq 0x9f(%rsp), %rdi
callq 0x2160
jmp 0x2a02
cmpl $0x1, 0x184(%rsp)
jne 0x29db
movsd 0x140(%rsp), %xmm0
movsd 0x110(%rsp), %xmm1
movl 0xe8(%rsp), %edi
leaq 0x80(%rsp), %rsi
callq 0x7080
leaq 0x80(%rsp), %rdi
callq 0x3180
movl $0x0, 0x194(%rsp)
movl 0x194(%rsp), %eax
addq $0x198, %rsp            # imm = 0x198
retq
movq 0x150(%rsp), %rdi
callq 0x2210
nop