// File: /workspace/github_cpp_makefile_star2_O3/bummelbaerchen[P]e3dc/RscpExampleMain.cpp
// Function: main
int main(int argc, char *argv[])
{
    // get conf parameters
    FILE *fp;
    fp = fopen(CONF_PATH CONF_FILE, "r");
    if(!fp) {
        fp = fopen(CONF_FILE, "r");
    }
    char var[128], value[128], line[256];
    e3dc_config.wallbox = false;
    e3dc_config.openWB = false;
    e3dc_config.ext1 = false;
    e3dc_config.ext2 = false;
    e3dc_config.ext3 = false;
    e3dc_config.ext7 = false;
    e3dc_config.debug = false;
    e3dc_config.wurzelzaehler = 0;
    e3dc_config.untererLadekorridor = UNTERERLADEKORRIDOR;
    e3dc_config.obererLadekorridor = OBERERLADEKORRIDOR;
    e3dc_config.minimumLadeleistung = MINIMUMLADELEISTUNG;
    e3dc_config.maximumLadeleistung = MAXIMUMLADELEISTUNG;
    e3dc_config.wrleistung = WRLEISTUNG;
    e3dc_config.speichergroesse = SPEICHERGROESSE;
    e3dc_config.winterminimum = WINTERMINIMUM;
    e3dc_config.sommermaximum = SOMMERMAXIMUM;
    e3dc_config.sommerladeende = SOMMERLADEENDE; 
    e3dc_config.einspeiselimit = EINSPEISELIMIT;
    e3dc_config.ladeschwelle = LADESCHWELLE;
    e3dc_config.ladeende = LADEENDE;
    e3dc_config.ht = 0;
    e3dc_config.htsat = false;
    e3dc_config.htsun = false;
    e3dc_config.hton = 0;
    e3dc_config.htoff = 24*3600; // in Sekunden
    e3dc_config.htsockel = 0;

    if(fp) {
        while (fgets(line, sizeof(line), fp)) {
            memset(var, 0, sizeof(var));
            memset(value, 0, sizeof(value));
            if(sscanf(line, "%[^ \t=]%*[\t ]=%*[\t ]%[^\n]", var, value) == 2) {
                if(strcmp(var, "server_ip") == 0)
                    strcpy(e3dc_config.server_ip, value);
                else if(strcmp(var, "server_port") == 0)
                    e3dc_config.server_port = atoi(value);
                else if(strcmp(var, "e3dc_user") == 0)
                    strcpy(e3dc_config.e3dc_user, value);
                else if(strcmp(var, "e3dc_password") == 0)
                    strcpy(e3dc_config.e3dc_password, value);
                else if(strcmp(var, "aes_password") == 0)
                    strcpy(e3dc_config.aes_password, value);
                else if(strcmp(var, "wurzelzaehler") == 0)
                    e3dc_config.wurzelzaehler = atoi(value);
                else if((strcmp(var, "wallbox") == 0)&&
                       (strcmp(value, "true") == 0))
                    e3dc_config.wallbox = true;
                else if((strcmp(var, "openWB") == 0)&&
                        (strcmp(value, "true") == 0))
                    e3dc_config.openWB = true;
                else if((strcmp(var, "ext1") == 0)&&
                        (strcmp(value, "true") == 0))
                    e3dc_config.ext1 = true;
                else if((strcmp(var, "ext2") == 0)&&
                        (strcmp(value, "true") == 0))
                    e3dc_config.ext2 = true;
                else if((strcmp(var, "ext3") == 0)&&
                        (strcmp(value, "true") == 0))
                    e3dc_config.ext3 = true;
                else if((strcmp(var, "ext7") == 0)&&
                        (strcmp(value, "true") == 0))
                    e3dc_config.ext7 = true;
                else if((strcmp(var, "debug") == 0)&&
                        (strcmp(value, "true") == 0))
                    e3dc_config.debug = true;
                else if(strcmp(var, "untererLadekorridor") == 0)
                    e3dc_config.untererLadekorridor = atoi(value);
                else if(strcmp(var, "obererLadekorridor") == 0)
                    e3dc_config.obererLadekorridor = atoi(value);
                else if(strcmp(var, "minimumLadeleistung") == 0)
                    e3dc_config.minimumLadeleistung = atoi(value);
                else if(strcmp(var, "maximumLadeleistung") == 0)
                    e3dc_config.maximumLadeleistung = atoi(value);
                else if(strcmp(var, "wrleistung") == 0)
                    e3dc_config.wrleistung = atoi(value);
                else if(strcmp(var, "speichergroesse") == 0)
                    e3dc_config.speichergroesse = atof(value);
                else if(strcmp(var, "winterminimum") == 0)
                    e3dc_config.winterminimum = atof(value);
                else if(strcmp(var, "sommermaximum") == 0)
                    e3dc_config.sommermaximum = atof(value);
                else if(strcmp(var, "sommerladeende") == 0)
                    e3dc_config.sommerladeende = atof(value);
                else if(strcmp(var, "einspeiselimit") == 0)
                    e3dc_config.einspeiselimit = atof(value);
                else if(strcmp(var, "ladeschwelle") == 0)
                    e3dc_config.ladeschwelle = atoi(value);
                else if(strcmp(var, "ladeende") == 0)
                    e3dc_config.ladeende = atoi(value);
                else if(strcmp(var, "htmin") == 0)
                    e3dc_config.ht = atoi(value);
                else if(strcmp(var, "htsockel") == 0)
                    e3dc_config.htsockel = atoi(value);
                else if(strcmp(var, "hton") == 0)
                    e3dc_config.hton = atof(value)*3600; // in Sekunden
                else if(strcmp(var, "htoff") == 0)
                    e3dc_config.htoff = atof(value)*3600; // in Sekunden
                else if((strcmp(var, "htsat") == 0)&&
                        (strcmp(value, "true") == 0))
                    e3dc_config.htsat = true;
                else if((strcmp(var, "htsun") == 0)&&
                        (strcmp(value, "true") == 0))
                    e3dc_config.htsun = true;


            }
        }
//        printf("e3dc_user %s\n",e3dc_config.e3dc_user);
//        printf("e3dc_password %s\n",e3dc_config.e3dc_password);
//        printf("aes_password %s\n",e3dc_config.aes_password);
        fclose(fp);
    }
    static int iEC = 0;
    if (!fp) printf("Configurationsdatei %s nicht gefunden",CONF_FILE);
    // endless application which re-connections to server on connection lost
    if (fp)
        while(iEC < 10)
    {
        iEC++; // Schleifenzähler erhöhen

        // connect to server
        printf("Program Start Version:%s\n",VERSION);

        printf("Connecting to server %s:%i\n", e3dc_config.server_ip, e3dc_config.server_port);
        iSocket = SocketConnect(e3dc_config.server_ip, e3dc_config.server_port);
        if(iSocket < 0) {
            printf("Connection failed\n");
            sleep(1);
            continue;
        }
        printf("Connected successfully\n");

        // reset authentication flag
        iAuthenticated = 0;

        // create AES key and set AES parameters
        {
            // initialize AES encryptor and decryptor IV
            memset(ucDecryptionIV, 0xff, AES_BLOCK_SIZE);
            memset(ucEncryptionIV, 0xff, AES_BLOCK_SIZE);

            // limit password length to AES_KEY_SIZE
            int64_t iPasswordLength = strlen(e3dc_config.aes_password);
            if(iPasswordLength > AES_KEY_SIZE)
                iPasswordLength = AES_KEY_SIZE;

            // copy up to 32 bytes of AES key password
            uint8_t ucAesKey[AES_KEY_SIZE];
            memset(ucAesKey, 0xff, AES_KEY_SIZE);
            memcpy(ucAesKey, e3dc_config.aes_password, iPasswordLength);

            // set encryptor and decryptor parameters
            aesDecrypter.SetParameters(AES_KEY_SIZE * 8, AES_BLOCK_SIZE * 8);
            aesEncrypter.SetParameters(AES_KEY_SIZE * 8, AES_BLOCK_SIZE * 8);
            aesDecrypter.StartDecryption(ucAesKey);
            aesEncrypter.StartEncryption(ucAesKey);
        }

        // enter the main transmit / receive loop
        mainLoop();
        printf("mainloop beendet %i\n",iEC);
        // close socket connection
        SocketClose(iSocket);
        iSocket = -1;
        sleep(10);
    }
    printf("Programm wirklich beendet");
    
    return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x2b8, %rsp            # imm = 0x2B8
leaq 0xd59e(%rip), %rdi      # 0x1376a
leaq 0xd951(%rip), %rsi      # 0x13b24
callq 0x21c0
movq %rax, %rbx
testq %rax, %rax
jne 0x61f6
leaq 0xd5a7(%rip), %rdi      # 0x1378e
leaq 0xd936(%rip), %rsi      # 0x13b24
callq 0x21c0
movq %rax, %rbx
movaps 0xcf33(%rip), %xmm0     # 0x13130
movups %xmm0, 0x1155c(%rip)    # 0x17760
movaps 0xcf35(%rip), %xmm0     # 0x13140
movups %xmm0, 0x1155e(%rip)    # 0x17770
movl $0x2ee0, 0x11564(%rip)  # imm = 0x2EE0
movaps 0xcf2d(%rip), %xmm0     # 0x13150
movups %xmm0, 0x1155a(%rip)    # 0x17784
movaps 0xcf2f(%rip), %xmm0     # 0x13160
movups %xmm0, 0x1155c(%rip)    # 0x17794
testq %rbx, %rbx
je 0x70e2
leaq 0x1b0(%rsp), %rdi
movl $0x100, %esi            # imm = 0x100
movq %rbx, %rdx
callq 0x2250
testq %rax, %rax
je 0x6a5e
leaq 0xd538(%rip), %r14      # 0x1379e
leaq 0x1b0(%rsp), %r15
leaq 0x40(%rsp), %r12
leaq 0x130(%rsp), %r13
movabsq $0x695f726576726573, %rbp # imm = 0x695F726576726573
xorps %xmm0, %xmm0
movaps %xmm0, 0xb0(%rsp)
movaps %xmm0, 0xa0(%rsp)
movaps %xmm0, 0x90(%rsp)
movaps %xmm0, 0x80(%rsp)
movaps %xmm0, 0x70(%rsp)
movaps %xmm0, 0x60(%rsp)
movaps %xmm0, 0x50(%rsp)
movaps %xmm0, 0x40(%rsp)
movaps %xmm0, 0x130(%rsp)
movaps %xmm0, 0x140(%rsp)
movaps %xmm0, 0x150(%rsp)
movaps %xmm0, 0x160(%rsp)
movaps %xmm0, 0x170(%rsp)
movaps %xmm0, 0x180(%rsp)
movaps %xmm0, 0x190(%rsp)
movaps %xmm0, 0x1a0(%rsp)
movq %r15, %rdi
movq %r14, %rsi
movq %r12, %rdx
movq %r13, %rcx
xorl %eax, %eax
callq 0x2180
cmpl $0x2, %eax
jne 0x6875
movq 0x40(%rsp), %rax
xorq %rbp, %rax
movzwl 0x48(%rsp), %ecx
xorq $0x70, %rcx
orq %rax, %rcx
je 0x683b
movq 0x40(%rsp), %rax
movabsq $0x705f726576726573, %rcx # imm = 0x705F726576726573
xorq %rcx, %rax
movl 0x48(%rsp), %ecx
xorq $0x74726f, %rcx         # imm = 0x74726F
orq %rax, %rcx
je 0x6844
movq 0x40(%rsp), %rax
movabsq $0x6573755f63643365, %rcx # imm = 0x6573755F63643365
xorq %rcx, %rax
movzwl 0x48(%rsp), %ecx
xorq $0x72, %rcx
orq %rax, %rcx
je 0x6854
movq 0x40(%rsp), %rax
movabsq $0x7361705f63643365, %rcx # imm = 0x7361705F63643365
xorq %rcx, %rax
movq 0x46(%rsp), %rcx
movabsq $0x64726f77737361, %rdx # imm = 0x64726F77737361
xorq %rdx, %rcx
orq %rax, %rcx
je 0x685d
movq 0x40(%rsp), %rax
movabsq $0x737361705f736561, %rcx # imm = 0x737361705F736561
xorq %rcx, %rax
movq 0x45(%rsp), %rcx
xorq %rdx, %rcx
orq %rax, %rcx
je 0x6866
movq 0x40(%rsp), %rax
movabsq $0x617a6c657a727577, %rcx # imm = 0x617A6C657A727577
xorq %rcx, %rax
movq 0x46(%rsp), %rcx
movabsq $0x72656c6865617a, %rdx # imm = 0x72656C6865617A
xorq %rdx, %rcx
orq %rax, %rcx
je 0x6893
movabsq $0x786f626c6c6177, %rax # imm = 0x786F626C6C6177
cmpq %rax, 0x40(%rsp)
jne 0x6428
movl 0x130(%rsp), %eax
movl $0x65757274, %ecx       # imm = 0x65757274
xorl %ecx, %eax
movzbl 0x134(%rsp), %ecx
orl %eax, %ecx
je 0x68a3
movl 0x40(%rsp), %eax
movl $0x6e65706f, %ecx       # imm = 0x6E65706F
xorl %ecx, %eax
movl 0x43(%rsp), %ecx
movl $0x42576e, %edx         # imm = 0x42576E
xorl %edx, %ecx
orl %eax, %ecx
jne 0x6460
movl 0x130(%rsp), %eax
movl $0x65757274, %ecx       # imm = 0x65757274
xorl %ecx, %eax
movzbl 0x134(%rsp), %ecx
orl %eax, %ecx
je 0x68bc
movl 0x40(%rsp), %eax
movl $0x31747865, %ecx       # imm = 0x31747865
xorl %ecx, %eax
movzbl 0x44(%rsp), %ecx
orl %eax, %ecx
jne 0x6492
movl 0x130(%rsp), %eax
movl $0x65757274, %ecx       # imm = 0x65757274
xorl %ecx, %eax
movzbl 0x134(%rsp), %ecx
orl %eax, %ecx
je 0x68c5
movl 0x40(%rsp), %eax
movl $0x32747865, %ecx       # imm = 0x32747865
xorl %ecx, %eax
movzbl 0x44(%rsp), %ecx
orl %eax, %ecx
jne 0x64c4
movl 0x130(%rsp), %eax
movl $0x65757274, %ecx       # imm = 0x65757274
xorl %ecx, %eax
movzbl 0x134(%rsp), %ecx
orl %eax, %ecx
je 0x68ce
movl 0x40(%rsp), %eax
movl $0x33747865, %ecx       # imm = 0x33747865
xorl %ecx, %eax
movzbl 0x44(%rsp), %ecx
orl %eax, %ecx
jne 0x64f6
movl 0x130(%rsp), %eax
movl $0x65757274, %ecx       # imm = 0x65757274
xorl %ecx, %eax
movzbl 0x134(%rsp), %ecx
orl %eax, %ecx
je 0x68e7
movl 0x40(%rsp), %eax
movl $0x37747865, %ecx       # imm = 0x37747865
xorl %ecx, %eax
movzbl 0x44(%rsp), %ecx
orl %eax, %ecx
jne 0x6528
movl 0x130(%rsp), %eax
movl $0x65757274, %ecx       # imm = 0x65757274
xorl %ecx, %eax
movzbl 0x134(%rsp), %ecx
orl %eax, %ecx
je 0x68f0
movl 0x40(%rsp), %eax
movl $0x75626564, %ecx       # imm = 0x75626564
xorl %ecx, %eax
movzwl 0x44(%rsp), %ecx
xorl $0x67, %ecx
orl %eax, %ecx
jne 0x655d
movl 0x130(%rsp), %eax
movl $0x65757274, %ecx       # imm = 0x65757274
xorl %ecx, %eax
movzbl 0x134(%rsp), %ecx
orl %eax, %ecx
je 0x68fc
movd 0x50(%rsp), %xmm0
pcmpeqb 0xcc05(%rip), %xmm0     # 0x13170
movdqa 0x40(%rsp), %xmm1
pcmpeqb 0xcc07(%rip), %xmm1     # 0x13180
pand %xmm0, %xmm1
pmovmskb %xmm1, %eax
cmpl $0xffff, %eax           # imm = 0xFFFF
je 0x68ac
movdqu 0x43(%rsp), %xmm0
pcmpeqb 0xcbf6(%rip), %xmm0     # 0x13190
movdqa 0x40(%rsp), %xmm1
pcmpeqb 0xcbf8(%rip), %xmm1     # 0x131a0
pand %xmm0, %xmm1
pmovmskb %xmm1, %eax
cmpl $0xffff, %eax           # imm = 0xFFFF
je 0x68d7
movd 0x50(%rsp), %xmm0
movd 0xcbe7(%rip), %xmm2     # 0x131b0
pcmpeqb %xmm2, %xmm0
movdqa 0x40(%rsp), %xmm1
pcmpeqb 0xcbe5(%rip), %xmm1     # 0x131c0
pand %xmm0, %xmm1
pmovmskb %xmm1, %eax
cmpl $0xffff, %eax           # imm = 0xFFFF
je 0x6908
movd 0x50(%rsp), %xmm0
pcmpeqb %xmm2, %xmm0
movdqa 0x40(%rsp), %xmm1
pcmpeqb 0xcbca(%rip), %xmm1     # 0x131d0
pand %xmm0, %xmm1
pmovmskb %xmm1, %eax
cmpl $0xffff, %eax           # imm = 0xFFFF
je 0x691b
movq 0x40(%rsp), %rax
movabsq $0x75747369656c7277, %rcx # imm = 0x75747369656C7277
xorq %rcx, %rax
movq 0x43(%rsp), %rcx
movabsq $0x676e7574736965, %rdx # imm = 0x676E7574736965
xorq %rdx, %rcx
orq %rax, %rcx
je 0x692e
movdqa 0x40(%rsp), %xmm0
pcmpeqb 0xcb8c(%rip), %xmm0     # 0x131e0
pmovmskb %xmm0, %eax
cmpl $0xffff, %eax           # imm = 0xFFFF
je 0x6941
movq 0x40(%rsp), %rax
movabsq $0x696d7265746e6977, %rcx # imm = 0x696D7265746E6977
xorq %rcx, %rax
movq 0x46(%rsp), %rcx
movabsq $0x6d756d696e696d, %rdx # imm = 0x6D756D696E696D
xorq %rdx, %rcx
orq %rax, %rcx
je 0x695a
movq 0x40(%rsp), %rax
movabsq $0x616d72656d6d6f73, %rcx # imm = 0x616D72656D6D6F73
xorq %rcx, %rax
leaq 0x9f800(%rdx), %rcx
xorq 0x46(%rsp), %rcx
orq %rax, %rcx
je 0x6973
movq 0x40(%rsp), %rax
movabsq $0x616c72656d6d6f73, %rcx # imm = 0x616C72656D6D6F73
xorq %rcx, %rax
movq 0x47(%rsp), %rcx
movabsq $0x65646e65656461, %rdx # imm = 0x65646E65656461
xorq %rdx, %rcx
orq %rax, %rcx
je 0x698c
movq 0x40(%rsp), %rax
movabsq $0x73696570736e6965, %rcx # imm = 0x73696570736E6965
xorq %rcx, %rax
movq 0x47(%rsp), %rcx
movabsq $0x74696d696c6573, %rdx # imm = 0x74696D696C6573
xorq %rdx, %rcx
orq %rax, %rcx
je 0x69a5
movq 0x40(%rsp), %rax
movabsq $0x776863736564616c, %rcx # imm = 0x776863736564616C
xorq %rcx, %rax
movq 0x45(%rsp), %rcx
movabsq $0x656c6c65776863, %rdx # imm = 0x656C6C65776863
xorq %rdx, %rcx
orq %rax, %rcx
je 0x69be
movq 0x40(%rsp), %rax
movabsq $0x65646e656564616c, %rcx # imm = 0x65646E656564616C
xorq %rcx, %rax
movzbl 0x48(%rsp), %ecx
orq %rax, %rcx
je 0x69d1
movl 0x40(%rsp), %eax
movl $0x696d7468, %ecx       # imm = 0x696D7468
xorl %ecx, %eax
movzwl 0x44(%rsp), %ecx
xorl $0x6e, %ecx
orl %eax, %ecx
je 0x69e4
movq 0x40(%rsp), %rax
movabsq $0x6c656b636f737468, %rcx # imm = 0x6C656B636F737468
xorq %rcx, %rax
movzbl 0x48(%rsp), %ecx
orq %rax, %rcx
je 0x69f7
movl 0x40(%rsp), %eax
movl $0x6e6f7468, %ecx       # imm = 0x6E6F7468
xorl %ecx, %eax
movzbl 0x44(%rsp), %ecx
orl %eax, %ecx
je 0x6a10
movl 0x40(%rsp), %eax
movl $0x666f7468, %ecx       # imm = 0x666F7468
xorl %ecx, %eax
movzwl 0x44(%rsp), %ecx
xorl $0x66, %ecx
orl %eax, %ecx
je 0x6a31
movl 0x40(%rsp), %eax
movl $0x61737468, %ecx       # imm = 0x61737468
xorl %ecx, %eax
movzwl 0x44(%rsp), %ecx
xorl $0x74, %ecx
orl %eax, %ecx
jne 0x6801
movl 0x130(%rsp), %eax
movl $0x65757274, %ecx       # imm = 0x65757274
xorl %ecx, %eax
movzbl 0x134(%rsp), %ecx
orl %eax, %ecx
je 0x6a52
movl 0x40(%rsp), %eax
movl $0x75737468, %ecx       # imm = 0x75737468
xorl %ecx, %eax
movzwl 0x44(%rsp), %ecx
xorl $0x6e, %ecx
orl %eax, %ecx
jne 0x6875
movl 0x130(%rsp), %eax
movl $0x65757274, %ecx       # imm = 0x65757274
xorl %ecx, %eax
movzbl 0x134(%rsp), %ecx
orl %eax, %ecx
jne 0x6875
movb $0x1, 0x10f2e(%rip)     # 0x17767
jmp 0x6875
leaq 0x10d86(%rip), %rdi     # 0x175c8
jmp 0x686d
movq %r13, %rdi
callq 0x2240
movl %eax, 0x10d8a(%rip)     # 0x175dc
jmp 0x6875
leaq 0x10d85(%rip), %rdi     # 0x175e0
jmp 0x686d
leaq 0x10dfc(%rip), %rdi     # 0x17660
jmp 0x686d
leaq 0x10e73(%rip), %rdi     # 0x176e0
movq %r13, %rsi
callq 0x2170
movq %r15, %rdi
movl $0x100, %esi            # imm = 0x100
movq %rbx, %rdx
callq 0x2250
testq %rax, %rax
jne 0x6285
jmp 0x6a5e
movq %r13, %rdi
callq 0x2240
movb %al, 0x10ec8(%rip)      # 0x17769
jmp 0x6875
movb $0x1, 0x10eb6(%rip)     # 0x17760
jmp 0x6875
movq %r13, %rdi
callq 0x2240
movl %eax, 0x10eb6(%rip)     # 0x17770
jmp 0x6875
movb $0x1, 0x10ea5(%rip)     # 0x17768
jmp 0x6875
movb $0x1, 0x10e95(%rip)     # 0x17761
jmp 0x6875
movb $0x1, 0x10e8d(%rip)     # 0x17762
jmp 0x6875
movq %r13, %rdi
callq 0x2240
movl %eax, 0x10e8f(%rip)     # 0x17774
jmp 0x6875
movb $0x1, 0x10e75(%rip)     # 0x17763
jmp 0x6875
movb $0x1, 0x10e6d(%rip)     # 0x17764
jmp 0x6875
movb $0x1, 0x10e62(%rip)     # 0x17765
jmp 0x6875
movq %r13, %rdi
callq 0x2240
movl %eax, 0x10e62(%rip)     # 0x17778
jmp 0x6875
movq %r13, %rdi
callq 0x2240
movl %eax, 0x10e53(%rip)     # 0x1777c
jmp 0x6875
movq %r13, %rdi
callq 0x2240
movl %eax, 0x10e44(%rip)     # 0x17780
jmp 0x6875
movq %r13, %rdi
callq 0x21e0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, 0x10e2f(%rip)    # 0x17784
jmp 0x6875
movq %r13, %rdi
callq 0x21e0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, 0x10e1a(%rip)    # 0x17788
jmp 0x6875
movq %r13, %rdi
callq 0x21e0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, 0x10e05(%rip)    # 0x1778c
jmp 0x6875
movq %r13, %rdi
callq 0x21e0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, 0x10df0(%rip)    # 0x17790
jmp 0x6875
movq %r13, %rdi
callq 0x21e0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, 0x10ddb(%rip)    # 0x17794
jmp 0x6875
movq %r13, %rdi
callq 0x2240
movb %al, 0x10d9e(%rip)      # 0x1776a
jmp 0x6875
movq %r13, %rdi
callq 0x2240
movb %al, 0x10d8c(%rip)      # 0x1776b
jmp 0x6875
movq %r13, %rdi
callq 0x2240
movl %eax, 0x10d7a(%rip)     # 0x1776c
jmp 0x6875
movq %r13, %rdi
callq 0x2240
cvtsi2ss %eax, %xmm0
movss %xmm0, 0x10d95(%rip)    # 0x177a0
jmp 0x6875
movq %r13, %rdi
callq 0x21e0
mulsd 0xc680(%rip), %xmm0     # 0x130a0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, 0x10d6c(%rip)    # 0x17798
jmp 0x6875
movq %r13, %rdi
callq 0x21e0
mulsd 0xc65f(%rip), %xmm0     # 0x130a0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, 0x10d4f(%rip)    # 0x1779c
jmp 0x6875
movb $0x1, 0x10d0d(%rip)     # 0x17766
jmp 0x6875
movq %rbx, %rdi
callq 0x2190
movl 0x10de0(%rip), %eax     # 0x1784c
cmpl $0xa, %eax
jge 0x70f7
leaq 0x10734(%rip), %r13     # 0x171b0
leaq 0x128(%rsp), %r12
movabsq $-0x1111111111111111, %r14 # imm = 0xEEEEEEEEEEEEEEEF
incl %eax
movl %eax, 0x10db6(%rip)     # 0x1784c
leaq 0xce87(%rip), %rdi      # 0x13924
leaq 0xce9a(%rip), %rsi      # 0x1393e
xorl %eax, %eax
callq 0x2040
movl 0x10b2b(%rip), %edx     # 0x175dc
leaq 0xce93(%rip), %rdi      # 0x1394b
leaq 0x10b09(%rip), %rbx     # 0x175c8
movq %rbx, %rsi
xorl %eax, %eax
callq 0x2040
movl 0x10b0d(%rip), %esi     # 0x175dc
movq %rbx, %rdi
callq 0x12018
movl %eax, 0xc(%rsp)
testl %eax, %eax
js 0x70bb
leaq 0xcff9(%rip), %rdi      # 0x13ae3
callq 0x2220
movb $0x0, 0x10d3e(%rip)     # 0x17834
pcmpeqd %xmm0, %xmm0
movdqa %xmm0, 0x10d4e(%rip)    # 0x17850
movdqa %xmm0, 0x10d56(%rip)    # 0x17860
movdqa %xmm0, 0x10d5e(%rip)    # 0x17870
movdqa %xmm0, 0x10d66(%rip)    # 0x17880
leaq 0x10bbf(%rip), %rbx     # 0x176e0
movq %rbx, %rdi
callq 0x20b0
cmpq $0x20, %rax
movl $0x20, %ecx
cmovgeq %rcx, %rax
pcmpeqd %xmm0, %xmm0
movdqa %xmm0, 0x100(%rsp)
movdqa %xmm0, 0xf0(%rsp)
leaq 0xf0(%rsp), %r15
movq %r15, %rdi
movq %rbx, %rsi
movq %rax, %rdx
callq 0x2120
leaq 0x10853(%rip), %rbx     # 0x173bc
movq %rbx, %rdi
movl $0x100, %esi            # imm = 0x100
movl $0x100, %edx            # imm = 0x100
callq 0x875c
movq %r13, %rdi
movl $0x100, %esi            # imm = 0x100
movl $0x100, %edx            # imm = 0x100
callq 0x875c
movq %rbx, %rdi
movq %r15, %rsi
callq 0xcdb0
movq %r13, %rdi
movq %r15, %rsi
callq 0x87da
leaq 0xc0(%rsp), %rbx
movq %rbx, %rdi
callq 0x73dc
xorl %r15d, %r15d
pxor %xmm0, %xmm0
movdqa %xmm0, 0x10(%rsp)
cmpb $0x1, 0x10c6d(%rip)     # 0x17834
jne 0x6bf6
cmpb $0x1, 0x10b90(%rip)     # 0x17760
jne 0x6be4
leaq 0x10(%rsp), %rdi
callq 0x3368
movl 0x18(%rsp), %esi
testl %esi, %esi
jne 0x6c16
leaq 0x10(%rsp), %rdi
callq 0x2acd
movl 0x18(%rsp), %esi
testl %esi, %esi
jne 0x6c16
leaq 0x10(%rsp), %rdi
callq 0x3b93
movl $0x1, %edi
callq 0x2100
movl 0x18(%rsp), %esi
testl %esi, %esi
je 0x705e
pxor %xmm0, %xmm0
movdqa %xmm0, 0x20(%rsp)
movq $0x0, 0x30(%rsp)
addl $0x1f, %esi
andl $-0x20, %esi
leaq 0x20(%rsp), %rdi
callq 0x7294
movl 0x18(%rsp), %edi
addq 0x20(%rsp), %rdi
movq 0x28(%rsp), %rdx
subq %rdi, %rdx
xorl %esi, %esi
callq 0x20e0
movq 0x20(%rsp), %rdi
movq 0x10(%rsp), %rsi
movl 0x18(%rsp), %edx
callq 0x2120
movq %r13, %rdi
leaq 0x10c02(%rip), %rsi     # 0x17870
movl $0x20, %edx
callq 0x87c2
movq 0x20(%rsp), %rdx
movq 0x28(%rsp), %rcx
subq %rdx, %rcx
shrq $0x5, %rcx
movq %r13, %rdi
movq %rdx, %rsi
movl $0x1, %r8d
callq 0xccd8
movq 0x20(%rsp), %rsi
movq 0x28(%rsp), %rax
movdqu -0x20(%rax), %xmm0
movdqu -0x10(%rax), %xmm1
movl %eax, %edx
subl %esi, %edx
movdqa %xmm0, 0x10bb6(%rip)    # 0x17870
movdqa %xmm1, 0x10bbe(%rip)    # 0x17880
movl 0xc(%rsp), %edi
callq 0x12178
movl %eax, %ebp
testl %eax, %eax
js 0x6fb9
cmpb $0x1, 0x10a89(%rip)     # 0x17765
jne 0x6cec
leaq 0xccd1(%rip), %rdi      # 0x139b6
xorl %eax, %eax
callq 0x2040
movb 0x10bbe(%rip), %al      # 0x178b0
testb %al, %al
je 0x7077
xorl %ebx, %ebx
movl 0x10b8d(%rip), %r13d    # 0x17890
movq 0x10b96(%rip), %rdx     # 0x178a0
movq 0x10b87(%rip), %rax     # 0x17898
subq %rax, %rdx
movslq %r13d, %rsi
movq %rdx, %rcx
subq %rsi, %rcx
cmpq $0xfff, %rcx            # imm = 0xFFF
ja 0x6d64
cmpq $0x10016, %rdx          # imm = 0x10016
jae 0x6ffd
addq $0x1000, %rdx           # imm = 0x1000
leaq 0x10b57(%rip), %rdi     # 0x17898
movq %rdx, %rsi
callq 0x7294
movq 0x10b48(%rip), %rax     # 0x17898
movl 0x10b39(%rip), %r13d    # 0x17890
movq 0x10b42(%rip), %rdx     # 0x178a0
movslq %r13d, %rsi
subq %rax, %rdx
addq %rax, %rsi
subl %r13d, %edx
movl 0xc(%rsp), %edi
callq 0x121c4
testl %eax, %eax
js 0x6fd5
je 0x6fef
addl %eax, 0x10b09(%rip)     # 0x17890
testb $0x1, %r15b
jne 0x7021
movslq 0x10af8(%rip), %r13     # 0x17890
movq %r13, %rbp
andq $-0x20, %rbp
testl %ebp, %ebp
je 0x6fa4
pxor %xmm0, %xmm0
movdqa %xmm0, 0xd0(%rsp)
movq $0x0, 0xe0(%rsp)
leaq 0xd0(%rsp), %rdi
movq %rbp, %rsi
callq 0x7294
leaq 0x105e5(%rip), %rdi     # 0x173bc
leaq 0x10a72(%rip), %rsi     # 0x17850
movl $0x20, %edx
callq 0x87c2
movq 0x10aa9(%rip), %rsi     # 0x17898
movq 0xd0(%rsp), %rdx
sarl $0x5, %r13d
leaq 0x105ba(%rip), %rdi     # 0x173bc
movl %r13d, %ecx
movl $0x1, %r8d
callq 0x118ca
movq 0xd0(%rsp), %r13
movq %r12, %rdi
callq 0x73dc
leaq 0x108(%rsp), %rax
pxor %xmm0, %xmm0
movdqu %xmm0, (%rax)
movq $0x0, 0x10(%rax)
movl %ebp, 0xcc(%rsp)
movq %r12, %rdi
movq %r13, %rsi
leaq 0xcc(%rsp), %rdx
leaq 0xf0(%rsp), %rcx
callq 0x7ad8
movl %eax, %ebp
testl %eax, %eax
js 0x6ed0
movq 0xf4(%rsp), %rcx
movq 0x108(%rsp), %rax
movq %rcx, 0x10939(%rip)     # 0x177b0
cmpq %rax, 0x110(%rsp)
je 0x6ebe
movl $0x1, %r13d
xorl %ecx, %ecx
leaq (%rcx,%rcx,4), %rcx
leaq (%rcx,%rcx,2), %rsi
addq %rax, %rsi
movq %r12, %rdi
callq 0x4980
movl %r13d, %ecx
movq 0x108(%rsp), %rax
movq 0x110(%rsp), %rdx
subq %rax, %rdx
imulq %r14, %rdx
incl %r13d
cmpq %rcx, %rdx
ja 0x6e89
movq %r12, %rdi
leaq 0x108(%rsp), %rsi
callq 0x7cd4
jmp 0x6edb
cmpl $-0x5, %ebp
movl $0x0, %eax
cmovel %eax, %ebp
movq 0x108(%rsp), %rdi
testq %rdi, %rdi
je 0x6ef8
movq 0x118(%rsp), %rsi
subq %rdi, %rsi
callq 0x21b0
movq %r12, %rdi
callq 0x73e8
testl %ebp, %ebp
js 0x6f52
je 0x6f6a
addl $0x1f, %ebp
andl $0x7fffffe0, %ebp       # imm = 0x7FFFFFE0
movq 0x10982(%rip), %rdi     # 0x17898
leaq (%rdi,%rbp), %rsi
movdqu -0x20(%rdi,%rbp), %xmm0
movdqu -0x10(%rdi,%rbp), %xmm1
movdqa %xmm0, 0x10922(%rip)    # 0x17850
movdqa %xmm1, 0x1092a(%rip)    # 0x17860
movq 0x10963(%rip), %rdx     # 0x178a0
subq %rsi, %rdx
callq 0x2120
subl %ebp, 0x10945(%rip)     # 0x17890
incl %ebx
movb $0x1, %r13b
jmp 0x6f6d
xorl %r13d, %r13d
leaq 0xcae9(%rip), %rdi      # 0x13a45
movl %ebp, %esi
xorl %eax, %eax
callq 0x2040
movb $0x1, %r15b
jmp 0x6f6d
xorl %r13d, %r13d
movq 0xd0(%rsp), %rdi
testq %rdi, %rdi
je 0x6f8a
movq 0xe0(%rsp), %rsi
subq %rdi, %rsi
callq 0x21b0
testb %r13b, %r13b
jne 0x6d87
testb $0x1, %r15b
jne 0x7021
movl 0x108ec(%rip), %r13d    # 0x17890
testl %r13d, %r13d
setg %al
testl %ebx, %ebx
sete %cl
orb %al, %cl
jne 0x6d03
jmp 0x7021
callq 0x2030
movl (%rax), %edx
leaq 0xc9cf(%rip), %rdi      # 0x13996
movl %ebp, %esi
xorl %eax, %eax
callq 0x2040
movb $0x1, %r15b
jmp 0x7047
callq 0x2030
movl (%rax), %esi
cmpl $0xb, %esi
jne 0x7010
leaq 0xcb3e(%rip), %rdi      # 0x13b26
callq 0x2220
jmp 0x7021
leaq 0xcb16(%rip), %rdi      # 0x13b0c
callq 0x2220
jmp 0x701e
leaq 0xc9ff(%rip), %rdi      # 0x13a03
movq %rdx, %rsi
xorl %eax, %eax
callq 0x2040
jmp 0x701e
leaq 0xca0e(%rip), %rdi      # 0x13a25
xorl %eax, %eax
callq 0x2040
movb $0x1, %r15b
cmpb $0x1, 0x1073d(%rip)     # 0x17765
leaq 0x10181(%rip), %r13     # 0x171b0
jne 0x703f
leaq 0xc990(%rip), %rdi      # 0x139c8
xorl %eax, %eax
callq 0x2040
leaq 0xc0(%rsp), %rbx
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0x705e
movq 0x30(%rsp), %rsi
subq %rdi, %rsi
callq 0x21b0
movq %rbx, %rdi
leaq 0x10(%rsp), %rsi
callq 0x82dc
testb $0x1, %r15b
je 0x6bb6
jmp 0x7081
callq 0x2300
jmp 0x6cfa
leaq 0xc950(%rip), %rdi      # 0x139d8
xorl %eax, %eax
callq 0x2040
movq %rbx, %rdi
callq 0x73e8
movl 0x107af(%rip), %esi     # 0x1784c
leaq 0xc8c3(%rip), %rdi      # 0x13967
xorl %eax, %eax
callq 0x2040
movl 0xc(%rsp), %edi
callq 0x12161
movl $0xa, %edi
jmp 0x70cc
leaq 0xca38(%rip), %rdi      # 0x13afa
callq 0x2220
movl $0x1, %edi
callq 0x2100
movl 0x10775(%rip), %eax     # 0x1784c
cmpl $0x9, %eax
jle 0x6a8e
jmp 0x70f7
leaq 0xc815(%rip), %rdi      # 0x138fe
leaq 0xc69e(%rip), %rsi      # 0x1378e
xorl %eax, %eax
callq 0x2040
leaq 0xc87e(%rip), %rdi      # 0x1397c
xorl %eax, %eax
callq 0x2040
xorl %eax, %eax
addq $0x2b8, %rsp            # imm = 0x2B8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x711d
jmp 0x711d
movq %rax, %rbx
jmp 0x717c
movq %rax, %rbx
jmp 0x7193
jmp 0x7132
jmp 0x7132
jmp 0x712d
movq %rax, %rbx
jmp 0x715f
movq %rax, %rbx
movq 0x108(%rsp), %rdi
testq %rdi, %rdi
je 0x7152
movq 0x118(%rsp), %rsi
subq %rdi, %rsi
callq 0x21b0
leaq 0x128(%rsp), %rdi
callq 0x73e8
movq 0xd0(%rsp), %rdi
testq %rdi, %rdi
je 0x717c
movq 0xe0(%rsp), %rsi
subq %rdi, %rsi
callq 0x21b0
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0x7193
movq 0x30(%rsp), %rsi
subq %rdi, %rsi
callq 0x21b0
leaq 0xc0(%rsp), %rdi
callq 0x73e8
movq %rbx, %rdi
callq 0x2290