// File: /workspace/github_cpp_makefile_star2_O2/Pyboon[P]sage/sage.cpp
// Function: Sage::IterConvergence(SageResult, SageResult)
bool Sage::IterConvergence(SageResult last_result, SageResult cur_result){
    VectorXi tau_diff = last_result.tau - cur_result.tau;
    VectorXd doppler_diff = last_result.doppler - cur_result.doppler;
    VectorXd theta_rx_diff = last_result.theta_rx - cur_result.theta_rx;
    VectorXd phi_rx_diff = last_result.phi_rx - cur_result.phi_rx;
    VectorXd theta_tx_diff = last_result.theta_tx - cur_result.theta_tx;
    VectorXd phi_tx_diff = last_result.phi_tx - cur_result.phi_tx;
    bool is_convergence = true;
    for(int iL = 0; iL < max_path_num; ++iL){
        if(abs(tau_diff(iL)) > tol.tau || abs(doppler_diff(iL)) > tol.doppler || 
        abs(theta_rx_diff(iL)) > tol.theta_rx || abs(phi_rx_diff(iL)) > tol.phi_rx ||
        abs(theta_tx_diff(iL)) > tol.theta_tx || abs(phi_tx_diff(iL)) > tol.phi_tx){
            is_convergence = false;
            break;
        }
    }
    return is_convergence;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
movq %rsp, %r12
movq %r12, %rdi
callq 0x55e0
leaq 0x68(%rsp), %rdi
movq %r12, %rsi
callq 0x5d06
leaq 0x10(%r15), %rsi
leaq 0x10(%r14), %rdx
movq %rsp, %rdi
callq 0x55fc
leaq 0x58(%rsp), %rdi
movq %rsp, %rsi
callq 0x5f9e
leaq 0x40(%r15), %rsi
leaq 0x40(%r14), %rdx
movq %rsp, %rdi
callq 0x55fc
leaq 0x48(%rsp), %rdi
movq %rsp, %rsi
callq 0x5f9e
leaq 0x50(%r15), %rsi
leaq 0x50(%r14), %rdx
movq %rsp, %rdi
callq 0x55fc
leaq 0x38(%rsp), %rdi
movq %rsp, %rsi
callq 0x5f9e
leaq 0x20(%r15), %rsi
leaq 0x20(%r14), %rdx
movq %rsp, %rdi
callq 0x55fc
leaq 0x28(%rsp), %rdi
movq %rsp, %rsi
callq 0x5f9e
addq $0x30, %r15
addq $0x30, %r14
movq %rsp, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x55fc
leaq 0x18(%rsp), %rdi
movq %rsp, %rsi
callq 0x5f9e
xorl %eax, %eax
leaq 0x68(%rsp), %r14
leaq 0x58(%rsp), %r15
leaq 0x48(%rsp), %r12
movq %rax, %rbp
movslq 0x15c(%rbx), %r13
cmpq %r13, %rax
jge 0x538d
movq %r14, %rdi
movq %rbp, %rsi
callq 0x5618
movl (%rax), %eax
movl %eax, %ecx
negl %ecx
cmovsl %eax, %ecx
cmpl 0x238(%rbx), %ecx
jg 0x538d
movq %r15, %rdi
movq %rbp, %rsi
callq 0x564e
movsd (%rax), %xmm0
andpd 0x16eb3(%rip), %xmm0    # 0x1c1a0
ucomisd 0x240(%rbx), %xmm0
ja 0x538d
movq %r12, %rdi
movq %rbp, %rsi
callq 0x564e
movsd (%rax), %xmm0
andpd 0x16e8e(%rip), %xmm0    # 0x1c1a0
ucomisd 0x248(%rbx), %xmm0
ja 0x538d
leaq 0x38(%rsp), %rdi
movq %rbp, %rsi
callq 0x564e
movsd (%rax), %xmm0
andpd 0x16e6b(%rip), %xmm0    # 0x1c1a0
ucomisd 0x250(%rbx), %xmm0
ja 0x538d
leaq 0x28(%rsp), %rdi
movq %rbp, %rsi
callq 0x564e
movsd (%rax), %xmm0
andpd 0x16e48(%rip), %xmm0    # 0x1c1a0
ucomisd 0x258(%rbx), %xmm0
ja 0x538d
leaq 0x18(%rsp), %rdi
movq %rbp, %rsi
callq 0x564e
movsd (%rax), %xmm0
andpd 0x16e25(%rip), %xmm0    # 0x1c1a0
leaq 0x1(%rbp), %rax
ucomisd 0x260(%rbx), %xmm0
jbe 0x52a3
cmpq %r13, %rbp
setge %bl
movq 0x18(%rsp), %rdi
callq 0x32c0
movq 0x28(%rsp), %rdi
callq 0x32c0
movq 0x38(%rsp), %rdi
callq 0x32c0
movq 0x48(%rsp), %rdi
callq 0x32c0
movq 0x58(%rsp), %rdi
callq 0x32c0
movq 0x68(%rsp), %rdi
callq 0x32c0
movl %ebx, %eax
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
jmp 0x5406
movq %rax, %rbx
jmp 0x5410
movq %rax, %rbx
jmp 0x541a
movq %rax, %rbx
jmp 0x5424
movq %rax, %rbx
jmp 0x542e
movq %rax, %rbx
movq 0x18(%rsp), %rdi
callq 0x32c0
movq 0x28(%rsp), %rdi
callq 0x32c0
movq 0x38(%rsp), %rdi
callq 0x32c0
movq 0x48(%rsp), %rdi
callq 0x32c0
movq 0x58(%rsp), %rdi
callq 0x32c0
movq 0x68(%rsp), %rdi
callq 0x32c0
movq %rbx, %rdi
callq 0x3430