	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ti_sci_remove
_ti_sci_remove:                         ## @ti_sci_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	_of_platform_depopulate
	movq	%r14, %rdi
	callq	_platform_get_drvdata
	movq	%rax, %r15
	cmpq	$0, 24(%rax)
	je	LBB0_2
## %bb.1:
	leaq	24(%r15), %rdi
	callq	_unregister_restart_handler
LBB0_2:
	movq	_ti_sci_list_mutex@GOTPCREL(%rip), %rdi
	callq	_mutex_lock
	cmpq	$0, 16(%r15)
	je	LBB0_3
## %bb.5:
	movq	_EBUSY@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	_ti_sci_list_mutex@GOTPCREL(%rip), %rdi
	callq	_mutex_unlock
	testl	%ebx, %ebx
	je	LBB0_4
## %bb.6:
	negl	%ebx
	jmp	LBB0_7
LBB0_3:
	movq	%r15, %rdi
	addq	$8, %rdi
	callq	_list_del
	movq	_ti_sci_list_mutex@GOTPCREL(%rip), %rdi
	callq	_mutex_unlock
LBB0_4:
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_ti_sci_debugfs_destroy
	movl	4(%r15), %edi
	callq	_mbox_free_channel
	movl	(%r15), %edi
	callq	_mbox_free_channel
	xorl	%ebx, %ebx
LBB0_7:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ti_sci_list_mutex,4,2          ## @ti_sci_list_mutex
	.comm	_EBUSY,4,2                      ## @EBUSY
	.no_dead_strip	_ti_sci_remove
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ti_sci_remove
_ti_sci_remove:                         ; @ti_sci_remove
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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	x20, x0
	bl	_of_platform_depopulate
	mov	x0, x20
	bl	_platform_get_drvdata
	mov	x19, x0
	ldr	x8, [x0, #24]!
	cbz	x8, LBB0_2
; %bb.1:
	bl	_unregister_restart_handler
LBB0_2:
Lloh0:
	adrp	x0, _ti_sci_list_mutex@GOTPAGE
Lloh1:
	ldr	x0, [x0, _ti_sci_list_mutex@GOTPAGEOFF]
	bl	_mutex_lock
	ldr	x8, [x19, #16]
	cbz	x8, LBB0_5
; %bb.3:
Lloh2:
	adrp	x8, _EBUSY@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
Lloh4:
	ldr	w21, [x8]
Lloh5:
	adrp	x0, _ti_sci_list_mutex@GOTPAGE
Lloh6:
	ldr	x0, [x0, _ti_sci_list_mutex@GOTPAGEOFF]
	bl	_mutex_unlock
	cbz	w21, LBB0_6
; %bb.4:
	neg	w0, w21
	b	LBB0_7
LBB0_5:
	add	x0, x19, #8
	bl	_list_del
Lloh7:
	adrp	x0, _ti_sci_list_mutex@GOTPAGE
Lloh8:
	ldr	x0, [x0, _ti_sci_list_mutex@GOTPAGEOFF]
	bl	_mutex_unlock
LBB0_6:
	mov	x0, x20
	mov	x1, x19
	bl	_ti_sci_debugfs_destroy
	ldr	w0, [x19, #4]
	bl	_mbox_free_channel
	ldr	w0, [x19]
	bl	_mbox_free_channel
	mov	w0, #0
LBB0_7:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_ti_sci_list_mutex,4,2          ; @ti_sci_list_mutex
	.comm	_EBUSY,4,2                      ; @EBUSY
	.no_dead_strip	_ti_sci_remove
.subsections_via_symbols
