	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_adv7511_cec_init               ## -- Begin function adv7511_cec_init
	.p2align	4, 0x90
_adv7511_cec_init:                      ## @adv7511_cec_init
	.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
	movq	%rsi, %r12
	movq	%rdi, %r13
	movq	(%rsi), %rax
	movq	_ADV7533@GOTPCREL(%rip), %rcx
	xorl	%ebx, %ebx
	cmpq	(%rcx), %rax
	jne	LBB0_2
## %bb.1:
	movq	_ADV7533_REG_CEC_OFFSET@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
LBB0_2:
	movq	%r13, %rdi
	movq	%r12, %rsi
	callq	_adv7511_cec_parse_dt
	movl	%eax, %r14d
	movl	%ebx, %r15d
	testl	%eax, %eax
	jne	LBB0_8
## %bb.3:
	movq	%r13, %rdi
	callq	_dev_name
	movq	_CEC_CAP_DEFAULTS@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movq	_ADV7511_MAX_ADDRS@GOTPCREL(%rip), %rdx
	movl	(%rdx), %r8d
	movq	_adv7511_cec_adap_ops@GOTPCREL(%rip), %rdi
	movq	%r12, %rsi
	movl	%eax, %edx
	callq	_cec_allocate_adapter
	movq	%rax, 16(%r12)
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	movq	16(%r12), %rdi
	callq	_PTR_ERR
	movl	%eax, %r14d
	jmp	LBB0_7
LBB0_5:
	movl	12(%r12), %edi
	movq	_ADV7511_REG_CEC_CTRL@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	%r15, %rsi
	movq	%r13, %r14
	xorl	%r13d, %r13d
	xorl	%edx, %edx
	callq	_regmap_write
	movl	24(%r12), %edi
	movq	_ADV7511_REG_CEC_SOFT_RESET@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rsi
	addq	%r15, %rsi
	movl	$1, %edx
	callq	_regmap_write
	movl	24(%r12), %edi
	movq	(%rbx), %rsi
	addq	%r15, %rsi
	xorl	%edx, %edx
	callq	_regmap_write
	movl	24(%r12), %edi
	movq	_ADV7511_REG_CEC_RX_BUFFERS@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	%r15, %rsi
	xorl	%edx, %edx
	callq	_regmap_write
	movl	24(%r12), %edi
	movq	_ADV7511_REG_CEC_CLK_DIV@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	%r15, %rsi
	movslq	8(%r12), %rax
	imulq	$375299969, %rax, %rax          ## imm = 0x165E9F81
	movq	%rax, %rcx
	shrq	$63, %rcx
	sarq	$48, %rax
	addl	%ecx, %eax
	leal	-4(,%rax,4), %edx
	callq	_regmap_write
	movq	16(%r12), %rdi
	movq	%r14, %rbx
	movq	%r14, %rsi
	callq	_cec_register_adapter
	testl	%eax, %eax
	je	LBB0_9
## %bb.6:
	movl	%eax, %r14d
	movq	16(%r12), %rdi
	callq	_cec_delete_adapter
	movq	$0, 16(%r12)
	movq	%rbx, %r13
LBB0_7:
	leaq	L_.str(%rip), %rsi
	movq	%r13, %rdi
	movl	%r14d, %edx
	callq	_dev_info
LBB0_8:
	movl	12(%r12), %edi
	movq	_ADV7511_REG_CEC_CTRL@GOTPCREL(%rip), %rax
	addq	(%rax), %r15
	movq	_ADV7511_CEC_CTRL_POWER_DOWN@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rsi
	callq	_regmap_write
	movq	_EPROBE_DEFER@GOTPCREL(%rip), %rax
	xorl	%r13d, %r13d
	movl	(%rax), %eax
	addl	%r14d, %eax
	cmovel	%r14d, %r13d
LBB0_9:
	movl	%r13d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	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	_adv7511_cec_adap_ops,4,2       ## @adv7511_cec_adap_ops
	.comm	_CEC_CAP_DEFAULTS,4,2           ## @CEC_CAP_DEFAULTS
	.comm	_ADV7511_MAX_ADDRS,4,2          ## @ADV7511_MAX_ADDRS
	.comm	_ADV7511_REG_CEC_CTRL,8,3       ## @ADV7511_REG_CEC_CTRL
	.comm	_ADV7511_REG_CEC_SOFT_RESET,8,3 ## @ADV7511_REG_CEC_SOFT_RESET
	.comm	_ADV7511_REG_CEC_RX_BUFFERS,8,3 ## @ADV7511_REG_CEC_RX_BUFFERS
	.comm	_ADV7511_REG_CEC_CLK_DIV,8,3    ## @ADV7511_REG_CEC_CLK_DIV
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Initializing CEC failed with error %d, disabling CEC\n"

	.comm	_ADV7511_CEC_CTRL_POWER_DOWN,4,2 ## @ADV7511_CEC_CTRL_POWER_DOWN
	.comm	_EPROBE_DEFER,4,2               ## @EPROBE_DEFER
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_adv7511_cec_init               ; -- Begin function adv7511_cec_init
	.p2align	2
_adv7511_cec_init:                      ; @adv7511_cec_init
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x19, x1
	mov	x20, x0
	ldr	x8, [x1]
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
	bl	_adv7511_cec_parse_dt
	mov	x21, x0
Lloh6:
	adrp	x23, _ADV7511_REG_CEC_CTRL@GOTPAGE
Lloh7:
	ldr	x23, [x23, _ADV7511_REG_CEC_CTRL@GOTPAGEOFF]
	cbnz	w0, LBB0_6
; %bb.1:
	mov	x0, x20
	bl	_dev_name
	mov	x2, x0
