// File: /workspace/github_cpp_makefile_star2_O2/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 0xd73b
movq %rsi, %r14
movsd 0x68(%rsi), %xmm1
xorpd %xmm0, %xmm0
ucomisd %xmm0, %xmm1
jne 0xd717
jnp 0xd725
movsd 0x70(%r14), %xmm1
ucomisd %xmm0, %xmm1
jne 0xd74a
jp 0xd74a
leaq 0x26e4(%rip), %rdx      # 0xfe10
xorl %ebp, %ebp
pushq $0x2
popq %rdi
pushq $0x1
popq %rsi
xorl %eax, %eax
callq 0x439c
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
cvtsi2sd %eax, %xmm0
divsd %xmm0, %xmm1
movsd %xmm1, 0x38(%rsp)
movl %edx, %r15d
xorl %r12d, %r12d
pushq $0x1
popq %rbp
cmpq %r12, %r15
je 0xd73b
cvtsi2sd %r12d, %xmm2
mulsd 0x38(%rsp), %xmm2
addsd 0x90(%r14), %xmm2
movsd 0x2657(%rip), %xmm0     # 0xfde8
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 0xe45(%rip), %xmm0      # 0xe658
jb 0xd81b
sqrtsd %xmm0, %xmm0
jmp 0xd820
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
jmp 0xd770