	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_hdmi_wp_video_stop             ## -- Begin function hdmi_wp_video_stop
	.p2align	4, 0x90
_hdmi_wp_video_stop:                    ## @hdmi_wp_video_stop
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	movl	(%rdi), %edi
	movq	_HDMI_WP_IRQSTATUS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_HDMI_IRQ_VIDEO_FRAME_DONE@GOTPCREL(%rip), %r14
	movl	(%r14), %edx
	callq	_hdmi_write_reg
	movl	(%r15), %edi
	movq	_HDMI_WP_VIDEO_CFG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%edx, %edx
	movl	$31, %ecx
	movl	$31, %r8d
	callq	_REG_FLD_MOD
	movl	$50, %ebx
	movq	_HDMI_WP_IRQSTATUS_RAW@GOTPCREL(%rip), %r12
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movl	$20, %edi
	callq	_msleep
	movl	(%r15), %edi
	movl	(%r12), %esi
	callq	_hdmi_read_reg
	testl	%eax, (%r14)
	jne	LBB0_3
## %bb.1:                               ##   in Loop: Header=BB0_2 Depth=1
	decl	%ebx
	jne	LBB0_2
## %bb.4:
	leaq	L_.str(%rip), %rdi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_DSSERR                         ## TAILCALL
LBB0_3:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_HDMI_WP_IRQSTATUS,4,2          ## @HDMI_WP_IRQSTATUS
	.comm	_HDMI_IRQ_VIDEO_FRAME_DONE,4,2  ## @HDMI_IRQ_VIDEO_FRAME_DONE
	.comm	_HDMI_WP_VIDEO_CFG,4,2          ## @HDMI_WP_VIDEO_CFG
	.comm	_HDMI_WP_IRQSTATUS_RAW,4,2      ## @HDMI_WP_IRQSTATUS_RAW
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"no HDMI FRAMEDONE when disabling output\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_hdmi_wp_video_stop             ; -- Begin function hdmi_wp_video_stop
	.p2align	2
_hdmi_wp_video_stop:                    ; @hdmi_wp_video_stop
	.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
	mov	x19, x0
	ldr	w0, [x0]
Lloh0:
	adrp	x8, _HDMI_WP_IRQSTATUS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _HDMI_WP_IRQSTATUS@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
Lloh3:
	adrp	x20, _HDMI_IRQ_VIDEO_FRAME_DONE@GOTPAGE
Lloh4:
	ldr	x20, [x20, _HDMI_IRQ_VIDEO_FRAME_DONE@GOTPAGEOFF]
	ldr	w2, [x20]
	bl	_hdmi_write_reg
	ldr	w0, [x19]
Lloh5:
	adrp	x8, _HDMI_WP_VIDEO_CFG@GOTPAGE
Lloh6:
	ldr	x8, [x8, _HDMI_WP_VIDEO_CFG@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	mov	w2, #0
	mov	w3, #31
	mov	w4, #31
	bl	_REG_FLD_MOD
	mov	w21, #50
Lloh8:
	adrp	x22, _HDMI_WP_IRQSTATUS_RAW@GOTPAGE
Lloh9:
	ldr	x22, [x22, _HDMI_WP_IRQSTATUS_RAW@GOTPAGEOFF]
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	mov	w0, #20
	bl	_msleep
	ldr	w0, [x19]
	ldr	w1, [x22]
	bl	_hdmi_read_reg
	ldr	w8, [x20]
	tst	w8, w0
	b.ne	LBB0_4
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	subs	w21, w21, #1
	b.ne	LBB0_1
; %bb.3:
Lloh10:
	adrp	x0, l_.str@PAGE
Lloh11:
	add	x0, x0, l_.str@PAGEOFF
	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
	b	_DSSERR
LBB0_4:
	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	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_HDMI_WP_IRQSTATUS,4,2          ; @HDMI_WP_IRQSTATUS
	.comm	_HDMI_IRQ_VIDEO_FRAME_DONE,4,2  ; @HDMI_IRQ_VIDEO_FRAME_DONE
	.comm	_HDMI_WP_VIDEO_CFG,4,2          ; @HDMI_WP_VIDEO_CFG
	.comm	_HDMI_WP_IRQSTATUS_RAW,4,2      ; @HDMI_WP_IRQSTATUS_RAW
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"no HDMI FRAMEDONE when disabling output\n"

.subsections_via_symbols
