// File: xbai0624[P]dnn/src/UnitTest.cpp
// Function: UnitTest::TestCNNToCNN()
void UnitTest::TestCNNToCNN()
{
    // 1) Data interface, this is a tool class, for data prepare
    DataInterface *data_interface = new DataInterface("unit_test_data/data_signal.dat", "unit_test_data/data_cosmic.dat", LayerDimension::_2D);

    // 3) input layer   ID=0
    LayerParameterList p_list0(LayerType::input, LayerDimension::_2D, data_interface, 0, 0, 
            std::pair<size_t, size_t>(0, 0), 0, false, 0, 0, Regularization::Undefined, 0, ActuationFuncType::Undefined, TrainingType::NewTraining, false);
    Layer* layer_input = new ConstructLayer(p_list0);
    layer_input->Init();

    // 4) middle layer 1 : cnn layer ID=1
    LayerParameterList p_list1(LayerType::cnn, LayerDimension::_2D, data_interface, 0, 2, 
            std::pair<size_t, size_t>(2, 2), 0.1, false, 0, 0.5, Regularization::L2, 0.1, ActuationFuncType::Relu, TrainingType::NewTraining, false);
    Layer *l1 = new ConstructLayer(p_list1);
    l1->SetPrevLayer(layer_input);
    l1->Init();

    // 4) middle layer 1 : fc layer ID=6
    LayerParameterList p_list6(LayerType::cnn, LayerDimension::_2D, data_interface, 0, 2, 
            std::pair<size_t, size_t>(2, 2), 0.1, false, 0, 0.5, Regularization::L2, 0.1, ActuationFuncType::Relu, TrainingType::NewTraining, false);
    Layer *l6 = new ConstructLayer(p_list6);
    l6->SetPrevLayer(l1);
    l6->Init();

    // 5) output layer ID = 7
    LayerParameterList p_list_output(LayerType::output, LayerDimension::_1D, data_interface, 2, 0, 
            std::pair<size_t, size_t>(0, 0), 0.1, false, 0, 0., Regularization::L2, 0.1, ActuationFuncType::SoftMax, TrainingType::NewTraining, false);
    Layer* layer_output = new ConstructLayer(p_list_output);
    layer_output -> SetPrevLayer(l6);
    layer_output -> Init();

    // 6) connect all layers; SetNextLayer must be after all layers have finished initialization
    //                        input layer not needed to set, input layer has no update on w & b
    //                        input layer is just for data transfer (prepare)
    l1->SetNextLayer(l6);
    //l2->SetNextLayer(l3);
    l6->SetNextLayer(layer_output); // This line is ugly, to be improved


    // step 2: forward propagate
    data_interface -> Reset();
    layer_input->EpochInit();
    l1->EpochInit();
    l6->EpochInit();
    layer_output->EpochInit();

    //layer_input->BatchInit();
    l1->BatchInit();
    l6->BatchInit();
    layer_output->BatchInit();


    data_interface->GetNewBatchData();
    data_interface->GetNewBatchLabel();
    layer_input -> FillBatchDataToInputLayerA();


    // helper functions
    auto print_a_images = [&](Layer *l)
    {
        // print a images
        cout<<"XXXXXX::'A' images from layer: "<<l->GetID()<<endl;
        auto & images = l->GetImagesFullA();
        int sample_IIID = 0;
        for(auto &i: images)
        {
            cout<<"---------------------- sample id: "<<sample_IIID<<endl;
            int kernel_id = 0;
            for(auto &j: i.OutputImageFromKernel)
            {
                cout<<"----kernel id: "<<kernel_id<<endl;
                cout<<j<<endl;
                kernel_id++;
            }
            sample_IIID++;
        }
    };
    auto print_z_images = [&](Layer *l)
    {
        // print a images
        cout<<"XXXXXX::'Z' images from layer: "<<l->GetID()<<endl;
        auto & images = l->GetImagesFullZ();
        int sample_IIID = 0;
        for(auto &i: images)
        {
            cout<<"---------------------- sample id: "<<sample_IIID<<endl;
            int kernel_id = 0;
            for(auto &j: i.OutputImageFromKernel)
            {
                cout<<"----kernel id: "<<kernel_id<<endl;
                cout<<j<<endl;
                kernel_id++;
            }
            sample_IIID++;
        }
    };


    auto print_W_B_images = [&](Layer *l)
    {
        // print a images
        cout<<"XXXXXX::W&B matrix from layer: "<<l->GetID()<<endl;
        auto w_images = l->GetWeightMatrixOriginal();
        auto b_images = l->GetBiasVectorOriginal();
        assert((*w_images).size() == (*b_images).size());

        for(size_t kernel = 0;kernel<(*w_images).size();kernel++)
        {
            cout<<"----kernel id: "<<kernel<<endl;
            cout<<"w"<<kernel<<":"<<endl;
            cout<<(*w_images)[kernel]<<endl;
            cout<<"b"<<kernel<<":"<<endl;
            cout<<(*b_images)[kernel]<<endl;
        }
    };

    // forward propagation
    int sample_size = data_interface->GetBatchSize();
    for(int i=0;i<sample_size;i++)
    {
        l1->ForwardPropagate_Z_ForSample(i);
        l1->ForwardPropagate_SigmaPrimeAndA_ForSample(i);

        l6->ForwardPropagate_Z_ForSample(i);
        l6->ForwardPropagate_SigmaPrimeAndA_ForSample(i);

        layer_output->ForwardPropagate_Z_ForSample(i);
        layer_output->ForwardPropagate_SigmaPrimeAndA_ForSample(i);
    }

    cout<<"ooooooooo000000000oooooooooo000000000ooooooooooo00000000oooooooooo0000000000000ooooooooooooo"<<endl;
    print_a_images(l1);
    print_z_images(l1);
    //print_a_images(l6);
    //print_z_images(l6);


    // backward propagation
    for(int i=0;i<sample_size;i++)
    {
        // must inverse order
        layer_output->BackwardPropagateForSample(i);
        l6->BackwardPropagateForSample(i);
        l1->BackwardPropagateForSample(i);
    }

    auto print_delta_images = [&](Layer *l)
    {
        // print a images
        cout<<"XXXXXX::'Delta' images from layer: "<<l->GetID()<<endl;
        auto & images = l->GetImagesFullDelta();
        int sample_IIID = 0;
        for(auto &i: images)
        {
            cout<<"---------------------- sample id: "<<sample_IIID<<endl;
            int kernel_id = 0;
            for(auto &j: i.OutputImageFromKernel)
            {
                cout<<"----kernel id: "<<kernel_id<<endl;
                cout<<j<<endl;
                kernel_id++;
            }
            sample_IIID++;
        }
    };

    auto print_sigmaPrime_images = [&](Layer *l)
    {
        // print a images
        cout<<"XXXXXX::'SigmaPrime' images from layer: "<<l->GetID()<<endl;
        auto & images = l->GetImagesFullSigmaPrime();
        int sample_IIID = 0;
        for(auto &i: images)
        {
            cout<<"---------------------- sample id: "<<sample_IIID<<endl;
            int kernel_id = 0;
            for(auto &j: i.OutputImageFromKernel)
            {
                cout<<"----kernel id: "<<kernel_id<<endl;
                cout<<j<<endl;
                kernel_id++;
            }
            sample_IIID++;
        }
    };

    cout<<"ooooooooo000000000oooooooooo000000000ooooooooooo00000000oooooooooo0000000000000ooooooooooooo"<<endl;
    print_delta_images(l6);
    cout<<"ooooooooo000000000oooooooooo000000000ooooooooooo00000000oooooooooo0000000000000ooooooooooooo"<<endl;
    print_W_B_images(l6); 
    cout<<"ooooooooo000000000oooooooooo000000000ooooooooooo00000000oooooooooo0000000000000ooooooooooooo"<<endl;
    //print_a_images(l6);
    cout<<"ooooooooo000000000oooooooooo000000000ooooooooooo00000000oooooooooo0000000000000ooooooooooooo"<<endl;
    //print_delta_images(l6);
    cout<<"ooooooooo000000000oooooooooo000000000ooooooooooo00000000oooooooooo0000000000000ooooooooooooo"<<endl;
    print_sigmaPrime_images(l1);
    cout<<"ooooooooo000000000oooooooooo000000000ooooooooooo00000000oooooooooo0000000000000ooooooooooooo"<<endl;
    print_delta_images(l1);

}

