	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	___cec_s_log_addrs              ## -- Begin function __cec_s_log_addrs
	.p2align	4, 0x90
___cec_s_log_addrs:                     ## @__cec_s_log_addrs
	.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
	cmpq	$0, 104(%rdi)
	je	LBB0_2
## %bb.1:
	movq	_ENODEV@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
LBB0_65:
	subl	(%rax), %r15d
	jmp	LBB0_66
LBB0_2:
	movq	%rsi, %r15
	movq	%rdi, %r12
	testq	%rsi, %rsi
	je	LBB0_8
## %bb.3:
	cmpl	$0, (%r15)
	je	LBB0_8
## %bb.4:
	movl	%edx, %r14d
	movq	_CEC_LOG_ADDRS_FL_CDC_ONLY@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, 32(%r15)
	je	LBB0_6
## %bb.5:
	movl	$1, (%r15)
	movq	8(%r15), %rax
	movb	$0, (%rax)
	movq	_CEC_VENDOR_ID_NONE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 16(%r15)
	movq	_CEC_LOG_ADDR_TYPE_UNREGISTERED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	40(%r15), %rcx
	movl	%eax, (%rcx)
	movq	_CEC_OP_PRIM_DEVTYPE_SWITCH@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	48(%r15), %rcx
	movl	%eax, (%rcx)
	movq	72(%r15), %rax
	movq	$0, (%rax)
	movq	56(%r15), %rax
	movq	(%rax), %rax
	movq	$0, (%rax)
LBB0_6:
	movq	8(%r15), %rax
	movb	$0, 7(%rax)
	movl	(%r15), %eax
	movl	(%r12), %edx
	cmpl	%edx, %eax
	jle	LBB0_11
## %bb.7:
	leaq	L_.str(%rip), %rsi
	xorl	%r15d, %r15d
	movl	$1, %edi
	xorl	%eax, %eax
	callq	_dprintk
	jmp	LBB0_64
LBB0_8:
	movq	%r12, %rdi
	callq	_cec_adap_unconfigure
	movl	$0, 16(%r12)
	movq	_CEC_MAX_LOG_ADDRS@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	testl	%edx, %edx
	jle	LBB0_19
## %bb.9:
	leaq	-1(%rdx), %rcx
	movl	%edx, %eax
	andl	$3, %eax
	cmpq	$3, %rcx
	jae	LBB0_14
## %bb.10:
	xorl	%ecx, %ecx
	jmp	LBB0_16
LBB0_11:
	movslq	16(%r15), %rcx
	movq	_CEC_VENDOR_ID_NONE@GOTPCREL(%rip), %rdx
	cmpq	%rcx, (%rdx)
	je	LBB0_20
## %bb.12:
	cmpl	$16777216, %ecx                 ## imm = 0x1000000
	jb	LBB0_20
## %bb.13:
	leaq	L_.str.1(%rip), %rsi
	jmp	LBB0_63
LBB0_14:
	andl	$-4, %edx
	xorl	%ecx, %ecx
	movq	_CEC_LOG_ADDR_INVALID@GOTPCREL(%rip), %rsi
	.p2align	4, 0x90
LBB0_15:                                ## =>This Inner Loop Header: Depth=1
	movq	(%rsi), %rdi
	movq	96(%r12), %rbx
	movq	%rdi, (%rbx,%rcx,8)
	movq	(%rsi), %rdi
	movq	96(%r12), %rbx
	movq	%rdi, 8(%rbx,%rcx,8)
	movq	(%rsi), %rdi
	movq	96(%r12), %rbx
	movq	%rdi, 16(%rbx,%rcx,8)
	movq	(%rsi), %rdi
	movq	96(%r12), %rbx
	movq	%rdi, 24(%rbx,%rcx,8)
	addq	$4, %rcx
	cmpq	%rcx, %rdx
	jne	LBB0_15
LBB0_16:
	testq	%rax, %rax
	je	LBB0_19
## %bb.17:
	movq	_CEC_LOG_ADDR_INVALID@GOTPCREL(%rip), %rdx
	.p2align	4, 0x90
LBB0_18:                                ## =>This Inner Loop Header: Depth=1
	movq	(%rdx), %rsi
	movq	96(%r12), %rdi
	movq	%rsi, (%rdi,%rcx,8)
	incq	%rcx
	decq	%rax
	jne	LBB0_18
LBB0_19:
	movq	24(%r12), %rax
	movb	$0, (%rax)
	movq	_CEC_VENDOR_ID_NONE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 32(%r12)
	movq	_CEC_OP_CEC_VERSION_2_0@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 40(%r12)
	xorl	%r15d, %r15d
LBB0_66:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_20:
	movq	24(%r15), %rcx
	movq	_CEC_OP_CEC_VERSION_1_4@GOTPCREL(%rip), %rdx
	movq	_CEC_OP_CEC_VERSION_2_0@GOTPCREL(%rip), %rsi
	movq	(%rsi), %r8
	cmpq	(%rdx), %rcx
	je	LBB0_23
