#include <fstream>
#include <iterator>
#include <vector>
#include <iostream>
#include <cstdlib>
#include <string>
#include <sstream>
#include <iomanip>
#include <math.h>
#include <stdio.h>

#define energySize 64000000
#define blockSize 256

//define macro for error checking
#define cudaCheckError(){	   												  \
	cudaError_t err = cudaGetLastError();											  \
	if(err != cudaSuccess){              											  \
		std::cout << "Error in " << __FILE__ << " at line " << __LINE__ << " : " <<  cudaGetErrorString(err) << std::endl; \
		exit(EXIT_FAILURE);                 										  \
	}                                     											  \
}

void getSourceFile(std::vector<double>& eNomVec, std::vector<double>& rangeVec, 
			std::vector<double>& sigmaXVec,std::vector<double>& sigmaYVec, 
			std::vector<double>& eMeanVec, std::vector<double>& sigmaEVec, 
			std::vector<double>& xVec, std::vector<double>& yVec, 
			std::vector<double>& nxVec,std::vector<double>& nyVec,
			std::vector<double>& weightVec, int& numGroups) 
{
	int dateOfMeasurement;
	long int numberOfGroups;
	double  eNom, range, sigmaX, sigmaY, eMean, sigmaE, xcoord, ycoord, weight, nx, ny;
	
	std::string line;
	//declare and open file
	std::ifstream ifile("IMPT_source.dat", std::ios::in);
	if(!ifile){
		std::cout << "Error, IMPT_source not found" << std::endl;
	}else{
		//read in date of measurement
		ifile >> dateOfMeasurement;
	
		//read in number of groups
		ifile >> numberOfGroups;
		numGroups = numberOfGroups;
		
		//skip over header line
		std::string e, r, x, y, m, s, nx1, ny1, x1, y1, w;
		ifile >> e;
		ifile >> r;
		ifile >> x;
		ifile >> y;
		ifile >> m;
		ifile >> s;
		ifile >> x1;
		ifile >> y1;
		ifile >> nx1;
		ifile >> ny1;
		ifile >> w;
	
		//intialize memory for faster read in 
//		xVec.reserve(numberOfGroups);
//		yVec.reserve(numberOfGroups);
		nxVec.reserve(numberOfGroups);
		nyVec.reserve(numberOfGroups);
		weightVec.reserve(numberOfGroups);
		eNomVec.reserve(numberOfGroups);					
		//read in data to vectors
		for(int i = 0; i < numberOfGroups; i++){
			ifile >> eNom;
			ifile >> range;
			ifile >> sigmaX;
			ifile >> sigmaY;
			ifile >> eMean;
			ifile >> sigmaE;
			ifile >> xcoord;
			ifile >> ycoord;
			ifile >> nx;
			ifile >> ny;
			ifile >> weight;

			eNomVec.push_back(eNom);
//			rangeVec.push_back(range);
//			sigmaXVec.push_back(sigmaX);
//			sigmaYVec.push_back(sigmaY);
//			eMeanVec.push_back(eMean);
			xVec.push_back(xcoord);
			yVec.push_back(ycoord);
			nxVec.push_back(nx);
			nyVec.push_back(ny);
			weightVec.push_back(weight);
		}
	}
}

int main(int argc, char** argv){
	int numberOfGroups;
	std::vector<double> eNom, range, sigmaX, sigmaY, eMean, sigmaE, xCoord, yCoord, nx, ny, weight;
	getSourceFile(eNom, range, sigmaX, sigmaY, eMean, sigmaE, xCoord, yCoord, nx, ny, weight, numberOfGroups);
	
	double* finalEnergy;
	finalEnergy = (double*)malloc(energySize*sizeof(double));
	memset(finalEnergy, 0, energySize*sizeof(double));	
	//do not use device 1 for anything
	cudaSetDevice(2);

	for(int master = atoi(argv[1])-1; master < atoi(argv[2]); master++){
		
		double fieldSize = -1*(xCoord[master]+yCoord[master])/(nx[master]-1);

		//declare stream size variables and open file/check for errors
		std::streampos bufferSize;

		//create fileName to read in data
		std::ostringstream fName;
		if(master < 9){
			fName << std::fixed << "GyPerMU3D_0" << master+1 << "_" << std::setprecision(1) << eNom[master] << "MeV_field_" << std::setprecision(0) << nx[master] << "by" 
			      << ny[master] << "spots_" << std::setprecision(2) <<  fieldSize << "by" << std::setprecision(2) <<  fieldSize << "cm2spacing.bin";
		}else{
			fName << std::fixed << "GyPerMU3D_" << master+1 << "_" << std::setprecision(1) << eNom[master] << "MeV_field_" << std::setprecision(0) << nx[master] << "by" 
			      << ny[master] << "spots_" << std::setprecision(2) <<  fieldSize << "by" << std::setprecision(2) <<  fieldSize << "cm2spacing.bin";
		}
		std::string fileName = fName.str();
		std::cout << fileName << std::endl;
		std::ifstream ifile(fileName.c_str(), std::ios::in | std::ios::binary);
		if(!ifile){
			std::cout << "Error, no file found" << std::endl;
			exit(1);
		}
		
		//get file size
		ifile.seekg(0, std::ios::end);
		bufferSize = ifile.tellg();
		ifile.seekg(0, std::ios::beg);

		//declare buffer
		std::vector<double> buffer(bufferSize/sizeof(double));
		
		//read in data
		ifile.read(reinterpret_cast<char*>(buffer.data()), bufferSize); 

		int size = bufferSize/(sizeof(double)*400);
		
		//copy memory from buffer to energy
		double *energy;
		energy = (double*)malloc(energySize*sizeof(double));
		std::copy(buffer.begin(), buffer.end(), energy);

		for(int i = 0; i < energySize ;i++){
			finalEnergy[i] += energy[i]*weight[master];
		}
	}//end of master loop
	
	std::cout << "Writing to binary file" << std::endl;
	std::ostringstream OName;
	OName << std::fixed << "GyPerMU3D_SOBP_" << argv[1] << "-" << argv[2] << ".bin";
	std::string fileNameOut = OName.str();
	std::ofstream ofile(fileNameOut.c_str() , std::ios::out | std::ios::binary);
	ofile.write(reinterpret_cast<char*>(finalEnergy), energySize*sizeof(double));

}

	.file	"tmpxft_002e88da_00000000-6_sumFieldsForSOBP.cudafe1.cpp"
	.text
#APP
	.globl _ZSt21ios_base_library_initv

#NO_APP
	.section	.text._ZSt5fixedRSt8ios_base,"axG",@progbits,_ZSt5fixedRSt8ios_base,comdat
	.weak	_ZSt5fixedRSt8ios_base
	.type	_ZSt5fixedRSt8ios_base, @function
_ZSt5fixedRSt8ios_base:
.LFB3285:
	.cfi_startproc
	endbr64
	movl	24(%rdi), %edx
	movq	%rdi, %rax
	andl	$-261, %edx
	orl	$4, %edx
	movl	%edx, 24(%rdi)
	ret
	.cfi_endproc
.LFE3285:
	.size	_ZSt5fixedRSt8ios_base, .-_ZSt5fixedRSt8ios_base
	.text
	.type	_ZL26__cudaUnregisterBinaryUtilv, @function
_ZL26__cudaUnregisterBinaryUtilv:
.LFB4401:
	.cfi_startproc
	endbr64
	movq	_ZL20__cudaFatCubinHandle(%rip), %rdi
	jmp	__cudaUnregisterFatBinary@PLT
	.cfi_endproc
.LFE4401:
	.size	_ZL26__cudaUnregisterBinaryUtilv, .-_ZL26__cudaUnregisterBinaryUtilv
	.align 2
	.type	_ZNSt12_Vector_baseIdSaIdEE11_M_allocateEm.isra.0, @function
_ZNSt12_Vector_baseIdSaIdEE11_M_allocateEm.isra.0:
.LFB5298:
	.cfi_startproc
	testq	%rdi, %rdi
	je	.L4
	movabsq	$1152921504606846975, %rax
	cmpq	%rdi, %rax
	jnb	.L5
	pushq	%rax
	.cfi_def_cfa_offset 16
	movabsq	$2305843009213693951, %rax
	cmpq	%rdi, %rax
	jnb	.L6
	call	_ZSt28__throw_bad_array_new_lengthv@PLT
.L6:
	call	_ZSt17__throw_bad_allocv@PLT
.L5:
	.cfi_def_cfa_offset 8
	salq	$3, %rdi
	jmp	_Znwm@PLT
.L4:
	xorl	%eax, %eax
	ret
	.cfi_endproc
.LFE5298:
	.size	_ZNSt12_Vector_baseIdSaIdEE11_M_allocateEm.isra.0, .-_ZNSt12_Vector_baseIdSaIdEE11_M_allocateEm.isra.0
	.align 2
	.type	_ZNSirsERd.isra.0, @function
_ZNSirsERd.isra.0:
.LFB5301:
	.cfi_startproc
	jmp	_ZNSi10_M_extractIdEERSiRT_@PLT
	.cfi_endproc
.LFE5301:
	.size	_ZNSirsERd.isra.0, .-_ZNSirsERd.isra.0
	.section	.text.startup,"ax",@progbits
	.type	_ZL24__sti____cudaRegisterAllv, @function
_ZL24__sti____cudaRegisterAllv:
.LFB4424:
	.cfi_startproc
	endbr64
	pushq	%rax
	.cfi_def_cfa_offset 16
	leaq	_ZL15__fatDeviceText(%rip), %rdi
	call	__cudaRegisterFatBinary@PLT
	movq	%rax, %rdi
	movq	%rax, _ZL20__cudaFatCubinHandle(%rip)
	call	__cudaRegisterFatBinaryEnd@PLT
	leaq	_ZL26__cudaUnregisterBinaryUtilv(%rip), %rdi
	popq	%rdx
	.cfi_def_cfa_offset 8
	jmp	atexit@PLT
	.cfi_endproc
.LFE4424:
	.size	_ZL24__sti____cudaRegisterAllv, .-_ZL24__sti____cudaRegisterAllv
	.section	.init_array,"aw"
	.align 8
	.quad	_ZL24__sti____cudaRegisterAllv
	.section	.rodata._ZNSt6vectorIdSaIdEE7reserveEm.str1.1,"aMS",@progbits,1
.LC0:
	.string	"vector::reserve"
	.section	.text._ZNSt6vectorIdSaIdEE7reserveEm,"axG",@progbits,_ZNSt6vectorIdSaIdEE7reserveEm,comdat
	.align 2
	.weak	_ZNSt6vectorIdSaIdEE7reserveEm
	.type	_ZNSt6vectorIdSaIdEE7reserveEm, @function
_ZNSt6vectorIdSaIdEE7reserveEm:
.LFB4755:
	.cfi_startproc
	endbr64
	movabsq	$1152921504606846975, %rax
	pushq	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	pushq	%r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	pushq	%r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	pushq	%rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	cmpq	%rsi, %rax
	jnb	.L15
	leaq	.LC0(%rip), %rdi
	call	_ZSt20__throw_length_errorPKc@PLT
.L15:
	movq	(%rdi), %rdx
	movq	16(%rdi), %rax
	movq	%rdi, %rbx
	movq	%rsi, %r12
	subq	%rdx, %rax
	sarq	$3, %rax
	cmpq	%rsi, %rax
	jnb	.L14
	movq	8(%rdi), %r13
	movq	%rsi, %rdi
	subq	%rdx, %r13
	call	_ZNSt12_Vector_baseIdSaIdEE11_M_allocateEm.isra.0
	movq	(%rbx), %r14
	movq	8(%rbx), %rdx
	movq	%rax, %rbp
	subq	%r14, %rdx
	testq	%rdx, %rdx
	jle	.L17
	movq	%r14, %rsi
	movq	%rax, %rdi
	call	memmove@PLT
	jmp	.L18
.L17:
	testq	%r14, %r14
	je	.L19
.L18:
	movq	16(%rbx), %rsi
	movq	%r14, %rdi
	subq	%r14, %rsi
	call	_ZdlPvm@PLT
.L19:
	addq	%rbp, %r13
	leaq	0(%rbp,%r12,8), %rax
	movq	%rbp, (%rbx)
	movq	%r13, 8(%rbx)
	movq	%rax, 16(%rbx)
.L14:
	popq	%rbx
	.cfi_def_cfa_offset 40
	popq	%rbp
	.cfi_def_cfa_offset 32
	popq	%r12
	.cfi_def_cfa_offset 24
	popq	%r13
	.cfi_def_cfa_offset 16
	popq	%r14
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE4755:
	.size	_ZNSt6vectorIdSaIdEE7reserveEm, .-_ZNSt6vectorIdSaIdEE7reserveEm
	.section	.rodata._ZNSt6vectorIdSaIdEE9push_backERKd.str1.1,"aMS",@progbits,1
.LC1:
	.string	"vector::_M_realloc_insert"
	.section	.text._ZNSt6vectorIdSaIdEE9push_backERKd,"axG",@progbits,_ZNSt6vectorIdSaIdEE9push_backERKd,comdat
	.align 2
	.weak	_ZNSt6vectorIdSaIdEE9push_backERKd
	.type	_ZNSt6vectorIdSaIdEE9push_backERKd, @function
_ZNSt6vectorIdSaIdEE9push_backERKd:
.LFB4761:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	movq	%rsi, %r15
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	movq	%rdi, %rbx
	pushq	%rdx
	.cfi_def_cfa_offset 64
	movq	8(%rdi), %rdx
	cmpq	16(%rdi), %rdx
	je	.L25
	movsd	(%rsi), %xmm0
	addq	$8, %rdx
	movsd	%xmm0, -8(%rdx)
	movq	%rdx, 8(%rdi)
	jmp	.L24
.L25:
	movabsq	$1152921504606846975, %rbp
	movq	(%rdi), %r13
	movq	%rdx, %r14
	subq	%r13, %r14
	movq	%r14, %rax
	sarq	$3, %rax
	cmpq	%rbp, %rax
	jne	.L27
	leaq	.LC1(%rip), %rdi
	call	_ZSt20__throw_length_errorPKc@PLT
.L27:
	cmpq	%r13, %rdx
	movl	$1, %edx
	cmovne	%rax, %rdx
	addq	%rdx, %rax
	jc	.L31
	movabsq	$1152921504606846975, %rbp
	cmpq	%rbp, %rax
	cmovbe	%rax, %rbp
.L31:
	movq	%rbp, %rdi
	call	_ZNSt12_Vector_baseIdSaIdEE11_M_allocateEm.isra.0
	movsd	(%r15), %xmm0
	movq	%rax, %r12
	movsd	%xmm0, (%rax,%r14)
	testq	%r14, %r14
	jle	.L32
	movq	%r14, %rdx
	movq	%r13, %rsi
	movq	%rax, %rdi
	call	memmove@PLT
.L32:
	leaq	8(%r12,%r14), %r14
	testq	%r13, %r13
	je	.L33
	movq	16(%rbx), %rsi
	movq	%r13, %rdi
	subq	%r13, %rsi
	call	_ZdlPvm@PLT
.L33:
	leaq	(%r12,%rbp,8), %rax
	movq	%r12, (%rbx)
	movq	%r14, 8(%rbx)
	movq	%rax, 16(%rbx)
.L24:
	popq	%rax
	.cfi_def_cfa_offset 56
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE4761:
	.size	_ZNSt6vectorIdSaIdEE9push_backERKd, .-_ZNSt6vectorIdSaIdEE9push_backERKd
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC2:
	.string	"IMPT_source.dat"
.LC3:
	.string	"Error, IMPT_source not found"
	.text
	.globl	_Z13getSourceFileRSt6vectorIdSaIdEES2_S2_S2_S2_S2_S2_S2_S2_S2_S2_Ri
	.type	_Z13getSourceFileRSt6vectorIdSaIdEES2_S2_S2_S2_S2_S2_S2_S2_S2_S2_Ri, @function
_Z13getSourceFileRSt6vectorIdSaIdEES2_S2_S2_S2_S2_S2_S2_S2_S2_S2_Ri:
.LFB4386:
	.cfi_startproc
	.cfi_personality 0x9b,DW.ref.__gxx_personality_v0
	.cfi_lsda 0x1b,.LLSDA4386
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	movl	$8, %edx
	leaq	.LC2(%rip), %rsi
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$1096, %rsp
	.cfi_def_cfa_offset 1152
	movq	1152(%rsp), %rax
	movq	%rdi, 48(%rsp)
	movq	1160(%rsp), %r15
	movq	1168(%rsp), %rbp
	movq	%rax, 56(%rsp)
	movq	1176(%rsp), %r12
	movq	1184(%rsp), %r13
	movq	1192(%rsp), %rbx
	movq	%fs:40, %rax
	movq	%rax, 1080(%rsp)
	xorl	%eax, %eax
	leaq	192(%rsp), %rax
	movb	$0, 192(%rsp)
	movq	%rax, 176(%rsp)
	xorl	%eax, %eax
	movq	%rax, 184(%rsp)
	leaq	560(%rsp), %rax
	movq	%rax, %rdi
	movq	%rax, (%rsp)
.LEHB0:
	call	_ZNSt14basic_ifstreamIcSt11char_traitsIcEEC1EPKcSt13_Ios_Openmode@PLT
.LEHE0:
	testb	$5, 848(%rsp)
	je	.L41
	leaq	.LC3(%rip), %rsi
	leaq	_ZSt4cout(%rip), %rdi
.LEHB1:
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movq	%rax, %rdi
	call	_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_@PLT
	jmp	.L42
.L41:
	movq	(%rsp), %rdi
	leaq	76(%rsp), %rsi
	call	_ZNSirsERi@PLT
	movq	(%rsp), %rdi
	leaq	80(%rsp), %rsi
	call	_ZNSi10_M_extractIlEERSiRT_@PLT
