	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mthca_buf_free                 ## -- Begin function mthca_buf_free
	.p2align	4, 0x90
_mthca_buf_free:                        ## @mthca_buf_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
	subq	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%ecx, %ebx
	movq	%rdx, %r15
	movl	%esi, %r13d
	movq	%rdi, -48(%rbp)                 ## 8-byte Spill
	testq	%r8, %r8
	je	LBB0_2
## %bb.1:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movq	%r8, %rsi
	callq	_mthca_free_mr
LBB0_2:
	testl	%ebx, %ebx
	je	LBB0_3
## %bb.7:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %rbx
	movl	(%r15), %r12d
	movq	_mapping@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_dma_unmap_addr
	movq	%rbx, %rdi
	movl	%r13d, %esi
	movl	%r12d, %edx
	movl	%eax, %ecx
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_dma_free_coherent              ## TAILCALL
LBB0_3:
	movq	_PAGE_SIZE@GOTPCREL(%rip), %r14
	movl	(%r14), %ebx
	leal	(%rbx,%r13), %eax
	decl	%eax
	cltd
	idivl	%ebx
	testl	%eax, %eax
	movq	%r15, %rdx
	jle	LBB0_6
## %bb.4:
	decl	%r13d
	xorl	%r15d, %r15d
	xorl	%r12d, %r12d
	movq	%r13, -64(%rbp)                 ## 8-byte Spill
	movq	%rdx, -56(%rbp)                 ## 8-byte Spill
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %rax
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	movq	(%rdx), %rdi
	movl	(%rdi,%r15), %r13d
	addq	%r15, %rdi
	movq	_mapping@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_dma_unmap_addr
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	movl	%ebx, %esi
	movl	%r13d, %edx
	movq	-64(%rbp), %r13                 ## 8-byte Reload
	movl	%eax, %ecx
	callq	_dma_free_coherent
	incq	%r12
	movl	(%r14), %ebx
	leal	(%rbx,%r13), %eax
	cltd
	idivl	%ebx
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
	cltq
	addq	$4, %r15
	cmpq	%rax, %r12
	jl	LBB0_5
LBB0_6:
	movq	(%rdx), %rdi
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_kfree                          ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_mapping,4,2                    ## @mapping
	.comm	_PAGE_SIZE,4,2                  ## @PAGE_SIZE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mthca_buf_free                 ; -- Begin function mthca_buf_free
	.p2align	2
_mthca_buf_free:                        ; @mthca_buf_free
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x22, x3
	mov	x19, x2
	mov	x21, x1
	mov	x20, x0
	cbz	x4, LBB0_2
; %bb.1:
	mov	x0, x20
	mov	x1, x4
	bl	_mthca_free_mr
LBB0_2:
	cbz	w22, LBB0_4
; %bb.3:
	ldr	x20, [x20]
	ldr	w22, [x19]
Lloh0:
	adrp	x8, _mapping@GOTPAGE
Lloh1:
	ldr	x8, [x8, _mapping@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_dma_unmap_addr
	mov	x3, x0
	mov	x0, x20
	mov	x1, x21
	mov	x2, x22
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	b	_dma_free_coherent
LBB0_4:
	sub	w24, w21, #1
Lloh3:
	adrp	x25, _PAGE_SIZE@GOTPAGE
Lloh4:
	ldr	x25, [x25, _PAGE_SIZE@GOTPAGEOFF]
	ldr	w21, [x25]
	add	w8, w24, w21
	sdiv	w8, w8, w21
	cmp	w8, #1
	b.lt	LBB0_7
; %bb.5:
	mov	x26, #0
	mov	x27, #0
Lloh5:
	adrp	x28, _mapping@GOTPAGE
Lloh6:
	ldr	x28, [x28, _mapping@GOTPAGEOFF]
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x22, [x20]
	ldr	x8, [x19]
	add	x0, x8, x26
	ldr	w23, [x0]
	ldr	w1, [x28]
	bl	_dma_unmap_addr
	mov	x3, x0
	mov	x0, x22
	mov	x1, x21
	mov	x2, x23
	bl	_dma_free_coherent
	add	x27, x27, #1
	ldr	w21, [x25]
	add	w8, w24, w21
	sdiv	w8, w8, w21
	add	x26, x26, #4
	cmp	x27, w8, sxtw
	b.lt	LBB0_6
LBB0_7:
	ldr	x0, [x19]
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	b	_kfree
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_mapping,4,2                    ; @mapping
	.comm	_PAGE_SIZE,4,2                  ; @PAGE_SIZE
.subsections_via_symbols
