	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function xgbe_calculate_dcb_fifo
_xgbe_calculate_dcb_fifo:               ## @xgbe_calculate_dcb_fifo
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r15
	movl	%esi, %r14d
	movq	%rdi, %rbx
	callq	_xgbe_get_max_frame
	movl	%eax, %edi
	callq	_XGMAC_FIFO_ALIGN
	movl	%eax, %r12d
	movl	16(%rbx), %edi
	callq	_XGMAC_PRIO_QUEUES
	movl	%eax, %r13d
	movq	%rbx, %rdi
	callq	_xgbe_get_pfc_queues
	movl	%r14d, %edi
	testl	%eax, %eax
	je	LBB0_22
## %bb.1:
	movl	%r13d, %r14d
	imull	%r12d, %r14d
	cmpl	%edi, %r14d
	jbe	LBB0_2
LBB0_22:
	movl	%r13d, %esi
	movq	%r15, %rdx
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_xgbe_calculate_equal_fifo      ## TAILCALL
LBB0_2:
	movl	%edi, -44(%rbp)                 ## 4-byte Spill
	movl	%r13d, -48(%rbp)                ## 4-byte Spill
	movq	%rbx, %rdi
	callq	_xgbe_get_pfc_delay
	movl	%eax, (%rbx)
	movl	%eax, %edi
	callq	_XGMAC_FLOW_CONTROL_ALIGN
	movl	%eax, (%rbx)
	xorl	%r13d, %r13d
	subl	%r12d, %eax
	jbe	LBB0_4
## %bb.3:
	movl	%eax, %edi
	callq	_XGMAC_FIFO_ALIGN
	movl	%eax, %r13d
