	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_hdmi_phy_configure             ## -- Begin function hdmi_phy_configure
	.p2align	4, 0x90
_hdmi_phy_configure:                    ## @hdmi_phy_configure
	.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	%rdx, %r15
	movq	%rsi, %r14
	movq	%rdi, %rbx
	movl	(%rdi), %edi
	movq	_HDMI_TXPHY_TX_CTRL@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	callq	_hdmi_read_reg
	movq	8(%rbx), %rax
	cmpq	$0, 16(%rax)
	je	LBB0_2
## %bb.1:
	movl	(%rbx), %edi
	movq	_HDMI_TXPHY_BIST_CONTROL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$1, %edx
	movl	$11, %ecx
	movl	$11, %r8d
	callq	_REG_FLD_MOD
LBB0_2:
	xorl	%edx, %edx
	cmpq	%r15, %r14
	jne	LBB0_4
## %bb.3:
	movabsq	$-3689348814741910323, %rcx     ## imm = 0xCCCCCCCCCCCCCCCD
	movq	%r14, %rax
	mulq	%rcx
	shrq	$3, %rdx
	movq	8(%rbx), %rax
	cmpq	(%rax), %rdx
	movl	$2, %edx
	sbbl	$0, %edx
LBB0_4:
	movl	(%rbx), %edi
	movl	(%r12), %esi
	movl	$31, %ecx
	movl	$30, %r8d
	callq	_REG_FLD_MOD
	movl	(%rbx), %edi
	movq	_HDMI_TXPHY_DIGITAL_CTRL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$-268435456, %edx               ## imm = 0xF0000000
	callq	_hdmi_write_reg
	movq	8(%rbx), %rax
	cmpq	$0, 8(%rax)
	je	LBB0_6
## %bb.5:
	movl	(%rbx), %edi
	movq	_HDMI_TXPHY_POWER_CTRL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$11, %edx
	movl	$3, %ecx
	xorl	%r8d, %r8d
	callq	_REG_FLD_MOD
LBB0_6:
	movq	%rbx, %rdi
	callq	_hdmi_phy_configure_lanes
	xorl	%eax, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_HDMI_TXPHY_TX_CTRL,4,2         ## @HDMI_TXPHY_TX_CTRL
	.comm	_HDMI_TXPHY_BIST_CONTROL,4,2    ## @HDMI_TXPHY_BIST_CONTROL
	.comm	_HDMI_TXPHY_DIGITAL_CTRL,4,2    ## @HDMI_TXPHY_DIGITAL_CTRL
	.comm	_HDMI_TXPHY_POWER_CTRL,4,2      ## @HDMI_TXPHY_POWER_CTRL
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_hdmi_phy_configure             ; -- Begin function hdmi_phy_configure
	.p2align	2
_hdmi_phy_configure:                    ; @hdmi_phy_configure
	.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	x21, x2
	mov	x20, x1
	mov	x19, x0
	ldr	w0, [x0]
Lloh0:
	adrp	x22, _HDMI_TXPHY_TX_CTRL@GOTPAGE
Lloh1:
	ldr	x22, [x22, _HDMI_TXPHY_TX_CTRL@GOTPAGEOFF]
	ldr	w1, [x22]
	bl	_hdmi_read_reg
	ldr	x8, [x19, #8]
	ldr	x8, [x8, #16]
	cbz	x8, LBB0_2
; %bb.1:
	ldr	w0, [x19]
Lloh2:
	adrp	x8, _HDMI_TXPHY_BIST_CONTROL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _HDMI_TXPHY_BIST_CONTROL@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	mov	w2, #1
	mov	w3, #11
	mov	w4, #11
	bl	_REG_FLD_MOD
LBB0_2:
	cmp	x20, x21
	b.ne	LBB0_4
; %bb.3:
	mov	x8, #-3689348814741910324
	movk	x8, #52429
	umulh	x8, x20, x8
	ldr	x9, [x19, #8]
	ldr	x9, [x9]
	cmp	x9, x8, lsr #3
	mov	w8, #1
	cinc	w2, w8, ls
	b	LBB0_5
LBB0_4:
	mov	w2, #0
LBB0_5:
	ldr	w0, [x19]
	ldr	w1, [x22]
	mov	w3, #31
	mov	w4, #30
	bl	_REG_FLD_MOD
	ldr	w0, [x19]
Lloh5:
	adrp	x8, _HDMI_TXPHY_DIGITAL_CTRL@GOTPAGE
Lloh6:
	ldr	x8, [x8, _HDMI_TXPHY_DIGITAL_CTRL@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	mov	w2, #-268435456
	bl	_hdmi_write_reg
	ldr	x8, [x19, #8]
	ldr	x8, [x8, #8]
	cbz	x8, LBB0_7
; %bb.6:
	ldr	w0, [x19]
Lloh8:
	adrp	x8, _HDMI_TXPHY_POWER_CTRL@GOTPAGE
Lloh9:
	ldr	x8, [x8, _HDMI_TXPHY_POWER_CTRL@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	mov	w2, #11
	mov	w3, #3
	mov	w4, #0
	bl	_REG_FLD_MOD
LBB0_7:
	mov	x0, x19
	bl	_hdmi_phy_configure_lanes
	mov	w0, #0
	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	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_HDMI_TXPHY_TX_CTRL,4,2         ; @HDMI_TXPHY_TX_CTRL
	.comm	_HDMI_TXPHY_BIST_CONTROL,4,2    ; @HDMI_TXPHY_BIST_CONTROL
	.comm	_HDMI_TXPHY_DIGITAL_CTRL,4,2    ; @HDMI_TXPHY_DIGITAL_CTRL
	.comm	_HDMI_TXPHY_POWER_CTRL,4,2      ; @HDMI_TXPHY_POWER_CTRL
.subsections_via_symbols