.LEHE1:
	movq	80(%rsp), %rax
	xorl	%esi, %esi
	xorl	%edi, %edi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	xorl	%r10d, %r10d
	movl	%eax, (%rbx)
	xorl	%r11d, %r11d
	xorl	%ebx, %ebx
	xorl	%r14d, %r14d
	leaq	208(%rsp), %rax
	movq	%rsi, 312(%rsp)
	movq	%rax, 8(%rsp)
	leaq	224(%rsp), %rax
	movq	%rax, 208(%rsp)
	xorl	%eax, %eax
	movq	%rax, 216(%rsp)
	leaq	256(%rsp), %rax
	movq	%rax, 240(%rsp)
	leaq	288(%rsp), %rax
	movq	%rax, 272(%rsp)
	leaq	320(%rsp), %rax
	movq	%rax, 304(%rsp)
	leaq	352(%rsp), %rax
	movq	%rax, 336(%rsp)
	leaq	384(%rsp), %rax
	movq	%rax, 368(%rsp)
	leaq	416(%rsp), %rax
	movq	%rax, 400(%rsp)
	leaq	448(%rsp), %rax
	movq	%rax, 432(%rsp)
	leaq	480(%rsp), %rax
	movq	%rax, 464(%rsp)
	leaq	512(%rsp), %rax
	movq	%rax, 496(%rsp)
	leaq	544(%rsp), %rax
	movq	%rdi, 344(%rsp)
	movb	$0, 224(%rsp)
	movq	%rdx, 248(%rsp)
	movb	$0, 256(%rsp)
	movq	%rcx, 280(%rsp)
	movb	$0, 288(%rsp)
	movb	$0, 320(%rsp)
	movb	$0, 352(%rsp)
	movq	%r8, 376(%rsp)
	movb	$0, 384(%rsp)
	movq	%r9, 408(%rsp)
	movb	$0, 416(%rsp)
	movq	%r10, 440(%rsp)
	movb	$0, 448(%rsp)
	movq	%r11, 472(%rsp)
	movb	$0, 480(%rsp)
	movq	%rbx, 504(%rsp)
	movb	$0, 512(%rsp)
	movq	8(%rsp), %rsi
	movq	%rax, 528(%rsp)
	leaq	240(%rsp), %rax
	movq	(%rsp), %rdi
	movq	%rax, 16(%rsp)
	leaq	272(%rsp), %rax
	movq	%rax, 24(%rsp)
	leaq	304(%rsp), %rax
	movq	%rax, 32(%rsp)
	leaq	336(%rsp), %rax
	movq	%r14, 536(%rsp)
	movb	$0, 544(%rsp)
	movq	%rax, 40(%rsp)
.LEHB2:
	call	_ZStrsIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE@PLT
	movq	16(%rsp), %rsi
	movq	(%rsp), %rdi
	call	_ZStrsIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE@PLT
	movq	24(%rsp), %rsi
	movq	(%rsp), %rdi
	call	_ZStrsIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE@PLT
	movq	32(%rsp), %rsi
	movq	(%rsp), %rdi
	call	_ZStrsIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE@PLT
	movq	40(%rsp), %rsi
	movq	(%rsp), %rdi
	call	_ZStrsIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE@PLT
	movq	(%rsp), %rdi
	leaq	368(%rsp), %rsi
	call	_ZStrsIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE@PLT
	movq	(%rsp), %rdi
	leaq	464(%rsp), %rsi
	call	_ZStrsIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE@PLT
	movq	(%rsp), %rdi
	leaq	496(%rsp), %rsi
	call	_ZStrsIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE@PLT
	movq	(%rsp), %rdi
	leaq	400(%rsp), %rsi
	call	_ZStrsIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE@PLT
	movq	(%rsp), %rdi
	leaq	432(%rsp), %rsi
	call	_ZStrsIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE@PLT
	movq	(%rsp), %rdi
	leaq	528(%rsp), %rsi
	call	_ZStrsIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE@PLT
	movq	80(%rsp), %rsi
	movq	%rbp, %rdi
	call	_ZNSt6vectorIdSaIdEE7reserveEm
	movq	80(%rsp), %rsi
	movq	%r12, %rdi
	call	_ZNSt6vectorIdSaIdEE7reserveEm
	movq	80(%rsp), %rsi
	movq	%r13, %rdi
	call	_ZNSt6vectorIdSaIdEE7reserveEm
	movq	80(%rsp), %rsi
	movq	48(%rsp), %rdi
	call	_ZNSt6vectorIdSaIdEE7reserveEm
	xorl	%ebx, %ebx
	leaq	88(%rsp), %r14
.L43:
	cmpq	%rbx, 80(%rsp)
	jle	.L57
	movq	(%rsp), %rdi
	movq	%r14, %rsi
	call	_ZNSirsERd.isra.0
	movq	(%rsp), %rdi
	leaq	96(%rsp), %rsi
	call	_ZNSirsERd.isra.0
	movq	(%rsp), %rdi
	leaq	104(%rsp), %rsi
	call	_ZNSirsERd.isra.0
	movq	(%rsp), %rdi
	leaq	112(%rsp), %rsi
	call	_ZNSirsERd.isra.0
	movq	(%rsp), %rdi
	leaq	120(%rsp), %rsi
	call	_ZNSirsERd.isra.0
	movq	(%rsp), %rdi
	leaq	128(%rsp), %rsi
	call	_ZNSirsERd.isra.0
	movq	(%rsp), %rdi
	leaq	136(%rsp), %rsi
	call	_ZNSirsERd.isra.0
	movq	(%rsp), %rdi
	leaq	144(%rsp), %rsi
	call	_ZNSirsERd.isra.0
	movq	(%rsp), %rdi
	leaq	160(%rsp), %rsi
	call	_ZNSirsERd.isra.0
	movq	(%rsp), %rdi
	leaq	168(%rsp), %rsi
	call	_ZNSirsERd.isra.0
	leaq	152(%rsp), %rsi
	leaq	560(%rsp), %rdi
	call	_ZNSirsERd.isra.0
	movq	48(%rsp), %rdi
	movq	%r14, %rsi
	call	_ZNSt6vectorIdSaIdEE9push_backERKd
	movq	56(%rsp), %rdi
	leaq	136(%rsp), %rsi
	call	_ZNSt6vectorIdSaIdEE9push_backERKd
	leaq	144(%rsp), %rsi
	movq	%r15, %rdi
	call	_ZNSt6vectorIdSaIdEE9push_backERKd
	leaq	160(%rsp), %rsi
	movq	%rbp, %rdi
	call	_ZNSt6vectorIdSaIdEE9push_backERKd
	leaq	168(%rsp), %rsi
	movq	%r12, %rdi
	call	_ZNSt6vectorIdSaIdEE9push_backERKd
	leaq	152(%rsp), %rsi
	movq	%r13, %rdi
	call	_ZNSt6vectorIdSaIdEE9push_backERKd
.LEHE2:
	incq	%rbx
	jmp	.L43
.L57:
	leaq	528(%rsp), %rdi
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_disposeEv@PLT
	leaq	496(%rsp), %rdi
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_disposeEv@PLT
	leaq	464(%rsp), %rdi
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_disposeEv@PLT
	leaq	432(%rsp), %rdi
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_disposeEv@PLT
	leaq	400(%rsp), %rdi
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_disposeEv@PLT
	leaq	368(%rsp), %rdi
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_disposeEv@PLT
	movq	40(%rsp), %rdi
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_disposeEv@PLT
	movq	32(%rsp), %rdi
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_disposeEv@PLT
	movq	24(%rsp), %rdi
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_disposeEv@PLT
	movq	16(%rsp), %rdi
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_disposeEv@PLT
	movq	8(%rsp), %rdi
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_disposeEv@PLT
.L42:
	movq	(%rsp), %rdi
	call	_ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev@PLT
	leaq	176(%rsp), %rdi
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_disposeEv@PLT
	movq	1080(%rsp), %rax
	subq	%fs:40, %rax
	je	.L49
	jmp	.L55
.L53:
	endbr64
	movq	%rax, %rbx
.L45:
	leaq	528(%rsp), %rdi
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_disposeEv@PLT
	leaq	496(%rsp), %rdi
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_disposeEv@PLT
	leaq	464(%rsp), %rdi
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_disposeEv@PLT
	leaq	432(%rsp), %rdi
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_disposeEv@PLT
	leaq	400(%rsp), %rdi
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_disposeEv@PLT
	leaq	368(%rsp), %rdi
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_disposeEv@PLT
	movq	40(%rsp), %rdi
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_disposeEv@PLT
	movq	32(%rsp), %rdi
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_disposeEv@PLT
	movq	24(%rsp), %rdi
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_disposeEv@PLT
	movq	16(%rsp), %rdi
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_disposeEv@PLT
	movq	8(%rsp), %rdi
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_disposeEv@PLT
	jmp	.L46
.L52:
	endbr64
	movq	%rax, %rbx
.L46:
	movq	(%rsp), %rdi
	call	_ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev@PLT
	jmp	.L47
.L51:
	endbr64
	movq	%rax, %rbx
