// File: /workspace/github_cpp_makefile_star2_O1/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x448, %rsp            # imm = 0x448
movabsq $0x40239cf41f212d77, %rax # imm = 0x40239CF41F212D77
movq %rax, 0x8(%rsp)
movabsq $0x3ff6666666666666, %rax # imm = 0x3FF6666666666666
movq %rax, 0x10(%rsp)
movabsq $0x4071f0d97f62b6ae, %rax # imm = 0x4071F0D97F62B6AE
movq %rax, 0x18(%rsp)
movups 0x211d0(%rip), %xmm0    # 0x277c0
movups %xmm0, 0x20(%rsp)
movups 0x211d4(%rip), %xmm0    # 0x277d0
movups %xmm0, 0x30(%rsp)
movups 0x20bf8(%rip), %xmm0    # 0x27200
movups %xmm0, 0x40(%rsp)
movups 0x20bfc(%rip), %xmm0    # 0x27210
movups %xmm0, 0x50(%rsp)
movups 0x20c00(%rip), %xmm0    # 0x27220
movups %xmm0, 0x60(%rsp)
movups 0x20c04(%rip), %xmm0    # 0x27230
movups %xmm0, 0x70(%rsp)
movups 0x20c08(%rip), %xmm0    # 0x27240
movups %xmm0, 0x80(%rsp)
movups 0x20c09(%rip), %xmm0    # 0x27250
movups %xmm0, 0x90(%rsp)
movups 0x20c0a(%rip), %xmm0    # 0x27260
movups %xmm0, 0xa0(%rsp)
movups 0x20c0b(%rip), %xmm0    # 0x27270
movups %xmm0, 0xb0(%rsp)
movups 0x20c3c(%rip), %xmm0    # 0x272b0
movups %xmm0, 0xf0(%rsp)
movups 0x20c1d(%rip), %xmm0    # 0x272a0
movups %xmm0, 0xe0(%rsp)
movups 0x20bfe(%rip), %xmm0    # 0x27290
movups %xmm0, 0xd0(%rsp)
movupd 0x20bde(%rip), %xmm0    # 0x27280
movupd %xmm0, 0xc0(%rsp)
movl $0x0, 0x100(%rsp)
movabsq $0x4072c00000000000, %rax # imm = 0x4072C00000000000
movq %rax, 0x108(%rsp)
movabsq $0x4092c00000000000, %rax # imm = 0x4092C00000000000
movq %rax, 0x110(%rsp)
movabsq $0x40f8bb4000000000, %rax # imm = 0x40F8BB4000000000
movq %rax, 0x118(%rsp)
movabsq $0x3ff3333333333333, %rax # imm = 0x3FF3333333333333
movq %rax, 0x120(%rsp)
leaq 0x20bbb(%rip), %rsi     # 0x272c0
leaq 0x128(%rsp), %rbx
movq %rbx, %rdi
movl $0x10, %edx
callq 0x53e0
movq (%rbx), %rax
movq -0x18(%rax), %rax
testb $0x5, 0x148(%rsp,%rax)
jne 0x694e
leaq 0x20bbd(%rip), %rsi     # 0x272f3
leaq 0x128(%rsp), %rdi
movl $0xb, %edx
callq 0x5430
leaq 0x220fd(%rip), %rsi     # 0x2884c
leaq 0x128(%rsp), %rdi
movl $0x1, %edx
callq 0x5430
leaq 0x20b97(%rip), %rsi     # 0x272ff
leaq 0x128(%rsp), %rdi
movl $0xf, %edx
callq 0x5430
leaq 0x220cb(%rip), %rsi     # 0x2884c
leaq 0x128(%rsp), %rdi
movl $0x1, %edx
callq 0x5430
leaq 0x20b75(%rip), %rsi     # 0x2730f
leaq 0x128(%rsp), %rdi
movl $0xe, %edx
callq 0x5430
leaq 0x22099(%rip), %rsi     # 0x2884c
leaq 0x128(%rsp), %rdi
movl $0x1, %edx
callq 0x5430
leaq 0x20b52(%rip), %rsi     # 0x2731e
leaq 0x128(%rsp), %rbx
movl $0xf, %edx
movq %rbx, %rdi
callq 0x5430
movq 0x128(%rsp), %rax
addq -0x18(%rax), %rbx
movq %rbx, %rdi
movl $0xa, %esi
callq 0x5370
movsbl %al, %esi
leaq 0x128(%rsp), %rdi
callq 0x5050
movq %rax, %rdi
callq 0x5270
movl $0xffffff9c, %ebx       # imm = 0xFFFFFF9C
leaq 0x328(%rsp), %r14
leaq 0x8(%rsp), %r15
leaq 0x128(%rsp), %r12
leaq 0x22019(%rip), %r13     # 0x2884c
addl $0x64, %ebx
xorps %xmm0, %xmm0
cvtsi2sd %ebx, %xmm0
movq %r14, %rdi
movq %r15, %rsi
callq 0x5b4c
movl $0x120, %edx            # imm = 0x120
movq %r15, %rdi
movq %r14, %rsi
callq 0x52f0
movq %r12, %rdi
movl %ebx, %esi
callq 0x5630
movq %rax, %rbp
movl $0x1, %edx
movq %rax, %rdi
movq %r13, %rsi
callq 0x5430
movsd 0x108(%rsp), %xmm0
movq %rbp, %rdi
callq 0x5570
movq %rax, %rbp
movl $0x1, %edx
movq %rax, %rdi
movq %r13, %rsi
callq 0x5430
movsd 0x110(%rsp), %xmm0
movq %rbp, %rdi
callq 0x5570
movq %rax, %rbp
movl $0x1, %edx
movq %rax, %rdi
movq %r13, %rsi
callq 0x5430
movsd 0x120(%rsp), %xmm0
movq %rbp, %rdi
callq 0x5570
movq %rax, %rbp
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbp, %rdi
movl $0xa, %esi
callq 0x5370
movsbl %al, %esi
movq %rbp, %rdi
callq 0x5050
movq %rax, %rdi
callq 0x5270
cmpl $0x1863c, %ebx          # imm = 0x1863C
jb 0x6833
movq 0x2c685(%rip), %rax     # 0x32f90
movq (%rax), %rcx
movq 0x18(%rax), %rax
leaq 0x130(%rsp), %rdi
movq %rcx, -0x8(%rdi)
movq -0x18(%rcx), %rcx
movq %rax, 0x128(%rsp,%rcx)
callq 0x5310
leaq 0x220(%rsp), %rdi
callq 0x5150
addq $0x448, %rsp            # imm = 0x448
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x2c693(%rip), %rdi     # 0x32fe8
leaq 0x20975(%rip), %rsi     # 0x272d1
movl $0x21, %edx
callq 0x5430
movq 0x2c67b(%rip), %rdi     # 0x32fe8
callq 0x51d0
movl $0x1, %edi
callq 0x5470
jmp 0x697e
movq %rax, %rbx
leaq 0x128(%rsp), %rdi
callq 0x5510
movq %rbx, %rdi
callq 0x5650