#include <stdio.h>
#include <sys/time.h>
#include <stdlib.h>
#include <unistd.h>



//define the check err
#define CHECK_ERR(x)                                    \
  if (x != cudaSuccess) {                               \
    fprintf(stderr,"%s in %s at line %d\n",             \
	    cudaGetErrorString(err),__FILE__,__LINE__);	\
    exit(-1);						\
  }                                                     \

//define the maximum operations for the loop 
unsigned long MAX_OPERATIONS = 40000000;

//size for 1MB
const long MEGABYTE = 1048576;

__global__ void gpu_iops(unsigned long max_ops) {


    
}

//get the parameter
int main(int argc, char *argv[]) {
  
    char c;  
    char test = 'B';
    char rw = 'R';
    while ( (c = getopt(argc, argv, "r:t:") ) != -1)
    {
        switch (c) 
        {
            case 'r':
                rw = optarg[0];
                break;
            case 't':
                test = optarg[0];
                break;
            default:
                printf("nothing\n");
                return -1;
        }
    }
//define the time variables
    struct timeval tv;
    long long startTime, stopTime;
    double seconds;
	
//define the cuda err
    cudaError_t err;
 
//define the memory pointer
 
    unsigned char *d_mem_pointer;
    unsigned char *mem_pointer;
	
    cudaMemcpyKind dir = cudaMemcpyHostToDevice;
	
	//direction for read and write
    if(rw == 'R')
    {
      dir = cudaMemcpyDeviceToHost;
    }
	
    else if(rw == 'W')
    {
      dir - cudaMemcpyHostToDevice;
    }
    
    //test the 1B size block
    if(test == 'B')
    {
      
      err = cudaMalloc((void **) &d_mem_pointer, sizeof(unsigned char)*MEGABYTE);
      CHECK_ERR(err);
      mem_pointer = (unsigned char *)malloc(sizeof(unsigned char)*1);
      gettimeofday(&tv, NULL);
      startTime = tv.tv_sec*1000000LL + tv.tv_usec;
    
      for(unsigned long i = 0; i<MEGABYTE; i++)
      {
//write operation
        if(rw == 'W')
          err = cudaMemcpy((void *)&d_mem_pointer[i], (void *)mem_pointer, 1, dir);
//read operation  
      else if(rw == 'R')
          err = cudaMemcpy((void *)mem_pointer, (void *)&d_mem_pointer[i], 1, dir);
        CHECK_ERR(err);
      }
      
      gettimeofday(&tv, NULL);
//record the stop time 
      stopTime = tv.tv_sec*1000000LL + tv.tv_usec;
	  
//totally time cost 
 
      seconds = (stopTime-startTime)/1000000.0;
      printf("Operation: %c\tMessage Size:1%c\tBandwidth: %lf MB/S \n", rw, test, 1.0/(seconds)); 
    }
//test the 1K block size
    else if(test == 'K')
    {
      err = cudaMalloc((void **) &d_mem_pointer, sizeof(unsigned char)*256*MEGABYTE);
      CHECK_ERR(err);
      mem_pointer = (unsigned char *)malloc(sizeof(unsigned char)*1024);
      gettimeofday(&tv, NULL);
      startTime = tv.tv_sec*1000000LL + tv.tv_usec;
    
      for(unsigned long i = 0; i<256*MEGABYTE/1024; i++)
      {
// test the write operation 
        if(rw == 'W')
          err = cudaMemcpy((void *)&d_mem_pointer[i*1024], (void *)mem_pointer, 1024, dir);
//test the read operation 
        else if(rw == 'R')
          err = cudaMemcpy((void *)mem_pointer, (void *)&d_mem_pointer[i*1024], 1024, dir);
        CHECK_ERR(err);
      }
      
      gettimeofday(&tv, NULL);
//record the stop time
      stopTime = tv.tv_sec*1000000LL + tv.tv_usec;
// totally time cost 
      seconds = (stopTime-startTime)/1000000.0;
      printf("Operation:%c\tMessage Size:1%cB\tBandwidth: %lf MB/S \n", rw, test, (256.0/1024.0)/(seconds)); 
    }
//test 1MB size Block
    else if(test == 'M')
    {
      err = cudaMalloc((void **) &d_mem_pointer, sizeof(unsigned char)*512*MEGABYTE);
      CHECK_ERR(err);
      mem_pointer = (unsigned char *)malloc(sizeof(unsigned char)*MEGABYTE);
      gettimeofday(&tv, NULL);
      startTime = tv.tv_sec*1000000LL + tv.tv_usec;
    
      for(unsigned long i = 0; i<512*10; i++)
      {
//write operation
        if(rw == 'W')
          err = cudaMemcpy((void *)&d_mem_pointer[(i*MEGABYTE)%(512*MEGABYTE)], (void *)mem_pointer, MEGABYTE, dir);
//read operation 
        else if(rw == 'R')
          err = cudaMemcpy((void *)mem_pointer, (void *)&d_mem_pointer[(i*MEGABYTE)%(512*MEGABYTE)], MEGABYTE, dir);
        CHECK_ERR(err);
      }
      
      gettimeofday(&tv, NULL);
// record the stop time
      stopTime = tv.tv_sec*1000000LL + tv.tv_usec;
//ttoally time cost 
      seconds = (stopTime-startTime)/1000000.0;
      printf("Operation:%c\tMessage Size:1%cB \tBandwidth:%lf MB/S\n", rw, test, (512*10)/(seconds)); 
    }
    err = cudaFree(d_mem_pointer);
    CHECK_ERR(err);
}

	.file	"tmpxft_00323197_00000000-6_gpu_mem_bench.cudafe1.cpp"
	.text
