	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ksz8795_set_prio_queue
_ksz8795_set_prio_queue:                ## @ksz8795_set_prio_queue
	.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
	movl	%esi, %ebx
	movq	%rdi, %r14
	addl	$-2, %edx
	cmpl	$2, %edx
	ja	LBB0_1
## %bb.2:
	movslq	%edx, %rax
	leaq	l_switch.table.ksz8795_set_prio_queue(%rip), %rcx
	movq	(%rcx,%rax,8), %rax
	jmp	LBB0_3
LBB0_1:
	movq	_PORT_QUEUE_SPLIT_1@GOTPCREL(%rip), %rax
LBB0_3:
	movl	(%rax), %r15d
	movq	_REG_PORT_CTRL_0@GOTPCREL(%rip), %r12
	movl	(%r12), %edx
	leaq	-48(%rbp), %rcx
	movq	%r14, %rdi
	movl	%ebx, %esi
	callq	_ksz_pread8
	movq	_P_DROP_TAG_CTRL@GOTPCREL(%rip), %r13
	movl	(%r13), %edx
	leaq	-44(%rbp), %rcx
	movq	%r14, %rdi
	movl	%ebx, %esi
	callq	_ksz_pread8
	movq	_PORT_QUEUE_SPLIT_L@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, %ecx
	notl	%ecx
	movl	-48(%rbp), %edx
	andl	%edx, %ecx
	movl	%ecx, -48(%rbp)
	movq	_PORT_QUEUE_SPLIT_2@GOTPCREL(%rip), %rsi
	testl	%r15d, (%rsi)
	je	LBB0_5
## %bb.4:
	orl	%eax, %edx
	movl	%edx, -48(%rbp)
	movl	%edx, %ecx
LBB0_5:
	movq	_PORT_QUEUE_SPLIT_H@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, %esi
	notl	%esi
	movl	-44(%rbp), %edx
	andl	%edx, %esi
	movl	%esi, -44(%rbp)
	movq	_PORT_QUEUE_SPLIT_4@GOTPCREL(%rip), %rsi
	testl	%r15d, (%rsi)
	je	LBB0_7
## %bb.6:
	orl	%eax, %edx
	movl	%edx, -44(%rbp)
LBB0_7:
	movl	(%r12), %edx
	movq	%r14, %rdi
	movl	%ebx, %esi
	callq	_ksz_pwrite8
	movl	(%r13), %edx
	movl	-44(%rbp), %ecx
	movq	%r14, %rdi
	movl	%ebx, %esi
	callq	_ksz_pwrite8
	movq	_PORT_QUEUE_SPLIT_1@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r15d
	je	LBB0_9
## %bb.8:
	movq	_REG_SW_CTRL_19@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_SW_OUT_RATE_LIMIT_QUEUE_BASED@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	movl	$1, %ecx
	callq	_ksz_cfg
LBB0_9:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PORT_QUEUE_SPLIT_4,4,2         ## @PORT_QUEUE_SPLIT_4
	.comm	_PORT_QUEUE_SPLIT_2,4,2         ## @PORT_QUEUE_SPLIT_2
	.comm	_PORT_QUEUE_SPLIT_1,4,2         ## @PORT_QUEUE_SPLIT_1
	.comm	_REG_PORT_CTRL_0,4,2            ## @REG_PORT_CTRL_0
	.comm	_P_DROP_TAG_CTRL,4,2            ## @P_DROP_TAG_CTRL
	.comm	_PORT_QUEUE_SPLIT_L,4,2         ## @PORT_QUEUE_SPLIT_L
	.comm	_PORT_QUEUE_SPLIT_H,4,2         ## @PORT_QUEUE_SPLIT_H
	.comm	_REG_SW_CTRL_19,4,2             ## @REG_SW_CTRL_19
	.comm	_SW_OUT_RATE_LIMIT_QUEUE_BASED,4,2 ## @SW_OUT_RATE_LIMIT_QUEUE_BASED
	.no_dead_strip	_ksz8795_set_prio_queue
	.section	__DATA,__const
	.p2align	3                               ## @switch.table.ksz8795_set_prio_queue
l_switch.table.ksz8795_set_prio_queue:
	.quad	_PORT_QUEUE_SPLIT_2
	.quad	_PORT_QUEUE_SPLIT_4
	.quad	_PORT_QUEUE_SPLIT_4

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ksz8795_set_prio_queue
_ksz8795_set_prio_queue:                ; @ksz8795_set_prio_queue
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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	x20, x1
	mov	x19, x0
	sub	w8, w2, #2
Lloh0:
	adrp	x21, _PORT_QUEUE_SPLIT_1@GOTPAGE
Lloh1:
	ldr	x21, [x21, _PORT_QUEUE_SPLIT_1@GOTPAGEOFF]
	mov	x9, x21
	cmp	w8, #2
	b.hi	LBB0_2
; %bb.1:
Lloh2:
	adrp	x9, l_switch.table.ksz8795_set_prio_queue@PAGE
