// File: /workspace/github_cpp_makefile_star2_O2/KokiKishimoto[P]cp_decomposition/./model_file_writer.hpp
// Function: ModelFileWriter::save(std::vector<std::vector<double, std::allocator<double>>, std::allocator<std::vector<double, std::allocator<double>>>>&, std::vector<std::vector<double, std::allocator<double>>, std::allocator<std::vector<double, std::allocator<double>>>>&, std::vector<std::vector<double, std::allocator<double>>, std::allocator<std::vector<double, std::allocator<double>>>>&, SignalOperation&, Data&, int)
void save(std::vector< std::vector<double> >& subjVec, std::vector< std::vector<double> >& objVec, std::vector< std::vector<double> >& relationVec, SignalOperation& op, Data& data, int iter) {
		std::ofstream fout;
		fout.open("./model/" + std::to_string(iter) + "_subject.txt");

		fout << data.entity_counter << " " << subjVec[0].size() << "\n";
		for (int i = 0; i < data.entity_counter; i++) {
			const std::vector<double>& vec = subjVec[i];
			const double norm = op.norm(vec);
			fout << data.entity_dict_rev[i] << " ";

			for (int j = 0; j < vec.size(); j++) {
				if (j > 0) fout << " ";
				fout << vec[j] / norm;
			}
			fout << "\n";
		}

		fout.close();


		fout.open("./model/" + std::to_string(iter) + "_object.txt");

		fout << data.entity_counter << " " << objVec[0].size() << "\n";
		for (int i = 0; i < data.entity_counter; i++) {
			const std::vector<double>& vec = objVec[i];
			const double norm = op.norm(vec);
			fout << data.entity_dict_rev[i] << " ";

			for (int j = 0; j < vec.size(); j++) {
				if (j > 0) fout << " ";
				fout << vec[j] / norm;
			}
			fout << "\n";
		}

		fout.close();


		fout.open("./model/" + std::to_string(iter) + "_relation.txt");

		fout << data.relation_counter << " " << relationVec[0].size() << "\n";
		for (int i = 0; i < data.relation_counter; i++) {
			const std::vector<double>& vec = relationVec[i];
			const double norm = op.norm(vec);
			fout << data.relation_dict_rev[i] << " ";

			for (int j = 0; j < vec.size(); j++) {
				if (j > 0) fout << " ";
				fout << vec[j] / norm;
			}
			fout << "\n";
		}

		fout.close();
	}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x288, %rsp            # imm = 0x288
