	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function decon_swreset
_decon_swreset:                         ## @decon_swreset
	.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	%rdi, %r14
	movq	_DECON_VIDCON0@GOTPCREL(%rip), %r15
	movq	(%r15), %rsi
	addq	8(%rdi), %rsi
	xorl	%edi, %edi
	callq	_writel
	movq	(%r15), %rdi
	addq	8(%r14), %rdi
	xorl	%edx, %edx
	movl	$12, %ecx
	movl	$20000, %r8d                    ## imm = 0x4E20
	callq	_readl_poll_timeout
	movq	_VIDCON0_SWRESET@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	(%r15), %rsi
	addq	8(%r14), %rsi
	callq	_writel
	movq	(%r15), %rdi
	addq	8(%r14), %rdi
	xorl	%edx, %edx
	movl	$12, %ecx
	movl	$20000, %r8d                    ## imm = 0x4E20
	callq	_readl_poll_timeout
	shrl	$31, %eax
	leaq	L_.str(%rip), %rsi
	movl	%eax, %edi
	callq	_WARN
	leaq	16(%r14), %rbx
	movq	%rbx, %rdi
	callq	_spin_lock_irqsave
	movq	$0, 24(%r14)
	movq	%rbx, %rdi
	callq	_spin_unlock_irqrestore
	movq	_IFTYPE_HDMI@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%r14)
	je	LBB0_1
## %bb.2:
	movq	_VIDCON0_CLKVALUP@GOTPCREL(%rip), %rax
	movq	_VIDCON0_VLCKFREE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	orl	(%rax), %edi
	movq	(%r15), %rsi
	addq	8(%r14), %rsi
	callq	_writel
	movq	_DECON_CMU@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_CMU_CLKGAGE_MODE_SFR_F@GOTPCREL(%rip), %rax
	movq	_CMU_CLKGAGE_MODE_MEM_F@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	orl	(%rax), %edx
	movq	%r14, %rdi
	movl	$-1, %ecx
	callq	_decon_set_bits
	movq	_VIDCON1_VCLK_RUN_VDEN_DISABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_DECON_VIDCON1@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	8(%r14), %rsi
	callq	_writel
	movq	_CRCCTRL_CRCEN@GOTPCREL(%rip), %rax
	movq	_CRCCTRL_CRCSTART_F@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	orl	(%rax), %edi
	movq	_CRCCTRL_CRCCLKEN@GOTPCREL(%rip), %rax
	orl	(%rax), %edi
	movq	_DECON_CRCCTRL@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	8(%r14), %rsi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_writel                         ## TAILCALL
