	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ionic_set_link_ksettings
_ionic_set_link_ksettings:              ## @ionic_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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r13
	movq	%rdi, %r15
	callq	_netdev_priv
	movq	(%rax), %r12
	leaq	8(%r12), %r14
	movq	(%r13), %rcx
	movq	8(%r12), %rax
	cmpq	(%rax), %rcx
	je	LBB0_3
## %bb.1:
	movq	%r12, %rdi
	callq	_mutex_lock
	movq	(%r13), %rsi
	movq	%r14, %rdi
	callq	_ionic_dev_cmd_port_autoneg
	movq	_DEVCMD_TIMEOUT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_ionic_dev_cmd_wait
	movl	%eax, %ebx
	movq	%r12, %rdi
	callq	_mutex_unlock
	testl	%ebx, %ebx
	jne	LBB0_16
## %bb.2:
	movq	(%r14), %rax
LBB0_3:
	movq	8(%r13), %rbx
	movl	16(%rax), %edi
	callq	_le32_to_cpu
	cmpq	%rax, %rbx
	je	LBB0_5
## %bb.4:
	movq	%r12, %rdi
	callq	_mutex_lock
	movq	8(%r13), %rsi
	movq	%r14, %rdi
	callq	_ionic_dev_cmd_port_speed
	movq	_DEVCMD_TIMEOUT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_ionic_dev_cmd_wait
	movl	%eax, %ebx
	movq	%r12, %rdi
	callq	_mutex_unlock
	testl	%ebx, %ebx
	jne	LBB0_16
LBB0_5:
	movq	%r14, -48(%rbp)                 ## 8-byte Spill
	movq	_advertising@GOTPCREL(%rip), %r14
	movl	(%r14), %esi
	movq	_FEC_RS@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r13, %rdi
	callq	_ethtool_link_ksettings_test_link_mode
	movl	%eax, %ebx
	movl	(%r14), %esi
	movq	_FEC_BASER@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r13, %rdi
	callq	_ethtool_link_ksettings_test_link_mode
	testl	%ebx, %ebx
	je	LBB0_8
## %bb.6:
	testl	%eax, %eax
	je	LBB0_8
## %bb.7:
	leaq	L_.str(%rip), %rsi
	movq	%r15, %rdi
	callq	_netdev_info
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_16
LBB0_8:
	testl	%ebx, %ebx
	je	LBB0_9
## %bb.10:
	movq	_IONIC_PORT_FEC_TYPE_RS@GOTPCREL(%rip), %rcx
	jmp	LBB0_11
LBB0_9:
	movq	_IONIC_PORT_FEC_TYPE_NONE@GOTPCREL(%rip), %rcx
LBB0_11:
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	testl	%eax, %eax
	je	LBB0_13
## %bb.12:
	movq	_IONIC_PORT_FEC_TYPE_FC@GOTPCREL(%rip), %rcx
LBB0_13:
	movq	(%rcx), %rbx
	movq	(%r14), %rax
	cmpq	8(%rax), %rbx
	je	LBB0_15
## %bb.14:
	movq	%r12, %rdi
	callq	_mutex_lock
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_ionic_dev_cmd_port_fec
	movq	_DEVCMD_TIMEOUT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_ionic_dev_cmd_wait
	movl	%eax, %ebx
	movq	%r12, %rdi
	callq	_mutex_unlock
	testl	%ebx, %ebx
	jne	LBB0_16
LBB0_15:
	xorl	%ebx, %ebx
LBB0_16:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_IONIC_PORT_FEC_TYPE_NONE,8,3   ## @IONIC_PORT_FEC_TYPE_NONE
	.comm	_DEVCMD_TIMEOUT,4,2             ## @DEVCMD_TIMEOUT
	.comm	_advertising,4,2                ## @advertising
	.comm	_FEC_RS,4,2                     ## @FEC_RS
	.comm	_FEC_BASER,4,2                  ## @FEC_BASER
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Only select one FEC mode at a time\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_IONIC_PORT_FEC_TYPE_FC,8,3     ## @IONIC_PORT_FEC_TYPE_FC
	.comm	_IONIC_PORT_FEC_TYPE_RS,8,3     ## @IONIC_PORT_FEC_TYPE_RS
	.no_dead_strip	_ionic_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 ionic_set_link_ksettings
