	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function amdvi_wait
_amdvi_wait:                            ## @amdvi_wait
	.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
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %rbx
	leaq	L_.str(%rip), %rsi
	callq	_KASSERT
	movq	8(%rbx), %r14
	xorl	%edi, %edi
	testq	%r14, %r14
	setne	%dil
	leaq	L_.str.1(%rip), %rsi
	callq	_KASSERT
	movq	_AMDVI_CTRL_EN@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%r14)
	je	LBB0_11
## %bb.1:
	movq	%rbx, %rdi
	callq	_amdvi_cmp_wait
	testq	%rax, %rax
	jne	LBB0_11
## %bb.2:
	movq	%rbx, %rdi
	callq	_amdvi_cmp_wait
	testq	%rax, %rax
	jne	LBB0_11
## %bb.3:
	movq	%rbx, %rdi
	callq	_amdvi_cmp_wait
	testq	%rax, %rax
	jne	LBB0_11
## %bb.4:
	movq	%rbx, %rdi
	callq	_amdvi_cmp_wait
	testq	%rax, %rax
	jne	LBB0_11
## %bb.5:
	movq	%rbx, %rdi
	callq	_amdvi_cmp_wait
	testq	%rax, %rax
	jne	LBB0_11
## %bb.6:
	movq	%rbx, %rdi
	callq	_amdvi_cmp_wait
	testq	%rax, %rax
	jne	LBB0_11
## %bb.7:
	movq	%rbx, %rdi
	callq	_amdvi_cmp_wait
	testq	%rax, %rax
	jne	LBB0_11
## %bb.8:
	movq	%rbx, %rdi
	callq	_amdvi_cmp_wait
	testq	%rax, %rax
	jne	LBB0_11
## %bb.9:
	movq	%rbx, %rdi
	callq	_amdvi_cmp_wait
	testq	%rax, %rax
	jne	LBB0_11
## %bb.10:
	movq	%rbx, %rdi
	callq	_amdvi_cmp_wait
	testq	%rax, %rax
	je	LBB0_12
LBB0_11:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_12:
	movl	(%rbx), %edi
	movl	4(%r14), %ecx
	movl	8(%r14), %edx
	leaq	L_.str.2(%rip), %rsi
	callq	_device_printf
	movq	%rbx, %rdi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_amdvi_dump_cmds                ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"softc is NULL"

L_.str.1:                               ## @.str.1
	.asciz	"ctrl is NULL"

	.comm	_AMDVI_CTRL_EN,4,2              ## @AMDVI_CTRL_EN
L_.str.2:                               ## @.str.2
	.asciz	"Error: completion failed tail:0x%x, head:0x%x.\n"

	.no_dead_strip	_amdvi_wait
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function amdvi_wait
_amdvi_wait:                            ; @amdvi_wait
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	bl	_KASSERT
	ldr	x20, [x19, #8]
	cmp	x20, #0
	cset	w0, ne
Lloh2:
	adrp	x1, l_.str.1@PAGE
Lloh3:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_KASSERT
	ldr	w8, [x20]
Lloh4:
	adrp	x9, _AMDVI_CTRL_EN@GOTPAGE
Lloh5:
	ldr	x9, [x9, _AMDVI_CTRL_EN@GOTPAGEOFF]
Lloh6:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_11
; %bb.1:
	mov	x0, x19
	bl	_amdvi_cmp_wait
	cbnz	x0, LBB0_11
; %bb.2:
	mov	x0, x19
	bl	_amdvi_cmp_wait
	cbnz	x0, LBB0_11
; %bb.3:
	mov	x0, x19
	bl	_amdvi_cmp_wait
	cbnz	x0, LBB0_11
; %bb.4:
	mov	x0, x19
	bl	_amdvi_cmp_wait
	cbnz	x0, LBB0_11
; %bb.5:
	mov	x0, x19
	bl	_amdvi_cmp_wait
	cbnz	x0, LBB0_11
; %bb.6:
	mov	x0, x19
	bl	_amdvi_cmp_wait
	cbnz	x0, LBB0_11
; %bb.7:
	mov	x0, x19
	bl	_amdvi_cmp_wait
	cbnz	x0, LBB0_11
; %bb.8:
	mov	x0, x19
	bl	_amdvi_cmp_wait
	cbnz	x0, LBB0_11
; %bb.9:
	mov	x0, x19
	bl	_amdvi_cmp_wait
	cbnz	x0, LBB0_11
; %bb.10:
	mov	x0, x19
	bl	_amdvi_cmp_wait
	cbz	x0, LBB0_12
LBB0_11:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_12:
	ldr	w0, [x19]
	ldp	w3, w2, [x20, #4]
Lloh7:
	adrp	x1, l_.str.2@PAGE
Lloh8:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_device_printf
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_amdvi_dump_cmds
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"softc is NULL"

l_.str.1:                               ; @.str.1
	.asciz	"ctrl is NULL"

	.comm	_AMDVI_CTRL_EN,4,2              ; @AMDVI_CTRL_EN
l_.str.2:                               ; @.str.2
	.asciz	"Error: completion failed tail:0x%x, head:0x%x.\n"

	.no_dead_strip	_amdvi_wait
.subsections_via_symbols