.L47:
	leaq	176(%rsp), %rdi
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_disposeEv@PLT
	movq	1080(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L55
	movq	%rbx, %rdi
.LEHB3:
	call	_Unwind_Resume@PLT
.LEHE3:
.L55:
	call	__stack_chk_fail@PLT
.L49:
	addq	$1096, %rsp
	.cfi_def_cfa_offset 56
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE4386:
	.globl	__gxx_personality_v0
	.section	.gcc_except_table,"a",@progbits
.LLSDA4386:
	.byte	0xff
	.byte	0xff
	.byte	0x1
	.uleb128 .LLSDACSE4386-.LLSDACSB4386
.LLSDACSB4386:
	.uleb128 .LEHB0-.LFB4386
	.uleb128 .LEHE0-.LEHB0
	.uleb128 .L51-.LFB4386
	.uleb128 0
	.uleb128 .LEHB1-.LFB4386
	.uleb128 .LEHE1-.LEHB1
	.uleb128 .L52-.LFB4386
	.uleb128 0
	.uleb128 .LEHB2-.LFB4386
	.uleb128 .LEHE2-.LEHB2
	.uleb128 .L53-.LFB4386
	.uleb128 0
	.uleb128 .LEHB3-.LFB4386
	.uleb128 .LEHE3-.LEHB3
	.uleb128 0
	.uleb128 0
.LLSDACSE4386:
	.text
	.size	_Z13getSourceFileRSt6vectorIdSaIdEES2_S2_S2_S2_S2_S2_S2_S2_S2_S2_Ri, .-_Z13getSourceFileRSt6vectorIdSaIdEES2_S2_S2_S2_S2_S2_S2_S2_S2_S2_Ri
	.section	.text._ZNSt6vectorIdSaIdEED2Ev,"axG",@progbits,_ZNSt6vectorIdSaIdEED5Ev,comdat
	.align 2
	.weak	_ZNSt6vectorIdSaIdEED2Ev
	.type	_ZNSt6vectorIdSaIdEED2Ev, @function
_ZNSt6vectorIdSaIdEED2Ev:
.LFB4772:
	.cfi_startproc
	endbr64
	movq	(%rdi), %rax
	testq	%rax, %rax
	je	.L58
	movq	16(%rdi), %rsi
	movq	%rax, %rdi
	subq	%rax, %rsi
	jmp	_ZdlPvm@PLT
.L58:
	ret
	.cfi_endproc
.LFE4772:
	.size	_ZNSt6vectorIdSaIdEED2Ev, .-_ZNSt6vectorIdSaIdEED2Ev
	.weak	_ZNSt6vectorIdSaIdEED1Ev
	.set	_ZNSt6vectorIdSaIdEED1Ev,_ZNSt6vectorIdSaIdEED2Ev
	.section	.rodata.str1.1
.LC6:
	.string	"GyPerMU3D_0"
.LC7:
	.string	"_"
.LC8:
	.string	"MeV_field_"
.LC9:
	.string	"by"
.LC10:
	.string	"spots_"
.LC11:
	.string	"cm2spacing.bin"
.LC12:
	.string	"GyPerMU3D_"
.LC13:
	.string	"Error, no file found"
.LC14:
	.string	"cannot create std::vector larger than max_size()"
.LC16:
	.string	"Writing to binary file"
.LC17:
	.string	"GyPerMU3D_SOBP_"
.LC18:
	.string	"-"
.LC19:
	.string	".bin"
	.section	.text.startup
	.globl	main
	.type	main, @function
main:
.LFB4388:
	.cfi_startproc
	.cfi_personality 0x9b,DW.ref.__gxx_personality_v0
	.cfi_lsda 0x1b,.LLSDA4388
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	xorl	%ecx, %ecx
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%r15
	pushq	%r14
	pushq	%r13
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	movq	%rsi, %r13
	pushq	%r12
	pushq	%rbx
	subq	$1320, %rsp
	.cfi_offset 12, -48
	.cfi_offset 3, -56
	movq	%fs:40, %rax
	movq	%rax, -56(%rbp)
	xorl	%eax, %eax
	leaq	-1152(%rbp), %rax
	movq	%rcx, -1272(%rbp)
	movq	%rcx, -1264(%rbp)
	movq	%rcx, -1256(%rbp)
	movq	%rcx, -1248(%rbp)
	movq	%rcx, -1240(%rbp)
	movq	%rcx, -1232(%rbp)
	movq	%rcx, -1224(%rbp)
	movq	%rcx, -1216(%rbp)
	movq	%rcx, -1208(%rbp)
	movq	%rcx, -1200(%rbp)
	movq	%rcx, -1192(%rbp)
	movq	%rcx, -1184(%rbp)
	movq	%rcx, -1176(%rbp)
	movq	%rcx, -1168(%rbp)
	movq	%rcx, -1160(%rbp)
	movq	%rcx, -1152(%rbp)
	movq	%rcx, -1144(%rbp)
	movq	%rax, -1312(%rbp)
	leaq	-1176(%rbp), %rax
	movq	%rax, -1320(%rbp)
	leaq	-1200(%rbp), %rax
	movq	%rax, -1328(%rbp)
	leaq	-1224(%rbp), %rax
	movq	%rax, -1336(%rbp)
	leaq	-1248(%rbp), %rax
	movq	%rax, -1344(%rbp)
	leaq	-1272(%rbp), %rax
	movq	%rax, -1352(%rbp)
	leaq	-1276(%rbp), %rax
	movq	%rcx, -1136(%rbp)
	movq	%rcx, -1128(%rbp)
	movq	%rcx, -1120(%rbp)
	movq	%rcx, -1112(%rbp)
	movq	%rcx, -1104(%rbp)
	movq	%rcx, -1096(%rbp)
	movq	%rcx, -1088(%rbp)
	movq	%rcx, -1080(%rbp)
	movq	%rcx, -1072(%rbp)
	movq	%rcx, -1064(%rbp)
	movq	%rcx, -1056(%rbp)
	movq	%rcx, -1048(%rbp)
	movq	%rcx, -1040(%rbp)
	movq	%rcx, -1032(%rbp)
	movq	%rcx, -1024(%rbp)
	movq	%rcx, -1016(%rbp)
	pushq	%rax
	leaq	-1032(%rbp), %rax
	movq	%rax, -1360(%rbp)
	pushq	%rax
	leaq	-1056(%rbp), %rax
	pushq	%rax
	leaq	-1080(%rbp), %rax
	pushq	%rax
	leaq	-1104(%rbp), %rax
	pushq	%rax
	leaq	-1128(%rbp), %rax
	movq	-1312(%rbp), %r9
	movq	-1320(%rbp), %r8
	movq	-1328(%rbp), %rcx
	pushq	%rax
	movq	-1336(%rbp), %rdx
	movq	-1344(%rbp), %rsi
	movq	-1352(%rbp), %rdi
.LEHB4:
	.cfi_escape 0x2e,0x30
	call	_Z13getSourceFileRSt6vectorIdSaIdEES2_S2_S2_S2_S2_S2_S2_S2_S2_S2_Ri
	movl	$512000000, %edi
	addq	$48, %rsp
	call	malloc@PLT
	movl	$128000000, %ecx
	movq	%rax, -1296(%rbp)
	movq	-1296(%rbp), %rdi
	xorl	%eax, %eax
	rep stosl
	movl	$2, %edi
	.cfi_escape 0x2e,0
	call	cudaSetDevice@PLT
	movq	8(%r13), %rdi
	call	atoi@PLT
	leal	-1(%rax), %r14d
	movslq	%r14d, %r12
	salq	$3, %r12
.L61:
	movq	16(%r13), %rdi
	leaq	-952(%rbp), %rbx
	call	atoi@PLT
	cmpl	%r14d, %eax
	jle	.L130
	movq	-1080(%rbp), %rax
	movq	%rbx, %rdi
	addq	%r12, %rax
	movq	%rax, -1288(%rbp)
	movq	-1128(%rbp), %rax
	movsd	(%rax,%r12), %xmm0
	movq	-1104(%rbp), %rax
	addsd	(%rax,%r12), %xmm0
	movq	-1288(%rbp), %rax
	xorps	.LC4(%rip), %xmm0
	movsd	(%rax), %xmm1
	subsd	.LC5(%rip), %xmm1
	divsd	%xmm1, %xmm0
	movq	%xmm0, %r15
	call	_ZNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEC1Ev@PLT
.LEHE4:
	leaq	_ZSt5fixedRSt8ios_base(%rip), %rsi
	movq	%rbx, %rdi
	cmpl	$8, %r14d
	jg	.L62
.LEHB5:
	call	_ZNSolsEPFRSt8ios_baseS0_E@PLT
	movq	%rax, %rdi
	leaq	.LC6(%rip), %rsi
.L129:
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movq	%rax, %rdi
	leal	1(%r14), %esi
	call	_ZNSolsEi@PLT
	movq	%rax, %rdi
	leaq	.LC7(%rip), %rsi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movq	%rax, %rdi
	movq	(%rax), %rax
	movq	-24(%rax), %rax
	movq	$1, 8(%rdi,%rax)
	movq	-1272(%rbp), %rax
	movsd	(%rax,%r12), %xmm0
	call	_ZNSo9_M_insertIdEERSoT_@PLT
	movq	%rax, %rdi
	leaq	.LC8(%rip), %rsi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movq	%rax, %rdi
	movq	(%rax), %rax
	xorl	%edx, %edx
	movq	-24(%rax), %rax
	movq	%rdx, 8(%rdi,%rax)
	movq	-1288(%rbp), %rax
	movsd	(%rax), %xmm0
	call	_ZNSo9_M_insertIdEERSoT_@PLT
	leaq	.LC9(%rip), %rbx
	movq	%rax, %rdi
	movq	%rbx, %rsi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movq	%rax, %rdi
	movq	-1056(%rbp), %rax
	movsd	(%rax,%r12), %xmm0
	call	_ZNSo9_M_insertIdEERSoT_@PLT
	movq	%rax, %rdi
	leaq	.LC10(%rip), %rsi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movq	%rax, %rdi
	movq	(%rax), %rax
	movq	%r15, %xmm0
	movq	-24(%rax), %rax
	movq	$2, 8(%rdi,%rax)
	call	_ZNSo9_M_insertIdEERSoT_@PLT
	movq	%rax, %rdi
	movq	%rbx, %rsi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movq	%rax, %rdi
	movq	(%rax), %rax
	movq	%r15, %xmm0
	movq	-24(%rax), %rax
	movq	$2, 8(%rdi,%rax)
	call	_ZNSo9_M_insertIdEERSoT_@PLT
	movq	%rax, %rdi
	leaq	.LC11(%rip), %rsi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	leaq	-984(%rbp), %rbx
	leaq	-944(%rbp), %rsi
	movq	%rbx, %rdi
	call	_ZNKSt7__cxx1115basic_stringbufIcSt11char_traitsIcESaIcEE3strEv@PLT
	jmp	.L131
.L62:
	call	_ZNSolsEPFRSt8ios_baseS0_E@PLT
.LEHE5:
	movq	%rax, %rdi
	leaq	.LC12(%rip), %rsi
	jmp	.L129
.L131:
	movq	%rbx, %rsi
	leaq	_ZSt4cout(%rip), %rdi
.LEHB6:
	call	_ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE@PLT
	movq	%rax, %rdi
	call	_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_@PLT
	leaq	-576(%rbp), %rbx
	movq	-984(%rbp), %rsi
	movl	$12, %edx
	movq	%rbx, %rdi
	call	_ZNSt14basic_ifstreamIcSt11char_traitsIcEEC1EPKcSt13_Ios_Openmode@PLT
.LEHE6:
	testb	$5, -288(%rbp)
	je	.L65
	leaq	.LC13(%rip), %rsi
	leaq	_ZSt4cout(%rip), %rdi
.LEHB7:
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movq	%rax, %rdi
	call	_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_@PLT
	movl	$1, %edi
	call	exit@PLT
.L65:
	movl	$2, %edx
	xorl	%esi, %esi
	movq	%rbx, %rdi
	call	_ZNSi5seekgElSt12_Ios_Seekdir@PLT
	movq	%rbx, %rdi
	call	_ZNSi5tellgEv@PLT
	xorl	%edx, %edx
	xorl	%esi, %esi
	movq	%rbx, %rdi
	movq	%rax, -1304(%rbp)
	call	_ZNSi5seekgElSt12_Ios_Seekdir@PLT
	movq	-1304(%rbp), %r15
	shrq	$3, %r15
	cmpq	$0, -1304(%rbp)
	jns	.L66
	movq	-56(%rbp), %rax
	subq	%fs:40, %rax
	jne	.L100
	leaq	.LC14(%rip), %rdi
	call	_ZSt20__throw_length_errorPKc@PLT
.L66:
	xorl	%eax, %eax
	movq	%r15, %rdi
	movq	%rax, -1000(%rbp)
	movq	%rax, -992(%rbp)
	call	_ZNSt12_Vector_baseIdSaIdEE11_M_allocateEm.isra.0
.LEHE7:
	movq	%rax, %rbx
	movq	%rax, -1008(%rbp)
	leaq	(%rax,%r15,8), %rax
	movq	%rax, -992(%rbp)
	movq	%rbx, -1288(%rbp)
	testq	%r15, %r15
	je	.L68
	leaq	8(%rbx), %rdx
	decq	%r15
	movq	$0x000000000, (%rbx)
	movq	%rdx, -1288(%rbp)
	je	.L68
.L69:
	movq	-1288(%rbp), %rdx
	cmpq	%rdx, %rax
	je	.L68
	movq	-1288(%rbp), %rdx
	addq	$8, -1288(%rbp)
	movq	$0x000000000, (%rdx)
	jmp	.L69
.L68:
	movq	-1288(%rbp), %rax
	leaq	-576(%rbp), %r15
	movq	-1304(%rbp), %rdx
	movq	%rbx, %rsi
	movq	%r15, %rdi
	movq	%rax, -1000(%rbp)
.LEHB8:
	call	_ZNSi4readEPcl@PLT
.LEHE8:
	movl	$512000000, %edi
	call	malloc@PLT
	movq	-1288(%rbp), %rcx
	movq	%rax, %rdx
	subq	%rbx, %rcx
	cmpq	$8, %rcx
	jle	.L71
	movq	%rax, %rdi
	movq	%rbx, %rsi
	rep movsb
	jmp	.L72
.L71:
	jne	.L72
	movsd	(%rbx), %xmm0
	movsd	%xmm0, (%rax)
.L72:
	movq	-1032(%rbp), %rcx
	xorl	%eax, %eax
	addq	%r12, %rcx
.L73:
	movq	-1296(%rbp), %rbx
	movsd	(%rdx,%rax), %xmm0
	mulsd	(%rcx), %xmm0
	addsd	(%rbx,%rax), %xmm0
	movsd	%xmm0, (%rbx,%rax)
	addq	$8, %rax
	cmpq	$512000000, %rax
	jne	.L73
	leaq	-1008(%rbp), %rdi
	incl	%r14d
	addq	$8, %r12
	call	_ZNSt6vectorIdSaIdEED1Ev
	movq	%r15, %rdi
	call	_ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev@PLT
	leaq	-984(%rbp), %rdi
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_disposeEv@PLT
	leaq	-952(%rbp), %rdi
	call	_ZNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEED1Ev@PLT
	jmp	.L61
.L130:
	leaq	.LC16(%rip), %rsi
	leaq	_ZSt4cout(%rip), %rdi
.LEHB9:
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movq	%rax, %rdi
	call	_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_@PLT
	movq	%rbx, %rdi
	call	_ZNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEC1Ev@PLT
.LEHE9:
	leaq	_ZSt5fixedRSt8ios_base(%rip), %rsi
	movq	%rbx, %rdi
.LEHB10:
	call	_ZNSolsEPFRSt8ios_baseS0_E@PLT
	movq	%rax, %rdi
	leaq	.LC17(%rip), %rsi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movq	8(%r13), %rsi
	movq	%rax, %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movq	%rax, %rdi
	leaq	.LC18(%rip), %rsi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movq	16(%r13), %rsi
	movq	%rax, %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movq	%rax, %rdi
	leaq	.LC19(%rip), %rsi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	leaq	-984(%rbp), %r12
	leaq	-944(%rbp), %rsi
	movq	%r12, %rdi
	call	_ZNKSt7__cxx1115basic_stringbufIcSt11char_traitsIcESaIcEE3strEv@PLT
.LEHE10:
	leaq	-576(%rbp), %rax
	movq	-984(%rbp), %rsi
	movl	$20, %edx
	movq	%rax, %rdi
	movq	%rax, %r14
.LEHB11:
	call	_ZNSt14basic_ofstreamIcSt11char_traitsIcEEC1EPKcSt13_Ios_Openmode@PLT
.LEHE11:
	movq	-1296(%rbp), %rsi
	movl	$512000000, %edx
	movq	%r14, %rdi
.LEHB12:
	call	_ZNSo5writeEPKcl@PLT
.LEHE12:
	movq	%r14, %rdi
	call	_ZNSt14basic_ofstreamIcSt11char_traitsIcEED1Ev@PLT
	movq	%r12, %rdi
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_disposeEv@PLT
	movq	%rbx, %rdi
	call	_ZNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEED1Ev@PLT
	movq	-1360(%rbp), %rdi
	call	_ZNSt6vectorIdSaIdEED1Ev
	leaq	-1056(%rbp), %rdi
	call	_ZNSt6vectorIdSaIdEED1Ev
	leaq	-1080(%rbp), %rdi
	call	_ZNSt6vectorIdSaIdEED1Ev
	leaq	-1104(%rbp), %rdi
	call	_ZNSt6vectorIdSaIdEED1Ev
	leaq	-1128(%rbp), %rdi
	call	_ZNSt6vectorIdSaIdEED1Ev
	movq	-1312(%rbp), %rdi
	call	_ZNSt6vectorIdSaIdEED1Ev
	movq	-1320(%rbp), %rdi
	call	_ZNSt6vectorIdSaIdEED1Ev
	movq	-1328(%rbp), %rdi
	call	_ZNSt6vectorIdSaIdEED1Ev
	movq	-1336(%rbp), %rdi
	call	_ZNSt6vectorIdSaIdEED1Ev
	movq	-1344(%rbp), %rdi
	call	_ZNSt6vectorIdSaIdEED1Ev
	movq	-1352(%rbp), %rdi
	call	_ZNSt6vectorIdSaIdEED1Ev
	movq	-56(%rbp), %rax
	subq	%fs:40, %rax
	je	.L84
	jmp	.L100
.L90:
	endbr64
	movq	%rax, %r13
.L75:
	leaq	-1008(%rbp), %rdi
	call	_ZNSt6vectorIdSaIdEED1Ev
	jmp	.L76
.L89:
	endbr64
	movq	%rax, %r13
.L76:
	leaq	-576(%rbp), %rdi
	call	_ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev@PLT
	jmp	.L77
.L88:
	endbr64
	movq	%rax, %r13
.L77:
	leaq	-984(%rbp), %rdi
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_disposeEv@PLT
	jmp	.L78
.L87:
	endbr64
	movq	%rax, %r13
.L78:
	leaq	-952(%rbp), %rdi
	jmp	.L104
.L93:
	endbr64
	movq	%rax, %r13
.L80:
	movq	%r14, %rdi
	call	_ZNSt14basic_ofstreamIcSt11char_traitsIcEED1Ev@PLT
	jmp	.L81
.L92:
	endbr64
	movq	%rax, %r13
.L81:
	movq	%r12, %rdi
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_disposeEv@PLT
	jmp	.L82
.L91:
	endbr64
	movq	%rax, %r13
.L82:
	movq	%rbx, %rdi
.L104:
	call	_ZNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEED1Ev@PLT
	jmp	.L79
.L86:
	endbr64
	movq	%rax, %r13
.L79:
	movq	-1360(%rbp), %rdi
	call	_ZNSt6vectorIdSaIdEED1Ev
	leaq	-1056(%rbp), %rdi
	call	_ZNSt6vectorIdSaIdEED1Ev
	leaq	-1080(%rbp), %rdi
	call	_ZNSt6vectorIdSaIdEED1Ev
	leaq	-1104(%rbp), %rdi
	call	_ZNSt6vectorIdSaIdEED1Ev
	leaq	-1128(%rbp), %rdi
	call	_ZNSt6vectorIdSaIdEED1Ev
	movq	-1312(%rbp), %rdi
	call	_ZNSt6vectorIdSaIdEED1Ev
	movq	-1320(%rbp), %rdi
	call	_ZNSt6vectorIdSaIdEED1Ev
	movq	-1328(%rbp), %rdi
	call	_ZNSt6vectorIdSaIdEED1Ev
	movq	-1336(%rbp), %rdi
	call	_ZNSt6vectorIdSaIdEED1Ev
	movq	-1344(%rbp), %rdi
	call	_ZNSt6vectorIdSaIdEED1Ev
	movq	-1352(%rbp), %rdi
	call	_ZNSt6vectorIdSaIdEED1Ev
	movq	-56(%rbp), %rax
	subq	%fs:40, %rax
	jne	.L100
	movq	%r13, %rdi
.LEHB13:
	call	_Unwind_Resume@PLT
.LEHE13:
.L100:
	call	__stack_chk_fail@PLT
.L84:
	leaq	-40(%rbp), %rsp
	xorl	%eax, %eax
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE4388:
	.section	.gcc_except_table
.LLSDA4388:
	.byte	0xff
	.byte	0xff
	.byte	0x1
	.uleb128 .LLSDACSE4388-.LLSDACSB4388
.LLSDACSB4388:
	.uleb128 .LEHB4-.LFB4388
	.uleb128 .LEHE4-.LEHB4
	.uleb128 .L86-.LFB4388
	.uleb128 0
	.uleb128 .LEHB5-.LFB4388
	.uleb128 .LEHE5-.LEHB5
	.uleb128 .L87-.LFB4388
	.uleb128 0
	.uleb128 .LEHB6-.LFB4388
	.uleb128 .LEHE6-.LEHB6
	.uleb128 .L88-.LFB4388
	.uleb128 0
	.uleb128 .LEHB7-.LFB4388
	.uleb128 .LEHE7-.LEHB7
	.uleb128 .L89-.LFB4388
	.uleb128 0
	.uleb128 .LEHB8-.LFB4388
	.uleb128 .LEHE8-.LEHB8
	.uleb128 .L90-.LFB4388
	.uleb128 0
	.uleb128 .LEHB9-.LFB4388
	.uleb128 .LEHE9-.LEHB9
	.uleb128 .L86-.LFB4388
	.uleb128 0
	.uleb128 .LEHB10-.LFB4388
	.uleb128 .LEHE10-.LEHB10
	.uleb128 .L91-.LFB4388
	.uleb128 0
	.uleb128 .LEHB11-.LFB4388
	.uleb128 .LEHE11-.LEHB11
	.uleb128 .L92-.LFB4388
	.uleb128 0
	.uleb128 .LEHB12-.LFB4388
	.uleb128 .LEHE12-.LEHB12
	.uleb128 .L93-.LFB4388
	.uleb128 0
	.uleb128 .LEHB13-.LFB4388
	.uleb128 .LEHE13-.LEHB13
	.uleb128 0
	.uleb128 0
.LLSDACSE4388:
	.section	.text.startup
	.size	main, .-main
	.section	.nvFatBinSegment,"aw"
	.align 8
	.type	_ZL15__fatDeviceText, @object
	.size	_ZL15__fatDeviceText, 24
_ZL15__fatDeviceText:
	.long	1180844977
	.long	1
	.quad	fatbinData
	.quad	0
	.local	_ZL20__cudaFatCubinHandle
	.comm	_ZL20__cudaFatCubinHandle,8,8
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC4:
	.long	0
	.long	-2147483648
	.long	0
	.long	0
	.section	.rodata.cst8,"aM",@progbits,8
	.align 8
.LC5:
	.long	0
	.long	1072693248
	.hidden	DW.ref.__gxx_personality_v0
	.weak	DW.ref.__gxx_personality_v0
	.section	.data.rel.local.DW.ref.__gxx_personality_v0,"awG",@progbits,DW.ref.__gxx_personality_v0,comdat
	.align 8
	.type	DW.ref.__gxx_personality_v0, @object
	.size	DW.ref.__gxx_personality_v0, 8
DW.ref.__gxx_personality_v0:
	.quad	__gxx_personality_v0
	.ident	"GCC: (Ubuntu 13.3.0-6ubuntu2~24.04) 13.3.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:


#include <hip/hip_runtime.h>
#include <fstream>
#include <iterator>
#include <vector>
#include <iostream>
#include <cstdlib>
#include <string>
#include <sstream>
#include <iomanip>
#include <math.h>
#include <stdio.h>

#define energySize 64000000
#define blockSize 256

//define macro for error checking
#define cudaCheckError(){	   												  \
	hipError_t err = hipGetLastError();											  \
	if(err != hipSuccess){              											  \
		std::cout << "Error in " << __FILE__ << " at line " << __LINE__ << " : " <<  hipGetErrorString(err) << std::endl; \
		exit(EXIT_FAILURE);                 										  \
	}                                     											  \
}

void getSourceFile(std::vector<double>& eNomVec, std::vector<double>& rangeVec, 
			std::vector<double>& sigmaXVec,std::vector<double>& sigmaYVec, 
			std::vector<double>& eMeanVec, std::vector<double>& sigmaEVec, 
			std::vector<double>& xVec, std::vector<double>& yVec, 
			std::vector<double>& nxVec,std::vector<double>& nyVec,
			std::vector<double>& weightVec, int& numGroups) 
{
	int dateOfMeasurement;
	long int numberOfGroups;
	double  eNom, range, sigmaX, sigmaY, eMean, sigmaE, xcoord, ycoord, weight, nx, ny;
	
	std::string line;
	//declare and open file
	std::ifstream ifile("IMPT_source.dat", std::ios::in);
	if(!ifile){
		std::cout << "Error, IMPT_source not found" << std::endl;
	}else{
		//read in date of measurement
		ifile >> dateOfMeasurement;
	
		//read in number of groups
		ifile >> numberOfGroups;
		numGroups = numberOfGroups;
		
		//skip over header line
		std::string e, r, x, y, m, s, nx1, ny1, x1, y1, w;
		ifile >> e;
		ifile >> r;
		ifile >> x;
		ifile >> y;
		ifile >> m;
		ifile >> s;
		ifile >> x1;
		ifile >> y1;
		ifile >> nx1;
		ifile >> ny1;
		ifile >> w;
	
		//intialize memory for faster read in 
//		xVec.reserve(numberOfGroups);
//		yVec.reserve(numberOfGroups);
		nxVec.reserve(numberOfGroups);
		nyVec.reserve(numberOfGroups);
		weightVec.reserve(numberOfGroups);
		eNomVec.reserve(numberOfGroups);					
		//read in data to vectors
		for(int i = 0; i < numberOfGroups; i++){
			ifile >> eNom;
			ifile >> range;
			ifile >> sigmaX;
			ifile >> sigmaY;
			ifile >> eMean;
			ifile >> sigmaE;
			ifile >> xcoord;
			ifile >> ycoord;
			ifile >> nx;
			ifile >> ny;
			ifile >> weight;

			eNomVec.push_back(eNom);
//			rangeVec.push_back(range);
//			sigmaXVec.push_back(sigmaX);
//			sigmaYVec.push_back(sigmaY);
//			eMeanVec.push_back(eMean);
			xVec.push_back(xcoord);
			yVec.push_back(ycoord);
			nxVec.push_back(nx);
			nyVec.push_back(ny);
			weightVec.push_back(weight);
		}
	}
}

