#include <cuda_runtime.h>
#include <stdio.h>
#include <sys/time.h>


/*
  Globale Variablen stehen in allen Funktionen zur Verfuegung.
  Achtung: Das gilt *nicht* fuer Kernel-Funktionen!
*/
int Nx, Ny, N, npts;
int *active;

/*
 * Dieses Beispiel demonstriert die Addition zweier Arrays.
 * addArrayGPU soll die Arbeit ueber CUDA Threads auf der GPU verteilen.
 * addArrayHost iteriert sequentiell durch die Vektorelemente auf dem Host.
 */

// Macro zur Fehlerauswertung
#define CHECK(call)                                                            \
{                                                                              \
    const cudaError_t error = call;                                            \
    if (error != cudaSuccess)                                                  \
    {                                                                          \
        fprintf(stderr, "Error: %s:%d, ", __FILE__, __LINE__);                 \
        fprintf(stderr, "code: %d, reason: %s\n", error,                       \
                cudaGetErrorString(error));                                    \
        exit(1);                                                               \
    }                                                                          \
}

double seconds()
{
  struct timeval tp;
  struct timezone tzp;
  int i = gettimeofday(&tp, &tzp);
  return ((double)tp.tv_sec + (double)tp.tv_usec * 1.e-6);
}

/*
  Fuer die Koordinaten:
  i = 0,1,...,Nx+1
  j = 0,1,...,Ny+1
  wird der fortlaufenden Index berechnet
*/
int coord2index(int i, int j)
{
  return j*(Nx+2) + i;
}

/*
   Das Flag-Array der aktiven/inneren Punkte wird gesetzt.
*/
void active_pts()
{
   int idx,i,j;

   active=(int*)malloc(npts*sizeof(int));

   idx=0; // fortlaufender Index
   for (j=0; j<Ny+2; j++)
   {
      for (i=0; i<Nx+2; i++)
      {
         if ((i==0)||(j==0)||(i==Nx+1)||(j==Ny+1))
            active[idx]=0; // Randpunkt
         else
            active[idx]=1; // innerer Punkt

         idx+=1;
      }
   }
}

/*
   Der Vektor p wird im Inneren auf zufaellige Werte gesetzt
*/
void random_vector(float *p)
{
   int idx;

   for(idx = 0; idx < npts; idx++)
   {
      if (active[idx])
         p[idx] = (float)(rand() & 0xFF ) / 10.0;
   }
}

/*
   Das Flag-Array der aktiven/inneren Punkte wird als
   2D Gitter ausgegeben.
*/
void print_active()
{
   int i,j,idx;

   printf("active points:\n");
   idx=0;
   for (j=0; j<Ny+2; j++)
   {
      printf("  ");
      for (i=0; i<Nx+2; i++)
      {
         printf("%d ",active[idx]);
         idx+=1;
      }
      printf("\n");
   }
}


/*
   Norm-Quadrat vom Vektor v.
*/
float norm_sqr(float *v)
{
   int idx;
   float r=0.0;
   for (idx=0; idx<npts; idx++)
   {
      r+=v[idx]*v[idx];
   }
   return r;
}

/*
   Der Vektor p wird als 2D Gitter fuer i,j<=16 ausgegeben. Es werden innere/aktive
   und, falls flag>0, auch die aeusseren Punkte ausgegeben.
*/
void print_vector(char *name, float *p, int flag)
{
   int i,j,idx;
   float nrm;

   printf("%s = \n",name);
   idx=0;
   for (j=0; j<Ny+2; j++)
   {
      if (j>16)
      {
         printf("  ...\n");
         break;
      }
      printf("  ");
      for (i=0; i<Nx+2; i++)
      {
         if ((i<16)&&((flag>0)||(active[idx])))
            printf("%.2f ",p[idx]);
         if (i==16)
            printf("...");
         idx+=1;
      }
      printf("\n");
   }
   nrm=norm_sqr(p);
   printf("||%s|| = %.8f\n",name,sqrt(nrm));
}

__global__
void laplace2d_GPU(float *w, float *v, const int N) {

  /* calculate the id */
  int blockOffset = (blockIdx.x + blockIdx.y * gridDim.x) * blockDim.x * blockDim.y;
  int threadId = threadIdx.x + threadIdx.y * blockDim.x;
  int idx = blockOffset + threadId;

  int first_coord = (int) (idx % N);
  int second_coord = (int) (idx / N);

  if (
      (first_coord > 0) && (first_coord < (N-1)) &&
      (second_coord > 0) && (second_coord < (N-1))
      ) {
    w[idx] = -4. * v[idx] + v[idx-1] + v[idx+1] + v[idx-N] + v[idx+N];
    /* printf("%d, %f, %f\n", idx, w[idx], v[idx]); */
  }
}

/*
 * laplace_2d(float *w, float *v)
 *
 * Calculates the product A*v for a vector v and writes the result into w.
 * A is a laplacian.
 *
 */
void laplace2d_CPU(float *w, float *v) {

  int i, j, n = Nx+2;
  int npts = n * n;

  /* two loops over every element of the unknowns */
  for (i=0; i<npts; i++) {
    for (j=0; j<npts; j++) {

      /* skip the boundary */
      if (
          (i % n == 0) ||
          ((int) (i / n) == 0) ||
          (i % n == n-1) ||
          ((int) (i / n) == n-1)
          ) {
        continue;
      }

      /* diagonal */
      if (i == j) {
        w[i] += -4 * v[j];
      }

      /* first two off diagonals */
      if (
          ((i == j+1) && (i % n != 0))
          ||
          ((i == j-1) && (j % n != 0))
          )
        {
          w[i] += 1 * v[j];
        }

      /* other two off diagonals */
      if ((i == j+n) || (i == j-n)) {
        w[i] += 1 * v[j];
      }
    }
  }
}

/*
 * vector_addition(float *v, float *u, float *w)
 *
 * Adds two vectors u and v together and writes the result into w.
 *
 */
void vector_addition_CPU(float *u, float *v, float *w) {
  int i;

  for (i=0; i<npts; i++) {
    w[i] += u[i] + v[i];
  }
}

__global__
void vector_addition_GPU(float *u, float *v, float *w) {

  /* calculate the id */
  int blockOffset = (blockIdx.x + blockIdx.y * gridDim.x) * blockDim.x * blockDim.y;
  int threadId = threadIdx.x + threadIdx.y * blockDim.x;
  int idx = blockOffset + threadId;

  w[idx] = u[idx] + v[idx];
}

/*
 * scale_vector(float prefactor, float *v, float *w)
 *
 * Scales a vector v by a prefactor and writes the result into w.
 *
 */
void scale_vector_CPU(float prefactor, float *v, float *w) {
  int i;

  for (i=0; i<npts; i++) {
    w[i] = prefactor * v[i];
  }
}

__global__
void scale_vector_GPU(float prefactor, float *v, float *w) {

  /* calculate the id */
  int blockOffset = (blockIdx.x + blockIdx.y * gridDim.x) * blockDim.x * blockDim.y;
  int threadId = threadIdx.x + threadIdx.y * blockDim.x;
  int idx = blockOffset + threadId;

  w[idx] = prefactor * v[idx];
}

void laplaceOneLoop(FILE* laplace_speedup_file, const int N, int gridX, int gridY, int threadX, int threadY) {

  int nBytes;
  float *h_w, *h_v, *h_u;

  // Globale Variablen setzen:
  // Anzahl der Inneren Punkte in x- und y-Richtung
  Nx = N;
  Ny = N;

  // Gesamtanzahl der Gitterpunkte
  npts=(Nx+2)*(Ny+2);
  // Aktive Punkte - Array
  active_pts();

  // Speicherbedarf pro Vektor in Byte
  nBytes=npts*sizeof(float);

  // Speicher für Vektoren allozieren
  h_w = (float *) malloc(npts * sizeof(float));
  h_v = (float *) malloc(npts * sizeof(float));
  h_u = (float *) malloc(npts * sizeof(float));

  // auf Null setzen
  memset(h_w, 0, nBytes);
  memset(h_v, 0, nBytes);
  memset(h_u, 0, nBytes);

  // Zufaelliger Vektor
  random_vector(h_v);

  /* print_vector("v",h_v,1); */

  // Device-Speicher allozieren mit cudaMalloc
  float *d_v, *d_w;
  CHECK(cudaMalloc((float**)&d_v, nBytes));
  CHECK(cudaMalloc((float**)&d_w, nBytes));

  // kopieren Host -> Device mit cudaMemcpy
  CHECK(cudaMemcpy(d_v, h_v, nBytes, cudaMemcpyHostToDevice));
  CHECK(cudaMemcpy(d_w, h_w, nBytes, cudaMemcpyHostToDevice));

  dim3 block(gridX, gridY);
  dim3 grid(threadX, threadY);

  double t_GPU_start = seconds();
  laplace2d_GPU <<<block,grid>>> (d_w, d_v, N+2);
  cudaDeviceSynchronize();
  double t_GPU_end = seconds();
  double t_GPU = t_GPU_end - t_GPU_start;

  /* kopieren Device -> Host mit cudaMemcpy */
  CHECK(cudaMemcpy(h_w, d_w, nBytes, cudaMemcpyDeviceToHost));

  /* print_vector("w_GPU",h_w,1); */

  // Device-Speicher freigeben
  CHECK(cudaFree(d_v));
  CHECK(cudaFree(d_w));

  double t_CPU_start = seconds();
  laplace2d_CPU(h_u, h_v);
  double t_CPU_end = seconds();
  double t_CPU = t_CPU_end - t_CPU_start;

  /* print_vector("w_CPU",h_w,1); */

  fprintf(
          laplace_speedup_file,
          "%lf, %lf, %lf,\n",
          t_GPU, t_CPU, t_CPU/t_GPU
          );

  free(active);
  free(h_w);
  free(h_v);

}

void vectorScaleOneLoop(FILE* vector_scale_speedup_file, const int N, int gridX, int gridY, int threadX, int threadY) {

  int nBytes;
  float *h_w, *h_v, *h_u;

  // Globale Variablen setzen:
  // Anzahl der Inneren Punkte in x- und y-Richtung
  Nx = N;
  Ny = N;

  // Gesamtanzahl der Gitterpunkte
  npts=(Nx+2)*(Ny+2);
  // Aktive Punkte - Array
  active_pts();

  // Speicherbedarf pro Vektor in Byte
  nBytes=npts*sizeof(float);

  // Speicher für Vektoren allozieren
  h_w = (float *) malloc(npts * sizeof(float));
  h_v = (float *) malloc(npts * sizeof(float));
  h_u = (float *) malloc(npts * sizeof(float));

  // auf Null setzen
  memset(h_w, 0, nBytes);
  memset(h_v, 0, nBytes);
  memset(h_u, 0, nBytes);

  // Zufaelliger Vektor
  random_vector(h_v);

  /* print_vector("v",h_v,1); */

  // Device-Speicher allozieren mit cudaMalloc
  float *d_v, *d_w;
  CHECK(cudaMalloc((float**)&d_v, nBytes));
  CHECK(cudaMalloc((float**)&d_w, nBytes));

  // kopieren Host -> Device mit cudaMemcpy
  CHECK(cudaMemcpy(d_v, h_v, nBytes, cudaMemcpyHostToDevice));
  CHECK(cudaMemcpy(d_w, h_w, nBytes, cudaMemcpyHostToDevice));

  dim3 block(gridX, gridY);
  dim3 grid(threadX, threadY);

  double t_GPU_start = seconds();
  laplace2d_GPU <<<block,grid>>> (d_w, d_v, N+2);
  cudaDeviceSynchronize();
  double t_GPU_end = seconds();
  double t_GPU = t_GPU_end - t_GPU_start;

  /* kopieren Device -> Host mit cudaMemcpy */
  CHECK(cudaMemcpy(h_w, d_w, nBytes, cudaMemcpyDeviceToHost));

  /* print_vector("w_GPU",h_w,1); */

  // Device-Speicher freigeben
  CHECK(cudaFree(d_v));
  CHECK(cudaFree(d_w));

  double t_CPU_start = seconds();
  laplace2d_CPU(h_u, h_v);
  double t_CPU_end = seconds();
  double t_CPU = t_CPU_end - t_CPU_start;

  /* print_vector("w_CPU",h_w,1); */

  fprintf(
          vector_scale_speedup_file,
          "%lf, %lf, %lf,\n",
          t_GPU, t_CPU, t_CPU/t_GPU
          );

  free(active);
  free(h_w);
  free(h_v);

}

void vectorAddOneLoop(FILE* vector_add_speedup_file, const int N, int gridX, int gridY, int threadX, int threadY) {

  int nBytes;
  float *h_w, *h_v, *h_u;

  // Globale Variablen setzen:
  // Anzahl der Inneren Punkte in x- und y-Richtung
  Nx = N;
  Ny = N;

  // Gesamtanzahl der Gitterpunkte
  npts=(Nx+2)*(Ny+2);
  // Aktive Punkte - Array
  active_pts();

  // Speicherbedarf pro Vektor in Byte
  nBytes=npts*sizeof(float);

  // Speicher für Vektoren allozieren
  h_w = (float *) malloc(npts * sizeof(float));
  h_v = (float *) malloc(npts * sizeof(float));
  h_u = (float *) malloc(npts * sizeof(float));

  // auf Null setzen
  memset(h_w, 0, nBytes);
  memset(h_v, 0, nBytes);
  memset(h_u, 0, nBytes);

  // Zufaelliger Vektor
  random_vector(h_v);

  /* print_vector("v",h_v,1); */

  // Device-Speicher allozieren mit cudaMalloc
  float *d_v, *d_w;
  CHECK(cudaMalloc((float**)&d_v, nBytes));
  CHECK(cudaMalloc((float**)&d_w, nBytes));

  // kopieren Host -> Device mit cudaMemcpy
  CHECK(cudaMemcpy(d_v, h_v, nBytes, cudaMemcpyHostToDevice));
  CHECK(cudaMemcpy(d_w, h_w, nBytes, cudaMemcpyHostToDevice));

  dim3 block(gridX, gridY);
  dim3 grid(threadX, threadY);

  double t_GPU_start = seconds();
  laplace2d_GPU <<<block,grid>>> (d_w, d_v, N+2);
  cudaDeviceSynchronize();
  double t_GPU_end = seconds();
  double t_GPU = t_GPU_end - t_GPU_start;

  /* kopieren Device -> Host mit cudaMemcpy */
  CHECK(cudaMemcpy(h_w, d_w, nBytes, cudaMemcpyDeviceToHost));

  /* print_vector("w_GPU",h_w,1); */

  // Device-Speicher freigeben
  CHECK(cudaFree(d_v));
  CHECK(cudaFree(d_w));

  double t_CPU_start = seconds();
  laplace2d_CPU(h_u, h_v);
  double t_CPU_end = seconds();
  double t_CPU = t_CPU_end - t_CPU_start;

  /* print_vector("w_CPU",h_w,1); */

  fprintf(
          vector_add_speedup_file,
          "%lf, %lf, %lf,\n",
          t_GPU, t_CPU, t_CPU/t_GPU
          );

  free(active);
  free(h_w);
  free(h_v);

}

int main(int argc, char **argv)
{
  printf("%s Starting...\n", argv[0]);

  typedef struct grid_parameters {
    int N;
    int gridX;
    int gridY;
    int threadX;
    int threadY;
  } grid_params_t;

  int data_points = 64;

  grid_params_t grid_data[data_points];

  /* read in grid parameters */
  FILE *f = fopen("../scripts/factorizations", "r");
  int i;
  for (i = 0;
       i != data_points &&
         fscanf(f, "%d, %d, %d, %d, %d,\n", &grid_data[i].N, &grid_data[i].gridX, &grid_data[i].gridY, &grid_data[i].threadX, &grid_data[i].threadY) != EOF;
       i++
       );
  fclose(f);

  /* overwrite results */
  FILE *laplace_speedup = fopen("../scripts/laplace_speedup_results", "w");
  FILE *vector_scale_speedup = fopen("../scripts/vector_scale_speedup_results", "w");
  FILE *vector_add_speedup = fopen("../scripts/vector_add_speedup_results", "w");

  fprintf(
          laplace_speedup,
          "t_GPU, t_CPU, t_CPU/t_GPU,\n"
          );
  fprintf(
          vector_scale_speedup,
          "t_GPU, t_CPU, t_CPU/t_GPU,\n"
          );
  fprintf(
          vector_add_speedup,
          "t_GPU, t_CPU, t_CPU/t_GPU,\n"
          );

  int gridX, gridY, threadX, threadY;

  for (i = 0; i < data_points; i++) {

    N = grid_data[i].N;
    gridX = grid_data[i].gridX;
    gridY = grid_data[i].gridY;
    threadX = grid_data[i].threadX;
    threadY = grid_data[i].threadY;

    laplaceOneLoop(
                   laplace_speedup,
                   N,
                   gridX, gridY,
                   threadX, threadY
                   );

    vectorScaleOneLoop(
                       vector_scale_speedup,
                       N,
                       gridX, gridY,
                       threadX, threadY
                       );

    vectorAddOneLoop(
                     vector_add_speedup,
                     N,
                     gridX, gridY,
                     threadX, threadY
                     );

    printf("%d/%d\r", i+1, data_points);
    fflush(stdout);
  }
  printf("\n");

  fclose(laplace_speedup);
  fclose(vector_scale_speedup);
  fclose(vector_add_speedup);

  return (0);

}

	.file	"tmpxft_0030273d_00000000-6_laplaceGPU.cudafe1.cpp"
	.text
#APP

#NO_APP
	.type	_ZL26__cudaUnregisterBinaryUtilv, @function
_ZL26__cudaUnregisterBinaryUtilv:
.LFB2043:
	.cfi_startproc
	endbr64
	movq	_ZL20__cudaFatCubinHandle(%rip), %rdi
	jmp	__cudaUnregisterFatBinary@PLT
	.cfi_endproc
.LFE2043:
	.size	_ZL26__cudaUnregisterBinaryUtilv, .-_ZL26__cudaUnregisterBinaryUtilv
	.globl	_Z7secondsv
	.type	_Z7secondsv, @function
_Z7secondsv:
.LFB2027:
	.cfi_startproc
	endbr64
	subq	$40, %rsp
	.cfi_def_cfa_offset 48
	movq	%fs:40, %rax
	movq	%rax, 24(%rsp)
	xorl	%eax, %eax
	movq	%rsp, %rsi
	leaq	8(%rsp), %rdi
	call	gettimeofday@PLT
	cvtsi2sdq	16(%rsp), %xmm0
	mulsd	.LC0(%rip), %xmm0
	cvtsi2sdq	8(%rsp), %xmm1
	addsd	%xmm1, %xmm0
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	je	.L3
	call	__stack_chk_fail@PLT
.L3:
	addq	$40, %rsp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE2027:
	.size	_Z7secondsv, .-_Z7secondsv
	.globl	_Z11coord2indexii
	.type	_Z11coord2indexii, @function
_Z11coord2indexii:
.LFB2028:
	.cfi_startproc
	endbr64
	movl	Nx(%rip), %eax
	addl	$2, %eax
	imull	%esi, %eax
	addl	%edi, %eax
	ret
	.cfi_endproc
.LFE2028:
	.size	_Z11coord2indexii, .-_Z11coord2indexii
	.globl	_Z10active_ptsv
	.type	_Z10active_ptsv, @function
_Z10active_ptsv:
.LFB2029:
	.cfi_startproc
	endbr64
	movslq	npts(%rip), %rdi
	pushq	%rbx
	.cfi_def_cfa_offset 16
	.cfi_offset 3, -16
	salq	$2, %rdi
	call	malloc@PLT
	movl	Nx(%rip), %r10d
	xorl	%ecx, %ecx
	xorl	%r9d, %r9d
	movq	%rax, active(%rip)
	movq	%rax, %rsi
	movl	Ny(%rip), %eax
	leal	1(%r10), %r11d
	leal	1(%rax), %edi
.L8:
	cmpl	%ecx, %edi
	jl	.L7
	movslq	%r9d, %r8
	xorl	%edx, %edx
.L11:
	cmpl	%edx, %r11d
	jl	.L13
	testl	%ecx, %ecx
	sete	%al
	cmpl	%ecx, %edi
	sete	%bl
	orl	%ebx, %eax
	testl	%edx, %edx
	sete	%bl
	orl	%ebx, %eax
	cmpl	%edx, %r11d
	sete	%bl
	incl	%edx
	orl	%ebx, %eax
	xorl	$1, %eax
	movzbl	%al, %eax
	movl	%eax, (%rsi,%r8,4)
	incq	%r8
	jmp	.L11
.L13:
	leal	2(%r10), %eax
	xorl	%edx, %edx
	testl	%eax, %eax
	cmovs	%edx, %eax
	incl	%ecx
	addl	%eax, %r9d
	jmp	.L8
.L7:
	popq	%rbx
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE2029:
	.size	_Z10active_ptsv, .-_Z10active_ptsv
	.globl	_Z13random_vectorPf
	.type	_Z13random_vectorPf, @function
_Z13random_vectorPf:
.LFB2030:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rdi, %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	xorl	%ebx, %ebx
	pushq	%rdx
	.cfi_def_cfa_offset 32
.L15:
	cmpl	%ebx, npts(%rip)
	jle	.L19
	movq	active(%rip), %rax
	cmpl	$0, (%rax,%rbx,4)
	je	.L16
	call	rand@PLT
	movzbl	%al, %eax
	cvtsi2ssl	%eax, %xmm0
	divss	.LC1(%rip), %xmm0
	movss	%xmm0, 0(%rbp,%rbx,4)
.L16:
	incq	%rbx
	jmp	.L15
.L19:
	popq	%rax
	.cfi_def_cfa_offset 24
	popq	%rbx
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE2030:
	.size	_Z13random_vectorPf, .-_Z13random_vectorPf
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC2:
	.string	"active points:\n"
.LC3:
	.string	"  "
.LC4:
	.string	"%d "
.LC5:
	.string	"\n"
	.text
	.globl	_Z12print_activev
	.type	_Z12print_activev, @function