_ionic_set_link_ksettings:              ; @ionic_set_link_ksettings
	.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	x22, x1
	mov	x21, x0
	bl	_netdev_priv
	ldr	x19, [x0]
	mov	x20, x19
	ldr	x8, [x20, #8]!
	ldr	x9, [x22]
	ldr	x10, [x8]
	cmp	x9, x10
	b.eq	LBB0_3
; %bb.1:
	mov	x0, x19
	bl	_mutex_lock
	ldr	x1, [x22]
	mov	x0, x20
	bl	_ionic_dev_cmd_port_autoneg
Lloh0:
	adrp	x8, _DEVCMD_TIMEOUT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _DEVCMD_TIMEOUT@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_ionic_dev_cmd_wait
	mov	x23, x0
	mov	x0, x19
	bl	_mutex_unlock
	cbnz	w23, LBB0_10
; %bb.2:
	ldr	x8, [x20]
LBB0_3:
	ldr	x23, [x22, #8]
	ldr	w0, [x8, #16]
	bl	_le32_to_cpu
	cmp	x23, x0
	b.eq	LBB0_5
; %bb.4:
	mov	x0, x19
	bl	_mutex_lock
	ldr	x1, [x22, #8]
	mov	x0, x20
	bl	_ionic_dev_cmd_port_speed
Lloh3:
	adrp	x8, _DEVCMD_TIMEOUT@GOTPAGE
Lloh4:
	ldr	x8, [x8, _DEVCMD_TIMEOUT@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_ionic_dev_cmd_wait
	mov	x23, x0
	mov	x0, x19
	bl	_mutex_unlock
	cbnz	w23, LBB0_10
LBB0_5:
Lloh6:
	adrp	x24, _advertising@GOTPAGE
Lloh7:
	ldr	x24, [x24, _advertising@GOTPAGEOFF]
	ldr	w1, [x24]
Lloh8:
	adrp	x8, _FEC_RS@GOTPAGE
Lloh9:
	ldr	x8, [x8, _FEC_RS@GOTPAGEOFF]
Lloh10:
	ldr	w2, [x8]
	mov	x0, x22
	bl	_ethtool_link_ksettings_test_link_mode
	mov	x23, x0
	ldr	w1, [x24]
Lloh11:
	adrp	x8, _FEC_BASER@GOTPAGE
Lloh12:
	ldr	x8, [x8, _FEC_BASER@GOTPAGEOFF]
Lloh13:
	ldr	w2, [x8]
	mov	x0, x22
	bl	_ethtool_link_ksettings_test_link_mode
	cmp	w23, #0
	ccmp	w0, #0, #4, ne
	b.ne	LBB0_9
; %bb.6:
Lloh14:
	adrp	x8, _IONIC_PORT_FEC_TYPE_FC@GOTPAGE
Lloh15:
	ldr	x8, [x8, _IONIC_PORT_FEC_TYPE_FC@GOTPAGEOFF]
Lloh16:
	adrp	x9, _IONIC_PORT_FEC_TYPE_RS@GOTPAGE
Lloh17:
	ldr	x9, [x9, _IONIC_PORT_FEC_TYPE_RS@GOTPAGEOFF]
Lloh18:
	adrp	x10, _IONIC_PORT_FEC_TYPE_NONE@GOTPAGE
Lloh19:
	ldr	x10, [x10, _IONIC_PORT_FEC_TYPE_NONE@GOTPAGEOFF]
	cmp	w23, #0
	csel	x9, x9, x10, ne
	cmp	w0, #0
	csel	x8, x8, x9, ne
	ldr	x21, [x8]
	ldr	x8, [x20]
	ldr	x8, [x8, #8]
	cmp	x21, x8
	b.eq	LBB0_8
; %bb.7:
	mov	x0, x19
	bl	_mutex_lock
	mov	x0, x20
	mov	x1, x21
	bl	_ionic_dev_cmd_port_fec
Lloh20:
	adrp	x8, _DEVCMD_TIMEOUT@GOTPAGE
Lloh21:
	ldr	x8, [x8, _DEVCMD_TIMEOUT@GOTPAGEOFF]
Lloh22:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_ionic_dev_cmd_wait
	mov	x23, x0
	mov	x0, x19
	bl	_mutex_unlock
	cbnz	w23, LBB0_10
LBB0_8:
	mov	w23, #0
	b	LBB0_10
LBB0_9:
Lloh23:
	adrp	x1, l_.str@PAGE
Lloh24:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x21
	bl	_netdev_info
Lloh25:
	adrp	x8, _EINVAL@GOTPAGE
Lloh26:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh27:
	ldr	w8, [x8]
	neg	w23, w8
LBB0_10:
	mov	x0, x23
	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	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpAdd	Lloh23, Lloh24
	.cfi_endproc
                                        ; -- End function
	.comm	_IONIC_PORT_FEC_TYPE_NONE,8,3   ; @IONIC_PORT_FEC_TYPE_NONE
	.comm	_DEVCMD_TIMEOUT,4,2             ; @DEVCMD_TIMEOUT
	.comm	_advertising,4,2                ; @advertising
	.comm	_FEC_RS,4,2                     ; @FEC_RS
	.comm	_FEC_BASER,4,2                  ; @FEC_BASER
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Only select one FEC mode at a time\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_IONIC_PORT_FEC_TYPE_FC,8,3     ; @IONIC_PORT_FEC_TYPE_FC
	.comm	_IONIC_PORT_FEC_TYPE_RS,8,3     ; @IONIC_PORT_FEC_TYPE_RS
	.no_dead_strip	_ionic_set_link_ksettings
.subsections_via_symbols
