	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_msm_hdmi_hpd_enable            ## -- Begin function msm_hdmi_hpd_enable
	.p2align	4, 0x90
_msm_hdmi_hpd_enable:                   ## @msm_hdmi_hpd_enable
	.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
	callq	_to_hdmi_connector
	movq	(%rax), %r14
	movq	16(%r14), %r15
	movq	24(%r14), %r12
	cmpl	$0, (%r12)
	jle	LBB0_5
## %bb.1:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%r14), %rax
	movl	(%rax,%rbx,4), %edi
	callq	_regulator_enable
	testl	%eax, %eax
	jne	LBB0_3
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	incq	%rbx
	movslq	(%r12), %rax
	cmpq	%rax, %rbx
	jl	LBB0_2
LBB0_5:
	movq	%r15, %rdi
	callq	_pinctrl_pm_select_default_state
	testl	%eax, %eax
	je	LBB0_8
## %bb.6:
	movl	%eax, %r13d
	leaq	L_.str.1(%rip), %rsi
	jmp	LBB0_7
LBB0_3:
	movl	%eax, %r13d
	movq	8(%r12), %rax
	movl	(%rax,%rbx,4), %edx
	leaq	L_.str(%rip), %rsi
	movq	%r15, %rdi
	movl	%r13d, %ecx
	xorl	%eax, %eax
	callq	_DRM_DEV_ERROR
	jmp	LBB0_11
LBB0_8:
	movq	%r14, %rdi
	movl	$1, %esi
	callq	_gpio_config
	testl	%eax, %eax
	je	LBB0_10
## %bb.9:
	movl	%eax, %r13d
	leaq	L_.str.2(%rip), %rsi
LBB0_7:
	movq	%r15, %rdi
	movl	%r13d, %edx
	xorl	%eax, %eax
	callq	_DRM_DEV_ERROR
LBB0_11:
	movl	%r13d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_10:
	movq	%r15, %rdi
	callq	_pm_runtime_get_sync
	movq	%r14, %rdi
	movl	$1, %esi
	callq	_enable_hpd_clocks
	xorl	%r13d, %r13d
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_msm_hdmi_set_mode
	movq	%r14, %rdi
	callq	_msm_hdmi_phy_reset
	movq	%r14, %rdi
	movl	$1, %esi
	callq	_msm_hdmi_set_mode
	movq	_REG_HDMI_USEC_REFTIMER@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	movl	$65563, %edx                    ## imm = 0x1001B
	callq	_hdmi_write
	movq	_REG_HDMI_HPD_INT_CTRL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_HDMI_HPD_INT_CTRL_INT_CONNECT@GOTPCREL(%rip), %rax
	movq	_HDMI_HPD_INT_CTRL_INT_EN@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	orl	(%rax), %edx
	movq	%r14, %rdi
	callq	_hdmi_write
	movq	%r14, %rdi
	callq	_spin_lock_irqsave
	movq	_REG_HDMI_HPD_CTRL@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	movq	%r14, %rdi
	callq	_hdmi_read
	movl	%eax, %r15d
	movl	$8191, %edi                     ## imm = 0x1FFF
	callq	_HDMI_HPD_CTRL_TIMEOUT
	orl	%eax, %r15d
	movl	(%r12), %esi
	movq	_HDMI_HPD_CTRL_ENABLE@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edx
	notl	%edx
	andl	%r15d, %edx
	movq	%r14, %rdi
	callq	_hdmi_write
	movl	(%r12), %esi
	orl	(%rbx), %r15d
	movq	%r14, %rdi
	movl	%r15d, %edx
	callq	_hdmi_write
	movq	%r14, %rdi
	callq	_spin_unlock_irqrestore
	jmp	LBB0_11
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"failed to enable hpd regulator: %s (%d)\n"

L_.str.1:                               ## @.str.1
	.asciz	"pinctrl state chg failed: %d\n"

L_.str.2:                               ## @.str.2
	.asciz	"failed to configure GPIOs: %d\n"

	.comm	_REG_HDMI_USEC_REFTIMER,4,2     ## @REG_HDMI_USEC_REFTIMER
	.comm	_REG_HDMI_HPD_INT_CTRL,4,2      ## @REG_HDMI_HPD_INT_CTRL
	.comm	_HDMI_HPD_INT_CTRL_INT_CONNECT,4,2 ## @HDMI_HPD_INT_CTRL_INT_CONNECT
	.comm	_HDMI_HPD_INT_CTRL_INT_EN,4,2   ## @HDMI_HPD_INT_CTRL_INT_EN
	.comm	_REG_HDMI_HPD_CTRL,4,2          ## @REG_HDMI_HPD_CTRL
	.comm	_HDMI_HPD_CTRL_ENABLE,4,2       ## @HDMI_HPD_CTRL_ENABLE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_msm_hdmi_hpd_enable            ; -- Begin function msm_hdmi_hpd_enable
	.p2align	2
