// File: /workspace/github_cpp_makefile_star2_O1/melop[P]admixem/config.cpp
// Function: RecombProbConfigurations::fnEraseNonMonotonic(std::vector<double, std::allocator<double>>*, std::vector<double, std::allocator<double>>*, std::vector<double, std::allocator<double>>*)
void RecombProbConfigurations::fnEraseNonMonotonic(vector<double> * vMale, vector<double> * vFemale, vector<double> * vPos) {
	
	double nCurrMale , nCurrFemale , nCurrPos;
	nCurrMale = nCurrFemale = nCurrPos = -1;
	vector< size_t > vToDelete;
	for(size_t i=0;i<vPos->size();i++) {

		if (nCurrMale >= vMale->at(i) || nCurrFemale >= vFemale->at(i) || nCurrPos >= vPos->at(i)) {
			vToDelete.push_back(i);
		}
		nCurrMale = vMale->at(i);
		nCurrFemale = vFemale->at(i);
		nCurrPos = vPos->at(i);
	}

	//start deleting from the back;

	for(vector< size_t >::reverse_iterator it=vToDelete.rbegin(); it!=vToDelete.rend();++it) { //iterate from the end
		vMale->erase(vMale->begin() + *it);
		vFemale->erase(vFemale->begin() + *it);
		vPos->erase(vPos->begin() + *it);

	}

}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, %r15
xorpd %xmm0, %xmm0
movapd %xmm0, (%rsp)
xorl %eax, %eax
movq %rax, 0x10(%rsp)
movq %rax, 0x18(%rsp)
movq (%rcx), %rax
cmpq %rax, 0x8(%rcx)
je 0x10a11
movsd 0x24b1c(%rip), %xmm2    # 0x35438
xorl %esi, %esi
movq %rsp, %r12
leaq 0x18(%rsp), %r13
movapd %xmm2, %xmm1
movapd %xmm2, %xmm0
movq (%r15), %rcx
movq 0x8(%r15), %rdx
subq %rcx, %rdx
sarq $0x3, %rdx
cmpq %rsi, %rdx
jbe 0x10acc
ucomisd (%rcx,%rsi,8), %xmm2
jae 0x10971
movq (%r14), %rcx
movq 0x8(%r14), %rdx
subq %rcx, %rdx
sarq $0x3, %rdx
cmpq %rsi, %rdx
jbe 0x10acc
ucomisd (%rcx,%rsi,8), %xmm1
jae 0x10971
ucomisd (%rax,%rsi,8), %xmm0
jb 0x10999
movq 0x8(%rsp), %rax
cmpq 0x10(%rsp), %rax
je 0x1098b
movq %rsi, (%rax)
addq $0x8, %rax
movq %rax, 0x8(%rsp)
jmp 0x10999
movq %r12, %rdi
movq %rax, %rsi
movq %r13, %rdx
callq 0x1cba0
movq 0x18(%rsp), %rsi
movq (%r15), %rax
movq 0x8(%r15), %rdx
subq %rax, %rdx
sarq $0x3, %rdx
cmpq %rsi, %rdx
jbe 0x10acc
movq (%r14), %rcx
movq 0x8(%r14), %rdx
subq %rcx, %rdx
sarq $0x3, %rdx
cmpq %rsi, %rdx
jbe 0x10acc
movq (%rbx), %rdi
movq 0x8(%rbx), %rdx
subq %rdi, %rdx
sarq $0x3, %rdx
cmpq %rsi, %rdx
jbe 0x10acc
movsd (%rax,%rsi,8), %xmm2
movsd (%rcx,%rsi,8), %xmm1
movsd (%rdi,%rsi,8), %xmm0
incq %rsi
movq %rsi, 0x18(%rsp)
movq (%rbx), %rax
movq 0x8(%rbx), %rcx
subq %rax, %rcx
sarq $0x3, %rcx
cmpq %rcx, %rsi
jb 0x1092e
movq (%rsp), %rdi
movq 0x8(%rsp), %r12
cmpq %rdi, %r12
je 0x10aac
movq -0x8(%r12), %rax
movq (%r15), %rcx
movq 0x8(%r15), %rdx
leaq (%rcx,%rax,8), %rsi
addq $0x8, %rsi
cmpq %rdx, %rsi
je 0x10a48
leaq (%rcx,%rax,8), %rdi
subq %rsi, %rdx
callq 0x75f0
addq $-0x8, %r12
addq $-0x8, 0x8(%r15)
movq (%r12), %rax
movq (%r14), %rcx
movq 0x8(%r14), %rdx
leaq (%rcx,%rax,8), %rsi
addq $0x8, %rsi
cmpq %rdx, %rsi
je 0x10a75
leaq (%rcx,%rax,8), %rdi
subq %rsi, %rdx
callq 0x75f0
addq $-0x8, 0x8(%r14)
movq (%r12), %rax
movq (%rbx), %rcx
movq 0x8(%rbx), %rdx
leaq (%rcx,%rax,8), %rsi
addq $0x8, %rsi
cmpq %rdx, %rsi
je 0x10a9e
leaq (%rcx,%rax,8), %rdi
subq %rsi, %rdx
callq 0x75f0
addq $-0x8, 0x8(%rbx)
movq (%rsp), %rdi
jmp 0x10a1a
testq %rdi, %rdi
je 0x10abe
movq 0x10(%rsp), %rsi
subq %rdi, %rsi
callq 0x7390
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
leaq 0x2614e(%rip), %rdi     # 0x36c21
xorl %eax, %eax
callq 0x7530
jmp 0x10adc
movq %rax, %rbx
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x10af5
movq 0x10(%rsp), %rsi
subq %rdi, %rsi
callq 0x7390
movq %rbx, %rdi
callq 0x76a0
nop