## %bb.21:
	cmpq	%r8, %rcx
	je	LBB0_23
## %bb.22:
	leaq	L_.str.2(%rip), %rsi
	jmp	LBB0_63
LBB0_23:
	cmpl	$2, %eax
	jl	LBB0_27
## %bb.24:
	movq	40(%r15), %rsi
	movq	_CEC_LOG_ADDR_TYPE_UNREGISTERED@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edi
	xorl	%edx, %edx
LBB0_25:                                ## =>This Inner Loop Header: Depth=1
	cmpl	%edi, (%rsi,%rdx,4)
	je	LBB0_50
## %bb.26:                              ##   in Loop: Header=BB0_25 Depth=1
	incq	%rdx
	cmpq	%rdx, %rax
	jne	LBB0_25
LBB0_27:
	testl	%eax, %eax
	jle	LBB0_43
## %bb.28:
	xorl	%r13d, %r13d
	movq	_CEC_LOG_ADDR_INVALID@GOTPCREL(%rip), %rbx
	movl	$0, -44(%rbp)                   ## 4-byte Folded Spill
LBB0_29:                                ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_38 Depth 2
	movq	56(%r15), %rax
	movq	(%rax), %rdi
	callq	_ARRAY_SIZE
	movq	56(%r15), %rcx
	movq	80(%r15), %rdx
	movq	(%rcx,%r13,8), %rdi
	movq	(%rbx), %rcx
	movq	%rcx, (%rdx,%r13,8)
	movq	40(%r15), %rcx
	movl	(%rcx,%r13,4), %ecx
	movl	$1, %edx
	shll	%cl, %edx
	movl	-44(%rbp), %r8d                 ## 4-byte Reload
	btl	%ecx, %r8d
	jb	LBB0_57
## %bb.30:                              ##   in Loop: Header=BB0_29 Depth=1
	orl	%edx, %r8d
	movq	_CEC_LOG_ADDR_TYPE_RECORD@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	btl	%edx, %r8d
	jae	LBB0_32
## %bb.31:                              ##   in Loop: Header=BB0_29 Depth=1
	movq	_CEC_LOG_ADDR_TYPE_PLAYBACK@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	btl	%edx, %r8d
	jb	LBB0_62
LBB0_32:                                ##   in Loop: Header=BB0_29 Depth=1
	movq	48(%r15), %rdx
	movl	(%rdx,%r13,4), %edx
	movq	_CEC_OP_PRIM_DEVTYPE_PROCESSOR@GOTPCREL(%rip), %rsi
	cmpl	(%rsi), %edx
	jg	LBB0_58
## %bb.33:                              ##   in Loop: Header=BB0_29 Depth=1
	cmpl	$2, %edx
	je	LBB0_59
## %bb.34:                              ##   in Loop: Header=BB0_29 Depth=1
	movq	_CEC_LOG_ADDR_TYPE_UNREGISTERED@GOTPCREL(%rip), %rdx
	cmpl	(%rdx), %ecx
	jg	LBB0_60
## %bb.35:                              ##   in Loop: Header=BB0_29 Depth=1
	testl	%eax, %eax
	je	LBB0_42
## %bb.36:                              ##   in Loop: Header=BB0_29 Depth=1
	movl	%eax, %ecx
	addq	$4, %rdi
	xorl	%edx, %edx
	xorl	%esi, %esi
	jmp	LBB0_38
	.p2align	4, 0x90
LBB0_37:                                ##   in Loop: Header=BB0_38 Depth=2
	incq	%rdx
	addq	$4, %rdi
	cmpq	%rdx, %rcx
	je	LBB0_42
LBB0_38:                                ##   Parent Loop BB0_29 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	testb	$-128, -4(%rdi)
	jne	LBB0_37
## %bb.39:                              ##   in Loop: Header=BB0_38 Depth=2
	testl	%esi, %esi
	movl	$1, %esi
	je	LBB0_37
## %bb.40:                              ##   in Loop: Header=BB0_29 Depth=1
	notl	%edx
	addl	%eax, %edx
	xorl	%esi, %esi
                                        ## kill: def $edx killed $edx killed $rdx
	movl	%r8d, -44(%rbp)                 ## 4-byte Spill
	callq	_memset
	incq	%r13
	movslq	(%r15), %rax
	cmpq	%rax, %r13
	jl	LBB0_29
## %bb.41:
	movq	24(%r15), %rcx
	movq	_CEC_OP_CEC_VERSION_2_0@GOTPCREL(%rip), %rdx
	movq	(%rdx), %r8
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	jmp	LBB0_44
LBB0_42:
	leaq	L_.str.9(%rip), %rsi
	jmp	LBB0_63
