#include<bits/stdc++.h>
#include<cuda.h>

#define PI 3.14159265
#define BlockSize 1024

using namespace std;

__global__ void FD(float *U_d, int T, int N,float r){
    int idx = blockIdx.x*blockDim.x + threadIdx.x;
    for(int t=1; t<T; ++t){
        U_d[t*N]=0;
        U_d[t*N+(N-1)]=0;
        if(idx>0 && idx<N-1){
            U_d[t*N+idx] = r*U_d[(t-1)*N+(idx-1)]+(1-2*r)*U_d[(t-1)*N+idx]+r*U_d[(t-1)*N+(idx+1)];
        }
        __syncthreads();
    }

}

float f(float i, float deltax){
    float x = i*deltax;
    return 2*sin(2*PI*x); //initial condition
}

//print temperature for each node
void print( float *U, float deltaX,int T,int N){

    for(int i=0; i<T; ++i){
        for(int j=0; j<N; ++j){
            cout<<j*deltaX<<" "<<U[i*N+j]<<endl;
        }
        cout<<endl;
    }
}

int main(){
    float *U_d,*U_h, xa,xb,ta,tb,T,N,gamma,r;
    float deltaX,deltaT;
    int nodes,sizeU;
    cin>>xa>>xb>>ta>>tb>>N>>T>>gamma;
    nodes = (N+2)*(T+2);
    sizeU = sizeof(float)*nodes;

    U_h = (float*)malloc(sizeU);

    deltaX = (xb-xa) / float(N+1);
    deltaT = (tb-ta) / float(T+1);
    r = (gamma*deltaT)/(deltaX*deltaX);

    if(r<=0  || r>=0.5 || deltaT>(deltaX*deltaX)/2.0){
        cout<<"r:"<<r<<" k"<<deltaT<<endl;
        cout<<"error"<<endl;
        return 0;
    }

    for(int i=0; i<N+2; i++){
        U_h[i] = f(i,deltaX);
    }

    cudaMalloc((void**)&U_d,sizeU);
    cudaMemcpy(U_d,U_h,sizeU,cudaMemcpyHostToDevice);

    dim3 dimBlock(BlockSize);
    dim3 dimGrid(ceil((N+2)/float(BlockSize)));

    FD<<<dimGrid,dimBlock>>>(U_d,T+2,N+2,r);
    cudaMemcpy(U_h,U_d,sizeU,cudaMemcpyDeviceToHost);

    print(U_h,deltaX,T+2,N+2);
    cudaFree(U_d);


}

	.file	"tmpxft_002ec8bc_00000000-6_node.cudafe1.cpp"
	.text
#APP
	.globl _ZSt21ios_base_library_initv

#NO_APP
	.type	_ZL26__cudaUnregisterBinaryUtilv, @function
_ZL26__cudaUnregisterBinaryUtilv:
.LFB10830:
	.cfi_startproc
	endbr64
	movq	_ZL20__cudaFatCubinHandle(%rip), %rdi
	jmp	__cudaUnregisterFatBinary@PLT
	.cfi_endproc
.LFE10830:
	.size	_ZL26__cudaUnregisterBinaryUtilv, .-_ZL26__cudaUnregisterBinaryUtilv
	.globl	_Z1fff
	.type	_Z1fff, @function
_Z1fff:
.LFB10825:
	.cfi_startproc
	endbr64
	mulss	%xmm1, %xmm0
	pushq	%rax
	.cfi_def_cfa_offset 16
	cvtss2sd	%xmm0, %xmm0
	mulsd	.LC0(%rip), %xmm0
	call	sin@PLT
	popq	%rdx
	.cfi_def_cfa_offset 8
	addsd	%xmm0, %xmm0
	cvtsd2ss	%xmm0, %xmm0
	ret
	.cfi_endproc
.LFE10825:
	.size	_Z1fff, .-_Z1fff
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC1:
	.string	" "
	.text
	.globl	_Z5printPffii
	.type	_Z5printPffii, @function
_Z5printPffii:
.LFB10826:
	.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
	movl	%esi, %r14d
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	xorl	%r13d, %r13d
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	xorl	%r12d, %r12d
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	movl	%edx, %ebx
	subq	$24, %rsp
	.cfi_def_cfa_offset 80
	movq	%rdi, (%rsp)
	movss	%xmm0, 12(%rsp)
.L5:
	cmpl	%r14d, %r13d
	jge	.L4
	movq	(%rsp), %rcx
	movslq	%r12d, %rax
	xorl	%ebp, %ebp
	leaq	(%rcx,%rax,4), %r15
.L8:
	cmpl	%ebp, %ebx
	jle	.L11
	cvtsi2ssl	%ebp, %xmm0
	mulss	12(%rsp), %xmm0
	leaq	_ZSt4cout(%rip), %rdi
	cvtss2sd	%xmm0, %xmm0
	call	_ZNSo9_M_insertIdEERSoT_@PLT
	leaq	.LC1(%rip), %rsi
	movq	%rax, %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	cvtss2sd	(%r15,%rbp,4), %xmm0
	incq	%rbp
	movq	%rax, %rdi
	call	_ZNSo9_M_insertIdEERSoT_@PLT
	movq	%rax, %rdi
	call	_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_@PLT
	jmp	.L8
.L11:
	leaq	_ZSt4cout(%rip), %rdi
	incl	%r13d
	addl	%ebx, %r12d
	call	_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_@PLT
	jmp	.L5
.L4:
	addq	$24, %rsp
	.cfi_def_cfa_offset 56
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE10826:
	.size	_Z5printPffii, .-_Z5printPffii
	.globl	_Z24__device_stub__Z2FDPfiifPfiif
	.type	_Z24__device_stub__Z2FDPfiifPfiif, @function
