	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function free_4k
_free_4k:                               ## @free_4k
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r15d
	movq	%rdi, %r14
	movq	_MLX5_U64_4K_PAGE_MASK@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	andl	%r15d, %esi
	callq	_find_fw_page
	testq	%rax, %rax
	je	LBB0_7
## %bb.1:
	movq	%rax, %rbx
	movl	(%r12), %edi
	notl	%edi
	andl	%r15d, %edi
	movq	_MLX5_ADAPTER_PAGE_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	sarl	%cl, %edi
	incl	(%rbx)
	leaq	16(%rbx), %rsi
	callq	_set_bit
	movl	(%rbx), %eax
	movq	_MLX5_NUM_4K_IN_PAGE@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_5
## %bb.2:
	leaq	12(%rbx), %rdi
	leaq	4(%r14), %rsi
	callq	_rb_erase
	cmpl	$1, (%rbx)
	je	LBB0_4
## %bb.3:
	movq	%rbx, %rdi
	addq	$4, %rdi
	callq	_list_del
LBB0_4:
	movl	8(%r14), %edi
	andl	(%r12), %r15d
	movq	_PAGE_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_DMA_BIDIRECTIONAL@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movl	%r15d, %esi
	callq	_dma_unmap_page
	movl	8(%rbx), %edi
	callq	___free_page
	movq	%rbx, %rdi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_kfree                          ## TAILCALL
LBB0_7:
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_mlx5_core_warn                 ## TAILCALL
LBB0_5:
	cmpl	$1, %eax
	jne	LBB0_6
## %bb.8:
	addq	$4, %rbx
	movq	%rbx, %rdi
	movq	%r14, %rsi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_list_add                       ## TAILCALL
LBB0_6:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MLX5_U64_4K_PAGE_MASK,4,2      ## @MLX5_U64_4K_PAGE_MASK
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"page not found\n"

	.comm	_MLX5_ADAPTER_PAGE_SHIFT,4,2    ## @MLX5_ADAPTER_PAGE_SHIFT
	.comm	_MLX5_NUM_4K_IN_PAGE,4,2        ## @MLX5_NUM_4K_IN_PAGE
	.comm	_PAGE_SIZE,4,2                  ## @PAGE_SIZE
	.comm	_DMA_BIDIRECTIONAL,4,2          ## @DMA_BIDIRECTIONAL
	.no_dead_strip	_free_4k
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function free_4k
_free_4k:                               ; @free_4k
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x21, x1
	mov	x20, x0
Lloh0:
	adrp	x22, _MLX5_U64_4K_PAGE_MASK@GOTPAGE
Lloh1:
	ldr	x22, [x22, _MLX5_U64_4K_PAGE_MASK@GOTPAGEOFF]
	ldr	w8, [x22]
	and	w1, w8, w1
	bl	_find_fw_page
	cbz	x0, LBB0_5
; %bb.1:
	mov	x19, x0
	ldr	w8, [x22]
	bic	w8, w21, w8
Lloh2:
	adrp	x9, _MLX5_ADAPTER_PAGE_SHIFT@GOTPAGE
Lloh3:
	ldr	x9, [x9, _MLX5_ADAPTER_PAGE_SHIFT@GOTPAGEOFF]
Lloh4:
	ldr	w9, [x9]
	asr	w0, w8, w9
	ldr	w8, [x19]
	add	w8, w8, #1
	str	w8, [x19]
	add	x1, x19, #16
	bl	_set_bit
	ldr	w8, [x19]
Lloh5:
	adrp	x9, _MLX5_NUM_4K_IN_PAGE@GOTPAGE
Lloh6:
	ldr	x9, [x9, _MLX5_NUM_4K_IN_PAGE@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ne	LBB0_6
; %bb.2:
	add	x0, x19, #12
	add	x1, x20, #4
	bl	_rb_erase
	ldr	w8, [x19]
	cmp	w8, #1
	b.eq	LBB0_4
; %bb.3:
	add	x0, x19, #4
	bl	_list_del
LBB0_4:
	ldr	w0, [x20, #8]
	ldr	w8, [x22]
	and	w1, w8, w21
Lloh8:
	adrp	x8, _PAGE_SIZE@GOTPAGE
Lloh9:
	ldr	x8, [x8, _PAGE_SIZE@GOTPAGEOFF]
Lloh10:
	ldr	w2, [x8]
Lloh11:
	adrp	x8, _DMA_BIDIRECTIONAL@GOTPAGE
Lloh12:
	ldr	x8, [x8, _DMA_BIDIRECTIONAL@GOTPAGEOFF]
Lloh13:
	ldr	w3, [x8]
	bl	_dma_unmap_page
	ldr	w0, [x19, #8]
	bl	___free_page
	mov	x0, x19
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_kfree
LBB0_5:
Lloh14:
	adrp	x1, l_.str@PAGE
Lloh15:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_mlx5_core_warn
LBB0_6:
	cmp	w8, #1
	b.ne	LBB0_8
; %bb.7:
	add	x0, x19, #4
	mov	x1, x20
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_list_add
LBB0_8:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_MLX5_U64_4K_PAGE_MASK,4,2      ; @MLX5_U64_4K_PAGE_MASK
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"page not found\n"

	.comm	_MLX5_ADAPTER_PAGE_SHIFT,4,2    ; @MLX5_ADAPTER_PAGE_SHIFT
	.comm	_MLX5_NUM_4K_IN_PAGE,4,2        ; @MLX5_NUM_4K_IN_PAGE
	.comm	_PAGE_SIZE,4,2                  ; @PAGE_SIZE
	.comm	_DMA_BIDIRECTIONAL,4,2          ; @DMA_BIDIRECTIONAL
	.no_dead_strip	_free_4k
.subsections_via_symbols
