// File: eliebe-5[P]Catmull-clark-subdivision/halfedge.cc
// Function: Mesh::subdivide()
void Mesh::subdivide()
{

    vertPool.pre_allocate_elements(fCount*3);
    edgePool.pre_allocate_elements(fCount*12);
    facePool.pre_allocate_elements(fCount*3);
    
    for(int i = 0; i < fCount; i++)
    {
        facePoint(facePool[i]);
    }

    v3 *vertL = new v3[vCount];
    
    for(int i = 0; i < vCount; i++)
    {
        vertL[i] = newVertex(vertPool[i]);
    }

    
    
    for(int i = 0; i < fCount; i++)
    {
        
        HEVert *fb = facePoint(facePool[i]);

        HEFace *f1 = facePool[i];
        HEFace *f2 = facePool.new_element();
        HEFace *f3 = facePool.new_element();
        HEFace *f4 = facePool.new_element();

        if(i != fCount - 1)
            splitEdges(facePool[i]->edge);

        HEEdge *e11 = facePool[i]->edge->next;
        HEEdge *e12 = e11->next;

        HEEdge *e13 = edgePool.new_element();
        HEEdge *e14 = edgePool.new_element();
        
        f1->edge = e11;

        e13->next = e14;
        e14->next = e11;

        e11->face = f1;
        e12->face = f1;
        e13->face = f1;
        e14->face = f1;
        
        e13->vert = e12->next->vert;
        e14->vert = fb;

        e11->vert->edge = e11;
        e12->vert->edge = e12;
        e13->vert->edge = e13;
        e14->vert->edge = e14;

        HEEdge *e21 = e12->next;
        HEEdge *e22 = e21->next;

        HEEdge *e23 = edgePool.new_element();
        HEEdge *e24 = edgePool.new_element();

        e24->pair = e13;
        e13->pair = e24;
        
        f2->edge = e21;

        e23->next = e24;
        e24->next = e21;

        e21->face = f2;
        e22->face = f2;
        e23->face = f2;
        e24->face = f2;
        
        e23->vert = e22->next->vert;
        e24->vert = fb;
        
        e21->vert->edge = e21;
        e22->vert->edge = e22;
        e23->vert->edge = e23;
        e24->vert->edge = e24;

        HEEdge *e31 = e22->next;
        HEEdge *e32 = e31->next;
        
        HEEdge *e33 = edgePool.new_element();
        HEEdge *e34 = edgePool.new_element();
        
        e34->pair = e23;
        e23->pair = e34;
        
        f3->edge = e31;

        e33->next = e34;
        e34->next = e31;
        
        e31->face = f3;
        e32->face = f3;
        e33->face = f3;
        e34->face = f3;

        e33->vert = e32->next->vert;
        e34->vert = fb;

        e31->vert->edge = e31;
        e32->vert->edge = e32;
        e33->vert->edge = e33;
        e34->vert->edge = e34;
        
        HEEdge *e41 = e32->next;
        HEEdge *e42 = e41->next;
        
        HEEdge *e43 = edgePool.new_element();
        HEEdge *e44 = edgePool.new_element();
        
        e43->pair = e14;
        e14->pair = e43;

        e44->pair = e33;
        e33->pair = e44;
        
        f4->edge = e41;

        e43->next = e44;
        e44->next = e41;

        e41->face = f4;
        e42->face = f4;
        e43->face = f4;
        e44->face = f4;
        
        e43->vert = e42->next->vert;
        e44->vert = fb;

        e41->vert->edge = e41;
        e42->vert->edge = e42;
        e43->vert->edge = e43;
        e44->vert->edge = e44;

        
        v2 fuv;

        fuv = (e12->uv + e22->uv + e32->uv + e42->uv) * 0.25;
        
        e13->uv = e12->next->uv;
        e23->uv = e22->next->uv;
        e33->uv = e32->next->uv;
        e43->uv = e42->next->uv;
        
        e14->uv = fuv;
        e24->uv = fuv;
        e34->uv = fuv;
        e44->uv = fuv;
        
        e12->next = e13;
        e22->next = e23;
        e32->next = e33;
        e42->next = e43;

        e12->split = false;
        e22->split = false;
        e32->split = false;
        e42->split = false;

        e11->split = false;
        e21->split = false;
        e31->split = false;
        e41->split = false;

        v3 normal1 = (e14->vert->pos - e11->vert->pos) * (e14->vert->pos - e13->vert->pos);
        v3 normal2 = (e24->vert->pos - e21->vert->pos) * (e24->vert->pos - e23->vert->pos);
        v3 normal3 = (e34->vert->pos - e31->vert->pos) * (e34->vert->pos - e33->vert->pos);
        v3 normal4 = (e44->vert->pos - e41->vert->pos) * (e44->vert->pos - e43->vert->pos);

        float l1 = sqrt(normal1.x + normal1.y + normal1.z);
        normal1 = normal1 / l1;
        float l2 = sqrt(normal2.x + normal2.y + normal2.z);
        normal2 = normal2 / l2;
        float l3 = sqrt(normal3.x + normal3.y + normal3.z);
        normal3 = normal3 / l3;
        float l4 = sqrt(normal4.x + normal4.y + normal4.z);
        normal4 = normal4 / l4;

        e11->norm = normal1;
        e12->norm = normal1;
        e13->norm = normal1;
        e14->norm = normal1;

        e21->norm = normal2;
        e22->norm = normal2;
        e23->norm = normal2;
        e24->norm = normal2;
        
        e31->norm = normal3;
        e32->norm = normal3;
        e33->norm = normal3;
        e34->norm = normal3;
        
        e41->norm = normal4;
        e42->norm = normal4;
        e43->norm = normal4;
        e44->norm = normal4;
        
        facePool[i]->avg = nullptr;
    }

    for(int i = 0; i < vCount; i++)
    {
        vertPool[i]->pos = vertL[i];
    }

    delete[] vertL;
    
    vCount = vCount + fCount*3;
    fCount = fCount * eStep;
    
}

