	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function gem_change_mtu
_gem_change_mtu:                        ## @gem_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, %r15d
	movq	%rdi, %rbx
	callq	_netdev_priv
	movq	%rax, %r14
	movq	_GEM_MIN_MTU@GOTPCREL(%rip), %rax
	cmpl	%r15d, (%rax)
	jg	LBB0_2
## %bb.1:
	movq	_GEM_MAX_MTU@GOTPCREL(%rip), %rax
	cmpl	%r15d, (%rax)
	jl	LBB0_2
## %bb.3:
	movq	%rbx, %rdi
	callq	_netif_running
	testl	%eax, %eax
	je	LBB0_5
## %bb.4:
	movq	%rbx, %rdi
	callq	_netif_device_present
	testl	%eax, %eax
	je	LBB0_5
## %bb.6:
	leaq	8(%r14), %rdi
	movq	%rdi, -48(%rbp)                 ## 8-byte Spill
	callq	_mutex_lock
	leaq	12(%r14), %r13
	movq	%r13, %rdi
	callq	_spin_lock_irq
	movq	%r14, %r12
	addq	$16, %r12
	movq	%r12, %rdi
	callq	_spin_lock
	movl	%r15d, (%rbx)
	cmpq	$0, 24(%r14)
	je	LBB0_9
## %bb.7:
	movq	%r14, %rdi
	callq	_gem_reinit_chip
	movq	(%r14), %rax
	movq	_link_up@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_9
## %bb.8:
	movq	%r14, %rdi
	callq	_gem_set_link_modes
LBB0_9:
	movq	%r12, %rdi
	callq	_spin_unlock
	movq	%r13, %rdi
	callq	_spin_unlock_irq
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_mutex_unlock
	jmp	LBB0_10
LBB0_2:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_11
LBB0_5:
	movl	%r15d, (%rbx)
LBB0_10:
	xorl	%eax, %eax
LBB0_11:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GEM_MIN_MTU,4,2                ## @GEM_MIN_MTU
	.comm	_GEM_MAX_MTU,4,2                ## @GEM_MAX_MTU
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_link_up,8,3                    ## @link_up
	.no_dead_strip	_gem_change_mtu
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function gem_change_mtu
_gem_change_mtu:                        ; @gem_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	x20, x1
	mov	x21, x0
	bl	_netdev_priv
Lloh0:
	adrp	x8, _GEM_MIN_MTU@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GEM_MIN_MTU@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _GEM_MAX_MTU@GOTPAGE
Lloh4:
	ldr	x9, [x9, _GEM_MAX_MTU@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	cmp	w8, w20
	ccmp	w9, w20, #8, le
	b.ge	LBB0_2
; %bb.1:
Lloh6:
	adrp	x8, _EINVAL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_9
LBB0_2:
	mov	x19, x0
	mov	x0, x21
	bl	_netif_running
	cbz	w0, LBB0_8
; %bb.3:
	mov	x0, x21
	bl	_netif_device_present
	cbz	w0, LBB0_8
; %bb.4:
	add	x22, x19, #8
	mov	x0, x22
	bl	_mutex_lock
	add	x23, x19, #12
	mov	x0, x23
	bl	_spin_lock_irq
	add	x24, x19, #16
	mov	x0, x24
	bl	_spin_lock
	str	w20, [x21]
	ldr	x8, [x19, #24]
	cbz	x8, LBB0_7
; %bb.5:
	mov	x0, x19
	bl	_gem_reinit_chip
	ldr	x8, [x19]
Lloh9:
	adrp	x9, _link_up@GOTPAGE
Lloh10:
	ldr	x9, [x9, _link_up@GOTPAGEOFF]
Lloh11:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_7
; %bb.6:
	mov	x0, x19
	bl	_gem_set_link_modes
LBB0_7:
	mov	x0, x24
	bl	_spin_unlock
	mov	x0, x23
	bl	_spin_unlock_irq
	mov	x0, x22
	bl	_mutex_unlock
	mov	w0, #0
	b	LBB0_9
LBB0_8:
	mov	w0, #0
	str	w20, [x21]
LBB0_9:
	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	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_GEM_MIN_MTU,4,2                ; @GEM_MIN_MTU
	.comm	_GEM_MAX_MTU,4,2                ; @GEM_MAX_MTU
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_link_up,8,3                    ; @link_up
	.no_dead_strip	_gem_change_mtu
.subsections_via_symbols
