	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_drm_dp_cec_set_edid            ## -- Begin function drm_dp_cec_set_edid
	.p2align	4, 0x90
_drm_dp_cec_set_edid:                   ## @drm_dp_cec_set_edid
	.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
	cmpl	$0, 32(%rdi)
	je	LBB0_17
## %bb.1:
	movq	%rsi, %r14
	movq	%rdi, %rbx
	movq	_CEC_CAP_DEFAULTS@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	movq	_CEC_CAP_NEEDS_HPD@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
	movq	_CEC_CAP_RC@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	addq	$24, %rdi
	callq	_cancel_delayed_work_sync
	movq	%rbx, %rdi
	callq	_mutex_lock
	leaq	-44(%rbp), %rsi
	movq	%rbx, %rdi
	callq	_drm_dp_cec_cap
	testl	%eax, %eax
	je	LBB0_2
## %bb.3:
	orl	%r15d, %r13d
	notl	%r12d
	movl	-44(%rbp), %eax
	movq	_DP_CEC_SNOOPING_CAPABLE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r15d
	andl	%eax, %r15d
	je	LBB0_5
## %bb.4:
	movq	_CEC_CAP_MONITOR_ALL@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r15d
LBB0_5:
	andl	%r12d, %r13d
	movq	_DP_CEC_MULTIPLE_LA_CAPABLE@GOTPCREL(%rip), %rcx
	movl	$1, %r12d
	testl	%eax, (%rcx)
	je	LBB0_7
## %bb.6:
	movq	_CEC_MAX_LOG_ADDRS@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
LBB0_7:
	orl	%r13d, %r15d
	movq	8(%rbx), %rdi
	testq	%rdi, %rdi
	je	LBB0_11
## %bb.8:
	cmpl	%r15d, (%rdi)
	jne	LBB0_10
## %bb.9:
	cmpl	%r12d, 4(%rdi)
	je	LBB0_15
LBB0_10:
	callq	_cec_unregister_adapter
LBB0_11:
	movl	20(%rbx), %edx
	movq	_drm_dp_cec_adap_ops@GOTPCREL(%rip), %rdi
	movq	%rbx, %rsi
	movl	%r15d, %ecx
	movl	%r12d, %r8d
	callq	_cec_allocate_adapter
	movq	%rax, 8(%rbx)
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_13
## %bb.12:
	movq	$0, 8(%rbx)
	jmp	LBB0_16
LBB0_2:
	movq	8(%rbx), %rdi
	callq	_cec_unregister_adapter
	movq	$0, 8(%rbx)
	jmp	LBB0_16
LBB0_13:
	movq	8(%rbx), %rdi
	movl	16(%rbx), %esi
	callq	_cec_register_adapter
	movq	8(%rbx), %rdi
	testq	%rax, %rax
	je	LBB0_15
## %bb.14:
	callq	_cec_delete_adapter
	movq	$0, 8(%rbx)
	jmp	LBB0_16
LBB0_15:
	movq	%r14, %rsi
	callq	_cec_s_phys_addr_from_edid
LBB0_16:
	movq	%rbx, %rdi
	callq	_mutex_unlock
LBB0_17:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_CEC_CAP_DEFAULTS,4,2           ## @CEC_CAP_DEFAULTS
	.comm	_CEC_CAP_NEEDS_HPD,4,2          ## @CEC_CAP_NEEDS_HPD
	.comm	_CEC_CAP_RC,4,2                 ## @CEC_CAP_RC
	.comm	_DP_CEC_SNOOPING_CAPABLE,4,2    ## @DP_CEC_SNOOPING_CAPABLE
	.comm	_CEC_CAP_MONITOR_ALL,4,2        ## @CEC_CAP_MONITOR_ALL
	.comm	_DP_CEC_MULTIPLE_LA_CAPABLE,4,2 ## @DP_CEC_MULTIPLE_LA_CAPABLE
	.comm	_CEC_MAX_LOG_ADDRS,4,2          ## @CEC_MAX_LOG_ADDRS
	.comm	_drm_dp_cec_adap_ops,4,2        ## @drm_dp_cec_adap_ops
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_drm_dp_cec_set_edid            ; -- Begin function drm_dp_cec_set_edid
	.p2align	2
_drm_dp_cec_set_edid:                   ; @drm_dp_cec_set_edid
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	ldr	w8, [x0, #32]
	cbz	w8, LBB0_13
; %bb.1:
	mov	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x8, _CEC_CAP_DEFAULTS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _CEC_CAP_DEFAULTS@GOTPAGEOFF]
Lloh2:
	adrp	x9, _CEC_CAP_NEEDS_HPD@GOTPAGE
Lloh3:
	ldr	x9, [x9, _CEC_CAP_NEEDS_HPD@GOTPAGEOFF]
