#include <iostream>
#include <fstream>
#include <cmath>
#include <cstdlib>
#include <string>
#include <iomanip>

#define T_P_B 1024 


///////////////////////////// Global variables /////////////////////////////////

std::string dimension;          // grid dimension
float k;                        // k-step
int timesteps;                  // num of timesteps
int width, height, depth;       // grid size
float startTemp, fixedTemp;     // node start temp
int heat_x, heat_y, heat_z,     // fixed heater vars
    heat_w, heat_h, heat_d;

float *d_old, *d_new, *d_heaters, // grids for values
      *g_old, *g_new, *heaters;


///////////////////////////// CUDA Functions ///////////////////////////////////

__global__ void heat_sim(float *oldg, float * newg, float *fixed, 
						 int width, int height, int depth, float k)
{
	int idx = threadIdx.x + blockIdx.x * blockDim.x;
	float left, right, up, down, above, below;
	float old = oldg[idx];
	
	if (idx < (width*height*depth))
	{	
		if (fixed[idx] != 0) newg[idx] = fixed[idx];
		else if (fixed[idx] == 0)
		{	
			// x-, x+
			((idx%width) == 0) ? (left = old) : (left = oldg[idx-1]);
			((idx%width) == (width-1)) ? (right = old) : (right = oldg[idx+1]);
		
			// y-, y+
			(idx%(width*height) < width) ? (up = old) : (up = oldg[idx - width]);
			(idx%(width*height) >= ((height-1)*width)) 
			? (down = old) : (down = oldg[idx + width]);
		
			// z-, z+
			if (depth <= 1)
			{
				above = 0.0;
				below = 0.0;
				newg[idx] = oldg[idx] + k*(up+down+left+right-(4.0*oldg[idx]));
				
			}
			else if (depth > 1)
			{
				if (idx < (width*height)) above = old;
				else above = oldg[idx - (width*height)];
				if (idx >= ((depth-1)*(width*height))) below = old;
				else below = oldg[idx + (width*height)];
				newg[idx] = oldg[idx] + k*(up+down+left
											+right+above+below-(6.0*oldg[idx]));
			}
		}
	}
}

__global__ void grid_cpy(float *oldg, float *newg, int size)
{
	int idx = threadIdx.x + blockIdx.x * blockDim.x;
	if (idx < size)
		oldg[idx] = newg[idx];
}

///////////////////////////// End CUDA Functions ///////////////////////////////



int main(int argc, char * argv[])
{
///////////////////////////// Config file parser ///////////////////////////////

    std::ifstream conf(argv[1]);
    if (conf.is_open())
    {
        std::string line;
        while (getline(conf, line)){
            if ((line[0] == '#') || line.empty() || line[0] == '\r')  
		        continue;
			
			// get dimension
            while ((line[0] == '#') || line.empty() || line[0] == '\r') 
				getline(conf,line);
            dimension = line.substr(0,2);
            
			// get k value
			getline(conf, line);
            while ((line[0] == '#') || line.empty() || line[0] == '\r') 
				getline(conf,line);
            k = std::stof(line);
            
			// get timesteps
			getline(conf, line);	
            while ((line[0] == '#') || line.empty() || line[0] == '\r') 
				getline(conf,line);
            timesteps = std::stoi(line);
            
			// get grid size
			getline(conf, line);
            while ((line[0] == '#') || line.empty() || line[0] == '\r') 
				getline(conf,line);
            int comma = line.find(',');
            width = std::stoi(line.substr(0, comma));
            line = line.substr(comma+1);
            if (dimension == "2D"){
                height = std::stoi(line);
                depth = 1;
            }
            else if (dimension == "3D"){
                comma = line.find(','); 
                height = std::stoi(line.substr(0, comma));
                depth = std::stoi(line.substr(comma+1));
            }
            
			// get block start temp
    		getline(conf, line);
            while ((line[0] == '#') || line.empty() || line[0] == '\r') 
				getline(conf,line);
            startTemp = std::stof(line);
            
			// create heaters
			heaters = new float[width*height*depth];
			std::fill(heaters, heaters+(width*height*depth), 0);
                
			while(getline(conf, line)){
		    	if (line[0] == '#' || line.empty() || line[0] == '\r') 
			        continue;
                int comma = line.find(',');
                heat_x = std::stoi(line.substr(0, comma));
                line = line.substr(comma+1);
                comma = line.find(',');
                heat_y = std::stoi(line.substr(0, comma));
                line = line.substr(comma+1);
                comma = line.find(',');
                if (dimension == "2D"){
                    heat_w = std::stoi(line.substr(0, comma));
                    line = line.substr(comma+1);
                    comma = line.find(',');
                    heat_h = std::stoi(line.substr(0, comma));
                    line = line.substr(comma+1);
                    heat_d = 1;
                    heat_z = 0;
                    fixedTemp = std::stof(line);
                }
                else if (dimension == "3D"){
                    heat_z = std::stoi(line.substr(0, comma));
                    line = line.substr(comma+1);
                    comma = line.find(',');
                    heat_w = std::stoi(line.substr(0, comma));
                    line = line.substr(comma+1);
                    comma = line.find(',');
                    heat_h = std::stoi(line.substr(0, comma));
                    line = line.substr(comma+1);
                    comma = line.find(',');
                    heat_d = std::stoi(line.substr(0, comma));
                    line = line.substr(comma+1);
                    fixedTemp = std::stof(line);
                }
                for (int i = heat_x+width*heat_y; 
						 i < heat_x+heat_w+width*heat_y; i++)
                    for (int j = 0; j < heat_h; j++)
                        for (int k = heat_z; k < heat_z+heat_d; k++)
                            heaters[i+(j*width)+(k*width*height)] = fixedTemp;
            }
        }
    }
    else std::cerr << "Couldn't open config file.";

////////////////////////// End config file parser //////////////////////////////

	int dim = width*height*depth;
	
	// set up host grids
	g_old = new float[dim];
	g_new = new float[dim];
	std::fill(g_new, g_new+dim, 0);
	std::fill(g_old, g_old+dim, 0);

	for (int i = 0; i < dim; i++)
	{
		g_old[i] = startTemp;
		if (heaters[i] != 0) g_old[i] = heaters[i];
	}

	// allocate blockSize - must be at least one block
	int blockSize = ceil(float(dim)/float(T_P_B));

	// allocate device memory in 1D array
	cudaMalloc((void**)&d_new, dim*sizeof(float));
	cudaMalloc((void**)&d_old, dim*sizeof(float));
	cudaMalloc((void**)&d_heaters, dim*sizeof(float));
	
	// copy filled arrays from host to device
	cudaMemcpy(d_old, g_old, dim*sizeof(float), cudaMemcpyHostToDevice);
	cudaMemcpy(d_new, g_new, dim*sizeof(float), cudaMemcpyHostToDevice);	
	cudaMemcpy(d_heaters, heaters, dim*sizeof(float), cudaMemcpyHostToDevice);
	
	// run kernels
	for (int t = 0; t < timesteps; t++)
	{
		heat_sim<<<blockSize, T_P_B>>> (d_old, d_new, d_heaters, 
										 width, height, depth, k);
		cudaDeviceSynchronize();
		grid_cpy<<< blockSize, T_P_B>>> (d_old, d_new, dim);		
		cudaDeviceSynchronize();
	}

	// copy data back from device to host
	cudaMemcpy(g_new, d_new, dim*sizeof(float), cudaMemcpyDeviceToHost);


    // print out to csv
    std::ofstream csv("../heatOutput.csv", std::ios::out);            
    if (csv.is_open()){ 
        for (int i = 0; i < dim; i++)
        {
            if (i%width == width-1) csv << g_new[i] << std::endl;
            else csv << g_new[i] << ", ";
            if (i%(width*height) == (width*height)-1) csv << std::endl;
        }
    }
    else
        std::cout << "Unable to open file, try again." << std::endl;           
    csv.close();

	// deallocate all memory
	delete[] g_old;
	delete[] g_new;
	delete[] heaters;
	cudaFree(d_old);
	cudaFree(d_new);
	cudaFree(d_heaters);
}

	.file	"tmpxft_00206078_00000000-6_heat2D3D.cudafe1.cpp"
	.text
#APP
	.globl _ZSt21ios_base_library_initv

#NO_APP
	.type	_ZL26__cudaUnregisterBinaryUtilv, @function
_ZL26__cudaUnregisterBinaryUtilv:
.LFB4012:
	.cfi_startproc
	endbr64
	movq	_ZL20__cudaFatCubinHandle(%rip), %rdi
	jmp	__cudaUnregisterFatBinary@PLT
	.cfi_endproc
.LFE4012:
	.size	_ZL26__cudaUnregisterBinaryUtilv, .-_ZL26__cudaUnregisterBinaryUtilv
	.align 2
	.type	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_.isra.0, @function
_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_.isra.0:
.LFB4772:
	.cfi_startproc
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	movq	%rdi, %rbp
	movq	%rsi, %rdi
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	movq	%rsi, %rbx
	call	_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv@PLT
	testb	%al, %al
	je	.L3
	cmpq	%rbp, %rbx
	je	.L4
	movq	8(%rbx), %rdx
	testq	%rdx, %rdx
	je	.L5
	movq	(%rbx), %rsi
	movq	0(%rbp), %rdi
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7_S_copyEPcPKcm@PLT
.L5:
	movq	8(%rbx), %rax
	movq	0(%rbp), %rdx
	movq	%rax, 8(%rbp)
	movb	$0, (%rdx,%rax)
	jmp	.L4
.L3:
	movq	%rbp, %rdi
	call	_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv@PLT
	movl	%eax, %edx
	xorl	%eax, %eax
	testb	%dl, %dl
	jne	.L6
	movq	0(%rbp), %rax
	movq	16(%rbp), %r12
.L6:
	movq	(%rbx), %rdx
	movq	%rdx, 0(%rbp)
	movq	8(%rbx), %rdx
	movq	%rdx, 8(%rbp)
	movq	16(%rbx), %rdx
	movq	%rdx, 16(%rbp)
	testq	%rax, %rax
	je	.L7
	movq	%rax, (%rbx)
	movq	%r12, 16(%rbx)
	jmp	.L4
.L7:
	leaq	16(%rbx), %rax
	movq	%rax, (%rbx)
.L4:
	xorl	%eax, %eax
	movq	%rax, 8(%rbx)
	movq	(%rbx), %rax
	movb	$0, (%rax)
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE4772:
	.size	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_.isra.0, .-_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_.isra.0
	.globl	_Z35__device_stub__Z8heat_simPfS_S_iiifPfS_S_iiif
	.type	_Z35__device_stub__Z8heat_simPfS_S_iiifPfS_S_iiif, @function
_Z35__device_stub__Z8heat_simPfS_S_iiifPfS_S_iiif:
.LFB4034:
	.cfi_startproc
	endbr64
	subq	$184, %rsp
	.cfi_def_cfa_offset 192
	movq	%rdi, 40(%rsp)
	leaq	64(%rsp), %rdi
	movq	%rsi, 32(%rsp)
	leaq	76(%rsp), %rsi
	movq	%rdx, 24(%rsp)
	leaq	48(%rsp), %rdx
	movl	%ecx, 20(%rsp)
	leaq	56(%rsp), %rcx
	movl	%r8d, 16(%rsp)
	movl	%r9d, 12(%rsp)
	movss	%xmm0, 8(%rsp)
	movq	%fs:40, %rax
	movq	%rax, 168(%rsp)
	xorl	%eax, %eax
	leaq	40(%rsp), %rax
	movl	$1, 72(%rsp)
	movq	%rax, 112(%rsp)
	leaq	32(%rsp), %rax
	movq	%rax, 120(%rsp)
	leaq	24(%rsp), %rax
	movq	%rax, 128(%rsp)
	leaq	20(%rsp), %rax
	movq	%rax, 136(%rsp)
	leaq	16(%rsp), %rax
	movq	%rax, 144(%rsp)
	leaq	12(%rsp), %rax
	movq	%rax, 152(%rsp)
	leaq	8(%rsp), %rax
	movq	%rax, 160(%rsp)
	movabsq	$4294967297, %rax
	movq	%rax, 64(%rsp)
	movq	%rax, 76(%rsp)
	movl	$1, 84(%rsp)
	call	__cudaPopCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L14
	pushq	56(%rsp)
	.cfi_def_cfa_offset 200
	leaq	_Z8heat_simPfS_S_iiif(%rip), %rdi
	pushq	56(%rsp)
	.cfi_def_cfa_offset 208
	movq	92(%rsp), %rcx
	movl	100(%rsp), %r8d
	movq	80(%rsp), %rsi
	movl	88(%rsp), %edx
	leaq	128(%rsp), %r9
	call	cudaLaunchKernel@PLT
	popq	%rax
	.cfi_def_cfa_offset 200
	popq	%rdx
	.cfi_def_cfa_offset 192
.L14:
	movq	168(%rsp), %rax
	subq	%fs:40, %rax
	je	.L16
	call	__stack_chk_fail@PLT
.L16:
	addq	$184, %rsp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE4034:
	.size	_Z35__device_stub__Z8heat_simPfS_S_iiifPfS_S_iiif, .-_Z35__device_stub__Z8heat_simPfS_S_iiifPfS_S_iiif
	.globl	_Z8heat_simPfS_S_iiif
	.type	_Z8heat_simPfS_S_iiif, @function
_Z8heat_simPfS_S_iiif:
.LFB4035:
	.cfi_startproc
	endbr64
	jmp	_Z35__device_stub__Z8heat_simPfS_S_iiifPfS_S_iiif
	.cfi_endproc
.LFE4035:
	.size	_Z8heat_simPfS_S_iiif, .-_Z8heat_simPfS_S_iiif
	.globl	_Z30__device_stub__Z8grid_cpyPfS_iPfS_i
	.type	_Z30__device_stub__Z8grid_cpyPfS_iPfS_i, @function
_Z30__device_stub__Z8grid_cpyPfS_iPfS_i:
.LFB4036:
	.cfi_startproc
	endbr64
	subq	$136, %rsp
	.cfi_def_cfa_offset 144
	movq	%rdi, 24(%rsp)
	leaq	40(%rsp), %rcx
	leaq	48(%rsp), %rdi
	movq	%rsi, 16(%rsp)
	leaq	60(%rsp), %rsi
	movl	%edx, 12(%rsp)
	leaq	32(%rsp), %rdx
	movq	%fs:40, %rax
	movq	%rax, 120(%rsp)
	xorl	%eax, %eax
	leaq	24(%rsp), %rax
	movl	$1, 56(%rsp)
	movq	%rax, 96(%rsp)
	leaq	16(%rsp), %rax
	movq	%rax, 104(%rsp)
	leaq	12(%rsp), %rax
	movq	%rax, 112(%rsp)
	movabsq	$4294967297, %rax
	movq	%rax, 48(%rsp)
	movq	%rax, 60(%rsp)
	movl	$1, 68(%rsp)
	call	__cudaPopCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L19
	pushq	40(%rsp)
	.cfi_def_cfa_offset 152
	leaq	_Z8grid_cpyPfS_i(%rip), %rdi
	pushq	40(%rsp)
	.cfi_def_cfa_offset 160
	movq	76(%rsp), %rcx
	movl	84(%rsp), %r8d
	movq	64(%rsp), %rsi
	movl	72(%rsp), %edx
	leaq	112(%rsp), %r9
	call	cudaLaunchKernel@PLT
	popq	%rax
	.cfi_def_cfa_offset 152
	popq	%rdx
	.cfi_def_cfa_offset 144
.L19:
	movq	120(%rsp), %rax
	subq	%fs:40, %rax
	je	.L21
	call	__stack_chk_fail@PLT
.L21:
	addq	$136, %rsp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE4036:
	.size	_Z30__device_stub__Z8grid_cpyPfS_iPfS_i, .-_Z30__device_stub__Z8grid_cpyPfS_iPfS_i
	.globl	_Z8grid_cpyPfS_i
	.type	_Z8grid_cpyPfS_i, @function
_Z8grid_cpyPfS_i:
.LFB4037:
	.cfi_startproc
	endbr64
	jmp	_Z30__device_stub__Z8grid_cpyPfS_iPfS_i
	.cfi_endproc
.LFE4037:
	.size	_Z8grid_cpyPfS_i, .-_Z8grid_cpyPfS_i
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"_Z8grid_cpyPfS_i"
.LC1:
	.string	"_Z8heat_simPfS_S_iiif"
	.section	.text.startup,"ax",@progbits
	.type	_ZL24__sti____cudaRegisterAllv, @function
_ZL24__sti____cudaRegisterAllv:
.LFB4039:
	.cfi_startproc
	endbr64
	pushq	%rbx
	.cfi_def_cfa_offset 16
	.cfi_offset 3, -16
	leaq	_ZL15__fatDeviceText(%rip), %rdi
	call	__cudaRegisterFatBinary@PLT
	pushq	$0
	.cfi_def_cfa_offset 24
	xorl	%r9d, %r9d
	orl	$-1, %r8d
	pushq	$0
	.cfi_def_cfa_offset 32
	leaq	.LC0(%rip), %rdx
	movq	%rax, %rdi
	movq	%rax, %rbx
	pushq	$0
	.cfi_def_cfa_offset 40
	movq	%rdx, %rcx
	leaq	_Z8grid_cpyPfS_i(%rip), %rsi
	pushq	$0
	.cfi_def_cfa_offset 48
	movq	%rax, _ZL20__cudaFatCubinHandle(%rip)
	call	__cudaRegisterFunction@PLT
	addq	$32, %rsp
	.cfi_def_cfa_offset 16
	movq	%rbx, %rdi
	xorl	%r9d, %r9d
	pushq	$0
	.cfi_def_cfa_offset 24
	leaq	.LC1(%rip), %rdx
	orl	$-1, %r8d
	leaq	_Z8heat_simPfS_S_iiif(%rip), %rsi
	pushq	$0
	.cfi_def_cfa_offset 32
	movq	%rdx, %rcx
	pushq	$0
	.cfi_def_cfa_offset 40
	pushq	$0
	.cfi_def_cfa_offset 48
	call	__cudaRegisterFunction@PLT
	movq	_ZL20__cudaFatCubinHandle(%rip), %rdi
	addq	$32, %rsp
	.cfi_def_cfa_offset 16
	call	__cudaRegisterFatBinaryEnd@PLT
	leaq	_ZL26__cudaUnregisterBinaryUtilv(%rip), %rdi
	popq	%rbx
	.cfi_def_cfa_offset 8
	jmp	atexit@PLT
	.cfi_endproc
.LFE4039:
	.size	_ZL24__sti____cudaRegisterAllv, .-_ZL24__sti____cudaRegisterAllv
	.section	.init_array,"aw"
	.align 8
	.quad	_ZL24__sti____cudaRegisterAllv
	.section	.text._ZZN9__gnu_cxx6__stoaIlicJiEEET0_PFT_PKT1_PPS3_DpT2_EPKcS5_PmS9_EN11_Save_errnoD2Ev,"axG",@progbits,_ZZN9__gnu_cxx6__stoaIlicJiEEET0_PFT_PKT1_PPS3_DpT2_EPKcS5_PmS9_EN11_Save_errnoD5Ev,comdat
	.align 2
	.weak	_ZZN9__gnu_cxx6__stoaIlicJiEEET0_PFT_PKT1_PPS3_DpT2_EPKcS5_PmS9_EN11_Save_errnoD2Ev
	.type	_ZZN9__gnu_cxx6__stoaIlicJiEEET0_PFT_PKT1_PPS3_DpT2_EPKcS5_PmS9_EN11_Save_errnoD2Ev, @function
_ZZN9__gnu_cxx6__stoaIlicJiEEET0_PFT_PKT1_PPS3_DpT2_EPKcS5_PmS9_EN11_Save_errnoD2Ev:
.LFB4118:
	.cfi_startproc
	endbr64
	pushq	%rbx
	.cfi_def_cfa_offset 16
	.cfi_offset 3, -16
	movq	%rdi, %rbx
	call	__errno_location@PLT
	cmpl	$0, (%rax)
	jne	.L26
	movl	(%rbx), %edx
	movl	%edx, (%rax)
.L26:
	popq	%rbx
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE4118:
	.size	_ZZN9__gnu_cxx6__stoaIlicJiEEET0_PFT_PKT1_PPS3_DpT2_EPKcS5_PmS9_EN11_Save_errnoD2Ev, .-_ZZN9__gnu_cxx6__stoaIlicJiEEET0_PFT_PKT1_PPS3_DpT2_EPKcS5_PmS9_EN11_Save_errnoD2Ev
	.weak	_ZZN9__gnu_cxx6__stoaIlicJiEEET0_PFT_PKT1_PPS3_DpT2_EPKcS5_PmS9_EN11_Save_errnoD1Ev
	.set	_ZZN9__gnu_cxx6__stoaIlicJiEEET0_PFT_PKT1_PPS3_DpT2_EPKcS5_PmS9_EN11_Save_errnoD1Ev,_ZZN9__gnu_cxx6__stoaIlicJiEEET0_PFT_PKT1_PPS3_DpT2_EPKcS5_PmS9_EN11_Save_errnoD2Ev
	.section	.rodata.str1.1
.LC2:
	.string	"stoi"
	.text
	.type	_ZNSt7__cxx114stoiERKNS_12basic_stringIcSt11char_traitsIcESaIcEEEPmi.isra.0, @function