_msm_hdmi_hpd_enable:                   ; @msm_hdmi_hpd_enable
	.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
	bl	_to_hdmi_connector
	ldr	x19, [x0]
	ldp	x20, x22, [x19, #16]
	ldr	w8, [x22]
	cmp	w8, #1
	b.lt	LBB0_4
; %bb.1:
	mov	x23, #0
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #8]
	ldr	w0, [x8, x23, lsl #2]
	bl	_regulator_enable
	cbnz	w0, LBB0_6
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	add	x23, x23, #1
	ldrsw	x8, [x22]
	cmp	x23, x8
	b.lt	LBB0_2
LBB0_4:
	mov	x0, x20
	bl	_pinctrl_pm_select_default_state
	cbz	w0, LBB0_7
; %bb.5:
	mov	x21, x0
Lloh0:
	adrp	x1, l_.str.1@PAGE
Lloh1:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_9
LBB0_6:
	mov	x21, x0
	ldr	x8, [x22, #8]
	ldr	w2, [x8, x23, lsl #2]
	str	x21, [sp]
Lloh2:
	adrp	x1, l_.str@PAGE
Lloh3:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	b	LBB0_10
LBB0_7:
	mov	x0, x19
	mov	w1, #1
	bl	_gpio_config
	cbz	w0, LBB0_12
; %bb.8:
	mov	x21, x0
Lloh4:
	adrp	x1, l_.str.2@PAGE
Lloh5:
	add	x1, x1, l_.str.2@PAGEOFF
LBB0_9:
	mov	x0, x20
	mov	x2, x21
LBB0_10:
	bl	_DRM_DEV_ERROR
LBB0_11:
	mov	x0, x21
	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
LBB0_12:
	mov	x0, x20
	bl	_pm_runtime_get_sync
	mov	x0, x19
	mov	w1, #1
	bl	_enable_hpd_clocks
	mov	x0, x19
	mov	w1, #0
	bl	_msm_hdmi_set_mode
	mov	x0, x19
	bl	_msm_hdmi_phy_reset
	mov	x0, x19
	mov	w1, #1
	bl	_msm_hdmi_set_mode
Lloh6:
	adrp	x8, _REG_HDMI_USEC_REFTIMER@GOTPAGE
Lloh7:
	ldr	x8, [x8, _REG_HDMI_USEC_REFTIMER@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #27
	movk	w2, #1, lsl #16
	bl	_hdmi_write
Lloh9:
	adrp	x8, _REG_HDMI_HPD_INT_CTRL@GOTPAGE
Lloh10:
	ldr	x8, [x8, _REG_HDMI_HPD_INT_CTRL@GOTPAGEOFF]
Lloh11:
	adrp	x9, _HDMI_HPD_INT_CTRL_INT_CONNECT@GOTPAGE
Lloh12:
	ldr	x9, [x9, _HDMI_HPD_INT_CTRL_INT_CONNECT@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
Lloh14:
	ldr	w8, [x9]
Lloh15:
	adrp	x9, _HDMI_HPD_INT_CTRL_INT_EN@GOTPAGE
Lloh16:
	ldr	x9, [x9, _HDMI_HPD_INT_CTRL_INT_EN@GOTPAGEOFF]
Lloh17:
	ldr	w9, [x9]
	orr	w2, w9, w8
	mov	x0, x19
	bl	_hdmi_write
	mov	x0, x19
	bl	_spin_lock_irqsave
Lloh18:
	adrp	x21, _REG_HDMI_HPD_CTRL@GOTPAGE
Lloh19:
	ldr	x21, [x21, _REG_HDMI_HPD_CTRL@GOTPAGEOFF]
	ldr	w1, [x21]
	mov	x0, x19
	bl	_hdmi_read
	mov	x20, x0
	mov	w0, #8191
	bl	_HDMI_HPD_CTRL_TIMEOUT
	orr	w20, w0, w20
	ldr	w1, [x21]
Lloh20:
	adrp	x22, _HDMI_HPD_CTRL_ENABLE@GOTPAGE
Lloh21:
	ldr	x22, [x22, _HDMI_HPD_CTRL_ENABLE@GOTPAGEOFF]
	ldr	w8, [x22]
	bic	w2, w20, w8
	mov	x0, x19
	bl	_hdmi_write
	ldr	w1, [x21]
	ldr	w8, [x22]
	orr	w2, w8, w20
	mov	x0, x19
	bl	_hdmi_write
	mov	x0, x19
	bl	_spin_unlock_irqrestore
	mov	w21, #0
	b	LBB0_11
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh13
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"failed to enable hpd regulator: %s (%d)\n"

l_.str.1:                               ; @.str.1
	.asciz	"pinctrl state chg failed: %d\n"

l_.str.2:                               ; @.str.2
	.asciz	"failed to configure GPIOs: %d\n"

	.comm	_REG_HDMI_USEC_REFTIMER,4,2     ; @REG_HDMI_USEC_REFTIMER
	.comm	_REG_HDMI_HPD_INT_CTRL,4,2      ; @REG_HDMI_HPD_INT_CTRL
	.comm	_HDMI_HPD_INT_CTRL_INT_CONNECT,4,2 ; @HDMI_HPD_INT_CTRL_INT_CONNECT
	.comm	_HDMI_HPD_INT_CTRL_INT_EN,4,2   ; @HDMI_HPD_INT_CTRL_INT_EN
	.comm	_REG_HDMI_HPD_CTRL,4,2          ; @REG_HDMI_HPD_CTRL
	.comm	_HDMI_HPD_CTRL_ENABLE,4,2       ; @HDMI_HPD_CTRL_ENABLE
.subsections_via_symbols
