	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hdmiphy_conf_apply
_hdmiphy_conf_apply:                    ## @hdmiphy_conf_apply
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %rbx
	movq	16(%rdi), %rax
	movq	(%rax), %rax
	imull	$1000, (%rax), %esi             ## imm = 0x3E8
	callq	_hdmi_find_phy_conf
	testl	%eax, %eax
	js	LBB0_1
## %bb.3:
	movq	8(%rbx), %rcx
	movq	(%rcx), %rcx
	movl	%eax, %eax
	movq	(%rcx,%rax,8), %r14
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_hdmi_clk_set_parents
	movq	%rbx, %rdi
	callq	_hdmiphy_conf_reset
	movq	%rbx, %rdi
	movl	$1, %esi
	callq	_hdmiphy_enable_mode_set
	movq	%rbx, %rdi
	xorl	%esi, %esi
	movq	%r14, %rdx
	movl	$32, %ecx
	callq	_hdmiphy_reg_write_buf
	testl	%eax, %eax
	je	LBB0_5
## %bb.4:
	movl	(%rbx), %edi
	leaq	L_.str.1(%rip), %rsi
	jmp	LBB0_2
LBB0_1:
	movl	(%rbx), %edi
	leaq	L_.str(%rip), %rsi
LBB0_2:
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_DRM_DEV_ERROR                  ## TAILCALL
LBB0_5:
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_hdmiphy_enable_mode_set
	movq	%rbx, %rdi
	movl	$1, %esi
	callq	_hdmi_clk_set_parents
	movl	$10000, %edi                    ## imm = 0x2710
	movl	$12000, %esi                    ## imm = 0x2EE0
	callq	_usleep_range
	movq	%rbx, %rdi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_hdmiphy_wait_for_pll           ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"failed to find hdmiphy conf\n"

L_.str.1:                               ## @.str.1
	.asciz	"failed to configure hdmiphy\n"

	.no_dead_strip	_hdmiphy_conf_apply
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function hdmiphy_conf_apply
_hdmiphy_conf_apply:                    ; @hdmiphy_conf_apply
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	ldr	x8, [x0, #16]
	ldr	x8, [x8]
	ldr	w8, [x8]
	mov	w9, #1000
	mul	w1, w8, w9
	bl	_hdmi_find_phy_conf
	tbnz	w0, #31, LBB0_3
; %bb.1:
	ldr	x8, [x19, #8]
	ldr	x8, [x8]
	ldr	x20, [x8, w0, uxtw #3]
	mov	x0, x19
	mov	w1, #0
	bl	_hdmi_clk_set_parents
	mov	x0, x19
	bl	_hdmiphy_conf_reset
	mov	x0, x19
	mov	w1, #1
	bl	_hdmiphy_enable_mode_set
	mov	x0, x19
	mov	w1, #0
	mov	x2, x20
	mov	w3, #32
	bl	_hdmiphy_reg_write_buf
	cbz	w0, LBB0_5
; %bb.2:
	ldr	w0, [x19]
Lloh0:
	adrp	x1, l_.str.1@PAGE
Lloh1:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_4
LBB0_3:
	ldr	w0, [x19]
Lloh2:
	adrp	x1, l_.str@PAGE
Lloh3:
	add	x1, x1, l_.str@PAGEOFF
LBB0_4:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_DRM_DEV_ERROR
LBB0_5:
	mov	x0, x19
	mov	w1, #0
	bl	_hdmiphy_enable_mode_set
	mov	x0, x19
	mov	w1, #1
	bl	_hdmi_clk_set_parents
	mov	w0, #10000
	mov	w1, #12000
	bl	_usleep_range
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_hdmiphy_wait_for_pll
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"failed to find hdmiphy conf\n"

l_.str.1:                               ; @.str.1
	.asciz	"failed to configure hdmiphy\n"

	.no_dead_strip	_hdmiphy_conf_apply
.subsections_via_symbols