_Z12print_activev:
.LFB2031:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	leaq	.LC2(%rip), %rsi
	movl	$2, %edi
	xorl	%eax, %eax
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	leaq	.LC3(%rip), %r14
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	xorl	%r13d, %r13d
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	xorl	%r12d, %r12d
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	pushq	%rdx
	.cfi_def_cfa_offset 64
	call	__printf_chk@PLT
.L21:
	movl	Ny(%rip), %eax
	incl	%eax
	cmpl	%r12d, %eax
	jl	.L26
	movq	%r14, %rsi
	movl	$2, %edi
	xorl	%eax, %eax
	movslq	%r13d, %rbx
	call	__printf_chk@PLT
	salq	$2, %rbx
	xorl	%ebp, %ebp
	leaq	.LC4(%rip), %r15
.L22:
	movl	Nx(%rip), %eax
	incl	%eax
	cmpl	%ebp, %eax
	jl	.L27
	movq	active(%rip), %rax
	movq	%r15, %rsi
	movl	$2, %edi
	incl	%ebp
	movl	(%rax,%rbx), %edx
	xorl	%eax, %eax
	addq	$4, %rbx
	call	__printf_chk@PLT
	jmp	.L22
.L27:
	leaq	.LC5(%rip), %rsi
	xorl	%eax, %eax
	addl	%ebp, %r13d
	incl	%r12d
	movl	$2, %edi
	call	__printf_chk@PLT
	jmp	.L21
.L26:
	popq	%rax
	.cfi_def_cfa_offset 56
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE2031:
	.size	_Z12print_activev, .-_Z12print_activev
	.globl	_Z8norm_sqrPf
	.type	_Z8norm_sqrPf, @function
_Z8norm_sqrPf:
.LFB2032:
	.cfi_startproc
	endbr64
	movl	npts(%rip), %edx
	xorl	%eax, %eax
	xorps	%xmm1, %xmm1
.L29:
	cmpl	%eax, %edx
	jle	.L31
	movss	(%rdi,%rax,4), %xmm0
	incq	%rax
	mulss	%xmm0, %xmm0
	addss	%xmm0, %xmm1
	jmp	.L29
.L31:
	movaps	%xmm1, %xmm0
	ret
	.cfi_endproc
.LFE2032:
	.size	_Z8norm_sqrPf, .-_Z8norm_sqrPf
	.section	.rodata.str1.1
.LC7:
	.string	"%s = \n"
.LC8:
	.string	"  ...\n"
.LC9:
	.string	"%.2f "
.LC10:
	.string	"..."
.LC11:
	.string	"||%s|| = %.8f\n"
	.text
	.globl	_Z12print_vectorPcPfi
	.type	_Z12print_vectorPcPfi, @function
_Z12print_vectorPcPfi:
.LFB2033:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	xorl	%eax, %eax
	xorl	%r15d, %r15d
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	leaq	.LC3(%rip), %r14
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	movl	%edx, %r13d
	movq	%rdi, %rdx
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	xorl	%r12d, %r12d
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	movq	%rsi, %rbp
	leaq	.LC7(%rip), %rsi
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$24, %rsp
	.cfi_def_cfa_offset 80
	movq	%rdi, 8(%rsp)
	movl	$2, %edi
	call	__printf_chk@PLT
.L33:
	movl	Ny(%rip), %eax
	incl	%eax
	cmpl	%r12d, %eax
	jl	.L35
	cmpl	$17, %r12d
	jne	.L34
	leaq	.LC8(%rip), %rsi
	movl	$2, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L35
.L34:
	movq	%r14, %rsi
	movl	$2, %edi
	xorl	%eax, %eax
	movslq	%r15d, %r15
	call	__printf_chk@PLT
	xorl	%ebx, %ebx
.L36:
	movl	Nx(%rip), %eax
	incl	%eax
	cmpl	%ebx, %eax
	jl	.L43
	cmpl	$15, %ebx
	jg	.L37
	testl	%r13d, %r13d
	jg	.L38
	movq	active(%rip), %rax
	cmpl	$0, (%rax,%r15,4)
	je	.L39
.L38:
	leaq	.LC9(%rip), %rsi
	movl	$2, %edi
	movb	$1, %al
	cvtss2sd	0(%rbp,%r15,4), %xmm0
	call	__printf_chk@PLT
	jmp	.L39
.L37:
	cmpl	$16, %ebx
	jne	.L39
	leaq	.LC10(%rip), %rsi
	movl	$2, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
.L39:
	incl	%ebx
	incq	%r15
	jmp	.L36
.L43:
	leaq	.LC5(%rip), %rsi
	movl	$2, %edi
	xorl	%eax, %eax
	incl	%r12d
	call	__printf_chk@PLT
	jmp	.L33
.L35:
	movq	%rbp, %rdi
	call	_Z8norm_sqrPf
	call	sqrtf@PLT
	movq	8(%rsp), %rdx
	addq	$24, %rsp
	.cfi_def_cfa_offset 56
	movl	$2, %edi
	popq	%rbx
	.cfi_def_cfa_offset 48
	leaq	.LC11(%rip), %rsi
	popq	%rbp
	.cfi_def_cfa_offset 40
	movb	$1, %al
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	cvtss2sd	%xmm0, %xmm0
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	jmp	__printf_chk@PLT
	.cfi_endproc
.LFE2033:
	.size	_Z12print_vectorPcPfi, .-_Z12print_vectorPcPfi
	.globl	_Z13laplace2d_CPUPfS_
	.type	_Z13laplace2d_CPUPfS_, @function
_Z13laplace2d_CPUPfS_:
.LFB2034:
	.cfi_startproc
	endbr64
	movl	Nx(%rip), %eax
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	movq	%rsi, %r10
	xorl	%ecx, %ecx
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	movss	.LC12(%rip), %xmm1
	leal	2(%rax), %r8d
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	leal	1(%rax), %r12d
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	movl	%r8d, %ebp
	imull	%r8d, %ebp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	movl	$-2, %ebx
	subl	%eax, %ebx
.L45:
	movl	%ecx, -4(%rsp)
	movl	%ecx, %r9d
	cmpl	%ecx, %ebp
	jle	.L61
	movl	%r9d, %eax
	cltd
	idivl	%r8d
	cmpl	%r12d, %edx
	movl	%edx, %r14d
	movl	%eax, %r13d
	sete	%r15b
	xorl	%esi, %esi
.L54:
	testl	%r14d, %r14d
	je	.L47
	testl	%r13d, %r13d
	je	.L47
	cmpl	%r12d, %r13d
	je	.L47
	testb	%r15b, %r15b
	jne	.L47
	movl	%esi, %r11d
	cmpl	%esi, -4(%rsp)
	jne	.L49
	movss	(%r10,%rsi,4), %xmm0
	mulss	%xmm1, %xmm0
	addss	(%rdi,%rcx,4), %xmm0
	movss	%xmm0, (%rdi,%rcx,4)
	jmp	.L50
.L49:
	leal	1(%rsi), %eax
	cmpl	%r9d, %eax
	jne	.L50
.L52:
	movss	(%rdi,%rcx,4), %xmm0
	addss	(%r10,%rsi,4), %xmm0
	movss	%xmm0, (%rdi,%rcx,4)
	jmp	.L51
.L50:
	leal	-1(%r11), %eax
	cmpl	%r9d, %eax
	jne	.L51
	movl	%esi, %eax
	cltd
	idivl	%r8d
	testl	%edx, %edx
	jne	.L52
.L51:
	leal	(%r8,%r11), %eax
	cmpl	%r9d, %eax
	je	.L53
	addl	%ebx, %r11d
	cmpl	%r9d, %r11d
	jne	.L47
.L53:
	movss	(%rdi,%rcx,4), %xmm0
	addss	(%r10,%rsi,4), %xmm0
	movss	%xmm0, (%rdi,%rcx,4)
.L47:
	incq	%rsi
	cmpl	%esi, %ebp
	jg	.L54
	incq	%rcx
	jmp	.L45
.L61:
	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
.LFE2034:
	.size	_Z13laplace2d_CPUPfS_, .-_Z13laplace2d_CPUPfS_
	.globl	_Z19vector_addition_CPUPfS_S_
	.type	_Z19vector_addition_CPUPfS_S_, @function
_Z19vector_addition_CPUPfS_S_:
.LFB2035:
	.cfi_startproc
	endbr64
	movl	npts(%rip), %ecx
	xorl	%eax, %eax
.L63:
	cmpl	%eax, %ecx
	jle	.L65
	movss	(%rdi,%rax,4), %xmm0
	addss	(%rsi,%rax,4), %xmm0
	addss	(%rdx,%rax,4), %xmm0
	movss	%xmm0, (%rdx,%rax,4)
	incq	%rax
	jmp	.L63
.L65:
	ret
	.cfi_endproc
.LFE2035:
	.size	_Z19vector_addition_CPUPfS_S_, .-_Z19vector_addition_CPUPfS_S_
	.globl	_Z16scale_vector_CPUfPfS_
	.type	_Z16scale_vector_CPUfPfS_, @function
_Z16scale_vector_CPUfPfS_:
.LFB2036:
	.cfi_startproc
	endbr64
	movl	npts(%rip), %edx
	xorl	%eax, %eax
.L67:
	cmpl	%eax, %edx
	jle	.L69
	movss	(%rdi,%rax,4), %xmm1
	mulss	%xmm0, %xmm1
	movss	%xmm1, (%rsi,%rax,4)
	incq	%rax
	jmp	.L67
.L69:
	ret
	.cfi_endproc
.LFE2036:
	.size	_Z16scale_vector_CPUfPfS_, .-_Z16scale_vector_CPUfPfS_
	.globl	_Z36__device_stub__Z13laplace2d_GPUPfS_iPfS_i
	.type	_Z36__device_stub__Z13laplace2d_GPUPfS_iPfS_i, @function
_Z36__device_stub__Z13laplace2d_GPUPfS_iPfS_i:
.LFB2065:
	.cfi_startproc
	endbr64
	subq	$136, %rsp
	.cfi_def_cfa_offset 144
	movq	%rdi, 24(%rsp)
	leaq	40(%rsp), %rcx
	leaq	48(%rsp), %rdi
	movq	%rsi, 16(%rsp)
	leaq	60(%rsp), %rsi
	movl	%edx, 12(%rsp)
	leaq	32(%rsp), %rdx
	movq	%fs:40, %rax
	movq	%rax, 120(%rsp)
	xorl	%eax, %eax
	leaq	24(%rsp), %rax
	movl	$1, 56(%rsp)
	movq	%rax, 96(%rsp)
	leaq	16(%rsp), %rax
	movq	%rax, 104(%rsp)
	leaq	12(%rsp), %rax
	movq	%rax, 112(%rsp)
	movabsq	$4294967297, %rax
	movq	%rax, 48(%rsp)
	movq	%rax, 60(%rsp)
	movl	$1, 68(%rsp)
	call	__cudaPopCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L70
	pushq	40(%rsp)
	.cfi_def_cfa_offset 152
	leaq	_Z13laplace2d_GPUPfS_i(%rip), %rdi
	pushq	40(%rsp)
	.cfi_def_cfa_offset 160
	movq	76(%rsp), %rcx
	movl	84(%rsp), %r8d
	movq	64(%rsp), %rsi
	movl	72(%rsp), %edx
	leaq	112(%rsp), %r9
	call	cudaLaunchKernel@PLT
	popq	%rax
	.cfi_def_cfa_offset 152
	popq	%rdx
	.cfi_def_cfa_offset 144
.L70:
	movq	120(%rsp), %rax
	subq	%fs:40, %rax
	je	.L72
	call	__stack_chk_fail@PLT
.L72:
	addq	$136, %rsp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE2065:
	.size	_Z36__device_stub__Z13laplace2d_GPUPfS_iPfS_i, .-_Z36__device_stub__Z13laplace2d_GPUPfS_iPfS_i
	.globl	_Z13laplace2d_GPUPfS_i
	.type	_Z13laplace2d_GPUPfS_i, @function
_Z13laplace2d_GPUPfS_i:
.LFB2066:
	.cfi_startproc
	endbr64
	jmp	_Z36__device_stub__Z13laplace2d_GPUPfS_iPfS_i
	.cfi_endproc
.LFE2066:
	.size	_Z13laplace2d_GPUPfS_i, .-_Z13laplace2d_GPUPfS_i
	.section	.rodata.str1.1
.LC13:
	.string	"/home/ubuntu/Datasets/stackv2/train-structured/Klump3n/compphysthree/master/ue3/aufg2/src/laplaceGPU.cu"
.LC14:
	.string	"Error: %s:%d, "
.LC15:
	.string	"code: %d, reason: %s\n"
.LC16:
	.string	"%lf, %lf, %lf,\n"
	.text
	.globl	_Z14laplaceOneLoopP8_IO_FILEiiiii
	.type	_Z14laplaceOneLoopP8_IO_FILEiiiii, @function
_Z14laplaceOneLoopP8_IO_FILEiiiii:
.LFB2037:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	movl	%edx, %r15d
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	movl	%ecx, %r14d
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	movl	%r8d, %r13d
	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
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	leal	2(%rsi), %ebx
	movl	%ebx, %ebp
	imull	%ebx, %ebp
	subq	$104, %rsp
	.cfi_def_cfa_offset 160
	movq	%rdi, 40(%rsp)
	movq	%fs:40, %rax
	movq	%rax, 88(%rsp)
	xorl	%eax, %eax
	movl	%esi, Nx(%rip)
	movl	%esi, Ny(%rip)
	movl	%ebp, npts(%rip)
	call	_Z10active_ptsv
	movslq	%ebp, %rax
	sall	$2, %ebp
	salq	$2, %rax
	movq	%rax, %rdi
	movq	%rax, 8(%rsp)
	call	malloc@PLT
	movq	8(%rsp), %rdi
	movq	%rax, 24(%rsp)
	call	malloc@PLT
	movq	8(%rsp), %rdi
	movq	%rax, 16(%rsp)
	call	malloc@PLT
	movq	8(%rsp), %rcx
	movq	24(%rsp), %rdi
	xorl	%esi, %esi
	movq	%rax, 32(%rsp)
	movslq	%ebp, %rax
	movq	%rax, %rdx
	movq	%rax, (%rsp)
	call	__memset_chk@PLT
	movq	8(%rsp), %rcx
	movq	(%rsp), %rdx
	xorl	%esi, %esi
	movq	16(%rsp), %rdi
	call	__memset_chk@PLT
	movq	8(%rsp), %rcx
	movq	(%rsp), %rdx
	xorl	%esi, %esi
	movq	32(%rsp), %rdi
	call	__memset_chk@PLT
	movq	16(%rsp), %rdi
	call	_Z13random_vectorPf
	movq	(%rsp), %rsi
	leaq	48(%rsp), %rdi
	call	cudaMalloc@PLT
	testl	%eax, %eax
	je	.L76
	movl	%eax, %ebp
	movl	$313, %r8d
	jmp	.L87
.L76:
	movq	(%rsp), %rsi
	leaq	56(%rsp), %rdi
	call	cudaMalloc@PLT
	movl	%eax, %ebp
	testl	%eax, %eax
	je	.L77
	movl	$314, %r8d
.L87:
	movq	stderr(%rip), %rdi
	leaq	.LC13(%rip), %rcx
	leaq	.LC14(%rip), %rdx
	xorl	%eax, %eax
	movl	$2, %esi
	call	__fprintf_chk@PLT
	movl	%ebp, %edi
	call	cudaGetErrorString@PLT
	movl	%ebp, %ecx
	movq	%rax, %r8
.L88:
	movq	stderr(%rip), %rdi
	leaq	.LC15(%rip), %rdx
	movl	$2, %esi
	xorl	%eax, %eax
	call	__fprintf_chk@PLT
	movl	$1, %edi
	call	exit@PLT
.L77:
	movq	(%rsp), %rdx
	movq	16(%rsp), %rsi
	movl	$1, %ecx
	movq	48(%rsp), %rdi
	call	cudaMemcpy@PLT
	movl	$317, %r8d
	movl	%eax, %ebp
	testl	%eax, %eax
	jne	.L87
	movq	(%rsp), %rdx
	movq	24(%rsp), %rsi
	movl	$1, %ecx
	movq	56(%rsp), %rdi
	call	cudaMemcpy@PLT
	movl	$318, %r8d
	movl	%eax, %ebp
	testl	%eax, %eax
	jne	.L87
	movl	%r15d, 64(%rsp)
	movl	%r14d, 68(%rsp)
	movl	$1, 72(%rsp)
	movl	%r13d, 76(%rsp)
	movl	%r12d, 80(%rsp)
	movl	$1, 84(%rsp)
	call	_Z7secondsv
	movl	84(%rsp), %ecx
	movl	72(%rsp), %esi
	xorl	%r9d, %r9d
	movq	76(%rsp), %rdx
	movq	64(%rsp), %rdi
	xorl	%r8d, %r8d
	movsd	%xmm0, 8(%rsp)
	call	__cudaPushCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L80
	movq	48(%rsp), %rsi
	movq	56(%rsp), %rdi
	movl	%ebx, %edx
	call	_Z36__device_stub__Z13laplace2d_GPUPfS_iPfS_i
.L80:
	call	cudaDeviceSynchronize@PLT
	call	_Z7secondsv
	subsd	8(%rsp), %xmm0
	movq	(%rsp), %rdx
	movl	$2, %ecx
	movq	56(%rsp), %rsi
	movq	24(%rsp), %rdi
	movsd	%xmm0, 8(%rsp)
	call	cudaMemcpy@PLT
	movl	$330, %r8d
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	.L89
	movq	48(%rsp), %rdi
	call	cudaFree@PLT
	movl	$335, %r8d
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	.L89
	movq	56(%rsp), %rdi
	call	cudaFree@PLT
	movl	%eax, %ebx
	testl	%eax, %eax
	je	.L83
	movl	$336, %r8d
.L89:
	movq	stderr(%rip), %rdi
	leaq	.LC13(%rip), %rcx
	leaq	.LC14(%rip), %rdx
	xorl	%eax, %eax
	movl	$2, %esi
	call	__fprintf_chk@PLT
	movl	%ebx, %edi
	call	cudaGetErrorString@PLT
	movl	%ebx, %ecx
	movq	%rax, %r8
	jmp	.L88
.L83:
	call	_Z7secondsv
	movq	16(%rsp), %rsi
	movq	32(%rsp), %rdi
	movsd	%xmm0, (%rsp)
	call	_Z13laplace2d_CPUPfS_
	call	_Z7secondsv
	movq	40(%rsp), %rdi
	leaq	.LC16(%rip), %rdx
	movb	$3, %al
	movaps	%xmm0, %xmm1
	subsd	(%rsp), %xmm1
	movsd	8(%rsp), %xmm0
	movl	$2, %esi
	movaps	%xmm1, %xmm2
	divsd	8(%rsp), %xmm2
	call	__fprintf_chk@PLT
	movq	active(%rip), %rdi
	call	free@PLT
	movq	24(%rsp), %rdi
	call	free@PLT
	movq	88(%rsp), %rax
	subq	%fs:40, %rax
	je	.L84
	call	__stack_chk_fail@PLT
.L84:
	movq	16(%rsp), %rdi
	addq	$104, %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
	jmp	free@PLT
	.cfi_endproc
.LFE2037:
	.size	_Z14laplaceOneLoopP8_IO_FILEiiiii, .-_Z14laplaceOneLoopP8_IO_FILEiiiii
	.globl	_Z18vectorScaleOneLoopP8_IO_FILEiiiii
	.type	_Z18vectorScaleOneLoopP8_IO_FILEiiiii, @function
_Z18vectorScaleOneLoopP8_IO_FILEiiiii:
.LFB2038:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	movl	%edx, %r15d
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	movl	%ecx, %r14d
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	movl	%r8d, %r13d
	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
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	leal	2(%rsi), %ebx
	movl	%ebx, %ebp
	imull	%ebx, %ebp
	subq	$104, %rsp
	.cfi_def_cfa_offset 160
	movq	%rdi, 40(%rsp)
	movq	%fs:40, %rax
	movq	%rax, 88(%rsp)
	xorl	%eax, %eax
	movl	%esi, Nx(%rip)
	movl	%esi, Ny(%rip)
	movl	%ebp, npts(%rip)
	call	_Z10active_ptsv
	movslq	%ebp, %rax
	sall	$2, %ebp
	salq	$2, %rax
	movq	%rax, %rdi
	movq	%rax, 8(%rsp)
	call	malloc@PLT
	movq	8(%rsp), %rdi
	movq	%rax, 24(%rsp)
	call	malloc@PLT
	movq	8(%rsp), %rdi
	movq	%rax, 16(%rsp)
	call	malloc@PLT
	movq	8(%rsp), %rcx
	movq	24(%rsp), %rdi
	xorl	%esi, %esi
	movq	%rax, 32(%rsp)
	movslq	%ebp, %rax
	movq	%rax, %rdx
	movq	%rax, (%rsp)
	call	__memset_chk@PLT
	movq	8(%rsp), %rcx
	movq	(%rsp), %rdx
	xorl	%esi, %esi
	movq	16(%rsp), %rdi
	call	__memset_chk@PLT
	movq	8(%rsp), %rcx
	movq	(%rsp), %rdx
	xorl	%esi, %esi
	movq	32(%rsp), %rdi
	call	__memset_chk@PLT
	movq	16(%rsp), %rdi
	call	_Z13random_vectorPf
	movq	(%rsp), %rsi
	leaq	48(%rsp), %rdi
	call	cudaMalloc@PLT
	testl	%eax, %eax
	je	.L91
	movl	%eax, %ebp
	movl	$392, %r8d
	jmp	.L102
.L91:
	movq	(%rsp), %rsi
	leaq	56(%rsp), %rdi
	call	cudaMalloc@PLT
	movl	%eax, %ebp
	testl	%eax, %eax
	je	.L92
	movl	$393, %r8d
