// File: jamesliu516[P]amrdg2d/wall4amrdg2013.cpp
// Function: bilinearIntplt(std::vector<bodygridclass*, std::allocator<bodygridclass*>>&, pointxy const*, privariables&)
void bilinearIntplt(vector< OctCell * > &grid, const PXYZ *px, JBBL &ingrid1)
{
    double amatrix[20];
    double ujie[4];
    SHBL shu;
    PXYZ pxdc; //px����Ӧ�ĶԳƵ�����
    int i;

    for( i=0; i<4; i++)
    {
        amatrix[i * 5 + 0] =1.0;
        amatrix[i * 5 + 1] = grid[i]->xc1;
        amatrix[i * 5 + 2] = grid[i]->yc1;
        amatrix[i * 5 + 3] = grid[i]->xc1 * grid[i]->yc1;
    }

    for(i=0; i<4; i++)
    {
        amatrix[i * 5 + 4] = grid[i]->dof[0][0];
    }

    gem(amatrix, 4, ujie);

    shu.q = ujie[0] + ujie[1] * px->x + ujie[2] * px->y + ujie[3] * px->x * px->y;

    for( i=0; i<4; i++)
    {
        amatrix[i * 5 + 0] =1.0;
        amatrix[i * 5 + 1] = grid[i]->xc1;
        amatrix[i * 5 + 2] = grid[i]->yc1;
        amatrix[i * 5 + 3] = grid[i]->xc1 * grid[i]->yc1;
    }

    for(i=0; i<4; i++)
    {
        amatrix[i * 5 + 4] = grid[i]->dof[1][0];
    }

    gem(amatrix, 4, ujie);

    shu.qu = ujie[0] + ujie[1] * px->x + ujie[2] * px->y + ujie[3] * px->x * px->y;

    for( i=0; i<4; i++)
    {
        amatrix[i * 5 + 0] =1.0;
        amatrix[i * 5 + 1] = grid[i]->xc1;
        amatrix[i * 5 + 2] = grid[i]->yc1;
        amatrix[i * 5 + 3] = grid[i]->xc1 * grid[i]->yc1;
    }

    for(i=0; i<4; i++)
    {
        amatrix[i * 5 + 4] = grid[i]->dof[2][0];
    }

    gem(amatrix, 4, ujie);

    shu.qv = ujie[0] + ujie[1] * px->x + ujie[2] * px->y + ujie[3] * px->x * px->y;

    for( i=0; i<4; i++)
    {
        amatrix[i * 5 + 0] =1.0;
        amatrix[i * 5 + 1] = grid[i]->xc1;
        amatrix[i * 5 + 2] = grid[i]->yc1;
        amatrix[i * 5 + 3] = grid[i]->xc1 * grid[i]->yc1;
    }

    for(i=0; i<4; i++)
    {
        amatrix[i * 5 + 4] = grid[i]->dof[3][0];
    }

    gem(amatrix, 4, ujie);

    shu.te = ujie[0] + ujie[1] * px->x + ujie[2] * px->y + ujie[3] * px->x * px->y;

    shblToJbbl(&shu, &ingrid1);
}

