	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_hfi1_ruc_check_hdr             ## -- Begin function hfi1_ruc_check_hdr
	.p2align	4, 0x90
_hfi1_ruc_check_hdr:                    ## @hfi1_ruc_check_hdr
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r15
	movq	%rdi, %r12
	movq	56(%rsi), %r14
	movq	8(%rdi), %rbx
	leaq	16(%r14), %r13
	movq	%r13, %rdi
	callq	_rdma_ah_get_sl
	movl	(%rbx,%rax,4), %esi
	movq	(%r15), %rdx
	movq	8(%r15), %rax
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
	movq	16(%r15), %rcx
	movl	24(%r15), %edi
	movl	48(%r15), %eax
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	movq	(%r14), %rax
	movq	_IB_MIG_ARMED@GOTPCREL(%rip), %r8
	movq	40(%r15), %rbx
	cmpq	(%r8), %rax
	movq	%rcx, -72(%rbp)                 ## 8-byte Spill
	movq	%rdx, -64(%rbp)                 ## 8-byte Spill
	movl	%esi, -44(%rbp)                 ## 4-byte Spill
	jne	LBB0_6
## %bb.1:
	testl	%edi, %edi
	je	LBB0_6
## %bb.2:
	leaq	28(%r14), %r13
	movq	%r13, %rdi
	callq	_rdma_ah_get_ah_flags
	movq	_IB_AH_GRH@GOTPCREL(%rip), %rcx
	andl	(%rcx), %eax
	testq	%rbx, %rbx
	je	LBB0_10
## %bb.3:
	movl	$1, %ebx
	testl	%eax, %eax
	je	LBB0_27
## %bb.4:
	movq	%r13, %rdi
	callq	_rdma_ah_read_grh
	movq	%rax, %rbx
	movl	8(%rax), %esi
	movq	%r12, %rdi
	callq	_get_sguid
	movq	40(%r15), %rdi
	addq	$4, %rdi
	movl	(%r12), %esi
	movl	%eax, %edx
	callq	_gid_ok
	testl	%eax, %eax
	je	LBB0_26
## %bb.5:
	movq	40(%r15), %rdi
	movl	(%rbx), %edx
	movl	4(%rbx), %esi
	callq	_gid_ok
	testl	%eax, %eax
	movl	$1, %ebx
	jne	LBB0_12
	jmp	LBB0_27
LBB0_6:
	movl	%edi, -52(%rbp)                 ## 4-byte Spill
	movq	%r13, %rdi
	callq	_rdma_ah_get_ah_flags
	movq	_IB_AH_GRH@GOTPCREL(%rip), %rcx
	andl	(%rcx), %eax
	testq	%rbx, %rbx
	je	LBB0_16
## %bb.7:
	movl	$1, %ebx
	testl	%eax, %eax
	je	LBB0_27
## %bb.8:
	movq	%r13, %rdi
	callq	_rdma_ah_read_grh
	movq	%rax, %rbx
	movl	8(%rax), %esi
	movq	%r12, %rdi
	callq	_get_sguid
	movq	40(%r15), %rdi
	addq	$4, %rdi
	movl	(%r12), %esi
	movl	%eax, %edx
	callq	_gid_ok
	testl	%eax, %eax
	je	LBB0_26
## %bb.9:
	movq	40(%r15), %rdi
	movl	(%rbx), %edx
	movl	4(%rbx), %esi
	callq	_gid_ok
	testl	%eax, %eax
	movl	$1, %ebx
	jne	LBB0_18
	jmp	LBB0_27
LBB0_10:
	testl	%eax, %eax
	je	LBB0_12
## %bb.11:
	movq	32(%r15), %rax
	movq	_RHF_RCV_TYPE_BYPASS@GOTPCREL(%rip), %rcx
	movl	$1, %ebx
	cmpq	(%rcx), %rax
	jne	LBB0_27
LBB0_12:
	movq	%r12, %rdi
	callq	_ppd_from_ibp
	movq	%rax, %rdi
	movl	-48(%rbp), %ebx                 ## 4-byte Reload
	movl	%ebx, %esi
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	movq	-80(%rbp), %r15                 ## 8-byte Reload
	movq	%r15, %rcx
	callq	_rcv_pkey_check
	movl	%eax, %edi
	callq	_unlikely
	testq	%rax, %rax
	jne	LBB0_19
## %bb.13:
	movq	%r13, %rdi
	callq	_rdma_ah_get_dlid
	movl	$1, %ebx
	cmpq	%rax, %r15
	jne	LBB0_27
## %bb.14:
	movq	%r12, %rdi
	callq	_ppd_from_ibp
	movq	(%rax), %rbx
	movq	%r13, %rdi
	callq	_rdma_ah_get_port_num
	cmpq	%rax, %rbx
	movl	$1, %ebx
	jne	LBB0_27
