	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_aq_nic_set_link_ksettings      ## -- Begin function aq_nic_set_link_ksettings
	.p2align	4, 0x90
_aq_nic_set_link_ksettings:             ## @aq_nic_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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	(%rsi), %rax
	movq	_AUTONEG_ENABLE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_2
## %bb.1:
	movq	8(%rbx), %rax
	movl	(%rax), %r14d
	movl	$1, %eax
	jmp	LBB0_4
LBB0_2:
	movl	8(%rsi), %eax
	addl	$-128, %eax
	movl	$-1, %r15d
	cmpl	$4, %eax
	ja	LBB0_6
## %bb.3:
	cltq
	leaq	l_switch.table.aq_nic_set_link_ksettings(%rip), %rcx
	movq	(%rcx,%rax,8), %rax
	movl	(%rax), %r14d
	movq	8(%rbx), %rcx
	xorl	%eax, %eax
	testl	%r14d, (%rcx)
	je	LBB0_6
LBB0_4:
	movl	%eax, (%rbx)
	leaq	16(%rbx), %r12
	movq	%r12, %rdi
	callq	_mutex_lock
	movq	24(%rbx), %rax
	movl	20(%rbx), %edi
	movl	%r14d, %esi
	callq	*(%rax)
	movl	%eax, %r15d
	movq	%r12, %rdi
	callq	_mutex_unlock
	testl	%r15d, %r15d
	js	LBB0_6
## %bb.5:
	movl	%r14d, 4(%rbx)
LBB0_6:
	movl	%r15d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_AUTONEG_ENABLE,8,3             ## @AUTONEG_ENABLE
	.comm	_AQ_NIC_RATE_100M,4,2           ## @AQ_NIC_RATE_100M
	.comm	_AQ_NIC_RATE_1G,4,2             ## @AQ_NIC_RATE_1G
	.comm	_AQ_NIC_RATE_2GS,4,2            ## @AQ_NIC_RATE_2GS
	.comm	_AQ_NIC_RATE_5G,4,2             ## @AQ_NIC_RATE_5G
	.comm	_AQ_NIC_RATE_10G,4,2            ## @AQ_NIC_RATE_10G
	.section	__DATA,__const
	.p2align	3                               ## @switch.table.aq_nic_set_link_ksettings
l_switch.table.aq_nic_set_link_ksettings:
	.quad	_AQ_NIC_RATE_5G
	.quad	_AQ_NIC_RATE_2GS
	.quad	_AQ_NIC_RATE_10G
	.quad	_AQ_NIC_RATE_1G
	.quad	_AQ_NIC_RATE_100M

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_aq_nic_set_link_ksettings      ; -- Begin function aq_nic_set_link_ksettings
	.p2align	2
_aq_nic_set_link_ksettings:             ; @aq_nic_set_link_ksettings
	.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	x19, x0
	ldr	x8, [x1]
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:
	ldr	x8, [x19, #8]
	ldr	w20, [x8]
	mov	w8, #1
	b	LBB0_5
LBB0_2:
	ldr	w8, [x1, #8]
	sub	w8, w8, #128
	cmp	w8, #4
	b.hi	LBB0_7
; %bb.3:
Lloh3:
	adrp	x9, l_switch.table.aq_nic_set_link_ksettings@PAGE
Lloh4:
	add	x9, x9, l_switch.table.aq_nic_set_link_ksettings@PAGEOFF
	ldr	x8, [x9, w8, sxtw #3]
	ldr	w20, [x8]
	ldr	x8, [x19, #8]
	ldr	w8, [x8]
	tst	w8, w20
	b.eq	LBB0_7
; %bb.4:
	mov	w8, #0
LBB0_5:
	str	w8, [x19]
	add	x22, x19, #16
	mov	x0, x22
	bl	_mutex_lock
	ldr	x8, [x19, #24]
	ldr	x8, [x8]
	ldr	w0, [x19, #20]
	mov	x1, x20
	blr	x8
	mov	x21, x0
	mov	x0, x22
	bl	_mutex_unlock
	tbnz	w21, #31, LBB0_8
; %bb.6:
	str	w20, [x19, #4]
	b	LBB0_8
LBB0_7:
	mov	w21, #-1
LBB0_8:
	mov	x0, x21
	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 AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_AUTONEG_ENABLE,8,3             ; @AUTONEG_ENABLE
	.comm	_AQ_NIC_RATE_100M,4,2           ; @AQ_NIC_RATE_100M
	.comm	_AQ_NIC_RATE_1G,4,2             ; @AQ_NIC_RATE_1G
	.comm	_AQ_NIC_RATE_2GS,4,2            ; @AQ_NIC_RATE_2GS
	.comm	_AQ_NIC_RATE_5G,4,2             ; @AQ_NIC_RATE_5G
	.comm	_AQ_NIC_RATE_10G,4,2            ; @AQ_NIC_RATE_10G
	.section	__DATA,__const
	.p2align	3                               ; @switch.table.aq_nic_set_link_ksettings
l_switch.table.aq_nic_set_link_ksettings:
	.quad	_AQ_NIC_RATE_5G
	.quad	_AQ_NIC_RATE_2GS
	.quad	_AQ_NIC_RATE_10G
	.quad	_AQ_NIC_RATE_1G
	.quad	_AQ_NIC_RATE_100M

.subsections_via_symbols
