	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function therm_pm72_remove
_therm_pm72_remove:                     ## @therm_pm72_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	%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
	movq	(%rdi), %r12
	movq	_driver_lock@GOTPCREL(%rip), %rdi
	callq	_mutex_lock
	movq	_state@GOTPCREL(%rip), %r14
	movq	(%r14), %rax
	movq	_state_detached@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_2
## %bb.1:
	movq	_state_detaching@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, (%r14)
LBB0_2:
	leaq	L_.str(%rip), %rdi
	callq	_DBG
	movq	_driver_lock@GOTPCREL(%rip), %rbx
	movq	%rbx, %rdi
	callq	_mutex_unlock
	xorl	%eax, %eax
	callq	_stop_control_loops
	movq	%rbx, %rdi
	callq	_mutex_lock
	movq	_u3_0@GOTPCREL(%rip), %r13
	cmpq	$0, (%r13)
	je	LBB0_5
## %bb.3:
	movl	(%r12), %edi
	leaq	L_.str.1(%rip), %rsi
	callq	_strcmp
	testl	%eax, %eax
	jne	LBB0_5
## %bb.4:
	leaq	L_.str.2(%rip), %rdi
	callq	_DBG
	xorl	%eax, %eax
	callq	_dispose_control_loops
	movq	$0, (%r13)
LBB0_5:
	movq	_u3_1@GOTPCREL(%rip), %r15
	movb	$1, %bl
	cmpq	$0, (%r15)
	je	LBB0_9
## %bb.6:
	movl	(%r12), %edi
	leaq	L_.str.3(%rip), %rsi
	callq	_strcmp
	testl	%eax, %eax
	je	LBB0_8
## %bb.7:
	cmpq	$0, (%r15)
	sete	%bl
LBB0_9:
	cmpq	$0, (%r13)
	jne	LBB0_12
LBB0_10:
	testb	%bl, %bl
	je	LBB0_12
## %bb.11:
	movq	_state_detached@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, (%r14)
LBB0_12:
	movq	_driver_lock@GOTPCREL(%rip), %rdi
	callq	_mutex_unlock
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	leaq	L_.str.4(%rip), %rdi
	callq	_DBG
	xorl	%eax, %eax
	callq	_detach_fcu
	movq	$0, (%r15)
	cmpq	$0, (%r13)
	je	LBB0_10
	jmp	LBB0_12
	.cfi_endproc
                                        ## -- End function
	.comm	_driver_lock,4,2                ## @driver_lock
	.comm	_state,8,3                      ## @state
	.comm	_state_detached,8,3             ## @state_detached
	.comm	_state_detaching,8,3            ## @state_detaching
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"stopping control loops\n"

	.comm	_u3_0,8,3                       ## @u3_0
L_.str.1:                               ## @.str.1
	.asciz	"u3 0"

L_.str.2:                               ## @.str.2
	.asciz	"lost U3-0, disposing control loops\n"

	.comm	_u3_1,8,3                       ## @u3_1
L_.str.3:                               ## @.str.3
	.asciz	"u3 1"

L_.str.4:                               ## @.str.4
	.asciz	"lost U3-1, detaching FCU\n"

	.no_dead_strip	_therm_pm72_remove
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function therm_pm72_remove
_therm_pm72_remove:                     ; @therm_pm72_remove
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	ldr	x22, [x0]
Lloh0:
	adrp	x0, _driver_lock@GOTPAGE
Lloh1:
	ldr	x0, [x0, _driver_lock@GOTPAGEOFF]
	bl	_mutex_lock
Lloh2:
	adrp	x20, _state@GOTPAGE
Lloh3:
	ldr	x20, [x20, _state@GOTPAGEOFF]
	ldr	x8, [x20]
Lloh4:
	adrp	x21, _state_detached@GOTPAGE
Lloh5:
	ldr	x21, [x21, _state_detached@GOTPAGEOFF]
	ldr	x9, [x21]
	cmp	x8, x9
	b.eq	LBB0_2
; %bb.1:
Lloh6:
	adrp	x8, _state_detaching@GOTPAGE
Lloh7:
	ldr	x8, [x8, _state_detaching@GOTPAGEOFF]
Lloh8:
	ldr	x8, [x8]
	str	x8, [x20]
LBB0_2:
Lloh9:
	adrp	x0, l_.str@PAGE
Lloh10:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DBG
Lloh11:
	adrp	x19, _driver_lock@GOTPAGE
Lloh12:
	ldr	x19, [x19, _driver_lock@GOTPAGEOFF]
	mov	x0, x19
	bl	_mutex_unlock
	bl	_stop_control_loops
	mov	x0, x19
	bl	_mutex_lock
Lloh13:
	adrp	x19, _u3_0@GOTPAGE
Lloh14:
	ldr	x19, [x19, _u3_0@GOTPAGEOFF]
	ldr	x8, [x19]
	cbz	x8, LBB0_5
; %bb.3:
	ldr	w0, [x22]
Lloh15:
	adrp	x1, l_.str.1@PAGE
Lloh16:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_strcmp
	cbnz	w0, LBB0_5
; %bb.4:
Lloh17:
	adrp	x0, l_.str.2@PAGE
Lloh18:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_DBG
	bl	_dispose_control_loops
	str	xzr, [x19]
LBB0_5:
Lloh19:
	adrp	x23, _u3_1@GOTPAGE
Lloh20:
	ldr	x23, [x23, _u3_1@GOTPAGEOFF]
	ldr	x8, [x23]
	cbz	x8, LBB0_9
; %bb.6:
	ldr	w0, [x22]
Lloh21:
	adrp	x1, l_.str.3@PAGE
Lloh22:
	add	x1, x1, l_.str.3@PAGEOFF
	bl	_strcmp
	cbz	w0, LBB0_8
; %bb.7:
	ldr	x8, [x23]
	cmp	x8, #0
	cset	w8, eq
	b	LBB0_10
LBB0_8:
Lloh23:
	adrp	x0, l_.str.4@PAGE
Lloh24:
	add	x0, x0, l_.str.4@PAGEOFF
	bl	_DBG
	bl	_detach_fcu
	str	xzr, [x23]
LBB0_9:
	mov	w8, #1
LBB0_10:
	ldr	x9, [x19]
	cmp	x9, #0
	ccmp	w8, #0, #4, eq
	b.eq	LBB0_12
; %bb.11:
	ldr	x8, [x21]
	str	x8, [x20]
LBB0_12:
Lloh25:
	adrp	x0, _driver_lock@GOTPAGE
Lloh26:
	ldr	x0, [x0, _driver_lock@GOTPAGEOFF]
	bl	_mutex_unlock
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh25, Lloh26
	.cfi_endproc
                                        ; -- End function
	.comm	_driver_lock,4,2                ; @driver_lock
	.comm	_state,8,3                      ; @state
	.comm	_state_detached,8,3             ; @state_detached
	.comm	_state_detaching,8,3            ; @state_detaching
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"stopping control loops\n"

	.comm	_u3_0,8,3                       ; @u3_0
l_.str.1:                               ; @.str.1
	.asciz	"u3 0"

l_.str.2:                               ; @.str.2
	.asciz	"lost U3-0, disposing control loops\n"

	.comm	_u3_1,8,3                       ; @u3_1
l_.str.3:                               ; @.str.3
	.asciz	"u3 1"

l_.str.4:                               ; @.str.4
	.asciz	"lost U3-1, detaching FCU\n"

	.no_dead_strip	_therm_pm72_remove
.subsections_via_symbols
