	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function dw_hdmi_phy_power_off
_dw_hdmi_phy_power_off:                 ## @dw_hdmi_phy_power_off
	.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
	movq	8(%rdi), %rax
	cmpl	$1, (%rax)
	jne	LBB0_1
## %bb.15:
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_dw_hdmi_phy_enable_tmds
	movq	%r14, %rdi
	movl	$1, %esi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_dw_hdmi_phy_enable_powerdown   ## TAILCALL
LBB0_1:
	xorl	%r15d, %r15d
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_dw_hdmi_phy_gen2_txpwron
	movq	_HDMI_PHY_STAT0@GOTPCREL(%rip), %r13
	movl	(%r13), %esi
	movq	%r14, %rdi
	callq	_hdmi_readb
	movl	%eax, %ebx
	movq	_HDMI_PHY_TX_PHY_LOCK@GOTPCREL(%rip), %r12
	movl	(%r12), %eax
	testl	%ebx, %eax
	je	LBB0_11
## %bb.2:
	movl	$1000, %edi                     ## imm = 0x3E8
	movl	$2000, %esi                     ## imm = 0x7D0
	callq	_usleep_range
	movl	(%r13), %esi
	movq	%r14, %rdi
	callq	_hdmi_readb
	movl	%eax, %ebx
	movl	(%r12), %eax
	testl	%ebx, %eax
	je	LBB0_3
## %bb.4:
	movl	$1000, %edi                     ## imm = 0x3E8
	movl	$2000, %esi                     ## imm = 0x7D0
	callq	_usleep_range
	movl	(%r13), %esi
	movq	%r14, %rdi
	callq	_hdmi_readb
	movl	%eax, %ebx
	movl	(%r12), %eax
	testl	%ebx, %eax
	je	LBB0_5
## %bb.6:
	movl	$1000, %edi                     ## imm = 0x3E8
	movl	$2000, %esi                     ## imm = 0x7D0
	callq	_usleep_range
	movl	(%r13), %esi
	movq	%r14, %rdi
	callq	_hdmi_readb
	movl	%eax, %ebx
	movl	(%r12), %eax
	testl	%ebx, %eax
	je	LBB0_7
## %bb.8:
	movl	$1000, %edi                     ## imm = 0x3E8
	movl	$2000, %esi                     ## imm = 0x7D0
	callq	_usleep_range
	movl	(%r13), %esi
	movq	%r14, %rdi
	callq	_hdmi_readb
	movl	%eax, %ebx
	movl	(%r12), %eax
	testl	%ebx, %eax
	je	LBB0_9
## %bb.10:
	movl	$1000, %edi                     ## imm = 0x3E8
	movl	$2000, %esi                     ## imm = 0x7D0
	callq	_usleep_range
	movl	(%r12), %eax
	movl	$5, %r15d
	jmp	LBB0_11
LBB0_3:
	movl	$1, %r15d
	jmp	LBB0_11
LBB0_5:
	movl	$2, %r15d
	jmp	LBB0_11
LBB0_7:
	movl	$3, %r15d
	jmp	LBB0_11
LBB0_9:
	movl	$4, %r15d
LBB0_11:
	movl	(%r14), %edi
	testl	%ebx, %eax
	je	LBB0_13
## %bb.12:
	leaq	L_.str(%rip), %rsi
	callq	_dev_warn
	jmp	LBB0_14
LBB0_13:
	leaq	L_.str.1(%rip), %rsi
	movl	%r15d, %edx
	callq	_dev_dbg
LBB0_14:
	movq	%r14, %rdi
	movl	$1, %esi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_dw_hdmi_phy_gen2_pddq          ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_HDMI_PHY_STAT0,4,2             ## @HDMI_PHY_STAT0
	.comm	_HDMI_PHY_TX_PHY_LOCK,4,2       ## @HDMI_PHY_TX_PHY_LOCK
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"PHY failed to power down\n"

