	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_rvt_check_ah                   ## -- Begin function rvt_check_ah
	.p2align	4, 0x90
_rvt_check_ah:                          ## @rvt_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	%r13
	pushq	%r12
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r13
	movq	%rdi, %r14
	movq	%rsi, %rdi
	callq	_rdma_ah_get_port_num
	movl	%eax, %ebx
	movq	%r14, %rdi
	callq	_ib_to_rvt
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	%r13, %rdi
	callq	_rdma_ah_get_ah_flags
	movq	%rax, %r15
	movq	%r13, %rdi
	callq	_rdma_ah_get_static_rate
	movq	%rax, %r12
	leaq	-56(%rbp), %rdx
	movq	%r14, %rdi
	movl	%ebx, %esi
	callq	_ib_query_port
	testl	%eax, %eax
	je	LBB0_2
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_11:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_2:
	movq	%r12, %rcx
	movq	-48(%rbp), %r12                 ## 8-byte Reload
	testl	%ebx, %ebx
	jle	LBB0_1
## %bb.3:
	cmpl	(%r14), %ebx
	jg	LBB0_1
## %bb.4:
	movq	_IB_RATE_PORT_CURRENT@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rcx
	je	LBB0_6
## %bb.5:
	movq	%rcx, %rdi
	callq	_ib_rate_to_mbps
	testq	%rax, %rax
	js	LBB0_1
LBB0_6:
	movq	_IB_AH_GRH@GOTPCREL(%rip), %rax
	testq	%r15, (%rax)
	je	LBB0_8
## %bb.7:
	movq	%r13, %rdi
	callq	_rdma_ah_read_grh
	movq	(%rax), %rax
	cmpq	-56(%rbp), %rax
	jge	LBB0_1
LBB0_8:
	movq	(%r12), %rcx
	testq	%rcx, %rcx
	je	LBB0_9
## %bb.10:
	movq	%r14, %rdi
	movq	%r13, %rsi
	callq	*%rcx
	jmp	LBB0_11
LBB0_9:
	xorl	%eax, %eax
	jmp	LBB0_11
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_IB_RATE_PORT_CURRENT,8,3       ## @IB_RATE_PORT_CURRENT
	.comm	_IB_AH_GRH,8,3                  ## @IB_AH_GRH
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_rvt_check_ah                   ; -- Begin function rvt_check_ah
	.p2align	2
_rvt_check_ah:                          ; @rvt_check_ah
	.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	x19, x1
	mov	x20, x0
	mov	x0, x1
	bl	_rdma_ah_get_port_num
	mov	x23, x0
	mov	x0, x20
	bl	_ib_to_rvt
	mov	x21, x0
	mov	x0, x19
	bl	_rdma_ah_get_ah_flags
	mov	x22, x0
	mov	x0, x19
	bl	_rdma_ah_get_static_rate
	mov	x24, x0
	add	x2, sp, #8
	mov	x0, x20
	mov	x1, x23
	bl	_ib_query_port
	cbz	w0, LBB0_3
LBB0_1:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_2:
	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
LBB0_3:
	cmp	w23, #1
	b.lt	LBB0_1
; %bb.4:
	ldr	w8, [x20]
	cmp	w23, w8
	b.gt	LBB0_1
; %bb.5:
Lloh3:
	adrp	x8, _IB_RATE_PORT_CURRENT@GOTPAGE
Lloh4:
	ldr	x8, [x8, _IB_RATE_PORT_CURRENT@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	cmp	x24, x8
	b.eq	LBB0_7
; %bb.6:
	mov	x0, x24
	bl	_ib_rate_to_mbps
	tbnz	x0, #63, LBB0_1
LBB0_7:
Lloh6:
	adrp	x8, _IB_AH_GRH@GOTPAGE
Lloh7:
	ldr	x8, [x8, _IB_AH_GRH@GOTPAGEOFF]
Lloh8:
	ldr	x8, [x8]
	tst	x8, x22
	b.eq	LBB0_9
; %bb.8:
	mov	x0, x19
	bl	_rdma_ah_read_grh
	ldr	x8, [x0]
	ldr	x9, [sp, #8]
	cmp	x8, x9
	b.ge	LBB0_1
LBB0_9:
	ldr	x8, [x21]
	cbz	x8, LBB0_11
; %bb.10:
	mov	x0, x20
	mov	x1, x19
	blr	x8
	b	LBB0_2
LBB0_11:
	mov	w0, #0
	b	LBB0_2
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_IB_RATE_PORT_CURRENT,8,3       ; @IB_RATE_PORT_CURRENT
	.comm	_IB_AH_GRH,8,3                  ; @IB_AH_GRH
.subsections_via_symbols
