	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ocrdma_set_av_params
_ocrdma_set_av_params:                  ## @ocrdma_set_av_params
	.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	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_IB_AH_GRH@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%rdx)
	je	LBB0_4
## %bb.1:
	movq	%rdx, %rbx
	movq	%rsi, %r12
	movq	%rdi, %r14
	movl	8(%rdx), %eax
	movq	_OCRDMA_QP_PARAMS_TCLASS_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shll	%cl, %eax
	orl	%eax, 8(%rsi)
	movq	_OCRDMA_QP_PARAMS_FLOW_LABEL_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	12(%rdx), %eax
	orl	%eax, 12(%rsi)
	movl	16(%rdx), %eax
	movq	_OCRDMA_QP_PARAMS_HOP_LMT_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shll	%cl, %eax
	orl	%eax, 16(%rsi)
	movq	_OCRDMA_QP_PARA_FLOW_LBL_VALID@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, (%rsi)
	movq	40(%rsi), %rdi
	leaq	24(%rdx), %r13
	movq	24(%rdx), %rsi
	movl	$8, %edx
	callq	_memcpy
	movq	(%r14), %rdi
	movl	32(%rbx), %edx
	leaq	-88(%rbp), %r15
	movl	$1, %esi
	movq	%r15, %rcx
	callq	_ocrdma_query_gid
	movl	32(%rbx), %eax
	movl	%eax, 8(%r14)
	movq	32(%r12), %rdi
	movq	-88(%rbp), %rsi
	movl	$8, %edx
	callq	_memcpy
	movq	(%r14), %rdi
	leaq	-80(%rbp), %rdx
	movq	%r13, %rsi
	callq	_ocrdma_resolve_dgid
	movl	-76(%rbp), %eax
	shll	$8, %eax
	orl	-80(%rbp), %eax
	movl	-72(%rbp), %ecx
	shll	$16, %ecx
	movl	-68(%rbp), %edx
	shll	$24, %edx
	orl	%ecx, %edx
	orl	%eax, %edx
	movl	%edx, 20(%r12)
	movq	40(%r12), %rdi
	movl	$8, %esi
	callq	_ocrdma_cpu_to_le32
	movq	32(%r12), %rdi
	movl	$8, %esi
	callq	_ocrdma_cpu_to_le32
	movl	-60(%rbp), %eax
	shll	$8, %eax
	orl	-64(%rbp), %eax
	movl	%eax, 24(%r12)
	movq	%r15, %rdi
	callq	_rdma_get_vlan_id
	testl	%eax, %eax
	je	LBB0_4
## %bb.2:
	cmpl	$4095, %eax                     ## imm = 0xFFF
	jg	LBB0_4
## %bb.3:
	movq	_OCRDMA_QP_PARAMS_VLAN_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shll	%cl, %eax
	orl	%eax, 24(%r12)
	movq	_OCRDMA_QP_PARA_VLAN_EN_VALID@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, (%r12)
LBB0_4:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_6
## %bb.5:
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_IB_AH_GRH,4,2                  ## @IB_AH_GRH
	.comm	_OCRDMA_QP_PARAMS_TCLASS_SHIFT,4,2 ## @OCRDMA_QP_PARAMS_TCLASS_SHIFT
	.comm	_OCRDMA_QP_PARAMS_FLOW_LABEL_MASK,4,2 ## @OCRDMA_QP_PARAMS_FLOW_LABEL_MASK
	.comm	_OCRDMA_QP_PARAMS_HOP_LMT_SHIFT,4,2 ## @OCRDMA_QP_PARAMS_HOP_LMT_SHIFT
	.comm	_OCRDMA_QP_PARA_FLOW_LBL_VALID,4,2 ## @OCRDMA_QP_PARA_FLOW_LBL_VALID
	.comm	_OCRDMA_QP_PARAMS_VLAN_SHIFT,4,2 ## @OCRDMA_QP_PARAMS_VLAN_SHIFT
	.comm	_OCRDMA_QP_PARA_VLAN_EN_VALID,4,2 ## @OCRDMA_QP_PARA_VLAN_EN_VALID
	.no_dead_strip	_ocrdma_set_av_params
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ocrdma_set_av_params
_ocrdma_set_av_params:                  ; @ocrdma_set_av_params
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #40]
	ldr	w8, [x2]
Lloh3:
	adrp	x9, _IB_AH_GRH@GOTPAGE
