	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function psb_intel_lvds_restore
_psb_intel_lvds_restore:                ## @psb_intel_lvds_restore
	.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	(%rdi), %r14
	callq	_gma_attached_encoder
	movq	(%rax), %rbx
	movl	(%r14), %edi
	movl	(%rbx), %edx
	movl	4(%rbx), %ecx
	movl	8(%rbx), %r8d
	movl	12(%rbx), %r9d
	movl	16(%rbx), %r10d
	movl	20(%rbx), %eax
	leaq	L_.str(%rip), %rsi
	pushq	%rax
	pushq	%r10
	callq	_dev_dbg
	addq	$16, %rsp
	movq	_BLC_PWM_CTL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	20(%rbx), %esi
	callq	_REG_WRITE
	movq	_PFIT_CONTROL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	24(%rbx), %esi
	callq	_REG_WRITE
	movq	_PFIT_PGM_RATIOS@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	28(%rbx), %esi
	callq	_REG_WRITE
	movq	_LVDSPP_ON@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	(%rbx), %esi
	callq	_REG_WRITE
	movq	_LVDSPP_OFF@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	4(%rbx), %esi
	callq	_REG_WRITE
	movq	_PP_CYCLE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	16(%rbx), %esi
	callq	_REG_WRITE
	movq	_PP_CONTROL@GOTPCREL(%rip), %r14
	movl	(%r14), %edi
	movl	12(%rbx), %esi
	callq	_REG_WRITE
	movq	_LVDS@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	8(%rbx), %esi
	callq	_REG_WRITE
	movq	_POWER_TARGET_ON@GOTPCREL(%rip), %r15
	movl	(%r15), %r12d
	andl	12(%rbx), %r12d
	movl	(%r14), %ebx
	movl	%ebx, %edi
	callq	_REG_READ
	movl	(%r15), %esi
	testl	%r12d, %r12d
	je	LBB0_3
## %bb.1:
	orl	%eax, %esi
	movl	%ebx, %edi
	callq	_REG_WRITE
	movq	_PP_STATUS@GOTPCREL(%rip), %r14
	movq	_PP_ON@GOTPCREL(%rip), %rbx
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r14), %edi
	callq	_REG_READ
	testl	%eax, (%rbx)
	je	LBB0_2
	jmp	LBB0_5
LBB0_3:
	notl	%esi
	andl	%esi, %eax
	movl	%ebx, %edi
	movl	%eax, %esi
	callq	_REG_WRITE
	movq	_PP_STATUS@GOTPCREL(%rip), %r14
	movq	_PP_ON@GOTPCREL(%rip), %rbx
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r14), %edi
	callq	_REG_READ
	testl	%eax, (%rbx)
	jne	LBB0_4
