#include <assert.h>
#include "cuda_runtime.h"
#include "device_launch_parameters.h"
#include <stdlib.h>
#include <cstring>

#ifndef gpuAssert
#include <stdio.h>
#define gpuAssert( condition ) { \
	if( (condition) != 0 ) { \
		fprintf( stderr, "\n FAILURE %s in %s, line %d\n", \
			cudaGetErrorString(condition), __FILE__, __LINE__ ) ; \
		exit( 1 ); } }
#endif

enum boid_type {PREY_BOID, PREDATOR_BOID, FOOD_BOID};

__device__ float* data;

__global__ void test_kernel()
{
	const int tid = threadIdx.x;
	data[tid]=tid;
}

int main1(void)
{
	boid_type type = PREY_BOID;
	printf("enum: %d\n", type);
	const int NUMBER = 1024;
	const size_t size = NUMBER*sizeof(float);
	
	float *data_h = (float*)malloc(size);

	float *data_d;
	float *data_symbol;
	cudaMalloc(&data_d, size);

	//gpuAssert( cudaGetSymbolAddress((void**)&data_symbol, "data"));
	gpuAssert( cudaMemcpyToSymbol( data, &data_d, sizeof(data_d), 0, cudaMemcpyHostToDevice ) );

	test_kernel<<<1, 1024>>>();

	gpuAssert( cudaMemcpy( data_h, data_d, size, cudaMemcpyDeviceToHost ) );
	for (int i = 0; i < NUMBER; i++)
		printf("%f ", data_h[i]);
	
	return (int)cudaThreadExit();
	
}
	.file	"tmpxft_0026a769_00000000-6_test.cudafe1.cpp"
	.text
#APP

#NO_APP
	.type	_ZL26__cudaUnregisterBinaryUtilv, @function
_ZL26__cudaUnregisterBinaryUtilv:
.LFB2030:
	.cfi_startproc
	endbr64
	movq	_ZL20__cudaFatCubinHandle(%rip), %rdi
	jmp	__cudaUnregisterFatBinary@PLT
	.cfi_endproc
.LFE2030:
	.size	_ZL26__cudaUnregisterBinaryUtilv, .-_ZL26__cudaUnregisterBinaryUtilv
	.globl	_Z30__device_stub__Z11test_kernelvv
	.type	_Z30__device_stub__Z11test_kernelvv, @function
_Z30__device_stub__Z11test_kernelvv:
.LFB2052:
	.cfi_startproc
	endbr64
	subq	$88, %rsp
	.cfi_def_cfa_offset 96
	movq	%fs:40, %rax
	movq	%rax, 72(%rsp)
	movabsq	$4294967297, %rax
	leaq	8(%rsp), %rcx
	movq	%rsp, %rdx
	leaq	28(%rsp), %rsi
	leaq	16(%rsp), %rdi
	movl	$1, 24(%rsp)
	movl	$1, 36(%rsp)
	movq	%rax, 16(%rsp)
	movq	%rax, 28(%rsp)
	call	__cudaPopCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L2
	pushq	8(%rsp)
	.cfi_def_cfa_offset 104
	leaq	_Z11test_kernelv(%rip), %rdi
	pushq	8(%rsp)
	.cfi_def_cfa_offset 112
	movq	44(%rsp), %rcx
	movl	52(%rsp), %r8d
	movq	32(%rsp), %rsi
	movl	40(%rsp), %edx
	leaq	80(%rsp), %r9
	call	cudaLaunchKernel@PLT
	popq	%rax
	.cfi_def_cfa_offset 104
	popq	%rdx
	.cfi_def_cfa_offset 96
.L2:
	movq	72(%rsp), %rax
	subq	%fs:40, %rax
	je	.L4
	call	__stack_chk_fail@PLT
.L4:
	addq	$88, %rsp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE2052:
	.size	_Z30__device_stub__Z11test_kernelvv, .-_Z30__device_stub__Z11test_kernelvv
	.globl	_Z11test_kernelv
	.type	_Z11test_kernelv, @function
