	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	___mlx4_qp_reserve_range        ## -- Begin function __mlx4_qp_reserve_range
	.p2align	4, 0x90
___mlx4_qp_reserve_range:               ## @__mlx4_qp_reserve_range
	.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	%r8d, %r13d
	movq	%rcx, %r14
	movl	%edx, %r15d
	movl	%esi, %r12d
	movq	_MLX4_RESERVE_ETH_BF_QP@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	andl	%r8d, %ebx
	callq	_mlx4_priv
	movq	_MLX4_MAX_BF_QP_RANGE@GOTPCREL(%rip), %rcx
	cmpl	%r12d, (%rcx)
	jge	LBB0_2
## %bb.1:
	testl	%ebx, %ebx
	jne	LBB0_5
LBB0_2:
	movq	_MLX4_RESERVE_A0_QP@GOTPCREL(%rip), %rcx
	andl	(%rcx), %r13d
	testl	%ebx, %ebx
	movq	_MLX4_QP_TABLE_ZONE_RSS@GOTPCREL(%rip), %rcx
	cmovneq	_MLX4_QP_TABLE_ZONE_RAW_ETH@GOTPCREL(%rip), %rcx
	movq	_MLX4_BF_QP_SKIP_MASK@GOTPCREL(%rip), %rdx
	cmovnel	(%rdx), %ebx
	testl	%r13d, %r13d
	jne	LBB0_4
## %bb.3:
	movq	_MLX4_QP_TABLE_ZONE_GENERAL@GOTPCREL(%rip), %rcx
LBB0_4:
	movl	(%rcx), %esi
	movl	(%rax), %edi
	xorl	%r13d, %r13d
	movl	%r12d, %edx
	movl	%r15d, %ecx
	movl	%ebx, %r8d
	xorl	%r9d, %r9d
	callq	_mlx4_zone_alloc_entries
	movl	%eax, (%r14)
	cmpl	$-1, %eax
	jne	LBB0_6
LBB0_5:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r13d, %r13d
	subl	(%rax), %r13d
LBB0_6:
	movl	%r13d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MLX4_RESERVE_ETH_BF_QP,8,3     ## @MLX4_RESERVE_ETH_BF_QP
	.comm	_MLX4_MAX_BF_QP_RANGE,4,2       ## @MLX4_MAX_BF_QP_RANGE
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_MLX4_QP_TABLE_ZONE_GENERAL,4,2 ## @MLX4_QP_TABLE_ZONE_GENERAL
	.comm	_MLX4_RESERVE_A0_QP,8,3         ## @MLX4_RESERVE_A0_QP
	.comm	_MLX4_QP_TABLE_ZONE_RAW_ETH,4,2 ## @MLX4_QP_TABLE_ZONE_RAW_ETH
	.comm	_MLX4_QP_TABLE_ZONE_RSS,4,2     ## @MLX4_QP_TABLE_ZONE_RSS
	.comm	_MLX4_BF_QP_SKIP_MASK,4,2       ## @MLX4_BF_QP_SKIP_MASK
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	___mlx4_qp_reserve_range        ; -- Begin function __mlx4_qp_reserve_range
	.p2align	2
___mlx4_qp_reserve_range:               ; @__mlx4_qp_reserve_range
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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	x22, x4
	mov	x19, x3
	mov	x20, x2
	mov	x21, x1
Lloh0:
	adrp	x8, _MLX4_RESERVE_ETH_BF_QP@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MLX4_RESERVE_ETH_BF_QP@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	and	w23, w8, w4
	bl	_mlx4_priv
Lloh3:
	adrp	x8, _MLX4_MAX_BF_QP_RANGE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MLX4_MAX_BF_QP_RANGE@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	cmp	w8, w21
	ccmp	w23, #0, #4, lt
	b.ne	LBB0_2
; %bb.1:
Lloh6:
	adrp	x8, _MLX4_RESERVE_A0_QP@GOTPAGE
Lloh7:
	ldr	x8, [x8, _MLX4_RESERVE_A0_QP@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
Lloh9:
	adrp	x9, _MLX4_QP_TABLE_ZONE_GENERAL@GOTPAGE
Lloh10:
	ldr	x9, [x9, _MLX4_QP_TABLE_ZONE_GENERAL@GOTPAGEOFF]
Lloh11:
	adrp	x10, _MLX4_QP_TABLE_ZONE_RAW_ETH@GOTPAGE
Lloh12:
	ldr	x10, [x10, _MLX4_QP_TABLE_ZONE_RAW_ETH@GOTPAGEOFF]
Lloh13:
	adrp	x11, _MLX4_QP_TABLE_ZONE_RSS@GOTPAGE
Lloh14:
	ldr	x11, [x11, _MLX4_QP_TABLE_ZONE_RSS@GOTPAGEOFF]
Lloh15:
	adrp	x12, _MLX4_BF_QP_SKIP_MASK@GOTPAGE
Lloh16:
	ldr	x12, [x12, _MLX4_BF_QP_SKIP_MASK@GOTPAGEOFF]
Lloh17:
	ldr	w12, [x12]
	cmp	w23, #0
	csel	w4, w12, wzr, ne
	csel	x10, x10, x11, ne
	tst	w8, w22
	csel	x8, x9, x10, eq
	ldr	w1, [x8]
	ldr	w0, [x0]
	mov	x2, x21
	mov	x3, x20
	mov	x5, #0
	bl	_mlx4_zone_alloc_entries
	mov	x8, x0
	mov	w0, #0
	str	w8, [x19]
	cmn	w8, #1
	b.ne	LBB0_3
LBB0_2:
Lloh18:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh19:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_3:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_MLX4_RESERVE_ETH_BF_QP,8,3     ; @MLX4_RESERVE_ETH_BF_QP
	.comm	_MLX4_MAX_BF_QP_RANGE,4,2       ; @MLX4_MAX_BF_QP_RANGE
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_MLX4_QP_TABLE_ZONE_GENERAL,4,2 ; @MLX4_QP_TABLE_ZONE_GENERAL
	.comm	_MLX4_RESERVE_A0_QP,8,3         ; @MLX4_RESERVE_A0_QP
	.comm	_MLX4_QP_TABLE_ZONE_RAW_ETH,4,2 ; @MLX4_QP_TABLE_ZONE_RAW_ETH
	.comm	_MLX4_QP_TABLE_ZONE_RSS,4,2     ; @MLX4_QP_TABLE_ZONE_RSS
	.comm	_MLX4_BF_QP_SKIP_MASK,4,2       ; @MLX4_BF_QP_SKIP_MASK
.subsections_via_symbols