int main(int argc, char** argv){
	int numberOfGroups;
	std::vector<double> eNom, range, sigmaX, sigmaY, eMean, sigmaE, xCoord, yCoord, nx, ny, weight;
	getSourceFile(eNom, range, sigmaX, sigmaY, eMean, sigmaE, xCoord, yCoord, nx, ny, weight, numberOfGroups);
	
	double* finalEnergy;
	finalEnergy = (double*)malloc(energySize*sizeof(double));
	memset(finalEnergy, 0, energySize*sizeof(double));	
	//do not use device 1 for anything
	hipSetDevice(2);

	for(int master = atoi(argv[1])-1; master < atoi(argv[2]); master++){
		
		double fieldSize = -1*(xCoord[master]+yCoord[master])/(nx[master]-1);

		//declare stream size variables and open file/check for errors
		std::streampos bufferSize;

		//create fileName to read in data
		std::ostringstream fName;
		if(master < 9){
			fName << std::fixed << "GyPerMU3D_0" << master+1 << "_" << std::setprecision(1) << eNom[master] << "MeV_field_" << std::setprecision(0) << nx[master] << "by" 
			      << ny[master] << "spots_" << std::setprecision(2) <<  fieldSize << "by" << std::setprecision(2) <<  fieldSize << "cm2spacing.bin";
		}else{
			fName << std::fixed << "GyPerMU3D_" << master+1 << "_" << std::setprecision(1) << eNom[master] << "MeV_field_" << std::setprecision(0) << nx[master] << "by" 
			      << ny[master] << "spots_" << std::setprecision(2) <<  fieldSize << "by" << std::setprecision(2) <<  fieldSize << "cm2spacing.bin";
		}
		std::string fileName = fName.str();
		std::cout << fileName << std::endl;
		std::ifstream ifile(fileName.c_str(), std::ios::in | std::ios::binary);
		if(!ifile){
			std::cout << "Error, no file found" << std::endl;
			exit(1);
		}
		
		//get file size
		ifile.seekg(0, std::ios::end);
		bufferSize = ifile.tellg();
		ifile.seekg(0, std::ios::beg);

		//declare buffer
		std::vector<double> buffer(bufferSize/sizeof(double));
		
		//read in data
		ifile.read(reinterpret_cast<char*>(buffer.data()), bufferSize); 

		int size = bufferSize/(sizeof(double)*400);
		
		//copy memory from buffer to energy
		double *energy;
		energy = (double*)malloc(energySize*sizeof(double));
		std::copy(buffer.begin(), buffer.end(), energy);

		for(int i = 0; i < energySize ;i++){
			finalEnergy[i] += energy[i]*weight[master];
		}
	}//end of master loop
	
	std::cout << "Writing to binary file" << std::endl;
	std::ostringstream OName;
	OName << std::fixed << "GyPerMU3D_SOBP_" << argv[1] << "-" << argv[2] << ".bin";
	std::string fileNameOut = OName.str();
	std::ofstream ofile(fileNameOut.c_str() , std::ios::out | std::ios::binary);
	ofile.write(reinterpret_cast<char*>(finalEnergy), energySize*sizeof(double));

}

	.text
	.file	"sumFieldsForSOBP.hip"
                                        # Start of file scope inline assembly
	.globl	_ZSt21ios_base_library_initv

                                        # End of file scope inline assembly
	.globl	_Z13getSourceFileRSt6vectorIdSaIdEES2_S2_S2_S2_S2_S2_S2_S2_S2_S2_Ri # -- Begin function _Z13getSourceFileRSt6vectorIdSaIdEES2_S2_S2_S2_S2_S2_S2_S2_S2_S2_Ri
	.type	_Z13getSourceFileRSt6vectorIdSaIdEES2_S2_S2_S2_S2_S2_S2_S2_S2_S2_Ri,@function
_Z13getSourceFileRSt6vectorIdSaIdEES2_S2_S2_S2_S2_S2_S2_S2_S2_S2_Ri: # @_Z13getSourceFileRSt6vectorIdSaIdEES2_S2_S2_S2_S2_S2_S2_S2_S2_S2_Ri
.Lfunc_begin0:
	.cfi_startproc
	.cfi_personality 3, __gxx_personality_v0
	.cfi_lsda 3, .Lexception0
# %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	pushq	%r15
	.cfi_def_cfa_offset 24
	pushq	%r14
	.cfi_def_cfa_offset 32
	pushq	%r13
	.cfi_def_cfa_offset 40
	pushq	%r12
	.cfi_def_cfa_offset 48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	subq	$1016, %rsp                     # imm = 0x3F8
	.cfi_def_cfa_offset 1072
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	.cfi_offset %rbp, -16
	movq	%rdi, %rbx
	leaq	440(%rsp), %r14
	movq	%r14, -16(%r14)
	movq	$0, -8(%r14)
	movb	$0, (%r14)
.Ltmp0:
	leaq	496(%rsp), %rdi
	movl	$.L.str, %esi
	movl	$8, %edx
	callq	_ZNSt14basic_ifstreamIcSt11char_traitsIcEEC1EPKcSt13_Ios_Openmode
.Ltmp1:
# %bb.1:
	movq	496(%rsp), %rax
	movq	-24(%rax), %rax
	testb	$5, 528(%rsp,%rax)
	je	.LBB0_10
# %bb.2:
.Ltmp3:
	movl	$_ZSt4cout, %ebx
	movl	$_ZSt4cout, %edi
	movl	$.L.str.1, %esi
	movl	$28, %edx
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
.Ltmp4:
# %bb.3:                                # %_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc.exit
	movq	_ZSt4cout(%rip), %rax
	addq	-24(%rax), %rbx
.Ltmp5:
	movq	%rbx, %rdi
	movl	$10, %esi
	callq	_ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc
.Ltmp6:
# %bb.4:                                # %.noexc116
.Ltmp7:
	movsbl	%al, %esi
	movl	$_ZSt4cout, %edi
	callq	_ZNSo3putEc
.Ltmp8:
# %bb.5:                                # %.noexc117
.Ltmp9:
	movq	%rax, %rdi
	callq	_ZNSo5flushEv
.Ltmp10:
	jmp	.LBB0_6
.LBB0_10:
.Ltmp11:
	leaq	496(%rsp), %rdi
	leaq	68(%rsp), %rsi
	callq	_ZNSirsERi
.Ltmp12:
# %bb.11:
.Ltmp13:
	leaq	496(%rsp), %rdi
	leaq	8(%rsp), %rsi
	callq	_ZNSi10_M_extractIlEERSiRT_
.Ltmp14:
# %bb.12:                               # %_ZNSirsERl.exit
	movq	1112(%rsp), %rax
	movl	8(%rsp), %ecx
	movl	%ecx, (%rax)
	leaq	408(%rsp), %rcx
	movq	%rcx, -16(%rcx)
	xorl	%eax, %eax
	movq	%rax, -8(%rcx)
	movb	%al, (%rcx)
	leaq	376(%rsp), %rcx
	movq	%rcx, -16(%rcx)
	movq	%rax, -8(%rcx)
	movb	%al, (%rcx)
	leaq	344(%rsp), %rcx
	movq	%rcx, -16(%rcx)
	movq	%rax, -8(%rcx)
	movb	%al, (%rcx)
	leaq	312(%rsp), %rcx
	movq	%rcx, -16(%rcx)
	movq	%rax, -8(%rcx)
	movb	%al, (%rcx)
	leaq	280(%rsp), %rcx
	movq	%rcx, -16(%rcx)
	movq	%rax, -8(%rcx)
	movb	%al, (%rcx)
	leaq	248(%rsp), %rcx
	movq	%rcx, -16(%rcx)
	movq	%rax, -8(%rcx)
	movb	%al, (%rcx)
	leaq	216(%rsp), %rcx
	movq	%rcx, -16(%rcx)
	movq	%rax, -8(%rcx)
	movb	%al, (%rcx)
	leaq	184(%rsp), %rcx
	movq	%rcx, -16(%rcx)
	movq	%rax, -8(%rcx)
	movb	%al, (%rcx)
	leaq	152(%rsp), %rcx
	movq	%rcx, -16(%rcx)
	movq	%rax, -8(%rcx)
	movb	%al, (%rcx)
	leaq	120(%rsp), %rcx
	movq	%rcx, -16(%rcx)
	movq	%rax, -8(%rcx)
	movb	%al, (%rcx)
	leaq	88(%rsp), %rcx
	movq	%rcx, -16(%rcx)
	movq	%rax, -8(%rcx)
	movb	%al, (%rcx)
.Ltmp16:
	leaq	496(%rsp), %rdi
	leaq	392(%rsp), %rsi
	callq	_ZStrsIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE
.Ltmp17:
# %bb.13:
.Ltmp18:
	leaq	496(%rsp), %rdi
	leaq	360(%rsp), %rsi
	callq	_ZStrsIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE
.Ltmp19:
# %bb.14:
.Ltmp20:
	leaq	496(%rsp), %rdi
	leaq	328(%rsp), %rsi
	callq	_ZStrsIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE
.Ltmp21:
# %bb.15:
.Ltmp22:
	leaq	496(%rsp), %rdi
	leaq	296(%rsp), %rsi
	callq	_ZStrsIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE
.Ltmp23:
# %bb.16:
.Ltmp24:
	leaq	496(%rsp), %rdi
	leaq	264(%rsp), %rsi
	callq	_ZStrsIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE
.Ltmp25:
# %bb.17:
.Ltmp26:
	leaq	496(%rsp), %rdi
	leaq	232(%rsp), %rsi
	callq	_ZStrsIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE
.Ltmp27:
# %bb.18:
.Ltmp28:
	leaq	496(%rsp), %rdi
	leaq	136(%rsp), %rsi
	callq	_ZStrsIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE
.Ltmp29:
# %bb.19:
.Ltmp30:
	leaq	496(%rsp), %rdi
	leaq	104(%rsp), %rsi
	callq	_ZStrsIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE
.Ltmp31:
# %bb.20:
.Ltmp32:
	leaq	496(%rsp), %rdi
	leaq	200(%rsp), %rsi
	callq	_ZStrsIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE
.Ltmp33:
# %bb.21:
.Ltmp34:
	leaq	496(%rsp), %rdi
	leaq	168(%rsp), %rsi
	callq	_ZStrsIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE
.Ltmp35:
# %bb.22:
.Ltmp36:
	leaq	496(%rsp), %rdi
	leaq	72(%rsp), %rsi
	callq	_ZStrsIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE
.Ltmp37:
# %bb.23:
	movq	1088(%rsp), %rdi
	movq	8(%rsp), %rsi
.Ltmp38:
	callq	_ZNSt6vectorIdSaIdEE7reserveEm
.Ltmp39:
# %bb.24:
	movq	1096(%rsp), %rdi
	movq	8(%rsp), %rsi
.Ltmp40:
	callq	_ZNSt6vectorIdSaIdEE7reserveEm
.Ltmp41:
# %bb.25:
	movq	1104(%rsp), %r12
	movq	8(%rsp), %rsi
.Ltmp42:
	movq	%r12, %rdi
	callq	_ZNSt6vectorIdSaIdEE7reserveEm
.Ltmp43:
# %bb.26:
	movq	8(%rsp), %rsi
.Ltmp44:
	movq	%rbx, %rdi
	callq	_ZNSt6vectorIdSaIdEE7reserveEm
.Ltmp45:
# %bb.27:                               # %.preheader
	cmpq	$0, 8(%rsp)
	jle	.LBB0_42
# %bb.28:                               # %.lr.ph
	movq	1080(%rsp), %r13
	movq	1072(%rsp), %rbp
	xorl	%r15d, %r15d
	leaq	496(%rsp), %r14
.LBB0_29:                               # =>This Inner Loop Header: Depth=1
.Ltmp47:
	movq	%r14, %rdi
	leaq	56(%rsp), %rsi
	callq	_ZNSi10_M_extractIdEERSiRT_
.Ltmp48:
# %bb.30:                               # %_ZNSirsERd.exit
                                        #   in Loop: Header=BB0_29 Depth=1
.Ltmp49:
	movq	%r14, %rdi
	leaq	488(%rsp), %rsi
	callq	_ZNSi10_M_extractIdEERSiRT_
.Ltmp50:
# %bb.31:                               # %_ZNSirsERd.exit52
                                        #   in Loop: Header=BB0_29 Depth=1
.Ltmp51:
	movq	%r14, %rdi
	leaq	480(%rsp), %rsi
	callq	_ZNSi10_M_extractIdEERSiRT_
.Ltmp52:
# %bb.32:                               # %_ZNSirsERd.exit53
                                        #   in Loop: Header=BB0_29 Depth=1
.Ltmp53:
	movq	%r14, %rdi
	leaq	472(%rsp), %rsi
	callq	_ZNSi10_M_extractIdEERSiRT_
.Ltmp54:
# %bb.33:                               # %_ZNSirsERd.exit54
                                        #   in Loop: Header=BB0_29 Depth=1
.Ltmp55:
	movq	%r14, %rdi
	leaq	464(%rsp), %rsi
	callq	_ZNSi10_M_extractIdEERSiRT_
.Ltmp56:
# %bb.34:                               # %_ZNSirsERd.exit55
                                        #   in Loop: Header=BB0_29 Depth=1
.Ltmp57:
	movq	%r14, %rdi
	leaq	456(%rsp), %rsi
	callq	_ZNSi10_M_extractIdEERSiRT_
.Ltmp58:
# %bb.35:                               # %_ZNSirsERd.exit56
                                        #   in Loop: Header=BB0_29 Depth=1
.Ltmp59:
	movq	%r14, %rdi
	leaq	48(%rsp), %rsi
	callq	_ZNSi10_M_extractIdEERSiRT_
.Ltmp60:
# %bb.36:                               # %_ZNSirsERd.exit57
                                        #   in Loop: Header=BB0_29 Depth=1
.Ltmp61:
	movq	%r14, %rdi
	leaq	40(%rsp), %rsi
	callq	_ZNSi10_M_extractIdEERSiRT_
.Ltmp62:
# %bb.37:                               # %_ZNSirsERd.exit58
                                        #   in Loop: Header=BB0_29 Depth=1
.Ltmp63:
	movq	%r14, %rdi
	leaq	24(%rsp), %rsi
	callq	_ZNSi10_M_extractIdEERSiRT_
.Ltmp64:
# %bb.38:                               # %_ZNSirsERd.exit59
                                        #   in Loop: Header=BB0_29 Depth=1
.Ltmp65:
	movq	%r14, %rdi
	leaq	16(%rsp), %rsi
	callq	_ZNSi10_M_extractIdEERSiRT_
.Ltmp66:
# %bb.39:                               # %_ZNSirsERd.exit60
                                        #   in Loop: Header=BB0_29 Depth=1
.Ltmp67:
	movq	%r14, %rdi
	leaq	32(%rsp), %rsi
	callq	_ZNSi10_M_extractIdEERSiRT_
.Ltmp68:
# %bb.40:                               # %_ZNSirsERd.exit61
                                        #   in Loop: Header=BB0_29 Depth=1
	movq	8(%rbx), %rsi
	cmpq	16(%rbx), %rsi
	je	.LBB0_65
# %bb.41:                               #   in Loop: Header=BB0_29 Depth=1
	movsd	56(%rsp), %xmm0                 # xmm0 = mem[0],zero
	movsd	%xmm0, (%rsi)
	addq	$8, %rsi
	movq	%rsi, 8(%rbx)
	jmp	.LBB0_66
.LBB0_65:                               #   in Loop: Header=BB0_29 Depth=1
.Ltmp69:
	movq	%rbx, %rdi
	leaq	56(%rsp), %rdx
	callq	_ZNSt6vectorIdSaIdEE17_M_realloc_insertIJRKdEEEvN9__gnu_cxx17__normal_iteratorIPdS1_EEDpOT_
.Ltmp70:
.LBB0_66:                               # %_ZNSt6vectorIdSaIdEE9push_backERKd.exit
                                        #   in Loop: Header=BB0_29 Depth=1
	movq	8(%rbp), %rsi
	cmpq	16(%rbp), %rsi
	je	.LBB0_68
# %bb.67:                               #   in Loop: Header=BB0_29 Depth=1
	movsd	48(%rsp), %xmm0                 # xmm0 = mem[0],zero
	movsd	%xmm0, (%rsi)
	addq	$8, %rsi
	movq	%rsi, 8(%rbp)
	jmp	.LBB0_69
.LBB0_68:                               #   in Loop: Header=BB0_29 Depth=1
.Ltmp71:
	movq	%rbp, %rdi
	leaq	48(%rsp), %rdx
	callq	_ZNSt6vectorIdSaIdEE17_M_realloc_insertIJRKdEEEvN9__gnu_cxx17__normal_iteratorIPdS1_EEDpOT_
.Ltmp72:
.LBB0_69:                               # %_ZNSt6vectorIdSaIdEE9push_backERKd.exit64
                                        #   in Loop: Header=BB0_29 Depth=1
	movq	8(%r13), %rsi
	cmpq	16(%r13), %rsi
	je	.LBB0_71
# %bb.70:                               #   in Loop: Header=BB0_29 Depth=1
	movsd	40(%rsp), %xmm0                 # xmm0 = mem[0],zero
	movsd	%xmm0, (%rsi)
	addq	$8, %rsi
	movq	%rsi, 8(%r13)
	jmp	.LBB0_72
.LBB0_71:                               #   in Loop: Header=BB0_29 Depth=1
.Ltmp73:
	movq	%r13, %rdi
	leaq	40(%rsp), %rdx
	callq	_ZNSt6vectorIdSaIdEE17_M_realloc_insertIJRKdEEEvN9__gnu_cxx17__normal_iteratorIPdS1_EEDpOT_
.Ltmp74:
.LBB0_72:                               # %_ZNSt6vectorIdSaIdEE9push_backERKd.exit67
                                        #   in Loop: Header=BB0_29 Depth=1
	movq	1088(%rsp), %rdi
	movq	8(%rdi), %rsi
	cmpq	16(%rdi), %rsi
	je	.LBB0_74