// Assembly:
subq $0x228, %rsp            # imm = 0x228
movq %rdi, 0x220(%rsp)
movq 0x220(%rsp), %rax
movq %rax, 0x40(%rsp)
movq %rax, %rdi
addq $0x20, %rdi
imull $0x3, 0x60(%rax), %esi
callq 0x61a0
movq 0x40(%rsp), %rdi
imull $0xc, 0x60(%rdi), %esi
callq 0x63a0
movq 0x40(%rsp), %rax
movq %rax, %rdi
addq $0x40, %rdi
imull $0x3, 0x60(%rax), %esi
callq 0x6300
movl $0x0, 0x21c(%rsp)
movq 0x40(%rsp), %rcx
movl 0x21c(%rsp), %eax
cmpl 0x60(%rcx), %eax
jge 0x4800
movq 0x40(%rsp), %rdi
addq $0x40, %rdi
movl 0x21c(%rsp), %esi
callq 0x64b0
movq 0x40(%rsp), %rdi
movq %rax, %rsi
callq 0x3e70
movl 0x21c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x21c(%rsp)
jmp 0x47ba
movq 0x40(%rsp), %rax
movslq 0x68(%rax), %rax
movq %rax, 0x30(%rsp)
movl $0xc, %ecx
mulq %rcx
movq %rax, %rdi
seto %cl
movq $-0x1, %rax
testb $0x1, %cl
cmovneq %rax, %rdi
callq 0x2030
movq %rax, %rcx
movq 0x30(%rsp), %rax
movq %rcx, 0x38(%rsp)
cmpq $0x0, %rax
je 0x4889
movq 0x38(%rsp), %rax
movq 0x30(%rsp), %rcx
imulq $0xc, %rcx, %rdx
movq %rax, %rcx
addq %rdx, %rcx
movq %rcx, 0x20(%rsp)
movq %rax, 0x28(%rsp)
movq 0x28(%rsp), %rdi
movq %rdi, 0x18(%rsp)
callq 0x66a0
jmp 0x4871
movq 0x20(%rsp), %rcx
movq 0x18(%rsp), %rax
addq $0xc, %rax
cmpq %rcx, %rax
movq %rax, 0x28(%rsp)
jne 0x4860
movq 0x38(%rsp), %rax
movq %rax, 0x210(%rsp)
movl $0x0, 0x200(%rsp)
movq 0x40(%rsp), %rcx
movl 0x200(%rsp), %eax
cmpl 0x68(%rcx), %eax
jge 0x4942
movq 0x40(%rsp), %rdi
addq $0x20, %rdi
movl 0x200(%rsp), %esi
callq 0x64f0
movq 0x40(%rsp), %rsi
movq %rax, %rdx
leaq 0x1f4(%rsp), %rdi
callq 0x4470
movq 0x210(%rsp), %rax
movslq 0x200(%rsp), %rcx
imulq $0xc, %rcx, %rcx
addq %rcx, %rax
movq 0x1f4(%rsp), %rcx
movq %rcx, (%rax)
movl 0x1fc(%rsp), %ecx
movl %ecx, 0x8(%rax)
movl 0x200(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x200(%rsp)
jmp 0x48a1
movq 0x38(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x208(%rsp)
movl %eax, 0x204(%rsp)
callq 0x21e0
jmp 0x5830
movl $0x0, 0x1f0(%rsp)
movq 0x40(%rsp), %rcx
movl 0x1f0(%rsp), %eax
cmpl 0x60(%rcx), %eax
jge 0x5791
movq 0x40(%rsp), %rdi
addq $0x40, %rdi
movl 0x1f0(%rsp), %esi
callq 0x64b0
movq 0x40(%rsp), %rdi
movq %rax, %rsi
callq 0x3e70
movq 0x40(%rsp), %rdi
movq %rax, 0x1e8(%rsp)
addq $0x40, %rdi
movl 0x1f0(%rsp), %esi
callq 0x64b0
movq 0x40(%rsp), %rdi
movq %rax, 0x1e0(%rsp)
addq $0x40, %rdi
callq 0x6350
movq 0x40(%rsp), %rdi
movq %rax, 0x1d8(%rsp)
addq $0x40, %rdi
callq 0x6350
movq 0x40(%rsp), %rdi
movq %rax, 0x1d0(%rsp)
addq $0x40, %rdi
callq 0x6350
movq 0x40(%rsp), %rcx
movq %rax, 0x1c8(%rsp)
movl 0x1f0(%rsp), %eax
movl 0x60(%rcx), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
je 0x4a23
movq 0x40(%rsp), %rdi
addq $0x40, %rdi
movl 0x1f0(%rsp), %esi
callq 0x64b0
movq 0x40(%rsp), %rdi
movq (%rax), %rsi
callq 0x43c0
movq 0x40(%rsp), %rdi
addq $0x40, %rdi
movl 0x1f0(%rsp), %esi
callq 0x64b0
movq 0x40(%rsp), %rdi
movq (%rax), %rax
movq 0x18(%rax), %rax
movq %rax, 0x1c0(%rsp)
movq 0x1c0(%rsp), %rax
movq 0x18(%rax), %rax
movq %rax, 0x1b8(%rsp)
callq 0x63f0
movq 0x40(%rsp), %rdi
movq %rax, 0x1b0(%rsp)
callq 0x63f0
movq 0x40(%rsp), %rdi
movq %rax, 0x1a8(%rsp)
movq 0x1c0(%rsp), %rcx
movq 0x1e0(%rsp), %rax
movq %rcx, (%rax)
movq 0x1a8(%rsp), %rcx
movq 0x1b0(%rsp), %rax
movq %rcx, 0x18(%rax)
movq 0x1c0(%rsp), %rcx
movq 0x1a8(%rsp), %rax
movq %rcx, 0x18(%rax)
movq 0x1e0(%rsp), %rcx
movq 0x1c0(%rsp), %rax
movq %rcx, 0x10(%rax)
movq 0x1e0(%rsp), %rcx
movq 0x1b8(%rsp), %rax
movq %rcx, 0x10(%rax)
movq 0x1e0(%rsp), %rcx
movq 0x1b0(%rsp), %rax
movq %rcx, 0x10(%rax)
movq 0x1e0(%rsp), %rcx
movq 0x1a8(%rsp), %rax
movq %rcx, 0x10(%rax)
movq 0x1b8(%rsp), %rax
movq 0x18(%rax), %rax
movq (%rax), %rcx
movq 0x1b0(%rsp), %rax
movq %rcx, (%rax)
movq 0x1e8(%rsp), %rcx
movq 0x1a8(%rsp), %rax
movq %rcx, (%rax)
movq 0x1c0(%rsp), %rcx
movq 0x1c0(%rsp), %rax
movq (%rax), %rax
movq %rcx, 0x10(%rax)
movq 0x1b8(%rsp), %rcx
movq 0x1b8(%rsp), %rax
movq (%rax), %rax
movq %rcx, 0x10(%rax)
movq 0x1b0(%rsp), %rcx
movq 0x1b0(%rsp), %rax
movq (%rax), %rax
movq %rcx, 0x10(%rax)
movq 0x1a8(%rsp), %rcx
movq 0x1a8(%rsp), %rax
movq (%rax), %rax
movq %rcx, 0x10(%rax)
movq 0x1b8(%rsp), %rax
movq 0x18(%rax), %rax
movq %rax, 0x1a0(%rsp)
movq 0x1a0(%rsp), %rax
movq 0x18(%rax), %rax
movq %rax, 0x198(%rsp)
callq 0x63f0
movq 0x40(%rsp), %rdi
movq %rax, 0x190(%rsp)
callq 0x63f0
movq 0x40(%rsp), %rdi
movq %rax, 0x188(%rsp)
movq 0x1b0(%rsp), %rcx
movq 0x188(%rsp), %rax
movq %rcx, 0x8(%rax)
movq 0x188(%rsp), %rcx
movq 0x1b0(%rsp), %rax
movq %rcx, 0x8(%rax)
movq 0x1a0(%rsp), %rcx
movq 0x1d8(%rsp), %rax
movq %rcx, (%rax)
movq 0x188(%rsp), %rcx
movq 0x190(%rsp), %rax
movq %rcx, 0x18(%rax)
movq 0x1a0(%rsp), %rcx
movq 0x188(%rsp), %rax
movq %rcx, 0x18(%rax)
movq 0x1d8(%rsp), %rcx
movq 0x1a0(%rsp), %rax
movq %rcx, 0x10(%rax)
movq 0x1d8(%rsp), %rcx
movq 0x198(%rsp), %rax
movq %rcx, 0x10(%rax)
movq 0x1d8(%rsp), %rcx
movq 0x190(%rsp), %rax
movq %rcx, 0x10(%rax)
movq 0x1d8(%rsp), %rcx
movq 0x188(%rsp), %rax
movq %rcx, 0x10(%rax)
movq 0x198(%rsp), %rax
movq 0x18(%rax), %rax
movq (%rax), %rcx
movq 0x190(%rsp), %rax
movq %rcx, (%rax)
movq 0x1e8(%rsp), %rcx
movq 0x188(%rsp), %rax
movq %rcx, (%rax)
movq 0x1a0(%rsp), %rcx
movq 0x1a0(%rsp), %rax
movq (%rax), %rax
movq %rcx, 0x10(%rax)
movq 0x198(%rsp), %rcx
movq 0x198(%rsp), %rax
movq (%rax), %rax
movq %rcx, 0x10(%rax)
movq 0x190(%rsp), %rcx
movq 0x190(%rsp), %rax
movq (%rax), %rax
movq %rcx, 0x10(%rax)
movq 0x188(%rsp), %rcx
movq 0x188(%rsp), %rax
movq (%rax), %rax
movq %rcx, 0x10(%rax)
movq 0x198(%rsp), %rax
movq 0x18(%rax), %rax
movq %rax, 0x180(%rsp)
movq 0x180(%rsp), %rax
movq 0x18(%rax), %rax
movq %rax, 0x178(%rsp)
callq 0x63f0
movq 0x40(%rsp), %rdi
movq %rax, 0x170(%rsp)
callq 0x63f0
movq 0x40(%rsp), %rdi
movq %rax, 0x168(%rsp)
movq 0x190(%rsp), %rcx
movq 0x168(%rsp), %rax
movq %rcx, 0x8(%rax)
movq 0x168(%rsp), %rcx
movq 0x190(%rsp), %rax
movq %rcx, 0x8(%rax)
movq 0x180(%rsp), %rcx
movq 0x1d0(%rsp), %rax
movq %rcx, (%rax)
movq 0x168(%rsp), %rcx
movq 0x170(%rsp), %rax
movq %rcx, 0x18(%rax)
movq 0x180(%rsp), %rcx
movq 0x168(%rsp), %rax
movq %rcx, 0x18(%rax)
movq 0x1d0(%rsp), %rcx
movq 0x180(%rsp), %rax
movq %rcx, 0x10(%rax)
movq 0x1d0(%rsp), %rcx
movq 0x178(%rsp), %rax
movq %rcx, 0x10(%rax)
movq 0x1d0(%rsp), %rcx
movq 0x170(%rsp), %rax
movq %rcx, 0x10(%rax)
movq 0x1d0(%rsp), %rcx
movq 0x168(%rsp), %rax
movq %rcx, 0x10(%rax)
movq 0x178(%rsp), %rax
movq 0x18(%rax), %rax
movq (%rax), %rcx
movq 0x170(%rsp), %rax
movq %rcx, (%rax)
movq 0x1e8(%rsp), %rcx
movq 0x168(%rsp), %rax
movq %rcx, (%rax)
movq 0x180(%rsp), %rcx
movq 0x180(%rsp), %rax
movq (%rax), %rax
movq %rcx, 0x10(%rax)
movq 0x178(%rsp), %rcx
movq 0x178(%rsp), %rax
movq (%rax), %rax
movq %rcx, 0x10(%rax)
movq 0x170(%rsp), %rcx
movq 0x170(%rsp), %rax
movq (%rax), %rax
movq %rcx, 0x10(%rax)
movq 0x168(%rsp), %rcx
movq 0x168(%rsp), %rax
movq (%rax), %rax
movq %rcx, 0x10(%rax)
movq 0x178(%rsp), %rax
movq 0x18(%rax), %rax
movq %rax, 0x160(%rsp)
movq 0x160(%rsp), %rax
movq 0x18(%rax), %rax
movq %rax, 0x158(%rsp)
callq 0x63f0
movq 0x40(%rsp), %rdi
movq %rax, 0x150(%rsp)
callq 0x63f0
movq %rax, 0x148(%rsp)
movq 0x1a8(%rsp), %rcx
movq 0x150(%rsp), %rax
movq %rcx, 0x8(%rax)
movq 0x150(%rsp), %rcx
movq 0x1a8(%rsp), %rax
movq %rcx, 0x8(%rax)
movq 0x170(%rsp), %rcx
movq 0x148(%rsp), %rax
movq %rcx, 0x8(%rax)
movq 0x148(%rsp), %rcx
movq 0x170(%rsp), %rax
movq %rcx, 0x8(%rax)
movq 0x160(%rsp), %rcx
movq 0x1c8(%rsp), %rax
movq %rcx, (%rax)
movq 0x148(%rsp), %rcx
movq 0x150(%rsp), %rax
movq %rcx, 0x18(%rax)
movq 0x160(%rsp), %rcx
movq 0x148(%rsp), %rax
movq %rcx, 0x18(%rax)
movq 0x1c8(%rsp), %rcx
movq 0x160(%rsp), %rax
movq %rcx, 0x10(%rax)
movq 0x1c8(%rsp), %rcx
movq 0x158(%rsp), %rax
movq %rcx, 0x10(%rax)
movq 0x1c8(%rsp), %rcx
movq 0x150(%rsp), %rax
movq %rcx, 0x10(%rax)
movq 0x1c8(%rsp), %rcx
movq 0x148(%rsp), %rax
movq %rcx, 0x10(%rax)
movq 0x158(%rsp), %rax
movq 0x18(%rax), %rax
movq (%rax), %rcx
movq 0x150(%rsp), %rax
movq %rcx, (%rax)
movq 0x1e8(%rsp), %rcx
movq 0x148(%rsp), %rax
movq %rcx, (%rax)
movq 0x160(%rsp), %rcx
movq 0x160(%rsp), %rax
movq (%rax), %rax
movq %rcx, 0x10(%rax)
movq 0x158(%rsp), %rcx
movq 0x158(%rsp), %rax
movq (%rax), %rax
movq %rcx, 0x10(%rax)
movq 0x150(%rsp), %rcx
movq 0x150(%rsp), %rax
movq (%rax), %rax
movq %rcx, 0x10(%rax)
movq 0x148(%rsp), %rcx
movq 0x148(%rsp), %rax
movq (%rax), %rax
movq %rcx, 0x10(%rax)
leaq 0x140(%rsp), %rdi
callq 0x6750
movq 0x1b8(%rsp), %rsi
addq $0x28, %rsi
movq 0x198(%rsp), %rdx
addq $0x28, %rdx
leaq 0x120(%rsp), %rdi
callq 0x66b0
movq 0x178(%rsp), %rdx
addq $0x28, %rdx
leaq 0x128(%rsp), %rdi
leaq 0x120(%rsp), %rsi
callq 0x66b0
movq 0x158(%rsp), %rdx
addq $0x28, %rdx
leaq 0x130(%rsp), %rdi
leaq 0x128(%rsp), %rsi
callq 0x66b0
movss 0x6fa1(%rip), %xmm0     # 0xc070
movss %xmm0, 0x11c(%rsp)
leaq 0x138(%rsp), %rdi
leaq 0x130(%rsp), %rsi
leaq 0x11c(%rsp), %rdx
callq 0x6700
movq 0x138(%rsp), %rax
movq %rax, 0x140(%rsp)
movq 0x1b8(%rsp), %rax
movq 0x18(%rax), %rcx
movq 0x1b0(%rsp), %rax
movq 0x28(%rcx), %rcx
movq %rcx, 0x28(%rax)
movq 0x198(%rsp), %rax
movq 0x18(%rax), %rcx
movq 0x190(%rsp), %rax
movq 0x28(%rcx), %rcx
movq %rcx, 0x28(%rax)
movq 0x178(%rsp), %rax
movq 0x18(%rax), %rcx
movq 0x170(%rsp), %rax
movq 0x28(%rcx), %rcx
movq %rcx, 0x28(%rax)
movq 0x158(%rsp), %rax
movq 0x18(%rax), %rcx
movq 0x150(%rsp), %rax
movq 0x28(%rcx), %rcx
movq %rcx, 0x28(%rax)
movq 0x1a8(%rsp), %rax
movq 0x140(%rsp), %rcx
movq %rcx, 0x28(%rax)
movq 0x188(%rsp), %rax
movq 0x140(%rsp), %rcx
movq %rcx, 0x28(%rax)
movq 0x168(%rsp), %rax
movq 0x140(%rsp), %rcx
movq %rcx, 0x28(%rax)
movq 0x148(%rsp), %rax
movq 0x140(%rsp), %rcx
movq %rcx, 0x28(%rax)
movq 0x1b0(%rsp), %rcx
movq 0x1b8(%rsp), %rax
movq %rcx, 0x18(%rax)
movq 0x190(%rsp), %rcx
movq 0x198(%rsp), %rax
movq %rcx, 0x18(%rax)
movq 0x170(%rsp), %rcx
movq 0x178(%rsp), %rax
movq %rcx, 0x18(%rax)
movq 0x150(%rsp), %rcx
movq 0x158(%rsp), %rax
movq %rcx, 0x18(%rax)
movq 0x1b8(%rsp), %rax
movb $0x0, 0x3c(%rax)
movq 0x198(%rsp), %rax
movb $0x0, 0x3c(%rax)
movq 0x178(%rsp), %rax
movb $0x0, 0x3c(%rax)
movq 0x158(%rsp), %rax
movb $0x0, 0x3c(%rax)
movq 0x1c0(%rsp), %rax
movb $0x0, 0x3c(%rax)
movq 0x1a0(%rsp), %rax
movb $0x0, 0x3c(%rax)
movq 0x180(%rsp), %rax
movb $0x0, 0x3c(%rax)
movq 0x160(%rsp), %rax
movb $0x0, 0x3c(%rax)
movq 0x1a8(%rsp), %rax
movq (%rax), %rsi
movq 0x1c0(%rsp), %rax
movq (%rax), %rdx
leaq 0x104(%rsp), %rdi
callq 0x6760
movq 0x1a8(%rsp), %rax
movq (%rax), %rsi
movq 0x1b0(%rsp), %rax
movq (%rax), %rdx
leaq 0xf8(%rsp), %rdi
callq 0x6760
leaq 0x110(%rsp), %rdi
leaq 0x104(%rsp), %rsi
leaq 0xf8(%rsp), %rdx
callq 0x67d0
movq 0x188(%rsp), %rax
movq (%rax), %rsi
movq 0x1a0(%rsp), %rax
movq (%rax), %rdx
leaq 0xe0(%rsp), %rdi
callq 0x6760
movq 0x188(%rsp), %rax
movq (%rax), %rsi
movq 0x190(%rsp), %rax
movq (%rax), %rdx
leaq 0xd4(%rsp), %rdi
callq 0x6760
leaq 0xec(%rsp), %rdi
leaq 0xe0(%rsp), %rsi
leaq 0xd4(%rsp), %rdx
callq 0x67d0
movq 0x168(%rsp), %rax
movq (%rax), %rsi
movq 0x180(%rsp), %rax
movq (%rax), %rdx
leaq 0xbc(%rsp), %rdi
callq 0x6760
movq 0x168(%rsp), %rax
movq (%rax), %rsi
movq 0x170(%rsp), %rax
movq (%rax), %rdx
leaq 0xb0(%rsp), %rdi
callq 0x6760
leaq 0xc8(%rsp), %rdi
leaq 0xbc(%rsp), %rsi
leaq 0xb0(%rsp), %rdx
callq 0x67d0
movq 0x148(%rsp), %rax
movq (%rax), %rsi
movq 0x160(%rsp), %rax
movq (%rax), %rdx
leaq 0x98(%rsp), %rdi
callq 0x6760
movq 0x148(%rsp), %rax
movq (%rax), %rsi
movq 0x150(%rsp), %rax
movq (%rax), %rdx
leaq 0x8c(%rsp), %rdi
callq 0x6760
leaq 0xa4(%rsp), %rdi
leaq 0x98(%rsp), %rsi
leaq 0x8c(%rsp), %rdx
callq 0x67d0
movss 0x110(%rsp), %xmm0
addss 0x114(%rsp), %xmm0
addss 0x118(%rsp), %xmm0
cvtss2sd %xmm0, %xmm0
callq 0x2180
cvtsd2ss %xmm0, %xmm0
movss %xmm0, 0x88(%rsp)
leaq 0x7c(%rsp), %rdi
leaq 0x110(%rsp), %rsi
leaq 0x88(%rsp), %rdx
callq 0x68a0
movq 0x7c(%rsp), %rax
movq %rax, 0x110(%rsp)
movl 0x84(%rsp), %eax
movl %eax, 0x118(%rsp)
movss 0xec(%rsp), %xmm0
addss 0xf0(%rsp), %xmm0
addss 0xf4(%rsp), %xmm0
cvtss2sd %xmm0, %xmm0
callq 0x2180
cvtsd2ss %xmm0, %xmm0
movss %xmm0, 0x78(%rsp)
leaq 0x6c(%rsp), %rdi
leaq 0xec(%rsp), %rsi
leaq 0x78(%rsp), %rdx
callq 0x68a0
movq 0x6c(%rsp), %rax
movq %rax, 0xec(%rsp)
movl 0x74(%rsp), %eax
movl %eax, 0xf4(%rsp)
movss 0xc8(%rsp), %xmm0
addss 0xcc(%rsp), %xmm0
addss 0xd0(%rsp), %xmm0
cvtss2sd %xmm0, %xmm0
callq 0x2180
cvtsd2ss %xmm0, %xmm0
movss %xmm0, 0x68(%rsp)
leaq 0x5c(%rsp), %rdi
leaq 0xc8(%rsp), %rsi
leaq 0x68(%rsp), %rdx
callq 0x68a0
movq 0x5c(%rsp), %rax
movq %rax, 0xc8(%rsp)
movl 0x64(%rsp), %eax
movl %eax, 0xd0(%rsp)
movss 0xa4(%rsp), %xmm0
addss 0xa8(%rsp), %xmm0
addss 0xac(%rsp), %xmm0
cvtss2sd %xmm0, %xmm0
callq 0x2180
cvtsd2ss %xmm0, %xmm0
movss %xmm0, 0x58(%rsp)
leaq 0x4c(%rsp), %rdi
leaq 0xa4(%rsp), %rsi
leaq 0x58(%rsp), %rdx
callq 0x68a0
movq 0x40(%rsp), %rdi
movq 0x4c(%rsp), %rax
movq %rax, 0xa4(%rsp)
movl 0x54(%rsp), %eax
movl %eax, 0xac(%rsp)
movq 0x1c0(%rsp), %rax
movq 0x110(%rsp), %rcx
movq %rcx, 0x30(%rax)
movl 0x118(%rsp), %ecx
movl %ecx, 0x38(%rax)
movq 0x1b8(%rsp), %rax
movq 0x110(%rsp), %rcx
movq %rcx, 0x30(%rax)
movl 0x118(%rsp), %ecx
movl %ecx, 0x38(%rax)
movq 0x1b0(%rsp), %rax
movq 0x110(%rsp), %rcx
movq %rcx, 0x30(%rax)
movl 0x118(%rsp), %ecx
movl %ecx, 0x38(%rax)
movq 0x1a8(%rsp), %rax
movq 0x110(%rsp), %rcx
movq %rcx, 0x30(%rax)
movl 0x118(%rsp), %ecx
movl %ecx, 0x38(%rax)
movq 0x1a0(%rsp), %rax
movq 0xec(%rsp), %rcx
movq %rcx, 0x30(%rax)
movl 0xf4(%rsp), %ecx
movl %ecx, 0x38(%rax)
movq 0x198(%rsp), %rax
movq 0xec(%rsp), %rcx
movq %rcx, 0x30(%rax)
movl 0xf4(%rsp), %ecx
movl %ecx, 0x38(%rax)
movq 0x190(%rsp), %rax
movq 0xec(%rsp), %rcx
movq %rcx, 0x30(%rax)
movl 0xf4(%rsp), %ecx
movl %ecx, 0x38(%rax)
movq 0x188(%rsp), %rax
movq 0xec(%rsp), %rcx
movq %rcx, 0x30(%rax)
movl 0xf4(%rsp), %ecx
movl %ecx, 0x38(%rax)
movq 0x180(%rsp), %rax
movq 0xc8(%rsp), %rcx
movq %rcx, 0x30(%rax)
movl 0xd0(%rsp), %ecx
movl %ecx, 0x38(%rax)
movq 0x178(%rsp), %rax
movq 0xc8(%rsp), %rcx
movq %rcx, 0x30(%rax)
movl 0xd0(%rsp), %ecx
movl %ecx, 0x38(%rax)
movq 0x170(%rsp), %rax
movq 0xc8(%rsp), %rcx
movq %rcx, 0x30(%rax)
movl 0xd0(%rsp), %ecx
movl %ecx, 0x38(%rax)
movq 0x168(%rsp), %rax
movq 0xc8(%rsp), %rcx
movq %rcx, 0x30(%rax)
movl 0xd0(%rsp), %ecx
movl %ecx, 0x38(%rax)
movq 0x160(%rsp), %rax
movq 0xa4(%rsp), %rcx
movq %rcx, 0x30(%rax)
movl 0xac(%rsp), %ecx
movl %ecx, 0x38(%rax)
movq 0x158(%rsp), %rax
movq 0xa4(%rsp), %rcx
movq %rcx, 0x30(%rax)
movl 0xac(%rsp), %ecx
movl %ecx, 0x38(%rax)
movq 0x150(%rsp), %rax
movq 0xa4(%rsp), %rcx
movq %rcx, 0x30(%rax)
movl 0xac(%rsp), %ecx
movl %ecx, 0x38(%rax)
movq 0x148(%rsp), %rax
movq 0xa4(%rsp), %rcx
movq %rcx, 0x30(%rax)
movl 0xac(%rsp), %ecx
movl %ecx, 0x38(%rax)
addq $0x40, %rdi
movl 0x1f0(%rsp), %esi
callq 0x64b0
movq $0x0, 0x8(%rax)
movl 0x1f0(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x1f0(%rsp)
jmp 0x494d
movl $0x0, 0x48(%rsp)
movq 0x40(%rsp), %rcx
movl 0x48(%rsp), %eax
cmpl 0x68(%rcx), %eax
jge 0x57f0
movq 0x40(%rsp), %rdi
movq 0x210(%rsp), %rax
movslq 0x48(%rsp), %rcx
imulq $0xc, %rcx, %rcx
addq %rcx, %rax
movq %rax, 0x10(%rsp)
addq $0x20, %rdi
movl 0x48(%rsp), %esi
callq 0x64f0
movq 0x10(%rsp), %rcx
movq (%rcx), %rdx
movq %rdx, (%rax)
movl 0x8(%rcx), %ecx
movl %ecx, 0x8(%rax)
movl 0x48(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x48(%rsp)
jmp 0x5799
movq 0x210(%rsp), %rax
movq %rax, 0x8(%rsp)
cmpq $0x0, %rax
je 0x580d
movq 0x8(%rsp), %rdi
callq 0x21e0
movq 0x40(%rsp), %rax
movl 0x68(%rax), %ecx
imull $0x3, 0x60(%rax), %edx
addl %edx, %ecx
movl %ecx, 0x68(%rax)
movl 0x60(%rax), %ecx
imull 0x64(%rax), %ecx
movl %ecx, 0x60(%rax)
addq $0x228, %rsp            # imm = 0x228
retq
movq 0x208(%rsp), %rdi
callq 0x22a0
nopl (%rax)