_Z11test_kernelv:
.LFB2053:
	.cfi_startproc
	endbr64
	jmp	_Z30__device_stub__Z11test_kernelvv
	.cfi_endproc
.LFE2053:
	.size	_Z11test_kernelv, .-_Z11test_kernelv
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"enum: %d\n"
.LC1:
	.string	"/home/ubuntu/Datasets/stackv2/train-structured/xiaoyaoth/GAgentExt/master/test.cu"
.LC2:
	.string	"\n FAILURE %s in %s, line %d\n"
.LC3:
	.string	"%f "
	.text
	.globl	_Z5main1v
	.type	_Z5main1v, @function
_Z5main1v:
.LFB2027:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	xorl	%edx, %edx
	leaq	.LC0(%rip), %rsi
	movl	$2, %edi
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	leaq	_ZL4data(%rip), %r12
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	subq	$48, %rsp
	.cfi_def_cfa_offset 80
	movq	%fs:40, %rax
	movq	%rax, 40(%rsp)
	xorl	%eax, %eax
	leaq	8(%rsp), %rbp
	call	__printf_chk@PLT
	movl	$4096, %edi
	call	malloc@PLT
	movl	$4096, %esi
	movq	%rbp, %rdi
	movq	%rax, %rbx
	call	cudaMalloc@PLT
	xorl	%ecx, %ecx
	movl	$1, %r8d
	movq	%rbp, %rsi
	movl	$8, %edx
	movq	%r12, %rdi
	call	cudaMemcpyToSymbol@PLT
	testl	%eax, %eax
	je	.L9
	xorl	%ecx, %ecx
	movl	$1, %r8d
	movl	$8, %edx
	movq	%rbp, %rsi
	movq	%r12, %rdi
	call	cudaMemcpyToSymbol@PLT
	movl	%eax, %edi
	call	cudaGetErrorString@PLT
	movl	$40, %r9d
	movq	%rax, %rcx
	jmp	.L17
.L9:
	movl	$4194305, %edx
	xorl	%r9d, %r9d
	xorl	%r8d, %r8d
	movl	$1, %ecx
	salq	$10, %rdx
	movl	$1, %esi
	movabsq	$4294967297, %rdi
	call	__cudaPushCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L10
	call	_Z30__device_stub__Z11test_kernelvv
.L10:
	movq	8(%rsp), %rsi
	movl	$2, %ecx
	movq	%rbx, %rdi
	xorl	%ebp, %ebp
	movl	$4096, %edx
	leaq	.LC3(%rip), %r12
	call	cudaMemcpy@PLT
	testl	%eax, %eax
	je	.L11
	movq	8(%rsp), %rsi
	movl	$2, %ecx
	movl	$4096, %edx
	movq	%rbx, %rdi
	call	cudaMemcpy@PLT
	movl	%eax, %edi
	call	cudaGetErrorString@PLT
	movl	$44, %r9d
	movq	%rax, %rcx
.L17:
	movq	stderr(%rip), %rdi
	leaq	.LC1(%rip), %r8
	leaq	.LC2(%rip), %rdx
	xorl	%eax, %eax
	movl	$2, %esi
	call	__fprintf_chk@PLT
	movl	$1, %edi
	call	exit@PLT
.L11:
	cvtss2sd	(%rbx,%rbp,4), %xmm0
	movq	%r12, %rsi
	movl	$2, %edi
	movb	$1, %al
	call	__printf_chk@PLT
	incq	%rbp
	cmpq	$1024, %rbp
	jne	.L11
	call	cudaThreadExit@PLT
	movq	40(%rsp), %rdx
	subq	%fs:40, %rdx
	je	.L12
	call	__stack_chk_fail@PLT
.L12:
	addq	$48, %rsp
	.cfi_def_cfa_offset 32
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE2027:
	.size	_Z5main1v, .-_Z5main1v
	.section	.rodata.str1.1
.LC4:
	.string	"_Z11test_kernelv"
.LC5:
	.string	"data"
	.section	.text.startup,"ax",@progbits
	.type	_ZL24__sti____cudaRegisterAllv, @function
