	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function typhoon_set_link_ksettings
_typhoon_set_link_ksettings:            ## @typhoon_set_link_ksettings
	.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
	movq	%rsi, %rbx
	callq	_netdev_priv
	movq	%rax, %r14
	movl	(%rbx), %esi
	movq	8(%rbx), %rax
	movq	_AUTONEG_ENABLE@GOTPCREL(%rip), %r12
	cmpq	(%r12), %rax
	jne	LBB0_2
## %bb.1:
	movl	%esi, -44(%rbp)                 ## 4-byte Spill
	movq	_TYPHOON_XCVR_AUTONEG@GOTPCREL(%rip), %rax
	jmp	LBB0_12
LBB0_2:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	movl	16(%rbx), %ecx
	movq	_DUPLEX_HALF@GOTPCREL(%rip), %rdx
	cmpl	(%rdx), %ecx
	jne	LBB0_7
## %bb.3:
	movq	_SPEED_10@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %esi
	jne	LBB0_5
## %bb.4:
	movl	%esi, -44(%rbp)                 ## 4-byte Spill
	movq	_TYPHOON_XCVR_10HALF@GOTPCREL(%rip), %rax
	jmp	LBB0_12
LBB0_7:
	movq	_DUPLEX_FULL@GOTPCREL(%rip), %rdx
	cmpl	(%rdx), %ecx
	jne	LBB0_17
## %bb.8:
	movq	_SPEED_10@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %esi
	jne	LBB0_10
## %bb.9:
	movl	%esi, -44(%rbp)                 ## 4-byte Spill
	movq	_TYPHOON_XCVR_10FULL@GOTPCREL(%rip), %rax
	jmp	LBB0_12
LBB0_5:
	movq	_SPEED_100@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %esi
	jne	LBB0_17
## %bb.6:
	movl	%esi, -44(%rbp)                 ## 4-byte Spill
	movq	_TYPHOON_XCVR_100HALF@GOTPCREL(%rip), %rax
	jmp	LBB0_12
LBB0_10:
	movq	_SPEED_100@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %esi
	jne	LBB0_17
## %bb.11:
	movl	%esi, -44(%rbp)                 ## 4-byte Spill
	movq	_TYPHOON_XCVR_100FULL@GOTPCREL(%rip), %rax
LBB0_12:
	movq	(%rax), %r13
	movq	_TYPHOON_CMD_XCVR_SELECT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-56(%rbp), %r15
	movq	%r15, %rdi
	callq	_INIT_COMMAND_NO_RESPONSE
	movq	%r13, -56(%rbp)
	movq	%r14, %rdi
	movl	$1, %esi
	movq	%r15, %rdx
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	callq	_typhoon_issue_command
	testl	%eax, %eax
	js	LBB0_17
## %bb.13:
	movq	%r13, 8(%r14)
	movq	8(%rbx), %rcx
	cmpq	(%r12), %rcx
	jne	LBB0_15
## %bb.14:
	movl	$255, (%r14)
	movl	$255, %ecx
	jmp	LBB0_16
LBB0_15:
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	movl	%ecx, (%r14)
	movl	16(%rbx), %ecx
LBB0_16:
	movl	%ecx, 4(%r14)
