#include <stdlib.h>
#include <stdio.h>
#include <stdint.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <cufft.h>
#include <math.h>
cudaEvent_t t_start, t_stop;
cufftHandle plan;

__global__ void filter_block(float *input_buffer, float *taps, float *output_buffer, int N, int P)
{
 float temp_output = 0;

 for (int x=0; x < P; x++) {
  temp_output += taps[threadIdx.x + x*N]*input_buffer[threadIdx.x + x*N + (blockIdx.x*blockDim.x)];
   // input buffer of continuous voltage samples should be distributed amongst N channels
   // index into input buffer:
   //     current thread index indicates which channel we are currently processing
   //     x which tap we are getting data for
   //     blockIdx.x * blockDim.x is our depth into the block of data in multiples of channel number
   // structure of taps vector is actually [N,P]. So each thread will read taps[channel_number:channel_number+8] for taps
 } 

 output_buffer[threadIdx.x + (blockIdx.x*blockDim.x)] = temp_output;
}

int main(int argc, char **argv) {
 int write_block = 1024*1024;
  // 1 MB worth of data at a time...
 int N = 512;
  // # of frequency channels in the PFB
 int P = 8;
  // length of pre filtering
 int write_size = sizeof(float) * write_block;
 int tap_size = sizeof(float) * P * N;
 int fft_output_size = (write_block / N) * sizeof(cufftComplex) * (N/2 + 1);
  // hold BATCH (write_block / N) worth of complex FFT outputs
 int fh;
 unsigned int i=0;
 char *data_file;
 char *fir_taps_file;
 char *base_buffer;
 float *float_buffer;
 float et;
  // counter for elapsed time of cuda ops
 float *fir_taps;
 float *device_input_buffer;
 float *device_output_buffer;
 cufftComplex *fft_output_buffer;
 cufftComplex *fft_buffer;
 float *device_fir_taps;

 if (argc > 2) {
  data_file = argv[1];
  fir_taps_file = argv[2];
 } else { printf("Please supply both data and fir_taps filenames...\n"); return -1;}

 base_buffer = (char*)malloc(write_block);
 float_buffer = (float*)malloc(write_size);
 fir_taps = (float*)malloc(tap_size);
 fft_buffer = (cufftComplex*)malloc(fft_output_size);

 fh = open(fir_taps_file, O_RDONLY);
 read(fh, fir_taps, tap_size);
  // source of taps vector should be flattened [P,N] array
 close(fh);
 //for (i=0; i < P*N; i++) { fprintf(stderr,"%f ",(float)*(fir_taps+i));}

 fh = open(data_file, O_LARGEFILE);
 read(fh, base_buffer, write_block);
  // read in a write block worth of int8

 cudaEventCreate(&t_start);
 cudaEventCreate(&t_stop);

 cudaMalloc((void**)&device_input_buffer, write_size);
 cudaMalloc((void**)&device_output_buffer, write_size);
 cudaMalloc((void**)&fft_output_buffer, fft_output_size);
 cudaMalloc((void**)&device_fir_taps, tap_size);
  // allocate the device storage

 cudaMemcpy(device_fir_taps, fir_taps, tap_size, cudaMemcpyHostToDevice);                         
  // copy the filter taps to the device

 int threadsPerBlock = N;
 int blocksPerGrid = write_block / N;
 fprintf(stderr,"Blocks per grid: %i, Threads per block: %i\n",blocksPerGrid, threadsPerBlock);
 cufftPlan1d(&plan, N, CUFFT_R2C, int(write_block/N));
 fprintf(stderr,"FFT Plan has length %i with batch size %i\n",N, int(write_block/N));

 for (i = 0; i < write_block; ++i) {
  *(float_buffer+i) = (float)*(base_buffer+i);
 }

 //write(1, float_buffer, write_size);
 // output the raw data for comparison..
 //for (i=0; i < write_block; i++) { fprintf(stderr,"Base: %i, Float: %f\n",(int)*(base_buffer+i),(float)*(float_buffer+i)); }

 cudaEventRecord(t_start, 0);
 cudaMemcpy(device_input_buffer, float_buffer, write_size, cudaMemcpyHostToDevice);       
  // copy the floats to the device
 filter_block<<<blocksPerGrid, threadsPerBlock>>>(device_input_buffer, device_fir_taps, device_output_buffer, N, P);
  // kernel applies pre filtering to entire block leaving it in device_output_buffer ready for FFT
 cudaMemcpy(float_buffer, device_output_buffer, write_size, cudaMemcpyDeviceToHost);
  // get the intermediate results...
 write(1, float_buffer, write_size);
  // output the intermediate results...
 cufftExecR2C(plan, (cufftReal*)device_output_buffer, (cufftComplex*)fft_output_buffer);
  // Do FFT's over the entire block, one column at a time
 cudaMemcpy(fft_buffer, fft_output_buffer, fft_output_size, cudaMemcpyDeviceToHost);
  // get the final block
 //for (i=0; i < 100 * (N/2 + 1); i++) { fprintf(stderr,"Complex value %i has x=%f, y=%f\n", i, fft_buffer[i].x, fft_buffer[i].y); }
 cudaEventRecord(t_stop, 0);
 cudaEventSynchronize(t_stop);
 cudaEventElapsedTime(&et, t_start, t_stop);
 
 fprintf(stderr,"Done. CUDA time is %f ms\n", et);
 write(1, fft_buffer, write_size);
  // emit to stdout (which has hopefully been redirected...)
 return 0;
}

	.file	"tmpxft_002db51b_00000000-6_pfb_float.cudafe1.cpp"
	.text
