	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mthca_cleanup_db_tab           ## -- Begin function mthca_cleanup_db_tab
	.p2align	4, 0x90
_mthca_cleanup_db_tab:                  ## @mthca_cleanup_db_tab
	.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
	callq	_mthca_is_memfree
	testl	%eax, %eax
	je	LBB0_9
## %bb.1:
	movq	(%r12), %rax
	cmpl	$0, (%rax)
	jle	LBB0_8
## %bb.2:
	leaq	16(%r12), %r14
	xorl	%ebx, %ebx
	movq	_MTHCA_ICM_PAGE_SIZE@GOTPCREL(%rip), %r15
	xorl	%r13d, %r13d
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_3 Depth=1
	movq	%r12, %rdi
	movq	%r14, %rsi
	movl	%r13d, %edx
	callq	_mthca_uarc_virt
	movq	%r12, %rdi
	movl	%eax, %esi
	movl	$1, %edx
	callq	_mthca_UNMAP_ICM
	movq	(%r12), %rax
	movq	8(%r12), %rdi
	movl	(%r15), %esi
	movq	8(%rax), %rax
	movl	16(%rax,%rbx), %ecx
	movl	20(%rax,%rbx), %edx
	callq	_dma_free_coherent
	movq	(%r12), %rax
LBB0_7:                                 ##   in Loop: Header=BB0_3 Depth=1
	incq	%r13
	movslq	(%rax), %rcx
	addq	$32, %rbx
	cmpq	%rcx, %r13
	jge	LBB0_8
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%rax), %rcx
	cmpl	$0, 20(%rcx,%rbx)
	je	LBB0_7
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movl	24(%rcx,%rbx), %edi
	movq	_MTHCA_DB_REC_PER_PAGE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_bitmap_empty
	testl	%eax, %eax
	jne	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	%r12, %rdi
	leaq	L_.str(%rip), %rsi
	movl	%r13d, %edx
	callq	_mthca_warn
	jmp	LBB0_6
LBB0_8:
	movq	8(%rax), %rdi
	callq	_kfree
	movq	(%r12), %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_kfree                          ## TAILCALL
LBB0_9:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MTHCA_DB_REC_PER_PAGE,4,2      ## @MTHCA_DB_REC_PER_PAGE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Kernel UARC page %d not empty\n"

	.comm	_MTHCA_ICM_PAGE_SIZE,4,2        ## @MTHCA_ICM_PAGE_SIZE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mthca_cleanup_db_tab           ; -- Begin function mthca_cleanup_db_tab
	.p2align	2
_mthca_cleanup_db_tab:                  ; @mthca_cleanup_db_tab
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x19, x0
	bl	_mthca_is_memfree
	cbz	w0, LBB0_9
; %bb.1:
	ldr	x8, [x19]
	ldr	w9, [x8]
	cmp	w9, #1
	b.lt	LBB0_8
; %bb.2:
	mov	x23, #0
	mov	x20, #0
	add	x21, x19, #16
Lloh0:
	adrp	x24, _MTHCA_DB_REC_PER_PAGE@GOTPAGE
Lloh1:
	ldr	x24, [x24, _MTHCA_DB_REC_PER_PAGE@GOTPAGEOFF]
Lloh2:
	adrp	x25, _MTHCA_ICM_PAGE_SIZE@GOTPAGE
Lloh3:
	ldr	x25, [x25, _MTHCA_ICM_PAGE_SIZE@GOTPAGEOFF]
Lloh4:
	adrp	x22, l_.str@PAGE
Lloh5:
	add	x22, x22, l_.str@PAGEOFF
	b	LBB0_5
LBB0_3:                                 ;   in Loop: Header=BB0_5 Depth=1
	mov	x0, x19
	mov	x1, x21
	mov	x2, x20
	bl	_mthca_uarc_virt
	mov	x1, x0
	mov	x0, x19
	mov	w2, #1
	bl	_mthca_UNMAP_ICM
	ldr	w1, [x25]
	ldp	x8, x0, [x19]
	ldr	x8, [x8, #8]
	add	x8, x8, x23
	ldp	w3, w2, [x8, #16]
	bl	_dma_free_coherent
	ldr	x8, [x19]
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	add	x20, x20, #1
	ldrsw	x9, [x8]
	add	x23, x23, #32
	cmp	x20, x9
	b.ge	LBB0_8
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x9, [x8, #8]
	add	x9, x9, x23
	ldr	w10, [x9, #20]
	cbz	w10, LBB0_4
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	w0, [x9, #24]
	ldr	w1, [x24]
	bl	_bitmap_empty
	cbnz	w0, LBB0_3
; %bb.7:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	x0, x19
	mov	x1, x22
	mov	x2, x20
	bl	_mthca_warn
	b	LBB0_3
LBB0_8:
	ldr	x0, [x8, #8]
	bl	_kfree
	ldr	x0, [x19]
	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
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	b	_kfree
LBB0_9:
	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
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_MTHCA_DB_REC_PER_PAGE,4,2      ; @MTHCA_DB_REC_PER_PAGE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Kernel UARC page %d not empty\n"

	.comm	_MTHCA_ICM_PAGE_SIZE,4,2        ; @MTHCA_ICM_PAGE_SIZE
.subsections_via_symbols
