	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hfi1_check_ah
_hfi1_check_ah:                         ## @hfi1_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	%r15
	pushq	%r14
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %rbx
	movq	%rdi, %r14
	movq	%rsi, %rdi
	callq	_rdma_ah_get_dlid
	movl	%eax, %edi
	callq	_hfi1_check_mcast
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	%rbx, %rdi
	callq	_rdma_ah_get_ah_flags
	movq	_IB_AH_GRH@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_5
LBB0_2:
	movq	%rbx, %rdi
	callq	_rdma_ah_get_port_num
	movq	%r14, %rdi
	movl	%eax, %esi
	callq	_to_iport
	movq	%rax, %r15
	movq	%rax, %rdi
	callq	_ppd_from_ibp
	movq	%rax, %rdi
	callq	_dd_from_ppd
	movq	%rax, %r14
	movq	%rbx, %rdi
	callq	_rdma_ah_get_sl
	movq	%rax, %rbx
	movq	(%r15), %rdi
	callq	_ARRAY_SIZE
	cmpq	%rax, %rbx
	jae	LBB0_5
## %bb.3:
	movq	(%r15), %rdi
	callq	_ARRAY_SIZE
	movq	%rbx, %rdi
	movq	%rax, %rsi
	callq	_array_index_nospec
	movq	(%r15), %rcx
	movq	(%rcx,%rax,8), %r15
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_sc_to_vlt
	movq	_num_vls@GOTPCREL(%rip), %rcx
	xorl	%ebx, %ebx
	cmpl	(%rcx), %eax
	jle	LBB0_6
## %bb.4:
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_sc_to_vlt
	cmpl	$15, %eax
	je	LBB0_6
LBB0_5:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_6:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_IB_AH_GRH,4,2                  ## @IB_AH_GRH
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_num_vls,4,2                    ## @num_vls
	.no_dead_strip	_hfi1_check_ah
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function hfi1_check_ah
_hfi1_check_ah:                         ; @hfi1_check_ah
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x19, x1
	mov	x20, x0
	mov	x0, x1
	bl	_rdma_ah_get_dlid
	bl	_hfi1_check_mcast
	cbz	x0, LBB0_2
; %bb.1:
	mov	x0, x19
	bl	_rdma_ah_get_ah_flags
Lloh0:
	adrp	x8, _IB_AH_GRH@GOTPAGE
Lloh1:
	ldr	x8, [x8, _IB_AH_GRH@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	tst	w8, w0
	b.eq	LBB0_6
LBB0_2:
	mov	x0, x19
	bl	_rdma_ah_get_port_num
	mov	x1, x0
	mov	x0, x20
	bl	_to_iport
	mov	x21, x0
	bl	_ppd_from_ibp
	bl	_dd_from_ppd
	mov	x20, x0
	mov	x0, x19
	bl	_rdma_ah_get_sl
	mov	x19, x0
	ldr	x0, [x21]
	bl	_ARRAY_SIZE
	cmp	x19, x0
	b.hs	LBB0_6
; %bb.3:
	ldr	x0, [x21]
	bl	_ARRAY_SIZE
	mov	x1, x0
	mov	x0, x19
	bl	_array_index_nospec
	ldr	x8, [x21]
	ldr	x19, [x8, x0, lsl #3]
	mov	x0, x20
	mov	x1, x19
	bl	_sc_to_vlt
Lloh3:
	adrp	x8, _num_vls@GOTPAGE
Lloh4:
	ldr	x8, [x8, _num_vls@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	cmp	w0, w8
	b.le	LBB0_5
; %bb.4:
	mov	x0, x20
	mov	x1, x19
	bl	_sc_to_vlt
	cmp	w0, #15
	b.ne	LBB0_6
LBB0_5:
	mov	w0, #0
	b	LBB0_7
LBB0_6:
Lloh6:
	adrp	x8, _EINVAL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_7:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_IB_AH_GRH,4,2                  ; @IB_AH_GRH
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_num_vls,4,2                    ; @num_vls
	.no_dead_strip	_hfi1_check_ah
.subsections_via_symbols
