	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function handle_egress_err
_handle_egress_err:                     ## @handle_egress_err
	.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	$120, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r13d
	movq	%rdi, %r15
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_ALL_TXE_EGRESS_FREEZE_ERR@GOTPCREL(%rip), %rax
	testl	%edx, (%rax)
	je	LBB0_1
LBB0_4:
	movl	16(%r15), %edi
	xorl	%esi, %esi
	callq	_start_freeze_handling
LBB0_5:
	testl	%r13d, %r13d
	movl	%r13d, -148(%rbp)               ## 4-byte Spill
	je	LBB0_6
## %bb.7:
	xorl	%r12d, %r12d
	jmp	LBB0_8
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_8 Depth=1
	movq	%r15, %rdi
	callq	_count_port_inactive
LBB0_12:                                ##   in Loop: Header=BB0_8 Depth=1
	orl	%r14d, %r12d
LBB0_13:                                ##   in Loop: Header=BB0_8 Depth=1
	notl	%r14d
	andl	%r14d, %r13d
	je	LBB0_14
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	movl	%r13d, %edi
	callq	_fls64
	movl	%eax, %ebx
	decl	%ebx
	movl	$1, %r14d
	movl	%ebx, %ecx
	shlq	%cl, %r14
	movl	%ebx, %edi
	callq	_port_inactive_err
	testq	%rax, %rax
	jne	LBB0_9
## %bb.10:                              ##   in Loop: Header=BB0_8 Depth=1
	movl	%ebx, %edi
	callq	_disallowed_pkt_err
	testq	%rax, %rax
	je	LBB0_13
## %bb.11:                              ##   in Loop: Header=BB0_8 Depth=1
	movl	%ebx, %edi
	callq	_disallowed_pkt_engine
	movq	%r15, %rdi
	movl	%eax, %esi
	callq	_engine_to_vl
	movq	%r15, %rdi
	movl	%eax, %esi
	callq	_handle_send_egress_err_info
	jmp	LBB0_12
LBB0_1:
	movq	%r15, %rdi
	callq	_is_ax
	testq	%rax, %rax
	je	LBB0_5
## %bb.2:
	movq	_SEND_EGRESS_ERR_STATUS_TX_CREDIT_RETURN_VL_ERR_SMASK@GOTPCREL(%rip), %rax
	testl	%r13d, (%rax)
	je	LBB0_5
## %bb.3:
	movq	(%r15), %rax
	movq	_ICODE_FUNCTIONAL_SIMULATOR@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_4
	jmp	LBB0_5
LBB0_6:
	xorl	%r12d, %r12d
LBB0_14:
	notl	%r12d
	andl	-148(%rbp), %r12d               ## 4-byte Folded Reload
	je	LBB0_16
## %bb.15:
	leaq	-144(%rbp), %rdi
	movl	$96, %esi
	movl	%r12d, %edx
	callq	_egress_err_status_string
	leaq	L_.str(%rip), %rsi
	movq	%r15, %rdi
	movl	%eax, %edx
	callq	_dd_dev_info
LBB0_16:
	movq	_NUM_SEND_EGRESS_ERR_STATUS_COUNTERS@GOTPCREL(%rip), %r14
	movl	(%r14), %eax
	testl	%eax, %eax
	jle	LBB0_21
## %bb.17:
	movslq	%r12d, %r12
	xorl	%r13d, %r13d
	xorl	%ebx, %ebx
	jmp	LBB0_18
	.p2align	4, 0x90
LBB0_20:                                ##   in Loop: Header=BB0_18 Depth=1
	incq	%rbx
	movslq	%eax, %rcx
	addq	$4, %r13
	cmpq	%rcx, %rbx
	jge	LBB0_21
LBB0_18:                                ## =>This Inner Loop Header: Depth=1
	btq	%rbx, %r12
	jae	LBB0_20
## %bb.19:                              ##   in Loop: Header=BB0_18 Depth=1
	movq	8(%r15), %rdi
	addq	%r13, %rdi
	callq	_incr_cntr64
	movl	(%r14), %eax
	jmp	LBB0_20
