	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ntb_transport_free
_ntb_transport_free:                    ## @ntb_transport_free
	.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	%rsi, -48(%rbp)                 ## 8-byte Spill
	movq	(%rsi), %r15
	movq	%r15, %rdi
	callq	_ntb_transport_link_cleanup
	leaq	44(%r15), %rdi
	callq	_cancel_work_sync
	leaq	40(%r15), %rdi
	callq	_cancel_delayed_work_sync
	cmpl	$0, 8(%r15)
	jle	LBB0_5
## %bb.1:
	movl	4(%r15), %r12d
	notl	%r12d
	andl	(%r15), %r12d
	xorl	%r13d, %r13d
	xorl	%ebx, %ebx
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_4:                                 ##   in Loop: Header=BB0_2 Depth=1
	movl	36(%r14,%r13), %edi
	callq	_debugfs_remove_recursive
	incq	%rbx
	movslq	8(%r15), %rax
	addq	$48, %r13
	cmpq	%rax, %rbx
	jge	LBB0_5
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	24(%r15), %r14
	movl	%ebx, %edi
	callq	_BIT_ULL
	testl	%eax, %r12d
	je	LBB0_4
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	leaq	(%r14,%r13), %rdi
	callq	_ntb_transport_free_queue
	jmp	LBB0_4
LBB0_5:
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdi
	callq	_ntb_link_disable
	movq	%rbx, %rdi
	callq	_ntb_clear_ctx
	movq	%r15, %rdi
	callq	_ntb_bus_remove
	movslq	12(%r15), %rax
	testq	%rax, %rax
	je	LBB0_8
## %bb.6:
	leaq	(%rax,%rax,2), %r14
	shlq	$4, %r14
	addq	$-16, %r14
	leal	-1(%rax), %ebx
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r15, %rdi
	movl	%ebx, %esi
	callq	_ntb_free_mw
	movq	16(%r15), %rax
	movl	(%rax,%r14), %edi
	callq	_iounmap
	addq	$-48, %r14
	addl	$-1, %ebx
	jb	LBB0_7
LBB0_8:
	movq	24(%r15), %rdi
	callq	_kfree
	movq	16(%r15), %rdi
	callq	_kfree
	movq	%r15, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_kfree                          ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_ntb_transport_free
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ntb_transport_free
_ntb_transport_free:                    ; @ntb_transport_free
	.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	x20, x1
	ldr	x19, [x1]
	mov	x0, x19
	bl	_ntb_transport_link_cleanup
	add	x0, x19, #44
	bl	_cancel_work_sync
	add	x0, x19, #40
	bl	_cancel_delayed_work_sync
	ldr	w8, [x19, #8]
	cmp	w8, #1
	b.lt	LBB0_5
; %bb.1:
	mov	x22, #0
	mov	x21, #0
	ldp	w8, w9, [x19]
	bic	w23, w8, w9
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	x8, x24, x22
	ldr	w0, [x8, #36]
	bl	_debugfs_remove_recursive
	add	x21, x21, #1
	ldrsw	x8, [x19, #8]
	add	x22, x22, #48
	cmp	x21, x8
	b.ge	LBB0_5
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x24, [x19, #24]
	mov	x0, x21
	bl	_BIT_ULL
	tst	w23, w0
	b.eq	LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	add	x0, x24, x22
	bl	_ntb_transport_free_queue
	b	LBB0_2
LBB0_5:
	mov	x0, x20
	bl	_ntb_link_disable
	mov	x0, x20
	bl	_ntb_clear_ctx
	mov	x0, x19
	bl	_ntb_bus_remove
	ldrsw	x8, [x19, #12]
	cbz	w8, LBB0_8
; %bb.6:
	mov	w9, #48
	orr	x10, xzr, #0xfffffffffffffff0
	madd	x21, x8, x9, x10
	sub	w20, w8, #1
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	mov	x1, x20
	bl	_ntb_free_mw
	ldr	x8, [x19, #16]
	ldr	w0, [x8, x21]
	bl	_iounmap
	sub	x21, x21, #48
	sub	w20, w20, #1
	cmn	w20, #1
	b.ne	LBB0_7
LBB0_8:
	ldr	x0, [x19, #24]
	bl	_kfree
	ldr	x0, [x19, #16]
	bl	_kfree
	mov	x0, x19
	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
	b	_kfree
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_ntb_transport_free
.subsections_via_symbols
