// File: /workspace/github_cpp_makefile_star2_O1/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 $0x30, %rsp
xorl %ebp, %ebp
cmpl $0x2, %edx
jl 0xec1b
movq %rsi, %r14
movsd 0x68(%rsi), %xmm1
xorpd %xmm0, %xmm0
ucomisd %xmm0, %xmm1
jne 0xebf3
jnp 0xec01
movsd 0x70(%r14), %xmm1
ucomisd %xmm0, %xmm1
jne 0xec2a
jp 0xec2a
leaq 0x3138(%rip), %rdx      # 0x11d40
xorl %ebp, %ebp
movl $0x2, %edi
movl $0x1, %esi
xorl %eax, %eax
callq 0x46dc
movl %ebp, %eax
addq $0x30, %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, 0x20(%rsp)
movl %edx, %r15d
xorl %r12d, %r12d
xorps %xmm2, %xmm2
cvtsi2sd %r12d, %xmm2
mulsd 0x20(%rsp), %xmm2
addsd 0x90(%r14), %xmm2
movsd 0x30a9(%rip), %xmm0     # 0x11d18
mulsd %xmm0, %xmm2
movsd %xmm2, 0x8(%rsp)
movsd 0x68(%r14), %xmm1
movsd %xmm1, (%rsp)
movsd 0x70(%r14), %xmm1
movsd %xmm1, 0x10(%rsp)
movsd 0x78(%r14), %xmm1
mulsd %xmm0, %xmm1
movsd %xmm1, 0x18(%rsp)
movapd %xmm2, %xmm0
callq 0x2560
movsd %xmm0, 0x28(%rsp)
movsd 0x8(%rsp), %xmm0
callq 0x20b0
movapd %xmm0, %xmm1
movsd (%rsp), %xmm3
mulsd %xmm3, %xmm3
movsd 0x10(%rsp), %xmm2
mulsd %xmm2, %xmm2
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 0x1939(%rip), %xmm0     # 0x10638
jb 0xed07
sqrtsd %xmm0, %xmm0
jmp 0xed0c
callq 0x2220
movsd %xmm0, (%rsp)
movsd 0x8(%rsp), %xmm0
callq 0x2560
mulsd (%rsp), %xmm0
movsd %xmm0, 0x10(%rsp)
movsd 0x8(%rsp), %xmm0
callq 0x20b0
mulsd (%rsp), %xmm0
movsd %xmm0, 0x8(%rsp)
movsd 0x18(%rsp), %xmm0
callq 0x2560
movsd %xmm0, (%rsp)
movsd 0x18(%rsp), %xmm0
callq 0x20b0
mulsd 0x8(%rsp), %xmm0
movsd (%rsp), %xmm1
mulsd 0x10(%rsp), %xmm1
subsd %xmm0, %xmm1
movsd %xmm1, (%rbx)
movsd 0x18(%rsp), %xmm0
callq 0x20b0
movsd %xmm0, (%rsp)
movsd 0x18(%rsp), %xmm0
callq 0x2560
mulsd 0x8(%rsp), %xmm0
movsd (%rsp), %xmm1
mulsd 0x10(%rsp), %xmm1
addsd %xmm0, %xmm1
movsd %xmm1, 0x8(%rbx)
movsd 0x50(%r14), %xmm0
addsd (%rbx), %xmm0
movsd %xmm0, (%rbx)
addsd 0x58(%r14), %xmm1
movsd %xmm1, 0x8(%rbx)
movsd 0x60(%r14), %xmm0
movsd %xmm0, 0x10(%rbx)
incq %r12
addq $0x18, %rbx
cmpq %r12, %r15
jne 0xec50
movl $0x1, %ebp
jmp 0xec1b