_Z24__device_stub__Z2FDPfiifPfiif:
.LFB10852:
	.cfi_startproc
	endbr64
	subq	$152, %rsp
	.cfi_def_cfa_offset 160
	movq	%rdi, 24(%rsp)
	leaq	48(%rsp), %rcx
	leaq	56(%rsp), %rdi
	movl	%esi, 20(%rsp)
	leaq	68(%rsp), %rsi
	movl	%edx, 16(%rsp)
	leaq	40(%rsp), %rdx
	movss	%xmm0, 12(%rsp)
	movq	%fs:40, %rax
	movq	%rax, 136(%rsp)
	xorl	%eax, %eax
	leaq	24(%rsp), %rax
	movl	$1, 64(%rsp)
	movq	%rax, 104(%rsp)
	leaq	20(%rsp), %rax
	movq	%rax, 112(%rsp)
	leaq	16(%rsp), %rax
	movq	%rax, 120(%rsp)
	leaq	12(%rsp), %rax
	movq	%rax, 128(%rsp)
	movabsq	$4294967297, %rax
	movq	%rax, 56(%rsp)
	movq	%rax, 68(%rsp)
	movl	$1, 76(%rsp)
	call	__cudaPopCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L12
	pushq	48(%rsp)
	.cfi_def_cfa_offset 168
	leaq	_Z2FDPfiif(%rip), %rdi
	pushq	48(%rsp)
	.cfi_def_cfa_offset 176
	movq	84(%rsp), %rcx
	movl	92(%rsp), %r8d
	movq	72(%rsp), %rsi
	movl	80(%rsp), %edx
	leaq	120(%rsp), %r9
	call	cudaLaunchKernel@PLT
	popq	%rax
	.cfi_def_cfa_offset 168
	popq	%rdx
	.cfi_def_cfa_offset 160
.L12:
	movq	136(%rsp), %rax
	subq	%fs:40, %rax
	je	.L14
	call	__stack_chk_fail@PLT
.L14:
	addq	$152, %rsp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE10852:
	.size	_Z24__device_stub__Z2FDPfiifPfiif, .-_Z24__device_stub__Z2FDPfiifPfiif
	.globl	_Z2FDPfiif
	.type	_Z2FDPfiif, @function
_Z2FDPfiif:
.LFB10853:
	.cfi_startproc
	endbr64
	jmp	_Z24__device_stub__Z2FDPfiifPfiif
	.cfi_endproc
.LFE10853:
	.size	_Z2FDPfiif, .-_Z2FDPfiif
	.section	.rodata.str1.1
.LC7:
	.string	"r:"
.LC8:
	.string	" k"
.LC9:
	.string	"error"
	.section	.text.startup,"ax",@progbits
	.globl	main
	.type	main, @function
main:
.LFB10827:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	leaq	_ZSt3cin(%rip), %rdi
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	subq	$96, %rsp
	.cfi_def_cfa_offset 128
	movq	%fs:40, %rax
	movq	%rax, 88(%rsp)
	xorl	%eax, %eax
	leaq	28(%rsp), %rsi
	call	_ZNSi10_M_extractIfEERSiRT_@PLT
	leaq	32(%rsp), %rsi
	movq	%rax, %rdi
	call	_ZNSi10_M_extractIfEERSiRT_@PLT
	leaq	36(%rsp), %rsi
	movq	%rax, %rdi
	call	_ZNSi10_M_extractIfEERSiRT_@PLT
	leaq	40(%rsp), %rsi
	movq	%rax, %rdi
	call	_ZNSi10_M_extractIfEERSiRT_@PLT
	leaq	48(%rsp), %rsi
	movq	%rax, %rdi
	call	_ZNSi10_M_extractIfEERSiRT_@PLT
	leaq	44(%rsp), %rsi
	movq	%rax, %rdi
	call	_ZNSi10_M_extractIfEERSiRT_@PLT
	leaq	52(%rsp), %rsi
	movq	%rax, %rdi
	call	_ZNSi10_M_extractIfEERSiRT_@PLT
	movss	48(%rsp), %xmm1
	movss	44(%rsp), %xmm0
	movss	.LC2(%rip), %xmm4
	movss	.LC2(%rip), %xmm2
	movss	%xmm1, (%rsp)
	addss	%xmm1, %xmm4
	addss	%xmm0, %xmm2
	movss	%xmm0, 8(%rsp)
	mulss	%xmm4, %xmm2
	movss	%xmm4, 12(%rsp)
	cvttss2sil	%xmm2, %ebx
	sall	$2, %ebx
	movslq	%ebx, %rbx
	movq	%rbx, %rdi
	call	malloc@PLT
	movss	(%rsp), %xmm1
	movss	.LC3(%rip), %xmm3
	movss	32(%rsp), %xmm2
	subss	28(%rsp), %xmm2
	addss	%xmm3, %xmm1
	movss	8(%rsp), %xmm0
	addss	%xmm3, %xmm0
	divss	%xmm1, %xmm2
	movss	40(%rsp), %xmm1
	subss	36(%rsp), %xmm1
	divss	%xmm0, %xmm1
	movaps	%xmm2, %xmm0
	movss	%xmm2, (%rsp)
	mulss	%xmm2, %xmm0
	movss	52(%rsp), %xmm2
	mulss	%xmm1, %xmm2
	cvtss2sd	%xmm1, %xmm1
	divss	%xmm0, %xmm2
	movss	%xmm2, 8(%rsp)
	xorps	%xmm2, %xmm2
	comiss	8(%rsp), %xmm2
	jnb	.L18
	movss	8(%rsp), %xmm5
	comiss	.LC5(%rip), %xmm5
	jnb	.L18
	cvtss2sd	%xmm0, %xmm0
	mulsd	.LC6(%rip), %xmm0
	comisd	%xmm0, %xmm1
	jbe	.L26
