	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hfi1_setup_9B_packet
_hfi1_setup_9B_packet:                  ## @hfi1_setup_9B_packet
	.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
	movl	80(%rdi), %edi
	callq	_rcd_to_iport
	movq	%rax, %r15
	movq	%rbx, %rdi
	callq	_hfi1_setup_ib_header
	movq	72(%rbx), %r14
	movq	%r14, %rdi
	callq	_ib_get_lnh
	movq	_HFI1_LRH_BTH@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_2
## %bb.1:
	leaq	24(%r14), %rdi
	movq	%rdi, 8(%rbx)
	movq	$0, 64(%rbx)
LBB0_6:
	movl	56(%rbx), %eax
	movl	%eax, 60(%rbx)
	callq	_ib_bth_get_opcode
	movl	%eax, 52(%rbx)
	movq	%r14, %rdi
	callq	_ib_get_slid
	movl	%eax, 48(%rbx)
	movq	%r14, %rdi
	callq	_ib_get_dlid
	movq	%rax, %r15
	movq	%rax, (%rbx)
	movq	_IB_MULTICAST_LID_BASE@GOTPCREL(%rip), %r12
	movl	(%r12), %edi
	callq	_be16_to_cpu
	xorl	%edi, %edi
	cmpq	%rax, %r15
	jl	LBB0_8
## %bb.7:
	movq	(%rbx), %r15
	movq	_IB_LID_PERMISSIVE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_be16_to_cpu
	xorl	%edi, %edi
	cmpq	%rax, %r15
	setne	%dil
LBB0_8:
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_10
## %bb.9:
	movq	_OPA_MCAST_NR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_opa_get_mcast_base
	movq	%rax, %r15
	movl	(%r12), %edi
	callq	_be16_to_cpu
	subq	%rax, %r15
	addq	%r15, (%rbx)
LBB0_10:
	movq	%r14, %rdi
	callq	_ib_get_sl
	movl	%eax, 44(%rbx)
	movl	36(%rbx), %esi
	movq	%r14, %rdi
	callq	_hfi1_9B_get_sc5
	movl	%eax, 40(%rbx)
	movq	8(%rbx), %rdi
	callq	_ib_bth_get_pad
	movl	%eax, 32(%rbx)
	movq	$0, 24(%rbx)
	movq	8(%rbx), %rdi
	callq	_ib_bth_get_pkey
	movl	%eax, 20(%rbx)
	movq	8(%rbx), %rdi
	callq	_ib_bth_is_migration
	movl	%eax, 16(%rbx)
	xorl	%eax, %eax
	jmp	LBB0_12
LBB0_2:
	movq	_HFI1_LRH_GRH@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_11
## %bb.3:
	leaq	16(%r14), %rax
	movq	%rax, 8(%rbx)
	movq	%r14, 64(%rbx)
	movq	(%r14), %rax
	movq	_IB_GRH_NEXT_HDR@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_11
## %bb.4:
	movl	8(%r14), %edi
	callq	_be32_to_cpu
	movq	_IB_GRH_VERSION_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	sarl	%cl, %eax
	movq	_IB_GRH_VERSION@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_11
## %bb.5:
	movq	8(%rbx), %rdi
	jmp	LBB0_6
