// File: /workspace/github_cpp_makefile_star2_O1/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 %r13
pushq %r12
pushq %rbx
subq $0x1778, %rsp           # imm = 0x1778
movq %rsi, %r14
movl %edi, %r15d
leaq 0x28(%rsp), %rax
movq %rax, -0x10(%rax)
movq $0x0, -0x8(%rax)
movb $0x0, (%rax)
leaq 0xc8(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x4a93(%rip), %rsi      # 0x70b1
leaq 0x4a92(%rip), %rdx      # 0x70b7
leaq 0xb8(%rsp), %rdi
callq 0x67ec
leaq 0xb8(%rsp), %rdi
movl %r15d, %esi
movq %r14, %rdx
callq 0x255c
movl %eax, %ebx
movq 0xb8(%rsp), %rdi
cmpq %r12, %rdi
je 0x2664
movq 0xc8(%rsp), %rsi
incq %rsi
callq 0x2260
testl %ebx, %ebx
jle 0x2694
movl %ebx, %eax
movq 0x8(%r14,%rax,8), %rbx
leaq 0x18(%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 0xa8(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x4a10(%rip), %rsi      # 0x70b8
leaq 0x4a13(%rip), %rdx      # 0x70c2
leaq 0x98(%rsp), %rdi
callq 0x67ec
leaq 0x98(%rsp), %rdi
movl %r15d, %esi
movq %r14, %rdx
callq 0x255c
movl %eax, %ebx
movq 0x98(%rsp), %rdi
cmpq %r12, %rdi
je 0x26ee
movq 0xa8(%rsp), %rsi
incq %rsi
callq 0x2260
testl %ebx, %ebx
jle 0x2702
movl %ebx, %eax
movq 0x8(%r14,%rax,8), %rdi
callq 0x2350
movl %eax, %ebx
jmp 0x2702
leaq 0x88(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x49ad(%rip), %rsi      # 0x70c3
leaq 0x49b0(%rip), %rdx      # 0x70cd
leaq 0x78(%rsp), %rdi
callq 0x67ec
leaq 0x78(%rsp), %rdi
movl %r15d, %esi
movq %r14, %rdx
callq 0x255c
movl %eax, %ebp
movq 0x78(%rsp), %rdi
cmpq %r12, %rdi
je 0x2753
movq 0x88(%rsp), %rsi
incq %rsi
callq 0x2260
testl %ebp, %ebp
jle 0x2767
movl %ebp, %eax
movq 0x8(%r14,%rax,8), %rdi
callq 0x2350
movl %eax, %ebp
jmp 0x2767
leaq 0x68(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x4956(%rip), %rsi      # 0x70ce
leaq 0x4954(%rip), %rdx      # 0x70d3
leaq 0x58(%rsp), %rdi
callq 0x67ec
leaq 0x58(%rsp), %rdi
movl %r15d, %esi
movq %r14, %rdx
callq 0x255c
movl %eax, %r15d
movq 0x58(%rsp), %rdi
cmpq %r12, %rdi
je 0x27b3
movq 0x68(%rsp), %rsi
incq %rsi
callq 0x2260
testl %r15d, %r15d
jle 0x2820
movl %r15d, %eax
movq 0x8(%r14,%rax,8), %rsi
leaq 0x1f0(%rsp), %rdi
leaq 0xf(%rsp), %rdx
callq 0x2b32
movq 0x1f0(%rsp), %r15
callq 0x2050
movq %rax, %r14
movl (%rax), %r13d
movl $0x0, (%rax)
leaq 0xd8(%rsp), %r12
movq %r15, %rdi
movq %r12, %rsi
callq 0x22e0
cmpq %r15, (%r12)
je 0x2a17
movl (%r14), %eax
testl %eax, %eax
je 0x2822
cmpl $0x22, %eax
jne 0x2825
leaq 0x48b9(%rip), %rdi      # 0x70d4
callq 0x2300
jmp 0x285c
movl %r13d, (%r14)
leaq 0x200(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2852
movq 0x200(%rsp), %rsi
incq %rsi
movss %xmm0, 0x10(%rsp)
callq 0x2260
movss 0x10(%rsp), %xmm0
cvtss2sd %xmm0, %xmm0
movsd %xmm0, 0x10(%rsp)
xorl %eax, %eax
leaq 0xe8(%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 0x118(%rsp), %rcx
movl %eax, (%rcx)
movq %rax, 0x8(%rcx)
movq %rcx, 0x10(%rcx)
movq %rcx, 0x18(%rcx)
movq %rax, 0x20(%rcx)
leaq 0x148(%rsp), %rcx
movl %eax, (%rcx)
movq %rax, 0x8(%rcx)
movq %rcx, 0x10(%rcx)
movq %rcx, 0x18(%rcx)
movq %rax, 0x20(%rcx)
leaq 0x178(%rsp), %rcx
movl %eax, (%rcx)
movq %rax, 0x8(%rcx)
movq %rcx, 0x10(%rcx)
movq %rcx, 0x18(%rcx)
movq %rax, 0x20(%rcx)
leaq 0x1a8(%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 0x48(%rsp), %r14
movq %r14, -0x10(%r14)
movq 0x18(%rsp), %rsi
movq 0x20(%rsp), %rdx
addq %rsi, %rdx
leaq 0x38(%rsp), %rdi
callq 0x675c
leaq 0xd8(%rsp), %rdi
leaq 0x38(%rsp), %rsi
callq 0x2c20
movq 0x38(%rsp), %rdi
cmpq %r14, %rdi
je 0x2934
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x2260
leaq 0x1f0(%rsp), %rdi
leaq 0xd8(%rsp), %rsi
movsd 0x46bc(%rip), %xmm1     # 0x7008
movl %ebx, %edx
xorl %ecx, %ecx
movsd 0x10(%rsp), %xmm0
callq 0x2fda
leaq 0x1f0(%rsp), %rdi
leaq 0xd8(%rsp), %rsi
leaq 0xf(%rsp), %r8
movl %ebp, %edx
movl $0x5, %ecx
callq 0x345c
leaq 0x1f0(%rsp), %rdi
callq 0x3a96
movq 0x1d0(%rsp), %rdi
testq %rdi, %rdi
je 0x29a6
movq 0x1e0(%rsp), %rsi
subq %rdi, %rsi
callq 0x2260
leaq 0x1a0(%rsp), %rdi
callq 0x3bde
leaq 0x170(%rsp), %rdi
callq 0x3c2e
leaq 0x140(%rsp), %rdi
callq 0x3c2e
leaq 0x110(%rsp), %rdi
callq 0x3ca6
leaq 0xe0(%rsp), %rdi
callq 0x3ca6
movq 0x18(%rsp), %rdi
leaq 0x28(%rsp), %rax
cmpq %rax, %rdi
je 0x2a03
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x2260
xorl %eax, %eax
addq $0x1778, %rsp           # imm = 0x1778
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x46b6(%rip), %rdi      # 0x70d4
callq 0x2150
jmp 0x2b0a
jmp 0x2b0a
movq %rax, %rbx
cmpl $0x0, (%r14)
jne 0x2a39
movl %r13d, (%r14)
leaq 0x200(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2b0d
movq 0x200(%rsp), %rsi
jmp 0x2b00
movq %rax, %rbx
leaq 0x1f0(%rsp), %rdi
callq 0x3a96
jmp 0x2a8e
jmp 0x2a8b
movq %rax, %rbx
movq 0x38(%rsp), %rdi
cmpq %r14, %rdi
je 0x2a8e
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x2260
jmp 0x2a8e
movq %rax, %rbx
leaq 0xd8(%rsp), %rdi
callq 0x3b7c
jmp 0x2b0d
movq %rax, %rbx
movq 0x58(%rsp), %rdi
cmpq %r12, %rdi
je 0x2b0d
movq 0x68(%rsp), %rsi
jmp 0x2b00
jmp 0x2b0a
movq %rax, %rbx
movq 0x78(%rsp), %rdi
cmpq %r12, %rdi
je 0x2b0d
movq 0x88(%rsp), %rsi
jmp 0x2b00
jmp 0x2b0a
movq %rax, %rbx
movq 0x98(%rsp), %rdi
cmpq %r12, %rdi
je 0x2b0d
movq 0xa8(%rsp), %rsi
jmp 0x2b00
jmp 0x2b0a
movq %rax, %rbx
movq 0xb8(%rsp), %rdi
cmpq %r12, %rdi
je 0x2b0d
movq 0xc8(%rsp), %rsi
incq %rsi
callq 0x2260
jmp 0x2b0d
movq %rax, %rbx
movq 0x18(%rsp), %rdi
leaq 0x28(%rsp), %rax
cmpq %rax, %rdi
je 0x2b29
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x2260
movq %rbx, %rdi
callq 0x23b0
nop