	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function adv7511_cec_adap_enable
_adv7511_cec_adap_enable:               ## @adv7511_cec_adap_enable
	.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
	movl	%esi, %r14d
	callq	_cec_get_drvdata
	movq	%rax, %rbx
	movq	(%rax), %rax
	movq	_ADV7533@GOTPCREL(%rip), %rcx
	xorl	%r12d, %r12d
	cmpq	(%rcx), %rax
	jne	LBB0_2
## %bb.1:
	movq	_ADV7533_REG_CEC_OFFSET@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
LBB0_2:
	cmpq	$0, 32(%rbx)
	je	LBB0_3
## %bb.4:
	movl	8(%rbx), %eax
	testl	%r14d, %r14d
	je	LBB0_7
## %bb.5:
	testl	%eax, %eax
	jne	LBB0_7
## %bb.6:
	movl	24(%rbx), %edi
	movq	_ADV7511_REG_CEC_CLK_DIV@GOTPCREL(%rip), %rax
	movl	%r12d, %r15d
	movq	(%rax), %rsi
	addq	%r15, %rsi
	movl	$3, %edx
	movl	$1, %ecx
	callq	_regmap_update_bits
	movl	24(%rbx), %edi
	movq	_ADV7511_REG_CEC_RX_BUFFERS@GOTPCREL(%rip), %r12
	movq	(%r12), %rsi
	addq	%r15, %rsi
	movl	$7, %edx
	callq	_regmap_write
	movl	24(%rbx), %edi
	movq	(%r12), %rsi
	addq	%r15, %rsi
	xorl	%edx, %edx
	callq	_regmap_write
	movl	24(%rbx), %edi
	movq	_ADV7511_REG_CEC_TX_ENABLE@GOTPCREL(%rip), %rax
	addq	(%rax), %r15
	movq	%r15, %rsi
	movl	$1, %edx
	xorl	%ecx, %ecx
	callq	_regmap_update_bits
	movl	28(%rbx), %r15d
	movl	$1, %edi
	callq	_ADV7511_REG_INT_ENABLE
	movq	_ADV7511_INT1_CEC_MASK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%r15d, %edi
	movq	%rax, %rsi
	movl	$63, %edx
	callq	_regmap_update_bits
	jmp	LBB0_10
LBB0_3:
	movq	_EIO@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_11
LBB0_7:
	testl	%r14d, %r14d
	jne	LBB0_10
## %bb.8:
	testl	%eax, %eax
	je	LBB0_10
## %bb.9:
	movl	28(%rbx), %r15d
	movl	$1, %edi
	callq	_ADV7511_REG_INT_ENABLE
	movl	%r15d, %edi
	movq	%rax, %rsi
	movl	$63, %edx
	xorl	%ecx, %ecx
	callq	_regmap_update_bits
	movl	24(%rbx), %edi
	movq	_ADV7511_REG_CEC_LOG_ADDR_MASK@GOTPCREL(%rip), %rax
	movl	%r12d, %r15d
	movq	(%rax), %rsi
	addq	%r15, %rsi
	movl	$112, %edx
	xorl	%ecx, %ecx
	callq	_regmap_update_bits
	movl	24(%rbx), %edi
	movq	_ADV7511_REG_CEC_CLK_DIV@GOTPCREL(%rip), %rax
	addq	(%rax), %r15
	movq	%r15, %rsi
	movl	$3, %edx
	xorl	%ecx, %ecx
	callq	_regmap_update_bits
	movq	$0, 16(%rbx)
LBB0_10:
	movl	%r14d, 8(%rbx)
	xorl	%eax, %eax
LBB0_11:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ADV7533,8,3                    ## @ADV7533
	.comm	_ADV7533_REG_CEC_OFFSET,4,2     ## @ADV7533_REG_CEC_OFFSET
	.comm	_EIO,4,2                        ## @EIO
	.comm	_ADV7511_REG_CEC_CLK_DIV,8,3    ## @ADV7511_REG_CEC_CLK_DIV
	.comm	_ADV7511_REG_CEC_RX_BUFFERS,8,3 ## @ADV7511_REG_CEC_RX_BUFFERS
	.comm	_ADV7511_REG_CEC_TX_ENABLE,8,3  ## @ADV7511_REG_CEC_TX_ENABLE
	.comm	_ADV7511_INT1_CEC_MASK,4,2      ## @ADV7511_INT1_CEC_MASK
	.comm	_ADV7511_REG_CEC_LOG_ADDR_MASK,8,3 ## @ADV7511_REG_CEC_LOG_ADDR_MASK
	.no_dead_strip	_adv7511_cec_adap_enable
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function adv7511_cec_adap_enable
_adv7511_cec_adap_enable:               ; @adv7511_cec_adap_enable
	.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, x1
	bl	_cec_get_drvdata
	ldr	x8, [x0]
Lloh0:
	adrp	x9, _ADV7533@GOTPAGE
