	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function xgpu_ai_send_access_requests
_xgpu_ai_send_access_requests:          ## @xgpu_ai_send_access_requests
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %ebx
	movq	%rdi, %r15
	xorl	%r14d, %r14d
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	callq	_xgpu_ai_mailbox_trans_msg
	movq	_IDH_REQ_GPU_INIT_ACCESS@GOTPCREL(%rip), %r13
	movq	_IDH_REQ_GPU_RESET_ACCESS@GOTPCREL(%rip), %rcx
	cmpl	%ebx, (%r13)
	je	LBB0_3
## %bb.1:
	movq	_IDH_REQ_GPU_FINI_ACCESS@GOTPCREL(%rip), %rax
	cmpl	%ebx, (%rax)
	je	LBB0_3
## %bb.2:
	cmpl	%ebx, (%rcx)
	jne	LBB0_8
LBB0_3:
	movq	_IDH_READY_TO_ACCESS_GPU@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_xgpu_ai_poll_msg
	testl	%eax, %eax
	je	LBB0_5
## %bb.4:
	movl	%eax, %r12d
	leaq	L_.str(%rip), %rdi
	callq	_pr_err
	movl	%r12d, %r14d
	jmp	LBB0_8
LBB0_5:
	cmpl	%ebx, (%r13)
	je	LBB0_7
## %bb.6:
	movq	_IDH_REQ_GPU_RESET_ACCESS@GOTPCREL(%rip), %rax
	cmpl	%ebx, (%rax)
	jne	LBB0_8
LBB0_7:
	movq	_NBIO@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_mmBIF_BX_PF0_MAILBOX_MSGBUF_RCV_DW2@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	xorl	%r14d, %r14d
	xorl	%esi, %esi
	callq	_SOC15_REG_OFFSET
	movl	%eax, %edi
	callq	_RREG32_NO_KIQ
	movl	%eax, (%r15)
LBB0_8:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_IDH_REQ_GPU_INIT_ACCESS,4,2    ## @IDH_REQ_GPU_INIT_ACCESS
	.comm	_IDH_REQ_GPU_FINI_ACCESS,4,2    ## @IDH_REQ_GPU_FINI_ACCESS
	.comm	_IDH_REQ_GPU_RESET_ACCESS,4,2   ## @IDH_REQ_GPU_RESET_ACCESS
	.comm	_IDH_READY_TO_ACCESS_GPU,4,2    ## @IDH_READY_TO_ACCESS_GPU
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Doesn't get READY_TO_ACCESS_GPU from pf, give up\n"

	.comm	_NBIO,4,2                       ## @NBIO
	.comm	_mmBIF_BX_PF0_MAILBOX_MSGBUF_RCV_DW2,4,2 ## @mmBIF_BX_PF0_MAILBOX_MSGBUF_RCV_DW2
	.no_dead_strip	_xgpu_ai_send_access_requests
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function xgpu_ai_send_access_requests
_xgpu_ai_send_access_requests:          ; @xgpu_ai_send_access_requests
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x20, x1
	mov	x19, x0
	mov	w2, #0
	mov	w3, #0
	mov	w4, #0
	bl	_xgpu_ai_mailbox_trans_msg
	mov	w21, #0
Lloh0:
	adrp	x22, _IDH_REQ_GPU_INIT_ACCESS@GOTPAGE
Lloh1:
	ldr	x22, [x22, _IDH_REQ_GPU_INIT_ACCESS@GOTPAGEOFF]
	ldr	w8, [x22]
Lloh2:
	adrp	x9, _IDH_REQ_GPU_FINI_ACCESS@GOTPAGE
Lloh3:
	ldr	x9, [x9, _IDH_REQ_GPU_FINI_ACCESS@GOTPAGEOFF]
Lloh4:
	ldr	w9, [x9]
Lloh5:
	adrp	x23, _IDH_REQ_GPU_RESET_ACCESS@GOTPAGE
Lloh6:
	ldr	x23, [x23, _IDH_REQ_GPU_RESET_ACCESS@GOTPAGEOFF]
	ldr	w10, [x23]
	cmp	w8, w20
	ccmp	w9, w20, #4, ne
	ccmp	w10, w20, #4, ne
	b.ne	LBB0_6
; %bb.1:
Lloh7:
	adrp	x8, _IDH_READY_TO_ACCESS_GPU@GOTPAGE
Lloh8:
	ldr	x8, [x8, _IDH_READY_TO_ACCESS_GPU@GOTPAGEOFF]
Lloh9:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_xgpu_ai_poll_msg
	cbz	w0, LBB0_3
; %bb.2:
	mov	x21, x0
Lloh10:
	adrp	x0, l_.str@PAGE
Lloh11:
	add	x0, x0, l_.str@PAGEOFF
	bl	_pr_err
	b	LBB0_6
LBB0_3:
	ldr	w8, [x22]
	ldr	w9, [x23]
	cmp	w8, w20
	ccmp	w9, w20, #4, ne
	b.ne	LBB0_5
; %bb.4:
Lloh12:
	adrp	x8, _NBIO@GOTPAGE
Lloh13:
	ldr	x8, [x8, _NBIO@GOTPAGEOFF]
Lloh14:
	ldr	w0, [x8]
Lloh15:
	adrp	x8, _mmBIF_BX_PF0_MAILBOX_MSGBUF_RCV_DW2@GOTPAGE
Lloh16:
	ldr	x8, [x8, _mmBIF_BX_PF0_MAILBOX_MSGBUF_RCV_DW2@GOTPAGEOFF]
Lloh17:
	ldr	w2, [x8]
	mov	w1, #0
	bl	_SOC15_REG_OFFSET
	bl	_RREG32_NO_KIQ
	mov	w21, #0
	str	w0, [x19]
	b	LBB0_6
LBB0_5:
	mov	w21, #0
LBB0_6:
	mov	x0, x21
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_IDH_REQ_GPU_INIT_ACCESS,4,2    ; @IDH_REQ_GPU_INIT_ACCESS
	.comm	_IDH_REQ_GPU_FINI_ACCESS,4,2    ; @IDH_REQ_GPU_FINI_ACCESS
	.comm	_IDH_REQ_GPU_RESET_ACCESS,4,2   ; @IDH_REQ_GPU_RESET_ACCESS
	.comm	_IDH_READY_TO_ACCESS_GPU,4,2    ; @IDH_READY_TO_ACCESS_GPU
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Doesn't get READY_TO_ACCESS_GPU from pf, give up\n"

	.comm	_NBIO,4,2                       ; @NBIO
	.comm	_mmBIF_BX_PF0_MAILBOX_MSGBUF_RCV_DW2,4,2 ; @mmBIF_BX_PF0_MAILBOX_MSGBUF_RCV_DW2
	.no_dead_strip	_xgpu_ai_send_access_requests
.subsections_via_symbols
