// File: /workspace/github_cpp_makefile_star2_O1/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 $0x1168, %rsp           # imm = 0x1168
movq %rsi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, 0x20(%rdi)
movups %xmm0, 0x10(%rdi)
movq %rdi, 0x30(%rsp)
movups %xmm0, (%rdi)
leaq 0x98(%rsp), %rdi
movl $0x8, %edx
callq 0x5580
movq 0x98(%rsp), %rax
movq -0x18(%rax), %rax
testb $0x5, 0xb8(%rsp,%rax)
je 0x7f1f
leaq 0x2019e(%rip), %rsi     # 0x28020
movq %rsp, %rdi
movq %rbx, %rdx
callq 0x722f
leaq 0x2a0(%rsp), %rdi
movq %rsp, %rsi
movl $0x8, %edx
callq 0x5580
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x7ebd
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x53b0
movq 0x2b0ec(%rip), %rdi     # 0x32fb0
leaq 0x20158(%rip), %rsi     # 0x28023
movl $0x4, %edx
callq 0x5430
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
movq 0x2b0cd(%rip), %rdi     # 0x32fb0
callq 0x5430
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x5370
movsbl %al, %esi
movq %rbx, %rdi
callq 0x5050
movq %rax, %rdi
callq 0x5270
leaq 0x2a0(%rsp), %rdi
callq 0x5100
movq 0x98(%rsp), %rax
movq -0x18(%rax), %rax
testb $0x5, 0xb8(%rsp,%rax)
je 0x7f80
movq 0x2b074(%rip), %rbx     # 0x32fb0
leaq 0x200e5(%rip), %rsi     # 0x28028
movl $0x1f, %edx
movq %rbx, %rdi
callq 0x5430
movq (%rbx), %rax
addq -0x18(%rax), %rbx
movq %rbx, %rdi
movl $0xa, %esi
callq 0x5370
movsbl %al, %esi
movq 0x2b042(%rip), %rdi     # 0x32fb0
callq 0x5050
movq %rax, %rdi
callq 0x5270
jmp 0x82dc
leaq 0x20(%rsp), %rsi
movl $0x0, (%rsi)
leaq 0x98(%rsp), %rdi
callq 0x16ced
movq 0x2b029(%rip), %rax     # 0x32fc8
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
je 0x7ff6
movq 0x2b43c(%rip), %rsi     # 0x333f0
movq 0x2b43d(%rip), %rdx     # 0x333f8
movq 0x2b026(%rip), %rdi     # 0x32fe8
callq 0x5430
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x5370
movsbl %al, %esi
movq %rbx, %rdi
callq 0x5050
movq %rax, %rdi
callq 0x5270
jmp 0x8269
cmpl $0x5, 0x20(%rsp)
jne 0x832d
movq 0x28(%rsp), %r14
movl $0x1, %ebp
movq %rsp, %r15
leaq 0x2a0(%rsp), %r13
cmpl $0xa, %ebp
movl $0x2, %ebx
sbbl $0x0, %ebx
leaq 0x10(%rsp), %rax
movq %rax, (%rsp)
movq %r15, %rdi
movq %rbx, %rsi
movl $0x2d, %edx
callq 0x5440
movq (%rsp), %rdi
movl %ebx, %esi
movl %ebp, %edx
callq 0x1998e
movl $0x5, %r8d
movq %r15, %rdi
xorl %esi, %esi
xorl %edx, %edx
leaq 0x1ffed(%rip), %rcx     # 0x28048
callq 0x5410
leaq 0x2b0(%rsp), %rsi
movq %rsi, 0x2a0(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x8094
movq %rdx, 0x2a0(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x2b0(%rsp)
jmp 0x809a
movups (%rcx), %xmm0
movups %xmm0, (%rsi)
movq 0x8(%rax), %rdx
movq %rdx, 0x2a8(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq %r14, %rdi
movq %r13, %rsi
callq 0x16dfc
movl (%rax), %ebx
movq 0x2a0(%rsp), %rdi
leaq 0x2b0(%rsp), %rax
cmpq %rax, %rdi
je 0x80e7
movq 0x2b0(%rsp), %rsi
incq %rsi
callq 0x53b0
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x8102
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x53b0
cmpl $0x5, %ebx
jne 0x8269
cmpl $0xa, %ebp
movl $0x2, %ebx
sbbl $0x0, %ebx
leaq 0x10(%rsp), %rax
movq %rax, (%rsp)
movq %r15, %rdi
movq %rbx, %rsi
movl $0x2d, %edx
callq 0x5440
movq (%rsp), %rdi
movl %ebx, %esi
movl %ebp, %edx
callq 0x1998e
movl $0x5, %r8d
movq %r15, %rdi
xorl %esi, %esi
xorl %edx, %edx
leaq 0x1fef8(%rip), %rcx     # 0x28048
callq 0x5410
leaq 0x2b0(%rsp), %rsi
movq %rsi, 0x2a0(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x8189
movq %rdx, 0x2a0(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x2b0(%rsp)
jmp 0x818f
movups (%rcx), %xmm0
movups %xmm0, (%rsi)
movq 0x8(%rax), %rdx
movq %rdx, 0x2a8(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq %r14, %rdi
movq %r13, %rsi
callq 0x16dfc
cmpl $0x5, (%rax)
jne 0x82fb
movq 0x8(%rax), %rbx
movq 0x2a0(%rsp), %rdi
leaq 0x2b0(%rsp), %rax
cmpq %rax, %rdi
je 0x81e7
movq 0x2b0(%rsp), %rsi
incq %rsi
callq 0x53b0
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x8202
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x53b0
leaq 0x38(%rsp), %rdi
movq %rbx, %rsi
callq 0x199fc
leaq 0x68(%rsp), %r12
movq %r12, %rdi
movq %r14, %rsi
callq 0x199fc
movq %r13, %rdi
leaq 0x38(%rsp), %rbx
movq %rbx, %rsi
movq %r12, %rdx
callq 0x8490
movq %r12, %rdi
callq 0x7546
movq %rbx, %rdi
callq 0x7546
movl %ebp, 0x4f0(%rsp)
movq 0x30(%rsp), %rdi
movq %r13, %rsi
callq 0x16e78
movq %r13, %rdi
callq 0x7358
incl %ebp
cmpl $0x64, %ebp
jne 0x8016
movl 0x20(%rsp), %eax
cmpl $0x5, %eax
je 0x82bd
cmpl $0x4, %eax
je 0x82a4
cmpl $0x3, %eax
jne 0x82dc
movq 0x28(%rsp), %rbx
testq %rbx, %rbx
je 0x82dc
movq (%rbx), %rdi
leaq 0x10(%rbx), %rax
cmpq %rax, %rdi
je 0x829d
movq (%rax), %rsi
incq %rsi
callq 0x53b0
movl $0x20, %esi
jmp 0x82d4
movq 0x28(%rsp), %rbx
testq %rbx, %rbx
je 0x82dc
movq %rbx, %rdi
callq 0x763e
movl $0x18, %esi
jmp 0x82d4
movq 0x28(%rsp), %rbx
testq %rbx, %rbx
je 0x82dc
movq %rbx, %rdi
callq 0x7546
movl $0x30, %esi
movq %rbx, %rdi
callq 0x53b0
leaq 0x98(%rsp), %rdi
callq 0x5100
addq $0x1168, %rsp           # imm = 0x1168
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x10, %edi
callq 0x51e0
movq %rax, %r14
leaq 0x206ba(%rip), %rsi     # 0x289c9
movq %rax, %rdi
callq 0x5180
movq 0x2acd2(%rip), %rsi     # 0x32ff0
movq 0x2ac7b(%rip), %rdx     # 0x32fa0
movq %r14, %rdi
callq 0x5620
movl $0x10, %edi
callq 0x51e0
movq %rax, %r14
leaq 0x20688(%rip), %rsi     # 0x289c9
movq %rax, %rdi
callq 0x5180
movq 0x2aca0(%rip), %rsi     # 0x32ff0
movq 0x2ac49(%rip), %rdx     # 0x32fa0
movq %r14, %rdi
callq 0x5620
jmp 0x8441
movq %rax, %rbx
movq %r14, %rdi
callq 0x52a0
jmp 0x8444
movq %rax, %rbx
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x844e
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x53b0
jmp 0x844e
jmp 0x8479
movq %rax, %rbx
jmp 0x845b
jmp 0x83fc
movq %rax, %rbx
movq %r14, %rdi
callq 0x52a0
jmp 0x83ff
jmp 0x8441
jmp 0x8441
jmp 0x83fc
jmp 0x8441
movq %rax, %rbx
leaq 0x68(%rsp), %rdi
callq 0x7546
jmp 0x83d9
jmp 0x83f7
movq %rax, %rbx
leaq 0x38(%rsp), %rdi
callq 0x7546
jmp 0x8444
movq %rax, %rbx
leaq 0x2a0(%rsp), %rdi
callq 0x7358
jmp 0x8444
movq %rax, %rbx
jmp 0x8424
movq %rax, %rbx
movq 0x2a0(%rsp), %rdi
leaq 0x2b0(%rsp), %rax
cmpq %rax, %rdi
je 0x8424
movq 0x2b0(%rsp), %rsi
incq %rsi
callq 0x53b0
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x8444
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x53b0
jmp 0x8444
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x16ea8
leaq 0x98(%rsp), %rdi
callq 0x5100
movq 0x30(%rsp), %r14
leaq 0x18(%r14), %rdi
callq 0x7314
movq %r14, %rdi
callq 0x7314
movq %rbx, %rdi
callq 0x5650
movq %rax, %rbx
jmp 0x844e
movq %rax, %rbx
leaq 0x2a0(%rsp), %rdi
callq 0x5100
jmp 0x844e