// Assembly:
subq $0x4b8, %rsp            # imm = 0x4B8
movq %rdi, 0x4b0(%rsp)
movl $0xc8, %edi
callq 0x4240
movq %rax, %rdi
movq %rdi, %rax
movq %rax, 0xb0(%rsp)
leaq 0x7052(%rip), %rsi      # 0x56430
leaq 0x706a(%rip), %rdx      # 0x5644f
movl $0x1, %ecx
callq 0x38ff0
jmp 0x4f3f1
movq 0xb0(%rsp), %rax
movq %rax, 0x4a8(%rsp)
movq 0x4a8(%rsp), %rax
movq %rax, 0xa0(%rsp)
movl $0x0, 0x41c(%rsp)
movl $0x0, 0x418(%rsp)
leaq 0x420(%rsp), %rdi
leaq 0x41c(%rsp), %rsi
leaq 0x418(%rsp), %rdx
callq 0x279d0
movq 0xa0(%rsp), %rcx
movups 0x420(%rsp), %xmm0
movq %rsp, %rax
movups %xmm0, (%rax)
movl $0x0, 0x38(%rax)
movl $0x0, 0x30(%rax)
movl $0x4, 0x28(%rax)
movl $0x2, 0x20(%rax)
movl $0x0, 0x18(%rax)
movl $0x0, 0x10(%rax)
xorl %eax, %eax
movl %eax, %r9d
leaq 0x430(%rsp), %rdi
movl $0x3, %esi
movl $0x1, %edx
xorps %xmm2, %xmm2
movq %r9, %r8
movaps %xmm2, %xmm0
movaps %xmm2, %xmm1
callq 0x46830
movl $0x490, %edi            # imm = 0x490
callq 0x4240
movq %rax, %rdi
movq %rdi, %rax
movq %rax, 0xa8(%rsp)
movq 0x490(%rsp), %rax
movq %rax, 0x400(%rsp)
movups 0x480(%rsp), %xmm0
movaps %xmm0, 0x3f0(%rsp)
movups 0x470(%rsp), %xmm0
movaps %xmm0, 0x3e0(%rsp)
movups 0x430(%rsp), %xmm0
movups 0x440(%rsp), %xmm1
movups 0x450(%rsp), %xmm2
movups 0x460(%rsp), %xmm3
movaps %xmm3, 0x3d0(%rsp)
movaps %xmm2, 0x3c0(%rsp)
movaps %xmm1, 0x3b0(%rsp)
movaps %xmm0, 0x3a0(%rsp)
movq 0x400(%rsp), %rcx
movq %rsp, %rax
movq %rcx, 0x60(%rax)
movaps 0x3f0(%rsp), %xmm0
movups %xmm0, 0x50(%rax)
movaps 0x3e0(%rsp), %xmm0
movups %xmm0, 0x40(%rax)
movaps 0x3a0(%rsp), %xmm0
movaps 0x3b0(%rsp), %xmm1
movaps 0x3c0(%rsp), %xmm2
movaps 0x3d0(%rsp), %xmm3
movups %xmm3, 0x30(%rax)
movups %xmm2, 0x20(%rax)
movups %xmm1, 0x10(%rax)
movups %xmm0, (%rax)
callq 0x4ea0
jmp 0x4f591
movq 0xa8(%rsp), %rax
movq %rax, 0x410(%rsp)
movq 0x410(%rsp), %rdi
movq (%rdi), %rax
movq 0x10(%rax), %rax
callq *%rax
movq 0x4a8(%rsp), %rax
movq %rax, 0x90(%rsp)
movl $0x2, 0x324(%rsp)
movl $0x2, 0x320(%rsp)
leaq 0x328(%rsp), %rdi
leaq 0x324(%rsp), %rsi
leaq 0x320(%rsp), %rdx
callq 0x279d0
movq 0x90(%rsp), %rcx
movups 0x328(%rsp), %xmm0
movq %rsp, %rax
movups %xmm0, (%rax)
movl $0x0, 0x38(%rax)
movl $0x0, 0x30(%rax)
movl $0x3, 0x28(%rax)
movl $0x0, 0x20(%rax)
movl $0x0, 0x18(%rax)
movl $0x0, 0x10(%rax)
xorl %eax, %eax
movl %eax, %r8d
leaq 0x338(%rsp), %rdi
movl $0x1, %edx
movl $0x2, %r9d
movsd 0x29bb(%rip), %xmm1     # 0x52010
movsd 0x6233(%rip), %xmm2     # 0x55890
movl %edx, %esi
movaps %xmm2, %xmm0
callq 0x46830
movl $0x490, %edi            # imm = 0x490
callq 0x4240
movq %rax, %rdi
movq %rdi, %rax
movq %rax, 0x98(%rsp)
movq 0x398(%rsp), %rax
movq %rax, 0x310(%rsp)
movups 0x388(%rsp), %xmm0
movaps %xmm0, 0x300(%rsp)
movups 0x378(%rsp), %xmm0
movaps %xmm0, 0x2f0(%rsp)
movups 0x338(%rsp), %xmm0
movups 0x348(%rsp), %xmm1
movups 0x358(%rsp), %xmm2
movups 0x368(%rsp), %xmm3
movaps %xmm3, 0x2e0(%rsp)
movaps %xmm2, 0x2d0(%rsp)
movaps %xmm1, 0x2c0(%rsp)
movaps %xmm0, 0x2b0(%rsp)
movq 0x310(%rsp), %rcx
movq %rsp, %rax
movq %rcx, 0x60(%rax)
movaps 0x300(%rsp), %xmm0
movups %xmm0, 0x50(%rax)
movaps 0x2f0(%rsp), %xmm0
movups %xmm0, 0x40(%rax)
movaps 0x2b0(%rsp), %xmm0
movaps 0x2c0(%rsp), %xmm1
movaps 0x2d0(%rsp), %xmm2
movaps 0x2e0(%rsp), %xmm3
movups %xmm3, 0x30(%rax)
movups %xmm2, 0x20(%rax)
movups %xmm1, 0x10(%rax)
movups %xmm0, (%rax)
callq 0x4ea0
jmp 0x4f74c
movq 0x98(%rsp), %rax
movq %rax, 0x318(%rsp)
movq 0x318(%rsp), %rdi
movq 0x410(%rsp), %rsi
movq (%rdi), %rax
movq 0x1e8(%rax), %rax
callq *%rax
movq 0x318(%rsp), %rdi
movq (%rdi), %rax
movq 0x10(%rax), %rax
callq *%rax
movq 0x4a8(%rsp), %rax
movq %rax, 0x80(%rsp)
movl $0x2, 0x234(%rsp)
movl $0x2, 0x230(%rsp)
leaq 0x238(%rsp), %rdi
leaq 0x234(%rsp), %rsi
leaq 0x230(%rsp), %rdx
callq 0x279d0
movq 0x80(%rsp), %rcx
movups 0x238(%rsp), %xmm0
movq %rsp, %rax
movups %xmm0, (%rax)
movl $0x0, 0x38(%rax)
movl $0x0, 0x30(%rax)
movl $0x3, 0x28(%rax)
movl $0x0, 0x20(%rax)
movl $0x0, 0x18(%rax)
movl $0x0, 0x10(%rax)
xorl %eax, %eax
movl %eax, %r8d
leaq 0x248(%rsp), %rdi
movl $0x1, %edx
movl $0x2, %r9d
movsd 0x27e4(%rip), %xmm1     # 0x52010
movsd 0x605c(%rip), %xmm2     # 0x55890
movl %edx, %esi
movaps %xmm2, %xmm0
callq 0x46830
movl $0x490, %edi            # imm = 0x490
callq 0x4240
movq %rax, %rdi
movq %rdi, %rax
movq %rax, 0x88(%rsp)
movq 0x2a8(%rsp), %rax
movq %rax, 0x220(%rsp)
movups 0x298(%rsp), %xmm0
movaps %xmm0, 0x210(%rsp)
movups 0x288(%rsp), %xmm0
movaps %xmm0, 0x200(%rsp)
movups 0x248(%rsp), %xmm0
movups 0x258(%rsp), %xmm1
movups 0x268(%rsp), %xmm2
movups 0x278(%rsp), %xmm3
movaps %xmm3, 0x1f0(%rsp)
movaps %xmm2, 0x1e0(%rsp)
movaps %xmm1, 0x1d0(%rsp)
movaps %xmm0, 0x1c0(%rsp)
movq 0x220(%rsp), %rcx
movq %rsp, %rax
movq %rcx, 0x60(%rax)
movaps 0x210(%rsp), %xmm0
movups %xmm0, 0x50(%rax)
movaps 0x200(%rsp), %xmm0
movups %xmm0, 0x40(%rax)
movaps 0x1c0(%rsp), %xmm0
movaps 0x1d0(%rsp), %xmm1
movaps 0x1e0(%rsp), %xmm2
movaps 0x1f0(%rsp), %xmm3
movups %xmm3, 0x30(%rax)
movups %xmm2, 0x20(%rax)
movups %xmm1, 0x10(%rax)
movups %xmm0, (%rax)
callq 0x4ea0
jmp 0x4f923
movq 0x88(%rsp), %rax
movq %rax, 0x228(%rsp)
movq 0x228(%rsp), %rdi
movq 0x318(%rsp), %rsi
movq (%rdi), %rax
movq 0x1e8(%rax), %rax
callq *%rax
movq 0x228(%rsp), %rdi
movq (%rdi), %rax
movq 0x10(%rax), %rax
callq *%rax
movq 0x4a8(%rsp), %rax
movq %rax, 0x70(%rsp)
movl $0x0, 0x144(%rsp)
movl $0x0, 0x140(%rsp)
leaq 0x148(%rsp), %rdi
leaq 0x144(%rsp), %rsi
leaq 0x140(%rsp), %rdx
callq 0x279d0
movq 0x70(%rsp), %rcx
movups 0x148(%rsp), %xmm0
movq %rsp, %rax
movups %xmm0, (%rax)
movl $0x0, 0x38(%rax)
movl $0x0, 0x30(%rax)
movl $0x1, 0x28(%rax)
movl $0x0, 0x20(%rax)
movl $0x0, 0x18(%rax)
movl $0x0, 0x10(%rax)
xorl %edx, %edx
movl %edx, %r9d
leaq 0x158(%rsp), %rdi
movl $0x4, %esi
movl $0x2, %r8d
xorps %xmm1, %xmm1
movsd 0x5e90(%rip), %xmm2     # 0x55890
movaps %xmm2, %xmm0
callq 0x46830
movl $0x490, %edi            # imm = 0x490
callq 0x4240
movq %rax, %rdi
movq %rdi, %rax
movq %rax, 0x78(%rsp)
movq 0x1b8(%rsp), %rax
movq %rax, 0x130(%rsp)
movups 0x1a8(%rsp), %xmm0
movaps %xmm0, 0x120(%rsp)
movups 0x198(%rsp), %xmm0
movaps %xmm0, 0x110(%rsp)
movups 0x158(%rsp), %xmm0
movups 0x168(%rsp), %xmm1
movups 0x178(%rsp), %xmm2
movups 0x188(%rsp), %xmm3
movaps %xmm3, 0x100(%rsp)
movaps %xmm2, 0xf0(%rsp)
movaps %xmm1, 0xe0(%rsp)
movaps %xmm0, 0xd0(%rsp)
movq 0x130(%rsp), %rcx
movq %rsp, %rax
movq %rcx, 0x60(%rax)
movaps 0x120(%rsp), %xmm0
movups %xmm0, 0x50(%rax)
movaps 0x110(%rsp), %xmm0
movups %xmm0, 0x40(%rax)
movaps 0xd0(%rsp), %xmm0
movaps 0xe0(%rsp), %xmm1
movaps 0xf0(%rsp), %xmm2
movaps 0x100(%rsp), %xmm3
movups %xmm3, 0x30(%rax)
movups %xmm2, 0x20(%rax)
movups %xmm1, 0x10(%rax)
movups %xmm0, (%rax)
callq 0x4ea0
jmp 0x4faea
movq 0x78(%rsp), %rax
movq %rax, 0x138(%rsp)
movq 0x138(%rsp), %rdi
movq 0x228(%rsp), %rsi
movq (%rdi), %rax
callq *0x1e8(%rax)
movq 0x138(%rsp), %rdi
movq (%rdi), %rax
callq *0x10(%rax)
movq 0x318(%rsp), %rdi
movq 0x228(%rsp), %rsi
movq (%rdi), %rax
callq *0x1f0(%rax)
movq 0x228(%rsp), %rdi
movq 0x138(%rsp), %rsi
movq (%rdi), %rax
callq *0x1f0(%rax)
movq 0x4a8(%rsp), %rdi
callq 0x3a2a0
movq 0x410(%rsp), %rdi
movq (%rdi), %rax
callq *0x18(%rax)
movq 0x318(%rsp), %rdi
movq (%rdi), %rax
callq *0x18(%rax)
movq 0x228(%rsp), %rdi
movq (%rdi), %rax
callq *0x18(%rax)
movq 0x138(%rsp), %rdi
movq (%rdi), %rax
callq *0x18(%rax)
movq 0x318(%rsp), %rdi
movq (%rdi), %rax
callq *0x88(%rax)
movq 0x228(%rsp), %rdi
movq (%rdi), %rax
callq *0x88(%rax)
movq 0x138(%rsp), %rdi
movq (%rdi), %rax
callq *0x88(%rax)
movq 0x4a8(%rsp), %rdi
callq 0x39b20
movq 0x4a8(%rsp), %rdi
callq 0x3a030
movq 0x410(%rsp), %rdi
movq (%rdi), %rax
callq *0x180(%rax)
movq 0x4a8(%rsp), %rdi
callq 0x1f310
movl %eax, 0xc8(%rsp)
movl $0x0, 0xc4(%rsp)
movl 0xc4(%rsp), %eax
cmpl 0xc8(%rsp), %eax
jge 0x4fd75
movq 0x318(%rsp), %rdi
movl 0xc4(%rsp), %esi
movq (%rdi), %rax
callq *0x28(%rax)
movq 0x318(%rsp), %rdi
movl 0xc4(%rsp), %esi
movq (%rdi), %rax
callq *0x30(%rax)
movq 0x228(%rsp), %rdi
movl 0xc4(%rsp), %esi
movq (%rdi), %rax
callq *0x28(%rax)
movq 0x228(%rsp), %rdi
movl 0xc4(%rsp), %esi
movq (%rdi), %rax
callq *0x30(%rax)
movq 0x138(%rsp), %rdi
movl 0xc4(%rsp), %esi
movq (%rdi), %rax
callq *0x28(%rax)
movq 0x138(%rsp), %rdi
movl 0xc4(%rsp), %esi
movq (%rdi), %rax
callq *0x30(%rax)
movl 0xc4(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xc4(%rsp)
jmp 0x4fc12
movq 0xb0(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x4a0(%rsp)
movl %eax, 0x49c(%rsp)
callq 0x4220
jmp 0x4ff56
movq 0xa8(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x4a0(%rsp)
movl %eax, 0x49c(%rsp)
callq 0x4220
jmp 0x4ff56
movq 0x98(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x4a0(%rsp)
movl %eax, 0x49c(%rsp)
callq 0x4220
jmp 0x4ff56
movq 0x88(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x4a0(%rsp)
movl %eax, 0x49c(%rsp)
callq 0x4220
jmp 0x4ff56
movq 0x78(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x4a0(%rsp)
movl %eax, 0x49c(%rsp)
callq 0x4220
jmp 0x4ff56
movq 0x1b25c(%rip), %rdi     # 0x6afd8
leaq 0x6862(%rip), %rsi      # 0x565e5
callq 0x4230
movq %rax, %rdi
movq 0x1b21e(%rip), %rsi     # 0x6afb0
callq 0x4260
movq 0x318(%rsp), %rsi
leaq 0xcf(%rsp), %rdi
callq 0x4ff70
movq 0x318(%rsp), %rsi
leaq 0xce(%rsp), %rdi
callq 0x50140
movl $0x0, 0xc0(%rsp)
movl 0xc0(%rsp), %eax
cmpl 0xc8(%rsp), %eax
jge 0x4fe2e
movq 0x138(%rsp), %rdi
movl 0xc0(%rsp), %esi
movq (%rdi), %rax
callq *0x38(%rax)
movq 0x228(%rsp), %rdi
movl 0xc0(%rsp), %esi
movq (%rdi), %rax
callq *0x38(%rax)
movq 0x318(%rsp), %rdi
movl 0xc0(%rsp), %esi
movq (%rdi), %rax
callq *0x38(%rax)
movl 0xc0(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xc0(%rsp)
jmp 0x4fdcc
movq 0x1b1a3(%rip), %rdi     # 0x6afd8
leaq 0x67a9(%rip), %rsi      # 0x565e5
callq 0x4230
movq %rax, %rdi
movq 0x1b165(%rip), %rsi     # 0x6afb0
callq 0x4260
movq 0x228(%rsp), %rsi
leaq 0xbf(%rsp), %rdi
callq 0x50310
movq 0x1b16c(%rip), %rdi     # 0x6afd8
leaq 0x6772(%rip), %rsi      # 0x565e5
callq 0x4230
movq %rax, %rdi
movq 0x1b12e(%rip), %rsi     # 0x6afb0
callq 0x4260
movq 0x228(%rsp), %rsi
leaq 0xcd(%rsp), %rdi
callq 0x504e0
movq 0x1b135(%rip), %rdi     # 0x6afd8
leaq 0x673b(%rip), %rsi      # 0x565e5
callq 0x4230
movq %rax, %rdi
movq 0x1b0f7(%rip), %rsi     # 0x6afb0
callq 0x4260
movq 0x1b113(%rip), %rdi     # 0x6afd8
leaq 0x6719(%rip), %rsi      # 0x565e5
callq 0x4230
movq %rax, %rdi
movq 0x1b0d5(%rip), %rsi     # 0x6afb0
callq 0x4260
movq 0x1b0f1(%rip), %rdi     # 0x6afd8
leaq 0x66f7(%rip), %rsi      # 0x565e5
callq 0x4230
movq %rax, %rdi
movq 0x1b0b3(%rip), %rsi     # 0x6afb0
callq 0x4260
movq 0x318(%rsp), %rsi
leaq 0xbe(%rsp), %rdi
callq 0x506f0
movq 0x1b0ba(%rip), %rdi     # 0x6afd8
leaq 0x66c0(%rip), %rsi      # 0x565e5
callq 0x4230
movq %rax, %rdi
movq 0x1b07c(%rip), %rsi     # 0x6afb0
callq 0x4260
movq 0x318(%rsp), %rsi
leaq 0xbf(%rsp), %rdi
callq 0x50310
addq $0x4b8, %rsp            # imm = 0x4B8
retq
movq 0x4a0(%rsp), %rdi
callq 0x43f0
nopw %cs:(%rax,%rax)