_ZL24__sti____cudaRegisterAllv:
.LFB2055:
	.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	.LC4(%rip), %rdx
	movq	%rax, %rdi
	movq	%rax, %rbx
	pushq	$0
	.cfi_def_cfa_offset 40
	movq	%rdx, %rcx
	leaq	_Z11test_kernelv(%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	%r8d, %r8d
	pushq	$0
	.cfi_def_cfa_offset 24
	leaq	.LC5(%rip), %rdx
	movl	$8, %r9d
	leaq	_ZL4data(%rip), %rsi
	pushq	$0
	.cfi_def_cfa_offset 32
	movq	%rdx, %rcx
	call	__cudaRegisterVar@PLT
	movq	_ZL20__cudaFatCubinHandle(%rip), %rdi
	popq	%rax
	.cfi_def_cfa_offset 24
	popq	%rdx
	.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
.LFE2055:
	.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
	.local	_ZL4data
	.comm	_ZL4data,8,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 <assert.h>
#include "hip/hip_runtime.h"

#include <stdlib.h>
#include <cstring>

#ifndef gpuAssert
#include <stdio.h>
#define gpuAssert( condition ) { \
	if( (condition) != 0 ) { \
		fprintf( stderr, "\n FAILURE %s in %s, line %d\n", \
			hipGetErrorString(condition), __FILE__, __LINE__ ) ; \
		exit( 1 ); } }
#endif

enum boid_type {PREY_BOID, PREDATOR_BOID, FOOD_BOID};

__device__ float* data;

__global__ void test_kernel()
{
	const int tid = threadIdx.x;
	data[tid]=tid;
}

int main1(void)
{
	boid_type type = PREY_BOID;
	printf("enum: %d\n", type);
	const int NUMBER = 1024;
	const size_t size = NUMBER*sizeof(float);
	
	float *data_h = (float*)malloc(size);

	float *data_d;
	float *data_symbol;
	hipMalloc(&data_d, size);

	//gpuAssert( cudaGetSymbolAddress((void**)&data_symbol, "data"));
	gpuAssert( hipMemcpyToSymbol( HIP_SYMBOL(data), &data_d, sizeof(data_d), 0, hipMemcpyHostToDevice ) );

	test_kernel<<<1, 1024>>>();

	gpuAssert( hipMemcpy( data_h, data_d, size, hipMemcpyDeviceToHost ) );
	for (int i = 0; i < NUMBER; i++)
		printf("%f ", data_h[i]);
	
	return (int)hipDeviceReset();
	
}
	.text
	.file	"test.hip"
	.globl	_Z26__device_stub__test_kernelv # -- Begin function _Z26__device_stub__test_kernelv
	.type	_Z26__device_stub__test_kernelv,@function
_Z26__device_stub__test_kernelv:        # @_Z26__device_stub__test_kernelv
	.cfi_startproc
# %bb.0:
	pushq	%r15
	.cfi_def_cfa_offset 16
	pushq	%r14
	.cfi_def_cfa_offset 24
	pushq	%r12
	.cfi_def_cfa_offset 32
	pushq	%rbx
	.cfi_def_cfa_offset 40
	subq	$56, %rsp
	.cfi_def_cfa_offset 96
	.cfi_offset %rbx, -40
	.cfi_offset %r12, -32
	.cfi_offset %r14, -24
	.cfi_offset %r15, -16
	leaq	40(%rsp), %rbx
	leaq	24(%rsp), %r14
	leaq	16(%rsp), %r15
	leaq	8(%rsp), %r12
	movq	%rbx, %rdi
	movq	%r14, %rsi
	movq	%r15, %rdx
	movq	%r12, %rcx
	callq	__hipPopCallConfiguration
	movq	(%rbx), %rsi
	movl	8(%rbx), %edx
	movq	(%r14), %rcx
	movl	8(%r14), %r8d
	movq	%rsp, %r9
	movl	$_Z11test_kernelv, %edi
	pushq	(%r12)
	.cfi_adjust_cfa_offset 8
	pushq	(%r15)
	.cfi_adjust_cfa_offset 8
	callq	hipLaunchKernel
	addq	$72, %rsp
	.cfi_adjust_cfa_offset -72
	popq	%rbx
	.cfi_def_cfa_offset 32
	popq	%r12
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	retq
.Lfunc_end0:
	.size	_Z26__device_stub__test_kernelv, .Lfunc_end0-_Z26__device_stub__test_kernelv
	.cfi_endproc
                                        # -- End function
	.globl	_Z5main1v                       # -- Begin function _Z5main1v
	.type	_Z5main1v,@function