LBB0_11:
	incl	(%r15)
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_12:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_HFI1_LRH_BTH,8,3               ## @HFI1_LRH_BTH
	.comm	_HFI1_LRH_GRH,8,3               ## @HFI1_LRH_GRH
	.comm	_IB_GRH_NEXT_HDR,8,3            ## @IB_GRH_NEXT_HDR
	.comm	_IB_GRH_VERSION_SHIFT,4,2       ## @IB_GRH_VERSION_SHIFT
	.comm	_IB_GRH_VERSION,4,2             ## @IB_GRH_VERSION
	.comm	_IB_MULTICAST_LID_BASE,4,2      ## @IB_MULTICAST_LID_BASE
	.comm	_IB_LID_PERMISSIVE,4,2          ## @IB_LID_PERMISSIVE
	.comm	_OPA_MCAST_NR,4,2               ## @OPA_MCAST_NR
	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_hfi1_setup_9B_packet
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function hfi1_setup_9B_packet
_hfi1_setup_9B_packet:                  ; @hfi1_setup_9B_packet
	.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, x0
	ldr	w0, [x0, #80]
	bl	_rcd_to_iport
	mov	x21, x0
	mov	x0, x19
	bl	_hfi1_setup_ib_header
	ldr	x20, [x19, #72]
	mov	x0, x20
	bl	_ib_get_lnh
Lloh0:
	adrp	x8, _HFI1_LRH_BTH@GOTPAGE
Lloh1:
	ldr	x8, [x8, _HFI1_LRH_BTH@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_4
; %bb.1:
	add	x0, x20, #24
	str	x0, [x19, #8]
	str	xzr, [x19, #64]
LBB0_2:
	ldr	w8, [x19, #56]
	str	w8, [x19, #60]
	bl	_ib_bth_get_opcode
	str	w0, [x19, #52]
	mov	x0, x20
	bl	_ib_get_slid
	str	w0, [x19, #48]
	mov	x0, x20
	bl	_ib_get_dlid
	mov	x21, x0
	str	x0, [x19]
Lloh3:
	adrp	x22, _IB_MULTICAST_LID_BASE@GOTPAGE
Lloh4:
	ldr	x22, [x22, _IB_MULTICAST_LID_BASE@GOTPAGEOFF]
	ldr	w0, [x22]
	bl	_be16_to_cpu
	cmp	x21, x0
	b.ge	LBB0_9
; %bb.3:
	mov	w0, #0
	bl	_unlikely
	cbnz	x0, LBB0_10
	b	LBB0_11
LBB0_4:
Lloh5:
	adrp	x8, _HFI1_LRH_GRH@GOTPAGE
Lloh6:
	ldr	x8, [x8, _HFI1_LRH_GRH@GOTPAGEOFF]
Lloh7:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_8
; %bb.5:
	mov	x8, x20
	ldr	x9, [x8], #16
	str	x8, [x19, #8]
	str	x20, [x19, #64]
Lloh8:
	adrp	x8, _IB_GRH_NEXT_HDR@GOTPAGE
Lloh9:
	ldr	x8, [x8, _IB_GRH_NEXT_HDR@GOTPAGEOFF]
Lloh10:
	ldr	x8, [x8]
	cmp	x9, x8
	b.ne	LBB0_8
; %bb.6:
	ldr	w0, [x20, #8]
	bl	_be32_to_cpu
Lloh11:
	adrp	x8, _IB_GRH_VERSION_SHIFT@GOTPAGE
Lloh12:
	ldr	x8, [x8, _IB_GRH_VERSION_SHIFT@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	asr	w8, w0, w8
Lloh14:
	adrp	x9, _IB_GRH_VERSION@GOTPAGE
Lloh15:
	ldr	x9, [x9, _IB_GRH_VERSION@GOTPAGEOFF]
Lloh16:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ne	LBB0_8
; %bb.7:
	ldr	x0, [x19, #8]
	b	LBB0_2
LBB0_8:
	ldr	w8, [x21]
	add	w8, w8, #1
	str	w8, [x21]
Lloh17:
	adrp	x8, _EINVAL@GOTPAGE
Lloh18:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_12
LBB0_9:
	ldr	x21, [x19]
Lloh20:
	adrp	x8, _IB_LID_PERMISSIVE@GOTPAGE
Lloh21:
	ldr	x8, [x8, _IB_LID_PERMISSIVE@GOTPAGEOFF]
Lloh22:
	ldr	w0, [x8]
	bl	_be16_to_cpu
	cmp	x21, x0
	cset	w0, ne
	bl	_unlikely
	cbz	x0, LBB0_11
LBB0_10:
Lloh23:
	adrp	x8, _OPA_MCAST_NR@GOTPAGE
Lloh24:
	ldr	x8, [x8, _OPA_MCAST_NR@GOTPAGEOFF]
Lloh25:
	ldr	w0, [x8]
	bl	_opa_get_mcast_base
	mov	x21, x0
	ldr	w0, [x22]
	bl	_be16_to_cpu
	ldr	x8, [x19]
	sub	x9, x21, x0
	add	x8, x9, x8
	str	x8, [x19]
LBB0_11:
	mov	x0, x20
	bl	_ib_get_sl
	str	w0, [x19, #44]
	ldr	w1, [x19, #36]
	mov	x0, x20
	bl	_hfi1_9B_get_sc5
	str	w0, [x19, #40]
	ldr	x0, [x19, #8]
	bl	_ib_bth_get_pad
	str	w0, [x19, #32]
	str	xzr, [x19, #24]
	ldr	x0, [x19, #8]
	bl	_ib_bth_get_pkey
	str	w0, [x19, #20]
	ldr	x0, [x19, #8]
	bl	_ib_bth_is_migration
	mov	x8, x0
	mov	w0, #0
	str	w8, [x19, #16]
LBB0_12:
	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 AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.cfi_endproc
                                        ; -- End function
	.comm	_HFI1_LRH_BTH,8,3               ; @HFI1_LRH_BTH
	.comm	_HFI1_LRH_GRH,8,3               ; @HFI1_LRH_GRH
	.comm	_IB_GRH_NEXT_HDR,8,3            ; @IB_GRH_NEXT_HDR
	.comm	_IB_GRH_VERSION_SHIFT,4,2       ; @IB_GRH_VERSION_SHIFT
	.comm	_IB_GRH_VERSION,4,2             ; @IB_GRH_VERSION
	.comm	_IB_MULTICAST_LID_BASE,4,2      ; @IB_MULTICAST_LID_BASE
	.comm	_IB_LID_PERMISSIVE,4,2          ; @IB_LID_PERMISSIVE
	.comm	_OPA_MCAST_NR,4,2               ; @OPA_MCAST_NR
	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_hfi1_setup_9B_packet
.subsections_via_symbols
