// File: /workspace/github_c_makefile_star2_O0/mohuangrui[P]ArtraCFD/solid_dynamics.c
// Function: ApplyCollision
static void ApplyCollision(Space *space)
{
    const Partition *const part = &(space->part);
    const Node *const node = space->node;
    Geometry *const geo = &(space->geo);
    const IntVec nMin = {part->ns[PIN][X][MIN], part->ns[PIN][Y][MIN], part->ns[PIN][Z][MIN]};
    const IntVec nMax = {part->ns[PIN][X][MAX], part->ns[PIN][Y][MAX], part->ns[PIN][Z][MAX]};
    const RealVec sMin = {part->domain[X][MIN], part->domain[Y][MIN], part->domain[Z][MIN]};
    const RealVec dd = {part->dd[X], part->dd[Y], part->dd[Z]};
    const IntVec ng = {part->ng[X], part->ng[Y], part->ng[Z]};
    const Real zero = 0.0;
    const Real one = 1.0;
    const int coltag = INT_MAX / 2; /* colliding polyhedron marker */
    const Real crList[5] = {0.0, 0.25, 0.5, 0.75, 1.0}; /* coefficient of restitution */
    Polyhedron *polp = NULL;
    Polyhedron *poln = NULL;
    Collision *col = NULL;
    int idx = 0; /* linear array index math variable */
    int box[DIMS][LIMIT] = {{0}}; /* bounding box in node space */
    RealVec Vo = {zero}; /* original translational velocity */
    RealVec Wo = {zero}; /* original rotational velocity */
    RealVec V = {zero}; /* relative translational velocity */
    RealVec W = {zero}; /* relative rotational velocity */
    RealVec N = {zero}; /* line of impact */
    Real Vn = zero; /* translational velocity projection on line of impact */
    Real cr = zero; /* coefficient of restitution */
    Real cf = zero; /* coefficient of sliding friction */
    Real mp = zero; /* mass */
    Real mn = zero; /* mass */
    Real meff = zero; /* effective mass */
    for (int p = 0; p < geo->totN; ++p) {
        polp = geo->poly + p;
        if (1 == polp->state) { /* stationary object */
            continue;
        }
        geo->colN = 0; /* reset */
        /* determine search range according to bounding box of polyhedron and valid node space */
        for (int s = 0; s < DIMS; ++s) {
            box[s][MIN] = ConfineSpace(MapNode(polp->box[s][MIN], sMin[s], dd[s], ng[s]), nMin[s], nMax[s]);
            box[s][MAX] = ConfineSpace(MapNode(polp->box[s][MAX], sMin[s], dd[s], ng[s]), nMin[s], nMax[s]) + 1;
        }
        for (int k = box[Z][MIN]; k < box[Z][MAX]; ++k) {
            for (int j = box[Y][MIN]; j < box[Y][MAX]; ++j) {
                for (int i = box[X][MIN]; i < box[X][MAX]; ++i) {
                    idx = IndexNode(k, j, i, part->n[Y], part->n[X]);
                    if ((1 != node[idx].lid) || (p + 1 != node[idx].did)) {
                        continue;
                    }
                    DetectColState(k, j, i, p + 1, part->pathSep[1], part->path, node, part, geo);
                }
            }
        }
        /* skip none contacting polyhedron */
        if (0 == geo->colN) {
            continue;
        }
        /* backup original velocity */
        memcpy(Vo, polp->V[TO], DIMS * sizeof(*polp->V[TO]));
        memcpy(Wo, polp->W[TO], DIMS * sizeof(*polp->W[TO]));
        /* initialize post-collision velocity */
        memcpy(polp->V[TO], polp->V[TN], DIMS * sizeof(*polp->V[TO]));
        memcpy(polp->W[TO], polp->W[TN], DIMS * sizeof(*polp->W[TO]));
        /* pairwise collision */
        mp = polp->rho * polp->volume;
        for (int n = 0; n < geo->colN; ++n) {
            col = geo->col + n;
            /* line of impact */
            if (0 == abs(col->N[X]) + abs(col->N[Y]) + abs(col->N[Z])) {
                if ((geo->colN - 1 == n) && (coltag > polp->state)) {
                    /* recover contacting but none colliding polyhedron */
                    memcpy(polp->V[TO], Vo, DIMS * sizeof(*polp->V[TO]));
                    memcpy(polp->W[TO], Wo, DIMS * sizeof(*polp->W[TO]));
                }
                continue;
            }
            N[X] = col->N[X];
            N[Y] = col->N[Y];
            N[Z] = col->N[Z];
            Normalize(DIMS, Norm(N), N);
            poln = geo->poly + col->gid - 1;
            /* relative speed */
            for (int s = 0; s < DIMS; ++s) {
                V[s] = polp->V[TN][s] - poln->V[TN][s];
                W[s] = polp->W[TN][s] - poln->W[TN][s];
            }
            Vn = Dot(V, N);
            if (zero >= Vn) {
                if ((geo->colN - 1 == n) && (coltag > polp->state)) {
                    /* recover contacting but none colliding polyhedron */
                    memcpy(polp->V[TO], Vo, DIMS * sizeof(*polp->V[TO]));
                    memcpy(polp->W[TO], Wo, DIMS * sizeof(*polp->W[TO]));
                }
                continue;
            }
            /* mark colliding polyhedron */
            if (coltag > polp->state) {
                polp->state = polp->state + coltag;
            }
            mn = poln->rho * poln->volume;
            meff = mn / (mp + mn);
            cr = 0.5 * (crList[polp->mid] + crList[poln->mid]);
            cf = 0.5 * (polp->cf + poln->cf);
            /* vector summation of the velocity changes in the global frame */
            for (int s = 0; s < DIMS; ++s) {
                polp->V[TO][s] = polp->V[TO][s] - meff * (one + cr) * Vn * N[s] - cf * (V[s] - Vn * N[s]);
                polp->W[TO][s] = polp->W[TO][s] - meff * W[s];
            }
        }
    }
    /* update post-collision velocity for collided polyhedron */
    for (int p = 0; p < geo->totN; ++p) {
        polp = geo->poly + p;
        if (coltag > polp->state) { /* none collided polyhedron */
            continue;
        }
        polp->state = polp->state - coltag; /* recover state */
        memcpy(polp->V[TN], polp->V[TO], DIMS * sizeof(*polp->V[TO]));
        memcpy(polp->W[TN], polp->W[TO], DIMS * sizeof(*polp->W[TO]));
    }
    return;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x210, %rsp            # imm = 0x210
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x28, %rax
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movl 0x68(%rax), %eax
movl %eax, -0x2c(%rbp)
movq -0x10(%rbp), %rax
movl 0x70(%rax), %eax
movl %eax, -0x28(%rbp)
movq -0x10(%rbp), %rax
movl 0x78(%rax), %eax
movl %eax, -0x24(%rbp)
movq -0x10(%rbp), %rax
movl 0x6c(%rax), %eax
movl %eax, -0x38(%rbp)
movq -0x10(%rbp), %rax
movl 0x74(%rax), %eax
movl %eax, -0x34(%rbp)
movq -0x10(%rbp), %rax
movl 0x7c(%rax), %eax
movl %eax, -0x30(%rbp)
movq -0x10(%rbp), %rax
movsd 0x3c8(%rax), %xmm0
movsd %xmm0, -0x50(%rbp)
movq -0x10(%rbp), %rax
movsd 0x3d8(%rax), %xmm0
movsd %xmm0, -0x48(%rbp)
movq -0x10(%rbp), %rax
movsd 0x3e8(%rax), %xmm0
movsd %xmm0, -0x40(%rbp)
movq -0x10(%rbp), %rax
movsd 0x48(%rax), %xmm0
movsd %xmm0, -0x70(%rbp)
movq -0x10(%rbp), %rax
movsd 0x50(%rax), %xmm0
movsd %xmm0, -0x68(%rbp)
movq -0x10(%rbp), %rax
movsd 0x58(%rax), %xmm0
movsd %xmm0, -0x60(%rbp)
movq -0x10(%rbp), %rax
movl 0x18(%rax), %eax
movl %eax, -0x7c(%rbp)
movq -0x10(%rbp), %rax
movl 0x1c(%rax), %eax
movl %eax, -0x78(%rbp)
movq -0x10(%rbp), %rax
movl 0x20(%rax), %eax
movl %eax, -0x74(%rbp)
xorps %xmm0, %xmm0
movsd %xmm0, -0x88(%rbp)
movsd 0x6614(%rip), %xmm0     # 0x27710
movsd %xmm0, -0x90(%rbp)
movl $0x3fffffff, -0x94(%rbp) # imm = 0x3FFFFFFF
leaq -0xc0(%rbp), %rdi
xorl %esi, %esi
movl $0x28, %edx
callq 0x20d0
movsd 0x6aff(%rip), %xmm0     # 0x27c28
movsd %xmm0, -0xb8(%rbp)
movsd 0x65cf(%rip), %xmm0     # 0x27708
movsd %xmm0, -0xb0(%rbp)
movsd 0x7dbf(%rip), %xmm0     # 0x28f08
movsd %xmm0, -0xa8(%rbp)
movsd 0x65b7(%rip), %xmm0     # 0x27710
movsd %xmm0, -0xa0(%rbp)
movq $0x0, -0xc8(%rbp)
movq $0x0, -0xd0(%rbp)
movq $0x0, -0xd8(%rbp)
movl $0x0, -0xdc(%rbp)
leaq -0x100(%rbp), %rdi
xorl %esi, %esi
movl $0x18, %edx
callq 0x20d0
leaq -0x120(%rbp), %rdi
xorl %esi, %esi
movl $0x18, %edx
callq 0x20d0
leaq -0x140(%rbp), %rdi
xorl %esi, %esi
movl $0x18, %edx
callq 0x20d0
leaq -0x160(%rbp), %rdi
xorl %esi, %esi
movl $0x18, %edx
callq 0x20d0
leaq -0x180(%rbp), %rdi
xorl %esi, %esi
movl $0x18, %edx
callq 0x20d0
leaq -0x1a0(%rbp), %rdi
xorl %esi, %esi
movl $0x18, %edx
callq 0x20d0
xorps %xmm0, %xmm0
movsd %xmm0, -0x1a8(%rbp)
xorps %xmm0, %xmm0
movsd %xmm0, -0x1b0(%rbp)
xorps %xmm0, %xmm0
movsd %xmm0, -0x1b8(%rbp)
xorps %xmm0, %xmm0
movsd %xmm0, -0x1c0(%rbp)
xorps %xmm0, %xmm0
movsd %xmm0, -0x1c8(%rbp)
xorps %xmm0, %xmm0
movsd %xmm0, -0x1d0(%rbp)
movl $0x0, -0x1d4(%rbp)
movl -0x1d4(%rbp), %eax
movq -0x20(%rbp), %rcx
cmpl (%rcx), %eax
jge 0x21b8b
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rax
movslq -0x1d4(%rbp), %rcx
imulq $0x238, %rcx, %rcx      # imm = 0x238
addq %rcx, %rax
movq %rax, -0xc8(%rbp)
movq -0xc8(%rbp), %rcx
movl $0x1, %eax
cmpl 0xc(%rcx), %eax
jne 0x21292
jmp 0x21b77
movq -0x20(%rbp), %rax
movl $0x0, 0xc(%rax)
movl $0x0, -0x1d8(%rbp)
cmpl $0x3, -0x1d8(%rbp)
jge 0x213b8
movq -0xc8(%rbp), %rax
addq $0x1d0, %rax            # imm = 0x1D0
movslq -0x1d8(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movsd (%rax), %xmm0
movslq -0x1d8(%rbp), %rax
movsd -0x50(%rbp,%rax,8), %xmm1
movslq -0x1d8(%rbp), %rax
movsd -0x70(%rbp,%rax,8), %xmm2
movslq -0x1d8(%rbp), %rax
movl -0x7c(%rbp,%rax,4), %edi
callq 0x95b0
movl %eax, %edi
movslq -0x1d8(%rbp), %rax
movl -0x2c(%rbp,%rax,4), %esi
movslq -0x1d8(%rbp), %rax
movl -0x38(%rbp,%rax,4), %edx
callq 0x95f0
movl %eax, %ecx
movslq -0x1d8(%rbp), %rax
movl %ecx, -0x100(%rbp,%rax,8)
movq -0xc8(%rbp), %rax
addq $0x1d0, %rax            # imm = 0x1D0
movslq -0x1d8(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movsd 0x8(%rax), %xmm0
movslq -0x1d8(%rbp), %rax
movsd -0x50(%rbp,%rax,8), %xmm1
movslq -0x1d8(%rbp), %rax
movsd -0x70(%rbp,%rax,8), %xmm2
movslq -0x1d8(%rbp), %rax
movl -0x7c(%rbp,%rax,4), %edi
callq 0x95b0
movl %eax, %edi
movslq -0x1d8(%rbp), %rax
movl -0x2c(%rbp,%rax,4), %esi
movslq -0x1d8(%rbp), %rax
movl -0x38(%rbp,%rax,4), %edx
callq 0x95f0
movl %eax, %ecx
addl $0x1, %ecx
movslq -0x1d8(%rbp), %rax
movl %ecx, -0xfc(%rbp,%rax,8)
movl -0x1d8(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1d8(%rbp)
jmp 0x212a7
movl -0xf0(%rbp), %eax
movl %eax, -0x1dc(%rbp)
movl -0x1dc(%rbp), %eax
cmpl -0xec(%rbp), %eax
jge 0x21511
movl -0xf8(%rbp), %eax
movl %eax, -0x1e0(%rbp)
movl -0x1e0(%rbp), %eax
cmpl -0xf4(%rbp), %eax
jge 0x214fb
movl -0x100(%rbp), %eax
movl %eax, -0x1e4(%rbp)
movl -0x1e4(%rbp), %eax
cmpl -0xfc(%rbp), %eax
jge 0x214e5
movl -0x1dc(%rbp), %edi
movl -0x1e0(%rbp), %esi
movl -0x1e4(%rbp), %edx
movq -0x10(%rbp), %rax
movl 0x10(%rax), %ecx
movq -0x10(%rbp), %rax
movl 0xc(%rax), %r8d
callq 0x9500
movl %eax, -0xdc(%rbp)
movq -0x18(%rbp), %rcx
movslq -0xdc(%rbp), %rax
imulq $0x88, %rax, %rax
addq %rax, %rcx
movl $0x1, %eax
cmpl 0x8(%rcx), %eax
jne 0x2147f
movl -0x1d4(%rbp), %eax
addl $0x1, %eax
movq -0x18(%rbp), %rcx
movslq -0xdc(%rbp), %rdx
imulq $0x88, %rdx, %rdx
addq %rdx, %rcx
cmpl (%rcx), %eax
je 0x21481
jmp 0x214d1
movl -0x1dc(%rbp), %edi
movl -0x1e0(%rbp), %esi
movl -0x1e4(%rbp), %edx
movl -0x1d4(%rbp), %ecx
addl $0x1, %ecx
movq -0x10(%rbp), %rax
movl 0x384(%rax), %r8d
movq -0x10(%rbp), %r9
addq $0x218, %r9             # imm = 0x218
movq -0x18(%rbp), %r11
movq -0x10(%rbp), %r10
movq -0x20(%rbp), %rax
movq %r11, (%rsp)
movq %r10, 0x8(%rsp)
movq %rax, 0x10(%rsp)
callq 0x21ee0
movl -0x1e4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1e4(%rbp)
jmp 0x21400
jmp 0x214e7
movl -0x1e0(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1e0(%rbp)
jmp 0x213e2
jmp 0x214fd
movl -0x1dc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1dc(%rbp)
jmp 0x213c4
movq -0x20(%rbp), %rcx
xorl %eax, %eax
cmpl 0xc(%rcx), %eax
jne 0x21521
jmp 0x21b77
movq -0xc8(%rbp), %rax
movq 0x80(%rax), %rcx
movq %rcx, -0x120(%rbp)
movq 0x88(%rax), %rcx
movq %rcx, -0x118(%rbp)
movq 0x90(%rax), %rax
movq %rax, -0x110(%rbp)
movq -0xc8(%rbp), %rax
movq 0xb0(%rax), %rcx
movq %rcx, -0x140(%rbp)
movq 0xb8(%rax), %rcx
movq %rcx, -0x138(%rbp)
movq 0xc0(%rax), %rax
movq %rax, -0x130(%rbp)
movq -0xc8(%rbp), %rax
movq -0xc8(%rbp), %rcx
movq 0x98(%rcx), %rdx
movq %rdx, 0x80(%rax)
movq 0xa0(%rcx), %rdx
movq %rdx, 0x88(%rax)
movq 0xa8(%rcx), %rcx
movq %rcx, 0x90(%rax)
movq -0xc8(%rbp), %rax
movq -0xc8(%rbp), %rcx
movq 0xc8(%rcx), %rdx
movq %rdx, 0xb0(%rax)
movq 0xd0(%rcx), %rdx
movq %rdx, 0xb8(%rax)
movq 0xd8(%rcx), %rcx
movq %rcx, 0xc0(%rax)
movq -0xc8(%rbp), %rax
movsd 0x1a8(%rax), %xmm0
movq -0xc8(%rbp), %rax
mulsd 0x1c8(%rax), %xmm0
movsd %xmm0, -0x1c0(%rbp)
movl $0x0, -0x1e8(%rbp)
movl -0x1e8(%rbp), %eax
movq -0x20(%rbp), %rcx
cmpl 0xc(%rcx), %eax
jge 0x21b75
movq -0x20(%rbp), %rax
movq 0x18(%rax), %rax
movslq -0x1e8(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq %rax, -0xd8(%rbp)
movq -0xd8(%rbp), %rax
movl 0x4(%rax), %ecx
movl %ecx, %eax
negl %eax
cmovnsl %eax, %ecx
movq -0xd8(%rbp), %rax
movl 0x8(%rax), %eax
movl %eax, %edx
negl %edx
cmovnsl %edx, %eax
addl %eax, %ecx
movq -0xd8(%rbp), %rax
movl 0xc(%rax), %eax
movl %eax, %edx
negl %edx
cmovnsl %edx, %eax
addl %eax, %ecx
xorl %eax, %eax
cmpl %ecx, %eax
jne 0x2171e
movq -0x20(%rbp), %rax
movl 0xc(%rax), %eax
subl $0x1, %eax
cmpl -0x1e8(%rbp), %eax
jne 0x21719
movq -0xc8(%rbp), %rcx
movl $0x3fffffff, %eax       # imm = 0x3FFFFFFF
cmpl 0xc(%rcx), %eax
jle 0x21719
movq -0xc8(%rbp), %rax
movq -0x120(%rbp), %rcx
movq %rcx, 0x80(%rax)
movq -0x118(%rbp), %rcx
movq %rcx, 0x88(%rax)
movq -0x110(%rbp), %rcx
movq %rcx, 0x90(%rax)
movq -0xc8(%rbp), %rax
movq -0x140(%rbp), %rcx
movq %rcx, 0xb0(%rax)
movq -0x138(%rbp), %rcx
movq %rcx, 0xb8(%rax)
movq -0x130(%rbp), %rcx
movq %rcx, 0xc0(%rax)
jmp 0x21b61
movq -0xd8(%rbp), %rax
cvtsi2sdl 0x4(%rax), %xmm0
movsd %xmm0, -0x1a0(%rbp)
movq -0xd8(%rbp), %rax
cvtsi2sdl 0x8(%rax), %xmm0
movsd %xmm0, -0x198(%rbp)
movq -0xd8(%rbp), %rax
cvtsi2sdl 0xc(%rax), %xmm0
movsd %xmm0, -0x190(%rbp)
leaq -0x1a0(%rbp), %rdi
callq 0x98e0
leaq -0x1a0(%rbp), %rsi
movl $0x3, %edi
callq 0x9c60
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rax
movq -0xd8(%rbp), %rcx
movslq (%rcx), %rcx
imulq $0x238, %rcx, %rcx      # imm = 0x238
addq %rcx, %rax
addq $-0x238, %rax           # imm = 0xFDC8
movq %rax, -0xd0(%rbp)
movl $0x0, -0x1ec(%rbp)
cmpl $0x3, -0x1ec(%rbp)
jge 0x21847
movq -0xc8(%rbp), %rax
movslq -0x1ec(%rbp), %rcx
movsd 0x98(%rax,%rcx,8), %xmm0
movq -0xd0(%rbp), %rax
movslq -0x1ec(%rbp), %rcx
subsd 0x98(%rax,%rcx,8), %xmm0
movslq -0x1ec(%rbp), %rax
movsd %xmm0, -0x160(%rbp,%rax,8)
movq -0xc8(%rbp), %rax
movslq -0x1ec(%rbp), %rcx
movsd 0xc8(%rax,%rcx,8), %xmm0
movq -0xd0(%rbp), %rax
movslq -0x1ec(%rbp), %rcx
subsd 0xc8(%rax,%rcx,8), %xmm0
movslq -0x1ec(%rbp), %rax
movsd %xmm0, -0x180(%rbp,%rax,8)
movl -0x1ec(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1ec(%rbp)
jmp 0x217aa
leaq -0x160(%rbp), %rdi
leaq -0x1a0(%rbp), %rsi
callq 0x9880
movsd %xmm0, -0x1a8(%rbp)
xorps %xmm0, %xmm0
ucomisd -0x1a8(%rbp), %xmm0
jb 0x218fd
movq -0x20(%rbp), %rax
movl 0xc(%rax), %eax
subl $0x1, %eax
cmpl -0x1e8(%rbp), %eax
jne 0x218f8
movq -0xc8(%rbp), %rcx
movl $0x3fffffff, %eax       # imm = 0x3FFFFFFF
cmpl 0xc(%rcx), %eax
jle 0x218f8
movq -0xc8(%rbp), %rax
movq -0x120(%rbp), %rcx
movq %rcx, 0x80(%rax)
movq -0x118(%rbp), %rcx
movq %rcx, 0x88(%rax)
movq -0x110(%rbp), %rcx
movq %rcx, 0x90(%rax)
movq -0xc8(%rbp), %rax
movq -0x140(%rbp), %rcx
movq %rcx, 0xb0(%rax)
movq -0x138(%rbp), %rcx
movq %rcx, 0xb8(%rax)
movq -0x130(%rbp), %rcx
movq %rcx, 0xc0(%rax)
jmp 0x21b61
movq -0xc8(%rbp), %rcx
movl $0x3fffffff, %eax       # imm = 0x3FFFFFFF
cmpl 0xc(%rcx), %eax
jle 0x21928
movq -0xc8(%rbp), %rax
movl 0xc(%rax), %ecx
addl $0x3fffffff, %ecx       # imm = 0x3FFFFFFF
movq -0xc8(%rbp), %rax
movl %ecx, 0xc(%rax)
movq -0xd0(%rbp), %rax
movsd 0x1a8(%rax), %xmm0
movq -0xd0(%rbp), %rax
mulsd 0x1c8(%rax), %xmm0
movsd %xmm0, -0x1c8(%rbp)
movsd -0x1c8(%rbp), %xmm0
movsd -0x1c0(%rbp), %xmm1
addsd -0x1c8(%rbp), %xmm1
divsd %xmm1, %xmm0
movsd %xmm0, -0x1d0(%rbp)
movq -0xc8(%rbp), %rax
movslq 0x10(%rax), %rax
movsd -0xc0(%rbp,%rax,8), %xmm1
movq -0xd0(%rbp), %rax
movslq 0x10(%rax), %rax
addsd -0xc0(%rbp,%rax,8), %xmm1
movsd 0x5d66(%rip), %xmm0     # 0x27708
mulsd %xmm1, %xmm0
movsd %xmm0, -0x1b0(%rbp)
movq -0xc8(%rbp), %rax
movsd 0x1b8(%rax), %xmm1
movq -0xd0(%rbp), %rax
addsd 0x1b8(%rax), %xmm1
movsd 0x5d34(%rip), %xmm0     # 0x27708
mulsd %xmm1, %xmm0
movsd %xmm0, -0x1b8(%rbp)
movl $0x0, -0x1f0(%rbp)
cmpl $0x3, -0x1f0(%rbp)
jge 0x21b5f
movq -0xc8(%rbp), %rax
movslq -0x1f0(%rbp), %rcx
movsd 0x80(%rax,%rcx,8), %xmm0
movsd -0x1d0(%rbp), %xmm1
movsd 0x5cf2(%rip), %xmm2     # 0x27710
addsd -0x1b0(%rbp), %xmm2
mulsd %xmm2, %xmm1
mulsd -0x1a8(%rbp), %xmm1
movslq -0x1f0(%rbp), %rax
movsd -0x1a0(%rbp,%rax,8), %xmm2
movq %xmm1, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm1
mulsd %xmm2, %xmm1
addsd %xmm0, %xmm1
movsd -0x1b8(%rbp), %xmm0
movslq -0x1f0(%rbp), %rax
movsd -0x160(%rbp,%rax,8), %xmm3
movsd -0x1a8(%rbp), %xmm2
movslq -0x1f0(%rbp), %rax
movsd -0x1a0(%rbp,%rax,8), %xmm4
movq %xmm2, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm2
mulsd %xmm4, %xmm2
addsd %xmm3, %xmm2
movq %xmm0, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm0
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movq -0xc8(%rbp), %rax
movslq -0x1f0(%rbp), %rcx
movsd %xmm0, 0x80(%rax,%rcx,8)
movq -0xc8(%rbp), %rax
movslq -0x1f0(%rbp), %rcx
movsd 0xb0(%rax,%rcx,8), %xmm1
movsd -0x1d0(%rbp), %xmm0
movslq -0x1f0(%rbp), %rax
movsd -0x180(%rbp,%rax,8), %xmm2
movq %xmm0, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm0
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movq -0xc8(%rbp), %rax
movslq -0x1f0(%rbp), %rcx
movsd %xmm0, 0xb0(%rax,%rcx,8)
movl -0x1f0(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1f0(%rbp)
jmp 0x219ea
jmp 0x21b61
movl -0x1e8(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1e8(%rbp)
jmp 0x21623
jmp 0x21b77
movl -0x1d4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1d4(%rbp)
jmp 0x2124a
movl $0x0, -0x1f4(%rbp)
movl -0x1f4(%rbp), %eax
movq -0x20(%rbp), %rcx
cmpl (%rcx), %eax
jge 0x21c7b
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rax
movslq -0x1f4(%rbp), %rcx
imulq $0x238, %rcx, %rcx      # imm = 0x238
addq %rcx, %rax
movq %rax, -0xc8(%rbp)
movq -0xc8(%rbp), %rcx
movl $0x3fffffff, %eax       # imm = 0x3FFFFFFF
cmpl 0xc(%rcx), %eax
jle 0x21bdd
jmp 0x21c67
movq -0xc8(%rbp), %rax
movl 0xc(%rax), %ecx
subl $0x3fffffff, %ecx       # imm = 0x3FFFFFFF
movq -0xc8(%rbp), %rax
movl %ecx, 0xc(%rax)
movq -0xc8(%rbp), %rax
movq -0xc8(%rbp), %rcx
movq 0x80(%rcx), %rdx
movq %rdx, 0x98(%rax)
movq 0x88(%rcx), %rdx
movq %rdx, 0xa0(%rax)
movq 0x90(%rcx), %rcx
movq %rcx, 0xa8(%rax)
movq -0xc8(%rbp), %rax
movq -0xc8(%rbp), %rcx
movq 0xb0(%rcx), %rdx
movq %rdx, 0xc8(%rax)
movq 0xb8(%rcx), %rdx
movq %rdx, 0xd0(%rax)
movq 0xc0(%rcx), %rcx
movq %rcx, 0xd8(%rax)
movl -0x1f4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1f4(%rbp)
jmp 0x21b95
addq $0x210, %rsp            # imm = 0x210
popq %rbp
retq
nopw %cs:(%rax,%rax)