#APP

#NO_APP
	.type	_ZL26__cudaUnregisterBinaryUtilv, @function
_ZL26__cudaUnregisterBinaryUtilv:
.LFB2043:
	.cfi_startproc
	endbr64
	movq	_ZL20__cudaFatCubinHandle(%rip), %rdi
	jmp	__cudaUnregisterFatBinary@PLT
	.cfi_endproc
.LFE2043:
	.size	_ZL26__cudaUnregisterBinaryUtilv, .-_ZL26__cudaUnregisterBinaryUtilv
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"nothing\n"
.LC1:
	.string	"r:t:"
.LC2:
	.string	"/home/ubuntu/Datasets/stackv2/train-structured/terryisverybusy/benchmark-Project/master/code/gpu_mem_bench.cu"
.LC3:
	.string	"%s in %s at line %d\n"
.LC6:
	.string	"Operation: %c\tMessage Size:1%c\tBandwidth: %lf MB/S \n"
.LC8:
	.string	"Operation:%c\tMessage Size:1%cB\tBandwidth: %lf MB/S \n"
.LC10:
	.string	"Operation:%c\tMessage Size:1%cB \tBandwidth:%lf MB/S\n"
	.section	.text.startup,"ax",@progbits
	.globl	main
	.type	main, @function
main:
.LFB2040:
	.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
	movb	$66, %r14b
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	leaq	.LC1(%rip), %r13
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	movq	%rsi, %r12
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	movl	%edi, %ebp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	movb	$82, %bl
	subq	$56, %rsp
	.cfi_def_cfa_offset 112
	movq	%fs:40, %rax
	movq	%rax, 40(%rsp)
	xorl	%eax, %eax
.L3:
	movq	%r13, %rdx
	movq	%r12, %rsi
	movl	%ebp, %edi
	call	getopt@PLT
	cmpb	$-1, %al
	je	.L53
	cmpb	$114, %al
	je	.L4
	cmpb	$116, %al
	jne	.L54
	movq	optarg(%rip), %rax
	movb	(%rax), %r14b
	jmp	.L3
.L4:
	movq	optarg(%rip), %rax
	movb	(%rax), %bl
	jmp	.L3
.L54:
	leaq	.LC0(%rip), %rsi
	movl	$2, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	orl	$-1, %eax
	jmp	.L2
.L53:
	xorl	%ebp, %ebp
	cmpb	$82, %bl
	sete	%bpl
	incl	%ebp
	cmpb	$66, %r14b
	jne	.L11
	leaq	16(%rsp), %rdi
	movl	$1048576, %esi
	call	cudaMalloc@PLT
	movl	%eax, %edi
	testl	%eax, %eax
	je	.L12
	call	cudaGetErrorString@PLT
	movl	$80, %r9d
	movq	%rax, %rcx
	jmp	.L51
.L12:
	movl	$1, %edi
	leaq	24(%rsp), %r14
	xorl	%r15d, %r15d
	call	malloc@PLT
	xorl	%esi, %esi
	movq	%r14, %rdi
	movq	%rax, %r12
	call	gettimeofday@PLT
	imulq	$1000000, 24(%rsp), %r13
	addq	32(%rsp), %r13
.L16:
	cmpb	$87, %bl
	jne	.L13
	movq	16(%rsp), %rdi
	movl	%ebp, %ecx
	movl	$1, %edx
	movq	%r12, %rsi
	addq	%r15, %rdi
	jmp	.L47
.L13:
	cmpb	$82, %bl
	jne	.L15
	movq	16(%rsp), %rsi
	movl	%ebp, %ecx
	movl	$1, %edx
	movq	%r12, %rdi
	addq	%r15, %rsi
.L47:
	call	cudaMemcpy@PLT
	testl	%eax, %eax
	je	.L15
	movl	%eax, %edi
	call	cudaGetErrorString@PLT
	movl	$93, %r9d
	movq	%rax, %rcx
.L51:
	movq	stderr(%rip), %rdi
	leaq	.LC2(%rip), %r8
	leaq	.LC3(%rip), %rdx
	xorl	%eax, %eax
	movl	$2, %esi
	call	__fprintf_chk@PLT
	orl	$-1, %edi
	call	exit@PLT
.L15:
	incq	%r15
	cmpq	$1048576, %r15
	jne	.L16
	xorl	%esi, %esi
	movq	%r14, %rdi
	call	gettimeofday@PLT
	movsd	.LC5(%rip), %xmm0
	movsbl	%bl, %edx
	imulq	$1000000, 24(%rsp), %rax
	addq	32(%rsp), %rax
	movl	$66, %ecx
	leaq	.LC6(%rip), %rsi
	subq	%r13, %rax
	cvtsi2sdq	%rax, %xmm1
	divsd	.LC4(%rip), %xmm1
	divsd	%xmm1, %xmm0
	jmp	.L50
.L11:
	cmpb	$75, %r14b
	jne	.L18
	leaq	16(%rsp), %rdi
	movl	$268435456, %esi
	call	cudaMalloc@PLT
	movl	%eax, %edi
	testl	%eax, %eax
	je	.L19
	call	cudaGetErrorString@PLT
	movl	$109, %r9d
	movq	%rax, %rcx
	jmp	.L51