// Assembly:
subq $0x138, %rsp            # imm = 0x138
movq %rdi, 0x130(%rsp)
movq %rsi, 0x128(%rsp)
movq %rdx, 0x120(%rsp)
leaq 0x40(%rsp), %rdi
callq 0x21aa0
leaq 0x30(%rsp), %rdi
callq 0x6310
movl $0x0, 0x2c(%rsp)
cmpl $0x4, 0x2c(%rsp)
jge 0x2b3ca
imull $0x5, 0x2c(%rsp), %eax
addl $0x0, %eax
cltq
movsd 0x13d60(%rip), %xmm0    # 0x3f058
movsd %xmm0, 0x80(%rsp,%rax,8)
movq 0x130(%rsp), %rdi
movslq 0x2c(%rsp), %rsi
callq 0x1e180
movq (%rax), %rax
movsd 0x278(%rax), %xmm0
imull $0x5, 0x2c(%rsp), %eax
addl $0x1, %eax
cltq
movsd %xmm0, 0x80(%rsp,%rax,8)
movq 0x130(%rsp), %rdi
movslq 0x2c(%rsp), %rsi
callq 0x1e180
movq (%rax), %rax
movsd 0x280(%rax), %xmm0
imull $0x5, 0x2c(%rsp), %eax
addl $0x2, %eax
cltq
movsd %xmm0, 0x80(%rsp,%rax,8)
movq 0x130(%rsp), %rdi
movslq 0x2c(%rsp), %rsi
callq 0x1e180
movq (%rax), %rax
movsd 0x278(%rax), %xmm0
movsd %xmm0, 0x20(%rsp)
movq 0x130(%rsp), %rdi
movslq 0x2c(%rsp), %rsi
callq 0x1e180
movsd 0x20(%rsp), %xmm0
movq (%rax), %rax
mulsd 0x280(%rax), %xmm0
imull $0x5, 0x2c(%rsp), %eax
addl $0x3, %eax
cltq
movsd %xmm0, 0x80(%rsp,%rax,8)
movl 0x2c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x2c(%rsp)
jmp 0x2b2db
movl $0x0, 0x2c(%rsp)
cmpl $0x4, 0x2c(%rsp)
jge 0x2b413
movq 0x130(%rsp), %rdi
movslq 0x2c(%rsp), %rsi
callq 0x1e180
movq (%rax), %rax
movsd 0x30(%rax), %xmm0
imull $0x5, 0x2c(%rsp), %eax
addl $0x4, %eax
cltq
movsd %xmm0, 0x80(%rsp,%rax,8)
movl 0x2c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x2c(%rsp)
jmp 0x2b3d2
leaq 0x80(%rsp), %rdi
leaq 0x60(%rsp), %rdx
movl $0x4, %esi
callq 0x2adb0
movsd 0x60(%rsp), %xmm1
movsd 0x68(%rsp), %xmm0
movq 0x128(%rsp), %rax
movsd (%rax), %xmm2
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd 0x70(%rsp), %xmm1
movq 0x128(%rsp), %rax
movsd 0x8(%rax), %xmm2
mulsd %xmm2, %xmm1
addsd %xmm0, %xmm1
movsd 0x78(%rsp), %xmm0
movq 0x128(%rsp), %rax
mulsd (%rax), %xmm0
movq 0x128(%rsp), %rax
movsd 0x8(%rax), %xmm2
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, 0x40(%rsp)
movl $0x0, 0x2c(%rsp)
cmpl $0x4, 0x2c(%rsp)
jge 0x2b589
imull $0x5, 0x2c(%rsp), %eax
addl $0x0, %eax
cltq
movsd 0x13ba1(%rip), %xmm0    # 0x3f058
movsd %xmm0, 0x80(%rsp,%rax,8)
movq 0x130(%rsp), %rdi
movslq 0x2c(%rsp), %rsi
callq 0x1e180
movq (%rax), %rax
movsd 0x278(%rax), %xmm0
imull $0x5, 0x2c(%rsp), %eax
addl $0x1, %eax
cltq
movsd %xmm0, 0x80(%rsp,%rax,8)
movq 0x130(%rsp), %rdi
movslq 0x2c(%rsp), %rsi
callq 0x1e180
movq (%rax), %rax
movsd 0x280(%rax), %xmm0
imull $0x5, 0x2c(%rsp), %eax
addl $0x2, %eax
cltq
movsd %xmm0, 0x80(%rsp,%rax,8)
movq 0x130(%rsp), %rdi
movslq 0x2c(%rsp), %rsi
callq 0x1e180
movq (%rax), %rax
movsd 0x278(%rax), %xmm0
movsd %xmm0, 0x18(%rsp)
movq 0x130(%rsp), %rdi
movslq 0x2c(%rsp), %rsi
callq 0x1e180
movsd 0x18(%rsp), %xmm0
movq (%rax), %rax
mulsd 0x280(%rax), %xmm0
imull $0x5, 0x2c(%rsp), %eax
addl $0x3, %eax
cltq
movsd %xmm0, 0x80(%rsp,%rax,8)
movl 0x2c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x2c(%rsp)
jmp 0x2b49a
movl $0x0, 0x2c(%rsp)
cmpl $0x4, 0x2c(%rsp)
jge 0x2b5d2
movq 0x130(%rsp), %rdi
movslq 0x2c(%rsp), %rsi
callq 0x1e180
movq (%rax), %rax
movsd 0x60(%rax), %xmm0
imull $0x5, 0x2c(%rsp), %eax
addl $0x4, %eax
cltq
movsd %xmm0, 0x80(%rsp,%rax,8)
movl 0x2c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x2c(%rsp)
jmp 0x2b591
leaq 0x80(%rsp), %rdi
leaq 0x60(%rsp), %rdx
movl $0x4, %esi
callq 0x2adb0
movsd 0x60(%rsp), %xmm1
movsd 0x68(%rsp), %xmm0
movq 0x128(%rsp), %rax
movsd (%rax), %xmm2
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd 0x70(%rsp), %xmm1
movq 0x128(%rsp), %rax
movsd 0x8(%rax), %xmm2
mulsd %xmm2, %xmm1
addsd %xmm0, %xmm1
movsd 0x78(%rsp), %xmm0
movq 0x128(%rsp), %rax
mulsd (%rax), %xmm0
movq 0x128(%rsp), %rax
movsd 0x8(%rax), %xmm2
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, 0x48(%rsp)
movl $0x0, 0x2c(%rsp)
cmpl $0x4, 0x2c(%rsp)
jge 0x2b748
imull $0x5, 0x2c(%rsp), %eax
addl $0x0, %eax
cltq
movsd 0x139e2(%rip), %xmm0    # 0x3f058
movsd %xmm0, 0x80(%rsp,%rax,8)
movq 0x130(%rsp), %rdi
movslq 0x2c(%rsp), %rsi
callq 0x1e180
movq (%rax), %rax
movsd 0x278(%rax), %xmm0
imull $0x5, 0x2c(%rsp), %eax
addl $0x1, %eax
cltq
movsd %xmm0, 0x80(%rsp,%rax,8)
movq 0x130(%rsp), %rdi
movslq 0x2c(%rsp), %rsi
callq 0x1e180
movq (%rax), %rax
movsd 0x280(%rax), %xmm0
imull $0x5, 0x2c(%rsp), %eax
addl $0x2, %eax
cltq
movsd %xmm0, 0x80(%rsp,%rax,8)
movq 0x130(%rsp), %rdi
movslq 0x2c(%rsp), %rsi
callq 0x1e180
movq (%rax), %rax
movsd 0x278(%rax), %xmm0
movsd %xmm0, 0x10(%rsp)
movq 0x130(%rsp), %rdi
movslq 0x2c(%rsp), %rsi
callq 0x1e180
movsd 0x10(%rsp), %xmm0
movq (%rax), %rax
mulsd 0x280(%rax), %xmm0
imull $0x5, 0x2c(%rsp), %eax
addl $0x3, %eax
cltq
movsd %xmm0, 0x80(%rsp,%rax,8)
movl 0x2c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x2c(%rsp)
jmp 0x2b659
movl $0x0, 0x2c(%rsp)
cmpl $0x4, 0x2c(%rsp)
jge 0x2b794
movq 0x130(%rsp), %rdi
movslq 0x2c(%rsp), %rsi
callq 0x1e180
movq (%rax), %rax
movsd 0x90(%rax), %xmm0
imull $0x5, 0x2c(%rsp), %eax
addl $0x4, %eax
cltq
movsd %xmm0, 0x80(%rsp,%rax,8)
movl 0x2c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x2c(%rsp)
jmp 0x2b750
leaq 0x80(%rsp), %rdi
leaq 0x60(%rsp), %rdx
movl $0x4, %esi
callq 0x2adb0
movsd 0x60(%rsp), %xmm1
movsd 0x68(%rsp), %xmm0
movq 0x128(%rsp), %rax
movsd (%rax), %xmm2
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd 0x70(%rsp), %xmm1
movq 0x128(%rsp), %rax
movsd 0x8(%rax), %xmm2
mulsd %xmm2, %xmm1
addsd %xmm0, %xmm1
movsd 0x78(%rsp), %xmm0
movq 0x128(%rsp), %rax
mulsd (%rax), %xmm0
movq 0x128(%rsp), %rax
movsd 0x8(%rax), %xmm2
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, 0x50(%rsp)
movl $0x0, 0x2c(%rsp)
cmpl $0x4, 0x2c(%rsp)
jge 0x2b90a
imull $0x5, 0x2c(%rsp), %eax
addl $0x0, %eax
cltq
movsd 0x13820(%rip), %xmm0    # 0x3f058
movsd %xmm0, 0x80(%rsp,%rax,8)
movq 0x130(%rsp), %rdi
movslq 0x2c(%rsp), %rsi
callq 0x1e180
movq (%rax), %rax
movsd 0x278(%rax), %xmm0
imull $0x5, 0x2c(%rsp), %eax
addl $0x1, %eax
cltq
movsd %xmm0, 0x80(%rsp,%rax,8)
movq 0x130(%rsp), %rdi
movslq 0x2c(%rsp), %rsi
callq 0x1e180
movq (%rax), %rax
movsd 0x280(%rax), %xmm0
imull $0x5, 0x2c(%rsp), %eax
addl $0x2, %eax
cltq
movsd %xmm0, 0x80(%rsp,%rax,8)
movq 0x130(%rsp), %rdi
movslq 0x2c(%rsp), %rsi
callq 0x1e180
movq (%rax), %rax
movsd 0x278(%rax), %xmm0
movsd %xmm0, 0x8(%rsp)
movq 0x130(%rsp), %rdi
movslq 0x2c(%rsp), %rsi
callq 0x1e180
movsd 0x8(%rsp), %xmm0
movq (%rax), %rax
mulsd 0x280(%rax), %xmm0
imull $0x5, 0x2c(%rsp), %eax
addl $0x3, %eax
cltq
movsd %xmm0, 0x80(%rsp,%rax,8)
movl 0x2c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x2c(%rsp)
jmp 0x2b81b
movl $0x0, 0x2c(%rsp)
cmpl $0x4, 0x2c(%rsp)
jge 0x2b956
movq 0x130(%rsp), %rdi
movslq 0x2c(%rsp), %rsi
callq 0x1e180
movq (%rax), %rax
movsd 0xc0(%rax), %xmm0
imull $0x5, 0x2c(%rsp), %eax
addl $0x4, %eax
cltq
movsd %xmm0, 0x80(%rsp,%rax,8)
movl 0x2c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x2c(%rsp)
jmp 0x2b912
leaq 0x80(%rsp), %rdi
leaq 0x60(%rsp), %rdx
movl $0x4, %esi
callq 0x2adb0
movsd 0x60(%rsp), %xmm1
movsd 0x68(%rsp), %xmm0
movq 0x128(%rsp), %rax
movsd (%rax), %xmm2
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd 0x70(%rsp), %xmm1
movq 0x128(%rsp), %rax
movsd 0x8(%rax), %xmm2
mulsd %xmm2, %xmm1
addsd %xmm0, %xmm1
movsd 0x78(%rsp), %xmm0
movq 0x128(%rsp), %rax
mulsd (%rax), %xmm0
movq 0x128(%rsp), %rax
movsd 0x8(%rax), %xmm2
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, 0x58(%rsp)
movq 0x120(%rsp), %rsi
leaq 0x40(%rsp), %rdi
callq 0x21ad0
addq $0x138, %rsp            # imm = 0x138
retq
nop