## %bb.15:
	leaq	24(%r14), %rbx
	movq	%rbx, %rdi
	callq	_spin_lock_irqsave
	movq	%r14, %rdi
	callq	_hfi1_migrate_qp
	movq	%rbx, %rdi
	callq	_spin_unlock_irqrestore
	xorl	%ebx, %ebx
	jmp	LBB0_27
LBB0_16:
	testl	%eax, %eax
	je	LBB0_18
## %bb.17:
	movq	32(%r15), %rax
	movq	_RHF_RCV_TYPE_BYPASS@GOTPCREL(%rip), %rcx
	movl	$1, %ebx
	cmpq	(%rcx), %rax
	jne	LBB0_27
LBB0_18:
	movq	%r12, %rdi
	callq	_ppd_from_ibp
	movq	%rax, %rdi
	movl	-48(%rbp), %ebx                 ## 4-byte Reload
	movl	%ebx, %esi
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	movq	-80(%rbp), %r15                 ## 8-byte Reload
	movq	%r15, %rcx
	callq	_rcv_pkey_check
	movl	%eax, %edi
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_20
LBB0_19:
	movl	20(%r14), %r8d
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movq	%rax, (%rsp)
	movq	%r12, %rdi
	movl	%ebx, %esi
	movq	-72(%rbp), %rdx                 ## 8-byte Reload
	xorl	%ecx, %ecx
	movq	%r15, %r9
	callq	_hfi1_bad_pkey
LBB0_26:
	movl	$1, %ebx
LBB0_27:
	movl	%ebx, %eax
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_20:
	movq	%r13, %rdi
	callq	_rdma_ah_get_dlid
	movl	$1, %ebx
	cmpq	%rax, %r15
	jne	LBB0_27
## %bb.21:
	movq	%r12, %rdi
	callq	_ppd_from_ibp
	movq	(%rax), %rax
	cmpq	8(%r14), %rax
	jne	LBB0_27
## %bb.22:
	movq	(%r14), %rax
	movq	_IB_MIG_REARM@GOTPCREL(%rip), %rcx
	xorl	%ebx, %ebx
	cmpq	(%rcx), %rax
	jne	LBB0_27
## %bb.23:
	cmpl	$0, -52(%rbp)                   ## 4-byte Folded Reload
	jne	LBB0_27
## %bb.24:
	movq	_IB_MIG_ARMED@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, (%r14)
	jmp	LBB0_27
	.cfi_endproc
                                        ## -- End function
	.comm	_IB_MIG_ARMED,8,3               ## @IB_MIG_ARMED
	.comm	_IB_AH_GRH,4,2                  ## @IB_AH_GRH
	.comm	_RHF_RCV_TYPE_BYPASS,8,3        ## @RHF_RCV_TYPE_BYPASS
	.comm	_IB_MIG_REARM,8,3               ## @IB_MIG_REARM
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_hfi1_ruc_check_hdr             ; -- Begin function hfi1_ruc_check_hdr
	.p2align	2