.L19:
	movl	$1024, %edi
	leaq	24(%rsp), %r14
	xorl	%r15d, %r15d
	call	malloc@PLT
	xorl	%esi, %esi
	movq	%r14, %rdi
	movq	%rax, %r12
	call	gettimeofday@PLT
	imulq	$1000000, 24(%rsp), %r13
	addq	32(%rsp), %r13
.L23:
	cmpb	$87, %bl
	jne	.L20
	movq	16(%rsp), %rdi
	movl	%ebp, %ecx
	movl	$1024, %edx
	movq	%r12, %rsi
	addq	%r15, %rdi
	jmp	.L48
.L20:
	cmpb	$82, %bl
	jne	.L22
	movq	16(%rsp), %rsi
	movl	%ebp, %ecx
	movl	$1024, %edx
	movq	%r12, %rdi
	addq	%r15, %rsi
.L48:
	call	cudaMemcpy@PLT
	testl	%eax, %eax
	je	.L22
	movl	%eax, %edi
	call	cudaGetErrorString@PLT
	movl	$122, %r9d
	movq	%rax, %rcx
	jmp	.L51
.L22:
	addq	$1024, %r15
	cmpq	$268435456, %r15
	jne	.L23
	xorl	%esi, %esi
	movq	%r14, %rdi
	call	gettimeofday@PLT
	movsd	.LC7(%rip), %xmm0
	movsbl	%bl, %edx
	imulq	$1000000, 24(%rsp), %rax
	addq	32(%rsp), %rax
	movl	$75, %ecx
	leaq	.LC8(%rip), %rsi
	subq	%r13, %rax
	cvtsi2sdq	%rax, %xmm1
	divsd	.LC4(%rip), %xmm1
	divsd	%xmm1, %xmm0
	jmp	.L50
.L18:
	cmpb	$77, %r14b
	jne	.L17
	leaq	16(%rsp), %rdi
	movl	$536870912, %esi
	call	cudaMalloc@PLT
	movl	%eax, %edi
	testl	%eax, %eax
	je	.L24
	call	cudaGetErrorString@PLT
	movl	$136, %r9d
	movq	%rax, %rcx
	jmp	.L51
.L24:
	movl	$1048576, %edi
	xorl	%r12d, %r12d
	movabsq	$5368709120, %r15
	call	malloc@PLT
	xorl	%esi, %esi
	movq	%rax, %r13
	leaq	24(%rsp), %rax
	movq	%rax, %rdi
	movq	%rax, 8(%rsp)
	call	gettimeofday@PLT
	imulq	$1000000, 24(%rsp), %r14
	addq	32(%rsp), %r14
.L28:
	cmpb	$87, %bl
	jne	.L25
	movq	%r12, %rdi
	movl	%ebp, %ecx
	movl	$1048576, %edx
	movq	%r13, %rsi
	andl	$535822336, %edi
	addq	16(%rsp), %rdi
	jmp	.L49
.L25:
	cmpb	$82, %bl
	jne	.L27
	movq	%r12, %rsi
	movl	%ebp, %ecx
	movl	$1048576, %edx
	movq	%r13, %rdi
	andl	$535822336, %esi
	addq	16(%rsp), %rsi
.L49:
	call	cudaMemcpy@PLT
	testl	%eax, %eax
	je	.L27
	movl	%eax, %edi
	call	cudaGetErrorString@PLT
	movl	$149, %r9d
	movq	%rax, %rcx
	jmp	.L51
.L27:
	addq	$1048576, %r12
	cmpq	%r15, %r12
	jne	.L28
	movq	8(%rsp), %rdi
	xorl	%esi, %esi
	call	gettimeofday@PLT
	movsd	.LC9(%rip), %xmm0
	movsbl	%bl, %edx
	imulq	$1000000, 24(%rsp), %rax
	addq	32(%rsp), %rax
	movl	$77, %ecx
	leaq	.LC10(%rip), %rsi
	subq	%r14, %rax
	cvtsi2sdq	%rax, %xmm1
	divsd	.LC4(%rip), %xmm1
	divsd	%xmm1, %xmm0
.L50:
	movl	$2, %edi
	movb	$1, %al
	call	__printf_chk@PLT
.L17:
	movq	16(%rsp), %rdi
	call	cudaFree@PLT
	movl	%eax, %edi
	xorl	%eax, %eax
	testl	%edi, %edi
	je	.L2
	call	cudaGetErrorString@PLT
	movl	$160, %r9d
	movq	%rax, %rcx
	jmp	.L51
.L2:
	movq	40(%rsp), %rdx
	subq	%fs:40, %rdx
	je	.L29
	call	__stack_chk_fail@PLT
.L29:
	addq	$56, %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
.LFE2040:
	.size	main, .-main
	.text
	.globl	_Z26__device_stub__Z8gpu_iopsmm
	.type	_Z26__device_stub__Z8gpu_iopsmm, @function
