	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_qib_ruc_check_hdr              ## -- Begin function qib_ruc_check_hdr
	.p2align	4, 0x90
_qib_ruc_check_hdr:                     ## @qib_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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, %r15
	movl	%edx, %r13d
	movq	%rsi, %r12
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	movq	(%rcx), %rax
	movq	_IB_MIG_ARMED@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	movl	%r8d, -44(%rbp)                 ## 4-byte Spill
	jne	LBB0_6
## %bb.1:
	movl	%r8d, %ebx
	movq	_IB_BTH_MIG_REQ@GOTPCREL(%rip), %rax
	testl	%r8d, (%rax)
	je	LBB0_6
## %bb.2:
	leaq	32(%r15), %r14
	movq	%r14, %rdi
	callq	_rdma_ah_get_ah_flags
	movq	_IB_AH_GRH@GOTPCREL(%rip), %rcx
	andl	(%rcx), %eax
	movl	$1, %ebx
	testl	%r13d, %r13d
	je	LBB0_17
## %bb.3:
	testl	%eax, %eax
	je	LBB0_24
## %bb.4:
	movq	%r14, -64(%rbp)                 ## 8-byte Spill
	movq	%r14, %rdi
	callq	_rdma_ah_read_grh
	movq	%rax, %r13
	movl	8(%rax), %esi
	movq	-56(%rbp), %r14                 ## 8-byte Reload
	movq	%r14, %rdi
	callq	_get_sguid
	leaq	12(%r12), %rdi
	movl	(%r14), %esi
	movl	%eax, %edx
	callq	_gid_ok
	testl	%eax, %eax
	je	LBB0_24
## %bb.5:
	leaq	8(%r12), %rdi
	movl	(%r13), %edx
	movl	4(%r13), %esi
	callq	_gid_ok
	testl	%eax, %eax
	movq	-64(%rbp), %r14                 ## 8-byte Reload
	jne	LBB0_18
	jmp	LBB0_24
LBB0_6:
	leaq	16(%r15), %r14
	movq	%r14, %rdi
	callq	_rdma_ah_get_ah_flags
	movq	_IB_AH_GRH@GOTPCREL(%rip), %rcx
	andl	(%rcx), %eax
	movl	$1, %ebx
	testl	%r13d, %r13d
	je	LBB0_10
## %bb.7:
	testl	%eax, %eax
	je	LBB0_24
## %bb.8:
	movq	%r14, %rdi
	callq	_rdma_ah_read_grh
	movq	%rax, %rbx
	movl	8(%rax), %esi
	movq	%r12, %r13
	movq	-56(%rbp), %r12                 ## 8-byte Reload
	movq	%r12, %rdi
	callq	_get_sguid
	leaq	12(%r13), %rdi
	movl	(%r12), %esi
	movl	%eax, %edx
	callq	_gid_ok
	testl	%eax, %eax
	je	LBB0_23
## %bb.9:
	leaq	8(%r13), %rdi
	movl	(%rbx), %edx
	movl	4(%rbx), %esi
	callq	_gid_ok
	testl	%eax, %eax
	movq	%r13, %r12
	movl	$1, %ebx
	jne	LBB0_11
	jmp	LBB0_24
LBB0_10:
	testl	%eax, %eax
	jne	LBB0_24
LBB0_11:
	movl	24(%r15), %esi
	movq	-56(%rbp), %r13                 ## 8-byte Reload
	movq	%r13, %rdi
	callq	_qib_get_pkey
	movl	-44(%rbp), %ebx                 ## 4-byte Reload
	movl	%ebx, %edi
	movl	%eax, %esi
	callq	_qib_pkey_ok
	movq	(%r12), %rcx
	testl	%eax, %eax
	je	LBB0_22
## %bb.12:
	movl	12(%rcx), %edi
	callq	_be16_to_cpu
	movl	%eax, %r12d
	movq	%r14, %rdi
	callq	_rdma_ah_get_dlid
	movl	$1, %ebx
	cmpl	%eax, %r12d
	jne	LBB0_24
## %bb.13:
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_ppd_from_ibp
	movq	(%rax), %rax
	cmpq	8(%r15), %rax
	jne	LBB0_24
## %bb.14:
	movq	(%r15), %rax
	movq	_IB_MIG_REARM@GOTPCREL(%rip), %rcx
	xorl	%ebx, %ebx
	cmpq	(%rcx), %rax
	jne	LBB0_24