LBB0_17:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_AUTONEG_ENABLE,8,3             ## @AUTONEG_ENABLE
	.comm	_TYPHOON_XCVR_AUTONEG,8,3       ## @TYPHOON_XCVR_AUTONEG
	.comm	_DUPLEX_HALF,4,2                ## @DUPLEX_HALF
	.comm	_SPEED_10,4,2                   ## @SPEED_10
	.comm	_TYPHOON_XCVR_10HALF,8,3        ## @TYPHOON_XCVR_10HALF
	.comm	_SPEED_100,4,2                  ## @SPEED_100
	.comm	_TYPHOON_XCVR_100HALF,8,3       ## @TYPHOON_XCVR_100HALF
	.comm	_DUPLEX_FULL,4,2                ## @DUPLEX_FULL
	.comm	_TYPHOON_XCVR_10FULL,8,3        ## @TYPHOON_XCVR_10FULL
	.comm	_TYPHOON_XCVR_100FULL,8,3       ## @TYPHOON_XCVR_100FULL
	.comm	_TYPHOON_CMD_XCVR_SELECT,4,2    ## @TYPHOON_CMD_XCVR_SELECT
	.no_dead_strip	_typhoon_set_link_ksettings
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function typhoon_set_link_ksettings
_typhoon_set_link_ksettings:            ; @typhoon_set_link_ksettings
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	bl	_netdev_priv
	mov	x19, x0
	ldr	w21, [x20]
	ldr	x8, [x20, #8]
Lloh0:
	adrp	x22, _AUTONEG_ENABLE@GOTPAGE
Lloh1:
	ldr	x22, [x22, _AUTONEG_ENABLE@GOTPAGEOFF]
	ldr	x9, [x22]
	cmp	x8, x9
	b.ne	LBB0_2
; %bb.1:
Lloh2:
	adrp	x8, _TYPHOON_XCVR_AUTONEG@GOTPAGE
Lloh3:
	ldr	x8, [x8, _TYPHOON_XCVR_AUTONEG@GOTPAGEOFF]
	b	LBB0_12
LBB0_2:
Lloh4:
	adrp	x8, _EINVAL@GOTPAGE
Lloh5:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	neg	w0, w8
	ldr	w8, [x20, #16]
Lloh7:
	adrp	x9, _DUPLEX_HALF@GOTPAGE
Lloh8:
	ldr	x9, [x9, _DUPLEX_HALF@GOTPAGEOFF]
Lloh9:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ne	LBB0_5
; %bb.3:
Lloh10:
	adrp	x8, _SPEED_10@GOTPAGE
Lloh11:
	ldr	x8, [x8, _SPEED_10@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	cmp	w21, w8
	b.ne	LBB0_8
; %bb.4:
Lloh13:
	adrp	x8, _TYPHOON_XCVR_10HALF@GOTPAGE
Lloh14:
	ldr	x8, [x8, _TYPHOON_XCVR_10HALF@GOTPAGEOFF]
	b	LBB0_12
LBB0_5:
Lloh15:
	adrp	x9, _DUPLEX_FULL@GOTPAGE
Lloh16:
	ldr	x9, [x9, _DUPLEX_FULL@GOTPAGEOFF]
Lloh17:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ne	LBB0_17
; %bb.6:
Lloh18:
	adrp	x8, _SPEED_10@GOTPAGE
Lloh19:
	ldr	x8, [x8, _SPEED_10@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
	cmp	w21, w8
	b.ne	LBB0_10
; %bb.7:
Lloh21:
	adrp	x8, _TYPHOON_XCVR_10FULL@GOTPAGE
Lloh22:
	ldr	x8, [x8, _TYPHOON_XCVR_10FULL@GOTPAGEOFF]
	b	LBB0_12
LBB0_8:
Lloh23:
	adrp	x8, _SPEED_100@GOTPAGE
Lloh24:
	ldr	x8, [x8, _SPEED_100@GOTPAGEOFF]
Lloh25:
	ldr	w8, [x8]
	cmp	w21, w8
	b.ne	LBB0_17
; %bb.9:
Lloh26:
	adrp	x8, _TYPHOON_XCVR_100HALF@GOTPAGE
Lloh27:
	ldr	x8, [x8, _TYPHOON_XCVR_100HALF@GOTPAGEOFF]
	b	LBB0_12
LBB0_10:
Lloh28:
	adrp	x8, _SPEED_100@GOTPAGE
Lloh29:
	ldr	x8, [x8, _SPEED_100@GOTPAGEOFF]
Lloh30:
	ldr	w8, [x8]
	cmp	w21, w8
	b.ne	LBB0_17
; %bb.11:
Lloh31:
	adrp	x8, _TYPHOON_XCVR_100FULL@GOTPAGE
Lloh32:
	ldr	x8, [x8, _TYPHOON_XCVR_100FULL@GOTPAGEOFF]
LBB0_12:
	ldr	x23, [x8]
Lloh33:
	adrp	x8, _TYPHOON_CMD_XCVR_SELECT@GOTPAGE
Lloh34:
	ldr	x8, [x8, _TYPHOON_CMD_XCVR_SELECT@GOTPAGEOFF]
Lloh35:
	ldr	w1, [x8]
	add	x0, sp, #8
	bl	_INIT_COMMAND_NO_RESPONSE
	str	x23, [sp, #8]
	add	x2, sp, #8
	mov	x0, x19
	mov	w1, #1
	mov	w3, #0
	mov	x4, #0
	bl	_typhoon_issue_command
	tbnz	w0, #31, LBB0_17
; %bb.13:
	str	x23, [x19, #8]
	ldr	x8, [x20, #8]
	ldr	x9, [x22]
	cmp	x8, x9
	b.ne	LBB0_15
; %bb.14:
	mov	w8, #255
	str	w8, [x19]
	b	LBB0_16
LBB0_15:
	str	w21, [x19]
	ldr	w8, [x20, #16]
LBB0_16:
	str	w8, [x19, #4]
LBB0_17:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGot	Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGot	Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_AUTONEG_ENABLE,8,3             ; @AUTONEG_ENABLE
	.comm	_TYPHOON_XCVR_AUTONEG,8,3       ; @TYPHOON_XCVR_AUTONEG
	.comm	_DUPLEX_HALF,4,2                ; @DUPLEX_HALF
	.comm	_SPEED_10,4,2                   ; @SPEED_10
	.comm	_TYPHOON_XCVR_10HALF,8,3        ; @TYPHOON_XCVR_10HALF
	.comm	_SPEED_100,4,2                  ; @SPEED_100
	.comm	_TYPHOON_XCVR_100HALF,8,3       ; @TYPHOON_XCVR_100HALF
	.comm	_DUPLEX_FULL,4,2                ; @DUPLEX_FULL
	.comm	_TYPHOON_XCVR_10FULL,8,3        ; @TYPHOON_XCVR_10FULL
	.comm	_TYPHOON_XCVR_100FULL,8,3       ; @TYPHOON_XCVR_100FULL
	.comm	_TYPHOON_CMD_XCVR_SELECT,4,2    ; @TYPHOON_CMD_XCVR_SELECT
	.no_dead_strip	_typhoon_set_link_ksettings
.subsections_via_symbols