# %bb.73:                               #   in Loop: Header=BB0_29 Depth=1
	movsd	24(%rsp), %xmm0                 # xmm0 = mem[0],zero
	movsd	%xmm0, (%rsi)
	addq	$8, %rsi
	movq	%rsi, 8(%rdi)
	jmp	.LBB0_75
.LBB0_74:                               #   in Loop: Header=BB0_29 Depth=1
.Ltmp75:
	leaq	24(%rsp), %rdx
	callq	_ZNSt6vectorIdSaIdEE17_M_realloc_insertIJRKdEEEvN9__gnu_cxx17__normal_iteratorIPdS1_EEDpOT_
.Ltmp76:
.LBB0_75:                               # %_ZNSt6vectorIdSaIdEE9push_backERKd.exit70
                                        #   in Loop: Header=BB0_29 Depth=1
	movq	1096(%rsp), %rdi
	movq	8(%rdi), %rsi
	cmpq	16(%rdi), %rsi
	je	.LBB0_77
# %bb.76:                               #   in Loop: Header=BB0_29 Depth=1
	movsd	16(%rsp), %xmm0                 # xmm0 = mem[0],zero
	movsd	%xmm0, (%rsi)
	addq	$8, %rsi
	movq	%rsi, 8(%rdi)
	jmp	.LBB0_78
.LBB0_77:                               #   in Loop: Header=BB0_29 Depth=1
.Ltmp77:
	leaq	16(%rsp), %rdx
	callq	_ZNSt6vectorIdSaIdEE17_M_realloc_insertIJRKdEEEvN9__gnu_cxx17__normal_iteratorIPdS1_EEDpOT_
.Ltmp78:
.LBB0_78:                               # %_ZNSt6vectorIdSaIdEE9push_backERKd.exit73
                                        #   in Loop: Header=BB0_29 Depth=1
	movq	8(%r12), %rsi
	cmpq	16(%r12), %rsi
	je	.LBB0_80
# %bb.79:                               #   in Loop: Header=BB0_29 Depth=1
	movsd	32(%rsp), %xmm0                 # xmm0 = mem[0],zero
	movsd	%xmm0, (%rsi)
	addq	$8, %rsi
	movq	%rsi, 8(%r12)
	jmp	.LBB0_81
.LBB0_80:                               #   in Loop: Header=BB0_29 Depth=1
.Ltmp79:
	movq	%r12, %rdi
	leaq	32(%rsp), %rdx
	callq	_ZNSt6vectorIdSaIdEE17_M_realloc_insertIJRKdEEEvN9__gnu_cxx17__normal_iteratorIPdS1_EEDpOT_
.Ltmp80:
.LBB0_81:                               # %_ZNSt6vectorIdSaIdEE9push_backERKd.exit76
                                        #   in Loop: Header=BB0_29 Depth=1
	incq	%r15
	cmpq	%r15, 8(%rsp)
	jg	.LBB0_29
.LBB0_42:                               # %._crit_edge
	movq	72(%rsp), %rdi
	leaq	88(%rsp), %rax
	cmpq	%rax, %rdi
	je	.LBB0_44
# %bb.43:                               # %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i
	callq	_ZdlPv
.LBB0_44:                               # %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit
	movq	104(%rsp), %rdi
	leaq	120(%rsp), %rax
	cmpq	%rax, %rdi
	leaq	440(%rsp), %r14
	je	.LBB0_46
# %bb.45:                               # %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i22
	callq	_ZdlPv
.LBB0_46:                               # %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit24
	movq	136(%rsp), %rdi
	leaq	152(%rsp), %rax
	cmpq	%rax, %rdi
	je	.LBB0_48
# %bb.47:                               # %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i25
	callq	_ZdlPv
.LBB0_48:                               # %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit27
	movq	168(%rsp), %rdi
	leaq	184(%rsp), %rax
	cmpq	%rax, %rdi
	je	.LBB0_50
# %bb.49:                               # %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i28
	callq	_ZdlPv
.LBB0_50:                               # %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit30
	movq	200(%rsp), %rdi
	leaq	216(%rsp), %rax
	cmpq	%rax, %rdi
	je	.LBB0_52
# %bb.51:                               # %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i31
	callq	_ZdlPv
.LBB0_52:                               # %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit33
	movq	232(%rsp), %rdi
	leaq	248(%rsp), %rax
	cmpq	%rax, %rdi
	je	.LBB0_54
# %bb.53:                               # %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i34
	callq	_ZdlPv
.LBB0_54:                               # %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit36
	movq	264(%rsp), %rdi
	leaq	280(%rsp), %rax
	cmpq	%rax, %rdi
	je	.LBB0_56
# %bb.55:                               # %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i37
	callq	_ZdlPv
.LBB0_56:                               # %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit39
	movq	296(%rsp), %rdi
	leaq	312(%rsp), %rax
	cmpq	%rax, %rdi
	je	.LBB0_58
# %bb.57:                               # %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i40
	callq	_ZdlPv
.LBB0_58:                               # %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit42
	movq	328(%rsp), %rdi
	leaq	344(%rsp), %rax
	cmpq	%rax, %rdi
	je	.LBB0_60
# %bb.59:                               # %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i43
	callq	_ZdlPv
.LBB0_60:                               # %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit45
	movq	360(%rsp), %rdi
	leaq	376(%rsp), %rax
	cmpq	%rax, %rdi
	je	.LBB0_62
# %bb.61:                               # %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i46
	callq	_ZdlPv
.LBB0_62:                               # %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit48
	movq	392(%rsp), %rdi
	leaq	408(%rsp), %rax
	cmpq	%rax, %rdi
	je	.LBB0_6
# %bb.63:                               # %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i49
	callq	_ZdlPv
.LBB0_6:                                # %_ZNSolsEPFRSoS_E.exit
	leaq	496(%rsp), %rdi
	callq	_ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev
	movq	424(%rsp), %rdi
	cmpq	%r14, %rdi
	je	.LBB0_8
# %bb.7:                                # %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i110
	callq	_ZdlPv
.LBB0_8:                                # %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit112
	addq	$1016, %rsp                     # imm = 0x3F8
	.cfi_def_cfa_offset 56
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%r12
	.cfi_def_cfa_offset 40
	popq	%r13
	.cfi_def_cfa_offset 32
	popq	%r14
	.cfi_def_cfa_offset 24
	popq	%r15
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	retq
.LBB0_9:
	.cfi_def_cfa_offset 1072
.Ltmp2:
	movq	%rax, %rbx
	jmp	.LBB0_107
.LBB0_105:
.Ltmp15:
	movq	%rax, %rbx
	jmp	.LBB0_106
.LBB0_64:
.Ltmp46:
	jmp	.LBB0_83
.LBB0_82:
.Ltmp81:
.LBB0_83:
	movq	%rax, %rbx
	movq	72(%rsp), %rdi
	leaq	88(%rsp), %rax
	cmpq	%rax, %rdi
	je	.LBB0_85
# %bb.84:                               # %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i77
	callq	_ZdlPv
.LBB0_85:                               # %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit79
	movq	104(%rsp), %rdi
	leaq	120(%rsp), %rax
	cmpq	%rax, %rdi
	je	.LBB0_87
# %bb.86:                               # %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i80
	callq	_ZdlPv
.LBB0_87:                               # %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit82
	movq	136(%rsp), %rdi
	leaq	152(%rsp), %rax
	cmpq	%rax, %rdi
	je	.LBB0_89
# %bb.88:                               # %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i83
	callq	_ZdlPv
.LBB0_89:                               # %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit85
	movq	168(%rsp), %rdi
	leaq	184(%rsp), %rax
	cmpq	%rax, %rdi
	je	.LBB0_91
# %bb.90:                               # %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i86
	callq	_ZdlPv
.LBB0_91:                               # %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit88
	movq	200(%rsp), %rdi
	leaq	216(%rsp), %rax
	cmpq	%rax, %rdi
	je	.LBB0_93
# %bb.92:                               # %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i89
	callq	_ZdlPv
.LBB0_93:                               # %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit91
	movq	232(%rsp), %rdi
	leaq	248(%rsp), %rax
	cmpq	%rax, %rdi
	je	.LBB0_95
# %bb.94:                               # %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i92
	callq	_ZdlPv
.LBB0_95:                               # %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit94
	movq	264(%rsp), %rdi
	leaq	280(%rsp), %rax
	cmpq	%rax, %rdi
	je	.LBB0_97
# %bb.96:                               # %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i95
	callq	_ZdlPv
.LBB0_97:                               # %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit97
	movq	296(%rsp), %rdi
	leaq	312(%rsp), %rax
	cmpq	%rax, %rdi
	je	.LBB0_99
# %bb.98:                               # %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i98
	callq	_ZdlPv
.LBB0_99:                               # %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit100
	movq	328(%rsp), %rdi
	leaq	344(%rsp), %rax
	cmpq	%rax, %rdi
	je	.LBB0_101
# %bb.100:                              # %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i101
	callq	_ZdlPv
.LBB0_101:                              # %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit103
	movq	360(%rsp), %rdi
	leaq	376(%rsp), %rax
	cmpq	%rax, %rdi
	je	.LBB0_103
# %bb.102:                              # %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i104
	callq	_ZdlPv
.LBB0_103:                              # %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit106
	movq	392(%rsp), %rdi
	leaq	408(%rsp), %rax
	cmpq	%rax, %rdi
	je	.LBB0_106
# %bb.104:                              # %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i107
	callq	_ZdlPv
.LBB0_106:
	leaq	496(%rsp), %rdi
	callq	_ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev
.LBB0_107:
	movq	424(%rsp), %rdi
	leaq	440(%rsp), %rax
	cmpq	%rax, %rdi
	je	.LBB0_109
# %bb.108:                              # %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i113
	callq	_ZdlPv
.LBB0_109:                              # %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit115
	movq	%rbx, %rdi
	callq	_Unwind_Resume@PLT
.Lfunc_end0:
	.size	_Z13getSourceFileRSt6vectorIdSaIdEES2_S2_S2_S2_S2_S2_S2_S2_S2_S2_Ri, .Lfunc_end0-_Z13getSourceFileRSt6vectorIdSaIdEES2_S2_S2_S2_S2_S2_S2_S2_S2_S2_Ri
	.cfi_endproc
	.section	.gcc_except_table,"a",@progbits
	.p2align	2, 0x0
GCC_except_table0:
.Lexception0:
	.byte	255                             # @LPStart Encoding = omit
	.byte	255                             # @TType Encoding = omit
	.byte	1                               # Call site Encoding = uleb128
	.uleb128 .Lcst_end0-.Lcst_begin0
.Lcst_begin0:
	.uleb128 .Ltmp0-.Lfunc_begin0           # >> Call Site 1 <<
	.uleb128 .Ltmp1-.Ltmp0                  #   Call between .Ltmp0 and .Ltmp1
	.uleb128 .Ltmp2-.Lfunc_begin0           #     jumps to .Ltmp2
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp3-.Lfunc_begin0           # >> Call Site 2 <<
	.uleb128 .Ltmp14-.Ltmp3                 #   Call between .Ltmp3 and .Ltmp14
	.uleb128 .Ltmp15-.Lfunc_begin0          #     jumps to .Ltmp15
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp16-.Lfunc_begin0          # >> Call Site 3 <<
	.uleb128 .Ltmp45-.Ltmp16                #   Call between .Ltmp16 and .Ltmp45
	.uleb128 .Ltmp46-.Lfunc_begin0          #     jumps to .Ltmp46
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp47-.Lfunc_begin0          # >> Call Site 4 <<
	.uleb128 .Ltmp80-.Ltmp47                #   Call between .Ltmp47 and .Ltmp80
	.uleb128 .Ltmp81-.Lfunc_begin0          #     jumps to .Ltmp81
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp80-.Lfunc_begin0          # >> Call Site 5 <<
	.uleb128 .Lfunc_end0-.Ltmp80            #   Call between .Ltmp80 and .Lfunc_end0
	.byte	0                               #     has no landing pad
	.byte	0                               #   On action: cleanup
.Lcst_end0:
	.p2align	2, 0x0
                                        # -- End function
	.section	.text._ZNSt6vectorIdSaIdEE7reserveEm,"axG",@progbits,_ZNSt6vectorIdSaIdEE7reserveEm,comdat
	.weak	_ZNSt6vectorIdSaIdEE7reserveEm  # -- Begin function _ZNSt6vectorIdSaIdEE7reserveEm
	.p2align	1, 0x90
	.type	_ZNSt6vectorIdSaIdEE7reserveEm,@function
_ZNSt6vectorIdSaIdEE7reserveEm:         # @_ZNSt6vectorIdSaIdEE7reserveEm
	.cfi_startproc
# %bb.0:
	pushq	%r15
	.cfi_def_cfa_offset 16
	pushq	%r14
	.cfi_def_cfa_offset 24
	pushq	%r13
	.cfi_def_cfa_offset 32
	pushq	%r12
	.cfi_def_cfa_offset 40
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r13, -32
	.cfi_offset %r14, -24
	.cfi_offset %r15, -16
	movq	%rsi, %rax
	shrq	$60, %rax
	jne	.LBB1_8
# %bb.1:
	movq	%rsi, %r14
	movq	%rdi, %rbx
	movq	(%rdi), %r13
	movq	16(%rdi), %rax
	subq	%r13, %rax
	sarq	$3, %rax
	cmpq	%rsi, %rax
	jae	.LBB1_7
# %bb.2:                                # %_ZNSt12_Vector_baseIdSaIdEE11_M_allocateEm.exit
	movq	8(%rbx), %r12
	movq	%rbx, %rdi
	movq	%r14, %rsi
	xorl	%edx, %edx
	callq	_ZNSt15__new_allocatorIdE8allocateEmPKv
	movq	%rax, %r15
	movq	(%rbx), %rsi
	movq	8(%rbx), %rdx
	subq	%rsi, %rdx
	testq	%rdx, %rdx
	jle	.LBB1_4
# %bb.3:
	movq	%r15, %rdi
	callq	memmove@PLT
	movq	(%rbx), %rsi
.LBB1_4:                                # %_ZNSt6vectorIdSaIdEE11_S_relocateEPdS2_S2_RS0_.exit
	subq	%r13, %r12
	testq	%rsi, %rsi
	je	.LBB1_6
# %bb.5:
	movq	%rsi, %rdi
	callq	_ZdlPv
.LBB1_6:                                # %_ZNSt12_Vector_baseIdSaIdEE13_M_deallocateEPdm.exit
	movq	%r15, (%rbx)
	addq	%r15, %r12
	movq	%r12, 8(%rbx)
	leaq	(%r15,%r14,8), %rax
	movq	%rax, 16(%rbx)
.LBB1_7:
	popq	%rbx
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	retq
.LBB1_8:
	.cfi_def_cfa_offset 48
	movl	$.L.str.14, %edi
	callq	_ZSt20__throw_length_errorPKc
.Lfunc_end1:
	.size	_ZNSt6vectorIdSaIdEE7reserveEm, .Lfunc_end1-_ZNSt6vectorIdSaIdEE7reserveEm
	.cfi_endproc
                                        # -- End function
	.section	.rodata.cst16,"aM",@progbits,16
	.p2align	4, 0x0                          # -- Begin function main
.LCPI2_0:
	.quad	0x8000000000000000              # double -0
	.quad	0x8000000000000000              # double -0
	.section	.rodata.cst8,"aM",@progbits,8
	.p2align	3, 0x0
.LCPI2_1:
	.quad	0xbff0000000000000              # double -1
	.text
	.globl	main
	.type	main,@function
main:                                   # @main
.Lfunc_begin1:
	.cfi_startproc
	.cfi_personality 3, __gxx_personality_v0
	.cfi_lsda 3, .Lexception1
# %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	pushq	%r15
	.cfi_def_cfa_offset 24
	pushq	%r14
	.cfi_def_cfa_offset 32
	pushq	%r13
	.cfi_def_cfa_offset 40
	pushq	%r12
	.cfi_def_cfa_offset 48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	subq	$1176, %rsp                     # imm = 0x498
	.cfi_def_cfa_offset 1232
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	.cfi_offset %rbp, -16
	movq	%rsi, 8(%rsp)                   # 8-byte Spill
	xorl	%eax, %eax
	leaq	144(%rsp), %rdi
	movq	%rax, 16(%rdi)
	xorpd	%xmm0, %xmm0
	movapd	%xmm0, (%rdi)
	leaq	256(%rsp), %rcx
	movq	%rax, 16(%rcx)
	movapd	%xmm0, (%rcx)
	leaq	224(%rsp), %rdx
	movq	%rax, 16(%rdx)
	movapd	%xmm0, (%rdx)
	leaq	64(%rsp), %rsi
	movq	%rax, 16(%rsi)
	movapd	%xmm0, (%rsi)
	leaq	112(%rsp), %r8
	movq	%rax, 16(%r8)
	movapd	%xmm0, (%r8)
	leaq	192(%rsp), %r9
	movq	%rax, 16(%r9)
	movapd	%xmm0, (%r9)
.Ltmp82:
	.cfi_escape 0x2e, 0x30
	leaq	108(%rsp), %rax
	pushq	%rax
	.cfi_adjust_cfa_offset 8
	pushq	%r9
	.cfi_adjust_cfa_offset 8
	pushq	%r8
	.cfi_adjust_cfa_offset 8
	pushq	%rsi
	.cfi_adjust_cfa_offset 8
	pushq	%rdx
	.cfi_adjust_cfa_offset 8
	pushq	%rcx
	.cfi_adjust_cfa_offset 8
	callq	_Z13getSourceFileRSt6vectorIdSaIdEES2_S2_S2_S2_S2_S2_S2_S2_S2_S2_Ri
	addq	$48, %rsp
	.cfi_adjust_cfa_offset -48
.Ltmp83:
# %bb.1:
	.cfi_escape 0x2e, 0x00
	movl	$1, %edi
	movl	$512000000, %esi                # imm = 0x1E848000
	callq	calloc@PLT
	movq	%rax, %rbx
.Ltmp85:
	.cfi_escape 0x2e, 0x00
	movl	$2, %edi
	callq	hipSetDevice