.L18:
	leaq	_ZSt4cout(%rip), %rbx
	leaq	.LC7(%rip), %rsi
	movsd	%xmm1, (%rsp)
	movq	%rbx, %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	cvtss2sd	8(%rsp), %xmm0
	movq	%rax, %rdi
	call	_ZNSo9_M_insertIdEERSoT_@PLT
	leaq	.LC8(%rip), %rsi
	movq	%rax, %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movsd	(%rsp), %xmm1
	movq	%rax, %rdi
	movaps	%xmm1, %xmm0
	call	_ZNSo9_M_insertIdEERSoT_@PLT
	movq	%rax, %rdi
	call	_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_@PLT
	movq	%rbx, %rdi
	leaq	.LC9(%rip), %rsi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movq	%rax, %rdi
	call	_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_@PLT
	jmp	.L21
.L26:
	movq	%rax, %rbp
	xorl	%r12d, %r12d
.L19:
	cvtsi2ssl	%r12d, %xmm0
	movss	12(%rsp), %xmm6
	comiss	%xmm0, %xmm6
	jbe	.L28
	movss	(%rsp), %xmm1
	call	_Z1fff
	movss	%xmm0, 0(%rbp,%r12,4)
	incq	%r12
	jmp	.L19
.L28:
	leaq	56(%rsp), %rdi
	movq	%rbx, %rsi
	call	cudaMalloc@PLT
	movq	56(%rsp), %rdi
	movq	%rbx, %rdx
	movq	%rbp, %rsi
	movl	$1, %ecx
	call	cudaMemcpy@PLT
	movss	.LC2(%rip), %xmm0
	addss	48(%rsp), %xmm0
	mulss	.LC10(%rip), %xmm0
	call	ceilf@PLT
	movl	$4194305, %edx
	xorl	%r9d, %r9d
	xorl	%r8d, %r8d
	cvttss2siq	%xmm0, %rax
	salq	$10, %rdx
	movl	$1, %ecx
	movl	%eax, 76(%rsp)
	movabsq	$4294967297, %rax
	movq	%rax, 80(%rsp)
	movq	76(%rsp), %rdi
	movl	84(%rsp), %esi
	call	__cudaPushCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L23
	movss	.LC2(%rip), %xmm0
	addss	48(%rsp), %xmm0
	movq	56(%rsp), %rdi
	cvttss2sil	%xmm0, %edx
	movss	.LC2(%rip), %xmm0
	addss	44(%rsp), %xmm0
	cvttss2sil	%xmm0, %esi
	movss	8(%rsp), %xmm0
	call	_Z24__device_stub__Z2FDPfiifPfiif
.L23:
	movq	56(%rsp), %rsi
	movl	$2, %ecx
	movq	%rbx, %rdx
	movq	%rbp, %rdi
	call	cudaMemcpy@PLT
	movss	.LC2(%rip), %xmm0
	movq	%rbp, %rdi
	addss	48(%rsp), %xmm0
	cvttss2sil	%xmm0, %edx
	movss	.LC2(%rip), %xmm0
	addss	44(%rsp), %xmm0
	cvttss2sil	%xmm0, %esi
	movss	(%rsp), %xmm0
	call	_Z5printPffii
	movq	56(%rsp), %rdi
	call	cudaFree@PLT
.L21:
	movq	88(%rsp), %rax
	subq	%fs:40, %rax
	je	.L24
	call	__stack_chk_fail@PLT
.L24:
	addq	$96, %rsp
	.cfi_def_cfa_offset 32
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE10827:
	.size	main, .-main
	.section	.rodata.str1.1
.LC11:
	.string	"_Z2FDPfiif"
	.section	.text.startup
	.type	_ZL24__sti____cudaRegisterAllv, @function
