// File: /workspace/github_cpp_makefile_star2_O2/istellartech[P]OpenTsiolkovsky/src/rocket.cpp
// Function: Rocket::Rocket(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
Rocket::Rocket(string input_filename){
    std::ifstream fin(input_filename);
    if( !fin ){
        std::ifstream fin("./" + input_filename);
        cout << "hoge" << input_filename << endl;
    }
    if( !fin ){
        cout << "Error:Input data file not found" << endl;
        return;
    }
    picojson::value v;
    fin >> v;
    if (std::cin.fail()) {
        std::cerr << picojson::get_last_error() << std::endl;
        return;
    }
    picojson::object& o              = v.get<picojson::object>();
    
    for (int i=1; i<100; i+=1){
        if (! o["stage" + std::to_string(i)].is<picojson::object>()){
            break;
        }
        picojson::object& o_stage = o["stage" + std::to_string(i)].get<picojson::object>();
        RocketStage temp(o_stage, o);
        temp.num_stage = i;
        rs.push_back(temp);
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1178, %rsp           # imm = 0x1178
movq %rsi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, 0x20(%rdi)
movups %xmm0, 0x10(%rdi)
movq %rdi, 0x10(%rsp)
movups %xmm0, (%rdi)
leaq 0xa8(%rsp), %rdi
pushq $0x8
popq %rdx
callq 0x5580
movq 0xa8(%rsp), %rax
movq -0x18(%rax), %rax
movl 0xc8(%rsp,%rax), %eax
testb $0x5, %al
je 0x7897
leaq 0x1898f(%rip), %rsi     # 0x201b4
leaq 0x28(%rsp), %rdi
movq %rbx, %rdx
callq 0x6cd8
leaq 0x2b0(%rsp), %rdi
leaq 0x28(%rsp), %rsi
pushq $0x8
popq %rdx
callq 0x5580
leaq 0x28(%rsp), %rdi
callq 0x56e8
movq 0x27758(%rip), %rdi     # 0x2efb0
leaq 0x18958(%rip), %rsi     # 0x201b7
callq 0x5370
movq %rax, %rdi
movq %rbx, %rsi
callq 0x5340
movq %rax, %rdi
callq 0x51b0
leaq 0x2b0(%rsp), %rdi
callq 0x5100
movq 0xa8(%rsp), %rax
movq -0x18(%rax), %rax
movl 0xc8(%rsp,%rax), %eax
testb $0x5, %al
je 0x78b8
movq 0x2770e(%rip), %rdi     # 0x2efb0
leaq 0x18913(%rip), %rsi     # 0x201bc
callq 0x5370
movq %rax, %rdi
callq 0x51b0
jmp 0x7907
leaq 0x18(%rsp), %rsi
andl $0x0, (%rsi)
leaq 0xa8(%rsp), %rdi
callq 0xf92a
movq 0x276f4(%rip), %rax     # 0x2efc8
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
je 0x7926
movq 0x276ff(%rip), %rdi     # 0x2efe8
leaq 0x27b00(%rip), %rsi     # 0x2f3f0
callq 0x5340
movq %rax, %rdi
callq 0x51b0
leaq 0x18(%rsp), %rdi
callq 0x6fb4
leaq 0xa8(%rsp), %rdi
callq 0x5100
addq $0x1178, %rsp           # imm = 0x1178
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x18(%rsp), %rdi
callq 0xf9b6
movq %rax, 0x8(%rsp)
pushq $0x1
popq %rbp
leaq 0x28(%rsp), %r15
leaq 0x2b0(%rsp), %r13
leaq 0x78(%rsp), %r12
leaq 0x48(%rsp), %r14
cmpl $0x64, %ebp
je 0x78fd
movq %r15, %rdi
movl %ebp, %esi
callq 0xfa98
movq %r13, %rdi
leaq 0x18874(%rip), %rsi     # 0x201dc
movq %r15, %rdx
callq 0xfa74
movq 0x8(%rsp), %rdi
movq %r13, %rsi
callq 0xfa0e
movl (%rax), %ebx
movq %r13, %rdi
callq 0x56e8
movq %r15, %rdi
callq 0x56e8
cmpl $0x5, %ebx
jne 0x78fd
movq %r15, %rdi
movl %ebp, %esi
callq 0xfa98
movq %r13, %rdi
leaq 0x18830(%rip), %rsi     # 0x201dc
movq %r15, %rdx
callq 0xfa74
movq 0x8(%rsp), %rdi
movq %r13, %rsi
callq 0xfa0e
movq %rax, %rdi
callq 0xf9b6
movq %rax, %rbx
movq %r13, %rdi
callq 0x56e8
movq %r15, %rdi
callq 0x56e8
movq %r12, %rdi
movq %rbx, %rsi
callq 0x12018
movq %r14, %rdi
movq 0x8(%rsp), %rsi
callq 0x12018
movq %r13, %rdi
movq %r12, %rsi
movq %r14, %rdx
callq 0x7afe
movq %r14, %rdi
callq 0x6f3a
movq %r12, %rdi
callq 0x6f3a
movl %ebp, 0x500(%rsp)
movq 0x10(%rsp), %rdi
movq %r13, %rsi
callq 0xfaf2
movq %r13, %rdi
callq 0x6e12
incl %ebp
jmp 0x794f
jmp 0x7aa7
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0x56e8
jmp 0x7ad2
jmp 0x7a55
jmp 0x7aa7
movq %rax, %rbx
jmp 0x7adf
movq %rax, %rbx
jmp 0x7ad2
movq %rax, %rbx
leaq 0x2b0(%rsp), %rdi
callq 0x5100
jmp 0x7ad2
jmp 0x7aa7
movq %rax, %rbx
leaq 0x48(%rsp), %rdi
callq 0x6f3a
jmp 0x7a82
jmp 0x7aa2
movq %rax, %rbx
leaq 0x78(%rsp), %rdi
callq 0x6f3a
jmp 0x7ac8
movq %rax, %rbx
leaq 0x2b0(%rsp), %rdi
callq 0x6e12
jmp 0x7ac8
jmp 0x7aa7
movq %rax, %rbx
jmp 0x7abe
movq %rax, %rbx
jmp 0x7ac8
jmp 0x7aae
movq %rax, %rbx
leaq 0x2b0(%rsp), %rdi
callq 0x56e8
leaq 0x28(%rsp), %rdi
callq 0x56e8
leaq 0x18(%rsp), %rdi
callq 0x6fb4
leaq 0xa8(%rsp), %rdi
callq 0x5100
movq 0x10(%rsp), %r14
leaq 0x18(%r14), %rdi
callq 0x6da0
movq %r14, %rdi
callq 0x6da0
movq %rbx, %rdi
callq 0x5640
nop