	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mthca_cleanup_user_db_tab      ## -- Begin function mthca_cleanup_user_db_tab
	.p2align	4, 0x90
_mthca_cleanup_user_db_tab:             ## @mthca_cleanup_user_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	%rdx, %r15
	movq	%rsi, %r14
	movq	%rdi, %r12
	callq	_mthca_is_memfree
	testl	%eax, %eax
	je	LBB0_7
## %bb.1:
	movl	4(%r12), %ecx
	movq	_MTHCA_ICM_PAGE_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%ecx, %eax
	cltd
	idivl	%esi
	testl	%eax, %eax
	jle	LBB0_6
## %bb.2:
	xorl	%r13d, %r13d
	xorl	%ebx, %ebx
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_3 Depth=1
	incq	%rbx
	movl	%ecx, %eax
	cltd
	idivl	%esi
	cltq
	addq	$16, %r13
	cmpq	%rax, %rbx
	jge	LBB0_6
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r15), %rax
	cmpq	$0, 8(%rax,%r13)
	je	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	%r12, %rdi
	movq	%r14, %rsi
	movl	%ebx, %edx
	callq	_mthca_uarc_virt
	movq	%r12, %rdi
	movl	%eax, %esi
	movl	$1, %edx
	callq	_mthca_UNMAP_ICM
	movl	(%r12), %edi
	movq	(%r15), %rsi
	addq	%r13, %rsi
	movq	_PCI_DMA_TODEVICE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movl	$1, %edx
	callq	_pci_unmap_sg
	movq	(%r15), %rdi
	addq	%r13, %rdi
	callq	_sg_page
	movl	%eax, %edi
	callq	_put_user_page
	movl	4(%r12), %ecx
	movq	_MTHCA_ICM_PAGE_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	jmp	LBB0_5
LBB0_6:
	movq	%r15, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_kfree                          ## TAILCALL
LBB0_7:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MTHCA_ICM_PAGE_SIZE,4,2        ## @MTHCA_ICM_PAGE_SIZE
	.comm	_PCI_DMA_TODEVICE,4,2           ## @PCI_DMA_TODEVICE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mthca_cleanup_user_db_tab      ; -- Begin function mthca_cleanup_user_db_tab
	.p2align	2
_mthca_cleanup_user_db_tab:             ; @mthca_cleanup_user_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, x2
	mov	x20, x1
	mov	x21, x0
	bl	_mthca_is_memfree
	cbz	w0, LBB0_7
; %bb.1:
	ldr	w8, [x21, #4]
Lloh0:
	adrp	x23, _MTHCA_ICM_PAGE_SIZE@GOTPAGE
Lloh1:
	ldr	x23, [x23, _MTHCA_ICM_PAGE_SIZE@GOTPAGEOFF]
	ldr	w9, [x23]
	sdiv	w10, w8, w9
	cmp	w10, #1
	b.lt	LBB0_6
; %bb.2:
	mov	x24, #0
	mov	x22, #0
Lloh2:
	adrp	x25, _PCI_DMA_TODEVICE@GOTPAGE
Lloh3:
	ldr	x25, [x25, _PCI_DMA_TODEVICE@GOTPAGEOFF]
	b	LBB0_4
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	add	x22, x22, #1
	sdiv	w10, w8, w9
	add	x24, x24, #16
	cmp	x22, w10, sxtw
	b.ge	LBB0_6
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x10, [x19]
	add	x10, x10, x24
	ldr	x10, [x10, #8]
	cbz	x10, LBB0_3
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x21
	mov	x1, x20
	mov	x2, x22
	bl	_mthca_uarc_virt
	mov	x1, x0
	mov	x0, x21
	mov	w2, #1
	bl	_mthca_UNMAP_ICM
	ldr	w0, [x21]
	ldr	x8, [x19]
	add	x1, x8, x24
	ldr	w3, [x25]
	mov	w2, #1
	bl	_pci_unmap_sg
	ldr	x8, [x19]
	add	x0, x8, x24
	bl	_sg_page
	bl	_put_user_page
	ldr	w8, [x21, #4]
	ldr	w9, [x23]
	b	LBB0_3
LBB0_6:
	mov	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_7:
	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 AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.comm	_MTHCA_ICM_PAGE_SIZE,4,2        ; @MTHCA_ICM_PAGE_SIZE
	.comm	_PCI_DMA_TODEVICE,4,2           ; @PCI_DMA_TODEVICE
.subsections_via_symbols
