	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function intel_dp_init_panel_power_sequencer_registers
_intel_dp_init_panel_power_sequencer_registers: ## @intel_dp_init_panel_power_sequencer_registers
	.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
	subq	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %ebx
	movq	%rdi, %r12
	callq	_dp_to_i915
	movq	%rax, %r15
	movslq	(%rax), %rax
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	movq	%r12, %rdi
	callq	_dp_to_dig_port
	movl	(%rax), %eax
	movl	%eax, -60(%rbp)                 ## 4-byte Spill
	movq	%r15, %rdi
	addq	$4, %rdi
	callq	_lockdep_assert_held
	leaq	-56(%rbp), %rsi
	movq	%r12, %rdi
	callq	_intel_pps_get_registers
	testl	%ebx, %ebx
	je	LBB0_4
## %bb.1:
	movq	%r12, %rdi
	callq	_ironlake_get_pp_control
	movl	%eax, %ebx
	movq	_PANEL_POWER_ON@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	andl	%ebx, %edi
	leaq	L_.str(%rip), %rsi
	callq	_WARN
	movq	_EDP_FORCE_VDD@GOTPCREL(%rip), %r14
	movl	(%r14), %eax
	testl	%ebx, %eax
	je	LBB0_3
## %bb.2:
	leaq	L_.str.1(%rip), %rdi
	xorl	%eax, %eax
	callq	_DRM_DEBUG_KMS
	movl	(%r14), %eax
LBB0_3:
	notl	%eax
	andl	%eax, %ebx
	movl	-56(%rbp), %edi
	movl	%ebx, %esi
	callq	_I915_WRITE
LBB0_4:
	movq	_PANEL_POWER_UP_DELAY_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	(%r12), %esi
	callq	_REG_FIELD_PREP
	movl	%eax, %ebx
	movq	_PANEL_LIGHT_ON_DELAY_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	4(%r12), %esi
	callq	_REG_FIELD_PREP
	movl	%eax, %r14d
	orl	%ebx, %r14d
	movq	_PANEL_LIGHT_OFF_DELAY_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	8(%r12), %esi
	callq	_REG_FIELD_PREP
	movl	%eax, %ebx
	movq	_PANEL_POWER_DOWN_DELAY_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	12(%r12), %esi
	callq	_REG_FIELD_PREP
	movl	%eax, %r13d
	orl	%ebx, %r13d
	movq	%r15, %rdi
	callq	_IS_VALLEYVIEW
	testq	%rax, %rax
	jne	LBB0_6
## %bb.5:
	movq	%r15, %rdi
	callq	_IS_CHERRYVIEW
	testq	%rax, %rax
	je	LBB0_7
LBB0_6:
	movl	-60(%rbp), %edi                 ## 4-byte Reload
	callq	_PANEL_PORT_SELECT_VLV
LBB0_17:
	orl	%eax, %r14d
	movl	-44(%rbp), %edi
	movl	%r14d, %esi
	callq	_I915_WRITE
	movl	-48(%rbp), %edi
	movl	%r13d, %esi
	callq	_I915_WRITE
	movl	-52(%rbp), %edi
	callq	_i915_mmio_reg_valid
	testq	%rax, %rax
	je	LBB0_19
## %bb.18:
	imulq	$274877907, -72(%rbp), %rax     ## 8-byte Folded Reload
                                        ## imm = 0x10624DD3
	movq	%rax, %rcx
	shrq	$63, %rcx
	sarq	$38, %rax
	addl	%ecx, %eax
	movl	-52(%rbp), %r14d
	movq	_PP_REFERENCE_DIVIDER_MASK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	imull	$50, %eax, %esi
	decl	%esi
	callq	_REG_FIELD_PREP
	movl	%eax, %ebx
	movq	_PANEL_POWER_CYCLE_DELAY_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	movl	16(%r12), %edi
	movl	$1000, %esi                     ## imm = 0x3E8
	callq	_DIV_ROUND_UP
	movl	%r15d, %edi
	movl	%eax, %esi
	callq	_REG_FIELD_PREP
	orl	%eax, %ebx
	movl	%r14d, %edi
	jmp	LBB0_20