LBB0_43:
	xorl	%edi, %edi
LBB0_44:
	cmpq	%r8, %rcx
	jge	LBB0_51
LBB0_45:
	movq	_CEC_MAX_LOG_ADDRS@GOTPCREL(%rip), %rbx
	cmpl	(%rbx), %eax
	jge	LBB0_48
## %bb.46:
	movslq	%eax, %r13
LBB0_47:                                ## =>This Inner Loop Header: Depth=1
	movq	48(%r15), %rax
	movl	$0, (%rax,%r13,4)
	movq	40(%r15), %rax
	movl	$0, (%rax,%r13,4)
	movq	72(%r15), %rax
	movq	$0, (%rax,%r13,8)
	movq	56(%r15), %rax
	movq	(%rax,%r13,8), %rdi
	xorl	%esi, %esi
	movl	$8, %edx
	callq	_memset
	incq	%r13
	movslq	(%rbx), %rax
	cmpq	%rax, %r13
	jl	LBB0_47
LBB0_48:
	movl	80(%r12), %eax
	movl	%eax, 64(%r15)
	movq	80(%r15), %rax
	movq	%rax, 96(%r12)
	movups	(%r15), %xmm0
	movups	16(%r15), %xmm1
	movups	32(%r15), %xmm2
	movups	48(%r15), %xmm3
	movups	%xmm3, 64(%r12)
	movups	%xmm2, 48(%r12)
	movups	%xmm1, 32(%r12)
	movups	%xmm0, 16(%r12)
	movups	64(%r15), %xmm0
	movups	%xmm0, 80(%r12)
	movq	8(%r12), %rax
	movq	_CEC_PHYS_ADDR_INVALID@GOTPCREL(%rip), %rcx
	xorl	%r15d, %r15d
	cmpq	(%rcx), %rax
	je	LBB0_66
## %bb.49:
	movq	%r12, %rdi
	movl	%r14d, %esi
	callq	_cec_claim_log_addrs
	jmp	LBB0_66
LBB0_50:
	leaq	L_.str.3(%rip), %rsi
	jmp	LBB0_63
LBB0_51:
	cmpl	$3, %eax
	jl	LBB0_53
## %bb.52:
	leaq	L_.str.10(%rip), %rsi
	jmp	LBB0_63
LBB0_53:
	cmpl	$2, %eax
	jne	LBB0_45
## %bb.54:
	movq	_CEC_LOG_ADDR_TYPE_AUDIOSYSTEM@GOTPCREL(%rip), %rdx
	movq	_CEC_LOG_ADDR_TYPE_TV@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	movl	$1, %esi
	shll	%cl, %esi
	movb	(%rdx), %cl
	movl	$1, %edx
	btsl	%ecx, %esi
	testl	%edi, %esi
	je	LBB0_61
## %bb.55:
	movq	_CEC_LOG_ADDR_TYPE_RECORD@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shll	%cl, %edx
	movq	_CEC_LOG_ADDR_TYPE_PLAYBACK@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	btsl	%ecx, %edx
	testl	%edi, %edx
	jne	LBB0_45
## %bb.56:
	leaq	L_.str.12(%rip), %rsi
	jmp	LBB0_63
LBB0_57:
	leaq	L_.str.4(%rip), %rsi
	jmp	LBB0_63
LBB0_58:
	leaq	L_.str.6(%rip), %rsi
	jmp	LBB0_63
LBB0_59:
	leaq	L_.str.7(%rip), %rsi
	jmp	LBB0_63
LBB0_60:
	leaq	L_.str.8(%rip), %rsi
	jmp	LBB0_63
LBB0_61:
	leaq	L_.str.11(%rip), %rsi
	jmp	LBB0_63
LBB0_62:
	leaq	L_.str.5(%rip), %rsi
LBB0_63:
	xorl	%r15d, %r15d
	movl	$1, %edi
	xorl	%eax, %eax
	callq	_dprintk
LBB0_64:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_65
	.cfi_endproc
                                        ## -- End function
	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_CEC_MAX_LOG_ADDRS,4,2          ## @CEC_MAX_LOG_ADDRS
	.comm	_CEC_LOG_ADDR_INVALID,8,3       ## @CEC_LOG_ADDR_INVALID
	.comm	_CEC_VENDOR_ID_NONE,8,3         ## @CEC_VENDOR_ID_NONE
	.comm	_CEC_OP_CEC_VERSION_2_0,8,3     ## @CEC_OP_CEC_VERSION_2_0
	.comm	_CEC_LOG_ADDRS_FL_CDC_ONLY,4,2  ## @CEC_LOG_ADDRS_FL_CDC_ONLY
	.comm	_CEC_LOG_ADDR_TYPE_UNREGISTERED,4,2 ## @CEC_LOG_ADDR_TYPE_UNREGISTERED
	.comm	_CEC_OP_PRIM_DEVTYPE_SWITCH,4,2 ## @CEC_OP_PRIM_DEVTYPE_SWITCH
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"num_log_addrs > %d\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
L_.str.1:                               ## @.str.1
	.asciz	"invalid vendor ID\n"

	.comm	_CEC_OP_CEC_VERSION_1_4,8,3     ## @CEC_OP_CEC_VERSION_1_4
