// File: fhirschman[P]CANF-gp/source/general_functions.cc
// Function: saveIterMatrix()
void saveIterMatrix(){
	cout << endl << " ///////////////////// " << endl << " START WRITING TO FILE  " << endl;
	ofstream res;
	res.open("iterMatrix.dat");
	for(int i = 0; i < N_Y; i++){
		for(int j = 0; j < N_X; j++){
			#ifdef GPU_MODE
			res << cuCreal(cnumber_matrix_GPU[i*N_X+j]) << " " << cuCimag(cnumber_matrix_GPU[i*N_X+j]) << " " << log(iter_matrix_GPU[i*N_X+j]) << endl;
			#else
			res << real(cnumber_matrix[i][j]) << " " << imag(cnumber_matrix[i][j]) << " " << log(iter_matrix[i][j]) << endl;

			#endif
		}
		res << endl;
	}
	res.close();
	cout << " FINISH WRITING TO FILE \n" << " ///////////////////// \n " << endl;
	return;
}

// Assembly:
subq $0x278, %rsp            # imm = 0x278
movq 0x200aa(%rip), %rdi     # 0x28fa8
movq 0x2006b(%rip), %rsi     # 0x28f70
movq %rsi, 0x50(%rsp)
callq 0x8560
movq %rax, %rdi
leaq 0x151a8(%rip), %rsi     # 0x1e0c1
callq 0x84e0
movq 0x50(%rsp), %rsi
movq %rax, %rdi
callq 0x8560
movq %rax, %rdi
leaq 0x151a4(%rip), %rsi     # 0x1e0d9
callq 0x84e0
movq 0x50(%rsp), %rsi
movq %rax, %rdi
callq 0x8560
leaq 0x78(%rsp), %rdi
movq %rdi, 0x58(%rsp)
callq 0x8900
movq 0x58(%rsp), %rdi
leaq 0x15190(%rip), %rsi     # 0x1e0f2
movl $0x10, %edx
callq 0x8060
jmp 0x8f6e
movl $0x0, 0x68(%rsp)
movl 0x68(%rsp), %eax
leaq 0x20967(%rip), %rcx     # 0x298e8
cmpl (%rcx), %eax
jge 0x9105
movl $0x0, 0x64(%rsp)
movl 0x64(%rsp), %eax
leaq 0x20948(%rip), %rcx     # 0x298e4
cmpl (%rcx), %eax
jge 0x90e0
leaq 0x20acd(%rip), %rax     # 0x29a78
movq (%rax), %rax
movslq 0x68(%rsp), %rcx
movq (%rax,%rcx,8), %rdi
movslq 0x64(%rsp), %rax
shlq $0x4, %rax
addq %rax, %rdi
callq 0xbd10
movsd %xmm0, 0x48(%rsp)
jmp 0x8fd0
movsd 0x48(%rsp), %xmm0
leaq 0x78(%rsp), %rdi
callq 0x8a10
movq %rax, 0x40(%rsp)
jmp 0x8fe7
movq 0x40(%rsp), %rdi
leaq 0x1615b(%rip), %rsi     # 0x1f14e
callq 0x84e0
movq %rax, 0x38(%rsp)
jmp 0x8fff
leaq 0x20a72(%rip), %rax     # 0x29a78
movq (%rax), %rax
movslq 0x68(%rsp), %rcx
movq (%rax,%rcx,8), %rdi
movslq 0x64(%rsp), %rax
shlq $0x4, %rax
addq %rax, %rdi
callq 0xbd20
movsd %xmm0, 0x30(%rsp)
jmp 0x902b
movsd 0x30(%rsp), %xmm0
movq 0x38(%rsp), %rdi
callq 0x8a10
movq %rax, 0x28(%rsp)
jmp 0x9042
movq 0x28(%rsp), %rdi
leaq 0x16100(%rip), %rsi     # 0x1f14e
callq 0x84e0
movq %rax, 0x20(%rsp)
jmp 0x905a
movslq 0x68(%rsp), %rsi
leaq 0x209a2(%rip), %rdi     # 0x29a08
callq 0xbd50
movq %rax, %rdi
movslq 0x64(%rsp), %rsi
callq 0xbd70
movl (%rax), %edi
callq 0xbd30
movsd %xmm0, 0x18(%rsp)
jmp 0x9087
movsd 0x18(%rsp), %xmm0
movq 0x20(%rsp), %rdi
callq 0x8a10
movq %rax, 0x10(%rsp)
jmp 0x909e
movq 0x10(%rsp), %rdi
movq 0x1fec6(%rip), %rsi     # 0x28f70
callq 0x8560
jmp 0x90b1
jmp 0x90b3
movl 0x64(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x64(%rsp)
jmp 0x8f91
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x70(%rsp)
movl %eax, 0x6c(%rsp)
leaq 0x78(%rsp), %rdi
callq 0x8830
jmp 0x9166
movq 0x1fe89(%rip), %rsi     # 0x28f70
leaq 0x78(%rsp), %rdi
callq 0x8560
jmp 0x90f3
jmp 0x90f5
movl 0x68(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x68(%rsp)
jmp 0x8f76
leaq 0x78(%rsp), %rdi
callq 0x87b0
jmp 0x9111
movq 0x1fe90(%rip), %rdi     # 0x28fa8
leaq 0x14fe2(%rip), %rsi     # 0x1e101
callq 0x84e0
movq %rax, 0x8(%rsp)
jmp 0x912b
movq 0x8(%rsp), %rdi
leaq 0x14fe4(%rip), %rsi     # 0x1e11b
callq 0x84e0
movq %rax, (%rsp)
jmp 0x9142
movq (%rsp), %rdi
movq 0x1fe23(%rip), %rsi     # 0x28f70
callq 0x8560
jmp 0x9154
leaq 0x78(%rsp), %rdi
callq 0x8830
addq $0x278, %rsp            # imm = 0x278
retq
movq 0x70(%rsp), %rdi
callq 0x8960