	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ipmi_unregister_for_cmd        ## -- Begin function ipmi_unregister_for_cmd
	.p2align	4, 0x90
_ipmi_unregister_for_cmd:               ## @ipmi_unregister_for_cmd
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%ecx, %ebx
	movl	%edx, -56(%rbp)                 ## 4-byte Spill
	movl	%esi, -52(%rbp)                 ## 4-byte Spill
	movq	%rdi, -64(%rbp)                 ## 8-byte Spill
	movq	(%rdi), %r15
	movq	_ENOENT@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	xorl	%ecx, %ecx
	subl	(%rax), %ecx
	movl	%ecx, -44(%rbp)                 ## 4-byte Spill
	movq	%r15, %rdi
	callq	_mutex_lock
	movq	_IPMI_NUM_CHANNELS@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	jle	LBB0_12
## %bb.1:
	movl	%ebx, %eax
	notl	%eax
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	xorl	%r13d, %r13d
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	btl	%r14d, %ebx
	jae	LBB0_2
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	movzbl	-52(%rbp), %esi                 ## 1-byte Folded Reload
	movzbl	-56(%rbp), %edx                 ## 1-byte Folded Reload
	movq	%r15, %rdi
	movl	%r14d, %ecx
	callq	_find_cmd_rcvr
	testq	%rax, %rax
	je	LBB0_2
## %bb.6:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	%rax, %r12
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	cmpq	%rax, 24(%r12)
	jne	LBB0_2
## %bb.9:                               ##   in Loop: Header=BB0_4 Depth=1
	movl	$0, -44(%rbp)                   ## 4-byte Folded Spill
	movl	-48(%rbp), %eax                 ## 4-byte Reload
	andl	%eax, (%r12)
	je	LBB0_11
	.p2align	4, 0x90
LBB0_2:                                 ##   in Loop: Header=BB0_4 Depth=1
	movq	%r13, %r12
LBB0_3:                                 ##   in Loop: Header=BB0_4 Depth=1
	incl	%r14d
	movq	%r12, %r13
	movq	_IPMI_NUM_CHANNELS@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r14d
	jl	LBB0_4
	jmp	LBB0_13
LBB0_11:                                ##   in Loop: Header=BB0_4 Depth=1
	movq	%r12, %rdi
	addq	$16, %rdi
	callq	_list_del_rcu
	movq	%r13, 8(%r12)
	jmp	LBB0_3
LBB0_12:
	xorl	%r12d, %r12d
LBB0_13:
	movq	%r15, %rdi
	callq	_mutex_unlock
	xorl	%eax, %eax
	callq	_synchronize_rcu
	testq	%r12, %r12
	je	LBB0_15
	.p2align	4, 0x90
LBB0_14:                                ## =>This Inner Loop Header: Depth=1
	movq	8(%r12), %rbx
	movq	%r12, %rdi
	callq	_kfree
	movq	%rbx, %r12
	testq	%rbx, %rbx
	jne	LBB0_14
LBB0_15:
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ENOENT,4,2                     ## @ENOENT
	.comm	_IPMI_NUM_CHANNELS,4,2          ## @IPMI_NUM_CHANNELS
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ipmi_unregister_for_cmd        ; -- Begin function ipmi_unregister_for_cmd
	.p2align	2
_ipmi_unregister_for_cmd:               ; @ipmi_unregister_for_cmd
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x22, x3
	mov	x23, x2
	mov	x24, x1
	mov	x25, x0
	ldr	x20, [x0]
Lloh0:
	adrp	x8, _ENOENT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ENOENT@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w19, w8
	mov	x0, x20
	bl	_mutex_lock
Lloh3:
	adrp	x28, _IPMI_NUM_CHANNELS@GOTPAGE
Lloh4:
	ldr	x28, [x28, _IPMI_NUM_CHANNELS@GOTPAGEOFF]
	ldr	w8, [x28]
	cmp	w8, #1
	b.lt	LBB0_9
; %bb.1:
	mov	w26, #0
	mov	x21, #0
	mvn	w8, w22
	str	w8, [sp, #12]                   ; 4-byte Folded Spill
	b	LBB0_4
LBB0_2:                                 ;   in Loop: Header=BB0_4 Depth=1
	mov	w19, #0
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	add	w26, w26, #1
	ldr	w8, [x28]
	cmp	w26, w8
	b.ge	LBB0_10
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	lsr	w8, w22, w26
	tbz	w8, #0, LBB0_3
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x20
	mov	x1, x24
	mov	x2, x23
	mov	x3, x26
	bl	_find_cmd_rcvr
	cbz	x0, LBB0_3
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x27, x0
	ldr	x8, [x0, #24]
	cmp	x8, x25
	b.ne	LBB0_3
; %bb.7:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	w8, [x27]
	ldr	w9, [sp, #12]                   ; 4-byte Folded Reload
	ands	w8, w8, w9
	str	w8, [x27]
	b.ne	LBB0_2
; %bb.8:                                ;   in Loop: Header=BB0_4 Depth=1
	add	x0, x27, #16
	bl	_list_del_rcu
	mov	w19, #0
	str	x21, [x27, #8]
	mov	x21, x27
	b	LBB0_3
LBB0_9:
	mov	x21, #0
LBB0_10:
	mov	x0, x20
	bl	_mutex_unlock
	bl	_synchronize_rcu
	cbz	x21, LBB0_12
LBB0_11:                                ; =>This Inner Loop Header: Depth=1
	ldr	x20, [x21, #8]
	mov	x0, x21
	bl	_kfree
	mov	x21, x20
	cbnz	x20, LBB0_11
LBB0_12:
	mov	x0, x19
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOENT,4,2                     ; @ENOENT
	.comm	_IPMI_NUM_CHANNELS,4,2          ; @IPMI_NUM_CHANNELS
.subsections_via_symbols
