	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function atl1c_set_settings
_atl1c_set_settings:                    ## @atl1c_set_settings
	.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
	movq	%rsi, %r15
	callq	_netdev_priv
	movq	%rax, %r14
	movq	%rax, %rbx
	movq	___AT_RESETTING@GOTPCREL(%rip), %r12
	movl	(%r12), %edi
	movq	%rax, %rsi
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	callq	_test_and_set_bit
	testq	%rax, %rax
	je	LBB0_3
## %bb.1:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	$1, %edi
	callq	_msleep
	movl	(%r12), %edi
	movq	%rbx, %rsi
	jmp	LBB0_2
LBB0_3:
	movq	(%r15), %rax
	movq	_AUTONEG_ENABLE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_5
## %bb.4:
	movq	_ADVERTISED_Autoneg@GOTPCREL(%rip), %rax
	jmp	LBB0_19
LBB0_5:
	movq	%r15, %rdi
	callq	_ethtool_cmd_speed
	movq	_SPEED_1000@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_12
## %bb.6:
	movq	8(%r15), %rax
	movq	_DUPLEX_FULL@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_8
## %bb.7:
	movq	_ADVERTISED_1000baseT_Full@GOTPCREL(%rip), %rax
	jmp	LBB0_19
LBB0_12:
	movq	_SPEED_100@GOTPCREL(%rip), %rsi
	movq	8(%r15), %rcx
	movq	_DUPLEX_FULL@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	cmpq	(%rsi), %rax
	jne	LBB0_16
## %bb.13:
	cmpq	%rdx, %rcx
	jne	LBB0_14
## %bb.15:
	movq	_ADVERTISED_100baseT_Full@GOTPCREL(%rip), %rax
	jmp	LBB0_19
LBB0_8:
	movq	%rbx, %rdi
	callq	_netif_msg_link
	testq	%rax, %rax
	je	LBB0_11
## %bb.9:
	movq	8(%rbx), %rdi
	leaq	L_.str(%rip), %rsi
	jmp	LBB0_10
LBB0_16:
	cmpq	%rdx, %rcx
	jne	LBB0_17
## %bb.18:
	movq	_ADVERTISED_10baseT_Full@GOTPCREL(%rip), %rax
	jmp	LBB0_19
LBB0_14:
	movq	_ADVERTISED_100baseT_Half@GOTPCREL(%rip), %rax
	jmp	LBB0_19
LBB0_17:
	movq	_ADVERTISED_10baseT_Half@GOTPCREL(%rip), %rax
LBB0_19:
	addq	$16, %r14
	movq	(%rax), %rax
	cmpq	%rax, (%r14)
	je	LBB0_23
## %bb.20:
	movq	%rax, (%r14)
	movq	%r14, %rdi
	callq	_atl1c_restart_autoneg
	testq	%rax, %rax
	je	LBB0_23
## %bb.21:
	movq	%rbx, %rdi
	callq	_netif_msg_link
	testq	%rax, %rax
	je	LBB0_11
## %bb.22:
	movq	8(%rbx), %rdi
	leaq	L_.str.1(%rip), %rsi
LBB0_10:
	callq	_dev_warn
LBB0_11:
	movl	(%r12), %edi
	movq	%rbx, %rsi
	callq	_clear_bit
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_24
LBB0_23:
	movl	(%r12), %edi
	movq	%rbx, %rsi
	callq	_clear_bit
	xorl	%eax, %eax
LBB0_24:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	___AT_RESETTING,4,2             ## @__AT_RESETTING
	.comm	_AUTONEG_ENABLE,8,3             ## @AUTONEG_ENABLE
	.comm	_ADVERTISED_Autoneg,8,3         ## @ADVERTISED_Autoneg
	.comm	_SPEED_1000,8,3                 ## @SPEED_1000
	.comm	_DUPLEX_FULL,8,3                ## @DUPLEX_FULL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"1000M half is invalid\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_ADVERTISED_1000baseT_Full,8,3  ## @ADVERTISED_1000baseT_Full
	.comm	_SPEED_100,8,3                  ## @SPEED_100
	.comm	_ADVERTISED_100baseT_Full,8,3   ## @ADVERTISED_100baseT_Full
	.comm	_ADVERTISED_100baseT_Half,8,3   ## @ADVERTISED_100baseT_Half
	.comm	_ADVERTISED_10baseT_Full,8,3    ## @ADVERTISED_10baseT_Full
	.comm	_ADVERTISED_10baseT_Half,8,3    ## @ADVERTISED_10baseT_Half
L_.str.1:                               ## @.str.1
	.asciz	"ethtool speed/duplex setting failed\n"

	.no_dead_strip	_atl1c_set_settings
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function atl1c_set_settings
_atl1c_set_settings:                    ; @atl1c_set_settings
	.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, x1
	bl	_netdev_priv
	mov	x19, x0
Lloh0:
	adrp	x21, ___AT_RESETTING@GOTPAGE
Lloh1:
	ldr	x21, [x21, ___AT_RESETTING@GOTPAGEOFF]
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x21]
	mov	x1, x19
	bl	_test_and_set_bit
	cbz	x0, LBB0_3
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	mov	w0, #1
	bl	_msleep
	b	LBB0_1
LBB0_3:
	ldr	x8, [x20]
Lloh2:
	adrp	x9, _AUTONEG_ENABLE@GOTPAGE
Lloh3:
	ldr	x9, [x9, _AUTONEG_ENABLE@GOTPAGEOFF]