_ZL24__sti____cudaRegisterAllv:
.LFB10855:
	.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	.LC11(%rip), %rdx
	movq	%rax, %rdi
	leaq	_Z2FDPfiif(%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
.LFE10855:
	.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.cst8,"aM",@progbits,8
	.align 8
.LC0:
	.long	1405670641
	.long	1075388923
	.section	.rodata.cst4,"aM",@progbits,4
	.align 4
.LC2:
	.long	1073741824
	.align 4
.LC3:
	.long	1065353216
	.align 4
.LC5:
	.long	1056964608
	.section	.rodata.cst8
	.align 8
.LC6:
	.long	0
	.long	1071644672
	.section	.rodata.cst4
	.align 4
.LC10:
	.long	981467136
	.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<bits/stdc++.h>
#include<hip/hip_runtime.h>

#define PI 3.14159265
#define BlockSize 1024

using namespace std;

__global__ void FD(float *U_d, int T, int N,float r){
    int idx = blockIdx.x*blockDim.x + threadIdx.x;
    for(int t=1; t<T; ++t){
        U_d[t*N]=0;
        U_d[t*N+(N-1)]=0;
        if(idx>0 && idx<N-1){
            U_d[t*N+idx] = r*U_d[(t-1)*N+(idx-1)]+(1-2*r)*U_d[(t-1)*N+idx]+r*U_d[(t-1)*N+(idx+1)];
        }
        __syncthreads();
    }

}

float f(float i, float deltax){
    float x = i*deltax;
    return 2*sin(2*PI*x); //initial condition
}

//print temperature for each node
void print( float *U, float deltaX,int T,int N){

    for(int i=0; i<T; ++i){
        for(int j=0; j<N; ++j){
            cout<<j*deltaX<<" "<<U[i*N+j]<<endl;
        }
        cout<<endl;
    }
}

int main(){
    float *U_d,*U_h, xa,xb,ta,tb,T,N,gamma,r;
    float deltaX,deltaT;
    int nodes,sizeU;
    cin>>xa>>xb>>ta>>tb>>N>>T>>gamma;
    nodes = (N+2)*(T+2);
    sizeU = sizeof(float)*nodes;

    U_h = (float*)malloc(sizeU);

    deltaX = (xb-xa) / float(N+1);
    deltaT = (tb-ta) / float(T+1);
    r = (gamma*deltaT)/(deltaX*deltaX);

    if(r<=0  || r>=0.5 || deltaT>(deltaX*deltaX)/2.0){
        cout<<"r:"<<r<<" k"<<deltaT<<endl;
        cout<<"error"<<endl;
        return 0;
    }

    for(int i=0; i<N+2; i++){
        U_h[i] = f(i,deltaX);
    }

    hipMalloc((void**)&U_d,sizeU);
    hipMemcpy(U_d,U_h,sizeU,hipMemcpyHostToDevice);

    dim3 dimBlock(BlockSize);
    dim3 dimGrid(ceil((N+2)/float(BlockSize)));

    FD<<<dimGrid,dimBlock>>>(U_d,T+2,N+2,r);
    hipMemcpy(U_h,U_d,sizeU,hipMemcpyDeviceToHost);

    print(U_h,deltaX,T+2,N+2);
    hipFree(U_d);


}

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

                                        # End of file scope inline assembly
	.globl	_Z17__device_stub__FDPfiif      # -- Begin function _Z17__device_stub__FDPfiif
	.type	_Z17__device_stub__FDPfiif,@function
_Z17__device_stub__FDPfiif:             # @_Z17__device_stub__FDPfiif
	.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	20(%rsp), %rcx
	movl	%esi, (%rcx)
	leaq	16(%rsp), %rsi
	movl	%edx, (%rsi)
	leaq	12(%rsp), %rdx
	movss	%xmm0, (%rdx)
	leaq	80(%rsp), %rbx
	movq	%rax, (%rbx)
	movq	%rcx, 8(%rbx)
	movq	%rsi, 16(%rbx)
	movq	%rdx, 24(%rbx)
	leaq	64(%rsp), %r14
	leaq	48(%rsp), %r15
	leaq	32(%rsp), %r12
	leaq	24(%rsp), %r13
	movq	%r14, %rdi
	movq	%r15, %rsi
	movq	%r12, %rdx
	movq	%r13, %rcx
	callq	__hipPopCallConfiguration
	movq	(%r14), %rsi
	movl	8(%r14), %edx
	movq	(%r15), %rcx
	movl	8(%r15), %r8d
	movl	$_Z2FDPfiif, %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	_Z17__device_stub__FDPfiif, .Lfunc_end0-_Z17__device_stub__FDPfiif
	.cfi_endproc
                                        # -- End function
	.section	.rodata.cst8,"aM",@progbits,8
	.p2align	3, 0x0                          # -- Begin function _Z1fff
.LCPI1_0:
	.quad	0x401921fb53c8d4f1              # double 6.2831853000000004
	.text
	.globl	_Z1fff
	.type	_Z1fff,@function
_Z1fff:                                 # @_Z1fff
	.cfi_startproc
# %bb.0:
	pushq	%rax
	.cfi_def_cfa_offset 16
	mulss	%xmm1, %xmm0
	cvtss2sd	%xmm0, %xmm0
	mulsd	.LCPI1_0(%rip), %xmm0
	callq	sin
	addsd	%xmm0, %xmm0
	cvtsd2ss	%xmm0, %xmm0
	popq	%rax
	.cfi_def_cfa_offset 8
	retq
.Lfunc_end1:
	.size	_Z1fff, .Lfunc_end1-_Z1fff
	.cfi_endproc
                                        # -- End function
	.globl	_Z5printPffii                   # -- Begin function _Z5printPffii
	.type	_Z5printPffii,@function
_Z5printPffii:                          # @_Z5printPffii
	.cfi_startproc
# %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	pushq	%r15
	.cfi_def_cfa_offset 24
	pushq	%r14
	.cfi_def_cfa_offset 32
	pushq	%r13
	.cfi_def_cfa_offset 40
	pushq	%r12
	.cfi_def_cfa_offset 48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	subq	$24, %rsp
	.cfi_def_cfa_offset 80
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	.cfi_offset %rbp, -16
	movss	%xmm0, (%rsp)                   # 4-byte Spill
	movq	%rdi, 8(%rsp)                   # 8-byte Spill
	testl	%esi, %esi
	jle	.LBB2_6
# %bb.1:                                # %.preheader.lr.ph
	movl	%esi, %eax
	movq	%rax, 16(%rsp)                  # 8-byte Spill
	movl	%edx, %r13d
	xorl	%ebp, %ebp
	xorl	%r14d, %r14d
	movl	%edx, 4(%rsp)                   # 4-byte Spill
.LBB2_2:                                # %.preheader
                                        # =>This Loop Header: Depth=1
                                        #     Child Loop BB2_4 Depth 2
	testl	%edx, %edx
	movss	(%rsp), %xmm1                   # 4-byte Reload
                                        # xmm1 = mem[0],zero,zero,zero
	jle	.LBB2_5
# %bb.3:                                # %.lr.ph
                                        #   in Loop: Header=BB2_2 Depth=1
	movl	%ebp, %eax
	movq	8(%rsp), %rcx                   # 8-byte Reload
	leaq	(%rcx,%rax,4), %r12
	xorl	%ebx, %ebx
.LBB2_4:                                #   Parent Loop BB2_2 Depth=1
                                        # =>  This Inner Loop Header: Depth=2
	xorps	%xmm0, %xmm0
	cvtsi2ss	%ebx, %xmm0
	mulss	%xmm1, %xmm0
	cvtss2sd	%xmm0, %xmm0
	movl	$_ZSt4cout, %edi
	callq	_ZNSo9_M_insertIdEERSoT_
	movq	%rax, %r15
	movl	$.L.str, %esi
	movl	$1, %edx
	movq	%rax, %rdi
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
	xorps	%xmm0, %xmm0
	cvtss2sd	(%r12,%rbx,4), %xmm0
	movq	%r15, %rdi
	callq	_ZNSo9_M_insertIdEERSoT_
	movq	%rax, %r15
	movq	(%rax), %rax
	movq	-24(%rax), %rdi
	addq	%r15, %rdi
	movl	$10, %esi
	callq	_ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc
	movsbl	%al, %esi
	movq	%r15, %rdi
	callq	_ZNSo3putEc
	movq	%rax, %rdi
	callq	_ZNSo5flushEv
	movss	(%rsp), %xmm1                   # 4-byte Reload
                                        # xmm1 = mem[0],zero,zero,zero
	incq	%rbx
	cmpq	%rbx, %r13
	jne	.LBB2_4
.LBB2_5:                                # %._crit_edge
                                        #   in Loop: Header=BB2_2 Depth=1
	movq	_ZSt4cout(%rip), %rax
	movq	-24(%rax), %rdi
	movl	$_ZSt4cout, %eax
	addq	%rax, %rdi
	movl	$10, %esi
	callq	_ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc
	movsbl	%al, %esi
	movl	$_ZSt4cout, %edi
	callq	_ZNSo3putEc
	movq	%rax, %rdi
	callq	_ZNSo5flushEv
	incq	%r14
	movl	4(%rsp), %edx                   # 4-byte Reload
	addl	%edx, %ebp
	cmpq	16(%rsp), %r14                  # 8-byte Folded Reload
	jne	.LBB2_2
.LBB2_6:                                # %._crit_edge15
	addq	$24, %rsp
	.cfi_def_cfa_offset 56
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%r12
	.cfi_def_cfa_offset 40
	popq	%r13
	.cfi_def_cfa_offset 32
	popq	%r14
	.cfi_def_cfa_offset 24
	popq	%r15
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	retq
.Lfunc_end2:
	.size	_Z5printPffii, .Lfunc_end2-_Z5printPffii
	.cfi_endproc
                                        # -- End function
	.section	.rodata.cst4,"aM",@progbits,4
	.p2align	2, 0x0                          # -- Begin function main
.LCPI3_0:
	.long	0x40000000                      # float 2
.LCPI3_1:
	.long	0x3f800000                      # float 1
.LCPI3_2:
	.long	0x3f000000                      # float 0.5
.LCPI3_5:
	.long	0x3a800000                      # float 9.765625E-4
	.section	.rodata.cst8,"aM",@progbits,8
	.p2align	3, 0x0
.LCPI3_3:
	.quad	0x3fe0000000000000              # double 0.5
.LCPI3_4:
	.quad	0x401921fb53c8d4f1              # double 6.2831853000000004
	.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	$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
	leaq	36(%rsp), %rsi
	movl	$_ZSt3cin, %edi
	callq	_ZNSi10_M_extractIfEERSiRT_
	leaq	52(%rsp), %r13
	movq	%rax, %rdi
	movq	%r13, %rsi
	callq	_ZNSi10_M_extractIfEERSiRT_
	leaq	48(%rsp), %r12
	movq	%rax, %rdi
	movq	%r12, %rsi
	callq	_ZNSi10_M_extractIfEERSiRT_
	leaq	44(%rsp), %rbp
	movq	%rax, %rdi
	movq	%rbp, %rsi
	callq	_ZNSi10_M_extractIfEERSiRT_
	leaq	4(%rsp), %rbx
	movq	%rax, %rdi
	movq	%rbx, %rsi
	callq	_ZNSi10_M_extractIfEERSiRT_
	leaq	20(%rsp), %r15
	movq	%rax, %rdi
	movq	%r15, %rsi
	callq	_ZNSi10_M_extractIfEERSiRT_
	leaq	40(%rsp), %r14
	movq	%rax, %rdi
	movq	%r14, %rsi
	callq	_ZNSi10_M_extractIfEERSiRT_
	movss	(%rbx), %xmm2                   # xmm2 = mem[0],zero,zero,zero
	movss	%xmm2, 8(%rsp)                  # 4-byte Spill
	movss	.LCPI3_0(%rip), %xmm1           # xmm1 = mem[0],zero,zero,zero
	addss	%xmm1, %xmm2
	movss	(%r15), %xmm0                   # xmm0 = mem[0],zero,zero,zero
	movss	%xmm0, (%rsp)                   # 4-byte Spill
	addss	%xmm1, %xmm0
	movss	%xmm2, 32(%rsp)                 # 4-byte Spill
	mulss	%xmm2, %xmm0
	cvttss2si	%xmm0, %eax
	shll	$2, %eax
	movslq	%eax, %r15
	movq	%r15, %rdi
	callq	malloc
	movq	%rax, %rbx
	movss	(%r13), %xmm2                   # xmm2 = mem[0],zero,zero,zero
	leaq	36(%rsp), %rax
	subss	(%rax), %xmm2
	movss	.LCPI3_1(%rip), %xmm0           # xmm0 = mem[0],zero,zero,zero
	movss	8(%rsp), %xmm1                  # 4-byte Reload
                                        # xmm1 = mem[0],zero,zero,zero
	addss	%xmm0, %xmm1
	movss	(%rbp), %xmm3                   # xmm3 = mem[0],zero,zero,zero
	subss	(%r12), %xmm3
	divss	%xmm1, %xmm2
	movss	(%rsp), %xmm1                   # 4-byte Reload
                                        # xmm1 = mem[0],zero,zero,zero
	addss	%xmm0, %xmm1
	divss	%xmm1, %xmm3
	cvtss2sd	%xmm3, %xmm4
	mulss	(%r14), %xmm3
	movaps	%xmm2, %xmm0
	mulss	%xmm2, %xmm0
	divss	%xmm0, %xmm3
	xorps	%xmm1, %xmm1
	ucomiss	%xmm3, %xmm1
	movss	%xmm3, (%rsp)                   # 4-byte Spill
	jae	.LBB3_10
# %bb.1:
	ucomiss	.LCPI3_2(%rip), %xmm3
	jae	.LBB3_10
# %bb.2:
	cvtss2sd	%xmm0, %xmm0
	mulsd	.LCPI3_3(%rip), %xmm0
	ucomisd	%xmm0, %xmm4
	jbe	.LBB3_3
.LBB3_10:                               # %._crit_edge38
	movl	$_ZSt4cout, %r14d
	movl	$_ZSt4cout, %edi
	movl	$.L.str.1, %esi
	movl	$2, %edx
	movsd	%xmm4, 8(%rsp)                  # 8-byte Spill
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
	xorps	%xmm0, %xmm0
	cvtss2sd	(%rsp), %xmm0                   # 4-byte Folded Reload
	movl	$_ZSt4cout, %edi
	callq	_ZNSo9_M_insertIdEERSoT_
	movq	%rax, %rbx
	movl	$.L.str.2, %esi
	movl	$2, %edx
	movq	%rax, %rdi
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
	movq	%rbx, %rdi
	movsd	8(%rsp), %xmm0                  # 8-byte Reload
                                        # xmm0 = mem[0],zero
	callq	_ZNSo9_M_insertIdEERSoT_
	movq	%rax, %rbx
	movq	(%rax), %rax
	movq	-24(%rax), %rdi
	addq	%rbx, %rdi
	movl	$10, %esi
	callq	_ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc
	movsbl	%al, %esi
	movq	%rbx, %rdi
	callq	_ZNSo3putEc
	movq	%rax, %rdi
	callq	_ZNSo5flushEv
	movl	$_ZSt4cout, %edi
	movl	$.L.str.3, %esi
	movl	$5, %edx
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
	movq	_ZSt4cout(%rip), %rax
	movq	-24(%rax), %rdi
	addq	%r14, %rdi
	movl	$10, %esi
	callq	_ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc
	movsbl	%al, %esi
	movl	$_ZSt4cout, %edi
	callq	_ZNSo3putEc
	movq	%rax, %rdi
	callq	_ZNSo5flushEv
	jmp	.LBB3_9
.LBB3_3:                                # %.preheader
	xorpd	%xmm0, %xmm0
	movss	32(%rsp), %xmm1                 # 4-byte Reload
                                        # xmm1 = mem[0],zero,zero,zero
	ucomiss	%xmm0, %xmm1
	movss	%xmm2, 8(%rsp)                  # 4-byte Spill
	jbe	.LBB3_6
# %bb.4:                                # %.lr.ph.preheader
	xorl	%r14d, %r14d
.LBB3_5:                                # %.lr.ph
                                        # =>This Inner Loop Header: Depth=1
	mulss	%xmm2, %xmm0
	cvtss2sd	%xmm0, %xmm0
	mulsd	.LCPI3_4(%rip), %xmm0
	callq	sin
	movss	.LCPI3_0(%rip), %xmm3           # xmm3 = mem[0],zero,zero,zero
	movss	8(%rsp), %xmm2                  # 4-byte Reload
                                        # xmm2 = mem[0],zero,zero,zero
	addsd	%xmm0, %xmm0
	cvtsd2ss	%xmm0, %xmm0
	movss	%xmm0, (%rbx,%r14,4)
	incq	%r14
	xorps	%xmm0, %xmm0
	cvtsi2ss	%r14d, %xmm0
	movss	4(%rsp), %xmm1                  # xmm1 = mem[0],zero,zero,zero
	addss	%xmm3, %xmm1
	ucomiss	%xmm0, %xmm1
	ja	.LBB3_5
.LBB3_6:                                # %._crit_edge
	leaq	24(%rsp), %r14
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	hipMalloc
	movq	(%r14), %rdi
	movq	%rbx, %rsi
	movq	%r15, %rdx
	movl	$1, %ecx
	callq	hipMemcpy
	movss	4(%rsp), %xmm0                  # xmm0 = mem[0],zero,zero,zero
	addss	.LCPI3_0(%rip), %xmm0
	mulss	.LCPI3_5(%rip), %xmm0
	callq	ceilf@PLT
	cvttss2si	%xmm0, %rax
	movl	%eax, %edi
	btsq	$32, %rdi
	movabsq	$4294967296, %rdx               # imm = 0x100000000
	orq	$1024, %rdx                     # imm = 0x400
	movl	$1, %esi
	movl	$1, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	__hipPushCallConfiguration
	testl	%eax, %eax
	jne	.LBB3_8
# %bb.7:
	movq	24(%rsp), %rdi
	movss	20(%rsp), %xmm0                 # xmm0 = mem[0],zero,zero,zero
	movss	.LCPI3_0(%rip), %xmm1           # xmm1 = mem[0],zero,zero,zero
	addss	%xmm1, %xmm0
	cvttss2si	%xmm0, %esi
	movss	4(%rsp), %xmm0                  # xmm0 = mem[0],zero,zero,zero
	addss	%xmm1, %xmm0
	cvttss2si	%xmm0, %edx
	movss	(%rsp), %xmm0                   # 4-byte Reload
                                        # xmm0 = mem[0],zero,zero,zero
	callq	_Z17__device_stub__FDPfiif
.LBB3_8:
	movq	24(%rsp), %rsi
	movq	%rbx, %rdi
	movq	%r15, %rdx
	movl	$2, %ecx
	callq	hipMemcpy
	movss	20(%rsp), %xmm0                 # xmm0 = mem[0],zero,zero,zero
	movss	.LCPI3_0(%rip), %xmm1           # xmm1 = mem[0],zero,zero,zero
	addss	%xmm1, %xmm0
	cvttss2si	%xmm0, %esi
	addss	4(%rsp), %xmm1
	cvttss2si	%xmm1, %edx
	movq	%rbx, %rdi
	movss	8(%rsp), %xmm0                  # 4-byte Reload
                                        # xmm0 = mem[0],zero,zero,zero
	callq	_Z5printPffii
	movq	24(%rsp), %rdi
	callq	hipFree
.LBB3_9:
	xorl	%eax, %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
.Lfunc_end3:
	.size	main, .Lfunc_end3-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	.LBB4_2
# %bb.1:
	movl	$__hip_fatbin_wrapper, %edi
	callq	__hipRegisterFatBinary
	movq	%rax, %rdi
	movq	%rax, __hip_gpubin_handle(%rip)
.LBB4_2:
	xorps	%xmm0, %xmm0
	movups	%xmm0, 16(%rsp)
	movups	%xmm0, (%rsp)
	movl	$_Z2FDPfiif, %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_end4:
	.size	__hip_module_ctor, .Lfunc_end4-__hip_module_ctor
	.cfi_endproc
                                        # -- End function
	.p2align	4, 0x90                         # -- Begin function __hip_module_dtor
	.type	__hip_module_dtor,@function
__hip_module_dtor:                      # @__hip_module_dtor
	.cfi_startproc
# %bb.0:
	movq	__hip_gpubin_handle(%rip), %rdi
	testq	%rdi, %rdi
	je	.LBB5_2
# %bb.1:
	pushq	%rax
	.cfi_def_cfa_offset 16
	callq	__hipUnregisterFatBinary
	movq	$0, __hip_gpubin_handle(%rip)
	addq	$8, %rsp
	.cfi_def_cfa_offset 8
.LBB5_2:
	retq
.Lfunc_end5:
	.size	__hip_module_dtor, .Lfunc_end5-__hip_module_dtor
	.cfi_endproc
                                        # -- End function
	.type	_Z2FDPfiif,@object              # @_Z2FDPfiif
	.section	.rodata,"a",@progbits
	.globl	_Z2FDPfiif
	.p2align	3, 0x0
_Z2FDPfiif:
	.quad	_Z17__device_stub__FDPfiif
	.size	_Z2FDPfiif, 8

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

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

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

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

	.type	.L__unnamed_1,@object           # @0
.L__unnamed_1:
	.asciz	"_Z2FDPfiif"
	.size	.L__unnamed_1, 11

	.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 _Z17__device_stub__FDPfiif
	.addrsig_sym __hip_module_ctor
	.addrsig_sym __hip_module_dtor
	.addrsig_sym _Z2FDPfiif
	.addrsig_sym _ZSt4cout
	.addrsig_sym _ZSt3cin
	.addrsig_sym __hip_fatbin
	.addrsig_sym __hip_fatbin_wrapper
	.addrsig_sym __hip_cuid_

	.text
	.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
	.protected	_Z2FDPfiif              ; -- Begin function _Z2FDPfiif
	.globl	_Z2FDPfiif
	.p2align	8
	.type	_Z2FDPfiif,@function
_Z2FDPfiif:                             ; @_Z2FDPfiif
; %bb.0:
	s_load_b128 s[4:7], s[0:1], 0x8
	s_waitcnt lgkmcnt(0)
	s_cmp_lt_i32 s4, 2
	s_cbranch_scc1 .LBB0_5
; %bb.1:                                ; %.lr.ph
	s_clause 0x1
	s_load_b32 s7, s[0:1], 0x24
	s_load_b64 s[2:3], s[0:1], 0x0
	s_ashr_i32 s9, s5, 31
	s_mov_b32 s8, s5
	v_mov_b32_e32 v5, 0
	s_waitcnt lgkmcnt(0)
	s_and_b32 s0, s7, 0xffff
	s_mov_b32 s7, 0
	v_mad_u64_u32 v[1:2], null, s15, s0, v[0:1]
	s_add_i32 s0, s5, -1
	v_fma_f32 v0, s6, -2.0, 1.0
	s_delay_alu instid0(VALU_DEP_2) | instskip(SKIP_2) | instid1(VALU_DEP_3)
	v_ashrrev_i32_e32 v2, 31, v1
	v_cmp_lt_i32_e32 vcc_lo, 0, v1
	v_cmp_gt_i32_e64 s0, s0, v1
	v_lshlrev_b64 v[3:4], 2, v[1:2]
	s_delay_alu instid0(VALU_DEP_2)
	s_and_b32 s12, vcc_lo, s0
	s_add_u32 s13, s2, -4
	s_addc_u32 s14, s3, -1
	s_lshl_b64 s[0:1], s[8:9], 2
	s_lshl_b64 s[8:9], s[8:9], 3
	v_add_co_u32 v3, vcc_lo, s0, v3
	v_add_co_ci_u32_e32 v4, vcc_lo, s1, v4, vcc_lo
	s_add_i32 s4, s4, -1
	s_add_u32 s15, s8, -4
	s_addc_u32 s16, s9, -1
	s_mov_b64 s[8:9], s[2:3]
.LBB0_2:                                ; =>This Inner Loop Header: Depth=1
	s_delay_alu instid0(SALU_CYCLE_1)
	s_add_u32 s10, s8, s0
	s_addc_u32 s11, s9, s1
	s_add_u32 s18, s8, s15
	s_addc_u32 s19, s9, s16
	s_clause 0x1
	global_store_b32 v5, v5, s[10:11]
	global_store_b32 v5, v5, s[18:19]
	s_and_saveexec_b32 s17, s12
	s_cbranch_execz .LBB0_4
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	v_add_nc_u32_e32 v6, s7, v1
	s_ashr_i32 s18, s7, 31
	v_add_co_u32 v8, vcc_lo, v1, s7
	v_add_co_ci_u32_e32 v9, vcc_lo, s18, v2, vcc_lo
	s_delay_alu instid0(VALU_DEP_3) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_ashrrev_i32_e32 v7, 31, v6
	v_lshlrev_b64 v[8:9], 2, v[8:9]
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_lshlrev_b64 v[6:7], 2, v[6:7]
	v_add_co_u32 v6, vcc_lo, s2, v6
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_4)
	v_add_co_ci_u32_e32 v7, vcc_lo, s3, v7, vcc_lo
	v_add_co_u32 v8, vcc_lo, s13, v8
	v_add_co_ci_u32_e32 v9, vcc_lo, s14, v9, vcc_lo
	s_clause 0x1
	global_load_b64 v[6:7], v[6:7], off
	global_load_b32 v8, v[8:9], off
	s_waitcnt vmcnt(1)
	v_mul_f32_e32 v9, v0, v6
	v_add_co_u32 v6, vcc_lo, s8, v3
	s_waitcnt vmcnt(0)
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_fmac_f32_e32 v9, s6, v8
	v_fmac_f32_e32 v9, s6, v7
	v_add_co_ci_u32_e32 v7, vcc_lo, s9, v4, vcc_lo
	global_store_b32 v[6:7], v9, off
