	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function netdev_set_pauseparam
_netdev_set_pauseparam:                 ## @netdev_set_pauseparam
	.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, %rbx
	callq	_netdev_priv
	movq	%rax, %r15
	movq	16(%rax), %r12
	leaq	8(%r12), %r14
	movq	%r12, %rdi
	callq	_mutex_lock
	cmpq	$0, 8(%rbx)
	je	LBB0_8
## %bb.1:
	cmpl	$0, (%rbx)
	jne	LBB0_4
## %bb.2:
	cmpl	$0, 4(%rbx)
	je	LBB0_3
LBB0_4:
	movq	_PHY_FLOW_CTRL@GOTPCREL(%rip), %rax
LBB0_5:
	movl	(%rax), %eax
	movl	%eax, 8(%r15)
	movq	_PAUSE_FLOW_CTRL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	notl	%eax
	andl	%eax, 16(%r12)
	movq	$0, (%r15)
	cmpq	$0, 8(%r12)
	je	LBB0_7
## %bb.6:
	movq	_KS8842_SWITCH_CTRL_1_OFFSET@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	movq	_SWITCH_RX_FLOW_CTRL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	movl	$1, %ecx
	callq	_sw_cfg
	movl	(%rbx), %esi
	movq	_SWITCH_TX_FLOW_CTRL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	movl	$1, %ecx
	callq	_sw_cfg
LBB0_7:
	movq	%r15, %rdi
	callq	_port_set_link_speed
	jmp	LBB0_11
LBB0_8:
	movq	_PAUSE_FLOW_CTRL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, 16(%r12)
	cmpq	$0, 8(%r12)
	je	LBB0_10
## %bb.9:
	movq	_KS8842_SWITCH_CTRL_1_OFFSET@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	movq	_SWITCH_RX_FLOW_CTRL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	(%rbx), %ecx
	movq	%r14, %rdi
	callq	_sw_cfg
	movl	(%r15), %esi
	movq	_SWITCH_TX_FLOW_CTRL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	4(%rbx), %ecx
	movq	%r14, %rdi
	callq	_sw_cfg
	jmp	LBB0_11
LBB0_10:
	movl	(%rbx), %esi
	movl	4(%rbx), %edx
	movq	%r14, %rdi
	callq	_set_flow_ctrl
