// File: 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:
subq $0x1a8, %rsp            # imm = 0x1A8
movq %rdi, 0x1a0(%rsp)
leaq 0x198(%rsp), %rdi
movq %rdi, 0x8(%rsp)
callq 0xadf0
movq 0x8(%rsp), %rdi
movl $0x0, 0x184(%rsp)
leaq 0x189(%rsp), %rsi
leaq 0x184(%rsp), %rdx
callq 0x8d50
jmp 0x4278
cmpl $0x0, 0x227b5(%rip)     # 0x26a34
jne 0x4382
leaq 0x1d065(%rip), %rdi     # 0x212f1
xorl %eax, %eax
callq 0x2040
jmp 0x4295
movl $0x1, 0x160(%rsp)
leaq 0x198(%rsp), %rdi
leaq 0x165(%rsp), %rsi
leaq 0x160(%rsp), %rdx
callq 0x8d50
jmp 0x42bf
movl $0x2, 0x15c(%rsp)
leaq 0x2234f(%rip), %rcx     # 0x26620
leaq 0x198(%rsp), %rdi
leaq 0x165(%rsp), %rsi
leaq 0x15c(%rsp), %rdx
callq 0x8ff0
jmp 0x42f0
movl $0x3, 0x158(%rsp)
leaq 0x2239e(%rip), %rcx     # 0x266a0
leaq 0x198(%rsp), %rdi
leaq 0x165(%rsp), %rsi
leaq 0x158(%rsp), %rdx
callq 0x8ff0
jmp 0x4321
leaq 0x198(%rsp), %rdi
leaq 0x189(%rsp), %rsi
leaq 0x165(%rsp), %rdx
callq 0x8de0
jmp 0x4340
leaq 0x198(%rsp), %rdi
leaq 0x165(%rsp), %rsi
callq 0x8eb0
jmp 0x4357
jmp 0x4e90
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x178(%rsp)
movl %eax, 0x174(%rsp)
leaq 0x198(%rsp), %rdi
callq 0xae10
jmp 0x4efb
movl $0x1000001, 0x154(%rsp) # imm = 0x1000001
leaq 0x198(%rsp), %rdi
leaq 0x189(%rsp), %rsi
leaq 0x154(%rsp), %rdx
callq 0x9070
jmp 0x43ac
movl $0x1000005, 0x150(%rsp) # imm = 0x1000005
leaq 0x198(%rsp), %rdi
leaq 0x189(%rsp), %rsi
leaq 0x150(%rsp), %rdx
callq 0x9070
jmp 0x43d6
movl $0x1000002, 0x14c(%rsp) # imm = 0x1000002
leaq 0x198(%rsp), %rdi
leaq 0x189(%rsp), %rsi
leaq 0x14c(%rsp), %rdx
callq 0x9070
jmp 0x4400
movl $0x1000003, 0x148(%rsp) # imm = 0x1000003
leaq 0x198(%rsp), %rdi
leaq 0x189(%rsp), %rsi
leaq 0x148(%rsp), %rdx
callq 0x9070
jmp 0x442a
movl $0x1000004, 0x144(%rsp) # imm = 0x1000004
leaq 0x198(%rsp), %rdi
leaq 0x189(%rsp), %rsi
leaq 0x144(%rsp), %rdx
callq 0x9070
jmp 0x4454
movl $0x1000073, 0x140(%rsp) # imm = 0x1000073
leaq 0x198(%rsp), %rdi
leaq 0x189(%rsp), %rsi
leaq 0x140(%rsp), %rdx
callq 0x9070
jmp 0x447e
cmpl $0x0, 0x2238f(%rip)     # 0x26814
jne 0x44bb
movl $0x100008b, 0x13c(%rsp) # imm = 0x100008B
leaq 0x198(%rsp), %rdi
leaq 0x189(%rsp), %rsi
leaq 0x13c(%rsp), %rdx
callq 0x9070
jmp 0x44b1
movl $0x1, 0x22359(%rip)     # 0x26814
movl $0x3040000, 0x128(%rsp) # imm = 0x3040000
leaq 0x198(%rsp), %rdi
leaq 0x12d(%rsp), %rsi
leaq 0x128(%rsp), %rdx
callq 0x8d50
jmp 0x44e5
movl $0x3040001, 0x124(%rsp) # imm = 0x3040001
movb $0x0, 0x123(%rsp)
leaq 0x198(%rsp), %rdi
leaq 0x12d(%rsp), %rsi
leaq 0x124(%rsp), %rdx
leaq 0x123(%rsp), %rcx
callq 0x90c0
jmp 0x451f
movl $0x3000001, 0x11c(%rsp) # imm = 0x3000001
leaq 0x198(%rsp), %rdi
leaq 0x12d(%rsp), %rsi
leaq 0x11c(%rsp), %rdx
callq 0x9070
jmp 0x4549
movl $0x3000002, 0x118(%rsp) # imm = 0x3000002
leaq 0x198(%rsp), %rdi
leaq 0x12d(%rsp), %rsi
leaq 0x118(%rsp), %rdx
callq 0x9070
jmp 0x4573
movl $0x3000003, 0x114(%rsp) # imm = 0x3000003
leaq 0x198(%rsp), %rdi
leaq 0x12d(%rsp), %rsi
leaq 0x114(%rsp), %rdx
callq 0x9070
jmp 0x459d
leaq 0x198(%rsp), %rdi
leaq 0x189(%rsp), %rsi
leaq 0x12d(%rsp), %rdx
callq 0x8de0
jmp 0x45bc
leaq 0x198(%rsp), %rdi
leaq 0x12d(%rsp), %rsi
callq 0x8eb0
jmp 0x45d3
movb 0x221d0(%rip), %al      # 0x267a9
movb %al, 0x113(%rsp)
movl $0x5040000, 0x100(%rsp) # imm = 0x5040000
leaq 0x198(%rsp), %rdi
leaq 0x104(%rsp), %rsi
leaq 0x100(%rsp), %rdx
callq 0x8d50
jmp 0x460a
movl $0x5040001, 0xfc(%rsp) # imm = 0x5040001
leaq 0x198(%rsp), %rdi
leaq 0x104(%rsp), %rsi
leaq 0xfc(%rsp), %rdx
leaq 0x113(%rsp), %rcx
callq 0x90c0
jmp 0x463c
movl $0x5000001, 0xf8(%rsp) # imm = 0x5000001
leaq 0x198(%rsp), %rdi
leaq 0x104(%rsp), %rsi
leaq 0xf8(%rsp), %rdx
callq 0x9070
jmp 0x4666
movl $0x5000002, 0xf4(%rsp) # imm = 0x5000002
leaq 0x198(%rsp), %rdi
leaq 0x104(%rsp), %rsi
leaq 0xf4(%rsp), %rdx
callq 0x9070
jmp 0x4690
movl $0x5000003, 0xf0(%rsp) # imm = 0x5000003
leaq 0x198(%rsp), %rdi
leaq 0x104(%rsp), %rsi
leaq 0xf0(%rsp), %rdx
callq 0x9070
jmp 0x46ba
movl $0x5000011, 0xec(%rsp) # imm = 0x5000011
leaq 0x198(%rsp), %rdi
leaq 0x104(%rsp), %rsi
leaq 0xec(%rsp), %rdx
callq 0x9070
jmp 0x46e4
movl $0x5000012, 0xe8(%rsp) # imm = 0x5000012
leaq 0x198(%rsp), %rdi
leaq 0x104(%rsp), %rsi
leaq 0xe8(%rsp), %rdx
callq 0x9070
jmp 0x470e
movl $0x5000013, 0xe4(%rsp) # imm = 0x5000013
leaq 0x198(%rsp), %rdi
leaq 0x104(%rsp), %rsi
leaq 0xe4(%rsp), %rdx
callq 0x9070
jmp 0x4738
leaq 0x198(%rsp), %rdi
leaq 0x189(%rsp), %rsi
leaq 0x104(%rsp), %rdx
callq 0x8de0
jmp 0x4757
leaq 0x198(%rsp), %rdi
leaq 0x104(%rsp), %rsi
callq 0x8eb0
jmp 0x476e
movl $0x5040000, 0xe0(%rsp) # imm = 0x5040000
leaq 0x198(%rsp), %rdi
leaq 0x104(%rsp), %rsi
leaq 0xe0(%rsp), %rdx
callq 0x8d50
jmp 0x4798
movl $0x5040001, 0xdc(%rsp) # imm = 0x5040001
movb $0x1, 0xdb(%rsp)
leaq 0x198(%rsp), %rdi
leaq 0x104(%rsp), %rsi
leaq 0xdc(%rsp), %rdx
leaq 0xdb(%rsp), %rcx
callq 0x90c0
jmp 0x47d2
movl $0x5000001, 0xd4(%rsp) # imm = 0x5000001
leaq 0x198(%rsp), %rdi
leaq 0x104(%rsp), %rsi
leaq 0xd4(%rsp), %rdx
callq 0x9070
jmp 0x47fc
movl $0x5000002, 0xd0(%rsp) # imm = 0x5000002
leaq 0x198(%rsp), %rdi
leaq 0x104(%rsp), %rsi
leaq 0xd0(%rsp), %rdx
callq 0x9070
jmp 0x4826
movl $0x5000003, 0xcc(%rsp) # imm = 0x5000003
leaq 0x198(%rsp), %rdi
leaq 0x104(%rsp), %rsi
leaq 0xcc(%rsp), %rdx
callq 0x9070
jmp 0x4850
testb $0x1, 0x21f4a(%rip)     # 0x267a1
je 0x487a
leaq 0x198(%rsp), %rdi
leaq 0x189(%rsp), %rsi
leaq 0x104(%rsp), %rdx
callq 0x8de0
jmp 0x4878
jmp 0x487a
leaq 0x198(%rsp), %rdi
leaq 0x104(%rsp), %rsi
callq 0x8eb0
jmp 0x4891
movl $0x5040000, 0xc8(%rsp) # imm = 0x5040000
leaq 0x198(%rsp), %rdi
leaq 0x104(%rsp), %rsi
leaq 0xc8(%rsp), %rdx
callq 0x8d50
jmp 0x48bb
movl $0x5040001, 0xc4(%rsp) # imm = 0x5040001
movb $0x2, 0xc3(%rsp)
leaq 0x198(%rsp), %rdi
leaq 0x104(%rsp), %rsi
leaq 0xc4(%rsp), %rdx
leaq 0xc3(%rsp), %rcx
callq 0x90c0
jmp 0x48f5
movl $0x5000001, 0xbc(%rsp) # imm = 0x5000001
leaq 0x198(%rsp), %rdi
leaq 0x104(%rsp), %rsi
leaq 0xbc(%rsp), %rdx
callq 0x9070
jmp 0x491f
movl $0x5000002, 0xb8(%rsp) # imm = 0x5000002
leaq 0x198(%rsp), %rdi
leaq 0x104(%rsp), %rsi
leaq 0xb8(%rsp), %rdx
callq 0x9070
jmp 0x4949
movl $0x5000003, 0xb4(%rsp) # imm = 0x5000003
leaq 0x198(%rsp), %rdi
leaq 0x104(%rsp), %rsi
leaq 0xb4(%rsp), %rdx
callq 0x9070
jmp 0x4973
testb $0x1, 0x21e28(%rip)     # 0x267a2
je 0x499d
leaq 0x198(%rsp), %rdi
leaq 0x189(%rsp), %rsi
leaq 0x104(%rsp), %rdx
callq 0x8de0
jmp 0x499b
jmp 0x499d
leaq 0x198(%rsp), %rdi
leaq 0x104(%rsp), %rsi
callq 0x8eb0
jmp 0x49b4
movl $0x5040000, 0xb0(%rsp) # imm = 0x5040000
leaq 0x198(%rsp), %rdi
leaq 0x104(%rsp), %rsi
leaq 0xb0(%rsp), %rdx
callq 0x8d50
jmp 0x49de
movl $0x5040001, 0xac(%rsp) # imm = 0x5040001
movb $0x3, 0xab(%rsp)
leaq 0x198(%rsp), %rdi
leaq 0x104(%rsp), %rsi
leaq 0xac(%rsp), %rdx
leaq 0xab(%rsp), %rcx
callq 0x90c0
jmp 0x4a18
movl $0x5000001, 0xa4(%rsp) # imm = 0x5000001
leaq 0x198(%rsp), %rdi
leaq 0x104(%rsp), %rsi
leaq 0xa4(%rsp), %rdx
callq 0x9070
jmp 0x4a42
movl $0x5000002, 0xa0(%rsp) # imm = 0x5000002
leaq 0x198(%rsp), %rdi
leaq 0x104(%rsp), %rsi
leaq 0xa0(%rsp), %rdx
callq 0x9070
jmp 0x4a6c
movl $0x5000003, 0x9c(%rsp) # imm = 0x5000003
leaq 0x198(%rsp), %rdi
leaq 0x104(%rsp), %rsi
leaq 0x9c(%rsp), %rdx
callq 0x9070
jmp 0x4a96
testb $0x1, 0x21d06(%rip)     # 0x267a3
je 0x4ac0
leaq 0x198(%rsp), %rdi
leaq 0x189(%rsp), %rsi
leaq 0x104(%rsp), %rdx
callq 0x8de0
jmp 0x4abe
jmp 0x4ac0
leaq 0x198(%rsp), %rdi
leaq 0x104(%rsp), %rsi
callq 0x8eb0
jmp 0x4ad7
movl $0x5040000, 0x98(%rsp) # imm = 0x5040000
leaq 0x198(%rsp), %rdi
leaq 0x104(%rsp), %rsi
leaq 0x98(%rsp), %rdx
callq 0x8d50
jmp 0x4b01
movl $0x5040001, 0x94(%rsp) # imm = 0x5040001
movb $0x7, 0x93(%rsp)
leaq 0x198(%rsp), %rdi
leaq 0x104(%rsp), %rsi
leaq 0x94(%rsp), %rdx
leaq 0x93(%rsp), %rcx
callq 0x90c0
jmp 0x4b3b
movl $0x5000001, 0x8c(%rsp) # imm = 0x5000001
leaq 0x198(%rsp), %rdi
leaq 0x104(%rsp), %rsi
leaq 0x8c(%rsp), %rdx
callq 0x9070
jmp 0x4b65
movl $0x5000002, 0x88(%rsp) # imm = 0x5000002
leaq 0x198(%rsp), %rdi
leaq 0x104(%rsp), %rsi
leaq 0x88(%rsp), %rdx
callq 0x9070
jmp 0x4b8f
movl $0x5000003, 0x84(%rsp) # imm = 0x5000003
leaq 0x198(%rsp), %rdi
leaq 0x104(%rsp), %rsi
leaq 0x84(%rsp), %rdx
callq 0x9070
jmp 0x4bb9
testb $0x1, 0x21be4(%rip)     # 0x267a4
je 0x4be3
leaq 0x198(%rsp), %rdi
leaq 0x189(%rsp), %rsi
leaq 0x104(%rsp), %rdx
callq 0x8de0
jmp 0x4be1
jmp 0x4be3
leaq 0x198(%rsp), %rdi
leaq 0x104(%rsp), %rsi
callq 0x8eb0
jmp 0x4bfa
movl $0x2040000, 0x70(%rsp)  # imm = 0x2040000
leaq 0x198(%rsp), %rdi
leaq 0x75(%rsp), %rsi
leaq 0x70(%rsp), %rdx
callq 0x8d50
jmp 0x4c1b
movl $0x2040001, 0x6c(%rsp)  # imm = 0x2040001
movb $0x0, 0x6b(%rsp)
leaq 0x198(%rsp), %rdi
leaq 0x75(%rsp), %rsi
leaq 0x6c(%rsp), %rdx
leaq 0x6b(%rsp), %rcx
callq 0x90c0
jmp 0x4c46
movl $0x20dc001, 0x64(%rsp)  # imm = 0x20DC001
movb $0x0, 0x63(%rsp)
leaq 0x198(%rsp), %rdi
leaq 0x75(%rsp), %rsi
leaq 0x64(%rsp), %rdx
leaq 0x63(%rsp), %rcx
callq 0x90c0
jmp 0x4c71
movl $0x20dc002, 0x5c(%rsp)  # imm = 0x20DC002
movb $0x0, 0x5b(%rsp)
leaq 0x198(%rsp), %rdi
leaq 0x75(%rsp), %rsi
leaq 0x5c(%rsp), %rdx
leaq 0x5b(%rsp), %rcx
callq 0x90c0
jmp 0x4c9c
movl $0x20dc003, 0x54(%rsp)  # imm = 0x20DC003
movb $0x0, 0x53(%rsp)
leaq 0x198(%rsp), %rdi
leaq 0x75(%rsp), %rsi
leaq 0x54(%rsp), %rdx
leaq 0x53(%rsp), %rcx
callq 0x90c0
jmp 0x4cc7
movl $0x20dc001, 0x4c(%rsp)  # imm = 0x20DC001
movb $0x1, 0x4b(%rsp)
leaq 0x198(%rsp), %rdi
leaq 0x75(%rsp), %rsi
leaq 0x4c(%rsp), %rdx
leaq 0x4b(%rsp), %rcx
callq 0x90c0
jmp 0x4cf2
movl $0x20dc002, 0x44(%rsp)  # imm = 0x20DC002
movb $0x1, 0x43(%rsp)
leaq 0x198(%rsp), %rdi
leaq 0x75(%rsp), %rsi
leaq 0x44(%rsp), %rdx
leaq 0x43(%rsp), %rcx
callq 0x90c0
jmp 0x4d1d
movl $0x20dc003, 0x3c(%rsp)  # imm = 0x20DC003
movb $0x1, 0x3b(%rsp)
leaq 0x198(%rsp), %rdi
leaq 0x75(%rsp), %rsi
leaq 0x3c(%rsp), %rdx
leaq 0x3b(%rsp), %rcx
callq 0x90c0
jmp 0x4d48
leaq 0x198(%rsp), %rdi
leaq 0x189(%rsp), %rsi
leaq 0x75(%rsp), %rdx
callq 0x8de0
jmp 0x4d64
leaq 0x198(%rsp), %rdi
leaq 0x75(%rsp), %rsi
callq 0x8eb0
jmp 0x4d78
movl $0xe040000, 0x28(%rsp)  # imm = 0xE040000
leaq 0x198(%rsp), %rdi
leaq 0x2c(%rsp), %rsi
leaq 0x28(%rsp), %rdx
callq 0x8d50
jmp 0x4d99
movl $0xe040001, 0x24(%rsp)  # imm = 0xE040001
movb $0x0, 0x23(%rsp)
leaq 0x198(%rsp), %rdi
leaq 0x2c(%rsp), %rsi
leaq 0x24(%rsp), %rdx
leaq 0x23(%rsp), %rcx
callq 0x90c0
jmp 0x4dc4
movl $0xe04101b, 0x1c(%rsp)  # imm = 0xE04101B
leaq 0x198(%rsp), %rdi
leaq 0x2c(%rsp), %rsi
leaq 0x1c(%rsp), %rdx
callq 0x9070
jmp 0x4de5
movl $0xe00000c, 0x18(%rsp)  # imm = 0xE00000C
leaq 0x198(%rsp), %rdi
leaq 0x2c(%rsp), %rsi
leaq 0x18(%rsp), %rdx
callq 0x9070
jmp 0x4e06
movl $0xe00000d, 0x14(%rsp)  # imm = 0xE00000D
leaq 0x198(%rsp), %rdi
leaq 0x2c(%rsp), %rsi
leaq 0x14(%rsp), %rdx
callq 0x9070
jmp 0x4e27
movl $0xe00000e, 0x10(%rsp)  # imm = 0xE00000E
leaq 0x198(%rsp), %rdi
leaq 0x2c(%rsp), %rsi
leaq 0x10(%rsp), %rdx
callq 0x9070
jmp 0x4e48
testb $0x1, 0x21951(%rip)     # 0x267a0
je 0x4e6f
leaq 0x198(%rsp), %rdi
leaq 0x189(%rsp), %rsi
leaq 0x2c(%rsp), %rdx
callq 0x8de0
jmp 0x4e6d
jmp 0x4e6f
leaq 0x198(%rsp), %rdi
leaq 0x2c(%rsp), %rsi
callq 0x8eb0
jmp 0x4e83
cmpl $0x2, 0x2198a(%rip)     # 0x26814
jne 0x4e8e
jmp 0x4e8e
jmp 0x4e90
movq 0x1a0(%rsp), %rsi
movq 0x190(%rsp), %rdx
movzwl 0x18e(%rsp), %ecx
leaq 0x198(%rsp), %rdi
movl $0x1, %r8d
callq 0xb040
jmp 0x4ebd
leaq 0x198(%rsp), %rdi
leaq 0x189(%rsp), %rsi
callq 0x8eb0
jmp 0x4ed4
leaq 0x1c42f(%rip), %rdi     # 0x2130a
xorl %eax, %eax
callq 0x2040
jmp 0x4ee4
leaq 0x198(%rsp), %rdi
callq 0xae10
xorl %eax, %eax
addq $0x1a8, %rsp            # imm = 0x1A8
retq
movq 0x178(%rsp), %rdi
callq 0x2300
nopl (%rax,%rax)