LBB0_5:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"(0x%x, 0x%x, 0x%x, 0x%x, 0x%x, 0x%x)\n"

	.comm	_BLC_PWM_CTL,4,2                ## @BLC_PWM_CTL
	.comm	_PFIT_CONTROL,4,2               ## @PFIT_CONTROL
	.comm	_PFIT_PGM_RATIOS,4,2            ## @PFIT_PGM_RATIOS
	.comm	_LVDSPP_ON,4,2                  ## @LVDSPP_ON
	.comm	_LVDSPP_OFF,4,2                 ## @LVDSPP_OFF
	.comm	_PP_CYCLE,4,2                   ## @PP_CYCLE
	.comm	_PP_CONTROL,4,2                 ## @PP_CONTROL
	.comm	_LVDS,4,2                       ## @LVDS
	.comm	_POWER_TARGET_ON,4,2            ## @POWER_TARGET_ON
	.comm	_PP_STATUS,4,2                  ## @PP_STATUS
	.comm	_PP_ON,4,2                      ## @PP_ON
	.no_dead_strip	_psb_intel_lvds_restore
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function psb_intel_lvds_restore
_psb_intel_lvds_restore:                ; @psb_intel_lvds_restore
	.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
	ldr	x20, [x0]
	bl	_gma_attached_encoder
	ldr	x19, [x0]
	ldr	w0, [x20]
	ldp	w2, w3, [x19]
	ldp	w4, w5, [x19, #8]
	ldp	w6, w7, [x19, #16]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_dbg
Lloh2:
	adrp	x8, _BLC_PWM_CTL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _BLC_PWM_CTL@GOTPAGEOFF]
Lloh4:
	ldr	w0, [x8]
	ldr	w1, [x19, #20]
	bl	_REG_WRITE
Lloh5:
	adrp	x8, _PFIT_CONTROL@GOTPAGE
Lloh6:
	ldr	x8, [x8, _PFIT_CONTROL@GOTPAGEOFF]
Lloh7:
	ldr	w0, [x8]
	ldr	w1, [x19, #24]
	bl	_REG_WRITE
Lloh8:
	adrp	x8, _PFIT_PGM_RATIOS@GOTPAGE
Lloh9:
	ldr	x8, [x8, _PFIT_PGM_RATIOS@GOTPAGEOFF]
Lloh10:
	ldr	w0, [x8]
	ldr	w1, [x19, #28]
	bl	_REG_WRITE
Lloh11:
	adrp	x8, _LVDSPP_ON@GOTPAGE
Lloh12:
	ldr	x8, [x8, _LVDSPP_ON@GOTPAGEOFF]
Lloh13:
	ldr	w0, [x8]
	ldr	w1, [x19]
	bl	_REG_WRITE
Lloh14:
	adrp	x8, _LVDSPP_OFF@GOTPAGE
Lloh15:
	ldr	x8, [x8, _LVDSPP_OFF@GOTPAGEOFF]
Lloh16:
	ldr	w0, [x8]
	ldr	w1, [x19, #4]
	bl	_REG_WRITE
Lloh17:
	adrp	x8, _PP_CYCLE@GOTPAGE
Lloh18:
	ldr	x8, [x8, _PP_CYCLE@GOTPAGEOFF]
Lloh19:
	ldr	w0, [x8]
	ldr	w1, [x19, #16]
	bl	_REG_WRITE
Lloh20:
	adrp	x20, _PP_CONTROL@GOTPAGE
Lloh21:
	ldr	x20, [x20, _PP_CONTROL@GOTPAGEOFF]
	ldr	w0, [x20]
	ldr	w1, [x19, #12]
	bl	_REG_WRITE
Lloh22:
	adrp	x8, _LVDS@GOTPAGE
Lloh23:
	ldr	x8, [x8, _LVDS@GOTPAGEOFF]
Lloh24:
	ldr	w0, [x8]
	ldr	w1, [x19, #8]
	bl	_REG_WRITE
	ldr	w8, [x19, #12]
Lloh25:
	adrp	x21, _POWER_TARGET_ON@GOTPAGE
Lloh26:
	ldr	x21, [x21, _POWER_TARGET_ON@GOTPAGEOFF]
	ldr	w9, [x21]
	and	w22, w9, w8
	ldr	w19, [x20]
	mov	x0, x19
	bl	_REG_READ
	ldr	w8, [x21]
	cbz	w22, LBB0_3
; %bb.1:
	orr	w1, w8, w0
	mov	x0, x19
	bl	_REG_WRITE
Lloh27:
	adrp	x19, _PP_STATUS@GOTPAGE
Lloh28:
	ldr	x19, [x19, _PP_STATUS@GOTPAGEOFF]
Lloh29:
	adrp	x20, _PP_ON@GOTPAGE
Lloh30:
	ldr	x20, [x20, _PP_ON@GOTPAGEOFF]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x19]
	bl	_REG_READ
	ldr	w8, [x20]
	tst	w8, w0
	b.eq	LBB0_2
	b	LBB0_5
LBB0_3:
	bic	w1, w0, w8
	mov	x0, x19
	bl	_REG_WRITE
Lloh31:
	adrp	x19, _PP_STATUS@GOTPAGE
Lloh32:
	ldr	x19, [x19, _PP_STATUS@GOTPAGEOFF]
Lloh33:
	adrp	x20, _PP_ON@GOTPAGE
Lloh34:
	ldr	x20, [x20, _PP_ON@GOTPAGEOFF]
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x19]
	bl	_REG_READ
	ldr	w8, [x20]
	tst	w8, w0
	b.ne	LBB0_4
LBB0_5:
	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	Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh29, Lloh30
	.loh AdrpLdrGot	Lloh27, Lloh28
	.loh AdrpLdrGot	Lloh33, Lloh34
	.loh AdrpLdrGot	Lloh31, Lloh32
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"(0x%x, 0x%x, 0x%x, 0x%x, 0x%x, 0x%x)\n"

	.comm	_BLC_PWM_CTL,4,2                ; @BLC_PWM_CTL
	.comm	_PFIT_CONTROL,4,2               ; @PFIT_CONTROL
	.comm	_PFIT_PGM_RATIOS,4,2            ; @PFIT_PGM_RATIOS
	.comm	_LVDSPP_ON,4,2                  ; @LVDSPP_ON
	.comm	_LVDSPP_OFF,4,2                 ; @LVDSPP_OFF
	.comm	_PP_CYCLE,4,2                   ; @PP_CYCLE
	.comm	_PP_CONTROL,4,2                 ; @PP_CONTROL
	.comm	_LVDS,4,2                       ; @LVDS
	.comm	_POWER_TARGET_ON,4,2            ; @POWER_TARGET_ON
	.comm	_PP_STATUS,4,2                  ; @PP_STATUS
	.comm	_PP_ON,4,2                      ; @PP_ON
	.no_dead_strip	_psb_intel_lvds_restore
.subsections_via_symbols
