// File: /workspace/github_cpp_makefile_star2_O3/rurban[P]dgnlib/dgnstroke.cpp
// Function: DGNStrokeArc
int DGNStrokeArc( DGNHandle hFile, DGNElemArc *psArc, 
                  int nPoints, DGNPoint * pasPoints )

{
    double      dfAngleStep, dfAngle;
    int         i;

    if( nPoints < 2 )
        return FALSE;

    if( psArc->primary_axis == 0.0 || psArc->secondary_axis == 0.0 )
    {
        CPLError( CE_Warning, CPLE_AppDefined, 
                  "Zero primary or secondary axis in DGNStrokeArc()." );
        return FALSE;
    }

    dfAngleStep = psArc->sweepang / (nPoints - 1);
    for( i = 0; i < nPoints; i++ )
    {
        dfAngle = (psArc->startang + dfAngleStep * i) * DEG_TO_RAD;
        
        ComputePointOnArc2D( psArc->primary_axis, 
                             psArc->secondary_axis,
                             psArc->rotation * DEG_TO_RAD,
                             dfAngle,
                             &(pasPoints[i].x),
                             &(pasPoints[i].y) );
        pasPoints[i].x += psArc->origin.x;
        pasPoints[i].y += psArc->origin.y;
        pasPoints[i].z = psArc->origin.z;
    }

    return TRUE;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x40, %rsp
xorl %ebp, %ebp
cmpl $0x2, %edx
jl 0xe407
movq %rsi, %r14
movsd 0x68(%rsi), %xmm1
xorpd %xmm0, %xmm0
ucomisd %xmm0, %xmm1
jne 0xe3df
jnp 0xe3ed
movsd 0x70(%r14), %xmm1
ucomisd %xmm0, %xmm1
jne 0xe416
jp 0xe416
leaq 0x2a0c(%rip), %rdx      # 0x10e00
xorl %ebp, %ebp
movl $0x2, %edi
movl $0x1, %esi
xorl %eax, %eax
callq 0x460c
movl %ebp, %eax
addq $0x40, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rcx, %rbx
movsd 0x98(%r14), %xmm1
leal -0x1(%rdx), %eax
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
divsd %xmm0, %xmm1
movsd %xmm1, 0x38(%rsp)
movl %edx, %r15d
xorl %r12d, %r12d
xorps %xmm2, %xmm2
cvtsi2sd %r12d, %xmm2
mulsd 0x38(%rsp), %xmm2
addsd 0x90(%r14), %xmm2
movsd 0x297d(%rip), %xmm0     # 0x10dd8
mulsd %xmm0, %xmm2
movsd %xmm2, 0x8(%rsp)
movsd 0x78(%r14), %xmm1
mulsd %xmm0, %xmm1
movsd %xmm1, 0x30(%rsp)
movups 0x68(%r14), %xmm0
movaps %xmm0, 0x10(%rsp)
movapd %xmm2, %xmm0
callq 0x2550
movsd %xmm0, 0x28(%rsp)
movsd 0x8(%rsp), %xmm0
callq 0x20b0
movapd %xmm0, %xmm1
movapd 0x10(%rsp), %xmm3
mulpd %xmm3, %xmm3
movapd %xmm3, %xmm2
unpckhpd %xmm3, %xmm2            # xmm2 = xmm2[1],xmm3[1]
movapd %xmm3, %xmm0
mulsd %xmm2, %xmm0
movsd 0x28(%rsp), %xmm4
mulsd %xmm4, %xmm2
mulsd %xmm1, %xmm3
mulsd %xmm1, %xmm3
mulsd %xmm4, %xmm2
addsd %xmm3, %xmm2
divsd %xmm2, %xmm0
ucomisd 0x117b(%rip), %xmm0     # 0xf658
jb 0xe4e5
sqrtsd %xmm0, %xmm0
jmp 0xe4ea
callq 0x2210
movsd %xmm0, 0x10(%rsp)
movsd 0x8(%rsp), %xmm0
callq 0x2550
mulsd 0x10(%rsp), %xmm0
movsd %xmm0, 0x28(%rsp)
movsd 0x8(%rsp), %xmm0
callq 0x20b0
mulsd 0x10(%rsp), %xmm0
movsd %xmm0, 0x8(%rsp)
movsd 0x30(%rsp), %xmm0
callq 0x2550
movsd %xmm0, 0x10(%rsp)
movsd 0x30(%rsp), %xmm0
callq 0x20b0
mulsd 0x8(%rsp), %xmm0
movsd 0x10(%rsp), %xmm1
mulsd 0x28(%rsp), %xmm1
subsd %xmm0, %xmm1
movsd %xmm1, (%rbx)
movsd 0x30(%rsp), %xmm0
callq 0x20b0
movaps %xmm0, 0x10(%rsp)
movsd 0x30(%rsp), %xmm0
callq 0x2550
mulsd 0x8(%rsp), %xmm0
movapd 0x10(%rsp), %xmm1
mulsd 0x28(%rsp), %xmm1
addsd %xmm0, %xmm1
movsd %xmm1, 0x8(%rbx)
movapd %xmm1, %xmm2
movupd 0x50(%r14), %xmm0
movsd (%rbx), %xmm1
unpcklpd %xmm2, %xmm1            # xmm1 = xmm1[0],xmm2[0]
addpd %xmm0, %xmm1
movupd %xmm1, (%rbx)
movsd 0x60(%r14), %xmm0
movsd %xmm0, 0x10(%rbx)
incq %r12
addq $0x18, %rbx
cmpq %r12, %r15
jne 0xe43c
movl $0x1, %ebp
jmp 0xe407