	.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	$72, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r14
	movq	%rsi, %r15
	movq	%rdi, %r13
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movl	$65535, -84(%rbp)               ## imm = 0xFFFF
	movl	4(%rdi), %edi
	callq	_get_ocrdma_dev
	movq	%rax, %rbx
	movq	%r14, %rdi
	callq	_rdma_ah_get_ah_flags
	movq	_IB_AH_GRH@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_1
## %bb.2:
	movq	%r14, %rdi
	callq	_rdma_ah_read_grh
	movq	%rax, %r12
	movq	%rbx, %rdi
	addq	$16, %rdi
	movl	$1, %esi
	xorl	%edx, %edx
	callq	_atomic_cmpxchg
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	movq	%rbx, %rdi
	callq	_ocrdma_init_service_level
LBB0_4:
	movq	%rbx, -96(%rbp)                 ## 8-byte Spill
	movl	(%r12), %eax
	movq	_OCRDMA_QP_PARAMS_TCLASS_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shll	%cl, %eax
	orl	%eax, (%r15)
	movq	_OCRDMA_QP_PARAMS_FLOW_LABEL_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	4(%r12), %eax
	orl	%eax, 4(%r15)
	movq	%r14, %rdi
	callq	_rdma_ah_get_sl
	movq	_OCRDMA_QP_PARAMS_SL_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shll	%cl, %eax
	orl	%eax, 4(%r15)
	movl	8(%r12), %eax
	movq	_OCRDMA_QP_PARAMS_HOP_LMT_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shll	%cl, %eax
	orl	%eax, 8(%r15)
	movq	_OCRDMA_QP_PARA_FLOW_LBL_VALID@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, 40(%r15)
	movq	32(%r15), %rdi
	movq	16(%r12), %rsi
	movl	$8, %edx
	callq	_memcpy
	movq	(%r14), %rbx
	leaq	-84(%rbp), %rsi
	leaq	-80(%rbp), %rdx
	movq	%rbx, %rdi
	callq	_rdma_read_gid_l2_fields
	testl	%eax, %eax
	jne	LBB0_15
## %bb.5:
	movl	24(%r12), %eax
	movl	%eax, (%r13)
	movq	24(%r15), %rdi
	movq	(%rbx), %rsi
	movl	$8, %edx
	callq	_memcpy
	leaq	-80(%rbp), %rdx
	movq	-96(%rbp), %rdi                 ## 8-byte Reload
	movq	%r14, %rsi
	callq	_ocrdma_resolve_dmac
	testl	%eax, %eax
	jne	LBB0_15
## %bb.6:
	movl	-76(%rbp), %eax
	movl	-72(%rbp), %ecx
	shll	$8, %eax
	orl	-80(%rbp), %eax
	shll	$16, %ecx
	movl	-68(%rbp), %edx
	shll	$24, %edx
	orl	%ecx, %edx
	orl	%eax, %edx
	movl	%edx, 12(%r15)
	movq	%rbx, %rdi
	callq	_rdma_gid_attr_network_type
	movl	%eax, %r13d
	movq	_RDMA_NETWORK_IPV4@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r13d
	jne	LBB0_8
## %bb.7:
	addq	$16, %r12
	leaq	-88(%rbp), %rdi
	movq	%rbx, %rsi
	callq	_rdma_gid2ip
	leaq	-104(%rbp), %r14
	movq	%r14, %rdi
	movq	%r12, %rsi
	callq	_rdma_gid2ip
	movq	32(%r15), %rdi
	movq	%r14, %rsi
	movl	$4, %edx
	callq	_memcpy
	movq	24(%r15), %rdi
	leaq	-88(%rbp), %rsi
	movl	$4, %edx
	callq	_memcpy