Lloh3:
	add	x9, x9, l_switch.table.ksz8795_set_prio_queue@PAGEOFF
	ldr	x9, [x9, w8, sxtw #3]
LBB0_2:
	ldr	w22, [x9]
Lloh4:
	adrp	x23, _REG_PORT_CTRL_0@GOTPAGE
Lloh5:
	ldr	x23, [x23, _REG_PORT_CTRL_0@GOTPAGEOFF]
	ldr	w2, [x23]
	add	x3, sp, #8
	mov	x0, x19
	mov	x1, x20
	bl	_ksz_pread8
Lloh6:
	adrp	x24, _P_DROP_TAG_CTRL@GOTPAGE
Lloh7:
	ldr	x24, [x24, _P_DROP_TAG_CTRL@GOTPAGEOFF]
	ldr	w2, [x24]
	add	x3, sp, #12
	mov	x0, x19
	mov	x1, x20
	bl	_ksz_pread8
Lloh8:
	adrp	x8, _PORT_QUEUE_SPLIT_L@GOTPAGE
Lloh9:
	ldr	x8, [x8, _PORT_QUEUE_SPLIT_L@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	ldr	w9, [sp, #8]
	bic	w3, w9, w8
	str	w3, [sp, #8]
Lloh11:
	adrp	x10, _PORT_QUEUE_SPLIT_2@GOTPAGE
Lloh12:
	ldr	x10, [x10, _PORT_QUEUE_SPLIT_2@GOTPAGEOFF]
Lloh13:
	ldr	w10, [x10]
	tst	w10, w22
	b.eq	LBB0_4
; %bb.3:
	orr	w3, w9, w8
	str	w3, [sp, #8]
LBB0_4:
Lloh14:
	adrp	x8, _PORT_QUEUE_SPLIT_H@GOTPAGE
Lloh15:
	ldr	x8, [x8, _PORT_QUEUE_SPLIT_H@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	ldr	w9, [sp, #12]
	bic	w10, w9, w8
	str	w10, [sp, #12]
Lloh17:
	adrp	x10, _PORT_QUEUE_SPLIT_4@GOTPAGE
Lloh18:
	ldr	x10, [x10, _PORT_QUEUE_SPLIT_4@GOTPAGEOFF]
Lloh19:
	ldr	w10, [x10]
	tst	w10, w22
	b.eq	LBB0_6
; %bb.5:
	orr	w8, w9, w8
	str	w8, [sp, #12]
LBB0_6:
	ldr	w2, [x23]
	mov	x0, x19
	mov	x1, x20
	bl	_ksz_pwrite8
	ldr	w2, [x24]
	ldr	w3, [sp, #12]
	mov	x0, x19
	mov	x1, x20
	bl	_ksz_pwrite8
	ldr	w8, [x21]
	cmp	w22, w8
	b.eq	LBB0_8
; %bb.7:
Lloh20:
	adrp	x8, _REG_SW_CTRL_19@GOTPAGE
Lloh21:
	ldr	x8, [x8, _REG_SW_CTRL_19@GOTPAGEOFF]
Lloh22:
	ldr	w1, [x8]
Lloh23:
	adrp	x8, _SW_OUT_RATE_LIMIT_QUEUE_BASED@GOTPAGE
Lloh24:
	ldr	x8, [x8, _SW_OUT_RATE_LIMIT_QUEUE_BASED@GOTPAGEOFF]
Lloh25:
	ldr	w2, [x8]
	mov	x0, x19
	mov	w3, #1
	bl	_ksz_cfg
LBB0_8:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.comm	_PORT_QUEUE_SPLIT_4,4,2         ; @PORT_QUEUE_SPLIT_4
	.comm	_PORT_QUEUE_SPLIT_2,4,2         ; @PORT_QUEUE_SPLIT_2
	.comm	_PORT_QUEUE_SPLIT_1,4,2         ; @PORT_QUEUE_SPLIT_1
	.comm	_REG_PORT_CTRL_0,4,2            ; @REG_PORT_CTRL_0
	.comm	_P_DROP_TAG_CTRL,4,2            ; @P_DROP_TAG_CTRL
	.comm	_PORT_QUEUE_SPLIT_L,4,2         ; @PORT_QUEUE_SPLIT_L
	.comm	_PORT_QUEUE_SPLIT_H,4,2         ; @PORT_QUEUE_SPLIT_H
	.comm	_REG_SW_CTRL_19,4,2             ; @REG_SW_CTRL_19
	.comm	_SW_OUT_RATE_LIMIT_QUEUE_BASED,4,2 ; @SW_OUT_RATE_LIMIT_QUEUE_BASED
	.no_dead_strip	_ksz8795_set_prio_queue
	.section	__DATA,__const
	.p2align	3                               ; @switch.table.ksz8795_set_prio_queue
l_switch.table.ksz8795_set_prio_queue:
	.quad	_PORT_QUEUE_SPLIT_2
	.quad	_PORT_QUEUE_SPLIT_4
	.quad	_PORT_QUEUE_SPLIT_4

.subsections_via_symbols