L_.str.2:                               ## @.str.2
	.asciz	"invalid CEC version\n"

L_.str.3:                               ## @.str.3
	.asciz	"num_log_addrs > 1 can't be combined with unregistered LA\n"

L_.str.4:                               ## @.str.4
	.asciz	"duplicate logical address type\n"

	.comm	_CEC_LOG_ADDR_TYPE_RECORD,4,2   ## @CEC_LOG_ADDR_TYPE_RECORD
	.comm	_CEC_LOG_ADDR_TYPE_PLAYBACK,4,2 ## @CEC_LOG_ADDR_TYPE_PLAYBACK
L_.str.5:                               ## @.str.5
	.asciz	"invalid record + playback combination\n"

	.comm	_CEC_OP_PRIM_DEVTYPE_PROCESSOR,4,2 ## @CEC_OP_PRIM_DEVTYPE_PROCESSOR
L_.str.6:                               ## @.str.6
	.asciz	"unknown primary device type\n"

L_.str.7:                               ## @.str.7
	.asciz	"invalid primary device type\n"

L_.str.8:                               ## @.str.8
	.asciz	"unknown logical address type\n"

L_.str.9:                               ## @.str.9
	.asciz	"malformed features\n"

L_.str.10:                              ## @.str.10
	.asciz	"CEC 2.0 allows no more than 2 logical addresses\n"

	.comm	_CEC_LOG_ADDR_TYPE_AUDIOSYSTEM,4,2 ## @CEC_LOG_ADDR_TYPE_AUDIOSYSTEM
	.comm	_CEC_LOG_ADDR_TYPE_TV,4,2       ## @CEC_LOG_ADDR_TYPE_TV
L_.str.11:                              ## @.str.11
	.asciz	"two LAs is only allowed for audiosystem and TV\n"

L_.str.12:                              ## @.str.12
	.asciz	"an audiosystem/TV can only be combined with record or playback\n"

	.comm	_CEC_PHYS_ADDR_INVALID,8,3      ## @CEC_PHYS_ADDR_INVALID
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	___cec_s_log_addrs              ; -- Begin function __cec_s_log_addrs
	.p2align	2
