	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pch_gbe_change_mtu
_pch_gbe_change_mtu:                    ## @pch_gbe_change_mtu
	.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
	movl	%esi, %r14d
	movq	%rdi, %r12
	callq	_netdev_priv
	movq	%rax, %r15
	movq	_ETH_HLEN@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	addl	%r14d, %ebx
	movq	_ETH_ZLEN@GOTPCREL(%rip), %rax
	cmpl	(%rax), %ebx
	jl	LBB0_2
## %bb.1:
	movq	_ETH_FCS_LEN@GOTPCREL(%rip), %rax
	addl	(%rax), %ebx
	movq	_PCH_GBE_MAX_JUMBO_FRAME_SIZE@GOTPCREL(%rip), %rax
	cmpl	(%rax), %ebx
	jg	LBB0_2
## %bb.4:
	movq	_PCH_GBE_FRAME_SIZE_2048@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	cmpl	%eax, %ebx
	jle	LBB0_8
## %bb.5:
	movq	_PCH_GBE_FRAME_SIZE_4096@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	cmpl	%eax, %ebx
	jle	LBB0_8
## %bb.6:
	movq	_PCH_GBE_FRAME_SIZE_8192@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	cmpl	%eax, %ebx
	jle	LBB0_8
## %bb.7:
	movq	_PCH_GBE_MAX_RX_BUFFER_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_8:
	movq	(%r15), %r13
	cltq
	movq	%rax, (%r15)
	movq	%r12, %rdi
	callq	_netif_running
	movq	%r15, %rdi
	testq	%rax, %rax
	je	LBB0_11
## %bb.9:
	callq	_pch_gbe_down
	movq	%r15, %rdi
	callq	_pch_gbe_up
	testl	%eax, %eax
	je	LBB0_12
## %bb.10:
	movq	%r13, (%r15)
	movq	%r15, %rdi
	callq	_pch_gbe_up
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
	jmp	LBB0_3
LBB0_2:
	leaq	L_.str(%rip), %rdi
	callq	_pr_err
	movq	_EINVAL@GOTPCREL(%rip), %rcx
LBB0_3:
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_13
LBB0_11:
	callq	_pch_gbe_reset
LBB0_12:
	movl	%r14d, (%r12)
	movl	%ebx, 8(%r15)
	movl	(%r15), %edx
	leaq	L_.str.1(%rip), %rdi
	movl	%ebx, %esi
	movl	%r14d, %ecx
	movl	%ebx, %r8d
	callq	_pr_debug
	xorl	%eax, %eax
LBB0_13:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ETH_HLEN,4,2                   ## @ETH_HLEN
	.comm	_ETH_FCS_LEN,4,2                ## @ETH_FCS_LEN
	.comm	_ETH_ZLEN,4,2                   ## @ETH_ZLEN
	.comm	_PCH_GBE_MAX_JUMBO_FRAME_SIZE,4,2 ## @PCH_GBE_MAX_JUMBO_FRAME_SIZE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Invalid MTU setting\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_PCH_GBE_FRAME_SIZE_2048,4,2    ## @PCH_GBE_FRAME_SIZE_2048
	.comm	_PCH_GBE_FRAME_SIZE_4096,4,2    ## @PCH_GBE_FRAME_SIZE_4096
	.comm	_PCH_GBE_FRAME_SIZE_8192,4,2    ## @PCH_GBE_FRAME_SIZE_8192
	.comm	_PCH_GBE_MAX_RX_BUFFER_SIZE,4,2 ## @PCH_GBE_MAX_RX_BUFFER_SIZE
	.comm	_ENOMEM,4,2                     ## @ENOMEM
L_.str.1:                               ## @.str.1
	.asciz	"max_frame : %d  rx_buffer_len : %d  mtu : %d  max_frame_size : %d\n"

	.no_dead_strip	_pch_gbe_change_mtu
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pch_gbe_change_mtu
_pch_gbe_change_mtu:                    ; @pch_gbe_change_mtu
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x19, x1
	mov	x21, x0
	bl	_netdev_priv
Lloh0:
	adrp	x8, _ETH_HLEN@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ETH_HLEN@GOTPAGEOFF]
Lloh2:
	adrp	x9, _ETH_FCS_LEN@GOTPAGE
