#include <cstdlib>
#include <iostream>
#include <iomanip>
#include <stdlib.h>
#include <fstream>
#include <string.h>
#include <vector>
#include <stdio.h>
#include <float.h>
#include <sstream>
#include <algorithm>


using namespace std;

// helper method which takes a line and parse each number into integer
// and adds them into a vector
void stringToIntParser (string &temp, vector <float> &temp2)
{
  stringstream str(temp);
  while (str.good() )
  {
    string substr;
    getline(str,substr,',');
    temp2.push_back(atof(substr.c_str()));
  }
}

// helper method to check if a line has # character of not
bool hasHash (string s){
  for ( int i= 0; i < s.length(); i++) {
    if (s.at(i) == '#')
      return true;
  }
  return false;
}

// the kernel function which does the calculation for 3 dimension
__global__ void caclulation3D(float *a, float *b, float *c, int width, int height, int depth, float vK) { 

  int index = threadIdx.x + blockIdx.x * blockDim.x;
  if(index < (width*height*depth)) {

    int x = index % width;   // current column -- x direction width
    int y = (index / width) % height; // current row y direction height
    int z = index / (width*height); // current depth in z direction

    int left = max (x-1, 0);
    int right = min (x+1, width-1);
    int top = max (0, y-1);
    int bottom = min(y+1, height-1);

    int front = max (z -1, 0);
    int back = min (z+1, depth - 1);

    if(c[index] != FLT_MIN) {
      a[index] = b[index] + vK * ( b[front*width*height + y*width + x] + b[back*width*height + y*width + x]
        +b[z*width*height + top*width + x] + b[z*width*height + bottom*width + x] 
        + b[z*width*height + y*width + left] + b[z*width*height + y*width + right]  - 6*b[index]);
    }
  }
}

// the kernel function which does the calculation
__global__ void caclulation2D(float *a, float *b, float *c, int width, int height, float vK) { 

  int index = threadIdx.x + blockIdx.x * blockDim.x;
  if(index < width*height) {

    int y = index / width; // current row y direction height
    int x = index % width;   // current column -- x direction width

    int left = max (x-1, 0);
    int right = min (x+1, width-1);
    int top = max (0, y-1);
    int bottom= min(y+1, height-1);

    //printf(" the index are index = %d, (x,y) = (%d, %d) left =%d, right = %d, top = %d , bottom = %d \n", 
      //index, x, y, left, right, top, bottom);

    if(c[index] != FLT_MIN) {
      a[index] = b[index] + vK *(b[x+top*width] + b[x+bottom*width] + b[left+y*width] + b[right + y*width]  - 4*b[index]);
    }
  }
}


// initializing the cpu memory for two dimension grid points
void initialize2D(float *array1, float * array2, int width, int height, float fixed, std::vector<float> v) {
  for(int y = 0; y < height; y++) {
    for(int x = 0; x<width; x++) {
      array1[x+ width*y] = fixed;
      array2[x+ width*y] = fixed;
    }
  }
  int hx, hy, wx, wy;
  float heat;
  int idx = 0;
  while(idx < v.size()) {
    hx = (int) v[idx], hy = (int) v[idx+1];
    wx = (int) v[idx+2], wy = (int) v[idx+3];
    heat = v[idx+4];
    idx += 5;

    for(int y = hy; y < hy + wy; y++) {
      for (int x = hx; x < hx + wx; x++) {
        array1[x + width*y] = heat;
        array2[x+width*y] = FLT_MIN;
      }
    }

  }
}

// initializing the cpu array for 3D grid points 
void initialize3D(float *array1, float * array2, int width, int height, int depth, float fixed, std::vector<float> v) {
  for(int z = 0; z < depth; z++) {
    for (int y = 0; y < height; y++) {
      for(int x = 0; x < width; x++) {
        array1[z*width*height + y*width + x] = fixed;
        array2[z*width*height + y*width + x] = fixed;
      }
    }
  }
  int hx, hy, hz, wx, wy, wz;
  float heat;
  int idx = 0;
  while(idx < v.size()) {
  hx = (int) v[idx], hy = (int) v[idx+1], hz = (int) v[idx+2];
  wx = (int) v[idx+3], wy = (int) v[idx+4], wz =(int) v[idx+5];
  heat = v[idx+6];
  idx += 7;

  for(int z = hz; z <hz+wz; z++) {
    for(int y = hy; y < hy +wy; y++) {
      for (int x = hx; x < hx + wx; x++) {
        array1[z*width*height + y*width + x] = heat;
        array2[z*width*height + y*width + x] = FLT_MIN;
      }
    }
  }

 }
}


// helper method which write the final result into a csv file
int writeoutput(float *array, char const *s, int width, int height, int depth, int dimension) {
    FILE *f = fopen(s, "w+");
    if(f == NULL) return -1;
    if(dimension == 3) {
      for(int z = 0; z < depth; z++) {
        for(int y = 0; y < height; y++) {
          for(int x = 0; x < width; x++) {
            if(x != width-1)
              fprintf(f, "%f, ", array[z*width*height + y*width + x]);
            else
              fprintf(f, "%f\n", array[z*width*height + y*width + x]); // print a new line after each row
          }
        }
        fprintf(f, "\n"); // printing a blank line
      }
    } else {
      for(int y = 0; y < height; y++) {
        for(int x = 0; x < width; x++) {
          if(x != width-1) 
            fprintf(f, "%f, ", array[y*width + x]);
          else
            fprintf(f, "%f\n", array[y*width + x]);
        }
      }
    }
    fclose(f);
    return 0;
}
// main starts here
int main (int argc, char** argv ) {
  // initializing the local variable
  ifstream configfile(argv[1]);
  string line;
  vector <string> stringarray;  //string vector to store all the line from input file
  int dimension;     // dimension 2D or 3D
  vector<float>heightWeidthDepth;    //height (row), width (col) and depth of  the grid
  float startTemp;    // default starting temperature for the grid
  vector<float>heaterLocation;
  int timeStep;     // total time step
  float valueK;       //the k value which is constant

  // start reading all the line from the file
  while (getline(configfile, line)) {
    if (line.empty() || hasHash(line)) {}
    else
      stringarray.push_back(line);
  }

  // the first line is dimension get it and convert in into integer
  dimension = atoi(stringarray[0].c_str());
  // the second value is constant k
  valueK = atof(stringarray[1].c_str());
  // the third value is number of tiestep in integer
  timeStep   = atoi(stringarray[2].c_str());
  // the height and width and depth which is in one line
  stringToIntParser(stringarray[3], heightWeidthDepth);

  // the 4th value is the default starting temperature
  startTemp = atof(stringarray[4].c_str());

  // the rest of the values are heater location
  // which can be 0 or 1 or more
  for ( int i = 5; i < stringarray.size(); ++i)
  {
    stringToIntParser(stringarray[i], heaterLocation);
  }

  int height = (int) heightWeidthDepth[1]; // y axis
  int width = (int) heightWeidthDepth[0]; // x axis
  int depth = 0;
  int size;
  if(dimension == 3) {depth = (int) heightWeidthDepth[2];}

  if(dimension == 3)
    size = height*width*depth*sizeof(float); // total number of points
  else
    size = height*width*sizeof(float);

  // declare the cpu array
  float *array1 = (float*)malloc(size);
  float *array2 = (float*)malloc(size);

  // declare the gpu variable
  float *gArray1, *gArray2, *gArray3;

  cudaMalloc((void **) &gArray1, size);
  cudaMalloc((void **) &gArray2, size);
  cudaMalloc((void **) &gArray3, size);

  // initialize the cpu array
  if(dimension == 2)
    initialize2D(array1, array2, width, height, startTemp, heaterLocation);
  else
    initialize3D(array1, array2, width, height, depth, startTemp, heaterLocation);


  // copy all data to the device from cpu
  cudaMemcpy(gArray1, array1, size, cudaMemcpyHostToDevice);
  cudaMemcpy(gArray2, array1, size, cudaMemcpyHostToDevice);
  cudaMemcpy(gArray3, array2, size, cudaMemcpyHostToDevice);

  // call the kernel function swap the gArray1 has the updated value after each odd(1,3,5) 
  //time step and gArray2
  int points = (depth == 0)? height*width:height*width*depth;
  int numOfThreads = (points < 512) ? 512: 1024;
  for(int i = 0; i < timeStep; i++) {
    if(i%2 == 0) {
      if(dimension == 2)
        caclulation2D<<<(points/numOfThreads) + 1 , numOfThreads >>>(gArray1, gArray2, gArray3, width, height, valueK);
      else
        caclulation3D <<< (points/numOfThreads) + 1 , numOfThreads>>> (gArray1, gArray2, gArray3, width, height, depth, valueK);
    } else {
      if(dimension == 2)
        caclulation2D<<<(points/numOfThreads) + 1 , numOfThreads >>>(gArray2, gArray1, gArray3, width,height, valueK);
      else
        caclulation3D <<< (points/numOfThreads) + 1 , numOfThreads>>> (gArray2, gArray1, gArray3, width, height, depth, valueK);
    }
    cudaDeviceSynchronize();
  }
  // read from gpu to cpu based on timestep
  if(timeStep % 2 == 0) 
    cudaMemcpy(array1, gArray2, size, cudaMemcpyDeviceToHost);
  else
    cudaMemcpy(array1, gArray1, size, cudaMemcpyDeviceToHost);
  // write output to a .csv file
  writeoutput(array1, "heatOutput.csv",  width, height, depth, dimension);

  // free all the allocated memory both in gpu and cpu
  cudaFree(gArray1), cudaFree(gArray2), cudaFree(gArray3);
  free(array1), free(array2);
  return 0;
}

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

#NO_APP
	.type	_ZL26__cudaUnregisterBinaryUtilv, @function
_ZL26__cudaUnregisterBinaryUtilv:
.LFB4651:
	.cfi_startproc
	endbr64
	movq	_ZL20__cudaFatCubinHandle(%rip), %rdi
	jmp	__cudaUnregisterFatBinary@PLT
	.cfi_endproc
.LFE4651:
	.size	_ZL26__cudaUnregisterBinaryUtilv, .-_ZL26__cudaUnregisterBinaryUtilv
	.globl	_Z7hasHashNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE
	.type	_Z7hasHashNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE, @function
_Z7hasHashNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
.LFB4624:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	xorl	%ebp, %ebp
	pushq	%rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	movq	%rdi, %rbx
	pushq	%rcx
	.cfi_def_cfa_offset 32
.L3:
	cmpq	8(%rbx), %rbp
	jnb	.L9
	movq	%rbp, %rsi
	movq	%rbx, %rdi
	incq	%rbp
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE2atEm@PLT
	cmpb	$35, (%rax)
	jne	.L3
	movb	$1, %al
	jmp	.L2
.L9:
	xorl	%eax, %eax
.L2:
	popq	%rdx
	.cfi_def_cfa_offset 24
	popq	%rbx
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE4624:
	.size	_Z7hasHashNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE, .-_Z7hasHashNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE
	.globl	_Z12initialize2DPfS_iifSt6vectorIfSaIfEE
	.type	_Z12initialize2DPfS_iifSt6vectorIfSaIfEE, @function
_Z12initialize2DPfS_iifSt6vectorIfSaIfEE:
.LFB4625:
	.cfi_startproc
	endbr64
	movq	%rsi, %r9
	xorl	%r10d, %r10d
	movl	%edx, %esi
	xorl	%r11d, %r11d
.L11:
	cmpl	%ecx, %r11d
	jge	.L13
	movslq	%r10d, %rax
	xorl	%edx, %edx
	salq	$2, %rax
.L14:
	cmpl	%esi, %edx
	jge	.L24
	movss	%xmm0, (%rdi,%rax)
	incl	%edx
	movss	%xmm0, (%r9,%rax)
	addq	$4, %rax
	jmp	.L14
.L24:
	incl	%r11d
	addl	%esi, %r10d
	jmp	.L11
.L13:
	movq	(%r8), %r10
	movq	8(%r8), %rax
	movss	.LC0(%rip), %xmm0
	subq	%r10, %rax
	sarq	$2, %rax
	movq	%rax, %r8
	xorl	%eax, %eax
	cmpq	%r8, %rax
	jb	.L23
	ret
.L23:
	pushq	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	pushq	%r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	pushq	%r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	pushq	%rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
.L20:
	cvttss2sil	4(%r10,%rax,4), %edx
	movss	16(%r10,%rax,4), %xmm1
	cvttss2sil	(%r10,%rax,4), %r12d
	cvttss2sil	8(%r10,%rax,4), %r13d
	cvttss2sil	12(%r10,%rax,4), %ebp
	movl	%edx, %ebx
	imull	%esi, %ebx
	addl	%r12d, %r13d
	addl	%edx, %ebp
.L16:
	cmpl	%edx, %ebp
	jle	.L18
	movslq	%ebx, %rcx
	movslq	%r12d, %r11
	salq	$2, %rcx
	leaq	(%rdi,%rcx), %r14
	addq	%r9, %rcx
.L19:
	cmpl	%r11d, %r13d
	jle	.L25
	movss	%xmm1, (%r14,%r11,4)
	movss	%xmm0, (%rcx,%r11,4)
	incq	%r11
	jmp	.L19
.L25:
	incl	%edx
	addl	%esi, %ebx
	jmp	.L16
.L18:
	addq	$5, %rax
	cmpq	%r8, %rax
	jb	.L20
	popq	%rbx
	.cfi_def_cfa_offset 40
	popq	%rbp
	.cfi_def_cfa_offset 32
	popq	%r12
	.cfi_def_cfa_offset 24
	popq	%r13
	.cfi_def_cfa_offset 16
	popq	%r14
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE4625:
	.size	_Z12initialize2DPfS_iifSt6vectorIfSaIfEE, .-_Z12initialize2DPfS_iifSt6vectorIfSaIfEE
	.globl	_Z12initialize3DPfS_iiifSt6vectorIfSaIfEE
	.type	_Z12initialize3DPfS_iiifSt6vectorIfSaIfEE, @function
_Z12initialize3DPfS_iiifSt6vectorIfSaIfEE:
.LFB4626:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	movq	%rsi, %r11
	movl	%edx, %esi
	movq	%rdi, %r10
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	movl	%ecx, %edx
	xorl	%edi, %edi
	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
	movl	%ecx, %ebx
	xorl	%ecx, %ecx
	imull	%esi, %ebx
.L27:
	cmpl	%r8d, %ecx
	jge	.L42
	movl	%edi, %r12d
	xorl	%r13d, %r13d
.L31:
	cmpl	%edx, %r13d
	jge	.L29
	movslq	%r12d, %rax
	xorl	%ebp, %ebp
	salq	$2, %rax
.L30:
	cmpl	%esi, %ebp
	jge	.L43
	movss	%xmm0, (%r10,%rax)
	incl	%ebp
	movss	%xmm0, (%r11,%rax)
	addq	$4, %rax
	jmp	.L30
.L43:
	incl	%r13d
	addl	%esi, %r12d
	jmp	.L31
.L29:
	incl	%ecx
	addl	%ebx, %edi
	jmp	.L27
.L42:
	movq	(%r9), %rdx
	movq	8(%r9), %rax
	movss	.LC0(%rip), %xmm0
	subq	%rdx, %rax
	sarq	$2, %rax
	movq	%rax, -24(%rsp)
	xorl	%eax, %eax
.L32:
	movq	-24(%rsp), %rcx
	cmpq	%rcx, %rax
	jnb	.L44
	cvttss2sil	4(%rdx,%rax,4), %ebp
	movss	24(%rdx,%rax,4), %xmm1
	cvttss2sil	8(%rdx,%rax,4), %ecx
	cvttss2sil	20(%rdx,%rax,4), %r9d
	cvttss2sil	(%rdx,%rax,4), %r14d
	movl	%ebp, %r15d
	cvttss2sil	12(%rdx,%rax,4), %edi
	imull	%esi, %r15d
	movl	%ecx, %r13d
	cvttss2sil	16(%rdx,%rax,4), %r8d
	imull	%ebx, %r13d
	movl	%r15d, -16(%rsp)
	leal	(%rcx,%r9), %r15d
	addl	%r14d, %edi
	movl	%r15d, -12(%rsp)
	leal	0(%rbp,%r8), %r15d
	movl	%edi, -4(%rsp)
	movl	%r15d, -8(%rsp)
.L33:
	cmpl	%ecx, -12(%rsp)
	jle	.L37
	movl	-16(%rsp), %edi
	movl	%ebp, %r9d
	leal	(%rdi,%r13), %r12d
.L38:
	cmpl	%r9d, -8(%rsp)
	jle	.L35
	movslq	%r12d, %rdi
	movslq	%r14d, %r8
	salq	$2, %rdi
	leaq	(%r10,%rdi), %r15
	addq	%r11, %rdi
.L36:
	cmpl	%r8d, -4(%rsp)
	jle	.L45
	movss	%xmm1, (%r15,%r8,4)
	movss	%xmm0, (%rdi,%r8,4)
	incq	%r8
	jmp	.L36
.L45:
	incl	%r9d
	addl	%esi, %r12d
	jmp	.L38
.L35:
	incl	%ecx
	addl	%ebx, %r13d
	jmp	.L33
.L37:
	addq	$7, %rax
	jmp	.L32
.L44:
	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
.LFE4626:
	.size	_Z12initialize3DPfS_iiifSt6vectorIfSaIfEE, .-_Z12initialize3DPfS_iiifSt6vectorIfSaIfEE
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC1:
	.string	"w+"
.LC2:
	.string	"%f, "
.LC3:
	.string	"%f\n"
.LC4:
	.string	"\n"
	.text
	.globl	_Z11writeoutputPfPKciiii
	.type	_Z11writeoutputPfPKciiii, @function
_Z11writeoutputPfPKciiii:
.LFB4627:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	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
	movl	%r9d, %r12d
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	movl	%ecx, %ebp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	movl	%edx, %ebx
	subq	$56, %rsp
	.cfi_def_cfa_offset 112
	movq	%rdi, 24(%rsp)
	movq	%rsi, %rdi
	leaq	.LC1(%rip), %rsi
	movl	%r8d, 44(%rsp)
	call	fopen@PLT
	movq	%rax, 8(%rsp)
	orl	$-1, %eax
	cmpq	$0, 8(%rsp)
	je	.L46
	cmpl	$3, %r12d
	je	.L48
	xorl	%r12d, %r12d
	xorl	%r13d, %r13d
	jmp	.L49
.L48:
	movl	%ebp, %eax
	xorl	%r15d, %r15d
	imull	%ebx, %eax
	movl	%eax, 40(%rsp)
	xorl	%eax, %eax
	movl	%eax, 20(%rsp)
.L50:
	movl	44(%rsp), %eax
	cmpl	%eax, %r15d
	jge	.L57
	movl	20(%rsp), %r13d
	xorl	%r14d, %r14d
.L56:
	cmpl	%ebp, %r14d
	jge	.L54
	movq	24(%rsp), %rcx
	movslq	%r13d, %rax
	xorl	%r12d, %r12d
	leaq	(%rcx,%rax,4), %rax
	movq	%rax, 32(%rsp)
.L55:
	cmpl	%r12d, %ebx
	jle	.L68
	movq	32(%rsp), %rax
	leaq	.LC2(%rip), %rdx
	cvtss2sd	(%rax,%r12,4), %xmm0
	leal	-1(%rbx), %eax
	cmpl	%r12d, %eax
	jne	.L66
	leaq	.LC3(%rip), %rdx
.L66:
	movq	8(%rsp), %rdi
	movl	$2, %esi
	movb	$1, %al
	incq	%r12
	call	__fprintf_chk@PLT
	jmp	.L55
.L68:
	incl	%r14d
	addl	%ebx, %r13d
	jmp	.L56
.L54:
	movq	8(%rsp), %rdi
	movl	$2, %esi
	xorl	%eax, %eax
	incl	%r15d
	leaq	.LC4(%rip), %rdx
	call	__fprintf_chk@PLT
	movl	40(%rsp), %ecx
	addl	%ecx, 20(%rsp)
	jmp	.L50
.L60:
	leal	-1(%rbx), %eax
	leaq	.LC2(%rip), %rdx
	cvtss2sd	(%r14,%r15,4), %xmm0
	cmpl	%r15d, %eax
	jne	.L67
	leaq	.LC3(%rip), %rdx
.L67:
	movq	8(%rsp), %rdi
	movl	$2, %esi
	movb	$1, %al
	incq	%r15
	call	__fprintf_chk@PLT
.L61:
	cmpl	%ebx, %r15d
	jl	.L60
	incl	%r13d
	addl	%ebx, %r12d
.L49:
	cmpl	%ebp, %r13d
	jge	.L57
	movq	24(%rsp), %rcx
	movslq	%r12d, %rax
	xorl	%r15d, %r15d
	leaq	(%rcx,%rax,4), %r14
	jmp	.L61
.L57:
	movq	8(%rsp), %rdi
	call	fclose@PLT
	xorl	%eax, %eax
.L46:
	addq	$56, %rsp
	.cfi_def_cfa_offset 56
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE4627:
	.size	_Z11writeoutputPfPKciiii, .-_Z11writeoutputPfPKciiii
	.globl	_Z41__device_stub__Z13caclulation3DPfS_S_iiifPfS_S_iiif
	.type	_Z41__device_stub__Z13caclulation3DPfS_S_iiifPfS_S_iiif, @function
_Z41__device_stub__Z13caclulation3DPfS_S_iiifPfS_S_iiif:
.LFB4673:
	.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	.L69
	pushq	56(%rsp)
	.cfi_def_cfa_offset 200
	leaq	_Z13caclulation3DPfS_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
.L69:
	movq	168(%rsp), %rax
	subq	%fs:40, %rax
	je	.L71
	call	__stack_chk_fail@PLT
.L71:
	addq	$184, %rsp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE4673:
	.size	_Z41__device_stub__Z13caclulation3DPfS_S_iiifPfS_S_iiif, .-_Z41__device_stub__Z13caclulation3DPfS_S_iiifPfS_S_iiif
	.globl	_Z13caclulation3DPfS_S_iiif
	.type	_Z13caclulation3DPfS_S_iiif, @function
_Z13caclulation3DPfS_S_iiif:
.LFB4674:
	.cfi_startproc
	endbr64
	jmp	_Z41__device_stub__Z13caclulation3DPfS_S_iiifPfS_S_iiif
	.cfi_endproc
.LFE4674:
	.size	_Z13caclulation3DPfS_S_iiif, .-_Z13caclulation3DPfS_S_iiif
	.globl	_Z40__device_stub__Z13caclulation2DPfS_S_iifPfS_S_iif
	.type	_Z40__device_stub__Z13caclulation2DPfS_S_iifPfS_S_iif, @function
