	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mpt_free_res
_mpt_free_res:                          ## @mpt_free_res
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r14d
	movq	%rdi, %r12
	movl	%r8d, -44(%rbp)
	cmpl	$129, %edx
	je	LBB0_5
## %bb.1:
	cmpl	$128, %edx
	jne	LBB0_7
## %bb.2:
	leaq	-44(%rbp), %rdi
	callq	_get_param_l
	movl	%eax, %r15d
	movq	%r12, %rdi
	callq	_mpt_mask
	movl	%eax, %ebx
	andl	%r15d, %ebx
	movq	_RES_MPT@GOTPCREL(%rip), %r13
	movl	(%r13), %ecx
	leaq	-56(%rbp), %r8
	movq	%r12, %rdi
	movl	%r14d, %esi
	movl	%ebx, %edx
	callq	_get_res
	testl	%eax, %eax
	jne	LBB0_8
## %bb.3:
	movq	-56(%rbp), %rax
	movl	(%rax), %r15d
	movl	(%r13), %ecx
	movq	%r12, %rdi
	movl	%r14d, %esi
	movl	%ebx, %edx
	callq	_put_res
	movl	(%r13), %r8d
	movq	%r12, %rdi
	movl	%r14d, %esi
	movl	%ebx, %edx
	movl	$1, %ecx
	xorl	%r9d, %r9d
	callq	_rem_res_range
	testl	%eax, %eax
	jne	LBB0_8
## %bb.4:
	movl	(%r13), %edx
	movq	%r12, %rdi
	movl	%r14d, %esi
	movl	$1, %ecx
	xorl	%r8d, %r8d
	callq	_mlx4_release_resource
	movq	%r12, %rdi
	movl	%r15d, %esi
	callq	___mlx4_mpt_release
	xorl	%eax, %eax
	jmp	LBB0_8
LBB0_5:
	leaq	-44(%rbp), %rdi
	callq	_get_param_l
	movl	%eax, %r15d
	movq	%r12, %rdi
	callq	_mpt_mask
	movl	%eax, %ebx
	andl	%r15d, %ebx
	movq	_RES_MPT_RESERVED@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	leaq	-56(%rbp), %r8
	movq	%r12, %rdi
	movl	%r14d, %esi
	movl	%ebx, %edx
	callq	_mr_res_start_move_to
	testl	%eax, %eax
	jne	LBB0_8
## %bb.6:
	movq	-56(%rbp), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	___mlx4_mpt_free_icm
	movq	_RES_MPT@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r12, %rdi
	movl	%r14d, %esi
	movl	%ebx, %ecx
	callq	_res_end_move
	xorl	%eax, %eax
	jmp	LBB0_8
LBB0_7:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_8:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_RES_MPT,4,2                    ## @RES_MPT
	.comm	_RES_MPT_RESERVED,4,2           ## @RES_MPT_RESERVED
	.no_dead_strip	_mpt_free_res
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mpt_free_res
_mpt_free_res:                          ; @mpt_free_res
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.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
	mov	x20, x1
	mov	x19, x0
	str	w4, [sp, #12]
	cmp	w2, #129
	b.eq	LBB0_5
; %bb.1:
	cmp	w2, #128
	b.ne	LBB0_7
; %bb.2:
	add	x0, sp, #12
	bl	_get_param_l
	mov	x21, x0
	mov	x0, x19
	bl	_mpt_mask
	and	w22, w0, w21
Lloh0:
	adrp	x23, _RES_MPT@GOTPAGE
Lloh1:
	ldr	x23, [x23, _RES_MPT@GOTPAGEOFF]
	ldr	w3, [x23]
	mov	x4, sp
	mov	x0, x19
	mov	x1, x20
	mov	x2, x22
	bl	_get_res
	cbnz	w0, LBB0_8
; %bb.3:
	ldr	x8, [sp]
	ldr	w21, [x8]
	ldr	w3, [x23]
	mov	x0, x19
	mov	x1, x20
	mov	x2, x22
	bl	_put_res
	ldr	w4, [x23]
	mov	x0, x19
	mov	x1, x20
	mov	x2, x22
	mov	w3, #1
	mov	w5, #0
	bl	_rem_res_range
	cbnz	w0, LBB0_8
; %bb.4:
	ldr	w2, [x23]
	mov	x0, x19
	mov	x1, x20
	mov	w3, #1
	mov	w4, #0
	bl	_mlx4_release_resource
	mov	x0, x19
	mov	x1, x21
	bl	___mlx4_mpt_release
	mov	w0, #0
	b	LBB0_8
LBB0_5:
	add	x0, sp, #12
	bl	_get_param_l
	mov	x21, x0
	mov	x0, x19
	bl	_mpt_mask
	and	w21, w0, w21
Lloh2:
	adrp	x8, _RES_MPT_RESERVED@GOTPAGE
Lloh3:
	ldr	x8, [x8, _RES_MPT_RESERVED@GOTPAGEOFF]
Lloh4:
	ldr	w3, [x8]
	mov	x4, sp
	mov	x0, x19
	mov	x1, x20
	mov	x2, x21
	bl	_mr_res_start_move_to
	cbnz	w0, LBB0_8
; %bb.6:
	ldr	x8, [sp]
	ldr	w1, [x8]
	mov	x0, x19
	bl	___mlx4_mpt_free_icm
Lloh5:
	adrp	x8, _RES_MPT@GOTPAGE
Lloh6:
	ldr	x8, [x8, _RES_MPT@GOTPAGEOFF]
Lloh7:
	ldr	w2, [x8]
	mov	x0, x19
	mov	x1, x20
	mov	x3, x21
	bl	_res_end_move
	mov	w0, #0
	b	LBB0_8
LBB0_7:
Lloh8:
	adrp	x8, _EINVAL@GOTPAGE
Lloh9:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_8:
	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
	add	sp, sp, #80
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_RES_MPT,4,2                    ; @RES_MPT
	.comm	_RES_MPT_RESERVED,4,2           ; @RES_MPT_RESERVED
	.no_dead_strip	_mpt_free_res
.subsections_via_symbols