Lloh3:
	ldr	x9, [x9, _ETH_FCS_LEN@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
Lloh5:
	ldr	w9, [x9]
	add	w8, w8, w19
	add	w22, w8, w9
Lloh6:
	adrp	x9, _ETH_ZLEN@GOTPAGE
Lloh7:
	ldr	x9, [x9, _ETH_ZLEN@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
Lloh9:
	adrp	x10, _PCH_GBE_MAX_JUMBO_FRAME_SIZE@GOTPAGE
Lloh10:
	ldr	x10, [x10, _PCH_GBE_MAX_JUMBO_FRAME_SIZE@GOTPAGEOFF]
Lloh11:
	ldr	w10, [x10]
	cmp	w8, w9
	ccmp	w22, w10, #0, ge
	b.le	LBB0_2
; %bb.1:
Lloh12:
	adrp	x0, l_.str@PAGE
Lloh13:
	add	x0, x0, l_.str@PAGEOFF
	bl	_pr_err
Lloh14:
	adrp	x8, _EINVAL@GOTPAGE
Lloh15:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_8
LBB0_2:
	mov	x20, x0
Lloh16:
	adrp	x8, _PCH_GBE_FRAME_SIZE_2048@GOTPAGE
Lloh17:
	ldr	x8, [x8, _PCH_GBE_FRAME_SIZE_2048@GOTPAGEOFF]
Lloh18:
	ldr	w8, [x8]
	cmp	w22, w8
	b.le	LBB0_5
; %bb.3:
Lloh19:
	adrp	x8, _PCH_GBE_FRAME_SIZE_4096@GOTPAGE
Lloh20:
	ldr	x8, [x8, _PCH_GBE_FRAME_SIZE_4096@GOTPAGEOFF]
Lloh21:
	ldr	w8, [x8]
	cmp	w22, w8
	b.le	LBB0_5
; %bb.4:
Lloh22:
	adrp	x8, _PCH_GBE_FRAME_SIZE_8192@GOTPAGE
Lloh23:
	ldr	x8, [x8, _PCH_GBE_FRAME_SIZE_8192@GOTPAGEOFF]
Lloh24:
	ldr	w8, [x8]
Lloh25:
	adrp	x9, _PCH_GBE_MAX_RX_BUFFER_SIZE@GOTPAGE
Lloh26:
	ldr	x9, [x9, _PCH_GBE_MAX_RX_BUFFER_SIZE@GOTPAGEOFF]
Lloh27:
	ldr	w9, [x9]
	cmp	w22, w8
	csel	w8, w9, w8, gt
LBB0_5:
	ldr	x23, [x20]
	sxtw	x8, w8
	str	x8, [x20]
	mov	x0, x21
	bl	_netif_running
	cbz	x0, LBB0_9
; %bb.6:
	mov	x0, x20
	bl	_pch_gbe_down
	mov	x0, x20
	bl	_pch_gbe_up
	cbz	w0, LBB0_10
; %bb.7:
	str	x23, [x20]
	mov	x0, x20
	bl	_pch_gbe_up
Lloh28:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh29:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
LBB0_8:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_11
LBB0_9:
	mov	x0, x20
	bl	_pch_gbe_reset
LBB0_10:
	str	w19, [x21]
	str	w22, [x20, #8]
	ldr	w2, [x20]
Lloh30:
	adrp	x0, l_.str.1@PAGE
Lloh31:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x1, x22
	mov	x3, x19
	mov	x4, x22
	bl	_pr_debug
	mov	w0, #0
LBB0_11:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh4
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh28, Lloh29
	.loh AdrpAdd	Lloh30, Lloh31
	.cfi_endproc
                                        ; -- End function
	.comm	_ETH_HLEN,4,2                   ; @ETH_HLEN
	.comm	_ETH_FCS_LEN,4,2                ; @ETH_FCS_LEN
	.comm	_ETH_ZLEN,4,2                   ; @ETH_ZLEN
	.comm	_PCH_GBE_MAX_JUMBO_FRAME_SIZE,4,2 ; @PCH_GBE_MAX_JUMBO_FRAME_SIZE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Invalid MTU setting\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_PCH_GBE_FRAME_SIZE_2048,4,2    ; @PCH_GBE_FRAME_SIZE_2048
	.comm	_PCH_GBE_FRAME_SIZE_4096,4,2    ; @PCH_GBE_FRAME_SIZE_4096
	.comm	_PCH_GBE_FRAME_SIZE_8192,4,2    ; @PCH_GBE_FRAME_SIZE_8192
	.comm	_PCH_GBE_MAX_RX_BUFFER_SIZE,4,2 ; @PCH_GBE_MAX_RX_BUFFER_SIZE
	.comm	_ENOMEM,4,2                     ; @ENOMEM
l_.str.1:                               ; @.str.1
	.asciz	"max_frame : %d  rx_buffer_len : %d  mtu : %d  max_frame_size : %d\n"

	.no_dead_strip	_pch_gbe_change_mtu
.subsections_via_symbols
