	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function xlgmac_calc_rx_buf_size
_xlgmac_calc_rx_buf_size:               ## @xlgmac_calc_rx_buf_size
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	movq	_XLGMAC_JUMBO_PACKET_MTU@GOTPCREL(%rip), %rax
	cmpl	%esi, (%rax)
	jae	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rsi
	callq	_netdev_alert
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
                                        ## kill: def $eax killed $eax killed $rax
	popq	%rbp
	retq
LBB0_2:
	movq	_ETH_HLEN@GOTPCREL(%rip), %rax
	addl	(%rax), %esi
	movq	_ETH_FCS_LEN@GOTPCREL(%rip), %rax
	addl	(%rax), %esi
	movq	_VLAN_HLEN@GOTPCREL(%rip), %rax
	addl	(%rax), %esi
	movq	_XLGMAC_RX_MIN_BUF_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_PAGE_SIZE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movl	%esi, %edi
	movl	%eax, %esi
	callq	_clamp_val
	movl	%eax, %ecx
	movq	_XLGMAC_RX_BUF_ALIGN@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	addl	%eax, %ecx
	decl	%ecx
	negl	%eax
	andl	%ecx, %eax
                                        ## kill: def $eax killed $eax killed $rax
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_XLGMAC_JUMBO_PACKET_MTU,4,2    ## @XLGMAC_JUMBO_PACKET_MTU
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"MTU exceeds maximum supported value\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_ETH_HLEN,4,2                   ## @ETH_HLEN
	.comm	_ETH_FCS_LEN,4,2                ## @ETH_FCS_LEN
	.comm	_VLAN_HLEN,4,2                  ## @VLAN_HLEN
	.comm	_XLGMAC_RX_MIN_BUF_SIZE,4,2     ## @XLGMAC_RX_MIN_BUF_SIZE
	.comm	_PAGE_SIZE,4,2                  ## @PAGE_SIZE
	.comm	_XLGMAC_RX_BUF_ALIGN,4,2        ## @XLGMAC_RX_BUF_ALIGN
	.no_dead_strip	_xlgmac_calc_rx_buf_size
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function xlgmac_calc_rx_buf_size
_xlgmac_calc_rx_buf_size:               ; @xlgmac_calc_rx_buf_size
	.cfi_startproc
; %bb.0:
	stp	x29, x30, [sp, #-16]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 16
	mov	x29, sp
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
Lloh0:
	adrp	x8, _XLGMAC_JUMBO_PACKET_MTU@GOTPAGE
Lloh1:
	ldr	x8, [x8, _XLGMAC_JUMBO_PACKET_MTU@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, w1
	b.hs	LBB0_2
; %bb.1:
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	bl	_netdev_alert
Lloh5:
	adrp	x8, _EINVAL@GOTPAGE
Lloh6:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	neg	w0, w8
	ldp	x29, x30, [sp], #16             ; 16-byte Folded Reload
	ret
LBB0_2:
Lloh8:
	adrp	x8, _ETH_HLEN@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ETH_HLEN@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
Lloh11:
	adrp	x9, _ETH_FCS_LEN@GOTPAGE
Lloh12:
	ldr	x9, [x9, _ETH_FCS_LEN@GOTPAGEOFF]
Lloh13:
	ldr	w9, [x9]
	add	w8, w8, w1
	add	w8, w8, w9
Lloh14:
	adrp	x9, _VLAN_HLEN@GOTPAGE
Lloh15:
	ldr	x9, [x9, _VLAN_HLEN@GOTPAGEOFF]
Lloh16:
	ldr	w9, [x9]
	add	w0, w8, w9
Lloh17:
	adrp	x8, _XLGMAC_RX_MIN_BUF_SIZE@GOTPAGE
Lloh18:
	ldr	x8, [x8, _XLGMAC_RX_MIN_BUF_SIZE@GOTPAGEOFF]
Lloh19:
	ldr	w1, [x8]
Lloh20:
	adrp	x8, _PAGE_SIZE@GOTPAGE
Lloh21:
	ldr	x8, [x8, _PAGE_SIZE@GOTPAGEOFF]
Lloh22:
	ldr	w2, [x8]
	bl	_clamp_val
Lloh23:
	adrp	x8, _XLGMAC_RX_BUF_ALIGN@GOTPAGE
Lloh24:
	ldr	x8, [x8, _XLGMAC_RX_BUF_ALIGN@GOTPAGEOFF]
Lloh25:
	ldr	w8, [x8]
	add	w9, w0, w8
	sub	w9, w9, #1
	neg	w8, w8
	and	w0, w9, w8
	ldp	x29, x30, [sp], #16             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_XLGMAC_JUMBO_PACKET_MTU,4,2    ; @XLGMAC_JUMBO_PACKET_MTU
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"MTU exceeds maximum supported value\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_ETH_HLEN,4,2                   ; @ETH_HLEN
	.comm	_ETH_FCS_LEN,4,2                ; @ETH_FCS_LEN
	.comm	_VLAN_HLEN,4,2                  ; @VLAN_HLEN
	.comm	_XLGMAC_RX_MIN_BUF_SIZE,4,2     ; @XLGMAC_RX_MIN_BUF_SIZE
	.comm	_PAGE_SIZE,4,2                  ; @PAGE_SIZE
	.comm	_XLGMAC_RX_BUF_ALIGN,4,2        ; @XLGMAC_RX_BUF_ALIGN
	.no_dead_strip	_xlgmac_calc_rx_buf_size
.subsections_via_symbols