Lloh4:
	ldr	x9, [x9, _IB_AH_GRH@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_4
; %bb.1:
	mov	x20, x2
	mov	x19, x1
	mov	x21, x0
	ldr	x1, [x20, #24]!
	ldur	w8, [x20, #-16]
Lloh6:
	adrp	x9, _OCRDMA_QP_PARAMS_TCLASS_SHIFT@GOTPAGE
Lloh7:
	ldr	x9, [x9, _OCRDMA_QP_PARAMS_TCLASS_SHIFT@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	lsl	w8, w8, w9
	ldp	w9, w10, [x19, #8]
	orr	w8, w9, w8
	str	w8, [x19, #8]
	ldur	w8, [x20, #-12]
Lloh9:
	adrp	x9, _OCRDMA_QP_PARAMS_FLOW_LABEL_MASK@GOTPAGE
Lloh10:
	ldr	x9, [x9, _OCRDMA_QP_PARAMS_FLOW_LABEL_MASK@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	and	w8, w9, w8
	orr	w8, w10, w8
	str	w8, [x19, #12]
	ldur	w8, [x20, #-8]
Lloh12:
	adrp	x9, _OCRDMA_QP_PARAMS_HOP_LMT_SHIFT@GOTPAGE
Lloh13:
	ldr	x9, [x9, _OCRDMA_QP_PARAMS_HOP_LMT_SHIFT@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x9]
	lsl	w8, w8, w9
	ldr	w9, [x19, #16]
	orr	w8, w9, w8
Lloh15:
	adrp	x9, _OCRDMA_QP_PARA_FLOW_LBL_VALID@GOTPAGE
Lloh16:
	ldr	x9, [x9, _OCRDMA_QP_PARA_FLOW_LBL_VALID@GOTPAGEOFF]
	str	w8, [x19, #16]
Lloh17:
	ldr	w8, [x9]
	ldr	w9, [x19]
	orr	w8, w9, w8
	str	w8, [x19]
	ldr	x0, [x19, #40]
	mov	w2, #8
	bl	_memcpy
	ldr	x0, [x21]
	ldr	w2, [x20, #8]
	add	x3, sp, #8
	mov	w1, #1
	bl	_ocrdma_query_gid
	ldr	w8, [x20, #8]
	str	w8, [x21, #8]
	ldr	x0, [x19, #32]
	ldr	x1, [sp, #8]
	mov	w2, #8
	bl	_memcpy
	ldr	x0, [x21]
	add	x2, sp, #16
	mov	x1, x20
	bl	_ocrdma_resolve_dgid
	ldp	w8, w9, [sp, #16]
	orr	w8, w8, w9, lsl #8
	ldp	w9, w10, [sp, #24]
	orr	w8, w8, w9, lsl #16
	orr	w8, w8, w10, lsl #24
	str	w8, [x19, #20]
	ldr	x0, [x19, #40]
	mov	w1, #8
	bl	_ocrdma_cpu_to_le32
	ldr	x0, [x19, #32]
	mov	w1, #8
	bl	_ocrdma_cpu_to_le32
	ldp	w8, w9, [sp, #32]
	orr	w8, w8, w9, lsl #8
	str	w8, [x19, #24]
	add	x0, sp, #8
	bl	_rdma_get_vlan_id
	cbz	w0, LBB0_4
; %bb.2:
	cmp	w0, #4095
	b.gt	LBB0_4
; %bb.3:
Lloh18:
	adrp	x8, _OCRDMA_QP_PARAMS_VLAN_SHIFT@GOTPAGE
Lloh19:
	ldr	x8, [x8, _OCRDMA_QP_PARAMS_VLAN_SHIFT@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
	lsl	w8, w0, w8
	ldr	w9, [x19, #24]
	orr	w8, w9, w8
	str	w8, [x19, #24]
Lloh21:
	adrp	x8, _OCRDMA_QP_PARA_VLAN_EN_VALID@GOTPAGE
Lloh22:
	ldr	x8, [x8, _OCRDMA_QP_PARA_VLAN_EN_VALID@GOTPAGEOFF]
Lloh23:
	ldr	w8, [x8]
	ldr	w9, [x19]
	orr	w8, w9, w8
	str	w8, [x19]
LBB0_4:
	ldr	x8, [sp, #40]
Lloh24:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh25:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh26:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_6
; %bb.5:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
LBB0_6:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.cfi_endproc
                                        ; -- End function
	.comm	_IB_AH_GRH,4,2                  ; @IB_AH_GRH
	.comm	_OCRDMA_QP_PARAMS_TCLASS_SHIFT,4,2 ; @OCRDMA_QP_PARAMS_TCLASS_SHIFT
	.comm	_OCRDMA_QP_PARAMS_FLOW_LABEL_MASK,4,2 ; @OCRDMA_QP_PARAMS_FLOW_LABEL_MASK
	.comm	_OCRDMA_QP_PARAMS_HOP_LMT_SHIFT,4,2 ; @OCRDMA_QP_PARAMS_HOP_LMT_SHIFT
	.comm	_OCRDMA_QP_PARA_FLOW_LBL_VALID,4,2 ; @OCRDMA_QP_PARA_FLOW_LBL_VALID
	.comm	_OCRDMA_QP_PARAMS_VLAN_SHIFT,4,2 ; @OCRDMA_QP_PARAMS_VLAN_SHIFT
	.comm	_OCRDMA_QP_PARA_VLAN_EN_VALID,4,2 ; @OCRDMA_QP_PARA_VLAN_EN_VALID
	.no_dead_strip	_ocrdma_set_av_params
.subsections_via_symbols
