	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function xgpu_ai_poll_ack
_xgpu_ai_poll_ack:                      ## @xgpu_ai_poll_ack
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_AI_MAILBOX_POLL_ACK_TIMEDOUT@GOTPCREL(%rip), %r14
	movl	(%r14), %ebx
	addl	$5, %ebx
	movq	_AI_MAIBOX_CONTROL_TRN_OFFSET_BYTE@GOTPCREL(%rip), %r15
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r15), %edi
	callq	_RREG8
	testb	$2, %al
	jne	LBB0_2
## %bb.3:                               ##   in Loop: Header=BB0_1 Depth=1
	movl	$5, %edi
	callq	_mdelay
	addl	$-5, %ebx
	cmpl	$6, %ebx
	jg	LBB0_1
## %bb.4:
	movl	(%r14), %esi
	leaq	L_.str(%rip), %rdi
	callq	_pr_err
	movq	_ETIME@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_5
LBB0_2:
	xorl	%eax, %eax
LBB0_5:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_AI_MAILBOX_POLL_ACK_TIMEDOUT,4,2 ## @AI_MAILBOX_POLL_ACK_TIMEDOUT
	.comm	_AI_MAIBOX_CONTROL_TRN_OFFSET_BYTE,4,2 ## @AI_MAIBOX_CONTROL_TRN_OFFSET_BYTE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Doesn't get TRN_MSG_ACK from pf in %d msec\n"

	.comm	_ETIME,4,2                      ## @ETIME
	.no_dead_strip	_xgpu_ai_poll_ack
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function xgpu_ai_poll_ack
_xgpu_ai_poll_ack:                      ; @xgpu_ai_poll_ack
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w21, -40
	.cfi_offset w22, -48
Lloh0:
	adrp	x19, _AI_MAILBOX_POLL_ACK_TIMEDOUT@GOTPAGE
Lloh1:
	ldr	x19, [x19, _AI_MAILBOX_POLL_ACK_TIMEDOUT@GOTPAGEOFF]
	ldr	w8, [x19]
	add	w20, w8, #5
Lloh2:
	adrp	x21, _AI_MAIBOX_CONTROL_TRN_OFFSET_BYTE@GOTPAGE
Lloh3:
	ldr	x21, [x21, _AI_MAIBOX_CONTROL_TRN_OFFSET_BYTE@GOTPAGEOFF]
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x21]
	bl	_RREG8
	tbnz	w0, #1, LBB0_4
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	mov	w0, #5
	bl	_mdelay
	sub	w20, w20, #5
	cmp	w20, #6
	b.gt	LBB0_1
; %bb.3:
	ldr	w1, [x19]
Lloh4:
	adrp	x0, l_.str@PAGE
Lloh5:
	add	x0, x0, l_.str@PAGEOFF
	bl	_pr_err
Lloh6:
	adrp	x8, _ETIME@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ETIME@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_5
LBB0_4:
	mov	w0, #0
LBB0_5:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_AI_MAILBOX_POLL_ACK_TIMEDOUT,4,2 ; @AI_MAILBOX_POLL_ACK_TIMEDOUT
	.comm	_AI_MAIBOX_CONTROL_TRN_OFFSET_BYTE,4,2 ; @AI_MAIBOX_CONTROL_TRN_OFFSET_BYTE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Doesn't get TRN_MSG_ACK from pf in %d msec\n"

	.comm	_ETIME,4,2                      ; @ETIME
	.no_dead_strip	_xgpu_ai_poll_ack
.subsections_via_symbols
