	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function xgpu_ai_mailbox_trans_msg
_xgpu_ai_mailbox_trans_msg:             ## @xgpu_ai_mailbox_trans_msg
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%r8d, -52(%rbp)                 ## 4-byte Spill
	movl	%ecx, -48(%rbp)                 ## 4-byte Spill
	movl	%edx, -44(%rbp)                 ## 4-byte Spill
	movl	%esi, %r13d
	movq	%rdi, %rbx
	xorl	%esi, %esi
	callq	_xgpu_ai_mailbox_set_valid
	movq	%rbx, %rdi
	callq	_xgpu_ai_peek_ack
	testq	%rax, %rax
	je	LBB0_3
## %bb.1:
	leaq	L_.str(%rip), %r14
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r14, %rdi
	movq	%rax, %rsi
	xorl	%eax, %eax
	callq	_pr_err
	movl	$1, %edi
	callq	_msleep
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_xgpu_ai_mailbox_set_valid
	movq	%rbx, %rdi
	callq	_xgpu_ai_peek_ack
	testq	%rax, %rax
	jne	LBB0_2
LBB0_3:
	movq	_NBIO@GOTPCREL(%rip), %r15
	movl	(%r15), %edi
	movq	_mmBIF_BX_PF0_MAILBOX_MSGBUF_TRN_DW0@GOTPCREL(%rip), %r12
	movl	(%r12), %edx
	xorl	%esi, %esi
	callq	_SOC15_REG_OFFSET
	movl	%eax, %edi
	callq	_RREG32_NO_KIQ
	movq	_BIF_BX_PF0_MAILBOX_MSGBUF_TRN_DW0@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movq	_MSGBUF_DATA@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movl	%eax, %edi
	movl	%r13d, %ecx
	callq	_REG_SET_FIELD
	movl	%eax, %r14d
	movl	(%r15), %edi
	movl	(%r12), %edx
	xorl	%esi, %esi
	callq	_SOC15_REG_OFFSET
	movl	%eax, %edi
	movl	%r14d, %esi
	callq	_WREG32_NO_KIQ
	movl	(%r15), %edi
	movq	_mmBIF_BX_PF0_MAILBOX_MSGBUF_TRN_DW1@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	xorl	%esi, %esi
	callq	_SOC15_REG_OFFSET
	movl	%eax, %edi
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	callq	_WREG32_NO_KIQ
	movl	(%r15), %edi
	movq	_mmBIF_BX_PF0_MAILBOX_MSGBUF_TRN_DW2@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	xorl	%esi, %esi
	callq	_SOC15_REG_OFFSET
	movl	%eax, %edi
	movl	-48(%rbp), %esi                 ## 4-byte Reload
	callq	_WREG32_NO_KIQ
	movl	(%r15), %edi
	movq	_mmBIF_BX_PF0_MAILBOX_MSGBUF_TRN_DW3@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	xorl	%esi, %esi
	callq	_SOC15_REG_OFFSET
	movl	%eax, %edi
	movl	-52(%rbp), %esi                 ## 4-byte Reload
	callq	_WREG32_NO_KIQ
	movq	%rbx, %rdi
	movl	$1, %esi
	callq	_xgpu_ai_mailbox_set_valid
	movq	%rbx, %rdi
	callq	_xgpu_ai_poll_ack
	testl	%eax, %eax
	je	LBB0_5
## %bb.4:
	leaq	L_.str.1(%rip), %rdi
	xorl	%eax, %eax
	callq	_pr_err
LBB0_5:
	movq	%rbx, %rdi
	xorl	%esi, %esi
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_xgpu_ai_mailbox_set_valid      ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"trn=%x ACK should not assert! wait again !\n"

	.comm	_NBIO,4,2                       ## @NBIO
	.comm	_mmBIF_BX_PF0_MAILBOX_MSGBUF_TRN_DW0,4,2 ## @mmBIF_BX_PF0_MAILBOX_MSGBUF_TRN_DW0
	.comm	_BIF_BX_PF0_MAILBOX_MSGBUF_TRN_DW0,4,2 ## @BIF_BX_PF0_MAILBOX_MSGBUF_TRN_DW0
	.comm	_MSGBUF_DATA,4,2                ## @MSGBUF_DATA
	.comm	_mmBIF_BX_PF0_MAILBOX_MSGBUF_TRN_DW1,4,2 ## @mmBIF_BX_PF0_MAILBOX_MSGBUF_TRN_DW1
	.comm	_mmBIF_BX_PF0_MAILBOX_MSGBUF_TRN_DW2,4,2 ## @mmBIF_BX_PF0_MAILBOX_MSGBUF_TRN_DW2
	.comm	_mmBIF_BX_PF0_MAILBOX_MSGBUF_TRN_DW3,4,2 ## @mmBIF_BX_PF0_MAILBOX_MSGBUF_TRN_DW3
L_.str.1:                               ## @.str.1
	.asciz	"Doesn't get ack from pf, continue\n"

	.no_dead_strip	_xgpu_ai_mailbox_trans_msg
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function xgpu_ai_mailbox_trans_msg
_xgpu_ai_mailbox_trans_msg:             ; @xgpu_ai_mailbox_trans_msg
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x20, x4
	mov	x21, x3
	mov	x22, x2
	mov	x23, x1
	mov	x19, x0
	mov	w1, #0
	bl	_xgpu_ai_mailbox_set_valid
	mov	x0, x19
	bl	_xgpu_ai_peek_ack
	cbz	x0, LBB0_3
