// File: /workspace/github_cpp_makefile_star2_O3/bummelbaerchen[P]e3dc/RscpExampleMain.cpp
// Function: createRequestExample(SRscpFrameBuffer*)
int createRequestExample(SRscpFrameBuffer * frameBuffer) {
    RscpProtocol protocol;
    SRscpValue rootValue;
    // The root container is create with the TAG ID 0 which is not used by any device.
    protocol.createContainerValue(&rootValue, 0);

    //---------------------------------------------------------------------------------------------------------
    // Create a request frame
    //---------------------------------------------------------------------------------------------------------
    if(iAuthenticated == 0)
    
    {
        printf("\nRequest authentication\n");
        // authentication request
        SRscpValue authenContainer;
        protocol.createContainerValue(&authenContainer, TAG_RSCP_REQ_AUTHENTICATION);
        protocol.appendValue(&authenContainer, TAG_RSCP_AUTHENTICATION_USER, e3dc_config.e3dc_user);
        protocol.appendValue(&authenContainer, TAG_RSCP_AUTHENTICATION_PASSWORD, e3dc_config.e3dc_password);
        // append sub-container to root container
        protocol.appendValue(&rootValue, authenContainer);
        // free memory of sub-container as it is now copied to rootValue
        protocol.destroyValueData(authenContainer);
    }
    else
    {
//        printf("\nRequest cyclic example data\n");
        // request power data information
        protocol.appendValue(&rootValue, TAG_EMS_REQ_POWER_PV);
        protocol.appendValue(&rootValue, TAG_EMS_REQ_POWER_ADD);
        protocol.appendValue(&rootValue, TAG_EMS_REQ_POWER_BAT);
        protocol.appendValue(&rootValue, TAG_EMS_REQ_POWER_HOME);
        protocol.appendValue(&rootValue, TAG_EMS_REQ_POWER_GRID);
        protocol.appendValue(&rootValue, TAG_EMS_REQ_EMERGENCY_POWER_STATUS);
        if(iBattPowerStatus == 0)
        {
            protocol.appendValue(&rootValue, TAG_EMS_REQ_GET_POWER_SETTINGS);
            iBattPowerStatus = 1;
        }

        // request battery information
        SRscpValue batteryContainer;
        protocol.createContainerValue(&batteryContainer, TAG_BAT_REQ_DATA);
        protocol.appendValue(&batteryContainer, TAG_BAT_INDEX, (uint8_t)0);
        protocol.appendValue(&batteryContainer, TAG_BAT_REQ_RSOC);
        protocol.appendValue(&batteryContainer, TAG_BAT_REQ_MODULE_VOLTAGE);
        protocol.appendValue(&batteryContainer, TAG_BAT_REQ_CURRENT);
        // append sub-container to root container
        protocol.appendValue(&rootValue, batteryContainer);
        // free memory of sub-container as it is now copied to rootValue
        protocol.destroyValueData(batteryContainer);
        
        // request Power Meter information
        uint8_t uindex = e3dc_config.wurzelzaehler;
        SRscpValue PMContainer;
        protocol.createContainerValue(&PMContainer, TAG_PM_REQ_DATA);
        protocol.appendValue(&PMContainer, TAG_PM_INDEX,uindex);
        protocol.appendValue(&PMContainer, TAG_PM_REQ_POWER_L1);
        protocol.appendValue(&PMContainer, TAG_PM_REQ_POWER_L2);
        protocol.appendValue(&PMContainer, TAG_PM_REQ_POWER_L3);
        protocol.appendValue(&PMContainer, TAG_PM_REQ_VOLTAGE_L1);
        protocol.appendValue(&PMContainer, TAG_PM_REQ_VOLTAGE_L2);
        protocol.appendValue(&PMContainer, TAG_PM_REQ_VOLTAGE_L3);
        // append sub-container to root container
        protocol.appendValue(&rootValue, PMContainer);
        // free memory of sub-container as it is now copied to rootValue
        protocol.destroyValueData(PMContainer);
// EXTERNER ZÄHLER 1
        protocol.createContainerValue(&PMContainer, TAG_PM_REQ_DATA);
        protocol.appendValue(&PMContainer, TAG_PM_INDEX, (uint8_t)1);
        protocol.appendValue(&PMContainer, TAG_PM_REQ_POWER_L1);
        protocol.appendValue(&PMContainer, TAG_PM_REQ_POWER_L2);
        protocol.appendValue(&PMContainer, TAG_PM_REQ_POWER_L3);
//        protocol.appendValue(&PMContainer, TAG_PM_REQ_VOLTAGE_L1);
//        protocol.appendValue(&PMContainer, TAG_PM_REQ_VOLTAGE_L2);
//        protocol.appendValue(&PMContainer, TAG_PM_REQ_VOLTAGE_L3);
        // append sub-container to root container
if (e3dc_config.ext1)
        protocol.appendValue(&rootValue, PMContainer);
        // free memory of sub-container as it is now copied to rootValue
        protocol.destroyValueData(PMContainer);
        // EXTERNER ZÄHLER 2
        protocol.createContainerValue(&PMContainer, TAG_PM_REQ_DATA);
        protocol.appendValue(&PMContainer, TAG_PM_INDEX, (uint8_t)2);
        protocol.appendValue(&PMContainer, TAG_PM_REQ_POWER_L1);
        protocol.appendValue(&PMContainer, TAG_PM_REQ_POWER_L2);
        protocol.appendValue(&PMContainer, TAG_PM_REQ_POWER_L3);
//        protocol.appendValue(&PMContainer, TAG_PM_REQ_VOLTAGE_L1);
//        protocol.appendValue(&PMContainer, TAG_PM_REQ_VOLTAGE_L2);
//        protocol.appendValue(&PMContainer, TAG_PM_REQ_VOLTAGE_L3);
        // append sub-container to root container
if (e3dc_config.ext2)
            protocol.appendValue(&rootValue, PMContainer);
        // free memory of sub-container as it is now copied to rootValue
        protocol.destroyValueData(PMContainer);
        // EXTERNER ZÄHLER 3
        protocol.createContainerValue(&PMContainer, TAG_PM_REQ_DATA);
        protocol.appendValue(&PMContainer, TAG_PM_INDEX, (uint8_t)3);
        protocol.appendValue(&PMContainer, TAG_PM_REQ_POWER_L1);
        protocol.appendValue(&PMContainer, TAG_PM_REQ_POWER_L2);
        protocol.appendValue(&PMContainer, TAG_PM_REQ_POWER_L3);
        //        protocol.appendValue(&PMContainer, TAG_PM_REQ_VOLTAGE_L1);
        //        protocol.appendValue(&PMContainer, TAG_PM_REQ_VOLTAGE_L2);
        //        protocol.appendValue(&PMContainer, TAG_PM_REQ_VOLTAGE_L3);
        // append sub-container to root container
if (e3dc_config.ext3)
            protocol.appendValue(&rootValue, PMContainer);
        // free memory of sub-container as it is now copied to rootValue
        protocol.destroyValueData(PMContainer);
        // EXTERNER ZÄHLER 7
        protocol.createContainerValue(&PMContainer, TAG_PM_REQ_DATA);
        protocol.appendValue(&PMContainer, TAG_PM_INDEX, (uint8_t)7);
        protocol.appendValue(&PMContainer, TAG_PM_REQ_POWER_L1);
        protocol.appendValue(&PMContainer, TAG_PM_REQ_POWER_L2);
        protocol.appendValue(&PMContainer, TAG_PM_REQ_POWER_L3);
        //        protocol.appendValue(&PMContainer, TAG_PM_REQ_VOLTAGE_L1);
        //        protocol.appendValue(&PMContainer, TAG_PM_REQ_VOLTAGE_L2);
        //        protocol.appendValue(&PMContainer, TAG_PM_REQ_VOLTAGE_L3);
        // append sub-container to root container
if (e3dc_config.ext7)
        protocol.appendValue(&rootValue, PMContainer);
        // free memory of sub-container as it is now copied to rootValue
        protocol.destroyValueData(PMContainer);

        
        // request Power Inverter information
        SRscpValue PVIContainer;
        protocol.createContainerValue(&PVIContainer, TAG_PVI_REQ_DATA);
        protocol.appendValue(&PVIContainer, TAG_PVI_INDEX, (uint8_t)0);
        protocol.appendValue(&PVIContainer, TAG_PVI_REQ_DC_POWER, (uint8_t)0);
        protocol.appendValue(&PVIContainer, TAG_PVI_REQ_DC_VOLTAGE, (uint8_t)0);
        protocol.appendValue(&PVIContainer, TAG_PVI_REQ_DC_CURRENT, (uint8_t)0);
        protocol.appendValue(&PVIContainer, TAG_PVI_REQ_DC_POWER, (uint8_t)1);
        protocol.appendValue(&PVIContainer, TAG_PVI_REQ_DC_VOLTAGE, (uint8_t)1);
        protocol.appendValue(&PVIContainer, TAG_PVI_REQ_DC_CURRENT, (uint8_t)1);

        // append sub-container to root container
        protocol.appendValue(&rootValue, PVIContainer);
        // free memory of sub-container as it is now copied to rootValue
        protocol.destroyValueData(PVIContainer);

        
        // request Wallbox information

        SRscpValue WBContainer;
  
/*
         protocol.createContainerValue(&WBContainer, TAG_WB_REQ_AVAILABLE_SOLAR_POWER);
         protocol.appendValue(&WBContainer, TAG_WB_INDEX, (uint8_t)0);

        // append sub-container to root container
         protocol.appendValue(&rootValue, WBContainer);
         // free memory of sub-container as it is now copied to rootValue
         protocol.destroyValueData(WBContainer);
*/
        
        protocol.createContainerValue(&WBContainer, TAG_WB_REQ_DATA);
        protocol.appendValue(&WBContainer, TAG_WB_INDEX, (uint8_t)0);
//        protocol.appendValue(&WBContainer, TAG_WB_REQ_PM_MODE);
        protocol.appendValue(&WBContainer, TAG_WB_REQ_PARAM_1);

        protocol.appendValue(&WBContainer, TAG_WB_REQ_PM_POWER_L1);
        protocol.appendValue(&WBContainer, TAG_WB_REQ_PM_POWER_L2);
        protocol.appendValue(&WBContainer, TAG_WB_REQ_PM_POWER_L3);
//        protocol.appendValue(&WBContainer, TAG_WB_REQ_AVAILABLE_SOLAR_POWER);

        // append sub-container to root container
if (e3dc_config.wallbox)
        protocol.appendValue(&rootValue, WBContainer);
        // free memory of sub-container as it is now copied to rootValue
        protocol.destroyValueData(WBContainer);

        
        if(iBattPowerStatus == 2)
            
        {
            // request RootPower Meter information
        }

    }

    
    // create buffer frame to send data to the S10
    protocol.createFrameAsBuffer(frameBuffer, rootValue.data, rootValue.length, true); // true to calculate CRC on for transfer
    // the root value object should be destroyed after the data is copied into the frameBuffer and is not needed anymore
    protocol.destroyValueData(rootValue);
    printf("\nRequest cyclic example data done \n");

    return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x70, %rsp
movq %rdi, %rbx
leaq 0x10(%rsp), %r14
movq %r14, %rdi
callq 0x73dc
leaq 0x50(%rsp), %rdx
movl $0x0, (%rdx)
leaq 0x20(%rsp), %r9
movb $0xe, (%r9)
leaq 0x30(%rsp), %r8
movw $0x0, (%r8)
leaq 0x60(%rsp), %rsi
movq %r14, %rdi
xorl %ecx, %ecx
callq 0x7daa
cmpb $0x0, 0x13c53(%rip)     # 0x17834
je 0x47bc
leaq 0x50(%rsp), %rdx
movl $0x1000001, (%rdx)      # imm = 0x1000001
leaq 0x30(%rsp), %r8
movw $0x0, (%r8)
leaq 0x20(%rsp), %r9
movb $0x0, (%r9)
leaq 0x10(%rsp), %rdi
leaq 0x60(%rsp), %rsi
xorl %ecx, %ecx
callq 0x7f6c
leaq 0x50(%rsp), %rdx
movl $0x1000005, (%rdx)      # imm = 0x1000005
leaq 0x30(%rsp), %r8
movw $0x0, (%r8)
leaq 0x20(%rsp), %r9
movb $0x0, (%r9)
leaq 0x10(%rsp), %rdi
leaq 0x60(%rsp), %rsi
xorl %ecx, %ecx
callq 0x7f6c
leaq 0x50(%rsp), %rdx
movl $0x1000002, (%rdx)      # imm = 0x1000002
leaq 0x30(%rsp), %r8
movw $0x0, (%r8)
leaq 0x20(%rsp), %r9
movb $0x0, (%r9)
leaq 0x10(%rsp), %rdi
leaq 0x60(%rsp), %rsi
xorl %ecx, %ecx
callq 0x7f6c
leaq 0x50(%rsp), %rdx
movl $0x1000003, (%rdx)      # imm = 0x1000003
leaq 0x30(%rsp), %r8
movw $0x0, (%r8)
leaq 0x20(%rsp), %r9
movb $0x0, (%r9)
leaq 0x10(%rsp), %rdi
leaq 0x60(%rsp), %rsi
xorl %ecx, %ecx
callq 0x7f6c
leaq 0x50(%rsp), %rdx
movl $0x1000004, (%rdx)      # imm = 0x1000004
leaq 0x30(%rsp), %r8
movw $0x0, (%r8)
leaq 0x20(%rsp), %r9
movb $0x0, (%r9)
leaq 0x10(%rsp), %rdi
leaq 0x60(%rsp), %rsi
xorl %ecx, %ecx
callq 0x7f6c
leaq 0x50(%rsp), %rdx
movl $0x1000073, (%rdx)      # imm = 0x1000073
leaq 0x30(%rsp), %r8
movw $0x0, (%r8)
leaq 0x20(%rsp), %r9
movb $0x0, (%r9)
leaq 0x10(%rsp), %rdi
leaq 0x60(%rsp), %rsi
xorl %ecx, %ecx
callq 0x7f6c
cmpb $0x0, 0x13ac6(%rip)     # 0x177d4
jne 0x3d47
leaq 0x50(%rsp), %rdx
movl $0x100008b, (%rdx)      # imm = 0x100008B
leaq 0x30(%rsp), %r8
movw $0x0, (%r8)
leaq 0x20(%rsp), %r9
movb $0x0, (%r9)
leaq 0x10(%rsp), %rdi
leaq 0x60(%rsp), %rsi
xorl %ecx, %ecx
callq 0x7f6c
movb $0x1, 0x13a8d(%rip)     # 0x177d4
leaq 0x30(%rsp), %rdx
movl $0x3040000, (%rdx)      # imm = 0x3040000
leaq 0x40(%rsp), %r9
movb $0xe, (%r9)
leaq 0x20(%rsp), %r8
movw $0x0, (%r8)
leaq 0x10(%rsp), %rdi
leaq 0x50(%rsp), %rsi
xorl %ecx, %ecx
callq 0x7daa
leaq 0x30(%rsp), %rdx
movl $0x3040001, (%rdx)      # imm = 0x3040001
leaq 0xc(%rsp), %rcx
movb $0x0, (%rcx)
leaq 0x20(%rsp), %r8
movw $0x1, (%r8)
leaq 0x40(%rsp), %r9
movb $0x3, (%r9)
leaq 0x10(%rsp), %rdi
leaq 0x50(%rsp), %rsi
callq 0x7f6c
leaq 0x30(%rsp), %rdx
movl $0x3000001, (%rdx)      # imm = 0x3000001
leaq 0x20(%rsp), %r8
movw $0x0, (%r8)
leaq 0x40(%rsp), %r9
movb $0x0, (%r9)
leaq 0x10(%rsp), %rdi
leaq 0x50(%rsp), %rsi
xorl %ecx, %ecx
callq 0x7f6c
leaq 0x30(%rsp), %rdx
movl $0x3000002, (%rdx)      # imm = 0x3000002
leaq 0x20(%rsp), %r8
movw $0x0, (%r8)
leaq 0x40(%rsp), %r9
movb $0x0, (%r9)
leaq 0x10(%rsp), %rdi
leaq 0x50(%rsp), %rsi
xorl %ecx, %ecx
callq 0x7f6c
leaq 0x30(%rsp), %rdx
movl $0x3000003, (%rdx)      # imm = 0x3000003
leaq 0x20(%rsp), %r8
movw $0x0, (%r8)
leaq 0x40(%rsp), %r9
movb $0x0, (%r9)
leaq 0x10(%rsp), %rdi
leaq 0x50(%rsp), %rsi
xorl %ecx, %ecx
callq 0x7f6c
leaq 0x10(%rsp), %rdi
leaq 0x60(%rsp), %rsi
leaq 0x50(%rsp), %rdx
callq 0x71a8
leaq 0x10(%rsp), %rdi
leaq 0x50(%rsp), %rsi
callq 0x828a
movb 0x13903(%rip), %al      # 0x17769
movb %al, 0x4f(%rsp)
leaq 0x20(%rsp), %rdx
movl $0x5040000, (%rdx)      # imm = 0x5040000
leaq 0xc(%rsp), %r9
movb $0xe, (%r9)
leaq 0x40(%rsp), %r8
movw $0x0, (%r8)
leaq 0x10(%rsp), %rdi
leaq 0x30(%rsp), %rsi
xorl %ecx, %ecx
callq 0x7daa
leaq 0x20(%rsp), %rdx
movl $0x5040001, (%rdx)      # imm = 0x5040001
leaq 0x40(%rsp), %r8
movw $0x1, (%r8)
leaq 0xc(%rsp), %r9
movb $0x3, (%r9)
leaq 0x10(%rsp), %rdi
leaq 0x30(%rsp), %rsi
leaq 0x4f(%rsp), %rcx
callq 0x7f6c
leaq 0x20(%rsp), %rdx
movl $0x5000001, (%rdx)      # imm = 0x5000001
leaq 0x40(%rsp), %r8
movw $0x0, (%r8)
leaq 0xc(%rsp), %r9
movb $0x0, (%r9)
leaq 0x10(%rsp), %rdi
leaq 0x30(%rsp), %rsi
xorl %ecx, %ecx
callq 0x7f6c
leaq 0x20(%rsp), %rdx
movl $0x5000002, (%rdx)      # imm = 0x5000002
leaq 0x40(%rsp), %r8
movw $0x0, (%r8)
leaq 0xc(%rsp), %r9
movb $0x0, (%r9)
leaq 0x10(%rsp), %rdi
leaq 0x30(%rsp), %rsi
xorl %ecx, %ecx
callq 0x7f6c
leaq 0x20(%rsp), %rdx
movl $0x5000003, (%rdx)      # imm = 0x5000003
leaq 0x40(%rsp), %r8
movw $0x0, (%r8)
leaq 0xc(%rsp), %r9
movb $0x0, (%r9)
leaq 0x10(%rsp), %rdi
leaq 0x30(%rsp), %rsi
xorl %ecx, %ecx
callq 0x7f6c
leaq 0x20(%rsp), %rdx
movl $0x5000011, (%rdx)      # imm = 0x5000011
leaq 0x40(%rsp), %r8
movw $0x0, (%r8)
leaq 0xc(%rsp), %r9
movb $0x0, (%r9)
leaq 0x10(%rsp), %rdi
leaq 0x30(%rsp), %rsi
xorl %ecx, %ecx
callq 0x7f6c
leaq 0x20(%rsp), %rdx
movl $0x5000012, (%rdx)      # imm = 0x5000012
leaq 0x40(%rsp), %r8
movw $0x0, (%r8)
leaq 0xc(%rsp), %r9
movb $0x0, (%r9)
leaq 0x10(%rsp), %rdi
leaq 0x30(%rsp), %rsi
xorl %ecx, %ecx
callq 0x7f6c
leaq 0x20(%rsp), %rdx
movl $0x5000013, (%rdx)      # imm = 0x5000013
leaq 0x40(%rsp), %r8
movw $0x0, (%r8)
leaq 0xc(%rsp), %r9
movb $0x0, (%r9)
leaq 0x10(%rsp), %rdi
leaq 0x30(%rsp), %rsi
xorl %ecx, %ecx
callq 0x7f6c
leaq 0x10(%rsp), %rdi
leaq 0x60(%rsp), %rsi
leaq 0x30(%rsp), %rdx
callq 0x71a8
leaq 0x10(%rsp), %rdi
leaq 0x30(%rsp), %rsi
callq 0x828a
leaq 0x20(%rsp), %rdx
movl $0x5040000, (%rdx)      # imm = 0x5040000
leaq 0xc(%rsp), %r9
movb $0xe, (%r9)
leaq 0x40(%rsp), %r8
movw $0x0, (%r8)
leaq 0x10(%rsp), %rdi
leaq 0x30(%rsp), %rsi
xorl %ecx, %ecx
callq 0x7daa
leaq 0x20(%rsp), %rdx
movl $0x5040001, (%rdx)      # imm = 0x5040001
leaq 0x1e(%rsp), %rcx
movb $0x1, (%rcx)
leaq 0x40(%rsp), %r8
movw $0x1, (%r8)
leaq 0xc(%rsp), %r9
movb $0x3, (%r9)
leaq 0x10(%rsp), %rdi
leaq 0x30(%rsp), %rsi
callq 0x7f6c
leaq 0x20(%rsp), %rdx
movl $0x5000001, (%rdx)      # imm = 0x5000001
leaq 0x40(%rsp), %r8
movw $0x0, (%r8)
leaq 0xc(%rsp), %r9
movb $0x0, (%r9)
leaq 0x10(%rsp), %rdi
leaq 0x30(%rsp), %rsi
xorl %ecx, %ecx
callq 0x7f6c
leaq 0x20(%rsp), %rdx
movl $0x5000002, (%rdx)      # imm = 0x5000002
leaq 0x40(%rsp), %r8
movw $0x0, (%r8)
leaq 0xc(%rsp), %r9
movb $0x0, (%r9)
leaq 0x10(%rsp), %rdi
leaq 0x30(%rsp), %rsi
xorl %ecx, %ecx
callq 0x7f6c
leaq 0x20(%rsp), %rdx
movl $0x5000003, (%rdx)      # imm = 0x5000003
leaq 0x40(%rsp), %r8
movw $0x0, (%r8)
leaq 0xc(%rsp), %r9
movb $0x0, (%r9)
leaq 0x10(%rsp), %rdi
leaq 0x30(%rsp), %rsi
xorl %ecx, %ecx
callq 0x7f6c
cmpb $0x1, 0x13654(%rip)     # 0x17761
jne 0x4123
leaq 0x10(%rsp), %rdi
leaq 0x60(%rsp), %rsi
leaq 0x30(%rsp), %rdx
callq 0x71a8
leaq 0x10(%rsp), %rdi
leaq 0x30(%rsp), %rsi
callq 0x828a
leaq 0x20(%rsp), %rdx
movl $0x5040000, (%rdx)      # imm = 0x5040000
leaq 0xc(%rsp), %r9
movb $0xe, (%r9)
leaq 0x40(%rsp), %r8
movw $0x0, (%r8)
leaq 0x10(%rsp), %rdi
leaq 0x30(%rsp), %rsi
xorl %ecx, %ecx
callq 0x7daa
leaq 0x20(%rsp), %rdx
movl $0x5040001, (%rdx)      # imm = 0x5040001
leaq 0x1e(%rsp), %rcx
movb $0x2, (%rcx)
leaq 0x40(%rsp), %r8
movw $0x1, (%r8)
leaq 0xc(%rsp), %r9
movb $0x3, (%r9)
leaq 0x10(%rsp), %rdi
leaq 0x30(%rsp), %rsi
callq 0x7f6c
leaq 0x20(%rsp), %rdx
movl $0x5000001, (%rdx)      # imm = 0x5000001
leaq 0x40(%rsp), %r8
movw $0x0, (%r8)
leaq 0xc(%rsp), %r9
movb $0x0, (%r9)
leaq 0x10(%rsp), %rdi
leaq 0x30(%rsp), %rsi
xorl %ecx, %ecx
callq 0x7f6c
leaq 0x20(%rsp), %rdx
movl $0x5000002, (%rdx)      # imm = 0x5000002
leaq 0x40(%rsp), %r8
movw $0x0, (%r8)
leaq 0xc(%rsp), %r9
movb $0x0, (%r9)
leaq 0x10(%rsp), %rdi
leaq 0x30(%rsp), %rsi
xorl %ecx, %ecx
callq 0x7f6c
leaq 0x20(%rsp), %rdx
movl $0x5000003, (%rdx)      # imm = 0x5000003
leaq 0x40(%rsp), %r8
movw $0x0, (%r8)
leaq 0xc(%rsp), %r9
movb $0x0, (%r9)
leaq 0x10(%rsp), %rdi
leaq 0x30(%rsp), %rsi
xorl %ecx, %ecx
callq 0x7f6c
cmpb $0x1, 0x13533(%rip)     # 0x17762
jne 0x4245
leaq 0x10(%rsp), %rdi
leaq 0x60(%rsp), %rsi
leaq 0x30(%rsp), %rdx
callq 0x71a8
leaq 0x10(%rsp), %rdi
leaq 0x30(%rsp), %rsi
callq 0x828a
leaq 0x20(%rsp), %rdx
movl $0x5040000, (%rdx)      # imm = 0x5040000
leaq 0xc(%rsp), %r9
movb $0xe, (%r9)
leaq 0x40(%rsp), %r8
movw $0x0, (%r8)
leaq 0x10(%rsp), %rdi
leaq 0x30(%rsp), %rsi
xorl %ecx, %ecx
callq 0x7daa
leaq 0x20(%rsp), %rdx
movl $0x5040001, (%rdx)      # imm = 0x5040001
movb $0x3, %al
leaq 0x1e(%rsp), %rcx
movb %al, (%rcx)
leaq 0x40(%rsp), %r8
movw $0x1, (%r8)
leaq 0xc(%rsp), %r9
movb %al, (%r9)
leaq 0x10(%rsp), %rdi
leaq 0x30(%rsp), %rsi
callq 0x7f6c
leaq 0x20(%rsp), %rdx
movl $0x5000001, (%rdx)      # imm = 0x5000001
leaq 0x40(%rsp), %r8
movw $0x0, (%r8)
leaq 0xc(%rsp), %r9
movb $0x0, (%r9)
leaq 0x10(%rsp), %rdi
leaq 0x30(%rsp), %rsi
xorl %ecx, %ecx
callq 0x7f6c
leaq 0x20(%rsp), %rdx
movl $0x5000002, (%rdx)      # imm = 0x5000002
leaq 0x40(%rsp), %r8
movw $0x0, (%r8)
leaq 0xc(%rsp), %r9
movb $0x0, (%r9)
leaq 0x10(%rsp), %rdi
leaq 0x30(%rsp), %rsi
xorl %ecx, %ecx
callq 0x7f6c
leaq 0x20(%rsp), %rdx
movl $0x5000003, (%rdx)      # imm = 0x5000003
leaq 0x40(%rsp), %r8
movw $0x0, (%r8)
leaq 0xc(%rsp), %r9
movb $0x0, (%r9)
leaq 0x10(%rsp), %rdi
leaq 0x30(%rsp), %rsi
xorl %ecx, %ecx
callq 0x7f6c
cmpb $0x1, 0x13412(%rip)     # 0x17763
jne 0x4367
leaq 0x10(%rsp), %rdi
leaq 0x60(%rsp), %rsi
leaq 0x30(%rsp), %rdx
callq 0x71a8
leaq 0x10(%rsp), %rdi
leaq 0x30(%rsp), %rsi
callq 0x828a
leaq 0x20(%rsp), %rdx
movl $0x5040000, (%rdx)      # imm = 0x5040000
leaq 0xc(%rsp), %r9
movb $0xe, (%r9)
leaq 0x40(%rsp), %r8
movw $0x0, (%r8)
leaq 0x10(%rsp), %rdi
leaq 0x30(%rsp), %rsi
xorl %ecx, %ecx
callq 0x7daa
leaq 0x20(%rsp), %rdx
movl $0x5040001, (%rdx)      # imm = 0x5040001
leaq 0x1e(%rsp), %rcx
movb $0x7, (%rcx)
leaq 0x40(%rsp), %r8
movw $0x1, (%r8)
leaq 0xc(%rsp), %r9
movb $0x3, (%r9)
leaq 0x10(%rsp), %rdi
leaq 0x30(%rsp), %rsi
callq 0x7f6c
leaq 0x20(%rsp), %rdx
movl $0x5000001, (%rdx)      # imm = 0x5000001
leaq 0x40(%rsp), %r8
movw $0x0, (%r8)
leaq 0xc(%rsp), %r9
movb $0x0, (%r9)
leaq 0x10(%rsp), %rdi
leaq 0x30(%rsp), %rsi
xorl %ecx, %ecx
callq 0x7f6c
leaq 0x20(%rsp), %rdx
movl $0x5000002, (%rdx)      # imm = 0x5000002
leaq 0x40(%rsp), %r8
movw $0x0, (%r8)
leaq 0xc(%rsp), %r9
movb $0x0, (%r9)
leaq 0x10(%rsp), %rdi
leaq 0x30(%rsp), %rsi
xorl %ecx, %ecx
callq 0x7f6c
leaq 0x20(%rsp), %rdx
movl $0x5000003, (%rdx)      # imm = 0x5000003
leaq 0x40(%rsp), %r8
movw $0x0, (%r8)
leaq 0xc(%rsp), %r9
movb $0x0, (%r9)
leaq 0x10(%rsp), %rdi
leaq 0x30(%rsp), %rsi
xorl %ecx, %ecx
callq 0x7f6c
cmpb $0x1, 0x132f1(%rip)     # 0x17764
jne 0x4489
leaq 0x10(%rsp), %rdi
leaq 0x60(%rsp), %rsi
leaq 0x30(%rsp), %rdx
callq 0x71a8
leaq 0x10(%rsp), %rdi
leaq 0x30(%rsp), %rsi
callq 0x828a
leaq 0x40(%rsp), %rdx
movl $0x2040000, (%rdx)      # imm = 0x2040000
leaq 0x1e(%rsp), %r9
movb $0xe, (%r9)
leaq 0xc(%rsp), %r8
movw $0x0, (%r8)
leaq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rsi
xorl %ecx, %ecx
callq 0x7daa
leaq 0x40(%rsp), %rdx
movl $0x2040001, (%rdx)      # imm = 0x2040001
leaq 0xb(%rsp), %rcx
movb $0x0, (%rcx)
leaq 0xc(%rsp), %r8
movw $0x1, (%r8)
leaq 0x1e(%rsp), %r9
movb $0x3, (%r9)
leaq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rsi
callq 0x7f6c
leaq 0x40(%rsp), %rdx
movl $0x20dc001, (%rdx)      # imm = 0x20DC001
leaq 0xb(%rsp), %rcx
movb $0x0, (%rcx)
leaq 0xc(%rsp), %r8
movw $0x1, (%r8)
leaq 0x1e(%rsp), %r9
movb $0x3, (%r9)
leaq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rsi
callq 0x7f6c
leaq 0x40(%rsp), %rdx
movl $0x20dc002, (%rdx)      # imm = 0x20DC002
leaq 0xb(%rsp), %rcx
movb $0x0, (%rcx)
leaq 0xc(%rsp), %r8
movw $0x1, (%r8)
leaq 0x1e(%rsp), %r9
movb $0x3, (%r9)
leaq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rsi
callq 0x7f6c
leaq 0x40(%rsp), %rdx
movl $0x20dc003, (%rdx)      # imm = 0x20DC003
leaq 0xb(%rsp), %rcx
movb $0x0, (%rcx)
leaq 0xc(%rsp), %r8
movw $0x1, (%r8)
leaq 0x1e(%rsp), %r9
movb $0x3, (%r9)
leaq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rsi
callq 0x7f6c
leaq 0x40(%rsp), %rdx
movl $0x20dc001, (%rdx)      # imm = 0x20DC001
leaq 0xb(%rsp), %rcx
movb $0x1, (%rcx)
leaq 0xc(%rsp), %r8
movw $0x1, (%r8)
leaq 0x1e(%rsp), %r9
movb $0x3, (%r9)
leaq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rsi
callq 0x7f6c
leaq 0x40(%rsp), %rdx
movl $0x20dc002, (%rdx)      # imm = 0x20DC002
leaq 0xb(%rsp), %rcx
movb $0x1, (%rcx)
leaq 0xc(%rsp), %r8
movw $0x1, (%r8)
leaq 0x1e(%rsp), %r9
movb $0x3, (%r9)
leaq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rsi
callq 0x7f6c
leaq 0x40(%rsp), %rdx
movl $0x20dc003, (%rdx)      # imm = 0x20DC003
leaq 0xb(%rsp), %rcx
movb $0x1, (%rcx)
leaq 0xc(%rsp), %r8
movw $0x1, (%r8)
leaq 0x1e(%rsp), %r9
movb $0x3, (%r9)
leaq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rsi
callq 0x7f6c
leaq 0x10(%rsp), %rdi
leaq 0x60(%rsp), %rsi
leaq 0x20(%rsp), %rdx
callq 0x71a8
leaq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rsi
callq 0x828a
leaq 0xc(%rsp), %rdx
movl $0xe040000, (%rdx)      # imm = 0xE040000
leaq 0xb(%rsp), %r9
movb $0xe, (%r9)
leaq 0x1e(%rsp), %r8
movw $0x0, (%r8)
leaq 0x10(%rsp), %rdi
leaq 0x40(%rsp), %rsi
xorl %ecx, %ecx
callq 0x7daa
leaq 0xc(%rsp), %rdx
movl $0xe040001, (%rdx)      # imm = 0xE040001
leaq 0x6f(%rsp), %rcx
movb $0x0, (%rcx)
leaq 0x1e(%rsp), %r8
movw $0x1, (%r8)
leaq 0xb(%rsp), %r9
movb $0x3, (%r9)
leaq 0x10(%rsp), %rdi
leaq 0x40(%rsp), %rsi
callq 0x7f6c
leaq 0xc(%rsp), %rdx
movl $0xe04101b, (%rdx)      # imm = 0xE04101B
leaq 0x1e(%rsp), %r8
movw $0x0, (%r8)
leaq 0xb(%rsp), %r9
movb $0x0, (%r9)
leaq 0x10(%rsp), %rdi
leaq 0x40(%rsp), %rsi
xorl %ecx, %ecx
callq 0x7f6c
leaq 0xc(%rsp), %rdx
movl $0xe00000c, (%rdx)      # imm = 0xE00000C
leaq 0x1e(%rsp), %r8
movw $0x0, (%r8)
leaq 0xb(%rsp), %r9
movb $0x0, (%r9)
leaq 0x10(%rsp), %rdi
leaq 0x40(%rsp), %rsi
xorl %ecx, %ecx
callq 0x7f6c
leaq 0xc(%rsp), %rdx
movl $0xe00000d, (%rdx)      # imm = 0xE00000D
leaq 0x1e(%rsp), %r8
movw $0x0, (%r8)
leaq 0xb(%rsp), %r9
movb $0x0, (%r9)
leaq 0x10(%rsp), %rdi
leaq 0x40(%rsp), %rsi
xorl %ecx, %ecx
callq 0x7f6c
leaq 0xc(%rsp), %rdx
movl $0xe00000e, (%rdx)      # imm = 0xE00000E
leaq 0x1e(%rsp), %r8
movw $0x0, (%r8)
leaq 0xb(%rsp), %r9
movb $0x0, (%r9)
leaq 0x10(%rsp), %rdi
leaq 0x40(%rsp), %rsi
xorl %ecx, %ecx
callq 0x7f6c
cmpb $0x1, 0x12fce(%rip)     # 0x17760
jne 0x47a8
leaq 0x10(%rsp), %rdi
leaq 0x60(%rsp), %rsi
leaq 0x40(%rsp), %rdx
callq 0x71a8
leaq 0x10(%rsp), %rdi
leaq 0x40(%rsp), %rsi
callq 0x828a
jmp 0x489f
leaq 0xf2a0(%rip), %rdi      # 0x13a63
callq 0x2220
leaq 0x30(%rsp), %rdx
movl $0x1, (%rdx)
leaq 0x40(%rsp), %r9
movb $0xe, (%r9)
leaq 0x20(%rsp), %r8
movw $0x0, (%r8)
leaq 0x10(%rsp), %rdi
leaq 0x50(%rsp), %rsi
xorl %ecx, %ecx
callq 0x7daa
leaq 0x30(%rsp), %r14
movl $0x2, (%r14)
leaq 0x12dd5(%rip), %r15     # 0x175e0
movq %r15, %rdi
callq 0x20b0
leaq 0x20(%rsp), %r8
movw %ax, (%r8)
leaq 0x40(%rsp), %r9
movb $0xd, (%r9)
leaq 0x10(%rsp), %rdi
leaq 0x50(%rsp), %rsi
movq %r14, %rdx
movq %r15, %rcx
callq 0x7f6c
leaq 0x30(%rsp), %r14
movl $0x3, (%r14)
leaq 0x12e13(%rip), %r15     # 0x17660
movq %r15, %rdi
callq 0x20b0
leaq 0x20(%rsp), %r8
movw %ax, (%r8)
leaq 0x40(%rsp), %r9
movb $0xd, (%r9)
leaq 0x10(%rsp), %rdi
leaq 0x50(%rsp), %rsi
movq %r14, %rdx
movq %r15, %rcx
callq 0x7f6c
leaq 0x10(%rsp), %rdi
leaq 0x60(%rsp), %rsi
leaq 0x50(%rsp), %rdx
callq 0x71a8
leaq 0x10(%rsp), %rdi
leaq 0x50(%rsp), %rsi
callq 0x828a
movq 0x67(%rsp), %rdx
movzwl 0x65(%rsp), %ecx
leaq 0x10(%rsp), %rdi
movq %rbx, %rsi
movl $0x1, %r8d
callq 0x74c4
leaq 0x10(%rsp), %rdi
leaq 0x60(%rsp), %rsi
callq 0x828a
leaq 0xf1a9(%rip), %rdi      # 0x13a7b
callq 0x2220
leaq 0x10(%rsp), %rdi
callq 0x73e8
xorl %eax, %eax
addq $0x70, %rsp
popq %rbx
popq %r14
popq %r15
retq
jmp 0x496b
jmp 0x496b
jmp 0x496b
jmp 0x496b
jmp 0x496b
jmp 0x496b
jmp 0x496b
jmp 0x496b
jmp 0x496b
jmp 0x496b
jmp 0x496b
jmp 0x496b
jmp 0x496b
jmp 0x496b
jmp 0x496b
jmp 0x496b
jmp 0x496b
jmp 0x496b
jmp 0x496b
jmp 0x496b
jmp 0x496b
jmp 0x496b
jmp 0x496b
jmp 0x496b
jmp 0x496b
jmp 0x496b
jmp 0x496b
jmp 0x496b
jmp 0x496b
jmp 0x496b
jmp 0x496b
jmp 0x496b
jmp 0x496b
jmp 0x496b
jmp 0x496b
jmp 0x496b
jmp 0x496b
jmp 0x496b
jmp 0x496b
jmp 0x496b
jmp 0x496b
jmp 0x496b
jmp 0x496b
jmp 0x496b
jmp 0x496b
jmp 0x496b
jmp 0x496b
jmp 0x496b
jmp 0x496b
jmp 0x496b
jmp 0x496b
jmp 0x496b
jmp 0x496b
jmp 0x496b
jmp 0x496b
jmp 0x496b
jmp 0x496b
jmp 0x496b
jmp 0x496b
jmp 0x496b
jmp 0x496b
jmp 0x496b
jmp 0x496b
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x73e8
movq %rbx, %rdi
callq 0x2290