// File: /workspace/github_c_makefile_star2_O0/mohuangrui[P]ArtraCFD/cfd_parameters.c
// Function: InitializeParameters
static void InitializeParameters(Time *time, Space *space, Model *model)
{
    Partition *const part = &(space->part);
    Geometry *const geo = &(space->geo);
    /* space */
    for (int s = 0; s < DIMS; ++s) {
        part->domain[s][MAX] = part->domain[s][MAX] / model->refL;
        part->domain[s][MIN] = part->domain[s][MIN] / model->refL;
        part->d[s] = (part->domain[s][MAX] - part->domain[s][MIN]) / (Real)(part->m[s]);
        part->dd[s] = 1.0 / part->d[s];
    }
    part->tinyL = 1.0e-6 * MinReal(part->d[X], MinReal(part->d[Y], part->d[Z]));
    part->tinyL = part->tinyL * part->tinyL; /* distance square based comparison */
    /* time */
    time->end = time->end * model->refV / model->refL;
    if (0 >= time->stepN) {
        time->stepN = INT_MAX;
    }
    time->dataC = time->restart;
    for (int n = 0; n < NPROBE; ++n) {
        if (0 >= time->dataN[n]) {
            time->dataN[n] = 0;
        }
        if (0 >= time->dataW[n]) {
            time->dataW[n] = INT_MAX;
        }
    }
    /* geometry */
    if (0 >= geo->sphN) {
        geo->sphN = 0;
    }
    if (0 >= geo->stlN) {
        geo->stlN = 0;
    }
    geo->totN = geo->sphN + geo->stlN;
    /* model */
    if (0 >= model->ibmLayer) {
        model->ibmLayer = INT_MAX;
    }
    model->gamma = 1.4;
    model->gasR = 287.058;
    for (int s = 0; s < DIMS; ++s) {
        model->g[s] = model->g[s] * model->refL / (model->refV * model->refV);
    }
    model->sState = model->gState; /* source state on if gravity on */
    /* reference Mach number */
    model->refMa = model->refV / sqrt(model->gamma * model->gasR * model->refT);
    /* reference dynamic viscosity for viscosity normalization */
    model->refMu = model->refMu / (model->refRho * model->refV * model->refL);
    /*
     * Now replace some parameters with general forms that are valid
     * for both dimensional and nondimensional N-S equations, since
     * dimensional forms can be seen as normalized by reference 1.
     */
    model->gasR = 1.0 / (model->gamma * model->refMa * model->refMa);
    model->cv = model->gasR / (model->gamma - 1.0);
    return;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x10(%rbp), %rax
addq $0x28, %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x28(%rbp)
movl $0x0, -0x2c(%rbp)
cmpl $0x3, -0x2c(%rbp)
jge 0xb689
movq -0x20(%rbp), %rax
addq $0x3c8, %rax            # imm = 0x3C8
movslq -0x2c(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movsd 0x8(%rax), %xmm0
movq -0x18(%rbp), %rax
divsd 0x58(%rax), %xmm0
movq -0x20(%rbp), %rax
addq $0x3c8, %rax            # imm = 0x3C8
movslq -0x2c(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movsd %xmm0, 0x8(%rax)
movq -0x20(%rbp), %rax
addq $0x3c8, %rax            # imm = 0x3C8
movslq -0x2c(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movsd (%rax), %xmm0
movq -0x18(%rbp), %rax
divsd 0x58(%rax), %xmm0
movq -0x20(%rbp), %rax
addq $0x3c8, %rax            # imm = 0x3C8
movslq -0x2c(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movsd %xmm0, (%rax)
movq -0x20(%rbp), %rax
addq $0x3c8, %rax            # imm = 0x3C8
movslq -0x2c(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movsd 0x8(%rax), %xmm0
movq -0x20(%rbp), %rax
addq $0x3c8, %rax            # imm = 0x3C8
movslq -0x2c(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
subsd (%rax), %xmm0
movq -0x20(%rbp), %rax
movslq -0x2c(%rbp), %rcx
cvtsi2sdl (%rax,%rcx,4), %xmm1
divsd %xmm1, %xmm0
movq -0x20(%rbp), %rax
movslq -0x2c(%rbp), %rcx
movsd %xmm0, 0x30(%rax,%rcx,8)
movq -0x20(%rbp), %rax
movslq -0x2c(%rbp), %rcx
movsd 0x1c0a9(%rip), %xmm0    # 0x27710
divsd 0x30(%rax,%rcx,8), %xmm0
movq -0x20(%rbp), %rax
movslq -0x2c(%rbp), %rcx
movsd %xmm0, 0x48(%rax,%rcx,8)
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0xb583
movq -0x20(%rbp), %rax
movsd 0x30(%rax), %xmm0
movsd %xmm0, -0x40(%rbp)
movq -0x20(%rbp), %rax
movsd 0x38(%rax), %xmm0
movq -0x20(%rbp), %rax
movsd 0x40(%rax), %xmm1
callq 0x96d0
movaps %xmm0, %xmm1
movsd -0x40(%rbp), %xmm0
callq 0x96d0
movaps %xmm0, %xmm1
movsd 0x1c09a(%rip), %xmm0    # 0x27760
mulsd %xmm1, %xmm0
movq -0x20(%rbp), %rax
movsd %xmm0, 0x60(%rax)
movq -0x20(%rbp), %rax
movsd 0x60(%rax), %xmm0
movq -0x20(%rbp), %rax
mulsd 0x60(%rax), %xmm0
movq -0x20(%rbp), %rax
movsd %xmm0, 0x60(%rax)
movq -0x8(%rbp), %rax
movsd 0x40(%rax), %xmm0
movq -0x18(%rbp), %rax
mulsd 0x68(%rax), %xmm0
movq -0x18(%rbp), %rax
divsd 0x58(%rax), %xmm0
movq -0x8(%rbp), %rax
movsd %xmm0, 0x40(%rax)
movq -0x8(%rbp), %rcx
xorl %eax, %eax
cmpl 0x4(%rcx), %eax
jl 0xb728
movq -0x8(%rbp), %rax
movl $0x7fffffff, 0x4(%rax)  # imm = 0x7FFFFFFF
movq -0x8(%rbp), %rax
movl (%rax), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x38(%rax)
movl $0x0, -0x30(%rbp)
cmpl $0x5, -0x30(%rbp)
jge 0xb78f
movq -0x8(%rbp), %rcx
movslq -0x30(%rbp), %rdx
xorl %eax, %eax
cmpl 0xc(%rcx,%rdx,4), %eax
jl 0xb762
movq -0x8(%rbp), %rax
movslq -0x30(%rbp), %rcx
movl $0x0, 0xc(%rax,%rcx,4)
movq -0x8(%rbp), %rcx
movslq -0x30(%rbp), %rdx
xorl %eax, %eax
cmpl 0x20(%rcx,%rdx,4), %eax
jl 0xb782
movq -0x8(%rbp), %rax
movslq -0x30(%rbp), %rcx
movl $0x7fffffff, 0x20(%rax,%rcx,4) # imm = 0x7FFFFFFF
jmp 0xb784
movl -0x30(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x30(%rbp)
jmp 0xb73c
movq -0x28(%rbp), %rcx
xorl %eax, %eax
cmpl 0x4(%rcx), %eax
jl 0xb7a5
movq -0x28(%rbp), %rax
movl $0x0, 0x4(%rax)
movq -0x28(%rbp), %rcx
xorl %eax, %eax
cmpl 0x8(%rcx), %eax
jl 0xb7bb
movq -0x28(%rbp), %rax
movl $0x0, 0x8(%rax)
movq -0x28(%rbp), %rax
movl 0x4(%rax), %ecx
movq -0x28(%rbp), %rax
addl 0x8(%rax), %ecx
movq -0x28(%rbp), %rax
movl %ecx, (%rax)
movq -0x18(%rbp), %rcx
xorl %eax, %eax
cmpl 0x20(%rcx), %eax
jl 0xb7e5
movq -0x18(%rbp), %rax
movl $0x7fffffff, 0x20(%rax) # imm = 0x7FFFFFFF
movq -0x18(%rbp), %rax
movsd 0x1bfaf(%rip), %xmm0    # 0x277a0
movsd %xmm0, 0x40(%rax)
movq -0x18(%rbp), %rax
movsd 0x1bf96(%rip), %xmm0    # 0x27798
movsd %xmm0, 0x48(%rax)
movl $0x0, -0x34(%rbp)
cmpl $0x3, -0x34(%rbp)
jge 0xb85a
movq -0x18(%rbp), %rax
movslq -0x34(%rbp), %rcx
movsd 0x78(%rax,%rcx,8), %xmm0
movq -0x18(%rbp), %rax
mulsd 0x58(%rax), %xmm0
movq -0x18(%rbp), %rax
movsd 0x68(%rax), %xmm1
movq -0x18(%rbp), %rax
mulsd 0x68(%rax), %xmm1
divsd %xmm1, %xmm0
movq -0x18(%rbp), %rax
movslq -0x34(%rbp), %rcx
movsd %xmm0, 0x78(%rax,%rcx,8)
movl -0x34(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rbp)
jmp 0xb80e
movq -0x18(%rbp), %rax
movl 0x28(%rax), %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0x2c(%rax)
movq -0x18(%rbp), %rax
movsd 0x68(%rax), %xmm0
movsd %xmm0, -0x48(%rbp)
movq -0x18(%rbp), %rax
movsd 0x40(%rax), %xmm0
movq -0x18(%rbp), %rax
mulsd 0x48(%rax), %xmm0
movq -0x18(%rbp), %rax
mulsd 0x70(%rax), %xmm0
callq 0x2200
movaps %xmm0, %xmm1
movsd -0x48(%rbp), %xmm0
divsd %xmm1, %xmm0
movq -0x18(%rbp), %rax
movsd %xmm0, 0x30(%rax)
movq -0x18(%rbp), %rax
movsd 0x38(%rax), %xmm0
movq -0x18(%rbp), %rax
movsd 0x60(%rax), %xmm1
movq -0x18(%rbp), %rax
mulsd 0x68(%rax), %xmm1
movq -0x18(%rbp), %rax
mulsd 0x58(%rax), %xmm1
divsd %xmm1, %xmm0
movq -0x18(%rbp), %rax
movsd %xmm0, 0x38(%rax)
movq -0x18(%rbp), %rax
movsd 0x40(%rax), %xmm1
movq -0x18(%rbp), %rax
mulsd 0x30(%rax), %xmm1
movq -0x18(%rbp), %rax
mulsd 0x30(%rax), %xmm1
movsd 0x1be11(%rip), %xmm0    # 0x27710
divsd %xmm1, %xmm0
movq -0x18(%rbp), %rax
movsd %xmm0, 0x48(%rax)
movq -0x18(%rbp), %rax
movsd 0x48(%rax), %xmm0
movq -0x18(%rbp), %rax
movsd 0x40(%rax), %xmm1
movsd 0x1bdea(%rip), %xmm2    # 0x27710
subsd %xmm2, %xmm1
divsd %xmm1, %xmm0
movq -0x18(%rbp), %rax
movsd %xmm0, 0x50(%rax)
addq $0x50, %rsp
popq %rbp
retq
nopl (%rax)