_Z40__device_stub__Z13caclulation2DPfS_S_iifPfS_S_iif:
.LFB4675:
	.cfi_startproc
	endbr64
	subq	$184, %rsp
	.cfi_def_cfa_offset 192
	movq	%rdi, 40(%rsp)
	leaq	72(%rsp), %rdi
	movq	%rsi, 32(%rsp)
	leaq	84(%rsp), %rsi
	movq	%rdx, 24(%rsp)
	leaq	56(%rsp), %rdx
	movl	%ecx, 20(%rsp)
	leaq	64(%rsp), %rcx
	movl	%r8d, 16(%rsp)
	movss	%xmm0, 12(%rsp)
	movq	%fs:40, %rax
	movq	%rax, 168(%rsp)
	xorl	%eax, %eax
	leaq	40(%rsp), %rax
	movl	$1, 80(%rsp)
	movq	%rax, 120(%rsp)
	leaq	32(%rsp), %rax
	movq	%rax, 128(%rsp)
	leaq	24(%rsp), %rax
	movq	%rax, 136(%rsp)
	leaq	20(%rsp), %rax
	movq	%rax, 144(%rsp)
	leaq	16(%rsp), %rax
	movq	%rax, 152(%rsp)
	leaq	12(%rsp), %rax
	movq	%rax, 160(%rsp)
	movabsq	$4294967297, %rax
	movq	%rax, 72(%rsp)
	movq	%rax, 84(%rsp)
	movl	$1, 92(%rsp)
	call	__cudaPopCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L74
	pushq	64(%rsp)
	.cfi_def_cfa_offset 200
	leaq	_Z13caclulation2DPfS_S_iif(%rip), %rdi
	pushq	64(%rsp)
	.cfi_def_cfa_offset 208
	movq	100(%rsp), %rcx
	movl	108(%rsp), %r8d
	movq	88(%rsp), %rsi
	movl	96(%rsp), %edx
	leaq	136(%rsp), %r9
	call	cudaLaunchKernel@PLT
	popq	%rax
	.cfi_def_cfa_offset 200
	popq	%rdx
	.cfi_def_cfa_offset 192
.L74:
	movq	168(%rsp), %rax
	subq	%fs:40, %rax
	je	.L76
	call	__stack_chk_fail@PLT
.L76:
	addq	$184, %rsp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE4675:
	.size	_Z40__device_stub__Z13caclulation2DPfS_S_iifPfS_S_iif, .-_Z40__device_stub__Z13caclulation2DPfS_S_iifPfS_S_iif
	.globl	_Z13caclulation2DPfS_S_iif
	.type	_Z13caclulation2DPfS_S_iif, @function
_Z13caclulation2DPfS_S_iif:
.LFB4676:
	.cfi_startproc
	endbr64
	jmp	_Z40__device_stub__Z13caclulation2DPfS_S_iifPfS_S_iif
	.cfi_endproc
.LFE4676:
	.size	_Z13caclulation2DPfS_S_iif, .-_Z13caclulation2DPfS_S_iif
	.section	.rodata.str1.1
.LC5:
	.string	"_Z13caclulation2DPfS_S_iif"
.LC6:
	.string	"_Z13caclulation3DPfS_S_iiif"
	.section	.text.startup,"ax",@progbits
	.type	_ZL24__sti____cudaRegisterAllv, @function
