	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function lpt_reset_fdi_mphy
_lpt_reset_fdi_mphy:                    ## @lpt_reset_fdi_mphy
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_SOUTH_CHICKEN2@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edi
	callq	_I915_READ
	movq	_FDI_MPHY_IOSFSB_RESET_CTL@GOTPCREL(%rip), %r15
	orl	(%r15), %eax
	movl	(%rbx), %edi
	movl	%eax, %esi
	callq	_I915_WRITE
	movl	(%rbx), %edi
	callq	_I915_READ
	movq	_FDI_MPHY_IOSFSB_RESET_STATUS@GOTPCREL(%rip), %r14
	andl	(%r14), %eax
	movl	%eax, %edi
	movl	$100, %esi
	callq	_wait_for_us
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rdi
	callq	_DRM_ERROR
LBB0_2:
	movl	(%rbx), %edi
	callq	_I915_READ
	movl	(%r15), %esi
	notl	%esi
	andl	%eax, %esi
	movl	(%rbx), %edi
	callq	_I915_WRITE
	movl	(%rbx), %edi
	callq	_I915_READ
	xorl	%edi, %edi
	andl	(%r14), %eax
	sete	%dil
	movl	$100, %esi
	callq	_wait_for_us
	testq	%rax, %rax
	je	LBB0_3
## %bb.4:
	leaq	L_.str.1(%rip), %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_DRM_ERROR                      ## TAILCALL
LBB0_3:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SOUTH_CHICKEN2,4,2             ## @SOUTH_CHICKEN2
	.comm	_FDI_MPHY_IOSFSB_RESET_CTL,4,2  ## @FDI_MPHY_IOSFSB_RESET_CTL
	.comm	_FDI_MPHY_IOSFSB_RESET_STATUS,4,2 ## @FDI_MPHY_IOSFSB_RESET_STATUS
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"FDI mPHY reset assert timeout\n"

L_.str.1:                               ## @.str.1
	.asciz	"FDI mPHY reset de-assert timeout\n"

	.no_dead_strip	_lpt_reset_fdi_mphy
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function lpt_reset_fdi_mphy
_lpt_reset_fdi_mphy:                    ; @lpt_reset_fdi_mphy
	.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
Lloh0:
	adrp	x19, _SOUTH_CHICKEN2@GOTPAGE
Lloh1:
	ldr	x19, [x19, _SOUTH_CHICKEN2@GOTPAGEOFF]
	ldr	w0, [x19]
	bl	_I915_READ
Lloh2:
	adrp	x20, _FDI_MPHY_IOSFSB_RESET_CTL@GOTPAGE
Lloh3:
	ldr	x20, [x20, _FDI_MPHY_IOSFSB_RESET_CTL@GOTPAGEOFF]
	ldr	w8, [x20]
	orr	w1, w8, w0
	ldr	w0, [x19]
	bl	_I915_WRITE
	ldr	w0, [x19]
	bl	_I915_READ
Lloh4:
	adrp	x21, _FDI_MPHY_IOSFSB_RESET_STATUS@GOTPAGE
Lloh5:
	ldr	x21, [x21, _FDI_MPHY_IOSFSB_RESET_STATUS@GOTPAGEOFF]
	ldr	w8, [x21]
	and	w0, w8, w0
	mov	w1, #100
	bl	_wait_for_us
	cbz	x0, LBB0_2
; %bb.1:
Lloh6:
	adrp	x0, l_.str@PAGE
Lloh7:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DRM_ERROR
LBB0_2:
	ldr	w0, [x19]
	bl	_I915_READ
	ldr	w8, [x20]
	bic	w1, w0, w8
	ldr	w0, [x19]
	bl	_I915_WRITE
	ldr	w0, [x19]
	bl	_I915_READ
	ldr	w8, [x21]
	tst	w8, w0
	cset	w0, eq
	mov	w1, #100
	bl	_wait_for_us
	cbz	x0, LBB0_4
; %bb.3:
Lloh8:
	adrp	x0, l_.str.1@PAGE
Lloh9:
	add	x0, x0, l_.str.1@PAGEOFF
	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
	b	_DRM_ERROR
LBB0_4:
	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	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_SOUTH_CHICKEN2,4,2             ; @SOUTH_CHICKEN2
	.comm	_FDI_MPHY_IOSFSB_RESET_CTL,4,2  ; @FDI_MPHY_IOSFSB_RESET_CTL
	.comm	_FDI_MPHY_IOSFSB_RESET_STATUS,4,2 ; @FDI_MPHY_IOSFSB_RESET_STATUS
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"FDI mPHY reset assert timeout\n"

l_.str.1:                               ; @.str.1
	.asciz	"FDI mPHY reset de-assert timeout\n"

	.no_dead_strip	_lpt_reset_fdi_mphy
.subsections_via_symbols