LBB0_4:
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	subl	%r14d, %edx
	movq	_XGMAC_FIFO_UNIT@GOTPCREL(%rip), %rcx
	leaq	L_.str(%rip), %rsi
	movl	-48(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, %r14d
LBB0_5:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_6 Depth 2
	movl	%edx, %r8d
	movl	%r14d, %r14d
	.p2align	4, 0x90
LBB0_6:                                 ##   Parent Loop BB0_5 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	subq	$1, %r14
	jb	LBB0_13
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=2
	movl	%r12d, %eax
	xorl	%edx, %edx
	divl	(%rcx)
	decl	%eax
	movl	%eax, (%r15,%r14,4)
	movq	8(%rbx), %rax
	cmpl	$0, (%rax,%r14,4)
	je	LBB0_6
## %bb.8:                               ##   in Loop: Header=BB0_6 Depth=2
	testl	%r13d, %r13d
	je	LBB0_6
## %bb.9:                               ##   in Loop: Header=BB0_5 Depth=1
	cmpl	%r8d, %r13d
	jbe	LBB0_12
## %bb.10:                              ##   in Loop: Header=BB0_5 Depth=1
	movl	4(%rbx), %edi
	movl	%r14d, %edx
	movl	%r8d, -44(%rbp)                 ## 4-byte Spill
	callq	_netdev_warn
	movl	-44(%rbp), %r8d                 ## 4-byte Reload
	leaq	L_.str(%rip), %rsi
	movq	_XGMAC_FIFO_UNIT@GOTPCREL(%rip), %rcx
	xorl	%edx, %edx
	testl	%r8d, %r8d
	je	LBB0_5
## %bb.11:                              ##   in Loop: Header=BB0_5 Depth=1
	movl	%r8d, %r13d
LBB0_12:                                ##   in Loop: Header=BB0_5 Depth=1
	movl	%r14d, %edi
	movl	%r13d, %eax
	xorl	%edx, %edx
	divl	(%rcx)
	addl	%eax, (%r15,%rdi,4)
	subl	%r13d, %r8d
	movl	%r8d, %edx
	jmp	LBB0_5
LBB0_13:
	testl	%r8d, %r8d
	movl	-48(%rbp), %esi                 ## 4-byte Reload
	je	LBB0_21
## %bb.14:
	movl	%r8d, %eax
	xorl	%edx, %edx
	divl	%esi
	testl	%esi, %esi
	je	LBB0_21
## %bb.15:
	movl	%eax, %ebx
	movl	%esi, %r8d
	cmpl	$1, %esi
	jne	LBB0_17
## %bb.16:
	xorl	%edi, %edi
	jmp	LBB0_19
LBB0_17:
	movl	%r8d, %esi
	andl	$-2, %esi
	xorl	%edi, %edi
	.p2align	4, 0x90
LBB0_18:                                ## =>This Inner Loop Header: Depth=1
	movl	%ebx, %eax
	xorl	%edx, %edx
	divl	(%rcx)
	addl	%eax, (%r15,%rdi,4)
	movl	%ebx, %eax
	xorl	%edx, %edx
	divl	(%rcx)
	addl	%eax, 4(%r15,%rdi,4)
	addq	$2, %rdi
	cmpq	%rdi, %rsi
	jne	LBB0_18
LBB0_19:
	testb	$1, %r8b
	je	LBB0_21
## %bb.20:
	movl	%ebx, %eax
	xorl	%edx, %edx
	divl	(%rcx)
	addl	%eax, (%r15,%rdi,4)
LBB0_21:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_XGMAC_FIFO_UNIT,4,2            ## @XGMAC_FIFO_UNIT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"RXq%u cannot set needed fifo size\n"

	.no_dead_strip	_xgbe_calculate_dcb_fifo
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function xgbe_calculate_dcb_fifo
_xgbe_calculate_dcb_fifo:               ; @xgbe_calculate_dcb_fifo
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x2
	mov	x23, x1
	mov	x20, x0
	bl	_xgbe_get_max_frame
	bl	_XGMAC_FIFO_ALIGN
	mov	x22, x0
	ldr	w0, [x20, #16]
	bl	_XGMAC_PRIO_QUEUES
	mov	x21, x0
	mov	x0, x20
	bl	_xgbe_get_pfc_queues
	cbz	w0, LBB0_2
; %bb.1:
	mul	w8, w21, w22
	cmp	w8, w23
	b.ls	LBB0_3
LBB0_2:
	mov	x0, x23
	mov	x1, x21
	mov	x2, x19
	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
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	b	_xgbe_calculate_equal_fifo
LBB0_3:
	sub	w28, w23, w8
	mov	x0, x20
	bl	_xgbe_get_pfc_delay
	str	w0, [x20]
	bl	_XGMAC_FLOW_CONTROL_ALIGN
	str	w0, [x20]
	subs	w0, w0, w22
	b.ls	LBB0_5
; %bb.4:
	bl	_XGMAC_FIFO_ALIGN
	mov	x23, x0
	b	LBB0_6
LBB0_5:
	mov	w23, #0
LBB0_6:
	sub	x27, x19, #4
Lloh0:
	adrp	x26, _XGMAC_FIFO_UNIT@GOTPAGE
Lloh1:
	ldr	x26, [x26, _XGMAC_FIFO_UNIT@GOTPAGEOFF]
	mov	x25, x21
Lloh2:
	adrp	x11, l_.str@PAGE
Lloh3:
	add	x11, x11, l_.str@PAGEOFF
LBB0_7:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_8 Depth 2
	mov	x24, x28
	mov	w8, w25
LBB0_8:                                 ;   Parent Loop BB0_7 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	cbz	x8, LBB0_15
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=2
	sub	x25, x8, #1
	ldr	w9, [x26]
	udiv	w9, w22, w9
	sub	w9, w9, #1
	lsl	x8, x8, #2
	str	w9, [x27, x8]
	ldr	x9, [x20, #8]
	add	x8, x9, x8
	ldur	w9, [x8, #-4]
	mov	x8, x25
	cbz	w9, LBB0_8
; %bb.10:                               ;   in Loop: Header=BB0_8 Depth=2
	mov	x8, x25
	cbz	w23, LBB0_8
; %bb.11:                               ;   in Loop: Header=BB0_7 Depth=1
	cmp	w23, w24
	b.ls	LBB0_14
; %bb.12:                               ;   in Loop: Header=BB0_7 Depth=1
	ldr	w0, [x20, #4]
	mov	x28, x11
	mov	x1, x11
	mov	x2, x25
	bl	_netdev_warn
	mov	x11, x28
	mov	w28, #0
	cbz	w24, LBB0_7
; %bb.13:                               ;   in Loop: Header=BB0_7 Depth=1
	mov	x23, x24
LBB0_14:                                ;   in Loop: Header=BB0_7 Depth=1
	and	x8, x25, #0xffffffff
	lsl	x8, x8, #2
	ldr	w9, [x26]
	udiv	w9, w23, w9
	ldr	w10, [x19, x8]
	add	w9, w10, w9
	str	w9, [x19, x8]
	sub	w28, w24, w23
	b	LBB0_7
LBB0_15:
	cbz	w24, LBB0_19
; %bb.16:
	cbz	w21, LBB0_19
; %bb.17:
	mov	w8, w21
	udiv	w9, w24, w21
LBB0_18:                                ; =>This Inner Loop Header: Depth=1
	ldr	w10, [x26]
	udiv	w10, w9, w10
	ldr	w11, [x19]
	add	w10, w11, w10
	str	w10, [x19], #4
	subs	x8, x8, #1
	b.ne	LBB0_18
LBB0_19:
	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
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_XGMAC_FIFO_UNIT,4,2            ; @XGMAC_FIFO_UNIT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"RXq%u cannot set needed fifo size\n"

	.no_dead_strip	_xgbe_calculate_dcb_fifo
.subsections_via_symbols
