#include <iostream>


using namespace std;


class a{
public:
	int x;
	a(){

	}
	a(int i){
		x = i;
	}

	void check(){
		disp();
	}

	virtual void disp() = 0;
};

class b : public a{
public:
	b(){

	}
	b(int i) : a(i){

	}

	void get(){
		check();
	}

	void disp(){
		cout<<x;
	}
};

int main(int argc, char const *argv[])
{
	b obj(3);
	obj.get();
	return 0;
}
	.file	"tmpxft_00375676_00000000-6_test.cudafe1.cpp"
	.text
#APP
	.globl _ZSt21ios_base_library_initv

#NO_APP
	.section	.text._ZN1b4dispEv,"axG",@progbits,_ZN1b4dispEv,comdat
	.align 2
	.weak	_ZN1b4dispEv
	.type	_ZN1b4dispEv, @function
_ZN1b4dispEv:
.LFB3649:
	.cfi_startproc
	endbr64
	movl	8(%rdi), %esi
	leaq	_ZSt4cout(%rip), %rdi
	jmp	_ZNSolsEi@PLT
	.cfi_endproc
.LFE3649:
	.size	_ZN1b4dispEv, .-_ZN1b4dispEv
	.text
	.type	_ZL26__cudaUnregisterBinaryUtilv, @function
_ZL26__cudaUnregisterBinaryUtilv:
.LFB3653:
	.cfi_startproc
	endbr64
	movq	_ZL20__cudaFatCubinHandle(%rip), %rdi
	jmp	__cudaUnregisterFatBinary@PLT
	.cfi_endproc
.LFE3653:
	.size	_ZL26__cudaUnregisterBinaryUtilv, .-_ZL26__cudaUnregisterBinaryUtilv
	.section	.text.startup,"ax",@progbits
	.globl	main
	.type	main, @function
main:
.LFB3650:
	.cfi_startproc
	endbr64
	subq	$40, %rsp
	.cfi_def_cfa_offset 48
	movq	%fs:40, %rax
	movq	%rax, 24(%rsp)
	xorl	%eax, %eax
	leaq	8(%rsp), %rdi
	leaq	16+_ZTV1b(%rip), %rax
	movl	$3, 16(%rsp)
	movq	%rax, 8(%rsp)
	call	_ZN1b4dispEv
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	je	.L4
	call	__stack_chk_fail@PLT
.L4:
	xorl	%eax, %eax
	addq	$40, %rsp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE3650:
	.size	main, .-main
	.type	_ZL24__sti____cudaRegisterAllv, @function
_ZL24__sti____cudaRegisterAllv:
.LFB3676:
	.cfi_startproc
	endbr64
	pushq	%rax
	.cfi_def_cfa_offset 16
	leaq	_ZL15__fatDeviceText(%rip), %rdi
	call	__cudaRegisterFatBinary@PLT
	movq	%rax, %rdi
	movq	%rax, _ZL20__cudaFatCubinHandle(%rip)
	call	__cudaRegisterFatBinaryEnd@PLT
	leaq	_ZL26__cudaUnregisterBinaryUtilv(%rip), %rdi
	popq	%rdx
	.cfi_def_cfa_offset 8
	jmp	atexit@PLT
	.cfi_endproc
.LFE3676:
	.size	_ZL24__sti____cudaRegisterAllv, .-_ZL24__sti____cudaRegisterAllv
	.section	.init_array,"aw"
	.align 8
	.quad	_ZL24__sti____cudaRegisterAllv
	.weak	_ZTS1a
	.section	.rodata._ZTS1a,"aG",@progbits,_ZTS1a,comdat
	.type	_ZTS1a, @object
	.size	_ZTS1a, 3
_ZTS1a:
	.string	"1a"
	.weak	_ZTI1a
	.section	.data.rel.ro._ZTI1a,"awG",@progbits,_ZTI1a,comdat
	.align 8
	.type	_ZTI1a, @object
	.size	_ZTI1a, 16
_ZTI1a:
	.quad	_ZTVN10__cxxabiv117__class_type_infoE+16
	.quad	_ZTS1a
	.weak	_ZTS1b
	.section	.rodata._ZTS1b,"aG",@progbits,_ZTS1b,comdat
	.type	_ZTS1b, @object
	.size	_ZTS1b, 3
_ZTS1b:
	.string	"1b"
	.weak	_ZTI1b
	.section	.data.rel.ro._ZTI1b,"awG",@progbits,_ZTI1b,comdat
	.align 8
	.type	_ZTI1b, @object
	.size	_ZTI1b, 24
_ZTI1b:
	.quad	_ZTVN10__cxxabiv120__si_class_type_infoE+16
	.quad	_ZTS1b
	.quad	_ZTI1a
	.weak	_ZTV1b
	.section	.data.rel.ro.local._ZTV1b,"awG",@progbits,_ZTV1b,comdat
	.align 8
	.type	_ZTV1b, @object
	.size	_ZTV1b, 24
_ZTV1b:
	.quad	0
	.quad	_ZTI1b
	.quad	_ZN1b4dispEv
	.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
	.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 <iostream>


using namespace std;


class a{
public:
	int x;
	a(){

	}
	a(int i){
		x = i;
	}

	void check(){
		disp();
	}

	virtual void disp() = 0;
};

class b : public a{
public:
	b(){

	}
	b(int i) : a(i){

	}

	void get(){
		check();
	}

	void disp(){
		cout<<x;
	}
};

int main(int argc, char const *argv[])
{
	b obj(3);
	obj.get();
	return 0;
}
	.text
	.file	"test.hip"
                                        # Start of file scope inline assembly
	.globl	_ZSt21ios_base_library_initv

                                        # End of file scope inline assembly
	.globl	main                            # -- Begin function main
	.type	main,@function
main:                                   # @main
	.cfi_startproc
# %bb.0:
	pushq	%rax
	.cfi_def_cfa_offset 16
	movl	$_ZSt4cout, %edi
	movl	$3, %esi
	callq	_ZNSolsEi
	xorl	%eax, %eax
	popq	%rcx
	.cfi_def_cfa_offset 8
	retq
.Lfunc_end0:
	.size	main, .Lfunc_end0-main
	.cfi_endproc
                                        # -- End function
	.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 _ZSt4cout
	.addrsig_sym __hip_cuid_

	.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_
	.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
	.amdgpu_metadata
---
amdhsa.kernels:  []
amdhsa.target:   amdgcn-amd-amdhsa--gfx1100
amdhsa.version:
  - 1
  - 2
...

	.end_amdgpu_metadata
