	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mlx4_get_parav_qkey            ## -- Begin function mlx4_get_parav_qkey
	.p2align	4, 0x90
_mlx4_get_parav_qkey:                   ## @mlx4_get_parav_qkey
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	movq	(%rdi), %rax
	movq	_MLX4_MFUNC_MAX@GOTPCREL(%rip), %rcx
	movslq	(%rcx), %rcx
	leaq	(%rax,%rcx,8), %rcx
	cmpq	%rsi, %rcx
	jle	LBB0_2
## %bb.1:
	movq	8(%rdi), %rcx
	cmpq	%rsi, %rcx
	jle	LBB0_3
LBB0_2:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	popq	%rbp
	retq
LBB0_3:
	movq	_MLX4_RESERVED_QKEY_BASE@GOTPCREL(%rip), %rdi
	cmpq	%rsi, %rax
	cmovleq	%rax, %rcx
	addq	(%rdi), %rsi
	subq	%rcx, %rsi
	movq	%rsi, (%rdx)
	xorl	%eax, %eax
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MLX4_RESERVED_QKEY_BASE,8,3    ## @MLX4_RESERVED_QKEY_BASE
	.comm	_MLX4_MFUNC_MAX,4,2             ## @MLX4_MFUNC_MAX
	.comm	_EINVAL,4,2                     ## @EINVAL
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mlx4_get_parav_qkey            ; -- Begin function mlx4_get_parav_qkey
	.p2align	2
_mlx4_get_parav_qkey:                   ; @mlx4_get_parav_qkey
	.cfi_startproc
; %bb.0:
	ldr	x8, [x0]
Lloh0:
	adrp	x9, _MLX4_MFUNC_MAX@GOTPAGE
Lloh1:
	ldr	x9, [x9, _MLX4_MFUNC_MAX@GOTPAGEOFF]
Lloh2:
	ldrsw	x9, [x9]
	add	x9, x8, x9, lsl #3
	cmp	x9, x1
	b.le	LBB0_2
; %bb.1:
	ldr	x9, [x0, #8]
	cmp	x9, x1
	b.le	LBB0_3
LBB0_2:
Lloh3:
	adrp	x8, _EINVAL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	neg	w0, w8
	ret
LBB0_3:
	mov	w0, #0
Lloh6:
	adrp	x10, _MLX4_RESERVED_QKEY_BASE@GOTPAGE
Lloh7:
	ldr	x10, [x10, _MLX4_RESERVED_QKEY_BASE@GOTPAGEOFF]
Lloh8:
	ldr	x10, [x10]
	cmp	x8, x1
	csel	x8, x9, x8, gt
	add	x9, x10, x1
	sub	x8, x9, x8
	str	x8, [x2]
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_MLX4_RESERVED_QKEY_BASE,8,3    ; @MLX4_RESERVED_QKEY_BASE
	.comm	_MLX4_MFUNC_MAX,4,2             ; @MLX4_MFUNC_MAX
	.comm	_EINVAL,4,2                     ; @EINVAL
.subsections_via_symbols