_Z5main1v:                              # @_Z5main1v
	.cfi_startproc
# %bb.0:
	pushq	%r14
	.cfi_def_cfa_offset 16
	pushq	%rbx
	.cfi_def_cfa_offset 24
	pushq	%rax
	.cfi_def_cfa_offset 32
	.cfi_offset %rbx, -24
	.cfi_offset %r14, -16
	movl	$.L.str, %edi
	xorl	%esi, %esi
	xorl	%eax, %eax
	callq	printf
	movl	$4096, %edi                     # imm = 0x1000
	callq	malloc
	movq	%rax, %rbx
	movq	%rsp, %r14
	movl	$4096, %esi                     # imm = 0x1000
	movq	%r14, %rdi
	callq	hipMalloc
	movl	$data, %edi
	movl	$8, %edx
	movq	%r14, %rsi
	xorl	%ecx, %ecx
	movl	$1, %r8d
	callq	hipMemcpyToSymbol
	testl	%eax, %eax
	jne	.LBB1_1
# %bb.3:
	movabsq	$4294967297, %rdi               # imm = 0x100000001
	leaq	1023(%rdi), %rdx
	movl	$1, %esi
	movl	$1, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	__hipPushCallConfiguration
	testl	%eax, %eax
	jne	.LBB1_5
# %bb.4:
	callq	_Z26__device_stub__test_kernelv
.LBB1_5:
	movq	(%rsp), %rsi
	movl	$4096, %edx                     # imm = 0x1000
	movq	%rbx, %rdi
	movl	$2, %ecx
	callq	hipMemcpy
	testl	%eax, %eax
	jne	.LBB1_9
# %bb.6:                                # %.preheader.preheader
	xorl	%r14d, %r14d
.LBB1_7:                                # %.preheader
                                        # =>This Inner Loop Header: Depth=1
	xorps	%xmm0, %xmm0
	cvtss2sd	(%rbx,%r14,4), %xmm0
	movl	$.L.str.3, %edi
	movb	$1, %al
	callq	printf
	incq	%r14
	cmpq	$1024, %r14                     # imm = 0x400
	jne	.LBB1_7
# %bb.8:
	callq	hipDeviceReset
	addq	$8, %rsp
	.cfi_def_cfa_offset 24
	popq	%rbx
	.cfi_def_cfa_offset 16
	popq	%r14
	.cfi_def_cfa_offset 8
	retq
.LBB1_1:
	.cfi_def_cfa_offset 32
	movq	stderr(%rip), %rbx
	movq	%rsp, %rsi
	movl	$data, %edi
	movl	$8, %edx
	xorl	%ecx, %ecx
	movl	$1, %r8d
	callq	_Z17hipMemcpyToSymbolIPfE10hipError_tRKT_PKvmm13hipMemcpyKind
	movl	%eax, %edi
	callq	hipGetErrorString
	movl	$.L.str.1, %esi
	movl	$.L.str.2, %ecx
	movq	%rbx, %rdi
	movq	%rax, %rdx
	movl	$40, %r8d
	jmp	.LBB1_2
.LBB1_9:
	movq	stderr(%rip), %r14
	movq	(%rsp), %rsi
	movl	$4096, %edx                     # imm = 0x1000
	movq	%rbx, %rdi
	movl	$2, %ecx
	callq	hipMemcpy
	movl	%eax, %edi
	callq	hipGetErrorString
	movl	$.L.str.1, %esi
	movl	$.L.str.2, %ecx
	movq	%r14, %rdi
	movq	%rax, %rdx
	movl	$44, %r8d
