// File: /workspace/github_cpp_makefile_star2_O2/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 $0x2a8, %rsp            # imm = 0x2A8
leaq 0xc4b8(%rip), %rdi      # 0x116fa
leaq 0xc89c(%rip), %rsi      # 0x11ae5
callq 0x2200
movq %rax, %r14
testq %rax, %rax
jne 0x526c
leaq 0xc4c1(%rip), %rdi      # 0x1171e
leaq 0xc881(%rip), %rsi      # 0x11ae5
callq 0x2200
movq %rax, %r14
movaps 0xbebd(%rip), %xmm0     # 0x11130
movups %xmm0, 0x10506(%rip)    # 0x15780
movaps 0xbebf(%rip), %xmm0     # 0x11140
movups %xmm0, 0x10508(%rip)    # 0x15790
movl $0x2ee0, 0x1050e(%rip)  # imm = 0x2EE0
movaps 0xbeb7(%rip), %xmm0     # 0x11150
movups %xmm0, 0x10504(%rip)    # 0x157a4
movaps 0xbeb9(%rip), %xmm0     # 0x11160
movups %xmm0, 0x10506(%rip)    # 0x157b4
testq %r14, %r14
je 0x600a
leaq 0x1a0(%rsp), %r15
leaq 0xc468(%rip), %r12      # 0x1172e
leaq 0xa0(%rsp), %r13
leaq 0x120(%rsp), %rbp
pushq $0xf
popq %rbx
movq %r15, %rdi
movl $0x100, %esi            # imm = 0x100
movq %r14, %rdx
callq 0x2290
testq %rax, %rax
je 0x59b6
xorps %xmm0, %xmm0
movaps %xmm0, 0x110(%rsp)
movaps %xmm0, 0x100(%rsp)
movaps %xmm0, 0xf0(%rsp)
movaps %xmm0, 0xe0(%rsp)
movaps %xmm0, 0xd0(%rsp)
movaps %xmm0, 0xc0(%rsp)
movaps %xmm0, 0xb0(%rsp)
movaps %xmm0, 0xa0(%rsp)
movaps %xmm0, 0x120(%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)
movq %r15, %rdi
movq %r12, %rsi
movq %r13, %rdx
movq %rbp, %rcx
xorl %eax, %eax
callq 0x21b0
cmpl $0x2, %eax
jne 0x52d9
movq %r13, %rdi
leaq 0xc3ad(%rip), %rsi      # 0x11748
pushq $0xa
popq %rdx
callq 0x21f0
testl %eax, %eax
je 0x5791
movq %r13, %rdi
leaq 0xc39d(%rip), %rsi      # 0x11752
pushq $0xc
popq %rdx
callq 0x21f0
testl %eax, %eax
je 0x579a
movq %r13, %rdi
leaq 0xc38f(%rip), %rsi      # 0x1175e
pushq $0xa
popq %rdx
callq 0x21f0
testl %eax, %eax
je 0x57ad
movq %r13, %rdi
leaq 0xc37f(%rip), %rsi      # 0x11768
pushq $0xe
popq %rdx
callq 0x21f0
testl %eax, %eax
je 0x57b6
movq %r13, %rdi
leaq 0xc373(%rip), %rsi      # 0x11776
pushq $0xd
popq %rdx
callq 0x21f0
testl %eax, %eax
je 0x57bf
movq %r13, %rdi
leaq 0xc366(%rip), %rsi      # 0x11783
pushq $0xe
popq %rdx
callq 0x21f0
testl %eax, %eax
je 0x57d3
movabsq $0x786f626c6c6177, %rax # imm = 0x786F626C6C6177
cmpq %rax, 0xa0(%rsp)
jne 0x545b
movq %rbp, %rdi
leaq 0xc346(%rip), %rsi      # 0x11791
pushq $0x5
popq %rdx
callq 0x21f0
testl %eax, %eax
je 0x57e6
movq %r13, %rdi
leaq 0xc331(%rip), %rsi      # 0x11796
pushq $0x7
popq %rdx
callq 0x21f0
testl %eax, %eax
jne 0x548b
movq %rbp, %rdi
leaq 0xc316(%rip), %rsi      # 0x11791
pushq $0x5
popq %rdx
callq 0x21f0
testl %eax, %eax
je 0x5805
movq %r13, %rdi
leaq 0xc308(%rip), %rsi      # 0x1179d
pushq $0x5
popq %rdx
callq 0x21f0
testl %eax, %eax
jne 0x54bb
movq %rbp, %rdi
leaq 0xc2e6(%rip), %rsi      # 0x11791
pushq $0x5
popq %rdx
callq 0x21f0
testl %eax, %eax
je 0x5811
movq %r13, %rdi
leaq 0xc2dd(%rip), %rsi      # 0x117a2
pushq $0x5
popq %rdx
callq 0x21f0
testl %eax, %eax
jne 0x54eb
movq %rbp, %rdi
leaq 0xc2b6(%rip), %rsi      # 0x11791
pushq $0x5
popq %rdx
callq 0x21f0
testl %eax, %eax
je 0x581d
movq %r13, %rdi
leaq 0xc2b2(%rip), %rsi      # 0x117a7
pushq $0x5
popq %rdx
callq 0x21f0
testl %eax, %eax
jne 0x551b
movq %rbp, %rdi
leaq 0xc286(%rip), %rsi      # 0x11791
pushq $0x5
popq %rdx
callq 0x21f0
testl %eax, %eax
je 0x583c
movq %r13, %rdi
leaq 0xc287(%rip), %rsi      # 0x117ac
pushq $0x5
popq %rdx
callq 0x21f0
testl %eax, %eax
jne 0x554b
movq %rbp, %rdi
leaq 0xc256(%rip), %rsi      # 0x11791
pushq $0x5
popq %rdx
callq 0x21f0
testl %eax, %eax
je 0x5848
movq %r13, %rdi
leaq 0xc25c(%rip), %rsi      # 0x117b1
pushq $0x6
popq %rdx
callq 0x21f0
testl %eax, %eax
jne 0x557b
movq %rbp, %rdi
leaq 0xc226(%rip), %rsi      # 0x11791
pushq $0x5
popq %rdx
callq 0x21f0
testl %eax, %eax
je 0x5854
movq %r13, %rdi
leaq 0xc232(%rip), %rsi      # 0x117b7
pushq $0x14
popq %rdx
callq 0x21f0
testl %eax, %eax
je 0x57f2
movq %r13, %rdi
leaq 0xc22c(%rip), %rsi      # 0x117cb
pushq $0x13
popq %rdx
callq 0x21f0
testl %eax, %eax
je 0x5829
movq %r13, %rdi
leaq 0xc225(%rip), %rsi      # 0x117de
pushq $0x14
popq %rdx
callq 0x21f0
testl %eax, %eax
je 0x5860
movq %r13, %rdi
leaq 0xc21f(%rip), %rsi      # 0x117f2
pushq $0x14
popq %rdx
callq 0x21f0
testl %eax, %eax
je 0x5873
movq %r13, %rdi
leaq 0xc219(%rip), %rsi      # 0x11806
pushq $0xb
popq %rdx
callq 0x21f0
testl %eax, %eax
je 0x5886
movdqa 0xa0(%rsp), %xmm0
pcmpeqb 0xbb62(%rip), %xmm0     # 0x11170
pmovmskb %xmm0, %eax
cmpl $0xffff, %eax           # imm = 0xFFFF
je 0x5899
movq %r13, %rdi
leaq 0xc1fa(%rip), %rsi      # 0x11821
pushq $0xe
popq %rdx
callq 0x21f0
testl %eax, %eax
je 0x58b2
movq %r13, %rdi
leaq 0xc1ee(%rip), %rsi      # 0x1182f
pushq $0xe
popq %rdx
callq 0x21f0
testl %eax, %eax
je 0x58cb
movq %r13, %rdi
leaq 0xc1e2(%rip), %rsi      # 0x1183d
movq %rbx, %rdx
callq 0x21f0
testl %eax, %eax
je 0x58e4
movq %r13, %rdi
leaq 0xc1d7(%rip), %rsi      # 0x1184c
movq %rbx, %rdx
callq 0x21f0
testl %eax, %eax
je 0x58fd
movq %r13, %rdi
leaq 0xc1cc(%rip), %rsi      # 0x1185b
pushq $0xd
popq %rdx
callq 0x21f0
testl %eax, %eax
je 0x5916
movq %r13, %rdi
leaq 0xc19a(%rip), %rsi      # 0x11843
pushq $0x9
popq %rdx
callq 0x21f0
testl %eax, %eax
je 0x5929
movq %r13, %rdi
leaq 0xc1a5(%rip), %rsi      # 0x11868
pushq $0x6
popq %rdx
callq 0x21f0
testl %eax, %eax
je 0x593c
movq %r13, %rdi
leaq 0xc191(%rip), %rsi      # 0x1186e
pushq $0x9
popq %rdx
callq 0x21f0
testl %eax, %eax
je 0x594f
movq %r13, %rdi
leaq 0xc180(%rip), %rsi      # 0x11877
pushq $0x5
popq %rdx
callq 0x21f0
testl %eax, %eax
je 0x5968
movq %r13, %rdi
leaq 0xc16b(%rip), %rsi      # 0x1187c
pushq $0x6
popq %rdx
callq 0x21f0
testl %eax, %eax
je 0x5989
movq %r13, %rdi
leaq 0xc157(%rip), %rsi      # 0x11882
pushq $0x6
popq %rdx
callq 0x21f0
testl %eax, %eax
jne 0x5751
movq %rbp, %rdi
leaq 0xc050(%rip), %rsi      # 0x11791
pushq $0x5
popq %rdx
callq 0x21f0
testl %eax, %eax
je 0x59aa
movq %r13, %rdi
leaq 0xc12d(%rip), %rsi      # 0x11888
pushq $0x6
popq %rdx
callq 0x21f0
testl %eax, %eax
jne 0x52d9
movq %rbp, %rdi
leaq 0xc01c(%rip), %rsi      # 0x11791
pushq $0x5
popq %rdx
callq 0x21f0
testl %eax, %eax
jne 0x52d9
movb $0x1, 0xfffb(%rip)      # 0x15787
jmp 0x52d9
leaq 0xfe50(%rip), %rdi      # 0x155e8
jmp 0x57c6
movq %rbp, %rdi
callq 0x2280
movl %eax, 0xfe54(%rip)      # 0x155fc
jmp 0x52d9
leaq 0xfe4c(%rip), %rdi      # 0x15600
jmp 0x57c6
leaq 0xfec3(%rip), %rdi      # 0x15680
jmp 0x57c6
leaq 0xff3a(%rip), %rdi      # 0x15700
movq %rbp, %rsi
callq 0x21a0
jmp 0x52d9
movq %rbp, %rdi
callq 0x2280
movb %al, 0xffa8(%rip)       # 0x15789
jmp 0x52d9
movb $0x1, 0xff93(%rip)      # 0x15780
jmp 0x52d9
movq %rbp, %rdi
callq 0x2280
movl %eax, 0xff90(%rip)      # 0x15790
jmp 0x52d9
movb $0x1, 0xff7c(%rip)      # 0x15788
jmp 0x52d9
movb $0x1, 0xff69(%rip)      # 0x15781
jmp 0x52d9
movb $0x1, 0xff5e(%rip)      # 0x15782
jmp 0x52d9
movq %rbp, %rdi
callq 0x2280
movl %eax, 0xff5d(%rip)      # 0x15794
jmp 0x52d9
movb $0x1, 0xff40(%rip)      # 0x15783
jmp 0x52d9
movb $0x1, 0xff35(%rip)      # 0x15784
jmp 0x52d9
movb $0x1, 0xff2a(%rip)      # 0x15785
jmp 0x52d9
movq %rbp, %rdi
callq 0x2280
movl %eax, 0xff2a(%rip)      # 0x15798
jmp 0x52d9
movq %rbp, %rdi
callq 0x2280
movl %eax, 0xff1b(%rip)      # 0x1579c
jmp 0x52d9
movq %rbp, %rdi
callq 0x2280
movl %eax, 0xff0c(%rip)      # 0x157a0
jmp 0x52d9
movq %rbp, %rdi
callq 0x2220
cvtsd2ss %xmm0, %xmm0
movss %xmm0, 0xfef7(%rip)     # 0x157a4
jmp 0x52d9
movq %rbp, %rdi
callq 0x2220
cvtsd2ss %xmm0, %xmm0
movss %xmm0, 0xfee2(%rip)     # 0x157a8
jmp 0x52d9
movq %rbp, %rdi
callq 0x2220
cvtsd2ss %xmm0, %xmm0
movss %xmm0, 0xfecd(%rip)     # 0x157ac
jmp 0x52d9
movq %rbp, %rdi
callq 0x2220
cvtsd2ss %xmm0, %xmm0
movss %xmm0, 0xfeb8(%rip)     # 0x157b0
jmp 0x52d9
movq %rbp, %rdi
callq 0x2220
cvtsd2ss %xmm0, %xmm0
movss %xmm0, 0xfea3(%rip)     # 0x157b4
jmp 0x52d9
movq %rbp, %rdi
callq 0x2280
movb %al, 0xfe66(%rip)       # 0x1578a
jmp 0x52d9
movq %rbp, %rdi
callq 0x2280
movb %al, 0xfe54(%rip)       # 0x1578b
jmp 0x52d9
movq %rbp, %rdi
callq 0x2280
movl %eax, 0xfe42(%rip)      # 0x1578c
jmp 0x52d9
movq %rbp, %rdi
callq 0x2280
cvtsi2ss %eax, %xmm0
movss %xmm0, 0xfe5d(%rip)     # 0x157c0
jmp 0x52d9
movq %rbp, %rdi
callq 0x2220
mulsd 0xb728(%rip), %xmm0     # 0x110a0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, 0xfe34(%rip)     # 0x157b8
jmp 0x52d9
movq %rbp, %rdi
callq 0x2220
mulsd 0xb707(%rip), %xmm0     # 0x110a0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, 0xfe17(%rip)     # 0x157bc
jmp 0x52d9
movb $0x1, 0xfdd5(%rip)      # 0x15786
jmp 0x52d9
movq %r14, %rdi
callq 0x21c0
movl 0xfea8(%rip), %eax      # 0x1586c
cmpl $0xa, %eax
jge 0x601f
leaq 0x78(%rsp), %rbp
leaq 0x58(%rsp), %r15
incl %eax
movl %eax, 0xfe8d(%rip)      # 0x1586c
leaq 0xbece(%rip), %rdi      # 0x118b4
leaq 0xbee1(%rip), %rsi      # 0x118ce
xorl %eax, %eax
callq 0x2040
movl 0xfc02(%rip), %edx      # 0x155fc
leaq 0xbeda(%rip), %rdi      # 0x118db
leaq 0xfbe0(%rip), %r14      # 0x155e8
movq %r14, %rsi
xorl %eax, %eax
callq 0x2040
movl 0xfbe4(%rip), %esi      # 0x155fc
movq %r14, %rdi
callq 0x10bc8
movl %eax, 0x4(%rsp)
testl %eax, %eax
js 0x5fe5
leaq 0xc071(%rip), %rdi      # 0x11aa4
callq 0x2270
movb $0x0, 0xfe15(%rip)      # 0x15854
pcmpeqd %xmm0, %xmm0
movdqa %xmm0, 0xfe25(%rip)     # 0x15870
movdqa %xmm0, 0xfe2d(%rip)     # 0x15880
movdqa %xmm0, 0xfe35(%rip)     # 0x15890
movdqa %xmm0, 0xfe3d(%rip)     # 0x158a0
leaq 0xfc96(%rip), %r14      # 0x15700
movq %r14, %rdi
callq 0x20d0
cmpq $0x20, %rax
pushq $0x20
popq %rcx
cmovgeq %rcx, %rax
pcmpeqd %xmm0, %xmm0
movdqa %xmm0, 0x70(%rsp)
movdqa %xmm0, 0x60(%rsp)
leaq 0x60(%rsp), %r12
movq %r12, %rdi
movq %r14, %rsi
movq %rax, %rdx
callq 0x2150
leaq 0xf935(%rip), %r14      # 0x153dc
movq %r14, %rdi
movl $0x100, %esi            # imm = 0x100
movl $0x100, %edx            # imm = 0x100
callq 0x7782
leaq 0xf710(%rip), %r13      # 0x151d0
movq %r13, %rdi
movl $0x100, %esi            # imm = 0x100
movl $0x100, %edx            # imm = 0x100
callq 0x7782
movq %r14, %rdi
movq %r12, %rsi
callq 0xbe16
movq %r13, %rdi
movq %r12, %rsi
callq 0x77f8
leaq 0x8(%rsp), %r14
movq %r14, %rdi
callq 0x66e8
movl $0x0, (%rsp)
testb $0x1, (%rsp)
jne 0x5fae
pxor %xmm0, %xmm0
movdqa %xmm0, 0x10(%rsp)
cmpb $0x1, 0xfd3d(%rip)      # 0x15854
jne 0x5b46
cmpb $0x1, 0xfc60(%rip)      # 0x15780
jne 0x5b34
leaq 0x10(%rsp), %rdi
callq 0x30ef
movl 0x18(%rsp), %esi
testl %esi, %esi
jne 0x5b64
leaq 0x10(%rsp), %rdi
callq 0x28e1
movl 0x18(%rsp), %esi
testl %esi, %esi
jne 0x5b64
leaq 0x10(%rsp), %rdi
callq 0x38c3
pushq $0x1
popq %rdi
callq 0x2130
movl 0x18(%rsp), %esi
testl %esi, %esi
je 0x5f34
andq $0x0, 0x30(%rsp)
pxor %xmm0, %xmm0
movdqa %xmm0, 0x20(%rsp)
addl $0x1f, %esi
andl $-0x20, %esi
leaq 0x20(%rsp), %rdi
callq 0x6548
movl 0x18(%rsp), %edi
addq 0x20(%rsp), %rdi
movq 0x28(%rsp), %rdx
subq %rdi, %rdx
xorl %esi, %esi
callq 0x2110
movq 0x20(%rsp), %rdi
movq 0x10(%rsp), %rsi
movl 0x18(%rsp), %edx
callq 0x2150
movq %r13, %rdi
leaq 0xfcd7(%rip), %rsi      # 0x15890
pushq $0x20
popq %rdx
callq 0x77e2
movq 0x20(%rsp), %rdx
movq 0x28(%rsp), %rcx
subq %rdx, %rcx
shrq $0x5, %rcx
movq %r13, %rdi
movq %rdx, %rsi
pushq $0x1
popq %r8
callq 0xbd56
movq 0x20(%rsp), %rsi
movq 0x28(%rsp), %rax
movdqu -0x20(%rax), %xmm0
movups -0x10(%rax), %xmm1
movl %eax, %edx
subl %esi, %edx
movdqa %xmm0, 0xfc90(%rip)     # 0x15890
movaps %xmm1, 0xfc99(%rip)     # 0x158a0
movl 0x4(%rsp), %edi
callq 0x10d0c
movl %eax, %r12d
testl %eax, %eax
js 0x5e9e
cmpb $0x1, 0xfb63(%rip)      # 0x15785
jne 0x5c32
leaq 0xbd4c(%rip), %rdi      # 0x11977
xorl %eax, %eax
callq 0x2040
movb 0xfc98(%rip), %al       # 0x158d0
testb %al, %al
je 0x5f5b
xorl %r14d, %r14d
testb $0x1, (%rsp)
jne 0x5f07
movslq 0xfc5c(%rip), %rsi      # 0x158b0
testq %rsi, %rsi
setg %al
testl %r14d, %r14d
sete %cl
orb %al, %cl
cmpb $0x1, %cl
jne 0x5f07
movq 0xfc4e(%rip), %rdx      # 0x158c0
movq 0xfc3f(%rip), %rax      # 0x158b8
subq %rax, %rdx
movq %rdx, %rcx
subq %rsi, %rcx
cmpq $0xfff, %rcx            # imm = 0xFFF
ja 0x5cca
cmpq $0x10016, %rdx          # imm = 0x10016
jae 0x5ef1
addq $0x1000, %rdx           # imm = 0x1000
leaq 0xfc12(%rip), %rdi      # 0x158b8
movq %rdx, %rsi
callq 0x6548
movq 0xfc03(%rip), %rax      # 0x158b8
movl 0xfbf5(%rip), %ecx      # 0x158b0
movq 0xfbfe(%rip), %rdx      # 0x158c0
movslq %ecx, %rsi
subq %rax, %rdx
jmp 0x5ccc
movl %esi, %ecx
addq %rax, %rsi
subl %ecx, %edx
movl 0x4(%rsp), %edi
callq 0x10d59
testl %eax, %eax
js 0x5ebd
je 0x5ee3
addl %eax, 0xfbc2(%rip)      # 0x158b0
testb $0x1, (%rsp)
jne 0x5c43
movslq 0xfbb1(%rip), %r12      # 0x158b0
movq %r12, %r13
andq $-0x20, %r13
testl %r13d, %r13d
je 0x5c43
pxor %xmm0, %xmm0
movdqa %xmm0, 0x40(%rsp)
andq $0x0, 0x50(%rsp)
leaq 0x40(%rsp), %rdi
movq %r13, %rsi
callq 0x6548
leaq 0xf6a9(%rip), %rdi      # 0x153dc
leaq 0xfb36(%rip), %rsi      # 0x15870
pushq $0x20
popq %rdx
callq 0x77e2
movq 0xfb6f(%rip), %rsi      # 0x158b8
movq 0x40(%rsp), %rdx
sarl $0x5, %r12d
leaq 0xf683(%rip), %rdi      # 0x153dc
movl %r12d, %ecx
pushq $0x1
popq %r8
callq 0x10718
movq 0x40(%rsp), %r12
movq %r15, %rdi
callq 0x66e8
pxor %xmm0, %xmm0
movdqu %xmm0, (%rbp)
andq $0x0, 0x10(%rbp)
movl %r13d, 0x3c(%rsp)
movq %r15, %rdi
movq %r12, %rsi
leaq 0x3c(%rsp), %rdx
leaq 0x60(%rsp), %rcx
callq 0x6ca2
movl %eax, %r13d
testl %eax, %eax
js 0x5df1
movq 0x64(%rsp), %rax
movq %rax, 0xfa23(%rip)      # 0x157d0
xorl %r12d, %r12d
movl %r12d, %r12d
movq 0x78(%rsp), %rsi
movq 0x80(%rsp), %rax
subq %rsi, %rax
cqto
idivq %rbx
cmpq %r12, %rax
jbe 0x5de1
imulq $0xf, %r12, %rax
addq %rax, %rsi
movq %r15, %rdi
callq 0x41b1
incl %r12d
jmp 0x5db0
movq %r15, %rdi
movq %rbp, %r12
movq %rbp, %rsi
callq 0x6e54
jmp 0x5e01
cmpl $-0x5, %r13d
movl $0x0, %eax
cmovel %eax, %r13d
movq %rbp, %r12
movq %r12, %rdi
callq 0x62e0
movq %r15, %rdi
callq 0x66f4
testl %r13d, %r13d
js 0x5e68
je 0x5e83
addl $0x1f, %r13d
andl $0x7fffffe0, %r13d      # imm = 0x7FFFFFE0
movq 0xfa8e(%rip), %rdi      # 0x158b8
leaq (%rdi,%r13), %rsi
movdqu -0x20(%rdi,%r13), %xmm0
movups -0x10(%rdi,%r13), %xmm1
movdqa %xmm0, 0xfa2d(%rip)     # 0x15870
movaps %xmm1, 0xfa36(%rip)     # 0x15880
movq 0xfa6f(%rip), %rdx      # 0x158c0
subq %rsi, %rdx
callq 0x2150
subl %r13d, 0xfa50(%rip)     # 0x158b0
incl %r14d
movb $0x1, %r12b
jmp 0x5e86
xorl %r12d, %r12d
leaq 0xbb94(%rip), %rdi      # 0x11a06
movl %r13d, %esi
xorl %eax, %eax
callq 0x2040
movb $0x1, %al
movl %eax, (%rsp)
jmp 0x5e86
xorl %r12d, %r12d
leaq 0x40(%rsp), %rdi
callq 0x66cc
testb %r12b, %r12b
jne 0x5cee
jmp 0x5c43
callq 0x2030
movl (%rax), %edx
leaq 0xbaab(%rip), %rdi      # 0x11957
movl %r12d, %esi
xorl %eax, %eax
callq 0x2040
movb $0x1, %al
movl %eax, (%rsp)
jmp 0x5f2a
callq 0x2030
movl (%rax), %esi
cmpl $0xb, %esi
leaq 0xf302(%rip), %r13      # 0x151d0
leaq 0x8(%rsp), %r14
jne 0x5f46
leaq 0xbc0b(%rip), %rdi      # 0x11ae7
callq 0x2270
jmp 0x5f13
leaq 0xbbe3(%rip), %rdi      # 0x11acd
callq 0x2270
jmp 0x5f02
leaq 0xbacc(%rip), %rdi      # 0x119c4
movq %rdx, %rsi
xorl %eax, %eax
callq 0x2040
movb $0x1, %al
movl %eax, (%rsp)
leaq 0xf2c2(%rip), %r13      # 0x151d0
leaq 0x8(%rsp), %r14
cmpb $0x1, 0xf86b(%rip)      # 0x15785
jne 0x5f2a
leaq 0xba66(%rip), %rdi      # 0x11989
xorl %eax, %eax
callq 0x2040
leaq 0x20(%rsp), %rdi
callq 0x66cc
movq %r14, %rdi
leaq 0x10(%rsp), %rsi
callq 0x7396
jmp 0x5afc
leaq 0xba99(%rip), %rdi      # 0x119e6
xorl %eax, %eax
callq 0x2040
movb $0x1, %al
movl %eax, (%rsp)
jmp 0x5f13
leaq 0xf96e(%rip), %rdi      # 0x158d0
callq 0x22f0
testl %eax, %eax
je 0x5c40
pxor %xmm0, %xmm0
movdqu %xmm0, 0xf93d(%rip)     # 0x158b8
andq $0x0, 0xf945(%rip)      # 0x158c8
leaq 0x5ea(%rip), %rdi       # 0x6574
leaq 0xf927(%rip), %rsi      # 0x158b8
leaq 0xf208(%rip), %rdx      # 0x151a0
callq 0x2190
leaq 0xf92c(%rip), %rdi      # 0x158d0
callq 0x2120
jmp 0x5c40
leaq 0xb9e4(%rip), %rdi      # 0x11999
xorl %eax, %eax
callq 0x2040
movq %r14, %rdi
callq 0x66f4
movl 0xf8a2(%rip), %esi      # 0x1586c
leaq 0xb926(%rip), %rdi      # 0x118f7
xorl %eax, %eax
callq 0x2040
movl 0x4(%rsp), %edi
callq 0x10cf5
pushq $0xa
jmp 0x5ff3
leaq 0xbacf(%rip), %rdi      # 0x11abb
callq 0x2270
pushq $0x1
popq %rdi
callq 0x2130
movl 0xf86d(%rip), %eax      # 0x1586c
cmpl $0x9, %eax
jle 0x59d7
jmp 0x601f
leaq 0xb87d(%rip), %rdi      # 0x1188e
leaq 0xb706(%rip), %rsi      # 0x1171e
xorl %eax, %eax
callq 0x2040
leaq 0xb8e6(%rip), %rdi      # 0x1190c
xorl %eax, %eax
callq 0x2040
xorl %eax, %eax
addq $0x2a8, %rsp            # imm = 0x2A8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x604a
jmp 0x604a
movq %rax, %rbx
jmp 0x6083
movq %rax, %rbx
jmp 0x6079
jmp 0x605a
jmp 0x6055
jmp 0x605a
movq %rax, %rbx
jmp 0x606f
movq %rax, %rbx
movq %rbp, %rdi
callq 0x62e0
leaq 0x58(%rsp), %rdi
callq 0x66f4
leaq 0x40(%rsp), %rdi
callq 0x66cc
leaq 0x20(%rsp), %rdi
callq 0x66cc
leaq 0x8(%rsp), %rdi
callq 0x66f4
movq %rbx, %rdi
callq 0x22d0
nop