Lloh8:
	adrp	x8, _CEC_CAP_DEFAULTS@GOTPAGE
Lloh9:
	ldr	x8, [x8, _CEC_CAP_DEFAULTS@GOTPAGEOFF]
Lloh10:
	ldr	w3, [x8]
Lloh11:
	adrp	x8, _ADV7511_MAX_ADDRS@GOTPAGE
Lloh12:
	ldr	x8, [x8, _ADV7511_MAX_ADDRS@GOTPAGEOFF]
Lloh13:
	ldr	w4, [x8]
Lloh14:
	adrp	x0, _adv7511_cec_adap_ops@GOTPAGE
Lloh15:
	ldr	x0, [x0, _adv7511_cec_adap_ops@GOTPAGEOFF]
	mov	x1, x19
	bl	_cec_allocate_adapter
	str	x0, [x19, #16]
	bl	_IS_ERR
	cbz	x0, LBB0_3
; %bb.2:
	ldr	x0, [x19, #16]
	bl	_PTR_ERR
	mov	x21, x0
	b	LBB0_5
LBB0_3:
	ldr	w0, [x19, #12]
	ldr	x8, [x23]
	add	x1, x8, x22
	mov	w2, #0
	bl	_regmap_write
	ldr	w0, [x19, #24]
Lloh16:
	adrp	x21, _ADV7511_REG_CEC_SOFT_RESET@GOTPAGE
Lloh17:
	ldr	x21, [x21, _ADV7511_REG_CEC_SOFT_RESET@GOTPAGEOFF]
	ldr	x8, [x21]
	add	x1, x8, x22
	mov	w2, #1
	bl	_regmap_write
	ldr	w0, [x19, #24]
	ldr	x8, [x21]
	add	x1, x8, x22
	mov	w2, #0
	bl	_regmap_write
	ldr	w0, [x19, #24]
Lloh18:
	adrp	x8, _ADV7511_REG_CEC_RX_BUFFERS@GOTPAGE
Lloh19:
	ldr	x8, [x8, _ADV7511_REG_CEC_RX_BUFFERS@GOTPAGEOFF]
Lloh20:
	ldr	x8, [x8]
	add	x1, x8, x22
	mov	w2, #0
	bl	_regmap_write
	ldr	w0, [x19, #24]
Lloh21:
	adrp	x8, _ADV7511_REG_CEC_CLK_DIV@GOTPAGE
Lloh22:
	ldr	x8, [x8, _ADV7511_REG_CEC_CLK_DIV@GOTPAGEOFF]
Lloh23:
	ldr	x8, [x8]
	add	x1, x8, x22
	ldrsw	x8, [x19, #8]
	mov	w9, #40833
	movk	w9, #5726, lsl #16
	mul	x8, x8, x9
	lsr	x9, x8, #63
	asr	x8, x8, #48
	add	w8, w8, w9
	lsl	w8, w8, #2
	sub	w2, w8, #4
	bl	_regmap_write
	ldr	x0, [x19, #16]
	mov	x1, x20
	bl	_cec_register_adapter
	cbz	w0, LBB0_7
; %bb.4:
	mov	x21, x0
	ldr	x0, [x19, #16]
	bl	_cec_delete_adapter
	str	xzr, [x19, #16]
LBB0_5:
Lloh24:
	adrp	x1, l_.str@PAGE
Lloh25:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	mov	x2, x21
	bl	_dev_info
LBB0_6:
	ldr	w0, [x19, #12]
	ldr	x8, [x23]
	add	x1, x8, w22, uxtw
Lloh26:
	adrp	x8, _ADV7511_CEC_CTRL_POWER_DOWN@GOTPAGE
Lloh27:
	ldr	x8, [x8, _ADV7511_CEC_CTRL_POWER_DOWN@GOTPAGEOFF]
Lloh28:
	ldr	w2, [x8]
	bl	_regmap_write
Lloh29:
	adrp	x8, _EPROBE_DEFER@GOTPAGE
Lloh30:
	ldr	x8, [x8, _EPROBE_DEFER@GOTPAGEOFF]
Lloh31:
	ldr	w8, [x8]
	cmn	w21, w8
	csel	w0, w21, wzr, eq
LBB0_7:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.cfi_endproc
                                        ; -- End function
	.comm	_ADV7533,8,3                    ; @ADV7533
	.comm	_ADV7533_REG_CEC_OFFSET,4,2     ; @ADV7533_REG_CEC_OFFSET
	.comm	_adv7511_cec_adap_ops,4,2       ; @adv7511_cec_adap_ops
	.comm	_CEC_CAP_DEFAULTS,4,2           ; @CEC_CAP_DEFAULTS
	.comm	_ADV7511_MAX_ADDRS,4,2          ; @ADV7511_MAX_ADDRS
	.comm	_ADV7511_REG_CEC_CTRL,8,3       ; @ADV7511_REG_CEC_CTRL
	.comm	_ADV7511_REG_CEC_SOFT_RESET,8,3 ; @ADV7511_REG_CEC_SOFT_RESET
	.comm	_ADV7511_REG_CEC_RX_BUFFERS,8,3 ; @ADV7511_REG_CEC_RX_BUFFERS
	.comm	_ADV7511_REG_CEC_CLK_DIV,8,3    ; @ADV7511_REG_CEC_CLK_DIV
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Initializing CEC failed with error %d, disabling CEC\n"

	.comm	_ADV7511_CEC_CTRL_POWER_DOWN,4,2 ; @ADV7511_CEC_CTRL_POWER_DOWN
	.comm	_EPROBE_DEFER,4,2               ; @EPROBE_DEFER
.subsections_via_symbols
