	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cm_remove_one
_cm_remove_one:                         ## @cm_remove_one
	.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	_IB_PORT_CM_SUP@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -48(%rbp)
	movq	_cm_client@GOTPCREL(%rip), %rsi
	callq	_ib_get_client_data
	testq	%rax, %rax
	je	LBB0_5
## %bb.1:
	movq	%rax, %r14
	movq	_cm@GOTPCREL(%rip), %rax
	leaq	4(%rax), %r15
	movq	%r15, %rdi
	callq	_write_lock_irqsave
	movq	%r14, %rdi
	addq	$16, %rdi
	callq	_list_del
	movq	%r15, %rdi
	callq	_write_unlock_irqrestore
	cmpl	$0, (%r12)
	jle	LBB0_4
## %bb.2:
	xorl	%r13d, %r13d
	leaq	-48(%rbp), %r15
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%r14), %rax
	movq	(%rax,%r13,8), %rbx
	movl	4(%rbx), %esi
	movq	%r12, %rdi
	xorl	%edx, %edx
	movq	%r15, %rcx
	callq	_ib_modify_port
	movl	(%rbx), %edi
	callq	_ib_unregister_mad_agent
	movq	_cm@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_flush_workqueue
	movq	%rbx, %rdi
	callq	_cm_remove_port_fs
	movslq	(%r12), %rax
	incq	%r13
	cmpq	%rax, %r13
	jl	LBB0_3
LBB0_4:
	movl	(%r14), %edi
	callq	_device_unregister
	movq	%r14, %rdi
	callq	_kfree
LBB0_5:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_IB_PORT_CM_SUP,4,2             ## @IB_PORT_CM_SUP
	.comm	_cm_client,4,2                  ## @cm_client
	.comm	_cm,8,2                         ## @cm
	.no_dead_strip	_cm_remove_one
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cm_remove_one
_cm_remove_one:                         ; @cm_remove_one
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x19, x0
Lloh0:
	adrp	x8, _IB_PORT_CM_SUP@GOTPAGE
Lloh1:
	ldr	x8, [x8, _IB_PORT_CM_SUP@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	str	w8, [sp, #8]
Lloh3:
	adrp	x1, _cm_client@GOTPAGE
Lloh4:
	ldr	x1, [x1, _cm_client@GOTPAGEOFF]
	bl	_ib_get_client_data
	cbz	x0, LBB0_5
; %bb.1:
	mov	x20, x0
Lloh5:
	adrp	x22, _cm@GOTPAGE
Lloh6:
	ldr	x22, [x22, _cm@GOTPAGEOFF]
	add	x21, x22, #4
	mov	x0, x21
	bl	_write_lock_irqsave
	add	x0, x20, #16
	bl	_list_del
	mov	x0, x21
	bl	_write_unlock_irqrestore
	ldr	w8, [x19]
	cmp	w8, #1
	b.lt	LBB0_4
; %bb.2:
	mov	x23, #0
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x20, #8]
	ldr	x21, [x8, x23, lsl #3]
	ldr	w1, [x21, #4]
	add	x3, sp, #8
	mov	x0, x19
	mov	w2, #0
	bl	_ib_modify_port
	ldr	w0, [x21]
	bl	_ib_unregister_mad_agent
	ldr	w0, [x22]
	bl	_flush_workqueue
	mov	x0, x21
	bl	_cm_remove_port_fs
	ldrsw	x8, [x19]
	add	x23, x23, #1
	cmp	x23, x8
	b.lt	LBB0_3
LBB0_4:
	ldr	w0, [x20]
	bl	_device_unregister
	mov	x0, x20
	bl	_kfree
LBB0_5:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_IB_PORT_CM_SUP,4,2             ; @IB_PORT_CM_SUP
	.comm	_cm_client,4,2                  ; @cm_client
	.comm	_cm,8,2                         ; @cm
	.no_dead_strip	_cm_remove_one
.subsections_via_symbols
