	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ipmi_bmc_unregister
_ipmi_bmc_unregister:                   ## @ipmi_bmc_unregister
	.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, %rbx
	movq	(%rdi), %r14
	movq	16(%rdi), %rsi
	testq	%rsi, %rsi
	je	LBB0_2
## %bb.1:
	movq	24(%rbx), %rdi
	callq	_sysfs_remove_link
	movq	16(%rbx), %rdi
	callq	_kfree
	movq	$0, 16(%rbx)
LBB0_2:
	movq	8(%rbx), %rsi
	testq	%rsi, %rsi
	je	LBB0_4
## %bb.3:
	movq	8(%r14), %rdi
	callq	_sysfs_remove_link
	movq	8(%rbx), %rdi
	callq	_kfree
	movq	$0, 8(%rbx)
LBB0_4:
	movq	_ipmidriver_mutex@GOTPCREL(%rip), %r15
	movq	%r15, %rdi
	callq	_mutex_lock
	movq	_cleanup_bmc_device@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_kref_put
	movq	$0, (%rbx)
	movq	%r15, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_mutex_unlock                   ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_ipmidriver_mutex,4,2           ## @ipmidriver_mutex
	.comm	_cleanup_bmc_device,4,2         ## @cleanup_bmc_device
	.no_dead_strip	_ipmi_bmc_unregister
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ipmi_bmc_unregister
_ipmi_bmc_unregister:                   ; @ipmi_bmc_unregister
	.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	x19, x0
	ldr	x20, [x0]
	ldr	x1, [x0, #16]
	cbz	x1, LBB0_2
; %bb.1:
	ldr	x0, [x19, #24]
	bl	_sysfs_remove_link
	ldr	x0, [x19, #16]
	bl	_kfree
	str	xzr, [x19, #16]
LBB0_2:
	ldr	x1, [x19, #8]
	cbz	x1, LBB0_4
; %bb.3:
	ldr	x0, [x20, #8]
	bl	_sysfs_remove_link
	ldr	x0, [x19, #8]
	bl	_kfree
	str	xzr, [x19, #8]
LBB0_4:
Lloh0:
	adrp	x21, _ipmidriver_mutex@GOTPAGE
Lloh1:
	ldr	x21, [x21, _ipmidriver_mutex@GOTPAGEOFF]
	mov	x0, x21
	bl	_mutex_lock
Lloh2:
	adrp	x8, _cleanup_bmc_device@GOTPAGE
Lloh3:
	ldr	x8, [x8, _cleanup_bmc_device@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_kref_put
	str	xzr, [x19]
	mov	x0, x21
	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
	b	_mutex_unlock
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_ipmidriver_mutex,4,2           ; @ipmidriver_mutex
	.comm	_cleanup_bmc_device,4,2         ; @cleanup_bmc_device
	.no_dead_strip	_ipmi_bmc_unregister
.subsections_via_symbols