L_.str.1:                               ## @.str.1
	.asciz	"PHY powered down in %u iterations\n"

	.no_dead_strip	_dw_hdmi_phy_power_off
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function dw_hdmi_phy_power_off
_dw_hdmi_phy_power_off:                 ; @dw_hdmi_phy_power_off
	.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	x8, [x0, #8]
	ldr	w8, [x8]
	cmp	w8, #1
	b.ne	LBB0_2
; %bb.1:
	mov	w1, #0
	bl	_dw_hdmi_phy_enable_tmds
	mov	x0, x19
	mov	w1, #1
	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	_dw_hdmi_phy_enable_powerdown
LBB0_2:
	mov	w1, #0
	bl	_dw_hdmi_phy_gen2_txpwron
Lloh0:
	adrp	x22, _HDMI_PHY_STAT0@GOTPAGE
Lloh1:
	ldr	x22, [x22, _HDMI_PHY_STAT0@GOTPAGEOFF]
	ldr	w1, [x22]
	mov	x0, x19
	bl	_hdmi_readb
Lloh2:
	adrp	x21, _HDMI_PHY_TX_PHY_LOCK@GOTPAGE
Lloh3:
	ldr	x21, [x21, _HDMI_PHY_TX_PHY_LOCK@GOTPAGEOFF]
	ldr	w8, [x21]
	tst	w8, w0
	b.eq	LBB0_8
; %bb.3:
	mov	w0, #1000
	mov	w1, #2000
	bl	_usleep_range
	ldr	w1, [x22]
	mov	x0, x19
	bl	_hdmi_readb
	ldr	w8, [x21]
	tst	w8, w0
	b.eq	LBB0_9
; %bb.4:
	mov	w0, #1000
	mov	w1, #2000
	bl	_usleep_range
	ldr	w1, [x22]
	mov	x0, x19
	bl	_hdmi_readb
	ldr	w8, [x21]
	tst	w8, w0
	b.eq	LBB0_10
; %bb.5:
	mov	w0, #1000
	mov	w1, #2000
	bl	_usleep_range
	ldr	w1, [x22]
	mov	x0, x19
	bl	_hdmi_readb
	ldr	w8, [x21]
	tst	w8, w0
	b.eq	LBB0_11
; %bb.6:
	mov	w0, #1000
	mov	w1, #2000
	bl	_usleep_range
	ldr	w1, [x22]
	mov	x0, x19
	bl	_hdmi_readb
	mov	x20, x0
	ldr	w8, [x21]
	tst	w8, w0
	b.eq	LBB0_12
; %bb.7:
	mov	w0, #1000
	mov	w1, #2000
	bl	_usleep_range
	ldr	w8, [x21]
	mov	w2, #5
	b	LBB0_13
LBB0_8:
	mov	x20, x0
	mov	w2, #0
	b	LBB0_13
LBB0_9:
	mov	x20, x0
	mov	w2, #1
	b	LBB0_13
LBB0_10:
	mov	x20, x0
	mov	w2, #2
	b	LBB0_13
LBB0_11:
	mov	x20, x0
	mov	w2, #3
	b	LBB0_13
LBB0_12:
	mov	w2, #4
LBB0_13:
	ldr	w0, [x19]
	tst	w8, w20
	b.eq	LBB0_15
; %bb.14:
Lloh4:
	adrp	x1, l_.str@PAGE
Lloh5:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_warn
	b	LBB0_16
LBB0_15:
Lloh6:
	adrp	x1, l_.str.1@PAGE
Lloh7:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_dev_dbg
LBB0_16:
	mov	x0, x19
	mov	w1, #1
	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	_dw_hdmi_phy_gen2_pddq
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_HDMI_PHY_STAT0,4,2             ; @HDMI_PHY_STAT0
	.comm	_HDMI_PHY_TX_PHY_LOCK,4,2       ; @HDMI_PHY_TX_PHY_LOCK
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"PHY failed to power down\n"

l_.str.1:                               ; @.str.1
	.asciz	"PHY powered down in %u iterations\n"

	.no_dead_strip	_dw_hdmi_phy_power_off
.subsections_via_symbols
