	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ice_add_ieee_app_pri_tlv
_ice_add_ieee_app_pri_tlv:              ## @ice_add_ieee_app_pri_tlv
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	cmpq	$0, (%rsi)
	je	LBB0_5
## %bb.1:
	movq	%rsi, %r15
	movq	%rdi, %r14
	movq	_ICE_IEEE_8021QAZ_OUI@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_ICE_LLDP_TLV_OUI_S@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	shll	%cl, %edi
	movq	(%r14), %rbx
	movq	_ICE_IEEE_SUBTYPE_APP_PRI@GOTPCREL(%rip), %rax
	orl	(%rax), %edi
	callq	_htonl
	movl	%eax, 12(%r14)
	movq	8(%r15), %rax
	movl	$8, %ecx
	xorl	%edx, %edx
	movq	_ICE_IEEE_APP_PRIO_S@GOTPCREL(%rip), %r8
	movq	_ICE_DCBX_MAX_APPS@GOTPCREL(%rip), %r9
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	%rcx, %rdi
	movl	-32(%rax,%rcx,4), %esi
	andl	$7, %esi
	movzbl	(%r8), %ecx
	shlq	%cl, %rsi
	movl	-28(%rax,%rdi,4), %ecx
	andl	$7, %ecx
	orq	%rcx, %rsi
	movq	%rsi, -56(%rbx,%rdi,8)
	movl	-24(%rax,%rdi,4), %ecx
	movzbl	%ch, %esi
	movq	%rsi, -48(%rbx,%rdi,8)
	movzbl	%cl, %ecx
	movq	%rcx, -40(%rbx,%rdi,8)
	incq	%rdx
	cmpq	(%r9), %rdx
	jae	LBB0_4
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	leaq	3(%rdi), %rcx
	cmpq	(%r15), %rdx
	jb	LBB0_2
LBB0_4:
	movq	_ICE_TLV_TYPE_ORG@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_ICE_LLDP_TLV_TYPE_S@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shlq	%cl, %rax
	andl	$511, %edi                      ## imm = 0x1FF
	orq	%rax, %rdi
	callq	_htons
	movl	%eax, 8(%r14)
LBB0_5:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ICE_IEEE_8021QAZ_OUI,4,2       ## @ICE_IEEE_8021QAZ_OUI
	.comm	_ICE_LLDP_TLV_OUI_S,4,2         ## @ICE_LLDP_TLV_OUI_S
	.comm	_ICE_IEEE_SUBTYPE_APP_PRI,4,2   ## @ICE_IEEE_SUBTYPE_APP_PRI
	.comm	_ICE_IEEE_APP_PRIO_S,8,3        ## @ICE_IEEE_APP_PRIO_S
	.comm	_ICE_DCBX_MAX_APPS,8,3          ## @ICE_DCBX_MAX_APPS
	.comm	_ICE_TLV_TYPE_ORG,8,3           ## @ICE_TLV_TYPE_ORG
	.comm	_ICE_LLDP_TLV_TYPE_S,8,3        ## @ICE_LLDP_TLV_TYPE_S
	.no_dead_strip	_ice_add_ieee_app_pri_tlv
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ice_add_ieee_app_pri_tlv
_ice_add_ieee_app_pri_tlv:              ; @ice_add_ieee_app_pri_tlv
	.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
	ldr	x8, [x1]
	cbz	x8, LBB0_5
; %bb.1:
	mov	x20, x1
	mov	x19, x0
	ldr	x21, [x0]
Lloh0:
	adrp	x8, _ICE_IEEE_8021QAZ_OUI@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ICE_IEEE_8021QAZ_OUI@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _ICE_LLDP_TLV_OUI_S@GOTPAGE
Lloh4:
	ldr	x9, [x9, _ICE_LLDP_TLV_OUI_S@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	lsl	w8, w8, w9
Lloh6:
	adrp	x9, _ICE_IEEE_SUBTYPE_APP_PRI@GOTPAGE
Lloh7:
	ldr	x9, [x9, _ICE_IEEE_SUBTYPE_APP_PRI@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	orr	w0, w8, w9
	bl	_htonl
	str	w0, [x19, #12]
	ldr	x8, [x20, #8]
	add	x8, x8, #4
	add	x9, x21, #24
	mov	w10, #1
	mov	w14, #8
Lloh9:
	adrp	x11, _ICE_IEEE_APP_PRIO_S@GOTPAGE
Lloh10:
	ldr	x11, [x11, _ICE_IEEE_APP_PRIO_S@GOTPAGEOFF]
Lloh11:
	adrp	x12, _ICE_DCBX_MAX_APPS@GOTPAGE
Lloh12:
	ldr	x12, [x12, _ICE_DCBX_MAX_APPS@GOTPAGEOFF]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	mov	x13, x14
	ldur	w14, [x8, #-4]
	and	x14, x14, #0x7
	ldr	x15, [x11]
	lsl	x14, x14, x15
	ldp	w15, w16, [x8]
	and	x15, x15, #0x7
	orr	x14, x14, x15
	ubfx	x15, x16, #8, #8
	stp	x14, x15, [x9, #-16]
	and	x14, x16, #0xff
	str	x14, [x9]
	ldr	x14, [x12]
	cmp	x10, x14
	b.hs	LBB0_4
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	x15, [x20]
	add	x8, x8, #12
	add	x16, x10, #1
	add	x9, x9, #24
	add	x14, x13, #3
	cmp	x10, x15
	mov	x10, x16
	b.lo	LBB0_2
LBB0_4:
Lloh13:
	adrp	x8, _ICE_TLV_TYPE_ORG@GOTPAGE
Lloh14:
	ldr	x8, [x8, _ICE_TLV_TYPE_ORG@GOTPAGEOFF]
Lloh15:
	ldr	x8, [x8]
Lloh16:
	adrp	x9, _ICE_LLDP_TLV_TYPE_S@GOTPAGE
Lloh17:
	ldr	x9, [x9, _ICE_LLDP_TLV_TYPE_S@GOTPAGEOFF]
Lloh18:
	ldr	x9, [x9]
	lsl	x8, x8, x9
	and	x9, x13, #0x1ff
	orr	x0, x8, x9
	bl	_htons
	str	w0, [x19, #8]
LBB0_5:
	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 AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_ICE_IEEE_8021QAZ_OUI,4,2       ; @ICE_IEEE_8021QAZ_OUI
	.comm	_ICE_LLDP_TLV_OUI_S,4,2         ; @ICE_LLDP_TLV_OUI_S
	.comm	_ICE_IEEE_SUBTYPE_APP_PRI,4,2   ; @ICE_IEEE_SUBTYPE_APP_PRI
	.comm	_ICE_IEEE_APP_PRIO_S,8,3        ; @ICE_IEEE_APP_PRIO_S
	.comm	_ICE_DCBX_MAX_APPS,8,3          ; @ICE_DCBX_MAX_APPS
	.comm	_ICE_TLV_TYPE_ORG,8,3           ; @ICE_TLV_TYPE_ORG
	.comm	_ICE_LLDP_TLV_TYPE_S,8,3        ; @ICE_LLDP_TLV_TYPE_S
	.no_dead_strip	_ice_add_ieee_app_pri_tlv
.subsections_via_symbols