LBB0_19:
	movl	-56(%rbp), %edi
	callq	_I915_READ
	movq	_BXT_POWER_CYCLE_DELAY_MASK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r14d
	movl	%r14d, %ebx
	notl	%ebx
	andl	%eax, %ebx
	movl	16(%r12), %edi
	movl	$1000, %esi                     ## imm = 0x3E8
	callq	_DIV_ROUND_UP
	movl	%r14d, %edi
	movl	%eax, %esi
	callq	_REG_FIELD_PREP
	orl	%eax, %ebx
	movl	-56(%rbp), %edi
LBB0_20:
	movl	%ebx, %esi
	callq	_I915_WRITE
	movl	-44(%rbp), %edi
	callq	_I915_READ
	movl	%eax, %r14d
	movl	-48(%rbp), %edi
	callq	_I915_READ
	movl	%eax, %ebx
	movl	-52(%rbp), %edi
	callq	_i915_mmio_reg_valid
	testq	%rax, %rax
	je	LBB0_22
## %bb.21:
	movl	-52(%rbp), %edi
	callq	_I915_READ
	movl	%eax, %ecx
	jmp	LBB0_23
LBB0_22:
	movl	-56(%rbp), %edi
	callq	_I915_READ
	movl	%eax, %ecx
	movq	_BXT_POWER_CYCLE_DELAY_MASK@GOTPCREL(%rip), %rax
	andl	(%rax), %ecx
LBB0_23:
	leaq	L_.str.2(%rip), %rdi
	movl	%r14d, %esi
	movl	%ebx, %edx
	xorl	%eax, %eax
	callq	_DRM_DEBUG_KMS
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	movq	%r15, %rdi
	callq	_HAS_PCH_IBX
	testq	%rax, %rax
	jne	LBB0_9
## %bb.8:
	movq	%r15, %rdi
	callq	_HAS_PCH_CPT
	testq	%rax, %rax
	je	LBB0_16
LBB0_9:
	movl	-60(%rbp), %edi                 ## 4-byte Reload
	cmpl	$128, %edi
	je	LBB0_14
## %bb.10:
	cmpl	$129, %edi
	je	LBB0_13
## %bb.11:
	cmpl	$130, %edi
	jne	LBB0_15
## %bb.12:
	movq	_PANEL_PORT_SELECT_DPA@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	jmp	LBB0_17
LBB0_14:
	movq	_PANEL_PORT_SELECT_DPD@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	jmp	LBB0_17
LBB0_13:
	movq	_PANEL_PORT_SELECT_DPC@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	jmp	LBB0_17
LBB0_15:
	callq	_MISSING_CASE
LBB0_16:
	xorl	%eax, %eax
	jmp	LBB0_17
	.cfi_endproc
                                        ## -- End function
	.comm	_PANEL_POWER_ON,4,2             ## @PANEL_POWER_ON
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Panel power already on\n"

	.comm	_EDP_FORCE_VDD,4,2              ## @EDP_FORCE_VDD
L_.str.1:                               ## @.str.1
	.asciz	"VDD already on, disabling first\n"

	.comm	_PANEL_POWER_UP_DELAY_MASK,4,2  ## @PANEL_POWER_UP_DELAY_MASK
	.comm	_PANEL_LIGHT_ON_DELAY_MASK,4,2  ## @PANEL_LIGHT_ON_DELAY_MASK
	.comm	_PANEL_LIGHT_OFF_DELAY_MASK,4,2 ## @PANEL_LIGHT_OFF_DELAY_MASK
	.comm	_PANEL_POWER_DOWN_DELAY_MASK,4,2 ## @PANEL_POWER_DOWN_DELAY_MASK
	.comm	_PANEL_PORT_SELECT_DPA,4,2      ## @PANEL_PORT_SELECT_DPA
	.comm	_PANEL_PORT_SELECT_DPC,4,2      ## @PANEL_PORT_SELECT_DPC
	.comm	_PANEL_PORT_SELECT_DPD,4,2      ## @PANEL_PORT_SELECT_DPD
	.comm	_PP_REFERENCE_DIVIDER_MASK,4,2  ## @PP_REFERENCE_DIVIDER_MASK
	.comm	_PANEL_POWER_CYCLE_DELAY_MASK,4,2 ## @PANEL_POWER_CYCLE_DELAY_MASK
	.comm	_BXT_POWER_CYCLE_DELAY_MASK,4,2 ## @BXT_POWER_CYCLE_DELAY_MASK
