#include <stdio.h>
#include <stdlib.h>

#include <cufft.h>

#define BSZ  32

__global__ void real2complex(float *f, cufftComplex *fc, int N){
  int i = threadIdx.x + blockIdx.x*blockDim.x;
  int j = threadIdx.y + blockIdx.y*blockDim.y;
  int index = j*N+i;

  if (i<N && j<N){

    fc[index].x = f[index];
    fc[index].y = 0.0f;
  }
}

__global__ void complex2real(cufftComplex *fc, float *f, int N){
  int i = threadIdx.x + blockIdx.x*BSZ;
  int j = threadIdx.y + blockIdx.y*BSZ;
  int index = j*N+i;
  if (i<N && j<N){
    f[index] = fc[index].x/((float)N*(float)N);
  }
}

int main(int argc, char *argv[]) {

  cudaEvent_t start, stop;
  cudaEventCreate(&start);
  cudaEventCreate(&stop);

  int N = 1024;
  float xmax = 1.0f;
  float xmin = 0.0f;
  float ymin = 0.0f;
  float h = (xmax-xmin)/((float)N);
  float s = 0.1f;
  float s2 = s*s;
  float milliseconds;

  float *x = new float[N*N];
  float *y = new float[N*N];
  float *u = new float[N*N];
  float *f = new float[N*N];
  float *u_a = new float[N*N];
  float *err = new float[N*N];

  float r2;
  for(int j=0; j<N; j++){
    for(int i=0; i<N; i++){
      x[N*j+i] = xmin + i*h;
      y[N*j+i] = ymin + j*h;

      r2 = (x[N*j+i]-0.5)*(x[N*j+i]-0.5) + (y[N*j+i]-0.5)*(y[N*j+i]-0.5);
      f[N*j+i] = (r2-2*s2)/(r2*s2)*exp(-r2/(2*s2));
      u_a[N*j+i] = exp(-r2/(2*s2));
    }
  }

  float *k = new float[N];
  for (int i=0; i<=N/2; i++){
    k[i] = i * 2*M_PI;
  }
  for (int i=N/2+1; i<N; i++){
    k[i] = (i-N)* 2*M_PI;
  }

  float *k_d, *f_d, *u_d;
  cudaMalloc ((void**)&k_d, sizeof(float)*N);
  cudaMalloc ((void**)&f_d, sizeof(float)*N*N);
  cudaMalloc ((void**)&u_d, sizeof(float)*N*N);

  cudaEventRecord(start);
  cudaMemcpy(k_d, k, sizeof(float)*N, cudaMemcpyHostToDevice);
  cudaMemcpy(f_d, f, sizeof(float)*N*N, cudaMemcpyHostToDevice);

  cufftComplex *ft_d, *f_dc, *ft_d_k, *u_dc;
  cudaMalloc ((void**)&ft_d, sizeof(cufftComplex)*N*N);
  cudaMalloc ((void**)&ft_d_k, sizeof(cufftComplex)*N*N);
  cudaMalloc ((void**)&f_dc, sizeof(cufftComplex)*N*N);
  cudaMalloc ((void**)&u_dc, sizeof(cufftComplex)*N*N);

  dim3 dimGrid (int(  (N-0.5)/BSZ )+1, int(  (N-0.5)/BSZ )+1,1  );
  dim3 dimBlock (BSZ, BSZ,1);
  real2complex<<<dimGrid, dimBlock>>>(f_d, f_dc, N);

  cufftHandle plan;
  cufftPlan2d(&plan, N, N, CUFFT_C2C);

  cufftExecC2C(plan, f_dc, ft_d, CUFFT_FORWARD);
  complex2real<<<dimGrid, dimBlock>>>(u_dc, u_d, N);

  cudaMemcpy(u, u_d, sizeof(float)*N*N, cudaMemcpyDeviceToHost);

  cudaEventRecord(stop);

  cudaEventSynchronize(stop);
  milliseconds = 0;
  cudaEventElapsedTime(&milliseconds, start, stop);
  printf("fft+criacao_plano: %0.3fms\n",milliseconds);

  cudaEventCreate(&start);
  cudaEventCreate(&stop);


   N = 256;
   xmax = 1.0f;
   xmin = 0.0f;
   ymin = 0.0f;
   h = (xmax-xmin)/((float)N);
   s = 0.1f;
   s2 = s*s;

   x = new float[N*N];
   y = new float[N*N];
   u = new float[N*N];
   f = new float[N*N];
   u_a = new float[N*N];
   err = new float[N*N];


  for(int j=0; j<N; j++){
    for(int i=0; i<N; i++){
      x[N*j+i] = xmin + i*h;
      y[N*j+i] = ymin + j*h;

      r2 = (x[N*j+i]-0.5)*(x[N*j+i]-0.5) + (y[N*j+i]-0.5)*(y[N*j+i]-0.5);
      f[N*j+i] = (r2-2*s2)/(r2*s2)*exp(-r2/(2*s2));
      u_a[N*j+i] = exp(-r2/(2*s2));
    }
  }

   k = new float[N];
  for (int i=0; i<=N/2; i++){
    k[i] = i * 2*M_PI;
  }
  for (int i=N/2+1; i<N; i++){
    k[i] = (i-N)* 2*M_PI;
  }

  cudaMalloc ((void**)&k_d, sizeof(float)*N);
  cudaMalloc ((void**)&f_d, sizeof(float)*N*N);
  cudaMalloc ((void**)&u_d, sizeof(float)*N*N);

  cudaEventRecord(start);
  cudaMemcpy(k_d, k, sizeof(float)*N, cudaMemcpyHostToDevice);
  cudaMemcpy(f_d, f, sizeof(float)*N*N, cudaMemcpyHostToDevice);

  cudaMalloc ((void**)&ft_d, sizeof(cufftComplex)*N*N);
  cudaMalloc ((void**)&ft_d_k, sizeof(cufftComplex)*N*N);
  cudaMalloc ((void**)&f_dc, sizeof(cufftComplex)*N*N);
  cudaMalloc ((void**)&u_dc, sizeof(cufftComplex)*N*N);

  dim3 dimGrid2 (int(  (N-0.5)/BSZ )+1, int(  (N-0.5)/BSZ )+1,1  );
  dim3 dimBlock2 (BSZ, BSZ,1);
  real2complex<<<dimGrid2, dimBlock2>>>(f_d, f_dc, N);

  cufftPlan2d(&plan, N, N, CUFFT_C2C);
  cufftExecC2C(plan, f_dc, ft_d, CUFFT_FORWARD);
  complex2real<<<dimGrid, dimBlock>>>(u_dc, u_d, N);

  cudaMemcpy(u, u_d, sizeof(float)*N*N, cudaMemcpyDeviceToHost);

  cudaEventRecord(stop);

  cudaEventSynchronize(stop);
  milliseconds = 0;
  cudaEventElapsedTime(&milliseconds, start, stop);
  printf("tempo 256x256: %0.3fms\n",milliseconds);

  cudaEventCreate(&start);
  cudaEventCreate(&stop);


  N = 512;
  xmax = 1.0f;
  xmin = 0.0f;
  ymin = 0.0f;
  h = (xmax-xmin)/((float)N);
  s = 0.1f;
  s2 = s*s;

  x = new float[N*N];
  y = new float[N*N];
  u = new float[N*N];
  f = new float[N*N];
  u_a = new float[N*N];
  err = new float[N*N];


  for(int j=0; j<N; j++){
    for(int i=0; i<N; i++){
      x[N*j+i] = xmin + i*h;
      y[N*j+i] = ymin + j*h;

      r2 = (x[N*j+i]-0.5)*(x[N*j+i]-0.5) + (y[N*j+i]-0.5)*(y[N*j+i]-0.5);
      f[N*j+i] = (r2-2*s2)/(r2*s2)*exp(-r2/(2*s2));
      u_a[N*j+i] = exp(-r2/(2*s2));
    }
  }

  k = new float[N];
  for (int i=0; i<=N/2; i++){
    k[i] = i * 2*M_PI;
  }
  for (int i=N/2+1; i<N; i++){
    k[i] = (i-N)* 2*M_PI;
  }

  cudaMalloc ((void**)&k_d, sizeof(float)*N);
  cudaMalloc ((void**)&f_d, sizeof(float)*N*N);
  cudaMalloc ((void**)&u_d, sizeof(float)*N*N);

  cudaEventRecord(start);
  cudaMemcpy(k_d, k, sizeof(float)*N, cudaMemcpyHostToDevice);
  cudaMemcpy(f_d, f, sizeof(float)*N*N, cudaMemcpyHostToDevice);

  cudaMalloc ((void**)&ft_d, sizeof(cufftComplex)*N*N);
  cudaMalloc ((void**)&ft_d_k, sizeof(cufftComplex)*N*N);
  cudaMalloc ((void**)&f_dc, sizeof(cufftComplex)*N*N);
  cudaMalloc ((void**)&u_dc, sizeof(cufftComplex)*N*N);

  dim3 dimGrid3 (int(  (N-0.5)/BSZ )+1, int(  (N-0.5)/BSZ )+1,1  );
  dim3 dimBlock3 (BSZ, BSZ,1);
  real2complex<<<dimGrid3, dimBlock3>>>(f_d, f_dc, N);

  cufftPlan2d(&plan, N, N, CUFFT_C2C);
  cufftExecC2C(plan, f_dc, ft_d, CUFFT_FORWARD);
  complex2real<<<dimGrid, dimBlock>>>(u_dc, u_d, N);

  cudaMemcpy(u, u_d, sizeof(float)*N*N, cudaMemcpyDeviceToHost);

  cudaEventRecord(stop);

  cudaEventSynchronize(stop);
  milliseconds = 0;
  cudaEventElapsedTime(&milliseconds, start, stop);
  printf("tempo 512x512: %0.3fms\n",milliseconds);

  cudaEventCreate(&start);
  cudaEventCreate(&stop);

  N = 1024;
  xmax = 1.0f;
  xmin = 0.0f;
  ymin = 0.0f;
  h = (xmax-xmin)/((float)N);
  s = 0.1f;
  s2 = s*s;

  x = new float[N*N];
  y = new float[N*N];
  u = new float[N*N];
  f = new float[N*N];
  u_a = new float[N*N];
  err = new float[N*N];


  for(int j=0; j<N; j++){
    for(int i=0; i<N; i++){
      x[N*j+i] = xmin + i*h;
      y[N*j+i] = ymin + j*h;

      r2 = (x[N*j+i]-0.5)*(x[N*j+i]-0.5) + (y[N*j+i]-0.5)*(y[N*j+i]-0.5);
      f[N*j+i] = (r2-2*s2)/(r2*s2)*exp(-r2/(2*s2));
      u_a[N*j+i] = exp(-r2/(2*s2));
    }
  }

  k = new float[N];
  for (int i=0; i<=N/2; i++){
    k[i] = i * 2*M_PI;
  }
  for (int i=N/2+1; i<N; i++){
    k[i] = (i-N)* 2*M_PI;
  }

  cudaMalloc ((void**)&k_d, sizeof(float)*N);
  cudaMalloc ((void**)&f_d, sizeof(float)*N*N);
  cudaMalloc ((void**)&u_d, sizeof(float)*N*N);

  cudaEventRecord(start);
  cudaMemcpy(k_d, k, sizeof(float)*N, cudaMemcpyHostToDevice);
  cudaMemcpy(f_d, f, sizeof(float)*N*N, cudaMemcpyHostToDevice);

  cudaMalloc ((void**)&ft_d, sizeof(cufftComplex)*N*N);
  cudaMalloc ((void**)&ft_d_k, sizeof(cufftComplex)*N*N);
  cudaMalloc ((void**)&f_dc, sizeof(cufftComplex)*N*N);
  cudaMalloc ((void**)&u_dc, sizeof(cufftComplex)*N*N);

  dim3 dimGrid4 (int(  (N-0.5)/BSZ )+1, int(  (N-0.5)/BSZ )+1,1  );
  dim3 dimBlock4 (BSZ, BSZ,1);
  real2complex<<<dimGrid4, dimBlock4>>>(f_d, f_dc, N);

  cufftPlan2d(&plan, N, N, CUFFT_C2C);
  cufftExecC2C(plan, f_dc, ft_d, CUFFT_FORWARD);
  complex2real<<<dimGrid, dimBlock>>>(u_dc, u_d, N);

  cudaMemcpy(u, u_d, sizeof(float)*N*N, cudaMemcpyDeviceToHost);

  cudaEventRecord(stop);

  cudaEventSynchronize(stop);
  milliseconds = 0;
  cudaEventElapsedTime(&milliseconds, start, stop);
  printf("tempo 1024x1024: %0.3fms\n",milliseconds);


  return 0;
}

	.file	"tmpxft_002c2073_00000000-6_main.cudafe1.cpp"
	.text
#APP

#NO_APP
	.type	_ZL26__cudaUnregisterBinaryUtilv, @function
_ZL26__cudaUnregisterBinaryUtilv:
.LFB2053:
	.cfi_startproc
	endbr64
	movq	_ZL20__cudaFatCubinHandle(%rip), %rdi
	jmp	__cudaUnregisterFatBinary@PLT
	.cfi_endproc
.LFE2053:
	.size	_ZL26__cudaUnregisterBinaryUtilv, .-_ZL26__cudaUnregisterBinaryUtilv
	.globl	_Z41__device_stub__Z12real2complexPfP6float2iPfP6float2i
	.type	_Z41__device_stub__Z12real2complexPfP6float2iPfP6float2i, @function