Lloh1:
	ldr	x9, [x9, _ADV7533@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
Lloh3:
	adrp	x10, _ADV7533_REG_CEC_OFFSET@GOTPAGE
Lloh4:
	ldr	x10, [x10, _ADV7533_REG_CEC_OFFSET@GOTPAGEOFF]
Lloh5:
	ldr	w10, [x10]
	cmp	x8, x9
	csel	w22, w10, wzr, eq
	ldr	x8, [x0, #32]
	cbz	x8, LBB0_4
; %bb.1:
	mov	x20, x0
	ldr	w8, [x0, #8]
	cbz	w19, LBB0_5
; %bb.2:
	cbnz	w8, LBB0_5
; %bb.3:
	ldr	w0, [x20, #24]
Lloh6:
	adrp	x8, _ADV7511_REG_CEC_CLK_DIV@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ADV7511_REG_CEC_CLK_DIV@GOTPAGEOFF]
Lloh8:
	ldr	x8, [x8]
	add	x1, x8, x22
	mov	w2, #3
	mov	w3, #1
	bl	_regmap_update_bits
	ldr	w0, [x20, #24]
Lloh9:
	adrp	x21, _ADV7511_REG_CEC_RX_BUFFERS@GOTPAGE
Lloh10:
	ldr	x21, [x21, _ADV7511_REG_CEC_RX_BUFFERS@GOTPAGEOFF]
	ldr	x8, [x21]
	add	x1, x8, x22
	mov	w2, #7
	bl	_regmap_write
	ldr	w0, [x20, #24]
	ldr	x8, [x21]
	add	x1, x8, x22
	mov	w2, #0
	bl	_regmap_write
	ldr	w0, [x20, #24]
Lloh11:
	adrp	x8, _ADV7511_REG_CEC_TX_ENABLE@GOTPAGE
Lloh12:
	ldr	x8, [x8, _ADV7511_REG_CEC_TX_ENABLE@GOTPAGEOFF]
Lloh13:
	ldr	x8, [x8]
	add	x1, x8, x22
	mov	w2, #1
	mov	w3, #0
	bl	_regmap_update_bits
	ldr	w21, [x20, #28]
	mov	w0, #1
	bl	_ADV7511_REG_INT_ENABLE
	mov	x1, x0
Lloh14:
	adrp	x8, _ADV7511_INT1_CEC_MASK@GOTPAGE
Lloh15:
	ldr	x8, [x8, _ADV7511_INT1_CEC_MASK@GOTPAGEOFF]
Lloh16:
	ldr	w3, [x8]
	mov	x0, x21
	mov	w2, #63
	bl	_regmap_update_bits
	b	LBB0_8
LBB0_4:
Lloh17:
	adrp	x8, _EIO@GOTPAGE
Lloh18:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_9
LBB0_5:
	cbnz	w19, LBB0_8
; %bb.6:
	cbz	w8, LBB0_8
; %bb.7:
	ldr	w21, [x20, #28]
	mov	w0, #1
	bl	_ADV7511_REG_INT_ENABLE
	mov	x1, x0
	mov	x0, x21
	mov	w2, #63
	mov	w3, #0
	bl	_regmap_update_bits
	ldr	w0, [x20, #24]
Lloh20:
	adrp	x8, _ADV7511_REG_CEC_LOG_ADDR_MASK@GOTPAGE
Lloh21:
	ldr	x8, [x8, _ADV7511_REG_CEC_LOG_ADDR_MASK@GOTPAGEOFF]
Lloh22:
	ldr	x8, [x8]
	add	x1, x8, x22
	mov	w2, #112
	mov	w3, #0
	bl	_regmap_update_bits
	ldr	w0, [x20, #24]
Lloh23:
	adrp	x8, _ADV7511_REG_CEC_CLK_DIV@GOTPAGE
Lloh24:
	ldr	x8, [x8, _ADV7511_REG_CEC_CLK_DIV@GOTPAGEOFF]
Lloh25:
	ldr	x8, [x8]
	add	x1, x8, x22
	mov	w2, #3
	mov	w3, #0
	bl	_regmap_update_bits
	str	xzr, [x20, #16]
LBB0_8:
	mov	w0, #0
	str	w19, [x20, #8]
LBB0_9:
	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	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.comm	_ADV7533,8,3                    ; @ADV7533
	.comm	_ADV7533_REG_CEC_OFFSET,4,2     ; @ADV7533_REG_CEC_OFFSET
	.comm	_EIO,4,2                        ; @EIO
	.comm	_ADV7511_REG_CEC_CLK_DIV,8,3    ; @ADV7511_REG_CEC_CLK_DIV
	.comm	_ADV7511_REG_CEC_RX_BUFFERS,8,3 ; @ADV7511_REG_CEC_RX_BUFFERS
	.comm	_ADV7511_REG_CEC_TX_ENABLE,8,3  ; @ADV7511_REG_CEC_TX_ENABLE
	.comm	_ADV7511_INT1_CEC_MASK,4,2      ; @ADV7511_INT1_CEC_MASK
	.comm	_ADV7511_REG_CEC_LOG_ADDR_MASK,8,3 ; @ADV7511_REG_CEC_LOG_ADDR_MASK
	.no_dead_strip	_adv7511_cec_adap_enable
.subsections_via_symbols
