	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sw_set_global_ctrl
_sw_set_global_ctrl:                    ## @sw_set_global_ctrl
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %rbx
	movq	_KS8842_SWITCH_CTRL_3_OFFSET@GOTPCREL(%rip), %r14
	movq	(%r14), %rdi
	addq	8(%rbx), %rdi
	callq	_readw
	movq	_SWITCH_FLOW_CTRL@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movq	(%r14), %rsi
	addq	8(%rbx), %rsi
	movl	%eax, %edi
	callq	_writew
	movq	_KS8842_SWITCH_CTRL_1_OFFSET@GOTPCREL(%rip), %r14
	movq	(%r14), %rdi
	addq	8(%rbx), %rdi
	callq	_readw
	movq	_SWITCH_AGGR_BACKOFF@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movq	_SWITCH_AGING_ENABLE@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movq	_SWITCH_LINK_AUTO_AGING@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movq	_FAST_AGING@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	andl	(%rbx), %ecx
	movq	_SWITCH_FAST_AGING@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edi
	movl	%edi, %edx
	orl	%eax, %edx
	notl	%edi
	andl	%eax, %edi
	testl	%ecx, %ecx
	cmovnel	%edx, %edi
	movq	(%r14), %rsi
	addq	8(%rbx), %rsi
	callq	_writew
	movq	_KS8842_SWITCH_CTRL_2_OFFSET@GOTPCREL(%rip), %r14
	movq	(%r14), %rdi
	addq	8(%rbx), %rdi
	callq	_readw
	movq	_NO_EXC_COLLISION_DROP@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movq	(%r14), %rsi
	addq	8(%rbx), %rsi
	movl	%eax, %edi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_writew                         ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_KS8842_SWITCH_CTRL_3_OFFSET,8,3 ## @KS8842_SWITCH_CTRL_3_OFFSET
	.comm	_SWITCH_FLOW_CTRL,4,2           ## @SWITCH_FLOW_CTRL
	.comm	_KS8842_SWITCH_CTRL_1_OFFSET,8,3 ## @KS8842_SWITCH_CTRL_1_OFFSET
	.comm	_SWITCH_AGGR_BACKOFF,4,2        ## @SWITCH_AGGR_BACKOFF
	.comm	_SWITCH_AGING_ENABLE,4,2        ## @SWITCH_AGING_ENABLE
	.comm	_SWITCH_LINK_AUTO_AGING,4,2     ## @SWITCH_LINK_AUTO_AGING
	.comm	_FAST_AGING,4,2                 ## @FAST_AGING
	.comm	_SWITCH_FAST_AGING,4,2          ## @SWITCH_FAST_AGING
	.comm	_KS8842_SWITCH_CTRL_2_OFFSET,8,3 ## @KS8842_SWITCH_CTRL_2_OFFSET
	.comm	_NO_EXC_COLLISION_DROP,4,2      ## @NO_EXC_COLLISION_DROP
	.no_dead_strip	_sw_set_global_ctrl
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sw_set_global_ctrl
_sw_set_global_ctrl:                    ; @sw_set_global_ctrl
	.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, x0
	ldr	x8, [x0, #8]
Lloh0:
	adrp	x20, _KS8842_SWITCH_CTRL_3_OFFSET@GOTPAGE
Lloh1:
	ldr	x20, [x20, _KS8842_SWITCH_CTRL_3_OFFSET@GOTPAGEOFF]
	ldr	x9, [x20]
	add	x0, x9, x8
	bl	_readw
Lloh2:
	adrp	x8, _SWITCH_FLOW_CTRL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _SWITCH_FLOW_CTRL@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	orr	w0, w8, w0
	ldr	x8, [x19, #8]
	ldr	x9, [x20]
	add	x1, x9, x8
	bl	_writew
	ldr	x8, [x19, #8]
Lloh5:
	adrp	x20, _KS8842_SWITCH_CTRL_1_OFFSET@GOTPAGE
Lloh6:
	ldr	x20, [x20, _KS8842_SWITCH_CTRL_1_OFFSET@GOTPAGEOFF]
	ldr	x9, [x20]
	add	x0, x9, x8
	bl	_readw
Lloh7:
	adrp	x8, _SWITCH_AGGR_BACKOFF@GOTPAGE
Lloh8:
	ldr	x8, [x8, _SWITCH_AGGR_BACKOFF@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	orr	w8, w8, w0
Lloh10:
	adrp	x9, _SWITCH_AGING_ENABLE@GOTPAGE
Lloh11:
	ldr	x9, [x9, _SWITCH_AGING_ENABLE@GOTPAGEOFF]
Lloh12:
	ldr	w9, [x9]
	orr	w8, w8, w9
Lloh13:
	adrp	x9, _SWITCH_LINK_AUTO_AGING@GOTPAGE
Lloh14:
	ldr	x9, [x9, _SWITCH_LINK_AUTO_AGING@GOTPAGEOFF]
Lloh15:
	ldr	w9, [x9]
	orr	w8, w8, w9
Lloh16:
	adrp	x9, _FAST_AGING@GOTPAGE
Lloh17:
	ldr	x9, [x9, _FAST_AGING@GOTPAGEOFF]
	ldr	w10, [x19]
Lloh18:
	ldr	w9, [x9]
Lloh19:
	adrp	x11, _SWITCH_FAST_AGING@GOTPAGE
Lloh20:
	ldr	x11, [x11, _SWITCH_FAST_AGING@GOTPAGEOFF]
Lloh21:
	ldr	w11, [x11]
	orr	w12, w11, w8
	bic	w8, w8, w11
	tst	w9, w10
	csel	w0, w8, w12, eq
	ldr	x8, [x19, #8]
	ldr	x9, [x20]
	add	x1, x9, x8
	bl	_writew
	ldr	x8, [x19, #8]
Lloh22:
	adrp	x20, _KS8842_SWITCH_CTRL_2_OFFSET@GOTPAGE
Lloh23:
	ldr	x20, [x20, _KS8842_SWITCH_CTRL_2_OFFSET@GOTPAGEOFF]
	ldr	x9, [x20]
	add	x0, x9, x8
	bl	_readw
Lloh24:
	adrp	x8, _NO_EXC_COLLISION_DROP@GOTPAGE
Lloh25:
	ldr	x8, [x8, _NO_EXC_COLLISION_DROP@GOTPAGEOFF]
Lloh26:
	ldr	w8, [x8]
	orr	w0, w8, w0
	ldr	x8, [x19, #8]
	ldr	x9, [x20]
	add	x1, x9, x8
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_writew
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_KS8842_SWITCH_CTRL_3_OFFSET,8,3 ; @KS8842_SWITCH_CTRL_3_OFFSET
	.comm	_SWITCH_FLOW_CTRL,4,2           ; @SWITCH_FLOW_CTRL
	.comm	_KS8842_SWITCH_CTRL_1_OFFSET,8,3 ; @KS8842_SWITCH_CTRL_1_OFFSET
	.comm	_SWITCH_AGGR_BACKOFF,4,2        ; @SWITCH_AGGR_BACKOFF
	.comm	_SWITCH_AGING_ENABLE,4,2        ; @SWITCH_AGING_ENABLE
	.comm	_SWITCH_LINK_AUTO_AGING,4,2     ; @SWITCH_LINK_AUTO_AGING
	.comm	_FAST_AGING,4,2                 ; @FAST_AGING
	.comm	_SWITCH_FAST_AGING,4,2          ; @SWITCH_FAST_AGING
	.comm	_KS8842_SWITCH_CTRL_2_OFFSET,8,3 ; @KS8842_SWITCH_CTRL_2_OFFSET
	.comm	_NO_EXC_COLLISION_DROP,4,2      ; @NO_EXC_COLLISION_DROP
	.no_dead_strip	_sw_set_global_ctrl
.subsections_via_symbols
