	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sky2_change_mtu
_sky2_change_mtu:                       ## @sky2_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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %ebx
	movq	%rdi, %r14
	callq	_netdev_priv
	movq	%rax, %r12
	movq	16(%rax), %r13
	movl	(%rax), %r15d
	movq	%r14, %rdi
	callq	_netif_running
	testl	%eax, %eax
	je	LBB0_1
## %bb.2:
	movl	%ebx, -48(%rbp)                 ## 4-byte Spill
	movq	_B0_IMSK@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	movq	%r13, %rdi
	callq	_sky2_read32
	movl	%eax, -52(%rbp)                 ## 4-byte Spill
	movl	(%rbx), %esi
	movq	%r13, %rdi
	xorl	%edx, %edx
	callq	_sky2_write32
	movl	(%rbx), %esi
	movq	%r13, %rdi
	callq	_sky2_read32
	movq	%r14, %rdi
	callq	_netif_trans_update
	leaq	4(%r13), %rdi
	movq	%rdi, -64(%rbp)                 ## 8-byte Spill
	callq	_napi_disable
	movq	%r14, %rdi
	callq	_netif_tx_disable
	movq	8(%r13), %rax
	movl	(%rax), %edi
	callq	_synchronize_irq
	movq	_SKY2_HW_RAM_BUFFER@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%r13)
	jne	LBB0_4
## %bb.3:
	movq	%r13, %rdi
	movl	%r15d, %esi
	callq	_sky2_set_tx_stfwd
