// File: 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
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movq %rcx, -0x28(%rbp)
cmpl $0x2, -0x1c(%rbp)
jge 0x17ca9
movl $0x0, -0x4(%rbp)
jmp 0x17e1b
movq -0x18(%rbp), %rax
movsd 0x68(%rax), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x17cbf
jp 0x17cbf
jmp 0x17cd3
movq -0x18(%rbp), %rax
movsd 0x70(%rax), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x17cf7
jp 0x17cf7
movl $0x2, %edi
movl $0x1, %esi
leaq 0x2cdc(%rip), %rdx      # 0x1a9c0
movb $0x0, %al
callq 0x5740
movl $0x0, -0x4(%rbp)
jmp 0x17e1b
movq -0x18(%rbp), %rax
movsd 0x98(%rax), %xmm0
movl -0x1c(%rbp), %eax
subl $0x1, %eax
cvtsi2sd %eax, %xmm1
divsd %xmm1, %xmm0
movsd %xmm0, -0x30(%rbp)
movl $0x0, -0x3c(%rbp)
movl -0x3c(%rbp), %eax
cmpl -0x1c(%rbp), %eax
jge 0x17e14
movq -0x18(%rbp), %rax
movsd 0x90(%rax), %xmm1
movsd -0x30(%rbp), %xmm0
cvtsi2sdl -0x3c(%rbp), %xmm2
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd 0x2c49(%rip), %xmm1     # 0x1a998
mulsd %xmm1, %xmm0
movsd %xmm0, -0x38(%rbp)
movq -0x18(%rbp), %rax
movsd 0x68(%rax), %xmm0
movq -0x18(%rbp), %rax
movsd 0x70(%rax), %xmm1
movq -0x18(%rbp), %rax
movsd 0x2c22(%rip), %xmm2     # 0x1a998
mulsd 0x78(%rax), %xmm2
movsd -0x38(%rbp), %xmm3
movq -0x28(%rbp), %rdi
movslq -0x3c(%rbp), %rax
imulq $0x18, %rax, %rax
addq %rax, %rdi
movq -0x28(%rbp), %rsi
movslq -0x3c(%rbp), %rax
imulq $0x18, %rax, %rax
addq %rax, %rsi
addq $0x8, %rsi
callq 0x17e30
movq -0x18(%rbp), %rax
movsd 0x50(%rax), %xmm0
movq -0x28(%rbp), %rax
movslq -0x3c(%rbp), %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
addsd (%rax), %xmm0
movsd %xmm0, (%rax)
movq -0x18(%rbp), %rax
movsd 0x58(%rax), %xmm0
movq -0x28(%rbp), %rax
movslq -0x3c(%rbp), %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
addsd 0x8(%rax), %xmm0
movsd %xmm0, 0x8(%rax)
movq -0x18(%rbp), %rax
movsd 0x60(%rax), %xmm0
movq -0x28(%rbp), %rax
movslq -0x3c(%rbp), %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movsd %xmm0, 0x10(%rax)
movl -0x3c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3c(%rbp)
jmp 0x17d1d
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)