LBB0_1:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_DECON_VIDCON0,8,3              ## @DECON_VIDCON0
	.comm	_VIDCON0_STOP_STATUS,4,2        ## @VIDCON0_STOP_STATUS
	.comm	_VIDCON0_SWRESET,4,2            ## @VIDCON0_SWRESET
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"failed to software reset DECON\n"

	.comm	_IFTYPE_HDMI,4,2                ## @IFTYPE_HDMI
	.comm	_VIDCON0_CLKVALUP,4,2           ## @VIDCON0_CLKVALUP
	.comm	_VIDCON0_VLCKFREE,4,2           ## @VIDCON0_VLCKFREE
	.comm	_DECON_CMU,4,2                  ## @DECON_CMU
	.comm	_CMU_CLKGAGE_MODE_SFR_F,4,2     ## @CMU_CLKGAGE_MODE_SFR_F
	.comm	_CMU_CLKGAGE_MODE_MEM_F,4,2     ## @CMU_CLKGAGE_MODE_MEM_F
	.comm	_VIDCON1_VCLK_RUN_VDEN_DISABLE,4,2 ## @VIDCON1_VCLK_RUN_VDEN_DISABLE
	.comm	_DECON_VIDCON1,8,3              ## @DECON_VIDCON1
	.comm	_CRCCTRL_CRCEN,4,2              ## @CRCCTRL_CRCEN
	.comm	_CRCCTRL_CRCSTART_F,4,2         ## @CRCCTRL_CRCSTART_F
	.comm	_CRCCTRL_CRCCLKEN,4,2           ## @CRCCTRL_CRCCLKEN
	.comm	_DECON_CRCCTRL,8,3              ## @DECON_CRCCTRL
	.no_dead_strip	_decon_swreset
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function decon_swreset
_decon_swreset:                         ; @decon_swreset
	.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
	mov	x19, x0
	ldr	x8, [x0, #8]
Lloh0:
	adrp	x21, _DECON_VIDCON0@GOTPAGE
Lloh1:
	ldr	x21, [x21, _DECON_VIDCON0@GOTPAGEOFF]
	ldr	x9, [x21]
	add	x1, x9, x8
	mov	w0, #0
	bl	_writel
	ldr	x8, [x19, #8]
	ldr	x9, [x21]
	add	x0, x9, x8
	mov	w2, #0
	mov	w3, #12
	mov	w4, #20000
	bl	_readl_poll_timeout
Lloh2:
	adrp	x8, _VIDCON0_SWRESET@GOTPAGE
Lloh3:
	ldr	x8, [x8, _VIDCON0_SWRESET@GOTPAGEOFF]
Lloh4:
	ldr	w0, [x8]
	ldr	x8, [x19, #8]
	ldr	x9, [x21]
	add	x1, x9, x8
	bl	_writel
	ldr	x8, [x19, #8]
	ldr	x9, [x21]
	add	x0, x9, x8
	mov	w2, #0
	mov	w3, #12
	mov	w4, #20000
	bl	_readl_poll_timeout
	lsr	w0, w0, #31
Lloh5:
	adrp	x1, l_.str@PAGE
Lloh6:
	add	x1, x1, l_.str@PAGEOFF
	bl	_WARN
	add	x20, x19, #16
	mov	x0, x20
	bl	_spin_lock_irqsave
	str	xzr, [x19, #24]
	mov	x0, x20
	bl	_spin_unlock_irqrestore
	ldr	w8, [x19]
Lloh7:
	adrp	x9, _IFTYPE_HDMI@GOTPAGE
Lloh8:
	ldr	x9, [x9, _IFTYPE_HDMI@GOTPAGEOFF]
Lloh9:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_2
; %bb.1:
Lloh10:
	adrp	x8, _VIDCON0_CLKVALUP@GOTPAGE
Lloh11:
	ldr	x8, [x8, _VIDCON0_CLKVALUP@GOTPAGEOFF]
Lloh12:
	adrp	x9, _VIDCON0_VLCKFREE@GOTPAGE
Lloh13:
	ldr	x9, [x9, _VIDCON0_VLCKFREE@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
Lloh15:
	ldr	w9, [x9]
	orr	w0, w9, w8
	ldr	x8, [x19, #8]
	ldr	x9, [x21]
	add	x1, x9, x8
	bl	_writel
Lloh16:
	adrp	x8, _DECON_CMU@GOTPAGE
Lloh17:
	ldr	x8, [x8, _DECON_CMU@GOTPAGEOFF]
Lloh18:
	adrp	x9, _CMU_CLKGAGE_MODE_SFR_F@GOTPAGE
Lloh19:
	ldr	x9, [x9, _CMU_CLKGAGE_MODE_SFR_F@GOTPAGEOFF]
Lloh20:
	ldr	w1, [x8]
Lloh21:
	ldr	w8, [x9]
Lloh22:
	adrp	x9, _CMU_CLKGAGE_MODE_MEM_F@GOTPAGE
Lloh23:
	ldr	x9, [x9, _CMU_CLKGAGE_MODE_MEM_F@GOTPAGEOFF]
Lloh24:
	ldr	w9, [x9]
	orr	w2, w9, w8
	mov	x0, x19
	mov	w3, #-1
	bl	_decon_set_bits
Lloh25:
	adrp	x8, _VIDCON1_VCLK_RUN_VDEN_DISABLE@GOTPAGE
Lloh26:
	ldr	x8, [x8, _VIDCON1_VCLK_RUN_VDEN_DISABLE@GOTPAGEOFF]
Lloh27:
	ldr	w0, [x8]
	ldr	x8, [x19, #8]
Lloh28:
	adrp	x9, _DECON_VIDCON1@GOTPAGE
Lloh29:
	ldr	x9, [x9, _DECON_VIDCON1@GOTPAGEOFF]
Lloh30:
	ldr	x9, [x9]
	add	x1, x9, x8
	bl	_writel
Lloh31:
	adrp	x8, _CRCCTRL_CRCEN@GOTPAGE
Lloh32:
	ldr	x8, [x8, _CRCCTRL_CRCEN@GOTPAGEOFF]
Lloh33:
	ldr	w8, [x8]
Lloh34:
	adrp	x9, _CRCCTRL_CRCSTART_F@GOTPAGE
Lloh35:
	ldr	x9, [x9, _CRCCTRL_CRCSTART_F@GOTPAGEOFF]
Lloh36:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh37:
	adrp	x9, _CRCCTRL_CRCCLKEN@GOTPAGE
Lloh38:
	ldr	x9, [x9, _CRCCTRL_CRCCLKEN@GOTPAGEOFF]
Lloh39:
	ldr	w9, [x9]
	orr	w0, w8, w9
	ldr	x8, [x19, #8]
Lloh40:
	adrp	x9, _DECON_CRCCTRL@GOTPAGE
Lloh41:
	ldr	x9, [x9, _DECON_CRCCTRL@GOTPAGEOFF]
Lloh42:
	ldr	x9, [x9]
	add	x1, x9, x8
	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	_writel
LBB0_2:
	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 AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh40, Lloh41, Lloh42
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh39
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh20
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_DECON_VIDCON0,8,3              ; @DECON_VIDCON0
	.comm	_VIDCON0_STOP_STATUS,4,2        ; @VIDCON0_STOP_STATUS
	.comm	_VIDCON0_SWRESET,4,2            ; @VIDCON0_SWRESET
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"failed to software reset DECON\n"

	.comm	_IFTYPE_HDMI,4,2                ; @IFTYPE_HDMI
	.comm	_VIDCON0_CLKVALUP,4,2           ; @VIDCON0_CLKVALUP
	.comm	_VIDCON0_VLCKFREE,4,2           ; @VIDCON0_VLCKFREE
	.comm	_DECON_CMU,4,2                  ; @DECON_CMU
	.comm	_CMU_CLKGAGE_MODE_SFR_F,4,2     ; @CMU_CLKGAGE_MODE_SFR_F
	.comm	_CMU_CLKGAGE_MODE_MEM_F,4,2     ; @CMU_CLKGAGE_MODE_MEM_F
	.comm	_VIDCON1_VCLK_RUN_VDEN_DISABLE,4,2 ; @VIDCON1_VCLK_RUN_VDEN_DISABLE
	.comm	_DECON_VIDCON1,8,3              ; @DECON_VIDCON1
	.comm	_CRCCTRL_CRCEN,4,2              ; @CRCCTRL_CRCEN
	.comm	_CRCCTRL_CRCSTART_F,4,2         ; @CRCCTRL_CRCSTART_F
	.comm	_CRCCTRL_CRCCLKEN,4,2           ; @CRCCTRL_CRCCLKEN
	.comm	_DECON_CRCCTRL,8,3              ; @DECON_CRCCTRL
	.no_dead_strip	_decon_swreset
.subsections_via_symbols