#APP

#NO_APP
	.type	_ZL26__cudaUnregisterBinaryUtilv, @function
_ZL26__cudaUnregisterBinaryUtilv:
.LFB2070:
	.cfi_startproc
	endbr64
	movq	_ZL20__cudaFatCubinHandle(%rip), %rdi
	jmp	__cudaUnregisterFatBinary@PLT
	.cfi_endproc
.LFE2070:
	.size	_ZL26__cudaUnregisterBinaryUtilv, .-_ZL26__cudaUnregisterBinaryUtilv
	.globl	_Z38__device_stub__Z12filter_blockPfS_S_iiPfS_S_ii
	.type	_Z38__device_stub__Z12filter_blockPfS_S_iiPfS_S_ii, @function
_Z38__device_stub__Z12filter_blockPfS_S_iiPfS_S_ii:
.LFB2092:
	.cfi_startproc
	endbr64
	subq	$152, %rsp
	.cfi_def_cfa_offset 160
	movq	%rdi, 24(%rsp)
	leaq	48(%rsp), %rdi
	movq	%rsi, 16(%rsp)
	leaq	60(%rsp), %rsi
	movq	%rdx, 8(%rsp)
	leaq	32(%rsp), %rdx
	movl	%ecx, 4(%rsp)
	leaq	40(%rsp), %rcx
	movl	%r8d, (%rsp)
	movq	%fs:40, %rax
	movq	%rax, 136(%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)
	leaq	4(%rsp), %rax
	movq	%rax, 120(%rsp)
	movq	%rsp, %rax
	movq	%rax, 128(%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 168
	leaq	_Z12filter_blockPfS_S_ii(%rip), %rdi
	pushq	40(%rsp)
	.cfi_def_cfa_offset 176
	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 168
	popq	%rdx
	.cfi_def_cfa_offset 160
.L2:
	movq	136(%rsp), %rax
	subq	%fs:40, %rax
	je	.L4
	call	__stack_chk_fail@PLT
.L4:
	addq	$152, %rsp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE2092:
	.size	_Z38__device_stub__Z12filter_blockPfS_S_iiPfS_S_ii, .-_Z38__device_stub__Z12filter_blockPfS_S_iiPfS_S_ii
	.globl	_Z12filter_blockPfS_S_ii
	.type	_Z12filter_blockPfS_S_ii, @function
_Z12filter_blockPfS_S_ii:
.LFB2093:
	.cfi_startproc
	endbr64
	jmp	_Z38__device_stub__Z12filter_blockPfS_S_iiPfS_S_ii
	.cfi_endproc
.LFE2093:
	.size	_Z12filter_blockPfS_S_ii, .-_Z12filter_blockPfS_S_ii
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"Blocks per grid: %i, Threads per block: %i\n"
.LC1:
	.string	"FFT Plan has length %i with batch size %i\n"
.LC2:
	.string	"Please supply both data and fir_taps filenames...\n"
.LC3:
	.string	"Done. CUDA time is %f ms\n"
	.section	.text.startup,"ax",@progbits
	.globl	main
	.type	main, @function
main:
.LFB2067:
	.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
	subq	$72, %rsp
	.cfi_def_cfa_offset 128
	movq	%fs:40, %rax
	movq	%rax, 56(%rsp)
	xorl	%eax, %eax
	cmpl	$2, %edi
	jle	.L9
	movl	$1048576, %edi
	movq	16(%rsi), %r14
	movq	8(%rsi), %r15
	call	malloc@PLT
	movl	$4194304, %edi
	movq	%rax, %r12
	call	malloc@PLT
	movl	$16384, %edi
	movq	%rax, %rbx
	call	malloc@PLT
	movl	$4210688, %edi
	movq	%rax, %r13
	call	malloc@PLT
	movq	%r14, %rdi
	xorl	%esi, %esi
	movq	%rax, %rbp
	call	__open_2@PLT
	movl	$16384, %ecx
	movl	$16384, %edx
	movq	%r13, %rsi
	movl	%eax, %r14d
	movl	%eax, %edi
	call	__read_chk@PLT
	movl	%r14d, %edi
	call	close@PLT
	xorl	%esi, %esi
	movq	%r15, %rdi
	call	__open_2@PLT
	movl	$1048576, %ecx
	movl	$1048576, %edx
	movq	%r12, %rsi
	movl	%eax, %edi
	call	__read_chk@PLT
	leaq	t_start(%rip), %rdi
	call	cudaEventCreate@PLT
	leaq	t_stop(%rip), %rdi
	call	cudaEventCreate@PLT
	movq	%rsp, %rdi
	movl	$4194304, %esi
	call	cudaMalloc@PLT
	leaq	8(%rsp), %rdi
	movl	$4194304, %esi
	call	cudaMalloc@PLT
	leaq	16(%rsp), %rdi
	movl	$4210688, %esi
	call	cudaMalloc@PLT
	leaq	24(%rsp), %rdi
	movl	$16384, %esi
	call	cudaMalloc@PLT
	movq	24(%rsp), %rdi
	movl	$1, %ecx
	movq	%r13, %rsi
	movl	$16384, %edx
	call	cudaMemcpy@PLT
	movq	stderr(%rip), %rdi
	xorl	%eax, %eax
	movl	$512, %r8d
	movl	$2048, %ecx
	leaq	.LC0(%rip), %rdx
	movl	$2, %esi
	call	__fprintf_chk@PLT
	movl	$2048, %ecx
	movl	$42, %edx
	movl	$512, %esi
	leaq	plan(%rip), %rdi
	call	cufftPlan1d@PLT
	movq	stderr(%rip), %rdi
	xorl	%eax, %eax
	movl	$2048, %r8d
	movl	$512, %ecx
	leaq	.LC1(%rip), %rdx
	movl	$2, %esi
	call	__fprintf_chk@PLT
	xorl	%eax, %eax
	jmp	.L10
.L9:
	leaq	.LC2(%rip), %rsi
	movl	$2, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	orl	$-1, %eax
	jmp	.L8
.L10:
	movsbl	(%r12,%rax), %edx
	cvtsi2ssl	%edx, %xmm0
	movss	%xmm0, (%rbx,%rax,4)
	incq	%rax
	cmpq	$1048576, %rax
	jne	.L10
	movq	t_start(%rip), %rdi
	xorl	%esi, %esi
	call	cudaEventRecord@PLT
	movq	(%rsp), %rdi
	movl	$1, %ecx
	movq	%rbx, %rsi
	movl	$4194304, %edx
	call	cudaMemcpy@PLT
	movl	$8388609, %edx
	xorl	%r9d, %r9d
	xorl	%r8d, %r8d
	movl	$2097153, %edi
	salq	$9, %rdx
	movl	$1, %ecx
	movl	$1, %esi
	salq	$11, %rdi
	movq	%rdx, 44(%rsp)
	movl	$1, 52(%rsp)
	call	__cudaPushCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L12
	movq	8(%rsp), %rdx
	movq	24(%rsp), %rsi
	movl	$512, %ecx
	movl	$8, %r8d
	movq	(%rsp), %rdi
	call	_Z38__device_stub__Z12filter_blockPfS_S_iiPfS_S_ii
.L12:
	movq	8(%rsp), %rsi
	movl	$2, %ecx
	movl	$4194304, %edx
	movq	%rbx, %rdi
	call	cudaMemcpy@PLT
	movl	$4194304, %edx
	movq	%rbx, %rsi
	movl	$1, %edi
	call	write@PLT
	movq	16(%rsp), %rdx
	movq	8(%rsp), %rsi
	movl	plan(%rip), %edi
	call	cufftExecR2C@PLT
	movq	16(%rsp), %rsi
	movl	$2, %ecx
	movq	%rbp, %rdi
	movl	$4210688, %edx
	call	cudaMemcpy@PLT
	movq	t_stop(%rip), %rdi
	xorl	%esi, %esi
	call	cudaEventRecord@PLT
	movq	t_stop(%rip), %rdi
	call	cudaEventSynchronize@PLT
	movq	t_stop(%rip), %rdx
	leaq	44(%rsp), %rdi
	movq	t_start(%rip), %rsi
	call	cudaEventElapsedTime@PLT
	movq	stderr(%rip), %rdi
	leaq	.LC3(%rip), %rdx
	movb	$1, %al
	movl	$2, %esi
	cvtss2sd	44(%rsp), %xmm0
	call	__fprintf_chk@PLT
	movl	$4194304, %edx
	movq	%rbp, %rsi
	movl	$1, %edi
	call	write@PLT
	xorl	%eax, %eax
.L8:
	movq	56(%rsp), %rdx
	subq	%fs:40, %rdx
	je	.L13
	call	__stack_chk_fail@PLT
.L13:
	addq	$72, %rsp
	.cfi_def_cfa_offset 56
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE2067:
	.size	main, .-main
	.section	.rodata.str1.1
.LC4:
	.string	"_Z12filter_blockPfS_S_ii"
	.section	.text.startup
	.type	_ZL24__sti____cudaRegisterAllv, @function
_ZL24__sti____cudaRegisterAllv:
.LFB2095:
	.cfi_startproc
	endbr64
	pushq	%rax
	.cfi_def_cfa_offset 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	.LC4(%rip), %rdx
	movq	%rax, %rdi
	leaq	_Z12filter_blockPfS_S_ii(%rip), %rsi
	pushq	$0
	.cfi_def_cfa_offset 40
	movq	%rdx, %rcx
	pushq	$0
	.cfi_def_cfa_offset 48
	movq	%rax, _ZL20__cudaFatCubinHandle(%rip)
	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	%rdx
	.cfi_def_cfa_offset 8
	jmp	atexit@PLT
	.cfi_endproc
.LFE2095:
	.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	plan
	.bss
	.align 4
	.type	plan, @object
	.size	plan, 4
plan:
	.zero	4
	.globl	t_stop
	.align 8
	.type	t_stop, @object
	.size	t_stop, 8
t_stop:
	.zero	8
	.globl	t_start
	.align 8
	.type	t_start, @object
	.size	t_start, 8
t_start:
	.zero	8
	.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 <stdlib.h>
#include <stdio.h>
#include <stdint.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <hipfft/hipfft.h>
#include <math.h>
hipEvent_t t_start, t_stop;
hipfftHandle plan;

__global__ void filter_block(float *input_buffer, float *taps, float *output_buffer, int N, int P)
{
 float temp_output = 0;

 for (int x=0; x < P; x++) {
  temp_output += taps[threadIdx.x + x*N]*input_buffer[threadIdx.x + x*N + (blockIdx.x*blockDim.x)];
   // input buffer of continuous voltage samples should be distributed amongst N channels
   // index into input buffer:
   //     current thread index indicates which channel we are currently processing
   //     x which tap we are getting data for
   //     blockIdx.x * blockDim.x is our depth into the block of data in multiples of channel number
   // structure of taps vector is actually [N,P]. So each thread will read taps[channel_number:channel_number+8] for taps
 } 

 output_buffer[threadIdx.x + (blockIdx.x*blockDim.x)] = temp_output;
}

int main(int argc, char **argv) {
 int write_block = 1024*1024;
  // 1 MB worth of data at a time...
 int N = 512;
  // # of frequency channels in the PFB
 int P = 8;
  // length of pre filtering
 int write_size = sizeof(float) * write_block;
 int tap_size = sizeof(float) * P * N;
 int fft_output_size = (write_block / N) * sizeof(hipfftComplex) * (N/2 + 1);
  // hold BATCH (write_block / N) worth of complex FFT outputs
 int fh;
 unsigned int i=0;
 char *data_file;
 char *fir_taps_file;
 char *base_buffer;
 float *float_buffer;
 float et;
  // counter for elapsed time of cuda ops
 float *fir_taps;
 float *device_input_buffer;
 float *device_output_buffer;
 hipfftComplex *fft_output_buffer;
 hipfftComplex *fft_buffer;
 float *device_fir_taps;

 if (argc > 2) {
  data_file = argv[1];
  fir_taps_file = argv[2];
 } else { printf("Please supply both data and fir_taps filenames...\n"); return -1;}

 base_buffer = (char*)malloc(write_block);
 float_buffer = (float*)malloc(write_size);
 fir_taps = (float*)malloc(tap_size);
 fft_buffer = (hipfftComplex*)malloc(fft_output_size);

 fh = open(fir_taps_file, O_RDONLY);
 read(fh, fir_taps, tap_size);
  // source of taps vector should be flattened [P,N] array
 close(fh);
 //for (i=0; i < P*N; i++) { fprintf(stderr,"%f ",(float)*(fir_taps+i));}

 fh = open(data_file, O_LARGEFILE);
 read(fh, base_buffer, write_block);
  // read in a write block worth of int8

 hipEventCreate(&t_start);
 hipEventCreate(&t_stop);

 hipMalloc((void**)&device_input_buffer, write_size);
 hipMalloc((void**)&device_output_buffer, write_size);
 hipMalloc((void**)&fft_output_buffer, fft_output_size);
 hipMalloc((void**)&device_fir_taps, tap_size);
  // allocate the device storage

 hipMemcpy(device_fir_taps, fir_taps, tap_size, hipMemcpyHostToDevice);                         
  // copy the filter taps to the device

 int threadsPerBlock = N;
 int blocksPerGrid = write_block / N;
 fprintf(stderr,"Blocks per grid: %i, Threads per block: %i\n",blocksPerGrid, threadsPerBlock);
 hipfftPlan1d(&plan, N, HIPFFT_R2C, int(write_block/N));
 fprintf(stderr,"FFT Plan has length %i with batch size %i\n",N, int(write_block/N));

 for (i = 0; i < write_block; ++i) {
  *(float_buffer+i) = (float)*(base_buffer+i);
 }

 //write(1, float_buffer, write_size);
 // output the raw data for comparison..
 //for (i=0; i < write_block; i++) { fprintf(stderr,"Base: %i, Float: %f\n",(int)*(base_buffer+i),(float)*(float_buffer+i)); }

 hipEventRecord(t_start, 0);
 hipMemcpy(device_input_buffer, float_buffer, write_size, hipMemcpyHostToDevice);       
  // copy the floats to the device
 filter_block<<<blocksPerGrid, threadsPerBlock>>>(device_input_buffer, device_fir_taps, device_output_buffer, N, P);
  // kernel applies pre filtering to entire block leaving it in device_output_buffer ready for FFT
 hipMemcpy(float_buffer, device_output_buffer, write_size, hipMemcpyDeviceToHost);
  // get the intermediate results...
 write(1, float_buffer, write_size);
  // output the intermediate results...
 hipfftExecR2C(plan, (hipfftReal*)device_output_buffer, (hipfftComplex*)fft_output_buffer);
  // Do FFT's over the entire block, one column at a time
 hipMemcpy(fft_buffer, fft_output_buffer, fft_output_size, hipMemcpyDeviceToHost);
  // get the final block
 //for (i=0; i < 100 * (N/2 + 1); i++) { fprintf(stderr,"Complex value %i has x=%f, y=%f\n", i, fft_buffer[i].x, fft_buffer[i].y); }
 hipEventRecord(t_stop, 0);
 hipEventSynchronize(t_stop);
 hipEventElapsedTime(&et, t_start, t_stop);
 
 fprintf(stderr,"Done. CUDA time is %f ms\n", et);
 write(1, fft_buffer, write_size);
  // emit to stdout (which has hopefully been redirected...)
 return 0;
}

	.text
	.file	"pfb_float.hip"
	.globl	_Z27__device_stub__filter_blockPfS_S_ii # -- Begin function _Z27__device_stub__filter_blockPfS_S_ii
	.type	_Z27__device_stub__filter_blockPfS_S_ii,@function
_Z27__device_stub__filter_blockPfS_S_ii: # @_Z27__device_stub__filter_blockPfS_S_ii
	.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	$128, %rsp
	.cfi_def_cfa_offset 176
	.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), %rdi
	movq	%rsi, (%rdi)
	leaq	24(%rsp), %rsi
	movq	%rdx, (%rsi)
	leaq	4(%rsp), %rdx
	movl	%ecx, (%rdx)
	movq	%rsp, %rcx
	movl	%r8d, (%rcx)
	leaq	80(%rsp), %rbx
	movq	%rax, (%rbx)
	movq	%rdi, 8(%rbx)
	movq	%rsi, 16(%rbx)
	movq	%rdx, 24(%rbx)
	movq	%rcx, 32(%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	$_Z12filter_blockPfS_S_ii, %edi
	movq	%rbx, %r9
	pushq	(%r13)
	.cfi_adjust_cfa_offset 8
	pushq	(%r12)
	.cfi_adjust_cfa_offset 8
	callq	hipLaunchKernel
	addq	$144, %rsp
	.cfi_adjust_cfa_offset -144
	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__filter_blockPfS_S_ii, .Lfunc_end0-_Z27__device_stub__filter_blockPfS_S_ii
	.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	$56, %rsp
	.cfi_def_cfa_offset 112
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	.cfi_offset %rbp, -16
	cmpl	$3, %edi
	jge	.LBB1_1
# %bb.7:
	movl	$.Lstr, %edi
	callq	puts@PLT
	movl	$-1, %r15d
.LBB1_6:
	movl	%r15d, %eax
	addq	$56, %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
.LBB1_1:
	.cfi_def_cfa_offset 112
	movq	8(%rsi), %r13
	movq	16(%rsi), %rbp
	movl	$1048576, %edi                  # imm = 0x100000
	callq	malloc
	movq	%rax, %r15
	movl	$4194304, %edi                  # imm = 0x400000
	callq	malloc
	movq	%rax, %r14
	movl	$16384, %edi                    # imm = 0x4000
	callq	malloc
	movq	%rax, %r12
	movl	$4210688, %edi                  # imm = 0x404000
	callq	malloc
	movq	%rax, 32(%rsp)                  # 8-byte Spill
	xorl	%ebx, %ebx
	movq	%rbp, %rdi
	xorl	%esi, %esi
	xorl	%eax, %eax
	callq	open
	movl	%eax, %ebp
	movl	$16384, %edx                    # imm = 0x4000
	movl	%eax, %edi
	movq	%r12, %rsi
	callq	read
	movl	%ebp, %edi
	callq	close
	movq	%r13, %rdi
	xorl	%esi, %esi
	xorl	%eax, %eax
	callq	open
	movl	$1048576, %edx                  # imm = 0x100000
	movl	%eax, %edi
	movq	%r15, %rsi
	callq	read
	movl	$t_start, %edi
	callq	hipEventCreate
	movl	$t_stop, %edi
	callq	hipEventCreate
	leaq	24(%rsp), %rdi
	movl	$4194304, %esi                  # imm = 0x400000
	callq	hipMalloc
	leaq	8(%rsp), %rdi
	movl	$4194304, %esi                  # imm = 0x400000
	callq	hipMalloc
	leaq	16(%rsp), %rdi
	movl	$4210688, %esi                  # imm = 0x404000
	callq	hipMalloc
	leaq	40(%rsp), %r13
	movl	$16384, %esi                    # imm = 0x4000
	movq	%r13, %rdi
	callq	hipMalloc
	movq	(%r13), %rdi
	movl	$16384, %edx                    # imm = 0x4000
	movq	%r12, %rsi
	movl	$1, %ecx
	callq	hipMemcpy
	movq	stderr(%rip), %rdi
	movl	$.L.str.1, %esi
	movl	$2048, %edx                     # imm = 0x800
	movl	$512, %ecx                      # imm = 0x200
	xorl	%eax, %eax
	callq	fprintf
	movl	$plan, %edi
	movl	$512, %esi                      # imm = 0x200
	movl	$42, %edx
	movl	$2048, %ecx                     # imm = 0x800
	callq	hipfftPlan1d
	movq	stderr(%rip), %rdi
	movl	$.L.str.2, %esi
	movl	$512, %edx                      # imm = 0x200
	movl	$2048, %ecx                     # imm = 0x800
	xorl	%eax, %eax
	callq	fprintf
.LBB1_2:                                # =>This Inner Loop Header: Depth=1
	movsbl	(%r15,%rbx), %eax
	xorps	%xmm0, %xmm0
	cvtsi2ss	%eax, %xmm0
	movss	%xmm0, (%r14,%rbx,4)
	incq	%rbx
	cmpq	$1048576, %rbx                  # imm = 0x100000
	jne	.LBB1_2
# %bb.3:
	movq	t_start(%rip), %rdi
	xorl	%r15d, %r15d
	xorl	%esi, %esi
	callq	hipEventRecord
	movq	24(%rsp), %rdi
	movl	$4194304, %edx                  # imm = 0x400000
	movq	%r14, %rsi
	movl	$1, %ecx
	callq	hipMemcpy
	movabsq	$4294967808, %rdx               # imm = 0x100000200
	leaq	1536(%rdx), %rdi
	movl	$1, %esi
	movl	$1, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	__hipPushCallConfiguration
	testl	%eax, %eax
	jne	.LBB1_5
# %bb.4:
	movq	24(%rsp), %rdi
	movq	40(%rsp), %rsi
	movq	8(%rsp), %rdx
	movl	$512, %ecx                      # imm = 0x200
	movl	$8, %r8d
	callq	_Z27__device_stub__filter_blockPfS_S_ii
.LBB1_5:
	movq	8(%rsp), %rsi
	movl	$4194304, %edx                  # imm = 0x400000
	movq	%r14, %rdi
	movl	$2, %ecx
	callq	hipMemcpy
	movl	$4194304, %edx                  # imm = 0x400000
	movl	$1, %edi
	movq	%r14, %rsi
	callq	write
	movq	plan(%rip), %rdi
	movq	8(%rsp), %rsi
	movq	16(%rsp), %rdx
	callq	hipfftExecR2C
	movq	16(%rsp), %rsi
	movl	$4210688, %edx                  # imm = 0x404000
	movq	32(%rsp), %rbx                  # 8-byte Reload
	movq	%rbx, %rdi
	movl	$2, %ecx
	callq	hipMemcpy
	movq	t_stop(%rip), %rdi
	xorl	%esi, %esi
	callq	hipEventRecord
	movq	t_stop(%rip), %rdi
	callq	hipEventSynchronize
	movq	t_start(%rip), %rsi
	movq	t_stop(%rip), %rdx
	leaq	52(%rsp), %r14
	movq	%r14, %rdi
	callq	hipEventElapsedTime
	movq	stderr(%rip), %rdi
	xorps	%xmm0, %xmm0
	cvtss2sd	(%r14), %xmm0
	movl	$.L.str.3, %esi
	movb	$1, %al
	callq	fprintf
	movl	$4194304, %edx                  # imm = 0x400000
	movl	$1, %edi
	movq	%rbx, %rsi
	callq	write
	jmp	.LBB1_6
.Lfunc_end1:
	.size	main, .Lfunc_end1-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:
	subq	$40, %rsp
	.cfi_def_cfa_offset 48
	movq	__hip_gpubin_handle(%rip), %rdi
	testq	%rdi, %rdi
	jne	.LBB2_2
# %bb.1:
	movl	$__hip_fatbin_wrapper, %edi
	callq	__hipRegisterFatBinary
	movq	%rax, %rdi
	movq	%rax, __hip_gpubin_handle(%rip)
.LBB2_2:
	xorps	%xmm0, %xmm0
	movups	%xmm0, 16(%rsp)
	movups	%xmm0, (%rsp)
	movl	$_Z12filter_blockPfS_S_ii, %esi
	movl	$.L__unnamed_1, %edx
	movl	$.L__unnamed_1, %ecx
	movl	$-1, %r8d
	xorl	%r9d, %r9d
	callq	__hipRegisterFunction
	movl	$__hip_module_dtor, %edi
	addq	$40, %rsp
	.cfi_def_cfa_offset 8
	jmp	atexit                          # TAILCALL
.Lfunc_end2:
	.size	__hip_module_ctor, .Lfunc_end2-__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	.LBB3_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
.LBB3_2:
	retq
.Lfunc_end3:
	.size	__hip_module_dtor, .Lfunc_end3-__hip_module_dtor
	.cfi_endproc
                                        # -- End function
	.type	t_start,@object                 # @t_start
	.bss
	.globl	t_start
	.p2align	3, 0x0
t_start:
	.quad	0
	.size	t_start, 8

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

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

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

	.type	.L.str.1,@object                # @.str.1
	.section	.rodata.str1.1,"aMS",@progbits,1
.L.str.1:
	.asciz	"Blocks per grid: %i, Threads per block: %i\n"
	.size	.L.str.1, 44

	.type	.L.str.2,@object                # @.str.2
.L.str.2:
	.asciz	"FFT Plan has length %i with batch size %i\n"
	.size	.L.str.2, 43

	.type	.L.str.3,@object                # @.str.3
.L.str.3:
	.asciz	"Done. CUDA time is %f ms\n"
	.size	.L.str.3, 26

	.type	.L__unnamed_1,@object           # @0
.L__unnamed_1:
	.asciz	"_Z12filter_blockPfS_S_ii"
	.size	.L__unnamed_1, 25

	.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	"Please supply both data and fir_taps filenames..."
	.size	.Lstr, 50

	.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__filter_blockPfS_S_ii
	.addrsig_sym __hip_module_ctor
	.addrsig_sym __hip_module_dtor
	.addrsig_sym t_start
	.addrsig_sym t_stop
	.addrsig_sym plan
	.addrsig_sym _Z12filter_blockPfS_S_ii
	.addrsig_sym __hip_fatbin
	.addrsig_sym __hip_fatbin_wrapper
	.addrsig_sym __hip_cuid_

	.text
	.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
	.protected	_Z12filter_blockPfS_S_ii ; -- Begin function _Z12filter_blockPfS_S_ii
	.globl	_Z12filter_blockPfS_S_ii
	.p2align	8
	.type	_Z12filter_blockPfS_S_ii,@function
_Z12filter_blockPfS_S_ii:               ; @_Z12filter_blockPfS_S_ii
; %bb.0:
	s_load_b256 s[4:11], s[0:1], 0x0
	s_add_u32 s0, s0, 32
	s_addc_u32 s1, s1, 0
	s_waitcnt lgkmcnt(0)
	s_cmp_lt_i32 s11, 1
	s_cbranch_scc1 .LBB0_3
; %bb.1:                                ; %.lr.ph
	s_load_b32 s2, s[0:1], 0xc
	v_dual_mov_b32 v3, 0 :: v_dual_mov_b32 v2, 0
	v_mov_b32_e32 v1, v0
	s_waitcnt lgkmcnt(0)
	s_and_b32 s2, s2, 0xffff
	s_delay_alu instid0(SALU_CYCLE_1)
	s_mul_i32 s2, s15, s2
.LBB0_2:                                ; =>This Inner Loop Header: Depth=1
	s_delay_alu instid0(VALU_DEP_1) | instid1(SALU_CYCLE_1)
	v_dual_mov_b32 v5, v2 :: v_dual_add_nc_u32 v4, s2, v1
	v_lshlrev_b64 v[6:7], 2, v[1:2]
	v_add_nc_u32_e32 v1, s10, v1
	s_add_i32 s11, s11, -1
	s_delay_alu instid0(VALU_DEP_3) | instskip(SKIP_1) | instid1(VALU_DEP_3)
	v_lshlrev_b64 v[4:5], 2, v[4:5]
	s_cmp_eq_u32 s11, 0
	v_add_co_u32 v6, vcc_lo, s6, v6
	v_add_co_ci_u32_e32 v7, vcc_lo, s7, v7, vcc_lo
	s_delay_alu instid0(VALU_DEP_3) | instskip(NEXT) | instid1(VALU_DEP_4)
	v_add_co_u32 v4, vcc_lo, s4, v4
	v_add_co_ci_u32_e32 v5, vcc_lo, s5, v5, vcc_lo
	global_load_b32 v6, v[6:7], off
	global_load_b32 v4, v[4:5], off
	s_waitcnt vmcnt(0)
	v_fmac_f32_e32 v3, v6, v4
	s_cbranch_scc0 .LBB0_2
	s_branch .LBB0_4
.LBB0_3:
	v_mov_b32_e32 v3, 0
.LBB0_4:                                ; %Flow37
	s_load_b32 s0, s[0:1], 0xc
	s_waitcnt lgkmcnt(0)
	s_and_b32 s0, s0, 0xffff
	s_delay_alu instid0(SALU_CYCLE_1) | instskip(SKIP_1) | instid1(VALU_DEP_1)
	v_mad_u64_u32 v[1:2], null, s15, s0, v[0:1]
	v_mov_b32_e32 v2, 0
	v_lshlrev_b64 v[0:1], 2, v[1:2]
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_add_co_u32 v0, vcc_lo, s8, v0
	v_add_co_ci_u32_e32 v1, vcc_lo, s9, v1, vcc_lo
	global_store_b32 v[0:1], v3, off
	s_nop 0
	s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
	s_endpgm
	.section	.rodata,"a",@progbits
	.p2align	6, 0x0
	.amdhsa_kernel _Z12filter_blockPfS_S_ii
		.amdhsa_group_segment_fixed_size 0
		.amdhsa_private_segment_fixed_size 0
		.amdhsa_kernarg_size 288
		.amdhsa_user_sgpr_count 15
		.amdhsa_user_sgpr_dispatch_ptr 0
		.amdhsa_user_sgpr_queue_ptr 0
		.amdhsa_user_sgpr_kernarg_segment_ptr 1
		.amdhsa_user_sgpr_dispatch_id 0
		.amdhsa_user_sgpr_private_segment_size 0
		.amdhsa_wavefront_size32 1
		.amdhsa_uses_dynamic_stack 0
		.amdhsa_enable_private_segment 0
		.amdhsa_system_sgpr_workgroup_id_x 1
		.amdhsa_system_sgpr_workgroup_id_y 0
		.amdhsa_system_sgpr_workgroup_id_z 0
		.amdhsa_system_sgpr_workgroup_info 0
		.amdhsa_system_vgpr_workitem_id 0
		.amdhsa_next_free_vgpr 8
		.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	_Z12filter_blockPfS_S_ii, .Lfunc_end0-_Z12filter_blockPfS_S_ii
                                        ; -- End function
	.section	.AMDGPU.csdata,"",@progbits
; Kernel info:
; codeLenInByte = 256
; NumSgprs: 18
; NumVgprs: 8
; ScratchSize: 0
; MemoryBound: 0
; FloatMode: 240
; IeeeMode: 1
; LDSByteSize: 0 bytes/workgroup (compile time only)
; SGPRBlocks: 2
; VGPRBlocks: 0
; NumSGPRsForWavesPerEU: 18
; NumVGPRsForWavesPerEU: 8
; Occupancy: 16
; WaveLimiterHint : 0
; COMPUTE_PGM_RSRC2:SCRATCH_EN: 0
; COMPUTE_PGM_RSRC2:USER_SGPR: 15
; COMPUTE_PGM_RSRC2:TRAP_HANDLER: 0
; COMPUTE_PGM_RSRC2:TGID_X_EN: 1
; COMPUTE_PGM_RSRC2:TGID_Y_EN: 0
; COMPUTE_PGM_RSRC2:TGID_Z_EN: 0
; COMPUTE_PGM_RSRC2:TIDIG_COMP_CNT: 0
	.text
	.p2alignl 7, 3214868480
	.fill 96, 4, 3214868480
	.type	__hip_cuid_,@object             ; @__hip_cuid_
	.section	.bss,"aw",@nobits
	.globl	__hip_cuid_
__hip_cuid_:
	.byte	0                               ; 0x0
	.size	__hip_cuid_, 1

	.ident	"AMD clang version 18.0.0git (https://github.com/RadeonOpenCompute/llvm-project roc-6.3.2 25012 e5bf7e55c91490b07c49d8960fa7983d864936c4)"
	.section	".note.GNU-stack","",@progbits
	.addrsig
	.addrsig_sym __hip_cuid_
	.amdgpu_metadata
---
amdhsa.kernels:
  - .args:
      - .address_space:  global
        .offset:         0
        .size:           8
        .value_kind:     global_buffer
      - .address_space:  global
        .offset:         8
        .size:           8
        .value_kind:     global_buffer
      - .address_space:  global
        .offset:         16
        .size:           8
        .value_kind:     global_buffer
      - .offset:         24
        .size:           4
        .value_kind:     by_value
      - .offset:         28
        .size:           4
        .value_kind:     by_value
      - .offset:         32
        .size:           4
        .value_kind:     hidden_block_count_x
      - .offset:         36
        .size:           4
        .value_kind:     hidden_block_count_y
      - .offset:         40
        .size:           4
        .value_kind:     hidden_block_count_z
      - .offset:         44
        .size:           2
        .value_kind:     hidden_group_size_x
      - .offset:         46
        .size:           2
        .value_kind:     hidden_group_size_y
      - .offset:         48
        .size:           2
        .value_kind:     hidden_group_size_z
      - .offset:         50
        .size:           2
        .value_kind:     hidden_remainder_x
      - .offset:         52
        .size:           2
        .value_kind:     hidden_remainder_y
      - .offset:         54
        .size:           2
        .value_kind:     hidden_remainder_z
      - .offset:         72
        .size:           8
        .value_kind:     hidden_global_offset_x
      - .offset:         80
        .size:           8
        .value_kind:     hidden_global_offset_y
      - .offset:         88
        .size:           8
        .value_kind:     hidden_global_offset_z
      - .offset:         96
        .size:           2
        .value_kind:     hidden_grid_dims
    .group_segment_fixed_size: 0
    .kernarg_segment_align: 8
    .kernarg_segment_size: 288
    .language:       OpenCL C
    .language_version:
      - 2
      - 0
    .max_flat_workgroup_size: 1024
    .name:           _Z12filter_blockPfS_S_ii
    .private_segment_fixed_size: 0
    .sgpr_count:     18
    .sgpr_spill_count: 0
    .symbol:         _Z12filter_blockPfS_S_ii.kd
    .uniform_work_group_size: 1
    .uses_dynamic_stack: false
    .vgpr_count:     8
    .vgpr_spill_count: 0
    .wavefront_size: 32
    .workgroup_processor_mode: 1
amdhsa.target:   amdgcn-amd-amdhsa--gfx1100
amdhsa.version:
  - 1
  - 2
...

	.end_amdgpu_metadata