_ZL24__sti____cudaRegisterAllv:
.LFB4678:
	.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	.LC5(%rip), %rdx
	movq	%rax, %rdi
	movq	%rax, %rbx
	pushq	$0
	.cfi_def_cfa_offset 40
	movq	%rdx, %rcx
	leaq	_Z13caclulation2DPfS_S_iif(%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	.LC6(%rip), %rdx
	orl	$-1, %r8d
	leaq	_Z13caclulation3DPfS_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
.LFE4678:
	.size	_ZL24__sti____cudaRegisterAllv, .-_ZL24__sti____cudaRegisterAllv
	.section	.init_array,"aw"
	.align 8
	.quad	_ZL24__sti____cudaRegisterAllv
	.section	.text._ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev,"axG",@progbits,_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED5Ev,comdat
	.align 2
	.weak	_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev
	.type	_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev, @function
_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev:
.LFB5031:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	movq	8(%rdi), %r12
	movq	%rdi, %rbx
	movq	(%rdi), %rbp
.L82:
	cmpq	%rbp, %r12
	je	.L86
	movq	%rbp, %rdi
	addq	$32, %rbp
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_disposeEv@PLT
	jmp	.L82
.L86:
	movq	(%rbx), %rdi
	testq	%rdi, %rdi
	je	.L81
	movq	16(%rbx), %rsi
	popq	%rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	subq	%rdi, %rsi
	jmp	_ZdlPvm@PLT
.L81:
	.cfi_restore_state
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE5031:
	.size	_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev, .-_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev
	.weak	_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED1Ev
	.set	_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED1Ev,_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev
	.section	.text._ZNSt6vectorIfSaIfEED2Ev,"axG",@progbits,_ZNSt6vectorIfSaIfEED5Ev,comdat
	.align 2
	.weak	_ZNSt6vectorIfSaIfEED2Ev
	.type	_ZNSt6vectorIfSaIfEED2Ev, @function
_ZNSt6vectorIfSaIfEED2Ev:
.LFB5043:
	.cfi_startproc
	endbr64
	movq	(%rdi), %rax
	testq	%rax, %rax
	je	.L87
	movq	16(%rdi), %rsi
	movq	%rax, %rdi
	subq	%rax, %rsi
	jmp	_ZdlPvm@PLT
.L87:
	ret
	.cfi_endproc
.LFE5043:
	.size	_ZNSt6vectorIfSaIfEED2Ev, .-_ZNSt6vectorIfSaIfEED2Ev
	.weak	_ZNSt6vectorIfSaIfEED1Ev
	.set	_ZNSt6vectorIfSaIfEED1Ev,_ZNSt6vectorIfSaIfEED2Ev
	.section	.text._ZNSt6vectorIfSaIfEEC2ERKS1_,"axG",@progbits,_ZNSt6vectorIfSaIfEEC5ERKS1_,comdat
	.align 2
	.weak	_ZNSt6vectorIfSaIfEEC2ERKS1_
	.type	_ZNSt6vectorIfSaIfEEC2ERKS1_, @function
_ZNSt6vectorIfSaIfEEC2ERKS1_:
.LFB5056:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	movq	%rsi, %r12
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	movq	8(%rsi), %rbp
	movq	%rdi, %rbx
	subq	(%rsi), %rbp
	movq	$0, (%rdi)
	movq	$0, 8(%rdi)
	movq	$0, 16(%rdi)
	je	.L94
	movabsq	$9223372036854775804, %rax
	cmpq	%rbp, %rax
	jnb	.L91
	call	_ZSt28__throw_bad_array_new_lengthv@PLT
.L91:
	movq	%rbp, %rdi
	call	_Znwm@PLT
	movq	%rax, %rcx
	jmp	.L90
.L94:
	xorl	%ecx, %ecx
.L90:
	addq	%rcx, %rbp
	movq	%rcx, (%rbx)
	movq	%rcx, 8(%rbx)
	movq	%rbp, 16(%rbx)
	movq	(%r12), %rsi
	movq	8(%r12), %rbp
	subq	%rsi, %rbp
	cmpq	$4, %rbp
	jle	.L92
	movq	%rcx, %rdi
	movq	%rbp, %rdx
	call	memmove@PLT
	movq	%rax, %rcx
	jmp	.L93
.L92:
	jne	.L93
	movss	(%rsi), %xmm0
	movss	%xmm0, (%rcx)
.L93:
	addq	%rbp, %rcx
	movq	%rcx, 8(%rbx)
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE5056:
	.size	_ZNSt6vectorIfSaIfEEC2ERKS1_, .-_ZNSt6vectorIfSaIfEEC2ERKS1_
	.weak	_ZNSt6vectorIfSaIfEEC1ERKS1_
	.set	_ZNSt6vectorIfSaIfEEC1ERKS1_,_ZNSt6vectorIfSaIfEEC2ERKS1_
	.section	.rodata._ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE17_M_realloc_insertIJRKS5_EEEvN9__gnu_cxx17__normal_iteratorIPS5_S7_EEDpOT_.str1.1,"aMS",@progbits,1
.LC7:
	.string	"vector::_M_realloc_insert"
	.section	.text._ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE17_M_realloc_insertIJRKS5_EEEvN9__gnu_cxx17__normal_iteratorIPS5_S7_EEDpOT_,"axG",@progbits,_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE17_M_realloc_insertIJRKS5_EEEvN9__gnu_cxx17__normal_iteratorIPS5_S7_EEDpOT_,comdat
	.align 2
	.weak	_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE17_M_realloc_insertIJRKS5_EEEvN9__gnu_cxx17__normal_iteratorIPS5_S7_EEDpOT_
	.type	_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE17_M_realloc_insertIJRKS5_EEEvN9__gnu_cxx17__normal_iteratorIPS5_S7_EEDpOT_, @function
_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE17_M_realloc_insertIJRKS5_EEEvN9__gnu_cxx17__normal_iteratorIPS5_S7_EEDpOT_:
.LFB5273:
	.cfi_startproc
	.cfi_personality 0x9b,DW.ref.__gxx_personality_v0
	.cfi_lsda 0x1b,.LLSDA5273
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	movq	%rdx, %r15
	movabsq	$288230376151711743, %rdx
	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	$24, %rsp
	.cfi_def_cfa_offset 80
	movq	8(%rdi), %rax
	movq	(%rdi), %r14
	movq	%rsi, 8(%rsp)
	movq	%rax, %rbx
	movq	%rax, (%rsp)
	subq	%r14, %rbx
	sarq	$5, %rbx
	cmpq	%rdx, %rbx
	jne	.L97
	leaq	.LC7(%rip), %rdi
.LEHB0:
	call	_ZSt20__throw_length_errorPKc@PLT
.L97:
	cmpq	%r14, (%rsp)
	movl	$1, %eax
	movq	8(%rsp), %rbp
	movq	%rdi, %r13
	cmovne	%rbx, %rax
	addq	%rax, %rbx
	setc	%al
	subq	%r14, %rbp
	movzbl	%al, %eax
	testq	%rax, %rax
	jne	.L113
	xorl	%r12d, %r12d
	testq	%rbx, %rbx
	je	.L102
	movabsq	$288230376151711743, %rax
	cmpq	%rax, %rbx
	cmova	%rax, %rbx
	jmp	.L101
.L113:
	movq	%rdx, %rbx
.L101:
	movq	%rbx, %rdi
	salq	$5, %rdi
	call	_Znwm@PLT
.LEHE0:
	movq	%rax, %r12
.L102:
	addq	%r12, %rbp
	movq	%r15, %rsi
	movq	%rbp, %rdi
.LEHB1:
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1ERKS4_@PLT
.LEHE1:
	movq	%r12, %rdi
	movq	%r14, %rbp
.L103:
	leaq	32(%rdi), %r15
	cmpq	%rbp, 8(%rsp)
	je	.L105
	movq	%rbp, %rsi
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1EOS4_@PLT
	movq	%rbp, %rdi
	addq	$32, %rbp
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_disposeEv@PLT
	movq	%r15, %rdi
	jmp	.L103
.L105:
	cmpq	%rbp, (%rsp)
	je	.L125
	movq	%rbp, %rsi
	movq	%r15, %rdi
	addq	$32, %r15
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1EOS4_@PLT
	movq	%rbp, %rdi
	addq	$32, %rbp
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_disposeEv@PLT
	jmp	.L105
.L125:
	testq	%r14, %r14
	je	.L107
	movq	16(%r13), %rsi
	movq	%r14, %rdi
	subq	%r14, %rsi
	call	_ZdlPvm@PLT
.L107:
	salq	$5, %rbx
	movq	%r12, 0(%r13)
	addq	%r12, %rbx
	movq	%r15, 8(%r13)
	movq	%rbx, 16(%r13)
	addq	$24, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	ret
.L116:
	.cfi_restore_state
	endbr64
	movq	%rax, %rdi
.L108:
	call	__cxa_begin_catch@PLT
	testq	%r12, %r12
	jne	.L109
	movq	%rbp, %rdi
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_disposeEv@PLT
.L111:
.LEHB2:
	call	__cxa_rethrow@PLT
.LEHE2:
.L117:
	endbr64
	movq	%rax, %rbx
.L110:
	call	__cxa_end_catch@PLT
	movq	%rbx, %rdi
.LEHB3:
	call	_Unwind_Resume@PLT
.LEHE3:
.L109:
	movq	%rbx, %rsi
	movq	%r12, %rdi
	salq	$5, %rsi
	call	_ZdlPvm@PLT
	jmp	.L111
	.cfi_endproc
.LFE5273:
	.globl	__gxx_personality_v0
	.section	.gcc_except_table._ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE17_M_realloc_insertIJRKS5_EEEvN9__gnu_cxx17__normal_iteratorIPS5_S7_EEDpOT_,"aG",@progbits,_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE17_M_realloc_insertIJRKS5_EEEvN9__gnu_cxx17__normal_iteratorIPS5_S7_EEDpOT_,comdat
	.align 4
.LLSDA5273:
	.byte	0xff
	.byte	0x9b
	.uleb128 .LLSDATT5273-.LLSDATTD5273
.LLSDATTD5273:
	.byte	0x1
	.uleb128 .LLSDACSE5273-.LLSDACSB5273
.LLSDACSB5273:
	.uleb128 .LEHB0-.LFB5273
	.uleb128 .LEHE0-.LEHB0
	.uleb128 0
	.uleb128 0
	.uleb128 .LEHB1-.LFB5273
	.uleb128 .LEHE1-.LEHB1
	.uleb128 .L116-.LFB5273
	.uleb128 0x1
	.uleb128 .LEHB2-.LFB5273
	.uleb128 .LEHE2-.LEHB2
	.uleb128 .L117-.LFB5273
	.uleb128 0
	.uleb128 .LEHB3-.LFB5273
	.uleb128 .LEHE3-.LEHB3
	.uleb128 0
	.uleb128 0
.LLSDACSE5273:
	.byte	0x1
	.byte	0
	.align 4
	.long	0

.LLSDATT5273:
	.section	.text._ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE17_M_realloc_insertIJRKS5_EEEvN9__gnu_cxx17__normal_iteratorIPS5_S7_EEDpOT_,"axG",@progbits,_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE17_M_realloc_insertIJRKS5_EEEvN9__gnu_cxx17__normal_iteratorIPS5_S7_EEDpOT_,comdat
	.size	_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE17_M_realloc_insertIJRKS5_EEEvN9__gnu_cxx17__normal_iteratorIPS5_S7_EEDpOT_, .-_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE17_M_realloc_insertIJRKS5_EEEvN9__gnu_cxx17__normal_iteratorIPS5_S7_EEDpOT_
	.section	.text._ZNSt6vectorIfSaIfEE17_M_realloc_insertIJfEEEvN9__gnu_cxx17__normal_iteratorIPfS1_EEDpOT_,"axG",@progbits,_ZNSt6vectorIfSaIfEE17_M_realloc_insertIJfEEEvN9__gnu_cxx17__normal_iteratorIPfS1_EEDpOT_,comdat
	.align 2
	.weak	_ZNSt6vectorIfSaIfEE17_M_realloc_insertIJfEEEvN9__gnu_cxx17__normal_iteratorIPfS1_EEDpOT_
	.type	_ZNSt6vectorIfSaIfEE17_M_realloc_insertIJfEEEvN9__gnu_cxx17__normal_iteratorIPfS1_EEDpOT_, @function
_ZNSt6vectorIfSaIfEE17_M_realloc_insertIJfEEEvN9__gnu_cxx17__normal_iteratorIPfS1_EEDpOT_:
.LFB5382:
	.cfi_startproc
	endbr64
	movabsq	$2305843009213693951, %rcx
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	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	$24, %rsp
	.cfi_def_cfa_offset 80
	movq	8(%rdi), %rax
	movq	(%rdi), %r14
	movq	%rax, %rbx
	movq	%rax, (%rsp)
	subq	%r14, %rbx
	sarq	$2, %rbx
	cmpq	%rcx, %rbx
	jne	.L127
	leaq	.LC7(%rip), %rdi
	call	_ZSt20__throw_length_errorPKc@PLT
.L127:
	cmpq	%r14, (%rsp)
	movl	$1, %eax
	movq	%rsi, %r15
	movq	%rdi, %r13
	cmovne	%rbx, %rax
	movq	%rsi, %rbp
	addq	%rax, %rbx
	setc	%al
	subq	%r14, %r15
	movzbl	%al, %eax
	testq	%rax, %rax
	jne	.L137
	xorl	%r12d, %r12d
	testq	%rbx, %rbx
	je	.L132
	movabsq	$2305843009213693951, %rax
	cmpq	%rax, %rbx
	cmova	%rax, %rbx
	jmp	.L131
.L137:
	movq	%rcx, %rbx
.L131:
	leaq	0(,%rbx,4), %rdi
	movq	%rdx, 8(%rsp)
	call	_Znwm@PLT
	movq	8(%rsp), %rdx
	movq	%rax, %r12
.L132:
	movss	(%rdx), %xmm0
	movss	%xmm0, (%r12,%r15)
	testq	%r15, %r15
	jle	.L133
	movq	%r15, %rdx
	movq	%r14, %rsi
	movq	%r12, %rdi
	call	memmove@PLT
.L133:
	movq	(%rsp), %rax
	leaq	4(%r12,%r15), %rdx
	subq	%rbp, %rax
	testq	%rax, %rax
	jle	.L134
	movq	%rdx, %rdi
	movq	%rbp, %rsi
	movq	%rax, %rcx
	rep movsb
.L134:
	leaq	(%rdx,%rax), %rbp
	testq	%r14, %r14
	je	.L135
	movq	16(%r13), %rsi
	movq	%r14, %rdi
	subq	%r14, %rsi
	call	_ZdlPvm@PLT
.L135:
	leaq	(%r12,%rbx,4), %rax
	movq	%r12, 0(%r13)
	movq	%rbp, 8(%r13)
	movq	%rax, 16(%r13)
	addq	$24, %rsp
	.cfi_def_cfa_offset 56
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE5382:
	.size	_ZNSt6vectorIfSaIfEE17_M_realloc_insertIJfEEEvN9__gnu_cxx17__normal_iteratorIPfS1_EEDpOT_, .-_ZNSt6vectorIfSaIfEE17_M_realloc_insertIJfEEEvN9__gnu_cxx17__normal_iteratorIPfS1_EEDpOT_
	.text
	.globl	_Z17stringToIntParserRNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERSt6vectorIfSaIfEE
	.type	_Z17stringToIntParserRNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERSt6vectorIfSaIfEE, @function
_Z17stringToIntParserRNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERSt6vectorIfSaIfEE:
.LFB4622:
	.cfi_startproc
	.cfi_personality 0x9b,DW.ref.__gxx_personality_v0
	.cfi_lsda 0x1b,.LLSDA4622
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	movl	$24, %edx
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	movq	%rsi, %rbx
	movq	%rdi, %rsi
	subq	$448, %rsp
	.cfi_def_cfa_offset 480
	movq	%fs:40, %rax
	movq	%rax, 440(%rsp)
	xorl	%eax, %eax
	leaq	48(%rsp), %rbp
	leaq	16(%rsp), %r12
	movq	%rbp, %rdi
.LEHB4:
	call	_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEC1ERKNS_12basic_stringIcS2_S3_EESt13_Ios_Openmode@PLT
.LEHE4:
.L145:
	cmpl	$0, 208(%rsp)
	jne	.L155
	leaq	32(%rsp), %rax
	movl	$44, %edx
	movq	%r12, %rsi
	movq	%rbp, %rdi
	movq	%rax, 16(%rsp)
	xorl	%eax, %eax
	movq	%rax, 24(%rsp)
	movb	$0, 32(%rsp)
.LEHB5:
	call	_ZSt7getlineIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EES4_@PLT
	movq	16(%rsp), %rdi
	call	atof@PLT
	movq	8(%rbx), %rsi
	cvtsd2ss	%xmm0, %xmm0
	movss	%xmm0, 12(%rsp)
	cmpq	16(%rbx), %rsi
	je	.L146
	movss	%xmm0, (%rsi)
	addq	$4, %rsi
	movq	%rsi, 8(%rbx)
	jmp	.L147
.L146:
	leaq	12(%rsp), %rdx
	movq	%rbx, %rdi
	call	_ZNSt6vectorIfSaIfEE17_M_realloc_insertIJfEEEvN9__gnu_cxx17__normal_iteratorIPfS1_EEDpOT_
.LEHE5:
.L147:
	movq	%r12, %rdi
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_disposeEv@PLT
	jmp	.L145
.L155:
	movq	%rbp, %rdi
	call	_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED1Ev@PLT
	movq	440(%rsp), %rax
	subq	%fs:40, %rax
	je	.L151
	jmp	.L153
.L152:
	endbr64
	movq	%rax, %rbx
.L149:
	movq	%r12, %rdi
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_disposeEv@PLT
	movq	%rbp, %rdi
	call	_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED1Ev@PLT
	movq	440(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L153
	movq	%rbx, %rdi
.LEHB6:
	call	_Unwind_Resume@PLT
.LEHE6:
.L153:
	call	__stack_chk_fail@PLT
.L151:
	addq	$448, %rsp
	.cfi_def_cfa_offset 32
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE4622:
	.section	.gcc_except_table,"a",@progbits
.LLSDA4622:
	.byte	0xff
	.byte	0xff
	.byte	0x1
	.uleb128 .LLSDACSE4622-.LLSDACSB4622
.LLSDACSB4622:
	.uleb128 .LEHB4-.LFB4622
	.uleb128 .LEHE4-.LEHB4
	.uleb128 0
	.uleb128 0
	.uleb128 .LEHB5-.LFB4622
	.uleb128 .LEHE5-.LEHB5
	.uleb128 .L152-.LFB4622
	.uleb128 0
	.uleb128 .LEHB6-.LFB4622
	.uleb128 .LEHE6-.LEHB6
	.uleb128 0
	.uleb128 0
.LLSDACSE4622:
	.text
	.size	_Z17stringToIntParserRNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERSt6vectorIfSaIfEE, .-_Z17stringToIntParserRNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERSt6vectorIfSaIfEE
	.section	.rodata.str1.1
.LC8:
	.string	"heatOutput.csv"
	.section	.text.startup
	.globl	main
	.type	main, @function
main:
.LFB4628:
	.cfi_startproc
	.cfi_personality 0x9b,DW.ref.__gxx_personality_v0
	.cfi_lsda 0x1b,.LLSDA4628
	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	$792, %rsp
	.cfi_def_cfa_offset 848
	movq	8(%rsi), %rsi
	leaq	256(%rsp), %r12
	leaq	192(%rsp), %rbp
	movq	%fs:40, %rax
	movq	%rax, 776(%rsp)
	xorl	%eax, %eax
	movq	%r12, %rdi
.LEHB7:
	call	_ZNSt14basic_ifstreamIcSt11char_traitsIcEEC1EPKcSt13_Ios_Openmode@PLT
.LEHE7:
	leaq	208(%rsp), %rax
	xorl	%edx, %edx
	movb	$0, 208(%rsp)
	movq	%rax, 192(%rsp)
	xorl	%eax, %eax
	movq	%rax, 200(%rsp)
	movq	%rdx, 96(%rsp)
	movq	%rdx, 104(%rsp)
	movq	%rdx, 112(%rsp)
	movq	%rdx, 120(%rsp)
	movq	%rdx, 128(%rsp)
	movq	%rdx, 136(%rsp)
	movq	%rdx, 144(%rsp)
	movq	%rdx, 152(%rsp)
	movq	%rdx, 160(%rsp)
.L164:
	movq	%rbp, %rsi
	movq	%r12, %rdi
.LEHB8:
	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	.L205
	cmpq	$0, 200(%rsp)
	je	.L164
	leaq	224(%rsp), %r13
	movq	%rbp, %rsi
	movq	%r13, %rdi
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1ERKS4_@PLT
.LEHE8:
	movq	%r13, %rdi
.LEHB9:
	call	_Z7hasHashNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE
.LEHE9:
	movl	%eax, %ebx
	movq	%r13, %rdi
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_disposeEv@PLT
	testb	%bl, %bl
	jne	.L164
	jmp	.L206
.L191:
	endbr64
	movq	%rax, %rbx
.L161:
	movq	%r13, %rdi
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_disposeEv@PLT
	jmp	.L162
.L206:
	movq	104(%rsp), %rbx
	cmpq	112(%rsp), %rbx
	je	.L165
	movq	%rbp, %rsi
	movq	%rbx, %rdi
.LEHB10:
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1ERKS4_@PLT
	addq	$32, %rbx
	movq	%rbx, 104(%rsp)
	jmp	.L164
.L165:
	leaq	96(%rsp), %rdi
	movq	%rbp, %rdx
	movq	%rbx, %rsi
	call	_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE17_M_realloc_insertIJRKS5_EEEvN9__gnu_cxx17__normal_iteratorIPS5_S7_EEDpOT_
	jmp	.L164
.L205:
	movq	96(%rsp), %rbx
	movq	(%rbx), %rdi
	call	atoi@PLT
	movq	32(%rbx), %rdi
	movl	%eax, %r13d
	call	atof@PLT
	movq	64(%rbx), %rdi
	cvtsd2ss	%xmm0, %xmm1
	movss	%xmm1, 40(%rsp)
	call	atoi@PLT
	leaq	120(%rsp), %rsi
	leaq	96(%rbx), %rdi
	movl	%eax, 44(%rsp)
	call	_Z17stringToIntParserRNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERSt6vectorIfSaIfEE
	movq	128(%rbx), %rdi
	movl	$5, %ebp
	leaq	144(%rsp), %r15
	call	atof@PLT
	cvtsd2ss	%xmm0, %xmm2
	movd	%xmm2, %r12d
.L168:
	movq	104(%rsp), %rax
	subq	%rbx, %rax
	sarq	$5, %rax
	cmpq	%rax, %rbp
	jnb	.L207
	movq	%rbp, %rdi
	movq	%r15, %rsi
	salq	$5, %rdi
	addq	%rbx, %rdi
	call	_Z17stringToIntParserRNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERSt6vectorIfSaIfEE
	incq	%rbp
	jmp	.L168
.L207:
	movq	120(%rsp), %rax
	cvttss2sil	4(%rax), %edx
	cvttss2sil	(%rax), %ecx
	movl	%edx, %r14d
	movl	%edx, 16(%rsp)
	movl	%ecx, 20(%rsp)
	imull	%ecx, %r14d
	cmpl	$3, %r13d
	je	.L170
	leal	0(,%r14,4), %eax
	xorl	%ebx, %ebx
	jmp	.L171
.L170:
	cvttss2sil	8(%rax), %ebx
	movl	%ebx, %eax
	imull	%r14d, %eax
	sall	$2, %eax
.L171:
	cltq
	movq	%rax, %rdi
	movq	%rax, 8(%rsp)
	call	malloc@PLT
	movq	8(%rsp), %rdi
	movq	%rax, 24(%rsp)
	call	malloc@PLT
	movq	8(%rsp), %rsi
	leaq	56(%rsp), %rdi
	movq	%rax, 32(%rsp)
	call	cudaMalloc@PLT
	movq	8(%rsp), %rsi
	leaq	64(%rsp), %rdi
	call	cudaMalloc@PLT
	movq	8(%rsp), %rsi
	leaq	72(%rsp), %rdi
	call	cudaMalloc@PLT
	leaq	168(%rsp), %rbp
	cmpl	$2, %r13d
	movq	%r15, %rsi
	movq	%rbp, %rdi
	jne	.L172
	call	_ZNSt6vectorIfSaIfEEC1ERKS1_
	movl	16(%rsp), %ecx
	movl	20(%rsp), %edx
	movq	%rbp, %r8
	movd	%r12d, %xmm0
	movq	32(%rsp), %rsi
	movq	24(%rsp), %rdi
	call	_Z12initialize2DPfS_iifSt6vectorIfSaIfEE
	jmp	.L198
.L172:
	call	_ZNSt6vectorIfSaIfEEC1ERKS1_
	movl	16(%rsp), %ecx
	movl	20(%rsp), %edx
	movq	%rbp, %r9
	movd	%r12d, %xmm0
	movq	32(%rsp), %rsi
	movq	24(%rsp), %rdi
	movl	%ebx, %r8d
	call	_Z12initialize3DPfS_iiifSt6vectorIfSaIfEE
.L198:
	movq	%rbp, %rdi
	call	_ZNSt6vectorIfSaIfEED1Ev
	movq	8(%rsp), %rdx
	movq	24(%rsp), %rsi
	movl	$1, %ecx
	movq	56(%rsp), %rdi
	call	cudaMemcpy@PLT
	movq	8(%rsp), %rdx
	movq	24(%rsp), %rsi
	movl	$1, %ecx
	movq	64(%rsp), %rdi
	call	cudaMemcpy@PLT
	movq	8(%rsp), %rdx
	movq	32(%rsp), %rsi
	movl	$1, %ecx
	movq	72(%rsp), %rdi
	call	cudaMemcpy@PLT
	testl	%ebx, %ebx
	je	.L174
	imull	%ebx, %r14d
.L174:
	cmpl	$511, %r14d
	movl	$1024, %ebp
	movl	$512, %eax
	movabsq	$4294967297, %r12
	cmovle	%eax, %ebp
	xorl	%r15d, %r15d
.L176:
	movl	44(%rsp), %eax
	cmpl	%eax, %r15d
	jge	.L208
	movl	%r14d, %eax
	movq	%r12, 172(%rsp)
	movl	$0, %r9d
	movl	176(%rsp), %ecx
	cltd
	movq	%r12, 88(%rsp)
	movl	92(%rsp), %esi
	movl	$0, %r8d
	idivl	%ebp
	movl	%ebp, 168(%rsp)
	movq	168(%rsp), %rdx
	testl	$1, %r15d
	leal	1(%rax), %eax
	movl	%eax, 84(%rsp)
	movq	84(%rsp), %rdi
	jne	.L177
	cmpl	$2, %r13d
	jne	.L178
	call	__cudaPushCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L180
	movss	40(%rsp), %xmm0
	movl	16(%rsp), %r8d
	movl	20(%rsp), %ecx
	movq	72(%rsp), %rdx
	movq	64(%rsp), %rsi
	movq	56(%rsp), %rdi
	jmp	.L200
.L178:
	call	__cudaPushCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L180
	movss	40(%rsp), %xmm0
	movl	16(%rsp), %r8d
	movl	%ebx, %r9d
	movl	20(%rsp), %ecx
	movq	72(%rsp), %rdx
	movq	64(%rsp), %rsi
	movq	56(%rsp), %rdi
	jmp	.L202
.L177:
	cmpl	$2, %r13d
	jne	.L182
	call	__cudaPushCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L180
	movss	40(%rsp), %xmm0
	movl	16(%rsp), %r8d
	movl	20(%rsp), %ecx
	movq	72(%rsp), %rdx
	movq	56(%rsp), %rsi
	movq	64(%rsp), %rdi
.L200:
	call	_Z40__device_stub__Z13caclulation2DPfS_S_iifPfS_S_iif
	jmp	.L180
.L182:
	call	__cudaPushCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L180
	movss	40(%rsp), %xmm0
	movl	16(%rsp), %r8d
	movl	%ebx, %r9d
	movl	20(%rsp), %ecx
	movq	72(%rsp), %rdx
	movq	56(%rsp), %rsi
	movq	64(%rsp), %rdi
.L202:
	call	_Z41__device_stub__Z13caclulation3DPfS_S_iiifPfS_S_iiif
.L180:
	call	cudaDeviceSynchronize@PLT
	incl	%r15d
	jmp	.L176
.L208:
	movq	8(%rsp), %rdx
	movl	$2, %ecx
	testb	$1, %al
	jne	.L186
	movq	64(%rsp), %rsi
	jmp	.L204
.L186:
	movq	56(%rsp), %rsi
.L204:
	movq	24(%rsp), %rdi
	call	cudaMemcpy@PLT
	movl	16(%rsp), %ecx
	movl	20(%rsp), %edx
	movl	%r13d, %r9d
	movl	%ebx, %r8d
	movq	24(%rsp), %rdi
	leaq	.LC8(%rip), %rsi
	call	_Z11writeoutputPfPKciiii
	movq	56(%rsp), %rdi
	call	cudaFree@PLT
	movq	64(%rsp), %rdi
	call	cudaFree@PLT
	movq	72(%rsp), %rdi
	call	cudaFree@PLT
.LEHE10:
	movq	24(%rsp), %rdi
	call	free@PLT
	movq	32(%rsp), %rdi
	call	free@PLT
	leaq	144(%rsp), %rdi
	call	_ZNSt6vectorIfSaIfEED1Ev
	leaq	120(%rsp), %rdi
	call	_ZNSt6vectorIfSaIfEED1Ev
	leaq	96(%rsp), %rdi
	call	_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED1Ev
	leaq	192(%rsp), %rdi
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_disposeEv@PLT
	leaq	256(%rsp), %rdi
	call	_ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev@PLT
	movq	776(%rsp), %rax
	subq	%fs:40, %rax
	je	.L189
	jmp	.L196
.L192:
	endbr64
	movq	%rax, %rbx
.L162:
	leaq	144(%rsp), %rdi
	call	_ZNSt6vectorIfSaIfEED1Ev
	leaq	120(%rsp), %rdi
	call	_ZNSt6vectorIfSaIfEED1Ev
	leaq	96(%rsp), %rdi
	call	_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED1Ev
	leaq	192(%rsp), %rdi
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_disposeEv@PLT
	leaq	256(%rsp), %rdi
	call	_ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev@PLT
	movq	776(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L196
	movq	%rbx, %rdi
.LEHB11:
	call	_Unwind_Resume@PLT
.LEHE11:
.L196:
	call	__stack_chk_fail@PLT
.L189:
	addq	$792, %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
.LFE4628:
	.section	.gcc_except_table
.LLSDA4628:
	.byte	0xff
	.byte	0xff
	.byte	0x1
	.uleb128 .LLSDACSE4628-.LLSDACSB4628
.LLSDACSB4628:
	.uleb128 .LEHB7-.LFB4628
	.uleb128 .LEHE7-.LEHB7
	.uleb128 0
	.uleb128 0
	.uleb128 .LEHB8-.LFB4628
	.uleb128 .LEHE8-.LEHB8
	.uleb128 .L192-.LFB4628
	.uleb128 0
	.uleb128 .LEHB9-.LFB4628
	.uleb128 .LEHE9-.LEHB9
	.uleb128 .L191-.LFB4628
	.uleb128 0
	.uleb128 .LEHB10-.LFB4628
	.uleb128 .LEHE10-.LEHB10
	.uleb128 .L192-.LFB4628
	.uleb128 0
	.uleb128 .LEHB11-.LFB4628
	.uleb128 .LEHE11-.LEHB11
	.uleb128 0
	.uleb128 0
.LLSDACSE4628:
	.section	.text.startup
	.size	main, .-main
	.section	.nvFatBinSegment,"aw"
	.align 8
	.type	_ZL15__fatDeviceText, @object
	.size	_ZL15__fatDeviceText, 24
_ZL15__fatDeviceText:
	.long	1180844977
	.long	1
	.quad	fatbinData
	.quad	0
	.local	_ZL20__cudaFatCubinHandle
	.comm	_ZL20__cudaFatCubinHandle,8,8
	.section	.rodata.cst4,"aM",@progbits,4
	.align 4
.LC0:
	.long	8388608
	.hidden	DW.ref.__gxx_personality_v0
	.weak	DW.ref.__gxx_personality_v0
	.section	.data.rel.local.DW.ref.__gxx_personality_v0,"awG",@progbits,DW.ref.__gxx_personality_v0,comdat
	.align 8
	.type	DW.ref.__gxx_personality_v0, @object
	.size	DW.ref.__gxx_personality_v0, 8
DW.ref.__gxx_personality_v0:
	.quad	__gxx_personality_v0
	.ident	"GCC: (Ubuntu 13.3.0-6ubuntu2~24.04) 13.3.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:


#include <hip/hip_runtime.h>
#include <cstdlib>
#include <iostream>
#include <iomanip>
#include <stdlib.h>
#include <fstream>
#include <string.h>
#include <vector>
#include <stdio.h>
#include <float.h>
#include <sstream>
#include <algorithm>


using namespace std;

// helper method which takes a line and parse each number into integer
// and adds them into a vector
void stringToIntParser (string &temp, vector <float> &temp2)
{
  stringstream str(temp);
  while (str.good() )
  {
    string substr;
    getline(str,substr,',');
    temp2.push_back(atof(substr.c_str()));
  }
}

// helper method to check if a line has # character of not
bool hasHash (string s){
  for ( int i= 0; i < s.length(); i++) {
    if (s.at(i) == '#')
      return true;
  }
  return false;
}

// the kernel function which does the calculation for 3 dimension
__global__ void caclulation3D(float *a, float *b, float *c, int width, int height, int depth, float vK) { 

  int index = threadIdx.x + blockIdx.x * blockDim.x;
  if(index < (width*height*depth)) {

    int x = index % width;   // current column -- x direction width
    int y = (index / width) % height; // current row y direction height
    int z = index / (width*height); // current depth in z direction

    int left = max (x-1, 0);
    int right = min (x+1, width-1);
    int top = max (0, y-1);
    int bottom = min(y+1, height-1);

    int front = max (z -1, 0);
    int back = min (z+1, depth - 1);

    if(c[index] != FLT_MIN) {
      a[index] = b[index] + vK * ( b[front*width*height + y*width + x] + b[back*width*height + y*width + x]
        +b[z*width*height + top*width + x] + b[z*width*height + bottom*width + x] 
        + b[z*width*height + y*width + left] + b[z*width*height + y*width + right]  - 6*b[index]);
    }
  }
}

// the kernel function which does the calculation
__global__ void caclulation2D(float *a, float *b, float *c, int width, int height, float vK) { 

  int index = threadIdx.x + blockIdx.x * blockDim.x;
  if(index < width*height) {

    int y = index / width; // current row y direction height
    int x = index % width;   // current column -- x direction width

    int left = max (x-1, 0);
    int right = min (x+1, width-1);
    int top = max (0, y-1);
    int bottom= min(y+1, height-1);

    //printf(" the index are index = %d, (x,y) = (%d, %d) left =%d, right = %d, top = %d , bottom = %d \n", 
      //index, x, y, left, right, top, bottom);

    if(c[index] != FLT_MIN) {
      a[index] = b[index] + vK *(b[x+top*width] + b[x+bottom*width] + b[left+y*width] + b[right + y*width]  - 4*b[index]);
    }
  }
}


// initializing the cpu memory for two dimension grid points
void initialize2D(float *array1, float * array2, int width, int height, float fixed, std::vector<float> v) {
  for(int y = 0; y < height; y++) {
    for(int x = 0; x<width; x++) {
      array1[x+ width*y] = fixed;
      array2[x+ width*y] = fixed;
    }
  }
  int hx, hy, wx, wy;
  float heat;
  int idx = 0;
  while(idx < v.size()) {
    hx = (int) v[idx], hy = (int) v[idx+1];
    wx = (int) v[idx+2], wy = (int) v[idx+3];
    heat = v[idx+4];
    idx += 5;

    for(int y = hy; y < hy + wy; y++) {
      for (int x = hx; x < hx + wx; x++) {
        array1[x + width*y] = heat;
        array2[x+width*y] = FLT_MIN;
      }
    }

  }
}

// initializing the cpu array for 3D grid points 
void initialize3D(float *array1, float * array2, int width, int height, int depth, float fixed, std::vector<float> v) {
  for(int z = 0; z < depth; z++) {
    for (int y = 0; y < height; y++) {
      for(int x = 0; x < width; x++) {
        array1[z*width*height + y*width + x] = fixed;
        array2[z*width*height + y*width + x] = fixed;
      }
    }
  }
  int hx, hy, hz, wx, wy, wz;
  float heat;
  int idx = 0;
  while(idx < v.size()) {
  hx = (int) v[idx], hy = (int) v[idx+1], hz = (int) v[idx+2];
  wx = (int) v[idx+3], wy = (int) v[idx+4], wz =(int) v[idx+5];
  heat = v[idx+6];
  idx += 7;

  for(int z = hz; z <hz+wz; z++) {
    for(int y = hy; y < hy +wy; y++) {
      for (int x = hx; x < hx + wx; x++) {
        array1[z*width*height + y*width + x] = heat;
        array2[z*width*height + y*width + x] = FLT_MIN;
      }
    }
  }

 }
}


// helper method which write the final result into a csv file
int writeoutput(float *array, char const *s, int width, int height, int depth, int dimension) {
    FILE *f = fopen(s, "w+");
    if(f == NULL) return -1;
    if(dimension == 3) {
      for(int z = 0; z < depth; z++) {
        for(int y = 0; y < height; y++) {
          for(int x = 0; x < width; x++) {
            if(x != width-1)
              fprintf(f, "%f, ", array[z*width*height + y*width + x]);
            else
              fprintf(f, "%f\n", array[z*width*height + y*width + x]); // print a new line after each row
          }
        }
        fprintf(f, "\n"); // printing a blank line
      }
    } else {
      for(int y = 0; y < height; y++) {
        for(int x = 0; x < width; x++) {
          if(x != width-1) 
            fprintf(f, "%f, ", array[y*width + x]);
          else
            fprintf(f, "%f\n", array[y*width + x]);
        }
      }
    }
    fclose(f);
    return 0;
}
// main starts here
int main (int argc, char** argv ) {
  // initializing the local variable
  ifstream configfile(argv[1]);
  string line;
  vector <string> stringarray;  //string vector to store all the line from input file
  int dimension;     // dimension 2D or 3D
  vector<float>heightWeidthDepth;    //height (row), width (col) and depth of  the grid
  float startTemp;    // default starting temperature for the grid
  vector<float>heaterLocation;
  int timeStep;     // total time step
  float valueK;       //the k value which is constant

  // start reading all the line from the file
  while (getline(configfile, line)) {
    if (line.empty() || hasHash(line)) {}
    else
      stringarray.push_back(line);
  }

  // the first line is dimension get it and convert in into integer
  dimension = atoi(stringarray[0].c_str());
  // the second value is constant k
  valueK = atof(stringarray[1].c_str());
  // the third value is number of tiestep in integer
  timeStep   = atoi(stringarray[2].c_str());
  // the height and width and depth which is in one line
  stringToIntParser(stringarray[3], heightWeidthDepth);

  // the 4th value is the default starting temperature
  startTemp = atof(stringarray[4].c_str());

  // the rest of the values are heater location
  // which can be 0 or 1 or more
  for ( int i = 5; i < stringarray.size(); ++i)
  {
    stringToIntParser(stringarray[i], heaterLocation);
  }

  int height = (int) heightWeidthDepth[1]; // y axis
  int width = (int) heightWeidthDepth[0]; // x axis
  int depth = 0;
  int size;
  if(dimension == 3) {depth = (int) heightWeidthDepth[2];}

  if(dimension == 3)
    size = height*width*depth*sizeof(float); // total number of points
  else
    size = height*width*sizeof(float);

  // declare the cpu array
  float *array1 = (float*)malloc(size);
  float *array2 = (float*)malloc(size);

  // declare the gpu variable
  float *gArray1, *gArray2, *gArray3;

  hipMalloc((void **) &gArray1, size);
  hipMalloc((void **) &gArray2, size);
  hipMalloc((void **) &gArray3, size);

  // initialize the cpu array
  if(dimension == 2)
    initialize2D(array1, array2, width, height, startTemp, heaterLocation);
  else
    initialize3D(array1, array2, width, height, depth, startTemp, heaterLocation);


  // copy all data to the device from cpu
  hipMemcpy(gArray1, array1, size, hipMemcpyHostToDevice);
  hipMemcpy(gArray2, array1, size, hipMemcpyHostToDevice);
  hipMemcpy(gArray3, array2, size, hipMemcpyHostToDevice);

  // call the kernel function swap the gArray1 has the updated value after each odd(1,3,5) 
  //time step and gArray2
  int points = (depth == 0)? height*width:height*width*depth;
  int numOfThreads = (points < 512) ? 512: 1024;
  for(int i = 0; i < timeStep; i++) {
    if(i%2 == 0) {
      if(dimension == 2)
        caclulation2D<<<(points/numOfThreads) + 1 , numOfThreads >>>(gArray1, gArray2, gArray3, width, height, valueK);
      else
        caclulation3D <<< (points/numOfThreads) + 1 , numOfThreads>>> (gArray1, gArray2, gArray3, width, height, depth, valueK);
    } else {
      if(dimension == 2)
        caclulation2D<<<(points/numOfThreads) + 1 , numOfThreads >>>(gArray2, gArray1, gArray3, width,height, valueK);
      else
        caclulation3D <<< (points/numOfThreads) + 1 , numOfThreads>>> (gArray2, gArray1, gArray3, width, height, depth, valueK);
    }
    hipDeviceSynchronize();
  }
  // read from gpu to cpu based on timestep
  if(timeStep % 2 == 0) 
    hipMemcpy(array1, gArray2, size, hipMemcpyDeviceToHost);
  else
    hipMemcpy(array1, gArray1, size, hipMemcpyDeviceToHost);
  // write output to a .csv file
  writeoutput(array1, "heatOutput.csv",  width, height, depth, dimension);

  // free all the allocated memory both in gpu and cpu
  hipFree(gArray1), hipFree(gArray2), hipFree(gArray3);
  free(array1), free(array2);
  return 0;
}

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

                                        # End of file scope inline assembly
	.globl	_Z17stringToIntParserRNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERSt6vectorIfSaIfEE # -- Begin function _Z17stringToIntParserRNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERSt6vectorIfSaIfEE
	.type	_Z17stringToIntParserRNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERSt6vectorIfSaIfEE,@function
_Z17stringToIntParserRNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERSt6vectorIfSaIfEE: # @_Z17stringToIntParserRNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERSt6vectorIfSaIfEE
.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	$440, %rsp                      # imm = 0x1B8
	.cfi_def_cfa_offset 496
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	.cfi_offset %rbp, -16
	movq	%rsi, %rbx
	movq	%rdi, %rsi
	leaq	48(%rsp), %r14
	movq	%r14, %rdi
	movl	$24, %edx
	callq	_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEC1ERKNS_12basic_stringIcS2_S3_EESt13_Ios_Openmode
	movq	(%r14), %rax
	movq	-24(%rax), %rax
	cmpl	$0, 80(%rsp,%rax)
	jne	.LBB0_10
# %bb.1:                                # %.lr.ph
	leaq	32(%rsp), %rbp
	leaq	48(%rsp), %r14
	leaq	16(%rsp), %r15
	leaq	12(%rsp), %r12
.LBB0_2:                                # =>This Inner Loop Header: Depth=1
	movq	%rbp, 16(%rsp)
	movq	$0, 24(%rsp)
	movb	$0, 32(%rsp)
.Ltmp0:
	movq	%r14, %rdi
	movq	%r15, %rsi
	movl	$44, %edx
	callq	_ZSt7getlineIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EES4_
.Ltmp1:
# %bb.3:                                #   in Loop: Header=BB0_2 Depth=1
	movq	16(%rsp), %r13
	movq	%r13, %rdi
	callq	atof
	cvtsd2ss	%xmm0, %xmm0
	movss	%xmm0, 12(%rsp)
	movq	8(%rbx), %rsi
	cmpq	16(%rbx), %rsi
	je	.LBB0_5
# %bb.4:                                #   in Loop: Header=BB0_2 Depth=1
	movss	%xmm0, (%rsi)
	addq	$4, %rsi
	movq	%rsi, 8(%rbx)
	jmp	.LBB0_7
.LBB0_5:                                #   in Loop: Header=BB0_2 Depth=1
.Ltmp3:
	movq	%rbx, %rdi
	movq	%r12, %rdx
	callq	_ZNSt6vectorIfSaIfEE17_M_realloc_insertIJfEEEvN9__gnu_cxx17__normal_iteratorIPfS1_EEDpOT_
.Ltmp4:
# %bb.6:                                # %._ZNSt6vectorIfSaIfEE9push_backEOf.exit_crit_edge
                                        #   in Loop: Header=BB0_2 Depth=1
	movq	16(%rsp), %r13
.LBB0_7:                                # %_ZNSt6vectorIfSaIfEE9push_backEOf.exit
                                        #   in Loop: Header=BB0_2 Depth=1
	cmpq	%rbp, %r13
	je	.LBB0_9
# %bb.8:                                # %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i
                                        #   in Loop: Header=BB0_2 Depth=1
	movq	%r13, %rdi
	callq	_ZdlPv
.LBB0_9:                                # %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit
                                        #   in Loop: Header=BB0_2 Depth=1
	movq	48(%rsp), %rax
	movq	-24(%rax), %rax
	cmpl	$0, 80(%rsp,%rax)
	je	.LBB0_2
.LBB0_10:                               # %._crit_edge
	leaq	48(%rsp), %rdi
	movl	$_ZTTNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEE, %esi
	callq	_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED2Ev
	leaq	176(%rsp), %rdi
	callq	_ZNSt8ios_baseD2Ev
	addq	$440, %rsp                      # imm = 0x1B8
	.cfi_def_cfa_offset 56
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%r12
	.cfi_def_cfa_offset 40
	popq	%r13
	.cfi_def_cfa_offset 32
	popq	%r14
	.cfi_def_cfa_offset 24
	popq	%r15
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	retq
.LBB0_12:
	.cfi_def_cfa_offset 496
.Ltmp5:
	jmp	.LBB0_13
.LBB0_11:
.Ltmp2:
.LBB0_13:
	movq	%rax, %rbx
	movq	16(%rsp), %rdi
	cmpq	%rbp, %rdi
	je	.LBB0_15
# %bb.14:                               # %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i7
	callq	_ZdlPv
.LBB0_15:                               # %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit9
	leaq	48(%rsp), %rdi
	movl	$_ZTTNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEE, %esi
	callq	_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED2Ev
	leaq	176(%rsp), %rdi
	callq	_ZNSt8ios_baseD2Ev
	movq	%rbx, %rdi
	callq	_Unwind_Resume@PLT
.Lfunc_end0:
	.size	_Z17stringToIntParserRNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERSt6vectorIfSaIfEE, .Lfunc_end0-_Z17stringToIntParserRNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERSt6vectorIfSaIfEE
	.cfi_endproc
	.section	.gcc_except_table,"a",@progbits
	.p2align	2, 0x0
GCC_except_table0:
.Lexception0:
	.byte	255                             # @LPStart Encoding = omit
	.byte	255                             # @TType Encoding = omit
	.byte	1                               # Call site Encoding = uleb128
	.uleb128 .Lcst_end0-.Lcst_begin0
.Lcst_begin0:
	.uleb128 .Lfunc_begin0-.Lfunc_begin0    # >> Call Site 1 <<
	.uleb128 .Ltmp0-.Lfunc_begin0           #   Call between .Lfunc_begin0 and .Ltmp0
	.byte	0                               #     has no landing pad
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp0-.Lfunc_begin0           # >> Call Site 2 <<
	.uleb128 .Ltmp1-.Ltmp0                  #   Call between .Ltmp0 and .Ltmp1
	.uleb128 .Ltmp2-.Lfunc_begin0           #     jumps to .Ltmp2
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp3-.Lfunc_begin0           # >> Call Site 3 <<
	.uleb128 .Ltmp4-.Ltmp3                  #   Call between .Ltmp3 and .Ltmp4
	.uleb128 .Ltmp5-.Lfunc_begin0           #     jumps to .Ltmp5
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp4-.Lfunc_begin0           # >> Call Site 4 <<
	.uleb128 .Lfunc_end0-.Ltmp4             #   Call between .Ltmp4 and .Lfunc_end0
	.byte	0                               #     has no landing pad
	.byte	0                               #   On action: cleanup
.Lcst_end0:
	.p2align	2, 0x0
                                        # -- End function
	.text
	.globl	_Z7hasHashNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE # -- Begin function _Z7hasHashNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE
	.type	_Z7hasHashNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE,@function
_Z7hasHashNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: # @_Z7hasHashNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE
	.cfi_startproc
# %bb.0:
	movq	8(%rdi), %rcx
	testq	%rcx, %rcx
	je	.LBB1_6
# %bb.1:                                # %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE2atEm.exit.lr.ph
	movq	(%rdi), %rdx
	movb	$1, %al
	cmpb	$35, (%rdx)
	je	.LBB1_7
# %bb.2:                                # %.lr.ph.preheader
	movl	$1, %esi
.LBB1_3:                                # %.lr.ph
                                        # =>This Inner Loop Header: Depth=1
	movq	%rsi, %rax
	cmpq	%rsi, %rcx
	je	.LBB1_5
# %bb.4:                                # %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE2atEm.exit
                                        #   in Loop: Header=BB1_3 Depth=1
	leaq	1(%rax), %rsi
	cmpb	$35, (%rdx,%rax)
	jne	.LBB1_3
.LBB1_5:                                # %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE2atEm.exit._crit_edge.loopexit
	cmpq	%rax, %rcx
	seta	%al
.LBB1_7:                                # %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE2atEm.exit._crit_edge
                                        # kill: def $al killed $al killed $eax
	retq
.LBB1_6:
	xorl	%eax, %eax
                                        # kill: def $al killed $al killed $eax
	retq
.Lfunc_end1:
	.size	_Z7hasHashNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE, .Lfunc_end1-_Z7hasHashNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE
	.cfi_endproc
                                        # -- End function
	.globl	_Z28__device_stub__caclulation3DPfS_S_iiif # -- Begin function _Z28__device_stub__caclulation3DPfS_S_iiif
	.type	_Z28__device_stub__caclulation3DPfS_S_iiif,@function
_Z28__device_stub__caclulation3DPfS_S_iiif: # @_Z28__device_stub__caclulation3DPfS_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	$_Z13caclulation3DPfS_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_end2:
	.size	_Z28__device_stub__caclulation3DPfS_S_iiif, .Lfunc_end2-_Z28__device_stub__caclulation3DPfS_S_iiif
	.cfi_endproc
                                        # -- End function
	.globl	_Z28__device_stub__caclulation2DPfS_S_iif # -- Begin function _Z28__device_stub__caclulation2DPfS_S_iif
	.type	_Z28__device_stub__caclulation2DPfS_S_iif,@function
_Z28__device_stub__caclulation2DPfS_S_iif: # @_Z28__device_stub__caclulation2DPfS_S_iif
	.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	$144, %rsp
	.cfi_def_cfa_offset 192
	.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
	movss	%xmm0, (%r8)
	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)
	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	$_Z13caclulation2DPfS_S_iif, %edi
	movq	%rbx, %r9
	pushq	(%r13)
	.cfi_adjust_cfa_offset 8
	pushq	(%r12)
	.cfi_adjust_cfa_offset 8
	callq	hipLaunchKernel
	addq	$160, %rsp
	.cfi_adjust_cfa_offset -160
	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_end3:
	.size	_Z28__device_stub__caclulation2DPfS_S_iif, .Lfunc_end3-_Z28__device_stub__caclulation2DPfS_S_iif
	.cfi_endproc
                                        # -- End function
	.globl	_Z12initialize2DPfS_iifSt6vectorIfSaIfEE # -- Begin function _Z12initialize2DPfS_iifSt6vectorIfSaIfEE
	.type	_Z12initialize2DPfS_iifSt6vectorIfSaIfEE,@function
_Z12initialize2DPfS_iifSt6vectorIfSaIfEE: # @_Z12initialize2DPfS_iifSt6vectorIfSaIfEE
	.cfi_startproc
# %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	pushq	%r15
	.cfi_def_cfa_offset 24
	pushq	%r14
	.cfi_def_cfa_offset 32
	pushq	%r13
	.cfi_def_cfa_offset 40
	pushq	%r12
	.cfi_def_cfa_offset 48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	.cfi_offset %rbp, -16
	testl	%ecx, %ecx
	jle	.LBB4_6
# %bb.1:                                # %.preheader48.lr.ph
	movl	%ecx, %eax
	movl	%edx, %ecx
	xorl	%r9d, %r9d
	xorl	%r10d, %r10d
.LBB4_2:                                # %.preheader48
                                        # =>This Loop Header: Depth=1
                                        #     Child Loop BB4_4 Depth 2
	testl	%edx, %edx
	jle	.LBB4_5
# %bb.3:                                # %.lr.ph
                                        #   in Loop: Header=BB4_2 Depth=1
	movl	%r9d, %ebx
	leaq	(%rsi,%rbx,4), %r11
	leaq	(%rdi,%rbx,4), %rbx
	xorl	%r14d, %r14d
.LBB4_4:                                #   Parent Loop BB4_2 Depth=1
                                        # =>  This Inner Loop Header: Depth=2
	movss	%xmm0, (%rbx,%r14,4)
	movss	%xmm0, (%r11,%r14,4)
	incq	%r14
	cmpq	%r14, %rcx
	jne	.LBB4_4
.LBB4_5:                                # %._crit_edge
                                        #   in Loop: Header=BB4_2 Depth=1
	incq	%r10
	addl	%edx, %r9d
	cmpq	%rax, %r10
	jne	.LBB4_2
.LBB4_6:                                # %.preheader47
	movq	(%r8), %rax
	movq	8(%r8), %rcx
	subq	%rax, %rcx
	je	.LBB4_14
# %bb.7:                                # %.lr.ph62.preheader
	sarq	$2, %rcx
	movslq	%edx, %rdx
	shlq	$2, %rdx
	xorl	%r8d, %r8d
.LBB4_9:                                # %.lr.ph62
                                        # =>This Loop Header: Depth=1
                                        #     Child Loop BB4_11 Depth 2
                                        #       Child Loop BB4_13 Depth 3
	cvttss2si	12(%rax,%r8,4), %ebp
	testl	%ebp, %ebp
	jle	.LBB4_8
# %bb.10:                               # %.preheader.lr.ph
                                        #   in Loop: Header=BB4_9 Depth=1
	movss	16(%rax,%r8,4), %xmm0           # xmm0 = mem[0],zero,zero,zero
	cvttss2si	4(%rax,%r8,4), %ebx
	addl	%ebx, %ebp
	cvttss2si	(%rax,%r8,4), %r10d
	cvttss2si	8(%rax,%r8,4), %r9d
	leal	(%r9,%r10), %r11d
	movslq	%r10d, %r10
	movslq	%r11d, %r11
	movslq	%ebx, %rbx
	movslq	%ebp, %r14
	movq	%rdx, %r15
	imulq	%rbx, %r15
	leaq	(%rdi,%r15), %r12
	addq	%rsi, %r15
.LBB4_11:                               # %.preheader
                                        #   Parent Loop BB4_9 Depth=1
                                        # =>  This Loop Header: Depth=2
                                        #       Child Loop BB4_13 Depth 3
	movq	%r10, %r13
	testl	%r9d, %r9d
	jle	.LBB4_12
.LBB4_13:                               #   Parent Loop BB4_9 Depth=1
                                        #     Parent Loop BB4_11 Depth=2
                                        # =>    This Inner Loop Header: Depth=3
	movss	%xmm0, (%r12,%r13,4)
	movl	$8388608, (%r15,%r13,4)         # imm = 0x800000
	incq	%r13
	cmpq	%r11, %r13
	jl	.LBB4_13
.LBB4_12:                               # %._crit_edge53
                                        #   in Loop: Header=BB4_11 Depth=2
	incq	%rbx
	addq	%rdx, %r12
	addq	%rdx, %r15
	cmpq	%r14, %rbx
	jl	.LBB4_11
.LBB4_8:                                # %.loopexit
                                        #   in Loop: Header=BB4_9 Depth=1
	addq	$5, %r8
	cmpq	%r8, %rcx
	ja	.LBB4_9
.LBB4_14:                               # %._crit_edge63
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%r12
	.cfi_def_cfa_offset 40
	popq	%r13
	.cfi_def_cfa_offset 32
	popq	%r14
	.cfi_def_cfa_offset 24
	popq	%r15
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	retq
.Lfunc_end4:
	.size	_Z12initialize2DPfS_iifSt6vectorIfSaIfEE, .Lfunc_end4-_Z12initialize2DPfS_iifSt6vectorIfSaIfEE
	.cfi_endproc
                                        # -- End function
	.globl	_Z12initialize3DPfS_iiifSt6vectorIfSaIfEE # -- Begin function _Z12initialize3DPfS_iiifSt6vectorIfSaIfEE
	.type	_Z12initialize3DPfS_iiifSt6vectorIfSaIfEE,@function
_Z12initialize3DPfS_iiifSt6vectorIfSaIfEE: # @_Z12initialize3DPfS_iiifSt6vectorIfSaIfEE
	.cfi_startproc
# %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	pushq	%r15
	.cfi_def_cfa_offset 24
	pushq	%r14
	.cfi_def_cfa_offset 32
	pushq	%r13
	.cfi_def_cfa_offset 40
	pushq	%r12
	.cfi_def_cfa_offset 48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	.cfi_offset %rbp, -16
	testl	%r8d, %r8d
	jle	.LBB5_7
# %bb.1:                                # %.preheader77.lr.ph
	movl	%edx, %r12d
	movl	%ecx, %eax
	imull	%edx, %eax
	xorl	%r11d, %r11d
	xorl	%ebx, %ebx
.LBB5_2:                                # %.preheader77
                                        # =>This Loop Header: Depth=1
                                        #     Child Loop BB5_4 Depth 2
                                        #       Child Loop BB5_9 Depth 3
	testl	%ecx, %ecx
	jle	.LBB5_6
# %bb.3:                                # %.preheader76.lr.ph
                                        #   in Loop: Header=BB5_2 Depth=1
	xorl	%ebp, %ebp
	movl	%r11d, %r14d
.LBB5_4:                                # %.preheader76
                                        #   Parent Loop BB5_2 Depth=1
                                        # =>  This Loop Header: Depth=2
                                        #       Child Loop BB5_9 Depth 3
	movq	%r12, %r10
	movl	%r14d, %r15d
	testl	%edx, %edx
	jle	.LBB5_5
.LBB5_9:                                #   Parent Loop BB5_2 Depth=1
                                        #     Parent Loop BB5_4 Depth=2
                                        # =>    This Inner Loop Header: Depth=3
	movslq	%r15d, %r15
	movss	%xmm0, (%rdi,%r15,4)
	movss	%xmm0, (%rsi,%r15,4)
	incl	%r15d
	decq	%r10
	jne	.LBB5_9
.LBB5_5:                                # %._crit_edge
                                        #   in Loop: Header=BB5_4 Depth=2
	incl	%ebp
	addl	%edx, %r14d
	cmpl	%ecx, %ebp
	jne	.LBB5_4
.LBB5_6:                                # %._crit_edge80
                                        #   in Loop: Header=BB5_2 Depth=1
	incl	%ebx
	addl	%eax, %r11d
	cmpl	%r8d, %ebx
	jne	.LBB5_2
.LBB5_7:                                # %.preheader75
	movl	%ecx, -40(%rsp)                 # 4-byte Spill
	movq	(%r9), %rax
	movq	8(%r9), %rcx
	movq	%rax, -24(%rsp)                 # 8-byte Spill
	subq	%rax, %rcx
	movq	%rcx, -32(%rsp)                 # 8-byte Spill
	je	.LBB5_19
# %bb.8:                                # %.lr.ph99.preheader
	sarq	$2, -32(%rsp)                   # 8-byte Folded Spill
	movl	-40(%rsp), %eax                 # 4-byte Reload
	imull	%edx, %eax
	movl	%eax, -36(%rsp)                 # 4-byte Spill
	xorl	%ecx, %ecx
.LBB5_11:                               # %.lr.ph99
                                        # =>This Loop Header: Depth=1
                                        #     Child Loop BB5_13 Depth 2
                                        #       Child Loop BB5_15 Depth 3
                                        #         Child Loop BB5_18 Depth 4
	movq	-24(%rsp), %rax                 # 8-byte Reload
	movq	%rcx, -16(%rsp)                 # 8-byte Spill
	cvttss2si	20(%rax,%rcx,4), %r11d
	testl	%r11d, %r11d
	jle	.LBB5_10
# %bb.12:                               # %.preheader74.lr.ph
                                        #   in Loop: Header=BB5_11 Depth=1
	movq	-24(%rsp), %rcx                 # 8-byte Reload
	movq	-16(%rsp), %r8                  # 8-byte Reload
	cvttss2si	4(%rcx,%r8,4), %r10d
	cvttss2si	8(%rcx,%r8,4), %ebp
	movss	24(%rcx,%r8,4), %xmm0           # xmm0 = mem[0],zero,zero,zero
	cvttss2si	(%rcx,%r8,4), %eax
	addl	%ebp, %r11d
	cvttss2si	16(%rcx,%r8,4), %r14d
	cvttss2si	12(%rcx,%r8,4), %r15d
	leal	(%r14,%r10), %r12d
	leal	(%r15,%rax), %ecx
	movslq	%eax, %r9
	movslq	%ecx, %r8
	movl	-40(%rsp), %eax                 # 4-byte Reload
	imull	%ebp, %eax
	movq	%r10, -8(%rsp)                  # 8-byte Spill
	addl	%r10d, %eax
	imull	%edx, %eax
	addl	%r9d, %eax
.LBB5_13:                               # %.preheader74
                                        #   Parent Loop BB5_11 Depth=1
                                        # =>  This Loop Header: Depth=2
                                        #       Child Loop BB5_15 Depth 3
                                        #         Child Loop BB5_18 Depth 4
	testl	%r14d, %r14d
	jle	.LBB5_17
# %bb.14:                               # %.preheader.lr.ph
                                        #   in Loop: Header=BB5_13 Depth=2
	movl	%eax, %ecx
	movq	-8(%rsp), %r10                  # 8-byte Reload
                                        # kill: def $r10d killed $r10d killed $r10
.LBB5_15:                               # %.preheader
                                        #   Parent Loop BB5_11 Depth=1
                                        #     Parent Loop BB5_13 Depth=2
                                        # =>    This Loop Header: Depth=3
                                        #         Child Loop BB5_18 Depth 4
	movl	%ecx, %ebx
	movq	%r9, %r13
	testl	%r15d, %r15d
	jle	.LBB5_16
.LBB5_18:                               #   Parent Loop BB5_11 Depth=1
                                        #     Parent Loop BB5_13 Depth=2
                                        #       Parent Loop BB5_15 Depth=3
                                        # =>      This Inner Loop Header: Depth=4
	movslq	%ebx, %rbx
	movss	%xmm0, (%rdi,%rbx,4)
	movl	$8388608, (%rsi,%rbx,4)         # imm = 0x800000
	incq	%r13
	incl	%ebx
	cmpq	%r8, %r13
	jl	.LBB5_18
.LBB5_16:                               # %._crit_edge84
                                        #   in Loop: Header=BB5_15 Depth=3
	incl	%r10d
	addl	%edx, %ecx
	cmpl	%r12d, %r10d
	jl	.LBB5_15
.LBB5_17:                               # %._crit_edge86
                                        #   in Loop: Header=BB5_13 Depth=2
	incl	%ebp
	addl	-36(%rsp), %eax                 # 4-byte Folded Reload
	cmpl	%r11d, %ebp
	jl	.LBB5_13
.LBB5_10:                               # %.loopexit
                                        #   in Loop: Header=BB5_11 Depth=1
	movq	-16(%rsp), %rcx                 # 8-byte Reload
	addq	$7, %rcx
	cmpq	%rcx, -32(%rsp)                 # 8-byte Folded Reload
	ja	.LBB5_11
.LBB5_19:                               # %._crit_edge100
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%r12
	.cfi_def_cfa_offset 40
	popq	%r13
	.cfi_def_cfa_offset 32
	popq	%r14
	.cfi_def_cfa_offset 24
	popq	%r15
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	retq
.Lfunc_end5:
	.size	_Z12initialize3DPfS_iiifSt6vectorIfSaIfEE, .Lfunc_end5-_Z12initialize3DPfS_iiifSt6vectorIfSaIfEE
	.cfi_endproc
                                        # -- End function
	.globl	_Z11writeoutputPfPKciiii        # -- Begin function _Z11writeoutputPfPKciiii
	.type	_Z11writeoutputPfPKciiii,@function
_Z11writeoutputPfPKciiii:               # @_Z11writeoutputPfPKciiii
	.cfi_startproc
# %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	pushq	%r15
	.cfi_def_cfa_offset 24
	pushq	%r14
	.cfi_def_cfa_offset 32
	pushq	%r13
	.cfi_def_cfa_offset 40
	pushq	%r12
	.cfi_def_cfa_offset 48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	subq	$72, %rsp
	.cfi_def_cfa_offset 128
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	.cfi_offset %rbp, -16
	movl	%r9d, %r13d
	movl	%r8d, 44(%rsp)                  # 4-byte Spill
	movl	%ecx, 8(%rsp)                   # 4-byte Spill
                                        # kill: def $edx killed $edx def $rdx
	movq	%rdx, 16(%rsp)                  # 8-byte Spill
	movq	%rsi, %rax
	movq	%rdi, %rbx
	movl	$.L.str, %esi
	movq	%rax, %rdi
	callq	fopen
	testq	%rax, %rax
	je	.LBB6_1
# %bb.2:
	movq	%rax, %r15
	movq	%rbx, 56(%rsp)                  # 8-byte Spill
	cmpl	$3, %r13d
	jne	.LBB6_3
# %bb.9:                                # %.preheader62
	cmpl	$0, 44(%rsp)                    # 4-byte Folded Reload
	jle	.LBB6_18
# %bb.10:                               # %.preheader61.lr.ph
	movq	16(%rsp), %rax                  # 8-byte Reload
	leal	-1(%rax), %r13d
	movl	%eax, %r12d
	xorl	%eax, %eax
	movq	%rax, 32(%rsp)                  # 8-byte Spill
	movq	%r15, 64(%rsp)                  # 8-byte Spill
	movq	56(%rsp), %rbx                  # 8-byte Reload
.LBB6_11:                               # %.preheader61
                                        # =>This Loop Header: Depth=1
                                        #     Child Loop BB6_13 Depth 2
                                        #       Child Loop BB6_15 Depth 3
	cmpl	$0, 8(%rsp)                     # 4-byte Folded Reload
	jle	.LBB6_17
# %bb.12:                               # %.preheader.lr.ph
                                        #   in Loop: Header=BB6_11 Depth=1
	movq	32(%rsp), %rax                  # 8-byte Reload
                                        # kill: def $eax killed $eax killed $rax def $rax
	imull	8(%rsp), %eax                   # 4-byte Folded Reload
	movq	%rax, 48(%rsp)                  # 8-byte Spill
	xorl	%eax, %eax
	movq	%rax, 24(%rsp)                  # 8-byte Spill
.LBB6_13:                               # %.preheader
                                        #   Parent Loop BB6_11 Depth=1
                                        # =>  This Loop Header: Depth=2
                                        #       Child Loop BB6_15 Depth 3
	cmpl	$0, 16(%rsp)                    # 4-byte Folded Reload
	movl	$.L.str.2, %edx
	movq	64(%rsp), %r15                  # 8-byte Reload
	jle	.LBB6_16
# %bb.14:                               # %.lr.ph69
                                        #   in Loop: Header=BB6_13 Depth=2
	movq	48(%rsp), %rax                  # 8-byte Reload
	movq	24(%rsp), %rcx                  # 8-byte Reload
	leal	(%rcx,%rax), %r14d
	imull	16(%rsp), %r14d                 # 4-byte Folded Reload
	xorl	%ebp, %ebp
.LBB6_15:                               #   Parent Loop BB6_11 Depth=1
                                        #     Parent Loop BB6_13 Depth=2
                                        # =>    This Inner Loop Header: Depth=3
	cmpq	%rbp, %r13
	movl	%ebp, %eax
	cmovel	%r13d, %eax
	movl	$.L.str.1, %esi
	cmoveq	%rdx, %rsi
	addl	%r14d, %eax
	cltq
	xorps	%xmm0, %xmm0
	cvtss2sd	(%rbx,%rax,4), %xmm0
	movq	%r15, %rdi
	movb	$1, %al
	callq	fprintf
	movl	$.L.str.2, %edx
	incq	%rbp
	cmpq	%rbp, %r12
	jne	.LBB6_15
.LBB6_16:                               # %._crit_edge70
                                        #   in Loop: Header=BB6_13 Depth=2
	movq	24(%rsp), %rax                  # 8-byte Reload
	incl	%eax
	movq	%rax, 24(%rsp)                  # 8-byte Spill
	cmpl	8(%rsp), %eax                   # 4-byte Folded Reload
	jne	.LBB6_13
.LBB6_17:                               # %._crit_edge72
                                        #   in Loop: Header=BB6_11 Depth=1
	movl	$10, %edi
	movq	64(%rsp), %r15                  # 8-byte Reload
	movq	%r15, %rsi
	callq	fputc@PLT
	movq	32(%rsp), %rax                  # 8-byte Reload
	incl	%eax
	movq	%rax, 32(%rsp)                  # 8-byte Spill
	cmpl	44(%rsp), %eax                  # 4-byte Folded Reload
	jne	.LBB6_11
	jmp	.LBB6_18
.LBB6_1:
	movl	$-1, %eax
	jmp	.LBB6_19
.LBB6_3:                                # %.preheader64
	cmpl	$0, 8(%rsp)                     # 4-byte Folded Reload
	jle	.LBB6_18
# %bb.4:                                # %.preheader63.lr.ph
	movq	16(%rsp), %rax                  # 8-byte Reload
	leal	-1(%rax), %r12d
	movl	8(%rsp), %ecx                   # 4-byte Reload
	movq	%rcx, 48(%rsp)                  # 8-byte Spill
	movl	%eax, %ebp
	movq	56(%rsp), %rax                  # 8-byte Reload
	leaq	(%rax,%r12,4), %rax
	movq	%rax, 32(%rsp)                  # 8-byte Spill
	shlq	$2, %r12
	shlq	$2, %rbp
	xorl	%eax, %eax
	movq	%rax, 24(%rsp)                  # 8-byte Spill
	movl	$.L.str.2, %edx
	xorl	%eax, %eax
	movq	%rax, 8(%rsp)                   # 8-byte Spill
.LBB6_5:                                # %.preheader63
                                        # =>This Loop Header: Depth=1
                                        #     Child Loop BB6_7 Depth 2
	cmpl	$0, 16(%rsp)                    # 4-byte Folded Reload
	jle	.LBB6_8
# %bb.6:                                # %.lr.ph
                                        #   in Loop: Header=BB6_5 Depth=1
	movl	24(%rsp), %eax                  # 4-byte Reload
	movq	56(%rsp), %rcx                  # 8-byte Reload
	leaq	(%rcx,%rax,4), %rbx
	movq	8(%rsp), %rax                   # 8-byte Reload
                                        # kill: def $eax killed $eax killed $rax def $rax
	imull	16(%rsp), %eax                  # 4-byte Folded Reload
	movq	32(%rsp), %rcx                  # 8-byte Reload
	leaq	(%rcx,%rax,4), %r14
	xorl	%r13d, %r13d
.LBB6_7:                                #   Parent Loop BB6_5 Depth=1
                                        # =>  This Inner Loop Header: Depth=2
	leaq	(%rbx,%r13), %rax
	cmpq	%r13, %r12
	cmoveq	%r14, %rax
	movl	$.L.str.1, %esi
	cmoveq	%rdx, %rsi
	xorps	%xmm0, %xmm0
	cvtss2sd	(%rax), %xmm0
	movq	%r15, %rdi
	movb	$1, %al
	callq	fprintf
	movl	$.L.str.2, %edx
	addq	$4, %r13
	cmpq	%r13, %rbp
	jne	.LBB6_7
.LBB6_8:                                # %._crit_edge
                                        #   in Loop: Header=BB6_5 Depth=1
	movq	8(%rsp), %rcx                   # 8-byte Reload
	incq	%rcx
	movq	24(%rsp), %rax                  # 8-byte Reload
	addl	16(%rsp), %eax                  # 4-byte Folded Reload
	movq	%rax, 24(%rsp)                  # 8-byte Spill
	movq	%rcx, %rax
	movq	%rcx, 8(%rsp)                   # 8-byte Spill
	cmpq	48(%rsp), %rcx                  # 8-byte Folded Reload
	jne	.LBB6_5
.LBB6_18:                               # %.loopexit
	movq	%r15, %rdi
	callq	fclose
	xorl	%eax, %eax
.LBB6_19:
	addq	$72, %rsp
	.cfi_def_cfa_offset 56
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%r12
	.cfi_def_cfa_offset 40
	popq	%r13
	.cfi_def_cfa_offset 32
	popq	%r14
	.cfi_def_cfa_offset 24
	popq	%r15
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	retq
.Lfunc_end6:
	.size	_Z11writeoutputPfPKciiii, .Lfunc_end6-_Z11writeoutputPfPKciiii
	.cfi_endproc
                                        # -- End function
	.globl	main                            # -- Begin function main
	.type	main,@function
main:                                   # @main
.Lfunc_begin1:
	.cfi_startproc
	.cfi_personality 3, __gxx_personality_v0
	.cfi_lsda 3, .Lexception1
# %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	pushq	%r15
	.cfi_def_cfa_offset 24
	pushq	%r14
	.cfi_def_cfa_offset 32
	pushq	%r13
	.cfi_def_cfa_offset 40
	pushq	%r12
	.cfi_def_cfa_offset 48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	subq	$808, %rsp                      # imm = 0x328
	.cfi_def_cfa_offset 864
	.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	288(%rsp), %rbx
	movq	%rbx, %rdi
	movl	$8, %edx
	callq	_ZNSt14basic_ifstreamIcSt11char_traitsIcEEC1EPKcSt13_Ios_Openmode
	leaq	192(%rsp), %rcx
	movq	%rcx, -16(%rcx)
	xorl	%eax, %eax
	movq	%rax, -8(%rcx)
	movb	$0, (%rcx)
	leaq	64(%rsp), %rcx
	movq	%rax, 16(%rcx)
	xorps	%xmm0, %xmm0
	movaps	%xmm0, (%rcx)
	movq	%rax, 160(%rsp)
	movaps	%xmm0, 144(%rsp)
	movq	%rax, 128(%rsp)
	movaps	%xmm0, 112(%rsp)
	leaq	224(%rsp), %r13
	leaq	176(%rsp), %r15
	leaq	208(%rsp), %r12
.LBB7_1:                                # %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit.thread
                                        # =>This Loop Header: Depth=1
                                        #     Child Loop BB7_9 Depth 2
	movq	288(%rsp), %rax
	movq	-24(%rax), %rdi
	addq	%rbx, %rdi
.Ltmp6:
	movl	$10, %esi
	callq	_ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc
.Ltmp7:
# %bb.2:                                # %.noexc
                                        #   in Loop: Header=BB7_1 Depth=1
.Ltmp8:
	movsbl	%al, %edx
	movq	%rbx, %rdi
	movq	%r15, %rsi
	callq	_ZSt7getlineIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EES4_
.Ltmp9:
# %bb.3:                                #   in Loop: Header=BB7_1 Depth=1
	movq	(%rax), %rcx
	movq	-24(%rcx), %rcx
	testb	$5, 32(%rax,%rcx)
	jne	.LBB7_21
# %bb.4:                                #   in Loop: Header=BB7_1 Depth=1
	movq	184(%rsp), %rdx
	testq	%rdx, %rdx
	je	.LBB7_1
# %bb.5:                                #   in Loop: Header=BB7_1 Depth=1
	movq	%r13, 208(%rsp)
	movq	176(%rsp), %rsi
	addq	%rsi, %rdx
.Ltmp57:
	movq	%r12, %rdi
	callq	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag
.Ltmp58:
# %bb.6:                                # %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2ERKS4_.exit
                                        #   in Loop: Header=BB7_1 Depth=1
	movq	208(%rsp), %rdi
	movq	216(%rsp), %rbp
	testq	%rbp, %rbp
	je	.LBB7_16
# %bb.7:                                # %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE2atEm.exit.lr.ph.i
                                        #   in Loop: Header=BB7_1 Depth=1
	cmpb	$35, (%rdi)
	jne	.LBB7_8
# %bb.14:                               # %_Z7hasHashNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE.exit.thread
                                        #   in Loop: Header=BB7_1 Depth=1
	cmpq	%r13, %rdi
	je	.LBB7_1
# %bb.15:                               # %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i.thread174
                                        #   in Loop: Header=BB7_1 Depth=1
	callq	_ZdlPv
	jmp	.LBB7_1
.LBB7_16:                               # %_Z7hasHashNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE.exit.thread163.thread
                                        #   in Loop: Header=BB7_1 Depth=1
	cmpq	%r13, %rdi
	je	.LBB7_13
# %bb.17:                               # %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i.thread
                                        #   in Loop: Header=BB7_1 Depth=1
	callq	_ZdlPv
	jmp	.LBB7_13
.LBB7_8:                                # %.lr.ph.preheader
                                        #   in Loop: Header=BB7_1 Depth=1
	movl	$1, %eax
.LBB7_9:                                # %.lr.ph
                                        #   Parent Loop BB7_1 Depth=1
                                        # =>  This Inner Loop Header: Depth=2
	movq	%rax, %r14
	cmpq	%rax, %rbp
	je	.LBB7_11
# %bb.10:                               # %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE2atEm.exit.i
                                        #   in Loop: Header=BB7_9 Depth=2
	leaq	1(%r14), %rax
	cmpb	$35, (%rdi,%r14)
	jne	.LBB7_9
.LBB7_11:                               # %_Z7hasHashNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE.exit
                                        #   in Loop: Header=BB7_1 Depth=1
	cmpq	%r13, %rdi
	je	.LBB7_12
# %bb.18:                               # %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i
                                        #   in Loop: Header=BB7_1 Depth=1
	callq	_ZdlPv
.LBB7_12:                               # %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.thread.i.i
                                        #   in Loop: Header=BB7_1 Depth=1
	cmpq	%r14, %rbp
	ja	.LBB7_1
.LBB7_13:                               # %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.thread.i.i.thread
                                        #   in Loop: Header=BB7_1 Depth=1
.Ltmp59:
	leaq	64(%rsp), %rdi
	movq	%r15, %rsi
	callq	_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE9push_backERKS5_
.Ltmp60:
	jmp	.LBB7_1
.LBB7_21:
	movq	64(%rsp), %r14
	movq	(%r14), %rdi
	callq	atoi
	movl	%eax, %ebx
	movq	32(%r14), %rdi
	callq	atof
	movsd	%xmm0, 168(%rsp)                # 8-byte Spill
	movq	64(%r14), %rdi
	callq	atoi
	movl	%eax, %ebp
	addq	$96, %r14
.Ltmp10:
	leaq	144(%rsp), %rsi
	movq	%r14, %rdi
	callq	_Z17stringToIntParserRNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERSt6vectorIfSaIfEE
.Ltmp11:
# %bb.22:
	movq	64(%rsp), %r14
	movq	128(%r14), %rdi
	callq	atof
	movsd	%xmm0, 24(%rsp)                 # 8-byte Spill
	movq	72(%rsp), %rax
	subq	%r14, %rax
	cmpq	$161, %rax
	jb	.LBB7_26
# %bb.23:                               # %.lr.ph167.preheader
	movl	$5, %r12d
	movl	$160, %r13d
	leaq	112(%rsp), %r15
.LBB7_24:                               # %.lr.ph167
                                        # =>This Inner Loop Header: Depth=1
	addq	%r13, %r14
.Ltmp13:
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_Z17stringToIntParserRNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERSt6vectorIfSaIfEE
.Ltmp14:
# %bb.25:                               #   in Loop: Header=BB7_24 Depth=1
	incq	%r12
	movq	64(%rsp), %r14
	movq	72(%rsp), %rax
	subq	%r14, %rax
	sarq	$5, %rax
	addq	$32, %r13
	cmpq	%r12, %rax
	ja	.LBB7_24
.LBB7_26:                               # %._crit_edge
	movq	144(%rsp), %rax
	cvttss2si	4(%rax), %ecx
	movl	%ecx, 16(%rsp)                  # 4-byte Spill
	cvttss2si	(%rax), %ecx
	movl	%ecx, 12(%rsp)                  # 4-byte Spill
	xorl	%r12d, %r12d
	cmpl	$3, %ebx
	jne	.LBB7_28
# %bb.27:
	cvttss2si	8(%rax), %r12d
.LBB7_28:
	movl	12(%rsp), %eax                  # 4-byte Reload
	imull	16(%rsp), %eax                  # 4-byte Folded Reload
	movl	%r12d, 20(%rsp)                 # 4-byte Spill
	imull	%eax, %r12d
	cmpl	$3, %ebx
	movl	%eax, 60(%rsp)                  # 4-byte Spill
	cmovel	%r12d, %eax
	shll	$2, %eax
	movslq	%eax, %r13
	movq	%r13, %rdi
	callq	malloc
	movq	%rax, %r14
	movq	%r13, %rdi
	callq	malloc
	movq	%rax, 40(%rsp)                  # 8-byte Spill
.Ltmp16:
	leaq	104(%rsp), %r15
	movq	%r15, %rdi
	movq	%r13, %rsi
	callq	hipMalloc
.Ltmp17:
# %bb.29:
.Ltmp18:
	leaq	32(%rsp), %rdi
	movq	%r13, %rsi
	callq	hipMalloc
.Ltmp19:
# %bb.30:
.Ltmp20:
	leaq	48(%rsp), %rdi
	movq	%r13, %rsi
	callq	hipMalloc
.Ltmp21:
# %bb.31:
	movq	%r13, 88(%rsp)                  # 8-byte Spill
	xorps	%xmm0, %xmm0
	cvtsd2ss	24(%rsp), %xmm0                 # 8-byte Folded Reload
	movss	%xmm0, 24(%rsp)                 # 4-byte Spill
	cmpl	$2, %ebx
	movq	%r14, 96(%rsp)                  # 8-byte Spill
	jne	.LBB7_34
# %bb.32:
.Ltmp24:
	leaq	264(%rsp), %rdi
	leaq	112(%rsp), %rsi
	callq	_ZNSt6vectorIfSaIfEEC2ERKS1_
.Ltmp25:
# %bb.33:
	leaq	264(%rsp), %r13
	movq	%r14, %rdi
	movq	40(%rsp), %rsi                  # 8-byte Reload
	movl	12(%rsp), %edx                  # 4-byte Reload
	movl	16(%rsp), %ecx                  # 4-byte Reload
	movss	24(%rsp), %xmm0                 # 4-byte Reload
                                        # xmm0 = mem[0],zero,zero,zero
	movq	%r13, %r8
	callq	_Z12initialize2DPfS_iifSt6vectorIfSaIfEE
	jmp	.LBB7_36
.LBB7_34:
.Ltmp22:
	leaq	240(%rsp), %rdi
	leaq	112(%rsp), %rsi
	callq	_ZNSt6vectorIfSaIfEEC2ERKS1_
.Ltmp23:
# %bb.35:
	leaq	240(%rsp), %r13
	movq	%r14, %rdi
	movq	40(%rsp), %rsi                  # 8-byte Reload
	movl	12(%rsp), %edx                  # 4-byte Reload
	movl	16(%rsp), %ecx                  # 4-byte Reload
	movl	20(%rsp), %r8d                  # 4-byte Reload
	movss	24(%rsp), %xmm0                 # 4-byte Reload
                                        # xmm0 = mem[0],zero,zero,zero
	movq	%r13, %r9
	callq	_Z12initialize3DPfS_iiifSt6vectorIfSaIfEE
.LBB7_36:
	movq	(%r13), %rdi
	testq	%rdi, %rdi
	je	.LBB7_38
# %bb.37:                               # %_ZNSt6vectorIfSaIfEED2Ev.exit.sink.split
	callq	_ZdlPv
.LBB7_38:                               # %_ZNSt6vectorIfSaIfEED2Ev.exit
	movq	104(%rsp), %rdi
.Ltmp26:
	movq	96(%rsp), %r13                  # 8-byte Reload
	movq	%r13, %rsi
	movq	88(%rsp), %r14                  # 8-byte Reload
	movq	%r14, %rdx
	movl	$1, %ecx
	callq	hipMemcpy
.Ltmp27:
# %bb.39:
	movq	32(%rsp), %rdi
.Ltmp28:
	movq	%r13, %rsi
	movq	%r14, %rdx
	movl	$1, %ecx
	callq	hipMemcpy
.Ltmp29:
# %bb.40:
	movq	48(%rsp), %rdi
.Ltmp30:
	movq	40(%rsp), %rsi                  # 8-byte Reload
	movq	%r14, %rdx
	movl	$1, %ecx
	callq	hipMemcpy
.Ltmp31:
# %bb.41:
	cmpl	$0, 20(%rsp)                    # 4-byte Folded Reload
	cmovel	60(%rsp), %r12d                 # 4-byte Folded Reload
	movl	$512, %eax                      # imm = 0x200
	xorl	%ecx, %ecx
	cmpl	%eax, %r12d
	setge	%dl
	testl	%ebp, %ebp
	jle	.LBB7_61
# %bb.42:                               # %.lr.ph170
	xorps	%xmm0, %xmm0
	cvtsd2ss	168(%rsp), %xmm0                # 8-byte Folded Reload
	movss	%xmm0, 24(%rsp)                 # 4-byte Spill
	movb	%dl, %cl
	shll	$9, %ecx
	addl	%eax, %ecx
	movl	%ecx, %r13d
	btsq	$32, %r13
	movl	%r12d, %eax
	cltd
	idivl	%ecx
	movl	%eax, %r12d
	incl	%r12d
	btsq	$32, %r12
	xorl	%r14d, %r14d
.LBB7_43:                               # =>This Inner Loop Header: Depth=1
	testb	$1, %r14b
	jne	.LBB7_50
# %bb.44:                               #   in Loop: Header=BB7_43 Depth=1
	cmpl	$2, %ebx
	jne	.LBB7_48
# %bb.45:                               #   in Loop: Header=BB7_43 Depth=1
.Ltmp41:
	movq	%r12, %rdi
	movl	$1, %esi
	movq	%r13, %rdx
	movl	$1, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	__hipPushCallConfiguration
.Ltmp42:
# %bb.46:                               #   in Loop: Header=BB7_43 Depth=1
	movq	%r15, %rcx
	leaq	32(%rsp), %rsi
	jmp	.LBB7_53
.LBB7_50:                               #   in Loop: Header=BB7_43 Depth=1
	cmpl	$2, %ebx
	jne	.LBB7_55
# %bb.51:                               #   in Loop: Header=BB7_43 Depth=1
.Ltmp35:
	movq	%r12, %rdi
	movl	$1, %esi
	movq	%r13, %rdx
	movl	$1, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	__hipPushCallConfiguration
.Ltmp36:
# %bb.52:                               #   in Loop: Header=BB7_43 Depth=1
	leaq	32(%rsp), %rcx
	movq	%r15, %rsi
.LBB7_53:                               #   in Loop: Header=BB7_43 Depth=1
	testl	%eax, %eax
	jne	.LBB7_59
# %bb.54:                               # %.invoke175
                                        #   in Loop: Header=BB7_43 Depth=1
	movq	48(%rsp), %rdx
	movq	(%rsi), %rsi
	movq	(%rcx), %rdi
.Ltmp43:
	movl	12(%rsp), %ecx                  # 4-byte Reload
	movl	16(%rsp), %r8d                  # 4-byte Reload
	movss	24(%rsp), %xmm0                 # 4-byte Reload
                                        # xmm0 = mem[0],zero,zero,zero
	callq	_Z28__device_stub__caclulation2DPfS_S_iif
.Ltmp44:
	jmp	.LBB7_59
.LBB7_48:                               #   in Loop: Header=BB7_43 Depth=1
.Ltmp37:
	movq	%r12, %rdi
	movl	$1, %esi
	movq	%r13, %rdx
	movl	$1, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	__hipPushCallConfiguration
.Ltmp38:
# %bb.49:                               #   in Loop: Header=BB7_43 Depth=1
	movq	%r15, %rcx
	leaq	32(%rsp), %rsi
	jmp	.LBB7_57
.LBB7_55:                               #   in Loop: Header=BB7_43 Depth=1
.Ltmp33:
	movq	%r12, %rdi
	movl	$1, %esi
	movq	%r13, %rdx
	movl	$1, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	__hipPushCallConfiguration
.Ltmp34:
# %bb.56:                               #   in Loop: Header=BB7_43 Depth=1
	leaq	32(%rsp), %rcx
	movq	%r15, %rsi
.LBB7_57:                               #   in Loop: Header=BB7_43 Depth=1
	testl	%eax, %eax
	jne	.LBB7_59
# %bb.58:                               # %.invoke
                                        #   in Loop: Header=BB7_43 Depth=1
	movq	48(%rsp), %rdx
	movq	(%rsi), %rsi
	movq	(%rcx), %rdi
.Ltmp39:
	movl	12(%rsp), %ecx                  # 4-byte Reload
	movl	16(%rsp), %r8d                  # 4-byte Reload
	movl	20(%rsp), %r9d                  # 4-byte Reload
	movss	24(%rsp), %xmm0                 # 4-byte Reload
                                        # xmm0 = mem[0],zero,zero,zero
	callq	_Z28__device_stub__caclulation3DPfS_S_iiif
.Ltmp40:
.LBB7_59:                               #   in Loop: Header=BB7_43 Depth=1
.Ltmp45:
	callq	hipDeviceSynchronize
.Ltmp46:
# %bb.60:                               #   in Loop: Header=BB7_43 Depth=1
	incl	%r14d
	cmpl	%r14d, %ebp
	jne	.LBB7_43
.LBB7_61:                               # %._crit_edge171
	testb	$1, %bpl
	leaq	32(%rsp), %rax
	cmoveq	%rax, %r15
	movq	(%r15), %rsi
.Ltmp48:
	movq	96(%rsp), %r14                  # 8-byte Reload
	movq	%r14, %rdi
	movq	88(%rsp), %rdx                  # 8-byte Reload
	movl	$2, %ecx
	callq	hipMemcpy
.Ltmp49:
# %bb.62:
	movl	$.L.str.4, %esi
	movq	%r14, %rdi
	movl	12(%rsp), %edx                  # 4-byte Reload
	movl	16(%rsp), %ecx                  # 4-byte Reload
	movl	20(%rsp), %r8d                  # 4-byte Reload
	movl	%ebx, %r9d
	callq	_Z11writeoutputPfPKciiii
	movq	104(%rsp), %rdi
.Ltmp50:
	callq	hipFree
.Ltmp51:
# %bb.63:
	movq	32(%rsp), %rdi
.Ltmp52:
	callq	hipFree
.Ltmp53:
# %bb.64:
	movq	48(%rsp), %rdi
.Ltmp54:
	callq	hipFree
.Ltmp55:
# %bb.65:
	movq	%r14, %rdi
	callq	free
	movq	40(%rsp), %rdi                  # 8-byte Reload
	callq	free
	movq	112(%rsp), %rdi
	testq	%rdi, %rdi
	je	.LBB7_67
# %bb.66:
	callq	_ZdlPv
.LBB7_67:                               # %_ZNSt6vectorIfSaIfEED2Ev.exit129
	movq	144(%rsp), %rdi
	testq	%rdi, %rdi
	je	.LBB7_69
# %bb.68:
	callq	_ZdlPv
.LBB7_69:                               # %_ZNSt6vectorIfSaIfEED2Ev.exit131
	leaq	64(%rsp), %rdi
	callq	_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev
	movq	176(%rsp), %rdi
	leaq	192(%rsp), %rax
	cmpq	%rax, %rdi
	je	.LBB7_71
# %bb.70:                               # %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i132
	callq	_ZdlPv
.LBB7_71:                               # %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit134
	leaq	288(%rsp), %rdi
	callq	_ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev
	xorl	%eax, %eax
	addq	$808, %rsp                      # imm = 0x328
	.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
.LBB7_20:                               # %.loopexit.split-lp
	.cfi_def_cfa_offset 864
.Ltmp12:
	jmp	.LBB7_73
.LBB7_81:
.Ltmp56:
	jmp	.LBB7_73
.LBB7_72:
.Ltmp32:
	jmp	.LBB7_73
.LBB7_80:
.Ltmp15:
	jmp	.LBB7_73
.LBB7_47:
.Ltmp47:
	jmp	.LBB7_73
.LBB7_19:                               # %.loopexit
.Ltmp61:
.LBB7_73:
	movq	%rax, %rbx
	movq	112(%rsp), %rdi
	testq	%rdi, %rdi
	je	.LBB7_75
# %bb.74:
	callq	_ZdlPv
.LBB7_75:                               # %_ZNSt6vectorIfSaIfEED2Ev.exit136
	movq	144(%rsp), %rdi
	testq	%rdi, %rdi
	je	.LBB7_77
# %bb.76:
	callq	_ZdlPv
.LBB7_77:                               # %_ZNSt6vectorIfSaIfEED2Ev.exit138
	leaq	64(%rsp), %rdi
	callq	_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev
	movq	176(%rsp), %rdi
	leaq	192(%rsp), %rax
	cmpq	%rax, %rdi
	je	.LBB7_79
# %bb.78:                               # %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i139
	callq	_ZdlPv
.LBB7_79:                               # %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit141
	leaq	288(%rsp), %rdi
	callq	_ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev
	movq	%rbx, %rdi
	callq	_Unwind_Resume@PLT
.Lfunc_end7:
	.size	main, .Lfunc_end7-main
	.cfi_endproc
	.section	.gcc_except_table,"a",@progbits
	.p2align	2, 0x0
GCC_except_table7:
.Lexception1:
	.byte	255                             # @LPStart Encoding = omit
	.byte	255                             # @TType Encoding = omit
	.byte	1                               # Call site Encoding = uleb128
	.uleb128 .Lcst_end1-.Lcst_begin1
.Lcst_begin1:
	.uleb128 .Lfunc_begin1-.Lfunc_begin1    # >> Call Site 1 <<
	.uleb128 .Ltmp6-.Lfunc_begin1           #   Call between .Lfunc_begin1 and .Ltmp6
	.byte	0                               #     has no landing pad
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp6-.Lfunc_begin1           # >> Call Site 2 <<
	.uleb128 .Ltmp60-.Ltmp6                 #   Call between .Ltmp6 and .Ltmp60
	.uleb128 .Ltmp61-.Lfunc_begin1          #     jumps to .Ltmp61
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp10-.Lfunc_begin1          # >> Call Site 3 <<
	.uleb128 .Ltmp11-.Ltmp10                #   Call between .Ltmp10 and .Ltmp11
	.uleb128 .Ltmp12-.Lfunc_begin1          #     jumps to .Ltmp12
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp13-.Lfunc_begin1          # >> Call Site 4 <<
	.uleb128 .Ltmp14-.Ltmp13                #   Call between .Ltmp13 and .Ltmp14
	.uleb128 .Ltmp15-.Lfunc_begin1          #     jumps to .Ltmp15
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp16-.Lfunc_begin1          # >> Call Site 5 <<
	.uleb128 .Ltmp31-.Ltmp16                #   Call between .Ltmp16 and .Ltmp31
	.uleb128 .Ltmp32-.Lfunc_begin1          #     jumps to .Ltmp32
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp41-.Lfunc_begin1          # >> Call Site 6 <<
	.uleb128 .Ltmp46-.Ltmp41                #   Call between .Ltmp41 and .Ltmp46
	.uleb128 .Ltmp47-.Lfunc_begin1          #     jumps to .Ltmp47
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp48-.Lfunc_begin1          # >> Call Site 7 <<
	.uleb128 .Ltmp55-.Ltmp48                #   Call between .Ltmp48 and .Ltmp55
	.uleb128 .Ltmp56-.Lfunc_begin1          #     jumps to .Ltmp56
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp55-.Lfunc_begin1          # >> Call Site 8 <<
	.uleb128 .Lfunc_end7-.Ltmp55            #   Call between .Ltmp55 and .Lfunc_end7
	.byte	0                               #     has no landing pad
	.byte	0                               #   On action: cleanup
.Lcst_end1:
	.p2align	2, 0x0
                                        # -- End function
	.section	.text._ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE9push_backERKS5_,"axG",@progbits,_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE9push_backERKS5_,comdat
	.weak	_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE9push_backERKS5_ # -- Begin function _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE9push_backERKS5_
	.p2align	1, 0x90
	.type	_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE9push_backERKS5_,@function
_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE9push_backERKS5_: # @_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE9push_backERKS5_
	.cfi_startproc
# %bb.0:
	pushq	%rbx
	.cfi_def_cfa_offset 16
	.cfi_offset %rbx, -16
	movq	%rsi, %rdx
	movq	%rdi, %rbx
	movq	8(%rdi), %rax
	cmpq	16(%rdi), %rax
	je	.LBB8_2
# %bb.1:
	leaq	16(%rax), %rcx
	movq	%rcx, (%rax)
	movq	(%rdx), %rsi
	movq	8(%rdx), %rdx
	addq	%rsi, %rdx
	movq	%rax, %rdi
	callq	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag
	addq	$32, 8(%rbx)
	popq	%rbx
	.cfi_def_cfa_offset 8
	retq
.LBB8_2:
	.cfi_def_cfa_offset 16
	movq	%rbx, %rdi
	movq	%rax, %rsi
	popq	%rbx
	.cfi_def_cfa_offset 8
	jmp	_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE17_M_realloc_insertIJRKS5_EEEvN9__gnu_cxx17__normal_iteratorIPS5_S7_EEDpOT_ # TAILCALL
.Lfunc_end8:
	.size	_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE9push_backERKS5_, .Lfunc_end8-_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE9push_backERKS5_
	.cfi_endproc
                                        # -- End function
	.section	.text._ZNSt6vectorIfSaIfEEC2ERKS1_,"axG",@progbits,_ZNSt6vectorIfSaIfEEC2ERKS1_,comdat
	.weak	_ZNSt6vectorIfSaIfEEC2ERKS1_    # -- Begin function _ZNSt6vectorIfSaIfEEC2ERKS1_
	.p2align	1, 0x90
	.type	_ZNSt6vectorIfSaIfEEC2ERKS1_,@function
_ZNSt6vectorIfSaIfEEC2ERKS1_:           # @_ZNSt6vectorIfSaIfEEC2ERKS1_
	.cfi_startproc
# %bb.0:
	pushq	%r15
	.cfi_def_cfa_offset 16
	pushq	%r14
	.cfi_def_cfa_offset 24
	pushq	%r12
	.cfi_def_cfa_offset 32
	pushq	%rbx
	.cfi_def_cfa_offset 40
	pushq	%rax
	.cfi_def_cfa_offset 48
	.cfi_offset %rbx, -40
	.cfi_offset %r12, -32
	.cfi_offset %r14, -24
	.cfi_offset %r15, -16
	movq	%rsi, %r14
	movq	%rdi, %rbx
	movq	8(%rsi), %rax
	movq	(%rsi), %rcx
	movq	%rax, %r12
	subq	%rcx, %r12
	sarq	$2, %r12
	xorps	%xmm0, %xmm0
	movups	%xmm0, (%rdi)
	movq	$0, 16(%rdi)
	cmpq	%rcx, %rax
	je	.LBB9_1
# %bb.2:
	movq	%rbx, %rdi
	movq	%r12, %rsi
	xorl	%edx, %edx
	callq	_ZNSt15__new_allocatorIfE8allocateEmPKv
	movq	%rax, %r15
	jmp	.LBB9_3
.LBB9_1:
	xorl	%r15d, %r15d
.LBB9_3:
	movq	%r15, (%rbx)
	movq	%r15, 8(%rbx)
	leaq	(%r15,%r12,4), %rax
	movq	%rax, 16(%rbx)
	movq	(%r14), %rsi
	movq	8(%r14), %r14
	subq	%rsi, %r14
	cmpq	$5, %r14
	jl	.LBB9_5
# %bb.4:
	movq	%r15, %rdi
	movq	%r14, %rdx
	callq	memmove@PLT
.LBB9_7:
	addq	%r14, %r15
	movq	%r15, 8(%rbx)
	addq	$8, %rsp
	.cfi_def_cfa_offset 40
	popq	%rbx
	.cfi_def_cfa_offset 32
	popq	%r12
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	retq
.LBB9_5:
	.cfi_def_cfa_offset 48
	cmpq	$4, %r14
	jne	.LBB9_7
# %bb.6:
	movss	(%rsi), %xmm0                   # xmm0 = mem[0],zero,zero,zero
	movss	%xmm0, (%r15)
	jmp	.LBB9_7
.Lfunc_end9:
	.size	_ZNSt6vectorIfSaIfEEC2ERKS1_, .Lfunc_end9-_ZNSt6vectorIfSaIfEEC2ERKS1_
	.cfi_endproc
                                        # -- End function
	.section	.text._ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev,"axG",@progbits,_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev,comdat
	.weak	_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev # -- Begin function _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev
	.p2align	1, 0x90
	.type	_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev,@function
_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev: # @_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev
	.cfi_startproc
# %bb.0:
	pushq	%r15
	.cfi_def_cfa_offset 16
	pushq	%r14
	.cfi_def_cfa_offset 24
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	.cfi_offset %r15, -16
	movq	(%rdi), %rbx
	movq	8(%rdi), %r15
	cmpq	%r15, %rbx
	je	.LBB10_6
# %bb.1:                                # %.lr.ph.i.i.i.preheader
	movq	%rdi, %r14
.LBB10_2:                               # %.lr.ph.i.i.i
                                        # =>This Inner Loop Header: Depth=1
	movq	(%rbx), %rdi
	addq	$16, %rbx
	cmpq	%rbx, %rdi
	je	.LBB10_4
# %bb.3:                                # %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i.i.i.i.i
                                        #   in Loop: Header=BB10_2 Depth=1
	callq	_ZdlPv
.LBB10_4:                               # %_ZSt8_DestroyINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEvPT_.exit.i.i.i
                                        #   in Loop: Header=BB10_2 Depth=1
	addq	$16, %rbx
	cmpq	%r15, %rbx
	jne	.LBB10_2
# %bb.5:                                # %_ZSt8_DestroyIPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_EvT_S7_RSaIT0_E.exitthread-pre-split
	movq	(%r14), %rbx
.LBB10_6:                               # %_ZSt8_DestroyIPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_EvT_S7_RSaIT0_E.exit
	testq	%rbx, %rbx
	je	.LBB10_7
# %bb.8:
	movq	%rbx, %rdi
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	jmp	_ZdlPv                          # TAILCALL
.LBB10_7:                               # %_ZNSt12_Vector_baseINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev.exit
	.cfi_def_cfa_offset 32
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	retq
.Lfunc_end10:
	.size	_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev, .Lfunc_end10-_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev
	.cfi_endproc
                                        # -- End function
	.section	.text.__clang_call_terminate,"axG",@progbits,__clang_call_terminate,comdat
	.hidden	__clang_call_terminate          # -- Begin function __clang_call_terminate
	.weak	__clang_call_terminate
	.type	__clang_call_terminate,@function
__clang_call_terminate:                 # @__clang_call_terminate
	.cfi_startproc
# %bb.0:
	pushq	%rax
	.cfi_def_cfa_offset 16
	callq	__cxa_begin_catch
	callq	_ZSt9terminatev
.Lfunc_end11:
	.size	__clang_call_terminate, .Lfunc_end11-__clang_call_terminate
	.cfi_endproc
                                        # -- End function
	.section	.text._ZNSt6vectorIfSaIfEE17_M_realloc_insertIJfEEEvN9__gnu_cxx17__normal_iteratorIPfS1_EEDpOT_,"axG",@progbits,_ZNSt6vectorIfSaIfEE17_M_realloc_insertIJfEEEvN9__gnu_cxx17__normal_iteratorIPfS1_EEDpOT_,comdat
	.weak	_ZNSt6vectorIfSaIfEE17_M_realloc_insertIJfEEEvN9__gnu_cxx17__normal_iteratorIPfS1_EEDpOT_ # -- Begin function _ZNSt6vectorIfSaIfEE17_M_realloc_insertIJfEEEvN9__gnu_cxx17__normal_iteratorIPfS1_EEDpOT_
	.p2align	1, 0x90
	.type	_ZNSt6vectorIfSaIfEE17_M_realloc_insertIJfEEEvN9__gnu_cxx17__normal_iteratorIPfS1_EEDpOT_,@function
_ZNSt6vectorIfSaIfEE17_M_realloc_insertIJfEEEvN9__gnu_cxx17__normal_iteratorIPfS1_EEDpOT_: # @_ZNSt6vectorIfSaIfEE17_M_realloc_insertIJfEEEvN9__gnu_cxx17__normal_iteratorIPfS1_EEDpOT_
	.cfi_startproc
# %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	pushq	%r15
	.cfi_def_cfa_offset 24
	pushq	%r14
	.cfi_def_cfa_offset 32
	pushq	%r13
	.cfi_def_cfa_offset 40
	pushq	%r12
	.cfi_def_cfa_offset 48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	subq	$24, %rsp
	.cfi_def_cfa_offset 80
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	.cfi_offset %rbp, -16
	movq	%rdx, (%rsp)                    # 8-byte Spill
	movq	%rsi, %r12
	movq	%rdi, %rbx
	movl	$1, %esi
	movl	$.L.str.6, %edx
	callq	_ZNKSt6vectorIfSaIfEE12_M_check_lenEmPKc
	movq	(%rbx), %r13
	movq	8(%rbx), %r15
	movq	%r12, 8(%rsp)                   # 8-byte Spill
	subq	%r13, %r12
	movq	%r12, %r14
	sarq	$2, %r14
	testq	%rax, %rax
	movq	%rax, 16(%rsp)                  # 8-byte Spill
	je	.LBB12_1
# %bb.2:
	movq	%rbx, %rdi
	movq	%rax, %rsi
	xorl	%edx, %edx
	callq	_ZNSt15__new_allocatorIfE8allocateEmPKv
	movq	%rax, %rbp
	jmp	.LBB12_3
.LBB12_1:
	xorl	%ebp, %ebp
.LBB12_3:                               # %_ZNSt12_Vector_baseIfSaIfEE11_M_allocateEm.exit
	movq	(%rsp), %rax                    # 8-byte Reload
	movss	(%rax), %xmm0                   # xmm0 = mem[0],zero,zero,zero
	movss	%xmm0, (%rbp,%r14,4)
	testq	%r12, %r12
	jle	.LBB12_5
# %bb.4:
	movq	%rbp, %rdi
	movq	%r13, %rsi
	movq	%r12, %rdx
	callq	memmove@PLT
.LBB12_5:                               # %_ZNSt6vectorIfSaIfEE11_S_relocateEPfS2_S2_RS0_.exit
	addq	%rbp, %r12
	addq	$4, %r12
	movq	8(%rsp), %rsi                   # 8-byte Reload
	subq	%rsi, %r15
	testq	%r15, %r15
	jle	.LBB12_7
# %bb.6:
	movq	%r12, %rdi
	movq	%r15, %rdx
	callq	memmove@PLT
.LBB12_7:                               # %_ZNSt6vectorIfSaIfEE11_S_relocateEPfS2_S2_RS0_.exit16
	testq	%r13, %r13
	je	.LBB12_9
# %bb.8:
	movq	%r13, %rdi
	callq	_ZdlPv
.LBB12_9:                               # %_ZNSt12_Vector_baseIfSaIfEE13_M_deallocateEPfm.exit
	addq	%r15, %r12
	movq	%rbp, (%rbx)
	movq	%r12, 8(%rbx)
	movq	16(%rsp), %rax                  # 8-byte Reload
	leaq	(,%rax,4), %rax
	addq	%rbp, %rax
	movq	%rax, 16(%rbx)
	addq	$24, %rsp
	.cfi_def_cfa_offset 56
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%r12
	.cfi_def_cfa_offset 40
	popq	%r13
	.cfi_def_cfa_offset 32
	popq	%r14
	.cfi_def_cfa_offset 24
	popq	%r15
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	retq
.Lfunc_end12:
	.size	_ZNSt6vectorIfSaIfEE17_M_realloc_insertIJfEEEvN9__gnu_cxx17__normal_iteratorIPfS1_EEDpOT_, .Lfunc_end12-_ZNSt6vectorIfSaIfEE17_M_realloc_insertIJfEEEvN9__gnu_cxx17__normal_iteratorIPfS1_EEDpOT_
	.cfi_endproc
                                        # -- End function
	.section	.text._ZNKSt6vectorIfSaIfEE12_M_check_lenEmPKc,"axG",@progbits,_ZNKSt6vectorIfSaIfEE12_M_check_lenEmPKc,comdat
	.weak	_ZNKSt6vectorIfSaIfEE12_M_check_lenEmPKc # -- Begin function _ZNKSt6vectorIfSaIfEE12_M_check_lenEmPKc
	.p2align	1, 0x90
	.type	_ZNKSt6vectorIfSaIfEE12_M_check_lenEmPKc,@function
_ZNKSt6vectorIfSaIfEE12_M_check_lenEmPKc: # @_ZNKSt6vectorIfSaIfEE12_M_check_lenEmPKc
	.cfi_startproc
# %bb.0:
	movabsq	$2305843009213693951, %rcx      # imm = 0x1FFFFFFFFFFFFFFF
	movq	8(%rdi), %r8
	subq	(%rdi), %r8
	sarq	$2, %r8
	movq	%rcx, %rax
	subq	%r8, %rax
	cmpq	%rsi, %rax
	jb	.LBB13_2
# %bb.1:
	cmpq	%rsi, %r8
	cmovaq	%r8, %rsi
	leaq	(%rsi,%r8), %rax
	cmpq	%rcx, %rax
	cmovaeq	%rcx, %rax
	addq	%r8, %rsi
	cmovbq	%rcx, %rax
	retq
.LBB13_2:
	pushq	%rax
	.cfi_def_cfa_offset 16
	movq	%rdx, %rdi
	callq	_ZSt20__throw_length_errorPKc
.Lfunc_end13:
	.size	_ZNKSt6vectorIfSaIfEE12_M_check_lenEmPKc, .Lfunc_end13-_ZNKSt6vectorIfSaIfEE12_M_check_lenEmPKc
	.cfi_endproc
                                        # -- End function
	.section	.text._ZNSt15__new_allocatorIfE8allocateEmPKv,"axG",@progbits,_ZNSt15__new_allocatorIfE8allocateEmPKv,comdat
	.weak	_ZNSt15__new_allocatorIfE8allocateEmPKv # -- Begin function _ZNSt15__new_allocatorIfE8allocateEmPKv
	.p2align	1, 0x90
	.type	_ZNSt15__new_allocatorIfE8allocateEmPKv,@function
_ZNSt15__new_allocatorIfE8allocateEmPKv: # @_ZNSt15__new_allocatorIfE8allocateEmPKv
	.cfi_startproc
# %bb.0:
	pushq	%rax
	.cfi_def_cfa_offset 16
	movq	%rsi, %rax
	shrq	$61, %rax
	jne	.LBB14_1
# %bb.3:
	shlq	$2, %rsi
	movq	%rsi, %rdi
	popq	%rax
	.cfi_def_cfa_offset 8
	jmp	_Znwm                           # TAILCALL
.LBB14_1:
	.cfi_def_cfa_offset 16
	shrq	$62, %rsi
	je	.LBB14_2
# %bb.4:
	callq	_ZSt28__throw_bad_array_new_lengthv
.LBB14_2:
	callq	_ZSt17__throw_bad_allocv
.Lfunc_end14:
	.size	_ZNSt15__new_allocatorIfE8allocateEmPKv, .Lfunc_end14-_ZNSt15__new_allocatorIfE8allocateEmPKv
	.cfi_endproc
                                        # -- End function
	.section	.text._ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag,"axG",@progbits,_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag,comdat
	.weak	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag # -- Begin function _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag
	.p2align	1, 0x90
	.type	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag,@function
_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag: # @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag
	.cfi_startproc
# %bb.0:
	pushq	%r15
	.cfi_def_cfa_offset 16
	pushq	%r14
	.cfi_def_cfa_offset 24
	pushq	%r12
	.cfi_def_cfa_offset 32
	pushq	%rbx
	.cfi_def_cfa_offset 40
	pushq	%rax
	.cfi_def_cfa_offset 48
	.cfi_offset %rbx, -40
	.cfi_offset %r12, -32
	.cfi_offset %r14, -24
	.cfi_offset %r15, -16
	movq	%rdx, %r14
	movq	%rsi, %r15
	movq	%rdi, %rbx
	subq	%rsi, %r14
	movq	%r14, (%rsp)
	cmpq	$15, %r14
	jbe	.LBB15_1
# %bb.2:
	movq	%rsp, %r12
	movq	%rbx, %rdi
	movq	%r12, %rsi
	xorl	%edx, %edx
	callq	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_createERmm
	movq	%rax, (%rbx)
	movq	(%r12), %rcx
	movq	%rcx, 16(%rbx)
	jmp	.LBB15_3
.LBB15_1:                               # %._crit_edge
	movq	(%rbx), %rax
.LBB15_3:
	testq	%r14, %r14
	je	.LBB15_7
# %bb.4:
	cmpq	$1, %r14
	jne	.LBB15_6
# %bb.5:
	movb	(%r15), %cl
	movb	%cl, (%rax)
	jmp	.LBB15_7
.LBB15_6:
	movq	%rax, %rdi
	movq	%r15, %rsi
	movq	%r14, %rdx
	callq	memcpy@PLT
.LBB15_7:                               # %_ZZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tagEN6_GuardD2Ev.exit
	movq	(%rsp), %rax
	movq	%rax, 8(%rbx)
	movq	(%rbx), %rcx
	movb	$0, (%rcx,%rax)
	addq	$8, %rsp
	.cfi_def_cfa_offset 40
	popq	%rbx
	.cfi_def_cfa_offset 32
	popq	%r12
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	retq
.Lfunc_end15:
	.size	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag, .Lfunc_end15-_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag
	.cfi_endproc
                                        # -- End function
	.section	.text._ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE17_M_realloc_insertIJRKS5_EEEvN9__gnu_cxx17__normal_iteratorIPS5_S7_EEDpOT_,"axG",@progbits,_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE17_M_realloc_insertIJRKS5_EEEvN9__gnu_cxx17__normal_iteratorIPS5_S7_EEDpOT_,comdat
	.weak	_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE17_M_realloc_insertIJRKS5_EEEvN9__gnu_cxx17__normal_iteratorIPS5_S7_EEDpOT_ # -- Begin function _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE17_M_realloc_insertIJRKS5_EEEvN9__gnu_cxx17__normal_iteratorIPS5_S7_EEDpOT_
	.p2align	1, 0x90
	.type	_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE17_M_realloc_insertIJRKS5_EEEvN9__gnu_cxx17__normal_iteratorIPS5_S7_EEDpOT_,@function
_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE17_M_realloc_insertIJRKS5_EEEvN9__gnu_cxx17__normal_iteratorIPS5_S7_EEDpOT_: # @_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE17_M_realloc_insertIJRKS5_EEEvN9__gnu_cxx17__normal_iteratorIPS5_S7_EEDpOT_
.Lfunc_begin2:
	.cfi_startproc
	.cfi_personality 3, __gxx_personality_v0
	.cfi_lsda 3, .Lexception2
# %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	pushq	%r15
	.cfi_def_cfa_offset 24
	pushq	%r14
	.cfi_def_cfa_offset 32
	pushq	%r13
	.cfi_def_cfa_offset 40
	pushq	%r12
	.cfi_def_cfa_offset 48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	subq	$24, %rsp
	.cfi_def_cfa_offset 80
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	.cfi_offset %rbp, -16
	movq	%rdx, %rbp
	movq	%rsi, %r13
	movq	%rdi, %rbx
	movl	$1, %esi
	movl	$.L.str.6, %edx
	callq	_ZNKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE12_M_check_lenEmPKc
	movq	%rax, %r14
	movq	(%rbx), %rax
	movq	8(%rbx), %r15
	movq	%r13, %r12
	movq	%rax, (%rsp)                    # 8-byte Spill
	subq	%rax, %r12
	sarq	$5, %r12
	testq	%r14, %r14
	je	.LBB16_1
# %bb.2:
	movq	%rbx, %rdi
	movq	%r14, %rsi
	xorl	%edx, %edx
	callq	_ZNSt15__new_allocatorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE8allocateEmPKv
	jmp	.LBB16_3
.LBB16_1:
	xorl	%eax, %eax
.LBB16_3:                               # %_ZNSt12_Vector_baseINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE11_M_allocateEm.exit
	shlq	$5, %r12
	leaq	(%rax,%r12), %rdi
	leaq	(%rax,%r12), %rcx
	addq	$16, %rcx
	movq	%rcx, -16(%rcx)
	movq	(%rbp), %rsi
	movq	8(%rbp), %rdx
	addq	%rsi, %rdx
.Ltmp62:
	movq	%rax, %r12
	callq	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag
.Ltmp63:
# %bb.4:                                # %_ZNSt16allocator_traitsISaINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEE9constructIS5_JRKS5_EEEvRS6_PT_DpOT0_.exit
	movq	%r12, %rbp
	movq	(%rsp), %rdi                    # 8-byte Reload
	cmpq	%r13, %rdi
	movq	%r12, 8(%rsp)                   # 8-byte Spill
	je	.LBB16_11
# %bb.5:                                # %.lr.ph.i.i.i.preheader
	movq	%rbx, 16(%rsp)                  # 8-byte Spill
	leaq	16(%r12), %rbp
	leaq	16(%rdi), %r12
.LBB16_6:                               # %.lr.ph.i.i.i
                                        # =>This Inner Loop Header: Depth=1
	movq	%rbp, -16(%rbp)
	movq	-16(%r12), %rsi
	cmpq	%rsi, %r12
	je	.LBB16_7
# %bb.8:                                # %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i.i.i.i.i.i
                                        #   in Loop: Header=BB16_6 Depth=1
	movq	%rsi, -16(%rbp)
	movq	(%r12), %rax
	movq	%rax, (%rbp)
	movq	-8(%r12), %rbx
	jmp	.LBB16_9
.LBB16_7:                               #   in Loop: Header=BB16_6 Depth=1
	movq	-8(%r12), %rbx
	leaq	1(%rbx), %rdx
	movq	%rbp, %rdi
	callq	memcpy@PLT
.LBB16_9:                               # %_ZSt19__relocate_object_aINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_SaIS5_EEvPT_PT0_RT1_.exit.i.i.i
                                        #   in Loop: Header=BB16_6 Depth=1
	movq	%rbx, -8(%rbp)
	movq	%r12, -16(%r12)
	movq	$0, -8(%r12)
	movb	$0, (%r12)
	addq	$32, %rbp
	leaq	32(%r12), %rax
	addq	$16, %r12
	cmpq	%r13, %r12
	movq	%rax, %r12
	jne	.LBB16_6
# %bb.10:                               # %_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE11_S_relocateEPS5_S8_S8_RS6_.exit.loopexit
	addq	$-16, %rbp
	movq	16(%rsp), %rbx                  # 8-byte Reload
	movq	(%rsp), %rdi                    # 8-byte Reload
	movq	8(%rsp), %r12                   # 8-byte Reload
.LBB16_11:                              # %_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE11_S_relocateEPS5_S8_S8_RS6_.exit
	cmpq	%r13, %r15
	je	.LBB16_12
# %bb.13:                               # %.lr.ph.i.i.i27.preheader
	movq	%rbx, %r12
	addq	$48, %rbp
	addq	$16, %r13
.LBB16_14:                              # %.lr.ph.i.i.i27
                                        # =>This Inner Loop Header: Depth=1
	movq	%rbp, -16(%rbp)
	movq	-16(%r13), %rsi
	cmpq	%rsi, %r13
	je	.LBB16_15
# %bb.16:                               # %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i.i.i.i.i.i30
                                        #   in Loop: Header=BB16_14 Depth=1
	movq	%rsi, -16(%rbp)
	movq	(%r13), %rax
	movq	%rax, (%rbp)
	movq	-8(%r13), %rbx
	jmp	.LBB16_17
.LBB16_15:                              #   in Loop: Header=BB16_14 Depth=1
	movq	-8(%r13), %rbx
	leaq	1(%rbx), %rdx
	movq	%rbp, %rdi
	callq	memcpy@PLT
.LBB16_17:                              # %_ZSt19__relocate_object_aINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_SaIS5_EEvPT_PT0_RT1_.exit.i.i.i33
                                        #   in Loop: Header=BB16_14 Depth=1
	movq	%rbx, -8(%rbp)
	movq	%r13, -16(%r13)
	movq	$0, -8(%r13)
	movb	$0, (%r13)
	addq	$32, %rbp
	leaq	32(%r13), %rax
	addq	$16, %r13
	cmpq	%r15, %r13
	movq	%rax, %r13
	jne	.LBB16_14
# %bb.18:                               # %_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE11_S_relocateEPS5_S8_S8_RS6_.exit36.loopexit
	addq	$-16, %rbp
	movq	%r12, %rbx
	movq	(%rsp), %rdi                    # 8-byte Reload
	movq	8(%rsp), %r12                   # 8-byte Reload
	jmp	.LBB16_19
.LBB16_12:
	addq	$32, %rbp
.LBB16_19:                              # %_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE11_S_relocateEPS5_S8_S8_RS6_.exit36
	testq	%rdi, %rdi
	je	.LBB16_21
# %bb.20:
	callq	_ZdlPv
.LBB16_21:                              # %_ZNSt12_Vector_baseINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE13_M_deallocateEPS5_m.exit
	movq	%r12, (%rbx)
	movq	%rbp, 8(%rbx)
	shlq	$5, %r14
	addq	%r12, %r14
	movq	%r14, 16(%rbx)
	addq	$24, %rsp
	.cfi_def_cfa_offset 56
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%r12
	.cfi_def_cfa_offset 40
	popq	%r13
	.cfi_def_cfa_offset 32
	popq	%r14
	.cfi_def_cfa_offset 24
	popq	%r15
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	retq
.LBB16_25:
	.cfi_def_cfa_offset 80
.Ltmp64:
	movq	%rax, %rdi
	callq	__cxa_begin_catch
	movq	%r12, %rdi
	callq	_ZdlPv
.Ltmp65:
	callq	__cxa_rethrow
.Ltmp66:
# %bb.26:
.LBB16_22:
.Ltmp67:
	movq	%rax, %rbx
.Ltmp68:
	callq	__cxa_end_catch
.Ltmp69:
# %bb.23:
	movq	%rbx, %rdi
	callq	_Unwind_Resume@PLT
.LBB16_24:
.Ltmp70:
	movq	%rax, %rdi
	callq	__clang_call_terminate
.Lfunc_end16:
	.size	_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE17_M_realloc_insertIJRKS5_EEEvN9__gnu_cxx17__normal_iteratorIPS5_S7_EEDpOT_, .Lfunc_end16-_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE17_M_realloc_insertIJRKS5_EEEvN9__gnu_cxx17__normal_iteratorIPS5_S7_EEDpOT_
	.cfi_endproc
	.section	.gcc_except_table._ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE17_M_realloc_insertIJRKS5_EEEvN9__gnu_cxx17__normal_iteratorIPS5_S7_EEDpOT_,"aG",@progbits,_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE17_M_realloc_insertIJRKS5_EEEvN9__gnu_cxx17__normal_iteratorIPS5_S7_EEDpOT_,comdat
	.p2align	2, 0x0
GCC_except_table16:
.Lexception2:
	.byte	255                             # @LPStart Encoding = omit
	.byte	3                               # @TType Encoding = udata4
	.uleb128 .Lttbase0-.Lttbaseref0
.Lttbaseref0:
	.byte	1                               # Call site Encoding = uleb128
	.uleb128 .Lcst_end2-.Lcst_begin2
.Lcst_begin2:
	.uleb128 .Lfunc_begin2-.Lfunc_begin2    # >> Call Site 1 <<
	.uleb128 .Ltmp62-.Lfunc_begin2          #   Call between .Lfunc_begin2 and .Ltmp62
	.byte	0                               #     has no landing pad
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp62-.Lfunc_begin2          # >> Call Site 2 <<
	.uleb128 .Ltmp63-.Ltmp62                #   Call between .Ltmp62 and .Ltmp63
	.uleb128 .Ltmp64-.Lfunc_begin2          #     jumps to .Ltmp64
	.byte	1                               #   On action: 1
	.uleb128 .Ltmp63-.Lfunc_begin2          # >> Call Site 3 <<
	.uleb128 .Ltmp65-.Ltmp63                #   Call between .Ltmp63 and .Ltmp65
	.byte	0                               #     has no landing pad
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp65-.Lfunc_begin2          # >> Call Site 4 <<
	.uleb128 .Ltmp66-.Ltmp65                #   Call between .Ltmp65 and .Ltmp66
	.uleb128 .Ltmp67-.Lfunc_begin2          #     jumps to .Ltmp67
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp68-.Lfunc_begin2          # >> Call Site 5 <<
	.uleb128 .Ltmp69-.Ltmp68                #   Call between .Ltmp68 and .Ltmp69
	.uleb128 .Ltmp70-.Lfunc_begin2          #     jumps to .Ltmp70
	.byte	1                               #   On action: 1
	.uleb128 .Ltmp69-.Lfunc_begin2          # >> Call Site 6 <<
	.uleb128 .Lfunc_end16-.Ltmp69           #   Call between .Ltmp69 and .Lfunc_end16
	.byte	0                               #     has no landing pad
	.byte	0                               #   On action: cleanup
.Lcst_end2:
	.byte	1                               # >> Action Record 1 <<
                                        #   Catch TypeInfo 1
	.byte	0                               #   No further actions
	.p2align	2, 0x0
                                        # >> Catch TypeInfos <<
	.long	0                               # TypeInfo 1
.Lttbase0:
	.p2align	2, 0x0
                                        # -- End function
	.section	.text._ZNKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE12_M_check_lenEmPKc,"axG",@progbits,_ZNKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE12_M_check_lenEmPKc,comdat
	.weak	_ZNKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE12_M_check_lenEmPKc # -- Begin function _ZNKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE12_M_check_lenEmPKc
	.p2align	1, 0x90
	.type	_ZNKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE12_M_check_lenEmPKc,@function
_ZNKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE12_M_check_lenEmPKc: # @_ZNKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE12_M_check_lenEmPKc
	.cfi_startproc
# %bb.0:
	movabsq	$288230376151711743, %rcx       # imm = 0x3FFFFFFFFFFFFFF
	movq	8(%rdi), %r8
	subq	(%rdi), %r8
	sarq	$5, %r8
	movq	%rcx, %rax
	subq	%r8, %rax
	cmpq	%rsi, %rax
	jb	.LBB17_2
# %bb.1:
	cmpq	%rsi, %r8
	cmovaq	%r8, %rsi
	leaq	(%rsi,%r8), %rax
	cmpq	%rcx, %rax
	cmovaeq	%rcx, %rax
	addq	%r8, %rsi
	cmovbq	%rcx, %rax
	retq
.LBB17_2:
	pushq	%rax
	.cfi_def_cfa_offset 16
	movq	%rdx, %rdi
	callq	_ZSt20__throw_length_errorPKc
.Lfunc_end17:
	.size	_ZNKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE12_M_check_lenEmPKc, .Lfunc_end17-_ZNKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE12_M_check_lenEmPKc
	.cfi_endproc
                                        # -- End function
	.section	.text._ZNSt15__new_allocatorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE8allocateEmPKv,"axG",@progbits,_ZNSt15__new_allocatorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE8allocateEmPKv,comdat
	.weak	_ZNSt15__new_allocatorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE8allocateEmPKv # -- Begin function _ZNSt15__new_allocatorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE8allocateEmPKv
	.p2align	1, 0x90
	.type	_ZNSt15__new_allocatorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE8allocateEmPKv,@function
_ZNSt15__new_allocatorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE8allocateEmPKv: # @_ZNSt15__new_allocatorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE8allocateEmPKv
	.cfi_startproc
# %bb.0:
	pushq	%rax
	.cfi_def_cfa_offset 16
	movq	%rsi, %rax
	shrq	$58, %rax
	jne	.LBB18_1
# %bb.3:
	shlq	$5, %rsi
	movq	%rsi, %rdi
	popq	%rax
	.cfi_def_cfa_offset 8
	jmp	_Znwm                           # TAILCALL
.LBB18_1:
	.cfi_def_cfa_offset 16
	shrq	$59, %rsi
	je	.LBB18_2
# %bb.4:
	callq	_ZSt28__throw_bad_array_new_lengthv
.LBB18_2:
	callq	_ZSt17__throw_bad_allocv
.Lfunc_end18:
	.size	_ZNSt15__new_allocatorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE8allocateEmPKv, .Lfunc_end18-_ZNSt15__new_allocatorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE8allocateEmPKv
	.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	.LBB19_2
# %bb.1:
	movl	$__hip_fatbin_wrapper, %edi
	callq	__hipRegisterFatBinary
	movq	%rax, %rbx
	movq	%rax, __hip_gpubin_handle(%rip)
.LBB19_2:
	xorps	%xmm0, %xmm0
	movups	%xmm0, 16(%rsp)
	movups	%xmm0, (%rsp)
	movl	$_Z13caclulation3DPfS_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	$_Z13caclulation2DPfS_S_iif, %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_end19:
	.size	__hip_module_ctor, .Lfunc_end19-__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	.LBB20_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
.LBB20_2:
	retq
.Lfunc_end20:
	.size	__hip_module_dtor, .Lfunc_end20-__hip_module_dtor
	.cfi_endproc
                                        # -- End function
	.type	_Z13caclulation3DPfS_S_iiif,@object # @_Z13caclulation3DPfS_S_iiif
	.section	.rodata,"a",@progbits
	.globl	_Z13caclulation3DPfS_S_iiif
	.p2align	3, 0x0
_Z13caclulation3DPfS_S_iiif:
	.quad	_Z28__device_stub__caclulation3DPfS_S_iiif
	.size	_Z13caclulation3DPfS_S_iiif, 8

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

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

	.type	.L.str.1,@object                # @.str.1
.L.str.1:
	.asciz	"%f, "
	.size	.L.str.1, 5

	.type	.L.str.2,@object                # @.str.2
.L.str.2:
	.asciz	"%f\n"
	.size	.L.str.2, 4

	.type	.L.str.4,@object                # @.str.4
.L.str.4:
	.asciz	"heatOutput.csv"
	.size	.L.str.4, 15

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

	.type	.L__unnamed_1,@object           # @0
.L__unnamed_1:
	.asciz	"_Z13caclulation3DPfS_S_iiif"
	.size	.L__unnamed_1, 28

	.type	.L__unnamed_2,@object           # @1
.L__unnamed_2:
	.asciz	"_Z13caclulation2DPfS_S_iif"
	.size	.L__unnamed_2, 27

	.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	__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 __gxx_personality_v0
	.addrsig_sym _Z28__device_stub__caclulation3DPfS_S_iiif
	.addrsig_sym _Z28__device_stub__caclulation2DPfS_S_iif
	.addrsig_sym __hip_module_ctor
	.addrsig_sym __hip_module_dtor
	.addrsig_sym _Unwind_Resume
	.addrsig_sym _Z13caclulation3DPfS_S_iiif
	.addrsig_sym _Z13caclulation2DPfS_S_iif
	.addrsig_sym __hip_fatbin
	.addrsig_sym __hip_fatbin_wrapper
	.addrsig_sym __hip_cuid_

	.text
	.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
	.protected	_Z13caclulation3DPfS_S_iiif ; -- Begin function _Z13caclulation3DPfS_S_iiif
	.globl	_Z13caclulation3DPfS_S_iiif
	.p2align	8
	.type	_Z13caclulation3DPfS_S_iiif,@function
_Z13caclulation3DPfS_S_iiif:            ; @_Z13caclulation3DPfS_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 s2, s8, s6
	s_delay_alu instid0(VALU_DEP_1) | instid1(SALU_CYCLE_1)
	v_cmp_gt_i32_e32 vcc_lo, s2, v2
	s_and_saveexec_b32 s2, vcc_lo
	s_cbranch_execz .LBB0_3
; %bb.1:
	s_load_b64 s[2:3], s[0:1], 0x10
	v_ashrrev_i32_e32 v3, 31, v2
	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 v4, vcc_lo, s2, v0
	s_delay_alu instid0(VALU_DEP_2)
	v_add_co_ci_u32_e32 v5, vcc_lo, s3, v1, vcc_lo
	global_load_b32 v4, v[4:5], off
	s_waitcnt vmcnt(0)
	v_cmp_neq_f32_e32 vcc_lo, 0x800000, v4
	s_and_b32 exec_lo, exec_lo, vcc_lo
	s_cbranch_execz .LBB0_3
; %bb.2:
	s_ashr_i32 s2, s4, 31
	v_add_nc_u32_e32 v6, v2, v3
	s_add_i32 s3, s4, s2
	s_ashr_i32 s11, s5, 31
	s_xor_b32 s3, s3, s2
	s_add_i32 s12, s5, s11
	v_cvt_f32_u32_e32 v4, s3
	s_sub_i32 s9, 0, s3
	v_xor_b32_e32 v6, v6, v3
	s_xor_b32 s11, s12, s11
	s_add_i32 s6, s6, -1
	v_rcp_iflag_f32_e32 v4, v4
	v_cvt_f32_u32_e32 v8, s11
	s_add_i32 s5, s5, -1
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_2) | instid1(VALU_DEP_1)
	v_rcp_iflag_f32_e32 v8, v8
	s_waitcnt_depctr 0xfff
	v_mul_f32_e32 v4, 0x4f7ffffe, v4
	v_cvt_u32_f32_e32 v4, v4
	v_mul_f32_e32 v8, 0x4f7ffffe, v8
	s_delay_alu instid0(VALU_DEP_2) | instskip(SKIP_1) | instid1(SALU_CYCLE_1)
	v_mul_lo_u32 v5, s9, v4
	s_ashr_i32 s9, s8, 31
	s_add_i32 s10, s8, s9
	s_delay_alu instid0(SALU_CYCLE_1) | instskip(NEXT) | instid1(SALU_CYCLE_1)
	s_xor_b32 s10, s10, s9
	v_cvt_f32_u32_e32 v7, s10
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_mul_hi_u32 v5, v4, v5
	v_rcp_iflag_f32_e32 v7, v7
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_add_nc_u32_e32 v4, v4, v5
	v_mul_hi_u32 v4, v6, v4
	s_waitcnt_depctr 0xfff
	v_mul_f32_e32 v7, 0x4f7ffffe, v7
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_2) | instid1(VALU_DEP_2)
	v_cvt_u32_f32_e32 v7, v7
	v_mul_lo_u32 v5, v4, s3
	v_add_nc_u32_e32 v9, 1, v4
	v_sub_nc_u32_e32 v5, v6, v5
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(VALU_DEP_2)
	v_subrev_nc_u32_e32 v10, s3, v5
	v_cmp_le_u32_e32 vcc_lo, s3, v5
	v_cndmask_b32_e32 v5, v5, v10, vcc_lo
	v_xor_b32_e32 v10, s2, v3
	s_sub_i32 s2, 0, s10
	v_cndmask_b32_e32 v4, v4, v9, vcc_lo
	v_xor_b32_e32 v3, s9, v3
	v_cmp_le_u32_e32 vcc_lo, s3, v5
	v_cvt_u32_f32_e32 v5, v8
	v_mul_lo_u32 v8, s2, v7
	s_sub_i32 s2, 0, s11
	s_add_i32 s9, s4, -1
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_mul_hi_u32 v8, v7, v8
	v_add_nc_u32_e32 v7, v7, v8
	v_add_nc_u32_e32 v9, 1, v4
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_mul_hi_u32 v7, v6, v7
	v_cndmask_b32_e32 v4, v4, v9, vcc_lo
	v_mul_lo_u32 v9, s2, v5
	s_load_b128 s[0:3], s[0:1], 0x0
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_mul_hi_u32 v9, v5, v9
	v_add_nc_u32_e32 v5, v5, v9
	v_mul_lo_u32 v9, v7, s10
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_2) | instid1(VALU_DEP_3)
	v_sub_nc_u32_e32 v6, v6, v9
	v_add_nc_u32_e32 v9, 1, v7
	v_xor_b32_e32 v4, v4, v10
	v_cmp_le_u32_e32 vcc_lo, s10, v6
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_4)
	v_sub_nc_u32_e32 v4, v4, v10
	v_cndmask_b32_e32 v7, v7, v9, vcc_lo
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_ashrrev_i32_e32 v10, 31, v4
	v_add_nc_u32_e32 v11, v4, v10
	v_mul_lo_u32 v4, v4, s4
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_xor_b32_e32 v8, v11, v10
	v_sub_nc_u32_e32 v11, v2, v4
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_mul_hi_u32 v5, v8, v5
	v_max_i32_e32 v15, 1, v11
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_mul_lo_u32 v5, v5, s11
	v_sub_nc_u32_e32 v5, v8, v5
	v_subrev_nc_u32_e32 v8, s10, v6
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_subrev_nc_u32_e32 v9, s11, v5
	v_cndmask_b32_e32 v6, v6, v8, vcc_lo
	v_cmp_le_u32_e32 vcc_lo, s11, v5
	s_delay_alu instid0(VALU_DEP_3) | instskip(NEXT) | instid1(VALU_DEP_3)
	v_dual_cndmask_b32 v5, v5, v9 :: v_dual_add_nc_u32 v8, 1, v7
	v_cmp_le_u32_e32 vcc_lo, s10, v6
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_3)
	v_cndmask_b32_e32 v6, v7, v8, vcc_lo
	v_subrev_nc_u32_e32 v7, s11, v5
	v_cmp_le_u32_e32 vcc_lo, s11, v5
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_cndmask_b32_e32 v5, v5, v7, vcc_lo
	v_xor_b32_e32 v5, v5, v10
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_2) | instid1(VALU_DEP_3)
	v_sub_nc_u32_e32 v2, v5, v10
	v_add_nc_u32_e32 v5, 1, v11
	v_xor_b32_e32 v6, v6, v3
	v_max_i32_e32 v7, 1, v2
	v_add_nc_u32_e32 v8, 1, v2
	s_delay_alu instid0(VALU_DEP_3) | instskip(SKIP_1) | instid1(VALU_DEP_4)
	v_sub_nc_u32_e32 v3, v6, v3
	v_min_i32_e32 v13, s9, v5
	v_add_nc_u32_e32 v7, -1, v7
	s_delay_alu instid0(VALU_DEP_4) | instskip(NEXT) | instid1(VALU_DEP_4)
	v_min_i32_e32 v8, s5, v8
	v_add_nc_u32_e32 v6, 1, v3
	v_mul_lo_u32 v4, s8, v3
	v_max_i32_e32 v3, 1, v3
	s_delay_alu instid0(VALU_DEP_3) | instskip(SKIP_1) | instid1(VALU_DEP_3)
	v_min_i32_e32 v12, s6, v6
	v_mul_lo_u32 v6, v2, s4
	v_add_nc_u32_e32 v10, -1, v3
	v_add_nc_u32_e32 v2, v11, v4
	s_delay_alu instid0(VALU_DEP_3) | instskip(SKIP_1) | instid1(VALU_DEP_2)
	v_add_nc_u32_e32 v3, v11, v6
	v_add_nc_u32_e32 v14, v6, v4
	v_mad_u64_u32 v[4:5], null, v7, s4, v[2:3]
	v_mad_u64_u32 v[6:7], null, v8, s4, v[2:3]
	s_delay_alu instid0(VALU_DEP_3) | instskip(NEXT) | instid1(VALU_DEP_3)
	v_add_nc_u32_e32 v2, v13, v14
	v_mad_u64_u32 v[8:9], null, s8, v10, v[3:4]
	v_mad_u64_u32 v[10:11], null, s8, v12, v[3:4]
	v_ashrrev_i32_e32 v3, 31, v14
	v_ashrrev_i32_e32 v5, 31, v4
	v_add_co_u32 v12, vcc_lo, v15, v14
	v_ashrrev_i32_e32 v9, 31, v8
	v_ashrrev_i32_e32 v7, 31, v6
	v_ashrrev_i32_e32 v11, 31, v10
	v_add_co_ci_u32_e32 v13, vcc_lo, 0, v3, vcc_lo
	s_delay_alu instid0(VALU_DEP_4) | instskip(SKIP_1) | instid1(VALU_DEP_4)
	v_lshlrev_b64 v[8:9], 2, v[8:9]
	v_lshlrev_b64 v[4:5], 2, v[4:5]
	v_lshlrev_b64 v[10:11], 2, v[10:11]
	v_lshlrev_b64 v[6:7], 2, v[6:7]
	v_ashrrev_i32_e32 v3, 31, v2
	v_lshlrev_b64 v[12:13], 2, v[12:13]
	s_waitcnt lgkmcnt(0)
	v_add_co_u32 v8, vcc_lo, s2, v8
	v_add_co_ci_u32_e32 v9, vcc_lo, s3, v9, vcc_lo
	v_add_co_u32 v10, vcc_lo, s2, v10
	v_add_co_ci_u32_e32 v11, vcc_lo, s3, v11, vcc_lo
	v_add_co_u32 v4, vcc_lo, s2, v4
	v_add_co_ci_u32_e32 v5, vcc_lo, s3, v5, vcc_lo
	s_clause 0x1
	global_load_b32 v8, v[8:9], off
	global_load_b32 v9, v[10:11], off
	v_add_co_u32 v6, vcc_lo, s2, v6
	v_add_co_ci_u32_e32 v7, vcc_lo, s3, v7, vcc_lo
	global_load_b32 v10, v[4:5], off
	v_lshlrev_b64 v[2:3], 2, v[2:3]
	global_load_b32 v6, v[6:7], off
	v_add_co_u32 v4, vcc_lo, s2, v12
	v_add_co_ci_u32_e32 v5, vcc_lo, s3, v13, vcc_lo
	v_add_co_u32 v2, vcc_lo, s2, v2
	v_add_co_ci_u32_e32 v3, vcc_lo, s3, v3, vcc_lo
	global_load_b32 v7, v[4:5], off offset:-4
	v_add_co_u32 v4, vcc_lo, s2, v0
	v_add_co_ci_u32_e32 v5, vcc_lo, s3, v1, vcc_lo
	s_clause 0x1
	global_load_b32 v2, v[2:3], off
	global_load_b32 v3, v[4:5], off
	v_add_co_u32 v0, vcc_lo, s0, v0
	v_add_co_ci_u32_e32 v1, vcc_lo, s1, v1, vcc_lo
	s_waitcnt vmcnt(5)
	v_add_f32_e32 v4, v8, v9
	s_waitcnt vmcnt(4)
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(VALU_DEP_1)
	v_add_f32_e32 v4, v4, v10
	s_waitcnt vmcnt(3)
	v_add_f32_e32 v4, v4, v6
	s_waitcnt vmcnt(2)
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(VALU_DEP_1)
	v_add_f32_e32 v4, v4, v7
	s_waitcnt vmcnt(1)
	v_add_f32_e32 v2, v4, v2
	s_waitcnt vmcnt(0)
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_fmamk_f32 v2, v3, 0xc0c00000, v2
	v_fmac_f32_e32 v3, s7, v2
	global_store_b32 v[0:1], v3, off
