	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mlx4_fmr_free                  ## -- Begin function mlx4_fmr_free
	.p2align	4, 0x90
_mlx4_fmr_free:                         ## @mlx4_fmr_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	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	cmpq	$0, 16(%rsi)
	je	LBB0_2
## %bb.1:
	movq	_EBUSY@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_6
LBB0_2:
	movq	%rsi, %rbx
	movq	%rdi, %r14
	movq	(%rsi), %rax
	movq	_MLX4_MPT_EN_HW@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_4
## %bb.3:
	movq	_MLX4_MPT_STATUS_SW@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	8(%rbx), %rcx
	movl	%eax, (%rcx)
	xorl	%eax, %eax
	callq	_wmb
	movq	8(%rbx), %rax
	xorps	%xmm0, %xmm0
	movups	%xmm0, (%rax)
	xorl	%eax, %eax
	callq	_wmb
	movq	_MLX4_MPT_STATUS_HW@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	8(%rbx), %rcx
	movl	%eax, (%rcx)
	xorl	%eax, %eax
	callq	_wmb
LBB0_4:
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_mlx4_mr_free
	testl	%eax, %eax
	jne	LBB0_6
## %bb.5:
	movq	_MLX4_MPT_DISABLED@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, (%rbx)
	xorl	%eax, %eax
LBB0_6:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EBUSY,4,2                      ## @EBUSY
	.comm	_MLX4_MPT_EN_HW,8,3             ## @MLX4_MPT_EN_HW
	.comm	_MLX4_MPT_STATUS_SW,4,2         ## @MLX4_MPT_STATUS_SW
	.comm	_MLX4_MPT_STATUS_HW,4,2         ## @MLX4_MPT_STATUS_HW
	.comm	_MLX4_MPT_DISABLED,8,3          ## @MLX4_MPT_DISABLED
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mlx4_fmr_free                  ; -- Begin function mlx4_fmr_free
	.p2align	2
_mlx4_fmr_free:                         ; @mlx4_fmr_free
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	ldr	x8, [x1, #16]
	cbz	x8, LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _EBUSY@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_6
LBB0_2:
	mov	x19, x1
	mov	x20, x0
	ldr	x8, [x1]
Lloh3:
	adrp	x9, _MLX4_MPT_EN_HW@GOTPAGE
Lloh4:
	ldr	x9, [x9, _MLX4_MPT_EN_HW@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_4
; %bb.3:
Lloh6:
	adrp	x8, _MLX4_MPT_STATUS_SW@GOTPAGE
Lloh7:
	ldr	x8, [x8, _MLX4_MPT_STATUS_SW@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	ldr	x9, [x19, #8]
	str	w8, [x9]
	bl	_wmb
	ldr	x8, [x19, #8]
	stp	xzr, xzr, [x8]
	bl	_wmb
Lloh9:
	adrp	x8, _MLX4_MPT_STATUS_HW@GOTPAGE
Lloh10:
	ldr	x8, [x8, _MLX4_MPT_STATUS_HW@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	ldr	x9, [x19, #8]
	str	w8, [x9]
	bl	_wmb
LBB0_4:
	mov	x0, x20
	mov	x1, x19
	bl	_mlx4_mr_free
	cbnz	w0, LBB0_6
; %bb.5:
Lloh12:
	adrp	x8, _MLX4_MPT_DISABLED@GOTPAGE
Lloh13:
	ldr	x8, [x8, _MLX4_MPT_DISABLED@GOTPAGEOFF]
Lloh14:
	ldr	x8, [x8]
	str	x8, [x19]
LBB0_6:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_EBUSY,4,2                      ; @EBUSY
	.comm	_MLX4_MPT_EN_HW,8,3             ; @MLX4_MPT_EN_HW
	.comm	_MLX4_MPT_STATUS_SW,4,2         ; @MLX4_MPT_STATUS_SW
	.comm	_MLX4_MPT_STATUS_HW,4,2         ; @MLX4_MPT_STATUS_HW
	.comm	_MLX4_MPT_DISABLED,8,3          ; @MLX4_MPT_DISABLED
.subsections_via_symbols
