// File: mlugo2[P]SunshineGPU/inc/main.h
// Function: constant_file_interface(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::vector<float, std::allocator<float>>*)
void constant_file_interface(std::string fileName,
	std::vector<float> *constants)
{
	// Opening file
	std::ifstream myFile;
	myFile.open(fileName.data());

	// Read file into vector for easier processing
	std::vector<std::string> data;
	std::string line;
	while( myFile.good() )
	{
		getline(myFile, line);
		line[line.length()] = '\0';
		data.push_back(line);
	}

	myFile.close();

	// Tokenize data
	std::string delims = " \t\n,";
	std::vector<std::string> tempData;

	// Store tokenized data into tempData
	for ( auto i : data )
	{
		tokenize(i, tempData, delims);
	}

	for ( auto i : tempData )
	{
		constants->push_back(std::stof(i));
	}		
}

// Assembly:
subq $0x358, %rsp            # imm = 0x358
movq %rdi, 0x30(%rsp)
movq %rdi, 0x350(%rsp)
movq %rsi, 0x348(%rsp)
leaq 0x140(%rsp), %rdi
movq %rdi, 0x38(%rsp)
callq 0x3390
movq 0x30(%rsp), %rdi
callq 0x3190
movq 0x38(%rsp), %rdi
movq %rax, %rsi
movl $0x8, %edx
callq 0x31f0
jmp 0x44dc
leaq 0x118(%rsp), %rdi
callq 0x51a0
leaq 0xf8(%rsp), %rdi
callq 0x33c0
movq 0x140(%rsp), %rax
movq -0x18(%rax), %rax
leaq 0x140(%rsp,%rax), %rdi
callq 0x3450
movb %al, 0x2f(%rsp)
jmp 0x4515
movb 0x2f(%rsp), %al
testb $0x1, %al
jne 0x4522
jmp 0x45b5
leaq 0x140(%rsp), %rdi
leaq 0xf8(%rsp), %rsi
callq 0x30b0
jmp 0x4539
leaq 0xf8(%rsp), %rdi
movq %rdi, 0x18(%rsp)
callq 0x3400
movq 0x18(%rsp), %rdi
movq %rax, %rsi
callq 0x34f0
movq %rax, 0x20(%rsp)
jmp 0x455f
movq 0x20(%rsp), %rax
movb $0x0, (%rax)
leaq 0x118(%rsp), %rdi
leaq 0xf8(%rsp), %rsi
callq 0x51b0
jmp 0x457e
jmp 0x44f6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x138(%rsp)
movl %eax, 0x134(%rsp)
jmp 0x4872
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x138(%rsp)
movl %eax, 0x134(%rsp)
jmp 0x4858
leaq 0x140(%rsp), %rdi
callq 0x30c0
jmp 0x45c4
leaq 0xd7(%rsp), %rdi
movq %rdi, 0x10(%rsp)
callq 0x34a0
movq 0x10(%rsp), %rdx
leaq 0x10a6b(%rip), %rsi     # 0x1504d
leaq 0xd8(%rsp), %rdi
callq 0x53c0
jmp 0x45f1
leaq 0xd7(%rsp), %rdi
callq 0x3360
leaq 0xb8(%rsp), %rdi
callq 0x51a0
leaq 0x118(%rsp), %rax
movq %rax, 0xb0(%rsp)
movq 0xb0(%rsp), %rdi
callq 0x52e0
movq %rax, 0xa8(%rsp)
movq 0xb0(%rsp), %rdi
callq 0x5490
movq %rax, 0xa0(%rsp)
leaq 0xa8(%rsp), %rdi
leaq 0xa0(%rsp), %rsi
callq 0x54c0
testb $0x1, %al
jne 0x4663
jmp 0x4722
leaq 0xa8(%rsp), %rdi
callq 0x5500
movq %rax, %rsi
leaq 0x80(%rsp), %rdi
callq 0x3130
jmp 0x4682
leaq 0x80(%rsp), %rdi
leaq 0xb8(%rsp), %rsi
leaq 0xd8(%rsp), %rdx
callq 0x3680
jmp 0x46a1
leaq 0x80(%rsp), %rdi
callq 0x31e0
leaq 0xa8(%rsp), %rdi
callq 0x5560
jmp 0x4645
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x138(%rsp)
movl %eax, 0x134(%rsp)
leaq 0xd7(%rsp), %rdi
callq 0x3360
jmp 0x4858
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x138(%rsp)
movl %eax, 0x134(%rsp)
jmp 0x483e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x138(%rsp)
movl %eax, 0x134(%rsp)
leaq 0x80(%rsp), %rdi
callq 0x31e0
jmp 0x483e
leaq 0xb8(%rsp), %rax
movq %rax, 0x78(%rsp)
movq 0x78(%rsp), %rdi
callq 0x52e0
movq %rax, 0x70(%rsp)
movq 0x78(%rsp), %rdi
callq 0x5490
movq %rax, 0x68(%rsp)
leaq 0x70(%rsp), %rdi
leaq 0x68(%rsp), %rsi
callq 0x54c0
testb $0x1, %al
jne 0x4765
jmp 0x47f5
leaq 0x70(%rsp), %rdi
callq 0x5500
movq %rax, %rsi
leaq 0x48(%rsp), %rdi
callq 0x3130
jmp 0x477e
movq 0x348(%rsp), %rax
movq %rax, (%rsp)
xorl %eax, %eax
movl %eax, %esi
leaq 0x48(%rsp), %rdi
callq 0x58d0
movss %xmm0, 0xc(%rsp)
jmp 0x47a0
movq (%rsp), %rdi
movss 0xc(%rsp), %xmm0
movss %xmm0, 0x44(%rsp)
leaq 0x44(%rsp), %rsi
callq 0x55a0
jmp 0x47bc
leaq 0x48(%rsp), %rdi
callq 0x31e0
leaq 0x70(%rsp), %rdi
callq 0x5560
jmp 0x474d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x138(%rsp)
movl %eax, 0x134(%rsp)
leaq 0x48(%rsp), %rdi
callq 0x31e0
jmp 0x483e
leaq 0xb8(%rsp), %rdi
callq 0x57f0
leaq 0xd8(%rsp), %rdi
callq 0x31e0
leaq 0xf8(%rsp), %rdi
callq 0x31e0
leaq 0x118(%rsp), %rdi
callq 0x57f0
leaq 0x140(%rsp), %rdi
callq 0x30d0
addq $0x358, %rsp            # imm = 0x358
retq
leaq 0xb8(%rsp), %rdi
callq 0x57f0
leaq 0xd8(%rsp), %rdi
callq 0x31e0
leaq 0xf8(%rsp), %rdi
callq 0x31e0
leaq 0x118(%rsp), %rdi
callq 0x57f0
leaq 0x140(%rsp), %rdi
callq 0x30d0
movq 0x138(%rsp), %rdi
callq 0x3490
nopl (%rax)