.Ltmp86:
# %bb.2:
	movq	8(%rsp), %r14                   # 8-byte Reload
	movq	8(%r14), %rdi
	.cfi_escape 0x2e, 0x00
	callq	atoi
	movl	%eax, %ebp
	movq	16(%r14), %rdi
	.cfi_escape 0x2e, 0x00
	callq	atoi
	cmpl	%eax, %ebp
	jle	.LBB2_11
.LBB2_3:                                # %._crit_edge
.Ltmp173:
	.cfi_escape 0x2e, 0x00
	movl	$_ZSt4cout, %r15d
	movl	$_ZSt4cout, %edi
	movl	$.L.str.10, %esi
	movl	$22, %edx
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
.Ltmp174:
# %bb.4:                                # %_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc.exit
	movq	_ZSt4cout(%rip), %rax
	addq	-24(%rax), %r15
.Ltmp175:
	.cfi_escape 0x2e, 0x00
	movq	%r15, %rdi
	movl	$10, %esi
	callq	_ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc
.Ltmp176:
# %bb.5:                                # %.noexc175
.Ltmp177:
	.cfi_escape 0x2e, 0x00
	movsbl	%al, %esi
	movl	$_ZSt4cout, %edi
	callq	_ZNSo3putEc
.Ltmp178:
# %bb.6:                                # %.noexc176
.Ltmp179:
	.cfi_escape 0x2e, 0x00
	movq	%rax, %rdi
	callq	_ZNSo5flushEv
.Ltmp180:
# %bb.7:                                # %_ZNSolsEPFRSoS_E.exit107
.Ltmp182:
	.cfi_escape 0x2e, 0x00
	leaq	280(%rsp), %rdi
	callq	_ZNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEC1Ev
.Ltmp183:
# %bb.8:
	leaq	280(%rsp), %rdi
	movq	(%rdi), %rax
	movq	-24(%rax), %rax
	movl	$-261, %ecx                     # imm = 0xFEFB
	andl	304(%rsp,%rax), %ecx
	orl	$4, %ecx
	movl	%ecx, 304(%rsp,%rax)
.Ltmp185:
	.cfi_escape 0x2e, 0x00
	movl	$.L.str.11, %esi
	movl	$15, %edx
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
.Ltmp186:
# %bb.9:                                # %_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc.exit109
	movq	8(%rsp), %rax                   # 8-byte Reload
	movq	8(%rax), %r15
	testq	%r15, %r15
	je	.LBB2_61
# %bb.10:
	.cfi_escape 0x2e, 0x00
	movq	%r15, %rdi
	callq	strlen
.Ltmp187:
	.cfi_escape 0x2e, 0x00
	leaq	280(%rsp), %rdi
	movq	%r15, %rsi
	movq	%rax, %rdx
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
.Ltmp188:
	jmp	.LBB2_62
.LBB2_11:                               # %.lr.ph
	decl	%ebp
	movslq	%ebp, %r14
	leaq	280(%rsp), %r13
	leaq	656(%rsp), %r15
.LBB2_12:                               # =>This Loop Header: Depth=1
                                        #     Child Loop BB2_53 Depth 2
	movq	256(%rsp), %rax
	movsd	(%rax,%r14,8), %xmm0            # xmm0 = mem[0],zero
	movq	224(%rsp), %rax
	addsd	(%rax,%r14,8), %xmm0
	movapd	%xmm0, 16(%rsp)                 # 16-byte Spill
	movq	64(%rsp), %rax
	movsd	(%rax,%r14,8), %xmm0            # xmm0 = mem[0],zero
	addsd	.LCPI2_1(%rip), %xmm0
	movsd	%xmm0, 96(%rsp)                 # 8-byte Spill
.Ltmp87:
	.cfi_escape 0x2e, 0x00
	movq	%r13, %rdi
	callq	_ZNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEC1Ev
.Ltmp88:
# %bb.13:                               #   in Loop: Header=BB2_12 Depth=1
	movapd	16(%rsp), %xmm0                 # 16-byte Reload
	xorpd	.LCPI2_0(%rip), %xmm0
	divsd	96(%rsp), %xmm0                 # 8-byte Folded Reload
	movapd	%xmm0, 16(%rsp)                 # 16-byte Spill
	movq	280(%rsp), %rax
	movq	-24(%rax), %rax
	movl	304(%rsp,%rax), %ecx
	movl	$-261, %edx                     # imm = 0xFEFB
	andl	%edx, %ecx
	orl	$4, %ecx
	movl	%ecx, 304(%rsp,%rax)
	cmpq	$8, %r14
	jg	.LBB2_25
# %bb.14:                               #   in Loop: Header=BB2_12 Depth=1
.Ltmp112:
	.cfi_escape 0x2e, 0x00
	movl	$.L.str.2, %esi
	movl	$11, %edx
	movq	%r13, %rdi
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
.Ltmp113:
# %bb.15:                               # %_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc.exit76
                                        #   in Loop: Header=BB2_12 Depth=1
	leal	1(%r14), %esi
.Ltmp114:
	.cfi_escape 0x2e, 0x00
	movq	%r13, %rdi
	callq	_ZNSolsEi
.Ltmp115:
# %bb.16:                               #   in Loop: Header=BB2_12 Depth=1
.Ltmp116:
	movq	%rax, %r12
	.cfi_escape 0x2e, 0x00
	movl	$.L.str.3, %esi
	movl	$1, %edx
	movq	%rax, %rdi
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
.Ltmp117:
# %bb.17:                               #   in Loop: Header=BB2_12 Depth=1
	movq	(%r12), %rax
	movq	-24(%rax), %rax
	movq	$1, 8(%r12,%rax)
	movq	144(%rsp), %rax
	movsd	(%rax,%r14,8), %xmm0            # xmm0 = mem[0],zero
.Ltmp118:
	.cfi_escape 0x2e, 0x00
	movq	%r12, %rdi
	callq	_ZNSo9_M_insertIdEERSoT_
.Ltmp119:
# %bb.18:                               # %_ZNSolsEd.exit
                                        #   in Loop: Header=BB2_12 Depth=1
.Ltmp120:
	movq	%rax, %r12
	.cfi_escape 0x2e, 0x00
	movl	$.L.str.4, %esi
	movl	$10, %edx
	movq	%rax, %rdi
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
.Ltmp121:
# %bb.19:                               #   in Loop: Header=BB2_12 Depth=1
	movq	(%r12), %rax
	movq	-24(%rax), %rax
	movq	$0, 8(%r12,%rax)
	movq	64(%rsp), %rax
	movsd	(%rax,%r14,8), %xmm0            # xmm0 = mem[0],zero
.Ltmp122:
	.cfi_escape 0x2e, 0x00
	movq	%r12, %rdi
	callq	_ZNSo9_M_insertIdEERSoT_
.Ltmp123:
# %bb.20:                               # %_ZNSolsEd.exit79
                                        #   in Loop: Header=BB2_12 Depth=1
.Ltmp124:
	movq	%rax, %r12
	.cfi_escape 0x2e, 0x00
	movl	$.L.str.5, %esi
	movl	$2, %edx
	movq	%rax, %rdi
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
.Ltmp125:
# %bb.21:                               # %_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc.exit80
                                        #   in Loop: Header=BB2_12 Depth=1
	movq	112(%rsp), %rax
	movsd	(%rax,%r14,8), %xmm0            # xmm0 = mem[0],zero
.Ltmp126:
	.cfi_escape 0x2e, 0x00
	movq	%r12, %rdi
	callq	_ZNSo9_M_insertIdEERSoT_
.Ltmp127:
# %bb.22:                               # %_ZNSolsEd.exit81
                                        #   in Loop: Header=BB2_12 Depth=1
.Ltmp128:
	movq	%rax, %r12
	.cfi_escape 0x2e, 0x00
	movl	$.L.str.6, %esi
	movl	$6, %edx
	movq	%rax, %rdi
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
.Ltmp129:
# %bb.23:                               #   in Loop: Header=BB2_12 Depth=1
	movq	(%r12), %rax
	movq	-24(%rax), %rax
	movq	$2, 8(%r12,%rax)
.Ltmp130:
	.cfi_escape 0x2e, 0x00
	movq	%r12, %rdi
	movapd	16(%rsp), %xmm0                 # 16-byte Reload
	callq	_ZNSo9_M_insertIdEERSoT_
.Ltmp131:
# %bb.24:                               # %_ZNSolsEd.exit83
                                        #   in Loop: Header=BB2_12 Depth=1
.Ltmp132:
	movq	%rax, %r12
	.cfi_escape 0x2e, 0x00
	movl	$.L.str.5, %esi
	movl	$2, %edx
	movq	%rax, %rdi
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
.Ltmp133:
	jmp	.LBB2_36
.LBB2_25:                               #   in Loop: Header=BB2_12 Depth=1
.Ltmp90:
	.cfi_escape 0x2e, 0x00
	movl	$.L.str.8, %esi
	movl	$10, %edx
	movq	%r13, %rdi
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
.Ltmp91:
# %bb.26:                               # %_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc.exit88
                                        #   in Loop: Header=BB2_12 Depth=1
	leal	1(%r14), %esi
.Ltmp92:
	.cfi_escape 0x2e, 0x00
	movq	%r13, %rdi
	callq	_ZNSolsEi
.Ltmp93:
# %bb.27:                               #   in Loop: Header=BB2_12 Depth=1
.Ltmp94:
	movq	%rax, %r12
	.cfi_escape 0x2e, 0x00
	movl	$.L.str.3, %esi
	movl	$1, %edx
	movq	%rax, %rdi
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
.Ltmp95:
# %bb.28:                               #   in Loop: Header=BB2_12 Depth=1
	movq	(%r12), %rax
	movq	-24(%rax), %rax
	movq	$1, 8(%r12,%rax)
	movq	144(%rsp), %rax
	movsd	(%rax,%r14,8), %xmm0            # xmm0 = mem[0],zero
.Ltmp96:
	.cfi_escape 0x2e, 0x00
	movq	%r12, %rdi
	callq	_ZNSo9_M_insertIdEERSoT_
.Ltmp97:
# %bb.29:                               # %_ZNSolsEd.exit90
                                        #   in Loop: Header=BB2_12 Depth=1
.Ltmp98:
	movq	%rax, %r12
	.cfi_escape 0x2e, 0x00
	movl	$.L.str.4, %esi
	movl	$10, %edx
	movq	%rax, %rdi
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
.Ltmp99:
# %bb.30:                               #   in Loop: Header=BB2_12 Depth=1
	movq	(%r12), %rax
	movq	-24(%rax), %rax
	movq	$0, 8(%r12,%rax)
	movq	64(%rsp), %rax
	movsd	(%rax,%r14,8), %xmm0            # xmm0 = mem[0],zero
.Ltmp100:
	.cfi_escape 0x2e, 0x00
	movq	%r12, %rdi
	callq	_ZNSo9_M_insertIdEERSoT_
.Ltmp101:
# %bb.31:                               # %_ZNSolsEd.exit92
                                        #   in Loop: Header=BB2_12 Depth=1
.Ltmp102:
	movq	%rax, %r12
	.cfi_escape 0x2e, 0x00
	movl	$.L.str.5, %esi
	movl	$2, %edx
	movq	%rax, %rdi
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
.Ltmp103:
# %bb.32:                               # %_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc.exit93
                                        #   in Loop: Header=BB2_12 Depth=1
	movq	112(%rsp), %rax
	movsd	(%rax,%r14,8), %xmm0            # xmm0 = mem[0],zero
.Ltmp104:
	.cfi_escape 0x2e, 0x00
	movq	%r12, %rdi
	callq	_ZNSo9_M_insertIdEERSoT_
.Ltmp105:
# %bb.33:                               # %_ZNSolsEd.exit94
                                        #   in Loop: Header=BB2_12 Depth=1
.Ltmp106:
	movq	%rax, %r12
	.cfi_escape 0x2e, 0x00
	movl	$.L.str.6, %esi
	movl	$6, %edx
	movq	%rax, %rdi
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
.Ltmp107:
# %bb.34:                               #   in Loop: Header=BB2_12 Depth=1
	movq	(%r12), %rax
	movq	-24(%rax), %rax
	movq	$2, 8(%r12,%rax)
.Ltmp108:
	.cfi_escape 0x2e, 0x00
	movq	%r12, %rdi
	movapd	16(%rsp), %xmm0                 # 16-byte Reload
	callq	_ZNSo9_M_insertIdEERSoT_
.Ltmp109:
# %bb.35:                               # %_ZNSolsEd.exit96
                                        #   in Loop: Header=BB2_12 Depth=1
.Ltmp110:
	movq	%rax, %r12
	.cfi_escape 0x2e, 0x00
	movl	$.L.str.5, %esi
	movl	$2, %edx
	movq	%rax, %rdi
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
.Ltmp111:
.LBB2_36:                               # %.invoke
                                        #   in Loop: Header=BB2_12 Depth=1
	movq	(%r12), %rax
	movq	-24(%rax), %rax
	movq	$2, 8(%r12,%rax)
.Ltmp134:
	.cfi_escape 0x2e, 0x00
	movq	%r12, %rdi
	movapd	16(%rsp), %xmm0                 # 16-byte Reload
	callq	_ZNSo9_M_insertIdEERSoT_
.Ltmp135:
# %bb.37:                               # %_ZNSolsEd.exit98.invoke
                                        #   in Loop: Header=BB2_12 Depth=1
.Ltmp136:
	.cfi_escape 0x2e, 0x00
	movl	$.L.str.7, %esi
	movl	$14, %edx
	movq	%rax, %rdi
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
.Ltmp137:
# %bb.38:                               # %_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc.exit86
                                        #   in Loop: Header=BB2_12 Depth=1
.Ltmp139:
	.cfi_escape 0x2e, 0x00
	leaq	32(%rsp), %rdi
	leaq	288(%rsp), %rsi
	callq	_ZNKSt7__cxx1115basic_stringbufIcSt11char_traitsIcESaIcEE3strEv
.Ltmp140:
# %bb.39:                               # %_ZNKSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEE3strEv.exit
                                        #   in Loop: Header=BB2_12 Depth=1
	movq	32(%rsp), %rsi
	movq	40(%rsp), %rdx
.Ltmp142:
	.cfi_escape 0x2e, 0x00
	movl	$_ZSt4cout, %edi
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
.Ltmp143:
# %bb.40:                               # %_ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE.exit
                                        #   in Loop: Header=BB2_12 Depth=1
	movq	%rax, %r12
	movq	(%rax), %rax
	movq	-24(%rax), %rdi
	addq	%r12, %rdi
.Ltmp144:
	.cfi_escape 0x2e, 0x00
	movl	$10, %esi
	callq	_ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc
.Ltmp145:
# %bb.41:                               # %.noexc172
                                        #   in Loop: Header=BB2_12 Depth=1
.Ltmp146:
	.cfi_escape 0x2e, 0x00
	movsbl	%al, %esi
	movq	%r12, %rdi
	callq	_ZNSo3putEc
.Ltmp147:
# %bb.42:                               # %.noexc173
                                        #   in Loop: Header=BB2_12 Depth=1
.Ltmp148:
	.cfi_escape 0x2e, 0x00
	movq	%rax, %rdi
	callq	_ZNSo5flushEv
.Ltmp149:
# %bb.43:                               # %_ZNSolsEPFRSoS_E.exit
                                        #   in Loop: Header=BB2_12 Depth=1
	movq	32(%rsp), %rsi
.Ltmp151:
	.cfi_escape 0x2e, 0x00
	movq	%r15, %rdi
	movl	$12, %edx
	callq	_ZNSt14basic_ifstreamIcSt11char_traitsIcEEC1EPKcSt13_Ios_Openmode
.Ltmp152:
# %bb.44:                               #   in Loop: Header=BB2_12 Depth=1
	movq	656(%rsp), %rax
	movq	-24(%rax), %rax
	testb	$5, 688(%rsp,%rax)
	jne	.LBB2_85
# %bb.45:                               #   in Loop: Header=BB2_12 Depth=1
.Ltmp159:
	.cfi_escape 0x2e, 0x00
	movq	%r15, %rdi
	xorl	%esi, %esi
	movl	$2, %edx
	callq	_ZNSi5seekgElSt12_Ios_Seekdir
.Ltmp160:
# %bb.46:                               #   in Loop: Header=BB2_12 Depth=1
.Ltmp161:
	.cfi_escape 0x2e, 0x00
	movq	%r15, %rdi
	callq	_ZNSi5tellgEv
.Ltmp162:
# %bb.47:                               #   in Loop: Header=BB2_12 Depth=1
.Ltmp164:
	movq	%rax, %r12
	.cfi_escape 0x2e, 0x00
	movq	%r15, %rdi
	xorl	%esi, %esi
	xorl	%edx, %edx
	callq	_ZNSi5seekgElSt12_Ios_Seekdir
.Ltmp165:
# %bb.48:                               #   in Loop: Header=BB2_12 Depth=1
	movq	%r12, %rsi
	shrq	$3, %rsi
.Ltmp167:
	.cfi_escape 0x2e, 0x00
	leaq	168(%rsp), %rdi
	leaq	7(%rsp), %rdx
	callq	_ZNSt6vectorIdSaIdEEC2EmRKS0_
.Ltmp168:
# %bb.49:                               #   in Loop: Header=BB2_12 Depth=1
	movq	168(%rsp), %rsi
.Ltmp170:
	.cfi_escape 0x2e, 0x00
	movq	%r15, %rdi
	movq	%r12, %rdx
	callq	_ZNSi4readEPcl
.Ltmp171:
# %bb.50:                               #   in Loop: Header=BB2_12 Depth=1
	.cfi_escape 0x2e, 0x00
	movl	$512000000, %edi                # imm = 0x1E848000
	callq	malloc
	movq	%rax, %rbp
	movq	168(%rsp), %r12
	movq	176(%rsp), %rdx
	subq	%r12, %rdx
	cmpq	$9, %rdx
	jl	.LBB2_59
# %bb.51:                               #   in Loop: Header=BB2_12 Depth=1
	.cfi_escape 0x2e, 0x00
	movq	%rbp, %rdi
	movq	%r12, %rsi
	callq	memcpy@PLT
.LBB2_52:                               # %_ZSt4copyIN9__gnu_cxx17__normal_iteratorIPdSt6vectorIdSaIdEEEES2_ET0_T_S8_S7_.exit
                                        #   in Loop: Header=BB2_12 Depth=1
	movq	192(%rsp), %rax
	xorl	%ecx, %ecx