.L102:
	movq	stderr(%rip), %rdi
	leaq	.LC13(%rip), %rcx
	leaq	.LC14(%rip), %rdx
	xorl	%eax, %eax
	movl	$2, %esi
	call	__fprintf_chk@PLT
	movl	%ebp, %edi
	call	cudaGetErrorString@PLT
	movl	%ebp, %ecx
	movq	%rax, %r8
.L103:
	movq	stderr(%rip), %rdi
	leaq	.LC15(%rip), %rdx
	movl	$2, %esi
	xorl	%eax, %eax
	call	__fprintf_chk@PLT
	movl	$1, %edi
	call	exit@PLT
.L92:
	movq	(%rsp), %rdx
	movq	16(%rsp), %rsi
	movl	$1, %ecx
	movq	48(%rsp), %rdi
	call	cudaMemcpy@PLT
	movl	$396, %r8d
	movl	%eax, %ebp
	testl	%eax, %eax
	jne	.L102
	movq	(%rsp), %rdx
	movq	24(%rsp), %rsi
	movl	$1, %ecx
	movq	56(%rsp), %rdi
	call	cudaMemcpy@PLT
	movl	$397, %r8d
	movl	%eax, %ebp
	testl	%eax, %eax
	jne	.L102
	movl	%r15d, 64(%rsp)
	movl	%r14d, 68(%rsp)
	movl	$1, 72(%rsp)
	movl	%r13d, 76(%rsp)
	movl	%r12d, 80(%rsp)
	movl	$1, 84(%rsp)
	call	_Z7secondsv
	movl	84(%rsp), %ecx
	movl	72(%rsp), %esi
	xorl	%r9d, %r9d
	movq	76(%rsp), %rdx
	movq	64(%rsp), %rdi
	xorl	%r8d, %r8d
	movsd	%xmm0, 8(%rsp)
	call	__cudaPushCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L95
	movq	48(%rsp), %rsi
	movq	56(%rsp), %rdi
	movl	%ebx, %edx
	call	_Z36__device_stub__Z13laplace2d_GPUPfS_iPfS_i
.L95:
	call	cudaDeviceSynchronize@PLT
	call	_Z7secondsv
	subsd	8(%rsp), %xmm0
	movq	(%rsp), %rdx
	movl	$2, %ecx
	movq	56(%rsp), %rsi
	movq	24(%rsp), %rdi
	movsd	%xmm0, 8(%rsp)
	call	cudaMemcpy@PLT
	movl	$409, %r8d
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	.L104
	movq	48(%rsp), %rdi
	call	cudaFree@PLT
	movl	$414, %r8d
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	.L104
	movq	56(%rsp), %rdi
	call	cudaFree@PLT
	movl	%eax, %ebx
	testl	%eax, %eax
	je	.L98
	movl	$415, %r8d
.L104:
	movq	stderr(%rip), %rdi
	leaq	.LC13(%rip), %rcx
	leaq	.LC14(%rip), %rdx
	xorl	%eax, %eax
	movl	$2, %esi
	call	__fprintf_chk@PLT
	movl	%ebx, %edi
	call	cudaGetErrorString@PLT
	movl	%ebx, %ecx
	movq	%rax, %r8
	jmp	.L103
.L98:
	call	_Z7secondsv
	movq	16(%rsp), %rsi
	movq	32(%rsp), %rdi
	movsd	%xmm0, (%rsp)
	call	_Z13laplace2d_CPUPfS_
	call	_Z7secondsv
	movq	40(%rsp), %rdi
	leaq	.LC16(%rip), %rdx
	movb	$3, %al
	movaps	%xmm0, %xmm1
	subsd	(%rsp), %xmm1
	movsd	8(%rsp), %xmm0
	movl	$2, %esi
	movaps	%xmm1, %xmm2
	divsd	8(%rsp), %xmm2
	call	__fprintf_chk@PLT
	movq	active(%rip), %rdi
	call	free@PLT
	movq	24(%rsp), %rdi
	call	free@PLT
	movq	88(%rsp), %rax
	subq	%fs:40, %rax
	je	.L99
	call	__stack_chk_fail@PLT
.L99:
	movq	16(%rsp), %rdi
	addq	$104, %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
	jmp	free@PLT
	.cfi_endproc
.LFE2038:
	.size	_Z18vectorScaleOneLoopP8_IO_FILEiiiii, .-_Z18vectorScaleOneLoopP8_IO_FILEiiiii
	.globl	_Z16vectorAddOneLoopP8_IO_FILEiiiii
	.type	_Z16vectorAddOneLoopP8_IO_FILEiiiii, @function
_Z16vectorAddOneLoopP8_IO_FILEiiiii:
.LFB2039:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	movl	%edx, %r15d
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	movl	%ecx, %r14d
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	movl	%r8d, %r13d
	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
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	leal	2(%rsi), %ebx
	movl	%ebx, %ebp
	imull	%ebx, %ebp
	subq	$104, %rsp
	.cfi_def_cfa_offset 160
	movq	%rdi, 40(%rsp)
	movq	%fs:40, %rax
	movq	%rax, 88(%rsp)
	xorl	%eax, %eax
	movl	%esi, Nx(%rip)
	movl	%esi, Ny(%rip)
	movl	%ebp, npts(%rip)
	call	_Z10active_ptsv
	movslq	%ebp, %rax
	sall	$2, %ebp
	salq	$2, %rax
	movq	%rax, %rdi
	movq	%rax, 8(%rsp)
	call	malloc@PLT
	movq	8(%rsp), %rdi
	movq	%rax, 24(%rsp)
	call	malloc@PLT
	movq	8(%rsp), %rdi
	movq	%rax, 16(%rsp)
	call	malloc@PLT
	movq	8(%rsp), %rcx
	movq	24(%rsp), %rdi
	xorl	%esi, %esi
	movq	%rax, 32(%rsp)
	movslq	%ebp, %rax
	movq	%rax, %rdx
	movq	%rax, (%rsp)
	call	__memset_chk@PLT
	movq	8(%rsp), %rcx
	movq	(%rsp), %rdx
	xorl	%esi, %esi
	movq	16(%rsp), %rdi
	call	__memset_chk@PLT
	movq	8(%rsp), %rcx
	movq	(%rsp), %rdx
	xorl	%esi, %esi
	movq	32(%rsp), %rdi
	call	__memset_chk@PLT
	movq	16(%rsp), %rdi
	call	_Z13random_vectorPf
	movq	(%rsp), %rsi
	leaq	48(%rsp), %rdi
	call	cudaMalloc@PLT
	testl	%eax, %eax
	je	.L106
	movl	%eax, %ebp
	movl	$471, %r8d
	jmp	.L117
.L106:
	movq	(%rsp), %rsi
	leaq	56(%rsp), %rdi
	call	cudaMalloc@PLT
	movl	%eax, %ebp
	testl	%eax, %eax
	je	.L107
	movl	$472, %r8d
.L117:
	movq	stderr(%rip), %rdi
	leaq	.LC13(%rip), %rcx
	leaq	.LC14(%rip), %rdx
	xorl	%eax, %eax
	movl	$2, %esi
	call	__fprintf_chk@PLT
	movl	%ebp, %edi
	call	cudaGetErrorString@PLT
	movl	%ebp, %ecx
	movq	%rax, %r8
.L118:
	movq	stderr(%rip), %rdi
	leaq	.LC15(%rip), %rdx
	movl	$2, %esi
	xorl	%eax, %eax
	call	__fprintf_chk@PLT
	movl	$1, %edi
	call	exit@PLT
.L107:
	movq	(%rsp), %rdx
	movq	16(%rsp), %rsi
	movl	$1, %ecx
	movq	48(%rsp), %rdi
	call	cudaMemcpy@PLT
	movl	$475, %r8d
	movl	%eax, %ebp
	testl	%eax, %eax
	jne	.L117
	movq	(%rsp), %rdx
	movq	24(%rsp), %rsi
	movl	$1, %ecx
	movq	56(%rsp), %rdi
	call	cudaMemcpy@PLT
	movl	$476, %r8d
	movl	%eax, %ebp
	testl	%eax, %eax
	jne	.L117
	movl	%r15d, 64(%rsp)
	movl	%r14d, 68(%rsp)
	movl	$1, 72(%rsp)
	movl	%r13d, 76(%rsp)
	movl	%r12d, 80(%rsp)
	movl	$1, 84(%rsp)
	call	_Z7secondsv
	movl	84(%rsp), %ecx
	movl	72(%rsp), %esi
	xorl	%r9d, %r9d
	movq	76(%rsp), %rdx
	movq	64(%rsp), %rdi
	xorl	%r8d, %r8d
	movsd	%xmm0, 8(%rsp)
	call	__cudaPushCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L110
	movq	48(%rsp), %rsi
	movq	56(%rsp), %rdi
	movl	%ebx, %edx
	call	_Z36__device_stub__Z13laplace2d_GPUPfS_iPfS_i
.L110:
	call	cudaDeviceSynchronize@PLT
	call	_Z7secondsv
	subsd	8(%rsp), %xmm0
	movq	(%rsp), %rdx
	movl	$2, %ecx
	movq	56(%rsp), %rsi
	movq	24(%rsp), %rdi
	movsd	%xmm0, 8(%rsp)
	call	cudaMemcpy@PLT
	movl	$488, %r8d
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	.L119
	movq	48(%rsp), %rdi
	call	cudaFree@PLT
	movl	$493, %r8d
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	.L119
	movq	56(%rsp), %rdi
	call	cudaFree@PLT
	movl	%eax, %ebx
	testl	%eax, %eax
	je	.L113
	movl	$494, %r8d
.L119:
	movq	stderr(%rip), %rdi
	leaq	.LC13(%rip), %rcx
	leaq	.LC14(%rip), %rdx
	xorl	%eax, %eax
	movl	$2, %esi
	call	__fprintf_chk@PLT
	movl	%ebx, %edi
	call	cudaGetErrorString@PLT
	movl	%ebx, %ecx
	movq	%rax, %r8
	jmp	.L118
.L113:
	call	_Z7secondsv
	movq	16(%rsp), %rsi
	movq	32(%rsp), %rdi
	movsd	%xmm0, (%rsp)
	call	_Z13laplace2d_CPUPfS_
	call	_Z7secondsv
	movq	40(%rsp), %rdi
	leaq	.LC16(%rip), %rdx
	movb	$3, %al
	movaps	%xmm0, %xmm1
	subsd	(%rsp), %xmm1
	movsd	8(%rsp), %xmm0
	movl	$2, %esi
	movaps	%xmm1, %xmm2
	divsd	8(%rsp), %xmm2
	call	__fprintf_chk@PLT
	movq	active(%rip), %rdi
	call	free@PLT
	movq	24(%rsp), %rdi
	call	free@PLT
	movq	88(%rsp), %rax
	subq	%fs:40, %rax
	je	.L114
	call	__stack_chk_fail@PLT
.L114:
	movq	16(%rsp), %rdi
	addq	$104, %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
	jmp	free@PLT
	.cfi_endproc
.LFE2039:
	.size	_Z16vectorAddOneLoopP8_IO_FILEiiiii, .-_Z16vectorAddOneLoopP8_IO_FILEiiiii
	.section	.rodata.str1.1
.LC17:
	.string	"%s Starting...\n"
.LC18:
	.string	"r"
.LC19:
	.string	"../scripts/factorizations"
.LC20:
	.string	"%d, %d, %d, %d, %d,\n"
.LC21:
	.string	"w"
.LC22:
	.string	"../scripts/laplace_speedup_results"
.LC23:
	.string	"../scripts/vector_scale_speedup_results"
.LC24:
	.string	"../scripts/vector_add_speedup_results"
.LC25:
	.string	"t_GPU, t_CPU, t_CPU/t_GPU,\n"
.LC26:
	.string	"%d/%d\r"
	.section	.text.startup,"ax",@progbits
	.globl	main
	.type	main, @function
main:
.LFB2040:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movl	$2, %edi
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$56, %rsp
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	.cfi_offset 12, -48
	.cfi_offset 3, -56
	movq	(%rsi), %rdx
	leaq	.LC17(%rip), %rsi
	movq	%fs:40, %rax
	movq	%rax, -56(%rbp)
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movq	%rsp, %rax
.L121:
	cmpq	%rax, %rsp
	je	.L122
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L121
.L122:
	subq	$1280, %rsp
	orq	$0, 1272(%rsp)
	leaq	.LC18(%rip), %rsi
	leaq	.LC19(%rip), %rdi
	leaq	.LC20(%rip), %r14
	call	fopen@PLT
	movq	%rsp, %r15
	movq	%rax, %r12
	leaq	1280(%r15), %r13
	movq	%r15, %rbx
.L125:
	pushq	%rax
	leaq	16(%rbx), %rax
	leaq	4(%rbx), %rcx
	movq	%rbx, %rdx
	pushq	%rax
	leaq	12(%rbx), %r9
	xorl	%eax, %eax
	leaq	8(%rbx), %r8
	movq	%r14, %rsi
	movq	%r12, %rdi
	call	__isoc23_fscanf@PLT
	popq	%rdx
	popq	%rcx
	incl	%eax
	je	.L124
	addq	$20, %rbx
	cmpq	%r13, %rbx
	jne	.L125
.L124:
	leaq	.LC21(%rip), %rbx
	movq	%r12, %rdi
	leaq	.LC26(%rip), %r14
	call	fclose@PLT
	movq	%rbx, %rsi
	leaq	.LC22(%rip), %rdi
	call	fopen@PLT
	movq	%rbx, %rsi
	leaq	.LC23(%rip), %rdi
	movq	%rax, -72(%rbp)
	call	fopen@PLT
	movq	%rbx, %rsi
	leaq	.LC24(%rip), %rdi
	leaq	.LC25(%rip), %rbx
	movq	%rax, -80(%rbp)
	call	fopen@PLT
	movq	-72(%rbp), %rdi
	movq	%rbx, %rdx
	movl	$2, %esi
	movq	%rax, -88(%rbp)
	xorl	%eax, %eax
	call	__fprintf_chk@PLT
	movq	-80(%rbp), %rdi
	movq	%rbx, %rdx
	xorl	%eax, %eax
	movl	$2, %esi
	call	__fprintf_chk@PLT
	movq	-88(%rbp), %rdi
	movq	%rbx, %rdx
	xorl	%eax, %eax
	movl	$2, %esi
	xorl	%ebx, %ebx
	call	__fprintf_chk@PLT
.L126:
	movl	4(%r15), %r12d
	movl	8(%r15), %r13d
	incl	%ebx
	addq	$20, %r15
	movl	-20(%r15), %esi
	movl	-8(%r15), %r8d
	movl	-4(%r15), %r9d
	movq	-72(%rbp), %rdi
	movl	%r13d, %ecx
	movl	%r12d, %edx
	movl	%esi, N(%rip)
	movl	%r9d, -96(%rbp)
	movl	%r8d, -92(%rbp)
	call	_Z14laplaceOneLoopP8_IO_FILEiiiii
	movl	-96(%rbp), %r9d
	movl	-92(%rbp), %r8d
	movl	%r13d, %ecx
	movl	N(%rip), %esi
	movq	-80(%rbp), %rdi
	movl	%r12d, %edx
	call	_Z18vectorScaleOneLoopP8_IO_FILEiiiii
	movl	-96(%rbp), %r9d
	movl	-92(%rbp), %r8d
	movl	%r13d, %ecx
	movl	N(%rip), %esi
	movq	-88(%rbp), %rdi
	movl	%r12d, %edx
	call	_Z16vectorAddOneLoopP8_IO_FILEiiiii
	movl	$64, %ecx
	movl	%ebx, %edx
	movq	%r14, %rsi
	movl	$2, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movq	stdout(%rip), %rdi
	call	fflush@PLT
	cmpl	$64, %ebx
	jne	.L126
	leaq	.LC5(%rip), %rsi
	movl	$2, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movq	-72(%rbp), %rdi
	call	fclose@PLT
	movq	-80(%rbp), %rdi
	call	fclose@PLT
	movq	-88(%rbp), %rdi
	call	fclose@PLT
	movq	-56(%rbp), %rax
	subq	%fs:40, %rax
	je	.L127
	call	__stack_chk_fail@PLT
.L127:
	leaq	-40(%rbp), %rsp
	xorl	%eax, %eax
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2040:
	.size	main, .-main
	.text
	.globl	_Z43__device_stub__Z19vector_addition_GPUPfS_S_PfS_S_
	.type	_Z43__device_stub__Z19vector_addition_GPUPfS_S_PfS_S_, @function
_Z43__device_stub__Z19vector_addition_GPUPfS_S_PfS_S_:
.LFB2067:
	.cfi_startproc
	endbr64
	subq	$136, %rsp
	.cfi_def_cfa_offset 144
	movq	%rdi, 24(%rsp)
	leaq	40(%rsp), %rcx
	leaq	48(%rsp), %rdi
	movq	%rsi, 16(%rsp)
	leaq	60(%rsp), %rsi
	movq	%rdx, 8(%rsp)
	leaq	32(%rsp), %rdx
	movq	%fs:40, %rax
	movq	%rax, 120(%rsp)
	xorl	%eax, %eax
	leaq	24(%rsp), %rax
	movl	$1, 56(%rsp)
	movq	%rax, 96(%rsp)
	leaq	16(%rsp), %rax
	movq	%rax, 104(%rsp)
	leaq	8(%rsp), %rax
	movq	%rax, 112(%rsp)
	movabsq	$4294967297, %rax
	movq	%rax, 48(%rsp)
	movq	%rax, 60(%rsp)
	movl	$1, 68(%rsp)
	call	__cudaPopCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L134
	pushq	40(%rsp)
	.cfi_def_cfa_offset 152
	leaq	_Z19vector_addition_GPUPfS_S_(%rip), %rdi
	pushq	40(%rsp)
	.cfi_def_cfa_offset 160
	movq	76(%rsp), %rcx
	movl	84(%rsp), %r8d
	movq	64(%rsp), %rsi
	movl	72(%rsp), %edx
	leaq	112(%rsp), %r9
	call	cudaLaunchKernel@PLT
	popq	%rax
	.cfi_def_cfa_offset 152
	popq	%rdx
	.cfi_def_cfa_offset 144
.L134:
	movq	120(%rsp), %rax
	subq	%fs:40, %rax
	je	.L136
	call	__stack_chk_fail@PLT
.L136:
	addq	$136, %rsp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE2067:
	.size	_Z43__device_stub__Z19vector_addition_GPUPfS_S_PfS_S_, .-_Z43__device_stub__Z19vector_addition_GPUPfS_S_PfS_S_
	.globl	_Z19vector_addition_GPUPfS_S_
	.type	_Z19vector_addition_GPUPfS_S_, @function
_Z19vector_addition_GPUPfS_S_:
.LFB2068:
	.cfi_startproc
	endbr64
	jmp	_Z43__device_stub__Z19vector_addition_GPUPfS_S_PfS_S_
	.cfi_endproc
.LFE2068:
	.size	_Z19vector_addition_GPUPfS_S_, .-_Z19vector_addition_GPUPfS_S_
	.globl	_Z39__device_stub__Z16scale_vector_GPUfPfS_fPfS_
	.type	_Z39__device_stub__Z16scale_vector_GPUfPfS_fPfS_, @function
_Z39__device_stub__Z16scale_vector_GPUfPfS_fPfS_:
.LFB2069:
	.cfi_startproc
	endbr64
	subq	$136, %rsp
	.cfi_def_cfa_offset 144
	movq	%rdi, 16(%rsp)
	leaq	40(%rsp), %rcx
	leaq	32(%rsp), %rdx
	movq	%rsi, 8(%rsp)
	leaq	48(%rsp), %rdi
	leaq	60(%rsp), %rsi
	movss	%xmm0, 28(%rsp)
	movq	%fs:40, %rax
	movq	%rax, 120(%rsp)
	xorl	%eax, %eax
	leaq	28(%rsp), %rax
	movl	$1, 56(%rsp)
	movq	%rax, 96(%rsp)
	leaq	16(%rsp), %rax
	movq	%rax, 104(%rsp)
	leaq	8(%rsp), %rax
	movq	%rax, 112(%rsp)
	movabsq	$4294967297, %rax
	movq	%rax, 48(%rsp)
	movq	%rax, 60(%rsp)
	movl	$1, 68(%rsp)
	call	__cudaPopCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L139
	pushq	40(%rsp)
	.cfi_def_cfa_offset 152
	leaq	_Z16scale_vector_GPUfPfS_(%rip), %rdi
	pushq	40(%rsp)
	.cfi_def_cfa_offset 160
	movq	76(%rsp), %rcx
	movl	84(%rsp), %r8d
	movq	64(%rsp), %rsi
	movl	72(%rsp), %edx
	leaq	112(%rsp), %r9
	call	cudaLaunchKernel@PLT
	popq	%rax
	.cfi_def_cfa_offset 152
	popq	%rdx
	.cfi_def_cfa_offset 144
.L139:
	movq	120(%rsp), %rax
	subq	%fs:40, %rax
	je	.L141
	call	__stack_chk_fail@PLT
.L141:
	addq	$136, %rsp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE2069:
	.size	_Z39__device_stub__Z16scale_vector_GPUfPfS_fPfS_, .-_Z39__device_stub__Z16scale_vector_GPUfPfS_fPfS_
	.globl	_Z16scale_vector_GPUfPfS_
	.type	_Z16scale_vector_GPUfPfS_, @function
_Z16scale_vector_GPUfPfS_:
.LFB2070:
	.cfi_startproc
	endbr64
	jmp	_Z39__device_stub__Z16scale_vector_GPUfPfS_fPfS_
	.cfi_endproc
.LFE2070:
	.size	_Z16scale_vector_GPUfPfS_, .-_Z16scale_vector_GPUfPfS_
	.section	.rodata.str1.1
.LC27:
	.string	"_Z16scale_vector_GPUfPfS_"
.LC28:
	.string	"_Z19vector_addition_GPUPfS_S_"
.LC29:
	.string	"_Z13laplace2d_GPUPfS_i"
	.section	.text.startup
	.type	_ZL24__sti____cudaRegisterAllv, @function
