	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function secocec_remove
_secocec_remove:                        ## @secocec_remove
	.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
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	callq	_platform_get_drvdata
	movq	%rax, %rbx
	cmpq	$0, 8(%rax)
	je	LBB0_2
## %bb.1:
	movq	_SECOCEC_ENABLE_REG_1@GOTPCREL(%rip), %r15
	movl	(%r15), %edi
	leaq	-28(%rbp), %rsi
	callq	_smb_rd16
	movl	(%r15), %edi
	movq	_SECOCEC_ENABLE_REG_1_IR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	notl	%esi
	andl	-28(%rbp), %esi
	callq	_smb_wr16
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	callq	_dev_dbg
LBB0_2:
	movl	4(%rbx), %edi
	callq	_cec_notifier_cec_adap_unregister
	movl	(%rbx), %edi
	callq	_cec_unregister_adapter
	movq	_BRA_SMB_BASE_ADDR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	$7, %esi
	callq	_release_region
	leaq	L_.str.1(%rip), %rsi
	movq	%r14, %rdi
	callq	_dev_dbg
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SECOCEC_ENABLE_REG_1,4,2       ## @SECOCEC_ENABLE_REG_1
	.comm	_SECOCEC_ENABLE_REG_1_IR,4,2    ## @SECOCEC_ENABLE_REG_1_IR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"IR disabled"

	.comm	_BRA_SMB_BASE_ADDR,4,2          ## @BRA_SMB_BASE_ADDR
L_.str.1:                               ## @.str.1
	.asciz	"CEC device removed"

	.no_dead_strip	_secocec_remove
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function secocec_remove
_secocec_remove:                        ; @secocec_remove
	.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, x0
	bl	_platform_get_drvdata
	mov	x20, x0
	ldr	x8, [x0, #8]
	cbz	x8, LBB0_2
; %bb.1:
Lloh0:
	adrp	x21, _SECOCEC_ENABLE_REG_1@GOTPAGE
Lloh1:
	ldr	x21, [x21, _SECOCEC_ENABLE_REG_1@GOTPAGEOFF]
	ldr	w0, [x21]
	add	x1, sp, #12
	bl	_smb_rd16
	ldr	w0, [x21]
	ldr	w8, [sp, #12]
Lloh2:
	adrp	x9, _SECOCEC_ENABLE_REG_1_IR@GOTPAGE
Lloh3:
	ldr	x9, [x9, _SECOCEC_ENABLE_REG_1_IR@GOTPAGEOFF]
Lloh4:
	ldr	w9, [x9]
	bic	w1, w8, w9
	bl	_smb_wr16
Lloh5:
	adrp	x1, l_.str@PAGE
Lloh6:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_dev_dbg
LBB0_2:
	ldr	w0, [x20, #4]
	bl	_cec_notifier_cec_adap_unregister
	ldr	w0, [x20]
	bl	_cec_unregister_adapter
Lloh7:
	adrp	x8, _BRA_SMB_BASE_ADDR@GOTPAGE
Lloh8:
	ldr	x8, [x8, _BRA_SMB_BASE_ADDR@GOTPAGEOFF]
Lloh9:
	ldr	w0, [x8]
	mov	w1, #7
	bl	_release_region
Lloh10:
	adrp	x1, l_.str.1@PAGE
Lloh11:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_dev_dbg
	mov	w0, #0
	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
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_SECOCEC_ENABLE_REG_1,4,2       ; @SECOCEC_ENABLE_REG_1
	.comm	_SECOCEC_ENABLE_REG_1_IR,4,2    ; @SECOCEC_ENABLE_REG_1_IR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"IR disabled"

	.comm	_BRA_SMB_BASE_ADDR,4,2          ; @BRA_SMB_BASE_ADDR
l_.str.1:                               ; @.str.1
	.asciz	"CEC device removed"

	.no_dead_strip	_secocec_remove
.subsections_via_symbols