.LBB0_3:
	s_nop 0
	s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
	s_endpgm
	.section	.rodata,"a",@progbits
	.p2align	6, 0x0
	.amdhsa_kernel _Z13caclulation3DPfS_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 16
		.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	_Z13caclulation3DPfS_S_iiif, .Lfunc_end0-_Z13caclulation3DPfS_S_iiif
                                        ; -- End function
	.section	.AMDGPU.csdata,"",@progbits
; Kernel info:
; codeLenInByte = 1096
; NumSgprs: 18
; NumVgprs: 16
; ScratchSize: 0
; MemoryBound: 0
; FloatMode: 240
; IeeeMode: 1
; LDSByteSize: 0 bytes/workgroup (compile time only)
; SGPRBlocks: 2
; VGPRBlocks: 1
; NumSGPRsForWavesPerEU: 18
; NumVGPRsForWavesPerEU: 16
; 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	_Z13caclulation2DPfS_S_iif ; -- Begin function _Z13caclulation2DPfS_S_iif
	.globl	_Z13caclulation2DPfS_S_iif
	.p2align	8
	.type	_Z13caclulation2DPfS_S_iif,@function
_Z13caclulation2DPfS_S_iif:             ; @_Z13caclulation2DPfS_S_iif
; %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_delay_alu instid0(SALU_CYCLE_1)
	v_mad_u64_u32 v[2:3], null, s15, s2, v[0:1]
	s_mul_i32 s2, s5, s4
	s_delay_alu instid0(VALU_DEP_1) | instid1(SALU_CYCLE_1)
	v_cmp_gt_i32_e32 vcc_lo, s2, v2
	s_and_saveexec_b32 s2, vcc_lo
	s_cbranch_execz .LBB1_3