LBB0_8:
	movq	32(%r15), %rdi
	movl	$8, %esi
	callq	_ocrdma_cpu_to_le32
	movq	24(%r15), %rdi
	movl	$8, %esi
	callq	_ocrdma_cpu_to_le32
	movl	-60(%rbp), %eax
	shll	$8, %eax
	orl	-64(%rbp), %eax
	movl	%eax, 16(%r15)
	movl	-84(%rbp), %edx
	testl	%edx, %edx
	movq	-96(%rbp), %rbx                 ## 8-byte Reload
	je	LBB0_11
## %bb.9:
	cmpl	$65535, %edx                    ## imm = 0xFFFF
	jne	LBB0_13
## %bb.10:
	movl	$0, -84(%rbp)
LBB0_11:
	cmpq	$0, 8(%rbx)
	je	LBB0_14
## %bb.12:
	movl	4(%rbx), %esi
	leaq	L_.str(%rip), %rdi
	callq	_pr_err
	movl	4(%rbx), %esi
	leaq	L_.str.1(%rip), %rdi
	callq	_pr_err
	movl	-84(%rbp), %edx
	movl	16(%r15), %eax
LBB0_13:
	movq	_OCRDMA_QP_PARAMS_VLAN_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shll	%cl, %edx
	orl	%eax, %edx
	movl	%edx, 16(%r15)
	movq	_OCRDMA_QP_PARA_VLAN_EN_VALID@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, 40(%r15)
	movl	(%rbx), %eax
	andl	$7, %eax
	movq	_OCRDMA_QP_PARAMS_SL_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shll	%cl, %eax
	orl	%eax, 4(%r15)
LBB0_14:
	movq	_OCRDMA_QP_PARAMS_FLAGS_L3_TYPE_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	shll	%cl, %r13d
	movq	_OCRDMA_QP_PARAMS_FLAGS_L3_TYPE_MASK@GOTPCREL(%rip), %rax
	andl	(%rax), %r13d
	orl	%r13d, 20(%r15)
	xorl	%eax, %eax
	jmp	LBB0_15
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_15:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-48(%rbp), %rcx
	jne	LBB0_17
## %bb.16:
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_17:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_IB_AH_GRH,4,2                  ## @IB_AH_GRH
	.comm	_EINVAL,4,2                     ## @EINVAL
	.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_SL_SHIFT,4,2  ## @OCRDMA_QP_PARAMS_SL_SHIFT
	.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	_RDMA_NETWORK_IPV4,4,2          ## @RDMA_NETWORK_IPV4
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"ocrdma%d:Using VLAN with PFC is recommended\n"

