	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_amdgpu_virt_init_data_exchange ## -- Begin function amdgpu_virt_init_data_exchange
	.p2align	4, 0x90
_amdgpu_virt_init_data_exchange:        ## @amdgpu_virt_init_data_exchange
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movl	$0, -24(%rbp)
	movl	$0, -20(%rbp)
	xorps	%xmm0, %xmm0
	movups	%xmm0, 16(%rdi)
	movq	32(%rdi), %rax
	testq	%rax, %rax
	je	LBB0_4
## %bb.1:
	movq	%rdi, %rbx
	movq	_AMDGIM_DATAEXCHANGE_OFFSET@GOTPCREL(%rip), %rcx
	movslq	(%rcx), %rcx
	leaq	(%rax,%rcx,4), %rax
	movq	%rax, 24(%rdi)
	movq	_header@GOTPCREL(%rip), %r14
	movl	(%r14), %esi
	leaq	-24(%rbp), %rdx
	callq	_AMDGPU_FW_VRAM_PF2VF_READ
	leaq	-20(%rbp), %rdx
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_AMDGPU_FW_VRAM_PF2VF_READ
	movq	_feature_flags@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	movq	%rbx, %rdx
	callq	_AMDGPU_FW_VRAM_PF2VF_READ
	movl	-24(%rbp), %esi
	leal	-1(%rsi), %eax
	cmpl	$4094, %eax                     ## imm = 0xFFE
	ja	LBB0_4
## %bb.2:
	movq	24(%rbx), %rdi
	movl	8(%rbx), %edx
	movl	-20(%rbp), %ecx
                                        ## kill: def $esi killed $esi killed $rsi
	callq	_amdgpu_virt_fw_reserve_get_checksum
	cmpl	-20(%rbp), %eax
	jne	LBB0_4
## %bb.3:
	movslq	-24(%rbp), %rdi
	addq	24(%rbx), %rdi
	movq	%rdi, 16(%rbx)
	xorl	%esi, %esi
	movl	$4, %edx
	callq	_memset
	movl	4(%r14), %esi
	movq	_AMDGPU_FW_VRAM_VF2PF_VER@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	callq	_AMDGPU_FW_VRAM_VF2PF_WRITE
	movl	(%r14), %esi
	movq	%rbx, %rdi
	movl	$4, %edx
	callq	_AMDGPU_FW_VRAM_VF2PF_WRITE
	movq	_driver_version@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-32(%rbp), %rdx
	movq	%rbx, %rdi
	callq	_AMDGPU_FW_VRAM_VF2PF_READ
	movq	-32(%rbp), %rdi
	leaq	L_.str(%rip), %rsi
	callq	_strcpy
	movq	_driver_cert@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	xorl	%edx, %edx
	callq	_AMDGPU_FW_VRAM_VF2PF_WRITE
	movl	-20(%rbp), %r14d
	movq	16(%rbx), %rdi
	movl	-24(%rbp), %esi
	movl	8(%rbx), %edx
	xorl	%ecx, %ecx
	callq	_amdgpu_virt_fw_reserve_get_checksum
	movq	%rbx, %rdi
	movl	%r14d, %esi
	movl	%eax, %edx
	callq	_AMDGPU_FW_VRAM_VF2PF_WRITE
LBB0_4:
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_AMDGIM_DATAEXCHANGE_OFFSET,4,2 ## @AMDGIM_DATAEXCHANGE_OFFSET
	.comm	_header,8,2                     ## @header
	.comm	_feature_flags,4,2              ## @feature_flags
	.comm	_AMDGPU_FW_VRAM_VF2PF_VER,4,2   ## @AMDGPU_FW_VRAM_VF2PF_VER
	.comm	_driver_version,4,2             ## @driver_version
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"N/A"

	.comm	_driver_cert,4,2                ## @driver_cert
	.comm	_THIS_MODULE,8,3                ## @THIS_MODULE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_amdgpu_virt_init_data_exchange ; -- Begin function amdgpu_virt_init_data_exchange
	.p2align	2
