// File: /workspace/github_cpp_makefile_star2_O2/Pyboon[P]sage/isi_sage.cpp
// Function: IsiSage::ParamsInit()
void IsiSage::ParamsInit(){
    Util::log("sage params init");
    //init result array and CT and CR array
    result.tau = VectorXi::Zero(max_path_num);
    result.doppler = VectorXd::Zero(max_path_num);
    result.theta_rx = VectorXd::Zero(max_path_num);
    result.phi_rx = VectorXd::Zero(max_path_num);
    result.theta_tx = VectorXd::Zero(max_path_num);
    result.phi_tx = VectorXd::Zero(max_path_num);
    result.alpha = complex_mat::Zero(4, max_path_num);

    // init sage
    int iL = 0;
    complex_mat data = CIR;
    while(iL<max_path_num){
        Util::log("============ Initing the " + to_string(iL) + " path =============");
        //init tau
        RowVectorXcd tau_data = InitTau(data, iL);
        // init doppler frequency
        InitDoppler(tau_data, iL);
        // init angle of arrival 
        InitAoA(tau_data, iL);
        // init angle of departure
        InitAoD(tau_data, iL);
        //init alpha
        UpdateAlpha(tau_data, iL);
        //  construct signal 
        data.row(result.tau(iL)-1) -= SignalConstruct(iL);
        cout<<"the path "<<iL+1<<" init result:"<<" tau="<<result.tau(iL)<<" doppler="
        <<result.doppler(iL)<<" phi_rx="<<result.phi_rx(iL)<<" theta_rx="<<result.theta_rx(iL)
        <<" phi_tx="<<result.phi_tx(iL)<<" theta_tx="<<result.theta_tx(iL)<<" alpha="<<result.alpha(0, iL)<<endl;
        ++iL;
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x148, %rsp            # imm = 0x148
movq %rdi, %rbx
leaq 0x172b1(%rip), %rsi     # 0x1d6d0
leaq 0x108(%rsp), %rdi
leaq 0x98(%rsp), %rdx
callq 0x3b5e
leaq 0x108(%rsp), %rdi
callq 0x547e
leaq 0x108(%rsp), %rdi
callq 0x3100
movslq 0x15c(%rbx), %rsi
leaq 0x98(%rsp), %r14
movq %r14, %rdi
callq 0xaa08
leaq 0x1c0(%rbx), %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0xb6b9
movslq 0x15c(%rbx), %rsi
leaq 0x98(%rsp), %r12
movq %r12, %rdi
callq 0xaa26
leaq 0x1d0(%rbx), %rdi
movq %rdi, 0x28(%rsp)
movq %r12, %rsi
callq 0xb85b
movslq 0x15c(%rbx), %rsi
leaq 0x98(%rsp), %r12
movq %r12, %rdi
callq 0xaa26
leaq 0x200(%rbx), %rdi
movq %rdi, 0x18(%rsp)
movq %r12, %rsi
callq 0xb85b
movslq 0x15c(%rbx), %rsi
leaq 0x98(%rsp), %r12
movq %r12, %rdi
callq 0xaa26
leaq 0x210(%rbx), %rdi
movq %rdi, 0x20(%rsp)
movq %r12, %rsi
callq 0xb85b
movslq 0x15c(%rbx), %rsi
leaq 0x98(%rsp), %r12
movq %r12, %rdi
callq 0xaa26
leaq 0x1e0(%rbx), %rdi
movq %rdi, 0x8(%rsp)
movq %r12, %rsi
callq 0xb85b
movslq 0x15c(%rbx), %rsi
leaq 0x98(%rsp), %r12
movq %r12, %rdi
callq 0xaa26
leaq 0x1f0(%rbx), %rdi
movq %rdi, 0x10(%rsp)
movq %r12, %rsi
callq 0xb85b
movslq 0x15c(%rbx), %rdx
leaq 0x98(%rsp), %r12
pushq $0x4
popq %rsi
movq %r12, %rdi
callq 0x5440
leaq 0x220(%rbx), %rdi
movq %rdi, (%rsp)
movq %r12, %rsi
callq 0x5732
leaq 0x138(%rbx), %rsi
leaq 0x80(%rsp), %rdi
callq 0xb962
xorl %r13d, %r13d
leaq 0xe8(%rsp), %r12
movslq 0x15c(%rbx), %rax
cmpq %rax, %r13
jge 0x6894
movq %r12, %rdi
movl %r13d, %esi
callq 0xaa69
movq %r14, %rdi
leaq 0x17122(%rip), %rsi     # 0x1d6e1
movq %r12, %rdx
callq 0xaa45
leaq 0x128(%rsp), %rbp
movq %rbp, %rdi
movq %r14, %rsi
leaq 0x1711f(%rip), %rdx     # 0x1d6fb
callq 0x545f
movq %rbp, %rdi
callq 0x547e
movq %rbp, %rdi
callq 0x3100
movq %r14, %rdi
callq 0x3100
movq %r12, %rdi
callq 0x3100
leaq 0xd0(%rsp), %rbp
movq %rbp, %rdi
leaq 0x80(%rsp), %rsi
callq 0xb962
movq %r12, %rdi
movq %rbx, %rsi
movq %rbp, %rdx
movl %r13d, %ecx
callq 0x6978
movq 0xd0(%rsp), %rdi
callq 0x32c0
leaq 0x70(%rsp), %rdi
movq %r12, %rsi
callq 0xb9b4
movq %rbx, %rdi
leaq 0x70(%rsp), %rsi
movl %r13d, %edx
callq 0x6af8
movq 0x70(%rsp), %rdi
callq 0x32c0
leaq 0x60(%rsp), %rdi
movq %r12, %rsi
callq 0xb9b4
movq %rbx, %rdi
leaq 0x60(%rsp), %rsi
movl %r13d, %edx
callq 0x6dd6
movq 0x60(%rsp), %rdi
callq 0x32c0
leaq 0x50(%rsp), %rdi
movq %r12, %rsi
callq 0xb9b4
movq %rbx, %rdi
leaq 0x50(%rsp), %rsi
movl %r13d, %edx
callq 0x75f6
movq 0x50(%rsp), %rdi
callq 0x32c0
leaq 0x40(%rsp), %rdi
movq %r12, %rsi
callq 0xb9b4
movq %rbx, %rdi
leaq 0x40(%rsp), %rsi
movl %r13d, %edx
callq 0x7f06
movq 0x40(%rsp), %rdi
callq 0x32c0
leaq 0x30(%rsp), %rdi
movq %rbx, %rsi
movl %r13d, %edx
callq 0x865e
movq %r15, %rdi
movq %r13, %rsi
callq 0x5618
movslq (%rax), %rdx
decq %rdx
movq %r14, %rdi
leaq 0x80(%rsp), %rsi
callq 0xb9f6
movq %r14, %rdi
leaq 0x30(%rsp), %rsi
callq 0xaac2
movq 0x30(%rsp), %rdi
callq 0x32c0
movq 0x338a6(%rip), %rdi     # 0x39fc8
leaq 0x16fe6(%rip), %rsi     # 0x1d70f
callq 0x3250
incq %r13
movq %rax, %rdi
movl %r13d, %esi
callq 0x3420
movq %rax, %rdi
leaq 0x16fd3(%rip), %rsi     # 0x1d719
callq 0x3250
movq %rax, %rdi
leaq 0x16fd2(%rip), %rsi     # 0x1d727
callq 0x3250
movq %rax, %rbp
decq %r13
movq %r15, %rdi
movq %r13, %rsi
callq 0x5618
movl (%rax), %esi
movq %rbp, %rdi
callq 0x3420
movq %rax, %rdi
leaq 0x16fae(%rip), %rsi     # 0x1d72d
callq 0x3250
movq %rax, %rbp
movq 0x28(%rsp), %rdi
movq %r13, %rsi
callq 0x564e
movsd (%rax), %xmm0
movq %rbp, %rdi
callq 0x33c0
movq %rax, %rdi
leaq 0x16f8d(%rip), %rsi     # 0x1d737
callq 0x3250
movq %rax, %rbp
movq 0x20(%rsp), %rdi
movq %r13, %rsi
callq 0x564e
movsd (%rax), %xmm0
movq %rbp, %rdi
callq 0x33c0
movq %rax, %rdi
leaq 0x16f6b(%rip), %rsi     # 0x1d740
callq 0x3250
movq %rax, %rbp
movq 0x18(%rsp), %rdi
movq %r13, %rsi
callq 0x564e
movsd (%rax), %xmm0
movq %rbp, %rdi
callq 0x33c0
movq %rax, %rdi
leaq 0x16f4b(%rip), %rsi     # 0x1d74b
callq 0x3250
movq %rax, %rbp
movq 0x10(%rsp), %rdi
movq %r13, %rsi
callq 0x564e
movsd (%rax), %xmm0
movq %rbp, %rdi
callq 0x33c0
movq %rax, %rdi
leaq 0x16f29(%rip), %rsi     # 0x1d754
callq 0x3250
movq %rax, %rbp
movq 0x8(%rsp), %rdi
movq %r13, %rsi
callq 0x564e
movsd (%rax), %xmm0
movq %rbp, %rdi
callq 0x33c0
movq %rax, %rdi
leaq 0x16f09(%rip), %rsi     # 0x1d75f
callq 0x3250
movq %rax, %rbp
movq (%rsp), %rdi
xorl %esi, %esi
movq %r13, %rdx
callq 0x54d6
movq %rbp, %rdi
movq %rax, %rsi
callq 0x3290
movq %rax, %rdi
callq 0x3110
movq 0xe8(%rsp), %rdi
callq 0x32c0
incq %r13
jmp 0x659a
movq 0x80(%rsp), %rdi
callq 0x32c0
addq $0x148, %rsp            # imm = 0x148
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x108(%rsp), %rdi
callq 0x3100
jmp 0x6970
movq %rax, %rbx
jmp 0x6970
movq %rax, %rbx
movq 0x50(%rsp), %rdi
jmp 0x694c
movq %rax, %rbx
leaq 0x128(%rsp), %rdi
callq 0x3100
jmp 0x68f3
jmp 0x690c
jmp 0x6953
movq %rax, %rbx
leaq 0x98(%rsp), %rdi
callq 0x3100
jmp 0x692b
movq %rax, %rbx
movq 0x70(%rsp), %rdi
jmp 0x694c
movq %rax, %rbx
jmp 0x6963
movq %rax, %rbx
movq 0x40(%rsp), %rdi
jmp 0x694c
movq %rax, %rbx
movq 0xd0(%rsp), %rdi
jmp 0x695e
movq %rax, %rbx
leaq 0xe8(%rsp), %rdi
callq 0x3100
jmp 0x6963
movq %rax, %rbx
movq 0x60(%rsp), %rdi
jmp 0x694c
movq %rax, %rbx
movq 0x30(%rsp), %rdi
callq 0x32c0
jmp 0x6956
movq %rax, %rbx
movq 0xe8(%rsp), %rdi
callq 0x32c0
movq 0x80(%rsp), %rdi
callq 0x32c0
movq %rbx, %rdi
callq 0x3430