Lloh4:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_5
; %bb.4:
Lloh5:
	adrp	x8, _ADVERTISED_Autoneg@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ADVERTISED_Autoneg@GOTPAGEOFF]
	b	LBB0_9
LBB0_5:
	mov	x0, x20
	bl	_ethtool_cmd_speed
Lloh7:
	adrp	x8, _SPEED_1000@GOTPAGE
Lloh8:
	ldr	x8, [x8, _SPEED_1000@GOTPAGEOFF]
Lloh9:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_8
; %bb.6:
	ldr	x8, [x20, #8]
Lloh10:
	adrp	x9, _DUPLEX_FULL@GOTPAGE
Lloh11:
	ldr	x9, [x9, _DUPLEX_FULL@GOTPAGEOFF]
Lloh12:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_14
; %bb.7:
Lloh13:
	adrp	x8, _ADVERTISED_1000baseT_Full@GOTPAGE
Lloh14:
	ldr	x8, [x8, _ADVERTISED_1000baseT_Full@GOTPAGEOFF]
	b	LBB0_9
LBB0_8:
Lloh15:
	adrp	x8, _SPEED_100@GOTPAGE
Lloh16:
	ldr	x8, [x8, _SPEED_100@GOTPAGEOFF]
Lloh17:
	ldr	x8, [x8]
	ldr	x9, [x20, #8]
Lloh18:
	adrp	x10, _DUPLEX_FULL@GOTPAGE
Lloh19:
	ldr	x10, [x10, _DUPLEX_FULL@GOTPAGEOFF]
Lloh20:
	adrp	x11, _ADVERTISED_10baseT_Half@GOTPAGE
Lloh21:
	ldr	x11, [x11, _ADVERTISED_10baseT_Half@GOTPAGEOFF]
Lloh22:
	ldr	x10, [x10]
Lloh23:
	adrp	x12, _ADVERTISED_10baseT_Full@GOTPAGE
Lloh24:
	ldr	x12, [x12, _ADVERTISED_10baseT_Full@GOTPAGEOFF]
Lloh25:
	adrp	x13, _ADVERTISED_100baseT_Half@GOTPAGE
Lloh26:
	ldr	x13, [x13, _ADVERTISED_100baseT_Half@GOTPAGEOFF]
	cmp	x9, x10
	csel	x9, x12, x11, eq
Lloh27:
	adrp	x10, _ADVERTISED_100baseT_Full@GOTPAGE
Lloh28:
	ldr	x10, [x10, _ADVERTISED_100baseT_Full@GOTPAGEOFF]
	csel	x10, x10, x13, eq
	cmp	x0, x8
	csel	x8, x9, x10, ne
LBB0_9:
	add	x0, x19, #16
	ldr	x8, [x8]
	ldr	x9, [x0]
	cmp	x9, x8
	b.eq	LBB0_13
; %bb.10:
	str	x8, [x0]
	bl	_atl1c_restart_autoneg
	cbz	x0, LBB0_13
; %bb.11:
	mov	x0, x19
	bl	_netif_msg_link
	cbz	x0, LBB0_17
; %bb.12:
	ldr	x0, [x19, #8]
Lloh29:
	adrp	x1, l_.str.1@PAGE
Lloh30:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_16
LBB0_13:
	ldr	w0, [x21]
	mov	x1, x19
	bl	_clear_bit
	mov	w0, #0
	b	LBB0_18
LBB0_14:
	mov	x0, x19
	bl	_netif_msg_link
	cbz	x0, LBB0_17
; %bb.15:
	ldr	x0, [x19, #8]
Lloh31:
	adrp	x1, l_.str@PAGE
Lloh32:
	add	x1, x1, l_.str@PAGEOFF
LBB0_16:
	bl	_dev_warn
LBB0_17:
	ldr	w0, [x21]
	mov	x1, x19
	bl	_clear_bit
Lloh33:
	adrp	x8, _EINVAL@GOTPAGE
Lloh34:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh35:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_18:
	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 AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh27, Lloh28
	.loh AdrpLdrGot	Lloh25, Lloh26
	.loh AdrpLdrGot	Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh22
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpAdd	Lloh29, Lloh30
	.loh AdrpAdd	Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.cfi_endproc
                                        ; -- End function
	.comm	___AT_RESETTING,4,2             ; @__AT_RESETTING
	.comm	_AUTONEG_ENABLE,8,3             ; @AUTONEG_ENABLE
	.comm	_ADVERTISED_Autoneg,8,3         ; @ADVERTISED_Autoneg
	.comm	_SPEED_1000,8,3                 ; @SPEED_1000
	.comm	_DUPLEX_FULL,8,3                ; @DUPLEX_FULL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"1000M half is invalid\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_ADVERTISED_1000baseT_Full,8,3  ; @ADVERTISED_1000baseT_Full
	.comm	_SPEED_100,8,3                  ; @SPEED_100
	.comm	_ADVERTISED_100baseT_Full,8,3   ; @ADVERTISED_100baseT_Full
	.comm	_ADVERTISED_100baseT_Half,8,3   ; @ADVERTISED_100baseT_Half
	.comm	_ADVERTISED_10baseT_Full,8,3    ; @ADVERTISED_10baseT_Full
	.comm	_ADVERTISED_10baseT_Half,8,3    ; @ADVERTISED_10baseT_Half
l_.str.1:                               ; @.str.1
	.asciz	"ethtool speed/duplex setting failed\n"

	.no_dead_strip	_atl1c_set_settings
.subsections_via_symbols