_ZNSt7__cxx114stoiERKNS_12basic_stringIcSt11char_traitsIcESaIcEEEPmi.isra.0:
.LFB4774:
	.cfi_startproc
	.cfi_personality 0x9b,DW.ref.__gxx_personality_v0
	.cfi_lsda 0x1b,.LLSDA4774
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	movq	%rsi, %r12
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	movq	%rdi, %rbx
	subq	$56, %rsp
	.cfi_def_cfa_offset 96
	movl	%edx, 12(%rsp)
	leaq	28(%rsp), %r13
	movq	%fs:40, %rax
	movq	%rax, 40(%rsp)
	xorl	%eax, %eax
	call	__errno_location@PLT
	movl	12(%rsp), %edx
	leaq	32(%rsp), %rsi
	movq	%rbx, %rdi
	movq	%rax, %rbp
	movl	(%rax), %eax
	movl	%eax, 28(%rsp)
	xorl	%eax, %eax
	movl	%eax, 0(%rbp)
	call	__isoc23_strtol@PLT
	movq	32(%rsp), %rdx
	cmpq	%rdx, %rbx
	jne	.L30
	movq	40(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L43
	leaq	.LC2(%rip), %rdi
.LEHB0:
	call	_ZSt24__throw_invalid_argumentPKc@PLT
.L30:
	cmpl	$34, 0(%rbp)
	je	.L32
	movl	$2147483648, %ecx
	movl	$4294967295, %esi
	addq	%rax, %rcx
	cmpq	%rcx, %rsi
	jnb	.L33
.L32:
	movq	40(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L43
	leaq	.LC2(%rip), %rdi
	call	_ZSt20__throw_out_of_rangePKc@PLT
.LEHE0:
.L33:
	testq	%r12, %r12
	je	.L35
	subq	%rbx, %rdx
	movq	%rdx, (%r12)
.L35:
	movq	%r13, %rdi
	movl	%eax, 12(%rsp)
	call	_ZZN9__gnu_cxx6__stoaIlicJiEEET0_PFT_PKT1_PPS3_DpT2_EPKcS5_PmS9_EN11_Save_errnoD1Ev
	movl	12(%rsp), %eax
	movq	40(%rsp), %rdx
	subq	%fs:40, %rdx
	je	.L38
	jmp	.L43
.L39:
	endbr64
	movq	%rax, %rbx
.L36:
	movq	%r13, %rdi
	call	_ZZN9__gnu_cxx6__stoaIlicJiEEET0_PFT_PKT1_PPS3_DpT2_EPKcS5_PmS9_EN11_Save_errnoD1Ev
	movq	40(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L43
	movq	%rbx, %rdi
.LEHB1:
	call	_Unwind_Resume@PLT
.LEHE1:
.L43:
	call	__stack_chk_fail@PLT
.L38:
	addq	$56, %rsp
	.cfi_def_cfa_offset 40
	popq	%rbx
	.cfi_def_cfa_offset 32
	popq	%rbp
	.cfi_def_cfa_offset 24
	popq	%r12
	.cfi_def_cfa_offset 16
	popq	%r13
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE4774:
	.globl	__gxx_personality_v0
	.section	.gcc_except_table,"a",@progbits
.LLSDA4774:
	.byte	0xff
	.byte	0xff
	.byte	0x1
	.uleb128 .LLSDACSE4774-.LLSDACSB4774
.LLSDACSB4774:
	.uleb128 .LEHB0-.LFB4774
	.uleb128 .LEHE0-.LEHB0
	.uleb128 .L39-.LFB4774
	.uleb128 0
	.uleb128 .LEHB1-.LFB4774
	.uleb128 .LEHE1-.LEHB1
	.uleb128 0
	.uleb128 0
.LLSDACSE4774:
	.text
	.size	_ZNSt7__cxx114stoiERKNS_12basic_stringIcSt11char_traitsIcESaIcEEEPmi.isra.0, .-_ZNSt7__cxx114stoiERKNS_12basic_stringIcSt11char_traitsIcESaIcEEEPmi.isra.0
	.section	.text._ZZN9__gnu_cxx6__stoaIffcJEEET0_PFT_PKT1_PPS3_DpT2_EPKcS5_PmS9_EN11_Save_errnoD2Ev,"axG",@progbits,_ZZN9__gnu_cxx6__stoaIffcJEEET0_PFT_PKT1_PPS3_DpT2_EPKcS5_PmS9_EN11_Save_errnoD5Ev,comdat
	.align 2
	.weak	_ZZN9__gnu_cxx6__stoaIffcJEEET0_PFT_PKT1_PPS3_DpT2_EPKcS5_PmS9_EN11_Save_errnoD2Ev
	.type	_ZZN9__gnu_cxx6__stoaIffcJEEET0_PFT_PKT1_PPS3_DpT2_EPKcS5_PmS9_EN11_Save_errnoD2Ev, @function
_ZZN9__gnu_cxx6__stoaIffcJEEET0_PFT_PKT1_PPS3_DpT2_EPKcS5_PmS9_EN11_Save_errnoD2Ev:
.LFB4163:
	.cfi_startproc
	endbr64
	pushq	%rbx
	.cfi_def_cfa_offset 16
	.cfi_offset 3, -16
	movq	%rdi, %rbx
	call	__errno_location@PLT
	cmpl	$0, (%rax)
	jne	.L46
	movl	(%rbx), %edx
	movl	%edx, (%rax)
.L46:
	popq	%rbx
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE4163:
	.size	_ZZN9__gnu_cxx6__stoaIffcJEEET0_PFT_PKT1_PPS3_DpT2_EPKcS5_PmS9_EN11_Save_errnoD2Ev, .-_ZZN9__gnu_cxx6__stoaIffcJEEET0_PFT_PKT1_PPS3_DpT2_EPKcS5_PmS9_EN11_Save_errnoD2Ev
	.weak	_ZZN9__gnu_cxx6__stoaIffcJEEET0_PFT_PKT1_PPS3_DpT2_EPKcS5_PmS9_EN11_Save_errnoD1Ev
	.set	_ZZN9__gnu_cxx6__stoaIffcJEEET0_PFT_PKT1_PPS3_DpT2_EPKcS5_PmS9_EN11_Save_errnoD1Ev,_ZZN9__gnu_cxx6__stoaIffcJEEET0_PFT_PKT1_PPS3_DpT2_EPKcS5_PmS9_EN11_Save_errnoD2Ev
	.section	.rodata.str1.1
.LC3:
	.string	"stof"
	.text
	.type	_ZNSt7__cxx114stofERKNS_12basic_stringIcSt11char_traitsIcESaIcEEEPm.isra.0, @function
_ZNSt7__cxx114stofERKNS_12basic_stringIcSt11char_traitsIcESaIcEEEPm.isra.0:
.LFB4775:
	.cfi_startproc
	.cfi_personality 0x9b,DW.ref.__gxx_personality_v0
	.cfi_lsda 0x1b,.LLSDA4775
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	movq	%rsi, %r12
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	movq	%rdi, %rbx
	subq	$56, %rsp
	.cfi_def_cfa_offset 96
	movq	%fs:40, %rax
	movq	%rax, 40(%rsp)
	xorl	%eax, %eax
	leaq	28(%rsp), %r13
	call	__errno_location@PLT
	leaq	32(%rsp), %rsi
	movq	%rbx, %rdi
	movq	%rax, %rbp
	movl	(%rax), %eax
	movl	%eax, 28(%rsp)
	xorl	%eax, %eax
	movl	%eax, 0(%rbp)
	call	strtof@PLT
	movq	32(%rsp), %rax
	cmpq	%rax, %rbx
	jne	.L50
	movq	40(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L62
	leaq	.LC3(%rip), %rdi
.LEHB2:
	call	_ZSt24__throw_invalid_argumentPKc@PLT
.L50:
	cmpl	$34, 0(%rbp)
	jne	.L52
	movq	40(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L62
	leaq	.LC3(%rip), %rdi
	call	_ZSt20__throw_out_of_rangePKc@PLT
.LEHE2:
.L52:
	testq	%r12, %r12
	je	.L54
	subq	%rbx, %rax
	movq	%rax, (%r12)
.L54:
	movq	%r13, %rdi
	movss	%xmm0, 12(%rsp)
	call	_ZZN9__gnu_cxx6__stoaIffcJEEET0_PFT_PKT1_PPS3_DpT2_EPKcS5_PmS9_EN11_Save_errnoD1Ev
	movss	12(%rsp), %xmm0
	movq	40(%rsp), %rax
	subq	%fs:40, %rax
	je	.L57
	jmp	.L62
.L58:
	endbr64
	movq	%rax, %rbx
.L55:
	movq	%r13, %rdi
	call	_ZZN9__gnu_cxx6__stoaIffcJEEET0_PFT_PKT1_PPS3_DpT2_EPKcS5_PmS9_EN11_Save_errnoD1Ev
	movq	40(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L62
	movq	%rbx, %rdi
.LEHB3:
	call	_Unwind_Resume@PLT
.LEHE3:
.L62:
	call	__stack_chk_fail@PLT
.L57:
	addq	$56, %rsp
	.cfi_def_cfa_offset 40
	popq	%rbx
	.cfi_def_cfa_offset 32
	popq	%rbp
	.cfi_def_cfa_offset 24
	popq	%r12
	.cfi_def_cfa_offset 16
	popq	%r13
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE4775:
	.section	.gcc_except_table
.LLSDA4775:
	.byte	0xff
	.byte	0xff
	.byte	0x1
	.uleb128 .LLSDACSE4775-.LLSDACSB4775
.LLSDACSB4775:
	.uleb128 .LEHB2-.LFB4775
	.uleb128 .LEHE2-.LEHB2
	.uleb128 .L58-.LFB4775
	.uleb128 0
	.uleb128 .LEHB3-.LFB4775
	.uleb128 .LEHE3-.LEHB3
	.uleb128 0
	.uleb128 0
.LLSDACSE4775:
	.text
	.size	_ZNSt7__cxx114stofERKNS_12basic_stringIcSt11char_traitsIcESaIcEEEPm.isra.0, .-_ZNSt7__cxx114stofERKNS_12basic_stringIcSt11char_traitsIcESaIcEEEPm.isra.0
	.section	.text._ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_,"axG",@progbits,_ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_,comdat
	.weak	_ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_
	.type	_ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_, @function
_ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_:
.LFB4371:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	pushq	%rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	movq	%rdi, %rbx
	subq	$24, %rsp
	.cfi_def_cfa_offset 48
	movq	8(%rdi), %r12
	movq	%rsi, %rdi
	movq	%rsi, 8(%rsp)
	call	strlen@PLT
	movq	8(%rsp), %rsi
	movq	%rax, %rdx
	xorl	%eax, %eax
	cmpq	%rdx, %r12
	jne	.L65
	movb	$1, %al
	testq	%r12, %r12
	je	.L65
	movq	(%rbx), %rdi
	movq	%r12, %rdx
	call	memcmp@PLT
	testl	%eax, %eax
	sete	%al
.L65:
	addq	$24, %rsp
	.cfi_def_cfa_offset 24
	popq	%rbx
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE4371:
	.size	_ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_, .-_ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_
	.section	.rodata.str1.1
.LC4:
	.string	"2D"
.LC5:
	.string	"3D"
.LC7:
	.string	"Couldn't open config file."
.LC9:
	.string	"../heatOutput.csv"
.LC10:
	.string	", "
.LC11:
	.string	"Unable to open file, try again."
	.section	.text.startup
	.globl	main
	.type	main, @function
main:
.LFB4006:
	.cfi_startproc
	.cfi_personality 0x9b,DW.ref.__gxx_personality_v0
	.cfi_lsda 0x1b,.LLSDA4006
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	movl	$8, %edx
	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	$1128, %rsp
	.cfi_def_cfa_offset 1184
	movq	8(%rsi), %rsi
	movq	%fs:40, %rax
	movq	%rax, 1112(%rsp)
	xorl	%eax, %eax
	leaq	592(%rsp), %rax
	movq	%rax, %rdi
	movq	%rax, 8(%rsp)
.LEHB4:
	call	_ZNSt14basic_ifstreamIcSt11char_traitsIcEEC1EPKcSt13_Ios_Openmode@PLT
.LEHE4:
	leaq	712(%rsp), %rdi
	call	_ZNKSt12__basic_fileIcE7is_openEv@PLT
	testb	%al, %al
	je	.L71
	leaq	64(%rsp), %rax
	xorl	%edx, %edx
	movb	$0, 64(%rsp)
	leaq	48(%rsp), %rbx
	movq	%rax, 48(%rsp)
	movq	%rdx, 56(%rsp)
.L72:
	movq	8(%rsp), %rdi
	movq	%rbx, %rsi
.LEHB5:
	call	_ZSt7getlineIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE@PLT
	movq	(%rax), %rdx
	movq	-24(%rdx), %rdx
	testb	$5, 32(%rax,%rdx)
	jne	.L212
	movq	48(%rsp), %rax
	movb	(%rax), %al
	cmpb	$35, %al
	je	.L72
	cmpq	$0, 56(%rsp)
	je	.L72
	cmpb	$13, %al
	je	.L72
	leaq	80(%rsp), %r12
	movl	$2, %ecx
	xorl	%edx, %edx
	movq	%rbx, %rsi
	movq	%r12, %rdi
	call	_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm@PLT
	leaq	_Z9dimensionB5cxx11(%rip), %r13
	movq	%r12, %rsi
	movq	%r13, %rdi
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_.isra.0
	movq	%r12, %rdi
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_disposeEv@PLT
.L201:
	movq	8(%rsp), %rdi
	movq	%rbx, %rsi
	call	_ZSt7getlineIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE@PLT
	movq	48(%rsp), %rdi
	movb	(%rdi), %al
	cmpb	$35, %al
	je	.L201
	cmpq	$0, 56(%rsp)
	je	.L201
	cmpb	$13, %al
	je	.L201
	xorl	%esi, %esi
	call	_ZNSt7__cxx114stofERKNS_12basic_stringIcSt11char_traitsIcESaIcEEEPm.isra.0
	movss	%xmm0, k(%rip)
.L203:
	movq	8(%rsp), %rdi
	movq	%rbx, %rsi
	call	_ZSt7getlineIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE@PLT
	movq	48(%rsp), %rdi
	movb	(%rdi), %al
	cmpb	$35, %al
	je	.L203
	cmpq	$0, 56(%rsp)
	je	.L203
	cmpb	$13, %al
	je	.L203
	movl	$10, %edx
	xorl	%esi, %esi
	call	_ZNSt7__cxx114stoiERKNS_12basic_stringIcSt11char_traitsIcESaIcEEEPmi.isra.0
	movl	%eax, timesteps(%rip)
.L205:
	movq	8(%rsp), %rdi
	movq	%rbx, %rsi
	call	_ZSt7getlineIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE@PLT
	movq	48(%rsp), %rax
	movb	(%rax), %al
	cmpb	$35, %al
	je	.L205
	cmpq	$0, 56(%rsp)
	je	.L205
	cmpb	$13, %al
	je	.L205
	xorl	%edx, %edx
	movl	$44, %esi
	movq	%rbx, %rdi
	call	_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4findEcm@PLT
	xorl	%edx, %edx
	movq	%rbx, %rsi
	movq	%r12, %rdi
	movslq	%eax, %rcx
	movq	%rax, %rbp
	call	_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm@PLT
.LEHE5:
	movq	80(%rsp), %rdi
	movl	$10, %edx
	xorl	%esi, %esi
.LEHB6:
	call	_ZNSt7__cxx114stoiERKNS_12basic_stringIcSt11char_traitsIcESaIcEEEPmi.isra.0
.LEHE6:
	movq	%r12, %rdi
	movl	%eax, width(%rip)
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_disposeEv@PLT
	leal	1(%rbp), %edx
	orq	$-1, %rcx
	movq	%rbx, %rsi
	movslq	%edx, %rdx
	movq	%r12, %rdi
.LEHB7:
	call	_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm@PLT
	movq	%r12, %rsi
	movq	%rbx, %rdi
	leaq	.LC4(%rip), %rbp
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_.isra.0
	movq	%r12, %rdi
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_disposeEv@PLT
	movq	%rbp, %rsi
	movq	%r13, %rdi
	call	_ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_
	testb	%al, %al
	je	.L84
	movq	48(%rsp), %rdi
	movl	$10, %edx
	xorl	%esi, %esi
	call	_ZNSt7__cxx114stoiERKNS_12basic_stringIcSt11char_traitsIcESaIcEEEPmi.isra.0
	movl	%eax, height(%rip)
	movl	$1, depth(%rip)
	jmp	.L85
.L84:
	leaq	.LC5(%rip), %rsi
	movq	%r13, %rdi
	call	_ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_
	testb	%al, %al
	je	.L85
	xorl	%edx, %edx
	movl	$44, %esi
	movq	%rbx, %rdi
	call	_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4findEcm@PLT
	xorl	%edx, %edx
	movq	%rbx, %rsi
	movq	%r12, %rdi
	movslq	%eax, %rcx
	movq	%rax, %r13
	call	_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm@PLT
.LEHE7:
	movq	80(%rsp), %rdi
	movl	$10, %edx
	xorl	%esi, %esi
.LEHB8:
	call	_ZNSt7__cxx114stoiERKNS_12basic_stringIcSt11char_traitsIcESaIcEEEPmi.isra.0
.LEHE8:
	movq	%r12, %rdi
	movl	%eax, height(%rip)
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_disposeEv@PLT
	leal	1(%r13), %edx
	orq	$-1, %rcx
	movq	%rbx, %rsi
	movslq	%edx, %rdx
	movq	%r12, %rdi
.LEHB9:
	call	_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm@PLT
.LEHE9:
	movq	80(%rsp), %rdi
	movl	$10, %edx
	xorl	%esi, %esi
.LEHB10:
	call	_ZNSt7__cxx114stoiERKNS_12basic_stringIcSt11char_traitsIcESaIcEEEPmi.isra.0
.LEHE10:
	movq	%r12, %rdi
	movl	%eax, depth(%rip)
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_disposeEv@PLT
.L85:
	movq	8(%rsp), %rdi
	movq	%rbx, %rsi
.LEHB11:
	call	_ZSt7getlineIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE@PLT
	movq	48(%rsp), %rdi
	movb	(%rdi), %al
	cmpb	$35, %al
	je	.L85
	cmpq	$0, 56(%rsp)
	je	.L85
	cmpb	$13, %al
	je	.L85
	xorl	%esi, %esi
	call	_ZNSt7__cxx114stofERKNS_12basic_stringIcSt11char_traitsIcESaIcEEEPm.isra.0
	movl	width(%rip), %edi
	imull	height(%rip), %edi
	movabsq	$2305843009213693950, %rax
	movss	%xmm0, startTemp(%rip)
	imull	depth(%rip), %edi
	movslq	%edi, %rdi
	cmpq	%rdi, %rax
	jb	.L213
	salq	$2, %rdi
	call	_Znam@PLT
	movl	width(%rip), %edx
	imull	height(%rip), %edx
	movq	%rax, heaters(%rip)
	imull	depth(%rip), %edx
	movslq	%edx, %rdx
	leaq	(%rax,%rdx,4), %rdx
	jmp	.L92
.L213:
	movq	1112(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L198
	call	__cxa_throw_bad_array_new_length@PLT
.L92:
	cmpq	%rax, %rdx
	je	.L94
	movl	$0x00000000, (%rax)
	addq	$4, %rax
	jmp	.L92
.L215:
	movq	(%rax), %rdx
	movq	-24(%rdx), %rdx
	testb	$5, 32(%rax,%rdx)
	jne	.L72
	movq	48(%rsp), %rax
	movb	(%rax), %al
	cmpb	$35, %al
	jne	.L214
.L94:
	leaq	592(%rsp), %rdi
	movq	%rbx, %rsi
	call	_ZSt7getlineIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE@PLT
	jmp	.L215
.L214:
	cmpq	$0, 56(%rsp)
	je	.L94
	cmpb	$13, %al
	je	.L94
	xorl	%edx, %edx
	movl	$44, %esi
	leaq	80(%rsp), %r12
	movq	%rbx, %rdi
	call	_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4findEcm@PLT
	xorl	%edx, %edx
	movq	%rbx, %rsi
	movq	%r12, %rdi
	movslq	%eax, %rcx
	movq	%rax, %r13
	call	_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm@PLT
.LEHE11:
	movq	80(%rsp), %rdi
	movl	$10, %edx
	xorl	%esi, %esi
.LEHB12:
	call	_ZNSt7__cxx114stoiERKNS_12basic_stringIcSt11char_traitsIcESaIcEEEPmi.isra.0
.LEHE12:
	movq	%r12, %rdi
	movl	%eax, heat_x(%rip)
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_disposeEv@PLT
	leal	1(%r13), %edx
	orq	$-1, %rcx
	movq	%rbx, %rsi
	movslq	%edx, %rdx
	movq	%r12, %rdi
.LEHB13:
	call	_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm@PLT
	movq	%r12, %rsi
	movq	%rbx, %rdi
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_.isra.0
	movq	%r12, %rdi
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_disposeEv@PLT
	xorl	%edx, %edx
	movl	$44, %esi
	movq	%rbx, %rdi
	call	_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4findEcm@PLT
	xorl	%edx, %edx
	movq	%rbx, %rsi
	movq	%r12, %rdi
	movslq	%eax, %rcx
	movq	%rax, %r13
	call	_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm@PLT
.LEHE13:
	movq	80(%rsp), %rdi
	movl	$10, %edx
	xorl	%esi, %esi
.LEHB14:
	call	_ZNSt7__cxx114stoiERKNS_12basic_stringIcSt11char_traitsIcESaIcEEEPmi.isra.0
.LEHE14:
	movq	%r12, %rdi
	movl	%eax, heat_y(%rip)
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_disposeEv@PLT
	leal	1(%r13), %edx
	orq	$-1, %rcx
	movq	%rbx, %rsi
	movslq	%edx, %rdx
	movq	%r12, %rdi
.LEHB15:
	call	_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm@PLT
	movq	%r12, %rsi
	movq	%rbx, %rdi
	leaq	_Z9dimensionB5cxx11(%rip), %r14
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_.isra.0
	movq	%r12, %rdi
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_disposeEv@PLT
	xorl	%edx, %edx
	movl	$44, %esi
	movq	%rbx, %rdi
	call	_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4findEcm@PLT
	movq	%rbp, %rsi
	movq	%r14, %rdi
	movq	%rax, %r13
	call	_ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_
	testb	%al, %al
	je	.L97
	movslq	%r13d, %rcx
	xorl	%edx, %edx
	movq	%rbx, %rsi
	movq	%r12, %rdi
	call	_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm@PLT
.LEHE15:
	movq	80(%rsp), %rdi
	movl	$10, %edx
	xorl	%esi, %esi
.LEHB16:
	call	_ZNSt7__cxx114stoiERKNS_12basic_stringIcSt11char_traitsIcESaIcEEEPmi.isra.0
.LEHE16:
	movq	%r12, %rdi
	movl	%eax, heat_w(%rip)
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_disposeEv@PLT
	leal	1(%r13), %edx
	orq	$-1, %rcx
	movq	%rbx, %rsi
	movslq	%edx, %rdx
	movq	%r12, %rdi
.LEHB17:
	call	_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm@PLT
	movq	%r12, %rsi
	movq	%rbx, %rdi
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_.isra.0
	movq	%r12, %rdi
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_disposeEv@PLT
	xorl	%edx, %edx
	movl	$44, %esi
	movq	%rbx, %rdi
	call	_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4findEcm@PLT
	xorl	%edx, %edx
	movq	%rbx, %rsi
	movq	%r12, %rdi
	movslq	%eax, %rcx
	movq	%rax, %r13
	call	_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm@PLT
.LEHE17:
	movq	80(%rsp), %rdi
	movl	$10, %edx
	xorl	%esi, %esi
.LEHB18:
	call	_ZNSt7__cxx114stoiERKNS_12basic_stringIcSt11char_traitsIcESaIcEEEPmi.isra.0
.LEHE18:
	movq	%r12, %rdi
	movl	%eax, heat_h(%rip)
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_disposeEv@PLT
	leal	1(%r13), %edx
	orq	$-1, %rcx
	movq	%rbx, %rsi
	movslq	%edx, %rdx
	movq	%r12, %rdi
.LEHB19:
	call	_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm@PLT
	movq	%r12, %rsi
	movq	%rbx, %rdi
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_.isra.0
	movq	%r12, %rdi
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_disposeEv@PLT
	xorl	%eax, %eax
	movl	$1, heat_d(%rip)
	movl	%eax, heat_z(%rip)
	jmp	.L210
.L97:
	leaq	.LC5(%rip), %rsi
	movq	%r14, %rdi
	call	_ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_
	testb	%al, %al
	je	.L98
	movslq	%r13d, %rcx
	xorl	%edx, %edx
	movq	%rbx, %rsi
	movq	%r12, %rdi
	call	_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm@PLT
.LEHE19:
	movq	80(%rsp), %rdi
	movl	$10, %edx
	xorl	%esi, %esi
.LEHB20:
	call	_ZNSt7__cxx114stoiERKNS_12basic_stringIcSt11char_traitsIcESaIcEEEPmi.isra.0
.LEHE20:
	movq	%r12, %rdi
	movl	%eax, heat_z(%rip)
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_disposeEv@PLT
	leal	1(%r13), %edx
	orq	$-1, %rcx
	movq	%rbx, %rsi
	movslq	%edx, %rdx
	movq	%r12, %rdi
.LEHB21:
	call	_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm@PLT
	movq	%r12, %rsi
	movq	%rbx, %rdi
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_.isra.0
	movq	%r12, %rdi
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_disposeEv@PLT
	xorl	%edx, %edx
	movl	$44, %esi
	movq	%rbx, %rdi
	call	_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4findEcm@PLT
	xorl	%edx, %edx
	movq	%rbx, %rsi
	movq	%r12, %rdi
	movslq	%eax, %rcx
	movq	%rax, %r13
	call	_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm@PLT
.LEHE21:
	movq	80(%rsp), %rdi
	movl	$10, %edx
	xorl	%esi, %esi
.LEHB22:
	call	_ZNSt7__cxx114stoiERKNS_12basic_stringIcSt11char_traitsIcESaIcEEEPmi.isra.0
.LEHE22:
	movq	%r12, %rdi
	movl	%eax, heat_w(%rip)
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_disposeEv@PLT
	leal	1(%r13), %edx
	orq	$-1, %rcx
	movq	%rbx, %rsi
	movslq	%edx, %rdx
	movq	%r12, %rdi
.LEHB23:
	call	_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm@PLT
	movq	%r12, %rsi
	movq	%rbx, %rdi
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_.isra.0
	movq	%r12, %rdi
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_disposeEv@PLT
	xorl	%edx, %edx
	movl	$44, %esi
	movq	%rbx, %rdi
	call	_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4findEcm@PLT
	xorl	%edx, %edx
	movq	%rbx, %rsi
	movq	%r12, %rdi
	movslq	%eax, %rcx
	movq	%rax, %r13
	call	_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm@PLT
.LEHE23:
	movq	80(%rsp), %rdi
	movl	$10, %edx
	xorl	%esi, %esi
.LEHB24:
	call	_ZNSt7__cxx114stoiERKNS_12basic_stringIcSt11char_traitsIcESaIcEEEPmi.isra.0
.LEHE24:
	movq	%r12, %rdi
	movl	%eax, heat_h(%rip)
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_disposeEv@PLT
	leal	1(%r13), %edx
	orq	$-1, %rcx
	movq	%rbx, %rsi
	movslq	%edx, %rdx
	movq	%r12, %rdi
.LEHB25:
	call	_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm@PLT
	movq	%r12, %rsi
	movq	%rbx, %rdi
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_.isra.0
	movq	%r12, %rdi
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_disposeEv@PLT
	xorl	%edx, %edx
	movl	$44, %esi
	movq	%rbx, %rdi
	call	_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4findEcm@PLT
	xorl	%edx, %edx
	movq	%rbx, %rsi
	movq	%r12, %rdi
	movslq	%eax, %rcx
	movq	%rax, %r13
	call	_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm@PLT
.LEHE25:
	movq	80(%rsp), %rdi
	movl	$10, %edx
	xorl	%esi, %esi
.LEHB26:
	call	_ZNSt7__cxx114stoiERKNS_12basic_stringIcSt11char_traitsIcESaIcEEEPmi.isra.0
.LEHE26:
	movq	%r12, %rdi
	movl	%eax, heat_d(%rip)
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_disposeEv@PLT
	leal	1(%r13), %edx
	orq	$-1, %rcx
	movq	%rbx, %rsi
	movslq	%edx, %rdx
	movq	%r12, %rdi
.LEHB27:
	call	_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm@PLT
	movq	%rbx, %rdi
	movq	%r12, %rsi
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_.isra.0
	movq	%r12, %rdi
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_disposeEv@PLT
.L210:
	movq	48(%rsp), %rdi
	xorl	%esi, %esi
	call	_ZNSt7__cxx114stofERKNS_12basic_stringIcSt11char_traitsIcESaIcEEEPm.isra.0
.LEHE27:
	movss	%xmm0, fixedTemp(%rip)
.L98:
	movl	width(%rip), %edi
	movl	heat_y(%rip), %edx
	movl	heat_x(%rip), %eax
	movl	heat_z(%rip), %r10d
	imull	%edi, %edx
	movl	height(%rip), %r8d
	movl	%edi, %ecx
	movl	heat_d(%rip), %r14d
	movl	heat_h(%rip), %r15d
	movq	heaters(%rip), %r13
	imull	%r8d, %ecx
	addl	%r10d, %r14d
	leal	(%rdx,%rax), %esi
	addl	heat_w(%rip), %eax
	addl	%edx, %eax
	movl	%edi, %edx
	imull	%r10d, %edx
	movslq	%ecx, %rcx
	salq	$2, %rcx
	imull	%r8d, %edx
	movslq	%edx, %rdx
.L99:
	cmpl	%esi, %eax
	jle	.L94
	movl	%esi, %r9d
	xorl	%r8d, %r8d
.L103:
	cmpl	%r8d, %r15d
	jle	.L216
	movslq	%r9d, %r12
	movslq	%r10d, %r11
	addq	%rdx, %r12
	leaq	0(%r13,%r12,4), %r12
.L100:
	cmpl	%r11d, %r14d
	jle	.L217
	movss	fixedTemp(%rip), %xmm0
	incq	%r11
	movss	%xmm0, (%r12)
	addq	%rcx, %r12
	jmp	.L100
.L217:
	incl	%r8d
	addl	%edi, %r9d
	jmp	.L103
.L216:
	incl	%esi
	jmp	.L99
.L212:
	movq	%rbx, %rdi
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_disposeEv@PLT
	jmp	.L106
.L71:
	leaq	.LC7(%rip), %rsi
	leaq	_ZSt4cerr(%rip), %rdi
.LEHB28:
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
.L106:
	movabsq	$2305843009213693950, %rax
	movl	width(%rip), %ebp
	imull	height(%rip), %ebp
	imull	depth(%rip), %ebp
	movslq	%ebp, %rbx
	cmpq	%rbx, %rax
	jb	.L107
	salq	$2, %rbx
	movq	%rbx, %rdi
	call	_Znam@PLT
	movq	%rbx, %rdi
	movq	%rax, g_old(%rip)
	call	_Znam@PLT
	movq	%rax, g_new(%rip)
	leaq	(%rax,%rbx), %rdx
	jmp	.L110
.L107:
	movq	1112(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L198
	call	__cxa_throw_bad_array_new_length@PLT
.L110:
	cmpq	%rax, %rdx
	je	.L218
	movl	$0x00000000, (%rax)
	addq	$4, %rax
	jmp	.L110
.L218:
	movq	g_old(%rip), %rdx
	leaq	(%rdx,%rbx), %rcx
	movq	%rdx, %rax
.L112:
	cmpq	%rax, %rcx
	je	.L219
	movl	$0x00000000, (%rax)
	addq	$4, %rax
	jmp	.L112
.L219:
	movq	heaters(%rip), %rcx
	xorl	%eax, %eax
	xorps	%xmm2, %xmm2
.L114:
	cmpl	%eax, %ebp
	jle	.L220
	movss	startTemp(%rip), %xmm0
	movss	%xmm0, (%rdx,%rax,4)
	movss	(%rcx,%rax,4), %xmm1
	ucomiss	%xmm2, %xmm1
	jp	.L164
	je	.L115
.L164:
	movaps	%xmm1, %xmm0
.L115:
	movss	%xmm0, (%rdx,%rax,4)
	incq	%rax
	jmp	.L114
.L220:
	cvtsi2ssl	%ebp, %xmm0
	mulss	.LC8(%rip), %xmm0
	call	ceilf@PLT
	movq	%rbx, %rsi
	leaq	d_new(%rip), %rdi
	cvttss2sil	%xmm0, %r14d
	call	cudaMalloc@PLT
	movq	%rbx, %rsi
	leaq	d_old(%rip), %rdi
	call	cudaMalloc@PLT
	movq	%rbx, %rsi
	leaq	d_heaters(%rip), %rdi
	call	cudaMalloc@PLT
	movq	g_old(%rip), %rsi
	movq	d_old(%rip), %rdi
	movl	$1, %ecx
	movq	%rbx, %rdx
	call	cudaMemcpy@PLT
	movq	g_new(%rip), %rsi
	movq	d_new(%rip), %rdi
	movl	$1, %ecx
	movq	%rbx, %rdx
	call	cudaMemcpy@PLT
	movq	heaters(%rip), %rsi
	movq	d_heaters(%rip), %rdi
	movl	$1, %ecx
	movq	%rbx, %rdx
	call	cudaMemcpy@PLT
	movabsq	$4294968320, %r12
	xorl	%r13d, %r13d
.L118:
	cmpl	%r13d, timesteps(%rip)
	jle	.L221
	movl	%r14d, 24(%rsp)
	xorl	%r9d, %r9d
	xorl	%r8d, %r8d
	movq	%r12, %rdx
	movabsq	$4294967297, %rax
	movl	$1, %ecx
	movq	%r12, 36(%rsp)
	movq	%rax, 28(%rsp)
	movq	24(%rsp), %rdi
	movl	32(%rsp), %esi
	movl	$1, 44(%rsp)
	call	__cudaPushCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L119
	movss	k(%rip), %xmm0
	movl	depth(%rip), %r9d
	movl	height(%rip), %r8d
	movl	width(%rip), %ecx
	movq	d_heaters(%rip), %rdx
	movq	d_new(%rip), %rsi
	movq	d_old(%rip), %rdi
	call	_Z35__device_stub__Z8heat_simPfS_S_iiifPfS_S_iiif
.L119:
	call	cudaDeviceSynchronize@PLT
	movl	%r14d, 24(%rsp)
	xorl	%r9d, %r9d
	xorl	%r8d, %r8d
	movq	%r12, %rdx
	movabsq	$4294967297, %rax
	movl	$1, %ecx
	movq	%r12, 36(%rsp)
	movq	%rax, 28(%rsp)
	movq	24(%rsp), %rdi
	movl	32(%rsp), %esi
	movl	$1, 44(%rsp)
	call	__cudaPushCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L120
	movq	d_new(%rip), %rsi
	movq	d_old(%rip), %rdi
	movl	%ebp, %edx
	call	_Z30__device_stub__Z8grid_cpyPfS_iPfS_i
.L120:
	call	cudaDeviceSynchronize@PLT
	incl	%r13d
	jmp	.L118
.L221:
	movq	d_new(%rip), %rsi
	movq	g_new(%rip), %rdi
	movl	$2, %ecx
	movq	%rbx, %rdx
	call	cudaMemcpy@PLT
	leaq	80(%rsp), %rbx
	movl	$16, %edx
	leaq	.LC9(%rip), %rsi
	movq	%rbx, %rdi
	call	_ZNSt14basic_ofstreamIcSt11char_traitsIcEEC1EPKcSt13_Ios_Openmode@PLT
.LEHE28:
	leaq	192(%rsp), %rdi
	xorl	%r12d, %r12d
	leaq	.LC10(%rip), %r14
	call	_ZNKSt12__basic_fileIcE7is_openEv@PLT
	testb	%al, %al
	je	.L222
.L122:
	movl	%r12d, %r13d
	cmpl	%r12d, %ebp
	jle	.L128
	movq	g_new(%rip), %rax
	movl	width(%rip), %ecx
	movq	%rbx, %rdi
	cvtss2sd	(%rax,%r12,4), %xmm0
	movl	%r13d, %eax
	cltd
	idivl	%ecx
	decl	%ecx
	cmpl	%ecx, %edx
	jne	.L124
.LEHB29:
	call	_ZNSo9_M_insertIdEERSoT_@PLT
	movq	%rax, %rdi
	call	_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_@PLT
	jmp	.L125
.L124:
	call	_ZNSo9_M_insertIdEERSoT_@PLT
	movq	%rax, %rdi
	movq	%r14, %rsi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
.L125:
	movl	width(%rip), %ecx
	imull	height(%rip), %ecx
	movl	%r13d, %eax
	cltd
	idivl	%ecx
	decl	%ecx
	cmpl	%ecx, %edx
	jne	.L126
	movq	%rbx, %rdi
	call	_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_@PLT
.L126:
	incq	%r12
	jmp	.L122
.L222:
	leaq	.LC11(%rip), %rsi
	leaq	_ZSt4cout(%rip), %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movq	%rax, %rdi
	call	_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_@PLT
.L128:
	movq	%rbx, %rdi
	call	_ZNSt14basic_ofstreamIcSt11char_traitsIcEE5closeEv@PLT
	movq	g_old(%rip), %rdi
	testq	%rdi, %rdi
	je	.L129
	call	_ZdaPv@PLT
.L129:
	movq	g_new(%rip), %rdi
	testq	%rdi, %rdi
	je	.L130
	call	_ZdaPv@PLT
.L130:
	movq	heaters(%rip), %rdi
	testq	%rdi, %rdi
	je	.L131
	call	_ZdaPv@PLT
.L131:
	movq	d_old(%rip), %rdi
	call	cudaFree@PLT
	movq	d_new(%rip), %rdi
	call	cudaFree@PLT
	movq	d_heaters(%rip), %rdi
	call	cudaFree@PLT
.LEHE29:
	movq	%rbx, %rdi
	call	_ZNSt14basic_ofstreamIcSt11char_traitsIcEED1Ev@PLT
	movq	8(%rsp), %rdi
	call	_ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev@PLT
	movq	1112(%rsp), %rax
	subq	%fs:40, %rax
	je	.L147
	jmp	.L198
.L151:
	endbr64
	jmp	.L211
.L152:
	endbr64
	jmp	.L211
.L153:
	endbr64
	jmp	.L211
.L154:
	endbr64
	jmp	.L211
.L155:
	endbr64
	jmp	.L211
.L156:
	endbr64
	jmp	.L211
.L157:
	endbr64
	jmp	.L211
.L158:
	endbr64
	jmp	.L211
.L159:
	endbr64
	jmp	.L211
.L160:
	endbr64
	jmp	.L211
.L161:
	endbr64
.L211:
	movq	%rax, %rbp
.L143:
	movq	%r12, %rdi
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_disposeEv@PLT
	jmp	.L133
.L150:
	endbr64
	movq	%rax, %rbp
.L133:
	movq	%rbx, %rdi
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_disposeEv@PLT
	jmp	.L144
.L163:
	endbr64
	movq	%rax, %rbp
.L145:
	movq	%rbx, %rdi
	call	_ZNSt14basic_ofstreamIcSt11char_traitsIcEED1Ev@PLT
	jmp	.L144
.L162:
	endbr64
	movq	%rax, %rbp
.L144:
	movq	8(%rsp), %rdi
	call	_ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev@PLT
	movq	1112(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L198
	movq	%rbp, %rdi
.LEHB30:
	call	_Unwind_Resume@PLT
.LEHE30:
.L198:
	call	__stack_chk_fail@PLT
.L147:
	addq	$1128, %rsp
	.cfi_def_cfa_offset 56
	xorl	%eax, %eax
	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
.LFE4006:
	.section	.gcc_except_table
.LLSDA4006:
	.byte	0xff
	.byte	0xff
	.byte	0x1
	.uleb128 .LLSDACSE4006-.LLSDACSB4006
.LLSDACSB4006:
	.uleb128 .LEHB4-.LFB4006
	.uleb128 .LEHE4-.LEHB4
	.uleb128 0
	.uleb128 0
	.uleb128 .LEHB5-.LFB4006
	.uleb128 .LEHE5-.LEHB5
	.uleb128 .L150-.LFB4006
	.uleb128 0
	.uleb128 .LEHB6-.LFB4006
	.uleb128 .LEHE6-.LEHB6
	.uleb128 .L151-.LFB4006
	.uleb128 0
	.uleb128 .LEHB7-.LFB4006
	.uleb128 .LEHE7-.LEHB7
	.uleb128 .L150-.LFB4006
	.uleb128 0
	.uleb128 .LEHB8-.LFB4006
	.uleb128 .LEHE8-.LEHB8
	.uleb128 .L152-.LFB4006
	.uleb128 0
	.uleb128 .LEHB9-.LFB4006
	.uleb128 .LEHE9-.LEHB9
	.uleb128 .L150-.LFB4006
	.uleb128 0
	.uleb128 .LEHB10-.LFB4006
	.uleb128 .LEHE10-.LEHB10
	.uleb128 .L153-.LFB4006
	.uleb128 0
	.uleb128 .LEHB11-.LFB4006
	.uleb128 .LEHE11-.LEHB11
	.uleb128 .L150-.LFB4006
	.uleb128 0
	.uleb128 .LEHB12-.LFB4006
	.uleb128 .LEHE12-.LEHB12
	.uleb128 .L154-.LFB4006
	.uleb128 0
	.uleb128 .LEHB13-.LFB4006
	.uleb128 .LEHE13-.LEHB13
	.uleb128 .L150-.LFB4006
	.uleb128 0
	.uleb128 .LEHB14-.LFB4006
	.uleb128 .LEHE14-.LEHB14
	.uleb128 .L155-.LFB4006
	.uleb128 0
	.uleb128 .LEHB15-.LFB4006
	.uleb128 .LEHE15-.LEHB15
	.uleb128 .L150-.LFB4006
	.uleb128 0
	.uleb128 .LEHB16-.LFB4006
	.uleb128 .LEHE16-.LEHB16
	.uleb128 .L156-.LFB4006
	.uleb128 0
	.uleb128 .LEHB17-.LFB4006
	.uleb128 .LEHE17-.LEHB17
	.uleb128 .L150-.LFB4006
	.uleb128 0
	.uleb128 .LEHB18-.LFB4006
	.uleb128 .LEHE18-.LEHB18
	.uleb128 .L157-.LFB4006
	.uleb128 0
	.uleb128 .LEHB19-.LFB4006
	.uleb128 .LEHE19-.LEHB19
	.uleb128 .L150-.LFB4006
	.uleb128 0
	.uleb128 .LEHB20-.LFB4006
	.uleb128 .LEHE20-.LEHB20
	.uleb128 .L158-.LFB4006
	.uleb128 0
	.uleb128 .LEHB21-.LFB4006
	.uleb128 .LEHE21-.LEHB21
	.uleb128 .L150-.LFB4006
	.uleb128 0
	.uleb128 .LEHB22-.LFB4006
	.uleb128 .LEHE22-.LEHB22
	.uleb128 .L159-.LFB4006
	.uleb128 0
	.uleb128 .LEHB23-.LFB4006
	.uleb128 .LEHE23-.LEHB23
	.uleb128 .L150-.LFB4006
	.uleb128 0
	.uleb128 .LEHB24-.LFB4006
	.uleb128 .LEHE24-.LEHB24
	.uleb128 .L160-.LFB4006
	.uleb128 0
	.uleb128 .LEHB25-.LFB4006
	.uleb128 .LEHE25-.LEHB25
	.uleb128 .L150-.LFB4006
	.uleb128 0
	.uleb128 .LEHB26-.LFB4006
	.uleb128 .LEHE26-.LEHB26
	.uleb128 .L161-.LFB4006
	.uleb128 0
	.uleb128 .LEHB27-.LFB4006
	.uleb128 .LEHE27-.LEHB27
	.uleb128 .L150-.LFB4006
	.uleb128 0
	.uleb128 .LEHB28-.LFB4006
	.uleb128 .LEHE28-.LEHB28
	.uleb128 .L162-.LFB4006
	.uleb128 0
	.uleb128 .LEHB29-.LFB4006
	.uleb128 .LEHE29-.LEHB29
	.uleb128 .L163-.LFB4006
	.uleb128 0
	.uleb128 .LEHB30-.LFB4006
	.uleb128 .LEHE30-.LEHB30
	.uleb128 0
	.uleb128 0
.LLSDACSE4006:
	.section	.text.startup
	.size	main, .-main
	.type	_GLOBAL__sub_I__Z9dimensionB5cxx11, @function
_GLOBAL__sub_I__Z9dimensionB5cxx11:
.LFB4765:
	.cfi_startproc
	endbr64
	leaq	16+_Z9dimensionB5cxx11(%rip), %rax
	xorl	%edx, %edx
	movq	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev@GOTPCREL(%rip), %rdi
	movb	$0, 16+_Z9dimensionB5cxx11(%rip)
	movq	%rdx, 8+_Z9dimensionB5cxx11(%rip)
	leaq	-16(%rax), %rsi
	leaq	__dso_handle(%rip), %rdx
	movq	%rax, _Z9dimensionB5cxx11(%rip)
	jmp	__cxa_atexit@PLT
	.cfi_endproc
.LFE4765:
	.size	_GLOBAL__sub_I__Z9dimensionB5cxx11, .-_GLOBAL__sub_I__Z9dimensionB5cxx11
	.section	.init_array
	.align 8
	.quad	_GLOBAL__sub_I__Z9dimensionB5cxx11
	.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
	.globl	heaters
	.bss
	.align 8
	.type	heaters, @object
	.size	heaters, 8
heaters:
	.zero	8
	.globl	g_new
	.align 8
	.type	g_new, @object
	.size	g_new, 8
g_new:
	.zero	8
	.globl	g_old
	.align 8
	.type	g_old, @object
	.size	g_old, 8
g_old:
	.zero	8
	.globl	d_heaters
	.align 8
	.type	d_heaters, @object
	.size	d_heaters, 8
d_heaters:
	.zero	8
	.globl	d_new
	.align 8
	.type	d_new, @object
	.size	d_new, 8
d_new:
	.zero	8
	.globl	d_old
	.align 8
	.type	d_old, @object
	.size	d_old, 8
d_old:
	.zero	8
	.globl	heat_d
	.align 4
	.type	heat_d, @object
	.size	heat_d, 4
heat_d:
	.zero	4
	.globl	heat_h
	.align 4
	.type	heat_h, @object
	.size	heat_h, 4
heat_h:
	.zero	4
	.globl	heat_w
	.align 4
	.type	heat_w, @object
	.size	heat_w, 4
heat_w:
	.zero	4
	.globl	heat_z
	.align 4
	.type	heat_z, @object
	.size	heat_z, 4
heat_z:
	.zero	4
	.globl	heat_y
	.align 4
	.type	heat_y, @object
	.size	heat_y, 4
heat_y:
	.zero	4
	.globl	heat_x
	.align 4
	.type	heat_x, @object
	.size	heat_x, 4
heat_x:
	.zero	4
	.globl	fixedTemp
	.align 4
	.type	fixedTemp, @object
	.size	fixedTemp, 4
fixedTemp:
	.zero	4
	.globl	startTemp
	.align 4
	.type	startTemp, @object
	.size	startTemp, 4
startTemp:
	.zero	4
	.globl	depth
	.align 4
	.type	depth, @object
	.size	depth, 4
depth:
	.zero	4
	.globl	height
	.align 4
	.type	height, @object
	.size	height, 4
height:
	.zero	4
	.globl	width
	.align 4
	.type	width, @object
	.size	width, 4
width:
	.zero	4
	.globl	timesteps
	.align 4
	.type	timesteps, @object
	.size	timesteps, 4
timesteps:
	.zero	4
	.globl	k
	.align 4
	.type	k, @object
	.size	k, 4
k:
	.zero	4
	.globl	_Z9dimensionB5cxx11
	.align 32
	.type	_Z9dimensionB5cxx11, @object
	.size	_Z9dimensionB5cxx11, 32
_Z9dimensionB5cxx11:
	.zero	32
	.section	.rodata.cst4,"aM",@progbits,4
	.align 4
.LC8:
	.long	981467136
	.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
	.hidden	__dso_handle
	.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 <iostream>
#include <fstream>
#include <cmath>
#include <cstdlib>
#include <string>
#include <iomanip>

#define T_P_B 1024 


///////////////////////////// Global variables /////////////////////////////////

std::string dimension;          // grid dimension
float k;                        // k-step
int timesteps;                  // num of timesteps
int width, height, depth;       // grid size
float startTemp, fixedTemp;     // node start temp
int heat_x, heat_y, heat_z,     // fixed heater vars
    heat_w, heat_h, heat_d;

float *d_old, *d_new, *d_heaters, // grids for values
      *g_old, *g_new, *heaters;


///////////////////////////// CUDA Functions ///////////////////////////////////

__global__ void heat_sim(float *oldg, float * newg, float *fixed, 
						 int width, int height, int depth, float k)
{
	int idx = threadIdx.x + blockIdx.x * blockDim.x;
	float left, right, up, down, above, below;
	float old = oldg[idx];
	
	if (idx < (width*height*depth))
	{	
		if (fixed[idx] != 0) newg[idx] = fixed[idx];
		else if (fixed[idx] == 0)
		{	
			// x-, x+
			((idx%width) == 0) ? (left = old) : (left = oldg[idx-1]);
			((idx%width) == (width-1)) ? (right = old) : (right = oldg[idx+1]);
		
			// y-, y+
			(idx%(width*height) < width) ? (up = old) : (up = oldg[idx - width]);
			(idx%(width*height) >= ((height-1)*width)) 
			? (down = old) : (down = oldg[idx + width]);
		
			// z-, z+
			if (depth <= 1)
			{
				above = 0.0;
				below = 0.0;
				newg[idx] = oldg[idx] + k*(up+down+left+right-(4.0*oldg[idx]));
				
			}
			else if (depth > 1)
			{
				if (idx < (width*height)) above = old;
				else above = oldg[idx - (width*height)];
				if (idx >= ((depth-1)*(width*height))) below = old;
				else below = oldg[idx + (width*height)];
				newg[idx] = oldg[idx] + k*(up+down+left
											+right+above+below-(6.0*oldg[idx]));
			}
		}
	}
}

__global__ void grid_cpy(float *oldg, float *newg, int size)
{
	int idx = threadIdx.x + blockIdx.x * blockDim.x;
	if (idx < size)
		oldg[idx] = newg[idx];
}

///////////////////////////// End CUDA Functions ///////////////////////////////



int main(int argc, char * argv[])
{
///////////////////////////// Config file parser ///////////////////////////////

    std::ifstream conf(argv[1]);
    if (conf.is_open())
    {
        std::string line;
        while (getline(conf, line)){
            if ((line[0] == '#') || line.empty() || line[0] == '\r')  
		        continue;
			
			// get dimension
            while ((line[0] == '#') || line.empty() || line[0] == '\r') 
				getline(conf,line);
            dimension = line.substr(0,2);
            
			// get k value
			getline(conf, line);
            while ((line[0] == '#') || line.empty() || line[0] == '\r') 
				getline(conf,line);
            k = std::stof(line);
            
			// get timesteps
			getline(conf, line);	
            while ((line[0] == '#') || line.empty() || line[0] == '\r') 
				getline(conf,line);
            timesteps = std::stoi(line);
            
			// get grid size
			getline(conf, line);
            while ((line[0] == '#') || line.empty() || line[0] == '\r') 
				getline(conf,line);
            int comma = line.find(',');
            width = std::stoi(line.substr(0, comma));
            line = line.substr(comma+1);
            if (dimension == "2D"){
                height = std::stoi(line);
                depth = 1;
            }
            else if (dimension == "3D"){
                comma = line.find(','); 
                height = std::stoi(line.substr(0, comma));
                depth = std::stoi(line.substr(comma+1));
            }
            
			// get block start temp
    		getline(conf, line);
            while ((line[0] == '#') || line.empty() || line[0] == '\r') 
				getline(conf,line);
            startTemp = std::stof(line);
            
			// create heaters
			heaters = new float[width*height*depth];
			std::fill(heaters, heaters+(width*height*depth), 0);
                
			while(getline(conf, line)){
		    	if (line[0] == '#' || line.empty() || line[0] == '\r') 
			        continue;
                int comma = line.find(',');
                heat_x = std::stoi(line.substr(0, comma));
                line = line.substr(comma+1);
                comma = line.find(',');
                heat_y = std::stoi(line.substr(0, comma));
                line = line.substr(comma+1);
                comma = line.find(',');
                if (dimension == "2D"){
                    heat_w = std::stoi(line.substr(0, comma));
                    line = line.substr(comma+1);
                    comma = line.find(',');
                    heat_h = std::stoi(line.substr(0, comma));
                    line = line.substr(comma+1);
                    heat_d = 1;
                    heat_z = 0;
                    fixedTemp = std::stof(line);
                }
                else if (dimension == "3D"){
                    heat_z = std::stoi(line.substr(0, comma));
                    line = line.substr(comma+1);
                    comma = line.find(',');
                    heat_w = std::stoi(line.substr(0, comma));
                    line = line.substr(comma+1);
                    comma = line.find(',');
                    heat_h = std::stoi(line.substr(0, comma));
                    line = line.substr(comma+1);
                    comma = line.find(',');
                    heat_d = std::stoi(line.substr(0, comma));
                    line = line.substr(comma+1);
                    fixedTemp = std::stof(line);
                }
                for (int i = heat_x+width*heat_y; 
						 i < heat_x+heat_w+width*heat_y; i++)
                    for (int j = 0; j < heat_h; j++)
                        for (int k = heat_z; k < heat_z+heat_d; k++)
                            heaters[i+(j*width)+(k*width*height)] = fixedTemp;
            }
        }
    }
    else std::cerr << "Couldn't open config file.";

////////////////////////// End config file parser //////////////////////////////

	int dim = width*height*depth;
	
	// set up host grids
	g_old = new float[dim];
	g_new = new float[dim];
	std::fill(g_new, g_new+dim, 0);
	std::fill(g_old, g_old+dim, 0);

	for (int i = 0; i < dim; i++)
	{
		g_old[i] = startTemp;
		if (heaters[i] != 0) g_old[i] = heaters[i];
	}

	// allocate blockSize - must be at least one block
	int blockSize = ceil(float(dim)/float(T_P_B));

	// allocate device memory in 1D array
	hipMalloc((void**)&d_new, dim*sizeof(float));
	hipMalloc((void**)&d_old, dim*sizeof(float));
	hipMalloc((void**)&d_heaters, dim*sizeof(float));
	
	// copy filled arrays from host to device
	hipMemcpy(d_old, g_old, dim*sizeof(float), hipMemcpyHostToDevice);
	hipMemcpy(d_new, g_new, dim*sizeof(float), hipMemcpyHostToDevice);	
	hipMemcpy(d_heaters, heaters, dim*sizeof(float), hipMemcpyHostToDevice);
	
	// run kernels
	for (int t = 0; t < timesteps; t++)
	{
		heat_sim<<<blockSize, T_P_B>>> (d_old, d_new, d_heaters, 
										 width, height, depth, k);
		hipDeviceSynchronize();
		grid_cpy<<< blockSize, T_P_B>>> (d_old, d_new, dim);		
		hipDeviceSynchronize();
	}

	// copy data back from device to host
	hipMemcpy(g_new, d_new, dim*sizeof(float), hipMemcpyDeviceToHost);


    // print out to csv
    std::ofstream csv("../heatOutput.csv", std::ios::out);            
    if (csv.is_open()){ 
        for (int i = 0; i < dim; i++)
        {
            if (i%width == width-1) csv << g_new[i] << std::endl;
            else csv << g_new[i] << ", ";
            if (i%(width*height) == (width*height)-1) csv << std::endl;
        }
    }
    else
        std::cout << "Unable to open file, try again." << std::endl;           
    csv.close();

	// deallocate all memory
	delete[] g_old;
	delete[] g_new;
	delete[] heaters;
	hipFree(d_old);
	hipFree(d_new);
	hipFree(d_heaters);
}

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

                                        # End of file scope inline assembly
	.globl	_Z23__device_stub__heat_simPfS_S_iiif # -- Begin function _Z23__device_stub__heat_simPfS_S_iiif
	.type	_Z23__device_stub__heat_simPfS_S_iiif,@function
_Z23__device_stub__heat_simPfS_S_iiif:  # @_Z23__device_stub__heat_simPfS_S_iiif
	.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
	subq	$160, %rsp
	.cfi_def_cfa_offset 208
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r13, -32
	.cfi_offset %r14, -24
	.cfi_offset %r15, -16
	leaq	56(%rsp), %rax
	movq	%rdi, (%rax)
	leaq	48(%rsp), %rdi
	movq	%rsi, (%rdi)
	leaq	40(%rsp), %rsi
	movq	%rdx, (%rsi)
	leaq	20(%rsp), %rdx
	movl	%ecx, (%rdx)
	leaq	16(%rsp), %rcx
	movl	%r8d, (%rcx)
	leaq	12(%rsp), %r8
	movl	%r9d, (%r8)
	leaq	8(%rsp), %r9
	movss	%xmm0, (%r9)
	leaq	96(%rsp), %rbx
	movq	%rax, (%rbx)
	movq	%rdi, 8(%rbx)
	movq	%rsi, 16(%rbx)
	movq	%rdx, 24(%rbx)
	movq	%rcx, 32(%rbx)
	movq	%r8, 40(%rbx)
	movq	%r9, 48(%rbx)
	leaq	80(%rsp), %r14
	leaq	64(%rsp), %r15
	leaq	32(%rsp), %r12
	leaq	24(%rsp), %r13
	movq	%r14, %rdi
	movq	%r15, %rsi
	movq	%r12, %rdx
	movq	%r13, %rcx
	callq	__hipPopCallConfiguration
	movq	(%r14), %rsi
	movl	8(%r14), %edx
	movq	(%r15), %rcx
	movl	8(%r15), %r8d
	movl	$_Z8heat_simPfS_S_iiif, %edi
	movq	%rbx, %r9
	pushq	(%r13)
	.cfi_adjust_cfa_offset 8
	pushq	(%r12)
	.cfi_adjust_cfa_offset 8
	callq	hipLaunchKernel
	addq	$176, %rsp
	.cfi_adjust_cfa_offset -176
	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
.Lfunc_end0:
	.size	_Z23__device_stub__heat_simPfS_S_iiif, .Lfunc_end0-_Z23__device_stub__heat_simPfS_S_iiif
	.cfi_endproc
                                        # -- End function
	.globl	_Z23__device_stub__grid_cpyPfS_i # -- Begin function _Z23__device_stub__grid_cpyPfS_i
	.type	_Z23__device_stub__grid_cpyPfS_i,@function
_Z23__device_stub__grid_cpyPfS_i:       # @_Z23__device_stub__grid_cpyPfS_i
	.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
	subq	$112, %rsp
	.cfi_def_cfa_offset 160
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r13, -32
	.cfi_offset %r14, -24
	.cfi_offset %r15, -16
	leaq	40(%rsp), %rax
	movq	%rdi, (%rax)
	leaq	32(%rsp), %rcx
	movq	%rsi, (%rcx)
	leaq	12(%rsp), %rsi
	movl	%edx, (%rsi)
	leaq	80(%rsp), %rbx
	movq	%rax, (%rbx)
	movq	%rcx, 8(%rbx)
	movq	%rsi, 16(%rbx)
	leaq	64(%rsp), %r14
	leaq	48(%rsp), %r15
	leaq	24(%rsp), %r12
	leaq	16(%rsp), %r13
	movq	%r14, %rdi
	movq	%r15, %rsi
	movq	%r12, %rdx
	movq	%r13, %rcx
	callq	__hipPopCallConfiguration
	movq	(%r14), %rsi
	movl	8(%r14), %edx
	movq	(%r15), %rcx
	movl	8(%r15), %r8d
	movl	$_Z8grid_cpyPfS_i, %edi
	movq	%rbx, %r9
	pushq	(%r13)
	.cfi_adjust_cfa_offset 8
	pushq	(%r12)
	.cfi_adjust_cfa_offset 8
	callq	hipLaunchKernel
	addq	$128, %rsp
	.cfi_adjust_cfa_offset -128
	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
.Lfunc_end1:
	.size	_Z23__device_stub__grid_cpyPfS_i, .Lfunc_end1-_Z23__device_stub__grid_cpyPfS_i
	.cfi_endproc
                                        # -- End function
	.section	.rodata.cst4,"aM",@progbits,4
	.p2align	2, 0x0                          # -- Begin function main
.LCPI2_0:
	.long	0x3a800000                      # float 9.765625E-4
	.text
	.globl	main
	.type	main,@function
main:                                   # @main
.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	$1080, %rsp                     # imm = 0x438
	.cfi_def_cfa_offset 1136
	.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	8(%rsi), %rsi
	leaq	560(%rsp), %r14
	movq	%r14, %rdi
	movl	$8, %edx
	callq	_ZNSt14basic_ifstreamIcSt11char_traitsIcEEC1EPKcSt13_Ios_Openmode
	leaq	680(%rsp), %rdi
	callq	_ZNKSt12__basic_fileIcE7is_openEv
	testb	%al, %al
	je	.LBB2_210
# %bb.1:
	leaq	64(%rsp), %rax
	movq	%rax, -16(%rax)
	movq	$0, -8(%rax)
	movb	$0, (%rax)
	leaq	48(%rsp), %r15
	leaq	8(%rsp), %r12
.LBB2_2:                                # %.backedge489
                                        # =>This Loop Header: Depth=1
                                        #     Child Loop BB2_10 Depth 2
                                        #     Child Loop BB2_18 Depth 2
                                        #     Child Loop BB2_29 Depth 2
                                        #     Child Loop BB2_41 Depth 2
                                        #     Child Loop BB2_84 Depth 2
                                        #     Child Loop BB2_207 Depth 2
                                        #       Child Loop BB2_200 Depth 3
                                        #         Child Loop BB2_202 Depth 4
                                        #           Child Loop BB2_204 Depth 5
	movq	560(%rsp), %rax
	movq	-24(%rax), %rdi
	addq	%r14, %rdi
.Ltmp3:
	movl	$10, %esi
	callq	_ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc
.Ltmp4:
# %bb.3:                                # %.noexc
                                        #   in Loop: Header=BB2_2 Depth=1
.Ltmp5:
	movsbl	%al, %edx
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_ZSt7getlineIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EES4_
.Ltmp6:
# %bb.4:                                #   in Loop: Header=BB2_2 Depth=1
	movq	(%rax), %rcx
	movq	-24(%rcx), %rcx
	testb	$5, 32(%rax,%rcx)
	jne	.LBB2_211
# %bb.5:                                #   in Loop: Header=BB2_2 Depth=1
	cmpq	$0, 56(%rsp)
	je	.LBB2_2
# %bb.6:                                # %switch.early.test
                                        #   in Loop: Header=BB2_2 Depth=1
	movq	48(%rsp), %rax
	movzbl	(%rax), %eax
	cmpl	$13, %eax
	je	.LBB2_2
# %bb.7:                                # %switch.early.test
                                        #   in Loop: Header=BB2_2 Depth=1
	cmpl	$35, %eax
	je	.LBB2_2
	jmp	.LBB2_10
.LBB2_8:                                # %.critedge
                                        #   in Loop: Header=BB2_10 Depth=2
	movq	560(%rsp), %rax
	movq	-24(%rax), %rdi
	addq	%r14, %rdi
.Ltmp272:
	movl	$10, %esi
	callq	_ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc
.Ltmp273:
# %bb.9:                                # %.noexc162
                                        #   in Loop: Header=BB2_10 Depth=2
.Ltmp274:
	movsbl	%al, %edx
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_ZSt7getlineIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EES4_
.Ltmp275:
.LBB2_10:                               # %_ZSt7getlineIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE.exit164
                                        #   Parent Loop BB2_2 Depth=1
                                        # =>  This Inner Loop Header: Depth=2
	cmpq	$0, 56(%rsp)
	je	.LBB2_8
# %bb.11:                               # %switch.early.test457
                                        #   in Loop: Header=BB2_10 Depth=2
	movq	48(%rsp), %rax
	movzbl	(%rax), %eax
	cmpl	$35, %eax
	je	.LBB2_8
# %bb.12:                               # %switch.early.test457
                                        #   in Loop: Header=BB2_10 Depth=2
	cmpl	$13, %eax
	je	.LBB2_8
# %bb.13:                               #   in Loop: Header=BB2_2 Depth=1
.Ltmp79:
	movl	$2, %ecx
	movq	%r12, %rdi
	movq	%r15, %rsi
	xorl	%edx, %edx
	callq	_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm
.Ltmp80:
# %bb.14:                               #   in Loop: Header=BB2_2 Depth=1
	movl	$_Z9dimensionB5cxx11, %edi
	movq	%r12, %rsi
	callq	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_
	movq	8(%rsp), %rdi
	leaq	24(%rsp), %rax
	cmpq	%rax, %rdi
	je	.LBB2_16
# %bb.15:                               # %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i
                                        #   in Loop: Header=BB2_2 Depth=1
	callq	_ZdlPv
.LBB2_16:                               # %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit
                                        #   in Loop: Header=BB2_2 Depth=1
	movq	560(%rsp), %rax
	movq	-24(%rax), %rdi
	addq	%r14, %rdi
.Ltmp82:
	movl	$10, %esi
	callq	_ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc
.Ltmp83:
# %bb.17:                               # %.noexc165
                                        #   in Loop: Header=BB2_2 Depth=1
.Ltmp84:
	movsbl	%al, %edx
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_ZSt7getlineIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EES4_
.Ltmp85:
.LBB2_18:                               # %_ZSt7getlineIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE.exit167
                                        #   Parent Loop BB2_2 Depth=1
                                        # =>  This Inner Loop Header: Depth=2
	cmpq	$0, 56(%rsp)
	je	.LBB2_21
# %bb.19:                               # %switch.early.test458
                                        #   in Loop: Header=BB2_18 Depth=2
	movq	48(%rsp), %rbp
	movzbl	(%rbp), %eax
	cmpl	$35, %eax
	je	.LBB2_21
# %bb.20:                               # %switch.early.test458
                                        #   in Loop: Header=BB2_18 Depth=2
	cmpl	$13, %eax
	jne	.LBB2_23
.LBB2_21:                               # %.critedge2
                                        #   in Loop: Header=BB2_18 Depth=2
	movq	560(%rsp), %rax
	movq	-24(%rax), %rdi
	addq	%r14, %rdi
.Ltmp267:
	movl	$10, %esi
	callq	_ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc
.Ltmp268:
# %bb.22:                               # %.noexc168
                                        #   in Loop: Header=BB2_18 Depth=2
.Ltmp269:
	movsbl	%al, %edx
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_ZSt7getlineIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EES4_
.Ltmp270:
	jmp	.LBB2_18
.LBB2_23:                               #   in Loop: Header=BB2_2 Depth=1
	callq	__errno_location
	movq	%rax, %rbx
	movq	%r12, %rsi
	movl	(%rax), %r12d
	movl	$0, (%rax)
	movq	%rbp, %rdi
	callq	strtof
	cmpq	%rbp, 8(%rsp)
	movq	%rbx, (%rsp)                    # 8-byte Spill
	je	.LBB2_289
# %bb.24:                               #   in Loop: Header=BB2_2 Depth=1
	movl	(%rbx), %eax
	testl	%eax, %eax
	je	.LBB2_26
# %bb.25:                               #   in Loop: Header=BB2_2 Depth=1
	cmpl	$34, %eax
	jne	.LBB2_27
	jmp	.LBB2_321
.LBB2_26:                               #   in Loop: Header=BB2_2 Depth=1
	movl	%r12d, (%rbx)
.LBB2_27:                               #   in Loop: Header=BB2_2 Depth=1
	movss	%xmm0, k(%rip)
	movq	560(%rsp), %rax
	movq	-24(%rax), %rdi
	addq	%r14, %rdi
.Ltmp88:
	movl	$10, %esi
	callq	_ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc
.Ltmp89:
	leaq	8(%rsp), %r12
# %bb.28:                               # %.noexc171
                                        #   in Loop: Header=BB2_2 Depth=1
.Ltmp90:
	movsbl	%al, %edx
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_ZSt7getlineIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EES4_
.Ltmp91:
.LBB2_29:                               # %_ZSt7getlineIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE.exit173
                                        #   Parent Loop BB2_2 Depth=1
                                        # =>  This Inner Loop Header: Depth=2
	cmpq	$0, 56(%rsp)
	je	.LBB2_32
# %bb.30:                               # %switch.early.test459
                                        #   in Loop: Header=BB2_29 Depth=2
	movq	48(%rsp), %rbp
	movzbl	(%rbp), %eax
	cmpl	$35, %eax
	je	.LBB2_32
# %bb.31:                               # %switch.early.test459
                                        #   in Loop: Header=BB2_29 Depth=2
	cmpl	$13, %eax
	jne	.LBB2_34
.LBB2_32:                               # %.critedge4
                                        #   in Loop: Header=BB2_29 Depth=2
	movq	560(%rsp), %rax
	movq	-24(%rax), %rdi
	addq	%r14, %rdi
.Ltmp259:
	movl	$10, %esi
	callq	_ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc
.Ltmp260:
# %bb.33:                               # %.noexc174
                                        #   in Loop: Header=BB2_29 Depth=2
.Ltmp261:
	movsbl	%al, %edx
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_ZSt7getlineIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EES4_
.Ltmp262:
	jmp	.LBB2_29
.LBB2_34:                               #   in Loop: Header=BB2_2 Depth=1
	movl	(%rbx), %r13d
	movl	$0, (%rbx)
	movq	%rbp, %rdi
	movq	%r12, %rsi
	movl	$10, %edx
	callq	__isoc23_strtol
	cmpq	%rbp, 8(%rsp)
	je	.LBB2_291
# %bb.35:                               #   in Loop: Header=BB2_2 Depth=1
	leaq	-2147483648(%rax), %rcx
	movabsq	$-4294967296, %rdx              # imm = 0xFFFFFFFF00000000
	cmpq	%rdx, %rcx
	jb	.LBB2_293
# %bb.36:                               #   in Loop: Header=BB2_2 Depth=1
	movl	(%rbx), %ecx
	cmpl	$34, %ecx
	je	.LBB2_293
# %bb.37:                               #   in Loop: Header=BB2_2 Depth=1
	testl	%ecx, %ecx
	jne	.LBB2_39
# %bb.38:                               #   in Loop: Header=BB2_2 Depth=1
	movl	%r13d, (%rbx)
.LBB2_39:                               #   in Loop: Header=BB2_2 Depth=1
	movl	%eax, timesteps(%rip)
	movq	560(%rsp), %rax
	movq	-24(%rax), %rdi
	addq	%r14, %rdi
.Ltmp92:
	movl	$10, %esi
	callq	_ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc
.Ltmp93:
# %bb.40:                               # %.noexc180
                                        #   in Loop: Header=BB2_2 Depth=1
.Ltmp94:
	movsbl	%al, %edx
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_ZSt7getlineIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EES4_
.Ltmp95:
.LBB2_41:                               # %_ZSt7getlineIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE.exit182
                                        #   Parent Loop BB2_2 Depth=1
                                        # =>  This Inner Loop Header: Depth=2
	cmpq	$0, 56(%rsp)
	je	.LBB2_44
# %bb.42:                               # %switch.early.test460
                                        #   in Loop: Header=BB2_41 Depth=2
	movq	48(%rsp), %rax
	movzbl	(%rax), %eax
	cmpl	$35, %eax
	je	.LBB2_44
# %bb.43:                               # %switch.early.test460
                                        #   in Loop: Header=BB2_41 Depth=2
	cmpl	$13, %eax
	jne	.LBB2_46
.LBB2_44:                               # %.critedge6
                                        #   in Loop: Header=BB2_41 Depth=2
	movq	560(%rsp), %rax
	movq	-24(%rax), %rdi
	addq	%r14, %rdi
.Ltmp249:
	movl	$10, %esi
	callq	_ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc
.Ltmp250:
# %bb.45:                               # %.noexc183
                                        #   in Loop: Header=BB2_41 Depth=2
.Ltmp251:
	movsbl	%al, %edx
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_ZSt7getlineIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EES4_
.Ltmp252:
	jmp	.LBB2_41
.LBB2_46:                               #   in Loop: Header=BB2_2 Depth=1
	movq	%r15, %rdi
	movl	$44, %esi
	xorl	%edx, %edx
	callq	_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4findEcm
	movq	%rax, %rbp
	movslq	%ebp, %rcx
.Ltmp97:
	movq	%r12, %rdi
	movq	%r15, %rsi
	xorl	%edx, %edx
	callq	_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm
.Ltmp98:
# %bb.47:                               #   in Loop: Header=BB2_2 Depth=1
	movq	8(%rsp), %r13
	movl	(%rbx), %r12d
	movl	$0, (%rbx)
	movq	%r13, %rdi
	leaq	40(%rsp), %rsi
	movl	$10, %edx
	callq	__isoc23_strtol
	cmpq	%r13, 40(%rsp)
	je	.LBB2_295
# %bb.48:                               #   in Loop: Header=BB2_2 Depth=1
	leaq	-2147483648(%rax), %rcx
	movabsq	$-4294967296, %rdx              # imm = 0xFFFFFFFF00000000
	cmpq	%rdx, %rcx
	jb	.LBB2_297
# %bb.49:                               #   in Loop: Header=BB2_2 Depth=1
	movl	(%rbx), %ecx
	cmpl	$34, %ecx
	je	.LBB2_297
# %bb.50:                               #   in Loop: Header=BB2_2 Depth=1
	testl	%ecx, %ecx
	jne	.LBB2_52
# %bb.51:                               #   in Loop: Header=BB2_2 Depth=1
	movl	%r12d, (%rbx)
.LBB2_52:                               #   in Loop: Header=BB2_2 Depth=1
	movl	%eax, width(%rip)
	movq	8(%rsp), %rdi
	leaq	24(%rsp), %rax
	cmpq	%rax, %rdi
	je	.LBB2_54
# %bb.53:                               # %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i192
                                        #   in Loop: Header=BB2_2 Depth=1
	callq	_ZdlPv
.LBB2_54:                               # %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit194
                                        #   in Loop: Header=BB2_2 Depth=1
	shlq	$32, %rbp
	movabsq	$4294967296, %rax               # imm = 0x100000000
	addq	%rax, %rbp
	sarq	$32, %rbp
.Ltmp100:
	leaq	8(%rsp), %r12
	movq	%r12, %rdi
	movq	%r15, %rsi
	movq	%rbp, %rdx
	movq	$-1, %rcx
	callq	_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm
.Ltmp101:
# %bb.55:                               #   in Loop: Header=BB2_2 Depth=1
	movq	%r15, %rdi
	movq	%r12, %rsi
	callq	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_
	movq	8(%rsp), %rdi
	leaq	24(%rsp), %rax
	cmpq	%rax, %rdi
	je	.LBB2_57
# %bb.56:                               # %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i195
                                        #   in Loop: Header=BB2_2 Depth=1
	callq	_ZdlPv
.LBB2_57:                               # %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit197
                                        #   in Loop: Header=BB2_2 Depth=1
	cmpq	$2, _Z9dimensionB5cxx11+8(%rip)
	jne	.LBB2_82
# %bb.58:                               # %_ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_.exit
                                        #   in Loop: Header=BB2_2 Depth=1
	movq	_Z9dimensionB5cxx11(%rip), %rax
	movzwl	(%rax), %ecx
	cmpl	$17458, %ecx                    # imm = 0x4432
	je	.LBB2_76
# %bb.59:                               # %_ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_.exit208
                                        #   in Loop: Header=BB2_2 Depth=1
	movzwl	(%rax), %eax
	cmpl	$17459, %eax                    # imm = 0x4433
	jne	.LBB2_82
# %bb.60:                               # %_ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_.exit208.thread
                                        #   in Loop: Header=BB2_2 Depth=1
	movq	%r15, %rdi
	movl	$44, %esi
	xorl	%edx, %edx
	callq	_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4findEcm
	movq	%rax, %rbp
	movslq	%ebp, %rcx
.Ltmp103:
	movq	%r12, %rdi
	movq	%r15, %rsi
	xorl	%edx, %edx
	callq	_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm
.Ltmp104:
# %bb.61:                               #   in Loop: Header=BB2_2 Depth=1
	movq	8(%rsp), %r13
	movl	(%rbx), %r12d
	movl	$0, (%rbx)
	movq	%r13, %rdi
	leaq	40(%rsp), %rsi
	movl	$10, %edx
	callq	__isoc23_strtol
	cmpq	%r13, 40(%rsp)
	je	.LBB2_331
# %bb.62:                               #   in Loop: Header=BB2_2 Depth=1
	leaq	-2147483648(%rax), %rcx
	movabsq	$-4294967296, %rdx              # imm = 0xFFFFFFFF00000000
	cmpq	%rdx, %rcx
	jb	.LBB2_333
# %bb.63:                               #   in Loop: Header=BB2_2 Depth=1
	movl	(%rbx), %ecx
	cmpl	$34, %ecx
	je	.LBB2_333
# %bb.64:                               #   in Loop: Header=BB2_2 Depth=1
	testl	%ecx, %ecx
	jne	.LBB2_66
# %bb.65:                               #   in Loop: Header=BB2_2 Depth=1
	movl	%r12d, (%rbx)
.LBB2_66:                               #   in Loop: Header=BB2_2 Depth=1
	movl	%eax, height(%rip)
	movq	8(%rsp), %rdi
	leaq	24(%rsp), %rax
	cmpq	%rax, %rdi
	je	.LBB2_68
# %bb.67:                               # %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i215
                                        #   in Loop: Header=BB2_2 Depth=1
	callq	_ZdlPv
.LBB2_68:                               # %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit217
                                        #   in Loop: Header=BB2_2 Depth=1
	shlq	$32, %rbp
	movabsq	$4294967296, %rax               # imm = 0x100000000
	addq	%rax, %rbp
	sarq	$32, %rbp
.Ltmp106:
	leaq	8(%rsp), %rdi
	movq	%r15, %rsi
	movq	%rbp, %rdx
	movq	$-1, %rcx
	callq	_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm
.Ltmp107:
# %bb.69:                               #   in Loop: Header=BB2_2 Depth=1
	movq	8(%rsp), %r13
	movl	(%rbx), %ebp
	movl	$0, (%rbx)
	movq	%r13, %rdi
	leaq	40(%rsp), %rsi
	movl	$10, %edx
	callq	__isoc23_strtol
	cmpq	%r13, 40(%rsp)
	je	.LBB2_335
# %bb.70:                               #   in Loop: Header=BB2_2 Depth=1
	leaq	-2147483648(%rax), %rcx
	movabsq	$-4294967296, %rdx              # imm = 0xFFFFFFFF00000000
	cmpq	%rdx, %rcx
	jb	.LBB2_337
# %bb.71:                               #   in Loop: Header=BB2_2 Depth=1
	movl	(%rbx), %ecx
	cmpl	$34, %ecx
	je	.LBB2_337
# %bb.72:                               #   in Loop: Header=BB2_2 Depth=1
	testl	%ecx, %ecx
	jne	.LBB2_74
# %bb.73:                               #   in Loop: Header=BB2_2 Depth=1
	movl	%ebp, (%rbx)
.LBB2_74:                               #   in Loop: Header=BB2_2 Depth=1
	movl	%eax, depth(%rip)
	movq	8(%rsp), %rdi
	leaq	24(%rsp), %rax
	cmpq	%rax, %rdi
	je	.LBB2_82
# %bb.75:                               # %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i224
                                        #   in Loop: Header=BB2_2 Depth=1
	callq	_ZdlPv
	jmp	.LBB2_82
.LBB2_76:                               # %_ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_.exit.thread
                                        #   in Loop: Header=BB2_2 Depth=1
	movq	48(%rsp), %r13
	movl	(%rbx), %ebp
	movl	$0, (%rbx)
	movq	%r13, %rdi
	movq	%r12, %rsi
	movl	$10, %edx
	callq	__isoc23_strtol
	cmpq	%r13, 8(%rsp)
	je	.LBB2_327
# %bb.77:                               #   in Loop: Header=BB2_2 Depth=1
	leaq	-2147483648(%rax), %rcx
	movabsq	$-4294967296, %rdx              # imm = 0xFFFFFFFF00000000
	cmpq	%rdx, %rcx
	jb	.LBB2_329
# %bb.78:                               #   in Loop: Header=BB2_2 Depth=1
	movl	(%rbx), %ecx
	cmpl	$34, %ecx
	je	.LBB2_329
# %bb.79:                               #   in Loop: Header=BB2_2 Depth=1
	testl	%ecx, %ecx
	jne	.LBB2_81
# %bb.80:                               #   in Loop: Header=BB2_2 Depth=1
	movl	%ebp, (%rbx)
.LBB2_81:                               #   in Loop: Header=BB2_2 Depth=1
	movl	%eax, height(%rip)
	movl	$1, depth(%rip)
.LBB2_82:                               # %_ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_.exit208.thread434
                                        #   in Loop: Header=BB2_2 Depth=1
	movq	560(%rsp), %rax
	movq	-24(%rax), %rdi
	addq	%r14, %rdi
.Ltmp119:
	movl	$10, %esi
	callq	_ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc
.Ltmp120:
# %bb.83:                               # %.noexc233
                                        #   in Loop: Header=BB2_2 Depth=1
.Ltmp121:
	movsbl	%al, %edx
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_ZSt7getlineIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EES4_
.Ltmp122:
.LBB2_84:                               # %_ZSt7getlineIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE.exit235
                                        #   Parent Loop BB2_2 Depth=1
                                        # =>  This Inner Loop Header: Depth=2
	cmpq	$0, 56(%rsp)
	je	.LBB2_87
# %bb.85:                               # %switch.early.test461
                                        #   in Loop: Header=BB2_84 Depth=2
	movq	48(%rsp), %rbp
	movzbl	(%rbp), %eax
	cmpl	$35, %eax
	je	.LBB2_87
# %bb.86:                               # %switch.early.test461
                                        #   in Loop: Header=BB2_84 Depth=2
	cmpl	$13, %eax
	jne	.LBB2_89
.LBB2_87:                               # %.critedge8
                                        #   in Loop: Header=BB2_84 Depth=2
	movq	560(%rsp), %rax
	movq	-24(%rax), %rdi
	addq	%r14, %rdi
.Ltmp234:
	movl	$10, %esi
	callq	_ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc
.Ltmp235:
# %bb.88:                               # %.noexc236
                                        #   in Loop: Header=BB2_84 Depth=2
.Ltmp236:
	movsbl	%al, %edx
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_ZSt7getlineIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EES4_
.Ltmp237:
	jmp	.LBB2_84
.LBB2_89:                               #   in Loop: Header=BB2_2 Depth=1
	movl	(%rbx), %r12d
	movl	$0, (%rbx)
	movq	%rbp, %rdi
	leaq	8(%rsp), %rsi
	callq	strtof
	cmpq	%rbp, 8(%rsp)
	je	.LBB2_299
# %bb.90:                               #   in Loop: Header=BB2_2 Depth=1
	movl	(%rbx), %eax
	testl	%eax, %eax
	je	.LBB2_92
# %bb.91:                               #   in Loop: Header=BB2_2 Depth=1
	cmpl	$34, %eax
	jne	.LBB2_93
	jmp	.LBB2_323
.LBB2_92:                               #   in Loop: Header=BB2_2 Depth=1
	movl	%r12d, (%rbx)
.LBB2_93:                               #   in Loop: Header=BB2_2 Depth=1
	movss	%xmm0, startTemp(%rip)
	movslq	width(%rip), %rax
	movslq	height(%rip), %rcx
	imulq	%rax, %rcx
	movslq	depth(%rip), %r12
	imulq	%rcx, %r12
	movq	%r12, %rbp
	shlq	$2, %rbp
	testl	%r12d, %r12d
	movq	%rbp, %rdi
	movq	$-1, %rax
	cmovsq	%rax, %rdi
.Ltmp125:
	callq	_Znam
.Ltmp126:
# %bb.94:                               #   in Loop: Header=BB2_2 Depth=1
	movq	%rax, heaters(%rip)
	testl	%r12d, %r12d
	je	.LBB2_207
# %bb.95:                               # %.lr.ph.i.i.i.preheader
                                        #   in Loop: Header=BB2_2 Depth=1
	movq	%rax, %rdi
	xorl	%esi, %esi
	movq	%rbp, %rdx
	callq	memset@PLT
	jmp	.LBB2_207
.LBB2_96:                               #   in Loop: Header=BB2_207 Depth=2
	cmpq	$0, 56(%rsp)
	je	.LBB2_207
# %bb.97:                               # %switch.early.test462
                                        #   in Loop: Header=BB2_207 Depth=2
	movq	48(%rsp), %rax
	movzbl	(%rax), %eax
	cmpl	$13, %eax
	je	.LBB2_207
# %bb.98:                               # %switch.early.test462
                                        #   in Loop: Header=BB2_207 Depth=2
	cmpl	$35, %eax
	je	.LBB2_207
# %bb.99:                               #   in Loop: Header=BB2_207 Depth=2
	leaq	48(%rsp), %r15
	movq	%r15, %rdi
	movl	$44, %esi
	xorl	%edx, %edx
	callq	_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4findEcm
	movq	%rax, %rbp
	movslq	%ebp, %rcx
.Ltmp133:
	leaq	8(%rsp), %rdi
	movq	%r15, %rsi
	xorl	%edx, %edx
	callq	_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm
.Ltmp134:
# %bb.100:                              #   in Loop: Header=BB2_207 Depth=2
	movq	8(%rsp), %r13
	movq	(%rsp), %rbx                    # 8-byte Reload
	movl	(%rbx), %r12d
	movl	$0, (%rbx)
	movq	%r13, %rdi
	leaq	40(%rsp), %rsi
	movl	$10, %edx
	callq	__isoc23_strtol
	cmpq	%r13, 40(%rsp)
	je	.LBB2_271
# %bb.101:                              #   in Loop: Header=BB2_207 Depth=2
	leaq	-2147483648(%rax), %rcx
	movabsq	$-4294967296, %rdx              # imm = 0xFFFFFFFF00000000
	cmpq	%rdx, %rcx
	jb	.LBB2_273
# %bb.102:                              #   in Loop: Header=BB2_207 Depth=2
	movl	(%rbx), %ecx
	cmpl	$34, %ecx
	je	.LBB2_273
# %bb.103:                              #   in Loop: Header=BB2_207 Depth=2
	testl	%ecx, %ecx
	jne	.LBB2_105
# %bb.104:                              #   in Loop: Header=BB2_207 Depth=2
	movl	%r12d, (%rbx)
.LBB2_105:                              #   in Loop: Header=BB2_207 Depth=2
	movl	%eax, heat_x(%rip)
	movq	8(%rsp), %rdi
	leaq	24(%rsp), %rax
	cmpq	%rax, %rdi
	je	.LBB2_107
# %bb.106:                              # %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i254
                                        #   in Loop: Header=BB2_207 Depth=2
	callq	_ZdlPv
.LBB2_107:                              # %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit256
                                        #   in Loop: Header=BB2_207 Depth=2
	shlq	$32, %rbp
	movabsq	$4294967296, %rax               # imm = 0x100000000
	addq	%rax, %rbp
	sarq	$32, %rbp
.Ltmp136:
	leaq	8(%rsp), %r12
	movq	%r12, %rdi
	movq	%r15, %rsi
	movq	%rbp, %rdx
	movq	$-1, %rcx
	callq	_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm
.Ltmp137:
# %bb.108:                              #   in Loop: Header=BB2_207 Depth=2
	movq	%r15, %rdi
	movq	%r12, %rsi
	callq	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_
	movq	8(%rsp), %rdi
	leaq	24(%rsp), %rax
	cmpq	%rax, %rdi
	je	.LBB2_110
# %bb.109:                              # %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i257
                                        #   in Loop: Header=BB2_207 Depth=2
	callq	_ZdlPv
.LBB2_110:                              # %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit259
                                        #   in Loop: Header=BB2_207 Depth=2
	movq	%r15, %rdi
	movl	$44, %esi
	xorl	%edx, %edx
	callq	_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4findEcm
	movq	%rax, %rbp
	movslq	%ebp, %rcx
.Ltmp139:
	movq	%r12, %rdi
	movq	%r15, %rsi
	xorl	%edx, %edx
	callq	_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm
.Ltmp140:
# %bb.111:                              #   in Loop: Header=BB2_207 Depth=2
	movq	8(%rsp), %r13
	movl	(%rbx), %r12d
	movl	$0, (%rbx)
	movq	%r13, %rdi
	leaq	40(%rsp), %rsi
	movl	$10, %edx
	callq	__isoc23_strtol
	cmpq	%r13, 40(%rsp)
	je	.LBB2_275
# %bb.112:                              #   in Loop: Header=BB2_207 Depth=2
	leaq	-2147483648(%rax), %rcx
	movabsq	$-4294967296, %rdx              # imm = 0xFFFFFFFF00000000
	cmpq	%rdx, %rcx
	jb	.LBB2_277
# %bb.113:                              #   in Loop: Header=BB2_207 Depth=2
	movl	(%rbx), %ecx
	cmpl	$34, %ecx
	je	.LBB2_277
# %bb.114:                              #   in Loop: Header=BB2_207 Depth=2
	testl	%ecx, %ecx
	jne	.LBB2_116
# %bb.115:                              #   in Loop: Header=BB2_207 Depth=2
	movl	%r12d, (%rbx)
.LBB2_116:                              #   in Loop: Header=BB2_207 Depth=2
	movl	%eax, heat_y(%rip)
	movq	8(%rsp), %rdi
	leaq	24(%rsp), %rax
	cmpq	%rax, %rdi
	je	.LBB2_118
# %bb.117:                              # %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i266
                                        #   in Loop: Header=BB2_207 Depth=2
	callq	_ZdlPv
.LBB2_118:                              # %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit268
                                        #   in Loop: Header=BB2_207 Depth=2
	shlq	$32, %rbp
	movabsq	$4294967296, %rax               # imm = 0x100000000
	addq	%rax, %rbp
	sarq	$32, %rbp
.Ltmp142:
	leaq	8(%rsp), %r12
	movq	%r12, %rdi
	movq	%r15, %rsi
	movq	%rbp, %rdx
	movq	$-1, %rcx
	callq	_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm
.Ltmp143:
# %bb.119:                              #   in Loop: Header=BB2_207 Depth=2
	movq	%r15, %rdi
	movq	%r12, %rsi
	callq	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_
	movq	8(%rsp), %rdi
	leaq	24(%rsp), %rax
	cmpq	%rax, %rdi
	je	.LBB2_121
# %bb.120:                              # %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i269
                                        #   in Loop: Header=BB2_207 Depth=2
	callq	_ZdlPv
.LBB2_121:                              # %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit271
                                        #   in Loop: Header=BB2_207 Depth=2
	movq	%r15, %rdi
	movl	$44, %esi
	xorl	%edx, %edx
	callq	_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4findEcm
	cmpq	$2, _Z9dimensionB5cxx11+8(%rip)
	jne	.LBB2_198
# %bb.122:                              # %_ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_.exit273
                                        #   in Loop: Header=BB2_207 Depth=2
	movq	%rax, %rbp
	movq	_Z9dimensionB5cxx11(%rip), %rax
	movzwl	(%rax), %ecx
	cmpl	$17458, %ecx                    # imm = 0x4432
	je	.LBB2_171
# %bb.123:                              # %_ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_.exit273.thread435
                                        #   in Loop: Header=BB2_207 Depth=2
	movzwl	(%rax), %eax
	cmpl	$17459, %eax                    # imm = 0x4433
	jne	.LBB2_198
# %bb.124:                              # %_ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_.exit316.thread
                                        #   in Loop: Header=BB2_207 Depth=2
	movslq	%ebp, %rcx
.Ltmp145:
	movq	%r12, %rdi
	movq	%r15, %rsi
	xorl	%edx, %edx
	callq	_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm
.Ltmp146:
# %bb.125:                              #   in Loop: Header=BB2_207 Depth=2
	movq	8(%rsp), %r13
	movl	(%rbx), %r12d
	movl	$0, (%rbx)
	movq	%r13, %rdi
	leaq	40(%rsp), %rsi
	movl	$10, %edx
	callq	__isoc23_strtol
	cmpq	%r13, 40(%rsp)
	je	.LBB2_301
# %bb.126:                              #   in Loop: Header=BB2_207 Depth=2
	leaq	-2147483648(%rax), %rcx
	movabsq	$-4294967296, %rdx              # imm = 0xFFFFFFFF00000000
	cmpq	%rdx, %rcx
	jb	.LBB2_303
# %bb.127:                              #   in Loop: Header=BB2_207 Depth=2
	movl	(%rbx), %ecx
	cmpl	$34, %ecx
	je	.LBB2_303
# %bb.128:                              #   in Loop: Header=BB2_207 Depth=2
	testl	%ecx, %ecx
	jne	.LBB2_130
# %bb.129:                              #   in Loop: Header=BB2_207 Depth=2
	movl	%r12d, (%rbx)
.LBB2_130:                              #   in Loop: Header=BB2_207 Depth=2
	movl	%eax, heat_z(%rip)
	movq	8(%rsp), %rdi
	leaq	24(%rsp), %rax
	cmpq	%rax, %rdi
	je	.LBB2_132
# %bb.131:                              # %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i323
                                        #   in Loop: Header=BB2_207 Depth=2
	callq	_ZdlPv
.LBB2_132:                              # %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit325
                                        #   in Loop: Header=BB2_207 Depth=2
	shlq	$32, %rbp
	movabsq	$4294967296, %rax               # imm = 0x100000000
	addq	%rax, %rbp
	sarq	$32, %rbp
.Ltmp148:
	leaq	8(%rsp), %r12
	movq	%r12, %rdi
	movq	%r15, %rsi
	movq	%rbp, %rdx
	movq	$-1, %rcx
	callq	_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm
.Ltmp149:
# %bb.133:                              #   in Loop: Header=BB2_207 Depth=2
	movq	%r15, %rdi
	movq	%r12, %rsi
	callq	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_
	movq	8(%rsp), %rdi
	leaq	24(%rsp), %rax
	cmpq	%rax, %rdi
	je	.LBB2_135
# %bb.134:                              # %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i326
                                        #   in Loop: Header=BB2_207 Depth=2
	callq	_ZdlPv
.LBB2_135:                              # %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit328
                                        #   in Loop: Header=BB2_207 Depth=2
	movq	%r15, %rdi
	movl	$44, %esi
	xorl	%edx, %edx
	callq	_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4findEcm
	movq	%rax, %rbp
	movslq	%ebp, %rcx
.Ltmp151:
	movq	%r12, %rdi
	movq	%r15, %rsi
	xorl	%edx, %edx
	callq	_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm
.Ltmp152:
# %bb.136:                              #   in Loop: Header=BB2_207 Depth=2
	movq	8(%rsp), %r13
	movl	(%rbx), %r12d
	movl	$0, (%rbx)
	movq	%r13, %rdi
	leaq	40(%rsp), %rsi
	movl	$10, %edx
	callq	__isoc23_strtol
	cmpq	%r13, 40(%rsp)
	je	.LBB2_311
# %bb.137:                              #   in Loop: Header=BB2_207 Depth=2
	leaq	-2147483648(%rax), %rcx
	movabsq	$-4294967296, %rdx              # imm = 0xFFFFFFFF00000000
	cmpq	%rdx, %rcx
	jb	.LBB2_313
# %bb.138:                              #   in Loop: Header=BB2_207 Depth=2
	movl	(%rbx), %ecx
	cmpl	$34, %ecx
	je	.LBB2_313
# %bb.139:                              #   in Loop: Header=BB2_207 Depth=2
	testl	%ecx, %ecx
	jne	.LBB2_141
# %bb.140:                              #   in Loop: Header=BB2_207 Depth=2
	movl	%r12d, (%rbx)
.LBB2_141:                              #   in Loop: Header=BB2_207 Depth=2
	movl	%eax, heat_w(%rip)
	movq	8(%rsp), %rdi
	leaq	24(%rsp), %rax
	cmpq	%rax, %rdi
	je	.LBB2_143
# %bb.142:                              # %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i335
                                        #   in Loop: Header=BB2_207 Depth=2
	callq	_ZdlPv
.LBB2_143:                              # %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit337
                                        #   in Loop: Header=BB2_207 Depth=2
	shlq	$32, %rbp
	movabsq	$4294967296, %rax               # imm = 0x100000000
	addq	%rax, %rbp
	sarq	$32, %rbp
.Ltmp154:
	leaq	8(%rsp), %r12
	movq	%r12, %rdi
	movq	%r15, %rsi
	movq	%rbp, %rdx
	movq	$-1, %rcx
	callq	_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm
.Ltmp155:
# %bb.144:                              #   in Loop: Header=BB2_207 Depth=2
	movq	%r15, %rdi
	movq	%r12, %rsi
	callq	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_
	movq	8(%rsp), %rdi
	leaq	24(%rsp), %rax
	cmpq	%rax, %rdi
	je	.LBB2_146
# %bb.145:                              # %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i338
                                        #   in Loop: Header=BB2_207 Depth=2
	callq	_ZdlPv
.LBB2_146:                              # %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit340
                                        #   in Loop: Header=BB2_207 Depth=2
	movq	%r15, %rdi
	movl	$44, %esi
	xorl	%edx, %edx
	callq	_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4findEcm
	movq	%rax, %rbp
	movslq	%ebp, %rcx
.Ltmp157:
	movq	%r12, %rdi
	movq	%r15, %rsi
	xorl	%edx, %edx
	callq	_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm
.Ltmp158:
# %bb.147:                              #   in Loop: Header=BB2_207 Depth=2
	movq	8(%rsp), %r13
	movl	(%rbx), %r12d
	movl	$0, (%rbx)
	movq	%r13, %rdi
	leaq	40(%rsp), %rsi
	movl	$10, %edx
	callq	__isoc23_strtol
	cmpq	%r13, 40(%rsp)
	je	.LBB2_315
# %bb.148:                              #   in Loop: Header=BB2_207 Depth=2
	leaq	-2147483648(%rax), %rcx
	movabsq	$-4294967296, %rdx              # imm = 0xFFFFFFFF00000000
	cmpq	%rdx, %rcx
	jb	.LBB2_305
# %bb.149:                              #   in Loop: Header=BB2_207 Depth=2
	movl	(%rbx), %ecx
	cmpl	$34, %ecx
	je	.LBB2_305
# %bb.150:                              #   in Loop: Header=BB2_207 Depth=2
	testl	%ecx, %ecx
	jne	.LBB2_152
# %bb.151:                              #   in Loop: Header=BB2_207 Depth=2
	movl	%r12d, (%rbx)
.LBB2_152:                              #   in Loop: Header=BB2_207 Depth=2
	movl	%eax, heat_h(%rip)
	movq	8(%rsp), %rdi
	leaq	24(%rsp), %rax
	cmpq	%rax, %rdi
	je	.LBB2_154
# %bb.153:                              # %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i347
                                        #   in Loop: Header=BB2_207 Depth=2
	callq	_ZdlPv
.LBB2_154:                              # %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit349
                                        #   in Loop: Header=BB2_207 Depth=2
	shlq	$32, %rbp
	movabsq	$4294967296, %rax               # imm = 0x100000000
	addq	%rax, %rbp
	sarq	$32, %rbp
.Ltmp160:
	leaq	8(%rsp), %r12
	movq	%r12, %rdi
	movq	%r15, %rsi
	movq	%rbp, %rdx
	movq	$-1, %rcx
	callq	_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm
.Ltmp161:
# %bb.155:                              #   in Loop: Header=BB2_207 Depth=2
	movq	%r15, %rdi
	movq	%r12, %rsi
	callq	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_
	movq	8(%rsp), %rdi
	leaq	24(%rsp), %rax
	cmpq	%rax, %rdi
	je	.LBB2_157
# %bb.156:                              # %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i350
                                        #   in Loop: Header=BB2_207 Depth=2
	callq	_ZdlPv
.LBB2_157:                              # %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit352
                                        #   in Loop: Header=BB2_207 Depth=2
	movq	%r15, %rdi
	movl	$44, %esi
	xorl	%edx, %edx
	callq	_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4findEcm
	movq	%rax, %rbp
	movslq	%ebp, %rcx
.Ltmp163:
	movq	%r12, %rdi
	movq	%r15, %rsi
	xorl	%edx, %edx
	callq	_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm
.Ltmp164:
# %bb.158:                              #   in Loop: Header=BB2_207 Depth=2
	movq	8(%rsp), %r13
	movl	(%rbx), %r12d
	movl	$0, (%rbx)
	movq	%r13, %rdi
	leaq	40(%rsp), %rsi
	movl	$10, %edx
	callq	__isoc23_strtol
	cmpq	%r13, 40(%rsp)
	je	.LBB2_307
# %bb.159:                              #   in Loop: Header=BB2_207 Depth=2
	leaq	-2147483648(%rax), %rcx
	movabsq	$-4294967296, %rdx              # imm = 0xFFFFFFFF00000000
	cmpq	%rdx, %rcx
	jb	.LBB2_317
# %bb.160:                              #   in Loop: Header=BB2_207 Depth=2
	movl	(%rbx), %ecx
	cmpl	$34, %ecx
	je	.LBB2_317
# %bb.161:                              #   in Loop: Header=BB2_207 Depth=2
	testl	%ecx, %ecx
	jne	.LBB2_163
# %bb.162:                              #   in Loop: Header=BB2_207 Depth=2
	movl	%r12d, (%rbx)
.LBB2_163:                              #   in Loop: Header=BB2_207 Depth=2
	movl	%eax, heat_d(%rip)
	movq	8(%rsp), %rdi
	leaq	24(%rsp), %rax
	cmpq	%rax, %rdi
	je	.LBB2_165
# %bb.164:                              # %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i359
                                        #   in Loop: Header=BB2_207 Depth=2
	callq	_ZdlPv
.LBB2_165:                              # %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit361
                                        #   in Loop: Header=BB2_207 Depth=2
	shlq	$32, %rbp
	movabsq	$4294967296, %rax               # imm = 0x100000000
	addq	%rax, %rbp
	sarq	$32, %rbp
.Ltmp166:
	leaq	8(%rsp), %r12
	movq	%r12, %rdi
	movq	%r15, %rsi
	movq	%rbp, %rdx
	movq	$-1, %rcx
	callq	_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm
.Ltmp167:
# %bb.166:                              #   in Loop: Header=BB2_207 Depth=2
	movq	%r15, %rdi
	movq	%r12, %rsi
	callq	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_
	movq	8(%rsp), %rdi
	leaq	24(%rsp), %rax
	cmpq	%rax, %rdi
	je	.LBB2_168
# %bb.167:                              # %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i362
                                        #   in Loop: Header=BB2_207 Depth=2
	callq	_ZdlPv
.LBB2_168:                              # %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit364
                                        #   in Loop: Header=BB2_207 Depth=2
	movq	48(%rsp), %r13
	movl	(%rbx), %ebp
	movl	$0, (%rbx)
	movq	%r13, %rdi
	movq	%r12, %rsi
	callq	strtof
	cmpq	%r13, 8(%rsp)
	je	.LBB2_309
# %bb.169:                              #   in Loop: Header=BB2_207 Depth=2
	movl	(%rbx), %eax
	testl	%eax, %eax
	je	.LBB2_196
# %bb.170:                              #   in Loop: Header=BB2_207 Depth=2
	cmpl	$34, %eax
	jne	.LBB2_197
	jmp	.LBB2_325
.LBB2_171:                              # %_ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_.exit273.thread
                                        #   in Loop: Header=BB2_207 Depth=2
	movslq	%ebp, %rcx
.Ltmp194:
	movq	%r12, %rdi
	movq	%r15, %rsi
	xorl	%edx, %edx
	callq	_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm
.Ltmp195:
# %bb.172:                              #   in Loop: Header=BB2_207 Depth=2
	movq	8(%rsp), %r13
	movl	(%rbx), %r12d
	movl	$0, (%rbx)
	movq	%r13, %rdi
	leaq	40(%rsp), %rsi
	movl	$10, %edx
	callq	__isoc23_strtol
	cmpq	%r13, 40(%rsp)
	je	.LBB2_279
# %bb.173:                              #   in Loop: Header=BB2_207 Depth=2
	leaq	-2147483648(%rax), %rcx
	movabsq	$-4294967296, %rdx              # imm = 0xFFFFFFFF00000000
	cmpq	%rdx, %rcx
	jb	.LBB2_281
# %bb.174:                              #   in Loop: Header=BB2_207 Depth=2
	movl	(%rbx), %ecx
	cmpl	$34, %ecx
	je	.LBB2_281
# %bb.175:                              #   in Loop: Header=BB2_207 Depth=2
	testl	%ecx, %ecx
	jne	.LBB2_177
# %bb.176:                              #   in Loop: Header=BB2_207 Depth=2
	movl	%r12d, (%rbx)
.LBB2_177:                              #   in Loop: Header=BB2_207 Depth=2
	movl	%eax, heat_w(%rip)
	movq	8(%rsp), %rdi
	leaq	24(%rsp), %rax
	cmpq	%rax, %rdi
	je	.LBB2_179
# %bb.178:                              # %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i280
                                        #   in Loop: Header=BB2_207 Depth=2
	callq	_ZdlPv
.LBB2_179:                              # %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit282
                                        #   in Loop: Header=BB2_207 Depth=2
	shlq	$32, %rbp
	movabsq	$4294967296, %rax               # imm = 0x100000000
	addq	%rax, %rbp
	sarq	$32, %rbp
.Ltmp197:
	leaq	8(%rsp), %r12
	movq	%r12, %rdi
	movq	%r15, %rsi
	movq	%rbp, %rdx
	movq	$-1, %rcx
	callq	_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm
.Ltmp198:
# %bb.180:                              #   in Loop: Header=BB2_207 Depth=2
	movq	%r15, %rdi
	movq	%r12, %rsi
	callq	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_
	movq	8(%rsp), %rdi
	leaq	24(%rsp), %rax
	cmpq	%rax, %rdi
	je	.LBB2_182
# %bb.181:                              # %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i283
                                        #   in Loop: Header=BB2_207 Depth=2
	callq	_ZdlPv
.LBB2_182:                              # %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit285
                                        #   in Loop: Header=BB2_207 Depth=2
	movq	%r15, %rdi
	movl	$44, %esi
	xorl	%edx, %edx
	callq	_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4findEcm
	movq	%rax, %rbp
	movslq	%ebp, %rcx
.Ltmp200:
	movq	%r12, %rdi
	movq	%r15, %rsi
	xorl	%edx, %edx
	callq	_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm
.Ltmp201:
# %bb.183:                              #   in Loop: Header=BB2_207 Depth=2
	movq	8(%rsp), %r13
	movl	(%rbx), %r12d
	movl	$0, (%rbx)
	movq	%r13, %rdi
	leaq	40(%rsp), %rsi
	movl	$10, %edx
	callq	__isoc23_strtol
	cmpq	%r13, 40(%rsp)
	je	.LBB2_283
# %bb.184:                              #   in Loop: Header=BB2_207 Depth=2
	leaq	-2147483648(%rax), %rcx
	movabsq	$-4294967296, %rdx              # imm = 0xFFFFFFFF00000000
	cmpq	%rdx, %rcx
	jb	.LBB2_285
# %bb.185:                              #   in Loop: Header=BB2_207 Depth=2
	movl	(%rbx), %ecx
	cmpl	$34, %ecx
	je	.LBB2_285
# %bb.186:                              #   in Loop: Header=BB2_207 Depth=2
	testl	%ecx, %ecx
	jne	.LBB2_188
# %bb.187:                              #   in Loop: Header=BB2_207 Depth=2
	movl	%r12d, (%rbx)
.LBB2_188:                              #   in Loop: Header=BB2_207 Depth=2
	movl	%eax, heat_h(%rip)
	movq	8(%rsp), %rdi
	leaq	24(%rsp), %rax
	cmpq	%rax, %rdi
	je	.LBB2_190
# %bb.189:                              # %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i292
                                        #   in Loop: Header=BB2_207 Depth=2
	callq	_ZdlPv
.LBB2_190:                              # %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit294
                                        #   in Loop: Header=BB2_207 Depth=2
	shlq	$32, %rbp
	movabsq	$4294967296, %rax               # imm = 0x100000000
	addq	%rax, %rbp
	sarq	$32, %rbp
.Ltmp203:
	leaq	8(%rsp), %r12
	movq	%r12, %rdi
	movq	%r15, %rsi
	movq	%rbp, %rdx
	movq	$-1, %rcx
	callq	_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm
.Ltmp204:
# %bb.191:                              #   in Loop: Header=BB2_207 Depth=2
	movq	%r15, %rdi
	movq	%r12, %rsi
	callq	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_
	movq	8(%rsp), %rdi
	leaq	24(%rsp), %rax
	cmpq	%rax, %rdi
	je	.LBB2_193
# %bb.192:                              # %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i295
                                        #   in Loop: Header=BB2_207 Depth=2
	callq	_ZdlPv
.LBB2_193:                              # %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit297
                                        #   in Loop: Header=BB2_207 Depth=2
	movl	$1, heat_d(%rip)
	xorl	%eax, %eax
	movl	%eax, heat_z(%rip)
	movq	48(%rsp), %r13
	movl	(%rbx), %ebp
	movl	%eax, (%rbx)
	movq	%r13, %rdi
	movq	%r12, %rsi
	callq	strtof
	cmpq	%r13, 8(%rsp)
	je	.LBB2_287
# %bb.194:                              #   in Loop: Header=BB2_207 Depth=2
	movl	(%rbx), %eax
	testl	%eax, %eax
	je	.LBB2_196
# %bb.195:                              #   in Loop: Header=BB2_207 Depth=2
	cmpl	$34, %eax
	jne	.LBB2_197
	jmp	.LBB2_319
.LBB2_196:                              #   in Loop: Header=BB2_207 Depth=2
	movl	%ebp, (%rbx)
.LBB2_197:                              # %_ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_.exit316.thread436.sink.split
                                        #   in Loop: Header=BB2_207 Depth=2
	movss	%xmm0, fixedTemp(%rip)
.LBB2_198:                              # %_ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_.exit316.thread436
                                        #   in Loop: Header=BB2_207 Depth=2
	movl	width(%rip), %eax
	movl	heat_y(%rip), %ecx
	imull	%eax, %ecx
	addl	heat_x(%rip), %ecx
	movl	heat_w(%rip), %edx
	addl	%ecx, %edx
	cmpl	%edx, %ecx
	jge	.LBB2_207
# %bb.199:                              # %.preheader471.lr.ph
                                        #   in Loop: Header=BB2_207 Depth=2
	movl	heat_h(%rip), %esi
	movslq	heat_z(%rip), %r15
	movl	heat_d(%rip), %r8d
	leal	(%r8,%r15), %edi
	movslq	%edi, %r9
	movl	%eax, %r10d
	imull	%r15d, %r10d
.LBB2_200:                              # %.preheader471
                                        #   Parent Loop BB2_2 Depth=1
                                        #     Parent Loop BB2_207 Depth=2
                                        # =>    This Loop Header: Depth=3
                                        #         Child Loop BB2_202 Depth 4
                                        #           Child Loop BB2_204 Depth 5
	testl	%esi, %esi
	jle	.LBB2_206
# %bb.201:                              # %.lr.ph899
                                        #   in Loop: Header=BB2_200 Depth=3
	movq	heaters(%rip), %r11
	movl	height(%rip), %ebp
	movl	%r10d, %r12d
	imull	%ebp, %r12d
	addl	%ecx, %r12d
	imull	%eax, %ebp
	xorl	%r13d, %r13d
.LBB2_202:                              #   Parent Loop BB2_2 Depth=1
                                        #     Parent Loop BB2_207 Depth=2
                                        #       Parent Loop BB2_200 Depth=3
                                        # =>      This Loop Header: Depth=4
                                        #           Child Loop BB2_204 Depth 5
	testl	%r8d, %r8d
	jle	.LBB2_205
# %bb.203:                              # %.lr.ph.preheader
                                        #   in Loop: Header=BB2_202 Depth=4
	movss	fixedTemp(%rip), %xmm0          # xmm0 = mem[0],zero,zero,zero
	movl	%r12d, %ebx
	movq	%r15, %rdi
.LBB2_204:                              # %.lr.ph
                                        #   Parent Loop BB2_2 Depth=1
                                        #     Parent Loop BB2_207 Depth=2
                                        #       Parent Loop BB2_200 Depth=3
                                        #         Parent Loop BB2_202 Depth=4
                                        # =>        This Inner Loop Header: Depth=5
	movslq	%ebx, %rbx
	movss	%xmm0, (%r11,%rbx,4)
	incq	%rdi
	addl	%ebp, %ebx
	cmpq	%r9, %rdi
	jl	.LBB2_204
.LBB2_205:                              # %._crit_edge
                                        #   in Loop: Header=BB2_202 Depth=4
	incl	%r13d
	addl	%eax, %r12d
	cmpl	%esi, %r13d
	jne	.LBB2_202
.LBB2_206:                              # %._crit_edge900
                                        #   in Loop: Header=BB2_200 Depth=3
	incl	%ecx
	cmpl	%edx, %ecx
	jne	.LBB2_200
.LBB2_207:                              # %_ZSt4fillIPfiEvT_S1_RKT0_.exit
                                        #   Parent Loop BB2_2 Depth=1
                                        # =>  This Loop Header: Depth=2
                                        #       Child Loop BB2_200 Depth 3
                                        #         Child Loop BB2_202 Depth 4
                                        #           Child Loop BB2_204 Depth 5
	movq	560(%rsp), %rax
	movq	-24(%rax), %rdi
	addq	%r14, %rdi
.Ltmp128:
	movl	$10, %esi
	callq	_ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc
.Ltmp129:
	leaq	48(%rsp), %r15
# %bb.208:                              # %.noexc244
                                        #   in Loop: Header=BB2_207 Depth=2
.Ltmp130:
	movsbl	%al, %edx
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_ZSt7getlineIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EES4_
.Ltmp131:
# %bb.209:                              #   in Loop: Header=BB2_207 Depth=2
	movq	(%rax), %rcx
	movq	-24(%rcx), %rcx
	testb	$5, 32(%rax,%rcx)
	leaq	8(%rsp), %r12
	je	.LBB2_96
	jmp	.LBB2_2
.LBB2_210:
.Ltmp0:
	movl	$_ZSt4cerr, %edi
	movl	$.L.str.2, %esi
	movl	$26, %edx
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
.Ltmp1:
	jmp	.LBB2_213
.LBB2_211:
	movq	48(%rsp), %rdi
	leaq	64(%rsp), %rax
	cmpq	%rax, %rdi
	je	.LBB2_213
# %bb.212:                              # %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i382
	callq	_ZdlPv
.LBB2_213:                              # %_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc.exit
	movslq	width(%rip), %rax
	movslq	height(%rip), %rcx
	imulq	%rax, %rcx
	movslq	depth(%rip), %rbx
	imulq	%rcx, %rbx
	movq	%rbx, %r14
	shlq	$2, %r14
	testl	%ebx, %ebx
	movq	$-1, %r12
	cmovnsq	%r14, %r12
.Ltmp7:
	movq	%r12, %rdi
	callq	_Znam
.Ltmp8:
# %bb.214:
	movq	%rax, %r15
	movq	%rax, g_old(%rip)
.Ltmp9:
	movq	%r12, %rdi
	callq	_Znam
.Ltmp10:
# %bb.215:
	movq	%rax, g_new(%rip)
	testl	%ebx, %ebx
	je	.LBB2_221
# %bb.216:                              # %_ZSt4fillIPfiEvT_S1_RKT0_.exit398
	movq	%rax, %rdi
	xorl	%esi, %esi
	movq	%r14, %rdx
	callq	memset@PLT
	movq	%r15, %rdi
	xorl	%esi, %esi
	movq	%r14, %rdx
	callq	memset@PLT
	testl	%ebx, %ebx
	setg	%bpl
	jle	.LBB2_221
# %bb.217:                              # %.lr.ph903
	movss	startTemp(%rip), %xmm0          # xmm0 = mem[0],zero,zero,zero
	movq	heaters(%rip), %rax
	movl	%ebx, %ecx
	xorl	%edx, %edx
	xorps	%xmm1, %xmm1
.LBB2_218:                              # =>This Inner Loop Header: Depth=1
	movss	%xmm0, (%r15,%rdx,4)
	movss	(%rax,%rdx,4), %xmm2            # xmm2 = mem[0],zero,zero,zero
	ucomiss	%xmm1, %xmm2
	jne	.LBB2_219
	jnp	.LBB2_220
.LBB2_219:                              #   in Loop: Header=BB2_218 Depth=1
	movss	%xmm2, (%r15,%rdx,4)
.LBB2_220:                              #   in Loop: Header=BB2_218 Depth=1
	incq	%rdx
	cmpq	%rdx, %rcx
	jne	.LBB2_218
	jmp	.LBB2_222
.LBB2_221:
	xorl	%ebp, %ebp
.LBB2_222:                              # %._crit_edge904
	xorps	%xmm0, %xmm0
	cvtsi2ss	%ebx, %xmm0
	mulss	.LCPI2_0(%rip), %xmm0
	callq	ceilf@PLT
	movss	%xmm0, (%rsp)                   # 4-byte Spill
.Ltmp12:
	movl	$d_new, %edi
	movq	%r14, %rsi
	callq	hipMalloc
.Ltmp13:
# %bb.223:
.Ltmp14:
	movl	$d_old, %edi
	movq	%r14, %rsi
	callq	hipMalloc
.Ltmp15:
# %bb.224:
.Ltmp16:
	movl	$d_heaters, %edi
	movq	%r14, %rsi
	callq	hipMalloc
.Ltmp17:
# %bb.225:
	movq	d_old(%rip), %rdi
	movq	g_old(%rip), %rsi
.Ltmp18:
	movq	%r14, %rdx
	movl	$1, %ecx
	callq	hipMemcpy
.Ltmp19:
# %bb.226:
	movq	d_new(%rip), %rdi
	movq	g_new(%rip), %rsi
.Ltmp20:
	movq	%r14, %rdx
	movl	$1, %ecx
	callq	hipMemcpy
.Ltmp21:
# %bb.227:
	movq	d_heaters(%rip), %rdi
	movq	heaters(%rip), %rsi
.Ltmp22:
	movq	%r14, %rdx
	movl	$1, %ecx
	callq	hipMemcpy
.Ltmp23:
# %bb.228:                              # %.preheader470
	cmpl	$0, timesteps(%rip)
	jle	.LBB2_239
# %bb.229:                              # %.lr.ph906
	cvttss2si	(%rsp), %eax            # 4-byte Folded Reload
	movl	%eax, %r15d
	movabsq	$4294967296, %rax               # imm = 0x100000000
	orq	%rax, %r15
	xorl	%r13d, %r13d
	movabsq	$4294968320, %r12               # imm = 0x100000400
.LBB2_230:                              # =>This Inner Loop Header: Depth=1
.Ltmp24:
	movq	%r15, %rdi
	movl	$1, %esi
	movq	%r12, %rdx
	movl	$1, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	__hipPushCallConfiguration
.Ltmp25:
# %bb.231:                              #   in Loop: Header=BB2_230 Depth=1
	testl	%eax, %eax
	jne	.LBB2_233
# %bb.232:                              #   in Loop: Header=BB2_230 Depth=1
	movq	d_old(%rip), %rdi
	movq	d_new(%rip), %rsi
	movq	d_heaters(%rip), %rdx
	movl	width(%rip), %ecx
	movl	height(%rip), %r8d
	movl	depth(%rip), %r9d
	movss	k(%rip), %xmm0                  # xmm0 = mem[0],zero,zero,zero
.Ltmp26:
	callq	_Z23__device_stub__heat_simPfS_S_iiif
.Ltmp27:
.LBB2_233:                              #   in Loop: Header=BB2_230 Depth=1
.Ltmp28:
	callq	hipDeviceSynchronize
.Ltmp29:
# %bb.234:                              #   in Loop: Header=BB2_230 Depth=1
.Ltmp30:
	movq	%r15, %rdi
	movl	$1, %esi
	movq	%r12, %rdx
	movl	$1, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	__hipPushCallConfiguration
.Ltmp31:
# %bb.235:                              #   in Loop: Header=BB2_230 Depth=1
	testl	%eax, %eax
	jne	.LBB2_237
# %bb.236:                              #   in Loop: Header=BB2_230 Depth=1
	movq	d_old(%rip), %rdi
	movq	d_new(%rip), %rsi
.Ltmp32:
	movl	%ebx, %edx
	callq	_Z23__device_stub__grid_cpyPfS_i
.Ltmp33:
.LBB2_237:                              #   in Loop: Header=BB2_230 Depth=1
.Ltmp34:
	callq	hipDeviceSynchronize
.Ltmp35:
# %bb.238:                              #   in Loop: Header=BB2_230 Depth=1
	incl	%r13d
	cmpl	timesteps(%rip), %r13d
	jl	.LBB2_230
.LBB2_239:                              # %._crit_edge907
	movq	g_new(%rip), %rdi
	movq	d_new(%rip), %rsi
.Ltmp37:
	movq	%r14, %rdx
	movl	$2, %ecx
	callq	hipMemcpy
.Ltmp38:
# %bb.240:
.Ltmp40:
	leaq	48(%rsp), %r14
	movl	$.L.str.3, %esi
	movq	%r14, %rdi
	movl	$16, %edx
	callq	_ZNSt14basic_ofstreamIcSt11char_traitsIcEEC1EPKcSt13_Ios_Openmode
.Ltmp41:
# %bb.241:
	leaq	160(%rsp), %rdi
	callq	_ZNKSt12__basic_fileIcE7is_openEv
	testb	%al, %al
	je	.LBB2_256
# %bb.242:                              # %.preheader
	testb	%bpl, %bpl
	je	.LBB2_260
# %bb.243:                              # %.lr.ph909.preheader
	movl	%ebx, %r12d
	xorl	%ebx, %ebx
.LBB2_244:                              # %.lr.ph909
                                        # =>This Inner Loop Header: Depth=1
	movl	width(%rip), %ecx
	movl	%ebx, %eax
	cltd
	idivl	%ecx
	decl	%ecx
	movq	g_new(%rip), %rax
	xorps	%xmm0, %xmm0
	cvtss2sd	(%rax,%rbx,4), %xmm0
	cmpl	%ecx, %edx
	jne	.LBB2_249
# %bb.245:                              #   in Loop: Header=BB2_244 Depth=1
.Ltmp55:
	movq	%r14, %rdi
	callq	_ZNSo9_M_insertIdEERSoT_
.Ltmp56:
# %bb.246:                              # %_ZNSolsEf.exit
                                        #   in Loop: Header=BB2_244 Depth=1
	movq	%rax, %r15
	movq	(%rax), %rax
	movq	-24(%rax), %rdi
	addq	%r15, %rdi
.Ltmp57:
	movl	$10, %esi
	callq	_ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc
.Ltmp58:
# %bb.247:                              # %.noexc411
                                        #   in Loop: Header=BB2_244 Depth=1
.Ltmp59:
	movsbl	%al, %esi
	movq	%r15, %rdi
	callq	_ZNSo3putEc
.Ltmp60:
# %bb.248:                              # %.noexc412
                                        #   in Loop: Header=BB2_244 Depth=1
.Ltmp61:
	movq	%rax, %rdi
	callq	_ZNSo5flushEv
.Ltmp62:
	jmp	.LBB2_251
.LBB2_249:                              #   in Loop: Header=BB2_244 Depth=1
.Ltmp51:
	movq	%r14, %rdi
	callq	_ZNSo9_M_insertIdEERSoT_
.Ltmp52:
# %bb.250:                              # %_ZNSolsEf.exit402
                                        #   in Loop: Header=BB2_244 Depth=1
.Ltmp53:
	movl	$.L.str.4, %esi
	movl	$2, %edx
	movq	%rax, %rdi
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
.Ltmp54:
.LBB2_251:                              # %_ZNSolsEPFRSoS_E.exit
                                        #   in Loop: Header=BB2_244 Depth=1
	movl	height(%rip), %ecx
	imull	width(%rip), %ecx
	movl	%ebx, %eax
	cltd
	idivl	%ecx
	decl	%ecx
	cmpl	%ecx, %edx
	jne	.LBB2_255
# %bb.252:                              #   in Loop: Header=BB2_244 Depth=1
	movq	48(%rsp), %rax
	movq	-24(%rax), %rdi
	addq	%r14, %rdi
.Ltmp63:
	movl	$10, %esi
	callq	_ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc
.Ltmp64:
# %bb.253:                              # %.noexc414
                                        #   in Loop: Header=BB2_244 Depth=1
.Ltmp65:
	movsbl	%al, %esi
	movq	%r14, %rdi
	callq	_ZNSo3putEc
.Ltmp66:
# %bb.254:                              # %.noexc415
                                        #   in Loop: Header=BB2_244 Depth=1
.Ltmp67:
	movq	%rax, %rdi
	callq	_ZNSo5flushEv
.Ltmp68:
.LBB2_255:                              # %_ZNSolsEPFRSoS_E.exit406
                                        #   in Loop: Header=BB2_244 Depth=1
	incq	%rbx
	cmpq	%rbx, %r12
	jne	.LBB2_244
	jmp	.LBB2_260
.LBB2_256:
.Ltmp43:
	movl	$_ZSt4cout, %ebx
	movl	$_ZSt4cout, %edi
	movl	$.L.str.5, %esi
	movl	$31, %edx
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
.Ltmp44:
# %bb.257:                              # %_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc.exit408
	movq	_ZSt4cout(%rip), %rax
	addq	-24(%rax), %rbx
.Ltmp45:
	movq	%rbx, %rdi
	movl	$10, %esi
	callq	_ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc
.Ltmp46:
# %bb.258:                              # %.noexc418
.Ltmp47:
	movsbl	%al, %esi
	movl	$_ZSt4cout, %edi
	callq	_ZNSo3putEc
.Ltmp48:
# %bb.259:                              # %.noexc419
.Ltmp49:
	movq	%rax, %rdi
	callq	_ZNSo5flushEv
.Ltmp50:
.LBB2_260:                              # %_ZNSolsEPFRSoS_E.exit410
.Ltmp70:
	leaq	48(%rsp), %rdi
	callq	_ZNSt14basic_ofstreamIcSt11char_traitsIcEE5closeEv
.Ltmp71:
# %bb.261:
	movq	g_old(%rip), %rdi
	testq	%rdi, %rdi
	je	.LBB2_263
# %bb.262:
	callq	_ZdaPv
.LBB2_263:
	movq	g_new(%rip), %rdi
	testq	%rdi, %rdi
	je	.LBB2_265
# %bb.264:
	callq	_ZdaPv
.LBB2_265:
	movq	heaters(%rip), %rdi
	testq	%rdi, %rdi
	je	.LBB2_267
# %bb.266:
	callq	_ZdaPv
.LBB2_267:
	movq	d_old(%rip), %rdi
.Ltmp72:
	callq	hipFree
.Ltmp73:
# %bb.268:
	movq	d_new(%rip), %rdi
.Ltmp74:
	callq	hipFree
.Ltmp75:
# %bb.269:
	movq	d_heaters(%rip), %rdi
.Ltmp76:
	callq	hipFree
.Ltmp77:
# %bb.270:
	movq	_ZTTSt14basic_ofstreamIcSt11char_traitsIcEE(%rip), %rax
	leaq	56(%rsp), %rdi
	movq	%rax, -8(%rdi)
	movq	_ZTTSt14basic_ofstreamIcSt11char_traitsIcEE+24(%rip), %rcx
	movq	-24(%rax), %rax
	movq	%rcx, 48(%rsp,%rax)
	callq	_ZNSt13basic_filebufIcSt11char_traitsIcEED2Ev
	leaq	296(%rsp), %rdi
	callq	_ZNSt8ios_baseD2Ev
	leaq	560(%rsp), %rdi
	callq	_ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev
	xorl	%eax, %eax
	addq	$1080, %rsp                     # imm = 0x438
	.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_271:
	.cfi_def_cfa_offset 1136
.Ltmp228:
	movl	$.L.str.7, %edi
	callq	_ZSt24__throw_invalid_argumentPKc
.Ltmp229:
# %bb.272:
.LBB2_273:                              # %.critedge.i.i249
.Ltmp226:
	movl	$.L.str.7, %edi
	callq	_ZSt20__throw_out_of_rangePKc
.Ltmp227:
# %bb.274:
.LBB2_275:
.Ltmp223:
	movl	$.L.str.7, %edi
	callq	_ZSt24__throw_invalid_argumentPKc
.Ltmp224:
# %bb.276:
.LBB2_277:                              # %.critedge.i.i261
.Ltmp221:
	movl	$.L.str.7, %edi
	callq	_ZSt20__throw_out_of_rangePKc
.Ltmp222:
# %bb.278:
.LBB2_279:
.Ltmp218:
	movl	$.L.str.7, %edi
	callq	_ZSt24__throw_invalid_argumentPKc
.Ltmp219:
# %bb.280:
.LBB2_281:                              # %.critedge.i.i275
.Ltmp216:
	movl	$.L.str.7, %edi
	callq	_ZSt20__throw_out_of_rangePKc
.Ltmp217:
# %bb.282:
.LBB2_283:
.Ltmp213:
	movl	$.L.str.7, %edi
	callq	_ZSt24__throw_invalid_argumentPKc
.Ltmp214:
# %bb.284:
.LBB2_285:                              # %.critedge.i.i287
.Ltmp211:
	movl	$.L.str.7, %edi
	callq	_ZSt20__throw_out_of_rangePKc
.Ltmp212:
# %bb.286:
.LBB2_287:
.Ltmp208:
	movl	$.L.str.6, %edi
	callq	_ZSt24__throw_invalid_argumentPKc
.Ltmp209:
# %bb.288:
.LBB2_289:
.Ltmp264:
	movl	$.L.str.6, %edi
	callq	_ZSt24__throw_invalid_argumentPKc
.Ltmp265:
# %bb.290:
.LBB2_291:
.Ltmp256:
	movl	$.L.str.7, %edi
	callq	_ZSt24__throw_invalid_argumentPKc
.Ltmp257:
# %bb.292:
.LBB2_293:                              # %.critedge.i.i177
.Ltmp254:
	movl	$.L.str.7, %edi
	callq	_ZSt20__throw_out_of_rangePKc
.Ltmp255:
# %bb.294:
.LBB2_295:
.Ltmp246:
	movl	$.L.str.7, %edi
	callq	_ZSt24__throw_invalid_argumentPKc
.Ltmp247:
# %bb.296:
.LBB2_297:                              # %.critedge.i.i187
.Ltmp244:
	movl	$.L.str.7, %edi
	callq	_ZSt20__throw_out_of_rangePKc
.Ltmp245:
# %bb.298:
.LBB2_299:
.Ltmp231:
	movl	$.L.str.6, %edi
	callq	_ZSt24__throw_invalid_argumentPKc
.Ltmp232:
# %bb.300:
.LBB2_301:
.Ltmp191:
	movl	$.L.str.7, %edi
	callq	_ZSt24__throw_invalid_argumentPKc
.Ltmp192:
# %bb.302:
.LBB2_303:                              # %.critedge.i.i318
.Ltmp189:
	movl	$.L.str.7, %edi
	callq	_ZSt20__throw_out_of_rangePKc
.Ltmp190:
# %bb.304:
.LBB2_305:                              # %.critedge.i.i342
.Ltmp179:
	movl	$.L.str.7, %edi
	callq	_ZSt20__throw_out_of_rangePKc
.Ltmp180:
# %bb.306:
.LBB2_307:
.Ltmp176:
	movl	$.L.str.7, %edi
	callq	_ZSt24__throw_invalid_argumentPKc
.Ltmp177:
# %bb.308:
.LBB2_309:
.Ltmp171:
	movl	$.L.str.6, %edi
	callq	_ZSt24__throw_invalid_argumentPKc
.Ltmp172:
# %bb.310:
.LBB2_311:
.Ltmp186:
	movl	$.L.str.7, %edi
	callq	_ZSt24__throw_invalid_argumentPKc
.Ltmp187:
# %bb.312:
.LBB2_313:                              # %.critedge.i.i330
.Ltmp184:
	movl	$.L.str.7, %edi
	callq	_ZSt20__throw_out_of_rangePKc
.Ltmp185:
# %bb.314:
.LBB2_315:
.Ltmp181:
	movl	$.L.str.7, %edi
	callq	_ZSt24__throw_invalid_argumentPKc
.Ltmp182:
# %bb.316:
.LBB2_317:                              # %.critedge.i.i354
.Ltmp174:
	movl	$.L.str.7, %edi
	callq	_ZSt20__throw_out_of_rangePKc
.Ltmp175:
# %bb.318:
.LBB2_319:                              # %.critedge.i.i298
.Ltmp206:
	movl	$.L.str.6, %edi
	callq	_ZSt20__throw_out_of_rangePKc
.Ltmp207:
# %bb.320:
.LBB2_321:                              # %.critedge.i.i
.Ltmp86:
	movl	$.L.str.6, %edi
	callq	_ZSt20__throw_out_of_rangePKc
.Ltmp87:
# %bb.322:
.LBB2_323:                              # %.critedge.i.i239
.Ltmp123:
	movl	$.L.str.6, %edi
	callq	_ZSt20__throw_out_of_rangePKc
.Ltmp124:
# %bb.324:
.LBB2_325:                              # %.critedge.i.i365
.Ltmp169:
	movl	$.L.str.6, %edi
	callq	_ZSt20__throw_out_of_rangePKc
.Ltmp170:
# %bb.326:
.LBB2_327:
.Ltmp241:
	movl	$.L.str.7, %edi
	callq	_ZSt24__throw_invalid_argumentPKc
.Ltmp242:
# %bb.328:
.LBB2_329:                              # %.critedge.i.i199
.Ltmp239:
	movl	$.L.str.7, %edi
	callq	_ZSt20__throw_out_of_rangePKc
.Ltmp240:
# %bb.330:
.LBB2_331:
.Ltmp116:
	movl	$.L.str.7, %edi
	callq	_ZSt24__throw_invalid_argumentPKc
.Ltmp117:
# %bb.332:
.LBB2_333:                              # %.critedge.i.i210
.Ltmp114:
	movl	$.L.str.7, %edi
	callq	_ZSt20__throw_out_of_rangePKc
.Ltmp115:
# %bb.334:
.LBB2_335:
.Ltmp111:
	movl	$.L.str.7, %edi
	callq	_ZSt24__throw_invalid_argumentPKc
.Ltmp112:
# %bb.336:
.LBB2_337:                              # %.critedge.i.i219
.Ltmp109:
	movl	$.L.str.7, %edi
	callq	_ZSt20__throw_out_of_rangePKc
.Ltmp110:
# %bb.338:
.LBB2_339:
.Ltmp108:
	jmp	.LBB2_404
.LBB2_340:
.Ltmp105:
	jmp	.LBB2_404
.LBB2_341:
.Ltmp2:
	jmp	.LBB2_342
.LBB2_343:
.Ltmp113:
	movq	%rax, %r14
	movq	(%rsp), %rax                    # 8-byte Reload
	cmpl	$0, (%rax)
	jne	.LBB2_394
# %bb.344:
	movq	(%rsp), %rax                    # 8-byte Reload
	movl	%ebp, (%rax)
	jmp	.LBB2_394
.LBB2_345:
.Ltmp118:
	jmp	.LBB2_392
.LBB2_346:
.Ltmp42:
	jmp	.LBB2_342
.LBB2_347:
.Ltmp243:
	jmp	.LBB2_374
.LBB2_348:
.Ltmp11:
	jmp	.LBB2_342
.LBB2_349:
.Ltmp168:
	jmp	.LBB2_404
.LBB2_350:
.Ltmp159:
	jmp	.LBB2_404
.LBB2_351:
.Ltmp156:
	jmp	.LBB2_404
.LBB2_352:
.Ltmp153:
	jmp	.LBB2_404
.LBB2_353:
.Ltmp150:
	jmp	.LBB2_404
.LBB2_354:
.Ltmp147:
	jmp	.LBB2_404
.LBB2_355:
.Ltmp165:
	jmp	.LBB2_404
.LBB2_356:
.Ltmp162:
	jmp	.LBB2_404
.LBB2_357:
.Ltmp102:
	jmp	.LBB2_404
.LBB2_358:
.Ltmp99:
	jmp	.LBB2_404
.LBB2_359:
.Ltmp81:
	jmp	.LBB2_404
.LBB2_360:
.Ltmp173:
	jmp	.LBB2_374
.LBB2_361:
.Ltmp205:
	jmp	.LBB2_404
.LBB2_362:
.Ltmp202:
	jmp	.LBB2_404
.LBB2_363:
.Ltmp199:
	jmp	.LBB2_404
.LBB2_364:
.Ltmp196:
	jmp	.LBB2_404
.LBB2_365:
.Ltmp233:
	jmp	.LBB2_367
.LBB2_366:
.Ltmp266:
.LBB2_367:
	movq	%rax, %r14
	movq	(%rsp), %rax                    # 8-byte Reload
	cmpl	$0, (%rax)
	jne	.LBB2_405
# %bb.368:
	movq	(%rsp), %rax                    # 8-byte Reload
	movl	%r12d, (%rax)
	jmp	.LBB2_405
.LBB2_369:
.Ltmp178:
	jmp	.LBB2_392
.LBB2_370:
.Ltmp183:
	jmp	.LBB2_392
.LBB2_371:
.Ltmp188:
	jmp	.LBB2_392
.LBB2_372:
.Ltmp193:
	jmp	.LBB2_392
.LBB2_373:
.Ltmp210:
.LBB2_374:
	movq	%rax, %r14
	movq	(%rsp), %rax                    # 8-byte Reload
	cmpl	$0, (%rax)
	jne	.LBB2_405
# %bb.375:
	movq	(%rsp), %rax                    # 8-byte Reload
	movl	%ebp, (%rax)
	jmp	.LBB2_405
.LBB2_376:
.Ltmp78:
	jmp	.LBB2_389
.LBB2_377:
.Ltmp248:
	jmp	.LBB2_392
.LBB2_378:
.Ltmp258:
	movq	%rax, %r14
	movq	(%rsp), %rax                    # 8-byte Reload
	cmpl	$0, (%rax)
	jne	.LBB2_405
# %bb.379:
	movq	(%rsp), %rax                    # 8-byte Reload
	movl	%r13d, (%rax)
	jmp	.LBB2_405
.LBB2_380:
.Ltmp39:
	jmp	.LBB2_342
.LBB2_381:
.Ltmp215:
	jmp	.LBB2_392
.LBB2_382:
.Ltmp220:
	jmp	.LBB2_392
.LBB2_383:                              # %.loopexit.split-lp.loopexit.split-lp
.Ltmp127:
	jmp	.LBB2_404
.LBB2_384:
.Ltmp144:
	jmp	.LBB2_404
.LBB2_385:
.Ltmp141:
	jmp	.LBB2_404
.LBB2_386:
.Ltmp138:
	jmp	.LBB2_404
.LBB2_387:
.Ltmp135:
	jmp	.LBB2_404
.LBB2_388:
.Ltmp69:
.LBB2_389:
	movq	%rax, %r14
	leaq	48(%rsp), %rdi
	callq	_ZNSt14basic_ofstreamIcSt11char_traitsIcEED1Ev
	jmp	.LBB2_407
.LBB2_390:
.Ltmp225:
	jmp	.LBB2_392
.LBB2_391:
.Ltmp230:
.LBB2_392:
	movq	%rax, %r14
	movq	(%rsp), %rax                    # 8-byte Reload
	cmpl	$0, (%rax)
	jne	.LBB2_394
# %bb.393:
	movq	(%rsp), %rax                    # 8-byte Reload
	movl	%r12d, (%rax)
.LBB2_394:                              # %_ZZN9__gnu_cxx6__stoaIlicJiEEET0_PFT_PKT1_PPS3_DpT2_EPKcS5_PmS9_EN11_Save_errnoD2Ev.exit.i.i188
	movq	8(%rsp), %rdi
	leaq	24(%rsp), %rax
	cmpq	%rax, %rdi
	je	.LBB2_405
# %bb.395:                              # %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i204
	callq	_ZdlPv
	jmp	.LBB2_405
.LBB2_396:                              # %.loopexit.split-lp478.loopexit.split-lp.loopexit.split-lp.loopexit.split-lp
.Ltmp96:
	jmp	.LBB2_404
.LBB2_397:
.Ltmp36:
.LBB2_342:
	movq	%rax, %r14
	jmp	.LBB2_407
.LBB2_398:                              # %.loopexit472
.Ltmp132:
	jmp	.LBB2_404
.LBB2_399:                              # %.loopexit.split-lp.loopexit
.Ltmp238:
	jmp	.LBB2_404
.LBB2_400:                              # %.loopexit477
.Ltmp253:
	jmp	.LBB2_404
.LBB2_401:                              # %.loopexit.split-lp478.loopexit
.Ltmp263:
	jmp	.LBB2_404
.LBB2_402:                              # %.loopexit.split-lp478.loopexit.split-lp.loopexit
.Ltmp271:
	jmp	.LBB2_404
.LBB2_403:                              # %.loopexit.split-lp478.loopexit.split-lp.loopexit.split-lp.loopexit
.Ltmp276:
.LBB2_404:                              # %.body
	movq	%rax, %r14
.LBB2_405:                              # %.body
	movq	48(%rsp), %rdi
	leaq	64(%rsp), %rax
	cmpq	%rax, %rdi
	je	.LBB2_407
# %bb.406:                              # %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i385
	callq	_ZdlPv
.LBB2_407:
	leaq	560(%rsp), %rdi
	callq	_ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev
	movq	%r14, %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:
.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 .Lfunc_begin0-.Lfunc_begin0    # >> Call Site 1 <<
	.uleb128 .Ltmp3-.Lfunc_begin0           #   Call between .Lfunc_begin0 and .Ltmp3
	.byte	0                               #     has no landing pad
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp3-.Lfunc_begin0           # >> Call Site 2 <<
	.uleb128 .Ltmp6-.Ltmp3                  #   Call between .Ltmp3 and .Ltmp6
	.uleb128 .Ltmp96-.Lfunc_begin0          #     jumps to .Ltmp96
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp272-.Lfunc_begin0         # >> Call Site 3 <<
	.uleb128 .Ltmp275-.Ltmp272              #   Call between .Ltmp272 and .Ltmp275
	.uleb128 .Ltmp276-.Lfunc_begin0         #     jumps to .Ltmp276
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp79-.Lfunc_begin0          # >> Call Site 4 <<
	.uleb128 .Ltmp80-.Ltmp79                #   Call between .Ltmp79 and .Ltmp80
	.uleb128 .Ltmp81-.Lfunc_begin0          #     jumps to .Ltmp81
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp82-.Lfunc_begin0          # >> Call Site 5 <<
	.uleb128 .Ltmp85-.Ltmp82                #   Call between .Ltmp82 and .Ltmp85
	.uleb128 .Ltmp96-.Lfunc_begin0          #     jumps to .Ltmp96
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp267-.Lfunc_begin0         # >> Call Site 6 <<
	.uleb128 .Ltmp270-.Ltmp267              #   Call between .Ltmp267 and .Ltmp270
	.uleb128 .Ltmp271-.Lfunc_begin0         #     jumps to .Ltmp271
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp88-.Lfunc_begin0          # >> Call Site 7 <<
	.uleb128 .Ltmp91-.Ltmp88                #   Call between .Ltmp88 and .Ltmp91
	.uleb128 .Ltmp96-.Lfunc_begin0          #     jumps to .Ltmp96
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp259-.Lfunc_begin0         # >> Call Site 8 <<
	.uleb128 .Ltmp262-.Ltmp259              #   Call between .Ltmp259 and .Ltmp262
	.uleb128 .Ltmp263-.Lfunc_begin0         #     jumps to .Ltmp263
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp92-.Lfunc_begin0          # >> Call Site 9 <<
	.uleb128 .Ltmp95-.Ltmp92                #   Call between .Ltmp92 and .Ltmp95
	.uleb128 .Ltmp96-.Lfunc_begin0          #     jumps to .Ltmp96
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp249-.Lfunc_begin0         # >> Call Site 10 <<
	.uleb128 .Ltmp252-.Ltmp249              #   Call between .Ltmp249 and .Ltmp252
	.uleb128 .Ltmp253-.Lfunc_begin0         #     jumps to .Ltmp253
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp97-.Lfunc_begin0          # >> Call Site 11 <<
	.uleb128 .Ltmp98-.Ltmp97                #   Call between .Ltmp97 and .Ltmp98
	.uleb128 .Ltmp99-.Lfunc_begin0          #     jumps to .Ltmp99
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp100-.Lfunc_begin0         # >> Call Site 12 <<
	.uleb128 .Ltmp101-.Ltmp100              #   Call between .Ltmp100 and .Ltmp101
	.uleb128 .Ltmp102-.Lfunc_begin0         #     jumps to .Ltmp102
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp103-.Lfunc_begin0         # >> Call Site 13 <<
	.uleb128 .Ltmp104-.Ltmp103              #   Call between .Ltmp103 and .Ltmp104
	.uleb128 .Ltmp105-.Lfunc_begin0         #     jumps to .Ltmp105
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp106-.Lfunc_begin0         # >> Call Site 14 <<
	.uleb128 .Ltmp107-.Ltmp106              #   Call between .Ltmp106 and .Ltmp107
	.uleb128 .Ltmp108-.Lfunc_begin0         #     jumps to .Ltmp108
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp119-.Lfunc_begin0         # >> Call Site 15 <<
	.uleb128 .Ltmp122-.Ltmp119              #   Call between .Ltmp119 and .Ltmp122
	.uleb128 .Ltmp127-.Lfunc_begin0         #     jumps to .Ltmp127
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp234-.Lfunc_begin0         # >> Call Site 16 <<
	.uleb128 .Ltmp237-.Ltmp234              #   Call between .Ltmp234 and .Ltmp237
	.uleb128 .Ltmp238-.Lfunc_begin0         #     jumps to .Ltmp238
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp125-.Lfunc_begin0         # >> Call Site 17 <<
	.uleb128 .Ltmp126-.Ltmp125              #   Call between .Ltmp125 and .Ltmp126
	.uleb128 .Ltmp127-.Lfunc_begin0         #     jumps to .Ltmp127
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp126-.Lfunc_begin0         # >> Call Site 18 <<
	.uleb128 .Ltmp133-.Ltmp126              #   Call between .Ltmp126 and .Ltmp133
	.byte	0                               #     has no landing pad
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp133-.Lfunc_begin0         # >> Call Site 19 <<
	.uleb128 .Ltmp134-.Ltmp133              #   Call between .Ltmp133 and .Ltmp134
	.uleb128 .Ltmp135-.Lfunc_begin0         #     jumps to .Ltmp135
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp136-.Lfunc_begin0         # >> Call Site 20 <<
	.uleb128 .Ltmp137-.Ltmp136              #   Call between .Ltmp136 and .Ltmp137
	.uleb128 .Ltmp138-.Lfunc_begin0         #     jumps to .Ltmp138
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp139-.Lfunc_begin0         # >> Call Site 21 <<
	.uleb128 .Ltmp140-.Ltmp139              #   Call between .Ltmp139 and .Ltmp140
	.uleb128 .Ltmp141-.Lfunc_begin0         #     jumps to .Ltmp141
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp142-.Lfunc_begin0         # >> Call Site 22 <<
	.uleb128 .Ltmp143-.Ltmp142              #   Call between .Ltmp142 and .Ltmp143
	.uleb128 .Ltmp144-.Lfunc_begin0         #     jumps to .Ltmp144
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp145-.Lfunc_begin0         # >> Call Site 23 <<
	.uleb128 .Ltmp146-.Ltmp145              #   Call between .Ltmp145 and .Ltmp146
	.uleb128 .Ltmp147-.Lfunc_begin0         #     jumps to .Ltmp147
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp148-.Lfunc_begin0         # >> Call Site 24 <<
	.uleb128 .Ltmp149-.Ltmp148              #   Call between .Ltmp148 and .Ltmp149
	.uleb128 .Ltmp150-.Lfunc_begin0         #     jumps to .Ltmp150
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp151-.Lfunc_begin0         # >> Call Site 25 <<
	.uleb128 .Ltmp152-.Ltmp151              #   Call between .Ltmp151 and .Ltmp152
	.uleb128 .Ltmp153-.Lfunc_begin0         #     jumps to .Ltmp153
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp154-.Lfunc_begin0         # >> Call Site 26 <<
	.uleb128 .Ltmp155-.Ltmp154              #   Call between .Ltmp154 and .Ltmp155
	.uleb128 .Ltmp156-.Lfunc_begin0         #     jumps to .Ltmp156
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp157-.Lfunc_begin0         # >> Call Site 27 <<
	.uleb128 .Ltmp158-.Ltmp157              #   Call between .Ltmp157 and .Ltmp158
	.uleb128 .Ltmp159-.Lfunc_begin0         #     jumps to .Ltmp159
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp160-.Lfunc_begin0         # >> Call Site 28 <<
	.uleb128 .Ltmp161-.Ltmp160              #   Call between .Ltmp160 and .Ltmp161
	.uleb128 .Ltmp162-.Lfunc_begin0         #     jumps to .Ltmp162
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp163-.Lfunc_begin0         # >> Call Site 29 <<
	.uleb128 .Ltmp164-.Ltmp163              #   Call between .Ltmp163 and .Ltmp164
	.uleb128 .Ltmp165-.Lfunc_begin0         #     jumps to .Ltmp165
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp166-.Lfunc_begin0         # >> Call Site 30 <<
	.uleb128 .Ltmp167-.Ltmp166              #   Call between .Ltmp166 and .Ltmp167
	.uleb128 .Ltmp168-.Lfunc_begin0         #     jumps to .Ltmp168
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp194-.Lfunc_begin0         # >> Call Site 31 <<
	.uleb128 .Ltmp195-.Ltmp194              #   Call between .Ltmp194 and .Ltmp195
	.uleb128 .Ltmp196-.Lfunc_begin0         #     jumps to .Ltmp196
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp197-.Lfunc_begin0         # >> Call Site 32 <<
	.uleb128 .Ltmp198-.Ltmp197              #   Call between .Ltmp197 and .Ltmp198
	.uleb128 .Ltmp199-.Lfunc_begin0         #     jumps to .Ltmp199
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp200-.Lfunc_begin0         # >> Call Site 33 <<
	.uleb128 .Ltmp201-.Ltmp200              #   Call between .Ltmp200 and .Ltmp201
	.uleb128 .Ltmp202-.Lfunc_begin0         #     jumps to .Ltmp202
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp203-.Lfunc_begin0         # >> Call Site 34 <<
	.uleb128 .Ltmp204-.Ltmp203              #   Call between .Ltmp203 and .Ltmp204
	.uleb128 .Ltmp205-.Lfunc_begin0         #     jumps to .Ltmp205
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp128-.Lfunc_begin0         # >> Call Site 35 <<
	.uleb128 .Ltmp131-.Ltmp128              #   Call between .Ltmp128 and .Ltmp131
	.uleb128 .Ltmp132-.Lfunc_begin0         #     jumps to .Ltmp132
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp0-.Lfunc_begin0           # >> Call Site 36 <<
	.uleb128 .Ltmp1-.Ltmp0                  #   Call between .Ltmp0 and .Ltmp1
	.uleb128 .Ltmp2-.Lfunc_begin0           #     jumps to .Ltmp2
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp7-.Lfunc_begin0           # >> Call Site 37 <<
	.uleb128 .Ltmp10-.Ltmp7                 #   Call between .Ltmp7 and .Ltmp10
	.uleb128 .Ltmp11-.Lfunc_begin0          #     jumps to .Ltmp11
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp10-.Lfunc_begin0          # >> Call Site 38 <<
	.uleb128 .Ltmp12-.Ltmp10                #   Call between .Ltmp10 and .Ltmp12
	.byte	0                               #     has no landing pad
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp12-.Lfunc_begin0          # >> Call Site 39 <<
	.uleb128 .Ltmp23-.Ltmp12                #   Call between .Ltmp12 and .Ltmp23
	.uleb128 .Ltmp39-.Lfunc_begin0          #     jumps to .Ltmp39
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp24-.Lfunc_begin0          # >> Call Site 40 <<
	.uleb128 .Ltmp35-.Ltmp24                #   Call between .Ltmp24 and .Ltmp35
	.uleb128 .Ltmp36-.Lfunc_begin0          #     jumps to .Ltmp36
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp37-.Lfunc_begin0          # >> Call Site 41 <<
	.uleb128 .Ltmp38-.Ltmp37                #   Call between .Ltmp37 and .Ltmp38
	.uleb128 .Ltmp39-.Lfunc_begin0          #     jumps to .Ltmp39
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp40-.Lfunc_begin0          # >> Call Site 42 <<
	.uleb128 .Ltmp41-.Ltmp40                #   Call between .Ltmp40 and .Ltmp41
	.uleb128 .Ltmp42-.Lfunc_begin0          #     jumps to .Ltmp42
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp55-.Lfunc_begin0          # >> Call Site 43 <<
	.uleb128 .Ltmp68-.Ltmp55                #   Call between .Ltmp55 and .Ltmp68
	.uleb128 .Ltmp69-.Lfunc_begin0          #     jumps to .Ltmp69
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp43-.Lfunc_begin0          # >> Call Site 44 <<
	.uleb128 .Ltmp77-.Ltmp43                #   Call between .Ltmp43 and .Ltmp77
	.uleb128 .Ltmp78-.Lfunc_begin0          #     jumps to .Ltmp78
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp228-.Lfunc_begin0         # >> Call Site 45 <<
	.uleb128 .Ltmp227-.Ltmp228              #   Call between .Ltmp228 and .Ltmp227
	.uleb128 .Ltmp230-.Lfunc_begin0         #     jumps to .Ltmp230
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp223-.Lfunc_begin0         # >> Call Site 46 <<
	.uleb128 .Ltmp222-.Ltmp223              #   Call between .Ltmp223 and .Ltmp222
	.uleb128 .Ltmp225-.Lfunc_begin0         #     jumps to .Ltmp225
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp218-.Lfunc_begin0         # >> Call Site 47 <<
	.uleb128 .Ltmp217-.Ltmp218              #   Call between .Ltmp218 and .Ltmp217
	.uleb128 .Ltmp220-.Lfunc_begin0         #     jumps to .Ltmp220
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp213-.Lfunc_begin0         # >> Call Site 48 <<
	.uleb128 .Ltmp212-.Ltmp213              #   Call between .Ltmp213 and .Ltmp212
	.uleb128 .Ltmp215-.Lfunc_begin0         #     jumps to .Ltmp215
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp208-.Lfunc_begin0         # >> Call Site 49 <<
	.uleb128 .Ltmp209-.Ltmp208              #   Call between .Ltmp208 and .Ltmp209
	.uleb128 .Ltmp210-.Lfunc_begin0         #     jumps to .Ltmp210
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp264-.Lfunc_begin0         # >> Call Site 50 <<
	.uleb128 .Ltmp265-.Ltmp264              #   Call between .Ltmp264 and .Ltmp265
	.uleb128 .Ltmp266-.Lfunc_begin0         #     jumps to .Ltmp266
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp256-.Lfunc_begin0         # >> Call Site 51 <<
	.uleb128 .Ltmp255-.Ltmp256              #   Call between .Ltmp256 and .Ltmp255
	.uleb128 .Ltmp258-.Lfunc_begin0         #     jumps to .Ltmp258
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp246-.Lfunc_begin0         # >> Call Site 52 <<
	.uleb128 .Ltmp245-.Ltmp246              #   Call between .Ltmp246 and .Ltmp245
	.uleb128 .Ltmp248-.Lfunc_begin0         #     jumps to .Ltmp248
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp231-.Lfunc_begin0         # >> Call Site 53 <<
	.uleb128 .Ltmp232-.Ltmp231              #   Call between .Ltmp231 and .Ltmp232
	.uleb128 .Ltmp233-.Lfunc_begin0         #     jumps to .Ltmp233
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp191-.Lfunc_begin0         # >> Call Site 54 <<
	.uleb128 .Ltmp190-.Ltmp191              #   Call between .Ltmp191 and .Ltmp190
	.uleb128 .Ltmp193-.Lfunc_begin0         #     jumps to .Ltmp193
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp179-.Lfunc_begin0         # >> Call Site 55 <<
	.uleb128 .Ltmp180-.Ltmp179              #   Call between .Ltmp179 and .Ltmp180
	.uleb128 .Ltmp183-.Lfunc_begin0         #     jumps to .Ltmp183
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp176-.Lfunc_begin0         # >> Call Site 56 <<
	.uleb128 .Ltmp177-.Ltmp176              #   Call between .Ltmp176 and .Ltmp177
	.uleb128 .Ltmp178-.Lfunc_begin0         #     jumps to .Ltmp178
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp171-.Lfunc_begin0         # >> Call Site 57 <<
	.uleb128 .Ltmp172-.Ltmp171              #   Call between .Ltmp171 and .Ltmp172
	.uleb128 .Ltmp173-.Lfunc_begin0         #     jumps to .Ltmp173
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp186-.Lfunc_begin0         # >> Call Site 58 <<
	.uleb128 .Ltmp185-.Ltmp186              #   Call between .Ltmp186 and .Ltmp185
	.uleb128 .Ltmp188-.Lfunc_begin0         #     jumps to .Ltmp188
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp181-.Lfunc_begin0         # >> Call Site 59 <<
	.uleb128 .Ltmp182-.Ltmp181              #   Call between .Ltmp181 and .Ltmp182
	.uleb128 .Ltmp183-.Lfunc_begin0         #     jumps to .Ltmp183
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp174-.Lfunc_begin0         # >> Call Site 60 <<
	.uleb128 .Ltmp175-.Ltmp174              #   Call between .Ltmp174 and .Ltmp175
	.uleb128 .Ltmp178-.Lfunc_begin0         #     jumps to .Ltmp178
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp206-.Lfunc_begin0         # >> Call Site 61 <<
	.uleb128 .Ltmp207-.Ltmp206              #   Call between .Ltmp206 and .Ltmp207
	.uleb128 .Ltmp210-.Lfunc_begin0         #     jumps to .Ltmp210
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp86-.Lfunc_begin0          # >> Call Site 62 <<
	.uleb128 .Ltmp87-.Ltmp86                #   Call between .Ltmp86 and .Ltmp87
	.uleb128 .Ltmp266-.Lfunc_begin0         #     jumps to .Ltmp266
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp123-.Lfunc_begin0         # >> Call Site 63 <<
	.uleb128 .Ltmp124-.Ltmp123              #   Call between .Ltmp123 and .Ltmp124
	.uleb128 .Ltmp233-.Lfunc_begin0         #     jumps to .Ltmp233
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp169-.Lfunc_begin0         # >> Call Site 64 <<
	.uleb128 .Ltmp170-.Ltmp169              #   Call between .Ltmp169 and .Ltmp170
	.uleb128 .Ltmp173-.Lfunc_begin0         #     jumps to .Ltmp173
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp241-.Lfunc_begin0         # >> Call Site 65 <<
	.uleb128 .Ltmp240-.Ltmp241              #   Call between .Ltmp241 and .Ltmp240
	.uleb128 .Ltmp243-.Lfunc_begin0         #     jumps to .Ltmp243
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp116-.Lfunc_begin0         # >> Call Site 66 <<
	.uleb128 .Ltmp115-.Ltmp116              #   Call between .Ltmp116 and .Ltmp115
	.uleb128 .Ltmp118-.Lfunc_begin0         #     jumps to .Ltmp118
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp111-.Lfunc_begin0         # >> Call Site 67 <<
	.uleb128 .Ltmp110-.Ltmp111              #   Call between .Ltmp111 and .Ltmp110
	.uleb128 .Ltmp113-.Lfunc_begin0         #     jumps to .Ltmp113
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp110-.Lfunc_begin0         # >> Call Site 68 <<
	.uleb128 .Lfunc_end2-.Ltmp110           #   Call between .Ltmp110 and .Lfunc_end2
	.byte	0                               #     has no landing pad
	.byte	0                               #   On action: cleanup
.Lcst_end0:
	.p2align	2, 0x0
                                        # -- End function
	.section	.text.startup,"ax",@progbits
	.type	_GLOBAL__sub_I_heat2D3D.hip,@function # -- Begin function _GLOBAL__sub_I_heat2D3D.hip
_GLOBAL__sub_I_heat2D3D.hip:            # @_GLOBAL__sub_I_heat2D3D.hip
	.cfi_startproc
# %bb.0:
	movq	$_Z9dimensionB5cxx11+16, _Z9dimensionB5cxx11(%rip)
	movq	$0, _Z9dimensionB5cxx11+8(%rip)
	movb	$0, _Z9dimensionB5cxx11+16(%rip)
	movl	$_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev, %edi
	movl	$_Z9dimensionB5cxx11, %esi
	movl	$__dso_handle, %edx
	jmp	__cxa_atexit                    # TAILCALL
.Lfunc_end3:
	.size	_GLOBAL__sub_I_heat2D3D.hip, .Lfunc_end3-_GLOBAL__sub_I_heat2D3D.hip
	.cfi_endproc
                                        # -- End function
	.text
	.p2align	4, 0x90                         # -- Begin function __hip_module_ctor
	.type	__hip_module_ctor,@function
__hip_module_ctor:                      # @__hip_module_ctor
	.cfi_startproc
# %bb.0:
	pushq	%rbx
	.cfi_def_cfa_offset 16
	subq	$32, %rsp
	.cfi_def_cfa_offset 48
	.cfi_offset %rbx, -16
	movq	__hip_gpubin_handle(%rip), %rbx
	testq	%rbx, %rbx
	jne	.LBB4_2
# %bb.1:
	movl	$__hip_fatbin_wrapper, %edi
	callq	__hipRegisterFatBinary
	movq	%rax, %rbx
	movq	%rax, __hip_gpubin_handle(%rip)
.LBB4_2:
	xorps	%xmm0, %xmm0
	movups	%xmm0, 16(%rsp)
	movups	%xmm0, (%rsp)
	movl	$_Z8heat_simPfS_S_iiif, %esi
	movl	$.L__unnamed_1, %edx
	movl	$.L__unnamed_1, %ecx
	movq	%rbx, %rdi
	movl	$-1, %r8d
	xorl	%r9d, %r9d
	callq	__hipRegisterFunction
	xorps	%xmm0, %xmm0
	movups	%xmm0, 16(%rsp)
	movups	%xmm0, (%rsp)
	movl	$_Z8grid_cpyPfS_i, %esi
	movl	$.L__unnamed_2, %edx
	movl	$.L__unnamed_2, %ecx
	movq	%rbx, %rdi
	movl	$-1, %r8d
	xorl	%r9d, %r9d
	callq	__hipRegisterFunction
	movl	$__hip_module_dtor, %edi
	addq	$32, %rsp
	.cfi_def_cfa_offset 16
	popq	%rbx
	.cfi_def_cfa_offset 8
	jmp	atexit                          # TAILCALL
.Lfunc_end4:
	.size	__hip_module_ctor, .Lfunc_end4-__hip_module_ctor
	.cfi_endproc
                                        # -- End function
	.p2align	4, 0x90                         # -- Begin function __hip_module_dtor
	.type	__hip_module_dtor,@function
__hip_module_dtor:                      # @__hip_module_dtor
	.cfi_startproc
# %bb.0:
	movq	__hip_gpubin_handle(%rip), %rdi
	testq	%rdi, %rdi
	je	.LBB5_2
# %bb.1:
	pushq	%rax
	.cfi_def_cfa_offset 16
	callq	__hipUnregisterFatBinary
	movq	$0, __hip_gpubin_handle(%rip)
	addq	$8, %rsp
	.cfi_def_cfa_offset 8
.LBB5_2:
	retq
.Lfunc_end5:
	.size	__hip_module_dtor, .Lfunc_end5-__hip_module_dtor
	.cfi_endproc
                                        # -- End function
	.type	_Z9dimensionB5cxx11,@object     # @_Z9dimensionB5cxx11
	.bss
	.globl	_Z9dimensionB5cxx11
	.p2align	3, 0x0
_Z9dimensionB5cxx11:
	.zero	32
	.size	_Z9dimensionB5cxx11, 32

	.hidden	__dso_handle
	.type	k,@object                       # @k
	.globl	k
	.p2align	2, 0x0
k:
	.long	0x00000000                      # float 0
	.size	k, 4

	.type	timesteps,@object               # @timesteps
	.globl	timesteps
	.p2align	2, 0x0
timesteps:
	.long	0                               # 0x0
	.size	timesteps, 4

	.type	width,@object                   # @width
	.globl	width
	.p2align	2, 0x0
width:
	.long	0                               # 0x0
	.size	width, 4

	.type	height,@object                  # @height
	.globl	height
	.p2align	2, 0x0
height:
	.long	0                               # 0x0
	.size	height, 4

	.type	depth,@object                   # @depth
	.globl	depth
	.p2align	2, 0x0
depth:
	.long	0                               # 0x0
	.size	depth, 4

	.type	startTemp,@object               # @startTemp
	.globl	startTemp
	.p2align	2, 0x0
startTemp:
	.long	0x00000000                      # float 0
	.size	startTemp, 4

	.type	fixedTemp,@object               # @fixedTemp
	.globl	fixedTemp
	.p2align	2, 0x0
fixedTemp:
	.long	0x00000000                      # float 0
	.size	fixedTemp, 4

	.type	heat_x,@object                  # @heat_x
	.globl	heat_x
	.p2align	2, 0x0
heat_x:
	.long	0                               # 0x0
	.size	heat_x, 4

	.type	heat_y,@object                  # @heat_y
	.globl	heat_y
	.p2align	2, 0x0
heat_y:
	.long	0                               # 0x0
	.size	heat_y, 4

	.type	heat_z,@object                  # @heat_z
	.globl	heat_z
	.p2align	2, 0x0
heat_z:
	.long	0                               # 0x0
	.size	heat_z, 4

	.type	heat_w,@object                  # @heat_w
	.globl	heat_w
	.p2align	2, 0x0
heat_w:
	.long	0                               # 0x0
	.size	heat_w, 4

	.type	heat_h,@object                  # @heat_h
	.globl	heat_h
	.p2align	2, 0x0
heat_h:
	.long	0                               # 0x0
	.size	heat_h, 4

	.type	heat_d,@object                  # @heat_d
	.globl	heat_d
	.p2align	2, 0x0
heat_d:
	.long	0                               # 0x0
	.size	heat_d, 4

	.type	d_old,@object                   # @d_old
	.globl	d_old
	.p2align	3, 0x0
d_old:
	.quad	0
	.size	d_old, 8

	.type	d_new,@object                   # @d_new
	.globl	d_new
	.p2align	3, 0x0
d_new:
	.quad	0
	.size	d_new, 8

	.type	d_heaters,@object               # @d_heaters
	.globl	d_heaters
	.p2align	3, 0x0
d_heaters:
	.quad	0
	.size	d_heaters, 8

	.type	g_old,@object                   # @g_old
	.globl	g_old
	.p2align	3, 0x0
g_old:
	.quad	0
	.size	g_old, 8

	.type	g_new,@object                   # @g_new
	.globl	g_new
	.p2align	3, 0x0
g_new:
	.quad	0
	.size	g_new, 8

	.type	heaters,@object                 # @heaters
	.globl	heaters
	.p2align	3, 0x0
heaters:
	.quad	0
	.size	heaters, 8

	.type	_Z8heat_simPfS_S_iiif,@object   # @_Z8heat_simPfS_S_iiif
	.section	.rodata,"a",@progbits
	.globl	_Z8heat_simPfS_S_iiif
	.p2align	3, 0x0
_Z8heat_simPfS_S_iiif:
	.quad	_Z23__device_stub__heat_simPfS_S_iiif
	.size	_Z8heat_simPfS_S_iiif, 8

	.type	_Z8grid_cpyPfS_i,@object        # @_Z8grid_cpyPfS_i
	.globl	_Z8grid_cpyPfS_i
	.p2align	3, 0x0
_Z8grid_cpyPfS_i:
	.quad	_Z23__device_stub__grid_cpyPfS_i
	.size	_Z8grid_cpyPfS_i, 8

	.type	.L.str,@object                  # @.str
	.section	.rodata.str1.1,"aMS",@progbits,1
.L.str:
	.asciz	"2D"
	.size	.L.str, 3

	.type	.L.str.1,@object                # @.str.1
.L.str.1:
	.asciz	"3D"
	.size	.L.str.1, 3

	.type	.L.str.2,@object                # @.str.2
.L.str.2:
	.asciz	"Couldn't open config file."
	.size	.L.str.2, 27

	.type	.L.str.3,@object                # @.str.3
.L.str.3:
	.asciz	"../heatOutput.csv"
	.size	.L.str.3, 18

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

	.type	.L.str.5,@object                # @.str.5
.L.str.5:
	.asciz	"Unable to open file, try again."
	.size	.L.str.5, 32

	.type	.L.str.6,@object                # @.str.6
.L.str.6:
	.asciz	"stof"
	.size	.L.str.6, 5

	.type	.L.str.7,@object                # @.str.7
.L.str.7:
	.asciz	"stoi"
	.size	.L.str.7, 5

	.type	.L__unnamed_1,@object           # @0
.L__unnamed_1:
	.asciz	"_Z8heat_simPfS_S_iiif"
	.size	.L__unnamed_1, 22

	.type	.L__unnamed_2,@object           # @1
.L__unnamed_2:
	.asciz	"_Z8grid_cpyPfS_i"
	.size	.L__unnamed_2, 17

	.type	__hip_fatbin_wrapper,@object    # @__hip_fatbin_wrapper
	.section	.hipFatBinSegment,"a",@progbits
	.p2align	3, 0x0
__hip_fatbin_wrapper:
	.long	1212764230                      # 0x48495046
	.long	1                               # 0x1
	.quad	__hip_fatbin
	.quad	0
	.size	__hip_fatbin_wrapper, 24

	.type	__hip_gpubin_handle,@object     # @__hip_gpubin_handle
	.local	__hip_gpubin_handle
	.comm	__hip_gpubin_handle,8,8
	.section	.init_array,"aw",@init_array
	.p2align	3, 0x0
	.quad	_GLOBAL__sub_I_heat2D3D.hip
	.quad	__hip_module_ctor
	.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 _Z23__device_stub__heat_simPfS_S_iiif
	.addrsig_sym _Z23__device_stub__grid_cpyPfS_i
	.addrsig_sym __gxx_personality_v0
	.addrsig_sym _GLOBAL__sub_I_heat2D3D.hip
	.addrsig_sym __hip_module_ctor
	.addrsig_sym __hip_module_dtor
	.addrsig_sym _Unwind_Resume
	.addrsig_sym _Z9dimensionB5cxx11
	.addrsig_sym __dso_handle
	.addrsig_sym d_old
	.addrsig_sym d_new
	.addrsig_sym d_heaters
	.addrsig_sym _Z8heat_simPfS_S_iiif
	.addrsig_sym _Z8grid_cpyPfS_i
	.addrsig_sym _ZSt4cerr
	.addrsig_sym _ZSt4cout
	.addrsig_sym __hip_fatbin
	.addrsig_sym __hip_fatbin_wrapper
	.addrsig_sym __hip_cuid_

	.text
	.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
	.protected	_Z8heat_simPfS_S_iiif   ; -- Begin function _Z8heat_simPfS_S_iiif
	.globl	_Z8heat_simPfS_S_iiif
	.p2align	8
	.type	_Z8heat_simPfS_S_iiif,@function
_Z8heat_simPfS_S_iiif:                  ; @_Z8heat_simPfS_S_iiif
; %bb.0:
	s_clause 0x1
	s_load_b32 s2, s[0:1], 0x34
	s_load_b128 s[4:7], s[0:1], 0x18
	s_waitcnt lgkmcnt(0)
	s_and_b32 s2, s2, 0xffff
	s_mul_i32 s8, s5, s4
	v_mad_u64_u32 v[2:3], null, s15, s2, v[0:1]
	s_mul_i32 s11, s8, s6
	s_mov_b32 s2, exec_lo
	s_delay_alu instid0(VALU_DEP_1)
	v_cmpx_gt_i32_e64 s11, v2
	s_cbranch_execz .LBB0_20
; %bb.1:
	s_load_b64 s[2:3], s[0:1], 0x10
	v_ashrrev_i32_e32 v3, 31, v2
	s_mov_b32 s10, exec_lo
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(VALU_DEP_1)
	v_lshlrev_b64 v[0:1], 2, v[2:3]
	s_waitcnt lgkmcnt(0)
	v_add_co_u32 v3, vcc_lo, s2, v0
	s_delay_alu instid0(VALU_DEP_2)
	v_add_co_ci_u32_e32 v4, vcc_lo, s3, v1, vcc_lo
	s_load_b128 s[0:3], s[0:1], 0x0
	global_load_b32 v3, v[3:4], off
	s_waitcnt vmcnt(0)
	v_cmpx_eq_f32_e32 0, v3
	s_cbranch_execz .LBB0_19
; %bb.2:
	s_waitcnt lgkmcnt(0)
	v_add_co_u32 v3, vcc_lo, s0, v0
	v_add_co_ci_u32_e32 v4, vcc_lo, s1, v1, vcc_lo
	s_ashr_i32 s5, s4, 31
	v_ashrrev_i32_e32 v8, 31, v2
	s_add_i32 s9, s4, s5
	global_load_b32 v5, v[3:4], off
	s_xor_b32 s9, s9, s5
	s_delay_alu instid0(SALU_CYCLE_1) | instskip(SKIP_2) | instid1(VALU_DEP_2)
	v_cvt_f32_u32_e32 v6, s9
	s_sub_i32 s12, 0, s9
	v_add_nc_u32_e32 v9, v2, v8
	v_rcp_iflag_f32_e32 v6, v6
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_2) | instid1(VALU_DEP_1)
	v_xor_b32_e32 v9, v9, v8
	s_waitcnt_depctr 0xfff
	v_mul_f32_e32 v6, 0x4f7ffffe, v6
	v_cvt_u32_f32_e32 v6, v6
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_mul_lo_u32 v7, s12, v6
	v_mul_hi_u32 v7, v6, v7
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_add_nc_u32_e32 v6, v6, v7
	v_mul_hi_u32 v6, v9, v6
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_mul_lo_u32 v6, v6, s9
	v_sub_nc_u32_e32 v6, v9, v6
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(VALU_DEP_2)
	v_subrev_nc_u32_e32 v7, s9, v6
	v_cmp_le_u32_e32 vcc_lo, s9, v6
	v_cndmask_b32_e32 v6, v6, v7, vcc_lo
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_2) | instid1(VALU_DEP_2)
	v_subrev_nc_u32_e32 v7, s9, v6
	v_cmp_le_u32_e32 vcc_lo, s9, v6
	s_mov_b32 s9, exec_lo
	v_cndmask_b32_e32 v6, v6, v7, vcc_lo
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_xor_b32_e32 v6, v6, v8
	v_sub_nc_u32_e32 v7, v6, v8
	s_waitcnt vmcnt(0)
	v_mov_b32_e32 v6, v5
	s_delay_alu instid0(VALU_DEP_2)
	v_cmpx_ne_u32_e32 0, v7
	s_cbranch_execz .LBB0_4
; %bb.3:
	global_load_b32 v6, v[3:4], off offset:-4
.LBB0_4:
	s_or_b32 exec_lo, exec_lo, s9
	s_add_i32 s9, s4, -1
	s_delay_alu instid0(SALU_CYCLE_1)
	v_cmp_ne_u32_e32 vcc_lo, s9, v7
	v_mov_b32_e32 v7, v5
	s_and_saveexec_b32 s9, vcc_lo
	s_cbranch_execz .LBB0_6
; %bb.5:
	global_load_b32 v7, v[3:4], off offset:4
.LBB0_6:
	s_or_b32 exec_lo, exec_lo, s9
	s_ashr_i32 s9, s8, 31
	s_delay_alu instid0(SALU_CYCLE_1) | instskip(NEXT) | instid1(SALU_CYCLE_1)
	s_add_i32 s12, s8, s9
	s_xor_b32 s12, s12, s9
	s_delay_alu instid0(SALU_CYCLE_1) | instskip(SKIP_1) | instid1(VALU_DEP_1)
	v_cvt_f32_u32_e32 v10, s12
	s_sub_i32 s13, 0, s12
	v_rcp_iflag_f32_e32 v10, v10
	s_waitcnt_depctr 0xfff
	v_mul_f32_e32 v10, 0x4f7ffffe, v10
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_cvt_u32_f32_e32 v10, v10
	v_mul_lo_u32 v11, s13, v10
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_mul_hi_u32 v11, v10, v11
	v_add_nc_u32_e32 v10, v10, v11
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_mul_hi_u32 v10, v9, v10
	v_mul_lo_u32 v10, v10, s12
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_sub_nc_u32_e32 v9, v9, v10
	v_subrev_nc_u32_e32 v10, s12, v9
	v_cmp_le_u32_e32 vcc_lo, s12, v9
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_cndmask_b32_e32 v9, v9, v10, vcc_lo
	v_subrev_nc_u32_e32 v10, s12, v9
	v_cmp_le_u32_e32 vcc_lo, s12, v9
	s_mov_b32 s12, exec_lo
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_cndmask_b32_e32 v9, v9, v10, vcc_lo
	v_xor_b32_e32 v9, v9, v8
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(VALU_DEP_2)
	v_sub_nc_u32_e32 v9, v9, v8
	v_mov_b32_e32 v8, v5
	v_cmpx_le_i32_e64 s4, v9
	s_cbranch_execz .LBB0_8
; %bb.7:
	v_subrev_nc_u32_e32 v10, s4, v2
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_ashrrev_i32_e32 v11, 31, v10
	v_lshlrev_b64 v[10:11], 2, v[10:11]
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_add_co_u32 v10, vcc_lo, s0, v10
	v_add_co_ci_u32_e32 v11, vcc_lo, s1, v11, vcc_lo
	global_load_b32 v8, v[10:11], off
.LBB0_8:
	s_or_b32 exec_lo, exec_lo, s12
	s_sub_i32 s12, s8, s4
	s_delay_alu instid0(SALU_CYCLE_1)
	v_cmp_gt_i32_e32 vcc_lo, s12, v9
	v_mov_b32_e32 v9, v5
	s_and_saveexec_b32 s12, vcc_lo
	s_cbranch_execz .LBB0_10
; %bb.9:
	s_lshl_b64 s[4:5], s[4:5], 2
	s_delay_alu instid0(SALU_CYCLE_1)
	v_add_co_u32 v9, vcc_lo, v3, s4
	v_add_co_ci_u32_e32 v10, vcc_lo, s5, v4, vcc_lo
	global_load_b32 v9, v[9:10], off
.LBB0_10:
	s_or_b32 exec_lo, exec_lo, s12
	s_cmp_gt_i32 s6, 1
	s_cbranch_scc0 .LBB0_16
; %bb.11:
	v_mov_b32_e32 v10, v5
	s_mov_b32 s4, exec_lo
	v_cmpx_le_i32_e64 s8, v2
	s_cbranch_execz .LBB0_13
; %bb.12:
	v_subrev_nc_u32_e32 v10, s8, v2
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_ashrrev_i32_e32 v11, 31, v10
	v_lshlrev_b64 v[10:11], 2, v[10:11]
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_add_co_u32 v10, vcc_lo, s0, v10
	v_add_co_ci_u32_e32 v11, vcc_lo, s1, v11, vcc_lo
	global_load_b32 v10, v[10:11], off
.LBB0_13:
	s_or_b32 exec_lo, exec_lo, s4
	s_sub_i32 s0, s11, s8
	s_delay_alu instid0(SALU_CYCLE_1)
	v_cmp_gt_i32_e32 vcc_lo, s0, v2
	v_mov_b32_e32 v2, v5
	s_and_saveexec_b32 s0, vcc_lo
	s_cbranch_execz .LBB0_15
; %bb.14:
	s_lshl_b64 s[4:5], s[8:9], 2
	s_delay_alu instid0(SALU_CYCLE_1)
	v_add_co_u32 v2, vcc_lo, v3, s4
	v_add_co_ci_u32_e32 v3, vcc_lo, s5, v4, vcc_lo
	global_load_b32 v2, v[2:3], off
.LBB0_15:
	s_or_b32 exec_lo, exec_lo, s0
	s_waitcnt vmcnt(0)
	v_add_f32_e32 v3, v8, v9
	v_cvt_f64_f32_e32 v[12:13], s7
	s_mov_b32 s0, 0
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_add_f32_e32 v3, v6, v3
	v_add_f32_e32 v3, v7, v3
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_add_f32_e32 v3, v3, v10
	v_add_f32_e32 v4, v3, v2
	v_cvt_f64_f32_e32 v[2:3], v5
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_cvt_f64_f32_e32 v[10:11], v4
	v_fma_f64 v[10:11], 0xc0180000, v[2:3], v[10:11]
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_fma_f64 v[2:3], v[10:11], v[12:13], v[2:3]
	v_cvt_f32_f64_e32 v3, v[2:3]
	s_branch .LBB0_17
.LBB0_16:
	s_mov_b32 s0, -1
                                        ; implicit-def: $vgpr3
.LBB0_17:                               ; %Flow
	s_delay_alu instid0(SALU_CYCLE_1)
	s_and_b32 vcc_lo, exec_lo, s0
	s_cbranch_vccz .LBB0_19
; %bb.18:
	s_waitcnt vmcnt(0)
	v_add_f32_e32 v2, v8, v9
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_add_f32_e32 v2, v6, v2
	v_add_f32_e32 v4, v7, v2
	v_cvt_f64_f32_e32 v[2:3], v5
	v_cvt_f64_f32_e32 v[6:7], s7
	s_delay_alu instid0(VALU_DEP_3) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_cvt_f64_f32_e32 v[4:5], v4
	v_fma_f64 v[4:5], v[2:3], -4.0, v[4:5]
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_fma_f64 v[2:3], v[4:5], v[6:7], v[2:3]
	v_cvt_f32_f64_e32 v3, v[2:3]
.LBB0_19:                               ; %Flow120
	s_or_b32 exec_lo, exec_lo, s10
	s_waitcnt lgkmcnt(0)
	v_add_co_u32 v0, vcc_lo, s2, v0
	v_add_co_ci_u32_e32 v1, vcc_lo, s3, v1, vcc_lo
	global_store_b32 v[0:1], v3, off
.LBB0_20:
	s_nop 0
	s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
	s_endpgm
	.section	.rodata,"a",@progbits
	.p2align	6, 0x0
	.amdhsa_kernel _Z8heat_simPfS_S_iiif
		.amdhsa_group_segment_fixed_size 0
		.amdhsa_private_segment_fixed_size 0
		.amdhsa_kernarg_size 296
		.amdhsa_user_sgpr_count 15
		.amdhsa_user_sgpr_dispatch_ptr 0
		.amdhsa_user_sgpr_queue_ptr 0
		.amdhsa_user_sgpr_kernarg_segment_ptr 1
		.amdhsa_user_sgpr_dispatch_id 0
		.amdhsa_user_sgpr_private_segment_size 0
		.amdhsa_wavefront_size32 1
		.amdhsa_uses_dynamic_stack 0
		.amdhsa_enable_private_segment 0
		.amdhsa_system_sgpr_workgroup_id_x 1
		.amdhsa_system_sgpr_workgroup_id_y 0
		.amdhsa_system_sgpr_workgroup_id_z 0
		.amdhsa_system_sgpr_workgroup_info 0
		.amdhsa_system_vgpr_workitem_id 0
		.amdhsa_next_free_vgpr 14
		.amdhsa_next_free_sgpr 16
		.amdhsa_float_round_mode_32 0
		.amdhsa_float_round_mode_16_64 0
		.amdhsa_float_denorm_mode_32 3
		.amdhsa_float_denorm_mode_16_64 3
		.amdhsa_dx10_clamp 1
		.amdhsa_ieee_mode 1
		.amdhsa_fp16_overflow 0
		.amdhsa_workgroup_processor_mode 1
		.amdhsa_memory_ordered 1
		.amdhsa_forward_progress 0
		.amdhsa_shared_vgpr_count 0
		.amdhsa_exception_fp_ieee_invalid_op 0
		.amdhsa_exception_fp_denorm_src 0
		.amdhsa_exception_fp_ieee_div_zero 0
		.amdhsa_exception_fp_ieee_overflow 0
		.amdhsa_exception_fp_ieee_underflow 0
		.amdhsa_exception_fp_ieee_inexact 0
		.amdhsa_exception_int_div_zero 0
	.end_amdhsa_kernel
	.text
.Lfunc_end0:
	.size	_Z8heat_simPfS_S_iiif, .Lfunc_end0-_Z8heat_simPfS_S_iiif
                                        ; -- End function
	.section	.AMDGPU.csdata,"",@progbits
; Kernel info:
; codeLenInByte = 1000
; NumSgprs: 18
; NumVgprs: 14
; ScratchSize: 0
; MemoryBound: 0
; FloatMode: 240
; IeeeMode: 1
; LDSByteSize: 0 bytes/workgroup (compile time only)
; SGPRBlocks: 2
; VGPRBlocks: 1
; NumSGPRsForWavesPerEU: 18
; NumVGPRsForWavesPerEU: 14
; Occupancy: 16
; WaveLimiterHint : 0
; COMPUTE_PGM_RSRC2:SCRATCH_EN: 0
; COMPUTE_PGM_RSRC2:USER_SGPR: 15
; COMPUTE_PGM_RSRC2:TRAP_HANDLER: 0
; COMPUTE_PGM_RSRC2:TGID_X_EN: 1
; COMPUTE_PGM_RSRC2:TGID_Y_EN: 0
; COMPUTE_PGM_RSRC2:TGID_Z_EN: 0
; COMPUTE_PGM_RSRC2:TIDIG_COMP_CNT: 0
	.text
	.protected	_Z8grid_cpyPfS_i        ; -- Begin function _Z8grid_cpyPfS_i
	.globl	_Z8grid_cpyPfS_i
	.p2align	8
	.type	_Z8grid_cpyPfS_i,@function
_Z8grid_cpyPfS_i:                       ; @_Z8grid_cpyPfS_i
; %bb.0:
	s_clause 0x1
	s_load_b32 s2, s[0:1], 0x24
	s_load_b32 s3, s[0:1], 0x10
	s_waitcnt lgkmcnt(0)
	s_and_b32 s2, s2, 0xffff
	s_delay_alu instid0(SALU_CYCLE_1) | instskip(SKIP_1) | instid1(VALU_DEP_1)
	v_mad_u64_u32 v[1:2], null, s15, s2, v[0:1]
	s_mov_b32 s2, exec_lo
	v_cmpx_gt_i32_e64 s3, v1
	s_cbranch_execz .LBB1_2
; %bb.1:
	s_load_b128 s[0:3], s[0:1], 0x0
	v_ashrrev_i32_e32 v2, 31, v1
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(VALU_DEP_1)
	v_lshlrev_b64 v[0:1], 2, v[1:2]
	s_waitcnt lgkmcnt(0)
	v_add_co_u32 v2, vcc_lo, s2, v0
	s_delay_alu instid0(VALU_DEP_2)
	v_add_co_ci_u32_e32 v3, vcc_lo, s3, v1, vcc_lo
	v_add_co_u32 v0, vcc_lo, s0, v0
	v_add_co_ci_u32_e32 v1, vcc_lo, s1, v1, vcc_lo
	global_load_b32 v2, v[2:3], off
	s_waitcnt vmcnt(0)
	global_store_b32 v[0:1], v2, off
.LBB1_2:
	s_nop 0
	s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
	s_endpgm
	.section	.rodata,"a",@progbits
	.p2align	6, 0x0
	.amdhsa_kernel _Z8grid_cpyPfS_i
		.amdhsa_group_segment_fixed_size 0
		.amdhsa_private_segment_fixed_size 0
		.amdhsa_kernarg_size 280
		.amdhsa_user_sgpr_count 15
		.amdhsa_user_sgpr_dispatch_ptr 0
		.amdhsa_user_sgpr_queue_ptr 0
		.amdhsa_user_sgpr_kernarg_segment_ptr 1
		.amdhsa_user_sgpr_dispatch_id 0
		.amdhsa_user_sgpr_private_segment_size 0
		.amdhsa_wavefront_size32 1
		.amdhsa_uses_dynamic_stack 0
		.amdhsa_enable_private_segment 0
		.amdhsa_system_sgpr_workgroup_id_x 1
		.amdhsa_system_sgpr_workgroup_id_y 0
		.amdhsa_system_sgpr_workgroup_id_z 0
		.amdhsa_system_sgpr_workgroup_info 0
		.amdhsa_system_vgpr_workitem_id 0
		.amdhsa_next_free_vgpr 4
		.amdhsa_next_free_sgpr 16
		.amdhsa_float_round_mode_32 0
		.amdhsa_float_round_mode_16_64 0
		.amdhsa_float_denorm_mode_32 3
		.amdhsa_float_denorm_mode_16_64 3
		.amdhsa_dx10_clamp 1
		.amdhsa_ieee_mode 1
		.amdhsa_fp16_overflow 0
		.amdhsa_workgroup_processor_mode 1
		.amdhsa_memory_ordered 1
		.amdhsa_forward_progress 0
		.amdhsa_shared_vgpr_count 0
		.amdhsa_exception_fp_ieee_invalid_op 0
		.amdhsa_exception_fp_denorm_src 0
		.amdhsa_exception_fp_ieee_div_zero 0
		.amdhsa_exception_fp_ieee_overflow 0
		.amdhsa_exception_fp_ieee_underflow 0
		.amdhsa_exception_fp_ieee_inexact 0
		.amdhsa_exception_int_div_zero 0
	.end_amdhsa_kernel
	.text
.Lfunc_end1:
	.size	_Z8grid_cpyPfS_i, .Lfunc_end1-_Z8grid_cpyPfS_i
                                        ; -- End function
	.section	.AMDGPU.csdata,"",@progbits
; Kernel info:
; codeLenInByte = 148
; NumSgprs: 18
; NumVgprs: 4
; ScratchSize: 0
; MemoryBound: 0
; FloatMode: 240
; IeeeMode: 1
; LDSByteSize: 0 bytes/workgroup (compile time only)
; SGPRBlocks: 2
; VGPRBlocks: 0
; NumSGPRsForWavesPerEU: 18
; NumVGPRsForWavesPerEU: 4
; Occupancy: 16
; WaveLimiterHint : 0
; COMPUTE_PGM_RSRC2:SCRATCH_EN: 0
; COMPUTE_PGM_RSRC2:USER_SGPR: 15
; COMPUTE_PGM_RSRC2:TRAP_HANDLER: 0
; COMPUTE_PGM_RSRC2:TGID_X_EN: 1
; COMPUTE_PGM_RSRC2:TGID_Y_EN: 0
; COMPUTE_PGM_RSRC2:TGID_Z_EN: 0
; COMPUTE_PGM_RSRC2:TIDIG_COMP_CNT: 0
	.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_
	.amdgpu_metadata
---
amdhsa.kernels:
  - .args:
      - .address_space:  global
        .offset:         0
        .size:           8
        .value_kind:     global_buffer
      - .address_space:  global
        .offset:         8
        .size:           8
        .value_kind:     global_buffer
      - .address_space:  global
        .offset:         16
        .size:           8
        .value_kind:     global_buffer
      - .offset:         24
        .size:           4
        .value_kind:     by_value
      - .offset:         28
        .size:           4
        .value_kind:     by_value
      - .offset:         32
        .size:           4
        .value_kind:     by_value
      - .offset:         36
        .size:           4
        .value_kind:     by_value
      - .offset:         40
        .size:           4
        .value_kind:     hidden_block_count_x
      - .offset:         44
        .size:           4
        .value_kind:     hidden_block_count_y
      - .offset:         48
        .size:           4
        .value_kind:     hidden_block_count_z
      - .offset:         52
        .size:           2
        .value_kind:     hidden_group_size_x
      - .offset:         54
        .size:           2
        .value_kind:     hidden_group_size_y
      - .offset:         56
        .size:           2
        .value_kind:     hidden_group_size_z
      - .offset:         58
        .size:           2
        .value_kind:     hidden_remainder_x
      - .offset:         60
        .size:           2
        .value_kind:     hidden_remainder_y
      - .offset:         62
        .size:           2
        .value_kind:     hidden_remainder_z
      - .offset:         80
        .size:           8
        .value_kind:     hidden_global_offset_x
      - .offset:         88
        .size:           8
        .value_kind:     hidden_global_offset_y
      - .offset:         96
        .size:           8
        .value_kind:     hidden_global_offset_z
      - .offset:         104
        .size:           2
        .value_kind:     hidden_grid_dims
    .group_segment_fixed_size: 0
    .kernarg_segment_align: 8
    .kernarg_segment_size: 296
    .language:       OpenCL C
    .language_version:
      - 2
      - 0
    .max_flat_workgroup_size: 1024
    .name:           _Z8heat_simPfS_S_iiif
    .private_segment_fixed_size: 0
    .sgpr_count:     18
    .sgpr_spill_count: 0
    .symbol:         _Z8heat_simPfS_S_iiif.kd
    .uniform_work_group_size: 1
    .uses_dynamic_stack: false
    .vgpr_count:     14
    .vgpr_spill_count: 0
    .wavefront_size: 32
    .workgroup_processor_mode: 1
  - .args:
      - .address_space:  global
        .offset:         0
        .size:           8
        .value_kind:     global_buffer
      - .address_space:  global
        .offset:         8
        .size:           8
        .value_kind:     global_buffer
      - .offset:         16
        .size:           4
        .value_kind:     by_value
      - .offset:         24
        .size:           4
        .value_kind:     hidden_block_count_x
      - .offset:         28
        .size:           4
        .value_kind:     hidden_block_count_y
      - .offset:         32
        .size:           4
        .value_kind:     hidden_block_count_z
      - .offset:         36
        .size:           2
        .value_kind:     hidden_group_size_x
      - .offset:         38
        .size:           2
        .value_kind:     hidden_group_size_y
      - .offset:         40
        .size:           2
        .value_kind:     hidden_group_size_z
      - .offset:         42
        .size:           2
        .value_kind:     hidden_remainder_x
      - .offset:         44
        .size:           2
        .value_kind:     hidden_remainder_y
      - .offset:         46
        .size:           2
        .value_kind:     hidden_remainder_z
      - .offset:         64
        .size:           8
        .value_kind:     hidden_global_offset_x
      - .offset:         72
        .size:           8
        .value_kind:     hidden_global_offset_y
      - .offset:         80
        .size:           8
        .value_kind:     hidden_global_offset_z
      - .offset:         88
        .size:           2
        .value_kind:     hidden_grid_dims
    .group_segment_fixed_size: 0
    .kernarg_segment_align: 8
    .kernarg_segment_size: 280
    .language:       OpenCL C
    .language_version:
      - 2
      - 0
    .max_flat_workgroup_size: 1024
    .name:           _Z8grid_cpyPfS_i
    .private_segment_fixed_size: 0
    .sgpr_count:     18
    .sgpr_spill_count: 0
    .symbol:         _Z8grid_cpyPfS_i.kd
    .uniform_work_group_size: 1
    .uses_dynamic_stack: false
    .vgpr_count:     4
    .vgpr_spill_count: 0
    .wavefront_size: 32
    .workgroup_processor_mode: 1
amdhsa.target:   amdgcn-amd-amdhsa--gfx1100
amdhsa.version:
  - 1
  - 2
...

	.end_amdgpu_metadata