___cec_s_log_addrs:                     ; @__cec_s_log_addrs
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	ldr	x8, [x0, #104]
	cbz	x8, LBB0_3
; %bb.1:
Lloh0:
	adrp	x8, _ENODEV@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
LBB0_2:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_13
LBB0_3:
	mov	x21, x1
	mov	x19, x0
Lloh2:
	adrp	x22, _CEC_VENDOR_ID_NONE@GOTPAGE
Lloh3:
	ldr	x22, [x22, _CEC_VENDOR_ID_NONE@GOTPAGEOFF]
	cbz	x1, LBB0_9
; %bb.4:
	ldr	w8, [x21]
	cbz	w8, LBB0_9
; %bb.5:
	mov	x20, x2
	ldr	w8, [x21, #32]
Lloh4:
	adrp	x9, _CEC_LOG_ADDRS_FL_CDC_ONLY@GOTPAGE
Lloh5:
	ldr	x9, [x9, _CEC_LOG_ADDRS_FL_CDC_ONLY@GOTPAGEOFF]
Lloh6:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_7
; %bb.6:
	mov	w8, #1
	str	w8, [x21]
	ldr	x8, [x21, #8]
	strb	wzr, [x8]
	ldr	x8, [x22]
	str	w8, [x21, #16]
Lloh7:
	adrp	x8, _CEC_LOG_ADDR_TYPE_UNREGISTERED@GOTPAGE
Lloh8:
	ldr	x8, [x8, _CEC_LOG_ADDR_TYPE_UNREGISTERED@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	ldp	x9, x10, [x21, #40]
	str	w8, [x9]
Lloh10:
	adrp	x8, _CEC_OP_PRIM_DEVTYPE_SWITCH@GOTPAGE
Lloh11:
	ldr	x8, [x8, _CEC_OP_PRIM_DEVTYPE_SWITCH@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	str	w8, [x10]
	ldr	x8, [x21, #72]
	str	xzr, [x8]
	ldr	x8, [x21, #56]
	ldr	x8, [x8]
	str	xzr, [x8]
LBB0_7:
	ldr	x8, [x21, #8]
	strb	wzr, [x8, #7]
	ldr	w8, [x21]
	ldr	w9, [x19]
	cmp	w8, w9
	b.le	LBB0_14
; %bb.8:
	str	x9, [sp]
Lloh13:
	adrp	x1, l_.str@PAGE
Lloh14:
	add	x1, x1, l_.str@PAGEOFF
	b	LBB0_60
LBB0_9:
	mov	x0, x19
	bl	_cec_adap_unconfigure
	str	wzr, [x19, #16]
Lloh15:
	adrp	x8, _CEC_MAX_LOG_ADDRS@GOTPAGE
Lloh16:
	ldr	x8, [x8, _CEC_MAX_LOG_ADDRS@GOTPAGEOFF]
Lloh17:
	ldr	w9, [x8]
	cmp	w9, #1
	b.lt	LBB0_12
; %bb.10:
	mov	x8, #0
	lsl	x9, x9, #3
Lloh18:
	adrp	x10, _CEC_LOG_ADDR_INVALID@GOTPAGE
Lloh19:
	ldr	x10, [x10, _CEC_LOG_ADDR_INVALID@GOTPAGEOFF]
LBB0_11:                                ; =>This Inner Loop Header: Depth=1
	ldr	x11, [x10]
	ldr	x12, [x19, #96]
	str	x11, [x12, x8]
	add	x8, x8, #8
	cmp	x9, x8
	b.ne	LBB0_11
LBB0_12:
	mov	w0, #0
	ldr	x8, [x19, #24]
	strb	wzr, [x8]
	ldr	x8, [x22]
	str	w8, [x19, #32]
Lloh20:
	adrp	x8, _CEC_OP_CEC_VERSION_2_0@GOTPAGE
Lloh21:
	ldr	x8, [x8, _CEC_OP_CEC_VERSION_2_0@GOTPAGEOFF]
Lloh22:
	ldr	x8, [x8]
	str	x8, [x19, #40]
LBB0_13:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_14:
	ldrsw	x9, [x21, #16]
	ldr	x10, [x22]
	cmp	x10, x9
	lsr	w9, w9, #24
	ccmp	w9, #0, #4, ne
	b.ne	LBB0_36
; %bb.15:
	ldr	x9, [x21, #24]
Lloh23:
	adrp	x10, _CEC_OP_CEC_VERSION_1_4@GOTPAGE
Lloh24:
	ldr	x10, [x10, _CEC_OP_CEC_VERSION_1_4@GOTPAGEOFF]
Lloh25:
	ldr	x11, [x10]
Lloh26:
	adrp	x23, _CEC_OP_CEC_VERSION_2_0@GOTPAGE
Lloh27:
	ldr	x23, [x23, _CEC_OP_CEC_VERSION_2_0@GOTPAGEOFF]
	ldr	x10, [x23]
	cmp	x9, x11
	ccmp	x9, x10, #4, ne
	b.ne	LBB0_37
; %bb.16:
	cmp	w8, #1
	b.le	LBB0_20
; %bb.17:
	ldr	x11, [x21, #40]
Lloh28:
	adrp	x12, _CEC_LOG_ADDR_TYPE_UNREGISTERED@GOTPAGE
Lloh29:
	ldr	x12, [x12, _CEC_LOG_ADDR_TYPE_UNREGISTERED@GOTPAGEOFF]
Lloh30:
	ldr	w12, [x12]
	mov	x13, x8
LBB0_18:                                ; =>This Inner Loop Header: Depth=1
	ldr	w14, [x11]
	cmp	w14, w12
	b.eq	LBB0_47
; %bb.19:                               ;   in Loop: Header=BB0_18 Depth=1
	add	x11, x11, #4
	subs	x13, x13, #1
	b.ne	LBB0_18
LBB0_20:
	cmp	w8, #1
	b.lt	LBB0_39
; %bb.21:
	mov	x24, #0
	mov	w22, #0
Lloh31:
	adrp	x25, _CEC_LOG_ADDR_INVALID@GOTPAGE
Lloh32:
	ldr	x25, [x25, _CEC_LOG_ADDR_INVALID@GOTPAGEOFF]
	mov	w26, #1
Lloh33:
	adrp	x27, _CEC_LOG_ADDR_TYPE_RECORD@GOTPAGE
Lloh34:
	ldr	x27, [x27, _CEC_LOG_ADDR_TYPE_RECORD@GOTPAGEOFF]
Lloh35:
	adrp	x28, _CEC_OP_PRIM_DEVTYPE_PROCESSOR@GOTPAGE
Lloh36:
	ldr	x28, [x28, _CEC_OP_PRIM_DEVTYPE_PROCESSOR@GOTPAGEOFF]
LBB0_22:                                ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_31 Depth 2
	ldr	x8, [x21, #56]
	ldr	x0, [x8]
	bl	_ARRAY_SIZE
	ldr	x8, [x21, #56]
	lsl	x9, x24, #3
	ldr	x8, [x8, x9]
	ldr	x10, [x25]
	ldr	x11, [x21, #80]
	str	x10, [x11, x9]
	ldr	x9, [x21, #40]
	ldr	w9, [x9, x24, lsl #2]
	lsl	w10, w26, w9
	tst	w10, w22
	b.ne	LBB0_54
; %bb.23:                               ;   in Loop: Header=BB0_22 Depth=1
	orr	w22, w10, w22
	ldr	w10, [x27]
	lsr	w10, w22, w10
	tbz	w10, #0, LBB0_25
; %bb.24:                               ;   in Loop: Header=BB0_22 Depth=1
Lloh37:
	adrp	x10, _CEC_LOG_ADDR_TYPE_PLAYBACK@GOTPAGE
Lloh38:
	ldr	x10, [x10, _CEC_LOG_ADDR_TYPE_PLAYBACK@GOTPAGEOFF]
Lloh39:
	ldr	w10, [x10]
	lsr	w10, w22, w10
	tbnz	w10, #0, LBB0_59
LBB0_25:                                ;   in Loop: Header=BB0_22 Depth=1
	ldr	x10, [x21, #48]
	ldr	w10, [x10, x24, lsl #2]
	ldr	w11, [x28]
	cmp	w10, w11
	b.gt	LBB0_55
; %bb.26:                               ;   in Loop: Header=BB0_22 Depth=1
	cmp	w10, #2
	b.eq	LBB0_56
; %bb.27:                               ;   in Loop: Header=BB0_22 Depth=1
Lloh40:
	adrp	x10, _CEC_LOG_ADDR_TYPE_UNREGISTERED@GOTPAGE
Lloh41:
	ldr	x10, [x10, _CEC_LOG_ADDR_TYPE_UNREGISTERED@GOTPAGEOFF]
Lloh42:
	ldr	w10, [x10]
	cmp	w9, w10
	b.gt	LBB0_57
; %bb.28:                               ;   in Loop: Header=BB0_22 Depth=1
	cbz	w0, LBB0_38
; %bb.29:                               ;   in Loop: Header=BB0_22 Depth=1
	mov	w10, #0
	mov	w9, w0
	add	x0, x8, #4
	b	LBB0_31
LBB0_30:                                ;   in Loop: Header=BB0_31 Depth=2
	add	x0, x0, #4
	subs	x9, x9, #1
	b.eq	LBB0_38
LBB0_31:                                ;   Parent Loop BB0_22 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldurb	w8, [x0, #-4]
	tbnz	w8, #7, LBB0_30
; %bb.32:                               ;   in Loop: Header=BB0_31 Depth=2
	cbnz	w10, LBB0_34
; %bb.33:                               ;   in Loop: Header=BB0_31 Depth=2
	mov	w10, #1
	b	LBB0_30
LBB0_34:                                ;   in Loop: Header=BB0_22 Depth=1
	sub	w2, w9, #1
	mov	w1, #0
	bl	_memset
	add	x24, x24, #1
	ldrsw	x8, [x21]
	cmp	x24, x8
	b.lt	LBB0_22
; %bb.35:
	ldr	x9, [x21, #24]
	ldr	x10, [x23]
                                        ; kill: def $w8 killed $w8 killed $x8 def $x8
	b	LBB0_40
LBB0_36:
Lloh43:
	adrp	x1, l_.str.1@PAGE
Lloh44:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_60
LBB0_37:
Lloh45:
	adrp	x1, l_.str.2@PAGE
Lloh46:
	add	x1, x1, l_.str.2@PAGEOFF
	b	LBB0_60
LBB0_38:
Lloh47:
	adrp	x1, l_.str.9@PAGE
Lloh48:
	add	x1, x1, l_.str.9@PAGEOFF
	b	LBB0_60
LBB0_39:
	mov	w22, #0
LBB0_40:
	cmp	x9, x10
	b.ge	LBB0_48
LBB0_41:
Lloh49:
	adrp	x22, _CEC_MAX_LOG_ADDRS@GOTPAGE
Lloh50:
	ldr	x22, [x22, _CEC_MAX_LOG_ADDRS@GOTPAGEOFF]
	ldr	w9, [x22]
	cmp	w8, w9
	b.ge	LBB0_44
; %bb.42:
                                        ; kill: def $w8 killed $w8 killed $x8 def $x8
	sxtw	x23, w8
LBB0_43:                                ; =>This Inner Loop Header: Depth=1
	lsl	x8, x23, #2
	ldp	x10, x9, [x21, #40]
	str	wzr, [x9, x8]
	str	wzr, [x10, x8]
	ldr	x8, [x21, #72]
	lsl	x9, x23, #3
	str	xzr, [x8, x9]
	ldr	x8, [x21, #56]
	ldr	x0, [x8, x9]
	mov	w1, #0
	mov	w2, #8
	bl	_memset
	add	x23, x23, #1
	ldrsw	x8, [x22]
	cmp	x23, x8
	b.lt	LBB0_43
LBB0_44:
	ldr	w8, [x19, #80]
	str	w8, [x21, #64]
	ldp	q0, q1, [x21]
	stp	q0, q1, [x19, #16]
	ldp	q0, q1, [x21, #32]
	ldr	q2, [x21, #64]
	ldr	x8, [x21, #80]
	str	x8, [x19, #96]
	stp	q1, q2, [x19, #64]
	str	q0, [x19, #48]
	ldr	x8, [x19, #8]
Lloh51:
	adrp	x9, _CEC_PHYS_ADDR_INVALID@GOTPAGE
Lloh52:
	ldr	x9, [x9, _CEC_PHYS_ADDR_INVALID@GOTPAGEOFF]
Lloh53:
	ldr	x9, [x9]
	cmp	x8, x9
	b.eq	LBB0_46
; %bb.45:
	mov	x0, x19
	mov	x1, x20
	bl	_cec_claim_log_addrs
LBB0_46:
	mov	w0, #0
	b	LBB0_13
LBB0_47:
Lloh54:
	adrp	x1, l_.str.3@PAGE
Lloh55:
	add	x1, x1, l_.str.3@PAGEOFF
	b	LBB0_60
LBB0_48:
	cmp	w8, #3
	b.lt	LBB0_50
; %bb.49:
Lloh56:
	adrp	x1, l_.str.10@PAGE
Lloh57:
	add	x1, x1, l_.str.10@PAGEOFF
	b	LBB0_60
LBB0_50:
	cmp	w8, #2
	b.ne	LBB0_41
; %bb.51:
Lloh58:
	adrp	x9, _CEC_LOG_ADDR_TYPE_AUDIOSYSTEM@GOTPAGE
Lloh59:
	ldr	x9, [x9, _CEC_LOG_ADDR_TYPE_AUDIOSYSTEM@GOTPAGEOFF]
Lloh60:
	ldr	w10, [x9]
	mov	w9, #1
	lsl	w10, w9, w10
Lloh61:
	adrp	x11, _CEC_LOG_ADDR_TYPE_TV@GOTPAGE
Lloh62:
	ldr	x11, [x11, _CEC_LOG_ADDR_TYPE_TV@GOTPAGEOFF]
Lloh63:
	ldr	w11, [x11]
	lsl	w11, w9, w11
	orr	w10, w11, w10
	tst	w10, w22
	b.eq	LBB0_58
; %bb.52:
Lloh64:
	adrp	x10, _CEC_LOG_ADDR_TYPE_PLAYBACK@GOTPAGE
Lloh65:
	ldr	x10, [x10, _CEC_LOG_ADDR_TYPE_PLAYBACK@GOTPAGEOFF]
Lloh66:
	ldr	w10, [x10]
	lsl	w10, w9, w10
Lloh67:
	adrp	x11, _CEC_LOG_ADDR_TYPE_RECORD@GOTPAGE
Lloh68:
	ldr	x11, [x11, _CEC_LOG_ADDR_TYPE_RECORD@GOTPAGEOFF]
Lloh69:
	ldr	w11, [x11]
	lsl	w9, w9, w11
	orr	w9, w9, w10
	tst	w9, w22
	b.ne	LBB0_41
; %bb.53:
Lloh70:
	adrp	x1, l_.str.12@PAGE
Lloh71:
	add	x1, x1, l_.str.12@PAGEOFF
	b	LBB0_60
LBB0_54:
Lloh72:
	adrp	x1, l_.str.4@PAGE
Lloh73:
	add	x1, x1, l_.str.4@PAGEOFF
	b	LBB0_60
LBB0_55:
Lloh74:
	adrp	x1, l_.str.6@PAGE
Lloh75:
	add	x1, x1, l_.str.6@PAGEOFF
	b	LBB0_60
LBB0_56:
Lloh76:
	adrp	x1, l_.str.7@PAGE
Lloh77:
	add	x1, x1, l_.str.7@PAGEOFF
	b	LBB0_60
LBB0_57:
Lloh78:
	adrp	x1, l_.str.8@PAGE
Lloh79:
	add	x1, x1, l_.str.8@PAGEOFF
	b	LBB0_60
LBB0_58:
Lloh80:
	adrp	x1, l_.str.11@PAGE
Lloh81:
	add	x1, x1, l_.str.11@PAGEOFF
	b	LBB0_60
LBB0_59:
Lloh82:
	adrp	x1, l_.str.5@PAGE
Lloh83:
	add	x1, x1, l_.str.5@PAGEOFF
LBB0_60:
	mov	w0, #1
	bl	_dprintk
Lloh84:
	adrp	x8, _EINVAL@GOTPAGE
Lloh85:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_2
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGot	Lloh35, Lloh36
	.loh AdrpLdrGot	Lloh33, Lloh34
	.loh AdrpLdrGot	Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh39
	.loh AdrpLdrGotLdr	Lloh40, Lloh41, Lloh42
	.loh AdrpAdd	Lloh43, Lloh44
	.loh AdrpAdd	Lloh45, Lloh46
	.loh AdrpAdd	Lloh47, Lloh48
	.loh AdrpLdrGot	Lloh49, Lloh50
	.loh AdrpLdrGotLdr	Lloh51, Lloh52, Lloh53
	.loh AdrpAdd	Lloh54, Lloh55
	.loh AdrpAdd	Lloh56, Lloh57
	.loh AdrpLdrGotLdr	Lloh61, Lloh62, Lloh63
	.loh AdrpLdrGotLdr	Lloh58, Lloh59, Lloh60
	.loh AdrpLdrGotLdr	Lloh67, Lloh68, Lloh69
	.loh AdrpLdrGotLdr	Lloh64, Lloh65, Lloh66
	.loh AdrpAdd	Lloh70, Lloh71
	.loh AdrpAdd	Lloh72, Lloh73
	.loh AdrpAdd	Lloh74, Lloh75
	.loh AdrpAdd	Lloh76, Lloh77
	.loh AdrpAdd	Lloh78, Lloh79
	.loh AdrpAdd	Lloh80, Lloh81
	.loh AdrpAdd	Lloh82, Lloh83
	.loh AdrpLdrGot	Lloh84, Lloh85
	.cfi_endproc
                                        ; -- End function
	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_CEC_MAX_LOG_ADDRS,4,2          ; @CEC_MAX_LOG_ADDRS
	.comm	_CEC_LOG_ADDR_INVALID,8,3       ; @CEC_LOG_ADDR_INVALID
	.comm	_CEC_VENDOR_ID_NONE,8,3         ; @CEC_VENDOR_ID_NONE
	.comm	_CEC_OP_CEC_VERSION_2_0,8,3     ; @CEC_OP_CEC_VERSION_2_0
	.comm	_CEC_LOG_ADDRS_FL_CDC_ONLY,4,2  ; @CEC_LOG_ADDRS_FL_CDC_ONLY
	.comm	_CEC_LOG_ADDR_TYPE_UNREGISTERED,4,2 ; @CEC_LOG_ADDR_TYPE_UNREGISTERED
	.comm	_CEC_OP_PRIM_DEVTYPE_SWITCH,4,2 ; @CEC_OP_PRIM_DEVTYPE_SWITCH
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"num_log_addrs > %d\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
l_.str.1:                               ; @.str.1
	.asciz	"invalid vendor ID\n"

	.comm	_CEC_OP_CEC_VERSION_1_4,8,3     ; @CEC_OP_CEC_VERSION_1_4
l_.str.2:                               ; @.str.2
	.asciz	"invalid CEC version\n"

l_.str.3:                               ; @.str.3
	.asciz	"num_log_addrs > 1 can't be combined with unregistered LA\n"

l_.str.4:                               ; @.str.4
	.asciz	"duplicate logical address type\n"

	.comm	_CEC_LOG_ADDR_TYPE_RECORD,4,2   ; @CEC_LOG_ADDR_TYPE_RECORD
	.comm	_CEC_LOG_ADDR_TYPE_PLAYBACK,4,2 ; @CEC_LOG_ADDR_TYPE_PLAYBACK
l_.str.5:                               ; @.str.5
	.asciz	"invalid record + playback combination\n"

	.comm	_CEC_OP_PRIM_DEVTYPE_PROCESSOR,4,2 ; @CEC_OP_PRIM_DEVTYPE_PROCESSOR
l_.str.6:                               ; @.str.6
	.asciz	"unknown primary device type\n"

l_.str.7:                               ; @.str.7
	.asciz	"invalid primary device type\n"

l_.str.8:                               ; @.str.8
	.asciz	"unknown logical address type\n"

l_.str.9:                               ; @.str.9
	.asciz	"malformed features\n"

l_.str.10:                              ; @.str.10
	.asciz	"CEC 2.0 allows no more than 2 logical addresses\n"

	.comm	_CEC_LOG_ADDR_TYPE_AUDIOSYSTEM,4,2 ; @CEC_LOG_ADDR_TYPE_AUDIOSYSTEM
	.comm	_CEC_LOG_ADDR_TYPE_TV,4,2       ; @CEC_LOG_ADDR_TYPE_TV
l_.str.11:                              ; @.str.11
	.asciz	"two LAs is only allowed for audiosystem and TV\n"

l_.str.12:                              ; @.str.12
	.asciz	"an audiosystem/TV can only be combined with record or playback\n"

	.comm	_CEC_PHYS_ADDR_INVALID,8,3      ; @CEC_PHYS_ADDR_INVALID
.subsections_via_symbols
