	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ntb_transport_link_cleanup
_ntb_transport_link_cleanup:            ## @ntb_transport_link_cleanup
	.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, %r14
	cmpl	$0, 8(%rdi)
	je	LBB0_5
## %bb.1:
	movl	4(%r14), %eax
	notl	%eax
	andl	(%r14), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	xorl	%r13d, %r13d
	xorl	%ebx, %ebx
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_4:                                 ##   in Loop: Header=BB0_2 Depth=1
	incq	%rbx
	movl	8(%r14), %eax
	addq	$8, %r13
	cmpq	%rax, %rbx
	jae	LBB0_5
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movl	%ebx, %edi
	callq	_BIT_ULL
	testl	%eax, -44(%rbp)                 ## 4-byte Folded Reload
	je	LBB0_4
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	32(%r14), %r12
	leaq	(%r12,%r13), %r15
	movq	%r15, %rdi
	callq	_ntb_qp_link_cleanup
	leaq	(%r12,%r13), %rdi
	addq	$4, %rdi
	callq	_cancel_work_sync
	movq	%r15, %rdi
	callq	_cancel_delayed_work_sync
	jmp	LBB0_4
LBB0_5:
	cmpl	$0, 24(%r14)
	je	LBB0_6
## %bb.7:
	cmpl	$0, 12(%r14)
	jne	LBB0_8
	jmp	LBB0_10
LBB0_6:
	leaq	20(%r14), %rdi
	callq	_cancel_delayed_work_sync
	cmpl	$0, 12(%r14)
	je	LBB0_10
LBB0_8:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r14, %rdi
	movl	%ebx, %esi
	callq	_ntb_free_mw
	incl	%ebx
	cmpl	12(%r14), %ebx
	jb	LBB0_9
LBB0_10:
	movl	16(%r14), %edi
	callq	_ntb_spad_count
	testl	%eax, %eax
	je	LBB0_13
## %bb.11:
	movl	%eax, %r15d
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_12:                                ## =>This Inner Loop Header: Depth=1
	movl	16(%r14), %edi
	movl	%ebx, %esi
	xorl	%edx, %edx
	callq	_ntb_spad_write
	incl	%ebx
	cmpl	%ebx, %r15d
	jne	LBB0_12
LBB0_13:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_ntb_transport_link_cleanup
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ntb_transport_link_cleanup
_ntb_transport_link_cleanup:            ; @ntb_transport_link_cleanup
	.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
	mov	x19, x0
	ldr	w8, [x0, #8]
	cbz	w8, LBB0_5
; %bb.1:
	mov	x22, #0
	mov	x20, #0
	ldp	w8, w9, [x19]
	bic	w23, w8, w9
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	x20, x20, #1
	ldr	w8, [x19, #8]
	add	x22, x22, #8
	cmp	x20, x8
	b.hs	LBB0_5
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x20
	bl	_BIT_ULL
	tst	w23, w0
	b.eq	LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x8, [x19, #32]
	add	x21, x8, x22
	mov	x0, x21
	bl	_ntb_qp_link_cleanup
	add	x0, x21, #4
	bl	_cancel_work_sync
	mov	x0, x21
	bl	_cancel_delayed_work_sync
	b	LBB0_2
LBB0_5:
	ldr	w8, [x19, #24]
	cbz	w8, LBB0_7
; %bb.6:
	ldr	w8, [x19, #12]
	cbnz	w8, LBB0_8
	b	LBB0_10
LBB0_7:
	add	x0, x19, #20
	bl	_cancel_delayed_work_sync
	ldr	w8, [x19, #12]
	cbz	w8, LBB0_10
LBB0_8:
	mov	w20, #0
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	mov	x1, x20
	bl	_ntb_free_mw
	add	w20, w20, #1
	ldr	w8, [x19, #12]
	cmp	w20, w8
	b.lo	LBB0_9
LBB0_10:
	ldr	w0, [x19, #16]
	bl	_ntb_spad_count
	cbz	w0, LBB0_13
; %bb.11:
	mov	x20, x0
	mov	w21, #0
LBB0_12:                                ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x19, #16]
	mov	x1, x21
	mov	w2, #0
	bl	_ntb_spad_write
	add	w21, w21, #1
	cmp	w20, w21
	b.ne	LBB0_12
LBB0_13:
	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
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_ntb_transport_link_cleanup
.subsections_via_symbols