LBB0_21:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_23
## %bb.22:
	addq	$120, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_23:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_ALL_TXE_EGRESS_FREEZE_ERR,4,2  ## @ALL_TXE_EGRESS_FREEZE_ERR
	.comm	_SEND_EGRESS_ERR_STATUS_TX_CREDIT_RETURN_VL_ERR_SMASK,4,2 ## @SEND_EGRESS_ERR_STATUS_TX_CREDIT_RETURN_VL_ERR_SMASK
	.comm	_ICODE_FUNCTIONAL_SIMULATOR,8,3 ## @ICODE_FUNCTIONAL_SIMULATOR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Egress Error: %s\n"

	.comm	_NUM_SEND_EGRESS_ERR_STATUS_COUNTERS,4,2 ## @NUM_SEND_EGRESS_ERR_STATUS_COUNTERS
	.no_dead_strip	_handle_egress_err
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function handle_egress_err
_handle_egress_err:                     ; @handle_egress_err
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #192
	.cfi_def_cfa_offset 192
	stp	x26, x25, [sp, #112]            ; 16-byte Folded Spill
	stp	x24, x23, [sp, #128]            ; 16-byte Folded Spill
	stp	x22, x21, [sp, #144]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #160]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #176]            ; 16-byte Folded Spill
	add	x29, sp, #176
	.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	x20, x2
	mov	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-72]
Lloh3:
	adrp	x8, _ALL_TXE_EGRESS_FREEZE_ERR@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ALL_TXE_EGRESS_FREEZE_ERR@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	tst	w8, w2
	b.eq	LBB0_19
LBB0_1:
	ldr	w0, [x19, #16]
	mov	w1, #0
	bl	_start_freeze_handling
LBB0_2:
	mov	w23, #0
	cbz	w20, LBB0_10
; %bb.3:
	mov	w24, #1
	mov	x21, x20
	b	LBB0_7
LBB0_4:                                 ;   in Loop: Header=BB0_7 Depth=1
	mov	x0, x19
	bl	_count_port_inactive
LBB0_5:                                 ;   in Loop: Header=BB0_7 Depth=1
	orr	w23, w23, w25
LBB0_6:                                 ;   in Loop: Header=BB0_7 Depth=1
	bics	w21, w21, w25
	b.eq	LBB0_10
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x21
	bl	_fls64
	sub	w22, w0, #1
	lsl	x25, x24, x22
	mov	x0, x22
	bl	_port_inactive_err
	cbnz	x0, LBB0_4
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	mov	x0, x22
	bl	_disallowed_pkt_err
	cbz	x0, LBB0_6
; %bb.9:                                ;   in Loop: Header=BB0_7 Depth=1
	mov	x0, x22
	bl	_disallowed_pkt_engine
	mov	x1, x0
	mov	x0, x19
	bl	_engine_to_vl
	mov	x1, x0
	mov	x0, x19
	bl	_handle_send_egress_err_info
	b	LBB0_5
LBB0_10:
	bics	w20, w20, w23
	b.eq	LBB0_12
; %bb.11:
	add	x0, sp, #8
	mov	w1, #96
	mov	x2, x20
	bl	_egress_err_status_string
	mov	x2, x0
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_dd_dev_info
LBB0_12:
Lloh8:
	adrp	x21, _NUM_SEND_EGRESS_ERR_STATUS_COUNTERS@GOTPAGE
Lloh9:
	ldr	x21, [x21, _NUM_SEND_EGRESS_ERR_STATUS_COUNTERS@GOTPAGEOFF]
	ldr	w8, [x21]
	cmp	w8, #1
	b.lt	LBB0_17
; %bb.13:
	mov	x22, #0
	mov	x23, #0
	sxtw	x20, w20
	b	LBB0_15
LBB0_14:                                ;   in Loop: Header=BB0_15 Depth=1
	add	x23, x23, #1
	add	x22, x22, #4
	cmp	x23, w8, sxtw
	b.ge	LBB0_17
LBB0_15:                                ; =>This Inner Loop Header: Depth=1
	lsr	x9, x20, x23
	tbz	w9, #0, LBB0_14
; %bb.16:                               ;   in Loop: Header=BB0_15 Depth=1
	ldr	x8, [x19, #8]
	add	x0, x8, x22
	bl	_incr_cntr64
	ldr	w8, [x21]
	b	LBB0_14
LBB0_17:
	ldur	x8, [x29, #-72]
Lloh10:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh11:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh12:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_22
; %bb.18:
	ldp	x29, x30, [sp, #176]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #160]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #144]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #128]            ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #112]            ; 16-byte Folded Reload
	add	sp, sp, #192
	ret
LBB0_19:
	mov	x0, x19
	bl	_is_ax
	cbz	x0, LBB0_2
; %bb.20:
Lloh13:
	adrp	x8, _SEND_EGRESS_ERR_STATUS_TX_CREDIT_RETURN_VL_ERR_SMASK@GOTPAGE
Lloh14:
	ldr	x8, [x8, _SEND_EGRESS_ERR_STATUS_TX_CREDIT_RETURN_VL_ERR_SMASK@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	tst	w8, w20
	b.eq	LBB0_2
; %bb.21:
	ldr	x8, [x19]
Lloh16:
	adrp	x9, _ICODE_FUNCTIONAL_SIMULATOR@GOTPAGE
Lloh17:
	ldr	x9, [x9, _ICODE_FUNCTIONAL_SIMULATOR@GOTPAGEOFF]
Lloh18:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_1
	b	LBB0_2
LBB0_22:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_ALL_TXE_EGRESS_FREEZE_ERR,4,2  ; @ALL_TXE_EGRESS_FREEZE_ERR
	.comm	_SEND_EGRESS_ERR_STATUS_TX_CREDIT_RETURN_VL_ERR_SMASK,4,2 ; @SEND_EGRESS_ERR_STATUS_TX_CREDIT_RETURN_VL_ERR_SMASK
	.comm	_ICODE_FUNCTIONAL_SIMULATOR,8,3 ; @ICODE_FUNCTIONAL_SIMULATOR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Egress Error: %s\n"

	.comm	_NUM_SEND_EGRESS_ERR_STATUS_COUNTERS,4,2 ; @NUM_SEND_EGRESS_ERR_STATUS_COUNTERS
	.no_dead_strip	_handle_egress_err
.subsections_via_symbols
