	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sti_hqvdp_disable
_sti_hqvdp_disable:                     ## @sti_hqvdp_disable
	.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	%rdi, %r14
	addq	$4, %rdi
	callq	_sti_plane_to_str
	leaq	L_.str(%rip), %rdi
	xorl	%ebx, %ebx
	movl	%eax, %esi
	xorl	%eax, %eax
	callq	_DRM_DEBUG_DRIVER
	movl	28(%r14), %edi
	leaq	24(%r14), %rsi
	callq	_sti_vtg_unregister_client
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	leaq	L_.str.1(%rip), %rdi
	xorl	%eax, %eax
	callq	_DRM_DEBUG_DRIVER
LBB0_2:
	movq	_HQVDP_MBX_NEXT_CMD@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	16(%r14), %rsi
	xorl	%edi, %edi
	callq	_writel
	movq	_POLL_MAX_ATTEMPT@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	jle	LBB0_6
## %bb.3:
	xorl	%ebx, %ebx
	movq	_HQVDP_MBX_INFO_XP70@GOTPCREL(%rip), %r12
	movq	_INFO_XP70_FW_READY@GOTPCREL(%rip), %r13
	movq	_POLL_DELAY_MS@GOTPCREL(%rip), %r15
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r12), %rdi
	addq	16(%r14), %rdi
	callq	_readl
	testl	%eax, (%r13)
	jne	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	movl	(%r15), %edi
	callq	_msleep
	incl	%ebx
	movq	_POLL_MAX_ATTEMPT@GOTPCREL(%rip), %rax
	cmpl	(%rax), %ebx
	jl	LBB0_4
LBB0_6:
	movl	8(%r14), %edi
	callq	_clk_disable_unprepare
	movq	_POLL_MAX_ATTEMPT@GOTPCREL(%rip), %rax
	cmpl	(%rax), %ebx
	jne	LBB0_8
## %bb.7:
	leaq	L_.str.2(%rip), %rdi
	callq	_DRM_ERROR
LBB0_8:
	movq	_STI_PLANE_DISABLED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 4(%r14)
	movl	$0, (%r14)
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s\n"

L_.str.1:                               ## @.str.1
	.asciz	"Warning: cannot unregister VTG notifier\n"

	.comm	_HQVDP_MBX_NEXT_CMD,8,3         ## @HQVDP_MBX_NEXT_CMD
	.comm	_POLL_MAX_ATTEMPT,4,2           ## @POLL_MAX_ATTEMPT
	.comm	_HQVDP_MBX_INFO_XP70,8,3        ## @HQVDP_MBX_INFO_XP70
	.comm	_INFO_XP70_FW_READY,4,2         ## @INFO_XP70_FW_READY
	.comm	_POLL_DELAY_MS,4,2              ## @POLL_DELAY_MS
L_.str.2:                               ## @.str.2
	.asciz	"XP70 could not revert to idle\n"

	.comm	_STI_PLANE_DISABLED,4,2         ## @STI_PLANE_DISABLED
	.no_dead_strip	_sti_hqvdp_disable
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sti_hqvdp_disable
_sti_hqvdp_disable:                     ; @sti_hqvdp_disable
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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	x19, x0
	add	x0, x0, #4
	bl	_sti_plane_to_str
                                        ; kill: def $w0 killed $w0 def $x0
	str	x0, [sp]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DRM_DEBUG_DRIVER
	ldr	w0, [x19, #28]
	add	x1, x19, #24
	bl	_sti_vtg_unregister_client
	cbz	x0, LBB0_2
; %bb.1:
Lloh2:
	adrp	x0, l_.str.1@PAGE
Lloh3:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_DRM_DEBUG_DRIVER
LBB0_2:
	ldr	x8, [x19, #16]
Lloh4:
	adrp	x9, _HQVDP_MBX_NEXT_CMD@GOTPAGE
Lloh5:
	ldr	x9, [x9, _HQVDP_MBX_NEXT_CMD@GOTPAGEOFF]
Lloh6:
	ldr	x9, [x9]
	add	x1, x9, x8
	mov	w0, #0
	bl	_writel
Lloh7:
	adrp	x20, _POLL_MAX_ATTEMPT@GOTPAGE
Lloh8:
	ldr	x20, [x20, _POLL_MAX_ATTEMPT@GOTPAGEOFF]
	ldr	w8, [x20]
	cmp	w8, #1
	b.lt	LBB0_6
; %bb.3:
	mov	w21, #0
Lloh9:
	adrp	x22, _HQVDP_MBX_INFO_XP70@GOTPAGE
Lloh10:
	ldr	x22, [x22, _HQVDP_MBX_INFO_XP70@GOTPAGEOFF]
Lloh11:
	adrp	x23, _INFO_XP70_FW_READY@GOTPAGE
Lloh12:
	ldr	x23, [x23, _INFO_XP70_FW_READY@GOTPAGEOFF]
Lloh13:
	adrp	x24, _POLL_DELAY_MS@GOTPAGE
Lloh14:
	ldr	x24, [x24, _POLL_DELAY_MS@GOTPAGEOFF]
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #16]
	ldr	x9, [x22]
	add	x0, x9, x8
	bl	_readl
	ldr	w8, [x23]
	tst	w8, w0
	b.ne	LBB0_7
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	w0, [x24]
	bl	_msleep
	add	w21, w21, #1
	ldr	w8, [x20]
	cmp	w21, w8
	b.lt	LBB0_4
	b	LBB0_7
LBB0_6:
	mov	w21, #0
LBB0_7:
	ldr	w0, [x19, #8]
	bl	_clk_disable_unprepare
	ldr	w8, [x20]
	cmp	w21, w8
	b.ne	LBB0_9
; %bb.8:
Lloh15:
	adrp	x0, l_.str.2@PAGE
Lloh16:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_DRM_ERROR
LBB0_9:
Lloh17:
	adrp	x8, _STI_PLANE_DISABLED@GOTPAGE
Lloh18:
	ldr	x8, [x8, _STI_PLANE_DISABLED@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
	stp	wzr, w8, [x19]
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s\n"

l_.str.1:                               ; @.str.1
	.asciz	"Warning: cannot unregister VTG notifier\n"

	.comm	_HQVDP_MBX_NEXT_CMD,8,3         ; @HQVDP_MBX_NEXT_CMD
	.comm	_POLL_MAX_ATTEMPT,4,2           ; @POLL_MAX_ATTEMPT
	.comm	_HQVDP_MBX_INFO_XP70,8,3        ; @HQVDP_MBX_INFO_XP70
	.comm	_INFO_XP70_FW_READY,4,2         ; @INFO_XP70_FW_READY
	.comm	_POLL_DELAY_MS,4,2              ; @POLL_DELAY_MS
l_.str.2:                               ; @.str.2
	.asciz	"XP70 could not revert to idle\n"

	.comm	_STI_PLANE_DISABLED,4,2         ; @STI_PLANE_DISABLED
	.no_dead_strip	_sti_hqvdp_disable
.subsections_via_symbols