.LBB1_2:
	xorl	%eax, %eax
	callq	fprintf
	movl	$1, %edi
	callq	exit
.Lfunc_end1:
	.size	_Z5main1v, .Lfunc_end1-_Z5main1v
	.cfi_endproc
                                        # -- End function
	.section	.text._Z17hipMemcpyToSymbolIPfE10hipError_tRKT_PKvmm13hipMemcpyKind,"axG",@progbits,_Z17hipMemcpyToSymbolIPfE10hipError_tRKT_PKvmm13hipMemcpyKind,comdat
	.weak	_Z17hipMemcpyToSymbolIPfE10hipError_tRKT_PKvmm13hipMemcpyKind # -- Begin function _Z17hipMemcpyToSymbolIPfE10hipError_tRKT_PKvmm13hipMemcpyKind
	.type	_Z17hipMemcpyToSymbolIPfE10hipError_tRKT_PKvmm13hipMemcpyKind,@function
_Z17hipMemcpyToSymbolIPfE10hipError_tRKT_PKvmm13hipMemcpyKind: # @_Z17hipMemcpyToSymbolIPfE10hipError_tRKT_PKvmm13hipMemcpyKind
	.cfi_startproc
# %bb.0:
	jmp	hipMemcpyToSymbol               # TAILCALL
.Lfunc_end2:
	.size	_Z17hipMemcpyToSymbolIPfE10hipError_tRKT_PKvmm13hipMemcpyKind, .Lfunc_end2-_Z17hipMemcpyToSymbolIPfE10hipError_tRKT_PKvmm13hipMemcpyKind
	.cfi_endproc
                                        # -- End function
	.text
	.p2align	4, 0x90                         # -- Begin function __hip_module_ctor
	.type	__hip_module_ctor,@function
__hip_module_ctor:                      # @__hip_module_ctor
	.cfi_startproc
# %bb.0:
	pushq	%rbx
	.cfi_def_cfa_offset 16
	subq	$32, %rsp
	.cfi_def_cfa_offset 48
	.cfi_offset %rbx, -16
	movq	__hip_gpubin_handle(%rip), %rbx
	testq	%rbx, %rbx
	jne	.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	$_Z11test_kernelv, %esi
	movl	$.L__unnamed_1, %edx
	movl	$.L__unnamed_1, %ecx
	movq	%rbx, %rdi
	movl	$-1, %r8d
	xorl	%r9d, %r9d
	callq	__hipRegisterFunction
	movl	$0, 8(%rsp)
	movl	$0, (%rsp)
	movl	$data, %esi
	movl	$.L__unnamed_2, %edx
	movl	$.L__unnamed_2, %ecx
	movl	$8, %r9d
	movq	%rbx, %rdi
	xorl	%r8d, %r8d
	callq	__hipRegisterVar
	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	data,@object                    # @data
	.local	data
	.comm	data,8,8
	.type	_Z11test_kernelv,@object        # @_Z11test_kernelv
	.section	.rodata,"a",@progbits
	.globl	_Z11test_kernelv
	.p2align	3, 0x0
_Z11test_kernelv:
	.quad	_Z26__device_stub__test_kernelv
	.size	_Z11test_kernelv, 8

	.type	.L.str,@object                  # @.str
	.section	.rodata.str1.1,"aMS",@progbits,1
.L.str:
	.asciz	"enum: %d\n"
	.size	.L.str, 10

	.type	.L.str.1,@object                # @.str.1
.L.str.1:
	.asciz	"\n FAILURE %s in %s, line %d\n"
	.size	.L.str.1, 29

	.type	.L.str.2,@object                # @.str.2
.L.str.2:
	.asciz	"/home/ubuntu/Datasets/stackv2/train-structured-repos-hip-sm89/xiaoyaoth/GAgentExt/master/test.hip"
	.size	.L.str.2, 98

	.type	.L.str.3,@object                # @.str.3
.L.str.3:
	.asciz	"%f "
	.size	.L.str.3, 4

	.type	.L__unnamed_1,@object           # @0
