// File: ChnMasterOG[P]KmerGO2/stats_ml/logistic_classifier.cpp
// Function: Logistic::logisticRegression()
void Logistic::logisticRegression() {
	double lamda = 0.1;		//step size
	double delta = 0.001;	//threshold of breaking iteration
	double objLw = Lw(param);
	Logistic_Param tpa(param.w, param.d);
	gradient(lamda);
	double newObjLw = Lw(param);
	int iter = 0;
	while (fabs(newObjLw - objLw) > delta || !samewb(tpa, param, delta)) {
		objLw = newObjLw;
		tpa = Logistic_Param(param.w, param.d);
		gradient(lamda);
		newObjLw = Lw(param);
		++iter;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x150, %rsp            # imm = 0x150
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rsi
movq %rsi, -0x128(%rbp)
movabsq $0x3fb999999999999a, %rax # imm = 0x3FB999999999999A
movq %rax, -0x10(%rbp)
movabsq $0x3f50624dd2f1a9fc, %rax # imm = 0x3F50624DD2F1A9FC
movq %rax, -0x18(%rbp)
addq $0x18, %rsi
leaq -0x40(%rbp), %rdi
movq %rdi, -0x120(%rbp)
callq 0x42d810
movq -0x128(%rbp), %rdi
movq -0x120(%rbp), %rsi
callq 0x42cf70
movsd %xmm0, -0x118(%rbp)
jmp 0x42cc97
leaq -0x40(%rbp), %rdi
callq 0x417170
movsd -0x118(%rbp), %xmm0
movq -0x128(%rbp), %rsi
movsd %xmm0, -0x20(%rbp)
addq $0x18, %rsi
leaq -0x88(%rbp), %rdi
movq %rdi, -0x130(%rbp)
callq 0x42d6a0
movq -0x128(%rbp), %rax
movq -0x130(%rbp), %rsi
movsd 0x30(%rax), %xmm0
leaq -0x70(%rbp), %rdi
callq 0x42d790
jmp 0x42cce9
leaq -0x88(%rbp), %rdi
callq 0x417190
movq -0x128(%rbp), %rdi
movsd -0x10(%rbp), %xmm0
callq 0x42d070
jmp 0x42cd08
movq -0x128(%rbp), %rsi
addq $0x18, %rsi
leaq -0xb0(%rbp), %rdi
callq 0x42d810
jmp 0x42cd21
movq -0x128(%rbp), %rdi
leaq -0xb0(%rbp), %rsi
callq 0x42cf70
movsd %xmm0, -0x138(%rbp)
jmp 0x42cd3e
leaq -0xb0(%rbp), %rdi
callq 0x417170
movsd -0x138(%rbp), %xmm0
movsd %xmm0, -0x90(%rbp)
movl $0x0, -0xb4(%rbp)
movsd -0x90(%rbp), %xmm0
subsd -0x20(%rbp), %xmm0
movaps 0x18a1c8(%rip), %xmm1   # 0x5b6f40
pand %xmm1, %xmm0
movb $0x1, %al
ucomisd -0x18(%rbp), %xmm0
movb %al, -0x139(%rbp)
ja 0x42cdbd
movq -0x128(%rbp), %rdi
movq %rdi, %rdx
addq $0x18, %rdx
movsd -0x18(%rbp), %xmm0
leaq -0x70(%rbp), %rsi
callq 0x42d280
movb %al, -0x13a(%rbp)
jmp 0x42cdaf
movb -0x13a(%rbp), %al
xorb $-0x1, %al
movb %al, -0x139(%rbp)
movb -0x139(%rbp), %al
testb $0x1, %al
jne 0x42cdcc
jmp 0x42cf4b
movq -0x128(%rbp), %rsi
movsd -0x90(%rbp), %xmm0
movsd %xmm0, -0x20(%rbp)
addq $0x18, %rsi
leaq -0xf0(%rbp), %rdi
callq 0x42d6a0
jmp 0x42cdf2
movq -0x128(%rbp), %rax
movsd 0x30(%rax), %xmm0
leaq -0xd8(%rbp), %rdi
leaq -0xf0(%rbp), %rsi
callq 0x42d790
jmp 0x42ce13
leaq -0x70(%rbp), %rdi
leaq -0xd8(%rbp), %rsi
movq %rsi, -0x148(%rbp)
callq 0x42d850
movq -0x148(%rbp), %rdi
callq 0x417170
leaq -0xf0(%rbp), %rdi
callq 0x417190
movq -0x128(%rbp), %rdi
movsd -0x10(%rbp), %xmm0
callq 0x42d070
jmp 0x42ce55
movq -0x128(%rbp), %rsi
addq $0x18, %rsi
leaq -0x110(%rbp), %rdi
callq 0x42d810
jmp 0x42ce6e
movq -0x128(%rbp), %rdi
leaq -0x110(%rbp), %rsi
callq 0x42cf70
movsd %xmm0, -0x150(%rbp)
jmp 0x42ce8b
movsd -0x150(%rbp), %xmm0
movsd %xmm0, -0x90(%rbp)
leaq -0x110(%rbp), %rdi
callq 0x417170
movl -0xb4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xb4(%rbp)
jmp 0x42cd64
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x40(%rbp), %rdi
callq 0x417170
jmp 0x42cf66
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x88(%rbp), %rdi
callq 0x417190
jmp 0x42cf66
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x42cf5d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0xb0(%rbp), %rdi
callq 0x417170
jmp 0x42cf5d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0xf0(%rbp), %rdi
callq 0x417190
jmp 0x42cf5d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x110(%rbp), %rdi
callq 0x417170
jmp 0x42cf5d
leaq -0x70(%rbp), %rdi
callq 0x417170
addq $0x150, %rsp            # imm = 0x150
popq %rbp
retq
leaq -0x70(%rbp), %rdi
callq 0x417170
movq -0x48(%rbp), %rdi
callq 0x4d3c10
nop