.LBB0_4:                                ;   in Loop: Header=BB0_2 Depth=1
	s_or_b32 exec_lo, exec_lo, s17
	s_add_i32 s4, s4, -1
	s_add_i32 s7, s7, s5
	s_cmp_eq_u32 s4, 0
	s_mov_b64 s[8:9], s[10:11]
	s_waitcnt_vscnt null, 0x0
	s_barrier
	buffer_gl0_inv
	s_cbranch_scc0 .LBB0_2
.LBB0_5:                                ; %._crit_edge
	s_endpgm
	.section	.rodata,"a",@progbits
	.p2align	6, 0x0
	.amdhsa_kernel _Z2FDPfiif
		.amdhsa_group_segment_fixed_size 0
		.amdhsa_private_segment_fixed_size 0
		.amdhsa_kernarg_size 280
		.amdhsa_user_sgpr_count 15
		.amdhsa_user_sgpr_dispatch_ptr 0
		.amdhsa_user_sgpr_queue_ptr 0
		.amdhsa_user_sgpr_kernarg_segment_ptr 1
		.amdhsa_user_sgpr_dispatch_id 0
		.amdhsa_user_sgpr_private_segment_size 0
		.amdhsa_wavefront_size32 1
		.amdhsa_uses_dynamic_stack 0
		.amdhsa_enable_private_segment 0
		.amdhsa_system_sgpr_workgroup_id_x 1
		.amdhsa_system_sgpr_workgroup_id_y 0
		.amdhsa_system_sgpr_workgroup_id_z 0
		.amdhsa_system_sgpr_workgroup_info 0
		.amdhsa_system_vgpr_workitem_id 0
		.amdhsa_next_free_vgpr 10
		.amdhsa_next_free_sgpr 20
		.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	_Z2FDPfiif, .Lfunc_end0-_Z2FDPfiif
                                        ; -- End function
	.section	.AMDGPU.csdata,"",@progbits
; Kernel info:
; codeLenInByte = 400
; NumSgprs: 22
; NumVgprs: 10
; ScratchSize: 0
; MemoryBound: 0
; FloatMode: 240
; IeeeMode: 1
; LDSByteSize: 0 bytes/workgroup (compile time only)
; SGPRBlocks: 2
; VGPRBlocks: 1
; NumSGPRsForWavesPerEU: 22
; NumVGPRsForWavesPerEU: 10
; 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
      - .offset:         8
        .size:           4
        .value_kind:     by_value
      - .offset:         12
        .size:           4
        .value_kind:     by_value
      - .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:           _Z2FDPfiif
    .private_segment_fixed_size: 0
    .sgpr_count:     22
    .sgpr_spill_count: 0
    .symbol:         _Z2FDPfiif.kd
    .uniform_work_group_size: 1
    .uses_dynamic_stack: false
    .vgpr_count:     10
    .vgpr_spill_count: 0
    .wavefront_size: 32
    .workgroup_processor_mode: 1
amdhsa.target:   amdgcn-amd-amdhsa--gfx1100
amdhsa.version:
  - 1
  - 2
...

	.end_amdgpu_metadata
