	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function xgbe_queue_flow_control_threshold
_xgbe_queue_flow_control_threshold:     ## @xgbe_queue_flow_control_threshold
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r12d
	movl	%esi, %ebx
	movq	%rdi, %r15
	callq	_xgbe_get_max_frame
	movl	%eax, %edi
	callq	_XGMAC_FLOW_CONTROL_ALIGN
	movl	%eax, %r14d
	movq	24(%r15), %rax
	movl	%ebx, %ebx
	cmpq	$0, (%rax,%rbx,8)
	je	LBB0_4
## %bb.1:
	movl	(%r15), %edi
	cmpl	%r12d, %edi
	jae	LBB0_4
## %bb.2:
	addl	%edi, %r14d
	movq	_XGMAC_FLOW_CONTROL_MAX@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	cmpl	%eax, %r14d
	cmovael	%eax, %r14d
	cmpl	%eax, %edi
	jb	LBB0_13
## %bb.3:
	movq	_XGMAC_FLOW_CONTROL_UNIT@GOTPCREL(%rip), %rcx
	subl	(%rcx), %eax
	movl	%eax, %edi
	jmp	LBB0_13
LBB0_4:
	cmpl	$2048, %r12d                    ## imm = 0x800
	ja	LBB0_6
## %bb.5:
	movq	8(%r15), %rax
	movl	$0, (%rax,%rbx,4)
	xorl	%eax, %eax
	jmp	LBB0_14
LBB0_6:
	cmpl	$4096, %r12d                    ## imm = 0x1000
	ja	LBB0_8
## %bb.7:
	movq	8(%r15), %rax
	movl	$0, (%rax,%rbx,4)
	movl	$1, %eax
	jmp	LBB0_14
LBB0_8:
	cmpl	%r12d, %r14d
	jae	LBB0_9
## %bb.10:
	leal	(%r14,%r14,2), %eax
	cmpl	%r12d, %eax
	jae	LBB0_11
## %bb.12:
	leal	(%r14,%r14), %edi
	movq	_XGMAC_FLOW_CONTROL_UNIT@GOTPCREL(%rip), %rax
	addl	(%rax), %edi
	addl	%edi, %r14d
	jmp	LBB0_13
LBB0_9:
	movq	8(%r15), %rax
	movl	$2, (%rax,%rbx,4)
	movl	$5, %eax
	jmp	LBB0_14
LBB0_11:
	subl	%r14d, %r12d
	shrl	%r14d
	addl	%r12d, %r14d
	movl	%r12d, %edi
LBB0_13:
	callq	_XGMAC_FLOW_CONTROL_VALUE
	movq	8(%r15), %rcx
	movl	%eax, (%rcx,%rbx,4)
	movl	%r14d, %edi
	callq	_XGMAC_FLOW_CONTROL_VALUE
LBB0_14:
	movq	16(%r15), %rcx
	movl	%eax, (%rcx,%rbx,4)
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_XGMAC_FLOW_CONTROL_MAX,4,2     ## @XGMAC_FLOW_CONTROL_MAX
	.comm	_XGMAC_FLOW_CONTROL_UNIT,4,2    ## @XGMAC_FLOW_CONTROL_UNIT
	.no_dead_strip	_xgbe_queue_flow_control_threshold
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function xgbe_queue_flow_control_threshold
_xgbe_queue_flow_control_threshold:     ; @xgbe_queue_flow_control_threshold
	.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
	mov	x20, x2
	mov	x21, x1
	mov	x19, x0
	bl	_xgbe_get_max_frame
	bl	_XGMAC_FLOW_CONTROL_ALIGN
	ldr	x8, [x19, #24]
	mov	w22, w21
	ldr	x8, [x8, w21, uxtw #3]
	cbz	x8, LBB0_4
; %bb.1:
	ldr	w8, [x19]
	cmp	w8, w20
	b.hs	LBB0_4
; %bb.2:
Lloh0:
	adrp	x9, _XGMAC_FLOW_CONTROL_MAX@GOTPAGE
Lloh1:
	ldr	x9, [x9, _XGMAC_FLOW_CONTROL_MAX@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	add	w10, w8, w0
	cmp	w10, w9
	csel	w20, w10, w9, lo
	cmp	w8, w9
	b.lo	LBB0_13
; %bb.3:
Lloh3:
	adrp	x8, _XGMAC_FLOW_CONTROL_UNIT@GOTPAGE
Lloh4:
	ldr	x8, [x8, _XGMAC_FLOW_CONTROL_UNIT@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	sub	w8, w9, w8
	b	LBB0_13
LBB0_4:
	cmp	w20, #2048
	b.hi	LBB0_6
; %bb.5:
	mov	w0, #0
	ldr	x8, [x19, #8]
	str	wzr, [x8, x22, lsl #2]
	b	LBB0_14
LBB0_6:
	cmp	w20, #1, lsl #12                ; =4096
	b.hi	LBB0_8
; %bb.7:
	ldr	x8, [x19, #8]
	str	wzr, [x8, x22, lsl #2]
	mov	w0, #1
	b	LBB0_14
LBB0_8:
	cmp	w0, w20
	b.hs	LBB0_11
; %bb.9:
	add	w8, w0, w0, lsl #1
	cmp	w8, w20
	b.hs	LBB0_12
; %bb.10:
Lloh6:
	adrp	x8, _XGMAC_FLOW_CONTROL_UNIT@GOTPAGE
Lloh7:
	ldr	x8, [x8, _XGMAC_FLOW_CONTROL_UNIT@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	add	w8, w8, w0, lsl #1
	add	w20, w8, w0
	b	LBB0_13
LBB0_11:
	ldr	x8, [x19, #8]
	mov	w9, #2
	str	w9, [x8, x22, lsl #2]
	mov	w0, #5
	b	LBB0_14
LBB0_12:
	sub	w8, w20, w0
	add	w20, w8, w0, lsr #1
LBB0_13:
	mov	x0, x8
	bl	_XGMAC_FLOW_CONTROL_VALUE
	ldr	x8, [x19, #8]
	str	w0, [x8, x22, lsl #2]
	mov	x0, x20
	bl	_XGMAC_FLOW_CONTROL_VALUE
LBB0_14:
	ldr	x8, [x19, #16]
	str	w0, [x8, x22, lsl #2]
	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 AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_XGMAC_FLOW_CONTROL_MAX,4,2     ; @XGMAC_FLOW_CONTROL_MAX
	.comm	_XGMAC_FLOW_CONTROL_UNIT,4,2    ; @XGMAC_FLOW_CONTROL_UNIT
	.no_dead_strip	_xgbe_queue_flow_control_threshold
.subsections_via_symbols
