// File: /workspace/github_cpp_makefile_star2_O2/KokiKishimoto[P]cp_decomposition/quantizedcp.cpp
// Function: main
int main(int argc, char **argv){
	std::string trainname;
	//std::string testname;
	//std::string validname;
	int dimension;
	int iteration;
	//std::string testidname;
	double rate;
	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]);

	Data data;
	data.readFromRawFile(trainname);

	int randomSeed = 0;
	double threshold = 5.0;
	QuantizeCP quantizecp(data, dimension, randomSeed, rate, threshold);

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

	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x1778, %rsp           # imm = 0x1778
movq %rsi, %r14
movl %edi, %ebp
leaq 0x28(%rsp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movb $0x0, (%rax)
leaq 0x3b27(%rip), %rsi      # 0x60a1
leaq 0xb8(%rsp), %rdi
leaq 0x1f0(%rsp), %rdx
callq 0x28c2
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 0x25c5
movl %ebx, %eax
movq 0x8(%r14,%rax,8), %rsi
leaq 0x18(%rsp), %rdi
callq 0x2390
leaq 0x3adc(%rip), %rsi      # 0x60a8
leaq 0x98(%rsp), %rdi
leaq 0x1f0(%rsp), %rdx
callq 0x28c2
leaq 0x98(%rsp), %rdi
movl %ebp, %esi
movq %r14, %rdx
callq 0x24cc
movl %eax, %ebx
leaq 0x98(%rsp), %rdi
callq 0x20e0
testl %ebx, %ebx
jle 0x2616
movl %ebx, %eax
movq 0x8(%r14,%rax,8), %rdi
callq 0x22f0
movl %eax, %ebx
jmp 0x2616
leaq 0x3a96(%rip), %rsi      # 0x60b3
leaq 0x78(%rsp), %rdi
leaq 0x1f0(%rsp), %rdx
callq 0x28c2
leaq 0x78(%rsp), %rdi
movl %ebp, %esi
movq %r14, %rdx
callq 0x24cc
movl %eax, %r15d
leaq 0x78(%rsp), %rdi
callq 0x20e0
testl %r15d, %r15d
jle 0x2662
movl %r15d, %eax
movq 0x8(%r14,%rax,8), %rdi
callq 0x22f0
movl %eax, %r15d
jmp 0x2662
leaq 0x3a55(%rip), %rsi      # 0x60be
leaq 0x58(%rsp), %rdi
leaq 0x1f0(%rsp), %rdx
callq 0x28c2
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 0x26de
movl %ebp, %eax
movq 0x8(%r14,%rax,8), %rsi
leaq 0x1f0(%rsp), %rdi
leaq 0xd8(%rsp), %rdx
callq 0x28c2
leaq 0x1f0(%rsp), %rdi
xorl %esi, %esi
callq 0x28fd
cvtss2sd %xmm0, %xmm0
movsd %xmm0, 0x10(%rsp)
leaq 0x1f0(%rsp), %rdi
callq 0x20e0
jmp 0x26de
leaq 0xe8(%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 0x118(%rsp), %rax
andl $0x0, (%rax)
andq $0x0, 0x8(%rax)
movq %rax, 0x10(%rax)
movq %rax, 0x18(%rax)
andq $0x0, 0x20(%rax)
leaq 0x148(%rsp), %rax
andl $0x0, (%rax)
andq $0x0, 0x8(%rax)
movq %rax, 0x10(%rax)
movq %rax, 0x18(%rax)
andq $0x0, 0x20(%rax)
leaq 0x178(%rsp), %rax
andl $0x0, (%rax)
andq $0x0, 0x8(%rax)
movq %rax, 0x10(%rax)
movq %rax, 0x18(%rax)
andq $0x0, 0x20(%rax)
leaq 0x1a8(%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 0xd8(%rsp), %rdi
leaq 0x38(%rsp), %rsi
callq 0x29d4
leaq 0x38(%rsp), %rdi
callq 0x20e0
leaq 0x1f0(%rsp), %rdi
leaq 0xd8(%rsp), %rsi
movsd 0x384b(%rip), %xmm1     # 0x6008
movl %ebx, %edx
xorl %ecx, %ecx
movsd 0x10(%rsp), %xmm0
callq 0x2c5a
leaq 0x1f0(%rsp), %rdi
leaq 0xd8(%rsp), %rsi
pushq $0x5
popq %rcx
leaq 0xf(%rsp), %r8
movl %r15d, %edx
callq 0x2ff8
leaq 0x1f0(%rsp), %rdi
callq 0x34e0
leaq 0xd8(%rsp), %rdi
callq 0x353c
leaq 0x18(%rsp), %rdi
callq 0x20e0
xorl %eax, %eax
addq $0x1778, %rsp           # imm = 0x1778
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x1f0(%rsp), %rdi
jmp 0x2898
jmp 0x289f
jmp 0x289f
movq %rax, %rbx
leaq 0x1f0(%rsp), %rdi
callq 0x34e0
jmp 0x2857
jmp 0x2854
movq %rax, %rbx
leaq 0x38(%rsp), %rdi
callq 0x20e0
jmp 0x2857
movq %rax, %rbx
leaq 0xd8(%rsp), %rdi
callq 0x353c
jmp 0x28a2
movq %rax, %rbx
leaq 0x58(%rsp), %rdi
jmp 0x2898
jmp 0x289f
movq %rax, %rbx
leaq 0x78(%rsp), %rdi
jmp 0x2898
jmp 0x289f
movq %rax, %rbx
leaq 0x98(%rsp), %rdi
jmp 0x2898
jmp 0x289f
movq %rax, %rbx
leaq 0xb8(%rsp), %rdi
callq 0x20e0
jmp 0x28a2
movq %rax, %rbx
leaq 0x18(%rsp), %rdi
callq 0x20e0
movq %rbx, %rdi
callq 0x2350