.LBB2_53:                               #   Parent Loop BB2_12 Depth=1
                                        # =>  This Inner Loop Header: Depth=2
	movsd	(%rbp,%rcx,8), %xmm0            # xmm0 = mem[0],zero
	mulsd	(%rax,%r14,8), %xmm0
	addsd	(%rbx,%rcx,8), %xmm0
	movsd	%xmm0, (%rbx,%rcx,8)
	incq	%rcx
	cmpq	$64000000, %rcx                 # imm = 0x3D09000
	jne	.LBB2_53
# %bb.54:                               #   in Loop: Header=BB2_12 Depth=1
	testq	%r12, %r12
	je	.LBB2_56
# %bb.55:                               #   in Loop: Header=BB2_12 Depth=1
	.cfi_escape 0x2e, 0x00
	movq	%r12, %rdi
	callq	_ZdlPv
.LBB2_56:                               # %_ZNSt6vectorIdSaIdEED2Ev.exit
                                        #   in Loop: Header=BB2_12 Depth=1
	.cfi_escape 0x2e, 0x00
	movq	%r15, %rdi
	callq	_ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev
	movq	32(%rsp), %rdi
	leaq	48(%rsp), %rax
	cmpq	%rax, %rdi
	je	.LBB2_58
# %bb.57:                               # %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i
                                        #   in Loop: Header=BB2_12 Depth=1
	.cfi_escape 0x2e, 0x00
	callq	_ZdlPv
.LBB2_58:                               # %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit
                                        #   in Loop: Header=BB2_12 Depth=1
	.cfi_escape 0x2e, 0x00
	movl	$_ZTTNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEE, %esi
	movq	%r13, %rdi
	callq	_ZNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEED2Ev
	.cfi_escape 0x2e, 0x00
	leaq	392(%rsp), %rdi
	callq	_ZNSt8ios_baseD2Ev
	incq	%r14
	movq	8(%rsp), %rax                   # 8-byte Reload
	movq	16(%rax), %rdi
	.cfi_escape 0x2e, 0x00
	callq	atoi
	cltq
	cmpq	%rax, %r14
	jl	.LBB2_12
	jmp	.LBB2_3
.LBB2_59:                               #   in Loop: Header=BB2_12 Depth=1
	cmpq	$8, %rdx
	jne	.LBB2_52
# %bb.60:                               #   in Loop: Header=BB2_12 Depth=1
	movsd	(%r12), %xmm0                   # xmm0 = mem[0],zero
	movsd	%xmm0, (%rbp)
	jmp	.LBB2_52
.LBB2_61:
	movq	280(%rsp), %rax
	movq	-24(%rax), %rax
	leaq	(%rsp,%rax), %rdi
	addq	$280, %rdi                      # imm = 0x118
	movl	32(%rdi), %esi
	orl	$1, %esi
.Ltmp189:
	.cfi_escape 0x2e, 0x00
	callq	_ZNSt9basic_iosIcSt11char_traitsIcEE5clearESt12_Ios_Iostate
.Ltmp190:
.LBB2_62:                               # %_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc.exit111
.Ltmp191:
	.cfi_escape 0x2e, 0x00
	leaq	280(%rsp), %rdi
	movl	$.L.str.12, %esi
	movl	$1, %edx
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
.Ltmp192:
# %bb.63:                               # %_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc.exit113
	movq	8(%rsp), %rax                   # 8-byte Reload
	movq	16(%rax), %r14
	testq	%r14, %r14
	je	.LBB2_65
# %bb.64:
	.cfi_escape 0x2e, 0x00
	movq	%r14, %rdi
	callq	strlen
.Ltmp193:
	.cfi_escape 0x2e, 0x00
	leaq	280(%rsp), %rdi
	movq	%r14, %rsi
	movq	%rax, %rdx
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
.Ltmp194:
	jmp	.LBB2_66
.LBB2_65:
	movq	280(%rsp), %rax
	movq	-24(%rax), %rax
	leaq	(%rsp,%rax), %rdi
	addq	$280, %rdi                      # imm = 0x118
	movl	32(%rdi), %esi
	orl	$1, %esi
.Ltmp195:
	.cfi_escape 0x2e, 0x00
	callq	_ZNSt9basic_iosIcSt11char_traitsIcEE5clearESt12_Ios_Iostate
.Ltmp196:
.LBB2_66:                               # %_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc.exit117
.Ltmp197:
	.cfi_escape 0x2e, 0x00
	leaq	280(%rsp), %rdi
	movl	$.L.str.13, %esi
	movl	$4, %edx
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
.Ltmp198:
# %bb.67:                               # %_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc.exit119
	leaq	288(%rsp), %rsi
.Ltmp200:
	.cfi_escape 0x2e, 0x00
	leaq	32(%rsp), %rdi
	callq	_ZNKSt7__cxx1115basic_stringbufIcSt11char_traitsIcESaIcEE3strEv
.Ltmp201:
# %bb.68:                               # %_ZNKSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEE3strEv.exit121
	movq	32(%rsp), %rsi
.Ltmp203:
	.cfi_escape 0x2e, 0x00
	leaq	656(%rsp), %rdi
	movl	$20, %edx
	callq	_ZNSt14basic_ofstreamIcSt11char_traitsIcEEC1EPKcSt13_Ios_Openmode
.Ltmp204:
# %bb.69:
.Ltmp206:
	.cfi_escape 0x2e, 0x00
	leaq	656(%rsp), %rdi
	movl	$512000000, %edx                # imm = 0x1E848000
	movq	%rbx, %rsi
	callq	_ZNSo5writeEPKcl
.Ltmp207:
# %bb.70:
	movq	_ZTTSt14basic_ofstreamIcSt11char_traitsIcEE(%rip), %rax
	leaq	664(%rsp), %rdi
	movq	%rax, -8(%rdi)
	movq	_ZTTSt14basic_ofstreamIcSt11char_traitsIcEE+24(%rip), %rcx
	movq	-24(%rax), %rax
	movq	%rcx, 656(%rsp,%rax)
	.cfi_escape 0x2e, 0x00
	callq	_ZNSt13basic_filebufIcSt11char_traitsIcEED2Ev
	leaq	904(%rsp), %rdi
	.cfi_escape 0x2e, 0x00
	callq	_ZNSt8ios_baseD2Ev
	leaq	48(%rsp), %rax
	movq	-16(%rax), %rdi
	cmpq	%rax, %rdi
	je	.LBB2_72
# %bb.71:                               # %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i122
	.cfi_escape 0x2e, 0x00
	callq	_ZdlPv
.LBB2_72:                               # %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit124
	.cfi_escape 0x2e, 0x00
	leaq	280(%rsp), %rdi
	movl	$_ZTTNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEE, %esi
	callq	_ZNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEED2Ev
	leaq	392(%rsp), %rdi
	.cfi_escape 0x2e, 0x00
	callq	_ZNSt8ios_baseD2Ev
	movq	192(%rsp), %rdi
	testq	%rdi, %rdi
	je	.LBB2_74
# %bb.73:
	.cfi_escape 0x2e, 0x00
	callq	_ZdlPv
.LBB2_74:                               # %_ZNSt6vectorIdSaIdEED2Ev.exit126
	movq	112(%rsp), %rdi
	testq	%rdi, %rdi
	je	.LBB2_76
# %bb.75:
	.cfi_escape 0x2e, 0x00
	callq	_ZdlPv
.LBB2_76:                               # %_ZNSt6vectorIdSaIdEED2Ev.exit128
	movq	64(%rsp), %rdi
	testq	%rdi, %rdi
	je	.LBB2_78
# %bb.77:
	.cfi_escape 0x2e, 0x00
	callq	_ZdlPv
.LBB2_78:                               # %_ZNSt6vectorIdSaIdEED2Ev.exit130
	movq	224(%rsp), %rdi
	testq	%rdi, %rdi
	je	.LBB2_80
# %bb.79:
	.cfi_escape 0x2e, 0x00
	callq	_ZdlPv
.LBB2_80:                               # %_ZNSt6vectorIdSaIdEED2Ev.exit132
	movq	256(%rsp), %rdi
	testq	%rdi, %rdi
	je	.LBB2_82
# %bb.81:
	.cfi_escape 0x2e, 0x00
	callq	_ZdlPv
.LBB2_82:                               # %_ZNSt6vectorIdSaIdEED2Ev.exit144
	movq	144(%rsp), %rdi
	testq	%rdi, %rdi
	je	.LBB2_84
# %bb.83:
	.cfi_escape 0x2e, 0x00
	callq	_ZdlPv
.LBB2_84:                               # %_ZNSt6vectorIdSaIdEED2Ev.exit146
	xorl	%eax, %eax
	addq	$1176, %rsp                     # imm = 0x498
	.cfi_def_cfa_offset 56
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%r12
	.cfi_def_cfa_offset 40
	popq	%r13
	.cfi_def_cfa_offset 32
	popq	%r14
	.cfi_def_cfa_offset 24
	popq	%r15
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	retq
.LBB2_85:
	.cfi_def_cfa_offset 1232
.Ltmp154:
	.cfi_escape 0x2e, 0x00
	movl	$_ZSt4cout, %edi
	movl	$.L.str.9, %esi
	movl	$20, %edx
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
.Ltmp155:
# %bb.86:                               # %_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc.exit100
.Ltmp156:
	.cfi_escape 0x2e, 0x00
	movl	$_ZSt4cout, %edi
	callq	_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_
.Ltmp157:
# %bb.87:                               # %_ZNSolsEPFRSoS_E.exit101
	.cfi_escape 0x2e, 0x00
	movl	$1, %edi
	callq	exit
.LBB2_88:
.Ltmp208:
	movq	%rax, %rbx
	.cfi_escape 0x2e, 0x00
	leaq	656(%rsp), %rdi
	callq	_ZNSt14basic_ofstreamIcSt11char_traitsIcEED1Ev
	jmp	.LBB2_90
.LBB2_89:
.Ltmp205:
	movq	%rax, %rbx
.LBB2_90:
	leaq	48(%rsp), %rax
	movq	-16(%rax), %rdi
	cmpq	%rax, %rdi
	je	.LBB2_98
# %bb.91:                               # %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i147
	.cfi_escape 0x2e, 0x00
	callq	_ZdlPv
	jmp	.LBB2_98
.LBB2_92:
.Ltmp202:
	jmp	.LBB2_97
.LBB2_93:
.Ltmp184:
	jmp	.LBB2_95
.LBB2_94:
.Ltmp84:
	jmp	.LBB2_95
.LBB2_96:
.Ltmp199:
.LBB2_97:
	movq	%rax, %rbx
.LBB2_98:
	.cfi_escape 0x2e, 0x00
	jmp	.LBB2_118
.LBB2_99:
.Ltmp181:
	jmp	.LBB2_95
.LBB2_100:                              # %.loopexit.split-lp
.Ltmp158:
	jmp	.LBB2_109
.LBB2_101:
.Ltmp153:
	jmp	.LBB2_112
.LBB2_102:
.Ltmp163:
	jmp	.LBB2_109
.LBB2_103:
.Ltmp169:
	jmp	.LBB2_109
.LBB2_104:
.Ltmp172:
	movq	%rax, %rbx
	movq	168(%rsp), %rdi
	testq	%rdi, %rdi
	je	.LBB2_110
# %bb.105:
	.cfi_escape 0x2e, 0x00
	callq	_ZdlPv
	jmp	.LBB2_110
.LBB2_106:
.Ltmp89:
.LBB2_95:
	movq	%rax, %rbx
	jmp	.LBB2_119
.LBB2_107:
.Ltmp141:
	jmp	.LBB2_117
.LBB2_108:                              # %.loopexit
.Ltmp166:
.LBB2_109:
	movq	%rax, %rbx
.LBB2_110:
	.cfi_escape 0x2e, 0x00
	leaq	656(%rsp), %rdi
	callq	_ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev
	jmp	.LBB2_113
.LBB2_111:
.Ltmp150:
.LBB2_112:
	movq	%rax, %rbx
.LBB2_113:
	movq	32(%rsp), %rdi
	leaq	48(%rsp), %rax
	cmpq	%rax, %rdi
	je	.LBB2_115
# %bb.114:                              # %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i104
	.cfi_escape 0x2e, 0x00
	callq	_ZdlPv
.LBB2_115:
	.cfi_escape 0x2e, 0x00
	jmp	.LBB2_118
.LBB2_116:
.Ltmp138:
.LBB2_117:
	movq	%rax, %rbx
	.cfi_escape 0x2e, 0x00
.LBB2_118:
	leaq	280(%rsp), %rdi
	movl	$_ZTTNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEE, %esi
	callq	_ZNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEED2Ev
	leaq	392(%rsp), %rdi
	.cfi_escape 0x2e, 0x00
	callq	_ZNSt8ios_baseD2Ev
.LBB2_119:
	movq	192(%rsp), %rdi
	testq	%rdi, %rdi
	je	.LBB2_121
# %bb.120:
	.cfi_escape 0x2e, 0x00
	callq	_ZdlPv
.LBB2_121:                              # %_ZNSt6vectorIdSaIdEED2Ev.exit151
	movq	112(%rsp), %rdi
	testq	%rdi, %rdi
	je	.LBB2_123
# %bb.122:
	.cfi_escape 0x2e, 0x00
	callq	_ZdlPv
.LBB2_123:                              # %_ZNSt6vectorIdSaIdEED2Ev.exit153
	movq	64(%rsp), %rdi
	testq	%rdi, %rdi
	je	.LBB2_125
# %bb.124:
	.cfi_escape 0x2e, 0x00
	callq	_ZdlPv
.LBB2_125:                              # %_ZNSt6vectorIdSaIdEED2Ev.exit155
	movq	224(%rsp), %rdi
	testq	%rdi, %rdi
	je	.LBB2_127
# %bb.126:
	.cfi_escape 0x2e, 0x00
	callq	_ZdlPv
.LBB2_127:                              # %_ZNSt6vectorIdSaIdEED2Ev.exit157
	movq	256(%rsp), %rdi
	testq	%rdi, %rdi
	je	.LBB2_129
# %bb.128:
	.cfi_escape 0x2e, 0x00
	callq	_ZdlPv
.LBB2_129:                              # %_ZNSt6vectorIdSaIdEED2Ev.exit169
	movq	144(%rsp), %rdi
	testq	%rdi, %rdi
	je	.LBB2_131
# %bb.130:
	.cfi_escape 0x2e, 0x00
	callq	_ZdlPv
.LBB2_131:                              # %_ZNSt6vectorIdSaIdEED2Ev.exit171
	.cfi_escape 0x2e, 0x00
	movq	%rbx, %rdi
	callq	_Unwind_Resume@PLT
.Lfunc_end2:
	.size	main, .Lfunc_end2-main
	.cfi_endproc
	.section	.gcc_except_table,"a",@progbits
	.p2align	2, 0x0
GCC_except_table2:
.Lexception1:
	.byte	255                             # @LPStart Encoding = omit
	.byte	255                             # @TType Encoding = omit
	.byte	1                               # Call site Encoding = uleb128
	.uleb128 .Lcst_end1-.Lcst_begin1
.Lcst_begin1:
	.uleb128 .Ltmp82-.Lfunc_begin1          # >> Call Site 1 <<
	.uleb128 .Ltmp83-.Ltmp82                #   Call between .Ltmp82 and .Ltmp83
	.uleb128 .Ltmp84-.Lfunc_begin1          #     jumps to .Ltmp84
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp85-.Lfunc_begin1          # >> Call Site 2 <<
	.uleb128 .Ltmp180-.Ltmp85               #   Call between .Ltmp85 and .Ltmp180
	.uleb128 .Ltmp181-.Lfunc_begin1         #     jumps to .Ltmp181
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp182-.Lfunc_begin1         # >> Call Site 3 <<
	.uleb128 .Ltmp183-.Ltmp182              #   Call between .Ltmp182 and .Ltmp183
	.uleb128 .Ltmp184-.Lfunc_begin1         #     jumps to .Ltmp184
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp185-.Lfunc_begin1         # >> Call Site 4 <<
	.uleb128 .Ltmp188-.Ltmp185              #   Call between .Ltmp185 and .Ltmp188
	.uleb128 .Ltmp199-.Lfunc_begin1         #     jumps to .Ltmp199
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp87-.Lfunc_begin1          # >> Call Site 5 <<
	.uleb128 .Ltmp88-.Ltmp87                #   Call between .Ltmp87 and .Ltmp88
	.uleb128 .Ltmp89-.Lfunc_begin1          #     jumps to .Ltmp89
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp112-.Lfunc_begin1         # >> Call Site 6 <<
	.uleb128 .Ltmp137-.Ltmp112              #   Call between .Ltmp112 and .Ltmp137
	.uleb128 .Ltmp138-.Lfunc_begin1         #     jumps to .Ltmp138
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp139-.Lfunc_begin1         # >> Call Site 7 <<
	.uleb128 .Ltmp140-.Ltmp139              #   Call between .Ltmp139 and .Ltmp140
	.uleb128 .Ltmp141-.Lfunc_begin1         #     jumps to .Ltmp141
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp142-.Lfunc_begin1         # >> Call Site 8 <<
	.uleb128 .Ltmp149-.Ltmp142              #   Call between .Ltmp142 and .Ltmp149
	.uleb128 .Ltmp150-.Lfunc_begin1         #     jumps to .Ltmp150
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp151-.Lfunc_begin1         # >> Call Site 9 <<
	.uleb128 .Ltmp152-.Ltmp151              #   Call between .Ltmp151 and .Ltmp152
	.uleb128 .Ltmp153-.Lfunc_begin1         #     jumps to .Ltmp153
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp159-.Lfunc_begin1         # >> Call Site 10 <<
	.uleb128 .Ltmp160-.Ltmp159              #   Call between .Ltmp159 and .Ltmp160
	.uleb128 .Ltmp166-.Lfunc_begin1         #     jumps to .Ltmp166
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp161-.Lfunc_begin1         # >> Call Site 11 <<
	.uleb128 .Ltmp162-.Ltmp161              #   Call between .Ltmp161 and .Ltmp162
	.uleb128 .Ltmp163-.Lfunc_begin1         #     jumps to .Ltmp163
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp164-.Lfunc_begin1         # >> Call Site 12 <<
	.uleb128 .Ltmp165-.Ltmp164              #   Call between .Ltmp164 and .Ltmp165
	.uleb128 .Ltmp166-.Lfunc_begin1         #     jumps to .Ltmp166
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp167-.Lfunc_begin1         # >> Call Site 13 <<
	.uleb128 .Ltmp168-.Ltmp167              #   Call between .Ltmp167 and .Ltmp168
	.uleb128 .Ltmp169-.Lfunc_begin1         #     jumps to .Ltmp169
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp170-.Lfunc_begin1         # >> Call Site 14 <<
	.uleb128 .Ltmp171-.Ltmp170              #   Call between .Ltmp170 and .Ltmp171
	.uleb128 .Ltmp172-.Lfunc_begin1         #     jumps to .Ltmp172
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp171-.Lfunc_begin1         # >> Call Site 15 <<
	.uleb128 .Ltmp189-.Ltmp171              #   Call between .Ltmp171 and .Ltmp189
	.byte	0                               #     has no landing pad
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp189-.Lfunc_begin1         # >> Call Site 16 <<
	.uleb128 .Ltmp198-.Ltmp189              #   Call between .Ltmp189 and .Ltmp198
	.uleb128 .Ltmp199-.Lfunc_begin1         #     jumps to .Ltmp199
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp200-.Lfunc_begin1         # >> Call Site 17 <<
	.uleb128 .Ltmp201-.Ltmp200              #   Call between .Ltmp200 and .Ltmp201
	.uleb128 .Ltmp202-.Lfunc_begin1         #     jumps to .Ltmp202
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp203-.Lfunc_begin1         # >> Call Site 18 <<
	.uleb128 .Ltmp204-.Ltmp203              #   Call between .Ltmp203 and .Ltmp204
	.uleb128 .Ltmp205-.Lfunc_begin1         #     jumps to .Ltmp205
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp206-.Lfunc_begin1         # >> Call Site 19 <<
	.uleb128 .Ltmp207-.Ltmp206              #   Call between .Ltmp206 and .Ltmp207
	.uleb128 .Ltmp208-.Lfunc_begin1         #     jumps to .Ltmp208
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp154-.Lfunc_begin1         # >> Call Site 20 <<
	.uleb128 .Ltmp157-.Ltmp154              #   Call between .Ltmp154 and .Ltmp157
	.uleb128 .Ltmp158-.Lfunc_begin1         #     jumps to .Ltmp158
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp157-.Lfunc_begin1         # >> Call Site 21 <<
	.uleb128 .Lfunc_end2-.Ltmp157           #   Call between .Ltmp157 and .Lfunc_end2
	.byte	0                               #     has no landing pad
	.byte	0                               #   On action: cleanup
