	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function qca8k_fdb_access
_qca8k_fdb_access:                      ## @qca8k_fdb_access
	.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
	movl	%edx, %eax
	movl	%esi, %r14d
	movq	%rdi, %r15
	movq	_QCA8K_ATU_FUNC_BUSY@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edx
	orl	%esi, %edx
	testl	%eax, %eax
	js	LBB0_2
## %bb.1:
	movq	_QCA8K_ATU_FUNC_PORT_EN@GOTPCREL(%rip), %rcx
	orl	(%rcx), %edx
	movq	_QCA8K_ATU_FUNC_PORT_M@GOTPCREL(%rip), %rcx
	andl	(%rcx), %eax
	movq	_QCA8K_ATU_FUNC_PORT_S@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shll	%cl, %eax
	orl	%eax, %edx
LBB0_2:
	movq	_QCA8K_REG_ATU_FUNC@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	movq	%r15, %rdi
	callq	_qca8k_write
	movl	(%r12), %esi
	movl	(%rbx), %edx
	movq	%r15, %rdi
	callq	_qca8k_busy_wait
	movl	$-1, %ebx
	testq	%rax, %rax
	jne	LBB0_6
## %bb.3:
	movq	_QCA8K_FDB_LOAD@GOTPCREL(%rip), %rax
	cmpl	%r14d, (%rax)
	jne	LBB0_5
## %bb.4:
	movl	(%r12), %esi
	movq	%r15, %rdi
	callq	_qca8k_read
	movq	_QCA8K_ATU_FUNC_FULL@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	jne	LBB0_6
LBB0_5:
	xorl	%ebx, %ebx
LBB0_6:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_QCA8K_ATU_FUNC_BUSY,4,2        ## @QCA8K_ATU_FUNC_BUSY
	.comm	_QCA8K_ATU_FUNC_PORT_EN,4,2     ## @QCA8K_ATU_FUNC_PORT_EN
	.comm	_QCA8K_ATU_FUNC_PORT_M,4,2      ## @QCA8K_ATU_FUNC_PORT_M
	.comm	_QCA8K_ATU_FUNC_PORT_S,4,2      ## @QCA8K_ATU_FUNC_PORT_S
	.comm	_QCA8K_REG_ATU_FUNC,4,2         ## @QCA8K_REG_ATU_FUNC
	.comm	_QCA8K_FDB_LOAD,4,2             ## @QCA8K_FDB_LOAD
	.comm	_QCA8K_ATU_FUNC_FULL,4,2        ## @QCA8K_ATU_FUNC_FULL
	.no_dead_strip	_qca8k_fdb_access
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function qca8k_fdb_access
_qca8k_fdb_access:                      ; @qca8k_fdb_access
	.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	x8, x2
	mov	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x21, _QCA8K_ATU_FUNC_BUSY@GOTPAGE
Lloh1:
	ldr	x21, [x21, _QCA8K_ATU_FUNC_BUSY@GOTPAGEOFF]
	ldr	w9, [x21]
	orr	w2, w9, w1
	tbnz	w8, #31, LBB0_2
; %bb.1:
Lloh2:
	adrp	x9, _QCA8K_ATU_FUNC_PORT_EN@GOTPAGE
Lloh3:
	ldr	x9, [x9, _QCA8K_ATU_FUNC_PORT_EN@GOTPAGEOFF]
Lloh4:
	ldr	w9, [x9]
	orr	w9, w9, w2
Lloh5:
	adrp	x10, _QCA8K_ATU_FUNC_PORT_M@GOTPAGE
Lloh6:
	ldr	x10, [x10, _QCA8K_ATU_FUNC_PORT_M@GOTPAGEOFF]
Lloh7:
	ldr	w10, [x10]
	and	w8, w10, w8
Lloh8:
	adrp	x10, _QCA8K_ATU_FUNC_PORT_S@GOTPAGE
Lloh9:
	ldr	x10, [x10, _QCA8K_ATU_FUNC_PORT_S@GOTPAGEOFF]
Lloh10:
	ldr	w10, [x10]
	lsl	w8, w8, w10
	orr	w2, w9, w8
LBB0_2:
Lloh11:
	adrp	x22, _QCA8K_REG_ATU_FUNC@GOTPAGE
Lloh12:
	ldr	x22, [x22, _QCA8K_REG_ATU_FUNC@GOTPAGEOFF]
	ldr	w1, [x22]
	mov	x0, x19
	bl	_qca8k_write
	ldr	w1, [x22]
	ldr	w2, [x21]
	mov	x0, x19
	bl	_qca8k_busy_wait
	cbz	x0, LBB0_4
LBB0_3:
	mov	w0, #-1
	b	LBB0_7
LBB0_4:
Lloh13:
	adrp	x8, _QCA8K_FDB_LOAD@GOTPAGE
Lloh14:
	ldr	x8, [x8, _QCA8K_FDB_LOAD@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	cmp	w8, w20
	b.ne	LBB0_6
; %bb.5:
	ldr	w1, [x22]
	mov	x0, x19
	bl	_qca8k_read
Lloh16:
	adrp	x8, _QCA8K_ATU_FUNC_FULL@GOTPAGE
Lloh17:
	ldr	x8, [x8, _QCA8K_ATU_FUNC_FULL@GOTPAGEOFF]
Lloh18:
	ldr	w8, [x8]
	tst	w8, w0
	b.ne	LBB0_3
LBB0_6:
	mov	w0, #0
LBB0_7:
	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 AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_QCA8K_ATU_FUNC_BUSY,4,2        ; @QCA8K_ATU_FUNC_BUSY
	.comm	_QCA8K_ATU_FUNC_PORT_EN,4,2     ; @QCA8K_ATU_FUNC_PORT_EN
	.comm	_QCA8K_ATU_FUNC_PORT_M,4,2      ; @QCA8K_ATU_FUNC_PORT_M
	.comm	_QCA8K_ATU_FUNC_PORT_S,4,2      ; @QCA8K_ATU_FUNC_PORT_S
	.comm	_QCA8K_REG_ATU_FUNC,4,2         ; @QCA8K_REG_ATU_FUNC
	.comm	_QCA8K_FDB_LOAD,4,2             ; @QCA8K_FDB_LOAD
	.comm	_QCA8K_ATU_FUNC_FULL,4,2        ; @QCA8K_ATU_FUNC_FULL
	.no_dead_strip	_qca8k_fdb_access
.subsections_via_symbols
