	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function qp_free_res
_qp_free_res:                           ## @qp_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
	pushq	%rax
	.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, %r15
	movl	%r8d, -44(%rbp)
	cmpl	$129, %edx
	je	LBB0_4
## %bb.1:
	cmpl	$128, %edx
	jne	LBB0_10
## %bb.2:
	leaq	-44(%rbp), %r12
	movq	%r12, %rdi
	callq	_get_param_l
	movl	%eax, %ebx
	andl	$8388607, %ebx                  ## imm = 0x7FFFFF
	movq	%r12, %rdi
	callq	_get_param_h
	movl	%eax, %r12d
	movq	_RES_QP@GOTPCREL(%rip), %r13
	movl	(%r13), %r8d
	movq	%r15, %rdi
	movl	%r14d, %esi
	movl	%ebx, %edx
	movl	%eax, %ecx
	xorl	%r9d, %r9d
	callq	_rem_res_range
	testl	%eax, %eax
	jne	LBB0_11
## %bb.3:
	movl	(%r13), %edx
	movq	%r15, %rdi
	movl	%r14d, %esi
	movl	%r12d, %ecx
	xorl	%r8d, %r8d
	callq	_mlx4_release_resource
	movq	%r15, %rdi
	movl	%ebx, %esi
	movl	%r12d, %edx
	callq	___mlx4_qp_release_range
	xorl	%eax, %eax
	jmp	LBB0_11
LBB0_4:
	leaq	-44(%rbp), %rdi
	callq	_get_param_l
	movl	%eax, %ebx
	andl	$8388607, %ebx                  ## imm = 0x7FFFFF
	movq	_RES_QP_RESERVED@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r15, %rdi
	movl	%r14d, %esi
	movl	%ebx, %edx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	_qp_res_start_move_to
	testl	%eax, %eax
	jne	LBB0_11
## %bb.5:
	movq	%r15, %rdi
	movl	%ebx, %esi
	callq	_fw_reserved
	testl	%eax, %eax
	jne	LBB0_7
## %bb.6:
	movq	%r15, %rdi
	movl	%ebx, %esi
	callq	___mlx4_qp_free_icm
LBB0_7:
	movq	_RES_QP@GOTPCREL(%rip), %r12
	movl	(%r12), %edx
	movq	%r15, %rdi
	movl	%r14d, %esi
	movl	%ebx, %ecx
	callq	_res_end_move
	movq	%r15, %rdi
	movl	%r14d, %esi
	movl	%ebx, %edx
	callq	_valid_reserved
	testl	%eax, %eax
	je	LBB0_8
## %bb.9:
	movl	(%r12), %r8d
	movq	%r15, %rdi
	movl	%r14d, %esi
	movl	%ebx, %edx
	movl	$1, %ecx
	xorl	%r9d, %r9d
	callq	_rem_res_range
	jmp	LBB0_11
LBB0_10:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_11:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	xorl	%eax, %eax
	jmp	LBB0_11
	.cfi_endproc
                                        ## -- End function
	.comm	_RES_QP,4,2                     ## @RES_QP
	.comm	_RES_QP_RESERVED,4,2            ## @RES_QP_RESERVED
	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_qp_free_res
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function qp_free_res
_qp_free_res:                           ; @qp_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_4
; %bb.1:
	cmp	w2, #128
	b.ne	LBB0_9
; %bb.2:
	add	x0, sp, #12
	bl	_get_param_l
	and	w21, w0, #0x7fffff
	add	x0, sp, #12
	bl	_get_param_h
	mov	x22, x0
Lloh0:
	adrp	x23, _RES_QP@GOTPAGE
Lloh1:
	ldr	x23, [x23, _RES_QP@GOTPAGEOFF]
	ldr	w4, [x23]
	mov	x0, x19
	mov	x1, x20
	mov	x2, x21
	mov	x3, x22
	mov	w5, #0
	bl	_rem_res_range
	cbnz	w0, LBB0_10
; %bb.3:
	ldr	w2, [x23]
	mov	x0, x19
	mov	x1, x20
	mov	x3, x22
	mov	w4, #0
	bl	_mlx4_release_resource
	mov	x0, x19
	mov	x1, x21
	mov	x2, x22
	bl	___mlx4_qp_release_range
	mov	w0, #0
	b	LBB0_10
LBB0_4:
	add	x0, sp, #12
	bl	_get_param_l
	and	w21, w0, #0x7fffff
Lloh2:
	adrp	x8, _RES_QP_RESERVED@GOTPAGE
Lloh3:
	ldr	x8, [x8, _RES_QP_RESERVED@GOTPAGEOFF]
Lloh4:
	ldr	w3, [x8]
	mov	x0, x19
	mov	x1, x20
	mov	x2, x21
	mov	x4, #0
	mov	w5, #0
	bl	_qp_res_start_move_to
	cbnz	w0, LBB0_10
; %bb.5:
	mov	x0, x19
	mov	x1, x21
	bl	_fw_reserved
	cbnz	w0, LBB0_7
; %bb.6:
	mov	x0, x19
	mov	x1, x21
	bl	___mlx4_qp_free_icm
LBB0_7:
Lloh5:
	adrp	x22, _RES_QP@GOTPAGE
Lloh6:
	ldr	x22, [x22, _RES_QP@GOTPAGEOFF]
	ldr	w2, [x22]
	mov	x0, x19
	mov	x1, x20
	mov	x3, x21
	bl	_res_end_move
	mov	x0, x19
	mov	x1, x20
	mov	x2, x21
	bl	_valid_reserved
	cbz	w0, LBB0_10
; %bb.8:
	ldr	w4, [x22]
	mov	x0, x19
	mov	x1, x20
	mov	x2, x21
	mov	w3, #1
	mov	w5, #0
	bl	_rem_res_range
	b	LBB0_10
LBB0_9:
Lloh7:
	adrp	x8, _EINVAL@GOTPAGE
Lloh8:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_10:
	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 AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_RES_QP,4,2                     ; @RES_QP
	.comm	_RES_QP_RESERVED,4,2            ; @RES_QP_RESERVED
	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_qp_free_res
.subsections_via_symbols