.Lcst_end1:
	.p2align	2, 0x0
                                        # -- End function
	.section	.text._ZNSt6vectorIdSaIdEEC2EmRKS0_,"axG",@progbits,_ZNSt6vectorIdSaIdEEC2EmRKS0_,comdat
	.weak	_ZNSt6vectorIdSaIdEEC2EmRKS0_   # -- Begin function _ZNSt6vectorIdSaIdEEC2EmRKS0_
	.p2align	1, 0x90
	.type	_ZNSt6vectorIdSaIdEEC2EmRKS0_,@function
_ZNSt6vectorIdSaIdEEC2EmRKS0_:          # @_ZNSt6vectorIdSaIdEEC2EmRKS0_
	.cfi_startproc
# %bb.0:
	pushq	%r15
	.cfi_def_cfa_offset 16
	pushq	%r14
	.cfi_def_cfa_offset 24
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	.cfi_offset %r15, -16
	movq	%rsi, %rax
	shrq	$60, %rax
	jne	.LBB3_7
# %bb.1:                                # %_ZNSt6vectorIdSaIdEE17_S_check_init_lenEmRKS0_.exit
	movq	%rsi, %r14
	movq	%rdi, %rbx
	xorps	%xmm0, %xmm0
	movups	%xmm0, (%rdi)
	movq	$0, 16(%rdi)
	testq	%rsi, %rsi
	je	.LBB3_2
# %bb.3:
	movq	%rbx, %rdi
	movq	%r14, %rsi
	xorl	%edx, %edx
	callq	_ZNSt15__new_allocatorIdE8allocateEmPKv
	movq	%rax, (%rbx)
	leaq	(%rax,%r14,8), %r15
	movq	%r15, 16(%rbx)
	movq	$0, (%rax)
	addq	$8, %rax
	cmpq	$1, %r14
	jne	.LBB3_5
# %bb.4:
	movq	%rax, %r15
	jmp	.LBB3_6
.LBB3_2:                                # %_ZNSt12_Vector_baseIdSaIdEEC2EmRKS0_.exit.thread
	movups	%xmm0, (%rbx)
	movq	$0, 16(%rbx)
	xorl	%r15d, %r15d
	jmp	.LBB3_6
.LBB3_5:                                # %_ZSt6fill_nIPdmdET_S1_T0_RKT1_.exit.loopexit.i.i.i.i
	leaq	-8(,%r14,8), %rdx
	movq	%rax, %rdi
	xorl	%esi, %esi
	callq	memset@PLT
.LBB3_6:
	movq	%r15, 8(%rbx)
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	retq
.LBB3_7:
	.cfi_def_cfa_offset 32
	movl	$.L.str.18, %edi
	callq	_ZSt20__throw_length_errorPKc
.Lfunc_end3:
	.size	_ZNSt6vectorIdSaIdEEC2EmRKS0_, .Lfunc_end3-_ZNSt6vectorIdSaIdEEC2EmRKS0_
	.cfi_endproc
                                        # -- End function
	.section	.text._ZNSt15__new_allocatorIdE8allocateEmPKv,"axG",@progbits,_ZNSt15__new_allocatorIdE8allocateEmPKv,comdat
	.weak	_ZNSt15__new_allocatorIdE8allocateEmPKv # -- Begin function _ZNSt15__new_allocatorIdE8allocateEmPKv
	.p2align	1, 0x90
	.type	_ZNSt15__new_allocatorIdE8allocateEmPKv,@function
_ZNSt15__new_allocatorIdE8allocateEmPKv: # @_ZNSt15__new_allocatorIdE8allocateEmPKv
	.cfi_startproc
# %bb.0:
	pushq	%rax
	.cfi_def_cfa_offset 16
	movq	%rsi, %rax
	shrq	$60, %rax
	jne	.LBB4_1
# %bb.3:
	shlq	$3, %rsi
	movq	%rsi, %rdi
	popq	%rax
	.cfi_def_cfa_offset 8
	jmp	_Znwm                           # TAILCALL
.LBB4_1:
	.cfi_def_cfa_offset 16
	shrq	$61, %rsi
	je	.LBB4_2
# %bb.4:
	callq	_ZSt28__throw_bad_array_new_lengthv
.LBB4_2:
	callq	_ZSt17__throw_bad_allocv
.Lfunc_end4:
	.size	_ZNSt15__new_allocatorIdE8allocateEmPKv, .Lfunc_end4-_ZNSt15__new_allocatorIdE8allocateEmPKv
	.cfi_endproc
                                        # -- End function
	.section	.text._ZNSt6vectorIdSaIdEE17_M_realloc_insertIJRKdEEEvN9__gnu_cxx17__normal_iteratorIPdS1_EEDpOT_,"axG",@progbits,_ZNSt6vectorIdSaIdEE17_M_realloc_insertIJRKdEEEvN9__gnu_cxx17__normal_iteratorIPdS1_EEDpOT_,comdat
	.weak	_ZNSt6vectorIdSaIdEE17_M_realloc_insertIJRKdEEEvN9__gnu_cxx17__normal_iteratorIPdS1_EEDpOT_ # -- Begin function _ZNSt6vectorIdSaIdEE17_M_realloc_insertIJRKdEEEvN9__gnu_cxx17__normal_iteratorIPdS1_EEDpOT_
	.p2align	1, 0x90
	.type	_ZNSt6vectorIdSaIdEE17_M_realloc_insertIJRKdEEEvN9__gnu_cxx17__normal_iteratorIPdS1_EEDpOT_,@function
_ZNSt6vectorIdSaIdEE17_M_realloc_insertIJRKdEEEvN9__gnu_cxx17__normal_iteratorIPdS1_EEDpOT_: # @_ZNSt6vectorIdSaIdEE17_M_realloc_insertIJRKdEEEvN9__gnu_cxx17__normal_iteratorIPdS1_EEDpOT_
	.cfi_startproc
# %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	pushq	%r15
	.cfi_def_cfa_offset 24
	pushq	%r14
	.cfi_def_cfa_offset 32
	pushq	%r13
	.cfi_def_cfa_offset 40
	pushq	%r12
	.cfi_def_cfa_offset 48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	subq	$24, %rsp
	.cfi_def_cfa_offset 80
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	.cfi_offset %rbp, -16
	movq	%rdx, (%rsp)                    # 8-byte Spill
	movq	%rsi, %r12
	movq	%rdi, %rbx
	movl	$1, %esi
	movl	$.L.str.15, %edx
	callq	_ZNKSt6vectorIdSaIdEE12_M_check_lenEmPKc
	movq	(%rbx), %r13
	movq	8(%rbx), %r15
	movq	%r12, 8(%rsp)                   # 8-byte Spill
	subq	%r13, %r12
	movq	%r12, %r14
	sarq	$3, %r14
	testq	%rax, %rax
	movq	%rax, 16(%rsp)                  # 8-byte Spill
	je	.LBB5_1
# %bb.2:
	movq	%rbx, %rdi
	movq	%rax, %rsi
	xorl	%edx, %edx
	callq	_ZNSt15__new_allocatorIdE8allocateEmPKv
	movq	%rax, %rbp
	jmp	.LBB5_3
.LBB5_1:
	xorl	%ebp, %ebp
.LBB5_3:                                # %_ZNSt12_Vector_baseIdSaIdEE11_M_allocateEm.exit
	movq	(%rsp), %rax                    # 8-byte Reload
	movsd	(%rax), %xmm0                   # xmm0 = mem[0],zero
	movsd	%xmm0, (%rbp,%r14,8)
	testq	%r12, %r12
	jle	.LBB5_5
# %bb.4:
	movq	%rbp, %rdi
	movq	%r13, %rsi
	movq	%r12, %rdx
	callq	memmove@PLT
.LBB5_5:                                # %_ZNSt6vectorIdSaIdEE11_S_relocateEPdS2_S2_RS0_.exit
	addq	%rbp, %r12
	addq	$8, %r12
	movq	8(%rsp), %rsi                   # 8-byte Reload
	subq	%rsi, %r15
	testq	%r15, %r15
	jle	.LBB5_7
# %bb.6:
	movq	%r12, %rdi
	movq	%r15, %rdx
	callq	memmove@PLT
.LBB5_7:                                # %_ZNSt6vectorIdSaIdEE11_S_relocateEPdS2_S2_RS0_.exit16
	testq	%r13, %r13
	je	.LBB5_9
# %bb.8:
	movq	%r13, %rdi
	callq	_ZdlPv
.LBB5_9:                                # %_ZNSt12_Vector_baseIdSaIdEE13_M_deallocateEPdm.exit
	addq	%r15, %r12
	movq	%rbp, (%rbx)
	movq	%r12, 8(%rbx)
	movq	16(%rsp), %rax                  # 8-byte Reload
	leaq	(,%rax,8), %rax
	addq	%rbp, %rax
	movq	%rax, 16(%rbx)
	addq	$24, %rsp
	.cfi_def_cfa_offset 56
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%r12
	.cfi_def_cfa_offset 40
	popq	%r13
	.cfi_def_cfa_offset 32
	popq	%r14
	.cfi_def_cfa_offset 24
	popq	%r15
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	retq
.Lfunc_end5:
	.size	_ZNSt6vectorIdSaIdEE17_M_realloc_insertIJRKdEEEvN9__gnu_cxx17__normal_iteratorIPdS1_EEDpOT_, .Lfunc_end5-_ZNSt6vectorIdSaIdEE17_M_realloc_insertIJRKdEEEvN9__gnu_cxx17__normal_iteratorIPdS1_EEDpOT_
	.cfi_endproc
                                        # -- End function
	.section	.text._ZNKSt6vectorIdSaIdEE12_M_check_lenEmPKc,"axG",@progbits,_ZNKSt6vectorIdSaIdEE12_M_check_lenEmPKc,comdat
	.weak	_ZNKSt6vectorIdSaIdEE12_M_check_lenEmPKc # -- Begin function _ZNKSt6vectorIdSaIdEE12_M_check_lenEmPKc
	.p2align	1, 0x90
	.type	_ZNKSt6vectorIdSaIdEE12_M_check_lenEmPKc,@function
_ZNKSt6vectorIdSaIdEE12_M_check_lenEmPKc: # @_ZNKSt6vectorIdSaIdEE12_M_check_lenEmPKc
	.cfi_startproc
# %bb.0:
	movabsq	$1152921504606846975, %rcx      # imm = 0xFFFFFFFFFFFFFFF
	movq	8(%rdi), %r8
	subq	(%rdi), %r8
	sarq	$3, %r8
	movq	%rcx, %rax
	subq	%r8, %rax
	cmpq	%rsi, %rax
	jb	.LBB6_2
# %bb.1:
	cmpq	%rsi, %r8
	cmovaq	%r8, %rsi
	leaq	(%rsi,%r8), %rax
	cmpq	%rcx, %rax
	cmovaeq	%rcx, %rax
	addq	%r8, %rsi
	cmovbq	%rcx, %rax
	retq
.LBB6_2:
	pushq	%rax
	.cfi_def_cfa_offset 16
	movq	%rdx, %rdi
	callq	_ZSt20__throw_length_errorPKc
.Lfunc_end6:
	.size	_ZNKSt6vectorIdSaIdEE12_M_check_lenEmPKc, .Lfunc_end6-_ZNKSt6vectorIdSaIdEE12_M_check_lenEmPKc
	.cfi_endproc
                                        # -- End function
	.type	.L.str,@object                  # @.str
	.section	.rodata.str1.1,"aMS",@progbits,1
.L.str:
	.asciz	"IMPT_source.dat"
	.size	.L.str, 16

	.type	.L.str.1,@object                # @.str.1
.L.str.1:
	.asciz	"Error, IMPT_source not found"
	.size	.L.str.1, 29

	.type	.L.str.2,@object                # @.str.2
.L.str.2:
	.asciz	"GyPerMU3D_0"
	.size	.L.str.2, 12

	.type	.L.str.3,@object                # @.str.3
.L.str.3:
	.asciz	"_"
	.size	.L.str.3, 2

	.type	.L.str.4,@object                # @.str.4
.L.str.4:
	.asciz	"MeV_field_"
	.size	.L.str.4, 11

	.type	.L.str.5,@object                # @.str.5
.L.str.5:
	.asciz	"by"
	.size	.L.str.5, 3

	.type	.L.str.6,@object                # @.str.6
.L.str.6:
	.asciz	"spots_"
	.size	.L.str.6, 7

	.type	.L.str.7,@object                # @.str.7
.L.str.7:
	.asciz	"cm2spacing.bin"
	.size	.L.str.7, 15

	.type	.L.str.8,@object                # @.str.8
.L.str.8:
	.asciz	"GyPerMU3D_"
	.size	.L.str.8, 11

	.type	.L.str.9,@object                # @.str.9
.L.str.9:
	.asciz	"Error, no file found"
	.size	.L.str.9, 21

	.type	.L.str.10,@object               # @.str.10
.L.str.10:
	.asciz	"Writing to binary file"
	.size	.L.str.10, 23

	.type	.L.str.11,@object               # @.str.11
.L.str.11:
	.asciz	"GyPerMU3D_SOBP_"
	.size	.L.str.11, 16

	.type	.L.str.12,@object               # @.str.12
.L.str.12:
	.asciz	"-"
	.size	.L.str.12, 2

	.type	.L.str.13,@object               # @.str.13
.L.str.13:
	.asciz	".bin"
	.size	.L.str.13, 5

	.type	.L.str.14,@object               # @.str.14
.L.str.14:
	.asciz	"vector::reserve"
	.size	.L.str.14, 16

	.type	.L.str.15,@object               # @.str.15
.L.str.15:
	.asciz	"vector::_M_realloc_insert"
	.size	.L.str.15, 26

	.type	.L.str.18,@object               # @.str.18
.L.str.18:
	.asciz	"cannot create std::vector larger than max_size()"
	.size	.L.str.18, 49

	.type	__hip_cuid_,@object             # @__hip_cuid_
	.bss
	.globl	__hip_cuid_
__hip_cuid_:
	.byte	0                               # 0x0
	.size	__hip_cuid_, 1

	.ident	"AMD clang version 18.0.0git (https://github.com/RadeonOpenCompute/llvm-project roc-6.3.2 25012 e5bf7e55c91490b07c49d8960fa7983d864936c4)"
	.section	".note.GNU-stack","",@progbits
	.addrsig
	.addrsig_sym __gxx_personality_v0
	.addrsig_sym _Unwind_Resume
	.addrsig_sym _ZSt4cout
	.addrsig_sym __hip_cuid_

	.text
	.p2alignl 7, 3214868480
	.fill 96, 4, 3214868480
	.type	__hip_cuid_,@object             ; @__hip_cuid_
	.section	.bss,"aw",@nobits
	.globl	__hip_cuid_
__hip_cuid_:
	.byte	0                               ; 0x0
	.size	__hip_cuid_, 1

	.ident	"AMD clang version 18.0.0git (https://github.com/RadeonOpenCompute/llvm-project roc-6.3.2 25012 e5bf7e55c91490b07c49d8960fa7983d864936c4)"
	.section	".note.GNU-stack","",@progbits
	.addrsig
	.addrsig_sym __hip_cuid_
	.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
	.amdgpu_metadata
---
amdhsa.kernels:  []
amdhsa.target:   amdgcn-amd-amdhsa--gfx1100
amdhsa.version:
  - 1
  - 2
...

	.end_amdgpu_metadata