.L__unnamed_1:
	.asciz	"_Z11test_kernelv"
	.size	.L__unnamed_1, 17

	.type	.L__unnamed_2,@object           # @1
.L__unnamed_2:
	.asciz	"data"
	.size	.L__unnamed_2, 5

	.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 _Z26__device_stub__test_kernelv
	.addrsig_sym __hip_module_ctor
	.addrsig_sym __hip_module_dtor
	.addrsig_sym data
	.addrsig_sym _Z11test_kernelv
	.addrsig_sym __hip_fatbin
	.addrsig_sym __hip_fatbin_wrapper
	.addrsig_sym __hip_cuid_

	.text
	.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
	.protected	_Z11test_kernelv        ; -- Begin function _Z11test_kernelv
	.globl	_Z11test_kernelv
	.p2align	8
	.type	_Z11test_kernelv,@function
_Z11test_kernelv:                       ; @_Z11test_kernelv
; %bb.0:
	s_getpc_b64 s[0:1]
	s_add_u32 s0, s0, data@rel32@lo+4
	s_addc_u32 s1, s1, data@rel32@hi+12
	v_lshlrev_b32_e32 v1, 2, v0
	s_load_b64 s[0:1], s[0:1], 0x0
	v_cvt_f32_i32_e32 v2, v0
	s_waitcnt lgkmcnt(0)
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_add_co_u32 v0, s0, s0, v1
	v_add_co_ci_u32_e64 v1, null, s1, 0, s0
	flat_store_b32 v[0:1], v2
	s_endpgm
	.section	.rodata,"a",@progbits
	.p2align	6, 0x0
	.amdhsa_kernel _Z11test_kernelv
		.amdhsa_group_segment_fixed_size 0
		.amdhsa_private_segment_fixed_size 0
		.amdhsa_kernarg_size 0
		.amdhsa_user_sgpr_count 15
		.amdhsa_user_sgpr_dispatch_ptr 0
		.amdhsa_user_sgpr_queue_ptr 0
		.amdhsa_user_sgpr_kernarg_segment_ptr 0
		.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 3
		.amdhsa_next_free_sgpr 2
		.amdhsa_reserve_vcc 0
		.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	_Z11test_kernelv, .Lfunc_end0-_Z11test_kernelv
                                        ; -- End function
	.section	.AMDGPU.csdata,"",@progbits
; Kernel info:
; codeLenInByte = 72
; NumSgprs: 2
; NumVgprs: 3
; ScratchSize: 0
; MemoryBound: 0
; FloatMode: 240
; IeeeMode: 1
; LDSByteSize: 0 bytes/workgroup (compile time only)
; SGPRBlocks: 0
; VGPRBlocks: 0
; NumSGPRsForWavesPerEU: 2
; NumVGPRsForWavesPerEU: 3
; Occupancy: 16
; WaveLimiterHint : 1
; 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
	.protected	data                    ; @data
	.type	data,@object
	.section	.bss,"aw",@nobits
	.globl	data
	.p2align	3, 0x0
data:
	.quad	0
	.size	data, 8

	.type	__hip_cuid_,@object             ; @__hip_cuid_
	.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 data
	.addrsig_sym __hip_cuid_
	.amdgpu_metadata
---
amdhsa.kernels:
  - .args:           []
    .group_segment_fixed_size: 0
    .kernarg_segment_align: 4
    .kernarg_segment_size: 0
    .language:       OpenCL C
    .language_version:
      - 2
      - 0
    .max_flat_workgroup_size: 1024
    .name:           _Z11test_kernelv
    .private_segment_fixed_size: 0
    .sgpr_count:     2
    .sgpr_spill_count: 0
    .symbol:         _Z11test_kernelv.kd
    .uniform_work_group_size: 1
    .uses_dynamic_stack: false
    .vgpr_count:     3
    .vgpr_spill_count: 0
    .wavefront_size: 32
    .workgroup_processor_mode: 1
amdhsa.target:   amdgcn-amd-amdhsa--gfx1100
amdhsa.version:
  - 1
  - 2
...

	.end_amdgpu_metadata