Lloh4:
	ldr	w21, [x8]
Lloh5:
	ldr	w22, [x9]
Lloh6:
	adrp	x8, _CEC_CAP_RC@GOTPAGE
Lloh7:
	ldr	x8, [x8, _CEC_CAP_RC@GOTPAGEOFF]
Lloh8:
	ldr	w23, [x8]
	add	x0, x0, #24
	bl	_cancel_delayed_work_sync
	mov	x0, x19
	bl	_mutex_lock
	add	x1, sp, #12
	mov	x0, x19
	bl	_drm_dp_cec_cap
	cbz	w0, LBB0_8
; %bb.2:
	orr	w8, w22, w21
	bic	w8, w8, w23
	ldr	w9, [sp, #12]
Lloh9:
	adrp	x10, _DP_CEC_SNOOPING_CAPABLE@GOTPAGE
Lloh10:
	ldr	x10, [x10, _DP_CEC_SNOOPING_CAPABLE@GOTPAGEOFF]
Lloh11:
	ldr	w10, [x10]
Lloh12:
	adrp	x11, _CEC_CAP_MONITOR_ALL@GOTPAGE
Lloh13:
	ldr	x11, [x11, _CEC_CAP_MONITOR_ALL@GOTPAGEOFF]
Lloh14:
	ldr	w11, [x11]
	tst	w10, w9
	csel	w10, wzr, w11, eq
	orr	w21, w10, w8
Lloh15:
	adrp	x8, _DP_CEC_MULTIPLE_LA_CAPABLE@GOTPAGE
Lloh16:
	ldr	x8, [x8, _DP_CEC_MULTIPLE_LA_CAPABLE@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
Lloh18:
	adrp	x10, _CEC_MAX_LOG_ADDRS@GOTPAGE
Lloh19:
	ldr	x10, [x10, _CEC_MAX_LOG_ADDRS@GOTPAGEOFF]
Lloh20:
	ldr	w10, [x10]
	tst	w8, w9
	csinc	w22, w10, wzr, ne
	ldr	x0, [x19, #8]
	cbz	x0, LBB0_6
; %bb.3:
	ldr	w8, [x0]
	cmp	w8, w21
	b.ne	LBB0_5
; %bb.4:
	ldr	w8, [x0, #4]
	cmp	w8, w22
	b.eq	LBB0_11
LBB0_5:
	bl	_cec_unregister_adapter
LBB0_6:
	ldr	w2, [x19, #20]
Lloh21:
	adrp	x0, _drm_dp_cec_adap_ops@GOTPAGE
Lloh22:
	ldr	x0, [x0, _drm_dp_cec_adap_ops@GOTPAGEOFF]
	mov	x1, x19
	mov	x3, x21
	mov	x4, x22
	bl	_cec_allocate_adapter
	str	x0, [x19, #8]
	bl	_IS_ERR
	cbz	x0, LBB0_9
; %bb.7:
	str	xzr, [x19, #8]
	b	LBB0_12
LBB0_8:
	ldr	x0, [x19, #8]
	bl	_cec_unregister_adapter
	str	xzr, [x19, #8]
	b	LBB0_12
LBB0_9:
	ldr	x0, [x19, #8]
	ldr	w1, [x19, #16]
	bl	_cec_register_adapter
	mov	x8, x0
	ldr	x0, [x19, #8]
	cbz	x8, LBB0_11
; %bb.10:
	bl	_cec_delete_adapter
	str	xzr, [x19, #8]
	b	LBB0_12
LBB0_11:
	mov	x1, x20
	bl	_cec_s_phys_addr_from_edid
LBB0_12:
	mov	x0, x19
	bl	_mutex_unlock
LBB0_13:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh4
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.comm	_CEC_CAP_DEFAULTS,4,2           ; @CEC_CAP_DEFAULTS
	.comm	_CEC_CAP_NEEDS_HPD,4,2          ; @CEC_CAP_NEEDS_HPD
	.comm	_CEC_CAP_RC,4,2                 ; @CEC_CAP_RC
	.comm	_DP_CEC_SNOOPING_CAPABLE,4,2    ; @DP_CEC_SNOOPING_CAPABLE
	.comm	_CEC_CAP_MONITOR_ALL,4,2        ; @CEC_CAP_MONITOR_ALL
	.comm	_DP_CEC_MULTIPLE_LA_CAPABLE,4,2 ; @DP_CEC_MULTIPLE_LA_CAPABLE
	.comm	_CEC_MAX_LOG_ADDRS,4,2          ; @CEC_MAX_LOG_ADDRS
	.comm	_drm_dp_cec_adap_ops,4,2        ; @drm_dp_cec_adap_ops
.subsections_via_symbols