## %bb.15:
	movq	_IB_BTH_MIG_REQ@GOTPCREL(%rip), %rax
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	testl	%ecx, (%rax)
	jne	LBB0_24
## %bb.16:
	movq	_IB_MIG_ARMED@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, (%r15)
	jmp	LBB0_24
LBB0_17:
	testl	%eax, %eax
	jne	LBB0_24
LBB0_18:
	movl	36(%r15), %esi
	movq	-56(%rbp), %r13                 ## 8-byte Reload
	movq	%r13, %rdi
	callq	_qib_get_pkey
	movl	-44(%rbp), %ebx                 ## 4-byte Reload
	movl	%ebx, %edi
	movl	%eax, %esi
	callq	_qib_pkey_ok
	movq	(%r12), %rcx
	testl	%eax, %eax
	je	LBB0_22
## %bb.19:
	movl	12(%rcx), %edi
	callq	_be16_to_cpu
	movq	%r14, %r12
	movl	%eax, %r14d
	movq	%r12, %rdi
	callq	_rdma_ah_get_dlid
	movl	$1, %ebx
	cmpl	%eax, %r14d
	jne	LBB0_24
## %bb.20:
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_ppd_from_ibp
	movq	(%rax), %r14
	movq	%r12, %rdi
	callq	_rdma_ah_get_port_num
	cmpq	%rax, %r14
	jne	LBB0_24
## %bb.21:
	leaq	28(%r15), %rbx
	movq	%rbx, %rdi
	callq	_spin_lock_irqsave
	movq	%r15, %rdi
	callq	_qib_migrate_qp
	movq	%rbx, %rdi
	callq	_spin_unlock_irqrestore
	xorl	%ebx, %ebx
	jmp	LBB0_24
LBB0_22:
	movl	(%rcx), %edi
	callq	_be16_to_cpu
	shrl	$4, %eax
	andl	$15, %eax
	movl	20(%r15), %r8d
	movq	(%r12), %rcx
	movl	4(%rcx), %edx
	movl	12(%rcx), %r9d
	movl	%edx, (%rsp)
	movq	%r13, %rdi
	movl	%ebx, %esi
	movl	%eax, %edx
	xorl	%ecx, %ecx
	callq	_qib_bad_pkey
LBB0_23:
	movl	$1, %ebx
LBB0_24:
	movl	%ebx, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_IB_MIG_ARMED,8,3               ## @IB_MIG_ARMED
	.comm	_IB_BTH_MIG_REQ,4,2             ## @IB_BTH_MIG_REQ
	.comm	_IB_AH_GRH,4,2                  ## @IB_AH_GRH
	.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	_qib_ruc_check_hdr              ; -- Begin function qib_ruc_check_hdr
	.p2align	2
_qib_ruc_check_hdr:                     ; @qib_ruc_check_hdr
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x20, x4
	mov	x19, x3
	mov	x24, x2
	mov	x22, x1
	mov	x21, x0
	ldr	x8, [x3]
Lloh0:
	adrp	x25, _IB_MIG_ARMED@GOTPAGE
Lloh1:
	ldr	x25, [x25, _IB_MIG_ARMED@GOTPAGEOFF]
	ldr	x9, [x25]
	cmp	x8, x9
	b.ne	LBB0_6
; %bb.1:
Lloh2:
	adrp	x8, _IB_BTH_MIG_REQ@GOTPAGE
