	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hdr_check
_hdr_check:                             ## @hdr_check
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	16(%rdi), %r15
	callq	_bth_qpn
	movl	%eax, %r14d
	movq	%rbx, %rdi
	callq	_bth_tver
	movq	_BTH_TVER@GOTPCREL(%rip), %rcx
	xorl	%edi, %edi
	cmpq	(%rcx), %rax
	setne	%dil
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_3
## %bb.1:
	leaq	L_.str(%rip), %rdi
LBB0_2:
	xorl	%eax, %eax
	callq	_pr_warn_ratelimited
	jmp	LBB0_5
LBB0_3:
	xorl	%edi, %edi
	testl	%r14d, %r14d
	sete	%dil
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_6
## %bb.4:
	leaq	L_.str.1(%rip), %rdi
	callq	_pr_warn_once
LBB0_5:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_18:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	movq	_IB_MULTICAST_QPN@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r14d
	jne	LBB0_7
## %bb.15:
	movq	_RXE_GRH_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	xorl	%edi, %edi
	andl	(%rbx), %eax
	sete	%dil
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_16
## %bb.19:
	leaq	L_.str.3(%rip), %rdi
	jmp	LBB0_2
LBB0_7:
	movl	%r14d, %esi
	cmpl	$1, %r14d
	jne	LBB0_9
## %bb.8:
	movl	4(%r15), %esi
LBB0_9:
	movq	%r15, %rdi
	callq	_rxe_pool_get_index
	movq	%rax, %r12
	xorl	%edi, %edi
	testq	%rax, %rax
	sete	%dil
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_11
## %bb.10:
	leaq	L_.str.2(%rip), %rdi
	movl	%r14d, %esi
	xorl	%eax, %eax
	callq	_pr_warn_ratelimited
	jmp	LBB0_5
LBB0_16:
	xorl	%r12d, %r12d
LBB0_17:
	movq	%r12, 8(%rbx)
	xorl	%eax, %eax
	jmp	LBB0_18
LBB0_11:
	movq	%r15, %rdi
	movq	%rbx, %rsi
	movq	%r12, %rdx
	callq	_check_type_state
	movl	%eax, %edi
	callq	_unlikely
	testq	%rax, %rax
	jne	LBB0_14
## %bb.12:
	movq	%r15, %rdi
	movq	%rbx, %rsi
	movq	%r12, %rdx
	callq	_check_addr
	movl	%eax, %edi
	callq	_unlikely
	testq	%rax, %rax
	jne	LBB0_14
## %bb.13:
	movq	%r15, %rdi
	movq	%rbx, %rsi
	movl	%r14d, %edx
	movq	%r12, %rcx
	callq	_check_keys
	movl	%eax, %edi
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_17
LBB0_14:
	movq	%r12, %rdi
	callq	_rxe_drop_ref
	jmp	LBB0_5
	.cfi_endproc
                                        ## -- End function
	.comm	_BTH_TVER,8,3                   ## @BTH_TVER
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"bad tver\n"

L_.str.1:                               ## @.str.1
	.asciz	"QP 0 not supported"

	.comm	_IB_MULTICAST_QPN,4,2           ## @IB_MULTICAST_QPN
L_.str.2:                               ## @.str.2
	.asciz	"no qp matches qpn 0x%x\n"

	.comm	_RXE_GRH_MASK,4,2               ## @RXE_GRH_MASK
L_.str.3:                               ## @.str.3
	.asciz	"no grh for mcast qpn\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_hdr_check
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function hdr_check
_hdr_check:                             ; @hdr_check
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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, x0
	ldr	x21, [x0, #16]
	bl	_bth_qpn
	mov	x20, x0
	mov	x0, x19
	bl	_bth_tver
Lloh0:
	adrp	x8, _BTH_TVER@GOTPAGE
Lloh1:
	ldr	x8, [x8, _BTH_TVER@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	x0, x8
	cset	w0, ne
	bl	_unlikely
	cbz	x0, LBB0_3
; %bb.1:
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
LBB0_2:
	bl	_pr_warn_ratelimited
	b	LBB0_5
LBB0_3:
	cmp	w20, #0
	cset	w0, eq
	bl	_unlikely
	cbz	x0, LBB0_7
; %bb.4:
Lloh5:
	adrp	x0, l_.str.1@PAGE
Lloh6:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_pr_warn_once
LBB0_5:
Lloh7:
	adrp	x8, _EINVAL@GOTPAGE
Lloh8:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_6:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
LBB0_7:
Lloh10:
	adrp	x8, _IB_MULTICAST_QPN@GOTPAGE
Lloh11:
	ldr	x8, [x8, _IB_MULTICAST_QPN@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	cmp	w20, w8
	b.ne	LBB0_10
; %bb.8:
	ldr	w8, [x19]
Lloh13:
	adrp	x9, _RXE_GRH_MASK@GOTPAGE
Lloh14:
	ldr	x9, [x9, _RXE_GRH_MASK@GOTPAGEOFF]
Lloh15:
	ldr	w9, [x9]
	tst	w9, w8
	cset	w0, eq
	bl	_unlikely
	cbz	x0, LBB0_14
; %bb.9:
Lloh16:
	adrp	x0, l_.str.3@PAGE
Lloh17:
	add	x0, x0, l_.str.3@PAGEOFF
	b	LBB0_2
LBB0_10:
	mov	x1, x20
	cmp	w20, #1
	b.ne	LBB0_12
; %bb.11:
	ldr	w1, [x21, #4]
LBB0_12:
	mov	x0, x21
	bl	_rxe_pool_get_index
	mov	x22, x0
	cmp	x0, #0
	cset	w0, eq
	bl	_unlikely
	cbz	x0, LBB0_16
; %bb.13:
	str	x20, [sp]
Lloh18:
	adrp	x0, l_.str.2@PAGE
Lloh19:
	add	x0, x0, l_.str.2@PAGEOFF
	b	LBB0_2
LBB0_14:
	mov	x22, #0
LBB0_15:
	mov	w0, #0
	str	x22, [x19, #8]
	b	LBB0_6
LBB0_16:
	mov	x0, x21
	mov	x1, x19
	mov	x2, x22
	bl	_check_type_state
	bl	_unlikely
	cbnz	x0, LBB0_19
; %bb.17:
	mov	x0, x21
	mov	x1, x19
	mov	x2, x22
	bl	_check_addr
	bl	_unlikely
	cbnz	x0, LBB0_19
; %bb.18:
	mov	x0, x21
	mov	x1, x19
	mov	x2, x20
	mov	x3, x22
	bl	_check_keys
	bl	_unlikely
	cbz	x0, LBB0_15
LBB0_19:
	mov	x0, x22
	bl	_rxe_drop_ref
	b	LBB0_5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpAdd	Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_BTH_TVER,8,3                   ; @BTH_TVER
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"bad tver\n"

l_.str.1:                               ; @.str.1
	.asciz	"QP 0 not supported"

	.comm	_IB_MULTICAST_QPN,4,2           ; @IB_MULTICAST_QPN
l_.str.2:                               ; @.str.2
	.asciz	"no qp matches qpn 0x%x\n"

	.comm	_RXE_GRH_MASK,4,2               ; @RXE_GRH_MASK
l_.str.3:                               ; @.str.3
	.asciz	"no grh for mcast qpn\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_hdr_check
.subsections_via_symbols
