// File: /workspace/github_cpp_makefile_star2_O3/misohena[P]drawstars/drawstars.cpp
// Function: main
int main(int argc, char *argv[])
{
    Options options = {};
    setOptionsDefault(options);
    if(!parseCommandLine(options, argc, argv)){
        return -1;
    }

    const char * const GAIA_FILE = "gaia/gaia_ra_dec_g_bp_rp_teff.dat";
    const char * const HIP_FILE = "hip2/hip2_ra_dec_mag_bv.dat";
    const ProjectionMode projectionMode = options.projectionMode;
    // Input Options
    const std::string catalogDir(options.catalogDir);
    const std::string gaiaFile = catalogDir + "/" + GAIA_FILE;
    const std::string hipFile = catalogDir + "/" + HIP_FILE;

    // Rendering Options
    const unsigned int canvasWidth = options.width;
    const unsigned int canvasHeight = options.height;
    const StarAppearanceOptions starAppearanceOptions= {
        options.fluxOffset,
        options.fluxMultiplier,
        1.0f / options.fluxGamma,
        options.fluxMax,
        options.fluxIncRadius,
        options.radiusDefault,
        options.radiusMax
    };

    // Output Options
    std::string outputFloatsFile(options.outputFloatsFile);
    std::string outputImageFile(options.outputImageFile);

    // prepare rendering target
    ImageType canvas(canvasWidth, canvasHeight);

    if(0){
        // 描画テスト
        for(int y = -900; y <= 900; y += 100){
            drawStarOnEquirectangular(canvas, HipStar{float(180*DEG2RAD), float((y+0)*PI/canvasHeight), 0, 0}, StarAppearanceOptions{1.0, 0.5, 2.0});
            drawStarOnEquirectangular(canvas, HipStar{float(185*DEG2RAD), float((y+0.25)*PI/canvasHeight), 0, 0}, StarAppearanceOptions{1.0, 0.5, 2.0});
            drawStarOnEquirectangular(canvas, HipStar{float(190*DEG2RAD), float((y+0.5)*PI/canvasHeight), 0, 0}, StarAppearanceOptions{1.0, 0.5, 2.0});
            drawStarOnEquirectangular(canvas, HipStar{float(195*DEG2RAD), float((y+0.75)*PI/canvasHeight), 0, 0}, StarAppearanceOptions{1.0, 0.5, 2.0});
            drawStarOnEquirectangular(canvas, HipStar{float(200*DEG2RAD), float((y+1.0)*PI/canvasHeight), 0, 0}, StarAppearanceOptions{1.0, 0.5, 2.0});
        }
    }
    else if(projectionMode == PROJ_LOAD_FLOATS){
        canvas = readRawFile<ImageType>(outputFloatsFile.c_str());
        if(!canvas){
            printf("Failed to load %s\n", outputFloatsFile.c_str());
            return -1;
        }
        printf("%s loaded\n", outputFloatsFile.c_str());
    }
    else if(projectionMode == PROJ_EQUIRECTANGULAR){
        if(options.gaiaEnabled && !drawStars<GaiaStar>(
               canvas, gaiaFile.c_str(),
               [=](ImageType &canvas, GaiaStarRange stars){
                   drawStarsOnEquirectangular(canvas, stars, std::max(options.gaiaMinMag, options.minMag), options.maxMag, starAppearanceOptions);
               })){
            return -1;
        }
        if(options.hip2Enabled && !drawStars<HipStar>(
               canvas, hipFile.c_str(),
               [=](ImageType &canvas, HipStarRange stars){
                   drawStarsOnEquirectangular(canvas, stars, options.minMag, std::min(options.maxMag, options.hip2MaxMag), starAppearanceOptions);
               })){
            return -1;
        }
    }
    else{
        // calculate matrix
        printf("unixSeconds=%lf\n", options.unixSeconds);
        const Mat4F matEquToHor = createEquatorialToHorizontalMatrix(options.lat, options.lng, options.unixSeconds);
        float viewAz = options.viewAz;
        float viewEl = options.viewEl;
        if((options.hasViewRA && options.hasViewDec) || !(options.hasViewAz || options.hasViewEl)){
            const float viewRA = options.viewRA;
            const float viewDec = options.viewDec;
            const std::pair<float, float> viewAzEl = convertRADecToAzEl(options.viewRA*DEG2RAD, options.viewDec*DEG2RAD, matEquToHor);
            viewAz += viewAzEl.first; //deg
            viewEl += viewAzEl.second; //deg
        }
        printf("az=%lf el=%lf roll=%lf\n", viewAz, viewEl, options.viewRoll);
        const Mat4F mat = createProjectionMatrix(canvasWidth, canvasHeight, options.fovYDeg, options.viewZ)
            * createViewMatrix(viewAz, viewEl, options.viewRoll)
            * matEquToHor;
        // draw stars
        if(options.gaiaEnabled && !drawStars<GaiaStar>(
               canvas, gaiaFile.c_str(),
               [=](ImageType &canvas, GaiaStarRange stars){
                   drawStarsPerspective(canvas, stars, mat, std::max(options.gaiaMinMag, options.minMag), options.maxMag, starAppearanceOptions);
               })){
            return -1;
        }
        if(options.hip2Enabled && !drawStars<HipStar>(
               canvas, hipFile.c_str(),
               [=](ImageType &canvas, HipStarRange stars){
                   drawStarsPerspective(canvas, stars, mat, options.minMag, std::min(options.maxMag, options.hip2MaxMag), starAppearanceOptions);
               })){
            return -1;
        }
    }

    //
    // output results
    //
    writeRawFile(outputFloatsFile.c_str(), canvas);

    const ColorType postOffsetColor(options.postOffset, options.postOffset, options.postOffset);
    const double invG = 1.0/options.postGamma;
    ImageType image = apply(
        canvas,
        [&](ColorType p){
            return pow(postOffsetColor + options.postMultiplier * p, invG);
        });
    if(options.postKeepColor){
        image.apply([&](ColorType p){return saturateKeepColor(p);});
    }
    writeImageFile(outputImageFile.c_str(), image, options.jpegQuality);

    return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x5b8, %rsp            # imm = 0x5B8
movq %rsi, %rbx
movl %edi, %ebp
leaq 0x250(%rsp), %r14
movl $0x0, 0x14(%r14)
xorl %eax, %eax
movb %al, 0x18(%r14)
xorpd %xmm0, %xmm0
movapd %xmm0, (%r14)
movb %al, 0x10(%r14)
movupd %xmm0, 0x1c(%r14)
movupd %xmm0, 0x2c(%r14)
movupd %xmm0, 0x3c(%r14)
movupd %xmm0, 0x4c(%r14)
movupd %xmm0, 0x5c(%r14)
movupd %xmm0, 0x6c(%r14)
movq $0x0, 0x79(%r14)
movupd %xmm0, 0x88(%r14)
movupd %xmm0, 0x98(%r14)
movupd %xmm0, 0xa8(%r14)
movq %r14, %rdi
callq 0x735f
movq %r14, %rdi
movl %ebp, %esi
movq %rbx, %rdx
callq 0x754a
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
testb %al, %al
je 0x90d1
movl 0x29c(%rsp), %r15d
movq 0x258(%rsp), %rsi
leaq 0x1e0(%rsp), %rax
movq %rax, -0x10(%rax)
movq 0x250(%rsp), %rdx
addq %rsi, %rdx
leaq 0x1d0(%rsp), %rbx
movq %rbx, %rdi
callq 0xa366
leaq 0x318(%rsp), %r14
movq %r14, -0x10(%r14)
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
addq %rsi, %rdx
leaq 0x308(%rsp), %rdi
callq 0xa3fc
leaq 0x5d3f(%rip), %rsi      # 0xd4cb
leaq 0x308(%rsp), %rdi
callq 0x4570
leaq 0x5ced(%rip), %rsi      # 0xd48d
leaq 0x308(%rsp), %rdi
callq 0x4570
leaq 0x1a0(%rsp), %rsi
movq %rsi, -0x10(%rsi)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x77dd
movq %rdx, 0x190(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x1a0(%rsp)
jmp 0x77e5
movupd (%rcx), %xmm0
movupd %xmm0, (%rsi)
movq 0x8(%rax), %rdx
movq %rdx, 0x198(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq 0x308(%rsp), %rdi
cmpq %r14, %rdi
je 0x781d
movq 0x318(%rsp), %rsi
incq %rsi
callq 0x42e0
leaq 0x308(%rsp), %rdi
movq %r14, (%rdi)
movq 0x1d0(%rsp), %rsi
movq 0x1d8(%rsp), %rdx
addq %rsi, %rdx
callq 0xa3fc
leaq 0x5c84(%rip), %rsi      # 0xd4cb
leaq 0x308(%rsp), %rdi
callq 0x4570
leaq 0x5c54(%rip), %rsi      # 0xd4af
leaq 0x308(%rsp), %rdi
callq 0x4570
leaq 0x180(%rsp), %rsi
movq %rsi, -0x10(%rsi)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x7898
movq %rdx, 0x170(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x180(%rsp)
jmp 0x78a0
movupd (%rcx), %xmm0
movupd %xmm0, (%rsi)
movq 0x8(%rax), %rdx
movq %rdx, 0x178(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq 0x308(%rsp), %rdi
cmpq %r14, %rdi
je 0x78d8
movq 0x318(%rsp), %rsi
incq %rsi
callq 0x42e0
movl 0x2a0(%rsp), %ebp
movl 0x2a4(%rsp), %r13d
movsd 0x2a8(%rsp), %xmm0
movaps %xmm0, 0xe0(%rsp)
movss 0x5710(%rip), %xmm0     # 0xd010
divss 0x2b0(%rsp), %xmm0
movss %xmm0, 0x80(%rsp)
movupd 0x2b4(%rsp), %xmm0
movapd %xmm0, 0x90(%rsp)
movq 0x280(%rsp), %rsi
leaq 0x1c0(%rsp), %rax
movq %rax, -0x10(%rax)
movq 0x278(%rsp), %rdx
addq %rsi, %rdx
leaq 0x1b0(%rsp), %rdi
callq 0xa366
movq 0x290(%rsp), %rsi
leaq 0x200(%rsp), %rax
movq %rax, -0x10(%rax)
movq 0x288(%rsp), %rdx
addq %rsi, %rdx
leaq 0x1f0(%rsp), %rdi
callq 0xa366
movl %ebp, 0x58(%rsp)
movl %r13d, 0x5c(%rsp)
movl %r13d, %r12d
imull %ebp, %r12d
leaq (,%r12,8), %rax
leaq (%rax,%rax,2), %rbx
movq %rbx, %rdi
callq 0x4030
movq %rax, %r14
movabsq $-0x5555555555555555, %rcx # imm = 0xAAAAAAAAAAAAAAAB
testq %r12, %r12
je 0x79d3
leaq -0x18(%rbx), %rax
mulq %rcx
shrq $0x4, %rdx
leaq (%rdx,%rdx,2), %rax
leaq 0x18(,%rax,8), %rdx
movq %r14, %rdi
xorl %esi, %esi
callq 0x4180
movq %r14, 0x60(%rsp)
testl %r15d, %r15d
je 0x7a65
cmpl $0x2, %r15d
jne 0x7bd0
movq 0x1b0(%rsp), %rsi
leaq 0x308(%rsp), %rdi
callq 0xa0cf
movupd 0x308(%rsp), %xmm0
movq 0x60(%rsp), %rdi
movupd %xmm0, 0x58(%rsp)
movq $0x0, 0x310(%rsp)
testq %rdi, %rdi
je 0x7a3c
callq 0x4370
movq 0x310(%rsp), %rdi
testq %rdi, %rdi
je 0x7a3c
callq 0x4370
movl 0x5c(%rsp), %eax
orl 0x58(%rsp), %eax
movq 0x1b0(%rsp), %rsi
je 0x7f18
leaq 0x5a87(%rip), %rdi      # 0xd4e0
xorl %eax, %eax
callq 0x4050
jmp 0x8d7a
cmpb $0x1, 0x260(%rsp)
jne 0x81e2
movq %rbx, 0x18(%rsp)
movq 0x190(%rsp), %rbx
leaq 0x308(%rsp), %rdi
leaq 0x250(%rsp), %rsi
movl $0xb8, %edx
callq 0x4260
leaq 0x5b1b(%rip), %rsi      # 0xd5bc
movq %rbx, %rdi
callq 0x4350
movq %rax, 0x68(%rsp)
testq %rax, %rax
je 0x87ee
movl %r13d, 0x48(%rsp)
callq 0x43b0
movl %eax, %ebx
leaq 0x5af5(%rip), %rdi      # 0xd5bf
movl %eax, %esi
xorl %eax, %eax
callq 0x4050
movl %ebx, %r15d
leaq 0x8(,%r15,8), %rdi
callq 0x4030
movq %rax, %r13
leaq (,%r15,8), %rbx
movq %r15, (%rax)
addq $0x8, %r13
testq %r15, %r15
je 0x7b07
movq %r13, %rdi
xorl %esi, %esi
movq %rbx, %rdx
callq 0x4180
movq %rbx, 0x50(%rsp)
movq %r13, 0x130(%rsp)
movq %r15, %r14
shlq $0x4, %r14
leaq 0x8(%r14), %rdi
callq 0x4030
movq %rax, %rbx
addq $0x8, %rbx
movq %r15, (%rax)
movq %r15, 0x20(%rsp)
testq %r15, %r15
je 0x7f2b
xorl %r15d, %r15d
movq %rbx, %rdi
xorl %esi, %esi
movq %r14, %rdx
callq 0x4180
movq %rbx, 0xa0(%rsp)
movq 0x18(%rsp), %rdi
leaq -0x18(%rdi), %rax
movabsq $-0x5555555555555555, %rcx # imm = 0xAAAAAAAAAAAAAAAB
mulq %rcx
shrq $0x4, %rdx
leaq (%rdx,%rdx,2), %rax
leaq 0x18(,%rax,8), %r13
callq 0x4030
movq %rax, %rbx
testl %r12d, %r12d
je 0x7b94
movq %rbx, %rdi
xorl %esi, %esi
movq %r13, %rdx
callq 0x4180
movq 0xa0(%rsp), %rax
movl %ebp, (%rax,%r15)
movl 0x48(%rsp), %ecx
movl %ecx, 0x4(%rax,%r15)
movq 0x8(%rax,%r15), %rdi
movq %rbx, 0x8(%rax,%r15)
testq %rdi, %rdi
je 0x7bbd
callq 0x4370
addq $0x10, %r15
cmpq %r15, %r14
movq 0x18(%rsp), %rdi
jne 0x7b7a
jmp 0x7f33
movsd 0x2d8(%rsp), %xmm0
leaq 0x590b(%rip), %rdi      # 0xd4eb
movb $0x1, %al
callq 0x4050
xorps %xmm0, %xmm0
cvtss2sd 0x2e0(%rsp), %xmm0
cvtss2sd 0x2e4(%rsp), %xmm1
movsd 0x2d8(%rsp), %xmm2
leaq 0x308(%rsp), %rdi
callq 0x6b20
movsd 0x2ec(%rsp), %xmm1
cmpb $0x1, 0x302(%rsp)
jne 0x7c2f
cmpb $0x0, 0x303(%rsp)
jne 0x7c43
cmpb $0x0, 0x300(%rsp)
jne 0x7c90
cmpb $0x0, 0x301(%rsp)
jne 0x7c90
movaps %xmm1, 0x20(%rsp)
xorps %xmm0, %xmm0
cvtss2sd 0x2f4(%rsp), %xmm0
movsd 0x54dc(%rip), %xmm1     # 0xd138
mulsd %xmm1, %xmm0
cvtsd2ss %xmm0, %xmm0
xorps %xmm2, %xmm2
cvtss2sd 0x2f8(%rsp), %xmm2
mulsd %xmm1, %xmm2
xorps %xmm1, %xmm1
cvtsd2ss %xmm2, %xmm1
leaq 0x308(%rsp), %rdi
callq 0x69a5
movaps 0x20(%rsp), %xmm1
addps %xmm0, %xmm1
xorps %xmm0, %xmm0
cvtss2sd %xmm1, %xmm0
shufps $0x55, %xmm1, %xmm1     # xmm1 = xmm1[1,1,1,1]
cvtss2sd %xmm1, %xmm1
xorps %xmm2, %xmm2
cvtss2sd 0x2e8(%rsp), %xmm2
leaq 0x584a(%rip), %rdi      # 0xd4fc
movsd %xmm0, 0x20(%rsp)
movsd %xmm1, 0x50(%rsp)
movb $0x3, %al
callq 0x4050
movl %ebp, %eax
xorps %xmm0, %xmm0
cvtsi2sd %rax, %xmm0
movl %r13d, %eax
xorps %xmm1, %xmm1
cvtsi2sd %rax, %xmm1
xorps %xmm2, %xmm2
cvtss2sd 0x2fc(%rsp), %xmm2
cvtss2sd 0x304(%rsp), %xmm3
leaq 0xa0(%rsp), %rdi
callq 0x6ee2
xorps %xmm2, %xmm2
cvtss2sd 0x2e8(%rsp), %xmm2
leaq 0xf0(%rsp), %rdi
movsd 0x20(%rsp), %xmm0
movsd 0x50(%rsp), %xmm1
callq 0x6cbc
leaq 0x130(%rsp), %rdi
leaq 0xa0(%rsp), %rsi
leaq 0xf0(%rsp), %rdx
callq 0x9dfb
leaq 0x210(%rsp), %rdi
leaq 0x130(%rsp), %rsi
leaq 0x308(%rsp), %rdx
callq 0x9dfb
cmpb $0x1, 0x260(%rsp)
jne 0x8631
movq 0x190(%rsp), %rbx
movupd 0x210(%rsp), %xmm0
movupd 0x220(%rsp), %xmm1
movupd 0x230(%rsp), %xmm2
movups 0x240(%rsp), %xmm3
leaq 0x500(%rsp), %rdi
movapd %xmm0, -0x40(%rdi)
movapd %xmm1, -0x30(%rdi)
movapd %xmm2, -0x20(%rdi)
movaps %xmm3, -0x10(%rdi)
leaq 0x250(%rsp), %rsi
movl $0xb8, %edx
callq 0x4260
movl 0x58(%rsp), %eax
movl %eax, 0x38(%rsp)
movl 0x5c(%rsp), %eax
movq %rax, 0x40(%rsp)
leaq 0x57e3(%rip), %rsi      # 0xd5bc
movq %rbx, %rdi
callq 0x4350
movq %rax, 0x18(%rsp)
testq %rax, %rax
je 0x87ee
callq 0x43b0
movl %eax, %ebx
leaq 0x57c2(%rip), %rdi      # 0xd5bf
movl %eax, %esi
xorl %eax, %eax
callq 0x4050
movl %ebx, %ebx
leaq 0x8(,%rbx,8), %rdi
callq 0x4030
movq %rax, %r15
leaq (,%rbx,8), %r14
movq %rbx, (%rax)
addq $0x8, %r15
testq %rbx, %rbx
je 0x7e39
movq %r15, %rdi
xorl %esi, %esi
movq %r14, %rdx
callq 0x4180
movq %r15, 0xa0(%rsp)
movq %rbx, %rbp
shlq $0x4, %rbp
leaq 0x8(%rbp), %rdi
callq 0x4030
movq %rax, %r12
movq %r14, 0x50(%rsp)
addq $0x8, %r12
movq %rbx, (%rax)
movq %rbx, 0x20(%rsp)
testq %rbx, %rbx
je 0x8369
xorl %ebx, %ebx
movq %r12, %rdi
xorl %esi, %esi
movq %rbp, %rdx
callq 0x4180
movq %r12, 0xf0(%rsp)
movq 0x40(%rsp), %r14
imull 0x38(%rsp), %r14d
leaq (,%r14,8), %rax
leaq (%rax,%rax,2), %r15
leaq (%rax,%rax,2), %rax
addq $-0x18, %rax
movabsq $-0x5555555555555555, %rcx # imm = 0xAAAAAAAAAAAAAAAB
mulq %rcx
shrq $0x4, %rdx
leaq (%rdx,%rdx,2), %rax
leaq 0x18(,%rax,8), %r12
movq %r15, %rdi
callq 0x4030
movq %rax, %r13
testl %r14d, %r14d
je 0x7ede
movq %r13, %rdi
xorl %esi, %esi
movq %r12, %rdx
callq 0x4180
movq 0xf0(%rsp), %rax
movl 0x38(%rsp), %ecx
movl %ecx, (%rax,%rbx)
movq 0x40(%rsp), %rcx
movl %ecx, 0x4(%rax,%rbx)
movq 0x8(%rax,%rbx), %rdi
movq %r13, 0x8(%rax,%rbx)
testq %rdi, %rdi
je 0x7f0a
callq 0x4370
addq $0x10, %rbx
cmpq %rbx, %rbp
jne 0x7ec1
jmp 0x8371
leaq 0x55ae(%rip), %rdi      # 0xd4cd
xorl %eax, %eax
callq 0x4050
jmp 0x87ee
movq %rbx, 0xa0(%rsp)
movl $0x16e3600, %edi        # imm = 0x16E3600
callq 0x4030
movq %rax, 0x10(%rsp)
movq 0x20(%rsp), %r14
leaq -0x1(%r14), %rax
movq %rax, 0x40(%rsp)
movq %r12, 0x38(%rsp)
testl %r14d, %r14d
sete %bl
movl $0x18, %esi
movl $0xf4240, %edx          # imm = 0xF4240
movq 0x10(%rsp), %rdi
movq 0x68(%rsp), %rcx
callq 0x4430
movq %rax, %rcx
movq 0x40(%rsp), %rax
leaq (%rax,%rcx), %rsi
movq %rsi, %rax
xorl %edx, %edx
divq %r14
movq %rcx, 0x8(%rsp)
testq %rcx, %rcx
sete %cl
orb %bl, %cl
jne 0x80e8
movl $0x1, %r15d
xorl %r13d, %r13d
movq 0x8(%rsp), %r12
movq %rsi, 0x78(%rsp)
movq %rax, 0x70(%rsp)
cmpq %r12, %rax
movq %r12, %rbp
cmovbq %rax, %rbp
cmpq 0x20(%rsp), %rsi
jb 0x80ce
movq 0xa0(%rsp), %r14
addq %r13, %r14
movq $0x0, 0xf0(%rsp)
movl $0xf8, %edi
callq 0x42d0
movq %rax, %rbx
movq 0x8(%rsp), %rax
subq %r12, %rax
leaq (%rax,%rax,2), %rax
movq 0x10(%rsp), %rcx
leaq (%rcx,%rax,8), %rax
movq %rax, 0x48(%rsp)
leaq 0x98bb(%rip), %rax      # 0x118c8
movq %rax, (%rbx)
movq %r14, 0x8(%rbx)
movq %rbx, %rdi
addq $0x10, %rdi
movl $0xb8, %edx
leaq 0x308(%rsp), %rsi
callq 0x4260
movaps 0xe0(%rsp), %xmm0
movlps %xmm0, 0xc8(%rbx)
movss 0x80(%rsp), %xmm0
movss %xmm0, 0xd0(%rbx)
movapd 0x90(%rsp), %xmm0
movupd %xmm0, 0xd4(%rbx)
movq 0x48(%rsp), %rax
movq %rax, 0xe8(%rbx)
movq %rbp, 0xf0(%rbx)
movq %rbx, 0x210(%rsp)
leaq 0xf0(%rsp), %rdi
leaq 0x210(%rsp), %rsi
xorl %edx, %edx
callq 0x4290
movq 0x210(%rsp), %rdi
testq %rdi, %rdi
je 0x80a3
movq (%rdi), %rax
callq *0x8(%rax)
movq 0x130(%rsp), %rax
cmpq $0x0, -0x8(%rax,%r15,8)
jne 0x90e5
movq 0xf0(%rsp), %rcx
movq %rcx, -0x8(%rax,%r15,8)
movq 0x78(%rsp), %rsi
movq 0x70(%rsp), %rax
cmpq 0x20(%rsp), %r15
jae 0x80e8
subq %rbp, %r12
incq %r15
addq $0x10, %r13
testq %r12, %r12
jne 0x7fb3
movq 0x20(%rsp), %r14
testq %r14, %r14
je 0x812c
xorl %ebx, %ebx
movq 0x38(%rsp), %r12
movq 0x130(%rsp), %rdi
cmpq $0x0, (%rdi,%rbx)
je 0x8110
addq %rbx, %rdi
callq 0x44c0
addq $0x8, %rbx
cmpq %rbx, 0x50(%rsp)
jne 0x80f9
cmpq $0xf4240, 0x8(%rsp)     # imm = 0xF4240
jae 0x7f55
jmp 0x813d
cmpq $0xf4240, 0x8(%rsp)     # imm = 0xF4240
jae 0x7f55
jmp 0x819a
movq 0xa0(%rsp), %rax
movq 0x60(%rsp), %rcx
xorl %edx, %edx
movq 0x18(%rsp), %r8
testl %r12d, %r12d
je 0x8192
movq %rdx, %rsi
shlq $0x4, %rsi
movq 0x8(%rax,%rsi), %rsi
xorl %edi, %edi
movsd 0x10(%rsi,%rdi), %xmm0
movupd (%rsi,%rdi), %xmm1
movupd (%rcx,%rdi), %xmm2
addpd %xmm1, %xmm2
movupd %xmm2, (%rcx,%rdi)
addsd 0x10(%rcx,%rdi), %xmm0
movsd %xmm0, 0x10(%rcx,%rdi)
addq $0x18, %rdi
cmpq %rdi, %r8
jne 0x8164
incq %rdx
cmpq %r14, %rdx
jne 0x8151
movq 0x10(%rsp), %rdi
callq 0x4370
movq 0xa0(%rsp), %rsi
testq %rsi, %rsi
je 0x81be
leaq 0xa0(%rsp), %rdi
callq 0xb8b0
movq 0x130(%rsp), %rsi
testq %rsi, %rsi
je 0x81d8
leaq 0x130(%rsp), %rdi
callq 0xb906
movq 0x68(%rsp), %rdi
callq 0x42c0
cmpb $0x1, 0x268(%rsp)
jne 0x8d7a
movq 0x170(%rsp), %rbx
leaq 0x308(%rsp), %rdi
leaq 0x250(%rsp), %rsi
movl $0xb8, %edx
callq 0x4260
movl 0x58(%rsp), %eax
movl %eax, 0x38(%rsp)
movl 0x5c(%rsp), %eax
movq %rax, 0x40(%rsp)
leaq 0x5392(%rip), %rsi      # 0xd5bc
movq %rbx, %rdi
callq 0x4350
movq %rax, 0x18(%rsp)
testq %rax, %rax
je 0x87ee
callq 0x43b0
movl %eax, %ebx
leaq 0x5371(%rip), %rdi      # 0xd5bf
movl %eax, %esi
xorl %eax, %eax
callq 0x4050
movl %ebx, %ebx
leaq 0x8(,%rbx,8), %rdi
callq 0x4030
movq %rax, %r15
leaq (,%rbx,8), %r14
movq %rbx, (%rax)
addq $0x8, %r15
testq %rbx, %rbx
je 0x828a
movq %r15, %rdi
xorl %esi, %esi
movq %r14, %rdx
callq 0x4180
movq %r15, 0x130(%rsp)
movq %rbx, %rbp
shlq $0x4, %rbp
leaq 0x8(%rbp), %rdi
callq 0x4030
movq %rax, %r12
movq %r14, 0x50(%rsp)
addq $0x8, %r12
movq %rbx, (%rax)
movq %rbx, 0x20(%rsp)
testq %rbx, %rbx
je 0x87f8
xorl %ebx, %ebx
movq %r12, %rdi
xorl %esi, %esi
movq %rbp, %rdx
callq 0x4180
movq %r12, 0xa0(%rsp)
movq 0x40(%rsp), %r14
imull 0x38(%rsp), %r14d
leaq (,%r14,8), %rax
leaq (%rax,%rax,2), %r15
leaq (%rax,%rax,2), %rax
addq $-0x18, %rax
movabsq $-0x5555555555555555, %rcx # imm = 0xAAAAAAAAAAAAAAAB
mulq %rcx
shrq $0x4, %rdx
leaq (%rdx,%rdx,2), %rax
leaq 0x18(,%rax,8), %r12
movq %r15, %rdi
callq 0x4030
movq %rax, %r13
testl %r14d, %r14d
je 0x832f
movq %r13, %rdi
xorl %esi, %esi
movq %r12, %rdx
callq 0x4180
movq 0xa0(%rsp), %rax
movl 0x38(%rsp), %ecx
movl %ecx, (%rax,%rbx)
movq 0x40(%rsp), %rcx
movl %ecx, 0x4(%rax,%rbx)
movq 0x8(%rax,%rbx), %rdi
movq %r13, 0x8(%rax,%rbx)
testq %rdi, %rdi
je 0x835b
callq 0x4370
addq $0x10, %rbx
cmpq %rbx, %rbp
jne 0x8312
jmp 0x8800
movq %r12, 0xf0(%rsp)
movl $0x16e3600, %edi        # imm = 0x16E3600
callq 0x4030
movq %rax, 0x10(%rsp)
movq 0x20(%rsp), %r14
leaq -0x1(%r14), %rax
movq %rax, 0x68(%rsp)
testl %r14d, %r14d
sete %bl
movl $0x18, %esi
movl $0xf4240, %edx          # imm = 0xF4240
movq 0x10(%rsp), %rdi
movq 0x18(%rsp), %rcx
callq 0x4430
movq %rax, %rcx
movq 0x68(%rsp), %rax
leaq (%rax,%rcx), %rsi
movq %rsi, %rax
xorl %edx, %edx
divq %r14
movq %rcx, 0x8(%rsp)
testq %rcx, %rcx
sete %cl
orb %bl, %cl
jne 0x8521
movl $0x1, %ebx
xorl %r15d, %r15d
movq 0x8(%rsp), %r14
movq %rsi, 0x78(%rsp)
movq %rax, 0x70(%rsp)
cmpq %r14, %rax
movq %r14, %r12
cmovbq %rax, %r12
cmpq 0x20(%rsp), %rsi
jb 0x8507
movq 0xf0(%rsp), %r13
addq %r15, %r13
movq $0x0, 0x88(%rsp)
movl $0x138, %edi            # imm = 0x138
callq 0x42d0
movq %rax, %rbp
movq 0x8(%rsp), %rax
subq %r14, %rax
leaq (%rax,%rax,2), %rax
movq 0x10(%rsp), %rcx
leaq (%rcx,%rax,8), %rax
movq %rax, 0x48(%rsp)
leaq 0x9503(%rip), %rax      # 0x11948
movq %rax, (%rbp)
movq %r13, 0x8(%rbp)
movq %rbp, %rdi
addq $0x10, %rdi
movl $0xf8, %edx
leaq 0x4c0(%rsp), %rsi
callq 0x4260
movaps 0xe0(%rsp), %xmm0
movlps %xmm0, 0x108(%rbp)
movss 0x80(%rsp), %xmm0
movss %xmm0, 0x110(%rbp)
movapd 0x90(%rsp), %xmm0
movupd %xmm0, 0x114(%rbp)
movq 0x48(%rsp), %rax
movq %rax, 0x128(%rbp)
movq %r12, 0x130(%rbp)
movq %rbp, 0x130(%rsp)
leaq 0x88(%rsp), %rdi
leaq 0x130(%rsp), %rsi
xorl %edx, %edx
callq 0x4290
movq 0x130(%rsp), %rdi
testq %rdi, %rdi
je 0x84dc
movq (%rdi), %rax
callq *0x8(%rax)
movq 0xa0(%rsp), %rax
cmpq $0x0, -0x8(%rax,%rbx,8)
jne 0x90e5
movq 0x88(%rsp), %rcx
movq %rcx, -0x8(%rax,%rbx,8)
movq 0x78(%rsp), %rsi
movq 0x70(%rsp), %rax
cmpq 0x20(%rsp), %rbx
jae 0x8521
subq %r12, %r14
incq %rbx
addq $0x10, %r15
testq %r14, %r14
jne 0x83eb
movq 0x20(%rsp), %r14
testq %r14, %r14
je 0x8560
xorl %ebx, %ebx
movq 0xa0(%rsp), %rdi
cmpq $0x0, (%rdi,%rbx)
je 0x8544
addq %rbx, %rdi
callq 0x44c0
addq $0x8, %rbx
cmpq %rbx, 0x50(%rsp)
jne 0x852d
cmpq $0xf4240, 0x8(%rsp)     # imm = 0xF4240
jae 0x838e
jmp 0x8571
cmpq $0xf4240, 0x8(%rsp)     # imm = 0xF4240
jae 0x838e
jmp 0x85e9
movq 0xf0(%rsp), %rax
movq 0x60(%rsp), %rcx
movq 0x40(%rsp), %rdx
imull 0x38(%rsp), %edx
movq %rdx, %r9
leaq (,%rdx,8), %rdx
leaq (%rdx,%rdx,2), %rdx
xorl %esi, %esi
testl %r9d, %r9d
je 0x85e1
movq %rsi, %rdi
shlq $0x4, %rdi
movq 0x8(%rax,%rdi), %rdi
xorl %r8d, %r8d
movsd 0x10(%rdi,%r8), %xmm0
movupd (%rdi,%r8), %xmm1
movupd (%rcx,%r8), %xmm2
addpd %xmm1, %xmm2
movupd %xmm2, (%rcx,%r8)
addsd 0x10(%rcx,%r8), %xmm0
movsd %xmm0, 0x10(%rcx,%r8)
addq $0x18, %r8
cmpq %r8, %rdx
jne 0x85ad
incq %rsi
cmpq %r14, %rsi
jne 0x8599
movq 0x10(%rsp), %rdi
callq 0x4370
movq 0xf0(%rsp), %rsi
testq %rsi, %rsi
je 0x860d
leaq 0xf0(%rsp), %rdi
callq 0xb8b0
movq 0xa0(%rsp), %rsi
testq %rsi, %rsi
je 0x8627
leaq 0xa0(%rsp), %rdi
callq 0xb906
movq 0x18(%rsp), %rdi
callq 0x42c0
cmpb $0x1, 0x268(%rsp)
jne 0x8d7a
movq 0x170(%rsp), %rbx
movupd 0x210(%rsp), %xmm0
movupd 0x220(%rsp), %xmm1
movupd 0x230(%rsp), %xmm2
movups 0x240(%rsp), %xmm3
leaq 0x400(%rsp), %rdi
movapd %xmm0, -0x40(%rdi)
movapd %xmm1, -0x30(%rdi)
movapd %xmm2, -0x20(%rdi)
movaps %xmm3, -0x10(%rdi)
leaq 0x250(%rsp), %rsi
movl $0xb8, %edx
callq 0x4260
movl 0x58(%rsp), %eax
movl %eax, 0x38(%rsp)
movl 0x5c(%rsp), %eax
movq %rax, 0x40(%rsp)
leaq 0x4f0d(%rip), %rsi      # 0xd5bc
movq %rbx, %rdi
callq 0x4350
movq %rax, 0x18(%rsp)
testq %rax, %rax
je 0x87ee
callq 0x43b0
movl %eax, %ebx
leaq 0x4eec(%rip), %rdi      # 0xd5bf
movl %eax, %esi
xorl %eax, %eax
callq 0x4050
movl %ebx, %ebx
leaq 0x8(,%rbx,8), %rdi
callq 0x4030
movq %rax, %r15
leaq (,%rbx,8), %r14
movq %rbx, (%rax)
addq $0x8, %r15
testq %rbx, %rbx
je 0x870f
movq %r15, %rdi
xorl %esi, %esi
movq %r14, %rdx
callq 0x4180
movq %r15, 0xa0(%rsp)
movq %rbx, %rbp
shlq $0x4, %rbp
leaq 0x8(%rbp), %rdi
callq 0x4030
movq %rax, %r12
movq %r14, 0x50(%rsp)
addq $0x8, %r12
movq %rbx, (%rax)
movq %rbx, 0x20(%rsp)
testq %rbx, %rbx
je 0x8ab6
xorl %ebx, %ebx
movq %r12, %rdi
xorl %esi, %esi
movq %rbp, %rdx
callq 0x4180
movq %r12, 0xf0(%rsp)
movq 0x40(%rsp), %r14
imull 0x38(%rsp), %r14d
leaq (,%r14,8), %rax
leaq (%rax,%rax,2), %r15
leaq (%rax,%rax,2), %rax
addq $-0x18, %rax
movabsq $-0x5555555555555555, %rcx # imm = 0xAAAAAAAAAAAAAAAB
mulq %rcx
shrq $0x4, %rdx
leaq (%rdx,%rdx,2), %rax
leaq 0x18(,%rax,8), %r12
movq %r15, %rdi
callq 0x4030
movq %rax, %r13
testl %r14d, %r14d
je 0x87b4
movq %r13, %rdi
xorl %esi, %esi
movq %r12, %rdx
callq 0x4180
movq 0xf0(%rsp), %rax
movl 0x38(%rsp), %ecx
movl %ecx, (%rax,%rbx)
movq 0x40(%rsp), %rcx
movl %ecx, 0x4(%rax,%rbx)
movq 0x8(%rax,%rbx), %rdi
movq %r13, 0x8(%rax,%rbx)
testq %rdi, %rdi
je 0x87e0
callq 0x4370
addq $0x10, %rbx
cmpq %rbx, %rbp
jne 0x8797
jmp 0x8abe
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
jmp 0x9009
movq %r12, 0xa0(%rsp)
movl $0xf42400, %edi         # imm = 0xF42400
callq 0x4030
movq %rax, 0x10(%rsp)
movq 0x20(%rsp), %r14
leaq -0x1(%r14), %rax
movq %rax, 0x68(%rsp)
testl %r14d, %r14d
sete %bl
movl $0x10, %esi
movl $0xf4240, %edx          # imm = 0xF4240
movq 0x10(%rsp), %rdi
movq 0x18(%rsp), %rcx
callq 0x4430
movq %rax, %rcx
movq 0x68(%rsp), %rax
leaq (%rax,%rcx), %rsi
movq %rsi, %rax
xorl %edx, %edx
divq %r14
movq %rcx, 0x8(%rsp)
testq %rcx, %rcx
sete %cl
orb %bl, %cl
jne 0x89ac
movl $0x1, %ebx
xorl %r15d, %r15d
movq 0x8(%rsp), %r14
movq %rsi, 0x78(%rsp)
movq %rax, 0x70(%rsp)
cmpq %r14, %rax
movq %r14, %r12
cmovbq %rax, %r12
cmpq 0x20(%rsp), %rsi
jb 0x8992
movq %r12, 0x48(%rsp)
movq 0xa0(%rsp), %r13
addq %r15, %r13
movq $0x0, 0xf0(%rsp)
movl $0xf8, %edi
callq 0x42d0
movq %rax, %rbp
movq 0x8(%rsp), %r12
subq %r14, %r12
shlq $0x4, %r12
addq 0x10(%rsp), %r12
leaq 0x9038(%rip), %rax      # 0x11908
movq %rax, (%rbp)
movq %r13, 0x8(%rbp)
movq %rbp, %rdi
addq $0x10, %rdi
movl $0xb8, %edx
leaq 0x308(%rsp), %rsi
callq 0x4260
movaps 0xe0(%rsp), %xmm0
movlps %xmm0, 0xc8(%rbp)
movss 0x80(%rsp), %xmm0
movss %xmm0, 0xd0(%rbp)
movapd 0x90(%rsp), %xmm0
movupd %xmm0, 0xd4(%rbp)
movq %r12, 0xe8(%rbp)
movq 0x48(%rsp), %r12
movq %r12, 0xf0(%rbp)
movq %rbp, 0x210(%rsp)
leaq 0xf0(%rsp), %rdi
leaq 0x210(%rsp), %rsi
xorl %edx, %edx
callq 0x4290
movq 0x210(%rsp), %rdi
testq %rdi, %rdi
je 0x8967
movq (%rdi), %rax
callq *0x8(%rax)
movq 0x130(%rsp), %rax
cmpq $0x0, -0x8(%rax,%rbx,8)
jne 0x90e5
movq 0xf0(%rsp), %rcx
movq %rcx, -0x8(%rax,%rbx,8)
movq 0x78(%rsp), %rsi
movq 0x70(%rsp), %rax
cmpq 0x20(%rsp), %rbx
jae 0x89ac
subq %r12, %r14
incq %rbx
addq $0x10, %r15
testq %r14, %r14
jne 0x887a
movq 0x20(%rsp), %r14
testq %r14, %r14
je 0x89eb
xorl %ebx, %ebx
movq 0x130(%rsp), %rdi
cmpq $0x0, (%rdi,%rbx)
je 0x89cf
addq %rbx, %rdi
callq 0x44c0
addq $0x8, %rbx
cmpq %rbx, 0x50(%rsp)
jne 0x89b8
cmpq $0xf4240, 0x8(%rsp)     # imm = 0xF4240
jae 0x881d
jmp 0x89fc
cmpq $0xf4240, 0x8(%rsp)     # imm = 0xF4240
jae 0x881d
jmp 0x8a74
movq 0xa0(%rsp), %rax
movq 0x60(%rsp), %rcx
movq 0x40(%rsp), %rdx
imull 0x38(%rsp), %edx
movq %rdx, %r9
leaq (,%rdx,8), %rdx
leaq (%rdx,%rdx,2), %rdx
xorl %esi, %esi
testl %r9d, %r9d
je 0x8a6c
movq %rsi, %rdi
shlq $0x4, %rdi
movq 0x8(%rax,%rdi), %rdi
xorl %r8d, %r8d
movsd 0x10(%rdi,%r8), %xmm0
movupd (%rdi,%r8), %xmm1
movupd (%rcx,%r8), %xmm2
addpd %xmm1, %xmm2
movupd %xmm2, (%rcx,%r8)
addsd 0x10(%rcx,%r8), %xmm0
movsd %xmm0, 0x10(%rcx,%r8)
addq $0x18, %r8
cmpq %r8, %rdx
jne 0x8a38
incq %rsi
cmpq %r14, %rsi
jne 0x8a24
movq 0x10(%rsp), %rdi
callq 0x4370
movq 0xa0(%rsp), %rsi
testq %rsi, %rsi
je 0x8a98
leaq 0xa0(%rsp), %rdi
callq 0xb8b0
movq 0x130(%rsp), %rsi
testq %rsi, %rsi
je 0x8d70
leaq 0x130(%rsp), %rdi
jmp 0x8d6b
movq %r12, 0xf0(%rsp)
movl $0xf42400, %edi         # imm = 0xF42400
callq 0x4030
movq %rax, 0x10(%rsp)
movq 0x20(%rsp), %r14
leaq -0x1(%r14), %rax
movq %rax, 0x68(%rsp)
testl %r14d, %r14d
sete %bl
movl $0x10, %esi
movl $0xf4240, %edx          # imm = 0xF4240
movq 0x10(%rsp), %rdi
movq 0x18(%rsp), %rcx
callq 0x4430
movq %rax, %rcx
movq 0x68(%rsp), %rax
leaq (%rax,%rcx), %rsi
movq %rsi, %rax
xorl %edx, %edx
divq %r14
movq %rcx, 0x8(%rsp)
testq %rcx, %rcx
sete %cl
orb %bl, %cl
jne 0x8c6a
movl $0x1, %ebx
xorl %r15d, %r15d
movq 0x8(%rsp), %r14
movq %rsi, 0x78(%rsp)
movq %rax, 0x70(%rsp)
cmpq %r14, %rax
movq %r14, %r12
cmovbq %rax, %r12
cmpq 0x20(%rsp), %rsi
jb 0x8c50
movq %r12, 0x48(%rsp)
movq 0xf0(%rsp), %r13
addq %r15, %r13
movq $0x0, 0x88(%rsp)
movl $0x138, %edi            # imm = 0x138
callq 0x42d0
movq %rax, %rbp
movq 0x8(%rsp), %r12
subq %r14, %r12
shlq $0x4, %r12
addq 0x10(%rsp), %r12
leaq 0x8dfa(%rip), %rax      # 0x11988
movq %rax, (%rbp)
movq %r13, 0x8(%rbp)
movq %rbp, %rdi
addq $0x10, %rdi
movl $0xf8, %edx
leaq 0x3c0(%rsp), %rsi
callq 0x4260
movaps 0xe0(%rsp), %xmm0
movlps %xmm0, 0x108(%rbp)
movss 0x80(%rsp), %xmm0
movss %xmm0, 0x110(%rbp)
movapd 0x90(%rsp), %xmm0
movupd %xmm0, 0x114(%rbp)
movq %r12, 0x128(%rbp)
movq 0x48(%rsp), %r12
movq %r12, 0x130(%rbp)
movq %rbp, 0x130(%rsp)
leaq 0x88(%rsp), %rdi
leaq 0x130(%rsp), %rsi
xorl %edx, %edx
callq 0x4290
movq 0x130(%rsp), %rdi
testq %rdi, %rdi
je 0x8c25
movq (%rdi), %rax
callq *0x8(%rax)
movq 0xa0(%rsp), %rax
cmpq $0x0, -0x8(%rax,%rbx,8)
jne 0x90e5
movq 0x88(%rsp), %rcx
movq %rcx, -0x8(%rax,%rbx,8)
movq 0x78(%rsp), %rsi
movq 0x70(%rsp), %rax
cmpq 0x20(%rsp), %rbx
jae 0x8c6a
subq %r12, %r14
incq %rbx
addq $0x10, %r15
testq %r14, %r14
jne 0x8b38
movq 0x20(%rsp), %r14
testq %r14, %r14
je 0x8ca9
xorl %ebx, %ebx
movq 0xa0(%rsp), %rdi
cmpq $0x0, (%rdi,%rbx)
je 0x8c8d
addq %rbx, %rdi
callq 0x44c0
addq $0x8, %rbx
cmpq %rbx, 0x50(%rsp)
jne 0x8c76
cmpq $0xf4240, 0x8(%rsp)     # imm = 0xF4240
jae 0x8adb
jmp 0x8cba
cmpq $0xf4240, 0x8(%rsp)     # imm = 0xF4240
jae 0x8adb
jmp 0x8d32
movq 0xf0(%rsp), %rax
movq 0x60(%rsp), %rcx
movq 0x40(%rsp), %rdx
imull 0x38(%rsp), %edx
movq %rdx, %r9
leaq (,%rdx,8), %rdx
leaq (%rdx,%rdx,2), %rdx
xorl %esi, %esi
testl %r9d, %r9d
je 0x8d2a
movq %rsi, %rdi
shlq $0x4, %rdi
movq 0x8(%rax,%rdi), %rdi
xorl %r8d, %r8d
movsd 0x10(%rdi,%r8), %xmm0
movupd (%rdi,%r8), %xmm1
movupd (%rcx,%r8), %xmm2
addpd %xmm1, %xmm2
movupd %xmm2, (%rcx,%r8)
addsd 0x10(%rcx,%r8), %xmm0
movsd %xmm0, 0x10(%rcx,%r8)
addq $0x18, %r8
cmpq %r8, %rdx
jne 0x8cf6
incq %rsi
cmpq %r14, %rsi
jne 0x8ce2
movq 0x10(%rsp), %rdi
callq 0x4370
movq 0xf0(%rsp), %rsi
testq %rsi, %rsi
je 0x8d56
leaq 0xf0(%rsp), %rdi
callq 0xb8b0
movq 0xa0(%rsp), %rsi
testq %rsi, %rsi
je 0x8d70
leaq 0xa0(%rsp), %rdi
callq 0xb906
movq 0x18(%rsp), %rdi
callq 0x42c0
movq 0x1b0(%rsp), %rdi
leaq 0x58(%rsp), %rsi
callq 0xa204
xorps %xmm0, %xmm0
cvtss2sd 0x2c4(%rsp), %xmm0
movsd %xmm0, 0x50(%rsp)
xorps %xmm0, %xmm0
cvtss2sd 0x2cc(%rsp), %xmm0
movsd %xmm0, 0x20(%rsp)
movl 0x58(%rsp), %r12d
movl 0x5c(%rsp), %r15d
movl %r15d, %ebp
imull %r12d, %ebp
leaq (,%rbp,8), %rax
leaq (%rax,%rax,2), %rbx
movq %rbx, %rdi
callq 0x4030
movq %rax, %r14
testq %rbp, %rbp
movabsq $-0x5555555555555555, %rcx # imm = 0xAAAAAAAAAAAAAAAB
je 0x8fc1
movl %r12d, 0x8(%rsp)
movl %r15d, 0x48(%rsp)
movsd 0x4263(%rip), %xmm0     # 0xd060
divsd 0x20(%rsp), %xmm0
movsd %xmm0, 0x20(%rsp)
leaq -0x18(%rbx), %rax
mulq %rcx
shrq $0x4, %rdx
leaq (%rdx,%rdx,2), %rax
leaq 0x18(,%rax,8), %rdx
xorl %r12d, %r12d
movq %r14, %rdi
xorl %esi, %esi
callq 0x4180
movq 0x60(%rsp), %r13
leaq (,%rbp,2), %rax
addq %rbp, %rax
leaq (,%rax,8), %rbp
addq %r13, %rbp
xorps %xmm2, %xmm2
cvtss2sd 0x2c8(%rsp), %xmm2
leaq (%r12,%r13), %r15
addq $0x18, %r15
movsd -0x18(%r15), %xmm0
mulsd %xmm2, %xmm0
movsd -0x10(%r15), %xmm3
mulsd %xmm2, %xmm3
mulsd -0x8(%r15), %xmm2
movsd 0x50(%rsp), %xmm1
addsd %xmm1, %xmm0
addsd %xmm1, %xmm3
movsd %xmm3, 0x90(%rsp)
addsd %xmm1, %xmm2
movsd %xmm2, 0xe0(%rsp)
movsd 0x20(%rsp), %xmm1
callq 0x44f0
movsd %xmm0, 0x80(%rsp)
movsd 0x90(%rsp), %xmm0
movsd 0x20(%rsp), %xmm1
callq 0x44f0
movsd %xmm0, 0x90(%rsp)
movsd 0xe0(%rsp), %xmm0
movsd 0x20(%rsp), %xmm1
callq 0x44f0
movsd 0x80(%rsp), %xmm1
movsd %xmm1, (%r14,%r12)
movsd 0x90(%rsp), %xmm1
movsd %xmm1, 0x8(%r14,%r12)
movsd %xmm0, 0x10(%r14,%r12)
addq $0x18, %r12
cmpq %rbp, %r15
jne 0x8e48
movl 0x8(%rsp), %eax
movl %eax, 0x308(%rsp)
movl 0x48(%rsp), %eax
movl %eax, 0x30c(%rsp)
movq %r14, 0x310(%rsp)
cmpb $0x0, 0x2d0(%rsp)
movsd 0x4120(%rip), %xmm4     # 0xd060
je 0x8fd9
xorl %eax, %eax
movsd 0x10(%r14,%rax), %xmm0
movupd (%r14,%rax), %xmm1
movapd %xmm1, %xmm2
unpckhpd %xmm1, %xmm2            # xmm2 = xmm2[1],xmm1[1]
maxsd %xmm1, %xmm2
movapd %xmm0, %xmm3
maxsd %xmm2, %xmm3
xorl %ecx, %ecx
ucomisd %xmm4, %xmm3
seta %dl
movapd %xmm4, %xmm2
divsd %xmm3, %xmm2
jbe 0x8f80
mulsd %xmm2, %xmm0
unpcklpd %xmm2, %xmm2            # xmm2 = xmm2[0,0]
mulpd %xmm1, %xmm2
movb %dl, %cl
movd %ecx, %xmm3
pshufd $0x0, %xmm3, %xmm3      # xmm3 = xmm3[0,0,0,0]
pslld $0x1f, %xmm3
psrad $0x1f, %xmm3
andpd %xmm3, %xmm2
andnpd %xmm1, %xmm3
orpd %xmm2, %xmm3
movupd %xmm3, (%r14,%rax)
movsd %xmm0, 0x10(%r14,%rax)
addq $0x18, %rax
cmpq %rax, %rbx
jne 0x8f48
jmp 0x8fd9
movl %r12d, 0x308(%rsp)
movl %r15d, 0x30c(%rsp)
movq %r14, 0x310(%rsp)
movq 0x1f0(%rsp), %rdi
movl 0x298(%rsp), %edx
leaq 0x308(%rsp), %rsi
callq 0x6547
movq 0x310(%rsp), %rdi
testq %rdi, %rdi
je 0x9007
callq 0x4370
xorl %ebx, %ebx
movq 0x60(%rsp), %rdi
testq %rdi, %rdi
je 0x9018
callq 0x4370
movq 0x1f0(%rsp), %rdi
leaq 0x200(%rsp), %rax
cmpq %rax, %rdi
je 0x903d
movq 0x200(%rsp), %rsi
incq %rsi
callq 0x42e0
movq 0x1b0(%rsp), %rdi
leaq 0x1c0(%rsp), %rax
cmpq %rax, %rdi
je 0x9062
movq 0x1c0(%rsp), %rsi
incq %rsi
callq 0x42e0
movq 0x170(%rsp), %rdi
leaq 0x180(%rsp), %rax
cmpq %rax, %rdi
je 0x9087
movq 0x180(%rsp), %rsi
incq %rsi
callq 0x42e0
movq 0x190(%rsp), %rdi
leaq 0x1a0(%rsp), %rax
cmpq %rax, %rdi
je 0x90ac
movq 0x1a0(%rsp), %rsi
incq %rsi
callq 0x42e0
movq 0x1d0(%rsp), %rdi
leaq 0x1e0(%rsp), %rax
cmpq %rax, %rdi
je 0x90d1
movq 0x1e0(%rsp), %rsi
incq %rsi
callq 0x42e0
movl %ebx, %eax
addq $0x5b8, %rsp            # imm = 0x5B8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x40b0
jmp 0x91db
jmp 0x91d6
jmp 0x910c
jmp 0x9114
movq %rax, %rbx
jmp 0x927b
jmp 0x9114
jmp 0x91db
jmp 0x91e3
movq %rax, %rbx
jmp 0x92b9
movq %rax, %rbx
jmp 0x92ce
movq %rax, %rbx
jmp 0x9304
movq %rax, %rbx
jmp 0x9319
jmp 0x915e
jmp 0x915e
jmp 0x915e
jmp 0x915e
movq %rax, %rbx
movq 0x310(%rsp), %rdi
testq %rdi, %rdi
je 0x9149
callq 0x4370
movq $0x0, 0x310(%rsp)
jmp 0x9323
jmp 0x915e
jmp 0x915e
movq %rax, %rbx
jmp 0x9323
movq %rax, %rbx
jmp 0x9332
movq %rax, %rbx
jmp 0x9357
movq %rax, %rbx
jmp 0x937c
jmp 0x9180
movq %rax, %rbx
movq 0x308(%rsp), %rdi
cmpq %r14, %rdi
je 0x93a1
movq 0x318(%rsp), %rsi
jmp 0x9399
movq %rax, %rbx
jmp 0x93a1
jmp 0x91ab
movq %rax, %rbx
movq 0x308(%rsp), %rdi
cmpq %r14, %rdi
je 0x93c6
movq 0x318(%rsp), %rsi
jmp 0x93be
movq %rax, %rbx
jmp 0x93c6
jmp 0x91db
movq %rax, %rbx
jmp 0x9259
movq %rax, %rbx
jmp 0x9297
movq %rax, %rbx
jmp 0x92e2
jmp 0x920c
movq %rax, %rbx
movq 0x210(%rsp), %rdi
testq %rdi, %rdi
je 0x924f
movq (%rdi), %rax
callq *0x8(%rax)
jmp 0x924f
jmp 0x928a
jmp 0x924c
movq %rax, %rbx
movq 0x130(%rsp), %rdi
testq %rdi, %rdi
je 0x928d
movq (%rdi), %rax
callq *0x8(%rax)
jmp 0x928d
movq %rax, %rbx
movq 0x210(%rsp), %rdi
testq %rdi, %rdi
je 0x92d8
movq (%rdi), %rax
callq *0x8(%rax)
jmp 0x92d8
jmp 0x928a
jmp 0x92d5
jmp 0x928a
movq %rax, %rbx
movq 0x10(%rsp), %rdi
callq 0x4370
movq 0xa0(%rsp), %rsi
testq %rsi, %rsi
je 0x9273
leaq 0xa0(%rsp), %rdi
callq 0xb8b0
movq 0x130(%rsp), %r15
testq %r15, %r15
je 0x92ce
leaq 0x130(%rsp), %rdi
jmp 0x92c6
movq %rax, %rbx
movq 0x10(%rsp), %rdi
callq 0x4370
movq 0xf0(%rsp), %rsi
testq %rsi, %rsi
je 0x92b1
leaq 0xf0(%rsp), %rdi
callq 0xb8b0
movq 0xa0(%rsp), %r15
testq %r15, %r15
je 0x92ce
leaq 0xa0(%rsp), %rdi
movq %r15, %rsi
callq 0xb906
movq 0x18(%rsp), %rdi
jmp 0x931e
movq %rax, %rbx
movq 0x10(%rsp), %rdi
callq 0x4370
movq 0xa0(%rsp), %rsi
testq %rsi, %rsi
je 0x92fc
leaq 0xa0(%rsp), %rdi
callq 0xb8b0
movq 0x130(%rsp), %r13
testq %r13, %r13
je 0x9319
leaq 0x130(%rsp), %rdi
movq %r13, %rsi
callq 0xb906
movq 0x68(%rsp), %rdi
callq 0x42c0
movq 0x60(%rsp), %rdi
testq %rdi, %rdi
je 0x9332
callq 0x4370
movq 0x1f0(%rsp), %rdi
leaq 0x200(%rsp), %rax
cmpq %rax, %rdi
je 0x9357
movq 0x200(%rsp), %rsi
incq %rsi
callq 0x42e0
movq 0x1b0(%rsp), %rdi
leaq 0x1c0(%rsp), %rax
cmpq %rax, %rdi
je 0x937c
movq 0x1c0(%rsp), %rsi
incq %rsi
callq 0x42e0
movq 0x170(%rsp), %rdi
leaq 0x180(%rsp), %rax
cmpq %rax, %rdi
je 0x93a1
movq 0x180(%rsp), %rsi
incq %rsi
callq 0x42e0
movq 0x190(%rsp), %rdi
leaq 0x1a0(%rsp), %rax
cmpq %rax, %rdi
je 0x93c6
movq 0x1a0(%rsp), %rsi
incq %rsi
callq 0x42e0
movq 0x1d0(%rsp), %rdi
leaq 0x1e0(%rsp), %rax
cmpq %rax, %rdi
je 0x93eb
movq 0x1e0(%rsp), %rsi
incq %rsi
callq 0x42e0
movq %rbx, %rdi
callq 0x4510
nop