	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function gelic_ether_set_link_ksettings
_gelic_ether_set_link_ksettings:        ## @gelic_ether_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	%rsi, %rbx
	callq	_netdev_card
	movq	(%rbx), %rcx
	movq	_AUTONEG_ENABLE@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	jne	LBB0_2
## %bb.1:
	movq	_GELIC_LV1_ETHER_AUTO_NEG@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	jmp	LBB0_8
LBB0_2:
	movl	8(%rbx), %ecx
	cmpl	$128, %ecx
	je	LBB0_9
## %bb.3:
	cmpl	$130, %ecx
	je	LBB0_4
## %bb.5:
	cmpl	$129, %ecx
	jne	LBB0_13
## %bb.6:
	movq	_GELIC_LV1_ETHER_SPEED_100@GOTPCREL(%rip), %rcx
	jmp	LBB0_7
LBB0_4:
	movq	_GELIC_LV1_ETHER_SPEED_10@GOTPCREL(%rip), %rcx
LBB0_7:
	movl	(%rcx), %esi
	movq	16(%rbx), %rcx
	movq	_DUPLEX_FULL@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	je	LBB0_11
	jmp	LBB0_8
LBB0_9:
	movq	16(%rbx), %rcx
	movq	_DUPLEX_FULL@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	jne	LBB0_12
## %bb.10:
	movq	_GELIC_LV1_ETHER_SPEED_1000@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
LBB0_11:
	movq	_GELIC_LV1_ETHER_FULL_DUPLEX@GOTPCREL(%rip), %rcx
	orl	(%rcx), %esi
LBB0_8:
	movq	%rax, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	jmp	_gelic_card_set_link_mode       ## TAILCALL
LBB0_12:
	leaq	L_.str(%rip), %rdi
	callq	_pr_info
LBB0_13:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_AUTONEG_ENABLE,8,3             ## @AUTONEG_ENABLE
	.comm	_GELIC_LV1_ETHER_AUTO_NEG,4,2   ## @GELIC_LV1_ETHER_AUTO_NEG
	.comm	_GELIC_LV1_ETHER_SPEED_10,4,2   ## @GELIC_LV1_ETHER_SPEED_10
	.comm	_GELIC_LV1_ETHER_SPEED_100,4,2  ## @GELIC_LV1_ETHER_SPEED_100
	.comm	_GELIC_LV1_ETHER_SPEED_1000,4,2 ## @GELIC_LV1_ETHER_SPEED_1000
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_DUPLEX_FULL,8,3                ## @DUPLEX_FULL
	.comm	_GELIC_LV1_ETHER_FULL_DUPLEX,4,2 ## @GELIC_LV1_ETHER_FULL_DUPLEX
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"1000 half duplex is not supported.\n"

	.no_dead_strip	_gelic_ether_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 gelic_ether_set_link_ksettings
_gelic_ether_set_link_ksettings:        ; @gelic_ether_set_link_ksettings
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x1
	bl	_netdev_card
	ldr	x8, [x19]
Lloh0:
	adrp	x9, _AUTONEG_ENABLE@GOTPAGE
Lloh1:
	ldr	x9, [x9, _AUTONEG_ENABLE@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_2
; %bb.1:
Lloh3:
	adrp	x8, _GELIC_LV1_ETHER_AUTO_NEG@GOTPAGE
Lloh4:
	ldr	x8, [x8, _GELIC_LV1_ETHER_AUTO_NEG@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	b	LBB0_11
LBB0_2:
	ldr	w8, [x19, #8]
	cmp	w8, #128
	b.eq	LBB0_8
; %bb.3:
	cmp	w8, #130
	b.eq	LBB0_6
; %bb.4:
	cmp	w8, #129
	b.ne	LBB0_13
; %bb.5:
Lloh6:
	adrp	x8, _GELIC_LV1_ETHER_SPEED_100@GOTPAGE
Lloh7:
	ldr	x8, [x8, _GELIC_LV1_ETHER_SPEED_100@GOTPAGEOFF]
	b	LBB0_7
LBB0_6:
Lloh8:
	adrp	x8, _GELIC_LV1_ETHER_SPEED_10@GOTPAGE
Lloh9:
	ldr	x8, [x8, _GELIC_LV1_ETHER_SPEED_10@GOTPAGEOFF]
LBB0_7:
	ldr	w1, [x8]
	ldr	x8, [x19, #16]
Lloh10:
	adrp	x9, _DUPLEX_FULL@GOTPAGE
Lloh11:
	ldr	x9, [x9, _DUPLEX_FULL@GOTPAGEOFF]
Lloh12:
	ldr	x9, [x9]
	cmp	x8, x9
	b.eq	LBB0_10
	b	LBB0_11
LBB0_8:
	ldr	x8, [x19, #16]
Lloh13:
	adrp	x9, _DUPLEX_FULL@GOTPAGE
Lloh14:
	ldr	x9, [x9, _DUPLEX_FULL@GOTPAGEOFF]
Lloh15:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_12
; %bb.9:
Lloh16:
	adrp	x8, _GELIC_LV1_ETHER_SPEED_1000@GOTPAGE
Lloh17:
	ldr	x8, [x8, _GELIC_LV1_ETHER_SPEED_1000@GOTPAGEOFF]
Lloh18:
	ldr	w1, [x8]
LBB0_10:
Lloh19:
	adrp	x8, _GELIC_LV1_ETHER_FULL_DUPLEX@GOTPAGE
Lloh20:
	ldr	x8, [x8, _GELIC_LV1_ETHER_FULL_DUPLEX@GOTPAGEOFF]
Lloh21:
	ldr	w8, [x8]
	orr	w1, w8, w1
LBB0_11:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_gelic_card_set_link_mode
LBB0_12:
Lloh22:
	adrp	x0, l_.str@PAGE
Lloh23:
	add	x0, x0, l_.str@PAGEOFF
	bl	_pr_info
LBB0_13:
Lloh24:
	adrp	x8, _EINVAL@GOTPAGE
Lloh25:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh26:
	ldr	w8, [x8]
	neg	w0, w8
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.cfi_endproc
                                        ; -- End function
	.comm	_AUTONEG_ENABLE,8,3             ; @AUTONEG_ENABLE
	.comm	_GELIC_LV1_ETHER_AUTO_NEG,4,2   ; @GELIC_LV1_ETHER_AUTO_NEG
	.comm	_GELIC_LV1_ETHER_SPEED_10,4,2   ; @GELIC_LV1_ETHER_SPEED_10
	.comm	_GELIC_LV1_ETHER_SPEED_100,4,2  ; @GELIC_LV1_ETHER_SPEED_100
	.comm	_GELIC_LV1_ETHER_SPEED_1000,4,2 ; @GELIC_LV1_ETHER_SPEED_1000
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_DUPLEX_FULL,8,3                ; @DUPLEX_FULL
	.comm	_GELIC_LV1_ETHER_FULL_DUPLEX,4,2 ; @GELIC_LV1_ETHER_FULL_DUPLEX
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"1000 half duplex is not supported.\n"

	.no_dead_strip	_gelic_ether_set_link_ksettings
.subsections_via_symbols