Lloh3:
	ldr	x8, [x8, _IB_BTH_MIG_REQ@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	tst	w8, w20
	b.eq	LBB0_6
; %bb.2:
	add	x23, x19, #32
	mov	x0, x23
	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	w24, LBB0_17
; %bb.3:
	cbz	w8, LBB0_22
; %bb.4:
	mov	x0, x23
	bl	_rdma_ah_read_grh
	mov	x24, x0
	ldr	w1, [x0, #8]
	mov	x0, x21
	bl	_get_sguid
	mov	x2, x0
	add	x0, x22, #12
	ldr	w1, [x21]
	bl	_gid_ok
	cbz	w0, LBB0_22
; %bb.5:
	add	x0, x22, #8
	ldp	w2, w1, [x24]
	bl	_gid_ok
	cbnz	w0, LBB0_18
	b	LBB0_22
LBB0_6:
	add	x23, x19, #16
	mov	x0, x23
	bl	_rdma_ah_get_ah_flags
Lloh8:
	adrp	x8, _IB_AH_GRH@GOTPAGE
Lloh9:
	ldr	x8, [x8, _IB_AH_GRH@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	and	w8, w8, w0
	cbz	w24, LBB0_10
; %bb.7:
	cbz	w8, LBB0_22
; %bb.8:
	mov	x0, x23
	bl	_rdma_ah_read_grh
	mov	x24, x0
	ldr	w1, [x0, #8]
	mov	x0, x21
	bl	_get_sguid
	mov	x2, x0
	add	x0, x22, #12
	ldr	w1, [x21]
	bl	_gid_ok
	cbz	w0, LBB0_22
; %bb.9:
	add	x0, x22, #8
	ldp	w2, w1, [x24]
	bl	_gid_ok
	cbnz	w0, LBB0_11
	b	LBB0_22
LBB0_10:
	cbnz	w8, LBB0_22
LBB0_11:
	ldr	w1, [x19, #24]
	mov	x0, x21
	bl	_qib_get_pkey
	mov	x1, x0
	mov	x0, x20
	bl	_qib_pkey_ok
	ldr	x8, [x22]
	cbz	w0, LBB0_24
; %bb.12:
	ldr	w0, [x8, #12]
	bl	_be16_to_cpu
	mov	x22, x0
	mov	x0, x23
	bl	_rdma_ah_get_dlid
	cmp	w22, w0
	b.ne	LBB0_22
; %bb.13:
	mov	x0, x21
	bl	_ppd_from_ibp
	ldr	x8, [x0]
	ldr	x9, [x19, #8]
	cmp	x8, x9
	b.ne	LBB0_22
; %bb.14:
	ldr	x8, [x19]
Lloh11:
	adrp	x9, _IB_MIG_REARM@GOTPAGE
Lloh12:
	ldr	x9, [x9, _IB_MIG_REARM@GOTPAGEOFF]
Lloh13:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_16
; %bb.15:
Lloh14:
	adrp	x8, _IB_BTH_MIG_REQ@GOTPAGE
Lloh15:
	ldr	x8, [x8, _IB_BTH_MIG_REQ@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	tst	w8, w20
	b.eq	LBB0_25
LBB0_16:
	mov	w0, #0
	b	LBB0_23
LBB0_17:
	cbnz	w8, LBB0_22
LBB0_18:
	ldr	w1, [x19, #36]
	mov	x0, x21
	bl	_qib_get_pkey
	mov	x1, x0
	mov	x0, x20
	bl	_qib_pkey_ok
	ldr	x8, [x22]
	cbz	w0, LBB0_24
; %bb.19:
	ldr	w0, [x8, #12]
	bl	_be16_to_cpu
	mov	x20, x0
	mov	x0, x23
	bl	_rdma_ah_get_dlid
	cmp	w20, w0
	b.ne	LBB0_22
; %bb.20:
	mov	x0, x21
	bl	_ppd_from_ibp
	ldr	x20, [x0]
	mov	x0, x23
	bl	_rdma_ah_get_port_num
	cmp	x20, x0
	b.ne	LBB0_22
; %bb.21:
	add	x20, x19, #28
	mov	x0, x20
	bl	_spin_lock_irqsave
	mov	x0, x19
	bl	_qib_migrate_qp
	mov	x0, x20
	bl	_spin_unlock_irqrestore
	mov	w0, #0
	b	LBB0_23
LBB0_22:
	mov	w0, #1
LBB0_23:
	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
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_24:
	ldr	w0, [x8]
	bl	_be16_to_cpu
	ubfx	w2, w0, #4, #4
	ldr	w4, [x19, #20]
	ldr	x8, [x22]
	ldr	w5, [x8, #12]
	ldr	w6, [x8, #4]
	mov	x0, x21
	mov	x1, x20
	mov	w3, #0
	bl	_qib_bad_pkey
	mov	w0, #1
	b	LBB0_23
LBB0_25:
	mov	w0, #0
	ldr	x8, [x25]
	str	x8, [x19]
	b	LBB0_23
	.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_BTH_MIG_REQ,4,2             ; @IB_BTH_MIG_REQ
	.comm	_IB_AH_GRH,4,2                  ; @IB_AH_GRH
	.comm	_IB_MIG_REARM,8,3               ; @IB_MIG_REARM
.subsections_via_symbols