_amdgpu_virt_init_data_exchange:        ; @amdgpu_virt_init_data_exchange
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	str	xzr, [sp, #8]
	stp	xzr, xzr, [x0, #16]
	ldr	x8, [x0, #32]
	cbz	x8, LBB0_4
; %bb.1:
	mov	x19, x0
Lloh0:
	adrp	x9, _AMDGIM_DATAEXCHANGE_OFFSET@GOTPAGE
Lloh1:
	ldr	x9, [x9, _AMDGIM_DATAEXCHANGE_OFFSET@GOTPAGEOFF]
Lloh2:
	ldrsw	x9, [x9]
	add	x8, x8, x9, lsl #2
	str	x8, [x0, #24]
Lloh3:
	adrp	x20, _header@GOTPAGE
Lloh4:
	ldr	x20, [x20, _header@GOTPAGEOFF]
	ldr	w1, [x20]
	add	x2, sp, #12
	bl	_AMDGPU_FW_VRAM_PF2VF_READ
	add	x2, sp, #8
	mov	x0, x19
	mov	w1, #0
	bl	_AMDGPU_FW_VRAM_PF2VF_READ
Lloh5:
	adrp	x8, _feature_flags@GOTPAGE
Lloh6:
	ldr	x8, [x8, _feature_flags@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	mov	x0, x19
	mov	x2, x19
	bl	_AMDGPU_FW_VRAM_PF2VF_READ
	ldr	w1, [sp, #12]
	sub	w8, w1, #1
	cmp	w8, #4094
	b.hi	LBB0_4
; %bb.2:
	ldr	x0, [x19, #24]
	ldr	w2, [x19, #8]
	ldr	w3, [sp, #8]
	bl	_amdgpu_virt_fw_reserve_get_checksum
	ldr	w8, [sp, #8]
	cmp	w0, w8
	b.ne	LBB0_4
; %bb.3:
	ldr	x8, [x19, #24]
	ldrsw	x9, [sp, #12]
	add	x0, x8, x9
	str	x0, [x19, #16]
	mov	w1, #0
	mov	w2, #4
	bl	_memset
	ldr	w1, [x20, #4]
Lloh8:
	adrp	x8, _AMDGPU_FW_VRAM_VF2PF_VER@GOTPAGE
Lloh9:
	ldr	x8, [x8, _AMDGPU_FW_VRAM_VF2PF_VER@GOTPAGEOFF]
Lloh10:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_AMDGPU_FW_VRAM_VF2PF_WRITE
	ldr	w1, [x20]
	mov	x0, x19
	mov	w2, #4
	bl	_AMDGPU_FW_VRAM_VF2PF_WRITE
Lloh11:
	adrp	x8, _driver_version@GOTPAGE
Lloh12:
	ldr	x8, [x8, _driver_version@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
	mov	x2, sp
	mov	x0, x19
	bl	_AMDGPU_FW_VRAM_VF2PF_READ
	ldr	x0, [sp]
Lloh14:
	adrp	x1, l_.str@PAGE
Lloh15:
	add	x1, x1, l_.str@PAGEOFF
	bl	_strcpy
Lloh16:
	adrp	x8, _driver_cert@GOTPAGE
Lloh17:
	ldr	x8, [x8, _driver_cert@GOTPAGEOFF]
Lloh18:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #0
	bl	_AMDGPU_FW_VRAM_VF2PF_WRITE
	ldp	w20, w1, [sp, #8]
	ldr	x0, [x19, #16]
	ldr	w2, [x19, #8]
	mov	w3, #0
	bl	_amdgpu_virt_fw_reserve_get_checksum
	mov	x2, x0
	mov	x0, x19
	mov	x1, x20
	bl	_AMDGPU_FW_VRAM_VF2PF_WRITE
LBB0_4:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_AMDGIM_DATAEXCHANGE_OFFSET,4,2 ; @AMDGIM_DATAEXCHANGE_OFFSET
	.comm	_header,8,2                     ; @header
	.comm	_feature_flags,4,2              ; @feature_flags
	.comm	_AMDGPU_FW_VRAM_VF2PF_VER,4,2   ; @AMDGPU_FW_VRAM_VF2PF_VER
	.comm	_driver_version,4,2             ; @driver_version
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"N/A"

	.comm	_driver_cert,4,2                ; @driver_cert
	.comm	_THIS_MODULE,8,3                ; @THIS_MODULE
.subsections_via_symbols