LBB0_4:
	movq	_GM_GP_CTRL@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edx
	movq	%r13, %rdi
	movl	%r15d, %esi
	callq	_gma_read16
	movl	(%rbx), %edx
	movq	_GM_GPCR_RX_ENA@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	notl	%ecx
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	andl	%eax, %ecx
	movq	%r13, %rdi
	movl	%r15d, %esi
	callq	_gma_write16
	movq	%r12, %rdi
	callq	_sky2_rx_stop
	movq	%r12, %rdi
	callq	_sky2_rx_clean
	movl	-48(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, (%r14)
	movq	%r14, %rdi
	callq	_netdev_update_features
	movq	_DATA_BLIND_DEF@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_DATA_BLIND_VAL
	movl	%eax, %ebx
	movq	_GM_SMOD_VLAN_ENA@GOTPCREL(%rip), %rax
	movq	8(%r12), %rcx
	movq	_SPEED_100@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	jle	LBB0_5
## %bb.6:
	movq	_IPG_DATA_DEF_1000@GOTPCREL(%rip), %rcx
	jmp	LBB0_7
LBB0_1:
	movl	%ebx, (%r14)
	movq	%r14, %rdi
	callq	_netdev_update_features
	jmp	LBB0_15
LBB0_5:
	movq	_IPG_DATA_DEF_10_100@GOTPCREL(%rip), %rcx
LBB0_7:
	orl	(%rax), %ebx
	movl	(%rcx), %edi
	callq	_IPG_DATA_VAL
	movl	(%r14), %edx
	movq	_ETH_DATA_LEN@GOTPCREL(%rip), %rsi
	xorl	%ecx, %ecx
	cmpl	(%rsi), %edx
	jle	LBB0_9
## %bb.8:
	movq	_GM_SMOD_JUMBO_ENA@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
LBB0_9:
	orl	%ecx, %ebx
	orl	%ebx, %eax
	movq	_GM_SERIAL_MODE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movq	%r13, %rdi
	movl	%r15d, %esi
	movl	%eax, %ecx
	callq	_gma_write16
	movq	_rxqaddr@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	(%rax,%r15,4), %edi
	movq	_RB_CTRL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_RB_ADDR
	movq	_RB_ENA_OP_MD@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movq	%r13, %rdi
	movl	%eax, %esi
	callq	_sky2_write8
	movq	%r12, %rdi
	callq	_sky2_alloc_rx_skbs
	movl	%eax, %ebx
	movq	%r12, %rdi
	testl	%eax, %eax
	je	LBB0_10
## %bb.11:
	callq	_sky2_rx_clean
	jmp	LBB0_12
LBB0_10:
	callq	_sky2_rx_start
LBB0_12:
	movq	_B0_IMSK@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	movl	-52(%rbp), %edx                 ## 4-byte Reload
	callq	_sky2_write32
	movq	_B0_Y2_SP_LISR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	callq	_sky2_read32
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	callq	_napi_enable
	testl	%ebx, %ebx
	je	LBB0_14
## %bb.13:
	movq	%r14, %rdi
	callq	_dev_close
	jmp	LBB0_16
LBB0_14:
	movq	_GM_GP_CTRL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r13, %rdi
	movl	%r15d, %esi
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	callq	_gma_write16
	movq	%r14, %rdi
	callq	_netif_wake_queue
LBB0_15:
	xorl	%ebx, %ebx
LBB0_16:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_B0_IMSK,4,2                    ## @B0_IMSK
	.comm	_SKY2_HW_RAM_BUFFER,4,2         ## @SKY2_HW_RAM_BUFFER
	.comm	_GM_GP_CTRL,4,2                 ## @GM_GP_CTRL
	.comm	_GM_GPCR_RX_ENA,4,2             ## @GM_GPCR_RX_ENA
	.comm	_DATA_BLIND_DEF,4,2             ## @DATA_BLIND_DEF
	.comm	_GM_SMOD_VLAN_ENA,4,2           ## @GM_SMOD_VLAN_ENA
	.comm	_SPEED_100,8,3                  ## @SPEED_100
	.comm	_IPG_DATA_DEF_1000,4,2          ## @IPG_DATA_DEF_1000
	.comm	_IPG_DATA_DEF_10_100,4,2        ## @IPG_DATA_DEF_10_100
	.comm	_ETH_DATA_LEN,4,2               ## @ETH_DATA_LEN
	.comm	_GM_SMOD_JUMBO_ENA,4,2          ## @GM_SMOD_JUMBO_ENA
	.comm	_GM_SERIAL_MODE,4,2             ## @GM_SERIAL_MODE
	.comm	_rxqaddr,8,3                    ## @rxqaddr
	.comm	_RB_CTRL,4,2                    ## @RB_CTRL
	.comm	_RB_ENA_OP_MD,4,2               ## @RB_ENA_OP_MD
	.comm	_B0_Y2_SP_LISR,4,2              ## @B0_Y2_SP_LISR
	.no_dead_strip	_sky2_change_mtu
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sky2_change_mtu
_sky2_change_mtu:                       ; @sky2_change_mtu
	.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	x26, x1
	mov	x19, x0
	bl	_netdev_priv
	mov	x22, x0
	ldr	x20, [x0, #16]
	ldr	w21, [x0]
	mov	x0, x19
	bl	_netif_running
	cbz	w0, LBB0_5
; %bb.1:
Lloh0:
	adrp	x27, _B0_IMSK@GOTPAGE
Lloh1:
	ldr	x27, [x27, _B0_IMSK@GOTPAGEOFF]
	ldr	w1, [x27]
	mov	x0, x20
	bl	_sky2_read32
	mov	x23, x0
	ldr	w1, [x27]
	mov	x0, x20
	mov	w2, #0
	bl	_sky2_write32
	ldr	w1, [x27]
	mov	x0, x20
	bl	_sky2_read32
	mov	x0, x19
	bl	_netif_trans_update
	add	x24, x20, #4
	mov	x0, x24
	bl	_napi_disable
	mov	x0, x19
	bl	_netif_tx_disable
	ldr	x8, [x20, #8]
	ldr	w0, [x8]
	bl	_synchronize_irq
	ldr	w8, [x20]
Lloh2:
	adrp	x9, _SKY2_HW_RAM_BUFFER@GOTPAGE
Lloh3:
	ldr	x9, [x9, _SKY2_HW_RAM_BUFFER@GOTPAGEOFF]
Lloh4:
	ldr	w9, [x9]
	tst	w9, w8
	b.ne	LBB0_3
; %bb.2:
	mov	x0, x20
	mov	x1, x21
	bl	_sky2_set_tx_stfwd
LBB0_3:
Lloh5:
	adrp	x28, _GM_GP_CTRL@GOTPAGE
Lloh6:
	ldr	x28, [x28, _GM_GP_CTRL@GOTPAGEOFF]
	ldr	w2, [x28]
	mov	x0, x20
	mov	x1, x21
	bl	_gma_read16
	mov	x25, x0
	ldr	w2, [x28]
Lloh7:
	adrp	x8, _GM_GPCR_RX_ENA@GOTPAGE
Lloh8:
	ldr	x8, [x8, _GM_GPCR_RX_ENA@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	bic	w3, w0, w8
	mov	x0, x20
	mov	x1, x21
	bl	_gma_write16
	mov	x0, x22
	bl	_sky2_rx_stop
	mov	x0, x22
	bl	_sky2_rx_clean
	str	w26, [x19]
	mov	x0, x19
	bl	_netdev_update_features
Lloh10:
	adrp	x8, _DATA_BLIND_DEF@GOTPAGE
Lloh11:
	ldr	x8, [x8, _DATA_BLIND_DEF@GOTPAGEOFF]
Lloh12:
	ldr	w0, [x8]
	bl	_DATA_BLIND_VAL
Lloh13:
	adrp	x8, _GM_SMOD_VLAN_ENA@GOTPAGE
Lloh14:
	ldr	x8, [x8, _GM_SMOD_VLAN_ENA@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	orr	w26, w8, w0
	ldr	x8, [x22, #8]
Lloh16:
	adrp	x9, _SPEED_100@GOTPAGE
Lloh17:
	ldr	x9, [x9, _SPEED_100@GOTPAGEOFF]
Lloh18:
	adrp	x10, _IPG_DATA_DEF_1000@GOTPAGE
Lloh19:
	ldr	x10, [x10, _IPG_DATA_DEF_1000@GOTPAGEOFF]
Lloh20:
	ldr	x9, [x9]
Lloh21:
	adrp	x11, _IPG_DATA_DEF_10_100@GOTPAGE
Lloh22:
	ldr	x11, [x11, _IPG_DATA_DEF_10_100@GOTPAGEOFF]
	cmp	x8, x9
	csel	x8, x10, x11, gt
	ldr	w0, [x8]
	bl	_IPG_DATA_VAL
	orr	w8, w26, w0
	ldr	w9, [x19]
Lloh23:
	adrp	x10, _ETH_DATA_LEN@GOTPAGE
Lloh24:
	ldr	x10, [x10, _ETH_DATA_LEN@GOTPAGEOFF]
Lloh25:
	ldr	w10, [x10]
Lloh26:
	adrp	x11, _GM_SMOD_JUMBO_ENA@GOTPAGE
Lloh27:
	ldr	x11, [x11, _GM_SMOD_JUMBO_ENA@GOTPAGEOFF]
Lloh28:
	ldr	w11, [x11]
	cmp	w9, w10
	csel	w9, w11, wzr, gt
	orr	w3, w8, w9
Lloh29:
	adrp	x8, _GM_SERIAL_MODE@GOTPAGE
Lloh30:
	ldr	x8, [x8, _GM_SERIAL_MODE@GOTPAGEOFF]
Lloh31:
	ldr	w2, [x8]
	mov	x0, x20
	mov	x1, x21
	bl	_gma_write16
Lloh32:
	adrp	x8, _rxqaddr@GOTPAGE
Lloh33:
	ldr	x8, [x8, _rxqaddr@GOTPAGEOFF]
Lloh34:
	ldr	x8, [x8]
	ldr	w0, [x8, x21, lsl #2]
Lloh35:
	adrp	x8, _RB_CTRL@GOTPAGE
Lloh36:
	ldr	x8, [x8, _RB_CTRL@GOTPAGEOFF]
Lloh37:
	ldr	w1, [x8]
	bl	_RB_ADDR
	mov	x1, x0
Lloh38:
	adrp	x8, _RB_ENA_OP_MD@GOTPAGE
Lloh39:
	ldr	x8, [x8, _RB_ENA_OP_MD@GOTPAGEOFF]
Lloh40:
	ldr	w2, [x8]
	mov	x0, x20
	bl	_sky2_write8
	mov	x0, x22
	bl	_sky2_alloc_rx_skbs
	mov	x26, x0
	cbz	w0, LBB0_6
; %bb.4:
	mov	x0, x22
	bl	_sky2_rx_clean
	b	LBB0_7
LBB0_5:
	str	w26, [x19]
	mov	x0, x19
	bl	_netdev_update_features
	mov	w26, #0
	b	LBB0_10
LBB0_6:
	mov	x0, x22
	bl	_sky2_rx_start
LBB0_7:
	ldr	w1, [x27]
	mov	x0, x20
	mov	x2, x23
	bl	_sky2_write32
Lloh41:
	adrp	x8, _B0_Y2_SP_LISR@GOTPAGE
Lloh42:
	ldr	x8, [x8, _B0_Y2_SP_LISR@GOTPAGEOFF]
Lloh43:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_sky2_read32
	mov	x0, x24
	bl	_napi_enable
	cbz	w26, LBB0_9
; %bb.8:
	mov	x0, x19
	bl	_dev_close
	b	LBB0_10
LBB0_9:
	ldr	w2, [x28]
	mov	x0, x20
	mov	x1, x21
	mov	x3, x25
	bl	_gma_write16
	mov	x0, x19
	bl	_netif_wake_queue
LBB0_10:
	mov	x0, x26
	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 AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh20
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh41, Lloh42, Lloh43
	.cfi_endproc
                                        ; -- End function
	.comm	_B0_IMSK,4,2                    ; @B0_IMSK
	.comm	_SKY2_HW_RAM_BUFFER,4,2         ; @SKY2_HW_RAM_BUFFER
	.comm	_GM_GP_CTRL,4,2                 ; @GM_GP_CTRL
	.comm	_GM_GPCR_RX_ENA,4,2             ; @GM_GPCR_RX_ENA
	.comm	_DATA_BLIND_DEF,4,2             ; @DATA_BLIND_DEF
	.comm	_GM_SMOD_VLAN_ENA,4,2           ; @GM_SMOD_VLAN_ENA
	.comm	_SPEED_100,8,3                  ; @SPEED_100
	.comm	_IPG_DATA_DEF_1000,4,2          ; @IPG_DATA_DEF_1000
	.comm	_IPG_DATA_DEF_10_100,4,2        ; @IPG_DATA_DEF_10_100
	.comm	_ETH_DATA_LEN,4,2               ; @ETH_DATA_LEN
	.comm	_GM_SMOD_JUMBO_ENA,4,2          ; @GM_SMOD_JUMBO_ENA
	.comm	_GM_SERIAL_MODE,4,2             ; @GM_SERIAL_MODE
	.comm	_rxqaddr,8,3                    ; @rxqaddr
	.comm	_RB_CTRL,4,2                    ; @RB_CTRL
	.comm	_RB_ENA_OP_MD,4,2               ; @RB_ENA_OP_MD
	.comm	_B0_Y2_SP_LISR,4,2              ; @B0_Y2_SP_LISR
	.no_dead_strip	_sky2_change_mtu
.subsections_via_symbols