L_.str.2:                               ## @.str.2
	.asciz	"panel power sequencer register settings: PP_ON %#x, PP_OFF %#x, PP_DIV %#x\n"

	.no_dead_strip	_intel_dp_init_panel_power_sequencer_registers
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function intel_dp_init_panel_power_sequencer_registers
_intel_dp_init_panel_power_sequencer_registers: ; @intel_dp_init_panel_power_sequencer_registers
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	mov	x22, x1
	mov	x19, x0
	bl	_dp_to_i915
	mov	x21, x0
	mov	x23, x0
	ldrsw	x24, [x23], #4
	mov	x0, x19
	bl	_dp_to_dig_port
	ldr	w20, [x0]
	mov	x0, x23
	bl	_lockdep_assert_held
	add	x1, sp, #32
	mov	x0, x19
	bl	_intel_pps_get_registers
	cbz	w22, LBB0_4
; %bb.1:
	mov	x0, x19
	bl	_ironlake_get_pp_control
	mov	x22, x0
Lloh0:
	adrp	x8, _PANEL_POWER_ON@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PANEL_POWER_ON@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	and	w0, w8, w0
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	bl	_WARN
Lloh5:
	adrp	x23, _EDP_FORCE_VDD@GOTPAGE
Lloh6:
	ldr	x23, [x23, _EDP_FORCE_VDD@GOTPAGEOFF]
	ldr	w8, [x23]
	tst	w8, w22
	b.eq	LBB0_3
; %bb.2:
Lloh7:
	adrp	x0, l_.str.1@PAGE
Lloh8:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_DRM_DEBUG_KMS
	ldr	w8, [x23]
