// File: /workspace/github_cpp_makefile_star2_O3/KokiKishimoto[P]cp_decomposition/cp.cpp
// Function: main
int main(int argc, char **argv){
	std::string trainname;
	int dimension;
	int iteration;
	double rate;
	double lambda;
	int i;
	if ((i = ArgPos((char *)"-train", argc, argv)) > 0) trainname = argv[i + 1];
	if ((i = ArgPos((char *)"-dimension", argc, argv)) > 0) dimension = atoi(argv[i + 1]);
	if ((i = ArgPos((char *)"-iteration", argc, argv)) > 0) iteration = atoi(argv[i + 1]);
	if ((i = ArgPos((char *)"-rate", argc, argv)) > 0) rate = std::stof(argv[i + 1]);
	if ((i = ArgPos((char *)"-lambda", argc, argv)) > 0) lambda = std::stof(argv[i + 1]);

	Data data;
	data.readFromRawFile(trainname);

	int randomSeed = 0;
	double threshold = 5.0;
	CP cp(data, dimension, randomSeed, rate, threshold, lambda);

	ModelFileWriter mfw;
	int negativeSize = 5;
	cp.train(data, iteration, negativeSize, mfw);

	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x17a8, %rsp           # imm = 0x17A8
movq %rsi, %r14
movl %edi, %r15d
leaq 0x30(%rsp), %rax
movq %rax, -0x10(%rax)
movq $0x0, -0x8(%rax)
movb $0x0, (%rax)
leaq 0xf0(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x4aa3(%rip), %rsi      # 0x70c1
leaq 0x4aa2(%rip), %rdx      # 0x70c7
leaq 0xe0(%rsp), %rdi
callq 0x6992
leaq 0xe0(%rsp), %rdi
movl %r15d, %esi
movq %r14, %rdx
callq 0x255c
movl %eax, %ebx
movq 0xe0(%rsp), %rdi
cmpq %r12, %rdi
je 0x2664
movq 0xf0(%rsp), %rsi
incq %rsi
callq 0x2260
testl %ebx, %ebx
jle 0x2694
movl %ebx, %eax
movq 0x8(%r14,%rax,8), %rbx
leaq 0x20(%rsp), %r12
movq 0x8(%r12), %r13
movq %rbx, %rdi
callq 0x20e0
movq %r12, %rdi
xorl %esi, %esi
movq %r13, %rdx
movq %rbx, %rcx
movq %rax, %r8
callq 0x2340
leaq 0xd0(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x4a20(%rip), %rsi      # 0x70c8
leaq 0x4a23(%rip), %rdx      # 0x70d2
leaq 0xc0(%rsp), %rdi
callq 0x6992
leaq 0xc0(%rsp), %rdi
movl %r15d, %esi
movq %r14, %rdx
callq 0x255c
movl %eax, %ebx
movq 0xc0(%rsp), %rdi
cmpq %r12, %rdi
je 0x26ee
movq 0xd0(%rsp), %rsi
incq %rsi
callq 0x2260
testl %ebx, %ebx
jle 0x2704
movl %ebx, %eax
movq 0x8(%r14,%rax,8), %rdi
callq 0x2350
movl %eax, 0x1c(%rsp)
jmp 0x2704
leaq 0xb0(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x49bb(%rip), %rsi      # 0x70d3
leaq 0x49be(%rip), %rdx      # 0x70dd
leaq 0xa0(%rsp), %rdi
callq 0x6992
leaq 0xa0(%rsp), %rdi
movl %r15d, %esi
movq %r14, %rdx
callq 0x255c
movl %eax, %ebp
movq 0xa0(%rsp), %rdi
cmpq %r12, %rdi
je 0x275e
movq 0xb0(%rsp), %rsi
incq %rsi
callq 0x2260
testl %ebp, %ebp
jle 0x2774
movl %ebp, %eax
movq 0x8(%r14,%rax,8), %rdi
callq 0x2350
movl %eax, 0x18(%rsp)
jmp 0x2774
leaq 0x90(%rsp), %r13
movq %r13, -0x10(%r13)
leaq 0x4957(%rip), %rsi      # 0x70de
leaq 0x4955(%rip), %rdx      # 0x70e3
leaq 0x80(%rsp), %rdi
callq 0x6992
leaq 0x80(%rsp), %rdi
movl %r15d, %esi
movq %r14, %rdx
callq 0x255c
movl %eax, %r12d
movq 0x80(%rsp), %rdi
cmpq %r13, %rdi
je 0x27ce
movq 0x90(%rsp), %rsi
incq %rsi
callq 0x2260
testl %r12d, %r12d
jle 0x283a
movl %r12d, %eax
movq 0x8(%r14,%rax,8), %rsi
leaq 0x218(%rsp), %rdi
leaq 0x7(%rsp), %rdx
callq 0x2c94
movq 0x218(%rsp), %r13
callq 0x2050
movq %rax, %r12
movl (%rax), %ebp
movl $0x0, (%rax)
leaq 0x100(%rsp), %rbx
movq %r13, %rdi
movq %rbx, %rsi
callq 0x22e0
cmpq %r13, (%rbx)
je 0x2b33
movl (%r12), %eax
testl %eax, %eax
je 0x283c
cmpl $0x22, %eax
jne 0x2840
leaq 0x48b7(%rip), %rdi      # 0x70ec
callq 0x2300
jmp 0x2877
movl %ebp, (%r12)
leaq 0x228(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x286d
movq 0x228(%rsp), %rsi
incq %rsi
movss %xmm0, 0x10(%rsp)
callq 0x2260
movss 0x10(%rsp), %xmm0
cvtss2sd %xmm0, %xmm0
movsd %xmm0, 0x10(%rsp)
leaq 0x70(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x485c(%rip), %rsi      # 0x70e4
leaq 0x485c(%rip), %rdx      # 0x70eb
leaq 0x60(%rsp), %rdi
callq 0x6992
leaq 0x60(%rsp), %rdi
movl %r15d, %esi
movq %r14, %rdx
callq 0x255c
movl %eax, %r15d
movq 0x60(%rsp), %rdi
cmpq %r12, %rdi
je 0x28c3
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x2260
testl %r15d, %r15d
movl 0x1c(%rsp), %r12d
jle 0x2933
movl %r15d, %eax
movq 0x8(%r14,%rax,8), %rsi
leaq 0x218(%rsp), %rdi
leaq 0x7(%rsp), %rdx
callq 0x2c94
movq 0x218(%rsp), %rbx
callq 0x2050
movq %rax, %r14
movl (%rax), %ebp
movl $0x0, (%rax)
leaq 0x100(%rsp), %r15
movq %rbx, %rdi
movq %r15, %rsi
callq 0x22e0
cmpq %rbx, (%r15)
je 0x2b3f
movl (%r14), %eax
testl %eax, %eax
je 0x2935
cmpl $0x22, %eax
jne 0x2938
leaq 0x47be(%rip), %rdi      # 0x70ec
callq 0x2300
jmp 0x296f
movl %ebp, (%r14)
leaq 0x228(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2965
movq 0x228(%rsp), %rsi
incq %rsi
movss %xmm0, 0x8(%rsp)
callq 0x2260
movss 0x8(%rsp), %xmm0
cvtss2sd %xmm0, %xmm0
movsd %xmm0, 0x8(%rsp)
xorl %eax, %eax
leaq 0x110(%rsp), %rcx
movq %rax, -0x10(%rcx)
movl %eax, (%rcx)
movq %rax, 0x8(%rcx)
movq %rcx, 0x10(%rcx)
movq %rcx, 0x18(%rcx)
movq %rax, 0x20(%rcx)
leaq 0x140(%rsp), %rcx
movl %eax, (%rcx)
movq %rax, 0x8(%rcx)
movq %rcx, 0x10(%rcx)
movq %rcx, 0x18(%rcx)
movq %rax, 0x20(%rcx)
leaq 0x170(%rsp), %rcx
movl %eax, (%rcx)
movq %rax, 0x8(%rcx)
movq %rcx, 0x10(%rcx)
movq %rcx, 0x18(%rcx)
movq %rax, 0x20(%rcx)
leaq 0x1a0(%rsp), %rcx
movl %eax, (%rcx)
movq %rax, 0x8(%rcx)
movq %rcx, 0x10(%rcx)
movq %rcx, 0x18(%rcx)
movq %rax, 0x20(%rcx)
leaq 0x1d0(%rsp), %rcx
movl %eax, (%rcx)
movq %rax, 0x8(%rcx)
movq %rcx, 0x10(%rcx)
movq %rcx, 0x18(%rcx)
xorps %xmm0, %xmm0
movups %xmm0, 0x30(%rcx)
movups %xmm0, 0x20(%rcx)
leaq 0x50(%rsp), %r14
movq %r14, -0x10(%r14)
movq 0x20(%rsp), %rsi
movq 0x28(%rsp), %rdx
addq %rsi, %rdx
leaq 0x40(%rsp), %rdi
callq 0x68fc
leaq 0x100(%rsp), %rdi
leaq 0x40(%rsp), %rsi
callq 0x2d82
movq 0x40(%rsp), %rdi
cmpq %r14, %rdi
je 0x2a47
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x2260
leaq 0x218(%rsp), %rdi
leaq 0x100(%rsp), %rsi
movsd 0x45a9(%rip), %xmm1     # 0x7008
movl %r12d, %edx
xorl %ecx, %ecx
movsd 0x10(%rsp), %xmm0
movsd 0x8(%rsp), %xmm2
callq 0x313c
leaq 0x218(%rsp), %rdi
leaq 0x100(%rsp), %rsi
leaq 0x7(%rsp), %r8
movl 0x18(%rsp), %edx
movl $0x5, %ecx
callq 0x348c
leaq 0x218(%rsp), %rdi
callq 0x3ad8
movq 0x1f8(%rsp), %rdi
testq %rdi, %rdi
je 0x2ac2
movq 0x208(%rsp), %rsi
subq %rdi, %rsi
callq 0x2260
leaq 0x1c8(%rsp), %rdi
callq 0x3c20
leaq 0x198(%rsp), %rdi
callq 0x3c70
leaq 0x168(%rsp), %rdi
callq 0x3c70
leaq 0x138(%rsp), %rdi
callq 0x3ce8
leaq 0x108(%rsp), %rdi
callq 0x3ce8
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0x2b1f
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x2260
xorl %eax, %eax
addq $0x17a8, %rsp           # imm = 0x17A8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x45b2(%rip), %rdi      # 0x70ec
callq 0x2150
leaq 0x45a6(%rip), %rdi      # 0x70ec
callq 0x2150
jmp 0x2c6d
jmp 0x2c6d
jmp 0x2c6d
movq %rax, %rbx
cmpl $0x0, (%r14)
jne 0x2b76
movl %ebp, (%r14)
jmp 0x2b76
movq %rax, %rbx
cmpl $0x0, (%r12)
jne 0x2b76
movl %ebp, (%r12)
leaq 0x228(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2c70
movq 0x228(%rsp), %rsi
jmp 0x2c63
movq %rax, %rbx
leaq 0x218(%rsp), %rdi
callq 0x3ad8
jmp 0x2bcb
jmp 0x2bc8
movq %rax, %rbx
movq 0x40(%rsp), %rdi
cmpq %r14, %rdi
je 0x2bcb
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x2260
jmp 0x2bcb
movq %rax, %rbx
leaq 0x100(%rsp), %rdi
callq 0x3bbe
jmp 0x2c70
movq %rax, %rbx
movq 0x60(%rsp), %rdi
cmpq %r12, %rdi
je 0x2c70
movq 0x70(%rsp), %rsi
jmp 0x2c63
jmp 0x2c6d
movq %rax, %rbx
movq 0x80(%rsp), %rdi
cmpq %r13, %rdi
je 0x2c70
movq 0x90(%rsp), %rsi
jmp 0x2c63
jmp 0x2c6d
movq %rax, %rbx
movq 0xa0(%rsp), %rdi
cmpq %r12, %rdi
je 0x2c70
movq 0xb0(%rsp), %rsi
jmp 0x2c63
jmp 0x2c6d
movq %rax, %rbx
movq 0xc0(%rsp), %rdi
cmpq %r12, %rdi
je 0x2c70
movq 0xd0(%rsp), %rsi
jmp 0x2c63
jmp 0x2c6d
movq %rax, %rbx
movq 0xe0(%rsp), %rdi
cmpq %r12, %rdi
je 0x2c70
movq 0xf0(%rsp), %rsi
incq %rsi
callq 0x2260
jmp 0x2c70
movq %rax, %rbx
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0x2c8c
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x2260
movq %rbx, %rdi
callq 0x23b0