// File: istellartech[P]OpenTsiolkovsky/src/air.cpp
// Function: test_air()
void test_air(){
    Air air;
    std::ofstream ofs( "./output/air.csv");
    if (!ofs) {
        std::cerr << "ファイルオープンに失敗" << std::endl;
        std::exit(1);
    }
    ofs << "altitude(m)" << "\t" << "temperature (K)" << "\t" <<
           "airspeed (m/s)" << "\t" << "density (kg/m3)" << endl;

    for (int altitude = 0; altitude < 100000; altitude = altitude + 100) {
        air = air.altitude((altitude));
        ofs << altitude << "\t" << air.temperature << "\t" <<
        air.airspeed << "\t" << air.density << endl;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x4e0, %rsp            # imm = 0x4E0
leaq -0x120(%rbp), %rdi
callq 0x8060
leaq 0x4a582(%rip), %rsi     # 0x52300
leaq -0x320(%rbp), %rdi
movl $0x10, %edx
callq 0x64f0
movq -0x320(%rbp), %rax
movq -0x18(%rax), %rax
leaq -0x320(%rbp,%rax), %rdi
callq 0x6220
movb %al, -0x451(%rbp)
jmp 0x7daf
movb -0x451(%rbp), %al
testb $0x1, %al
jne 0x7dbb
jmp 0x7e19
movq 0x71226(%rip), %rdi     # 0x78fe8
leaq 0x4a548(%rip), %rsi     # 0x52311
callq 0x6460
movq %rax, -0x460(%rbp)
jmp 0x7dd7
movq -0x460(%rbp), %rdi
movq 0x71173(%rip), %rsi     # 0x78f58
callq 0x64c0
jmp 0x7dec
movl $0x1, %edi
callq 0x6580
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x328(%rbp)
movl %eax, -0x32c(%rbp)
leaq -0x320(%rbp), %rdi
callq 0x6650
jmp 0x804a
leaq 0x4a513(%rip), %rsi     # 0x52333
leaq -0x320(%rbp), %rdi
callq 0x6460
movq %rax, -0x468(%rbp)
jmp 0x7e35
movq -0x468(%rbp), %rdi
leaq 0x4bd2d(%rip), %rsi     # 0x53b70
callq 0x6460
movq %rax, -0x470(%rbp)
jmp 0x7e51
movq -0x470(%rbp), %rdi
leaq 0x4a4e0(%rip), %rsi     # 0x5233f
callq 0x6460
movq %rax, -0x478(%rbp)
jmp 0x7e6d
movq -0x478(%rbp), %rdi
leaq 0x4bcf5(%rip), %rsi     # 0x53b70
callq 0x6460
movq %rax, -0x480(%rbp)
jmp 0x7e89
movq -0x480(%rbp), %rdi
leaq 0x4a4b8(%rip), %rsi     # 0x5234f
callq 0x6460
movq %rax, -0x488(%rbp)
jmp 0x7ea5
movq -0x488(%rbp), %rdi
leaq 0x4bcbd(%rip), %rsi     # 0x53b70
callq 0x6460
movq %rax, -0x490(%rbp)
jmp 0x7ec1
movq -0x490(%rbp), %rdi
leaq 0x4a48f(%rip), %rsi     # 0x5235e
callq 0x6460
movq %rax, -0x498(%rbp)
jmp 0x7edd
movq -0x498(%rbp), %rdi
movq 0x7106d(%rip), %rsi     # 0x78f58
callq 0x64c0
jmp 0x7ef2
movl $0x0, -0x330(%rbp)
cmpl $0x186a0, -0x330(%rbp)  # imm = 0x186A0
jge 0x8035
cvtsi2sdl -0x330(%rbp), %xmm0
leaq -0x450(%rbp), %rdi
movq %rdi, -0x4a8(%rbp)
leaq -0x120(%rbp), %rsi
movq %rsi, -0x4b0(%rbp)
callq 0x6db0
movq -0x4b0(%rbp), %rdi
movq -0x4a8(%rbp), %rsi
movl $0x120, %edx            # imm = 0x120
callq 0x63b0
movl -0x330(%rbp), %esi
leaq -0x320(%rbp), %rdi
callq 0x6780
movq %rax, -0x4a0(%rbp)
jmp 0x7f68
movq -0x4a0(%rbp), %rdi
leaq 0x4bbfa(%rip), %rsi     # 0x53b70
callq 0x6460
movq %rax, -0x4b8(%rbp)
jmp 0x7f84
movq -0x4b8(%rbp), %rdi
movsd -0x20(%rbp), %xmm0
callq 0x6830
movq %rax, -0x4c0(%rbp)
jmp 0x7f9e
movq -0x4c0(%rbp), %rdi
leaq 0x4bbc4(%rip), %rsi     # 0x53b70
callq 0x6460
movq %rax, -0x4c8(%rbp)
jmp 0x7fba
movq -0x4c8(%rbp), %rdi
movsd -0x18(%rbp), %xmm0
callq 0x6830
movq %rax, -0x4d0(%rbp)
jmp 0x7fd4
movq -0x4d0(%rbp), %rdi
leaq 0x4bb8e(%rip), %rsi     # 0x53b70
callq 0x6460
movq %rax, -0x4d8(%rbp)
jmp 0x7ff0
movq -0x4d8(%rbp), %rdi
movsd -0x8(%rbp), %xmm0
callq 0x6830
movq %rax, -0x4e0(%rbp)
jmp 0x800a
movq -0x4e0(%rbp), %rdi
movq 0x70f40(%rip), %rsi     # 0x78f58
callq 0x64c0
jmp 0x801f
jmp 0x8021
movl -0x330(%rbp), %eax
addl $0x64, %eax
movl %eax, -0x330(%rbp)
jmp 0x7efc
leaq -0x320(%rbp), %rdi
callq 0x6650
addq $0x4e0, %rsp            # imm = 0x4E0
popq %rbp
retq
movq -0x328(%rbp), %rdi
callq 0x67a0
nopw %cs:(%rax,%rax)