_Z26__device_stub__Z8gpu_iopsmm:
.LFB2065:
	.cfi_startproc
	endbr64
	subq	$104, %rsp
	.cfi_def_cfa_offset 112
	movq	%rdi, 8(%rsp)
	leaq	24(%rsp), %rcx
	leaq	16(%rsp), %rdx
	leaq	44(%rsp), %rsi
	leaq	32(%rsp), %rdi
	movq	%fs:40, %rax
	movq	%rax, 88(%rsp)
	xorl	%eax, %eax
	leaq	8(%rsp), %rax
	movl	$1, 40(%rsp)
	movq	%rax, 80(%rsp)
	movabsq	$4294967297, %rax
	movq	%rax, 32(%rsp)
	movq	%rax, 44(%rsp)
	movl	$1, 52(%rsp)
	call	__cudaPopCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L55
	pushq	24(%rsp)
	.cfi_def_cfa_offset 120
	leaq	_Z8gpu_iopsm(%rip), %rdi
	pushq	24(%rsp)
	.cfi_def_cfa_offset 128
	movq	60(%rsp), %rcx
	movl	68(%rsp), %r8d
	movq	48(%rsp), %rsi
	movl	56(%rsp), %edx
	leaq	96(%rsp), %r9
	call	cudaLaunchKernel@PLT
	popq	%rax
	.cfi_def_cfa_offset 120
	popq	%rdx
	.cfi_def_cfa_offset 112
.L55:
	movq	88(%rsp), %rax
	subq	%fs:40, %rax
	je	.L57
	call	__stack_chk_fail@PLT
.L57:
	addq	$104, %rsp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE2065:
	.size	_Z26__device_stub__Z8gpu_iopsmm, .-_Z26__device_stub__Z8gpu_iopsmm
	.globl	_Z8gpu_iopsm
	.type	_Z8gpu_iopsm, @function
_Z8gpu_iopsm:
.LFB2066:
	.cfi_startproc
	endbr64
	jmp	_Z26__device_stub__Z8gpu_iopsmm
	.cfi_endproc
.LFE2066:
	.size	_Z8gpu_iopsm, .-_Z8gpu_iopsm
	.section	.rodata.str1.1
.LC11:
	.string	"_Z8gpu_iopsm"
	.section	.text.startup
	.type	_ZL24__sti____cudaRegisterAllv, @function
