// File: /workspace/github_c_makefile_star2_O0/mohuangrui[P]ArtraCFD/computational_geometry.c
// Function: TransformVertex
static void TransformVertex(const Real O[restrict], const Real scale[restrict],
        const Real rotate[restrict][DIMS], const Real offset[restrict],
        Real box[restrict][LIMIT], const int vertN, Real v[restrict][DIMS])
{
    RealVec tmp = {0.0};
    for (int n = 0; n < vertN; ++n) {
        /* translate reference frame to a parallel frame at the reference point */
        v[n][X] = v[n][X] - O[X];
        v[n][Y] = v[n][Y] - O[Y];
        v[n][Z] = v[n][Z] - O[Z];
        /* scale */
        v[n][X] = v[n][X] * scale[X];
        v[n][Y] = v[n][Y] * scale[Y];
        v[n][Z] = v[n][Z] * scale[Z];
        /* rotate */
        tmp[X] = v[n][X];
        tmp[Y] = v[n][Y];
        tmp[Z] = v[n][Z];
        v[n][X] = Dot(rotate[X], tmp);
        v[n][Y] = Dot(rotate[Y], tmp);
        v[n][Z] = Dot(rotate[Z], tmp);
        /* translate with offset and then translate reference back to origin */
        v[n][X] = v[n][X] + offset[X] + O[X];
        v[n][Y] = v[n][Y] + offset[Y] + O[Y];
        v[n][Z] = v[n][Z] + offset[Z] + O[Z];
        for (int s = 0; s < DIMS; ++s) {
            box[s][MIN] = (box[s][MIN] < v[n][s]) ? box[s][MIN] : v[n][s];
            box[s][MAX] = (box[s][MAX] > v[n][s]) ? box[s][MAX] : v[n][s];
        }
    }
    return;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq 0x10(%rbp), %rax
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movl %r9d, -0x2c(%rbp)
leaq -0x50(%rbp), %rdi
xorl %esi, %esi
movl $0x18, %edx
callq 0x20d0
movl $0x0, -0x54(%rbp)
movl -0x54(%rbp), %eax
cmpl -0x2c(%rbp), %eax
jge 0xd683
movq 0x10(%rbp), %rax
movslq -0x54(%rbp), %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movsd (%rax), %xmm0
movq -0x8(%rbp), %rax
subsd (%rax), %xmm0
movq 0x10(%rbp), %rax
movslq -0x54(%rbp), %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movsd %xmm0, (%rax)
movq 0x10(%rbp), %rax
movslq -0x54(%rbp), %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movsd 0x8(%rax), %xmm0
movq -0x8(%rbp), %rax
subsd 0x8(%rax), %xmm0
movq 0x10(%rbp), %rax
movslq -0x54(%rbp), %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movsd %xmm0, 0x8(%rax)
movq 0x10(%rbp), %rax
movslq -0x54(%rbp), %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movsd 0x10(%rax), %xmm0
movq -0x8(%rbp), %rax
subsd 0x10(%rax), %xmm0
movq 0x10(%rbp), %rax
movslq -0x54(%rbp), %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movsd %xmm0, 0x10(%rax)
movq 0x10(%rbp), %rax
movslq -0x54(%rbp), %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movsd (%rax), %xmm0
movq -0x10(%rbp), %rax
mulsd (%rax), %xmm0
movq 0x10(%rbp), %rax
movslq -0x54(%rbp), %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movsd %xmm0, (%rax)
movq 0x10(%rbp), %rax
movslq -0x54(%rbp), %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movsd 0x8(%rax), %xmm0
movq -0x10(%rbp), %rax
mulsd 0x8(%rax), %xmm0
movq 0x10(%rbp), %rax
movslq -0x54(%rbp), %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movsd %xmm0, 0x8(%rax)
movq 0x10(%rbp), %rax
movslq -0x54(%rbp), %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movsd 0x10(%rax), %xmm0
movq -0x10(%rbp), %rax
mulsd 0x10(%rax), %xmm0
movq 0x10(%rbp), %rax
movslq -0x54(%rbp), %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movsd %xmm0, 0x10(%rax)
movq 0x10(%rbp), %rax
movslq -0x54(%rbp), %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movsd (%rax), %xmm0
movsd %xmm0, -0x50(%rbp)
movq 0x10(%rbp), %rax
movslq -0x54(%rbp), %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movsd 0x8(%rax), %xmm0
movsd %xmm0, -0x48(%rbp)
movq 0x10(%rbp), %rax
movslq -0x54(%rbp), %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movsd 0x10(%rax), %xmm0
movsd %xmm0, -0x40(%rbp)
movq -0x18(%rbp), %rdi
leaq -0x50(%rbp), %rsi
callq 0x9880
movq 0x10(%rbp), %rax
movslq -0x54(%rbp), %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movsd %xmm0, (%rax)
movq -0x18(%rbp), %rdi
addq $0x18, %rdi
leaq -0x50(%rbp), %rsi
callq 0x9880
movq 0x10(%rbp), %rax
movslq -0x54(%rbp), %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movsd %xmm0, 0x8(%rax)
movq -0x18(%rbp), %rdi
addq $0x30, %rdi
leaq -0x50(%rbp), %rsi
callq 0x9880
movq 0x10(%rbp), %rax
movslq -0x54(%rbp), %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movsd %xmm0, 0x10(%rax)
movq 0x10(%rbp), %rax
movslq -0x54(%rbp), %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movsd (%rax), %xmm0
movq -0x20(%rbp), %rax
addsd (%rax), %xmm0
movq -0x8(%rbp), %rax
addsd (%rax), %xmm0
movq 0x10(%rbp), %rax
movslq -0x54(%rbp), %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movsd %xmm0, (%rax)
movq 0x10(%rbp), %rax
movslq -0x54(%rbp), %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movsd 0x8(%rax), %xmm0
movq -0x20(%rbp), %rax
addsd 0x8(%rax), %xmm0
movq -0x8(%rbp), %rax
addsd 0x8(%rax), %xmm0
movq 0x10(%rbp), %rax
movslq -0x54(%rbp), %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movsd %xmm0, 0x8(%rax)
movq 0x10(%rbp), %rax
movslq -0x54(%rbp), %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movsd 0x10(%rax), %xmm0
movq -0x20(%rbp), %rax
addsd 0x10(%rax), %xmm0
movq -0x8(%rbp), %rax
addsd 0x10(%rax), %xmm0
movq 0x10(%rbp), %rax
movslq -0x54(%rbp), %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movsd %xmm0, 0x10(%rax)
movl $0x0, -0x58(%rbp)
cmpl $0x3, -0x58(%rbp)
jge 0xd673
movq -0x28(%rbp), %rax
movslq -0x58(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movsd (%rax), %xmm1
movq 0x10(%rbp), %rax
movslq -0x54(%rbp), %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movslq -0x58(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
ucomisd %xmm1, %xmm0
jbe 0xd5b1
movq -0x28(%rbp), %rax
movslq -0x58(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movsd (%rax), %xmm0
movsd %xmm0, -0x60(%rbp)
jmp 0xd5ce
movq 0x10(%rbp), %rax
movslq -0x54(%rbp), %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movslq -0x58(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
movsd %xmm0, -0x60(%rbp)
movsd -0x60(%rbp), %xmm0
movq -0x28(%rbp), %rax
movslq -0x58(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movsd %xmm0, (%rax)
movq -0x28(%rbp), %rax
movslq -0x58(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movsd 0x8(%rax), %xmm0
movq 0x10(%rbp), %rax
movslq -0x54(%rbp), %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movslq -0x58(%rbp), %rcx
ucomisd (%rax,%rcx,8), %xmm0
jbe 0xd62f
movq -0x28(%rbp), %rax
movslq -0x58(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movsd 0x8(%rax), %xmm0
movsd %xmm0, -0x68(%rbp)
jmp 0xd64c
movq 0x10(%rbp), %rax
movslq -0x54(%rbp), %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movslq -0x58(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
movsd %xmm0, -0x68(%rbp)
movsd -0x68(%rbp), %xmm0
movq -0x28(%rbp), %rax
movslq -0x58(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movsd %xmm0, 0x8(%rax)
movl -0x58(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x58(%rbp)
jmp 0xd55c
jmp 0xd675
movl -0x54(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x54(%rbp)
jmp 0xd2cb
addq $0x70, %rsp
popq %rbp
retq
nopl (%rax)