_hfi1_ruc_check_hdr:                    ; @hfi1_ruc_check_hdr
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x26, x1
	mov	x20, x0
	ldr	x19, [x1, #56]
	ldr	x21, [x0, #8]
	add	x27, x19, #16
	mov	x0, x27
	bl	_rdma_ah_get_sl
	ldr	w25, [x21, x0, lsl #2]
	ldp	x10, x21, [x26]
	ldr	x11, [x26, #16]
	ldr	w22, [x26, #24]
	ldr	w24, [x26, #48]
	ldr	x8, [x19]
Lloh0:
	adrp	x23, _IB_MIG_ARMED@GOTPAGE
Lloh1:
	ldr	x23, [x23, _IB_MIG_ARMED@GOTPAGEOFF]
	ldr	x9, [x23]
	ldr	x28, [x26, #40]
	cmp	x8, x9
	ccmp	w22, #0, #4, eq
	b.ne	LBB0_5
; %bb.1:
	stp	x11, x10, [sp]                  ; 16-byte Folded Spill
	mov	x0, x27
	bl	_rdma_ah_get_ah_flags
Lloh2:
	adrp	x8, _IB_AH_GRH@GOTPAGE
Lloh3:
	ldr	x8, [x8, _IB_AH_GRH@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	and	w8, w8, w0
	cbz	x28, LBB0_9
; %bb.2:
	cbz	w8, LBB0_18
; %bb.3:
	mov	x0, x27
	bl	_rdma_ah_read_grh
	mov	x28, x0
	ldr	w1, [x0, #8]
	mov	x0, x20
	bl	_get_sguid
	mov	x2, x0
	ldr	x8, [x26, #40]
	add	x0, x8, #4
	ldr	w1, [x20]
	bl	_gid_ok
	cbz	w0, LBB0_18
; %bb.4:
	ldr	x0, [x26, #40]
	ldp	w2, w1, [x28]
	bl	_gid_ok
	cbnz	w0, LBB0_11
	b	LBB0_18
LBB0_5:
	mov	x23, x11
	mov	x22, x10
	add	x27, x19, #28
	mov	x0, x27
	bl	_rdma_ah_get_ah_flags
Lloh5:
	adrp	x8, _IB_AH_GRH@GOTPAGE
Lloh6:
	ldr	x8, [x8, _IB_AH_GRH@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	and	w8, w8, w0
	cbz	x28, LBB0_13
; %bb.6:
	cbz	w8, LBB0_18
; %bb.7:
	mov	x0, x27
	bl	_rdma_ah_read_grh
	mov	x28, x0
	ldr	w1, [x0, #8]
	mov	x0, x20
	bl	_get_sguid
	mov	x2, x0
	ldr	x8, [x26, #40]
	add	x0, x8, #4
	ldr	w1, [x20]
	bl	_gid_ok
	cbz	w0, LBB0_18
; %bb.8:
	ldr	x0, [x26, #40]
	ldp	w2, w1, [x28]
	bl	_gid_ok
	cbnz	w0, LBB0_15
	b	LBB0_18
LBB0_9:
	cbz	w8, LBB0_11
; %bb.10:
	ldr	x8, [x26, #32]
Lloh8:
	adrp	x9, _RHF_RCV_TYPE_BYPASS@GOTPAGE
Lloh9:
	ldr	x9, [x9, _RHF_RCV_TYPE_BYPASS@GOTPAGEOFF]
Lloh10:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_18
LBB0_11:
	mov	x0, x20
	bl	_ppd_from_ibp
	mov	x1, x24
	mov	x2, x25
	mov	x3, x21
	bl	_rcv_pkey_check
	bl	_unlikely
	cbz	x0, LBB0_20
; %bb.12:
	ldr	w4, [x19, #20]
	mov	x0, x20
	mov	x1, x24
	ldp	x2, x6, [sp]                    ; 16-byte Folded Reload
	mov	w3, #0
	mov	x5, x21
	b	LBB0_17
LBB0_13:
	cbz	w8, LBB0_15
; %bb.14:
	ldr	x8, [x26, #32]
Lloh11:
	adrp	x9, _RHF_RCV_TYPE_BYPASS@GOTPAGE
Lloh12:
	ldr	x9, [x9, _RHF_RCV_TYPE_BYPASS@GOTPAGEOFF]
Lloh13:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_18
LBB0_15:
	mov	x0, x20
	bl	_ppd_from_ibp
	mov	x1, x24
	mov	x2, x25
	mov	x3, x21
	bl	_rcv_pkey_check
	bl	_unlikely
	cbz	x0, LBB0_25
; %bb.16:
	ldr	w4, [x19, #20]
	mov	x0, x20
	mov	x1, x24
	mov	x2, x23
	mov	w3, #0
	mov	x5, x21
	mov	x6, x22
LBB0_17:
	bl	_hfi1_bad_pkey
LBB0_18:
	mov	w0, #1
LBB0_19:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_20:
	mov	x0, x27
	bl	_rdma_ah_get_dlid
	cmp	x21, x0
	b.ne	LBB0_18
; %bb.21:
	mov	x0, x20
	bl	_ppd_from_ibp
	ldr	x8, [x0]
	ldr	x9, [x19, #8]
	cmp	x8, x9
	b.ne	LBB0_18
; %bb.22:
	mov	w0, #0
	ldr	x8, [x19]
Lloh14:
	adrp	x9, _IB_MIG_REARM@GOTPAGE
Lloh15:
	ldr	x9, [x9, _IB_MIG_REARM@GOTPAGEOFF]
Lloh16:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_19
; %bb.23:
	cbnz	w22, LBB0_19
; %bb.24:
	mov	w0, #0
	ldr	x8, [x23]
	str	x8, [x19]
	b	LBB0_19
LBB0_25:
	mov	x0, x27
	bl	_rdma_ah_get_dlid
	cmp	x21, x0
	b.ne	LBB0_18
; %bb.26:
	mov	x0, x20
	bl	_ppd_from_ibp
	ldr	x20, [x0]
	mov	x0, x27
	bl	_rdma_ah_get_port_num
	cmp	x20, x0
	b.ne	LBB0_18
; %bb.27:
	add	x20, x19, #24
	mov	x0, x20
	bl	_spin_lock_irqsave
	mov	x0, x19
	bl	_hfi1_migrate_qp
	mov	x0, x20
	bl	_spin_unlock_irqrestore
	mov	w0, #0
	b	LBB0_19
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_IB_MIG_ARMED,8,3               ; @IB_MIG_ARMED
	.comm	_IB_AH_GRH,4,2                  ; @IB_AH_GRH
	.comm	_RHF_RCV_TYPE_BYPASS,8,3        ; @RHF_RCV_TYPE_BYPASS
	.comm	_IB_MIG_REARM,8,3               ; @IB_MIG_REARM
.subsections_via_symbols
