	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function soctherm_detach
_soctherm_detach:                       ## @soctherm_detach
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movl	%edi, %r14d
	callq	_device_get_softc
	movq	%rax, %rbx
	movq	40(%rax), %rdx
	testq	%rdx, %rdx
	je	LBB0_2
## %bb.1:
	movq	8(%rbx), %rsi
	movl	%r14d, %edi
	callq	_bus_teardown_intr
LBB0_2:
	movq	_soctherm_sysctl_ctx@GOTPCREL(%rip), %rdi
	callq	_sysctl_ctx_free
	movq	32(%rbx), %rdi
	testq	%rdi, %rdi
	je	LBB0_4
## %bb.3:
	callq	_clk_release
LBB0_4:
	movq	24(%rbx), %rdi
	testq	%rdi, %rdi
	je	LBB0_6
## %bb.5:
	callq	_clk_release
LBB0_6:
	movq	16(%rbx), %rdi
	testq	%rdi, %rdi
	je	LBB0_8
## %bb.7:
	callq	_hwreset_release
LBB0_8:
	movq	8(%rbx), %rcx
	testq	%rcx, %rcx
	je	LBB0_10
## %bb.9:
	movq	_SYS_RES_IRQ@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%r14d, %edi
	xorl	%edx, %edx
	callq	_bus_release_resource
LBB0_10:
	movq	(%rbx), %rcx
	testq	%rcx, %rcx
	je	LBB0_12
## %bb.11:
	movq	_SYS_RES_MEMORY@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%r14d, %edi
	xorl	%edx, %edx
	callq	_bus_release_resource
LBB0_12:
	movq	_ENXIO@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_soctherm_sysctl_ctx,4,2        ## @soctherm_sysctl_ctx
	.comm	_SYS_RES_IRQ,4,2                ## @SYS_RES_IRQ
	.comm	_SYS_RES_MEMORY,4,2             ## @SYS_RES_MEMORY
	.comm	_ENXIO,4,2                      ## @ENXIO
	.no_dead_strip	_soctherm_detach
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function soctherm_detach
_soctherm_detach:                       ; @soctherm_detach
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	bl	_device_get_softc
	mov	x20, x0
	ldr	x2, [x0, #40]
	cbz	x2, LBB0_2
; %bb.1:
	ldr	x1, [x20, #8]
	mov	x0, x19
	bl	_bus_teardown_intr
LBB0_2:
Lloh0:
	adrp	x0, _soctherm_sysctl_ctx@GOTPAGE
Lloh1:
	ldr	x0, [x0, _soctherm_sysctl_ctx@GOTPAGEOFF]
	bl	_sysctl_ctx_free
	ldr	x0, [x20, #32]
	cbz	x0, LBB0_4
; %bb.3:
	bl	_clk_release
LBB0_4:
	ldr	x0, [x20, #24]
	cbz	x0, LBB0_6
; %bb.5:
	bl	_clk_release
LBB0_6:
	ldr	x0, [x20, #16]
	cbz	x0, LBB0_8
; %bb.7:
	bl	_hwreset_release
LBB0_8:
	ldr	x3, [x20, #8]
	cbz	x3, LBB0_10
; %bb.9:
Lloh2:
	adrp	x8, _SYS_RES_IRQ@GOTPAGE
Lloh3:
	ldr	x8, [x8, _SYS_RES_IRQ@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #0
	bl	_bus_release_resource
LBB0_10:
	ldr	x3, [x20]
	cbz	x3, LBB0_12
; %bb.11:
Lloh5:
	adrp	x8, _SYS_RES_MEMORY@GOTPAGE
Lloh6:
	ldr	x8, [x8, _SYS_RES_MEMORY@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #0
	bl	_bus_release_resource
LBB0_12:
Lloh8:
	adrp	x8, _ENXIO@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ENXIO@GOTPAGEOFF]
Lloh10:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_soctherm_sysctl_ctx,4,2        ; @soctherm_sysctl_ctx
	.comm	_SYS_RES_IRQ,4,2                ; @SYS_RES_IRQ
	.comm	_SYS_RES_MEMORY,4,2             ; @SYS_RES_MEMORY
	.comm	_ENXIO,4,2                      ; @ENXIO
	.no_dead_strip	_soctherm_detach
.subsections_via_symbols