movq %r9, %rbx
movq %r8, 0x28(%rsp)
movq %rcx, 0x30(%rsp)
movq %rdx, 0x38(%rsp)
movq %rsi, 0x40(%rsp)
movl 0x2c0(%rsp), %ebp
leaq 0x88(%rsp), %rdi
callq 0x2330
leaq 0x48(%rsp), %rdi
movl %ebp, %esi
callq 0x5d57
leaq 0xeaa(%rip), %rsi       # 0x6113
leaq 0x68(%rsp), %rdi
leaq 0x48(%rsp), %rdx
callq 0x5d33
leaq 0xe9d(%rip), %rdx       # 0x611c
leaq 0x8(%rsp), %rdi
leaq 0x68(%rsp), %rsi
callq 0x5d14
leaq 0x88(%rsp), %rdi
leaq 0x8(%rsp), %rsi
pushq $0x10
popq %rdx
callq 0x20f0
leaq 0x8(%rsp), %rdi
callq 0x20e0
leaq 0x68(%rsp), %rdi
callq 0x20e0
leaq 0x48(%rsp), %rdi
callq 0x20e0
movl (%rbx), %esi
leaq 0x88(%rsp), %rdi
callq 0x2340
leaq 0xe3a(%rip), %rsi       # 0x6111
movq %rax, %rdi
callq 0x2200
movq 0x40(%rsp), %rcx
movq (%rcx), %rcx
movq 0x8(%rcx), %rsi
subq (%rcx), %rsi
sarq $0x3, %rsi
movq %rax, %rdi
callq 0x2150
leaq 0xe28(%rip), %rsi       # 0x6129
movq %rax, %rdi
callq 0x2200
leaq 0x68(%rbx), %r13
xorl %eax, %eax
leaq 0x88(%rsp), %r12
leaq 0xdf3(%rip), %r15       # 0x6111
movl %eax, 0x8(%rsp)
cmpl (%rbx), %eax
jge 0x53ca
cltq
imulq $0x18, %rax, %rbp
movq 0x40(%rsp), %rax
addq (%rax), %rbp
movq 0x28(%rsp), %rdi
movq %rbp, %rsi
callq 0x5b22
movsd %xmm0, (%rsp)
movq %r13, %rdi
leaq 0x8(%rsp), %rsi
callq 0x38ca
movq %r12, %rdi
movq %rax, %rsi
callq 0x21f0
movq %rax, %rdi
movq %r15, %rsi
callq 0x2200
xorl %r14d, %r14d
movq (%rbp), %rax
movq 0x8(%rbp), %rcx
subq %rax, %rcx
sarq $0x3, %rcx
cmpq %r14, %rcx
jbe 0x53b0
testq %r14, %r14
je 0x5398
movq %r12, %rdi
movq %r15, %rsi
callq 0x2200
movq (%rbp), %rax
movsd (%rax,%r14,8), %xmm0
divsd (%rsp), %xmm0
movq %r12, %rdi
callq 0x2300
incq %r14
jmp 0x5370
movq %r12, %rdi
leaq 0xd6f(%rip), %rsi       # 0x6129
callq 0x2200
movl 0x8(%rsp), %eax
incl %eax
jmp 0x531e
leaq 0x88(%rsp), %rdi
callq 0x22a0
leaq 0x48(%rsp), %rdi
movl 0x2c0(%rsp), %esi
callq 0x5d57
leaq 0xd24(%rip), %rsi       # 0x6113
leaq 0x68(%rsp), %rdi
leaq 0x48(%rsp), %rdx
callq 0x5d33
leaq 0xd26(%rip), %rdx       # 0x612b
leaq 0x8(%rsp), %rdi
leaq 0x68(%rsp), %rsi
callq 0x5d14
leaq 0x88(%rsp), %rdi
leaq 0x8(%rsp), %rsi
pushq $0x10
popq %rdx
callq 0x20f0
leaq 0x8(%rsp), %rdi
callq 0x20e0
leaq 0x68(%rsp), %rdi
callq 0x20e0
leaq 0x48(%rsp), %rdi
callq 0x20e0
movl (%rbx), %esi
leaq 0x88(%rsp), %rdi
callq 0x2340
leaq 0xcb4(%rip), %rsi       # 0x6111
movq %rax, %rdi
callq 0x2200
movq 0x38(%rsp), %rcx
movq (%rcx), %rcx
movq 0x8(%rcx), %rsi
subq (%rcx), %rsi
sarq $0x3, %rsi
movq %rax, %rdi
callq 0x2150
leaq 0xca2(%rip), %rsi       # 0x6129
movq %rax, %rdi
callq 0x2200
xorl %eax, %eax
leaq 0x88(%rsp), %r15
leaq 0xc71(%rip), %r12       # 0x6111
movl %eax, 0x8(%rsp)
cmpl (%rbx), %eax
jge 0x554c
cltq
imulq $0x18, %rax, %rbp
movq 0x38(%rsp), %rax
addq (%rax), %rbp
movq 0x28(%rsp), %rdi
movq %rbp, %rsi
callq 0x5b22
movsd %xmm0, (%rsp)
movq %r13, %rdi
leaq 0x8(%rsp), %rsi
callq 0x38ca
movq %r15, %rdi
movq %rax, %rsi
callq 0x21f0
movq %rax, %rdi
movq %r12, %rsi
callq 0x2200
xorl %r14d, %r14d
movq (%rbp), %rax
movq 0x8(%rbp), %rcx
subq %rax, %rcx
sarq $0x3, %rcx
cmpq %r14, %rcx
jbe 0x5532
testq %r14, %r14
je 0x551a
movq %r15, %rdi
movq %r12, %rsi
callq 0x2200
movq (%rbp), %rax
movsd (%rax,%r14,8), %xmm0
divsd (%rsp), %xmm0
movq %r15, %rdi
callq 0x2300
incq %r14
jmp 0x54f2
movq %r15, %rdi
leaq 0xbed(%rip), %rsi       # 0x6129
callq 0x2200
movl 0x8(%rsp), %eax
incl %eax
jmp 0x54a0
leaq 0x88(%rsp), %rdi
callq 0x22a0
leaq 0x48(%rsp), %rdi
movl 0x2c0(%rsp), %esi
callq 0x5d57
leaq 0xba2(%rip), %rsi       # 0x6113
leaq 0x68(%rsp), %rdi
leaq 0x48(%rsp), %rdx
callq 0x5d33
leaq 0xbb0(%rip), %rdx       # 0x6137
leaq 0x8(%rsp), %rdi
leaq 0x68(%rsp), %rsi
callq 0x5d14
leaq 0x88(%rsp), %rdi
leaq 0x8(%rsp), %rsi
pushq $0x10
popq %rdx
callq 0x20f0
leaq 0x8(%rsp), %rdi
callq 0x20e0
leaq 0x68(%rsp), %rdi
callq 0x20e0
leaq 0x48(%rsp), %rdi
callq 0x20e0
movl 0x4(%rbx), %esi
leaq 0x88(%rsp), %rdi
callq 0x2340
leaq 0xb31(%rip), %rsi       # 0x6111
movq %rax, %rdi
callq 0x2200
movq 0x30(%rsp), %rcx
movq (%rcx), %rcx
movq 0x8(%rcx), %rsi
subq (%rcx), %rsi
sarq $0x3, %rsi
movq %rax, %rdi
callq 0x2150
leaq 0xb1f(%rip), %rsi       # 0x6129
movq %rax, %rdi
callq 0x2200
leaq 0x98(%rbx), %r12
xorl %eax, %eax
leaq 0x88(%rsp), %r15
leaq 0xae7(%rip), %rbp       # 0x6111
movl %eax, 0x8(%rsp)
cmpl 0x4(%rbx), %eax
jge 0x56d7
cltq
imulq $0x18, %rax, %r13
movq 0x30(%rsp), %rax
addq (%rax), %r13
movq 0x28(%rsp), %rdi
movq %r13, %rsi
callq 0x5b22
movsd %xmm0, (%rsp)
movq %r12, %rdi
leaq 0x8(%rsp), %rsi
callq 0x38ca
movq %r15, %rdi
movq %rax, %rsi
callq 0x21f0
movq %rax, %rdi
movq %rbp, %rsi
callq 0x2200
xorl %r14d, %r14d
movq (%r13), %rax
movq 0x8(%r13), %rcx
subq %rax, %rcx
sarq $0x3, %rcx
cmpq %r14, %rcx
jbe 0x56bd
testq %r14, %r14
je 0x56a5
movq %r15, %rdi
movq %rbp, %rsi
callq 0x2200
movq (%r13), %rax
movsd (%rax,%r14,8), %xmm0
divsd (%rsp), %xmm0
movq %r15, %rdi
callq 0x2300
incq %r14
jmp 0x567d
movq %r15, %rdi
leaq 0xa62(%rip), %rsi       # 0x6129
callq 0x2200
movl 0x8(%rsp), %eax
incl %eax
jmp 0x562a
leaq 0x88(%rsp), %rdi
callq 0x22a0
leaq 0x88(%rsp), %rdi
callq 0x22d0
addq $0x288, %rsp            # imm = 0x288
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x5713
jmp 0x5722
jmp 0x5731
jmp 0x574e
jmp 0x5713
jmp 0x5722
jmp 0x5731
jmp 0x574e
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x20e0
jmp 0x5725
movq %rax, %rbx
leaq 0x68(%rsp), %rdi
callq 0x20e0
jmp 0x5734
movq %rax, %rbx
leaq 0x48(%rsp), %rdi
callq 0x20e0
jmp 0x5751
jmp 0x574e
jmp 0x574e
jmp 0x574e
jmp 0x574e
jmp 0x574e
jmp 0x574e
jmp 0x574e
movq %rax, %rbx
leaq 0x88(%rsp), %rdi
callq 0x22d0
movq %rbx, %rdi
callq 0x2350