LBB0_11:
	movq	%r12, %rdi
	callq	_mutex_unlock
	xorl	%eax, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	movq	_PHY_NO_FLOW_CTRL@GOTPCREL(%rip), %rax
	jmp	LBB0_5
	.cfi_endproc
                                        ## -- End function
	.comm	_PHY_NO_FLOW_CTRL,4,2           ## @PHY_NO_FLOW_CTRL
	.comm	_PHY_FLOW_CTRL,4,2              ## @PHY_FLOW_CTRL
	.comm	_PAUSE_FLOW_CTRL,4,2            ## @PAUSE_FLOW_CTRL
	.comm	_KS8842_SWITCH_CTRL_1_OFFSET,4,2 ## @KS8842_SWITCH_CTRL_1_OFFSET
	.comm	_SWITCH_RX_FLOW_CTRL,4,2        ## @SWITCH_RX_FLOW_CTRL
	.comm	_SWITCH_TX_FLOW_CTRL,4,2        ## @SWITCH_TX_FLOW_CTRL
	.no_dead_strip	_netdev_set_pauseparam
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function netdev_set_pauseparam
_netdev_set_pauseparam:                 ; @netdev_set_pauseparam
	.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	x22, x1
	bl	_netdev_priv
	mov	x21, x0
	ldr	x19, [x0, #16]
	add	x20, x19, #8
	mov	x0, x19
	bl	_mutex_lock
	ldr	x8, [x22, #8]
	cbz	x8, LBB0_7
; %bb.1:
	ldr	w8, [x22]
	cbnz	w8, LBB0_3
; %bb.2:
	ldr	w8, [x22, #4]
	cbz	w8, LBB0_11
LBB0_3:
Lloh0:
	adrp	x8, _PHY_FLOW_CTRL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PHY_FLOW_CTRL@GOTPAGEOFF]
LBB0_4:
	ldr	w8, [x8]
	str	w8, [x21, #8]
Lloh2:
	adrp	x8, _PAUSE_FLOW_CTRL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _PAUSE_FLOW_CTRL@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	ldr	w9, [x19, #16]
	bic	w8, w9, w8
	str	w8, [x19, #16]
	str	xzr, [x21]
	ldr	x8, [x19, #8]
	cbz	x8, LBB0_6
; %bb.5:
Lloh5:
	adrp	x22, _KS8842_SWITCH_CTRL_1_OFFSET@GOTPAGE
Lloh6:
	ldr	x22, [x22, _KS8842_SWITCH_CTRL_1_OFFSET@GOTPAGEOFF]
	ldr	w1, [x22]
Lloh7:
	adrp	x8, _SWITCH_RX_FLOW_CTRL@GOTPAGE
Lloh8:
	ldr	x8, [x8, _SWITCH_RX_FLOW_CTRL@GOTPAGEOFF]
Lloh9:
	ldr	w2, [x8]
	mov	x0, x20
	mov	w3, #1
	bl	_sw_cfg
	ldr	w1, [x22]
Lloh10:
	adrp	x8, _SWITCH_TX_FLOW_CTRL@GOTPAGE
Lloh11:
	ldr	x8, [x8, _SWITCH_TX_FLOW_CTRL@GOTPAGEOFF]
Lloh12:
	ldr	w2, [x8]
	mov	x0, x20
	mov	w3, #1
	bl	_sw_cfg
LBB0_6:
	mov	x0, x21
	bl	_port_set_link_speed
	b	LBB0_10
LBB0_7:
Lloh13:
	adrp	x8, _PAUSE_FLOW_CTRL@GOTPAGE
Lloh14:
	ldr	x8, [x8, _PAUSE_FLOW_CTRL@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	ldr	w9, [x19, #16]
	orr	w8, w9, w8
	str	w8, [x19, #16]
	ldr	x8, [x19, #8]
	cbz	x8, LBB0_9
; %bb.8:
Lloh16:
	adrp	x21, _KS8842_SWITCH_CTRL_1_OFFSET@GOTPAGE
Lloh17:
	ldr	x21, [x21, _KS8842_SWITCH_CTRL_1_OFFSET@GOTPAGEOFF]
	ldr	w1, [x21]
Lloh18:
	adrp	x8, _SWITCH_RX_FLOW_CTRL@GOTPAGE
Lloh19:
	ldr	x8, [x8, _SWITCH_RX_FLOW_CTRL@GOTPAGEOFF]
Lloh20:
	ldr	w2, [x8]
	ldr	w3, [x22]
	mov	x0, x20
	bl	_sw_cfg
	ldr	w1, [x21]
Lloh21:
	adrp	x8, _SWITCH_TX_FLOW_CTRL@GOTPAGE
Lloh22:
	ldr	x8, [x8, _SWITCH_TX_FLOW_CTRL@GOTPAGEOFF]
Lloh23:
	ldr	w2, [x8]
	ldr	w3, [x22, #4]
	mov	x0, x20
	bl	_sw_cfg
	b	LBB0_10
LBB0_9:
	ldp	w1, w2, [x22]
	mov	x0, x20
	bl	_set_flow_ctrl
LBB0_10:
	mov	x0, x19
	bl	_mutex_unlock
	mov	w0, #0
	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
LBB0_11:
Lloh24:
	adrp	x8, _PHY_NO_FLOW_CTRL@GOTPAGE
Lloh25:
	ldr	x8, [x8, _PHY_NO_FLOW_CTRL@GOTPAGEOFF]
	b	LBB0_4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh24, Lloh25
	.cfi_endproc
                                        ; -- End function
	.comm	_PHY_NO_FLOW_CTRL,4,2           ; @PHY_NO_FLOW_CTRL
	.comm	_PHY_FLOW_CTRL,4,2              ; @PHY_FLOW_CTRL
	.comm	_PAUSE_FLOW_CTRL,4,2            ; @PAUSE_FLOW_CTRL
	.comm	_KS8842_SWITCH_CTRL_1_OFFSET,4,2 ; @KS8842_SWITCH_CTRL_1_OFFSET
	.comm	_SWITCH_RX_FLOW_CTRL,4,2        ; @SWITCH_RX_FLOW_CTRL
	.comm	_SWITCH_TX_FLOW_CTRL,4,2        ; @SWITCH_TX_FLOW_CTRL
	.no_dead_strip	_netdev_set_pauseparam
.subsections_via_symbols