; %bb.1:
	s_load_b64 s[2:3], s[0:1], 0x10
	v_ashrrev_i32_e32 v3, 31, v2
	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 v4, vcc_lo, s2, v0
	s_delay_alu instid0(VALU_DEP_2)
	v_add_co_ci_u32_e32 v5, vcc_lo, s3, v1, vcc_lo
	global_load_b32 v4, v[4:5], off
	s_waitcnt vmcnt(0)
	v_cmp_neq_f32_e32 vcc_lo, 0x800000, v4
	s_and_b32 exec_lo, exec_lo, vcc_lo
	s_cbranch_execz .LBB1_3
; %bb.2:
	s_ashr_i32 s2, s4, 31
	v_add_nc_u32_e32 v6, v2, v3
	s_add_i32 s3, s4, s2
	s_add_i32 s5, s5, -1
	s_xor_b32 s3, s3, s2
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_3) | instid1(VALU_DEP_2)
	v_xor_b32_e32 v6, v6, v3
	v_cvt_f32_u32_e32 v4, s3
	s_sub_i32 s7, 0, s3
	v_xor_b32_e32 v3, s2, v3
	v_rcp_iflag_f32_e32 v4, v4
	s_waitcnt_depctr 0xfff
	v_mul_f32_e32 v4, 0x4f7ffffe, v4
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_cvt_u32_f32_e32 v4, v4
	v_mul_lo_u32 v5, s7, v4
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_mul_hi_u32 v5, v4, v5
	v_add_nc_u32_e32 v4, v4, v5
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_mul_hi_u32 v4, v6, v4
	v_mul_lo_u32 v5, v4, s3
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(VALU_DEP_2)
	v_sub_nc_u32_e32 v5, v6, v5
	v_add_nc_u32_e32 v6, 1, v4
	v_subrev_nc_u32_e32 v7, s3, v5
	v_cmp_le_u32_e32 vcc_lo, s3, v5
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_dual_cndmask_b32 v5, v5, v7 :: v_dual_cndmask_b32 v4, v4, v6
	v_cmp_le_u32_e32 vcc_lo, s3, v5
	s_delay_alu instid0(VALU_DEP_2) | instskip(SKIP_1) | instid1(VALU_DEP_1)
	v_add_nc_u32_e32 v6, 1, v4
	s_load_b128 s[0:3], s[0:1], 0x0
	v_cndmask_b32_e32 v4, v4, v6, vcc_lo
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_xor_b32_e32 v4, v4, v3
	v_sub_nc_u32_e32 v3, v4, v3
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_2) | instid1(VALU_DEP_2)
	v_mul_lo_u32 v9, v3, s4
	v_max_i32_e32 v4, 1, v3
	v_add_nc_u32_e32 v3, 1, v3
	v_add_nc_u32_e32 v5, -1, v4
	s_delay_alu instid0(VALU_DEP_2) | instskip(SKIP_1) | instid1(VALU_DEP_1)
	v_min_i32_e32 v7, s5, v3
	v_sub_nc_u32_e32 v2, v2, v9
	v_mad_u64_u32 v[3:4], null, v5, s4, v[2:3]
	v_add_nc_u32_e32 v8, 1, v2
	v_max_i32_e32 v10, 1, v2
	s_delay_alu instid0(VALU_DEP_3) | instskip(SKIP_4) | instid1(VALU_DEP_4)
	v_mad_u64_u32 v[5:6], null, v7, s4, v[2:3]
	s_add_i32 s4, s4, -1
	v_ashrrev_i32_e32 v4, 31, v3
	v_min_i32_e32 v2, s4, v8
	v_add3_u32 v7, v9, v10, -1
	v_ashrrev_i32_e32 v6, 31, v5
	s_delay_alu instid0(VALU_DEP_3) | instskip(SKIP_1) | instid1(VALU_DEP_4)
	v_add_nc_u32_e32 v2, v2, v9
	v_lshlrev_b64 v[9:10], 2, v[3:4]
	v_ashrrev_i32_e32 v8, 31, v7
	s_delay_alu instid0(VALU_DEP_4) | instskip(NEXT) | instid1(VALU_DEP_4)
	v_lshlrev_b64 v[4:5], 2, v[5:6]
	v_ashrrev_i32_e32 v3, 31, v2
	s_delay_alu instid0(VALU_DEP_3)
	v_lshlrev_b64 v[6:7], 2, v[7:8]
	s_waitcnt lgkmcnt(0)
	v_add_co_u32 v8, vcc_lo, s2, v9
	v_add_co_ci_u32_e32 v9, vcc_lo, s3, v10, vcc_lo
	v_add_co_u32 v4, vcc_lo, s2, v4
	v_add_co_ci_u32_e32 v5, vcc_lo, s3, v5, vcc_lo
	v_add_co_u32 v6, vcc_lo, s2, v6
	v_lshlrev_b64 v[2:3], 2, v[2:3]
	v_add_co_ci_u32_e32 v7, vcc_lo, s3, v7, vcc_lo
	s_clause 0x2
	global_load_b32 v8, v[8:9], off
	global_load_b32 v9, v[4:5], off
	global_load_b32 v6, v[6:7], off
	v_add_co_u32 v2, vcc_lo, s2, v2
	v_add_co_ci_u32_e32 v3, vcc_lo, s3, v3, vcc_lo
	v_add_co_u32 v4, vcc_lo, s2, v0
	v_add_co_ci_u32_e32 v5, vcc_lo, s3, v1, vcc_lo
	s_clause 0x1
	global_load_b32 v2, v[2:3], off
	global_load_b32 v3, v[4:5], off
	v_add_co_u32 v0, vcc_lo, s0, v0
	v_add_co_ci_u32_e32 v1, vcc_lo, s1, v1, vcc_lo
	s_waitcnt vmcnt(3)
	v_add_f32_e32 v4, v8, v9
	s_waitcnt vmcnt(2)
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(VALU_DEP_1)
	v_add_f32_e32 v4, v4, v6
	s_waitcnt vmcnt(1)
	v_add_f32_e32 v2, v4, v2
	s_waitcnt vmcnt(0)
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_fmac_f32_e32 v2, -4.0, v3
	v_fmac_f32_e32 v3, s6, v2
	global_store_b32 v[0:1], v3, off
