// File: /workspace/github_c_makefile_star2_O0/mohuangrui[P]ArtraCFD/solve.c
// Function: EvolveSolution
static void EvolveSolution(Time *time, Space *space, const Model *model)
{
    Real dt = time->end - time->now;
    const Real zero = 0.0;
    if (zero >= dt) {
        ShowWarning("  time.now >= time.end");
        return;
    }
    Timer tm; /* timer for computing operations */
    /* data writing interval and recorder */
    const Real dtData[NPROBE] = {time->end / (Real)(time->dataW[PROPT]),
        time->end / (Real)(time->dataW[PROLN]), time->end / (Real)(time->dataW[PROCV]),
        time->end / (Real)(time->dataW[PROFC]), time->end / (Real)(time->dataW[PROSD])};
    Real rcData[NPROBE] = {zero};
    /* time instants interval and recorder */
    const Real tmInt = (INT_MAX == time->dataW[PROSD]) ? time->end : dtData[PROSD]; /* a specific instant */
    Real rcInt = zero; /* time instant recorder */
    while ((time->now < time->end) && (time->stepC < time->stepN)) {
        ++(time->stepC);
        dt = ComputeTimeStep(time, space, model);
        if (rcInt + dt > tmInt) { /* rectify dt */
            dt = tmInt - rcInt;
            rcInt = zero;
        } else {
            rcInt = rcInt + dt;
        }
        time->now = time->now + dt;
        if (time->now > time->end) { /* rectify dt */
            dt = time->end - (time->now - dt);
            time->now = time->end;
        }
        ShowInfo("\nstep=%d; time=%.6g; remain=%.6g; dt=%.6g;\n",
                time->stepC, time->now, time->end - time->now, dt);
        TickTime(&tm);
        if (0 != model->psi) {
            EvolveSolidDynamics(time->now, 0.5 * dt, space, model);
        }
        EvolveFluidDynamics(dt, space, model);
        if (0 != model->psi) {
            EvolveSolidDynamics(time->now, 0.5 * dt, space, model);
        }
        ShowInfo("  elapsed: %.6gs\n", TockTime(&tm));
        /* export data if accumulated time increases to anticipated interval */
        for (int n = 0; n < NPROBE; ++n) {
            rcData[n] = rcData[n] + dt;
            if ((rcData[n] >= dtData[n]) || (time->now == time->end) || (time->stepC == time->stepN)) {
                if (PROFC == n) {
                    IntegrateSurfaceForce(space, model);
                }
                if (PROSD == n) {
                    ShowInfo("  writing data...\n");
                    ++(time->dataC); /* export count increase */
                }
                WriteData(n, time, space, model);
                rcData[n] = zero; /* reset probe accumulated time */
            }
        }
    }
    return;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xc0, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rax
movsd 0x40(%rax), %xmm0
movq -0x8(%rbp), %rax
subsd 0x48(%rax), %xmm0
movsd %xmm0, -0x20(%rbp)
xorps %xmm0, %xmm0
movsd %xmm0, -0x28(%rbp)
xorps %xmm0, %xmm0
ucomisd -0x20(%rbp), %xmm0
jb 0x22213
leaq 0x8b94(%rip), %rdi      # 0x2ad9b
movb $0x0, %al
callq 0xbb20
jmp 0x225d9
movq -0x8(%rbp), %rax
movsd 0x40(%rax), %xmm0
movq -0x8(%rbp), %rax
cvtsi2sdl 0x20(%rax), %xmm1
divsd %xmm1, %xmm0
movsd %xmm0, -0x60(%rbp)
movq -0x8(%rbp), %rax
movsd 0x40(%rax), %xmm0
movq -0x8(%rbp), %rax
cvtsi2sdl 0x24(%rax), %xmm1
divsd %xmm1, %xmm0
movsd %xmm0, -0x58(%rbp)
movq -0x8(%rbp), %rax
movsd 0x40(%rax), %xmm0
movq -0x8(%rbp), %rax
cvtsi2sdl 0x28(%rax), %xmm1
divsd %xmm1, %xmm0
movsd %xmm0, -0x50(%rbp)
movq -0x8(%rbp), %rax
movsd 0x40(%rax), %xmm0
movq -0x8(%rbp), %rax
cvtsi2sdl 0x2c(%rax), %xmm1
divsd %xmm1, %xmm0
movsd %xmm0, -0x48(%rbp)
movq -0x8(%rbp), %rax
movsd 0x40(%rax), %xmm0
movq -0x8(%rbp), %rax
cvtsi2sdl 0x30(%rax), %xmm1
divsd %xmm1, %xmm0
movsd %xmm0, -0x40(%rbp)
leaq -0x90(%rbp), %rdi
xorl %esi, %esi
movl $0x28, %edx
callq 0x20d0
movq -0x8(%rbp), %rcx
movl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
cmpl 0x30(%rcx), %eax
jne 0x222ce
movq -0x8(%rbp), %rax
movsd 0x40(%rax), %xmm0
movsd %xmm0, -0xb0(%rbp)
jmp 0x222db
movsd -0x40(%rbp), %xmm0
movsd %xmm0, -0xb0(%rbp)
movsd -0xb0(%rbp), %xmm0
movsd %xmm0, -0x98(%rbp)
xorps %xmm0, %xmm0
movsd %xmm0, -0xa0(%rbp)
movq -0x8(%rbp), %rax
movsd 0x48(%rax), %xmm1
movq -0x8(%rbp), %rax
movsd 0x40(%rax), %xmm0
xorl %eax, %eax
ucomisd %xmm1, %xmm0
movb %al, -0xb1(%rbp)
jbe 0x2232d
movq -0x8(%rbp), %rax
movl 0x8(%rax), %eax
movq -0x8(%rbp), %rcx
cmpl 0x4(%rcx), %eax
setl %al
movb %al, -0xb1(%rbp)
movb -0xb1(%rbp), %al
testb $0x1, %al
jne 0x2233c
jmp 0x225d7
movq -0x8(%rbp), %rax
movl 0x8(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x8(%rax)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0x225f0
movsd %xmm0, -0x20(%rbp)
movsd -0xa0(%rbp), %xmm0
addsd -0x20(%rbp), %xmm0
ucomisd -0x98(%rbp), %xmm0
jbe 0x22398
movsd -0x98(%rbp), %xmm0
subsd -0xa0(%rbp), %xmm0
movsd %xmm0, -0x20(%rbp)
xorps %xmm0, %xmm0
movsd %xmm0, -0xa0(%rbp)
jmp 0x223ad
movsd -0xa0(%rbp), %xmm0
addsd -0x20(%rbp), %xmm0
movsd %xmm0, -0xa0(%rbp)
movq -0x8(%rbp), %rax
movsd 0x48(%rax), %xmm0
addsd -0x20(%rbp), %xmm0
movq -0x8(%rbp), %rax
movsd %xmm0, 0x48(%rax)
movq -0x8(%rbp), %rax
movsd 0x48(%rax), %xmm0
movq -0x8(%rbp), %rax
ucomisd 0x40(%rax), %xmm0
jbe 0x2240a
movq -0x8(%rbp), %rax
movsd 0x40(%rax), %xmm0
movq -0x8(%rbp), %rax
movsd 0x48(%rax), %xmm1
subsd -0x20(%rbp), %xmm1
subsd %xmm1, %xmm0
movsd %xmm0, -0x20(%rbp)
movq -0x8(%rbp), %rax
movsd 0x40(%rax), %xmm0
movq -0x8(%rbp), %rax
movsd %xmm0, 0x48(%rax)
movq -0x8(%rbp), %rax
movl 0x8(%rax), %esi
movq -0x8(%rbp), %rax
movsd 0x48(%rax), %xmm0
movq -0x8(%rbp), %rax
movsd 0x40(%rax), %xmm1
movq -0x8(%rbp), %rax
subsd 0x48(%rax), %xmm1
movsd -0x20(%rbp), %xmm2
leaq 0x897a(%rip), %rdi      # 0x2adb2
movb $0x3, %al
callq 0xbcf0
leaq -0x38(%rbp), %rdi
callq 0x233b0
movq -0x18(%rbp), %rcx
xorl %eax, %eax
cmpl 0x1c(%rcx), %eax
je 0x22476
movq -0x8(%rbp), %rax
movsd 0x48(%rax), %xmm0
movsd 0x52a4(%rip), %xmm1     # 0x27708
mulsd -0x20(%rbp), %xmm1
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x1fd50
movsd -0x20(%rbp), %xmm0
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x17cc0
movq -0x18(%rbp), %rcx
xorl %eax, %eax
cmpl 0x1c(%rcx), %eax
je 0x224b6
movq -0x8(%rbp), %rax
movsd 0x48(%rax), %xmm0
movsd 0x5264(%rip), %xmm1     # 0x27708
mulsd -0x20(%rbp), %xmm1
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x1fd50
leaq -0x38(%rbp), %rdi
callq 0x233d0
leaq 0x8918(%rip), %rdi      # 0x2adde
movb $0x1, %al
callq 0xbcf0
movl $0x0, -0xa4(%rbp)
cmpl $0x5, -0xa4(%rbp)
jge 0x225d2
movslq -0xa4(%rbp), %rax
movsd -0x90(%rbp,%rax,8), %xmm0
addsd -0x20(%rbp), %xmm0
movslq -0xa4(%rbp), %rax
movsd %xmm0, -0x90(%rbp,%rax,8)
movslq -0xa4(%rbp), %rax
movsd -0x90(%rbp,%rax,8), %xmm0
movslq -0xa4(%rbp), %rax
ucomisd -0x60(%rbp,%rax,8), %xmm0
jae 0x22550
movq -0x8(%rbp), %rax
movsd 0x48(%rax), %xmm0
movq -0x8(%rbp), %rax
ucomisd 0x40(%rax), %xmm0
jne 0x22540
jp 0x22540
jmp 0x22550
movq -0x8(%rbp), %rax
movl 0x8(%rax), %eax
movq -0x8(%rbp), %rcx
cmpl 0x4(%rcx), %eax
jne 0x225bc
movl $0x3, %eax
cmpl -0xa4(%rbp), %eax
jne 0x2256a
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x1fde0
movl $0x4, %eax
cmpl -0xa4(%rbp), %eax
jne 0x22592
leaq 0x8872(%rip), %rdi      # 0x2adf0
movb $0x0, %al
callq 0xbcf0
movq -0x8(%rbp), %rax
movl 0x38(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x38(%rax)
movl -0xa4(%rbp), %edi
movq -0x8(%rbp), %rsi
movq -0x10(%rbp), %rdx
movq -0x18(%rbp), %rcx
callq 0x120f0
movslq -0xa4(%rbp), %rax
xorps %xmm0, %xmm0
movsd %xmm0, -0x90(%rbp,%rax,8)
jmp 0x225be
movl -0xa4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xa4(%rbp)
jmp 0x224d7
jmp 0x222f6
jmp 0x225d9
addq $0xc0, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)