	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function amdvi_enable
_amdvi_enable:                          ## @amdvi_enable
	.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
	movq	_ivhd_count@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	jle	LBB0_13
## %bb.1:
	xorl	%r13d, %r13d
	movq	_IVHD_FLAG_PPW@GOTPCREL(%rip), %r15
	movq	_IVHD_FLAG_ISOC@GOTPCREL(%rip), %r14
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_12:                                ##   in Loop: Header=BB0_2 Depth=1
	orl	%ecx, %edx
	orl	%edx, %eax
	movl	%eax, 4(%r12)
	incq	%r13
	movq	_ivhd_count@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	cmpq	%rax, %r13
	jge	LBB0_13
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	_ivhd_devs@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	(%rax,%r13,4), %edi
	callq	_device_get_softc
	movq	%rax, %rbx
	movq	%rax, %rdi
	leaq	L_.str(%rip), %rsi
	callq	_KASSERT
	movq	8(%rbx), %r12
	movq	%r12, %rdi
	leaq	L_.str.1(%rip), %rsi
	callq	_KASSERT
	movq	_AMDVI_CTRL_CMD@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_AMDVI_CTRL_EN@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movq	_AMDVI_CTRL_ELOG@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movq	_AMDVI_CTRL_ELOGINT@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movl	(%rbx), %ecx
	movq	_IVHD_FLAG_COH@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	andl	%ecx, %edx
	je	LBB0_4
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	_AMDVI_CTRL_COH@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
LBB0_4:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	_AMDVI_CTRL_INV_TO_1S@GOTPCREL(%rip), %rsi
	orl	(%rsi), %eax
	movq	_IVHD_FLAG_HTT@GOTPCREL(%rip), %rsi
	movl	(%rsi), %esi
	andl	%ecx, %esi
	je	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	_AMDVI_CTRL_HTT@GOTPCREL(%rip), %rsi
	movl	(%rsi), %esi
LBB0_6:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	_IVHD_FLAG_RPPW@GOTPCREL(%rip), %rdi
	movl	(%rdi), %edi
	andl	%ecx, %edi
	je	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	_AMDVI_CTRL_RPPW@GOTPCREL(%rip), %rdi
	movl	(%rdi), %edi
LBB0_8:                                 ##   in Loop: Header=BB0_2 Depth=1
	orl	%edi, %esi
	orl	%edx, %eax
	movl	(%r15), %edx
	andl	%ecx, %edx
	je	LBB0_10
## %bb.9:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	_AMDVI_CTRL_PPW@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
LBB0_10:                                ##   in Loop: Header=BB0_2 Depth=1
	orl	%esi, %eax
	andl	(%r14), %ecx
	je	LBB0_12
## %bb.11:                              ##   in Loop: Header=BB0_2 Depth=1
	movq	_AMDVI_CTRL_ISOC@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	jmp	LBB0_12
LBB0_13:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ivhd_count,4,2                 ## @ivhd_count
	.comm	_ivhd_devs,8,3                  ## @ivhd_devs
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"softc is NULL\n"

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

	.comm	_AMDVI_CTRL_EN,4,2              ## @AMDVI_CTRL_EN
	.comm	_AMDVI_CTRL_CMD,4,2             ## @AMDVI_CTRL_CMD
	.comm	_AMDVI_CTRL_ELOG,4,2            ## @AMDVI_CTRL_ELOG
	.comm	_AMDVI_CTRL_ELOGINT,4,2         ## @AMDVI_CTRL_ELOGINT
	.comm	_AMDVI_CTRL_INV_TO_1S,4,2       ## @AMDVI_CTRL_INV_TO_1S
	.comm	_IVHD_FLAG_COH,4,2              ## @IVHD_FLAG_COH
	.comm	_AMDVI_CTRL_COH,4,2             ## @AMDVI_CTRL_COH
	.comm	_IVHD_FLAG_HTT,4,2              ## @IVHD_FLAG_HTT
	.comm	_AMDVI_CTRL_HTT,4,2             ## @AMDVI_CTRL_HTT
	.comm	_IVHD_FLAG_RPPW,4,2             ## @IVHD_FLAG_RPPW
	.comm	_AMDVI_CTRL_RPPW,4,2            ## @AMDVI_CTRL_RPPW
	.comm	_IVHD_FLAG_PPW,4,2              ## @IVHD_FLAG_PPW
	.comm	_AMDVI_CTRL_PPW,4,2             ## @AMDVI_CTRL_PPW
	.comm	_IVHD_FLAG_ISOC,4,2             ## @IVHD_FLAG_ISOC
	.comm	_AMDVI_CTRL_ISOC,4,2            ## @AMDVI_CTRL_ISOC
	.no_dead_strip	_amdvi_enable
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function amdvi_enable
_amdvi_enable:                          ; @amdvi_enable
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
Lloh0:
	adrp	x19, _ivhd_count@GOTPAGE
