	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_sun8i_tcon_top_de_config       ## -- Begin function sun8i_tcon_top_de_config
	.p2align	4, 0x90
_sun8i_tcon_top_de_config:              ## @sun8i_tcon_top_de_config
	.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
	movl	%edx, %r14d
	movl	%esi, %r12d
	movq	%rdi, %rbx
	callq	_dev_get_drvdata
	movq	%rax, %r15
	movl	(%rbx), %edi
	callq	_sun8i_tcon_top_node_is_tcon_top
	testl	%eax, %eax
	je	LBB0_1
## %bb.3:
	cmpl	$2, %r12d
	jl	LBB0_5
## %bb.4:
	leaq	L_.str.1(%rip), %rsi
	jmp	LBB0_2
LBB0_1:
	leaq	L_.str(%rip), %rsi
	jmp	LBB0_2
LBB0_5:
	cmpl	$4, %r14d
	jl	LBB0_7
## %bb.6:
	leaq	L_.str.2(%rip), %rsi
LBB0_2:
	movq	%rbx, %rdi
	callq	_dev_err
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_11:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	movq	%r15, %rdi
	callq	_spin_lock_irqsave
	movq	_TCON_TOP_PORT_SEL_REG@GOTPCREL(%rip), %r13
	movq	(%r13), %rdi
	addq	8(%r15), %rdi
	callq	_readl
	movl	%eax, %ebx
	testl	%r12d, %r12d
	jne	LBB0_8
## %bb.9:
	movq	_TCON_TOP_PORT_DE0_MSK@GOTPCREL(%rip), %rax
	jmp	LBB0_10
LBB0_8:
	movq	_TCON_TOP_PORT_DE1_MSK@GOTPCREL(%rip), %rax
LBB0_10:
	movl	(%rax), %edi
	movl	%edi, %eax
	notl	%eax
	andl	%eax, %ebx
	movl	%r14d, %esi
	callq	_FIELD_PREP
	orl	%eax, %ebx
	movq	(%r13), %rsi
	addq	8(%r15), %rsi
	movl	%ebx, %edi
	callq	_writel
	movq	%r15, %rdi
	callq	_spin_unlock_irqrestore
	xorl	%eax, %eax
	jmp	LBB0_11
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Device is not TCON TOP!\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
L_.str.1:                               ## @.str.1
	.asciz	"Mixer index is too high!\n"

L_.str.2:                               ## @.str.2
	.asciz	"TCON index is too high!\n"

	.comm	_TCON_TOP_PORT_SEL_REG,8,3      ## @TCON_TOP_PORT_SEL_REG
	.comm	_TCON_TOP_PORT_DE0_MSK,4,2      ## @TCON_TOP_PORT_DE0_MSK
	.comm	_TCON_TOP_PORT_DE1_MSK,4,2      ## @TCON_TOP_PORT_DE1_MSK
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_sun8i_tcon_top_de_config       ; -- Begin function sun8i_tcon_top_de_config
	.p2align	2
_sun8i_tcon_top_de_config:              ; @sun8i_tcon_top_de_config
	.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	x20, x2
	mov	x21, x1
	mov	x22, x0
	bl	_dev_get_drvdata
	mov	x19, x0
	ldr	w0, [x22]
	bl	_sun8i_tcon_top_node_is_tcon_top
	cbz	w0, LBB0_3
; %bb.1:
	cmp	w21, #2
	b.lt	LBB0_4
; %bb.2:
Lloh0:
	adrp	x1, l_.str.1@PAGE
Lloh1:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_6
LBB0_3:
Lloh2:
	adrp	x1, l_.str@PAGE
Lloh3:
	add	x1, x1, l_.str@PAGEOFF
	b	LBB0_6
LBB0_4:
	cmp	w20, #4
	b.lt	LBB0_8
; %bb.5:
Lloh4:
	adrp	x1, l_.str.2@PAGE
Lloh5:
	add	x1, x1, l_.str.2@PAGEOFF
LBB0_6:
	mov	x0, x22
	bl	_dev_err
Lloh6:
	adrp	x8, _EINVAL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_7:
	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
LBB0_8:
	mov	x0, x19
	bl	_spin_lock_irqsave
	ldr	x8, [x19, #8]
Lloh9:
	adrp	x22, _TCON_TOP_PORT_SEL_REG@GOTPAGE
Lloh10:
	ldr	x22, [x22, _TCON_TOP_PORT_SEL_REG@GOTPAGEOFF]
	ldr	x9, [x22]
	add	x0, x9, x8
	bl	_readl
Lloh11:
	adrp	x8, _TCON_TOP_PORT_DE0_MSK@GOTPAGE
Lloh12:
	ldr	x8, [x8, _TCON_TOP_PORT_DE0_MSK@GOTPAGEOFF]
Lloh13:
	adrp	x9, _TCON_TOP_PORT_DE1_MSK@GOTPAGE
Lloh14:
	ldr	x9, [x9, _TCON_TOP_PORT_DE1_MSK@GOTPAGEOFF]
	cmp	w21, #0
	csel	x8, x8, x9, eq
	ldr	w8, [x8]
	bic	w21, w0, w8
	mov	x0, x8
	mov	x1, x20
	bl	_FIELD_PREP
	orr	w0, w21, w0
	ldr	x8, [x19, #8]
	ldr	x9, [x22]
	add	x1, x9, x8
	bl	_writel
	mov	x0, x19
	bl	_spin_unlock_irqrestore
	mov	w0, #0
	b	LBB0_7
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Device is not TCON TOP!\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
l_.str.1:                               ; @.str.1
	.asciz	"Mixer index is too high!\n"

l_.str.2:                               ; @.str.2
	.asciz	"TCON index is too high!\n"

	.comm	_TCON_TOP_PORT_SEL_REG,8,3      ; @TCON_TOP_PORT_SEL_REG
	.comm	_TCON_TOP_PORT_DE0_MSK,4,2      ; @TCON_TOP_PORT_DE0_MSK
	.comm	_TCON_TOP_PORT_DE1_MSK,4,2      ; @TCON_TOP_PORT_DE1_MSK
.subsections_via_symbols
