// File: /workspace/github_cpp_makefile_star2_O2/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 %r12
pushq %rbx
subq $0x17a0, %rsp           # imm = 0x17A0
movq %rsi, %r14
movl %edi, %ebp
leaq 0x28(%rsp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movb $0x0, (%rax)
leaq 0x3b05(%rip), %rsi      # 0x6081
leaq 0xd8(%rsp), %rdi
leaq 0x210(%rsp), %rdx
callq 0x296a
leaq 0xd8(%rsp), %rdi
movl %ebp, %esi
movq %r14, %rdx
callq 0x24cc
movl %eax, %ebx
leaq 0xd8(%rsp), %rdi
callq 0x20e0
testl %ebx, %ebx
jle 0x25c7
movl %ebx, %eax
movq 0x8(%r14,%rax,8), %rsi
leaq 0x18(%rsp), %rdi
callq 0x2390
leaq 0x3aba(%rip), %rsi      # 0x6088
leaq 0xb8(%rsp), %rdi
leaq 0x210(%rsp), %rdx
callq 0x296a
leaq 0xb8(%rsp), %rdi
movl %ebp, %esi
movq %r14, %rdx
callq 0x24cc
movl %eax, %ebx
leaq 0xb8(%rsp), %rdi
callq 0x20e0
testl %ebx, %ebx
jle 0x2618
movl %ebx, %eax
movq 0x8(%r14,%rax,8), %rdi
callq 0x22f0
movl %eax, %ebx
jmp 0x2618
leaq 0x3a74(%rip), %rsi      # 0x6093
leaq 0x98(%rsp), %rdi
leaq 0x210(%rsp), %rdx
callq 0x296a
leaq 0x98(%rsp), %rdi
movl %ebp, %esi
movq %r14, %rdx
callq 0x24cc
movl %eax, %r15d
leaq 0x98(%rsp), %rdi
callq 0x20e0
testl %r15d, %r15d
jle 0x266d
movl %r15d, %eax
movq 0x8(%r14,%rax,8), %rdi
callq 0x22f0
movl %eax, %r15d
jmp 0x266d
leaq 0x3a2a(%rip), %rsi      # 0x609e
leaq 0x78(%rsp), %rdi
leaq 0x210(%rsp), %rdx
callq 0x296a
leaq 0x78(%rsp), %rdi
movl %ebp, %esi
movq %r14, %rdx
callq 0x24cc
movl %eax, %r12d
leaq 0x78(%rsp), %rdi
callq 0x20e0
testl %r12d, %r12d
jle 0x26ec
movl %r12d, %eax
movq 0x8(%r14,%rax,8), %rsi
leaq 0x210(%rsp), %rdi
leaq 0xf8(%rsp), %rdx
callq 0x296a
leaq 0x210(%rsp), %rdi
xorl %esi, %esi
callq 0x29a5
cvtss2sd %xmm0, %xmm0
movsd %xmm0, 0x10(%rsp)
leaq 0x210(%rsp), %rdi
callq 0x20e0
jmp 0x26ec
leaq 0x39b1(%rip), %rsi      # 0x60a4
leaq 0x58(%rsp), %rdi
leaq 0x210(%rsp), %rdx
callq 0x296a
leaq 0x58(%rsp), %rdi
movl %ebp, %esi
movq %r14, %rdx
callq 0x24cc
movl %eax, %ebp
leaq 0x58(%rsp), %rdi
callq 0x20e0
testl %ebp, %ebp
jle 0x2768
movl %ebp, %eax
movq 0x8(%r14,%rax,8), %rsi
leaq 0x210(%rsp), %rdi
leaq 0xf8(%rsp), %rdx
callq 0x296a
leaq 0x210(%rsp), %rdi
xorl %esi, %esi
callq 0x29a5
cvtss2sd %xmm0, %xmm0
movsd %xmm0, 0x8(%rsp)
leaq 0x210(%rsp), %rdi
callq 0x20e0
jmp 0x2768
leaq 0x108(%rsp), %rax
andq $0x0, -0x10(%rax)
andl $0x0, (%rax)
andq $0x0, 0x8(%rax)
movq %rax, 0x10(%rax)
movq %rax, 0x18(%rax)
andq $0x0, 0x20(%rax)
leaq 0x138(%rsp), %rax
andl $0x0, (%rax)
andq $0x0, 0x8(%rax)
movq %rax, 0x10(%rax)
movq %rax, 0x18(%rax)
andq $0x0, 0x20(%rax)
leaq 0x168(%rsp), %rax
andl $0x0, (%rax)
andq $0x0, 0x8(%rax)
movq %rax, 0x10(%rax)
movq %rax, 0x18(%rax)
andq $0x0, 0x20(%rax)
leaq 0x198(%rsp), %rax
andl $0x0, (%rax)
andq $0x0, 0x8(%rax)
movq %rax, 0x10(%rax)
movq %rax, 0x18(%rax)
andq $0x0, 0x20(%rax)
leaq 0x1c8(%rsp), %rax
andl $0x0, (%rax)
andq $0x0, 0x8(%rax)
movq %rax, 0x10(%rax)
movq %rax, 0x18(%rax)
xorps %xmm0, %xmm0
movups %xmm0, 0x30(%rax)
movups %xmm0, 0x20(%rax)
leaq 0x38(%rsp), %rdi
leaq 0x18(%rsp), %rsi
callq 0x2290
leaq 0xf8(%rsp), %rdi
leaq 0x38(%rsp), %rsi
callq 0x2a7c
leaq 0x38(%rsp), %rdi
callq 0x20e0
leaq 0x210(%rsp), %rdi
leaq 0xf8(%rsp), %rsi
movsd 0x37c1(%rip), %xmm1     # 0x6008
movl %ebx, %edx
xorl %ecx, %ecx
movsd 0x10(%rsp), %xmm0
movsd 0x8(%rsp), %xmm2
callq 0x2d02
leaq 0x210(%rsp), %rdi
leaq 0xf8(%rsp), %rsi
pushq $0x5
popq %rcx
leaq 0x7(%rsp), %r8
movl %r15d, %edx
callq 0x2f9a
leaq 0x210(%rsp), %rdi
callq 0x3482
leaq 0xf8(%rsp), %rdi
callq 0x34de
leaq 0x18(%rsp), %rdi
callq 0x20e0
xorl %eax, %eax
addq $0x17a0, %rsp           # imm = 0x17A0
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
jmp 0x28b9
jmp 0x2947
movq %rax, %rbx
leaq 0x210(%rsp), %rdi
jmp 0x2940
jmp 0x2947
jmp 0x2947
movq %rax, %rbx
leaq 0x210(%rsp), %rdi
callq 0x3482
jmp 0x28f0
jmp 0x28ed
movq %rax, %rbx
leaq 0x38(%rsp), %rdi
callq 0x20e0
jmp 0x28f0
movq %rax, %rbx
leaq 0xf8(%rsp), %rdi
callq 0x34de
jmp 0x294a
movq %rax, %rbx
leaq 0x58(%rsp), %rdi
jmp 0x2940
jmp 0x2947
movq %rax, %rbx
leaq 0x78(%rsp), %rdi
jmp 0x2940
jmp 0x2947
movq %rax, %rbx
leaq 0x98(%rsp), %rdi
jmp 0x2940
jmp 0x2947
movq %rax, %rbx
leaq 0xb8(%rsp), %rdi
jmp 0x2940
jmp 0x2947
movq %rax, %rbx
leaq 0xd8(%rsp), %rdi
callq 0x20e0
jmp 0x294a
movq %rax, %rbx
leaq 0x18(%rsp), %rdi
callq 0x20e0
movq %rbx, %rdi
callq 0x2350