Lloh1:
	ldr	x19, [x19, _ivhd_count@GOTPAGEOFF]
	ldr	w8, [x19]
	cmp	w8, #1
	b.lt	LBB0_3
; %bb.1:
	mov	x24, #0
Lloh2:
	adrp	x23, _IVHD_FLAG_RPPW@GOTPAGE
Lloh3:
	ldr	x23, [x23, _IVHD_FLAG_RPPW@GOTPAGEOFF]
Lloh4:
	adrp	x25, _AMDVI_CTRL_RPPW@GOTPAGE
Lloh5:
	ldr	x25, [x25, _AMDVI_CTRL_RPPW@GOTPAGEOFF]
Lloh6:
	adrp	x20, _IVHD_FLAG_PPW@GOTPAGE
Lloh7:
	ldr	x20, [x20, _IVHD_FLAG_PPW@GOTPAGEOFF]
Lloh8:
	adrp	x26, _AMDVI_CTRL_PPW@GOTPAGE
Lloh9:
	ldr	x26, [x26, _AMDVI_CTRL_PPW@GOTPAGEOFF]
Lloh10:
	adrp	x27, _IVHD_FLAG_ISOC@GOTPAGE
Lloh11:
	ldr	x27, [x27, _IVHD_FLAG_ISOC@GOTPAGEOFF]
Lloh12:
	adrp	x28, _AMDVI_CTRL_ISOC@GOTPAGE
Lloh13:
	ldr	x28, [x28, _AMDVI_CTRL_ISOC@GOTPAGEOFF]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
Lloh14:
	adrp	x8, _ivhd_devs@GOTPAGE
Lloh15:
	ldr	x8, [x8, _ivhd_devs@GOTPAGEOFF]