_ZL24__sti____cudaRegisterAllv:
.LFB2068:
	.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	_Z8gpu_iopsm(%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
.LFE2068:
	.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	MAX_OPERATIONS
	.data
	.align 8
	.type	MAX_OPERATIONS, @object
	.size	MAX_OPERATIONS, 8
MAX_OPERATIONS:
	.quad	40000000
	.section	.rodata.cst8,"aM",@progbits,8
	.align 8
.LC4:
	.long	0
	.long	1093567616
	.align 8
.LC5:
	.long	0
	.long	1072693248
	.align 8
.LC7:
	.long	0
	.long	1070596096
	.align 8
.LC9:
	.long	0
	.long	1085538304
	.ident	"GCC: (Ubuntu 13.3.0-6ubuntu2~24.04) 13.3.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:


#include <hip/hip_runtime.h>
#include <stdio.h>
#include <sys/time.h>
#include <stdlib.h>
#include <unistd.h>



//define the check err
#define CHECK_ERR(x)                                    \
  if (x != hipSuccess) {                               \
    fprintf(stderr,"%s in %s at line %d\n",             \
	    hipGetErrorString(err),__FILE__,__LINE__);	\
    exit(-1);						\
  }                                                     \

//define the maximum operations for the loop 
unsigned long MAX_OPERATIONS = 40000000;

//size for 1MB
const long MEGABYTE = 1048576;

__global__ void gpu_iops(unsigned long max_ops) {


    
}

//get the parameter
int main(int argc, char *argv[]) {
  
    char c;  
    char test = 'B';
    char rw = 'R';
    while ( (c = getopt(argc, argv, "r:t:") ) != -1)
    {
        switch (c) 
        {
            case 'r':
                rw = optarg[0];
                break;
            case 't':
                test = optarg[0];
                break;
            default:
                printf("nothing\n");
                return -1;
        }
    }
//define the time variables
    struct timeval tv;
    long long startTime, stopTime;
    double seconds;
	
//define the cuda err
    hipError_t err;
 
//define the memory pointer
 
    unsigned char *d_mem_pointer;
    unsigned char *mem_pointer;
	
    hipMemcpyKind dir = hipMemcpyHostToDevice;
	
	//direction for read and write
    if(rw == 'R')
    {
      dir = hipMemcpyDeviceToHost;
    }
	
    else if(rw == 'W')
    {
      dir - hipMemcpyHostToDevice;
    }
    
    //test the 1B size block
    if(test == 'B')
    {
      
      err = hipMalloc((void **) &d_mem_pointer, sizeof(unsigned char)*MEGABYTE);
      CHECK_ERR(err);
      mem_pointer = (unsigned char *)malloc(sizeof(unsigned char)*1);
      gettimeofday(&tv, NULL);
      startTime = tv.tv_sec*1000000LL + tv.tv_usec;
    
      for(unsigned long i = 0; i<MEGABYTE; i++)
      {
//write operation
        if(rw == 'W')
          err = hipMemcpy((void *)&d_mem_pointer[i], (void *)mem_pointer, 1, dir);
//read operation  
      else if(rw == 'R')
          err = hipMemcpy((void *)mem_pointer, (void *)&d_mem_pointer[i], 1, dir);
        CHECK_ERR(err);
      }
      
      gettimeofday(&tv, NULL);
//record the stop time 
      stopTime = tv.tv_sec*1000000LL + tv.tv_usec;
	  
//totally time cost 
 
      seconds = (stopTime-startTime)/1000000.0;
      printf("Operation: %c\tMessage Size:1%c\tBandwidth: %lf MB/S \n", rw, test, 1.0/(seconds)); 
    }
//test the 1K block size
    else if(test == 'K')
    {
      err = hipMalloc((void **) &d_mem_pointer, sizeof(unsigned char)*256*MEGABYTE);
      CHECK_ERR(err);
      mem_pointer = (unsigned char *)malloc(sizeof(unsigned char)*1024);
      gettimeofday(&tv, NULL);
      startTime = tv.tv_sec*1000000LL + tv.tv_usec;
    
      for(unsigned long i = 0; i<256*MEGABYTE/1024; i++)
      {
// test the write operation 
        if(rw == 'W')
          err = hipMemcpy((void *)&d_mem_pointer[i*1024], (void *)mem_pointer, 1024, dir);
//test the read operation 
        else if(rw == 'R')
          err = hipMemcpy((void *)mem_pointer, (void *)&d_mem_pointer[i*1024], 1024, dir);
        CHECK_ERR(err);
      }
      
      gettimeofday(&tv, NULL);
//record the stop time
      stopTime = tv.tv_sec*1000000LL + tv.tv_usec;
// totally time cost 
      seconds = (stopTime-startTime)/1000000.0;
      printf("Operation:%c\tMessage Size:1%cB\tBandwidth: %lf MB/S \n", rw, test, (256.0/1024.0)/(seconds)); 
    }
//test 1MB size Block
    else if(test == 'M')
    {
      err = hipMalloc((void **) &d_mem_pointer, sizeof(unsigned char)*512*MEGABYTE);
      CHECK_ERR(err);
      mem_pointer = (unsigned char *)malloc(sizeof(unsigned char)*MEGABYTE);
      gettimeofday(&tv, NULL);
      startTime = tv.tv_sec*1000000LL + tv.tv_usec;
    
      for(unsigned long i = 0; i<512*10; i++)
      {
//write operation
        if(rw == 'W')
          err = hipMemcpy((void *)&d_mem_pointer[(i*MEGABYTE)%(512*MEGABYTE)], (void *)mem_pointer, MEGABYTE, dir);
//read operation 
        else if(rw == 'R')
          err = hipMemcpy((void *)mem_pointer, (void *)&d_mem_pointer[(i*MEGABYTE)%(512*MEGABYTE)], MEGABYTE, dir);
        CHECK_ERR(err);
      }
      
      gettimeofday(&tv, NULL);
// record the stop time
      stopTime = tv.tv_sec*1000000LL + tv.tv_usec;
//ttoally time cost 
      seconds = (stopTime-startTime)/1000000.0;
      printf("Operation:%c\tMessage Size:1%cB \tBandwidth:%lf MB/S\n", rw, test, (512*10)/(seconds)); 
    }
    err = hipFree(d_mem_pointer);
    CHECK_ERR(err);
}

	.text
	.file	"gpu_mem_bench.hip"
	.globl	_Z23__device_stub__gpu_iopsm    # -- Begin function _Z23__device_stub__gpu_iopsm
	.type	_Z23__device_stub__gpu_iopsm,@function
_Z23__device_stub__gpu_iopsm:           # @_Z23__device_stub__gpu_iopsm
	.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	$64, %rsp
	.cfi_def_cfa_offset 112
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r13, -32
	.cfi_offset %r14, -24
	.cfi_offset %r15, -16
	leaq	24(%rsp), %rax
	movq	%rdi, (%rax)
	movq	%rsp, %rbx
	movq	%rax, (%rbx)
	leaq	48(%rsp), %r14
	leaq	32(%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	$_Z8gpu_iopsm, %edi
	movq	%rbx, %r9
	pushq	(%r13)
	.cfi_adjust_cfa_offset 8
	pushq	(%r12)
	.cfi_adjust_cfa_offset 8
	callq	hipLaunchKernel
	addq	$80, %rsp
	.cfi_adjust_cfa_offset -80
	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	_Z23__device_stub__gpu_iopsm, .Lfunc_end0-_Z23__device_stub__gpu_iopsm
	.cfi_endproc
                                        # -- End function
	.section	.rodata.cst8,"aM",@progbits,8
	.p2align	3, 0x0                          # -- Begin function main
.LCPI1_0:
	.quad	0x412e848000000000              # double 1.0E+6
.LCPI1_1:
	.quad	0x40b4000000000000              # double 5120
.LCPI1_2:
	.quad	0x3fd0000000000000              # double 0.25
.LCPI1_3:
	.quad	0x3ff0000000000000              # double 1
	.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	$40, %rsp
	.cfi_def_cfa_offset 96
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	.cfi_offset %rbp, -16
	movq	%rsi, %rbx
	movl	%edi, %ebp
	movl	$.L.str, %edx
	callq	getopt
	shll	$24, %eax
	cmpl	$-16777216, %eax                # imm = 0xFF000000
	jne	.LBB1_1
# %bb.50:                               # %._crit_edge.thread
	movb	$82, %r12b
	movl	$82, %ebx
	movb	$1, %bpl
.LBB1_11:
	movl	%ebx, 16(%rsp)                  # 4-byte Spill
	leaq	8(%rsp), %rdi
	movl	$1048576, %esi                  # imm = 0x100000
	callq	hipMalloc
	testl	%eax, %eax
	jne	.LBB1_12
# %bb.14:
	movl	$1, %edi
	callq	malloc
	movq	%rax, %r14
	xorl	%ebx, %ebx
	leaq	24(%rsp), %r15
	movq	%r15, %rdi
	xorl	%esi, %esi
	callq	gettimeofday
	movq	(%r15), %r13
	movq	8(%r15), %r15
.LBB1_15:                               # =>This Inner Loop Header: Depth=1
	cmpb	$87, %r12b
	jne	.LBB1_17
# %bb.16:                               #   in Loop: Header=BB1_15 Depth=1
	movq	8(%rsp), %rdi
	addq	%rbx, %rdi
	movl	$1, %edx
	movq	%r14, %rsi
	movl	$1, %ecx
	jmp	.LBB1_19
.LBB1_17:                               #   in Loop: Header=BB1_15 Depth=1
	testb	%bpl, %bpl
	je	.LBB1_21
# %bb.18:                               #   in Loop: Header=BB1_15 Depth=1
	movq	8(%rsp), %rsi
	addq	%rbx, %rsi
	movl	$1, %edx
	movq	%r14, %rdi
	movl	$2, %ecx
.LBB1_19:                               #   in Loop: Header=BB1_15 Depth=1
	callq	hipMemcpy
	testl	%eax, %eax
	jne	.LBB1_20
.LBB1_21:                               # %.thread
                                        #   in Loop: Header=BB1_15 Depth=1
	incq	%rbx
	cmpq	$1048576, %rbx                  # imm = 0x100000
	jne	.LBB1_15
# %bb.22:
	leaq	24(%rsp), %r14
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	gettimeofday
	movq	(%r14), %rax
	subq	%r13, %rax
	movq	8(%r14), %rcx
	subq	%r15, %rcx
	imulq	$1000000, %rax, %rax            # imm = 0xF4240
	addq	%rcx, %rax
	cvtsi2sd	%rax, %xmm1
	divsd	.LCPI1_0(%rip), %xmm1
	movsd	.LCPI1_3(%rip), %xmm0           # xmm0 = mem[0],zero
	divsd	%xmm1, %xmm0
	movl	$.L.str.4, %edi
	movl	16(%rsp), %esi                  # 4-byte Reload
	movl	$66, %edx
.LBB1_27:
	movb	$1, %al
	callq	printf
.LBB1_28:
	movq	8(%rsp), %rdi
	callq	hipFree
	testl	%eax, %eax
	jne	.LBB1_29
# %bb.48:
	xorl	%eax, %eax
.LBB1_49:
	addq	$40, %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:                                # %.lr.ph.preheader
	.cfi_def_cfa_offset 96
	movb	$66, %r14b
	movb	$82, %r12b
.LBB1_2:                                # %.lr.ph
                                        # =>This Inner Loop Header: Depth=1
	sarl	$24, %eax
	cmpl	$116, %eax
	je	.LBB1_6
# %bb.3:                                # %.lr.ph
                                        #   in Loop: Header=BB1_2 Depth=1
	cmpl	$114, %eax
	jne	.LBB1_5
# %bb.4:                                #   in Loop: Header=BB1_2 Depth=1
	movq	optarg(%rip), %rax
	movb	(%rax), %r12b
	jmp	.LBB1_7
.LBB1_6:                                #   in Loop: Header=BB1_2 Depth=1
	movq	optarg(%rip), %rax
	movb	(%rax), %r14b
.LBB1_7:                                #   in Loop: Header=BB1_2 Depth=1
	movl	$.L.str, %edx
	movl	%ebp, %edi
	movq	%rbx, %rsi
	callq	getopt
	shll	$24, %eax
	cmpl	$-16777216, %eax                # imm = 0xFF000000
	jne	.LBB1_2
# %bb.8:                                # %._crit_edge
	movsbl	%r12b, %ebx
	cmpb	$82, %bl
	sete	%bpl
	cmpb	$77, %r14b
	je	.LBB1_37
# %bb.9:                                # %._crit_edge
	movzbl	%r14b, %eax
	cmpl	$75, %eax
	je	.LBB1_23
# %bb.10:                               # %._crit_edge
	cmpl	$66, %eax
	je	.LBB1_11
	jmp	.LBB1_28
.LBB1_5:
	movl	$.Lstr, %edi
	callq	puts@PLT
	movl	$-1, %eax
	jmp	.LBB1_49
.LBB1_23:
	movl	%ebx, %ebp
	leaq	8(%rsp), %rdi
	movl	$268435456, %esi                # imm = 0x10000000
	callq	hipMalloc
	testl	%eax, %eax
	jne	.LBB1_24
# %bb.30:
	movl	$1024, %edi                     # imm = 0x400
	callq	malloc
	movq	%rax, %r14
	xorl	%ebx, %ebx
	leaq	24(%rsp), %r15
	movq	%r15, %rdi
	xorl	%esi, %esi
	callq	gettimeofday
	movq	(%r15), %r13
	movq	8(%r15), %r15
.LBB1_31:                               # =>This Inner Loop Header: Depth=1
	cmpb	$87, %r12b
	jne	.LBB1_33
# %bb.32:                               #   in Loop: Header=BB1_31 Depth=1
	movq	8(%rsp), %rdi
	addq	%rbx, %rdi
	movl	$1024, %edx                     # imm = 0x400
	movq	%r14, %rsi
	movl	$1, %ecx
	jmp	.LBB1_35
.LBB1_33:                               #   in Loop: Header=BB1_31 Depth=1
	cmpb	$82, %r12b
	jne	.LBB1_25
# %bb.34:                               #   in Loop: Header=BB1_31 Depth=1
	movq	8(%rsp), %rsi
	addq	%rbx, %rsi
	movl	$1024, %edx                     # imm = 0x400
	movq	%r14, %rdi
	movl	$2, %ecx
.LBB1_35:                               #   in Loop: Header=BB1_31 Depth=1
	callq	hipMemcpy
	testl	%eax, %eax
	jne	.LBB1_36
.LBB1_25:                               # %.thread97
                                        #   in Loop: Header=BB1_31 Depth=1
	addq	$1024, %rbx                     # imm = 0x400
	cmpq	$268435456, %rbx                # imm = 0x10000000
	jne	.LBB1_31
# %bb.26:
	leaq	24(%rsp), %r14
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	gettimeofday
	movq	(%r14), %rax
	subq	%r13, %rax
	movq	8(%r14), %rcx
	subq	%r15, %rcx
	imulq	$1000000, %rax, %rax            # imm = 0xF4240
	addq	%rcx, %rax
	cvtsi2sd	%rax, %xmm1
	divsd	.LCPI1_0(%rip), %xmm1
	movsd	.LCPI1_2(%rip), %xmm0           # xmm0 = mem[0],zero
	divsd	%xmm1, %xmm0
	movl	$.L.str.5, %edi
	movl	%ebp, %esi
	movl	$75, %edx
	jmp	.LBB1_27
.LBB1_37:
	leaq	8(%rsp), %rdi
	movl	$536870912, %esi                # imm = 0x20000000
	callq	hipMalloc
	testl	%eax, %eax
	jne	.LBB1_38
# %bb.39:
	movl	$1048576, %edi                  # imm = 0x100000
	callq	malloc
	movq	%rax, %r14
	xorl	%ebp, %ebp
	leaq	24(%rsp), %r15
	movq	%r15, %rdi
	xorl	%esi, %esi
	callq	gettimeofday
	movq	(%r15), %r13
	movq	8(%r15), %rax
	movq	%rax, 16(%rsp)                  # 8-byte Spill
	movl	$5120, %r15d                    # imm = 0x1400
.LBB1_40:                               # =>This Inner Loop Header: Depth=1
	cmpb	$87, %r12b
	jne	.LBB1_42
# %bb.41:                               #   in Loop: Header=BB1_40 Depth=1
	movl	%ebp, %edi
	andl	$535822336, %edi                # imm = 0x1FF00000
	addq	8(%rsp), %rdi
	movl	$1048576, %edx                  # imm = 0x100000
	movq	%r14, %rsi
	movl	$1, %ecx
	jmp	.LBB1_44
.LBB1_42:                               #   in Loop: Header=BB1_40 Depth=1
	cmpb	$82, %r12b
	jne	.LBB1_46
# %bb.43:                               #   in Loop: Header=BB1_40 Depth=1
	movl	%ebp, %esi
	andl	$535822336, %esi                # imm = 0x1FF00000
	addq	8(%rsp), %rsi
	movl	$1048576, %edx                  # imm = 0x100000
	movq	%r14, %rdi
	movl	$2, %ecx
.LBB1_44:                               #   in Loop: Header=BB1_40 Depth=1
	callq	hipMemcpy
	testl	%eax, %eax
	jne	.LBB1_45
.LBB1_46:                               # %.thread100
                                        #   in Loop: Header=BB1_40 Depth=1
	addq	$1048576, %rbp                  # imm = 0x100000
	decq	%r15
	jne	.LBB1_40
# %bb.47:
	leaq	24(%rsp), %r14
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	gettimeofday
	movq	(%r14), %rax
	subq	%r13, %rax
	movq	8(%r14), %rcx
	subq	16(%rsp), %rcx                  # 8-byte Folded Reload
	imulq	$1000000, %rax, %rax            # imm = 0xF4240
	addq	%rcx, %rax
	cvtsi2sd	%rax, %xmm1
	divsd	.LCPI1_0(%rip), %xmm1
	movsd	.LCPI1_1(%rip), %xmm0           # xmm0 = mem[0],zero
	divsd	%xmm1, %xmm0
	movl	$.L.str.6, %edi
	movl	%ebx, %esi
	movl	$77, %edx
	jmp	.LBB1_27
.LBB1_20:
	movq	stderr(%rip), %rbx
	movl	%eax, %edi
	callq	hipGetErrorString
	movl	$.L.str.2, %esi
	movl	$.L.str.3, %ecx
	movq	%rbx, %rdi
	movq	%rax, %rdx
	movl	$95, %r8d
.LBB1_13:
	xorl	%eax, %eax
	callq	fprintf
	movl	$-1, %edi
	callq	exit
.LBB1_36:
	movq	stderr(%rip), %rbx
	movl	%eax, %edi
	callq	hipGetErrorString
	movl	$.L.str.2, %esi
	movl	$.L.str.3, %ecx
	movq	%rbx, %rdi
	movq	%rax, %rdx
	movl	$124, %r8d
	jmp	.LBB1_13
.LBB1_45:
	movq	stderr(%rip), %rbx
	movl	%eax, %edi
	callq	hipGetErrorString
	movl	$.L.str.2, %esi
	movl	$.L.str.3, %ecx
	movq	%rbx, %rdi
	movq	%rax, %rdx
	movl	$151, %r8d
	jmp	.LBB1_13
.LBB1_29:
	movq	stderr(%rip), %rbx
	movl	%eax, %edi
	callq	hipGetErrorString
	movl	$.L.str.2, %esi
	movl	$.L.str.3, %ecx
	movq	%rbx, %rdi
	movq	%rax, %rdx
	movl	$162, %r8d
	jmp	.LBB1_13
.LBB1_12:
	movq	stderr(%rip), %rbx
	movl	%eax, %edi
	callq	hipGetErrorString
	movl	$.L.str.2, %esi
	movl	$.L.str.3, %ecx
	movq	%rbx, %rdi
	movq	%rax, %rdx
	movl	$82, %r8d
	jmp	.LBB1_13
.LBB1_24:
	movq	stderr(%rip), %rbx
	movl	%eax, %edi
	callq	hipGetErrorString
	movl	$.L.str.2, %esi
	movl	$.L.str.3, %ecx
	movq	%rbx, %rdi
	movq	%rax, %rdx
	movl	$111, %r8d
	jmp	.LBB1_13
.LBB1_38:
	movq	stderr(%rip), %rbx
	movl	%eax, %edi
	callq	hipGetErrorString
	movl	$.L.str.2, %esi
	movl	$.L.str.3, %ecx
	movq	%rbx, %rdi
	movq	%rax, %rdx
	movl	$138, %r8d
	jmp	.LBB1_13
.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	$_Z8gpu_iopsm, %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	MAX_OPERATIONS,@object          # @MAX_OPERATIONS
	.data
	.globl	MAX_OPERATIONS
	.p2align	3, 0x0
MAX_OPERATIONS:
	.quad	40000000                        # 0x2625a00
	.size	MAX_OPERATIONS, 8

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

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

	.type	.L.str.2,@object                # @.str.2
.L.str.2:
	.asciz	"%s in %s at line %d\n"
	.size	.L.str.2, 21

	.type	.L.str.3,@object                # @.str.3
.L.str.3:
	.asciz	"/home/ubuntu/Datasets/stackv2/train-structured-repos-hip-sm89/terryisverybusy/benchmark-Project/master/code/gpu_mem_bench.hip"
	.size	.L.str.3, 126

	.type	.L.str.4,@object                # @.str.4
.L.str.4:
	.asciz	"Operation: %c\tMessage Size:1%c\tBandwidth: %lf MB/S \n"
	.size	.L.str.4, 53

	.type	.L.str.5,@object                # @.str.5
.L.str.5:
	.asciz	"Operation:%c\tMessage Size:1%cB\tBandwidth: %lf MB/S \n"
	.size	.L.str.5, 53

	.type	.L.str.6,@object                # @.str.6
.L.str.6:
	.asciz	"Operation:%c\tMessage Size:1%cB \tBandwidth:%lf MB/S\n"
	.size	.L.str.6, 52

	.type	.L__unnamed_1,@object           # @0
.L__unnamed_1:
	.asciz	"_Z8gpu_iopsm"
	.size	.L__unnamed_1, 13

	.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	"nothing"
	.size	.Lstr, 8

	.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 _Z23__device_stub__gpu_iopsm
	.addrsig_sym __hip_module_ctor
	.addrsig_sym __hip_module_dtor
	.addrsig_sym _Z8gpu_iopsm
	.addrsig_sym __hip_fatbin
	.addrsig_sym __hip_fatbin_wrapper
	.addrsig_sym __hip_cuid_

	.text
	.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
	.protected	_Z8gpu_iopsm            ; -- Begin function _Z8gpu_iopsm
	.globl	_Z8gpu_iopsm
	.p2align	8
	.type	_Z8gpu_iopsm,@function
_Z8gpu_iopsm:                           ; @_Z8gpu_iopsm
; %bb.0:
	s_endpgm
	.section	.rodata,"a",@progbits
	.p2align	6, 0x0
	.amdhsa_kernel _Z8gpu_iopsm
		.amdhsa_group_segment_fixed_size 0
		.amdhsa_private_segment_fixed_size 0
		.amdhsa_kernarg_size 8
		.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 1
		.amdhsa_next_free_sgpr 1
		.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	_Z8gpu_iopsm, .Lfunc_end0-_Z8gpu_iopsm
                                        ; -- End function
	.section	.AMDGPU.csdata,"",@progbits
; Kernel info:
; codeLenInByte = 4
; NumSgprs: 0
; NumVgprs: 0
; ScratchSize: 0
; MemoryBound: 0
; FloatMode: 240
; IeeeMode: 1
; LDSByteSize: 0 bytes/workgroup (compile time only)
; SGPRBlocks: 0
; VGPRBlocks: 0
; NumSGPRsForWavesPerEU: 1
; NumVGPRsForWavesPerEU: 1
; 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:
      - .offset:         0
        .size:           8
        .value_kind:     by_value
    .group_segment_fixed_size: 0
    .kernarg_segment_align: 8
    .kernarg_segment_size: 8
    .language:       OpenCL C
    .language_version:
      - 2
      - 0
    .max_flat_workgroup_size: 1024
    .name:           _Z8gpu_iopsm
    .private_segment_fixed_size: 0
    .sgpr_count:     0
    .sgpr_spill_count: 0
    .symbol:         _Z8gpu_iopsm.kd
    .uniform_work_group_size: 1
    .uses_dynamic_stack: false
    .vgpr_count:     0
    .vgpr_spill_count: 0
    .wavefront_size: 32
    .workgroup_processor_mode: 1
amdhsa.target:   amdgcn-amd-amdhsa--gfx1100
amdhsa.version:
  - 1
  - 2
...

	.end_amdgpu_metadata
