	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_qib_check_ah                   ## -- Begin function qib_check_ah
	.p2align	4, 0x90
_qib_check_ah:                          ## @qib_check_ah
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	%rsi, %rbx
	movq	(%rsi), %rax
	movq	_QIB_MULTICAST_LID_BASE@GOTPCREL(%rip), %rdx
	movq	_IB_AH_GRH@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	andl	8(%rsi), %ecx
	cmpq	(%rdx), %rax
	jl	LBB0_3
## %bb.1:
	movq	_QIB_PERMISSIVE_LID@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rax
	je	LBB0_3
## %bb.2:
	testl	%ecx, %ecx
	je	LBB0_11
LBB0_3:
	testl	%ecx, %ecx
	je	LBB0_5
## %bb.4:
	movq	32(%rbx), %rcx
	movq	_QIB_GUIDS_PER_PORT@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	jge	LBB0_11
LBB0_5:
	testq	%rax, %rax
	je	LBB0_11
## %bb.6:
	movl	12(%rbx), %eax
	testl	%eax, %eax
	jle	LBB0_11
## %bb.7:
	cmpl	(%rdi), %eax
	jg	LBB0_11
## %bb.8:
	movq	16(%rbx), %rdi
	movq	_IB_RATE_PORT_CURRENT@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rdi
	je	LBB0_10
## %bb.9:
	callq	_ib_rate_to_mult
	testq	%rax, %rax
	js	LBB0_11
LBB0_10:
	xorl	%eax, %eax
	cmpl	$16, 24(%rbx)
	jl	LBB0_12
LBB0_11:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_12:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_QIB_MULTICAST_LID_BASE,8,3     ## @QIB_MULTICAST_LID_BASE
	.comm	_QIB_PERMISSIVE_LID,8,3         ## @QIB_PERMISSIVE_LID
	.comm	_IB_AH_GRH,4,2                  ## @IB_AH_GRH
	.comm	_QIB_GUIDS_PER_PORT,8,3         ## @QIB_GUIDS_PER_PORT
	.comm	_IB_RATE_PORT_CURRENT,8,3       ## @IB_RATE_PORT_CURRENT
	.comm	_EINVAL,4,2                     ## @EINVAL
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_qib_check_ah                   ; -- Begin function qib_check_ah
	.p2align	2
_qib_check_ah:                          ; @qib_check_ah
	.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]
Lloh0:
	adrp	x9, _QIB_MULTICAST_LID_BASE@GOTPAGE
Lloh1:
	ldr	x9, [x9, _QIB_MULTICAST_LID_BASE@GOTPAGEOFF]
Lloh2:
	ldr	x10, [x9]
Lloh3:
	adrp	x9, _QIB_PERMISSIVE_LID@GOTPAGE
Lloh4:
	ldr	x9, [x9, _QIB_PERMISSIVE_LID@GOTPAGEOFF]
Lloh5:
	ldr	x11, [x9]
Lloh6:
	adrp	x9, _IB_AH_GRH@GOTPAGE
Lloh7:
	ldr	x9, [x9, _IB_AH_GRH@GOTPAGEOFF]
	ldr	w12, [x1, #8]
Lloh8:
	ldr	w9, [x9]
	and	w9, w9, w12
	cmp	x8, x10
	ccmp	x8, x11, #4, ge
	ccmp	w9, #0, #0, ne
	b.eq	LBB0_9
; %bb.1:
	mov	x19, x1
	cbz	w9, LBB0_3
; %bb.2:
	ldr	x9, [x19, #32]
Lloh9:
	adrp	x10, _QIB_GUIDS_PER_PORT@GOTPAGE
Lloh10:
	ldr	x10, [x10, _QIB_GUIDS_PER_PORT@GOTPAGEOFF]
Lloh11:
	ldr	x10, [x10]
	cmp	x9, x10
	ccmp	x8, #0, #4, lt
	b.ne	LBB0_4
	b	LBB0_9
LBB0_3:
	cbz	x8, LBB0_9
LBB0_4:
	ldr	w8, [x19, #12]
	cmp	w8, #1
	b.lt	LBB0_9
; %bb.5:
	ldr	w9, [x0]
	cmp	w8, w9
	b.gt	LBB0_9
; %bb.6:
	ldr	x0, [x19, #16]
Lloh12:
	adrp	x8, _IB_RATE_PORT_CURRENT@GOTPAGE
Lloh13:
	ldr	x8, [x8, _IB_RATE_PORT_CURRENT@GOTPAGEOFF]
Lloh14:
	ldr	x8, [x8]
	cmp	x0, x8
	b.eq	LBB0_8
; %bb.7:
	bl	_ib_rate_to_mult
	tbnz	x0, #63, LBB0_9
LBB0_8:
	ldr	w8, [x19, #24]
	cmp	w8, #16
	b.lt	LBB0_11
LBB0_9:
Lloh15:
	adrp	x8, _EINVAL@GOTPAGE
Lloh16:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_10:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_11:
	mov	w0, #0
	b	LBB0_10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_QIB_MULTICAST_LID_BASE,8,3     ; @QIB_MULTICAST_LID_BASE
	.comm	_QIB_PERMISSIVE_LID,8,3         ; @QIB_PERMISSIVE_LID
	.comm	_IB_AH_GRH,4,2                  ; @IB_AH_GRH
	.comm	_QIB_GUIDS_PER_PORT,8,3         ; @QIB_GUIDS_PER_PORT
	.comm	_IB_RATE_PORT_CURRENT,8,3       ; @IB_RATE_PORT_CURRENT
	.comm	_EINVAL,4,2                     ; @EINVAL
.subsections_via_symbols