LBB0_3:
	bic	w1, w22, w8
	ldr	w0, [sp, #32]
	bl	_I915_WRITE
LBB0_4:
Lloh9:
	adrp	x8, _PANEL_POWER_UP_DELAY_MASK@GOTPAGE
Lloh10:
	ldr	x8, [x8, _PANEL_POWER_UP_DELAY_MASK@GOTPAGEOFF]
Lloh11:
	ldr	w0, [x8]
	ldr	w1, [x19]
	bl	_REG_FIELD_PREP
	mov	x22, x0
Lloh12:
	adrp	x8, _PANEL_LIGHT_ON_DELAY_MASK@GOTPAGE
Lloh13:
	ldr	x8, [x8, _PANEL_LIGHT_ON_DELAY_MASK@GOTPAGEOFF]
Lloh14:
	ldr	w0, [x8]
	ldr	w1, [x19, #4]
	bl	_REG_FIELD_PREP
	orr	w23, w0, w22
Lloh15:
	adrp	x8, _PANEL_LIGHT_OFF_DELAY_MASK@GOTPAGE
Lloh16:
	ldr	x8, [x8, _PANEL_LIGHT_OFF_DELAY_MASK@GOTPAGEOFF]
Lloh17:
	ldr	w0, [x8]
	ldr	w1, [x19, #8]
	bl	_REG_FIELD_PREP
	mov	x22, x0
Lloh18:
	adrp	x8, _PANEL_POWER_DOWN_DELAY_MASK@GOTPAGE
Lloh19:
	ldr	x8, [x8, _PANEL_POWER_DOWN_DELAY_MASK@GOTPAGEOFF]
Lloh20:
	ldr	w0, [x8]
	ldr	w1, [x19, #12]
	bl	_REG_FIELD_PREP
	orr	w22, w0, w22
	mov	x0, x21
	bl	_IS_VALLEYVIEW
	cbnz	x0, LBB0_6
; %bb.5:
	mov	x0, x21
	bl	_IS_CHERRYVIEW
	cbz	x0, LBB0_14
LBB0_6:
	mov	x0, x20
	bl	_PANEL_PORT_SELECT_VLV
LBB0_7:
	orr	w1, w23, w0
	ldr	w0, [sp, #44]
	bl	_I915_WRITE
	ldr	w0, [sp, #40]
	mov	x1, x22
	bl	_I915_WRITE
	ldr	w0, [sp, #36]
	bl	_i915_mmio_reg_valid
	cbz	x0, LBB0_9
; %bb.8:
	mov	w8, #19923
	movk	w8, #4194, lsl #16
	mul	x8, x24, x8
	lsr	x9, x8, #63
	asr	x8, x8, #38
	add	w8, w8, w9
	ldr	w20, [sp, #36]
Lloh21:
	adrp	x9, _PP_REFERENCE_DIVIDER_MASK@GOTPAGE
Lloh22:
	ldr	x9, [x9, _PP_REFERENCE_DIVIDER_MASK@GOTPAGEOFF]
Lloh23:
	ldr	w0, [x9]
	mov	w9, #50
	mul	w8, w8, w9
	sub	w1, w8, #1
	bl	_REG_FIELD_PREP
	mov	x21, x0
Lloh24:
	adrp	x8, _PANEL_POWER_CYCLE_DELAY_MASK@GOTPAGE
Lloh25:
	ldr	x8, [x8, _PANEL_POWER_CYCLE_DELAY_MASK@GOTPAGEOFF]
Lloh26:
	ldr	w22, [x8]
	ldr	w0, [x19, #16]
	mov	w1, #1000
	bl	_DIV_ROUND_UP
	mov	x1, x0
	mov	x0, x22
	bl	_REG_FIELD_PREP
	orr	w1, w0, w21
	mov	x0, x20
	b	LBB0_10
LBB0_9:
	ldr	w0, [sp, #32]
	bl	_I915_READ
Lloh27:
	adrp	x8, _BXT_POWER_CYCLE_DELAY_MASK@GOTPAGE
Lloh28:
	ldr	x8, [x8, _BXT_POWER_CYCLE_DELAY_MASK@GOTPAGEOFF]
Lloh29:
	ldr	w20, [x8]
	bic	w21, w0, w20
	ldr	w0, [x19, #16]
	mov	w1, #1000
	bl	_DIV_ROUND_UP
	mov	x1, x0
	mov	x0, x20
	bl	_REG_FIELD_PREP
	orr	w1, w0, w21
	ldr	w0, [sp, #32]
LBB0_10:
	bl	_I915_WRITE
	ldr	w0, [sp, #44]
	bl	_I915_READ
	mov	x19, x0
	ldr	w0, [sp, #40]
	bl	_I915_READ
	mov	x20, x0
	ldr	w0, [sp, #36]
	bl	_i915_mmio_reg_valid
	cbz	x0, LBB0_12
; %bb.11:
	ldr	w0, [sp, #36]
	bl	_I915_READ
                                        ; kill: def $w0 killed $w0 def $x0
	b	LBB0_13
LBB0_12:
	ldr	w0, [sp, #32]
	bl	_I915_READ
Lloh30:
	adrp	x8, _BXT_POWER_CYCLE_DELAY_MASK@GOTPAGE
Lloh31:
	ldr	x8, [x8, _BXT_POWER_CYCLE_DELAY_MASK@GOTPAGEOFF]
Lloh32:
	ldr	w8, [x8]
	and	w0, w8, w0
LBB0_13:
	stp	x20, x0, [sp, #8]
	str	x19, [sp]
Lloh33:
	adrp	x0, l_.str.2@PAGE
Lloh34:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_DRM_DEBUG_KMS
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_14:
	mov	x0, x21
	bl	_HAS_PCH_IBX
	cbnz	x0, LBB0_16
; %bb.15:
	mov	x0, x21
	bl	_HAS_PCH_CPT
	cbz	x0, LBB0_7
LBB0_16:
	cmp	w20, #128
	b.eq	LBB0_20
; %bb.17:
	cmp	w20, #129
	b.eq	LBB0_21
; %bb.18:
	cmp	w20, #130
	b.ne	LBB0_22
; %bb.19:
Lloh35:
	adrp	x8, _PANEL_PORT_SELECT_DPA@GOTPAGE
Lloh36:
	ldr	x8, [x8, _PANEL_PORT_SELECT_DPA@GOTPAGEOFF]
Lloh37:
	ldr	w0, [x8]
	b	LBB0_7
LBB0_20:
Lloh38:
	adrp	x8, _PANEL_PORT_SELECT_DPD@GOTPAGE
Lloh39:
	ldr	x8, [x8, _PANEL_PORT_SELECT_DPD@GOTPAGEOFF]
Lloh40:
	ldr	w0, [x8]
	b	LBB0_7
LBB0_21:
Lloh41:
	adrp	x8, _PANEL_PORT_SELECT_DPC@GOTPAGE
Lloh42:
	ldr	x8, [x8, _PANEL_PORT_SELECT_DPC@GOTPAGEOFF]
Lloh43:
	ldr	w0, [x8]
	b	LBB0_7
LBB0_22:
	mov	x0, x20
	bl	_MISSING_CASE
	mov	w0, #0
	b	LBB0_7
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpAdd	Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.loh AdrpLdrGotLdr	Lloh41, Lloh42, Lloh43
	.cfi_endproc
                                        ; -- End function
	.comm	_PANEL_POWER_ON,4,2             ; @PANEL_POWER_ON
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Panel power already on\n"

	.comm	_EDP_FORCE_VDD,4,2              ; @EDP_FORCE_VDD
l_.str.1:                               ; @.str.1
	.asciz	"VDD already on, disabling first\n"

	.comm	_PANEL_POWER_UP_DELAY_MASK,4,2  ; @PANEL_POWER_UP_DELAY_MASK
	.comm	_PANEL_LIGHT_ON_DELAY_MASK,4,2  ; @PANEL_LIGHT_ON_DELAY_MASK
	.comm	_PANEL_LIGHT_OFF_DELAY_MASK,4,2 ; @PANEL_LIGHT_OFF_DELAY_MASK
	.comm	_PANEL_POWER_DOWN_DELAY_MASK,4,2 ; @PANEL_POWER_DOWN_DELAY_MASK
	.comm	_PANEL_PORT_SELECT_DPA,4,2      ; @PANEL_PORT_SELECT_DPA
	.comm	_PANEL_PORT_SELECT_DPC,4,2      ; @PANEL_PORT_SELECT_DPC
	.comm	_PANEL_PORT_SELECT_DPD,4,2      ; @PANEL_PORT_SELECT_DPD
	.comm	_PP_REFERENCE_DIVIDER_MASK,4,2  ; @PP_REFERENCE_DIVIDER_MASK
	.comm	_PANEL_POWER_CYCLE_DELAY_MASK,4,2 ; @PANEL_POWER_CYCLE_DELAY_MASK
	.comm	_BXT_POWER_CYCLE_DELAY_MASK,4,2 ; @BXT_POWER_CYCLE_DELAY_MASK
l_.str.2:                               ; @.str.2
	.asciz	"panel power sequencer register settings: PP_ON %#x, PP_OFF %#x, PP_DIV %#x\n"

	.no_dead_strip	_intel_dp_init_panel_power_sequencer_registers
.subsections_via_symbols