_Z41__device_stub__Z12real2complexPfP6float2iPfP6float2i:
.LFB2075:
	.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	.L2
	pushq	40(%rsp)
	.cfi_def_cfa_offset 152
	leaq	_Z12real2complexPfP6float2i(%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
.L2:
	movq	120(%rsp), %rax
	subq	%fs:40, %rax
	je	.L4
	call	__stack_chk_fail@PLT
.L4:
	addq	$136, %rsp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE2075:
	.size	_Z41__device_stub__Z12real2complexPfP6float2iPfP6float2i, .-_Z41__device_stub__Z12real2complexPfP6float2iPfP6float2i
	.globl	_Z12real2complexPfP6float2i
	.type	_Z12real2complexPfP6float2i, @function
_Z12real2complexPfP6float2i:
.LFB2076:
	.cfi_startproc
	endbr64
	jmp	_Z41__device_stub__Z12real2complexPfP6float2iPfP6float2i
	.cfi_endproc
.LFE2076:
	.size	_Z12real2complexPfP6float2i, .-_Z12real2complexPfP6float2i
	.globl	_Z41__device_stub__Z12complex2realP6float2PfiP6float2Pfi
	.type	_Z41__device_stub__Z12complex2realP6float2PfiP6float2Pfi, @function
_Z41__device_stub__Z12complex2realP6float2PfiP6float2Pfi:
.LFB2077:
	.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	.L8
	pushq	40(%rsp)
	.cfi_def_cfa_offset 152
	leaq	_Z12complex2realP6float2Pfi(%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
.L8:
	movq	120(%rsp), %rax
	subq	%fs:40, %rax
	je	.L10
	call	__stack_chk_fail@PLT
.L10:
	addq	$136, %rsp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE2077:
	.size	_Z41__device_stub__Z12complex2realP6float2PfiP6float2Pfi, .-_Z41__device_stub__Z12complex2realP6float2PfiP6float2Pfi
	.globl	_Z12complex2realP6float2Pfi
	.type	_Z12complex2realP6float2Pfi, @function
_Z12complex2realP6float2Pfi:
.LFB2078:
	.cfi_startproc
	endbr64
	jmp	_Z41__device_stub__Z12complex2realP6float2PfiP6float2Pfi
	.cfi_endproc
.LFE2078:
	.size	_Z12complex2realP6float2Pfi, .-_Z12complex2realP6float2Pfi
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC7:
	.string	"fft+criacao_plano: %0.3fms\n"
.LC9:
	.string	"tempo 256x256: %0.3fms\n"
.LC11:
	.string	"tempo 512x512: %0.3fms\n"
.LC12:
	.string	"tempo 1024x1024: %0.3fms\n"
	.section	.text.startup,"ax",@progbits
	.globl	main
	.type	main, @function
main:
.LFB2050:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	xorl	%ebx, %ebx
	subq	$296, %rsp
	.cfi_def_cfa_offset 352
	movq	%fs:40, %rax
	movq	%rax, 280(%rsp)
	xorl	%eax, %eax
	leaq	112(%rsp), %rax
	movq	%rax, %rdi
	movq	%rax, (%rsp)
	call	cudaEventCreate@PLT
	leaq	120(%rsp), %rax
	movq	%rax, %rdi
	movq	%rax, 8(%rsp)
	call	cudaEventCreate@PLT
	movl	$4194304, %edi
	call	_Znam@PLT
	movl	$4194304, %edi
	movq	%rax, %r12
	call	_Znam@PLT
	movl	$4194304, %edi
	movq	%rax, %r13
	call	_Znam@PLT
	movl	$4194304, %edi
	movq	%rax, 32(%rsp)
	call	_Znam@PLT
	movl	$4194304, %edi
	movq	%rax, %rbp
	call	_Znam@PLT
.L14:
	cvtsi2ssl	%ebx, %xmm2
	xorps	%xmm0, %xmm0
	movq	%rbx, %r15
	xorl	%r14d, %r14d
	mulss	.LC0(%rip), %xmm2
	salq	$12, %r15
	addss	%xmm0, %xmm2
	cvtss2sd	%xmm2, %xmm0
	subsd	.LC2(%rip), %xmm0
	mulsd	%xmm0, %xmm0
	movsd	%xmm0, 24(%rsp)
.L15:
	cvtsi2ssl	%r14d, %xmm1
	xorps	%xmm0, %xmm0
	movq	%rax, 56(%rsp)
	incl	%r14d
	mulss	.LC0(%rip), %xmm1
	movss	%xmm2, 0(%r13,%r15)
	movss	%xmm2, 48(%rsp)
	addss	%xmm0, %xmm1
	movss	%xmm1, (%r12,%r15)
	cvtss2sd	%xmm1, %xmm1
	subsd	.LC2(%rip), %xmm1
	mulsd	%xmm1, %xmm1
	addsd	24(%rsp), %xmm1
	cvtsd2ss	%xmm1, %xmm1
	movaps	%xmm1, %xmm0
	movss	%xmm1, 40(%rsp)
	xorps	.LC3(%rip), %xmm0
	divss	.LC4(%rip), %xmm0
	movss	%xmm0, 16(%rsp)
	call	expf@PLT
	movss	40(%rsp), %xmm1
	movaps	%xmm0, %xmm3
	movaps	%xmm1, %xmm0
	subss	.LC4(%rip), %xmm0
	mulss	.LC5(%rip), %xmm1
	divss	%xmm1, %xmm0
	mulss	%xmm3, %xmm0
	movss	%xmm0, 0(%rbp,%r15)
	movss	16(%rsp), %xmm0
	call	expf@PLT
	movq	56(%rsp), %rax
	movss	48(%rsp), %xmm2
	movss	%xmm0, (%rax,%r15)
	addq	$4, %r15
	cmpl	$1024, %r14d
	jne	.L15
	incq	%rbx
	cmpq	$1024, %rbx
	jne	.L14
	movl	$4096, %edi
	call	_Znam@PLT
	movq	%rax, %r12
	xorl	%eax, %eax
.L17:
	leal	(%rax,%rax), %edx
	cvtsi2sdl	%edx, %xmm0
	mulsd	.LC6(%rip), %xmm0
	cvtsd2ss	%xmm0, %xmm0
	movss	%xmm0, (%r12,%rax,4)
	incq	%rax
	cmpq	$513, %rax
	jne	.L17
.L18:
	leal	-2048(%rax,%rax), %edx
	cvtsi2sdl	%edx, %xmm0
	mulsd	.LC6(%rip), %xmm0
	cvtsd2ss	%xmm0, %xmm0
	movss	%xmm0, (%r12,%rax,4)
	incq	%rax
	cmpq	$1024, %rax
	jne	.L18
	leaq	128(%rsp), %rax
	movl	$4096, %esi
	movq	%rax, %rdi
	movq	%rax, 16(%rsp)
	call	cudaMalloc@PLT
	leaq	136(%rsp), %rax
	movl	$4194304, %esi
	movq	%rax, %rdi
	movq	%rax, 24(%rsp)
	call	cudaMalloc@PLT
	leaq	144(%rsp), %rax
	movl	$4194304, %esi
	movq	%rax, %rdi
	movq	%rax, 40(%rsp)
	call	cudaMalloc@PLT
	movq	112(%rsp), %rdi
	xorl	%esi, %esi
	call	cudaEventRecord@PLT
	movq	128(%rsp), %rdi
	movl	$1, %ecx
	movq	%r12, %rsi
	movl	$4096, %edx
	call	cudaMemcpy@PLT
	movq	136(%rsp), %rdi
	movl	$1, %ecx
	movq	%rbp, %rsi
	movl	$4194304, %edx
	call	cudaMemcpy@PLT
	leaq	152(%rsp), %rax
	movl	$8388608, %esi
	movq	%rax, %rdi
	movq	%rax, 48(%rsp)
	call	cudaMalloc@PLT
	leaq	168(%rsp), %rdi
	movl	$8388608, %esi
	call	cudaMalloc@PLT
	leaq	160(%rsp), %rdi
	movl	$8388608, %esi
	call	cudaMalloc@PLT
	leaq	176(%rsp), %rdi
	movl	$8388608, %esi
	call	cudaMalloc@PLT
	xorl	%r9d, %r9d
	xorl	%r8d, %r8d
	movl	$1, %ecx
	movabsq	$137438953504, %rdi
	movl	$1, %esi
	movl	$1, 192(%rsp)
	movq	%rdi, %rdx
	movq	%rdi, 184(%rsp)
	movq	%rdi, 196(%rsp)
	movl	$1, 204(%rsp)
	call	__cudaPushCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L19
	movq	160(%rsp), %rsi
	movq	136(%rsp), %rdi
	movl	$1024, %edx
	call	_Z41__device_stub__Z12real2complexPfP6float2iPfP6float2i
.L19:
	leaq	108(%rsp), %rdi
	movl	$41, %ecx
	movl	$1024, %edx
	movl	$1024, %esi
	call	cufftPlan2d@PLT
	movq	152(%rsp), %rdx
	movl	108(%rsp), %edi
	orl	$-1, %ecx
	movq	160(%rsp), %rsi
	call	cufftExecC2C@PLT
	movl	204(%rsp), %ecx
	xorl	%r9d, %r9d
	movq	196(%rsp), %rdx
	movq	184(%rsp), %rdi
	movl	192(%rsp), %esi
	xorl	%r8d, %r8d
	call	__cudaPushCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L20
	movq	144(%rsp), %rsi
	movq	176(%rsp), %rdi
	movl	$1024, %edx
	call	_Z41__device_stub__Z12complex2realP6float2PfiP6float2Pfi
.L20:
	movq	144(%rsp), %rsi
	movq	32(%rsp), %rdi
	movl	$2, %ecx
	xorl	%r15d, %r15d
	movl	$4194304, %edx
	call	cudaMemcpy@PLT
	movq	120(%rsp), %rdi
	xorl	%esi, %esi
	call	cudaEventRecord@PLT
	movq	120(%rsp), %rdi
	call	cudaEventSynchronize@PLT
	movq	120(%rsp), %rdx
	movq	112(%rsp), %rsi
	leaq	104(%rsp), %rdi
	movl	$0x00000000, 104(%rsp)
	call	cudaEventElapsedTime@PLT
	leaq	.LC7(%rip), %rsi
	movl	$2, %edi
	movb	$1, %al
	cvtss2sd	104(%rsp), %xmm0
	call	__printf_chk@PLT
	movq	(%rsp), %rdi
	call	cudaEventCreate@PLT
	movq	8(%rsp), %rdi
	call	cudaEventCreate@PLT
	movl	$262144, %edi
	call	_Znam@PLT
	movl	$262144, %edi
	movq	%rax, %r12
	call	_Znam@PLT
	movl	$262144, %edi
	movq	%rax, %r13
	call	_Znam@PLT
	movl	$262144, %edi
	movq	%rax, 64(%rsp)
	call	_Znam@PLT
	movl	$262144, %edi
	movq	%rax, %rbx
	call	_Znam@PLT
	xorps	%xmm3, %xmm3
.L21:
	cvtsi2ssl	%r15d, %xmm2
	mulss	.LC8(%rip), %xmm2
	movq	%r15, %r14
	xorl	%ebp, %ebp
	salq	$10, %r14
	addss	%xmm3, %xmm2
	cvtss2sd	%xmm2, %xmm0
	subsd	.LC2(%rip), %xmm0
	mulsd	%xmm0, %xmm0
	movsd	%xmm0, 56(%rsp)
.L22:
	cvtsi2ssl	%ebp, %xmm1
	mulss	.LC8(%rip), %xmm1
	incl	%ebp
	movss	%xmm2, 0(%r13,%r14)
	movq	%rax, 88(%rsp)
	movss	%xmm2, 80(%rsp)
	addss	%xmm3, %xmm1
	movss	%xmm1, (%r12,%r14)
	cvtss2sd	%xmm1, %xmm1
	subsd	.LC2(%rip), %xmm1
	mulsd	%xmm1, %xmm1
	addsd	56(%rsp), %xmm1
	cvtsd2ss	%xmm1, %xmm1
	movaps	%xmm1, %xmm0
	movss	%xmm1, 72(%rsp)
	xorps	.LC3(%rip), %xmm0
	divss	.LC4(%rip), %xmm0
	movss	%xmm0, 32(%rsp)
	call	expf@PLT
	movss	72(%rsp), %xmm1
	movaps	%xmm0, %xmm4
	movaps	%xmm1, %xmm0
	subss	.LC4(%rip), %xmm0
	mulss	.LC5(%rip), %xmm1
	divss	%xmm1, %xmm0
	mulss	%xmm4, %xmm0
	movss	%xmm0, (%rbx,%r14)
	movss	32(%rsp), %xmm0
	call	expf@PLT
	movq	88(%rsp), %rax
	movss	80(%rsp), %xmm2
	xorps	%xmm3, %xmm3
	movss	%xmm0, (%rax,%r14)
	addq	$4, %r14
	cmpl	$256, %ebp
	jne	.L22
	incq	%r15
	cmpq	$256, %r15
	jne	.L21
	movl	$1024, %edi
	call	_Znam@PLT
	movq	%rax, %r12
	xorl	%eax, %eax
.L24:
	leal	(%rax,%rax), %edx
	cvtsi2sdl	%edx, %xmm0
	mulsd	.LC6(%rip), %xmm0
	cvtsd2ss	%xmm0, %xmm0
	movss	%xmm0, (%r12,%rax,4)
	incq	%rax
	cmpq	$129, %rax
	jne	.L24
.L25:
	leal	-512(%rax,%rax), %edx
	cvtsi2sdl	%edx, %xmm0
	mulsd	.LC6(%rip), %xmm0
	cvtsd2ss	%xmm0, %xmm0
	movss	%xmm0, (%r12,%rax,4)
	incq	%rax
	cmpq	$256, %rax
	jne	.L25
	movq	16(%rsp), %rdi
	movl	$1024, %esi
	call	cudaMalloc@PLT
	movq	24(%rsp), %rdi
	movl	$262144, %esi
	call	cudaMalloc@PLT
	movq	40(%rsp), %rdi
	movl	$262144, %esi
	call	cudaMalloc@PLT
	movq	112(%rsp), %rdi
	xorl	%esi, %esi
	call	cudaEventRecord@PLT
	movq	128(%rsp), %rdi
	movl	$1, %ecx
	movq	%r12, %rsi
	movl	$1024, %edx
	call	cudaMemcpy@PLT
	movq	136(%rsp), %rdi
	movl	$1, %ecx
	movq	%rbx, %rsi
	movl	$262144, %edx
	call	cudaMemcpy@PLT
	movq	48(%rsp), %rdi
	movl	$524288, %esi
	call	cudaMalloc@PLT
	leaq	168(%rsp), %rdi
	movl	$524288, %esi
	call	cudaMalloc@PLT
	leaq	160(%rsp), %rdi
	movl	$524288, %esi
	call	cudaMalloc@PLT
	leaq	176(%rsp), %rdi
	movl	$524288, %esi
	call	cudaMalloc@PLT
	xorl	%r9d, %r9d
	xorl	%r8d, %r8d
	movl	$1, %ecx
	movabsq	$137438953504, %rdx
	movl	$1, %esi
	movabsq	$34359738376, %rdi
	call	__cudaPushCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L26
	movq	160(%rsp), %rsi
	movq	136(%rsp), %rdi
	movl	$256, %edx
	call	_Z41__device_stub__Z12real2complexPfP6float2iPfP6float2i
.L26:
	leaq	108(%rsp), %rdi
	movl	$41, %ecx
	movl	$256, %edx
	movl	$256, %esi
	call	cufftPlan2d@PLT
	movq	152(%rsp), %rdx
	movl	108(%rsp), %edi
	orl	$-1, %ecx
	movq	160(%rsp), %rsi
	call	cufftExecC2C@PLT
	movl	204(%rsp), %ecx
	xorl	%r9d, %r9d
	movq	196(%rsp), %rdx
	movq	184(%rsp), %rdi
	movl	192(%rsp), %esi
	xorl	%r8d, %r8d
	call	__cudaPushCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L27
	movq	144(%rsp), %rsi
	movq	176(%rsp), %rdi
	movl	$256, %edx
	call	_Z41__device_stub__Z12complex2realP6float2PfiP6float2Pfi
.L27:
	movq	144(%rsp), %rsi
	movq	64(%rsp), %rdi
	movl	$2, %ecx
	xorl	%r14d, %r14d
	movl	$262144, %edx
	call	cudaMemcpy@PLT
	movq	120(%rsp), %rdi
	xorl	%esi, %esi
	call	cudaEventRecord@PLT
	movq	120(%rsp), %rdi
	call	cudaEventSynchronize@PLT
	movq	120(%rsp), %rdx
	leaq	104(%rsp), %rax
	movq	112(%rsp), %rsi
	movq	%rax, %rdi
	movl	$0x00000000, 104(%rsp)
	movq	%rax, 40(%rsp)
	call	cudaEventElapsedTime@PLT
	leaq	.LC9(%rip), %rsi
	movl	$2, %edi
	movb	$1, %al
	cvtss2sd	104(%rsp), %xmm0
	call	__printf_chk@PLT
	movq	(%rsp), %rdi
	call	cudaEventCreate@PLT
	movq	8(%rsp), %rdi
	call	cudaEventCreate@PLT
	movl	$1048576, %edi
	call	_Znam@PLT
	movl	$1048576, %edi
	movq	%rax, %r12
	call	_Znam@PLT
	movl	$1048576, %edi
	movq	%rax, %r13
	call	_Znam@PLT
	movl	$1048576, %edi
	movq	%rax, 56(%rsp)
	call	_Znam@PLT
	movl	$1048576, %edi
	movq	%rax, %rbx
	call	_Znam@PLT
	xorps	%xmm3, %xmm3
.L28:
	cvtsi2ssl	%r14d, %xmm2
	mulss	.LC10(%rip), %xmm2
	movq	%r14, %rbp
	xorl	%r15d, %r15d
	salq	$11, %rbp
	addss	%xmm3, %xmm2
	cvtss2sd	%xmm2, %xmm0
	subsd	.LC2(%rip), %xmm0
	mulsd	%xmm0, %xmm0
	movsd	%xmm0, 48(%rsp)
.L29:
	cvtsi2ssl	%r15d, %xmm1
	movss	%xmm2, 0(%r13,%rbp)
	incl	%r15d
	mulss	.LC10(%rip), %xmm1
	movq	%rax, 80(%rsp)
	movss	%xmm2, 72(%rsp)
	addss	%xmm3, %xmm1
	movss	%xmm1, (%r12,%rbp)
	cvtss2sd	%xmm1, %xmm1
	subsd	.LC2(%rip), %xmm1
	mulsd	%xmm1, %xmm1
	addsd	48(%rsp), %xmm1
	cvtsd2ss	%xmm1, %xmm1
	movaps	%xmm1, %xmm0
	movss	%xmm1, 64(%rsp)
	xorps	.LC3(%rip), %xmm0
	divss	.LC4(%rip), %xmm0
	movss	%xmm0, 32(%rsp)
	call	expf@PLT
	movss	64(%rsp), %xmm1
	movaps	%xmm0, %xmm4
	movaps	%xmm1, %xmm0
	subss	.LC4(%rip), %xmm0
	mulss	.LC5(%rip), %xmm1
	divss	%xmm1, %xmm0
	mulss	%xmm4, %xmm0
	movss	%xmm0, (%rbx,%rbp)
	movss	32(%rsp), %xmm0
	call	expf@PLT
	movq	80(%rsp), %rax
	movss	72(%rsp), %xmm2
	xorps	%xmm3, %xmm3
	movss	%xmm0, (%rax,%rbp)
	addq	$4, %rbp
	cmpl	$512, %r15d
	jne	.L29
	incq	%r14
	cmpq	$512, %r14
	jne	.L28
	movl	$2048, %edi
	call	_Znam@PLT
	movq	%rax, %r13
	xorl	%eax, %eax
.L31:
	leal	(%rax,%rax), %edx
	cvtsi2sdl	%edx, %xmm0
	mulsd	.LC6(%rip), %xmm0
	cvtsd2ss	%xmm0, %xmm0
	movss	%xmm0, 0(%r13,%rax,4)
	incq	%rax
	cmpq	$257, %rax
	jne	.L31
.L32:
	leal	-1024(%rax,%rax), %edx
	cvtsi2sdl	%edx, %xmm0
	mulsd	.LC6(%rip), %xmm0
	cvtsd2ss	%xmm0, %xmm0
	movss	%xmm0, 0(%r13,%rax,4)
	incq	%rax
	cmpq	$512, %rax
	jne	.L32
	movq	16(%rsp), %rdi
	movl	$2048, %esi
	call	cudaMalloc@PLT
	movq	24(%rsp), %rdi
	movl	$1048576, %esi
	call	cudaMalloc@PLT
	leaq	144(%rsp), %rax
	movl	$1048576, %esi
	movq	%rax, %rdi
	movq	%rax, 32(%rsp)
	call	cudaMalloc@PLT
	movq	112(%rsp), %rdi
	xorl	%esi, %esi
	call	cudaEventRecord@PLT
	movq	128(%rsp), %rdi
	movl	$1, %ecx
	movq	%r13, %rsi
	movl	$2048, %edx
	call	cudaMemcpy@PLT
	movq	136(%rsp), %rdi
	movl	$1, %ecx
	movq	%rbx, %rsi
	movl	$1048576, %edx
	call	cudaMemcpy@PLT
	leaq	152(%rsp), %rax
	movl	$2097152, %esi
	movq	%rax, %rdi
	movq	%rax, 48(%rsp)
	call	cudaMalloc@PLT
	leaq	168(%rsp), %rdi
	movl	$2097152, %esi
	call	cudaMalloc@PLT
	leaq	160(%rsp), %rdi
	movl	$2097152, %esi
	call	cudaMalloc@PLT
	leaq	176(%rsp), %rdi
	movl	$2097152, %esi
	call	cudaMalloc@PLT
	xorl	%r9d, %r9d
	xorl	%r8d, %r8d
	movl	$1, %ecx
	movabsq	$137438953504, %rdx
	movl	$1, %esi
	movabsq	$68719476752, %rdi
	call	__cudaPushCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L33
	movq	160(%rsp), %rsi
	movq	136(%rsp), %rdi
	movl	$512, %edx
	call	_Z41__device_stub__Z12real2complexPfP6float2iPfP6float2i
.L33:
	leaq	108(%rsp), %rdi
	movl	$41, %ecx
	movl	$512, %edx
	movl	$512, %esi
	call	cufftPlan2d@PLT
	movq	152(%rsp), %rdx
	movl	108(%rsp), %edi
	orl	$-1, %ecx
	movq	160(%rsp), %rsi
	call	cufftExecC2C@PLT
	movl	204(%rsp), %ecx
	xorl	%r9d, %r9d
	movq	196(%rsp), %rdx
	movq	184(%rsp), %rdi
	movl	192(%rsp), %esi
	xorl	%r8d, %r8d
	call	__cudaPushCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L34
	movq	144(%rsp), %rsi
	movq	176(%rsp), %rdi
	movl	$512, %edx
	call	_Z41__device_stub__Z12complex2realP6float2PfiP6float2Pfi
.L34:
	movq	144(%rsp), %rsi
	movq	56(%rsp), %rdi
	movl	$2, %ecx
	xorl	%r13d, %r13d
	movl	$1048576, %edx
	call	cudaMemcpy@PLT
	movq	120(%rsp), %rdi
	xorl	%esi, %esi
	call	cudaEventRecord@PLT
	movq	120(%rsp), %rdi
	call	cudaEventSynchronize@PLT
	movq	120(%rsp), %rdx
	movq	112(%rsp), %rsi
	movl	$0x00000000, 104(%rsp)
	movq	40(%rsp), %rdi
	call	cudaEventElapsedTime@PLT
	leaq	.LC11(%rip), %rsi
	movl	$2, %edi
	movb	$1, %al
	cvtss2sd	104(%rsp), %xmm0
	call	__printf_chk@PLT
	movq	(%rsp), %rdi
	call	cudaEventCreate@PLT
	movq	8(%rsp), %rdi
	call	cudaEventCreate@PLT
	movl	$4194304, %edi
	call	_Znam@PLT
	movl	$4194304, %edi
	movq	%rax, %r14
	call	_Znam@PLT
	movl	$4194304, %edi
	movq	%rax, %r15
	call	_Znam@PLT
	movl	$4194304, %edi
	movq	%rax, 40(%rsp)
	call	_Znam@PLT
	movl	$4194304, %edi
	movq	%rax, %rbp
	call	_Znam@PLT
	xorps	%xmm3, %xmm3
.L35:
	cvtsi2ssl	%r13d, %xmm2
	mulss	.LC0(%rip), %xmm2
	movq	%r13, %r12
	xorl	%ebx, %ebx
	salq	$12, %r12
	addss	%xmm3, %xmm2
	cvtss2sd	%xmm2, %xmm0
	subsd	.LC2(%rip), %xmm0
	mulsd	%xmm0, %xmm0
	movsd	%xmm0, 8(%rsp)
.L36:
	cvtsi2ssl	%ebx, %xmm1
	mulss	.LC0(%rip), %xmm1
	incl	%ebx
	movss	%xmm2, (%r15,%r12)
	movq	%rax, 72(%rsp)
	movss	%xmm2, 64(%rsp)
	addss	%xmm3, %xmm1
	movss	%xmm1, (%r14,%r12)
	cvtss2sd	%xmm1, %xmm1
	subsd	.LC2(%rip), %xmm1
	mulsd	%xmm1, %xmm1
	addsd	8(%rsp), %xmm1
	cvtsd2ss	%xmm1, %xmm1
	movaps	%xmm1, %xmm0
	movss	%xmm1, 56(%rsp)
	xorps	.LC3(%rip), %xmm0
	divss	.LC4(%rip), %xmm0
	movss	%xmm0, (%rsp)
	call	expf@PLT
	movss	56(%rsp), %xmm1
	movaps	%xmm0, %xmm4
	movaps	%xmm1, %xmm0
	subss	.LC4(%rip), %xmm0
	mulss	.LC5(%rip), %xmm1
	divss	%xmm1, %xmm0
	mulss	%xmm4, %xmm0
	movss	%xmm0, 0(%rbp,%r12)
	movss	(%rsp), %xmm0
	call	expf@PLT
	movq	72(%rsp), %rax
	movss	64(%rsp), %xmm2
	xorps	%xmm3, %xmm3
	movss	%xmm0, (%rax,%r12)
	addq	$4, %r12
	cmpl	$1024, %ebx
	jne	.L36
	incq	%r13
	cmpq	$1024, %r13
	jne	.L35
	movl	$4096, %edi
	call	_Znam@PLT
	movq	%rax, %r14
	xorl	%eax, %eax
.L38:
	leal	(%rax,%rax), %edx
	cvtsi2sdl	%edx, %xmm0
	mulsd	.LC6(%rip), %xmm0
	cvtsd2ss	%xmm0, %xmm0
	movss	%xmm0, (%r14,%rax,4)
	incq	%rax
	cmpq	$513, %rax
	jne	.L38
	movsd	.LC6(%rip), %xmm1
.L39:
	leal	-2048(%rax,%rax), %edx
	cvtsi2sdl	%edx, %xmm0
	mulsd	%xmm1, %xmm0
	cvtsd2ss	%xmm0, %xmm0
	movss	%xmm0, (%r14,%rax,4)
	incq	%rax
	cmpq	$1024, %rax
	jne	.L39
	movq	16(%rsp), %rdi
	movl	$4096, %esi
	call	cudaMalloc@PLT
	movq	24(%rsp), %rdi
	movl	$4194304, %esi
	call	cudaMalloc@PLT
	movq	32(%rsp), %rdi
	movl	$4194304, %esi
	call	cudaMalloc@PLT
	movq	112(%rsp), %rdi
	xorl	%esi, %esi
	call	cudaEventRecord@PLT
	movq	128(%rsp), %rdi
	movl	$1, %ecx
	movq	%r14, %rsi
	movl	$4096, %edx
	call	cudaMemcpy@PLT
	movq	136(%rsp), %rdi
	movl	$1, %ecx
	movq	%rbp, %rsi
	movl	$4194304, %edx
	call	cudaMemcpy@PLT
	movq	48(%rsp), %rdi
	movl	$8388608, %esi
	call	cudaMalloc@PLT
	leaq	168(%rsp), %rdi
	movl	$8388608, %esi
	call	cudaMalloc@PLT
	leaq	160(%rsp), %rdi
	movl	$8388608, %esi
	call	cudaMalloc@PLT
	leaq	176(%rsp), %rdi
	movl	$8388608, %esi
	call	cudaMalloc@PLT
	xorl	%r9d, %r9d
	xorl	%r8d, %r8d
	movl	$1, %ecx
	movabsq	$137438953504, %rdi
	movl	$1, %esi
	movq	%rdi, %rdx
	call	__cudaPushCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L40
	movq	160(%rsp), %rsi
	movq	136(%rsp), %rdi
	movl	$1024, %edx
	call	_Z41__device_stub__Z12real2complexPfP6float2iPfP6float2i
.L40:
	leaq	108(%rsp), %rdi
	movl	$41, %ecx
	movl	$1024, %edx
	movl	$1024, %esi
	call	cufftPlan2d@PLT
	movq	152(%rsp), %rdx
	movl	108(%rsp), %edi
	orl	$-1, %ecx
	movq	160(%rsp), %rsi
	call	cufftExecC2C@PLT
	movl	204(%rsp), %ecx
	xorl	%r9d, %r9d
	movq	196(%rsp), %rdx
	movq	184(%rsp), %rdi
	movl	192(%rsp), %esi
	xorl	%r8d, %r8d
	call	__cudaPushCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L41
	movq	144(%rsp), %rsi
	movq	176(%rsp), %rdi
	movl	$1024, %edx
	call	_Z41__device_stub__Z12complex2realP6float2PfiP6float2Pfi
.L41:
	movq	40(%rsp), %rdi
	movl	$2, %ecx
	movl	$4194304, %edx
	movq	144(%rsp), %rsi
	call	cudaMemcpy@PLT
	movq	120(%rsp), %rdi
	xorl	%esi, %esi
	call	cudaEventRecord@PLT
	movq	120(%rsp), %rdi
	call	cudaEventSynchronize@PLT
	movq	112(%rsp), %rsi
	movq	120(%rsp), %rdx
	leaq	104(%rsp), %rdi
	movl	$0x00000000, 104(%rsp)
	call	cudaEventElapsedTime@PLT
	leaq	.LC12(%rip), %rsi
	movl	$2, %edi
	movb	$1, %al
	cvtss2sd	104(%rsp), %xmm0
	call	__printf_chk@PLT
	movq	280(%rsp), %rax
	subq	%fs:40, %rax
	je	.L42
	call	__stack_chk_fail@PLT
.L42:
	addq	$296, %rsp
	.cfi_def_cfa_offset 56
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE2050:
	.size	main, .-main
	.section	.rodata.str1.1
.LC13:
	.string	"_Z12complex2realP6float2Pfi"
.LC14:
	.string	"_Z12real2complexPfP6float2i"
	.section	.text.startup
	.type	_ZL24__sti____cudaRegisterAllv, @function
_ZL24__sti____cudaRegisterAllv:
.LFB2080:
	.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	.LC13(%rip), %rdx
	movq	%rax, %rdi
	movq	%rax, %rbx
	pushq	$0
	.cfi_def_cfa_offset 40
	movq	%rdx, %rcx
	leaq	_Z12complex2realP6float2Pfi(%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	.LC14(%rip), %rdx
	orl	$-1, %r8d
	leaq	_Z12real2complexPfP6float2i(%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
.LFE2080:
	.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
	.section	.rodata.cst4,"aM",@progbits,4
	.align 4
.LC0:
	.long	981467136
	.section	.rodata.cst8,"aM",@progbits,8
	.align 8
.LC2:
	.long	0
	.long	1071644672
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC3:
	.long	-2147483648
	.long	0
	.long	0
	.long	0
	.section	.rodata.cst4
	.align 4
.LC4:
	.long	1017370379
	.align 4
.LC5:
	.long	1008981771
	.section	.rodata.cst8
	.align 8
.LC6:
	.long	1413754136
	.long	1074340347
	.section	.rodata.cst4
	.align 4
.LC8:
	.long	998244352
	.align 4
.LC10:
	.long	989855744
	.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 <stdlib.h>

#include <hipfft/hipfft.h>

#define BSZ  32

__global__ void real2complex(float *f, hipfftComplex *fc, int N){
  int i = threadIdx.x + blockIdx.x*blockDim.x;
  int j = threadIdx.y + blockIdx.y*blockDim.y;
  int index = j*N+i;

  if (i<N && j<N){

    fc[index].x = f[index];
    fc[index].y = 0.0f;
  }
}

__global__ void complex2real(hipfftComplex *fc, float *f, int N){
  int i = threadIdx.x + blockIdx.x*BSZ;
  int j = threadIdx.y + blockIdx.y*BSZ;
  int index = j*N+i;
  if (i<N && j<N){
    f[index] = fc[index].x/((float)N*(float)N);
  }
}

int main(int argc, char *argv[]) {

  hipEvent_t start, stop;
  hipEventCreate(&start);
  hipEventCreate(&stop);

  int N = 1024;
  float xmax = 1.0f;
  float xmin = 0.0f;
  float ymin = 0.0f;
  float h = (xmax-xmin)/((float)N);
  float s = 0.1f;
  float s2 = s*s;
  float milliseconds;

  float *x = new float[N*N];
  float *y = new float[N*N];
  float *u = new float[N*N];
  float *f = new float[N*N];
  float *u_a = new float[N*N];
  float *err = new float[N*N];

  float r2;
  for(int j=0; j<N; j++){
    for(int i=0; i<N; i++){
      x[N*j+i] = xmin + i*h;
      y[N*j+i] = ymin + j*h;

      r2 = (x[N*j+i]-0.5)*(x[N*j+i]-0.5) + (y[N*j+i]-0.5)*(y[N*j+i]-0.5);
      f[N*j+i] = (r2-2*s2)/(r2*s2)*exp(-r2/(2*s2));
      u_a[N*j+i] = exp(-r2/(2*s2));
    }
  }

  float *k = new float[N];
  for (int i=0; i<=N/2; i++){
    k[i] = i * 2*M_PI;
  }
  for (int i=N/2+1; i<N; i++){
    k[i] = (i-N)* 2*M_PI;
  }

  float *k_d, *f_d, *u_d;
  hipMalloc ((void**)&k_d, sizeof(float)*N);
  hipMalloc ((void**)&f_d, sizeof(float)*N*N);
  hipMalloc ((void**)&u_d, sizeof(float)*N*N);

  hipEventRecord(start);
  hipMemcpy(k_d, k, sizeof(float)*N, hipMemcpyHostToDevice);
  hipMemcpy(f_d, f, sizeof(float)*N*N, hipMemcpyHostToDevice);

  hipfftComplex *ft_d, *f_dc, *ft_d_k, *u_dc;
  hipMalloc ((void**)&ft_d, sizeof(hipfftComplex)*N*N);
  hipMalloc ((void**)&ft_d_k, sizeof(hipfftComplex)*N*N);
  hipMalloc ((void**)&f_dc, sizeof(hipfftComplex)*N*N);
  hipMalloc ((void**)&u_dc, sizeof(hipfftComplex)*N*N);

  dim3 dimGrid (int(  (N-0.5)/BSZ )+1, int(  (N-0.5)/BSZ )+1,1  );
  dim3 dimBlock (BSZ, BSZ,1);
  real2complex<<<dimGrid, dimBlock>>>(f_d, f_dc, N);

  hipfftHandle plan;
  hipfftPlan2d(&plan, N, N, HIPFFT_C2C);

  hipfftExecC2C(plan, f_dc, ft_d, HIPFFT_FORWARD);
  complex2real<<<dimGrid, dimBlock>>>(u_dc, u_d, N);

  hipMemcpy(u, u_d, sizeof(float)*N*N, hipMemcpyDeviceToHost);

  hipEventRecord(stop);

  hipEventSynchronize(stop);
  milliseconds = 0;
  hipEventElapsedTime(&milliseconds, start, stop);
  printf("fft+criacao_plano: %0.3fms\n",milliseconds);

  hipEventCreate(&start);
  hipEventCreate(&stop);


   N = 256;
   xmax = 1.0f;
   xmin = 0.0f;
   ymin = 0.0f;
   h = (xmax-xmin)/((float)N);
   s = 0.1f;
   s2 = s*s;

   x = new float[N*N];
   y = new float[N*N];
   u = new float[N*N];
   f = new float[N*N];
   u_a = new float[N*N];
   err = new float[N*N];


  for(int j=0; j<N; j++){
    for(int i=0; i<N; i++){
      x[N*j+i] = xmin + i*h;
      y[N*j+i] = ymin + j*h;

      r2 = (x[N*j+i]-0.5)*(x[N*j+i]-0.5) + (y[N*j+i]-0.5)*(y[N*j+i]-0.5);
      f[N*j+i] = (r2-2*s2)/(r2*s2)*exp(-r2/(2*s2));
      u_a[N*j+i] = exp(-r2/(2*s2));
    }
  }

   k = new float[N];
  for (int i=0; i<=N/2; i++){
    k[i] = i * 2*M_PI;
  }
  for (int i=N/2+1; i<N; i++){
    k[i] = (i-N)* 2*M_PI;
  }

  hipMalloc ((void**)&k_d, sizeof(float)*N);
  hipMalloc ((void**)&f_d, sizeof(float)*N*N);
  hipMalloc ((void**)&u_d, sizeof(float)*N*N);

  hipEventRecord(start);
  hipMemcpy(k_d, k, sizeof(float)*N, hipMemcpyHostToDevice);
  hipMemcpy(f_d, f, sizeof(float)*N*N, hipMemcpyHostToDevice);

  hipMalloc ((void**)&ft_d, sizeof(hipfftComplex)*N*N);
  hipMalloc ((void**)&ft_d_k, sizeof(hipfftComplex)*N*N);
  hipMalloc ((void**)&f_dc, sizeof(hipfftComplex)*N*N);
  hipMalloc ((void**)&u_dc, sizeof(hipfftComplex)*N*N);

  dim3 dimGrid2 (int(  (N-0.5)/BSZ )+1, int(  (N-0.5)/BSZ )+1,1  );
  dim3 dimBlock2 (BSZ, BSZ,1);
  real2complex<<<dimGrid2, dimBlock2>>>(f_d, f_dc, N);

  hipfftPlan2d(&plan, N, N, HIPFFT_C2C);
  hipfftExecC2C(plan, f_dc, ft_d, HIPFFT_FORWARD);
  complex2real<<<dimGrid, dimBlock>>>(u_dc, u_d, N);

  hipMemcpy(u, u_d, sizeof(float)*N*N, hipMemcpyDeviceToHost);

  hipEventRecord(stop);

  hipEventSynchronize(stop);
  milliseconds = 0;
  hipEventElapsedTime(&milliseconds, start, stop);
  printf("tempo 256x256: %0.3fms\n",milliseconds);

  hipEventCreate(&start);
  hipEventCreate(&stop);


  N = 512;
  xmax = 1.0f;
  xmin = 0.0f;
  ymin = 0.0f;
  h = (xmax-xmin)/((float)N);
  s = 0.1f;
  s2 = s*s;

  x = new float[N*N];
  y = new float[N*N];
  u = new float[N*N];
  f = new float[N*N];
  u_a = new float[N*N];
  err = new float[N*N];


  for(int j=0; j<N; j++){
    for(int i=0; i<N; i++){
      x[N*j+i] = xmin + i*h;
      y[N*j+i] = ymin + j*h;

      r2 = (x[N*j+i]-0.5)*(x[N*j+i]-0.5) + (y[N*j+i]-0.5)*(y[N*j+i]-0.5);
      f[N*j+i] = (r2-2*s2)/(r2*s2)*exp(-r2/(2*s2));
      u_a[N*j+i] = exp(-r2/(2*s2));
    }
  }

  k = new float[N];
  for (int i=0; i<=N/2; i++){
    k[i] = i * 2*M_PI;
  }
  for (int i=N/2+1; i<N; i++){
    k[i] = (i-N)* 2*M_PI;
  }

  hipMalloc ((void**)&k_d, sizeof(float)*N);
  hipMalloc ((void**)&f_d, sizeof(float)*N*N);
  hipMalloc ((void**)&u_d, sizeof(float)*N*N);

  hipEventRecord(start);
  hipMemcpy(k_d, k, sizeof(float)*N, hipMemcpyHostToDevice);
  hipMemcpy(f_d, f, sizeof(float)*N*N, hipMemcpyHostToDevice);

  hipMalloc ((void**)&ft_d, sizeof(hipfftComplex)*N*N);
  hipMalloc ((void**)&ft_d_k, sizeof(hipfftComplex)*N*N);
  hipMalloc ((void**)&f_dc, sizeof(hipfftComplex)*N*N);
  hipMalloc ((void**)&u_dc, sizeof(hipfftComplex)*N*N);

  dim3 dimGrid3 (int(  (N-0.5)/BSZ )+1, int(  (N-0.5)/BSZ )+1,1  );
  dim3 dimBlock3 (BSZ, BSZ,1);
  real2complex<<<dimGrid3, dimBlock3>>>(f_d, f_dc, N);

  hipfftPlan2d(&plan, N, N, HIPFFT_C2C);
  hipfftExecC2C(plan, f_dc, ft_d, HIPFFT_FORWARD);
  complex2real<<<dimGrid, dimBlock>>>(u_dc, u_d, N);

  hipMemcpy(u, u_d, sizeof(float)*N*N, hipMemcpyDeviceToHost);

  hipEventRecord(stop);

  hipEventSynchronize(stop);
  milliseconds = 0;
  hipEventElapsedTime(&milliseconds, start, stop);
  printf("tempo 512x512: %0.3fms\n",milliseconds);

  hipEventCreate(&start);
  hipEventCreate(&stop);

  N = 1024;
  xmax = 1.0f;
  xmin = 0.0f;
  ymin = 0.0f;
  h = (xmax-xmin)/((float)N);
  s = 0.1f;
  s2 = s*s;

  x = new float[N*N];
  y = new float[N*N];
  u = new float[N*N];
  f = new float[N*N];
  u_a = new float[N*N];
  err = new float[N*N];


  for(int j=0; j<N; j++){
    for(int i=0; i<N; i++){
      x[N*j+i] = xmin + i*h;
      y[N*j+i] = ymin + j*h;

      r2 = (x[N*j+i]-0.5)*(x[N*j+i]-0.5) + (y[N*j+i]-0.5)*(y[N*j+i]-0.5);
      f[N*j+i] = (r2-2*s2)/(r2*s2)*exp(-r2/(2*s2));
      u_a[N*j+i] = exp(-r2/(2*s2));
    }
  }

  k = new float[N];
  for (int i=0; i<=N/2; i++){
    k[i] = i * 2*M_PI;
  }
  for (int i=N/2+1; i<N; i++){
    k[i] = (i-N)* 2*M_PI;
  }

  hipMalloc ((void**)&k_d, sizeof(float)*N);
  hipMalloc ((void**)&f_d, sizeof(float)*N*N);
  hipMalloc ((void**)&u_d, sizeof(float)*N*N);

  hipEventRecord(start);
  hipMemcpy(k_d, k, sizeof(float)*N, hipMemcpyHostToDevice);
  hipMemcpy(f_d, f, sizeof(float)*N*N, hipMemcpyHostToDevice);

  hipMalloc ((void**)&ft_d, sizeof(hipfftComplex)*N*N);
  hipMalloc ((void**)&ft_d_k, sizeof(hipfftComplex)*N*N);
  hipMalloc ((void**)&f_dc, sizeof(hipfftComplex)*N*N);
  hipMalloc ((void**)&u_dc, sizeof(hipfftComplex)*N*N);

  dim3 dimGrid4 (int(  (N-0.5)/BSZ )+1, int(  (N-0.5)/BSZ )+1,1  );
  dim3 dimBlock4 (BSZ, BSZ,1);
  real2complex<<<dimGrid4, dimBlock4>>>(f_d, f_dc, N);

  hipfftPlan2d(&plan, N, N, HIPFFT_C2C);
  hipfftExecC2C(plan, f_dc, ft_d, HIPFFT_FORWARD);
  complex2real<<<dimGrid, dimBlock>>>(u_dc, u_d, N);

  hipMemcpy(u, u_d, sizeof(float)*N*N, hipMemcpyDeviceToHost);

  hipEventRecord(stop);

  hipEventSynchronize(stop);
  milliseconds = 0;
  hipEventElapsedTime(&milliseconds, start, stop);
  printf("tempo 1024x1024: %0.3fms\n",milliseconds);


  return 0;
}

	.text
	.file	"main.hip"
	.globl	_Z27__device_stub__real2complexPfP15HIP_vector_typeIfLj2EEi # -- Begin function _Z27__device_stub__real2complexPfP15HIP_vector_typeIfLj2EEi
	.type	_Z27__device_stub__real2complexPfP15HIP_vector_typeIfLj2EEi,@function
_Z27__device_stub__real2complexPfP15HIP_vector_typeIfLj2EEi: # @_Z27__device_stub__real2complexPfP15HIP_vector_typeIfLj2EEi
	.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	$_Z12real2complexPfP15HIP_vector_typeIfLj2EEi, %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_end0:
	.size	_Z27__device_stub__real2complexPfP15HIP_vector_typeIfLj2EEi, .Lfunc_end0-_Z27__device_stub__real2complexPfP15HIP_vector_typeIfLj2EEi
	.cfi_endproc
                                        # -- End function
	.globl	_Z27__device_stub__complex2realP15HIP_vector_typeIfLj2EEPfi # -- Begin function _Z27__device_stub__complex2realP15HIP_vector_typeIfLj2EEPfi
	.type	_Z27__device_stub__complex2realP15HIP_vector_typeIfLj2EEPfi,@function
_Z27__device_stub__complex2realP15HIP_vector_typeIfLj2EEPfi: # @_Z27__device_stub__complex2realP15HIP_vector_typeIfLj2EEPfi
	.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	$_Z12complex2realP15HIP_vector_typeIfLj2EEPfi, %edi
	movq	%rbx, %r9
	pushq	(%r13)
	.cfi_adjust_cfa_offset 8
	pushq	(%r12)
	.cfi_adjust_cfa_offset 8
	callq	hipLaunchKernel
	addq	$128, %rsp
	.cfi_adjust_cfa_offset -128
	popq	%rbx
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	retq
.Lfunc_end1:
	.size	_Z27__device_stub__complex2realP15HIP_vector_typeIfLj2EEPfi, .Lfunc_end1-_Z27__device_stub__complex2realP15HIP_vector_typeIfLj2EEPfi
	.cfi_endproc
                                        # -- End function
	.section	.rodata.cst4,"aM",@progbits,4
	.p2align	2, 0x0                          # -- Begin function main
.LCPI2_0:
	.long	0x3a800000                      # float 9.765625E-4
.LCPI2_2:
	.long	0xbca3d70b                      # float -0.0200000014
.LCPI2_3:
	.long	0x3c23d70b                      # float 0.0100000007
.LCPI2_5:
	.long	0x3b800000                      # float 0.00390625
.LCPI2_6:
	.long	0x3b000000                      # float 0.001953125
	.section	.rodata.cst8,"aM",@progbits,8
	.p2align	3, 0x0
.LCPI2_1:
	.quad	0xbfe0000000000000              # double -0.5
.LCPI2_4:
	.quad	0x400921fb54442d18              # double 3.1415926535897931
	.text
	.globl	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	$120, %rsp
	.cfi_def_cfa_offset 176
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	.cfi_offset %rbp, -16
	leaq	24(%rsp), %rdi
	callq	hipEventCreate
	leaq	88(%rsp), %rdi
	callq	hipEventCreate
	movl	$4194304, %edi                  # imm = 0x400000
	callq	_Znam
	movq	%rax, %r14
	movl	$4194304, %edi                  # imm = 0x400000
	callq	_Znam
	movq	%rax, %r15
	xorl	%ebx, %ebx
	movss	.LCPI2_0(%rip), %xmm1           # xmm1 = mem[0],zero,zero,zero
	xorps	%xmm5, %xmm5
	movsd	.LCPI2_1(%rip), %xmm2           # xmm2 = mem[0],zero
	movss	.LCPI2_2(%rip), %xmm3           # xmm3 = mem[0],zero,zero,zero
	movss	.LCPI2_3(%rip), %xmm4           # xmm4 = mem[0],zero,zero,zero
	movq	%rax, %r12
.LBB2_1:                                # %.preheader563
                                        # =>This Loop Header: Depth=1
                                        #     Child Loop BB2_2 Depth 2
	xorps	%xmm0, %xmm0
	cvtsi2ss	%ebx, %xmm0
	mulss	%xmm1, %xmm0
	addss	%xmm5, %xmm0
	cvtss2sd	%xmm0, %xmm0
	addsd	%xmm2, %xmm0
	mulsd	%xmm0, %xmm0
	movsd	%xmm0, 32(%rsp)                 # 8-byte Spill
	xorl	%r13d, %r13d
.LBB2_2:                                #   Parent Loop BB2_1 Depth=1
                                        # =>  This Inner Loop Header: Depth=2
	xorps	%xmm0, %xmm0
	cvtsi2ss	%r13d, %xmm0
	mulss	%xmm1, %xmm0
	addss	%xmm5, %xmm0
	cvtss2sd	%xmm0, %xmm0
	addsd	%xmm2, %xmm0
	mulsd	%xmm0, %xmm0
	addsd	32(%rsp), %xmm0                 # 8-byte Folded Reload
	cvtsd2ss	%xmm0, %xmm0
	movaps	%xmm0, %xmm1
	addss	%xmm3, %xmm1
	movaps	%xmm0, %xmm2
	mulss	%xmm4, %xmm2
	divss	%xmm2, %xmm1
	cvtss2sd	%xmm1, %xmm1
	movsd	%xmm1, 48(%rsp)                 # 8-byte Spill
	divss	%xmm3, %xmm0
	cvtss2sd	%xmm0, %xmm0
	movsd	%xmm0, 40(%rsp)                 # 8-byte Spill
	callq	exp
	mulsd	48(%rsp), %xmm0                 # 8-byte Folded Reload
	cvtsd2ss	%xmm0, %xmm0
	movss	%xmm0, (%r12,%r13,4)
	movsd	40(%rsp), %xmm0                 # 8-byte Reload
                                        # xmm0 = mem[0],zero
	callq	exp
	xorps	%xmm5, %xmm5
	movss	.LCPI2_3(%rip), %xmm4           # xmm4 = mem[0],zero,zero,zero
	movss	.LCPI2_2(%rip), %xmm3           # xmm3 = mem[0],zero,zero,zero
	movsd	.LCPI2_1(%rip), %xmm2           # xmm2 = mem[0],zero
	movss	.LCPI2_0(%rip), %xmm1           # xmm1 = mem[0],zero,zero,zero
	incq	%r13
	cmpq	$1024, %r13                     # imm = 0x400
	jne	.LBB2_2
# %bb.3:                                #   in Loop: Header=BB2_1 Depth=1
	incq	%rbx
	addq	$4096, %r12                     # imm = 0x1000
	cmpq	$1024, %rbx                     # imm = 0x400
	jne	.LBB2_1
# %bb.4:
	movl	$4096, %edi                     # imm = 0x1000
	callq	_Znam
	movq	%rax, %r12
	xorl	%eax, %eax
	movsd	.LCPI2_4(%rip), %xmm1           # xmm1 = mem[0],zero
.LBB2_5:                                # =>This Inner Loop Header: Depth=1
	xorps	%xmm0, %xmm0
	cvtsi2sd	%eax, %xmm0
	mulsd	%xmm1, %xmm0
	cvtsd2ss	%xmm0, %xmm0
	movss	%xmm0, (%r12,%rax,2)
	addq	$2, %rax
	cmpq	$1026, %rax                     # imm = 0x402
	jne	.LBB2_5
# %bb.6:                                # %.preheader562.preheader
	xorl	%eax, %eax
.LBB2_7:                                # %.preheader562
                                        # =>This Inner Loop Header: Depth=1
	leal	-1022(%rax), %ecx
	xorps	%xmm0, %xmm0
	cvtsi2sd	%ecx, %xmm0
	mulsd	%xmm1, %xmm0
	cvtsd2ss	%xmm0, %xmm0
	movss	%xmm0, 2052(%r12,%rax,2)
	addq	$2, %rax
	cmpq	$1022, %rax                     # imm = 0x3FE
	jne	.LBB2_7
# %bb.8:
	movabsq	$137438953504, %rbx             # imm = 0x2000000020
	leaq	112(%rsp), %rbp
	movl	$4096, %esi                     # imm = 0x1000
	movq	%rbp, %rdi
	callq	hipMalloc
	leaq	72(%rsp), %r13
	movl	$4194304, %esi                  # imm = 0x400000
	movq	%r13, %rdi
	callq	hipMalloc
	leaq	16(%rsp), %rdi
	movl	$4194304, %esi                  # imm = 0x400000
	callq	hipMalloc
	movq	24(%rsp), %rdi
	xorl	%esi, %esi
	callq	hipEventRecord
	movq	(%rbp), %rdi
	movl	$4096, %edx                     # imm = 0x1000
	movq	%r12, %rsi
	movl	$1, %ecx
	callq	hipMemcpy
	movq	(%r13), %rdi
	movl	$4194304, %edx                  # imm = 0x400000
	movq	%r15, %rsi
	movl	$1, %ecx
	callq	hipMemcpy
	leaq	64(%rsp), %rdi
	movl	$8388608, %esi                  # imm = 0x800000
	callq	hipMalloc
	leaq	104(%rsp), %rdi
	movl	$8388608, %esi                  # imm = 0x800000
	callq	hipMalloc
	leaq	8(%rsp), %rdi
	movl	$8388608, %esi                  # imm = 0x800000
	callq	hipMalloc
	leaq	56(%rsp), %rdi
	movl	$8388608, %esi                  # imm = 0x800000
	callq	hipMalloc
	movq	%rbx, %rdi
	movl	$1, %esi
	movq	%rbx, %rdx
	movl	$1, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	__hipPushCallConfiguration
	testl	%eax, %eax
	jne	.LBB2_10
# %bb.9:
	movq	72(%rsp), %rdi
	movq	8(%rsp), %rsi
	movl	$1024, %edx                     # imm = 0x400
	callq	_Z27__device_stub__real2complexPfP15HIP_vector_typeIfLj2EEi
.LBB2_10:
	leaq	96(%rsp), %r15
	movq	%r15, %rdi
	movl	$1024, %esi                     # imm = 0x400
	movl	$1024, %edx                     # imm = 0x400
	movl	$41, %ecx
	callq	hipfftPlan2d
	movq	(%r15), %rdi
	movq	8(%rsp), %rsi
	movq	64(%rsp), %rdx
	movl	$-1, %ecx
	callq	hipfftExecC2C
	movq	%rbx, %rdi
	movl	$1, %esi
	movq	%rbx, %rdx
	movl	$1, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	__hipPushCallConfiguration
	testl	%eax, %eax
	jne	.LBB2_12
# %bb.11:
	movq	56(%rsp), %rdi
	movq	16(%rsp), %rsi
	movl	$1024, %edx                     # imm = 0x400
	callq	_Z27__device_stub__complex2realP15HIP_vector_typeIfLj2EEPfi
.LBB2_12:
	movq	16(%rsp), %rsi
	movl	$4194304, %edx                  # imm = 0x400000
	movq	%r14, %rdi
	movl	$2, %ecx
	callq	hipMemcpy
	leaq	88(%rsp), %r14
	movq	(%r14), %rdi
	xorl	%r13d, %r13d
	xorl	%esi, %esi
	callq	hipEventRecord
	movq	(%r14), %rdi
	callq	hipEventSynchronize
	leaq	84(%rsp), %r15
	movl	$0, (%r15)
	leaq	24(%rsp), %r12
	movq	(%r12), %rsi
	movq	(%r14), %rdx
	movq	%r15, %rdi
	callq	hipEventElapsedTime
	cvtss2sd	(%r15), %xmm0
	movl	$.L.str, %edi
	movb	$1, %al
	callq	printf
	movq	%r12, %rdi
	callq	hipEventCreate
	movq	%r14, %rdi
	callq	hipEventCreate
	movl	$262144, %edi                   # imm = 0x40000
	callq	_Znam
	movq	%rax, %r14
	movl	$262144, %edi                   # imm = 0x40000
	callq	_Znam
	movq	%rax, %r15
	movss	.LCPI2_5(%rip), %xmm2           # xmm2 = mem[0],zero,zero,zero
	xorps	%xmm3, %xmm3
	movq	%rax, %r12
	movsd	.LCPI2_1(%rip), %xmm1           # xmm1 = mem[0],zero
.LBB2_13:                               # %.preheader561
                                        # =>This Loop Header: Depth=1
                                        #     Child Loop BB2_14 Depth 2
	xorps	%xmm0, %xmm0
	cvtsi2ss	%r13d, %xmm0
	mulss	%xmm2, %xmm0
	addss	%xmm3, %xmm0
	cvtss2sd	%xmm0, %xmm0
	addsd	%xmm1, %xmm0
	mulsd	%xmm0, %xmm0
	movsd	%xmm0, 32(%rsp)                 # 8-byte Spill
	xorl	%ebp, %ebp
.LBB2_14:                               #   Parent Loop BB2_13 Depth=1
                                        # =>  This Inner Loop Header: Depth=2
	xorps	%xmm0, %xmm0
	cvtsi2ss	%ebp, %xmm0
	mulss	%xmm2, %xmm0
	addss	%xmm3, %xmm0
	cvtss2sd	%xmm0, %xmm0
	addsd	%xmm1, %xmm0
	mulsd	%xmm0, %xmm0
	addsd	32(%rsp), %xmm0                 # 8-byte Folded Reload
	cvtsd2ss	%xmm0, %xmm0
	movaps	%xmm0, %xmm1
	movss	.LCPI2_2(%rip), %xmm3           # xmm3 = mem[0],zero,zero,zero
	addss	%xmm3, %xmm1
	movaps	%xmm0, %xmm2
	mulss	.LCPI2_3(%rip), %xmm2
	divss	%xmm2, %xmm1
	cvtss2sd	%xmm1, %xmm1
	movsd	%xmm1, 48(%rsp)                 # 8-byte Spill
	divss	%xmm3, %xmm0
	cvtss2sd	%xmm0, %xmm0
	movsd	%xmm0, 40(%rsp)                 # 8-byte Spill
	callq	exp
	mulsd	48(%rsp), %xmm0                 # 8-byte Folded Reload
	cvtsd2ss	%xmm0, %xmm0
	movss	%xmm0, (%r12,%rbp,4)
	movsd	40(%rsp), %xmm0                 # 8-byte Reload
                                        # xmm0 = mem[0],zero
	callq	exp
	xorps	%xmm3, %xmm3
	movss	.LCPI2_5(%rip), %xmm2           # xmm2 = mem[0],zero,zero,zero
	movsd	.LCPI2_1(%rip), %xmm1           # xmm1 = mem[0],zero
	incq	%rbp
	cmpq	$256, %rbp                      # imm = 0x100
	jne	.LBB2_14
# %bb.15:                               #   in Loop: Header=BB2_13 Depth=1
	incq	%r13
	addq	$1024, %r12                     # imm = 0x400
	cmpq	$256, %r13                      # imm = 0x100
	jne	.LBB2_13
# %bb.16:
	movl	$1024, %edi                     # imm = 0x400
	callq	_Znam
	movq	%rax, %r12
	xorl	%eax, %eax
	movsd	.LCPI2_4(%rip), %xmm1           # xmm1 = mem[0],zero
.LBB2_17:                               # =>This Inner Loop Header: Depth=1
	xorps	%xmm0, %xmm0
	cvtsi2sd	%eax, %xmm0
	mulsd	%xmm1, %xmm0
	cvtsd2ss	%xmm0, %xmm0
	movss	%xmm0, (%r12,%rax,2)
	addq	$2, %rax
	cmpq	$258, %rax                      # imm = 0x102
	jne	.LBB2_17
# %bb.18:                               # %.preheader560.preheader
	xorl	%eax, %eax
.LBB2_19:                               # %.preheader560
                                        # =>This Inner Loop Header: Depth=1
	leal	-254(%rax), %ecx
	xorps	%xmm0, %xmm0
	cvtsi2sd	%ecx, %xmm0
	mulsd	%xmm1, %xmm0
	cvtsd2ss	%xmm0, %xmm0
	movss	%xmm0, 516(%r12,%rax,2)
	addq	$2, %rax
	cmpq	$254, %rax
	jne	.LBB2_19
# %bb.20:
	leaq	112(%rsp), %rbp
	movl	$1024, %esi                     # imm = 0x400
	movq	%rbp, %rdi
	callq	hipMalloc
	leaq	72(%rsp), %r13
	movl	$262144, %esi                   # imm = 0x40000
	movq	%r13, %rdi
	callq	hipMalloc
	leaq	16(%rsp), %rdi
	movl	$262144, %esi                   # imm = 0x40000
	callq	hipMalloc
	movq	24(%rsp), %rdi
	xorl	%esi, %esi
	callq	hipEventRecord
	movq	(%rbp), %rdi
	movl	$1024, %edx                     # imm = 0x400
	movq	%r12, %rsi
	movl	$1, %ecx
	callq	hipMemcpy
	movq	(%r13), %rdi
	movl	$262144, %edx                   # imm = 0x40000
	movq	%r15, %rsi
	movl	$1, %ecx
	callq	hipMemcpy
	leaq	64(%rsp), %rdi
	movl	$524288, %esi                   # imm = 0x80000
	callq	hipMalloc
	leaq	104(%rsp), %rdi
	movl	$524288, %esi                   # imm = 0x80000
	callq	hipMalloc
	leaq	8(%rsp), %rdi
	movl	$524288, %esi                   # imm = 0x80000
	callq	hipMalloc
	leaq	56(%rsp), %rdi
	movl	$524288, %esi                   # imm = 0x80000
	callq	hipMalloc
	movabsq	$34359738376, %rdi              # imm = 0x800000008
	movl	$1, %esi
	movq	%rbx, %rdx
	movl	$1, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	__hipPushCallConfiguration
	testl	%eax, %eax
	jne	.LBB2_22
# %bb.21:
	movq	72(%rsp), %rdi
	movq	8(%rsp), %rsi
	movl	$256, %edx                      # imm = 0x100
	callq	_Z27__device_stub__real2complexPfP15HIP_vector_typeIfLj2EEi
.LBB2_22:
	leaq	96(%rsp), %r15
	movq	%r15, %rdi
	movl	$256, %esi                      # imm = 0x100
	movl	$256, %edx                      # imm = 0x100
	movl	$41, %ecx
	callq	hipfftPlan2d
	movq	(%r15), %rdi
	movq	8(%rsp), %rsi
	movq	64(%rsp), %rdx
	movl	$-1, %ecx
	callq	hipfftExecC2C
	movq	%rbx, %rdi
	movl	$1, %esi
	movq	%rbx, %rdx
	movl	$1, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	__hipPushCallConfiguration
	testl	%eax, %eax
	jne	.LBB2_24
# %bb.23:
	movq	56(%rsp), %rdi
	movq	16(%rsp), %rsi
	movl	$256, %edx                      # imm = 0x100
	callq	_Z27__device_stub__complex2realP15HIP_vector_typeIfLj2EEPfi
.LBB2_24:
	movq	16(%rsp), %rsi
	movl	$262144, %edx                   # imm = 0x40000
	movq	%r14, %rdi
	movl	$2, %ecx
	callq	hipMemcpy
	leaq	88(%rsp), %r14
	movq	(%r14), %rdi
	xorl	%r13d, %r13d
	xorl	%esi, %esi
	callq	hipEventRecord
	movq	(%r14), %rdi
	callq	hipEventSynchronize
	leaq	84(%rsp), %r15
	movl	$0, (%r15)
	leaq	24(%rsp), %r12
	movq	(%r12), %rsi
	movq	(%r14), %rdx
	movq	%r15, %rdi
	callq	hipEventElapsedTime
	cvtss2sd	(%r15), %xmm0
	movl	$.L.str.1, %edi
	movb	$1, %al
	callq	printf
	movq	%r12, %rdi
	callq	hipEventCreate
	movq	%r14, %rdi
	callq	hipEventCreate
	movl	$1048576, %edi                  # imm = 0x100000
	callq	_Znam
	movq	%rax, %r14
	movl	$1048576, %edi                  # imm = 0x100000
	callq	_Znam
	movq	%rax, %r15
	movss	.LCPI2_6(%rip), %xmm2           # xmm2 = mem[0],zero,zero,zero
	xorps	%xmm3, %xmm3
	movq	%rax, %r12
	movsd	.LCPI2_1(%rip), %xmm1           # xmm1 = mem[0],zero
.LBB2_25:                               # %.preheader559
                                        # =>This Loop Header: Depth=1
                                        #     Child Loop BB2_26 Depth 2
	xorps	%xmm0, %xmm0
	cvtsi2ss	%r13d, %xmm0
	mulss	%xmm2, %xmm0
	addss	%xmm3, %xmm0
	cvtss2sd	%xmm0, %xmm0
	addsd	%xmm1, %xmm0
	mulsd	%xmm0, %xmm0
	movsd	%xmm0, 32(%rsp)                 # 8-byte Spill
	xorl	%ebp, %ebp
.LBB2_26:                               #   Parent Loop BB2_25 Depth=1
                                        # =>  This Inner Loop Header: Depth=2
	xorps	%xmm0, %xmm0
	cvtsi2ss	%ebp, %xmm0
	mulss	%xmm2, %xmm0
	addss	%xmm3, %xmm0
	cvtss2sd	%xmm0, %xmm0
	addsd	%xmm1, %xmm0
	mulsd	%xmm0, %xmm0
	addsd	32(%rsp), %xmm0                 # 8-byte Folded Reload
	cvtsd2ss	%xmm0, %xmm0
	movaps	%xmm0, %xmm1
	movss	.LCPI2_2(%rip), %xmm3           # xmm3 = mem[0],zero,zero,zero
	addss	%xmm3, %xmm1
	movaps	%xmm0, %xmm2
	mulss	.LCPI2_3(%rip), %xmm2
	divss	%xmm2, %xmm1
	cvtss2sd	%xmm1, %xmm1
	movsd	%xmm1, 48(%rsp)                 # 8-byte Spill
	divss	%xmm3, %xmm0
	cvtss2sd	%xmm0, %xmm0
	movsd	%xmm0, 40(%rsp)                 # 8-byte Spill
	callq	exp
	mulsd	48(%rsp), %xmm0                 # 8-byte Folded Reload
	cvtsd2ss	%xmm0, %xmm0
	movss	%xmm0, (%r12,%rbp,4)
	movsd	40(%rsp), %xmm0                 # 8-byte Reload
                                        # xmm0 = mem[0],zero
	callq	exp
	xorps	%xmm3, %xmm3
	movss	.LCPI2_6(%rip), %xmm2           # xmm2 = mem[0],zero,zero,zero
	movsd	.LCPI2_1(%rip), %xmm1           # xmm1 = mem[0],zero
	incq	%rbp
	cmpq	$512, %rbp                      # imm = 0x200
	jne	.LBB2_26
# %bb.27:                               #   in Loop: Header=BB2_25 Depth=1
	incq	%r13
	addq	$2048, %r12                     # imm = 0x800
	cmpq	$512, %r13                      # imm = 0x200
	jne	.LBB2_25
# %bb.28:
	movl	$2048, %edi                     # imm = 0x800
	callq	_Znam
	movq	%rax, %r12
	xorl	%eax, %eax
	movsd	.LCPI2_4(%rip), %xmm1           # xmm1 = mem[0],zero
.LBB2_29:                               # =>This Inner Loop Header: Depth=1
	xorps	%xmm0, %xmm0
	cvtsi2sd	%eax, %xmm0
	mulsd	%xmm1, %xmm0
	cvtsd2ss	%xmm0, %xmm0
	movss	%xmm0, (%r12,%rax,2)
	addq	$2, %rax
	cmpq	$514, %rax                      # imm = 0x202
	jne	.LBB2_29
# %bb.30:                               # %.preheader558.preheader
	xorl	%eax, %eax
.LBB2_31:                               # %.preheader558
                                        # =>This Inner Loop Header: Depth=1
	leal	-510(%rax), %ecx
	xorps	%xmm0, %xmm0
	cvtsi2sd	%ecx, %xmm0
	mulsd	%xmm1, %xmm0
	cvtsd2ss	%xmm0, %xmm0
	movss	%xmm0, 1028(%r12,%rax,2)
	addq	$2, %rax
	cmpq	$510, %rax                      # imm = 0x1FE
	jne	.LBB2_31
# %bb.32:
	leaq	112(%rsp), %rbp
	movl	$2048, %esi                     # imm = 0x800
	movq	%rbp, %rdi
	callq	hipMalloc
	leaq	72(%rsp), %r13
	movl	$1048576, %esi                  # imm = 0x100000
	movq	%r13, %rdi
	callq	hipMalloc
	leaq	16(%rsp), %rdi
	movl	$1048576, %esi                  # imm = 0x100000
	callq	hipMalloc
	movq	24(%rsp), %rdi
	xorl	%esi, %esi
	callq	hipEventRecord
	movq	(%rbp), %rdi
	movl	$2048, %edx                     # imm = 0x800
	movq	%r12, %rsi
	movl	$1, %ecx
	callq	hipMemcpy
	movq	(%r13), %rdi
	movl	$1048576, %edx                  # imm = 0x100000
	movq	%r15, %rsi
	movl	$1, %ecx
	callq	hipMemcpy
	leaq	64(%rsp), %rdi
	movl	$2097152, %esi                  # imm = 0x200000
	callq	hipMalloc
	leaq	104(%rsp), %rdi
	movl	$2097152, %esi                  # imm = 0x200000
	callq	hipMalloc
	leaq	8(%rsp), %rdi
	movl	$2097152, %esi                  # imm = 0x200000
	callq	hipMalloc
	leaq	56(%rsp), %rdi
	movl	$2097152, %esi                  # imm = 0x200000
	callq	hipMalloc
	movabsq	$68719476752, %rdi              # imm = 0x1000000010
	movl	$1, %esi
	movq	%rbx, %rdx
	movl	$1, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	__hipPushCallConfiguration
	testl	%eax, %eax
	jne	.LBB2_34
# %bb.33:
	movq	72(%rsp), %rdi
	movq	8(%rsp), %rsi
	movl	$512, %edx                      # imm = 0x200
	callq	_Z27__device_stub__real2complexPfP15HIP_vector_typeIfLj2EEi
.LBB2_34:
	leaq	96(%rsp), %r15
	movq	%r15, %rdi
	movl	$512, %esi                      # imm = 0x200
	movl	$512, %edx                      # imm = 0x200
	movl	$41, %ecx
	callq	hipfftPlan2d
	movq	(%r15), %rdi
	movq	8(%rsp), %rsi
	movq	64(%rsp), %rdx
	movl	$-1, %ecx
	callq	hipfftExecC2C
	movq	%rbx, %rdi
	movl	$1, %esi
	movq	%rbx, %rdx
	movl	$1, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	__hipPushCallConfiguration
	testl	%eax, %eax
	jne	.LBB2_36
# %bb.35:
	movq	56(%rsp), %rdi
	movq	16(%rsp), %rsi
	movl	$512, %edx                      # imm = 0x200
	callq	_Z27__device_stub__complex2realP15HIP_vector_typeIfLj2EEPfi
.LBB2_36:
	movq	16(%rsp), %rsi
	movl	$1048576, %edx                  # imm = 0x100000
	movq	%r14, %rdi
	movl	$2, %ecx
	callq	hipMemcpy
	leaq	88(%rsp), %r14
	movq	(%r14), %rdi
	xorl	%r13d, %r13d
	xorl	%esi, %esi
	callq	hipEventRecord
	movq	(%r14), %rdi
	callq	hipEventSynchronize
	leaq	84(%rsp), %r15
	movl	$0, (%r15)
	leaq	24(%rsp), %r12
	movq	(%r12), %rsi
	movq	(%r14), %rdx
	movq	%r15, %rdi
	callq	hipEventElapsedTime
	cvtss2sd	(%r15), %xmm0
	movl	$.L.str.2, %edi
	movb	$1, %al
	callq	printf
	movq	%r12, %rdi
	callq	hipEventCreate
	movq	%r14, %rdi
	callq	hipEventCreate
	movl	$4194304, %edi                  # imm = 0x400000
	callq	_Znam
	movq	%rax, %r14
	movl	$4194304, %edi                  # imm = 0x400000
	callq	_Znam
	movq	%rax, %r15
	xorps	%xmm3, %xmm3
	movq	%rax, %r12
	movss	.LCPI2_0(%rip), %xmm1           # xmm1 = mem[0],zero,zero,zero
	movsd	.LCPI2_1(%rip), %xmm2           # xmm2 = mem[0],zero
.LBB2_37:                               # %.preheader557
                                        # =>This Loop Header: Depth=1
                                        #     Child Loop BB2_38 Depth 2
	xorps	%xmm0, %xmm0
	cvtsi2ss	%r13d, %xmm0
	mulss	%xmm1, %xmm0
	addss	%xmm3, %xmm0
	cvtss2sd	%xmm0, %xmm0
	addsd	%xmm2, %xmm0
	mulsd	%xmm0, %xmm0
	movsd	%xmm0, 32(%rsp)                 # 8-byte Spill
	xorl	%ebp, %ebp
.LBB2_38:                               #   Parent Loop BB2_37 Depth=1
                                        # =>  This Inner Loop Header: Depth=2
	xorps	%xmm0, %xmm0
	cvtsi2ss	%ebp, %xmm0
	mulss	%xmm1, %xmm0
	addss	%xmm3, %xmm0
	cvtss2sd	%xmm0, %xmm0
	addsd	%xmm2, %xmm0
	mulsd	%xmm0, %xmm0
	addsd	32(%rsp), %xmm0                 # 8-byte Folded Reload
	cvtsd2ss	%xmm0, %xmm0
	movaps	%xmm0, %xmm1
	movss	.LCPI2_2(%rip), %xmm3           # xmm3 = mem[0],zero,zero,zero
	addss	%xmm3, %xmm1
	movaps	%xmm0, %xmm2
	mulss	.LCPI2_3(%rip), %xmm2
	divss	%xmm2, %xmm1
	cvtss2sd	%xmm1, %xmm1
	movsd	%xmm1, 48(%rsp)                 # 8-byte Spill
	divss	%xmm3, %xmm0
	cvtss2sd	%xmm0, %xmm0
	movsd	%xmm0, 40(%rsp)                 # 8-byte Spill
	callq	exp
	mulsd	48(%rsp), %xmm0                 # 8-byte Folded Reload
	cvtsd2ss	%xmm0, %xmm0
	movss	%xmm0, (%r12,%rbp,4)
	movsd	40(%rsp), %xmm0                 # 8-byte Reload
                                        # xmm0 = mem[0],zero
	callq	exp
	xorps	%xmm3, %xmm3
	movsd	.LCPI2_1(%rip), %xmm2           # xmm2 = mem[0],zero
	movss	.LCPI2_0(%rip), %xmm1           # xmm1 = mem[0],zero,zero,zero
	incq	%rbp
	cmpq	$1024, %rbp                     # imm = 0x400
	jne	.LBB2_38
# %bb.39:                               #   in Loop: Header=BB2_37 Depth=1
	incq	%r13
	addq	$4096, %r12                     # imm = 0x1000
	cmpq	$1024, %r13                     # imm = 0x400
	jne	.LBB2_37
# %bb.40:
	movl	$4096, %edi                     # imm = 0x1000
	callq	_Znam
	movq	%rax, %r12
	xorl	%eax, %eax
	movsd	.LCPI2_4(%rip), %xmm1           # xmm1 = mem[0],zero
.LBB2_41:                               # =>This Inner Loop Header: Depth=1
	xorps	%xmm0, %xmm0
	cvtsi2sd	%eax, %xmm0
	mulsd	%xmm1, %xmm0
	cvtsd2ss	%xmm0, %xmm0
	movss	%xmm0, (%r12,%rax,2)
	addq	$2, %rax
	cmpq	$1026, %rax                     # imm = 0x402
	jne	.LBB2_41
# %bb.42:                               # %.preheader.preheader
	xorl	%eax, %eax
.LBB2_43:                               # %.preheader
                                        # =>This Inner Loop Header: Depth=1
	leal	-1022(%rax), %ecx
	xorps	%xmm0, %xmm0
	cvtsi2sd	%ecx, %xmm0
	mulsd	%xmm1, %xmm0
	cvtsd2ss	%xmm0, %xmm0
	movss	%xmm0, 2052(%r12,%rax,2)
	addq	$2, %rax
	cmpq	$1022, %rax                     # imm = 0x3FE
	jne	.LBB2_43
# %bb.44:
	leaq	112(%rsp), %rbp
	movl	$4096, %esi                     # imm = 0x1000
	movq	%rbp, %rdi
	callq	hipMalloc
	leaq	72(%rsp), %r13
	movl	$4194304, %esi                  # imm = 0x400000
	movq	%r13, %rdi
	callq	hipMalloc
	leaq	16(%rsp), %rdi
	movl	$4194304, %esi                  # imm = 0x400000
	callq	hipMalloc
	movq	24(%rsp), %rdi
	xorl	%esi, %esi
	callq	hipEventRecord
	movq	(%rbp), %rdi
	movl	$4096, %edx                     # imm = 0x1000
	movq	%r12, %rsi
	movl	$1, %ecx
	callq	hipMemcpy
	movq	(%r13), %rdi
	movl	$4194304, %edx                  # imm = 0x400000
	movq	%r15, %rsi
	movl	$1, %ecx
	callq	hipMemcpy
	leaq	64(%rsp), %rdi
	movl	$8388608, %esi                  # imm = 0x800000
	callq	hipMalloc
	leaq	104(%rsp), %rdi
	movl	$8388608, %esi                  # imm = 0x800000
	callq	hipMalloc
	leaq	8(%rsp), %rdi
	movl	$8388608, %esi                  # imm = 0x800000
	callq	hipMalloc
	leaq	56(%rsp), %rdi
	movl	$8388608, %esi                  # imm = 0x800000
	callq	hipMalloc
	movq	%rbx, %rdi
	movl	$1, %esi
	movq	%rbx, %rdx
	movl	$1, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	__hipPushCallConfiguration
	testl	%eax, %eax
	jne	.LBB2_46
# %bb.45:
	movq	72(%rsp), %rdi
	movq	8(%rsp), %rsi
	movl	$1024, %edx                     # imm = 0x400
	callq	_Z27__device_stub__real2complexPfP15HIP_vector_typeIfLj2EEi
.LBB2_46:
	leaq	96(%rsp), %r15
	movq	%r15, %rdi
	movl	$1024, %esi                     # imm = 0x400
	movl	$1024, %edx                     # imm = 0x400
	movl	$41, %ecx
	callq	hipfftPlan2d
	movq	(%r15), %rdi
	movq	8(%rsp), %rsi
	movq	64(%rsp), %rdx
	movl	$-1, %ecx
	callq	hipfftExecC2C
	movq	%rbx, %rdi
	movl	$1, %esi
	movq	%rbx, %rdx
	movl	$1, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	__hipPushCallConfiguration
	testl	%eax, %eax
	jne	.LBB2_48
# %bb.47:
	movq	56(%rsp), %rdi
	movq	16(%rsp), %rsi
	movl	$1024, %edx                     # imm = 0x400
	callq	_Z27__device_stub__complex2realP15HIP_vector_typeIfLj2EEPfi
.LBB2_48:
	movq	16(%rsp), %rsi
	movl	$4194304, %edx                  # imm = 0x400000
	movq	%r14, %rdi
	movl	$2, %ecx
	callq	hipMemcpy
	movq	88(%rsp), %rdi
	xorl	%esi, %esi
	callq	hipEventRecord
	movq	88(%rsp), %rdi
	callq	hipEventSynchronize
	leaq	84(%rsp), %rbx
	movl	$0, (%rbx)
	movq	24(%rsp), %rsi
	movq	88(%rsp), %rdx
	movq	%rbx, %rdi
	callq	hipEventElapsedTime
	cvtss2sd	(%rbx), %xmm0
	movl	$.L.str.3, %edi
	movb	$1, %al
	callq	printf
	xorl	%eax, %eax
	addq	$120, %rsp
	.cfi_def_cfa_offset 56
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%r12
	.cfi_def_cfa_offset 40
	popq	%r13
	.cfi_def_cfa_offset 32
	popq	%r14
	.cfi_def_cfa_offset 24
	popq	%r15
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	retq
.Lfunc_end2:
	.size	main, .Lfunc_end2-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	.LBB3_2
# %bb.1:
	movl	$__hip_fatbin_wrapper, %edi
	callq	__hipRegisterFatBinary
	movq	%rax, %rbx
	movq	%rax, __hip_gpubin_handle(%rip)
.LBB3_2:
	xorps	%xmm0, %xmm0
	movups	%xmm0, 16(%rsp)
	movups	%xmm0, (%rsp)
	movl	$_Z12real2complexPfP15HIP_vector_typeIfLj2EEi, %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	$_Z12complex2realP15HIP_vector_typeIfLj2EEPfi, %esi
	movl	$.L__unnamed_2, %edx
	movl	$.L__unnamed_2, %ecx
	movq	%rbx, %rdi
	movl	$-1, %r8d
	xorl	%r9d, %r9d
	callq	__hipRegisterFunction
	movl	$__hip_module_dtor, %edi
	addq	$32, %rsp
	.cfi_def_cfa_offset 16
	popq	%rbx
	.cfi_def_cfa_offset 8
	jmp	atexit                          # TAILCALL
.Lfunc_end3:
	.size	__hip_module_ctor, .Lfunc_end3-__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	.LBB4_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
.LBB4_2:
	retq
.Lfunc_end4:
	.size	__hip_module_dtor, .Lfunc_end4-__hip_module_dtor
	.cfi_endproc
                                        # -- End function
	.type	_Z12real2complexPfP15HIP_vector_typeIfLj2EEi,@object # @_Z12real2complexPfP15HIP_vector_typeIfLj2EEi
	.section	.rodata,"a",@progbits
	.globl	_Z12real2complexPfP15HIP_vector_typeIfLj2EEi
	.p2align	3, 0x0
_Z12real2complexPfP15HIP_vector_typeIfLj2EEi:
	.quad	_Z27__device_stub__real2complexPfP15HIP_vector_typeIfLj2EEi
	.size	_Z12real2complexPfP15HIP_vector_typeIfLj2EEi, 8

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

	.type	.L.str,@object                  # @.str
	.section	.rodata.str1.1,"aMS",@progbits,1
.L.str:
	.asciz	"fft+criacao_plano: %0.3fms\n"
	.size	.L.str, 28

	.type	.L.str.1,@object                # @.str.1
.L.str.1:
	.asciz	"tempo 256x256: %0.3fms\n"
	.size	.L.str.1, 24

	.type	.L.str.2,@object                # @.str.2
.L.str.2:
	.asciz	"tempo 512x512: %0.3fms\n"
	.size	.L.str.2, 24

	.type	.L.str.3,@object                # @.str.3
.L.str.3:
	.asciz	"tempo 1024x1024: %0.3fms\n"
	.size	.L.str.3, 26

	.type	.L__unnamed_1,@object           # @0
.L__unnamed_1:
	.asciz	"_Z12real2complexPfP15HIP_vector_typeIfLj2EEi"
	.size	.L__unnamed_1, 45

	.type	.L__unnamed_2,@object           # @1
.L__unnamed_2:
	.asciz	"_Z12complex2realP15HIP_vector_typeIfLj2EEPfi"
	.size	.L__unnamed_2, 45

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

	.type	__hip_gpubin_handle,@object     # @__hip_gpubin_handle
	.local	__hip_gpubin_handle
	.comm	__hip_gpubin_handle,8,8
	.section	.init_array,"aw",@init_array
	.p2align	3, 0x0
	.quad	__hip_module_ctor
	.type	__hip_cuid_,@object             # @__hip_cuid_
	.bss
	.globl	__hip_cuid_
__hip_cuid_:
	.byte	0                               # 0x0
	.size	__hip_cuid_, 1

	.ident	"AMD clang version 18.0.0git (https://github.com/RadeonOpenCompute/llvm-project roc-6.3.2 25012 e5bf7e55c91490b07c49d8960fa7983d864936c4)"
	.section	".note.GNU-stack","",@progbits
	.addrsig
	.addrsig_sym _Z27__device_stub__real2complexPfP15HIP_vector_typeIfLj2EEi
	.addrsig_sym _Z27__device_stub__complex2realP15HIP_vector_typeIfLj2EEPfi
	.addrsig_sym __hip_module_ctor
	.addrsig_sym __hip_module_dtor
	.addrsig_sym _Z12real2complexPfP15HIP_vector_typeIfLj2EEi
	.addrsig_sym _Z12complex2realP15HIP_vector_typeIfLj2EEPfi
	.addrsig_sym __hip_fatbin
	.addrsig_sym __hip_fatbin_wrapper
	.addrsig_sym __hip_cuid_

	.text
	.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
	.protected	_Z12real2complexPfP15HIP_vector_typeIfLj2EEi ; -- Begin function _Z12real2complexPfP15HIP_vector_typeIfLj2EEi
	.globl	_Z12real2complexPfP15HIP_vector_typeIfLj2EEi
	.p2align	8
	.type	_Z12real2complexPfP15HIP_vector_typeIfLj2EEi,@function
_Z12real2complexPfP15HIP_vector_typeIfLj2EEi: ; @_Z12real2complexPfP15HIP_vector_typeIfLj2EEi
; %bb.0:
	s_clause 0x1
	s_load_b32 s3, s[0:1], 0x24
	s_load_b32 s2, s[0:1], 0x10
	v_and_b32_e32 v2, 0x3ff, v0
	v_bfe_u32 v3, v0, 10, 10
	s_waitcnt lgkmcnt(0)
	s_lshr_b32 s4, s3, 16
	s_and_b32 s3, s3, 0xffff
	s_delay_alu instid0(VALU_DEP_1) | instid1(SALU_CYCLE_1)
	v_mad_u64_u32 v[0:1], null, s14, s3, v[2:3]
	v_mad_u64_u32 v[1:2], null, s15, s4, v[3:4]
	s_mov_b32 s3, exec_lo
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_max_i32_e32 v2, v0, v1
	v_cmpx_gt_i32_e64 s2, v2
	s_cbranch_execz .LBB0_2
; %bb.1:
	s_load_b128 s[4:7], s[0:1], 0x0
	v_mad_u64_u32 v[2:3], null, v1, s2, v[0:1]
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_ashrrev_i32_e32 v3, 31, v2
	v_lshlrev_b64 v[0:1], 2, v[2:3]
	s_waitcnt lgkmcnt(0)
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_add_co_u32 v0, vcc_lo, s4, v0
	v_add_co_ci_u32_e32 v1, vcc_lo, s5, v1, vcc_lo
	global_load_b32 v0, v[0:1], off
	v_lshlrev_b64 v[1:2], 3, v[2:3]
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_add_co_u32 v3, vcc_lo, s6, v1
	v_add_co_ci_u32_e32 v4, vcc_lo, s7, v2, vcc_lo
	v_mov_b32_e32 v1, 0
	s_waitcnt vmcnt(0)
	global_store_b64 v[3:4], v[0:1], off
.LBB0_2:
	s_nop 0
	s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
	s_endpgm
	.section	.rodata,"a",@progbits
	.p2align	6, 0x0
	.amdhsa_kernel _Z12real2complexPfP15HIP_vector_typeIfLj2EEi
		.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_end0:
	.size	_Z12real2complexPfP15HIP_vector_typeIfLj2EEi, .Lfunc_end0-_Z12real2complexPfP15HIP_vector_typeIfLj2EEi
                                        ; -- End function
	.section	.AMDGPU.csdata,"",@progbits
; Kernel info:
; codeLenInByte = 208
; 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
	.protected	_Z12complex2realP15HIP_vector_typeIfLj2EEPfi ; -- Begin function _Z12complex2realP15HIP_vector_typeIfLj2EEPfi
	.globl	_Z12complex2realP15HIP_vector_typeIfLj2EEPfi
	.p2align	8
	.type	_Z12complex2realP15HIP_vector_typeIfLj2EEPfi,@function
_Z12complex2realP15HIP_vector_typeIfLj2EEPfi: ; @_Z12complex2realP15HIP_vector_typeIfLj2EEPfi
; %bb.0:
	s_load_b32 s2, s[0:1], 0x10
	v_and_b32_e32 v1, 0x3ff, v0
	v_bfe_u32 v2, v0, 10, 10
	s_mov_b32 s3, exec_lo
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_lshl_add_u32 v0, s14, 5, v1
	v_lshl_add_u32 v1, s15, 5, v2
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(VALU_DEP_1)
	v_max_i32_e32 v2, v0, v1
	s_waitcnt lgkmcnt(0)
	v_cmpx_gt_i32_e64 s2, v2
	s_cbranch_execz .LBB1_2
; %bb.1:
	s_load_b128 s[4:7], s[0:1], 0x0
	v_mad_u64_u32 v[2:3], null, v1, s2, v[0:1]
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_ashrrev_i32_e32 v3, 31, v2
	v_lshlrev_b64 v[0:1], 3, v[2:3]
	s_waitcnt lgkmcnt(0)
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_add_co_u32 v0, vcc_lo, s4, v0
	v_add_co_ci_u32_e32 v1, vcc_lo, s5, v1, vcc_lo
	global_load_b32 v4, v[0:1], off
	v_cvt_f32_i32_e32 v0, s2
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(VALU_DEP_1)
	v_mul_f32_e32 v5, v0, v0
	s_waitcnt vmcnt(0)
	v_div_scale_f32 v0, null, v5, v5, v4
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_2) | instid1(VALU_DEP_1)
	v_rcp_f32_e32 v6, v0
	s_waitcnt_depctr 0xfff
	v_fma_f32 v1, -v0, v6, 1.0
	v_fmac_f32_e32 v6, v1, v6
	v_div_scale_f32 v1, vcc_lo, v4, v5, v4
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_mul_f32_e32 v7, v1, v6
	v_fma_f32 v8, -v0, v7, v1
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_fmac_f32_e32 v7, v8, v6
	v_fma_f32 v8, -v0, v7, v1
	v_lshlrev_b64 v[0:1], 2, v[2:3]
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_div_fmas_f32 v2, v8, v6, v7
	v_add_co_u32 v0, vcc_lo, s6, v0
	s_delay_alu instid0(VALU_DEP_3) | instskip(NEXT) | instid1(VALU_DEP_3)
	v_add_co_ci_u32_e32 v1, vcc_lo, s7, v1, vcc_lo
	v_div_fixup_f32 v2, v2, v5, v4
	global_store_b32 v[0:1], v2, off
.LBB1_2:
	s_nop 0
	s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
	s_endpgm
	.section	.rodata,"a",@progbits
	.p2align	6, 0x0
	.amdhsa_kernel _Z12complex2realP15HIP_vector_typeIfLj2EEPfi
		.amdhsa_group_segment_fixed_size 0
		.amdhsa_private_segment_fixed_size 0
		.amdhsa_kernarg_size 20
		.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 9
		.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	_Z12complex2realP15HIP_vector_typeIfLj2EEPfi, .Lfunc_end1-_Z12complex2realP15HIP_vector_typeIfLj2EEPfi
                                        ; -- End function
	.section	.AMDGPU.csdata,"",@progbits
; Kernel info:
; codeLenInByte = 284
; NumSgprs: 18
; NumVgprs: 9
; ScratchSize: 0
; MemoryBound: 0
; FloatMode: 240
; IeeeMode: 1
; LDSByteSize: 0 bytes/workgroup (compile time only)
; SGPRBlocks: 2
; VGPRBlocks: 1
; NumSGPRsForWavesPerEU: 18
; NumVGPRsForWavesPerEU: 9
; 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:           _Z12real2complexPfP15HIP_vector_typeIfLj2EEi
    .private_segment_fixed_size: 0
    .sgpr_count:     18
    .sgpr_spill_count: 0
    .symbol:         _Z12real2complexPfP15HIP_vector_typeIfLj2EEi.kd
    .uniform_work_group_size: 1
    .uses_dynamic_stack: false
    .vgpr_count:     5
    .vgpr_spill_count: 0
    .wavefront_size: 32
    .workgroup_processor_mode: 1
  - .args:
      - .address_space:  global
        .offset:         0
        .size:           8
        .value_kind:     global_buffer
      - .address_space:  global
        .offset:         8
        .size:           8
        .value_kind:     global_buffer
      - .offset:         16
        .size:           4
        .value_kind:     by_value
    .group_segment_fixed_size: 0
    .kernarg_segment_align: 8
    .kernarg_segment_size: 20
    .language:       OpenCL C
    .language_version:
      - 2
      - 0
    .max_flat_workgroup_size: 1024
    .name:           _Z12complex2realP15HIP_vector_typeIfLj2EEPfi
    .private_segment_fixed_size: 0
    .sgpr_count:     18
    .sgpr_spill_count: 0
    .symbol:         _Z12complex2realP15HIP_vector_typeIfLj2EEPfi.kd
    .uniform_work_group_size: 1
    .uses_dynamic_stack: false
    .vgpr_count:     9
    .vgpr_spill_count: 0
    .wavefront_size: 32
    .workgroup_processor_mode: 1
amdhsa.target:   amdgcn-amd-amdhsa--gfx1100
amdhsa.version:
  - 1
  - 2
...

	.end_amdgpu_metadata
