// File: openflightmaps[P]ofm2xplane/main.cpp
// Function: write_coordinatesC(rapidxml::xml_node<char>*, std::basic_ofstream<char, std::char_traits<char>>&, int, int)
void write_coordinatesC(xml_node<> *source, ofstream &out, int line, int light)
{
    // Same as write_coordinates(), but ending with a closed loop.
    // Extracting coordinates 
    string s(source->value());
    size_t l=0,r=-1, ll, rr;
    int c=0;
    long double x,y,bx,by,n;
    long double shift, factor, exponent;
    int last;
    int ex;
    
    long double area=0;
    
    long double x1, y1, x2, y2, x3, y3, x4, y4;
    long double t, c1, c2;
    
    shift=my_stold(string(def->first_node("others")->first_node("Bezier")->first_node("Shift")->value()));
    factor=my_stold(string(def->first_node("others")->first_node("Bezier")->first_node("Factor")->value()));
    exponent=my_stold(string(def->first_node("others")->first_node("Bezier")->first_node("Exp")->value()));
    
    while(true)
    {
        l=s.find_first_of("1234567890.",r+1);
        r=s.find_first_not_of("1234567890.",l)-1;
        c++;
        if(r==s.npos-1)
            break;
    }
    c--;

    long double *coor=new long double[c];
    l=0;
    r=-1;
    
    for(int i=0;i<c;i++)
    {
        l=s.find_first_of("1234567890.",r+1);
        r=s.find_first_not_of("11234567890.",l)-1;
        coor[i]=my_stold(s.substr(l,r-l+1));
    }
    for(int i=0;i<c-2;i=i+6)
        area+=coor[i]*coor[i+7]-coor[i+6]*coor[i+1];
    area-=coor[0]*coor[c-1] - coor[1]*coor[c-2];
    
    
    if(area<0)
    {
        last=6;
        while(coor[last]==coor[last-6] && coor[last+1]==coor[last-5])
            last+=6;
        //cout << "Correction of direction!" << endl;
        for(int i=c-2;i>0;i=i-6)
        {
            /*x1=coor[i], y1=coor[i+1], 
            x2=coor[i-2], y2=coor[i-1],
            x3=coor[i-4], y3=coor[i-3], 
            x4=coor[i-6], y4=coor[i-5];*/
            if(coor[i]==coor[i-6] && coor[i+1]==coor[i-5])
                continue;

            area=coor[i]*(coor[i-1]-coor[i-5])+coor[i-2]*(coor[i-3]-coor[i+1])+coor[i-4]*(coor[i-5]-coor[i-1])+coor[i-6]*(coor[i+1]-coor[i-3]);
            
            if(area==0 || isnan(area))
                n=1.0;
            else
            {
                frexpl(area,&ex);
                n=int(pow((ex+shift)*factor, exponent))+1.0;
            }
            for(long double j=0.0; j<=n; j=j+1.0)
            {
                /* if(i!=c-2 && j==0)
                    continue; */
                t=j/n;
                x=(1-t)*(1-t)*(1-t)*coor[i] + 
                3*(1-t)*(1-t)*t*coor[i-2] +
                3*(1-t)*t*t*coor[i-4] +
                t*t*t*coor[i-6];
                
                y=(1-t)*(1-t)*(1-t)*coor[i+1] +
                3*(1-t)*(1-t)*t*coor[i-1] + 
                3*(1-t)*t*t*coor[i-3] +
                t*t*t*coor[i-5];
                if(i>last || j<n)
                    out << "111 " << y << " " << x << " ";    
                else
                    out << "113 " << y << " " << x << " ";
                if(line!=0)
                    out << line << " ";
                if(light!=0)
                    out << light << " ";
                out << endl;
            }
        }
    }
    else
    {
        //cout << "Good direction!" << endl;
        last=c-8;
        while(coor[last]==coor[last+6] && coor[last+1]==coor[last+7])
            last-=6;
        for(int i=0;i<c-2;i=i+6)
        {
            /*x1=coor[i], y1=coor[i+1], 
            x2=coor[i+2], y2=coor[i+3],
            x3=coor[i+4], y3=coor[i+5], 
            x4=coor[i+6], y4=coor[i+7];*/
            if(coor[i]==coor[i+6] && coor[i+1]==coor[i+7])
                continue;
            
            area=coor[i]*(coor[i+3]-coor[i+7])+coor[i+2]*(coor[i+5]-coor[i+1])+coor[i+4]*(coor[i+7]-coor[i+3])+coor[i+6]*(coor[i+1]-coor[i+5]);

            if(area==0 || isnan(area))
                n=1;
            else
            {
                frexpl(area,&ex);
                n=int(pow((ex+shift)*factor, exponent))+1.0;
            }
            
            for(long double j=0.0; j<=n; j=j+1)
            {
                /* if(j==0 && i!=0)
                    continue; */
                t=j/n;
                
                x=(1-t)*(1-t)*(1-t)*coor[i] + 
                3*(1-t)*(1-t)*t*coor[i+2] +
                3*(1-t)*t*t*coor[i+4] +
                t*t*t*coor[i+6];
                
                y=(1-t)*(1-t)*(1-t)*coor[i+1] +
                3*(1-t)*(1-t)*t*coor[i+3] + 
                3*(1-t)*t*t*coor[i+5] +
                t*t*t*coor[i+7];
                
                if(i<last || j<n)
                    out << "111 " << y << " " << x << " ";
                else
                    out << "113 " << y << " " << x << " ";
                if(line!=0)
                    out << line << " ";
                if(light!=0)
                    out << light << " ";
                out << endl;
            }
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x4d0, %rsp            # imm = 0x4D0
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movl %ecx, -0x18(%rbp)
movq -0x8(%rbp), %rdi
callq 0xcd90
movq %rax, -0x2e8(%rbp)
leaq -0x39(%rbp), %rdi
movq %rdi, -0x2e0(%rbp)
callq 0x3450
movq -0x2e8(%rbp), %rsi
movq -0x2e0(%rbp), %rdx
leaq -0x38(%rbp), %rdi
callq 0xcdd0
jmp 0x9002
leaq -0x39(%rbp), %rdi
callq 0x3260
movq $0x0, -0x58(%rbp)
movq $-0x1, -0x60(%rbp)
movl $0x0, -0x74(%rbp)
fldz
fstpt -0x120(%rbp)
movq 0xd26f(%rip), %rdi      # 0x162a0
leaq 0x84cb(%rip), %rsi      # 0x11503
xorl %eax, %eax
movl %eax, %edx
movl $0x1, %ecx
callq 0xca70
movq %rax, -0x2f0(%rbp)
jmp 0x904f
movq -0x2f0(%rbp), %rdi
leaq 0x84d4(%rip), %rsi      # 0x11531
xorl %eax, %eax
movl %eax, %edx
movl $0x1, %ecx
callq 0xca70
movq %rax, -0x2f8(%rbp)
jmp 0x9074
movq -0x2f8(%rbp), %rdi
leaq 0x84b6(%rip), %rsi      # 0x11538
xorl %eax, %eax
movl %eax, %edx
movl $0x1, %ecx
callq 0xca70
movq %rax, -0x300(%rbp)
jmp 0x9099
movq -0x300(%rbp), %rdi
callq 0xcd90
movq %rax, -0x308(%rbp)
jmp 0x90ae
leaq -0x1f1(%rbp), %rdi
movq %rdi, -0x310(%rbp)
callq 0x3450
movq -0x308(%rbp), %rsi
movq -0x310(%rbp), %rdx
leaq -0x1f0(%rbp), %rdi
callq 0xcdd0
jmp 0x90dd
leaq -0x1f0(%rbp), %rdi
xorl %esi, %esi
callq 0xb960
fstpt -0x31c(%rbp)
jmp 0x90f3
fldt -0x31c(%rbp)
fstpt -0xe0(%rbp)
leaq -0x1f0(%rbp), %rdi
callq 0x3160
leaq -0x1f1(%rbp), %rdi
callq 0x3260
movq 0xd182(%rip), %rdi      # 0x162a0
leaq 0x83de(%rip), %rsi      # 0x11503
xorl %eax, %eax
movl %eax, %edx
movl $0x1, %ecx
callq 0xca70
movq %rax, -0x328(%rbp)
jmp 0x913c
movq -0x328(%rbp), %rdi
leaq 0x83e7(%rip), %rsi      # 0x11531
xorl %eax, %eax
movl %eax, %edx
movl $0x1, %ecx
callq 0xca70
movq %rax, -0x330(%rbp)
jmp 0x9161
movq -0x330(%rbp), %rdi
leaq 0x83cf(%rip), %rsi      # 0x1153e
xorl %eax, %eax
movl %eax, %edx
movl $0x1, %ecx
callq 0xca70
movq %rax, -0x338(%rbp)
jmp 0x9186
movq -0x338(%rbp), %rdi
callq 0xcd90
movq %rax, -0x340(%rbp)
jmp 0x919b
leaq -0x219(%rbp), %rdi
movq %rdi, -0x348(%rbp)
callq 0x3450
movq -0x340(%rbp), %rsi
movq -0x348(%rbp), %rdx
leaq -0x218(%rbp), %rdi
callq 0xcdd0
jmp 0x91ca
leaq -0x218(%rbp), %rdi
xorl %esi, %esi
callq 0xb960
fstpt -0x354(%rbp)
jmp 0x91e0
fldt -0x354(%rbp)
fstpt -0xf0(%rbp)
leaq -0x218(%rbp), %rdi
callq 0x3160
leaq -0x219(%rbp), %rdi
callq 0x3260
movq 0xd095(%rip), %rdi      # 0x162a0
leaq 0x82f1(%rip), %rsi      # 0x11503
xorl %eax, %eax
movl %eax, %edx
movl $0x1, %ecx
callq 0xca70
movq %rax, -0x360(%rbp)
jmp 0x9229
movq -0x360(%rbp), %rdi
leaq 0x82fa(%rip), %rsi      # 0x11531
xorl %eax, %eax
movl %eax, %edx
movl $0x1, %ecx
callq 0xca70
movq %rax, -0x368(%rbp)
jmp 0x924e
movq -0x368(%rbp), %rdi
leaq 0x82e9(%rip), %rsi      # 0x11545
xorl %eax, %eax
movl %eax, %edx
movl $0x1, %ecx
callq 0xca70
movq %rax, -0x370(%rbp)
jmp 0x9273
movq -0x370(%rbp), %rdi
callq 0xcd90
movq %rax, -0x378(%rbp)
jmp 0x9288
leaq -0x241(%rbp), %rdi
movq %rdi, -0x380(%rbp)
callq 0x3450
movq -0x378(%rbp), %rsi
movq -0x380(%rbp), %rdx
leaq -0x240(%rbp), %rdi
callq 0xcdd0
jmp 0x92b7
leaq -0x240(%rbp), %rdi
xorl %esi, %esi
callq 0xb960
fstpt -0x38c(%rbp)
jmp 0x92cd
fldt -0x38c(%rbp)
fstpt -0x100(%rbp)
leaq -0x240(%rbp), %rdi
callq 0x3160
leaq -0x241(%rbp), %rdi
callq 0x3260
jmp 0x92f3
movq -0x60(%rbp), %rdx
addq $0x1, %rdx
leaq -0x38(%rbp), %rdi
leaq 0x8215(%rip), %rsi      # 0x1151b
callq 0x3120
movq %rax, -0x58(%rbp)
movq -0x58(%rbp), %rdx
leaq -0x38(%rbp), %rdi
leaq 0x81fd(%rip), %rsi      # 0x1151b
callq 0x3150
subq $0x1, %rax
movq %rax, -0x60(%rbp)
movl -0x74(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x74(%rbp)
cmpq $-0x2, -0x60(%rbp)
jne 0x9414
jmp 0x9419
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x39(%rbp), %rdi
callq 0x3260
jmp 0xa14c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0xa143
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x9395
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x1f0(%rbp), %rdi
callq 0x3160
leaq -0x1f1(%rbp), %rdi
callq 0x3260
jmp 0xa143
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x93cc
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x218(%rbp), %rdi
callq 0x3160
leaq -0x219(%rbp), %rdi
callq 0x3260
jmp 0xa143
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x9403
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x240(%rbp), %rdi
callq 0x3160
leaq -0x241(%rbp), %rdi
callq 0x3260
jmp 0xa143
jmp 0x92f1
movl -0x74(%rbp), %eax
decl %eax
movl %eax, -0x74(%rbp)
movslq -0x74(%rbp), %rax
movl $0x10, %ecx
mulq %rcx
movq %rax, %rdi
movq $-0x1, %rax
cmovoq %rax, %rdi
callq 0x3030
movq %rax, -0x398(%rbp)
jmp 0x9449
movq -0x398(%rbp), %rax
movq %rax, -0x250(%rbp)
movq $0x0, -0x58(%rbp)
movq $-0x1, -0x60(%rbp)
movl $0x0, -0x254(%rbp)
movl -0x254(%rbp), %eax
cmpl -0x74(%rbp), %eax
jge 0x9551
movq -0x60(%rbp), %rdx
incq %rdx
leaq 0x808d(%rip), %rsi      # 0x1151b
leaq -0x38(%rbp), %rdi
movq %rdi, -0x3a0(%rbp)
callq 0x3120
movq -0x3a0(%rbp), %rdi
movq %rax, -0x58(%rbp)
movq -0x58(%rbp), %rdx
leaq 0x8066(%rip), %rsi      # 0x1151a
callq 0x3150
movq -0x3a0(%rbp), %rsi
decq %rax
movq %rax, -0x60(%rbp)
movq -0x58(%rbp), %rdx
movq -0x60(%rbp), %rcx
subq %rdx, %rcx
incq %rcx
leaq -0x278(%rbp), %rdi
callq 0x3230
jmp 0x94e3
leaq -0x278(%rbp), %rdi
xorl %esi, %esi
callq 0xb960
fstpt -0x3ac(%rbp)
jmp 0x94f9
fldt -0x3ac(%rbp)
movq -0x250(%rbp), %rax
movslq -0x254(%rbp), %rcx
shlq $0x4, %rcx
fstpt (%rax,%rcx)
leaq -0x278(%rbp), %rdi
callq 0x3160
movl -0x254(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x254(%rbp)
jmp 0x9471
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x278(%rbp), %rdi
callq 0x3160
jmp 0xa143
movl $0x0, -0x27c(%rbp)
movl -0x27c(%rbp), %eax
movl -0x74(%rbp), %ecx
subl $0x2, %ecx
cmpl %ecx, %eax
jge 0x95b3
movq -0x250(%rbp), %rax
movslq -0x27c(%rbp), %rcx
shlq $0x4, %rcx
fldt (%rax,%rcx)
fldt 0x70(%rax,%rcx)
fldt 0x60(%rax,%rcx)
fldt 0x10(%rax,%rcx)
fmulp %st, %st(1)
fxch %st(2)
fmulp %st, %st(1)
fsubp %st, %st(1)
fldt -0x120(%rbp)
faddp %st, %st(1)
fstpt -0x120(%rbp)
movl -0x27c(%rbp), %eax
addl $0x6, %eax
movl %eax, -0x27c(%rbp)
jmp 0x955b
movq -0x250(%rbp), %rax
fldt (%rax)
movl -0x74(%rbp), %ecx
movl %ecx, %edx
decl %edx
movslq %edx, %rdx
shlq $0x4, %rdx
fldt (%rax,%rdx)
fldt 0x10(%rax)
addl $-0x2, %ecx
movslq %ecx, %rcx
shlq $0x4, %rcx
fldt (%rax,%rcx)
fmulp %st, %st(1)
fxch %st(2)
fmulp %st, %st(1)
fsubp %st, %st(1)
fldt -0x120(%rbp)
fsubp %st, %st(1)
fstpt -0x120(%rbp)
fldt -0x120(%rbp)
fldz
fucompi %st(1), %st
fstp %st(0)
jbe 0x9bef
jmp 0x9607
movl $0x6, -0x104(%rbp)
movq -0x250(%rbp), %rax
movslq -0x104(%rbp), %rdx
movl %edx, %ecx
shlq $0x4, %rdx
fldt (%rax,%rdx)
addl $-0x6, %ecx
movslq %ecx, %rcx
shlq $0x4, %rcx
fldt (%rax,%rcx)
xorl %eax, %eax
fxch %st(1)
fucompi %st(1), %st
fstp %st(0)
movb %al, -0x3ad(%rbp)
jne 0x9682
jp 0x9682
jmp 0x9649
movq -0x250(%rbp), %rax
movslq -0x104(%rbp), %rdx
movl %edx, %ecx
shlq $0x4, %rdx
fldt 0x10(%rdx,%rax)
addl $-0x5, %ecx
movslq %ecx, %rcx
shlq $0x4, %rcx
fldt (%rax,%rcx)
fxch %st(1)
fucompi %st(1), %st
fstp %st(0)
setnp %cl
sete %al
andb %cl, %al
movb %al, -0x3ad(%rbp)
movb -0x3ad(%rbp), %al
testb $0x1, %al
jne 0x968e
jmp 0x96a2
movl -0x104(%rbp), %eax
addl $0x6, %eax
movl %eax, -0x104(%rbp)
jmp 0x9611
movl -0x74(%rbp), %eax
subl $0x2, %eax
movl %eax, -0x280(%rbp)
cmpl $0x0, -0x280(%rbp)
jle 0x9bea
movq -0x250(%rbp), %rax
movslq -0x280(%rbp), %rdx
movl %edx, %ecx
shlq $0x4, %rdx
fldt (%rax,%rdx)
addl $-0x6, %ecx
movslq %ecx, %rcx
shlq $0x4, %rcx
fldt (%rax,%rcx)
fxch %st(1)
fucompi %st(1), %st
fstp %st(0)
jne 0x9721
jp 0x9721
jmp 0x96eb
movq -0x250(%rbp), %rax
movslq -0x280(%rbp), %rdx
movl %edx, %ecx
shlq $0x4, %rdx
fldt 0x10(%rdx,%rax)
addl $-0x5, %ecx
movslq %ecx, %rcx
shlq $0x4, %rcx
fldt (%rax,%rcx)
fxch %st(1)
fucompi %st(1), %st
fstp %st(0)
jne 0x9721
jp 0x9721
jmp 0x971c
jmp 0x9bd6
movq -0x250(%rbp), %rax
movq %rax, -0x3c0(%rbp)
movslq -0x280(%rbp), %rdx
movl %edx, %ecx
shlq $0x4, %rdx
fldt (%rax,%rdx)
fstpt -0x3b8(%rbp)
movl %ecx, %esi
decl %esi
movslq %esi, %rsi
shlq $0x4, %rsi
fldt (%rax,%rsi)
movl %ecx, %esi
addl $-0x5, %esi
movslq %esi, %rsi
shlq $0x4, %rsi
fldt (%rax,%rsi)
fld %st(1)
fsub %st(1), %st
movl %ecx, %esi
addl $-0x2, %esi
movslq %esi, %rsi
shlq $0x4, %rsi
fldt (%rax,%rsi)
movl %ecx, %esi
addl $-0x3, %esi
movslq %esi, %rsi
shlq $0x4, %rsi
fldt (%rax,%rsi)
fldt 0x10(%rax,%rdx)
fld %st(1)
fsub %st(1), %st
fmulp %st, %st(3)
fldt -0x3b8(%rbp)
fmulp %st, %st(4)
fxch %st(3)
faddp %st, %st(2)
movl %ecx, %edx
addl $-0x4, %edx
movslq %edx, %rdx
shlq $0x4, %rdx
fldt (%rax,%rdx)
fxch %st(4)
fsubp %st, %st(5)
fxch %st(3)
fmulp %st, %st(4)
faddp %st, %st(3)
addl $-0x6, %ecx
movslq %ecx, %rcx
shlq $0x4, %rcx
fldt (%rax,%rcx)
fxch %st(1)
fsubp %st, %st(2)
fmulp %st, %st(1)
faddp %st, %st(1)
fstpt -0x120(%rbp)
fldt -0x120(%rbp)
fldz
fxch %st(1)
fucompi %st(1), %st
fstp %st(0)
jne 0x97e2
jp 0x97e2
jmp 0x9806
fldt -0x120(%rbp)
movq %rsp, %rax
fstpt (%rax)
callq 0xcee0
movb %al, -0x3c1(%rbp)
jmp 0x97fa
movb -0x3c1(%rbp), %al
testb $0x1, %al
jne 0x9806
jmp 0x9813
fld1
fstpt -0xd0(%rbp)
jmp 0x98c2
fldt -0x120(%rbp)
movq %rsp, %rax
fstpt (%rax)
leaq -0x108(%rbp), %rdi
callq 0x3380
fstp %st(0)
movl -0x108(%rbp), %eax
movl %eax, -0x2c4(%rbp)
fildl -0x2c4(%rbp)
fldt -0xe0(%rbp)
faddp %st, %st(1)
fldt -0xf0(%rbp)
fmulp %st, %st(1)
fldt -0x100(%rbp)
movq %rsp, %rax
fstpt 0x10(%rax)
fstpt (%rax)
callq 0xcf00
fstpt -0x3cc(%rbp)
jmp 0x9869
fldt -0x3cc(%rbp)
fnstcw -0x2d2(%rbp)
movzwl -0x2d2(%rbp), %eax
orl $0xc00, %eax            # imm = 0xC00
movw %ax, -0x2d4(%rbp)
fldcw -0x2d4(%rbp)
fistpl -0x2c8(%rbp)
fldcw -0x2d2(%rbp)
cvtsi2sdl -0x2c8(%rbp), %xmm0
movsd 0x777e(%rip), %xmm1     # 0x11028
addsd %xmm1, %xmm0
movsd %xmm0, -0x2d0(%rbp)
fldl -0x2d0(%rbp)
fstpt -0xd0(%rbp)
fldz
fstpt -0x290(%rbp)
fldt -0x290(%rbp)
fldt -0xd0(%rbp)
fucompi %st(1), %st
fstp %st(0)
jb 0x9bd4
jmp 0x98e2
fldt -0x290(%rbp)
fldt -0xd0(%rbp)
fdivrp %st, %st(1)
fstpt -0x1b0(%rbp)
fldt -0x1b0(%rbp)
fld1
fld %st(0)
fsub %st(2), %st
fld %st(0)
fmul %st(1), %st
fmul %st(1), %st
movq -0x250(%rbp), %rax
movslq -0x280(%rbp), %rdx
movl %edx, %ecx
shlq $0x4, %rdx
fldt (%rax,%rdx)
flds 0x7727(%rip)            # 0x1104c
fld %st(0)
fstpt -0x3d8(%rbp)
fmul %st(3), %st
fmul %st, %st(3)
fxch %st(3)
fmul %st(5), %st
movl %ecx, %edx
addl $-0x2, %edx
movslq %edx, %rdx
shlq $0x4, %rdx
fldt (%rax,%rdx)
fmulp %st, %st(1)
fldt -0x3d8(%rbp)
fxch %st(3)
fmulp %st, %st(2)
faddp %st, %st(1)
fxch %st(2)
fmul %st(4), %st
fmul %st(4), %st
movl %ecx, %edx
addl $-0x4, %edx
movslq %edx, %rdx
shlq $0x4, %rdx
fldt (%rax,%rdx)
fmulp %st, %st(1)
faddp %st, %st(2)
fld %st(3)
fmul %st(4), %st
fmulp %st, %st(4)
addl $-0x6, %ecx
movslq %ecx, %rcx
shlq $0x4, %rcx
fldt (%rax,%rcx)
fmulp %st, %st(4)
fxch %st(3)
faddp %st, %st(1)
fstpt -0x90(%rbp)
fldt -0x1b0(%rbp)
fsubr %st, %st(1)
fld %st(1)
fmul %st(2), %st
fmul %st(2), %st
movq -0x250(%rbp), %rax
movslq -0x280(%rbp), %rdx
movl %edx, %ecx
shlq $0x4, %rdx
fldt 0x10(%rdx,%rax)
fxch %st(4)
fmul %st(3), %st
fmul %st, %st(3)
fxch %st(3)
fmul %st(2), %st
movl %ecx, %edx
decl %edx
movslq %edx, %rdx
shlq $0x4, %rdx
fldt (%rax,%rdx)
fmulp %st, %st(1)
fxch %st(1)
fmulp %st, %st(4)
faddp %st, %st(3)
fmul %st, %st(1)
fmul %st, %st(1)
movl %ecx, %edx
addl $-0x3, %edx
movslq %edx, %rdx
shlq $0x4, %rdx
fldt (%rax,%rdx)
fmulp %st, %st(2)
fxch %st(1)
faddp %st, %st(2)
fld %st(0)
fmul %st(1), %st
fmulp %st, %st(1)
addl $-0x5, %ecx
movslq %ecx, %rcx
shlq $0x4, %rcx
fldt (%rax,%rcx)
fmulp %st, %st(1)
faddp %st, %st(1)
fstpt -0xa0(%rbp)
movl -0x280(%rbp), %eax
cmpl -0x104(%rbp), %eax
jg 0x9a2c
fldt -0x290(%rbp)
fldt -0xd0(%rbp)
fucompi %st(1), %st
fstp %st(0)
jbe 0x9abb
jmp 0x9a2c
movq -0x10(%rbp), %rdi
leaq 0x7b12(%rip), %rsi      # 0x11549
callq 0x3200
movq %rax, -0x3e0(%rbp)
jmp 0x9a45
movq -0x3e0(%rbp), %rdi
fldt -0xa0(%rbp)
movq %rsp, %rax
fstpt (%rax)
callq 0x32a0
movq %rax, -0x3e8(%rbp)
jmp 0x9a65
movq -0x3e8(%rbp), %rdi
leaq 0x77bf(%rip), %rsi      # 0x11232
callq 0x3200
movq %rax, -0x3f0(%rbp)
jmp 0x9a81
movq -0x3f0(%rbp), %rdi
fldt -0x90(%rbp)
movq %rsp, %rax
fstpt (%rax)
callq 0x32a0
movq %rax, -0x3f8(%rbp)
jmp 0x9aa1
movq -0x3f8(%rbp), %rdi
leaq 0x7783(%rip), %rsi      # 0x11232
callq 0x3200
jmp 0x9ab6
jmp 0x9b47
movq -0x10(%rbp), %rdi
leaq 0x7a88(%rip), %rsi      # 0x1154e
callq 0x3200
movq %rax, -0x400(%rbp)
jmp 0x9ad4
movq -0x400(%rbp), %rdi
fldt -0xa0(%rbp)
movq %rsp, %rax
fstpt (%rax)
callq 0x32a0
movq %rax, -0x408(%rbp)
jmp 0x9af4
movq -0x408(%rbp), %rdi
leaq 0x7730(%rip), %rsi      # 0x11232
callq 0x3200
movq %rax, -0x410(%rbp)
jmp 0x9b10
movq -0x410(%rbp), %rdi
fldt -0x90(%rbp)
movq %rsp, %rax
fstpt (%rax)
callq 0x32a0
movq %rax, -0x418(%rbp)
jmp 0x9b30
movq -0x418(%rbp), %rdi
leaq 0x76f4(%rip), %rsi      # 0x11232
callq 0x3200
jmp 0x9b45
jmp 0x9b47
cmpl $0x0, -0x14(%rbp)
je 0x9b79
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %esi
callq 0x3420
movq %rax, -0x420(%rbp)
jmp 0x9b62
movq -0x420(%rbp), %rdi
leaq 0x76c2(%rip), %rsi      # 0x11232
callq 0x3200
jmp 0x9b77
jmp 0x9b79
cmpl $0x0, -0x18(%rbp)
je 0x9bab
movq -0x10(%rbp), %rdi
movl -0x18(%rbp), %esi
callq 0x3420
movq %rax, -0x428(%rbp)
jmp 0x9b94
movq -0x428(%rbp), %rdi
leaq 0x7690(%rip), %rsi      # 0x11232
callq 0x3200
jmp 0x9ba9
jmp 0x9bab
movq -0x10(%rbp), %rdi
movq 0xc40a(%rip), %rsi      # 0x15fc0
callq 0x3240
jmp 0x9bbd
jmp 0x9bbf
fldt -0x290(%rbp)
fld1
faddp %st, %st(1)
fstpt -0x290(%rbp)
jmp 0x98ca
jmp 0x9bd6
movl -0x280(%rbp), %eax
subl $0x6, %eax
movl %eax, -0x280(%rbp)
jmp 0x96ae
jmp 0xa131
movl -0x74(%rbp), %eax
subl $0x8, %eax
movl %eax, -0x104(%rbp)
movq -0x250(%rbp), %rax
movslq -0x104(%rbp), %rcx
shlq $0x4, %rcx
fldt (%rax,%rcx)
fldt 0x60(%rax,%rcx)
xorl %eax, %eax
fxch %st(1)
fucompi %st(1), %st
fstp %st(0)
movb %al, -0x429(%rbp)
jne 0x9c56
jp 0x9c56
jmp 0x9c28
movq -0x250(%rbp), %rcx
movslq -0x104(%rbp), %rax
shlq $0x4, %rax
fldt 0x10(%rax,%rcx)
fldt 0x70(%rax,%rcx)
fxch %st(1)
fucompi %st(1), %st
fstp %st(0)
setnp %cl
sete %al
andb %cl, %al
movb %al, -0x429(%rbp)
movb -0x429(%rbp), %al
testb $0x1, %al
jne 0x9c62
jmp 0x9c73
movl -0x104(%rbp), %eax
subl $0x6, %eax
movl %eax, -0x104(%rbp)
jmp 0x9bfb
movl $0x0, -0x294(%rbp)
movl -0x294(%rbp), %eax
movl -0x74(%rbp), %ecx
subl $0x2, %ecx
cmpl %ecx, %eax
jge 0xa12f
movq -0x250(%rbp), %rax
movslq -0x294(%rbp), %rcx
shlq $0x4, %rcx
fldt (%rax,%rcx)
fldt 0x60(%rax,%rcx)
fxch %st(1)
fucompi %st(1), %st
fstp %st(0)
jne 0x9ce1
jp 0x9ce1
jmp 0x9cb6
movq -0x250(%rbp), %rcx
movslq -0x294(%rbp), %rax
shlq $0x4, %rax
fldt 0x10(%rax,%rcx)
fldt 0x70(%rax,%rcx)
fxch %st(1)
fucompi %st(1), %st
fstp %st(0)
jne 0x9ce1
jp 0x9ce1
jmp 0x9cdc
jmp 0xa11b
movq -0x250(%rbp), %rax
movq %rax, -0x448(%rbp)
movslq -0x294(%rbp), %rcx
shlq $0x4, %rcx
movq %rcx, -0x440(%rbp)
fldt (%rax,%rcx)
fstpt -0x434(%rbp)
fldt 0x30(%rax,%rcx)
fldt 0x70(%rax,%rcx)
fld %st(1)
fsub %st(1), %st
fldt 0x20(%rax,%rcx)
fldt 0x50(%rax,%rcx)
fldt 0x10(%rax,%rcx)
fld %st(1)
fsub %st(1), %st
fmulp %st, %st(3)
fldt -0x434(%rbp)
fmulp %st, %st(4)
fxch %st(3)
faddp %st, %st(2)
fldt 0x40(%rax,%rcx)
fxch %st(4)
fsubp %st, %st(5)
fxch %st(3)
fmulp %st, %st(4)
faddp %st, %st(3)
fldt 0x60(%rax,%rcx)
fxch %st(1)
fsubp %st, %st(2)
fmulp %st, %st(1)
faddp %st, %st(1)
fstpt -0x120(%rbp)
fldt -0x120(%rbp)
fldz
fxch %st(1)
fucompi %st(1), %st
fstp %st(0)
jne 0x9d68
jp 0x9d68
jmp 0x9d8c
fldt -0x120(%rbp)
movq %rsp, %rax
fstpt (%rax)
callq 0xcee0
movb %al, -0x449(%rbp)
jmp 0x9d80
movb -0x449(%rbp), %al
testb $0x1, %al
jne 0x9d8c
jmp 0x9d99
fld1
fstpt -0xd0(%rbp)
jmp 0x9e48
fldt -0x120(%rbp)
movq %rsp, %rax
fstpt (%rax)
leaq -0x108(%rbp), %rdi
callq 0x3380
fstp %st(0)
movl -0x108(%rbp), %eax
movl %eax, -0x2b4(%rbp)
fildl -0x2b4(%rbp)
fldt -0xe0(%rbp)
faddp %st, %st(1)
fldt -0xf0(%rbp)
fmulp %st, %st(1)
fldt -0x100(%rbp)
movq %rsp, %rax
fstpt 0x10(%rax)
fstpt (%rax)
callq 0xcf00
fstpt -0x454(%rbp)
jmp 0x9def
fldt -0x454(%rbp)
fnstcw -0x2d6(%rbp)
movzwl -0x2d6(%rbp), %eax
orl $0xc00, %eax            # imm = 0xC00
movw %ax, -0x2d8(%rbp)
fldcw -0x2d8(%rbp)
fistpl -0x2b8(%rbp)
fldcw -0x2d6(%rbp)
cvtsi2sdl -0x2b8(%rbp), %xmm0
movsd 0x71f8(%rip), %xmm1     # 0x11028
addsd %xmm1, %xmm0
movsd %xmm0, -0x2c0(%rbp)
fldl -0x2c0(%rbp)
fstpt -0xd0(%rbp)
fldz
fstpt -0x2b0(%rbp)
fldt -0x2b0(%rbp)
fldt -0xd0(%rbp)
fucompi %st(1), %st
fstp %st(0)
jb 0xa119
jmp 0x9e68
fldt -0x2b0(%rbp)
fldt -0xd0(%rbp)
fdivrp %st, %st(1)
fstpt -0x1b0(%rbp)
fldt -0x1b0(%rbp)
fld1
fld %st(0)
fsub %st(2), %st
fld %st(0)
fmul %st(1), %st
fmul %st(1), %st
movq -0x250(%rbp), %rax
movslq -0x294(%rbp), %rcx
shlq $0x4, %rcx
fldt (%rax,%rcx)
flds 0x71a3(%rip)            # 0x1104c
fld %st(0)
fstpt -0x460(%rbp)
fmul %st(3), %st
fmul %st, %st(3)
fxch %st(3)
fmul %st(5), %st
fldt 0x20(%rax,%rcx)
fmulp %st, %st(1)
fldt -0x460(%rbp)
fxch %st(3)
fmulp %st, %st(2)
faddp %st, %st(1)
fxch %st(2)
fmul %st(4), %st
fmul %st(4), %st
fldt 0x40(%rax,%rcx)
fmulp %st, %st(1)
faddp %st, %st(2)
fld %st(3)
fmul %st(4), %st
fmulp %st, %st(4)
fldt 0x60(%rax,%rcx)
fmulp %st, %st(4)
fxch %st(3)
faddp %st, %st(1)
fstpt -0x90(%rbp)
fldt -0x1b0(%rbp)
fsubr %st, %st(1)
fld %st(1)
fmul %st(2), %st
fmul %st(2), %st
movq -0x250(%rbp), %rcx
movslq -0x294(%rbp), %rax
shlq $0x4, %rax
fldt 0x10(%rax,%rcx)
fxch %st(4)
fmul %st(3), %st
fmul %st, %st(3)
fxch %st(3)
fmul %st(2), %st
fldt 0x30(%rax,%rcx)
fmulp %st, %st(1)
fxch %st(1)
fmulp %st, %st(4)
faddp %st, %st(3)
fmul %st, %st(1)
fmul %st, %st(1)
fldt 0x50(%rax,%rcx)
fmulp %st, %st(2)
fxch %st(1)
faddp %st, %st(2)
fld %st(0)
fmul %st(1), %st
fmulp %st, %st(1)
fldt 0x70(%rax,%rcx)
fmulp %st, %st(1)
faddp %st, %st(1)
fstpt -0xa0(%rbp)
movl -0x294(%rbp), %eax
cmpl -0x104(%rbp), %eax
jl 0x9f71
fldt -0x2b0(%rbp)
fldt -0xd0(%rbp)
fucompi %st(1), %st
fstp %st(0)
jbe 0xa000
jmp 0x9f71
movq -0x10(%rbp), %rdi
leaq 0x75cd(%rip), %rsi      # 0x11549
callq 0x3200
movq %rax, -0x468(%rbp)
jmp 0x9f8a
movq -0x468(%rbp), %rdi
fldt -0xa0(%rbp)
movq %rsp, %rax
fstpt (%rax)
callq 0x32a0
movq %rax, -0x470(%rbp)
jmp 0x9faa
movq -0x470(%rbp), %rdi
leaq 0x727a(%rip), %rsi      # 0x11232
callq 0x3200
movq %rax, -0x478(%rbp)
jmp 0x9fc6
movq -0x478(%rbp), %rdi
fldt -0x90(%rbp)
movq %rsp, %rax
fstpt (%rax)
callq 0x32a0
movq %rax, -0x480(%rbp)
jmp 0x9fe6
movq -0x480(%rbp), %rdi
leaq 0x723e(%rip), %rsi      # 0x11232
callq 0x3200
jmp 0x9ffb
jmp 0xa08c
movq -0x10(%rbp), %rdi
leaq 0x7543(%rip), %rsi      # 0x1154e
callq 0x3200
movq %rax, -0x488(%rbp)
jmp 0xa019
movq -0x488(%rbp), %rdi
fldt -0xa0(%rbp)
movq %rsp, %rax
fstpt (%rax)
callq 0x32a0
movq %rax, -0x490(%rbp)
jmp 0xa039
movq -0x490(%rbp), %rdi
leaq 0x71eb(%rip), %rsi      # 0x11232
callq 0x3200
movq %rax, -0x498(%rbp)
jmp 0xa055
movq -0x498(%rbp), %rdi
fldt -0x90(%rbp)
movq %rsp, %rax
fstpt (%rax)
callq 0x32a0
movq %rax, -0x4a0(%rbp)
jmp 0xa075
movq -0x4a0(%rbp), %rdi
leaq 0x71af(%rip), %rsi      # 0x11232
callq 0x3200
jmp 0xa08a
jmp 0xa08c
cmpl $0x0, -0x14(%rbp)
je 0xa0be
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %esi
callq 0x3420
movq %rax, -0x4a8(%rbp)
jmp 0xa0a7
movq -0x4a8(%rbp), %rdi
leaq 0x717d(%rip), %rsi      # 0x11232
callq 0x3200
jmp 0xa0bc
jmp 0xa0be
cmpl $0x0, -0x18(%rbp)
je 0xa0f0
movq -0x10(%rbp), %rdi
movl -0x18(%rbp), %esi
callq 0x3420
movq %rax, -0x4b0(%rbp)
jmp 0xa0d9
movq -0x4b0(%rbp), %rdi
leaq 0x714b(%rip), %rsi      # 0x11232
callq 0x3200
jmp 0xa0ee
jmp 0xa0f0
movq -0x10(%rbp), %rdi
movq 0xbec5(%rip), %rsi      # 0x15fc0
callq 0x3240
jmp 0xa102
jmp 0xa104
fldt -0x2b0(%rbp)
fld1
faddp %st, %st(1)
fstpt -0x2b0(%rbp)
jmp 0x9e50
jmp 0xa11b
movl -0x294(%rbp), %eax
addl $0x6, %eax
movl %eax, -0x294(%rbp)
jmp 0x9c7d
jmp 0xa131
leaq -0x38(%rbp), %rdi
callq 0x3160
addq $0x4d0, %rsp            # imm = 0x4D0
popq %rbp
retq
leaq -0x38(%rbp), %rdi
callq 0x3160
movq -0x48(%rbp), %rdi
callq 0x3440
nopw %cs:(%rax,%rax)