.LBB1_3:
	s_nop 0
	s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
	s_endpgm
	.section	.rodata,"a",@progbits
	.p2align	6, 0x0
	.amdhsa_kernel _Z13caclulation2DPfS_S_iif
		.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 11
		.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	_Z13caclulation2DPfS_S_iif, .Lfunc_end1-_Z13caclulation2DPfS_S_iif
                                        ; -- End function
	.section	.AMDGPU.csdata,"",@progbits
; Kernel info:
; codeLenInByte = 644
; NumSgprs: 18
; NumVgprs: 11
; ScratchSize: 0
; MemoryBound: 0
; FloatMode: 240
; IeeeMode: 1
; LDSByteSize: 0 bytes/workgroup (compile time only)
; SGPRBlocks: 2
; VGPRBlocks: 1
; NumSGPRsForWavesPerEU: 18
; NumVGPRsForWavesPerEU: 11
; 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:           _Z13caclulation3DPfS_S_iiif
    .private_segment_fixed_size: 0
    .sgpr_count:     18
    .sgpr_spill_count: 0
    .symbol:         _Z13caclulation3DPfS_S_iiif.kd
    .uniform_work_group_size: 1
    .uses_dynamic_stack: false
    .vgpr_count:     16
    .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
      - .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:         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:           _Z13caclulation2DPfS_S_iif
    .private_segment_fixed_size: 0
    .sgpr_count:     18
    .sgpr_spill_count: 0
    .symbol:         _Z13caclulation2DPfS_S_iif.kd
    .uniform_work_group_size: 1
    .uses_dynamic_stack: false
    .vgpr_count:     11
    .vgpr_spill_count: 0
    .wavefront_size: 32
    .workgroup_processor_mode: 1
amdhsa.target:   amdgcn-amd-amdhsa--gfx1100
amdhsa.version:
  - 1
  - 2
...

	.end_amdgpu_metadata