; %bb.1:
Lloh0:
	adrp	x24, l_.str@PAGE
Lloh1:
	add	x24, x24, l_.str@PAGEOFF
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	str	x0, [sp]
	mov	x0, x24
	bl	_pr_err
	mov	w0, #1
	bl	_msleep
	mov	x0, x19
	mov	w1, #0
	bl	_xgpu_ai_mailbox_set_valid
	mov	x0, x19
	bl	_xgpu_ai_peek_ack
	cbnz	x0, LBB0_2
LBB0_3:
Lloh2:
	adrp	x24, _NBIO@GOTPAGE
Lloh3:
	ldr	x24, [x24, _NBIO@GOTPAGEOFF]
	ldr	w0, [x24]
Lloh4:
	adrp	x25, _mmBIF_BX_PF0_MAILBOX_MSGBUF_TRN_DW0@GOTPAGE
Lloh5:
	ldr	x25, [x25, _mmBIF_BX_PF0_MAILBOX_MSGBUF_TRN_DW0@GOTPAGEOFF]
	ldr	w2, [x25]
	mov	w1, #0
	bl	_SOC15_REG_OFFSET
	bl	_RREG32_NO_KIQ
Lloh6:
	adrp	x8, _BIF_BX_PF0_MAILBOX_MSGBUF_TRN_DW0@GOTPAGE
Lloh7:
	ldr	x8, [x8, _BIF_BX_PF0_MAILBOX_MSGBUF_TRN_DW0@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
Lloh9:
	adrp	x8, _MSGBUF_DATA@GOTPAGE
Lloh10:
	ldr	x8, [x8, _MSGBUF_DATA@GOTPAGEOFF]
Lloh11:
	ldr	w2, [x8]
	mov	x3, x23
	bl	_REG_SET_FIELD
	mov	x23, x0
	ldr	w0, [x24]
	ldr	w2, [x25]
	mov	w1, #0
	bl	_SOC15_REG_OFFSET
	mov	x1, x23
	bl	_WREG32_NO_KIQ
	ldr	w0, [x24]
Lloh12:
	adrp	x8, _mmBIF_BX_PF0_MAILBOX_MSGBUF_TRN_DW1@GOTPAGE
Lloh13:
	ldr	x8, [x8, _mmBIF_BX_PF0_MAILBOX_MSGBUF_TRN_DW1@GOTPAGEOFF]
Lloh14:
	ldr	w2, [x8]
	mov	w1, #0
	bl	_SOC15_REG_OFFSET
	mov	x1, x22
	bl	_WREG32_NO_KIQ
	ldr	w0, [x24]
Lloh15:
	adrp	x8, _mmBIF_BX_PF0_MAILBOX_MSGBUF_TRN_DW2@GOTPAGE
Lloh16:
	ldr	x8, [x8, _mmBIF_BX_PF0_MAILBOX_MSGBUF_TRN_DW2@GOTPAGEOFF]
Lloh17:
	ldr	w2, [x8]
	mov	w1, #0
	bl	_SOC15_REG_OFFSET
	mov	x1, x21
	bl	_WREG32_NO_KIQ
	ldr	w0, [x24]
Lloh18:
	adrp	x8, _mmBIF_BX_PF0_MAILBOX_MSGBUF_TRN_DW3@GOTPAGE
Lloh19:
	ldr	x8, [x8, _mmBIF_BX_PF0_MAILBOX_MSGBUF_TRN_DW3@GOTPAGEOFF]
Lloh20:
	ldr	w2, [x8]
	mov	w1, #0
	bl	_SOC15_REG_OFFSET
	mov	x1, x20
	bl	_WREG32_NO_KIQ
	mov	x0, x19
	mov	w1, #1
	bl	_xgpu_ai_mailbox_set_valid
	mov	x0, x19
	bl	_xgpu_ai_poll_ack
	cbz	w0, LBB0_5
; %bb.4:
Lloh21:
	adrp	x0, l_.str.1@PAGE
Lloh22:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_pr_err
LBB0_5:
	mov	x0, x19
	mov	w1, #0
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	b	_xgpu_ai_mailbox_set_valid
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"trn=%x ACK should not assert! wait again !\n"

	.comm	_NBIO,4,2                       ; @NBIO
	.comm	_mmBIF_BX_PF0_MAILBOX_MSGBUF_TRN_DW0,4,2 ; @mmBIF_BX_PF0_MAILBOX_MSGBUF_TRN_DW0
	.comm	_BIF_BX_PF0_MAILBOX_MSGBUF_TRN_DW0,4,2 ; @BIF_BX_PF0_MAILBOX_MSGBUF_TRN_DW0
	.comm	_MSGBUF_DATA,4,2                ; @MSGBUF_DATA
	.comm	_mmBIF_BX_PF0_MAILBOX_MSGBUF_TRN_DW1,4,2 ; @mmBIF_BX_PF0_MAILBOX_MSGBUF_TRN_DW1
	.comm	_mmBIF_BX_PF0_MAILBOX_MSGBUF_TRN_DW2,4,2 ; @mmBIF_BX_PF0_MAILBOX_MSGBUF_TRN_DW2
	.comm	_mmBIF_BX_PF0_MAILBOX_MSGBUF_TRN_DW3,4,2 ; @mmBIF_BX_PF0_MAILBOX_MSGBUF_TRN_DW3
l_.str.1:                               ; @.str.1
	.asciz	"Doesn't get ack from pf, continue\n"

	.no_dead_strip	_xgpu_ai_mailbox_trans_msg
.subsections_via_symbols
