// File: /workspace/github_cpp_makefile_star2_O2/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 $0x5c8, %rsp            # imm = 0x5C8
movq %rsi, %rbx
movl %edi, %ebp
leaq 0x1e0(%rsp), %r14
andl $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, 0x6c(%r14)
andq $0x0, 0x79(%r14)
movupd %xmm0, 0x5c(%r14)
movupd %xmm0, 0x88(%r14)
movupd %xmm0, 0x98(%r14)
movupd %xmm0, 0xa8(%r14)
movq %r14, %rdi
callq 0x63bb
movq %r14, %rdi
movl %ebp, %esi
movq %rbx, %rdx
callq 0x6559
testb %al, %al
je 0x68e7
leaq 0x1e0(%rsp), %rsi
movl 0x4c(%rsi), %r15d
leaq 0x3b0(%rsp), %rbx
leaq 0x2d8(%rsp), %rdx
movq %rbx, %rdi
callq 0x89f0
leaq 0x5d45(%rip), %rdx      # 0xc4bb
leaq 0x2d8(%rsp), %rdi
movq %rbx, %rsi
callq 0x8e06
leaq 0x5cf0(%rip), %rdx      # 0xc47d
leaq 0x2b8(%rsp), %rdi
leaq 0x2d8(%rsp), %rsi
callq 0x8de7
leaq 0x2d8(%rsp), %rdi
callq 0x4160
leaq 0x5d05(%rip), %rdx      # 0xc4bb
leaq 0x2d8(%rsp), %rdi
leaq 0x3b0(%rsp), %rsi
callq 0x8e06
leaq 0x5ccd(%rip), %rdx      # 0xc49f
leaq 0x298(%rsp), %rdi
leaq 0x2d8(%rsp), %rsi
callq 0x8de7
leaq 0x208(%rsp), %r14
leaq 0x2d8(%rsp), %rdi
callq 0x4160
movl 0x28(%r14), %ebp
movl 0x2c(%r14), %ebx
movsd 0x30(%r14), %xmm0
movaps %xmm0, 0x90(%rsp)
movss 0x57fa(%rip), %xmm0     # 0xc014
divss 0x38(%r14), %xmm0
movss %xmm0, 0x88(%rsp)
movupd 0x3c(%r14), %xmm0
movapd %xmm0, 0xb0(%rsp)
leaq 0x1c0(%rsp), %rdi
leaq 0x2d8(%rsp), %rdx
movq %r14, %rsi
callq 0x89f0
leaq 0x218(%rsp), %rsi
leaq 0x390(%rsp), %rdi
leaq 0x2d8(%rsp), %rdx
callq 0x89f0
leaq 0x30(%rsp), %rdi
movl %ebp, %esi
movl %ebx, %edx
callq 0x8e3e
testl %r15d, %r15d
je 0x68ef
cmpl $0x2, %r15d
jne 0x6a25
movq 0x1c0(%rsp), %rsi
leaq 0x2d8(%rsp), %rdi
callq 0x8e9c
leaq 0x30(%rsp), %rbx
leaq 0x2d8(%rsp), %rsi
movq %rbx, %rdi
callq 0x8fc2
leaq 0x2e0(%rsp), %rdi
callq 0x9478
movl 0x4(%rbx), %eax
orl (%rbx), %eax
movq 0x1c0(%rsp), %rsi
je 0x6cf5
leaq 0x5bf5(%rip), %rdi      # 0xc4d0
xorl %eax, %eax
callq 0x4050
jmp 0x7a17
pushq $-0x1
popq %rbx
jmp 0x7c98
cmpb $0x1, 0x1f0(%rsp)
jne 0x7207
movq 0x2b8(%rsp), %rbx
leaq 0x2d8(%rsp), %rdi
leaq 0x1e0(%rsp), %rsi
movl $0xb8, %edx
callq 0x4280
movl 0x30(%rsp), %eax
movl %eax, 0x4(%rsp)
movl 0x34(%rsp), %eax
movq %rax, 0x18(%rsp)
leaq 0x5c75(%rip), %rsi      # 0xc5ac
movq %rbx, %rdi
callq 0x4360
movq %rax, 0x140(%rsp)
testq %rax, %rax
je 0x733d
callq 0x43c0
movl %eax, %ebx
leaq 0x5c51(%rip), %rdi      # 0xc5af
movl %eax, %esi
xorl %eax, %eax
callq 0x4050
movl %ebx, %r13d
leaq 0x8(,%r13,8), %rdi
callq 0x4030
movq %rax, %rbx
leaq (,%r13,8), %rbp
movq %r13, (%rax)
addq $0x8, %rbx
testq %r13, %r13
je 0x699b
movq %rbx, %rdi
xorl %esi, %esi
movq %rbp, %rdx
callq 0x41a0
movq %rbx, 0x180(%rsp)
movq %r13, %rbx
shlq $0x4, %rbx
leaq 0x8(%rbx), %rdi
callq 0x4030
movq %rax, %r15
addq $0x8, %r15
movq %r13, (%rax)
testl %r13d, %r13d
je 0x69cf
movq %r15, %rdi
xorl %esi, %esi
movq %rbx, %rdx
callq 0x41a0
movq %r15, 0x100(%rsp)
leaq 0xc8(%rsp), %r15
xorl %r14d, %r14d
leaq 0xc0(%rsp), %r12
cmpq %r14, %rbx
je 0x6d08
movq %r12, %rdi
movl 0x4(%rsp), %esi
movq 0x18(%rsp), %rdx
callq 0x8e3e
movq 0x100(%rsp), %rdi
addq %r14, %rdi
movq %r12, %rsi
callq 0x8fc2
movq %r15, %rdi
callq 0x9478
addq $0x10, %r14
jmp 0x69ea
movsd 0x268(%rsp), %xmm0
leaq 0x5aa6(%rip), %rdi      # 0xc4db
movb $0x1, %al
callq 0x4050
cvtss2sd 0x270(%rsp), %xmm0
cvtss2sd 0x274(%rsp), %xmm1
movsd 0x268(%rsp), %xmm2
leaq 0x2d8(%rsp), %rdi
callq 0x5d85
movsd 0x27c(%rsp), %xmm1
cmpb $0x1, 0x292(%rsp)
jne 0x6a81
cmpb $0x0, 0x293(%rsp)
jne 0x6a95
cmpb $0x0, 0x290(%rsp)
jne 0x6ad9
cmpb $0x0, 0x291(%rsp)
jne 0x6ad9
movaps %xmm1, 0x40(%rsp)
cvtss2sd 0x284(%rsp), %xmm0
movsd 0x568d(%rip), %xmm1     # 0xc138
mulsd %xmm1, %xmm0
cvtsd2ss %xmm0, %xmm0
cvtss2sd 0x288(%rsp), %xmm2
mulsd %xmm1, %xmm2
cvtsd2ss %xmm2, %xmm1
leaq 0x2d8(%rsp), %rdi
callq 0x5c77
movaps 0x40(%rsp), %xmm1
addps %xmm0, %xmm1
cvtss2sd %xmm1, %xmm0
shufps $0x55, %xmm1, %xmm1     # xmm1 = xmm1[1,1,1,1]
cvtss2sd %xmm1, %xmm1
cvtss2sd 0x278(%rsp), %xmm2
leaq 0x59f7(%rip), %rdi      # 0xc4ec
movsd %xmm0, 0x40(%rsp)
movsd %xmm1, 0x28(%rsp)
movb $0x3, %al
callq 0x4050
movl %ebp, %eax
cvtsi2sd %rax, %xmm0
movl %ebx, %eax
cvtsi2sd %rax, %xmm1
cvtss2sd 0x28c(%rsp), %xmm2
cvtss2sd 0x294(%rsp), %xmm3
leaq 0x180(%rsp), %rdi
callq 0x6137
cvtss2sd 0x278(%rsp), %xmm2
leaq 0x100(%rsp), %rdi
movsd 0x40(%rsp), %xmm0
movsd 0x28(%rsp), %xmm1
callq 0x5f19
leaq 0x140(%rsp), %rdi
leaq 0x180(%rsp), %rsi
leaq 0x100(%rsp), %rdx
callq 0x87e8
leaq 0xc0(%rsp), %rdi
leaq 0x140(%rsp), %rsi
leaq 0x2d8(%rsp), %rdx
callq 0x87e8
cmpb $0x1, 0x1f0(%rsp)
jne 0x7378
movq 0x2b8(%rsp), %rbx
movupd 0xc0(%rsp), %xmm0
movupd 0xd0(%rsp), %xmm1
movups 0xe0(%rsp), %xmm2
movups 0xf0(%rsp), %xmm3
leaq 0x510(%rsp), %rdi
movapd %xmm0, -0x40(%rdi)
movapd %xmm1, -0x30(%rdi)
movaps %xmm2, -0x20(%rdi)
movaps %xmm3, -0x10(%rdi)
leaq 0x1e0(%rsp), %rsi
movl $0xb8, %edx
callq 0x4280
movl 0x30(%rsp), %eax
movl %eax, 0x4(%rsp)
movl 0x34(%rsp), %eax
movq %rax, 0x18(%rsp)
leaq 0x599f(%rip), %rsi      # 0xc5ac
movq %rbx, %rdi
callq 0x4360
movq %rax, 0x180(%rsp)
testq %rax, %rax
je 0x74dc
callq 0x43c0
movl %eax, %ebx
leaq 0x597b(%rip), %rdi      # 0xc5af
movl %eax, %esi
xorl %eax, %eax
callq 0x4050
movl %ebx, %r13d
leaq 0x8(,%r13,8), %rdi
callq 0x4030
movq %rax, %rbx
leaq (,%r13,8), %rbp
movq %r13, (%rax)
addq $0x8, %rbx
testq %r13, %r13
je 0x6c71
movq %rbx, %rdi
xorl %esi, %esi
movq %rbp, %rdx
callq 0x41a0
movq %rbx, 0x100(%rsp)
movq %r13, %rbx
shlq $0x4, %rbx
leaq 0x8(%rbx), %rdi
callq 0x4030
movq %rax, %r15
addq $0x8, %r15
movq %r13, (%rax)
testl %r13d, %r13d
je 0x6ca5
movq %r15, %rdi
xorl %esi, %esi
movq %rbx, %rdx
callq 0x41a0
movq %r15, 0x8(%rsp)
leaq 0x148(%rsp), %r15
xorl %r14d, %r14d
leaq 0x140(%rsp), %r12
cmpq %r14, %rbx
je 0x6f6f
movq %r12, %rdi
movl 0x4(%rsp), %esi
movq 0x18(%rsp), %rdx
callq 0x8e3e
movq 0x8(%rsp), %rdi
addq %r14, %rdi
movq %r12, %rsi
callq 0x8fc2
movq %r15, %rdi
callq 0x9478
addq $0x10, %r14
jmp 0x6cbd
leaq 0x57c1(%rip), %rdi      # 0xc4bd
xorl %eax, %eax
callq 0x4050
jmp 0x74e9
movl $0x16e3600, %edi        # imm = 0x16E3600
callq 0x4030
movq %rax, 0x8(%rsp)
leaq -0x1(%r13), %rax
movq %rax, 0x58(%rsp)
leaq 0x10(%rsp), %r15
movq %rbp, 0x68(%rsp)
movq %r13, 0x60(%rsp)
movq 0x8(%rsp), %rdi
movq 0x140(%rsp), %rcx
movl $0xf4240, %edx          # imm = 0xF4240
pushq $0x18
popq %rsi
callq 0x4440
movq %rax, %r12
movq 0x58(%rsp), %rax
leaq (%rax,%r12), %rcx
movq %rcx, %rax
xorl %edx, %edx
divq %r13
xorl %edx, %edx
xorl %r14d, %r14d
xorl %esi, %esi
movq %r12, 0x20(%rsp)
movq %rcx, 0x78(%rsp)
movq %rax, 0x70(%rsp)
cmpq %r13, %rsi
jae 0x6ecc
testq %r12, %r12
je 0x6ecc
cmpq %r12, %rax
movq %r12, %rbx
cmovbq %rax, %rbx
cmpq %r13, %rcx
jb 0x6eb9
movq %rsi, 0x80(%rsp)
movq %r14, 0x28(%rsp)
movq %r15, %r14
movq 0x100(%rsp), %r13
movq %rdx, 0x40(%rsp)
addq %rdx, %r13
movq 0x8(%rsp), %rbp
andq $0x0, 0x10(%rsp)
movl $0xf8, %edi
callq 0x42f0
movq %rax, %r15
movq 0x20(%rsp), %rax
subq %r12, %rax
imulq $0x18, %rax, %rax
addq %rax, %rbp
leaq 0xaac2(%rip), %rax      # 0x118a8
movq %rax, (%r15)
movq %r13, 0x8(%r15)
movq %r15, %rdi
addq $0x10, %rdi
movl $0xb8, %edx
leaq 0x2d8(%rsp), %rsi
callq 0x4280
movaps 0x90(%rsp), %xmm0
movlps %xmm0, 0xc8(%r15)
movss 0x88(%rsp), %xmm0
movss %xmm0, 0xd0(%r15)
movapd 0xb0(%rsp), %xmm0
movupd %xmm0, 0xd4(%r15)
movq %rbp, 0xe8(%r15)
movq %rbx, 0xf0(%r15)
movq %r15, 0xc0(%rsp)
movq %r14, %r15
movq %r14, %rdi
leaq 0xc0(%rsp), %rsi
xorl %edx, %edx
callq 0x42b0
movq 0xc0(%rsp), %rdi
testq %rdi, %rdi
movq 0x60(%rsp), %r13
movq 0x68(%rsp), %rbp
movq 0x28(%rsp), %r14
je 0x6e87
movq (%rdi), %rax
callq *0x8(%rax)
movq 0x180(%rsp), %rdi
addq %r14, %rdi
movq %r15, %rsi
callq 0xacd6
movq %r15, %rdi
callq 0xacf0
movq 0x78(%rsp), %rcx
movq 0x70(%rsp), %rax
movq 0x40(%rsp), %rdx
movq 0x80(%rsp), %rsi
subq %rbx, %r12
incq %rsi
addq $0x8, %r14
addq $0x10, %rdx
jmp 0x6d73
xorl %ebx, %ebx
cmpq %rbx, %rbp
je 0x6ef0
movq 0x180(%rsp), %rdi
cmpq $0x0, (%rdi,%rbx)
je 0x6eea
addq %rbx, %rdi
callq 0x44d0
addq $0x8, %rbx
jmp 0x6ece
cmpq $0xf423f, 0x20(%rsp)    # imm = 0xF423F
ja 0x6d2f
movq 0x100(%rsp), %rax
movq 0x38(%rsp), %rcx
movq 0x18(%rsp), %rdx
imull 0x4(%rsp), %edx
imulq $0x18, %rdx, %rdx
xorl %esi, %esi
cmpq %r13, %rsi
je 0x71d6
movq %rsi, %rdi
shlq $0x4, %rdi
movq 0x8(%rax,%rdi), %rdi
xorl %r8d, %r8d
cmpq %r8, %rdx
je 0x6f6a
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
jmp 0x6f34
incq %rsi
jmp 0x6f1c
movl $0x16e3600, %edi        # imm = 0x16E3600
callq 0x4030
movq %rax, 0x10(%rsp)
leaq -0x1(%r13), %rax
movq %rax, 0x58(%rsp)
leaq 0xa8(%rsp), %r15
movq %rbp, 0x68(%rsp)
movq %r13, 0x60(%rsp)
movq 0x10(%rsp), %rdi
movq 0x180(%rsp), %rcx
movl $0xf4240, %edx          # imm = 0xF4240
pushq $0x18
popq %rsi
callq 0x4440
movq %rax, %r12
movq 0x58(%rsp), %rax
leaq (%rax,%r12), %rcx
movq %rcx, %rax
xorl %edx, %edx
divq %r13
xorl %edx, %edx
xorl %r14d, %r14d
xorl %esi, %esi
movq %r12, 0x20(%rsp)
movq %rcx, 0x78(%rsp)
movq %rax, 0x70(%rsp)
cmpq %r13, %rsi
jae 0x7136
testq %r12, %r12
je 0x7136
cmpq %r12, %rax
movq %r12, %rbx
cmovbq %rax, %rbx
cmpq %r13, %rcx
jb 0x7123
movq %rsi, 0x80(%rsp)
movq %r14, 0x28(%rsp)
movq %r15, %r14
movq 0x8(%rsp), %r13
movq %rdx, 0x40(%rsp)
addq %rdx, %r13
movq 0x10(%rsp), %rbp
andq $0x0, 0xa8(%rsp)
movl $0x138, %edi            # imm = 0x138
callq 0x42f0
movq %rax, %r15
movq 0x20(%rsp), %rax
subq %r12, %rax
imulq $0x18, %rax, %rax
addq %rax, %rbp
leaq 0xa8d8(%rip), %rax      # 0x11928
movq %rax, (%r15)
movq %r13, 0x8(%r15)
movq %r15, %rdi
addq $0x10, %rdi
movl $0xf8, %edx
leaq 0x4d0(%rsp), %rsi
callq 0x4280
movaps 0x90(%rsp), %xmm0
movlps %xmm0, 0x108(%r15)
movss 0x88(%rsp), %xmm0
movss %xmm0, 0x110(%r15)
movapd 0xb0(%rsp), %xmm0
movupd %xmm0, 0x114(%r15)
movq %rbp, 0x128(%r15)
movq %rbx, 0x130(%r15)
movq %r15, 0x140(%rsp)
movq %r14, %r15
movq %r14, %rdi
leaq 0x140(%rsp), %rsi
xorl %edx, %edx
callq 0x42b0
movq 0x140(%rsp), %rdi
testq %rdi, %rdi
movq 0x60(%rsp), %r13
movq 0x68(%rsp), %rbp
movq 0x28(%rsp), %r14
je 0x70f1
movq (%rdi), %rax
callq *0x8(%rax)
movq 0x100(%rsp), %rdi
addq %r14, %rdi
movq %r15, %rsi
callq 0xacd6
movq %r15, %rdi
callq 0xacf0
movq 0x78(%rsp), %rcx
movq 0x70(%rsp), %rax
movq 0x40(%rsp), %rdx
movq 0x80(%rsp), %rsi
subq %rbx, %r12
incq %rsi
addq $0x8, %r14
addq $0x10, %rdx
jmp 0x6fdd
xorl %ebx, %ebx
cmpq %rbx, %rbp
je 0x715a
movq 0x100(%rsp), %rdi
cmpq $0x0, (%rdi,%rbx)
je 0x7154
addq %rbx, %rdi
callq 0x44d0
addq $0x8, %rbx
jmp 0x7138
cmpq $0xf423f, 0x20(%rsp)    # imm = 0xF423F
ja 0x6f99
movq 0x8(%rsp), %rax
movq 0x38(%rsp), %rcx
movq 0x18(%rsp), %rdx
imull 0x4(%rsp), %edx
imulq $0x18, %rdx, %rdx
xorl %esi, %esi
cmpq %r13, %rsi
je 0x734a
movq %rsi, %rdi
shlq $0x4, %rdi
movq 0x8(%rax,%rdi), %rdi
xorl %r8d, %r8d
cmpq %r8, %rdx
je 0x71d1
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
jmp 0x719b
incq %rsi
jmp 0x7183
leaq 0x8(%rsp), %rdi
callq 0xacfe
leaq 0x100(%rsp), %rdi
callq 0xad18
leaq 0x180(%rsp), %rdi
callq 0xad32
leaq 0x140(%rsp), %rdi
callq 0x94cc
cmpb $0x1, 0x1f8(%rsp)
jne 0x7a17
movq 0x298(%rsp), %rbx
leaq 0x2d8(%rsp), %rdi
leaq 0x1e0(%rsp), %rsi
movl $0xb8, %edx
callq 0x4280
movl 0x30(%rsp), %eax
movl %eax, 0x4(%rsp)
movl 0x34(%rsp), %eax
movq %rax, 0x18(%rsp)
leaq 0x535d(%rip), %rsi      # 0xc5ac
movq %rbx, %rdi
callq 0x4360
movq %rax, 0x140(%rsp)
testq %rax, %rax
je 0x733d
callq 0x43c0
movl %eax, %ebx
leaq 0x5339(%rip), %rdi      # 0xc5af
movl %eax, %esi
xorl %eax, %eax
callq 0x4050
movl %ebx, %r13d
leaq 0x8(,%r13,8), %rdi
callq 0x4030
movq %rax, %rbx
leaq (,%r13,8), %rbp
movq %r13, (%rax)
addq $0x8, %rbx
testq %r13, %r13
je 0x72b3
movq %rbx, %rdi
xorl %esi, %esi
movq %rbp, %rdx
callq 0x41a0
movq %rbx, 0x180(%rsp)
movq %r13, %rbx
shlq $0x4, %rbx
leaq 0x8(%rbx), %rdi
callq 0x4030
movq %rax, %r15
addq $0x8, %r15
movq %r13, (%rax)
testl %r13d, %r13d
je 0x72e7
movq %r15, %rdi
xorl %esi, %esi
movq %rbx, %rdx
callq 0x41a0
movq %r15, 0x100(%rsp)
leaq 0xc8(%rsp), %r15
xorl %r14d, %r14d
leaq 0xc0(%rsp), %r12
cmpq %r14, %rbx
je 0x74f1
movq %r12, %rdi
movl 0x4(%rsp), %esi
movq 0x18(%rsp), %rdx
callq 0x8e3e
movq 0x100(%rsp), %rdi
addq %r14, %rdi
movq %r12, %rsi
callq 0x8fc2
movq %r15, %rdi
callq 0x9478
addq $0x10, %r14
jmp 0x7302
leaq 0x140(%rsp), %rdi
jmp 0x74e4
leaq 0x10(%rsp), %rdi
callq 0xacfe
leaq 0x8(%rsp), %rdi
callq 0xad18
leaq 0x100(%rsp), %rdi
callq 0xad32
leaq 0x180(%rsp), %rdi
callq 0x94cc
cmpb $0x1, 0x1f8(%rsp)
jne 0x7a17
movq 0x298(%rsp), %rbx
movupd 0xc0(%rsp), %xmm0
movupd 0xd0(%rsp), %xmm1
movups 0xe0(%rsp), %xmm2
movups 0xf0(%rsp), %xmm3
leaq 0x410(%rsp), %rdi
movapd %xmm0, -0x40(%rdi)
movapd %xmm1, -0x30(%rdi)
movaps %xmm2, -0x20(%rdi)
movaps %xmm3, -0x10(%rdi)
leaq 0x1e0(%rsp), %rsi
movl $0xb8, %edx
callq 0x4280
movl 0x30(%rsp), %eax
movl %eax, 0x4(%rsp)
movl 0x34(%rsp), %eax
movq %rax, 0x18(%rsp)
leaq 0x51b8(%rip), %rsi      # 0xc5ac
movq %rbx, %rdi
callq 0x4360
movq %rax, 0x180(%rsp)
testq %rax, %rax
je 0x74dc
callq 0x43c0
movl %eax, %ebx
leaq 0x5194(%rip), %rdi      # 0xc5af
movl %eax, %esi
xorl %eax, %eax
callq 0x4050
movl %ebx, %r13d
leaq 0x8(,%r13,8), %rdi
callq 0x4030
movq %rax, %rbx
leaq (,%r13,8), %rbp
movq %r13, (%rax)
addq $0x8, %rbx
testq %r13, %r13
je 0x7458
movq %rbx, %rdi
xorl %esi, %esi
movq %rbp, %rdx
callq 0x41a0
movq %rbx, 0x100(%rsp)
movq %r13, %rbx
shlq $0x4, %rbx
leaq 0x8(%rbx), %rdi
callq 0x4030
movq %rax, %r15
addq $0x8, %r15
movq %r13, (%rax)
testl %r13d, %r13d
je 0x748c
movq %r15, %rdi
xorl %esi, %esi
movq %rbx, %rdx
callq 0x41a0
movq %r15, 0x8(%rsp)
leaq 0x148(%rsp), %r15
xorl %r14d, %r14d
leaq 0x140(%rsp), %r12
cmpq %r14, %rbx
je 0x7758
movq %r12, %rdi
movl 0x4(%rsp), %esi
movq 0x18(%rsp), %rdx
callq 0x8e3e
movq 0x8(%rsp), %rdi
addq %r14, %rdi
movq %r12, %rsi
callq 0x8fc2
movq %r15, %rdi
callq 0x9478
addq $0x10, %r14
jmp 0x74a4
leaq 0x180(%rsp), %rdi
callq 0x94cc
pushq $-0x1
popq %rbx
jmp 0x7c4d
movl $0xf42400, %edi         # imm = 0xF42400
callq 0x4030
movq %rax, 0x8(%rsp)
leaq -0x1(%r13), %rax
movq %rax, 0x58(%rsp)
leaq 0x10(%rsp), %r15
movq %rbp, 0x68(%rsp)
movq %r13, 0x60(%rsp)
movq 0x8(%rsp), %rdi
movq 0x140(%rsp), %rcx
movl $0xf4240, %edx          # imm = 0xF4240
pushq $0x10
popq %rsi
callq 0x4440
movq %rax, %r12
movq 0x58(%rsp), %rax
leaq (%rax,%r12), %rcx
movq %rcx, %rax
xorl %edx, %edx
divq %r13
xorl %edx, %edx
xorl %r14d, %r14d
xorl %esi, %esi
movq %r12, 0x20(%rsp)
movq %rcx, 0x78(%rsp)
movq %rax, 0x70(%rsp)
cmpq %r13, %rsi
jae 0x76b5
testq %r12, %r12
je 0x76b5
cmpq %r12, %rax
movq %r12, %rbx
cmovbq %rax, %rbx
cmpq %r13, %rcx
jb 0x76a2
movq %rsi, 0x80(%rsp)
movq %r14, 0x28(%rsp)
movq %r15, %r14
movq 0x100(%rsp), %r13
movq %rdx, 0x40(%rsp)
addq %rdx, %r13
movq 0x8(%rsp), %rbp
andq $0x0, 0x10(%rsp)
movl $0xf8, %edi
callq 0x42f0
movq %rax, %r15
movq 0x20(%rsp), %rax
subq %r12, %rax
shlq $0x4, %rax
addq %rax, %rbp
leaq 0xa319(%rip), %rax      # 0x118e8
movq %rax, (%r15)
movq %r13, 0x8(%r15)
movq %r15, %rdi
addq $0x10, %rdi
movl $0xb8, %edx
leaq 0x2d8(%rsp), %rsi
callq 0x4280
movaps 0x90(%rsp), %xmm0
movlps %xmm0, 0xc8(%r15)
movss 0x88(%rsp), %xmm0
movss %xmm0, 0xd0(%r15)
movapd 0xb0(%rsp), %xmm0
movupd %xmm0, 0xd4(%r15)
movq %rbp, 0xe8(%r15)
movq %rbx, 0xf0(%r15)
movq %r15, 0xc0(%rsp)
movq %r14, %r15
movq %r14, %rdi
leaq 0xc0(%rsp), %rsi
xorl %edx, %edx
callq 0x42b0
movq 0xc0(%rsp), %rdi
testq %rdi, %rdi
movq 0x60(%rsp), %r13
movq 0x68(%rsp), %rbp
movq 0x28(%rsp), %r14
je 0x7670
movq (%rdi), %rax
callq *0x8(%rax)
movq 0x180(%rsp), %rdi
addq %r14, %rdi
movq %r15, %rsi
callq 0xacd6
movq %r15, %rdi
callq 0xacf0
movq 0x78(%rsp), %rcx
movq 0x70(%rsp), %rax
movq 0x40(%rsp), %rdx
movq 0x80(%rsp), %rsi
subq %rbx, %r12
incq %rsi
addq $0x8, %r14
addq $0x10, %rdx
jmp 0x755c
xorl %ebx, %ebx
cmpq %rbx, %rbp
je 0x76d9
movq 0x180(%rsp), %rdi
cmpq $0x0, (%rdi,%rbx)
je 0x76d3
addq %rbx, %rdi
callq 0x44d0
addq $0x8, %rbx
jmp 0x76b7
cmpq $0xf423f, 0x20(%rsp)    # imm = 0xF423F
ja 0x7518
movq 0x100(%rsp), %rax
movq 0x38(%rsp), %rcx
movq 0x18(%rsp), %rdx
imull 0x4(%rsp), %edx
imulq $0x18, %rdx, %rdx
xorl %esi, %esi
cmpq %r13, %rsi
je 0x79bb
movq %rsi, %rdi
shlq $0x4, %rdi
movq 0x8(%rax,%rdi), %rdi
xorl %r8d, %r8d
cmpq %r8, %rdx
je 0x7753
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
jmp 0x771d
incq %rsi
jmp 0x7705
movl $0xf42400, %edi         # imm = 0xF42400
callq 0x4030
movq %rax, 0x10(%rsp)
leaq -0x1(%r13), %rax
movq %rax, 0x58(%rsp)
leaq 0xa8(%rsp), %r15
movq %rbp, 0x68(%rsp)
movq %r13, 0x60(%rsp)
movq 0x10(%rsp), %rdi
movq 0x180(%rsp), %rcx
movl $0xf4240, %edx          # imm = 0xF4240
pushq $0x10
popq %rsi
callq 0x4440
movq %rax, %r12
movq 0x58(%rsp), %rax
leaq (%rax,%r12), %rcx
movq %rcx, %rax
xorl %edx, %edx
divq %r13
xorl %edx, %edx
xorl %r14d, %r14d
xorl %esi, %esi
movq %r12, 0x20(%rsp)
movq %rcx, 0x78(%rsp)
movq %rax, 0x70(%rsp)
cmpq %r13, %rsi
jae 0x791f
testq %r12, %r12
je 0x791f
cmpq %r12, %rax
movq %r12, %rbx
cmovbq %rax, %rbx
cmpq %r13, %rcx
jb 0x790c
movq %rsi, 0x80(%rsp)
movq %r14, 0x28(%rsp)
movq %r15, %r14
movq 0x8(%rsp), %r13
movq %rdx, 0x40(%rsp)
addq %rdx, %r13
movq 0x10(%rsp), %rbp
andq $0x0, 0xa8(%rsp)
movl $0x138, %edi            # imm = 0x138
callq 0x42f0
movq %rax, %r15
movq 0x20(%rsp), %rax
subq %r12, %rax
shlq $0x4, %rax
addq %rax, %rbp
leaq 0xa12f(%rip), %rax      # 0x11968
movq %rax, (%r15)
movq %r13, 0x8(%r15)
movq %r15, %rdi
addq $0x10, %rdi
movl $0xf8, %edx
leaq 0x3d0(%rsp), %rsi
callq 0x4280
movaps 0x90(%rsp), %xmm0
movlps %xmm0, 0x108(%r15)
movss 0x88(%rsp), %xmm0
movss %xmm0, 0x110(%r15)
movapd 0xb0(%rsp), %xmm0
movupd %xmm0, 0x114(%r15)
movq %rbp, 0x128(%r15)
movq %rbx, 0x130(%r15)
movq %r15, 0x140(%rsp)
movq %r14, %r15
movq %r14, %rdi
leaq 0x140(%rsp), %rsi
xorl %edx, %edx
callq 0x42b0
movq 0x140(%rsp), %rdi
testq %rdi, %rdi
movq 0x60(%rsp), %r13
movq 0x68(%rsp), %rbp
movq 0x28(%rsp), %r14
je 0x78da
movq (%rdi), %rax
callq *0x8(%rax)
movq 0x100(%rsp), %rdi
addq %r14, %rdi
movq %r15, %rsi
callq 0xacd6
movq %r15, %rdi
callq 0xacf0
movq 0x78(%rsp), %rcx
movq 0x70(%rsp), %rax
movq 0x40(%rsp), %rdx
movq 0x80(%rsp), %rsi
subq %rbx, %r12
incq %rsi
addq $0x8, %r14
addq $0x10, %rdx
jmp 0x77c6
xorl %ebx, %ebx
cmpq %rbx, %rbp
je 0x7943
movq 0x100(%rsp), %rdi
cmpq $0x0, (%rdi,%rbx)
je 0x793d
addq %rbx, %rdi
callq 0x44d0
addq $0x8, %rbx
jmp 0x7921
cmpq $0xf423f, 0x20(%rsp)    # imm = 0xF423F
ja 0x7782
movq 0x8(%rsp), %rax
movq 0x38(%rsp), %rcx
movq 0x18(%rsp), %rdx
imull 0x4(%rsp), %edx
imulq $0x18, %rdx, %rdx
xorl %esi, %esi
cmpq %r13, %rsi
je 0x79e9
movq %rsi, %rdi
shlq $0x4, %rdi
movq 0x8(%rax,%rdi), %rdi
xorl %r8d, %r8d
cmpq %r8, %rdx
je 0x79b6
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
jmp 0x7980
incq %rsi
jmp 0x796c
leaq 0x8(%rsp), %rdi
callq 0xacfe
leaq 0x100(%rsp), %rdi
callq 0xad18
leaq 0x180(%rsp), %rdi
callq 0xad32
leaq 0x140(%rsp), %rdi
jmp 0x7a12
leaq 0x10(%rsp), %rdi
callq 0xacfe
leaq 0x8(%rsp), %rdi
callq 0xad18
leaq 0x100(%rsp), %rdi
callq 0xad32
leaq 0x180(%rsp), %rdi
callq 0x94cc
movq 0x1c0(%rsp), %rdi
leaq 0x30(%rsp), %rsi
callq 0x8fde
cvtss2sd 0x254(%rsp), %xmm0
movsd %xmm0, 0x28(%rsp)
cvtss2sd 0x25c(%rsp), %xmm0
movsd %xmm0, 0x90(%rsp)
movl 0x30(%rsp), %esi
movl 0x34(%rsp), %edx
leaq 0x2d8(%rsp), %rdi
callq 0x8e3e
movsd 0x45f9(%rip), %xmm0     # 0xc060
divsd 0x90(%rsp), %xmm0
movsd %xmm0, 0x90(%rsp)
movq 0x38(%rsp), %r14
movl 0x34(%rsp), %eax
imull 0x30(%rsp), %eax
leaq 0x2e0(%rsp), %rbx
movq (%rbx), %r15
imulq $0x18, %rax, %r12
xorl %r13d, %r13d
cmpq %r13, %r12
je 0x7b5d
cvtss2sd 0x258(%rsp), %xmm2
movsd (%r14), %xmm0
mulsd %xmm2, %xmm0
movsd 0x8(%r14), %xmm3
mulsd %xmm2, %xmm3
mulsd 0x10(%r14), %xmm2
movsd 0x28(%rsp), %xmm1
addsd %xmm1, %xmm0
addsd %xmm1, %xmm3
movsd %xmm3, 0x40(%rsp)
addsd %xmm1, %xmm2
movsd %xmm2, 0x88(%rsp)
movsd 0x90(%rsp), %xmm1
callq 0x4500
movsd %xmm0, 0xb0(%rsp)
movsd 0x40(%rsp), %xmm0
movsd 0x90(%rsp), %xmm1
callq 0x4500
movsd %xmm0, 0x40(%rsp)
movsd 0x88(%rsp), %xmm0
movsd 0x90(%rsp), %xmm1
callq 0x4500
movsd 0xb0(%rsp), %xmm1
movsd %xmm1, (%r15,%r13)
movsd 0x40(%rsp), %xmm1
movsd %xmm1, 0x8(%r15,%r13)
movsd %xmm0, 0x10(%r15,%r13)
addq $0x18, %r14
addq $0x18, %r13
jmp 0x7a99
leaq 0xc0(%rsp), %rdi
leaq 0x2d8(%rsp), %rsi
callq 0xac8e
movq %rbx, %rdi
callq 0x9478
cmpb $0x1, 0x260(%rsp)
movsd 0x44d6(%rip), %xmm4     # 0xc060
jne 0x7c22
movq 0xc8(%rsp), %rax
movl 0xc4(%rsp), %ecx
imull 0xc0(%rsp), %ecx
imulq $0x18, %rcx, %rcx
testq %rcx, %rcx
je 0x7c22
movsd 0x10(%rax), %xmm0
movupd (%rax), %xmm1
movapd %xmm1, %xmm2
unpckhpd %xmm1, %xmm2            # xmm2 = xmm2[1],xmm1[1]
maxsd %xmm1, %xmm2
movapd %xmm0, %xmm3
maxsd %xmm2, %xmm3
xorl %edx, %edx
ucomisd %xmm4, %xmm3
seta %sil
movapd %xmm4, %xmm2
divsd %xmm3, %xmm2
jbe 0x7be5
mulsd %xmm2, %xmm0
unpcklpd %xmm2, %xmm2            # xmm2 = xmm2[0,0]
mulpd %xmm1, %xmm2
movb %sil, %dl
movd %edx, %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, (%rax)
movsd %xmm0, 0x10(%rax)
addq $0x18, %rax
addq $-0x18, %rcx
jmp 0x7bab
movq 0x390(%rsp), %rdi
movl 0x228(%rsp), %edx
leaq 0xc0(%rsp), %rsi
callq 0x58c7
leaq 0xc8(%rsp), %rdi
callq 0x9478
xorl %ebx, %ebx
leaq 0x38(%rsp), %rdi
callq 0x9478
leaq 0x390(%rsp), %rdi
callq 0x4160
leaq 0x1c0(%rsp), %rdi
callq 0x4160
leaq 0x298(%rsp), %rdi
callq 0x4160
leaq 0x2b8(%rsp), %rdi
callq 0x4160
leaq 0x3b0(%rsp), %rdi
callq 0x4160
movl %ebx, %eax
addq $0x5c8, %rsp            # imm = 0x5C8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x7d5d
jmp 0x7d62
jmp 0x7cc8
jmp 0x7cd0
jmp 0x7cd8
jmp 0x7ce0
jmp 0x7d5d
jmp 0x7d62
movq %rax, %rbx
jmp 0x7dbe
movq %rax, %rbx
jmp 0x7dcb
movq %rax, %rbx
jmp 0x7def
movq %rax, %rbx
jmp 0x7dfc
jmp 0x7d09
jmp 0x7d09
jmp 0x7d09
jmp 0x7d09
movq %rax, %rbx
leaq 0xc8(%rsp), %rdi
callq 0x9478
jmp 0x7e09
jmp 0x7d09
jmp 0x7d09
movq %rax, %rbx
jmp 0x7e09
movq %rax, %rbx
jmp 0x7e13
movq %rax, %rbx
jmp 0x7e20
movq %rax, %rbx
jmp 0x7e2d
movq %rax, %rbx
leaq 0x2d8(%rsp), %rdi
jmp 0x7e35
movq %rax, %rbx
jmp 0x7e3a
movq %rax, %rbx
leaq 0x2d8(%rsp), %rdi
jmp 0x7e42
movq %rax, %rbx
jmp 0x7e47
jmp 0x7d5d
jmp 0x7d62
movq %rax, %rbx
jmp 0x7db4
movq %rax, %rbx
jmp 0x7de2
jmp 0x7d6f
jmp 0x7da7
jmp 0x7d89
jmp 0x7dd5
movq %rax, %rbx
movq 0x140(%rsp), %rdi
testq %rdi, %rdi
je 0x7daa
movq (%rdi), %rax
callq *0x8(%rax)
jmp 0x7daa
jmp 0x7da7
movq %rax, %rbx
movq 0xc0(%rsp), %rdi
testq %rdi, %rdi
je 0x7dd8
movq (%rdi), %rax
callq *0x8(%rax)
jmp 0x7dd8
jmp 0x7dd5
jmp 0x7da7
jmp 0x7dd5
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0xacfe
leaq 0x8(%rsp), %rdi
callq 0xad18
leaq 0x100(%rsp), %rdi
callq 0xad32
leaq 0x180(%rsp), %rdi
jmp 0x7e04
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0xacfe
leaq 0x100(%rsp), %rdi
callq 0xad18
leaq 0x180(%rsp), %rdi
callq 0xad32
leaq 0x140(%rsp), %rdi
callq 0x94cc
leaq 0x38(%rsp), %rdi
callq 0x9478
leaq 0x390(%rsp), %rdi
callq 0x4160
leaq 0x1c0(%rsp), %rdi
callq 0x4160
leaq 0x298(%rsp), %rdi
callq 0x4160
leaq 0x2b8(%rsp), %rdi
callq 0x4160
leaq 0x3b0(%rsp), %rdi
callq 0x4160
movq %rbx, %rdi
callq 0x4520