Lloh16:
	ldr	x8, [x8]
	ldr	w0, [x8, x24, lsl #2]
	bl	_device_get_softc
	mov	x21, x0
Lloh17:
	adrp	x1, l_.str@PAGE
Lloh18:
	add	x1, x1, l_.str@PAGEOFF
	bl	_KASSERT
	ldr	x22, [x21, #8]
	mov	x0, x22
Lloh19:
	adrp	x1, l_.str.1@PAGE
Lloh20:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_KASSERT
Lloh21:
	adrp	x8, _AMDVI_CTRL_EN@GOTPAGE
Lloh22:
	ldr	x8, [x8, _AMDVI_CTRL_EN@GOTPAGEOFF]
Lloh23:
	ldr	w8, [x8]
Lloh24:
	adrp	x9, _AMDVI_CTRL_CMD@GOTPAGE
Lloh25:
	ldr	x9, [x9, _AMDVI_CTRL_CMD@GOTPAGEOFF]
Lloh26:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh27:
	adrp	x9, _AMDVI_CTRL_ELOG@GOTPAGE
Lloh28:
	ldr	x9, [x9, _AMDVI_CTRL_ELOG@GOTPAGEOFF]
Lloh29:
	ldr	w9, [x9]
	orr	w8, w8, w9
Lloh30:
	adrp	x9, _AMDVI_CTRL_ELOGINT@GOTPAGE
Lloh31:
	ldr	x9, [x9, _AMDVI_CTRL_ELOGINT@GOTPAGEOFF]
Lloh32:
	ldr	w9, [x9]
	orr	w8, w8, w9
Lloh33:
	adrp	x9, _AMDVI_CTRL_INV_TO_1S@GOTPAGE
Lloh34:
	ldr	x9, [x9, _AMDVI_CTRL_INV_TO_1S@GOTPAGEOFF]
Lloh35:
	ldr	w9, [x9]
	orr	w8, w8, w9
	ldr	w9, [x21]
Lloh36:
	adrp	x10, _IVHD_FLAG_COH@GOTPAGE
Lloh37:
	ldr	x10, [x10, _IVHD_FLAG_COH@GOTPAGEOFF]
Lloh38:
	ldr	w10, [x10]
Lloh39:
	adrp	x11, _AMDVI_CTRL_COH@GOTPAGE
Lloh40:
	ldr	x11, [x11, _AMDVI_CTRL_COH@GOTPAGEOFF]
Lloh41:
	ldr	w11, [x11]
	tst	w10, w9
	csel	w10, wzr, w11, eq
	orr	w8, w8, w10
Lloh42:
	adrp	x10, _IVHD_FLAG_HTT@GOTPAGE
Lloh43:
	ldr	x10, [x10, _IVHD_FLAG_HTT@GOTPAGEOFF]
Lloh44:
	ldr	w10, [x10]
Lloh45:
	adrp	x11, _AMDVI_CTRL_HTT@GOTPAGE
Lloh46:
	ldr	x11, [x11, _AMDVI_CTRL_HTT@GOTPAGEOFF]
Lloh47:
	ldr	w11, [x11]
	tst	w10, w9
	csel	w10, wzr, w11, eq
	orr	w8, w8, w10
	ldr	w10, [x23]
	ldr	w11, [x25]
	tst	w10, w9
	csel	w10, wzr, w11, eq
	orr	w8, w8, w10
	ldr	w10, [x20]
	ldr	w11, [x26]
	tst	w10, w9
	csel	w10, wzr, w11, eq
	orr	w8, w8, w10
	ldr	w10, [x27]
	ldr	w11, [x28]
	tst	w10, w9
	csel	w9, wzr, w11, eq
	orr	w8, w8, w9
	str	w8, [x22, #4]
	add	x24, x24, #1
	ldrsw	x8, [x19]
	cmp	x24, x8
	b.lt	LBB0_2
LBB0_3:
	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
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh45, Lloh46, Lloh47
	.loh AdrpLdrGotLdr	Lloh42, Lloh43, Lloh44
	.loh AdrpLdrGotLdr	Lloh39, Lloh40, Lloh41
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_ivhd_count,4,2                 ; @ivhd_count
	.comm	_ivhd_devs,8,3                  ; @ivhd_devs
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"softc is NULL\n"

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

	.comm	_AMDVI_CTRL_EN,4,2              ; @AMDVI_CTRL_EN
	.comm	_AMDVI_CTRL_CMD,4,2             ; @AMDVI_CTRL_CMD
	.comm	_AMDVI_CTRL_ELOG,4,2            ; @AMDVI_CTRL_ELOG
	.comm	_AMDVI_CTRL_ELOGINT,4,2         ; @AMDVI_CTRL_ELOGINT
	.comm	_AMDVI_CTRL_INV_TO_1S,4,2       ; @AMDVI_CTRL_INV_TO_1S
	.comm	_IVHD_FLAG_COH,4,2              ; @IVHD_FLAG_COH
	.comm	_AMDVI_CTRL_COH,4,2             ; @AMDVI_CTRL_COH
	.comm	_IVHD_FLAG_HTT,4,2              ; @IVHD_FLAG_HTT
	.comm	_AMDVI_CTRL_HTT,4,2             ; @AMDVI_CTRL_HTT
	.comm	_IVHD_FLAG_RPPW,4,2             ; @IVHD_FLAG_RPPW
	.comm	_AMDVI_CTRL_RPPW,4,2            ; @AMDVI_CTRL_RPPW
	.comm	_IVHD_FLAG_PPW,4,2              ; @IVHD_FLAG_PPW
	.comm	_AMDVI_CTRL_PPW,4,2             ; @AMDVI_CTRL_PPW
	.comm	_IVHD_FLAG_ISOC,4,2             ; @IVHD_FLAG_ISOC
	.comm	_AMDVI_CTRL_ISOC,4,2            ; @AMDVI_CTRL_ISOC
	.no_dead_strip	_amdvi_enable
.subsections_via_symbols
