// File: istellartech[P]OpenTsiolkovsky/src/main.cpp
// Function: main
int main(int argc, const char * argv[]) {
    std::chrono::system_clock::time_point  start, end; // calcuration time measurement
    start = std::chrono::system_clock::now(); // mesurement start time
    
    std::cout << "Hello, OpenTsiolkovsky! version:" + current_version + "\n";

    string input_file_name;
    string input_file_default = "param_sample.json";
    if (argc == 1) {
        input_file_name = input_file_default;
    } else if (argc == 2) {
        input_file_name = argv[1];
    } else {
        cout << "argument error";
        return 1;
    }

    Rocket rocket(input_file_name);
    rocket.flight_simulation();
    
    end = std::chrono::system_clock::now();  // mesurement end time
    double elapsed = std::chrono::duration_cast<std::chrono::milliseconds>(end-start).count();
    std::cout << "Processing time: " << elapsed << "[ms]\n" << std::endl;
    
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x170, %rsp            # imm = 0x170
movl $0x0, -0x4(%rbp)
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
leaq -0x18(%rbp), %rdi
callq 0xacb0
leaq -0x20(%rbp), %rdi
callq 0xacb0
callq 0x60a0
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x18(%rbp)
leaq 0x47fca(%rip), %rsi     # 0x5284d
leaq 0x6ec46(%rip), %rdx     # 0x794d0
leaq -0x68(%rbp), %rdi
movq %rdi, -0x138(%rbp)
callq 0xad30
movq -0x138(%rbp), %rsi
leaq 0x49385(%rip), %rdx     # 0x53c2d
leaq -0x48(%rbp), %rdi
callq 0xace0
jmp 0xa8b3
movq 0x6e6f6(%rip), %rdi     # 0x78fb0
leaq -0x48(%rbp), %rsi
callq 0x6410
jmp 0xa8c5
leaq -0x48(%rbp), %rdi
callq 0x68a8
leaq -0x68(%rbp), %rdi
callq 0x68a8
leaq -0x98(%rbp), %rdi
callq 0x6610
leaq -0xb9(%rbp), %rdi
movq %rdi, -0x140(%rbp)
callq 0x67b0
movq -0x140(%rbp), %rdx
leaq 0x47f6a(%rip), %rsi     # 0x5286e
leaq -0xb8(%rbp), %rdi
callq 0xac00
jmp 0xa912
leaq -0xb9(%rbp), %rdi
callq 0x64e0
cmpl $0x1, -0x8(%rbp)
jne 0xa99d
leaq -0x98(%rbp), %rdi
leaq -0xb8(%rbp), %rsi
callq 0x6080
jmp 0xa939
jmp 0xa9e8
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x70(%rbp)
movl %eax, -0x74(%rbp)
jmp 0xa961
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x70(%rbp)
movl %eax, -0x74(%rbp)
leaq -0x48(%rbp), %rdi
callq 0x68a8
leaq -0x68(%rbp), %rdi
callq 0x68a8
jmp 0xabac
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x70(%rbp)
movl %eax, -0x74(%rbp)
leaq -0xb9(%rbp), %rdi
callq 0x64e0
jmp 0xaba0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x70(%rbp)
movl %eax, -0x74(%rbp)
jmp 0xab94
cmpl $0x2, -0x8(%rbp)
jne 0xa9bb
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rsi
leaq -0x98(%rbp), %rdi
callq 0x6600
jmp 0xa9b9
jmp 0xa9e6
movq 0x6e5ee(%rip), %rdi     # 0x78fb0
leaq 0x47eb7(%rip), %rsi     # 0x52880
callq 0x6460
jmp 0xa9d0
movl $0x1, -0x4(%rbp)
movl $0x1, -0xc0(%rbp)
jmp 0xab70
jmp 0xa9e8
leaq -0x110(%rbp), %rdi
leaq -0x98(%rbp), %rsi
callq 0x61f0
jmp 0xa9fd
leaq -0xf0(%rbp), %rdi
leaq -0x110(%rbp), %rsi
callq 0xcef0
jmp 0xaa12
leaq -0x110(%rbp), %rdi
callq 0x68a8
leaq -0xf0(%rbp), %rdi
callq 0x160d0
jmp 0xaa2c
callq 0x60a0
movq %rax, -0x118(%rbp)
movq -0x118(%rbp), %rax
movq %rax, -0x20(%rbp)
leaq -0x20(%rbp), %rdi
leaq -0x18(%rbp), %rsi
callq 0xae70
movq %rax, -0x148(%rbp)
jmp 0xaa59
movq -0x148(%rbp), %rax
movq %rax, -0x130(%rbp)
leaq -0x130(%rbp), %rdi
callq 0xae40
movq %rax, -0x150(%rbp)
jmp 0xaa7c
movq -0x150(%rbp), %rax
movq %rax, -0x128(%rbp)
leaq -0x128(%rbp), %rdi
callq 0xaec0
movq %rax, -0x158(%rbp)
jmp 0xaa9f
movq -0x158(%rbp), %rax
cvtsi2sd %rax, %xmm0
movsd %xmm0, -0x120(%rbp)
movq 0x6e4f6(%rip), %rdi     # 0x78fb0
leaq 0x47dce(%rip), %rsi     # 0x5288f
callq 0x6460
movq %rax, -0x160(%rbp)
jmp 0xaacf
movq -0x160(%rbp), %rdi
movsd -0x120(%rbp), %xmm0
callq 0x6830
movq %rax, -0x168(%rbp)
jmp 0xaaec
movq -0x168(%rbp), %rdi
leaq 0x47da7(%rip), %rsi     # 0x528a1
callq 0x6460
movq %rax, -0x170(%rbp)
jmp 0xab08
movq -0x170(%rbp), %rdi
movq 0x6e442(%rip), %rsi     # 0x78f58
callq 0x64c0
jmp 0xab1d
movl $0x0, -0x4(%rbp)
movl $0x1, -0xc0(%rbp)
leaq -0xf0(%rbp), %rdi
callq 0xaee0
jmp 0xab70
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x70(%rbp)
movl %eax, -0x74(%rbp)
leaq -0x110(%rbp), %rdi
callq 0x68a8
jmp 0xab94
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x70(%rbp)
movl %eax, -0x74(%rbp)
leaq -0xf0(%rbp), %rdi
callq 0xaee0
jmp 0xab94
leaq -0xb8(%rbp), %rdi
callq 0x68a8
leaq -0x98(%rbp), %rdi
callq 0x68a8
movl -0x4(%rbp), %eax
addq $0x170, %rsp            # imm = 0x170
popq %rbp
retq
leaq -0xb8(%rbp), %rdi
callq 0x68a8
leaq -0x98(%rbp), %rdi
callq 0x68a8
movq -0x70(%rbp), %rdi
callq 0x67a0
nopw %cs:(%rax,%rax)
nop