_ZL24__sti____cudaRegisterAllv:
.LFB2072:
	.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	.LC27(%rip), %rdx
	movq	%rax, %rdi
	movq	%rax, %rbx
	pushq	$0
	.cfi_def_cfa_offset 40
	movq	%rdx, %rcx
	leaq	_Z16scale_vector_GPUfPfS_(%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	.LC28(%rip), %rdx
	orl	$-1, %r8d
	leaq	_Z19vector_addition_GPUPfS_S_(%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
	addq	$32, %rsp
	.cfi_def_cfa_offset 16
	movq	%rbx, %rdi
	xorl	%r9d, %r9d
	pushq	$0
	.cfi_def_cfa_offset 24
	leaq	.LC29(%rip), %rdx
	orl	$-1, %r8d
	leaq	_Z13laplace2d_GPUPfS_i(%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
.LFE2072:
	.size	_ZL24__sti____cudaRegisterAllv, .-_ZL24__sti____cudaRegisterAllv
	.section	.init_array,"aw"
	.align 8
	.quad	_ZL24__sti____cudaRegisterAllv
	.section	.nvFatBinSegment,"aw"
	.align 8
	.type	_ZL15__fatDeviceText, @object
	.size	_ZL15__fatDeviceText, 24
_ZL15__fatDeviceText:
	.long	1180844977
	.long	1
	.quad	fatbinData
	.quad	0
	.local	_ZL20__cudaFatCubinHandle
	.comm	_ZL20__cudaFatCubinHandle,8,8
	.globl	active
	.bss
	.align 8
	.type	active, @object
	.size	active, 8
active:
	.zero	8
	.globl	npts
	.align 4
	.type	npts, @object
	.size	npts, 4
npts:
	.zero	4
	.globl	N
	.align 4
	.type	N, @object
	.size	N, 4
N:
	.zero	4
	.globl	Ny
	.align 4
	.type	Ny, @object
	.size	Ny, 4
Ny:
	.zero	4
	.globl	Nx
	.align 4
	.type	Nx, @object
	.size	Nx, 4
Nx:
	.zero	4
	.section	.rodata.cst8,"aM",@progbits,8
	.align 8
.LC0:
	.long	-1598689907
	.long	1051772663
	.section	.rodata.cst4,"aM",@progbits,4
	.align 4
.LC1:
	.long	1092616192
	.align 4
.LC12:
	.long	-1065353216
	.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 <stdio.h>
#include <sys/time.h>


/*
  Globale Variablen stehen in allen Funktionen zur Verfuegung.
  Achtung: Das gilt *nicht* fuer Kernel-Funktionen!
*/
int Nx, Ny, N, npts;
int *active;

/*
 * Dieses Beispiel demonstriert die Addition zweier Arrays.
 * addArrayGPU soll die Arbeit ueber CUDA Threads auf der GPU verteilen.
 * addArrayHost iteriert sequentiell durch die Vektorelemente auf dem Host.
 */

// Macro zur Fehlerauswertung
#define CHECK(call)                                                            \
{                                                                              \
    const hipError_t error = call;                                            \
    if (error != hipSuccess)                                                  \
    {                                                                          \
        fprintf(stderr, "Error: %s:%d, ", __FILE__, __LINE__);                 \
        fprintf(stderr, "code: %d, reason: %s\n", error,                       \
                hipGetErrorString(error));                                    \
        exit(1);                                                               \
    }                                                                          \
}

double seconds()
{
  struct timeval tp;
  struct timezone tzp;
  int i = gettimeofday(&tp, &tzp);
  return ((double)tp.tv_sec + (double)tp.tv_usec * 1.e-6);
}

/*
  Fuer die Koordinaten:
  i = 0,1,...,Nx+1
  j = 0,1,...,Ny+1
  wird der fortlaufenden Index berechnet
*/
int coord2index(int i, int j)
{
  return j*(Nx+2) + i;
}

/*
   Das Flag-Array der aktiven/inneren Punkte wird gesetzt.
*/
void active_pts()
{
   int idx,i,j;

   active=(int*)malloc(npts*sizeof(int));

   idx=0; // fortlaufender Index
   for (j=0; j<Ny+2; j++)
   {
      for (i=0; i<Nx+2; i++)
      {
         if ((i==0)||(j==0)||(i==Nx+1)||(j==Ny+1))
            active[idx]=0; // Randpunkt
         else
            active[idx]=1; // innerer Punkt

         idx+=1;
      }
   }
}

/*
   Der Vektor p wird im Inneren auf zufaellige Werte gesetzt
*/
void random_vector(float *p)
{
   int idx;

   for(idx = 0; idx < npts; idx++)
   {
      if (active[idx])
         p[idx] = (float)(rand() & 0xFF ) / 10.0;
   }
}

/*
   Das Flag-Array der aktiven/inneren Punkte wird als
   2D Gitter ausgegeben.
*/
void print_active()
{
   int i,j,idx;

   printf("active points:\n");
   idx=0;
   for (j=0; j<Ny+2; j++)
   {
      printf("  ");
      for (i=0; i<Nx+2; i++)
      {
         printf("%d ",active[idx]);
         idx+=1;
      }
      printf("\n");
   }
}


/*
   Norm-Quadrat vom Vektor v.
*/
float norm_sqr(float *v)
{
   int idx;
   float r=0.0;
   for (idx=0; idx<npts; idx++)
   {
      r+=v[idx]*v[idx];
   }
   return r;
}

/*
   Der Vektor p wird als 2D Gitter fuer i,j<=16 ausgegeben. Es werden innere/aktive
   und, falls flag>0, auch die aeusseren Punkte ausgegeben.
*/
void print_vector(char *name, float *p, int flag)
{
   int i,j,idx;
   float nrm;

   printf("%s = \n",name);
   idx=0;
   for (j=0; j<Ny+2; j++)
   {
      if (j>16)
      {
         printf("  ...\n");
         break;
      }
      printf("  ");
      for (i=0; i<Nx+2; i++)
      {
         if ((i<16)&&((flag>0)||(active[idx])))
            printf("%.2f ",p[idx]);
         if (i==16)
            printf("...");
         idx+=1;
      }
      printf("\n");
   }
   nrm=norm_sqr(p);
   printf("||%s|| = %.8f\n",name,sqrt(nrm));
}

__global__
void laplace2d_GPU(float *w, float *v, const int N) {

  /* calculate the id */
  int blockOffset = (blockIdx.x + blockIdx.y * gridDim.x) * blockDim.x * blockDim.y;
  int threadId = threadIdx.x + threadIdx.y * blockDim.x;
  int idx = blockOffset + threadId;

  int first_coord = (int) (idx % N);
  int second_coord = (int) (idx / N);

  if (
      (first_coord > 0) && (first_coord < (N-1)) &&
      (second_coord > 0) && (second_coord < (N-1))
      ) {
    w[idx] = -4. * v[idx] + v[idx-1] + v[idx+1] + v[idx-N] + v[idx+N];
    /* printf("%d, %f, %f\n", idx, w[idx], v[idx]); */
  }
}

/*
 * laplace_2d(float *w, float *v)
 *
 * Calculates the product A*v for a vector v and writes the result into w.
 * A is a laplacian.
 *
 */
void laplace2d_CPU(float *w, float *v) {

  int i, j, n = Nx+2;
  int npts = n * n;

  /* two loops over every element of the unknowns */
  for (i=0; i<npts; i++) {
    for (j=0; j<npts; j++) {

      /* skip the boundary */
      if (
          (i % n == 0) ||
          ((int) (i / n) == 0) ||
          (i % n == n-1) ||
          ((int) (i / n) == n-1)
          ) {
        continue;
      }

      /* diagonal */
      if (i == j) {
        w[i] += -4 * v[j];
      }

      /* first two off diagonals */
      if (
          ((i == j+1) && (i % n != 0))
          ||
          ((i == j-1) && (j % n != 0))
          )
        {
          w[i] += 1 * v[j];
        }

      /* other two off diagonals */
      if ((i == j+n) || (i == j-n)) {
        w[i] += 1 * v[j];
      }
    }
  }
}

/*
 * vector_addition(float *v, float *u, float *w)
 *
 * Adds two vectors u and v together and writes the result into w.
 *
 */
void vector_addition_CPU(float *u, float *v, float *w) {
  int i;

  for (i=0; i<npts; i++) {
    w[i] += u[i] + v[i];
  }
}

__global__
void vector_addition_GPU(float *u, float *v, float *w) {

  /* calculate the id */
  int blockOffset = (blockIdx.x + blockIdx.y * gridDim.x) * blockDim.x * blockDim.y;
  int threadId = threadIdx.x + threadIdx.y * blockDim.x;
  int idx = blockOffset + threadId;

  w[idx] = u[idx] + v[idx];
}

/*
 * scale_vector(float prefactor, float *v, float *w)
 *
 * Scales a vector v by a prefactor and writes the result into w.
 *
 */
void scale_vector_CPU(float prefactor, float *v, float *w) {
  int i;

  for (i=0; i<npts; i++) {
    w[i] = prefactor * v[i];
  }
}

__global__
void scale_vector_GPU(float prefactor, float *v, float *w) {

  /* calculate the id */
  int blockOffset = (blockIdx.x + blockIdx.y * gridDim.x) * blockDim.x * blockDim.y;
  int threadId = threadIdx.x + threadIdx.y * blockDim.x;
  int idx = blockOffset + threadId;

  w[idx] = prefactor * v[idx];
}

void laplaceOneLoop(FILE* laplace_speedup_file, const int N, int gridX, int gridY, int threadX, int threadY) {

  int nBytes;
  float *h_w, *h_v, *h_u;

  // Globale Variablen setzen:
  // Anzahl der Inneren Punkte in x- und y-Richtung
  Nx = N;
  Ny = N;

  // Gesamtanzahl der Gitterpunkte
  npts=(Nx+2)*(Ny+2);
  // Aktive Punkte - Array
  active_pts();

  // Speicherbedarf pro Vektor in Byte
  nBytes=npts*sizeof(float);

  // Speicher für Vektoren allozieren
  h_w = (float *) malloc(npts * sizeof(float));
  h_v = (float *) malloc(npts * sizeof(float));
  h_u = (float *) malloc(npts * sizeof(float));

  // auf Null setzen
  memset(h_w, 0, nBytes);
  memset(h_v, 0, nBytes);
  memset(h_u, 0, nBytes);

  // Zufaelliger Vektor
  random_vector(h_v);

  /* print_vector("v",h_v,1); */

  // Device-Speicher allozieren mit cudaMalloc
  float *d_v, *d_w;
  CHECK(hipMalloc((float**)&d_v, nBytes));
  CHECK(hipMalloc((float**)&d_w, nBytes));

  // kopieren Host -> Device mit cudaMemcpy
  CHECK(hipMemcpy(d_v, h_v, nBytes, hipMemcpyHostToDevice));
  CHECK(hipMemcpy(d_w, h_w, nBytes, hipMemcpyHostToDevice));

  dim3 block(gridX, gridY);
  dim3 grid(threadX, threadY);

  double t_GPU_start = seconds();
  laplace2d_GPU <<<block,grid>>> (d_w, d_v, N+2);
  hipDeviceSynchronize();
  double t_GPU_end = seconds();
  double t_GPU = t_GPU_end - t_GPU_start;

  /* kopieren Device -> Host mit cudaMemcpy */
  CHECK(hipMemcpy(h_w, d_w, nBytes, hipMemcpyDeviceToHost));

  /* print_vector("w_GPU",h_w,1); */

  // Device-Speicher freigeben
  CHECK(hipFree(d_v));
  CHECK(hipFree(d_w));

  double t_CPU_start = seconds();
  laplace2d_CPU(h_u, h_v);
  double t_CPU_end = seconds();
  double t_CPU = t_CPU_end - t_CPU_start;

  /* print_vector("w_CPU",h_w,1); */

  fprintf(
          laplace_speedup_file,
          "%lf, %lf, %lf,\n",
          t_GPU, t_CPU, t_CPU/t_GPU
          );

  free(active);
  free(h_w);
  free(h_v);

}

void vectorScaleOneLoop(FILE* vector_scale_speedup_file, const int N, int gridX, int gridY, int threadX, int threadY) {

  int nBytes;
  float *h_w, *h_v, *h_u;

  // Globale Variablen setzen:
  // Anzahl der Inneren Punkte in x- und y-Richtung
  Nx = N;
  Ny = N;

  // Gesamtanzahl der Gitterpunkte
  npts=(Nx+2)*(Ny+2);
  // Aktive Punkte - Array
  active_pts();

  // Speicherbedarf pro Vektor in Byte
  nBytes=npts*sizeof(float);

  // Speicher für Vektoren allozieren
  h_w = (float *) malloc(npts * sizeof(float));
  h_v = (float *) malloc(npts * sizeof(float));
  h_u = (float *) malloc(npts * sizeof(float));

  // auf Null setzen
  memset(h_w, 0, nBytes);
  memset(h_v, 0, nBytes);
  memset(h_u, 0, nBytes);

  // Zufaelliger Vektor
  random_vector(h_v);

  /* print_vector("v",h_v,1); */

  // Device-Speicher allozieren mit cudaMalloc
  float *d_v, *d_w;
  CHECK(hipMalloc((float**)&d_v, nBytes));
  CHECK(hipMalloc((float**)&d_w, nBytes));

  // kopieren Host -> Device mit cudaMemcpy
  CHECK(hipMemcpy(d_v, h_v, nBytes, hipMemcpyHostToDevice));
  CHECK(hipMemcpy(d_w, h_w, nBytes, hipMemcpyHostToDevice));

  dim3 block(gridX, gridY);
  dim3 grid(threadX, threadY);

  double t_GPU_start = seconds();
  laplace2d_GPU <<<block,grid>>> (d_w, d_v, N+2);
  hipDeviceSynchronize();
  double t_GPU_end = seconds();
  double t_GPU = t_GPU_end - t_GPU_start;

  /* kopieren Device -> Host mit cudaMemcpy */
  CHECK(hipMemcpy(h_w, d_w, nBytes, hipMemcpyDeviceToHost));

  /* print_vector("w_GPU",h_w,1); */

  // Device-Speicher freigeben
  CHECK(hipFree(d_v));
  CHECK(hipFree(d_w));

  double t_CPU_start = seconds();
  laplace2d_CPU(h_u, h_v);
  double t_CPU_end = seconds();
  double t_CPU = t_CPU_end - t_CPU_start;

  /* print_vector("w_CPU",h_w,1); */

  fprintf(
          vector_scale_speedup_file,
          "%lf, %lf, %lf,\n",
          t_GPU, t_CPU, t_CPU/t_GPU
          );

  free(active);
  free(h_w);
  free(h_v);

}

void vectorAddOneLoop(FILE* vector_add_speedup_file, const int N, int gridX, int gridY, int threadX, int threadY) {

  int nBytes;
  float *h_w, *h_v, *h_u;

  // Globale Variablen setzen:
  // Anzahl der Inneren Punkte in x- und y-Richtung
  Nx = N;
  Ny = N;

  // Gesamtanzahl der Gitterpunkte
  npts=(Nx+2)*(Ny+2);
  // Aktive Punkte - Array
  active_pts();

  // Speicherbedarf pro Vektor in Byte
  nBytes=npts*sizeof(float);

  // Speicher für Vektoren allozieren
  h_w = (float *) malloc(npts * sizeof(float));
  h_v = (float *) malloc(npts * sizeof(float));
  h_u = (float *) malloc(npts * sizeof(float));

  // auf Null setzen
  memset(h_w, 0, nBytes);
  memset(h_v, 0, nBytes);
  memset(h_u, 0, nBytes);

  // Zufaelliger Vektor
  random_vector(h_v);

  /* print_vector("v",h_v,1); */

  // Device-Speicher allozieren mit cudaMalloc
  float *d_v, *d_w;
  CHECK(hipMalloc((float**)&d_v, nBytes));
  CHECK(hipMalloc((float**)&d_w, nBytes));

  // kopieren Host -> Device mit cudaMemcpy
  CHECK(hipMemcpy(d_v, h_v, nBytes, hipMemcpyHostToDevice));
  CHECK(hipMemcpy(d_w, h_w, nBytes, hipMemcpyHostToDevice));

  dim3 block(gridX, gridY);
  dim3 grid(threadX, threadY);

  double t_GPU_start = seconds();
  laplace2d_GPU <<<block,grid>>> (d_w, d_v, N+2);
  hipDeviceSynchronize();
  double t_GPU_end = seconds();
  double t_GPU = t_GPU_end - t_GPU_start;

  /* kopieren Device -> Host mit cudaMemcpy */
  CHECK(hipMemcpy(h_w, d_w, nBytes, hipMemcpyDeviceToHost));

  /* print_vector("w_GPU",h_w,1); */

  // Device-Speicher freigeben
  CHECK(hipFree(d_v));
  CHECK(hipFree(d_w));

  double t_CPU_start = seconds();
  laplace2d_CPU(h_u, h_v);
  double t_CPU_end = seconds();
  double t_CPU = t_CPU_end - t_CPU_start;

  /* print_vector("w_CPU",h_w,1); */

  fprintf(
          vector_add_speedup_file,
          "%lf, %lf, %lf,\n",
          t_GPU, t_CPU, t_CPU/t_GPU
          );

  free(active);
  free(h_w);
  free(h_v);

}

int main(int argc, char **argv)
{
  printf("%s Starting...\n", argv[0]);

  typedef struct grid_parameters {
    int N;
    int gridX;
    int gridY;
    int threadX;
    int threadY;
  } grid_params_t;

  int data_points = 64;

  grid_params_t grid_data[data_points];

  /* read in grid parameters */
  FILE *f = fopen("../scripts/factorizations", "r");
  int i;
  for (i = 0;
       i != data_points &&
         fscanf(f, "%d, %d, %d, %d, %d,\n", &grid_data[i].N, &grid_data[i].gridX, &grid_data[i].gridY, &grid_data[i].threadX, &grid_data[i].threadY) != EOF;
       i++
       );
  fclose(f);

  /* overwrite results */
  FILE *laplace_speedup = fopen("../scripts/laplace_speedup_results", "w");
  FILE *vector_scale_speedup = fopen("../scripts/vector_scale_speedup_results", "w");
  FILE *vector_add_speedup = fopen("../scripts/vector_add_speedup_results", "w");

  fprintf(
          laplace_speedup,
          "t_GPU, t_CPU, t_CPU/t_GPU,\n"
          );
  fprintf(
          vector_scale_speedup,
          "t_GPU, t_CPU, t_CPU/t_GPU,\n"
          );
  fprintf(
          vector_add_speedup,
          "t_GPU, t_CPU, t_CPU/t_GPU,\n"
          );

  int gridX, gridY, threadX, threadY;

  for (i = 0; i < data_points; i++) {

    N = grid_data[i].N;
    gridX = grid_data[i].gridX;
    gridY = grid_data[i].gridY;
    threadX = grid_data[i].threadX;
    threadY = grid_data[i].threadY;

    laplaceOneLoop(
                   laplace_speedup,
                   N,
                   gridX, gridY,
                   threadX, threadY
                   );

    vectorScaleOneLoop(
                       vector_scale_speedup,
                       N,
                       gridX, gridY,
                       threadX, threadY
                       );

    vectorAddOneLoop(
                     vector_add_speedup,
                     N,
                     gridX, gridY,
                     threadX, threadY
                     );

    printf("%d/%d\r", i+1, data_points);
    fflush(stdout);
  }
  printf("\n");

  fclose(laplace_speedup);
  fclose(vector_scale_speedup);
  fclose(vector_add_speedup);

  return (0);

}

	.text
	.file	"laplaceGPU.hip"
	.section	.rodata.cst8,"aM",@progbits,8
	.p2align	3, 0x0                          # -- Begin function _Z7secondsv
.LCPI0_0:
	.quad	0x3eb0c6f7a0b5ed8d              # double 9.9999999999999995E-7
	.text
	.globl	_Z7secondsv
	.type	_Z7secondsv,@function
_Z7secondsv:                            # @_Z7secondsv
	.cfi_startproc
# %bb.0:
	pushq	%rbx
	.cfi_def_cfa_offset 16
	subq	$32, %rsp
	.cfi_def_cfa_offset 48
	.cfi_offset %rbx, -16
	leaq	16(%rsp), %rbx
	leaq	8(%rsp), %rsi
	movq	%rbx, %rdi
	callq	gettimeofday
	cvtsi2sdq	(%rbx), %xmm1
	cvtsi2sdq	8(%rbx), %xmm0
	mulsd	.LCPI0_0(%rip), %xmm0
	addsd	%xmm1, %xmm0
	addq	$32, %rsp
	.cfi_def_cfa_offset 16
	popq	%rbx
	.cfi_def_cfa_offset 8
	retq
.Lfunc_end0:
	.size	_Z7secondsv, .Lfunc_end0-_Z7secondsv
	.cfi_endproc
                                        # -- End function
	.globl	_Z11coord2indexii               # -- Begin function _Z11coord2indexii
	.type	_Z11coord2indexii,@function
_Z11coord2indexii:                      # @_Z11coord2indexii
	.cfi_startproc
# %bb.0:
	movl	Nx(%rip), %eax
	addl	$2, %eax
	imull	%esi, %eax
	addl	%edi, %eax
	retq
.Lfunc_end1:
	.size	_Z11coord2indexii, .Lfunc_end1-_Z11coord2indexii
	.cfi_endproc
                                        # -- End function
	.globl	_Z10active_ptsv                 # -- Begin function _Z10active_ptsv
	.type	_Z10active_ptsv,@function
_Z10active_ptsv:                        # @_Z10active_ptsv
	.cfi_startproc
# %bb.0:
	pushq	%rbp
	.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 %rbp, -16
	movslq	npts(%rip), %rdi
	shlq	$2, %rdi
	callq	malloc
	movq	%rax, active(%rip)
	movl	Ny(%rip), %ecx
	cmpl	$-1, %ecx
	jl	.LBB2_7
# %bb.1:                                # %.preheader.lr.ph
	movl	Nx(%rip), %edx
	incl	%ecx
	leaq	2(%rdx), %rsi
	movq	%rdx, %rdi
	incq	%rdi
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
.LBB2_2:                                # %.preheader
                                        # =>This Loop Header: Depth=1
                                        #     Child Loop BB2_4 Depth 2
	cmpl	$-1, %edx
	jl	.LBB2_6
# %bb.3:                                # %.lr.ph
                                        #   in Loop: Header=BB2_2 Depth=1
	movslq	%r9d, %r10
	leaq	(%rax,%r10,4), %r11
	xorl	%r10d, %r10d
.LBB2_4:                                #   Parent Loop BB2_2 Depth=1
                                        # =>  This Inner Loop Header: Depth=2
	cmpl	%ecx, %r8d
	setne	%bl
	testl	%r8d, %r8d
	setne	%bpl
	testl	%r10d, %r10d
	setne	%r14b
	andb	%bpl, %r14b
	cmpl	%r10d, %edi
	setne	%bpl
	andb	%bl, %bpl
	andb	%r14b, %bpl
	movzbl	%bpl, %ebx
	movl	%ebx, (%r11,%r10,4)
	incq	%r10
	cmpl	%r10d, %esi
	jne	.LBB2_4
# %bb.5:                                # %._crit_edge.loopexit
                                        #   in Loop: Header=BB2_2 Depth=1
	addl	%r10d, %r9d
.LBB2_6:                                # %._crit_edge
                                        #   in Loop: Header=BB2_2 Depth=1
	leal	1(%r8), %r10d
	cmpl	%ecx, %r8d
	movl	%r10d, %r8d
	jne	.LBB2_2
.LBB2_7:                                # %._crit_edge21
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	retq
.Lfunc_end2:
	.size	_Z10active_ptsv, .Lfunc_end2-_Z10active_ptsv
	.cfi_endproc
                                        # -- End function
	.section	.rodata.cst8,"aM",@progbits,8
	.p2align	3, 0x0                          # -- Begin function _Z13random_vectorPf
.LCPI3_0:
	.quad	0x4024000000000000              # double 10
	.text
	.globl	_Z13random_vectorPf
	.type	_Z13random_vectorPf,@function
_Z13random_vectorPf:                    # @_Z13random_vectorPf
	.cfi_startproc
# %bb.0:
	movl	npts(%rip), %eax
	testl	%eax, %eax
	jle	.LBB3_6
# %bb.1:                                # %.lr.ph.preheader
	pushq	%r14
	.cfi_def_cfa_offset 16
	pushq	%rbx
	.cfi_def_cfa_offset 24
	pushq	%rax
	.cfi_def_cfa_offset 32
	.cfi_offset %rbx, -24
	.cfi_offset %r14, -16
	movq	%rdi, %rbx
	movq	active(%rip), %rcx
	xorl	%r14d, %r14d
.LBB3_2:                                # %.lr.ph
                                        # =>This Inner Loop Header: Depth=1
	cmpl	$0, (%rcx,%r14,4)
	je	.LBB3_4
# %bb.3:                                #   in Loop: Header=BB3_2 Depth=1
	callq	rand
	movzbl	%al, %eax
	xorps	%xmm0, %xmm0
	cvtsi2sd	%eax, %xmm0
	divsd	.LCPI3_0(%rip), %xmm0
	cvtsd2ss	%xmm0, %xmm0
	movss	%xmm0, (%rbx,%r14,4)
	movq	active(%rip), %rcx
	movl	npts(%rip), %eax
.LBB3_4:                                #   in Loop: Header=BB3_2 Depth=1
	incq	%r14
	movslq	%eax, %rdx
	cmpq	%rdx, %r14
	jl	.LBB3_2
# %bb.5:
	addq	$8, %rsp
	.cfi_def_cfa_offset 24
	popq	%rbx
	.cfi_def_cfa_offset 16
	popq	%r14
	.cfi_def_cfa_offset 8
	.cfi_restore %rbx
	.cfi_restore %r14
.LBB3_6:                                # %._crit_edge
	retq
.Lfunc_end3:
	.size	_Z13random_vectorPf, .Lfunc_end3-_Z13random_vectorPf
	.cfi_endproc
                                        # -- End function
	.globl	_Z12print_activev               # -- Begin function _Z12print_activev
	.type	_Z12print_activev,@function
_Z12print_activev:                      # @_Z12print_activev
	.cfi_startproc
# %bb.0:
	pushq	%rbp
	.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 %rbp, -16
	movl	$.Lstr, %edi
	callq	puts@PLT
	cmpl	$-1, Ny(%rip)
	jl	.LBB4_6
# %bb.1:                                # %.lr.ph13.preheader
	xorl	%ebx, %ebx
	xorl	%r14d, %r14d
.LBB4_2:                                # %.lr.ph13
                                        # =>This Loop Header: Depth=1
                                        #     Child Loop BB4_4 Depth 2
	movl	$.L.str.1, %edi
	xorl	%eax, %eax
	callq	printf
	cmpl	$-1, Nx(%rip)
	jl	.LBB4_5
# %bb.3:                                # %.lr.ph.preheader
                                        #   in Loop: Header=BB4_2 Depth=1
	movslq	%ebx, %rbx
	movl	$-1, %ebp
.LBB4_4:                                # %.lr.ph
                                        #   Parent Loop BB4_2 Depth=1
                                        # =>  This Inner Loop Header: Depth=2
	movq	active(%rip), %rax
	movl	(%rax,%rbx,4), %esi
	movl	$.L.str.2, %edi
	xorl	%eax, %eax
	callq	printf
	incq	%rbx
	incl	%ebp
	cmpl	Nx(%rip), %ebp
	jle	.LBB4_4
.LBB4_5:                                # %._crit_edge
                                        #   in Loop: Header=BB4_2 Depth=1
	movl	$10, %edi
	callq	putchar@PLT
	leal	1(%r14), %eax
	cmpl	Ny(%rip), %r14d
	movl	%eax, %r14d
	jle	.LBB4_2
.LBB4_6:                                # %._crit_edge14
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	retq
.Lfunc_end4:
	.size	_Z12print_activev, .Lfunc_end4-_Z12print_activev
	.cfi_endproc
                                        # -- End function
	.globl	_Z8norm_sqrPf                   # -- Begin function _Z8norm_sqrPf
	.type	_Z8norm_sqrPf,@function
_Z8norm_sqrPf:                          # @_Z8norm_sqrPf
	.cfi_startproc
# %bb.0:
	movl	npts(%rip), %eax
	xorps	%xmm0, %xmm0
	testl	%eax, %eax
	jle	.LBB5_3
# %bb.1:                                # %.lr.ph.preheader
	xorl	%ecx, %ecx
.LBB5_2:                                # %.lr.ph
                                        # =>This Inner Loop Header: Depth=1
	movss	(%rdi,%rcx,4), %xmm1            # xmm1 = mem[0],zero,zero,zero
	mulss	%xmm1, %xmm1
	addss	%xmm1, %xmm0
	incq	%rcx
	cmpq	%rcx, %rax
	jne	.LBB5_2
.LBB5_3:                                # %._crit_edge
	retq
.Lfunc_end5:
	.size	_Z8norm_sqrPf, .Lfunc_end5-_Z8norm_sqrPf
	.cfi_endproc
                                        # -- End function
	.globl	_Z12print_vectorPcPfi           # -- Begin function _Z12print_vectorPcPfi
	.type	_Z12print_vectorPcPfi,@function
_Z12print_vectorPcPfi:                  # @_Z12print_vectorPcPfi
	.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
	pushq	%rax
	.cfi_def_cfa_offset 64
	.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	%edx, %ebp
	movq	%rsi, %r14
	movq	%rdi, %rsi
	movl	$.L.str.4, %edi
	movq	%rsi, (%rsp)                    # 8-byte Spill
	xorl	%eax, %eax
	callq	printf
	cmpl	$-1, Ny(%rip)
	jl	.LBB6_15
# %bb.1:                                # %.lr.ph22
	xorl	%r15d, %r15d
	xorl	%r12d, %r12d
.LBB6_2:                                # =>This Loop Header: Depth=1
                                        #     Child Loop BB6_6 Depth 2
	cmpl	$17, %r12d
	je	.LBB6_3
# %bb.4:                                #   in Loop: Header=BB6_2 Depth=1
	movl	$.L.str.1, %edi
	xorl	%eax, %eax
	callq	printf
	cmpl	$-1, Nx(%rip)
	jl	.LBB6_14
# %bb.5:                                # %.lr.ph.preheader
                                        #   in Loop: Header=BB6_2 Depth=1
	movslq	%r15d, %r13
	xorl	%eax, %eax
.LBB6_6:                                # %.lr.ph
                                        #   Parent Loop BB6_2 Depth=1
                                        # =>  This Inner Loop Header: Depth=2
	movl	%eax, %ebx
	cmpl	$15, %eax
	ja	.LBB6_10
# %bb.7:                                #   in Loop: Header=BB6_6 Depth=2
	testl	%ebp, %ebp
	jg	.LBB6_9
# %bb.8:                                #   in Loop: Header=BB6_6 Depth=2
	movq	active(%rip), %rax
	cmpl	$0, (%rax,%r13,4)
	je	.LBB6_12
.LBB6_9:                                #   in Loop: Header=BB6_6 Depth=2
	xorps	%xmm0, %xmm0
	cvtss2sd	(%r14,%r13,4), %xmm0
	movl	$.L.str.6, %edi
	movb	$1, %al
	callq	printf
	jmp	.LBB6_12
.LBB6_10:                               #   in Loop: Header=BB6_6 Depth=2
	cmpl	$16, %ebx
	jne	.LBB6_12
# %bb.11:                               #   in Loop: Header=BB6_6 Depth=2
	movl	$.L.str.7, %edi
	xorl	%eax, %eax
	callq	printf
.LBB6_12:                               # %.thread
                                        #   in Loop: Header=BB6_6 Depth=2
	incq	%r13
	leal	1(%rbx), %eax
	cmpl	Nx(%rip), %ebx
	jle	.LBB6_6
# %bb.13:                               # %._crit_edge.loopexit
                                        #   in Loop: Header=BB6_2 Depth=1
	addl	%eax, %r15d
.LBB6_14:                               # %._crit_edge
                                        #   in Loop: Header=BB6_2 Depth=1
	movl	$10, %edi
	callq	putchar@PLT
	leal	1(%r12), %eax
	cmpl	Ny(%rip), %r12d
	movl	%eax, %r12d
	jle	.LBB6_2
	jmp	.LBB6_15
.LBB6_3:
	movl	$.Lstr.1, %edi
	callq	puts@PLT
.LBB6_15:                               # %.loopexit
	movl	npts(%rip), %eax
	xorpd	%xmm1, %xmm1
	xorps	%xmm0, %xmm0
	testl	%eax, %eax
	jle	.LBB6_19
# %bb.16:                               # %.lr.ph.preheader.i
	xorps	%xmm0, %xmm0
	xorl	%ecx, %ecx
.LBB6_17:                               # %.lr.ph.i
                                        # =>This Inner Loop Header: Depth=1
	movss	(%r14,%rcx,4), %xmm2            # xmm2 = mem[0],zero,zero,zero
	mulss	%xmm2, %xmm2
	addss	%xmm2, %xmm0
	incq	%rcx
	cmpq	%rcx, %rax
	jne	.LBB6_17
# %bb.18:                               # %_Z8norm_sqrPf.exit.loopexit
	cvtss2sd	%xmm0, %xmm0
.LBB6_19:                               # %_Z8norm_sqrPf.exit
	ucomisd	%xmm1, %xmm0
	jb	.LBB6_21
# %bb.20:
	sqrtsd	%xmm0, %xmm0
	jmp	.LBB6_22
.LBB6_21:                               # %call.sqrt
	callq	sqrt
.LBB6_22:                               # %_Z8norm_sqrPf.exit.split
	movl	$.L.str.8, %edi
	movq	(%rsp), %rsi                    # 8-byte Reload
	movb	$1, %al
	addq	$8, %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
	jmp	printf                          # TAILCALL
.Lfunc_end6:
	.size	_Z12print_vectorPcPfi, .Lfunc_end6-_Z12print_vectorPcPfi
	.cfi_endproc
                                        # -- End function
	.globl	_Z28__device_stub__laplace2d_GPUPfS_i # -- Begin function _Z28__device_stub__laplace2d_GPUPfS_i
	.type	_Z28__device_stub__laplace2d_GPUPfS_i,@function
_Z28__device_stub__laplace2d_GPUPfS_i:  # @_Z28__device_stub__laplace2d_GPUPfS_i
	.cfi_startproc
# %bb.0:
	pushq	%r15
	.cfi_def_cfa_offset 16
	pushq	%r14
	.cfi_def_cfa_offset 24
	pushq	%r13
	.cfi_def_cfa_offset 32
	pushq	%r12
	.cfi_def_cfa_offset 40
	pushq	%rbx
	.cfi_def_cfa_offset 48
	subq	$112, %rsp
	.cfi_def_cfa_offset 160
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r13, -32
	.cfi_offset %r14, -24
	.cfi_offset %r15, -16
	leaq	40(%rsp), %rax
	movq	%rdi, (%rax)
	leaq	32(%rsp), %rcx
	movq	%rsi, (%rcx)
	leaq	12(%rsp), %rsi
	movl	%edx, (%rsi)
	leaq	80(%rsp), %rbx
	movq	%rax, (%rbx)
	movq	%rcx, 8(%rbx)
	movq	%rsi, 16(%rbx)
	leaq	64(%rsp), %r14
	leaq	48(%rsp), %r15
	leaq	24(%rsp), %r12
	leaq	16(%rsp), %r13
	movq	%r14, %rdi
	movq	%r15, %rsi
	movq	%r12, %rdx
	movq	%r13, %rcx
	callq	__hipPopCallConfiguration
	movq	(%r14), %rsi
	movl	8(%r14), %edx
	movq	(%r15), %rcx
	movl	8(%r15), %r8d
	movl	$_Z13laplace2d_GPUPfS_i, %edi
	movq	%rbx, %r9
	pushq	(%r13)
	.cfi_adjust_cfa_offset 8
	pushq	(%r12)
	.cfi_adjust_cfa_offset 8
	callq	hipLaunchKernel
	addq	$128, %rsp
	.cfi_adjust_cfa_offset -128
	popq	%rbx
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	retq
.Lfunc_end7:
	.size	_Z28__device_stub__laplace2d_GPUPfS_i, .Lfunc_end7-_Z28__device_stub__laplace2d_GPUPfS_i
	.cfi_endproc
                                        # -- End function
	.section	.rodata.cst4,"aM",@progbits,4
	.p2align	2, 0x0                          # -- Begin function _Z13laplace2d_CPUPfS_
.LCPI8_0:
	.long	0xc0800000                      # float -4
	.text
	.globl	_Z13laplace2d_CPUPfS_
	.type	_Z13laplace2d_CPUPfS_,@function
_Z13laplace2d_CPUPfS_:                  # @_Z13laplace2d_CPUPfS_
	.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
	movslq	Nx(%rip), %r11
	movl	%r11d, %ebx
	addl	$2, %ebx
	je	.LBB8_18
# %bb.1:                                # %.preheader.lr.ph
	movl	%ebx, %r14d
	imull	%r14d, %r14d
	leal	1(%r11), %ebp
	cmpl	$1, %r14d
	adcl	$0, %r14d
	movl	$-2, %r15d
	subl	%r11d, %r15d
	addq	$2, %r11
	xorl	%ecx, %ecx
	movss	.LCPI8_0(%rip), %xmm0           # xmm0 = mem[0],zero,zero,zero
.LBB8_2:                                # %.preheader
                                        # =>This Loop Header: Depth=1
                                        #     Child Loop BB8_3 Depth 2
	movl	%ecx, %eax
	cltd
	idivl	%ebx
	movl	%eax, %r8d
	movl	%edx, %r9d
	leaq	-1(%rcx), %r13
	leaq	1(%rcx), %r12
	xorl	%r10d, %r10d
.LBB8_3:                                #   Parent Loop BB8_2 Depth=1
                                        # =>  This Inner Loop Header: Depth=2
	testl	%r9d, %r9d
	je	.LBB8_16
# %bb.4:                                #   in Loop: Header=BB8_3 Depth=2
	testl	%r8d, %r8d
	je	.LBB8_16
# %bb.5:                                #   in Loop: Header=BB8_3 Depth=2
	cmpl	%ebp, %r9d
	je	.LBB8_16
# %bb.6:                                #   in Loop: Header=BB8_3 Depth=2
	cmpl	%ebp, %r8d
	je	.LBB8_16
# %bb.7:                                #   in Loop: Header=BB8_3 Depth=2
	cmpq	%r10, %rcx
	jne	.LBB8_9
# %bb.8:                                #   in Loop: Header=BB8_3 Depth=2
	movss	(%rsi,%rcx,4), %xmm1            # xmm1 = mem[0],zero,zero,zero
	mulss	%xmm0, %xmm1
	addss	(%rdi,%rcx,4), %xmm1
	movss	%xmm1, (%rdi,%rcx,4)
.LBB8_9:                                #   in Loop: Header=BB8_3 Depth=2
	cmpq	%r10, %r13
	je	.LBB8_12
# %bb.10:                               #   in Loop: Header=BB8_3 Depth=2
	cmpq	%r10, %r12
	jne	.LBB8_13
# %bb.11:                               #   in Loop: Header=BB8_3 Depth=2
	movl	%r10d, %eax
	cltd
	idivl	%ebx
	testl	%edx, %edx
	je	.LBB8_13
.LBB8_12:                               #   in Loop: Header=BB8_3 Depth=2
	movss	(%rsi,%r10,4), %xmm1            # xmm1 = mem[0],zero,zero,zero
	addss	(%rdi,%rcx,4), %xmm1
	movss	%xmm1, (%rdi,%rcx,4)
.LBB8_13:                               #   in Loop: Header=BB8_3 Depth=2
	leal	(%r11,%r10), %eax
	cmpq	%rax, %rcx
	je	.LBB8_15
# %bb.14:                               #   in Loop: Header=BB8_3 Depth=2
	leal	(%r15,%r10), %eax
	cmpq	%rax, %rcx
	jne	.LBB8_16
.LBB8_15:                               #   in Loop: Header=BB8_3 Depth=2
	movss	(%rsi,%r10,4), %xmm1            # xmm1 = mem[0],zero,zero,zero
	addss	(%rdi,%rcx,4), %xmm1
	movss	%xmm1, (%rdi,%rcx,4)
.LBB8_16:                               #   in Loop: Header=BB8_3 Depth=2
	incq	%r10
	cmpq	%r10, %r14
	jne	.LBB8_3
# %bb.17:                               #   in Loop: Header=BB8_2 Depth=1
	movq	%r12, %rcx
	cmpq	%r14, %r12
	jne	.LBB8_2
.LBB8_18:                               # %._crit_edge
	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_end8:
	.size	_Z13laplace2d_CPUPfS_, .Lfunc_end8-_Z13laplace2d_CPUPfS_
	.cfi_endproc
                                        # -- End function
	.globl	_Z19vector_addition_CPUPfS_S_   # -- Begin function _Z19vector_addition_CPUPfS_S_
	.type	_Z19vector_addition_CPUPfS_S_,@function
_Z19vector_addition_CPUPfS_S_:          # @_Z19vector_addition_CPUPfS_S_
	.cfi_startproc
# %bb.0:
	movl	npts(%rip), %eax
	testl	%eax, %eax
	jle	.LBB9_3
# %bb.1:                                # %.lr.ph.preheader
	xorl	%ecx, %ecx
.LBB9_2:                                # %.lr.ph
                                        # =>This Inner Loop Header: Depth=1
	movss	(%rdi,%rcx,4), %xmm0            # xmm0 = mem[0],zero,zero,zero
	addss	(%rsi,%rcx,4), %xmm0
	addss	(%rdx,%rcx,4), %xmm0
	movss	%xmm0, (%rdx,%rcx,4)
	incq	%rcx
	cmpq	%rcx, %rax
	jne	.LBB9_2
.LBB9_3:                                # %._crit_edge
	retq
.Lfunc_end9:
	.size	_Z19vector_addition_CPUPfS_S_, .Lfunc_end9-_Z19vector_addition_CPUPfS_S_
	.cfi_endproc
                                        # -- End function
	.globl	_Z34__device_stub__vector_addition_GPUPfS_S_ # -- Begin function _Z34__device_stub__vector_addition_GPUPfS_S_
	.type	_Z34__device_stub__vector_addition_GPUPfS_S_,@function
_Z34__device_stub__vector_addition_GPUPfS_S_: # @_Z34__device_stub__vector_addition_GPUPfS_S_
	.cfi_startproc
# %bb.0:
	pushq	%r15
	.cfi_def_cfa_offset 16
	pushq	%r14
	.cfi_def_cfa_offset 24
	pushq	%r13
	.cfi_def_cfa_offset 32
	pushq	%r12
	.cfi_def_cfa_offset 40
	pushq	%rbx
	.cfi_def_cfa_offset 48
	subq	$112, %rsp
	.cfi_def_cfa_offset 160
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r13, -32
	.cfi_offset %r14, -24
	.cfi_offset %r15, -16
	leaq	40(%rsp), %rax
	movq	%rdi, (%rax)
	leaq	32(%rsp), %rcx
	movq	%rsi, (%rcx)
	leaq	24(%rsp), %rsi
	movq	%rdx, (%rsi)
	leaq	80(%rsp), %rbx
	movq	%rax, (%rbx)
	movq	%rcx, 8(%rbx)
	movq	%rsi, 16(%rbx)
	leaq	64(%rsp), %r14
	leaq	48(%rsp), %r15
	leaq	16(%rsp), %r12
	leaq	8(%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	$_Z19vector_addition_GPUPfS_S_, %edi
	movq	%rbx, %r9
	pushq	(%r13)
	.cfi_adjust_cfa_offset 8
	pushq	(%r12)
	.cfi_adjust_cfa_offset 8
	callq	hipLaunchKernel
	addq	$128, %rsp
	.cfi_adjust_cfa_offset -128
	popq	%rbx
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	retq
.Lfunc_end10:
	.size	_Z34__device_stub__vector_addition_GPUPfS_S_, .Lfunc_end10-_Z34__device_stub__vector_addition_GPUPfS_S_
	.cfi_endproc
                                        # -- End function
	.globl	_Z16scale_vector_CPUfPfS_       # -- Begin function _Z16scale_vector_CPUfPfS_
	.type	_Z16scale_vector_CPUfPfS_,@function
_Z16scale_vector_CPUfPfS_:              # @_Z16scale_vector_CPUfPfS_
	.cfi_startproc
# %bb.0:
	movl	npts(%rip), %eax
	testl	%eax, %eax
	jle	.LBB11_3
# %bb.1:                                # %.lr.ph.preheader
	xorl	%ecx, %ecx
.LBB11_2:                               # %.lr.ph
                                        # =>This Inner Loop Header: Depth=1
	movss	(%rdi,%rcx,4), %xmm1            # xmm1 = mem[0],zero,zero,zero
	mulss	%xmm0, %xmm1
	movss	%xmm1, (%rsi,%rcx,4)
	incq	%rcx
	cmpq	%rcx, %rax
	jne	.LBB11_2
.LBB11_3:                               # %._crit_edge
	retq
.Lfunc_end11:
	.size	_Z16scale_vector_CPUfPfS_, .Lfunc_end11-_Z16scale_vector_CPUfPfS_
	.cfi_endproc
                                        # -- End function
	.globl	_Z31__device_stub__scale_vector_GPUfPfS_ # -- Begin function _Z31__device_stub__scale_vector_GPUfPfS_
	.type	_Z31__device_stub__scale_vector_GPUfPfS_,@function
_Z31__device_stub__scale_vector_GPUfPfS_: # @_Z31__device_stub__scale_vector_GPUfPfS_
	.cfi_startproc
# %bb.0:
	pushq	%r15
	.cfi_def_cfa_offset 16
	pushq	%r14
	.cfi_def_cfa_offset 24
	pushq	%r13
	.cfi_def_cfa_offset 32
	pushq	%r12
	.cfi_def_cfa_offset 40
	pushq	%rbx
	.cfi_def_cfa_offset 48
	subq	$112, %rsp
	.cfi_def_cfa_offset 160
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r13, -32
	.cfi_offset %r14, -24
	.cfi_offset %r15, -16
	leaq	12(%rsp), %rax
	movss	%xmm0, (%rax)
	leaq	40(%rsp), %rcx
	movq	%rdi, (%rcx)
	leaq	32(%rsp), %rdx
	movq	%rsi, (%rdx)
	leaq	80(%rsp), %rbx
	movq	%rax, (%rbx)
	movq	%rcx, 8(%rbx)
	movq	%rdx, 16(%rbx)
	leaq	64(%rsp), %r14
	leaq	48(%rsp), %r15
	leaq	24(%rsp), %r12
	leaq	16(%rsp), %r13
	movq	%r14, %rdi
	movq	%r15, %rsi
	movq	%r12, %rdx
	movq	%r13, %rcx
	callq	__hipPopCallConfiguration
	movq	(%r14), %rsi
	movl	8(%r14), %edx
	movq	(%r15), %rcx
	movl	8(%r15), %r8d
	movl	$_Z16scale_vector_GPUfPfS_, %edi
	movq	%rbx, %r9
	pushq	(%r13)
	.cfi_adjust_cfa_offset 8
	pushq	(%r12)
	.cfi_adjust_cfa_offset 8
	callq	hipLaunchKernel
	addq	$128, %rsp
	.cfi_adjust_cfa_offset -128
	popq	%rbx
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	retq
.Lfunc_end12:
	.size	_Z31__device_stub__scale_vector_GPUfPfS_, .Lfunc_end12-_Z31__device_stub__scale_vector_GPUfPfS_
	.cfi_endproc
                                        # -- End function
	.section	.rodata.cst8,"aM",@progbits,8
	.p2align	3, 0x0                          # -- Begin function _Z14laplaceOneLoopP8_IO_FILEiiiii
.LCPI13_0:
	.quad	0x3eb0c6f7a0b5ed8d              # double 9.9999999999999995E-7
	.text
	.globl	_Z14laplaceOneLoopP8_IO_FILEiiiii
	.type	_Z14laplaceOneLoopP8_IO_FILEiiiii,@function
_Z14laplaceOneLoopP8_IO_FILEiiiii:      # @_Z14laplaceOneLoopP8_IO_FILEiiiii
	.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	$88, %rsp
	.cfi_def_cfa_offset 144
	.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, %ebx
	movl	%r8d, (%rsp)                    # 4-byte Spill
	movl	%ecx, %r12d
	movl	%edx, 16(%rsp)                  # 4-byte Spill
	movq	%rdi, 64(%rsp)                  # 8-byte Spill
	movl	%esi, Nx(%rip)
	movl	%esi, Ny(%rip)
	addl	$2, %esi
	movl	%esi, 44(%rsp)                  # 4-byte Spill
	movl	%esi, %eax
	imull	%esi, %eax
	movl	%eax, npts(%rip)
	callq	_Z10active_ptsv
	movslq	npts(%rip), %r13
	leaq	(,%r13,4), %r14
	movq	%r14, %rdi
	callq	malloc
	movq	%rax, %r15
	movq	%r14, %rdi
	callq	malloc
	movq	%rax, %rbp
	movq	%r14, %rdi
	callq	malloc
	movq	%rax, %r14
	shlq	$34, %r13
	sarq	$32, %r13
	movq	%r15, 24(%rsp)                  # 8-byte Spill
	movq	%r15, %rdi
	movq	%rbp, %r15
	xorl	%esi, %esi
	movq	%r13, %rdx
	callq	memset@PLT
	movq	%rbp, %rdi
	xorl	%esi, %esi
	movq	%r13, %rdx
	callq	memset@PLT
	movq	%r14, 56(%rsp)                  # 8-byte Spill
	movq	%r14, %rdi
	xorl	%esi, %esi
	movq	%r13, %rdx
	callq	memset@PLT
	movq	%rbp, %rdi
	callq	_Z13random_vectorPf
	leaq	32(%rsp), %rdi
	movq	%r13, %rsi
	callq	hipMalloc
	testl	%eax, %eax
	jne	.LBB13_1
# %bb.4:
	leaq	8(%rsp), %rdi
	movq	%r13, %rsi
	callq	hipMalloc
	testl	%eax, %eax
	jne	.LBB13_5
# %bb.6:
	movq	32(%rsp), %rdi
	movq	%r15, %rsi
	movq	%r13, %rdx
	movl	$1, %ecx
	callq	hipMemcpy
	testl	%eax, %eax
	jne	.LBB13_7
# %bb.8:
	movq	8(%rsp), %rdi
	movq	24(%rsp), %rsi                  # 8-byte Reload
	movq	%r13, %rdx
	movl	$1, %ecx
	callq	hipMemcpy
	testl	%eax, %eax
	jne	.LBB13_9
# %bb.10:
	movl	16(%rsp), %eax                  # 4-byte Reload
	shlq	$32, %r12
	orq	%rax, %r12
	movl	(%rsp), %eax                    # 4-byte Reload
	shlq	$32, %rbx
	orq	%rax, %rbx
	leaq	72(%rsp), %r14
	leaq	48(%rsp), %rsi
	movq	%r14, %rdi
	callq	gettimeofday
	movq	(%r14), %rax
	movq	%rax, (%rsp)                    # 8-byte Spill
	movq	8(%r14), %r14
	movq	%r12, %rdi
	movl	$1, %esi
	movq	%rbx, %rdx
	movl	$1, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	__hipPushCallConfiguration
	testl	%eax, %eax
	jne	.LBB13_12
# %bb.11:
	movq	8(%rsp), %rdi
	movq	32(%rsp), %rsi
	movl	44(%rsp), %edx                  # 4-byte Reload
	callq	_Z28__device_stub__laplace2d_GPUPfS_i
.LBB13_12:
	callq	hipDeviceSynchronize
	leaq	72(%rsp), %rbx
	leaq	48(%rsp), %rsi
	movq	%rbx, %rdi
	callq	gettimeofday
	movq	(%rbx), %r12
	movq	8(%rbx), %rbp
	movq	8(%rsp), %rsi
	movq	24(%rsp), %rdi                  # 8-byte Reload
	movq	%r13, %rdx
	movl	$2, %ecx
	callq	hipMemcpy
	testl	%eax, %eax
	jne	.LBB13_13
# %bb.15:
	movq	32(%rsp), %rdi
	callq	hipFree
	testl	%eax, %eax
	jne	.LBB13_16
# %bb.17:
	movq	8(%rsp), %rdi
	callq	hipFree
	testl	%eax, %eax
	jne	.LBB13_18
# %bb.19:
	cvtsi2sd	%rbp, %xmm0
	movsd	.LCPI13_0(%rip), %xmm1          # xmm1 = mem[0],zero
	mulsd	%xmm1, %xmm0
	cvtsi2sd	%r12, %xmm2
	addsd	%xmm0, %xmm2
	xorps	%xmm0, %xmm0
	cvtsi2sd	%r14, %xmm0
	mulsd	%xmm1, %xmm0
	xorps	%xmm1, %xmm1
	cvtsi2sdq	(%rsp), %xmm1           # 8-byte Folded Reload
	addsd	%xmm0, %xmm1
	subsd	%xmm1, %xmm2
	movsd	%xmm2, (%rsp)                   # 8-byte Spill
	leaq	72(%rsp), %rbx
	leaq	48(%rsp), %rsi
	movq	%rbx, %rdi
	callq	gettimeofday
	xorps	%xmm0, %xmm0
	cvtsi2sdq	(%rbx), %xmm0
	xorps	%xmm1, %xmm1
	cvtsi2sdq	8(%rbx), %xmm1
	mulsd	.LCPI13_0(%rip), %xmm1
	addsd	%xmm0, %xmm1
	movsd	%xmm1, 16(%rsp)                 # 8-byte Spill
	movq	56(%rsp), %rdi                  # 8-byte Reload
	movq	%r15, %rsi
	callq	_Z13laplace2d_CPUPfS_
	leaq	72(%rsp), %rbx
	leaq	48(%rsp), %rsi
	movq	%rbx, %rdi
	callq	gettimeofday
	xorps	%xmm0, %xmm0
	cvtsi2sdq	(%rbx), %xmm0
	xorps	%xmm1, %xmm1
	cvtsi2sdq	8(%rbx), %xmm1
	mulsd	.LCPI13_0(%rip), %xmm1
	addsd	%xmm0, %xmm1
	subsd	16(%rsp), %xmm1                 # 8-byte Folded Reload
	movapd	%xmm1, %xmm2
	movsd	(%rsp), %xmm0                   # 8-byte Reload
                                        # xmm0 = mem[0],zero
	divsd	%xmm0, %xmm2
	movl	$.L.str.12, %esi
	movq	64(%rsp), %rdi                  # 8-byte Reload
	movb	$3, %al
	callq	fprintf
	movq	active(%rip), %rdi
	callq	free
	movq	24(%rsp), %rdi                  # 8-byte Reload
	callq	free
	movq	%r15, %rdi
	callq	free
	addq	$88, %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
.LBB13_1:
	.cfi_def_cfa_offset 144
	movl	%eax, %r14d
	movq	stderr(%rip), %rdi
	movl	$.L.str.9, %esi
	movl	$.L.str.10, %edx
	movl	$313, %ecx                      # imm = 0x139
	jmp	.LBB13_2
.LBB13_5:
	movl	%eax, %r14d
	movq	stderr(%rip), %rdi
	movl	$.L.str.9, %esi
	movl	$.L.str.10, %edx
	movl	$314, %ecx                      # imm = 0x13A
	jmp	.LBB13_2
.LBB13_7:
	movl	%eax, %r14d
	movq	stderr(%rip), %rdi
	movl	$.L.str.9, %esi
	movl	$.L.str.10, %edx
	movl	$317, %ecx                      # imm = 0x13D
	jmp	.LBB13_2
.LBB13_9:
	movl	%eax, %r14d
	movq	stderr(%rip), %rdi
	movl	$.L.str.9, %esi
	movl	$.L.str.10, %edx
	movl	$318, %ecx                      # imm = 0x13E
.LBB13_2:
	xorl	%eax, %eax
	callq	fprintf
	movq	stderr(%rip), %rbx
	movl	%r14d, %edi
	callq	hipGetErrorString
	movl	$.L.str.11, %esi
	movq	%rbx, %rdi
	movl	%r14d, %edx
	jmp	.LBB13_3
.LBB13_13:
	movl	%eax, %ebx
	movq	stderr(%rip), %rdi
	movl	$.L.str.9, %esi
	movl	$.L.str.10, %edx
	movl	$330, %ecx                      # imm = 0x14A
	jmp	.LBB13_14
.LBB13_16:
	movl	%eax, %ebx
	movq	stderr(%rip), %rdi
	movl	$.L.str.9, %esi
	movl	$.L.str.10, %edx
	movl	$335, %ecx                      # imm = 0x14F
	jmp	.LBB13_14
.LBB13_18:
	movl	%eax, %ebx
	movq	stderr(%rip), %rdi
	movl	$.L.str.9, %esi
	movl	$.L.str.10, %edx
	movl	$336, %ecx                      # imm = 0x150
.LBB13_14:
	xorl	%eax, %eax
	callq	fprintf
	movq	stderr(%rip), %r14
	movl	%ebx, %edi
	callq	hipGetErrorString
	movl	$.L.str.11, %esi
	movq	%r14, %rdi
	movl	%ebx, %edx
.LBB13_3:
	movq	%rax, %rcx
	xorl	%eax, %eax
	callq	fprintf
	movl	$1, %edi
	callq	exit
.Lfunc_end13:
	.size	_Z14laplaceOneLoopP8_IO_FILEiiiii, .Lfunc_end13-_Z14laplaceOneLoopP8_IO_FILEiiiii
	.cfi_endproc
                                        # -- End function
	.section	.rodata.cst8,"aM",@progbits,8
	.p2align	3, 0x0                          # -- Begin function _Z18vectorScaleOneLoopP8_IO_FILEiiiii
.LCPI14_0:
	.quad	0x3eb0c6f7a0b5ed8d              # double 9.9999999999999995E-7
	.text
	.globl	_Z18vectorScaleOneLoopP8_IO_FILEiiiii
	.type	_Z18vectorScaleOneLoopP8_IO_FILEiiiii,@function
_Z18vectorScaleOneLoopP8_IO_FILEiiiii:  # @_Z18vectorScaleOneLoopP8_IO_FILEiiiii
	.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	$88, %rsp
	.cfi_def_cfa_offset 144
	.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, %ebx
	movl	%r8d, (%rsp)                    # 4-byte Spill
	movl	%ecx, %r12d
	movl	%edx, 16(%rsp)                  # 4-byte Spill
	movq	%rdi, 64(%rsp)                  # 8-byte Spill
	movl	%esi, Nx(%rip)
	movl	%esi, Ny(%rip)
	addl	$2, %esi
	movl	%esi, 44(%rsp)                  # 4-byte Spill
	movl	%esi, %eax
	imull	%esi, %eax
	movl	%eax, npts(%rip)
	callq	_Z10active_ptsv
	movslq	npts(%rip), %r13
	leaq	(,%r13,4), %r14
	movq	%r14, %rdi
	callq	malloc
	movq	%rax, %r15
	movq	%r14, %rdi
	callq	malloc
	movq	%rax, %rbp
	movq	%r14, %rdi
	callq	malloc
	movq	%rax, %r14
	shlq	$34, %r13
	sarq	$32, %r13
	movq	%r15, 24(%rsp)                  # 8-byte Spill
	movq	%r15, %rdi
	movq	%rbp, %r15
	xorl	%esi, %esi
	movq	%r13, %rdx
	callq	memset@PLT
	movq	%rbp, %rdi
	xorl	%esi, %esi
	movq	%r13, %rdx
	callq	memset@PLT
	movq	%r14, 56(%rsp)                  # 8-byte Spill
	movq	%r14, %rdi
	xorl	%esi, %esi
	movq	%r13, %rdx
	callq	memset@PLT
	movq	%rbp, %rdi
	callq	_Z13random_vectorPf
	leaq	32(%rsp), %rdi
	movq	%r13, %rsi
	callq	hipMalloc
	testl	%eax, %eax
	jne	.LBB14_1
# %bb.4:
	leaq	8(%rsp), %rdi
	movq	%r13, %rsi
	callq	hipMalloc
	testl	%eax, %eax
	jne	.LBB14_5
# %bb.6:
	movq	32(%rsp), %rdi
	movq	%r15, %rsi
	movq	%r13, %rdx
	movl	$1, %ecx
	callq	hipMemcpy
	testl	%eax, %eax
	jne	.LBB14_7
# %bb.8:
	movq	8(%rsp), %rdi
	movq	24(%rsp), %rsi                  # 8-byte Reload
	movq	%r13, %rdx
	movl	$1, %ecx
	callq	hipMemcpy
	testl	%eax, %eax
	jne	.LBB14_9
# %bb.10:
	movl	16(%rsp), %eax                  # 4-byte Reload
	shlq	$32, %r12
	orq	%rax, %r12
	movl	(%rsp), %eax                    # 4-byte Reload
	shlq	$32, %rbx
	orq	%rax, %rbx
	leaq	72(%rsp), %r14
	leaq	48(%rsp), %rsi
	movq	%r14, %rdi
	callq	gettimeofday
	movq	(%r14), %rax
	movq	%rax, (%rsp)                    # 8-byte Spill
	movq	8(%r14), %r14
	movq	%r12, %rdi
	movl	$1, %esi
	movq	%rbx, %rdx
	movl	$1, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	__hipPushCallConfiguration
	testl	%eax, %eax
	jne	.LBB14_12
# %bb.11:
	movq	8(%rsp), %rdi
	movq	32(%rsp), %rsi
	movl	44(%rsp), %edx                  # 4-byte Reload
	callq	_Z28__device_stub__laplace2d_GPUPfS_i
.LBB14_12:
	callq	hipDeviceSynchronize
	leaq	72(%rsp), %rbx
	leaq	48(%rsp), %rsi
	movq	%rbx, %rdi
	callq	gettimeofday
	movq	(%rbx), %r12
	movq	8(%rbx), %rbp
	movq	8(%rsp), %rsi
	movq	24(%rsp), %rdi                  # 8-byte Reload
	movq	%r13, %rdx
	movl	$2, %ecx
	callq	hipMemcpy
	testl	%eax, %eax
	jne	.LBB14_13
# %bb.15:
	movq	32(%rsp), %rdi
	callq	hipFree
	testl	%eax, %eax
	jne	.LBB14_16
# %bb.17:
	movq	8(%rsp), %rdi
	callq	hipFree
	testl	%eax, %eax
	jne	.LBB14_18
# %bb.19:
	cvtsi2sd	%rbp, %xmm0
	movsd	.LCPI14_0(%rip), %xmm1          # xmm1 = mem[0],zero
	mulsd	%xmm1, %xmm0
	cvtsi2sd	%r12, %xmm2
	addsd	%xmm0, %xmm2
	xorps	%xmm0, %xmm0
	cvtsi2sd	%r14, %xmm0
	mulsd	%xmm1, %xmm0
	xorps	%xmm1, %xmm1
	cvtsi2sdq	(%rsp), %xmm1           # 8-byte Folded Reload
	addsd	%xmm0, %xmm1
	subsd	%xmm1, %xmm2
	movsd	%xmm2, (%rsp)                   # 8-byte Spill
	leaq	72(%rsp), %rbx
	leaq	48(%rsp), %rsi
	movq	%rbx, %rdi
	callq	gettimeofday
	xorps	%xmm0, %xmm0
	cvtsi2sdq	(%rbx), %xmm0
	xorps	%xmm1, %xmm1
	cvtsi2sdq	8(%rbx), %xmm1
	mulsd	.LCPI14_0(%rip), %xmm1
	addsd	%xmm0, %xmm1
	movsd	%xmm1, 16(%rsp)                 # 8-byte Spill
	movq	56(%rsp), %rdi                  # 8-byte Reload
	movq	%r15, %rsi
	callq	_Z13laplace2d_CPUPfS_
	leaq	72(%rsp), %rbx
	leaq	48(%rsp), %rsi
	movq	%rbx, %rdi
	callq	gettimeofday
	xorps	%xmm0, %xmm0
	cvtsi2sdq	(%rbx), %xmm0
	xorps	%xmm1, %xmm1
	cvtsi2sdq	8(%rbx), %xmm1
	mulsd	.LCPI14_0(%rip), %xmm1
	addsd	%xmm0, %xmm1
	subsd	16(%rsp), %xmm1                 # 8-byte Folded Reload
	movapd	%xmm1, %xmm2
	movsd	(%rsp), %xmm0                   # 8-byte Reload
                                        # xmm0 = mem[0],zero
	divsd	%xmm0, %xmm2
	movl	$.L.str.12, %esi
	movq	64(%rsp), %rdi                  # 8-byte Reload
	movb	$3, %al
	callq	fprintf
	movq	active(%rip), %rdi
	callq	free
	movq	24(%rsp), %rdi                  # 8-byte Reload
	callq	free
	movq	%r15, %rdi
	callq	free
	addq	$88, %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
.LBB14_1:
	.cfi_def_cfa_offset 144
	movl	%eax, %r14d
	movq	stderr(%rip), %rdi
	movl	$.L.str.9, %esi
	movl	$.L.str.10, %edx
	movl	$392, %ecx                      # imm = 0x188
	jmp	.LBB14_2
.LBB14_5:
	movl	%eax, %r14d
	movq	stderr(%rip), %rdi
	movl	$.L.str.9, %esi
	movl	$.L.str.10, %edx
	movl	$393, %ecx                      # imm = 0x189
	jmp	.LBB14_2
.LBB14_7:
	movl	%eax, %r14d
	movq	stderr(%rip), %rdi
	movl	$.L.str.9, %esi
	movl	$.L.str.10, %edx
	movl	$396, %ecx                      # imm = 0x18C
	jmp	.LBB14_2
.LBB14_9:
	movl	%eax, %r14d
	movq	stderr(%rip), %rdi
	movl	$.L.str.9, %esi
	movl	$.L.str.10, %edx
	movl	$397, %ecx                      # imm = 0x18D
.LBB14_2:
	xorl	%eax, %eax
	callq	fprintf
	movq	stderr(%rip), %rbx
	movl	%r14d, %edi
	callq	hipGetErrorString
	movl	$.L.str.11, %esi
	movq	%rbx, %rdi
	movl	%r14d, %edx
	jmp	.LBB14_3
.LBB14_13:
	movl	%eax, %ebx
	movq	stderr(%rip), %rdi
	movl	$.L.str.9, %esi
	movl	$.L.str.10, %edx
	movl	$409, %ecx                      # imm = 0x199
	jmp	.LBB14_14
.LBB14_16:
	movl	%eax, %ebx
	movq	stderr(%rip), %rdi
	movl	$.L.str.9, %esi
	movl	$.L.str.10, %edx
	movl	$414, %ecx                      # imm = 0x19E
	jmp	.LBB14_14
.LBB14_18:
	movl	%eax, %ebx
	movq	stderr(%rip), %rdi
	movl	$.L.str.9, %esi
	movl	$.L.str.10, %edx
	movl	$415, %ecx                      # imm = 0x19F
.LBB14_14:
	xorl	%eax, %eax
	callq	fprintf
	movq	stderr(%rip), %r14
	movl	%ebx, %edi
	callq	hipGetErrorString
	movl	$.L.str.11, %esi
	movq	%r14, %rdi
	movl	%ebx, %edx
.LBB14_3:
	movq	%rax, %rcx
	xorl	%eax, %eax
	callq	fprintf
	movl	$1, %edi
	callq	exit
.Lfunc_end14:
	.size	_Z18vectorScaleOneLoopP8_IO_FILEiiiii, .Lfunc_end14-_Z18vectorScaleOneLoopP8_IO_FILEiiiii
	.cfi_endproc
                                        # -- End function
	.section	.rodata.cst8,"aM",@progbits,8
	.p2align	3, 0x0                          # -- Begin function _Z16vectorAddOneLoopP8_IO_FILEiiiii
.LCPI15_0:
	.quad	0x3eb0c6f7a0b5ed8d              # double 9.9999999999999995E-7
	.text
	.globl	_Z16vectorAddOneLoopP8_IO_FILEiiiii
	.type	_Z16vectorAddOneLoopP8_IO_FILEiiiii,@function
_Z16vectorAddOneLoopP8_IO_FILEiiiii:    # @_Z16vectorAddOneLoopP8_IO_FILEiiiii
	.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	$88, %rsp
	.cfi_def_cfa_offset 144
	.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, %ebx
	movl	%r8d, (%rsp)                    # 4-byte Spill
	movl	%ecx, %r12d
	movl	%edx, 16(%rsp)                  # 4-byte Spill
	movq	%rdi, 64(%rsp)                  # 8-byte Spill
	movl	%esi, Nx(%rip)
	movl	%esi, Ny(%rip)
	addl	$2, %esi
	movl	%esi, 44(%rsp)                  # 4-byte Spill
	movl	%esi, %eax
	imull	%esi, %eax
	movl	%eax, npts(%rip)
	callq	_Z10active_ptsv
	movslq	npts(%rip), %r13
	leaq	(,%r13,4), %r14
	movq	%r14, %rdi
	callq	malloc
	movq	%rax, %r15
	movq	%r14, %rdi
	callq	malloc
	movq	%rax, %rbp
	movq	%r14, %rdi
	callq	malloc
	movq	%rax, %r14
	shlq	$34, %r13
	sarq	$32, %r13
	movq	%r15, 24(%rsp)                  # 8-byte Spill
	movq	%r15, %rdi
	movq	%rbp, %r15
	xorl	%esi, %esi
	movq	%r13, %rdx
	callq	memset@PLT
	movq	%rbp, %rdi
	xorl	%esi, %esi
	movq	%r13, %rdx
	callq	memset@PLT
	movq	%r14, 56(%rsp)                  # 8-byte Spill
	movq	%r14, %rdi
	xorl	%esi, %esi
	movq	%r13, %rdx
	callq	memset@PLT
	movq	%rbp, %rdi
	callq	_Z13random_vectorPf
	leaq	32(%rsp), %rdi
	movq	%r13, %rsi
	callq	hipMalloc
	testl	%eax, %eax
	jne	.LBB15_1
# %bb.4:
	leaq	8(%rsp), %rdi
	movq	%r13, %rsi
	callq	hipMalloc
	testl	%eax, %eax
	jne	.LBB15_5
# %bb.6:
	movq	32(%rsp), %rdi
	movq	%r15, %rsi
	movq	%r13, %rdx
	movl	$1, %ecx
	callq	hipMemcpy
	testl	%eax, %eax
	jne	.LBB15_7
# %bb.8:
	movq	8(%rsp), %rdi
	movq	24(%rsp), %rsi                  # 8-byte Reload
	movq	%r13, %rdx
	movl	$1, %ecx
	callq	hipMemcpy
	testl	%eax, %eax
	jne	.LBB15_9
# %bb.10:
	movl	16(%rsp), %eax                  # 4-byte Reload
	shlq	$32, %r12
	orq	%rax, %r12
	movl	(%rsp), %eax                    # 4-byte Reload
	shlq	$32, %rbx
	orq	%rax, %rbx
	leaq	72(%rsp), %r14
	leaq	48(%rsp), %rsi
	movq	%r14, %rdi
	callq	gettimeofday
	movq	(%r14), %rax
	movq	%rax, (%rsp)                    # 8-byte Spill
	movq	8(%r14), %r14
	movq	%r12, %rdi
	movl	$1, %esi
	movq	%rbx, %rdx
	movl	$1, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	__hipPushCallConfiguration
	testl	%eax, %eax
	jne	.LBB15_12
# %bb.11:
	movq	8(%rsp), %rdi
	movq	32(%rsp), %rsi
	movl	44(%rsp), %edx                  # 4-byte Reload
	callq	_Z28__device_stub__laplace2d_GPUPfS_i
.LBB15_12:
	callq	hipDeviceSynchronize
	leaq	72(%rsp), %rbx
	leaq	48(%rsp), %rsi
	movq	%rbx, %rdi
	callq	gettimeofday
	movq	(%rbx), %r12
	movq	8(%rbx), %rbp
	movq	8(%rsp), %rsi
	movq	24(%rsp), %rdi                  # 8-byte Reload
	movq	%r13, %rdx
	movl	$2, %ecx
	callq	hipMemcpy
	testl	%eax, %eax
	jne	.LBB15_13
# %bb.15:
	movq	32(%rsp), %rdi
	callq	hipFree
	testl	%eax, %eax
	jne	.LBB15_16
# %bb.17:
	movq	8(%rsp), %rdi
	callq	hipFree
	testl	%eax, %eax
	jne	.LBB15_18
# %bb.19:
	cvtsi2sd	%rbp, %xmm0
	movsd	.LCPI15_0(%rip), %xmm1          # xmm1 = mem[0],zero
	mulsd	%xmm1, %xmm0
	cvtsi2sd	%r12, %xmm2
	addsd	%xmm0, %xmm2
	xorps	%xmm0, %xmm0
	cvtsi2sd	%r14, %xmm0
	mulsd	%xmm1, %xmm0
	xorps	%xmm1, %xmm1
	cvtsi2sdq	(%rsp), %xmm1           # 8-byte Folded Reload
	addsd	%xmm0, %xmm1
	subsd	%xmm1, %xmm2
	movsd	%xmm2, (%rsp)                   # 8-byte Spill
	leaq	72(%rsp), %rbx
	leaq	48(%rsp), %rsi
	movq	%rbx, %rdi
	callq	gettimeofday
	xorps	%xmm0, %xmm0
	cvtsi2sdq	(%rbx), %xmm0
	xorps	%xmm1, %xmm1
	cvtsi2sdq	8(%rbx), %xmm1
	mulsd	.LCPI15_0(%rip), %xmm1
	addsd	%xmm0, %xmm1
	movsd	%xmm1, 16(%rsp)                 # 8-byte Spill
	movq	56(%rsp), %rdi                  # 8-byte Reload
	movq	%r15, %rsi
	callq	_Z13laplace2d_CPUPfS_
	leaq	72(%rsp), %rbx
	leaq	48(%rsp), %rsi
	movq	%rbx, %rdi
	callq	gettimeofday
	xorps	%xmm0, %xmm0
	cvtsi2sdq	(%rbx), %xmm0
	xorps	%xmm1, %xmm1
	cvtsi2sdq	8(%rbx), %xmm1
	mulsd	.LCPI15_0(%rip), %xmm1
	addsd	%xmm0, %xmm1
	subsd	16(%rsp), %xmm1                 # 8-byte Folded Reload
	movapd	%xmm1, %xmm2
	movsd	(%rsp), %xmm0                   # 8-byte Reload
                                        # xmm0 = mem[0],zero
	divsd	%xmm0, %xmm2
	movl	$.L.str.12, %esi
	movq	64(%rsp), %rdi                  # 8-byte Reload
	movb	$3, %al
	callq	fprintf
	movq	active(%rip), %rdi
	callq	free
	movq	24(%rsp), %rdi                  # 8-byte Reload
	callq	free
	movq	%r15, %rdi
	callq	free
	addq	$88, %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
.LBB15_1:
	.cfi_def_cfa_offset 144
	movl	%eax, %r14d
	movq	stderr(%rip), %rdi
	movl	$.L.str.9, %esi
	movl	$.L.str.10, %edx
	movl	$471, %ecx                      # imm = 0x1D7
	jmp	.LBB15_2
.LBB15_5:
	movl	%eax, %r14d
	movq	stderr(%rip), %rdi
	movl	$.L.str.9, %esi
	movl	$.L.str.10, %edx
	movl	$472, %ecx                      # imm = 0x1D8
	jmp	.LBB15_2
.LBB15_7:
	movl	%eax, %r14d
	movq	stderr(%rip), %rdi
	movl	$.L.str.9, %esi
	movl	$.L.str.10, %edx
	movl	$475, %ecx                      # imm = 0x1DB
	jmp	.LBB15_2
.LBB15_9:
	movl	%eax, %r14d
	movq	stderr(%rip), %rdi
	movl	$.L.str.9, %esi
	movl	$.L.str.10, %edx
	movl	$476, %ecx                      # imm = 0x1DC
.LBB15_2:
	xorl	%eax, %eax
	callq	fprintf
	movq	stderr(%rip), %rbx
	movl	%r14d, %edi
	callq	hipGetErrorString
	movl	$.L.str.11, %esi
	movq	%rbx, %rdi
	movl	%r14d, %edx
	jmp	.LBB15_3
.LBB15_13:
	movl	%eax, %ebx
	movq	stderr(%rip), %rdi
	movl	$.L.str.9, %esi
	movl	$.L.str.10, %edx
	movl	$488, %ecx                      # imm = 0x1E8
	jmp	.LBB15_14
.LBB15_16:
	movl	%eax, %ebx
	movq	stderr(%rip), %rdi
	movl	$.L.str.9, %esi
	movl	$.L.str.10, %edx
	movl	$493, %ecx                      # imm = 0x1ED
	jmp	.LBB15_14
.LBB15_18:
	movl	%eax, %ebx
	movq	stderr(%rip), %rdi
	movl	$.L.str.9, %esi
	movl	$.L.str.10, %edx
	movl	$494, %ecx                      # imm = 0x1EE
.LBB15_14:
	xorl	%eax, %eax
	callq	fprintf
	movq	stderr(%rip), %r14
	movl	%ebx, %edi
	callq	hipGetErrorString
	movl	$.L.str.11, %esi
	movq	%r14, %rdi
	movl	%ebx, %edx
.LBB15_3:
	movq	%rax, %rcx
	xorl	%eax, %eax
	callq	fprintf
	movl	$1, %edi
	callq	exit
.Lfunc_end15:
	.size	_Z16vectorAddOneLoopP8_IO_FILEiiiii, .Lfunc_end15-_Z16vectorAddOneLoopP8_IO_FILEiiiii
	.cfi_endproc
                                        # -- End function
	.globl	main                            # -- Begin function main
	.type	main,@function
main:                                   # @main
	.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	$1320, %rsp                     # imm = 0x528
	.cfi_def_cfa_offset 1376
	.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), %rsi
	movl	$.L.str.13, %edi
	xorl	%eax, %eax
	callq	printf
	movl	$.L.str.14, %edi
	movl	$.L.str.15, %esi
	callq	fopen
	movq	%rax, %rbx
	movl	$63, %r15d
	leaq	32(%rsp), %r14
.LBB16_1:                               # =>This Inner Loop Header: Depth=1
	leaq	4(%r14), %rcx
	leaq	8(%r14), %r8
	leaq	12(%r14), %r9
	leaq	16(%r14), %rax
	movq	%rax, (%rsp)
	movl	$.L.str.16, %esi
	movq	%rbx, %rdi
	movq	%r14, %rdx
	xorl	%eax, %eax
	callq	__isoc23_fscanf
	subq	$1, %r15
	setb	%cl
	cmpl	$-1, %eax
	je	.LBB16_3
# %bb.2:                                #   in Loop: Header=BB16_1 Depth=1
	addq	$20, %r14
	testb	%cl, %cl
	je	.LBB16_1
.LBB16_3:                               # %.critedge
	movq	%rbx, %rdi
	callq	fclose
	movl	$.L.str.17, %edi
	movl	$.L.str.18, %esi
	callq	fopen
	movq	%rax, %rbx
	movl	$.L.str.19, %edi
	movl	$.L.str.18, %esi
	callq	fopen
	movq	%rax, %r14
	movl	$.L.str.20, %edi
	movl	$.L.str.18, %esi
	callq	fopen
	movq	%rax, %r15
	movl	$.L.str.21, %edi
	movl	$27, %esi
	movl	$1, %edx
	movq	%rbx, 24(%rsp)                  # 8-byte Spill
	movq	%rbx, %rcx
	callq	fwrite@PLT
	movl	$.L.str.21, %edi
	movl	$27, %esi
	movl	$1, %edx
	movq	%r14, 16(%rsp)                  # 8-byte Spill
	movq	%r14, %rcx
	callq	fwrite@PLT
	movl	$.L.str.21, %edi
	movl	$27, %esi
	movl	$1, %edx
	movq	%r15, 8(%rsp)                   # 8-byte Spill
	movq	%r15, %rcx
	callq	fwrite@PLT
	movl	$16, %r15d
	movl	$1, %ebp
.LBB16_4:                               # =>This Inner Loop Header: Depth=1
	movl	16(%rsp,%r15), %esi
	movl	20(%rsp,%r15), %r12d
	movl	%esi, N(%rip)
	movl	24(%rsp,%r15), %r13d
	movl	28(%rsp,%r15), %ebx
	movl	32(%rsp,%r15), %r14d
	movq	24(%rsp), %rdi                  # 8-byte Reload
	movl	%r12d, %edx
	movl	%r13d, %ecx
	movl	%ebx, %r8d
	movl	%r14d, %r9d
	callq	_Z14laplaceOneLoopP8_IO_FILEiiiii
	movl	N(%rip), %esi
	movq	16(%rsp), %rdi                  # 8-byte Reload
	movl	%r12d, %edx
	movl	%r13d, %ecx
	movl	%ebx, %r8d
	movl	%r14d, %r9d
	callq	_Z18vectorScaleOneLoopP8_IO_FILEiiiii
	movl	N(%rip), %esi
	movq	8(%rsp), %rdi                   # 8-byte Reload
	movl	%r12d, %edx
	movl	%r13d, %ecx
	movl	%ebx, %r8d
	movl	%r14d, %r9d
	callq	_Z16vectorAddOneLoopP8_IO_FILEiiiii
	movl	$.L.str.22, %edi
	movl	%ebp, %esi
	movl	$64, %edx
	xorl	%eax, %eax
	callq	printf
	movq	stdout(%rip), %rdi
	callq	fflush
	addq	$20, %r15
	incl	%ebp
	cmpq	$1296, %r15                     # imm = 0x510
	jne	.LBB16_4
# %bb.5:
	movl	$10, %edi
	callq	putchar@PLT
	movq	24(%rsp), %rdi                  # 8-byte Reload
	callq	fclose
	movq	16(%rsp), %rdi                  # 8-byte Reload
	callq	fclose
	movq	8(%rsp), %rdi                   # 8-byte Reload
	callq	fclose
	xorl	%eax, %eax
	addq	$1320, %rsp                     # imm = 0x528
	.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_end16:
	.size	main, .Lfunc_end16-main
	.cfi_endproc
                                        # -- End function
	.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	.LBB17_2
# %bb.1:
	movl	$__hip_fatbin_wrapper, %edi
	callq	__hipRegisterFatBinary
	movq	%rax, %rbx
	movq	%rax, __hip_gpubin_handle(%rip)
.LBB17_2:
	xorps	%xmm0, %xmm0
	movups	%xmm0, 16(%rsp)
	movups	%xmm0, (%rsp)
	movl	$_Z13laplace2d_GPUPfS_i, %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	$_Z19vector_addition_GPUPfS_S_, %esi
	movl	$.L__unnamed_2, %edx
	movl	$.L__unnamed_2, %ecx
	movq	%rbx, %rdi
	movl	$-1, %r8d
	xorl	%r9d, %r9d
	callq	__hipRegisterFunction
	xorps	%xmm0, %xmm0
	movups	%xmm0, 16(%rsp)
	movups	%xmm0, (%rsp)
	movl	$_Z16scale_vector_GPUfPfS_, %esi
	movl	$.L__unnamed_3, %edx
	movl	$.L__unnamed_3, %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_end17:
	.size	__hip_module_ctor, .Lfunc_end17-__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	.LBB18_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
.LBB18_2:
	retq
.Lfunc_end18:
	.size	__hip_module_dtor, .Lfunc_end18-__hip_module_dtor
	.cfi_endproc
                                        # -- End function
	.type	Nx,@object                      # @Nx
	.bss
	.globl	Nx
	.p2align	2, 0x0
Nx:
	.long	0                               # 0x0
	.size	Nx, 4

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

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

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

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

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

	.type	.L.str.2,@object                # @.str.2
.L.str.2:
	.asciz	"%d "
	.size	.L.str.2, 4

	.type	.L.str.4,@object                # @.str.4
.L.str.4:
	.asciz	"%s = \n"
	.size	.L.str.4, 7

	.type	.L.str.6,@object                # @.str.6
.L.str.6:
	.asciz	"%.2f "
	.size	.L.str.6, 6

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

	.type	.L.str.8,@object                # @.str.8
.L.str.8:
	.asciz	"||%s|| = %.8f\n"
	.size	.L.str.8, 15

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

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

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

	.type	.L.str.9,@object                # @.str.9
	.section	.rodata.str1.1,"aMS",@progbits,1
.L.str.9:
	.asciz	"Error: %s:%d, "
	.size	.L.str.9, 15

	.type	.L.str.10,@object               # @.str.10
.L.str.10:
	.asciz	"/home/ubuntu/Datasets/stackv2/train-structured-repos-hip-sm89/Klump3n/compphysthree/master/ue3/aufg2/src/laplaceGPU.hip"
	.size	.L.str.10, 120

	.type	.L.str.11,@object               # @.str.11
.L.str.11:
	.asciz	"code: %d, reason: %s\n"
	.size	.L.str.11, 22

	.type	.L.str.12,@object               # @.str.12
.L.str.12:
	.asciz	"%lf, %lf, %lf,\n"
	.size	.L.str.12, 16

	.type	.L.str.13,@object               # @.str.13
.L.str.13:
	.asciz	"%s Starting...\n"
	.size	.L.str.13, 16

	.type	.L.str.14,@object               # @.str.14
.L.str.14:
	.asciz	"../scripts/factorizations"
	.size	.L.str.14, 26

	.type	.L.str.15,@object               # @.str.15
.L.str.15:
	.asciz	"r"
	.size	.L.str.15, 2

	.type	.L.str.16,@object               # @.str.16
.L.str.16:
	.asciz	"%d, %d, %d, %d, %d,\n"
	.size	.L.str.16, 21

	.type	.L.str.17,@object               # @.str.17
.L.str.17:
	.asciz	"../scripts/laplace_speedup_results"
	.size	.L.str.17, 35

	.type	.L.str.18,@object               # @.str.18
.L.str.18:
	.asciz	"w"
	.size	.L.str.18, 2

	.type	.L.str.19,@object               # @.str.19
.L.str.19:
	.asciz	"../scripts/vector_scale_speedup_results"
	.size	.L.str.19, 40

	.type	.L.str.20,@object               # @.str.20
.L.str.20:
	.asciz	"../scripts/vector_add_speedup_results"
	.size	.L.str.20, 38

	.type	.L.str.21,@object               # @.str.21
.L.str.21:
	.asciz	"t_GPU, t_CPU, t_CPU/t_GPU,\n"
	.size	.L.str.21, 28

	.type	.L.str.22,@object               # @.str.22
.L.str.22:
	.asciz	"%d/%d\r"
	.size	.L.str.22, 7

	.type	.L__unnamed_1,@object           # @0
.L__unnamed_1:
	.asciz	"_Z13laplace2d_GPUPfS_i"
	.size	.L__unnamed_1, 23

	.type	.L__unnamed_2,@object           # @1
.L__unnamed_2:
	.asciz	"_Z19vector_addition_GPUPfS_S_"
	.size	.L__unnamed_2, 30

	.type	.L__unnamed_3,@object           # @2
.L__unnamed_3:
	.asciz	"_Z16scale_vector_GPUfPfS_"
	.size	.L__unnamed_3, 26

	.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

	.type	.Lstr,@object                   # @str
	.section	.rodata.str1.1,"aMS",@progbits,1
.Lstr:
	.asciz	"active points:"
	.size	.Lstr, 15

	.type	.Lstr.1,@object                 # @str.1
.Lstr.1:
	.asciz	"  ..."
	.size	.Lstr.1, 6

	.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 _Z28__device_stub__laplace2d_GPUPfS_i
	.addrsig_sym _Z34__device_stub__vector_addition_GPUPfS_S_
	.addrsig_sym _Z31__device_stub__scale_vector_GPUfPfS_
	.addrsig_sym __hip_module_ctor
	.addrsig_sym __hip_module_dtor
	.addrsig_sym _Z13laplace2d_GPUPfS_i
	.addrsig_sym _Z19vector_addition_GPUPfS_S_
	.addrsig_sym _Z16scale_vector_GPUfPfS_
	.addrsig_sym __hip_fatbin
	.addrsig_sym __hip_fatbin_wrapper
	.addrsig_sym __hip_cuid_

	.text
	.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
	.protected	_Z13laplace2d_GPUPfS_i  ; -- Begin function _Z13laplace2d_GPUPfS_i
	.globl	_Z13laplace2d_GPUPfS_i
	.p2align	8
	.type	_Z13laplace2d_GPUPfS_i,@function
_Z13laplace2d_GPUPfS_i:                 ; @_Z13laplace2d_GPUPfS_i
; %bb.0:
	s_clause 0x2
	s_load_b32 s4, s[0:1], 0x10
	s_load_b32 s2, s[0:1], 0x18
	s_load_b32 s3, s[0:1], 0x24
	s_waitcnt lgkmcnt(0)
	s_ashr_i32 s5, s4, 31
	s_mul_i32 s2, s2, s15
	s_add_i32 s6, s4, s5
	s_lshr_b32 s7, s3, 16
	s_xor_b32 s6, s6, s5
	s_add_i32 s2, s2, s14
	v_cvt_f32_u32_e32 v1, s6
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(VALU_DEP_1)
	v_rcp_iflag_f32_e32 v4, v1
	v_bfe_u32 v1, v0, 10, 10
	v_mad_u64_u32 v[2:3], null, s2, s7, v[1:2]
	v_and_b32_e32 v3, 0x3ff, v0
	s_and_b32 s2, s3, 0xffff
	s_waitcnt_depctr 0xfff
	v_mul_f32_e32 v1, 0x4f7ffffe, v4
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_cvt_u32_f32_e32 v4, v1
	v_mad_u64_u32 v[0:1], null, v2, s2, v[3:4]
	s_sub_i32 s2, 0, s6
	s_delay_alu instid0(SALU_CYCLE_1) | instskip(SKIP_1) | instid1(VALU_DEP_2)
	v_mul_lo_u32 v2, s2, v4
	s_add_i32 s2, s4, -1
	v_ashrrev_i32_e32 v1, 31, v0
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_mul_hi_u32 v2, v4, v2
	v_add_nc_u32_e32 v3, v0, v1
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_3)
	v_xor_b32_e32 v3, v3, v1
	v_add_nc_u32_e32 v2, v4, v2
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_mul_hi_u32 v2, v3, v2
	v_mul_lo_u32 v4, v2, s6
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_sub_nc_u32_e32 v3, v3, v4
	v_subrev_nc_u32_e32 v5, s6, v3
	v_cmp_le_u32_e32 vcc_lo, s6, v3
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_dual_cndmask_b32 v3, v3, v5 :: v_dual_add_nc_u32 v4, 1, v2
	v_cndmask_b32_e32 v2, v2, v4, vcc_lo
	v_xor_b32_e32 v5, s5, v1
	s_delay_alu instid0(VALU_DEP_3) | instskip(NEXT) | instid1(VALU_DEP_3)
	v_cmp_le_u32_e32 vcc_lo, s6, v3
	v_add_nc_u32_e32 v4, 1, v2
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_cndmask_b32_e32 v2, v2, v4, vcc_lo
	v_xor_b32_e32 v2, v2, v5
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_sub_nc_u32_e32 v2, v2, v5
	v_mul_lo_u32 v3, v2, s4
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_sub_nc_u32_e32 v3, v0, v3
	v_max_i32_e32 v4, v3, v2
	v_min_i32_e32 v2, v2, v3
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_cmp_gt_i32_e32 vcc_lo, s2, v4
	v_cmp_lt_i32_e64 s2, 0, v2
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(SALU_CYCLE_1)
	s_and_b32 s2, s2, vcc_lo
	s_and_saveexec_b32 s3, s2
	s_cbranch_execz .LBB0_2
; %bb.1:
	s_load_b128 s[0:3], s[0:1], 0x0
	v_lshlrev_b64 v[4:5], 2, v[0:1]
	v_subrev_nc_u32_e32 v8, s4, v0
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_ashrrev_i32_e32 v9, 31, v8
	v_lshlrev_b64 v[8:9], 2, v[8:9]
	s_waitcnt lgkmcnt(0)
	s_delay_alu instid0(VALU_DEP_4) | instskip(SKIP_1) | instid1(VALU_DEP_3)
	v_add_co_u32 v6, vcc_lo, s2, v4
	v_add_co_ci_u32_e32 v7, vcc_lo, s3, v5, vcc_lo
	v_add_co_u32 v8, vcc_lo, s2, v8
	s_delay_alu instid0(VALU_DEP_4)
	v_add_co_ci_u32_e32 v9, vcc_lo, s3, v9, vcc_lo
	global_load_b96 v[1:3], v[6:7], off offset:-4
	s_lshl_b64 s[2:3], s[4:5], 2
	global_load_b32 v8, v[8:9], off
	v_add_co_u32 v6, vcc_lo, v6, s2
	v_add_co_ci_u32_e32 v7, vcc_lo, s3, v7, vcc_lo
	global_load_b32 v9, v[6:7], off
	s_waitcnt vmcnt(2)
	v_cvt_f64_f32_e32 v[6:7], v2
	v_cvt_f64_f32_e32 v[0:1], v1
	v_cvt_f64_f32_e32 v[2:3], v3
	s_delay_alu instid0(VALU_DEP_2) | instskip(SKIP_2) | instid1(VALU_DEP_2)
	v_fma_f64 v[0:1], v[6:7], -4.0, v[0:1]
	s_waitcnt vmcnt(1)
	v_cvt_f64_f32_e32 v[6:7], v8
	v_add_f64 v[0:1], v[0:1], v[2:3]
	s_waitcnt vmcnt(0)
	v_cvt_f64_f32_e32 v[2:3], v9
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_add_f64 v[0:1], v[0:1], v[6:7]
	v_add_f64 v[0:1], v[0:1], v[2:3]
	s_delay_alu instid0(VALU_DEP_1)
	v_cvt_f32_f64_e32 v2, v[0:1]
	v_add_co_u32 v0, vcc_lo, s0, v4
	v_add_co_ci_u32_e32 v1, vcc_lo, s1, v5, vcc_lo
	global_store_b32 v[0:1], v2, off
.LBB0_2:
	s_nop 0
	s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
	s_endpgm
	.section	.rodata,"a",@progbits
	.p2align	6, 0x0
	.amdhsa_kernel _Z13laplace2d_GPUPfS_i
		.amdhsa_group_segment_fixed_size 0
		.amdhsa_private_segment_fixed_size 0
		.amdhsa_kernarg_size 280
		.amdhsa_user_sgpr_count 14
		.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 1
		.amdhsa_system_sgpr_workgroup_id_z 0
		.amdhsa_system_sgpr_workgroup_info 0
		.amdhsa_system_vgpr_workitem_id 1
		.amdhsa_next_free_vgpr 10
		.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	_Z13laplace2d_GPUPfS_i, .Lfunc_end0-_Z13laplace2d_GPUPfS_i
                                        ; -- End function
	.section	.AMDGPU.csdata,"",@progbits
; Kernel info:
; codeLenInByte = 548
; NumSgprs: 18
; NumVgprs: 10
; ScratchSize: 0
; MemoryBound: 0
; FloatMode: 240
; IeeeMode: 1
; LDSByteSize: 0 bytes/workgroup (compile time only)
; SGPRBlocks: 2
; VGPRBlocks: 1
; NumSGPRsForWavesPerEU: 18
; NumVGPRsForWavesPerEU: 10
; Occupancy: 16
; WaveLimiterHint : 0
; COMPUTE_PGM_RSRC2:SCRATCH_EN: 0
; COMPUTE_PGM_RSRC2:USER_SGPR: 14
; COMPUTE_PGM_RSRC2:TRAP_HANDLER: 0
; COMPUTE_PGM_RSRC2:TGID_X_EN: 1
; COMPUTE_PGM_RSRC2:TGID_Y_EN: 1
; COMPUTE_PGM_RSRC2:TGID_Z_EN: 0
; COMPUTE_PGM_RSRC2:TIDIG_COMP_CNT: 1
	.text
	.protected	_Z19vector_addition_GPUPfS_S_ ; -- Begin function _Z19vector_addition_GPUPfS_S_
	.globl	_Z19vector_addition_GPUPfS_S_
	.p2align	8
	.type	_Z19vector_addition_GPUPfS_S_,@function
_Z19vector_addition_GPUPfS_S_:          ; @_Z19vector_addition_GPUPfS_S_
; %bb.0:
	s_clause 0x1
	s_load_b32 s2, s[0:1], 0x18
	s_load_b32 s3, s[0:1], 0x24
	v_bfe_u32 v1, v0, 10, 10
	v_and_b32_e32 v0, 0x3ff, v0
	s_waitcnt lgkmcnt(0)
	s_mul_i32 s2, s2, s15
	s_lshr_b32 s4, s3, 16
	s_add_i32 s2, s2, s14
	s_delay_alu instid0(SALU_CYCLE_1) | instskip(SKIP_4) | instid1(VALU_DEP_1)
	v_mad_u64_u32 v[2:3], null, s2, s4, v[1:2]
	s_and_b32 s2, s3, 0xffff
	s_clause 0x1
	s_load_b128 s[4:7], s[0:1], 0x0
	s_load_b64 s[0:1], s[0:1], 0x10
	v_mad_u64_u32 v[3:4], null, v2, s2, v[0:1]
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_ashrrev_i32_e32 v4, 31, v3
	v_lshlrev_b64 v[0:1], 2, v[3:4]
	s_waitcnt lgkmcnt(0)
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_add_co_u32 v2, vcc_lo, s4, v0
	v_add_co_ci_u32_e32 v3, vcc_lo, s5, v1, vcc_lo
	v_add_co_u32 v4, vcc_lo, s6, v0
	v_add_co_ci_u32_e32 v5, vcc_lo, s7, v1, vcc_lo
	v_add_co_u32 v0, vcc_lo, s0, v0
	global_load_b32 v2, v[2:3], off
	global_load_b32 v3, v[4:5], off
	v_add_co_ci_u32_e32 v1, vcc_lo, s1, v1, vcc_lo
	s_waitcnt vmcnt(0)
	v_add_f32_e32 v2, v2, v3
	global_store_b32 v[0:1], v2, off
	s_nop 0
	s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
	s_endpgm
	.section	.rodata,"a",@progbits
	.p2align	6, 0x0
	.amdhsa_kernel _Z19vector_addition_GPUPfS_S_
		.amdhsa_group_segment_fixed_size 0
		.amdhsa_private_segment_fixed_size 0
		.amdhsa_kernarg_size 280
		.amdhsa_user_sgpr_count 14
		.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 1
		.amdhsa_system_sgpr_workgroup_id_z 0
		.amdhsa_system_sgpr_workgroup_info 0
		.amdhsa_system_vgpr_workitem_id 1
		.amdhsa_next_free_vgpr 6
		.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	_Z19vector_addition_GPUPfS_S_, .Lfunc_end1-_Z19vector_addition_GPUPfS_S_
                                        ; -- End function
	.section	.AMDGPU.csdata,"",@progbits
; Kernel info:
; codeLenInByte = 204
; NumSgprs: 18
; NumVgprs: 6
; ScratchSize: 0
; MemoryBound: 0
; FloatMode: 240
; IeeeMode: 1
; LDSByteSize: 0 bytes/workgroup (compile time only)
; SGPRBlocks: 2
; VGPRBlocks: 0
; NumSGPRsForWavesPerEU: 18
; NumVGPRsForWavesPerEU: 6
; Occupancy: 16
; WaveLimiterHint : 0
; COMPUTE_PGM_RSRC2:SCRATCH_EN: 0
; COMPUTE_PGM_RSRC2:USER_SGPR: 14
; COMPUTE_PGM_RSRC2:TRAP_HANDLER: 0
; COMPUTE_PGM_RSRC2:TGID_X_EN: 1
; COMPUTE_PGM_RSRC2:TGID_Y_EN: 1
; COMPUTE_PGM_RSRC2:TGID_Z_EN: 0
; COMPUTE_PGM_RSRC2:TIDIG_COMP_CNT: 1
	.text
	.protected	_Z16scale_vector_GPUfPfS_ ; -- Begin function _Z16scale_vector_GPUfPfS_
	.globl	_Z16scale_vector_GPUfPfS_
	.p2align	8
	.type	_Z16scale_vector_GPUfPfS_,@function
_Z16scale_vector_GPUfPfS_:              ; @_Z16scale_vector_GPUfPfS_
; %bb.0:
	s_clause 0x1
	s_load_b32 s2, s[0:1], 0x18
	s_load_b32 s3, s[0:1], 0x24
	v_bfe_u32 v1, v0, 10, 10
	v_and_b32_e32 v0, 0x3ff, v0
	s_waitcnt lgkmcnt(0)
	s_mul_i32 s2, s2, s15
	s_lshr_b32 s4, s3, 16
	s_add_i32 s2, s2, s14
	s_delay_alu instid0(SALU_CYCLE_1) | instskip(SKIP_4) | instid1(VALU_DEP_1)
	v_mad_u64_u32 v[2:3], null, s2, s4, v[1:2]
	s_and_b32 s2, s3, 0xffff
	s_clause 0x1
	s_load_b128 s[4:7], s[0:1], 0x8
	s_load_b32 s0, s[0:1], 0x0
	v_mad_u64_u32 v[3:4], null, v2, s2, v[0:1]
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_ashrrev_i32_e32 v4, 31, v3
	v_lshlrev_b64 v[0:1], 2, v[3:4]
	s_waitcnt lgkmcnt(0)
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_add_co_u32 v2, vcc_lo, s4, v0
	v_add_co_ci_u32_e32 v3, vcc_lo, s5, v1, vcc_lo
	v_add_co_u32 v0, vcc_lo, s6, v0
	v_add_co_ci_u32_e32 v1, vcc_lo, s7, v1, vcc_lo
	global_load_b32 v2, v[2:3], off
	s_waitcnt vmcnt(0)
	v_mul_f32_e32 v2, s0, v2
	global_store_b32 v[0:1], v2, off
	s_nop 0
	s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
	s_endpgm
	.section	.rodata,"a",@progbits
	.p2align	6, 0x0
	.amdhsa_kernel _Z16scale_vector_GPUfPfS_
		.amdhsa_group_segment_fixed_size 0
		.amdhsa_private_segment_fixed_size 0
		.amdhsa_kernarg_size 280
		.amdhsa_user_sgpr_count 14
		.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 1
		.amdhsa_system_sgpr_workgroup_id_z 0
		.amdhsa_system_sgpr_workgroup_info 0
		.amdhsa_system_vgpr_workitem_id 1
		.amdhsa_next_free_vgpr 5
		.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_end2:
	.size	_Z16scale_vector_GPUfPfS_, .Lfunc_end2-_Z16scale_vector_GPUfPfS_
                                        ; -- End function
	.section	.AMDGPU.csdata,"",@progbits
; Kernel info:
; codeLenInByte = 184
; NumSgprs: 18
; NumVgprs: 5
; ScratchSize: 0
; MemoryBound: 0
; FloatMode: 240
; IeeeMode: 1
; LDSByteSize: 0 bytes/workgroup (compile time only)
; SGPRBlocks: 2
; VGPRBlocks: 0
; NumSGPRsForWavesPerEU: 18
; NumVGPRsForWavesPerEU: 5
; Occupancy: 16
; WaveLimiterHint : 0
; COMPUTE_PGM_RSRC2:SCRATCH_EN: 0
; COMPUTE_PGM_RSRC2:USER_SGPR: 14
; COMPUTE_PGM_RSRC2:TRAP_HANDLER: 0
; COMPUTE_PGM_RSRC2:TGID_X_EN: 1
; COMPUTE_PGM_RSRC2:TGID_Y_EN: 1
; COMPUTE_PGM_RSRC2:TGID_Z_EN: 0
; COMPUTE_PGM_RSRC2:TIDIG_COMP_CNT: 1
	.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
      - .offset:         16
        .size:           4
        .value_kind:     by_value
      - .offset:         24
        .size:           4
        .value_kind:     hidden_block_count_x
      - .offset:         28
        .size:           4
        .value_kind:     hidden_block_count_y
      - .offset:         32
        .size:           4
        .value_kind:     hidden_block_count_z
      - .offset:         36
        .size:           2
        .value_kind:     hidden_group_size_x
      - .offset:         38
        .size:           2
        .value_kind:     hidden_group_size_y
      - .offset:         40
        .size:           2
        .value_kind:     hidden_group_size_z
      - .offset:         42
        .size:           2
        .value_kind:     hidden_remainder_x
      - .offset:         44
        .size:           2
        .value_kind:     hidden_remainder_y
      - .offset:         46
        .size:           2
        .value_kind:     hidden_remainder_z
      - .offset:         64
        .size:           8
        .value_kind:     hidden_global_offset_x
      - .offset:         72
        .size:           8
        .value_kind:     hidden_global_offset_y
      - .offset:         80
        .size:           8
        .value_kind:     hidden_global_offset_z
      - .offset:         88
        .size:           2
        .value_kind:     hidden_grid_dims
    .group_segment_fixed_size: 0
    .kernarg_segment_align: 8
    .kernarg_segment_size: 280
    .language:       OpenCL C
    .language_version:
      - 2
      - 0
    .max_flat_workgroup_size: 1024
    .name:           _Z13laplace2d_GPUPfS_i
    .private_segment_fixed_size: 0
    .sgpr_count:     18
    .sgpr_spill_count: 0
    .symbol:         _Z13laplace2d_GPUPfS_i.kd
    .uniform_work_group_size: 1
    .uses_dynamic_stack: false
    .vgpr_count:     10
    .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:     hidden_block_count_x
      - .offset:         28
        .size:           4
        .value_kind:     hidden_block_count_y
      - .offset:         32
        .size:           4
        .value_kind:     hidden_block_count_z
      - .offset:         36
        .size:           2
        .value_kind:     hidden_group_size_x
      - .offset:         38
        .size:           2
        .value_kind:     hidden_group_size_y
      - .offset:         40
        .size:           2
        .value_kind:     hidden_group_size_z
      - .offset:         42
        .size:           2
        .value_kind:     hidden_remainder_x
      - .offset:         44
        .size:           2
        .value_kind:     hidden_remainder_y
      - .offset:         46
        .size:           2
        .value_kind:     hidden_remainder_z
      - .offset:         64
        .size:           8
        .value_kind:     hidden_global_offset_x
      - .offset:         72
        .size:           8
        .value_kind:     hidden_global_offset_y
      - .offset:         80
        .size:           8
        .value_kind:     hidden_global_offset_z
      - .offset:         88
        .size:           2
        .value_kind:     hidden_grid_dims
    .group_segment_fixed_size: 0
    .kernarg_segment_align: 8
    .kernarg_segment_size: 280
    .language:       OpenCL C
    .language_version:
      - 2
      - 0
    .max_flat_workgroup_size: 1024
    .name:           _Z19vector_addition_GPUPfS_S_
    .private_segment_fixed_size: 0
    .sgpr_count:     18
    .sgpr_spill_count: 0
    .symbol:         _Z19vector_addition_GPUPfS_S_.kd
    .uniform_work_group_size: 1
    .uses_dynamic_stack: false
    .vgpr_count:     6
    .vgpr_spill_count: 0
    .wavefront_size: 32
    .workgroup_processor_mode: 1
  - .args:
      - .offset:         0
        .size:           4
        .value_kind:     by_value
      - .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:     hidden_block_count_x
      - .offset:         28
        .size:           4
        .value_kind:     hidden_block_count_y
      - .offset:         32
        .size:           4
        .value_kind:     hidden_block_count_z
      - .offset:         36
        .size:           2
        .value_kind:     hidden_group_size_x
      - .offset:         38
        .size:           2
        .value_kind:     hidden_group_size_y
      - .offset:         40
        .size:           2
        .value_kind:     hidden_group_size_z
      - .offset:         42
        .size:           2
        .value_kind:     hidden_remainder_x
      - .offset:         44
        .size:           2
        .value_kind:     hidden_remainder_y
      - .offset:         46
        .size:           2
        .value_kind:     hidden_remainder_z
      - .offset:         64
        .size:           8
        .value_kind:     hidden_global_offset_x
      - .offset:         72
        .size:           8
        .value_kind:     hidden_global_offset_y
      - .offset:         80
        .size:           8
        .value_kind:     hidden_global_offset_z
      - .offset:         88
        .size:           2
        .value_kind:     hidden_grid_dims
    .group_segment_fixed_size: 0
    .kernarg_segment_align: 8
    .kernarg_segment_size: 280
    .language:       OpenCL C
    .language_version:
      - 2
      - 0
    .max_flat_workgroup_size: 1024
    .name:           _Z16scale_vector_GPUfPfS_
    .private_segment_fixed_size: 0
    .sgpr_count:     18
    .sgpr_spill_count: 0
    .symbol:         _Z16scale_vector_GPUfPfS_.kd
    .uniform_work_group_size: 1
    .uses_dynamic_stack: false
    .vgpr_count:     5
    .vgpr_spill_count: 0
    .wavefront_size: 32
    .workgroup_processor_mode: 1
amdhsa.target:   amdgcn-amd-amdhsa--gfx1100
amdhsa.version:
  - 1
  - 2
...

	.end_amdgpu_metadata
