	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function drm_dp_cec_adap_log_addr
_drm_dp_cec_adap_log_addr:              ## @drm_dp_cec_adap_log_addr
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r14d
	movq	%rdi, %rbx
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -32(%rbp)
	callq	_cec_get_drvdata
	movq	_CEC_LOG_ADDR_BROADCAST@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	movl	$1, %edx
	shll	%cl, %edx
	movq	_CEC_LOG_ADDR_INVALID@GOTPCREL(%rip), %r15
	cmpl	%r14d, (%r15)
	je	LBB0_2
## %bb.1:
	btsl	%r14d, %edx
	orl	(%rbx), %edx
LBB0_2:
	movzbl	%dl, %ecx
	movl	%ecx, -40(%rbp)
	sarl	$8, %edx
	movl	%edx, -36(%rbp)
	movq	_DP_CEC_LOGICAL_ADDRESS_MASK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	leaq	-40(%rbp), %rdx
	movq	%rax, %rdi
	movl	$2, %ecx
	callq	_drm_dp_dpcd_write
	movq	%rax, %rcx
	sarq	$63, %rcx
	andl	%eax, %ecx
	xorl	%eax, %eax
	cmpl	%r14d, (%r15)
	cmovnel	%ecx, %eax
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-32(%rbp), %rcx
	jne	LBB0_4
## %bb.3:
	addq	$24, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_CEC_LOG_ADDR_BROADCAST,4,2     ## @CEC_LOG_ADDR_BROADCAST
	.comm	_CEC_LOG_ADDR_INVALID,4,2       ## @CEC_LOG_ADDR_INVALID
	.comm	_DP_CEC_LOGICAL_ADDRESS_MASK,4,2 ## @DP_CEC_LOGICAL_ADDRESS_MASK
	.no_dead_strip	_drm_dp_cec_adap_log_addr
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function drm_dp_cec_adap_log_addr
_drm_dp_cec_adap_log_addr:              ; @drm_dp_cec_adap_log_addr
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x19, x1
	mov	x20, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #8]
	bl	_cec_get_drvdata
Lloh3:
	adrp	x8, _CEC_LOG_ADDR_BROADCAST@GOTPAGE
Lloh4:
	ldr	x8, [x8, _CEC_LOG_ADDR_BROADCAST@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	mov	w9, #1
	lsl	w8, w9, w8
Lloh6:
	adrp	x21, _CEC_LOG_ADDR_INVALID@GOTPAGE
Lloh7:
	ldr	x21, [x21, _CEC_LOG_ADDR_INVALID@GOTPAGEOFF]
	ldr	w10, [x21]
	cmp	w10, w19
	b.eq	LBB0_2
; %bb.1:
	ldr	w10, [x20]
	lsl	w9, w9, w19
	orr	w8, w8, w9
	orr	w8, w8, w10
LBB0_2:
	and	w9, w8, #0xff
	asr	w8, w8, #8
	stp	w9, w8, [sp]
Lloh8:
	adrp	x8, _DP_CEC_LOGICAL_ADDRESS_MASK@GOTPAGE
Lloh9:
	ldr	x8, [x8, _DP_CEC_LOGICAL_ADDRESS_MASK@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	mov	x2, sp
	mov	w3, #2
	bl	_drm_dp_dpcd_write
	ldr	w8, [x21]
	cmp	x0, #0
	ccmp	w8, w19, #4, lt
	csel	w0, w0, wzr, ne
	ldr	x8, [sp, #8]
Lloh11:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh12:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh13:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_4
; %bb.3:
	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
	add	sp, sp, #64
	ret
LBB0_4:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_CEC_LOG_ADDR_BROADCAST,4,2     ; @CEC_LOG_ADDR_BROADCAST
	.comm	_CEC_LOG_ADDR_INVALID,4,2       ; @CEC_LOG_ADDR_INVALID
	.comm	_DP_CEC_LOGICAL_ADDRESS_MASK,4,2 ; @DP_CEC_LOGICAL_ADDRESS_MASK
	.no_dead_strip	_drm_dp_cec_adap_log_addr
.subsections_via_symbols
