// File: /workspace/github_c_makefile_star2_O0/mohuangrui[P]ArtraCFD/computational_geometry.c
// Function: ComputeParametersSphere
static void ComputeParametersSphere(const int collapse, Polyhedron *poly)
{
    const Real pi = PI;
    /* bounding box */
    for (int s = 0; s < DIMS; ++s) {
        poly->box[s][MIN] = poly->O[s] - poly->r;
        poly->box[s][MAX] = poly->O[s] + poly->r;
    }
    /* geometric property */
    Real num = 0.0;
    if (COLLAPSEN == collapse) { /* no space dimension collapsed */
        poly->area = 4.0 * pi * poly->r * poly->r; /* area of a sphere */
        poly->volume = (4.0 / 3.0) * pi * poly->r * poly->r * poly->r; /* volume of a sphere */
        num = 0.4;
    } else {
        poly->area = 2.0 * pi * poly->r; /* side area of a unit thickness cylinder */
        poly->volume = pi * poly->r * poly->r; /* volume of a unit thickness cylinder */
        num = 0.5;
    }
    num = num * poly->r * poly->r * poly->volume;
    poly->I[X][X] = num;  poly->I[X][Y] = 0.0;  poly->I[X][Z] = 0.0;
    poly->I[Y][X] = 0.0;  poly->I[Y][Y] = num;  poly->I[Y][Z] = 0.0;
    poly->I[Z][X] = 0.0;  poly->I[Z][Y] = 0.0;  poly->I[Z][Z] = num;
    return;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
leaq 0x19e86(%rip), %rax     # 0x277a8
movsd (%rax), %xmm0
movsd %xmm0, -0x18(%rbp)
movl $0x0, -0x1c(%rbp)
cmpl $0x3, -0x1c(%rbp)
jge 0xd9a4
movq -0x10(%rbp), %rax
movslq -0x1c(%rbp), %rcx
movsd 0x20(%rax,%rcx,8), %xmm0
movq -0x10(%rbp), %rax
subsd 0x18(%rax), %xmm0
movq -0x10(%rbp), %rax
addq $0x1d0, %rax            # imm = 0x1D0
movslq -0x1c(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movsd %xmm0, (%rax)
movq -0x10(%rbp), %rax
movslq -0x1c(%rbp), %rcx
movsd 0x20(%rax,%rcx,8), %xmm0
movq -0x10(%rbp), %rax
addsd 0x18(%rax), %xmm0
movq -0x10(%rbp), %rax
addq $0x1d0, %rax            # imm = 0x1D0
movslq -0x1c(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movsd %xmm0, 0x8(%rax)
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0xd932
xorps %xmm0, %xmm0
movsd %xmm0, -0x28(%rbp)
xorl %eax, %eax
cmpl -0x4(%rbp), %eax
jne 0xda21
movsd 0x19f25(%rip), %xmm0    # 0x278e0
mulsd -0x18(%rbp), %xmm0
movq -0x10(%rbp), %rax
mulsd 0x18(%rax), %xmm0
movq -0x10(%rbp), %rax
mulsd 0x18(%rax), %xmm0
movq -0x10(%rbp), %rax
movsd %xmm0, 0x1c0(%rax)
movsd 0x19ef2(%rip), %xmm0    # 0x278d8
mulsd -0x18(%rbp), %xmm0
movq -0x10(%rbp), %rax
mulsd 0x18(%rax), %xmm0
movq -0x10(%rbp), %rax
mulsd 0x18(%rax), %xmm0
movq -0x10(%rbp), %rax
mulsd 0x18(%rax), %xmm0
movq -0x10(%rbp), %rax
movsd %xmm0, 0x1c8(%rax)
movsd 0x19eb6(%rip), %xmm0    # 0x278d0
movsd %xmm0, -0x28(%rbp)
jmp 0xda73
movsd 0x19cf7(%rip), %xmm0    # 0x27720
mulsd -0x18(%rbp), %xmm0
movq -0x10(%rbp), %rax
mulsd 0x18(%rax), %xmm0
movq -0x10(%rbp), %rax
movsd %xmm0, 0x1c0(%rax)
movsd -0x18(%rbp), %xmm0
movq -0x10(%rbp), %rax
mulsd 0x18(%rax), %xmm0
movq -0x10(%rbp), %rax
mulsd 0x18(%rax), %xmm0
movq -0x10(%rbp), %rax
movsd %xmm0, 0x1c8(%rax)
movsd 0x19c9a(%rip), %xmm0    # 0x27708
movsd %xmm0, -0x28(%rbp)
movsd -0x28(%rbp), %xmm0
movq -0x10(%rbp), %rax
mulsd 0x18(%rax), %xmm0
movq -0x10(%rbp), %rax
mulsd 0x18(%rax), %xmm0
movq -0x10(%rbp), %rax
mulsd 0x1c8(%rax), %xmm0
movsd %xmm0, -0x28(%rbp)
movsd -0x28(%rbp), %xmm0
movq -0x10(%rbp), %rax
movsd %xmm0, 0x38(%rax)
movq -0x10(%rbp), %rax
xorps %xmm0, %xmm0
movsd %xmm0, 0x40(%rax)
movq -0x10(%rbp), %rax
xorps %xmm0, %xmm0
movsd %xmm0, 0x48(%rax)
movq -0x10(%rbp), %rax
xorps %xmm0, %xmm0
movsd %xmm0, 0x50(%rax)
movsd -0x28(%rbp), %xmm0
movq -0x10(%rbp), %rax
movsd %xmm0, 0x58(%rax)
movq -0x10(%rbp), %rax
xorps %xmm0, %xmm0
movsd %xmm0, 0x60(%rax)
movq -0x10(%rbp), %rax
xorps %xmm0, %xmm0
movsd %xmm0, 0x68(%rax)
movq -0x10(%rbp), %rax
xorps %xmm0, %xmm0
movsd %xmm0, 0x70(%rax)
movsd -0x28(%rbp), %xmm0
movq -0x10(%rbp), %rax
movsd %xmm0, 0x78(%rax)
popq %rbp
retq
nop