// File: /workspace/github_c_makefile_star2_O0/Cyan4973[P]FiniteStateEntropy/programs/fileio.c
// Function: FIO_compressFilename
unsigned long long FIO_compressFilename(const char* output_filename, const char* input_filename)
{
    U64 filesize = 0;
    U64 compressedfilesize = 0;
    FILE* finput;
    FILE* foutput;
    size_t const inputBlockSize = FIO_blockID_to_blockSize(g_blockSizeId);
    char* const in_buff = (char*)malloc(inputBlockSize);
    char* const out_buff = (char*)malloc(FSE_compressBound(inputBlockSize) + 5);
    XXH32_state_t xxhState;
    typedef size_t (*compressor_t) (void* dst, size_t dstSize, const void* src, size_t srcSize);
    compressor_t compressor;
    unsigned magicNumber;


    /* Init */
    if (!in_buff || !out_buff) EXM_THROW(21, "Allocation error : not enough memory");
    XXH32_reset (&xxhState, FSE_CHECKSUM_SEED);
    get_fileHandle(input_filename, output_filename, &finput, &foutput);
    switch (g_compressor)
    {
    case FIO_fse:
        compressor = FSE_compress;
        magicNumber = FIO_magicNumber_fse;
        break;
    case FIO_huf:
        compressor = HUF_compress;
        magicNumber = FIO_magicNumber_huf;
        break;
    case FIO_zlibh:
        compressor = FIO_ZLIBH_compress;
        magicNumber = FIO_magicNumber_zlibh;
        break;
    default :
        EXM_THROW(20, "unknown compressor selection");
    }

    /* Write Frame Header */
    FIO_writeLE32(out_buff, magicNumber);
    out_buff[4] = (char)g_blockSizeId;          /* Max Block Size descriptor */
    { size_t const sizeCheck = fwrite(out_buff, 1, FIO_FRAMEHEADERSIZE, foutput);
      if (sizeCheck!=FIO_FRAMEHEADERSIZE) EXM_THROW(22, "Write error : cannot write header"); }
    compressedfilesize += FIO_FRAMEHEADERSIZE;

    /* Main compression loop */
    while (1) {
        /* Fill input Buffer */
        size_t cSize;
        size_t const inSize = fread(in_buff, (size_t)1, (size_t)inputBlockSize, finput);
        DISPLAYLEVEL(6, "reading %zu bytes from input (%s)\n",
                        inSize, input_filename);
        if (inSize==0) break;
        filesize += inSize;
        XXH32_update(&xxhState, in_buff, inSize);
        DISPLAYUPDATE(2, "\rRead : %u MB   ", (U32)(filesize>>20));

        /* Compress Block */
        cSize = compressor(out_buff + FIO_maxBlockHeaderSize, FSE_compressBound(inputBlockSize), in_buff, inSize);
        if (FSE_isError(cSize)) EXM_THROW(23, "Compression error : %s ", FSE_getErrorName(cSize));

        /* Write cBlock */
        switch(cSize)
        {
        size_t headerSize;
        case 0: /* raw */
            DISPLAYLEVEL(6, "packing uncompressed block, of size %zu \n", inSize);
            if (inSize == inputBlockSize) {
                out_buff[0] = (BYTE)((bt_raw << 6) + BIT5);
                headerSize = 1;
            } else {
                out_buff[0] = (BYTE)(bt_raw << 6);
                out_buff[1] = (BYTE)(inSize >> 8);
                out_buff[2] = (BYTE)inSize;
                headerSize = 3;
            }
            { size_t const sizeCheck = fwrite(out_buff, 1, headerSize, foutput);
              if (sizeCheck!=headerSize) EXM_THROW(24, "Write error : cannot write block header"); }
            { size_t const sizeCheck = fwrite(in_buff, 1, inSize, foutput);
              if (sizeCheck!=(size_t)(inSize)) EXM_THROW(25, "Write error : cannot write block"); }
            compressedfilesize += inSize + headerSize;
            break;
        case 1: /* rle */
            DISPLAYLEVEL(6, "packing RLE block, of size %zu \n", inSize);
            if (inSize == inputBlockSize) {
                out_buff[0] = (BYTE)((bt_rle << 6) + BIT5);
                headerSize = 1;
            } else {
                out_buff[0] = (BYTE)(bt_rle << 6);
                out_buff[1] = (BYTE)(inSize >> 8);
                out_buff[2] = (BYTE)inSize;
                headerSize = 3;
            }
            out_buff[headerSize] = in_buff[0];
            { size_t const sizeCheck = fwrite(out_buff, 1, headerSize+1, foutput);
              if (sizeCheck!=(headerSize+1)) EXM_THROW(26, "Write error : cannot write rle block"); }
            compressedfilesize += headerSize + 1;
            break;
        default : /* compressed */
            DISPLAYLEVEL(6, "packing compressed block, of size %zu, into %zu bytes \n",
                            inSize, cSize);
            if (inSize == inputBlockSize) {
                out_buff[2] = (BYTE)((bt_compressed << 6) + BIT5);
                DISPLAYLEVEL(7, "generated block descriptor : %u \n", out_buff[2]);
                out_buff[3] = (BYTE)(cSize >> 8);
                out_buff[4] = (BYTE)cSize;
                headerSize = 3;
            } else {
                out_buff[0] = (BYTE)(bt_compressed << 6);
                out_buff[1] = (BYTE)(inSize >> 8);
                out_buff[2] = (BYTE)inSize;
                out_buff[3] = (BYTE)(cSize >> 8);
                out_buff[4] = (BYTE)cSize;
                headerSize = FIO_maxBlockHeaderSize;
            }
            { size_t const sizeCheck = fwrite(out_buff+(FIO_maxBlockHeaderSize-headerSize), 1, headerSize+cSize, foutput);
              if (sizeCheck!=(headerSize+cSize)) EXM_THROW(27, "Write error : cannot write rle block"); }
            compressedfilesize += headerSize + cSize;
            break;
        }

        DISPLAYUPDATE(2, "\rRead : %u MB  ==> %.2f%%   ", (U32)(filesize>>20), (double)(compressedfilesize/filesize)*100);
    }

    /* Checksum */
    {   U32 checksum = XXH32_digest(&xxhState);
        checksum = (checksum >> 5) & ((1U<<22)-1);
        out_buff[2] = (BYTE)checksum;
        out_buff[1] = (BYTE)(checksum >> 8);
        out_buff[0] = (BYTE)((checksum >> 16) + (bt_crc << 6));
        { size_t const sizeCheck = fwrite(out_buff, 1, 3, foutput);
          if (sizeCheck!=3) EXM_THROW(28, "Write error : cannot write checksum"); }
        compressedfilesize += 3;
    }

    /* Status */
    DISPLAYLEVEL(2, "\r%79s\r", "");
    DISPLAYLEVEL(2,"Compressed %llu bytes into %llu bytes ==> %.2f%%\n",
        (unsigned long long) filesize, (unsigned long long) compressedfilesize, (double)(compressedfilesize/filesize)*100);

    /* clean */
    free(in_buff);
    free(out_buff);
    fclose(finput);
    fclose(foutput);

    return compressedfilesize;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x110, %rsp            # imm = 0x110
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq $0x0, -0x18(%rbp)
movq $0x0, -0x20(%rbp)
movl 0x28087(%rip), %edi     # 0x2c0f0
callq 0x4c80
cltq
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rdi
callq 0x1140
movq %rax, -0x40(%rbp)
movq -0x38(%rbp), %rdi
callq 0x12490
movq %rax, %rdi
addq $0x5, %rdi
callq 0x1140
movq %rax, -0x48(%rbp)
cmpq $0x0, -0x40(%rbp)
je 0x40a8
cmpq $0x0, -0x48(%rbp)
jne 0x411a
cmpl $0x1, 0x2803d(%rip)     # 0x2c0ec
jl 0x40ce
movq 0x27f40(%rip), %rax     # 0x2bff8
movq (%rax), %rdi
leaq 0x21913(%rip), %rsi     # 0x259d5
movl $0x15, %edx
movb $0x0, %al
callq 0x1100
cmpl $0x1, 0x28017(%rip)     # 0x2c0ec
jl 0x40ef
movq 0x27f1a(%rip), %rax     # 0x2bff8
movq (%rax), %rdi
leaq 0x218f9(%rip), %rsi     # 0x259e1
movb $0x0, %al
callq 0x1100
cmpl $0x1, 0x27ff6(%rip)     # 0x2c0ec
jl 0x4110
movq 0x27ef9(%rip), %rax     # 0x2bff8
movq (%rax), %rdi
leaq 0x2139b(%rip), %rsi     # 0x254a4
movb $0x0, %al
callq 0x1100
movl $0x15, %edi
callq 0x1170
leaq -0x78(%rbp), %rdi
xorl %esi, %esi
callq 0x7e30
movq -0x10(%rbp), %rdi
movq -0x8(%rbp), %rsi
leaq -0x28(%rbp), %rdx
leaq -0x30(%rbp), %rcx
callq 0x4ca0
movl 0x28008(%rip), %eax     # 0x2c148
movl %eax, -0xdc(%rbp)
testl %eax, %eax
je 0x4166
jmp 0x414c
movl -0xdc(%rbp), %eax
subl $0x1, %eax
je 0x4180
jmp 0x4159
movl -0xdc(%rbp), %eax
subl $0x2, %eax
je 0x419a
jmp 0x41b1
leaq 0xe773(%rip), %rax      # 0x128e0
movq %rax, -0x80(%rbp)
movl $0x183e2309, -0x84(%rbp) # imm = 0x183E2309
jmp 0x4223
leaq 0x12a49(%rip), %rax     # 0x16bd0
movq %rax, -0x80(%rbp)
movl $0x183e3309, -0x84(%rbp) # imm = 0x183E3309
jmp 0x4223
leaq -0x1a1(%rip), %rax      # 0x4000
movq %rax, -0x80(%rbp)
movl $0x183e4309, -0x84(%rbp) # imm = 0x183E4309
jmp 0x4223
cmpl $0x1, 0x27f34(%rip)     # 0x2c0ec
jl 0x41d7
movq 0x27e37(%rip), %rax     # 0x2bff8
movq (%rax), %rdi
leaq 0x2180a(%rip), %rsi     # 0x259d5
movl $0x14, %edx
movb $0x0, %al
callq 0x1100
cmpl $0x1, 0x27f0e(%rip)     # 0x2c0ec
jl 0x41f8
movq 0x27e11(%rip), %rax     # 0x2bff8
movq (%rax), %rdi
leaq 0x21815(%rip), %rsi     # 0x25a06
movb $0x0, %al
callq 0x1100
cmpl $0x1, 0x27eed(%rip)     # 0x2c0ec
jl 0x4219
movq 0x27df0(%rip), %rax     # 0x2bff8
movq (%rax), %rdi
leaq 0x21292(%rip), %rsi     # 0x254a4
movb $0x0, %al
callq 0x1100
movl $0x14, %edi
callq 0x1170
movq -0x48(%rbp), %rdi
movl -0x84(%rbp), %esi
callq 0x5050
movl 0x27eb8(%rip), %eax     # 0x2c0f0
movb %al, %cl
movq -0x48(%rbp), %rax
movb %cl, 0x4(%rax)
movq -0x48(%rbp), %rdi
movq -0x30(%rbp), %rcx
movl $0x1, %esi
movl $0x5, %edx
callq 0x1180
movq %rax, -0x90(%rbp)
cmpq $0x5, -0x90(%rbp)
je 0x42db
cmpl $0x1, 0x27e7c(%rip)     # 0x2c0ec
jl 0x428f
movq 0x27d7f(%rip), %rax     # 0x2bff8
movq (%rax), %rdi
leaq 0x21752(%rip), %rsi     # 0x259d5
movl $0x16, %edx
movb $0x0, %al
callq 0x1100
cmpl $0x1, 0x27e56(%rip)     # 0x2c0ec
jl 0x42b0
movq 0x27d59(%rip), %rax     # 0x2bff8
movq (%rax), %rdi
leaq 0x2177a(%rip), %rsi     # 0x25a23
movb $0x0, %al
callq 0x1100
cmpl $0x1, 0x27e35(%rip)     # 0x2c0ec
jl 0x42d1
movq 0x27d38(%rip), %rax     # 0x2bff8
movq (%rax), %rdi
leaq 0x211da(%rip), %rsi     # 0x254a4
movb $0x0, %al
callq 0x1100
movl $0x16, %edi
callq 0x1170
movq -0x20(%rbp), %rax
addq $0x5, %rax
movq %rax, -0x20(%rbp)
movq -0x40(%rbp), %rdi
movq -0x38(%rbp), %rdx
movq -0x28(%rbp), %rcx
movl $0x1, %esi
callq 0x1060
movq %rax, -0xa0(%rbp)
cmpl $0x6, 0x27de1(%rip)     # 0x2c0ec
jl 0x4330
movq 0x27ce4(%rip), %rax     # 0x2bff8
movq (%rax), %rdi
movq -0xa0(%rbp), %rdx
movq -0x10(%rbp), %rcx
leaq 0x2171c(%rip), %rsi     # 0x25a45
movb $0x0, %al
callq 0x1100
cmpq $0x0, -0xa0(%rbp)
jne 0x433f
jmp 0x4ab3
movq -0xa0(%rbp), %rax
addq -0x18(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x40(%rbp), %rsi
movq -0xa0(%rbp), %rdx
leaq -0x78(%rbp), %rdi
callq 0x7f40
cmpl $0x2, 0x27d83(%rip)     # 0x2c0ec
jl 0x43d1
movq 0x27dde(%rip), %rdi     # 0x2c150
callq 0x50a0
cmpl $0x96, %eax
ja 0x4387
cmpl $0x4, 0x27d67(%rip)     # 0x2c0ec
jl 0x43cf
callq 0x1070
movq %rax, 0x27dbd(%rip)     # 0x2c150
movq 0x27c5e(%rip), %rax     # 0x2bff8
movq (%rax), %rdi
movq -0x18(%rbp), %rax
shrq $0x14, %rax
movl %eax, %edx
leaq 0x216ba(%rip), %rsi     # 0x25a68
movb $0x0, %al
callq 0x1100
cmpl $0x4, 0x27d30(%rip)     # 0x2c0ec
jl 0x43cd
movq 0x27c0b(%rip), %rax     # 0x2bfd0
movq (%rax), %rdi
callq 0x1150
jmp 0x43cf
jmp 0x43d1
movq -0x80(%rbp), %rax
movq %rax, -0xe8(%rbp)
movq -0x48(%rbp), %rax
addq $0x5, %rax
movq %rax, -0xf0(%rbp)
movq -0x38(%rbp), %rdi
callq 0x12490
movq -0xf0(%rbp), %rdi
movq %rax, %rsi
movq -0xe8(%rbp), %rax
movq -0x40(%rbp), %rdx
movq -0xa0(%rbp), %rcx
callq *%rax
movq %rax, -0x98(%rbp)
movq -0x98(%rbp), %rdi
callq 0xe390
cmpl $0x0, %eax
je 0x44bd
cmpl $0x1, 0x27cb7(%rip)     # 0x2c0ec
jl 0x4454
movq 0x27bba(%rip), %rax     # 0x2bff8
movq (%rax), %rdi
leaq 0x2158d(%rip), %rsi     # 0x259d5
movl $0x17, %edx
movb $0x0, %al
callq 0x1100
cmpl $0x1, 0x27c91(%rip)     # 0x2c0ec
jl 0x4492
movq 0x27b94(%rip), %rax     # 0x2bff8
movq (%rax), %rax
movq %rax, -0xf8(%rbp)
movq -0x98(%rbp), %rdi
callq 0xe3d0
movq -0xf8(%rbp), %rdi
movq %rax, %rdx
leaq 0x215ee(%rip), %rsi     # 0x25a79
movb $0x0, %al
callq 0x1100
cmpl $0x1, 0x27c53(%rip)     # 0x2c0ec
jl 0x44b3
movq 0x27b56(%rip), %rax     # 0x2bff8
movq (%rax), %rdi
leaq 0x20ff8(%rip), %rsi     # 0x254a4
movb $0x0, %al
callq 0x1100
movl $0x17, %edi
callq 0x1170
movq -0x98(%rbp), %rax
movq %rax, -0x100(%rbp)
testq %rax, %rax
je 0x44e8
jmp 0x44d2
movq -0x100(%rbp), %rax
subq $0x1, %rax
je 0x46c6
jmp 0x481e
cmpl $0x6, 0x27bfd(%rip)     # 0x2c0ec
jl 0x4510
movq 0x27b00(%rip), %rax     # 0x2bff8
movq (%rax), %rdi
movq -0xa0(%rbp), %rdx
leaq 0x21588(%rip), %rsi     # 0x25a91
movb $0x0, %al
callq 0x1100
movq -0xa0(%rbp), %rax
cmpq -0x38(%rbp), %rax
jne 0x4531
movq -0x48(%rbp), %rax
movb $0x60, (%rax)
movq $0x1, -0xa8(%rbp)
jmp 0x4567
movq -0x48(%rbp), %rax
movb $0x40, (%rax)
movq -0xa0(%rbp), %rax
shrq $0x8, %rax
movb %al, %cl
movq -0x48(%rbp), %rax
movb %cl, 0x1(%rax)
movq -0xa0(%rbp), %rax
movb %al, %cl
movq -0x48(%rbp), %rax
movb %cl, 0x2(%rax)
movq $0x3, -0xa8(%rbp)
movq -0x48(%rbp), %rdi
movq -0xa8(%rbp), %rdx
movq -0x30(%rbp), %rcx
movl $0x1, %esi
callq 0x1180
movq %rax, -0xb0(%rbp)
movq -0xb0(%rbp), %rax
cmpq -0xa8(%rbp), %rax
je 0x4609
cmpl $0x1, 0x27b4e(%rip)     # 0x2c0ec
jl 0x45bd
movq 0x27a51(%rip), %rax     # 0x2bff8
movq (%rax), %rdi
leaq 0x21424(%rip), %rsi     # 0x259d5
movl $0x18, %edx
movb $0x0, %al
callq 0x1100
cmpl $0x1, 0x27b28(%rip)     # 0x2c0ec
jl 0x45de
movq 0x27a2b(%rip), %rax     # 0x2bff8
movq (%rax), %rdi
leaq 0x214e4(%rip), %rsi     # 0x25abb
movb $0x0, %al
callq 0x1100
cmpl $0x1, 0x27b07(%rip)     # 0x2c0ec
jl 0x45ff
movq 0x27a0a(%rip), %rax     # 0x2bff8
movq (%rax), %rdi
leaq 0x20eac(%rip), %rsi     # 0x254a4
movb $0x0, %al
callq 0x1100
movl $0x18, %edi
callq 0x1170
movq -0x40(%rbp), %rdi
movq -0xa0(%rbp), %rdx
movq -0x30(%rbp), %rcx
movl $0x1, %esi
callq 0x1180
movq %rax, -0xb8(%rbp)
movq -0xb8(%rbp), %rax
cmpq -0xa0(%rbp), %rax
je 0x46ab
cmpl $0x1, 0x27aac(%rip)     # 0x2c0ec
jl 0x465f
movq 0x279af(%rip), %rax     # 0x2bff8
movq (%rax), %rdi
leaq 0x21382(%rip), %rsi     # 0x259d5
movl $0x19, %edx
movb $0x0, %al
callq 0x1100
cmpl $0x1, 0x27a86(%rip)     # 0x2c0ec
jl 0x4680
movq 0x27989(%rip), %rax     # 0x2bff8
movq (%rax), %rdi
leaq 0x2146a(%rip), %rsi     # 0x25ae3
movb $0x0, %al
callq 0x1100
cmpl $0x1, 0x27a65(%rip)     # 0x2c0ec
jl 0x46a1
movq 0x27968(%rip), %rax     # 0x2bff8
movq (%rax), %rdi
leaq 0x20e0a(%rip), %rsi     # 0x254a4
movb $0x0, %al
callq 0x1100
movl $0x19, %edi
callq 0x1170
movq -0xa0(%rbp), %rax
addq -0xa8(%rbp), %rax
addq -0x20(%rbp), %rax
movq %rax, -0x20(%rbp)
jmp 0x49ee
cmpl $0x6, 0x27a1f(%rip)     # 0x2c0ec
jl 0x46ee
movq 0x27922(%rip), %rax     # 0x2bff8
movq (%rax), %rdi
movq -0xa0(%rbp), %rdx
leaq 0x2141d(%rip), %rsi     # 0x25b04
movb $0x0, %al
callq 0x1100
movq -0xa0(%rbp), %rax
cmpq -0x38(%rbp), %rax
jne 0x470f
movq -0x48(%rbp), %rax
movb $-0x60, (%rax)
movq $0x1, -0xa8(%rbp)
jmp 0x4745
movq -0x48(%rbp), %rax
movb $-0x80, (%rax)
movq -0xa0(%rbp), %rax
shrq $0x8, %rax
movb %al, %cl
movq -0x48(%rbp), %rax
movb %cl, 0x1(%rax)
movq -0xa0(%rbp), %rax
movb %al, %cl
movq -0x48(%rbp), %rax
movb %cl, 0x2(%rax)
movq $0x3, -0xa8(%rbp)
movq -0x40(%rbp), %rax
movb (%rax), %dl
movq -0x48(%rbp), %rax
movq -0xa8(%rbp), %rcx
movb %dl, (%rax,%rcx)
movq -0x48(%rbp), %rdi
movq -0xa8(%rbp), %rdx
addq $0x1, %rdx
movq -0x30(%rbp), %rcx
movl $0x1, %esi
callq 0x1180
movq %rax, -0xc0(%rbp)
movq -0xc0(%rbp), %rax
movq -0xa8(%rbp), %rcx
addq $0x1, %rcx
cmpq %rcx, %rax
je 0x4806
cmpl $0x1, 0x27951(%rip)     # 0x2c0ec
jl 0x47ba
movq 0x27854(%rip), %rax     # 0x2bff8
movq (%rax), %rdi
leaq 0x21227(%rip), %rsi     # 0x259d5
movl $0x1a, %edx
movb $0x0, %al
callq 0x1100
cmpl $0x1, 0x2792b(%rip)     # 0x2c0ec
jl 0x47db
movq 0x2782e(%rip), %rax     # 0x2bff8
movq (%rax), %rdi
leaq 0x21351(%rip), %rsi     # 0x25b25
movb $0x0, %al
callq 0x1100
cmpl $0x1, 0x2790a(%rip)     # 0x2c0ec
jl 0x47fc
movq 0x2780d(%rip), %rax     # 0x2bff8
movq (%rax), %rdi
leaq 0x20caf(%rip), %rsi     # 0x254a4
movb $0x0, %al
callq 0x1100
movl $0x1a, %edi
callq 0x1170
movq -0xa8(%rbp), %rax
addq $0x1, %rax
addq -0x20(%rbp), %rax
movq %rax, -0x20(%rbp)
jmp 0x49ee
cmpl $0x6, 0x278c7(%rip)     # 0x2c0ec
jl 0x484d
movq 0x277ca(%rip), %rax     # 0x2bff8
movq (%rax), %rdi
movq -0xa0(%rbp), %rdx
movq -0x98(%rbp), %rcx
leaq 0x21304(%rip), %rsi     # 0x25b4a
movb $0x0, %al
callq 0x1100
movq -0xa0(%rbp), %rax
cmpq -0x38(%rbp), %rax
jne 0x48bc
movq -0x48(%rbp), %rax
movb $0x20, 0x2(%rax)
cmpl $0x7, 0x27883(%rip)     # 0x2c0ec
jl 0x488b
movq 0x27786(%rip), %rax     # 0x2bff8
movq (%rax), %rdi
movq -0x48(%rbp), %rax
movsbl 0x2(%rax), %edx
leaq 0x212fe(%rip), %rsi     # 0x25b82
movb $0x0, %al
callq 0x1100
movq -0x98(%rbp), %rax
shrq $0x8, %rax
movb %al, %cl
movq -0x48(%rbp), %rax
movb %cl, 0x3(%rax)
movq -0x98(%rbp), %rax
movb %al, %cl
movq -0x48(%rbp), %rax
movb %cl, 0x4(%rax)
movq $0x3, -0xa8(%rbp)
jmp 0x4916
movq -0x48(%rbp), %rax
movb $0x0, (%rax)
movq -0xa0(%rbp), %rax
shrq $0x8, %rax
movb %al, %cl
movq -0x48(%rbp), %rax
movb %cl, 0x1(%rax)
movq -0xa0(%rbp), %rax
movb %al, %cl
movq -0x48(%rbp), %rax
movb %cl, 0x2(%rax)
movq -0x98(%rbp), %rax
shrq $0x8, %rax
movb %al, %cl
movq -0x48(%rbp), %rax
movb %cl, 0x3(%rax)
movq -0x98(%rbp), %rax
movb %al, %cl
movq -0x48(%rbp), %rax
movb %cl, 0x4(%rax)
movq $0x5, -0xa8(%rbp)
movq -0x48(%rbp), %rdi
movl $0x5, %eax
subq -0xa8(%rbp), %rax
addq %rax, %rdi
movq -0xa8(%rbp), %rdx
addq -0x98(%rbp), %rdx
movq -0x30(%rbp), %rcx
movl $0x1, %esi
callq 0x1180
movq %rax, -0xc8(%rbp)
movq -0xc8(%rbp), %rax
movq -0xa8(%rbp), %rcx
addq -0x98(%rbp), %rcx
cmpq %rcx, %rax
je 0x49d8
cmpl $0x1, 0x2777f(%rip)     # 0x2c0ec
jl 0x498c
movq 0x27682(%rip), %rax     # 0x2bff8
movq (%rax), %rdi
leaq 0x21055(%rip), %rsi     # 0x259d5
movl $0x1b, %edx
movb $0x0, %al
callq 0x1100
cmpl $0x1, 0x27759(%rip)     # 0x2c0ec
jl 0x49ad
movq 0x2765c(%rip), %rax     # 0x2bff8
movq (%rax), %rdi
leaq 0x2117f(%rip), %rsi     # 0x25b25
movb $0x0, %al
callq 0x1100
cmpl $0x1, 0x27738(%rip)     # 0x2c0ec
jl 0x49ce
movq 0x2763b(%rip), %rax     # 0x2bff8
movq (%rax), %rdi
leaq 0x20add(%rip), %rsi     # 0x254a4
movb $0x0, %al
callq 0x1100
movl $0x1b, %edi
callq 0x1170
movq -0xa8(%rbp), %rax
addq -0x98(%rbp), %rax
addq -0x20(%rbp), %rax
movq %rax, -0x20(%rbp)
cmpl $0x2, 0x276f7(%rip)     # 0x2c0ec
jl 0x4aae
movq 0x2774e(%rip), %rdi     # 0x2c150
callq 0x50a0
cmpl $0x96, %eax
ja 0x4a1b
cmpl $0x4, 0x276d7(%rip)     # 0x2c0ec
jl 0x4aac
callq 0x1070
movq %rax, 0x27729(%rip)     # 0x2c150
movq 0x275ca(%rip), %rax     # 0x2bff8
movq (%rax), %rdi
movq -0x18(%rbp), %rcx
movq %rcx, %rax
shrq $0x14, %rax
movl %eax, -0x104(%rbp)
movq -0x20(%rbp), %rax
xorl %edx, %edx
divq %rcx
movl -0x104(%rbp), %edx
movq %rax, %xmm0
movaps 0x205e3(%rip), %xmm1    # 0x25040
punpckldq %xmm1, %xmm0    # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
movapd 0x205e7(%rip), %xmm1    # 0x25050
subpd %xmm1, %xmm0
movaps %xmm0, %xmm1
unpckhpd %xmm0, %xmm0            # xmm0 = xmm0[1,1]
addsd %xmm1, %xmm0
movsd 0x20598(%rip), %xmm1    # 0x25018
mulsd %xmm1, %xmm0
leaq 0x21119(%rip), %rsi     # 0x25ba4
movb $0x1, %al
callq 0x1100
cmpl $0x4, 0x27653(%rip)     # 0x2c0ec
jl 0x4aaa
movq 0x2752e(%rip), %rax     # 0x2bfd0
movq (%rax), %rdi
callq 0x1150
jmp 0x4aac
jmp 0x4aae
jmp 0x42e7
leaq -0x78(%rbp), %rdi
callq 0x93d0
movl %eax, -0xcc(%rbp)
movl -0xcc(%rbp), %eax
shrl $0x5, %eax
andl $0x3fffff, %eax         # imm = 0x3FFFFF
movl %eax, -0xcc(%rbp)
movl -0xcc(%rbp), %eax
movb %al, %cl
movq -0x48(%rbp), %rax
movb %cl, 0x2(%rax)
movl -0xcc(%rbp), %eax
shrl $0x8, %eax
movb %al, %cl
movq -0x48(%rbp), %rax
movb %cl, 0x1(%rax)
movl -0xcc(%rbp), %eax
shrl $0x10, %eax
addl $0xc0, %eax
movb %al, %cl
movq -0x48(%rbp), %rax
movb %cl, (%rax)
movq -0x48(%rbp), %rdi
movq -0x30(%rbp), %rcx
movl $0x1, %esi
movl $0x3, %edx
callq 0x1180
movq %rax, -0xd8(%rbp)
cmpq $0x3, -0xd8(%rbp)
je 0x4ba7
cmpl $0x1, 0x275b0(%rip)     # 0x2c0ec
jl 0x4b5b
movq 0x274b3(%rip), %rax     # 0x2bff8
movq (%rax), %rdi
leaq 0x20e86(%rip), %rsi     # 0x259d5
movl $0x1c, %edx
movb $0x0, %al
callq 0x1100
cmpl $0x1, 0x2758a(%rip)     # 0x2c0ec
jl 0x4b7c
movq 0x2748d(%rip), %rax     # 0x2bff8
movq (%rax), %rdi
leaq 0x2104c(%rip), %rsi     # 0x25bc1
movb $0x0, %al
callq 0x1100
cmpl $0x1, 0x27569(%rip)     # 0x2c0ec
jl 0x4b9d
movq 0x2746c(%rip), %rax     # 0x2bff8
movq (%rax), %rdi
leaq 0x2090e(%rip), %rsi     # 0x254a4
movb $0x0, %al
callq 0x1100
movl $0x1c, %edi
callq 0x1170
movq -0x20(%rbp), %rax
addq $0x3, %rax
movq %rax, -0x20(%rbp)
cmpl $0x2, 0x27532(%rip)     # 0x2c0ec
jl 0x4bdb
movq 0x27435(%rip), %rax     # 0x2bff8
movq (%rax), %rdi
leaq 0x204b8(%rip), %rsi     # 0x25085
leaq 0x208d1(%rip), %rdx     # 0x254a5
movb $0x0, %al
callq 0x1100
cmpl $0x2, 0x2750a(%rip)     # 0x2c0ec
jl 0x4c4f
movq 0x2740d(%rip), %rax     # 0x2bff8
movq (%rax), %rdi
movq -0x18(%rbp), %rsi
movq %rsi, -0x110(%rbp)
movq -0x20(%rbp), %rcx
xorl %eax, %eax
movl %eax, %edx
movq %rcx, %rax
divq %rsi
movq -0x110(%rbp), %rdx
movq %rax, %xmm0
movaps 0x20426(%rip), %xmm1    # 0x25040
punpckldq %xmm1, %xmm0    # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
movapd 0x2042a(%rip), %xmm1    # 0x25050
subpd %xmm1, %xmm0
movaps %xmm0, %xmm1
unpckhpd %xmm0, %xmm0            # xmm0 = xmm0[1,1]
addsd %xmm1, %xmm0
movsd 0x203db(%rip), %xmm1    # 0x25018
mulsd %xmm1, %xmm0
leaq 0x20f9d(%rip), %rsi     # 0x25be5
movb $0x1, %al
callq 0x1100
movq -0x40(%rbp), %rdi
callq 0x1030
movq -0x48(%rbp), %rdi
callq 0x1030
movq -0x28(%rbp), %rdi
callq 0x1080
movq -0x30(%rbp), %rdi
callq 0x1080
movq -0x20(%rbp), %rax
addq $0x110, %rsp            # imm = 0x110
popq %rbp
retq