L_.str.1:                               ## @.str.1
	.asciz	"ocrdma%d:Using VLAN 0 for this connection\n"

	.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
	.comm	_OCRDMA_QP_PARAMS_FLAGS_L3_TYPE_SHIFT,4,2 ## @OCRDMA_QP_PARAMS_FLAGS_L3_TYPE_SHIFT
	.comm	_OCRDMA_QP_PARAMS_FLAGS_L3_TYPE_MASK,4,2 ## @OCRDMA_QP_PARAMS_FLAGS_L3_TYPE_MASK
	.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, #128
	.cfi_def_cfa_offset 128
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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	x21, x2
	mov	x19, x1
	mov	x22, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #40]
	mov	w8, #65535
	str	w8, [sp, #12]
	ldr	w0, [x0, #4]
	bl	_get_ocrdma_dev
	mov	x20, x0
	mov	x0, x21
	bl	_rdma_ah_get_ah_flags
Lloh3:
	adrp	x8, _IB_AH_GRH@GOTPAGE
Lloh4:
	ldr	x8, [x8, _IB_AH_GRH@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	tst	w8, w0
	b.eq	LBB0_14
; %bb.1:
	mov	x0, x21
	bl	_rdma_ah_read_grh
	mov	x23, x0
	add	x0, x20, #16
	mov	w1, #1
	mov	w2, #0
	bl	_atomic_cmpxchg
	cbz	x0, LBB0_3
; %bb.2:
	mov	x0, x20
	bl	_ocrdma_init_service_level
LBB0_3:
	ldr	w8, [x23]
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]
	orr	w8, w9, w8
	str	w8, [x19]
	ldr	w8, [x23, #4]
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, #4]
	mov	x0, x21
	bl	_rdma_ah_get_sl
Lloh12:
	adrp	x26, _OCRDMA_QP_PARAMS_SL_SHIFT@GOTPAGE
Lloh13:
	ldr	x26, [x26, _OCRDMA_QP_PARAMS_SL_SHIFT@GOTPAGEOFF]
	ldr	w8, [x26]
	lsl	w8, w0, w8
	ldp	w9, w10, [x19, #4]
	orr	w8, w9, w8
	str	w8, [x19, #4]
	mov	x24, x23
	ldr	x1, [x24, #16]!
Lloh14:
	adrp	x8, _OCRDMA_QP_PARAMS_HOP_LMT_SHIFT@GOTPAGE
Lloh15:
	ldr	x8, [x8, _OCRDMA_QP_PARAMS_HOP_LMT_SHIFT@GOTPAGEOFF]
	ldur	w9, [x24, #-8]
Lloh16:
	ldr	w8, [x8]
	lsl	w8, w9, w8
	orr	w8, w10, w8
Lloh17:
	adrp	x9, _OCRDMA_QP_PARA_FLOW_LBL_VALID@GOTPAGE
Lloh18:
	ldr	x9, [x9, _OCRDMA_QP_PARA_FLOW_LBL_VALID@GOTPAGEOFF]
	str	w8, [x19, #8]
Lloh19:
	ldr	w8, [x9]
	ldr	w9, [x19, #40]
	orr	w8, w9, w8
	str	w8, [x19, #40]
	ldr	x0, [x19, #32]
	mov	w2, #8
	bl	_memcpy
	ldr	x25, [x21]
	add	x1, sp, #12
	add	x2, sp, #16
	mov	x0, x25
	bl	_rdma_read_gid_l2_fields
	cbnz	w0, LBB0_15
; %bb.4:
	ldr	w8, [x23, #24]
	str	w8, [x22]
	ldr	x0, [x19, #24]
	ldr	x1, [x25]
	mov	w2, #8
	bl	_memcpy
	add	x2, sp, #16
	mov	x0, x20
	mov	x1, x21
	bl	_ocrdma_resolve_dmac
	cbnz	w0, LBB0_15
; %bb.5:
	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, #12]
	mov	x0, x25
	bl	_rdma_gid_attr_network_type
	mov	x21, x0
Lloh20:
	adrp	x8, _RDMA_NETWORK_IPV4@GOTPAGE
Lloh21:
	ldr	x8, [x8, _RDMA_NETWORK_IPV4@GOTPAGEOFF]
Lloh22:
	ldr	w8, [x8]
	cmp	w0, w8
	b.ne	LBB0_7
; %bb.6:
	add	x0, sp, #8
	mov	x1, x25
	bl	_rdma_gid2ip
	mov	x0, sp
	mov	x1, x24
	bl	_rdma_gid2ip
	ldr	x0, [x19, #32]
	mov	x1, sp
	mov	w2, #4
	bl	_memcpy
	ldr	x0, [x19, #24]
	add	x1, sp, #8
	mov	w2, #4
	bl	_memcpy
LBB0_7:
	ldr	x0, [x19, #32]
	mov	w1, #8
	bl	_ocrdma_cpu_to_le32
	ldr	x0, [x19, #24]
	mov	w1, #8
	bl	_ocrdma_cpu_to_le32
	ldp	w8, w9, [sp, #32]
	orr	w8, w8, w9, lsl #8
	str	w8, [x19, #16]
	ldr	w9, [sp, #12]
	cbz	w9, LBB0_10
; %bb.8:
	mov	w10, #65535
	cmp	w9, w10
	b.ne	LBB0_12
; %bb.9:
	str	wzr, [sp, #12]
LBB0_10:
	ldr	x8, [x20, #8]
	cbz	x8, LBB0_13
; %bb.11:
	ldr	w1, [x20, #4]
Lloh23:
	adrp	x0, l_.str@PAGE
Lloh24:
	add	x0, x0, l_.str@PAGEOFF
	bl	_pr_err
	ldr	w1, [x20, #4]
Lloh25:
	adrp	x0, l_.str.1@PAGE
Lloh26:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_pr_err
	ldr	w9, [sp, #12]
	ldr	w8, [x19, #16]
LBB0_12:
Lloh27:
	adrp	x10, _OCRDMA_QP_PARAMS_VLAN_SHIFT@GOTPAGE
Lloh28:
	ldr	x10, [x10, _OCRDMA_QP_PARAMS_VLAN_SHIFT@GOTPAGEOFF]
Lloh29:
	ldr	w10, [x10]
	lsl	w9, w9, w10
	orr	w8, w8, w9
Lloh30:
	adrp	x9, _OCRDMA_QP_PARA_VLAN_EN_VALID@GOTPAGE
Lloh31:
	ldr	x9, [x9, _OCRDMA_QP_PARA_VLAN_EN_VALID@GOTPAGEOFF]
	str	w8, [x19, #16]
Lloh32:
	ldr	w8, [x9]
	ldr	w9, [x19, #40]
	orr	w8, w9, w8
	str	w8, [x19, #40]
	ldr	w8, [x20]
	and	w8, w8, #0x7
	ldr	w9, [x26]
	lsl	w8, w8, w9
	ldr	w9, [x19, #4]
	orr	w8, w9, w8
	str	w8, [x19, #4]
LBB0_13:
	mov	w0, #0
Lloh33:
	adrp	x8, _OCRDMA_QP_PARAMS_FLAGS_L3_TYPE_SHIFT@GOTPAGE
Lloh34:
	ldr	x8, [x8, _OCRDMA_QP_PARAMS_FLAGS_L3_TYPE_SHIFT@GOTPAGEOFF]
Lloh35:
	ldr	w8, [x8]
Lloh36:
	adrp	x9, _OCRDMA_QP_PARAMS_FLAGS_L3_TYPE_MASK@GOTPAGE
Lloh37:
	ldr	x9, [x9, _OCRDMA_QP_PARAMS_FLAGS_L3_TYPE_MASK@GOTPAGEOFF]
	lsl	w8, w21, w8
Lloh38:
	ldr	w9, [x9]
	and	w8, w8, w9
	ldr	w9, [x19, #20]
	orr	w8, w9, w8
	str	w8, [x19, #20]
	b	LBB0_15
LBB0_14:
Lloh39:
	adrp	x8, _EINVAL@GOTPAGE
Lloh40:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh41:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_15:
	ldr	x8, [sp, #40]
Lloh42:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh43:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh44:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_17
; %bb.16:
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
LBB0_17:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh39, Lloh40, Lloh41
	.loh AdrpLdrGotLdr	Lloh42, Lloh43, Lloh44
	.cfi_endproc
                                        ; -- End function
	.comm	_IB_AH_GRH,4,2                  ; @IB_AH_GRH
	.comm	_EINVAL,4,2                     ; @EINVAL
	.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_SL_SHIFT,4,2  ; @OCRDMA_QP_PARAMS_SL_SHIFT
	.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	_RDMA_NETWORK_IPV4,4,2          ; @RDMA_NETWORK_IPV4
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"ocrdma%d:Using VLAN with PFC is recommended\n"

l_.str.1:                               ; @.str.1
	.asciz	"ocrdma%d:Using VLAN 0 for this connection\n"

	.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
	.comm	_OCRDMA_QP_PARAMS_FLAGS_L3_TYPE_SHIFT,4,2 ; @OCRDMA_QP_PARAMS_FLAGS_L3_TYPE_SHIFT
	.comm	_OCRDMA_QP_PARAMS_FLAGS_L3_TYPE_MASK,4,2 ; @OCRDMA_QP_PARAMS_FLAGS_L3_TYPE_MASK
	.no_dead_strip	_ocrdma_set_av_params
.subsections_via_symbols
