	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_sja1105et_fdb_add              ## -- Begin function sja1105et_fdb_add
	.p2align	4, 0x90
_sja1105et_fdb_add:                     ## @sja1105et_fdb_add
	.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
	subq	$72, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%ecx, %r13d
	movq	%rdx, %r12
	movl	%esi, %r15d
	xorps	%xmm0, %xmm0
	movaps	%xmm0, -80(%rbp)
	movl	$0, -64(%rbp)
	movq	(%rdi), %rax
	movq	%rax, -104(%rbp)                ## 8-byte Spill
	movq	8(%rdi), %rbx
	movl	$-1, -52(%rbp)
	movq	%rbx, %rdi
	movq	%rdx, %rsi
	movl	%ecx, %edx
	callq	_sja1105et_fdb_hash
	leaq	-80(%rbp), %r8
	leaq	-52(%rbp), %r9
	movq	%rbx, -88(%rbp)                 ## 8-byte Spill
	movq	%rbx, %rdi
	movl	%eax, %ebx
	movl	%eax, %esi
	movq	%r12, %rdx
	movl	%r13d, %ecx
	callq	_sja1105et_is_fdb_entry_in_bin
	movl	%eax, %r14d
	movl	%eax, -44(%rbp)
	testl	%eax, %eax
	js	LBB0_3
## %bb.1:
	movl	%ebx, %r12d
	movl	-80(%rbp), %ebx
	movl	%r15d, %edi
	callq	_BIT
	movl	%eax, %ecx
	xorl	%eax, %eax
	testl	%ebx, %ecx
	jne	LBB0_8
## %bb.2:
	movl	%r15d, %edi
	callq	_BIT
	orl	%eax, -80(%rbp)
	movl	%r12d, %edi
	movq	-88(%rbp), %rbx                 ## 8-byte Reload
	jmp	LBB0_6
LBB0_3:
	movl	%ebx, %edi
	movl	%r14d, %esi
	callq	_sja1105et_fdb_index
	movq	%rax, -96(%rbp)                 ## 8-byte Spill
	movq	%r12, %rdi
	callq	_ether_addr_to_u64
	movl	%eax, -68(%rbp)
	movl	%r15d, -48(%rbp)                ## 4-byte Spill
	movl	%r15d, %edi
	callq	_BIT
	movl	%eax, -80(%rbp)
	movl	%r13d, -72(%rbp)
	movl	-52(%rbp), %r14d
	testl	%r14d, %r14d
	js	LBB0_5
## %bb.4:
	movl	%r14d, -44(%rbp)
	movl	-48(%rbp), %r15d                ## 4-byte Reload
	movl	%ebx, %edi
	movq	-88(%rbp), %rbx                 ## 8-byte Reload
	jmp	LBB0_6
LBB0_5:
	leaq	-44(%rbp), %rdi
	movl	$4, %esi
	callq	_get_random_bytes
	movq	_SJA1105ET_FDB_BIN_SIZE@GOTPCREL(%rip), %rcx
	movl	-44(%rbp), %eax
	cltd
	idivl	(%rcx)
	movl	%edx, %r8d
	movl	%edx, -44(%rbp)
	leaq	L_.str(%rip), %rsi
	movq	-104(%rbp), %rdi                ## 8-byte Reload
	movl	%ebx, %edx
	movq	%r12, %rcx
	callq	_dev_warn
	movq	_BLK_IDX_L2_LOOKUP@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%ebx, %r12d
	movq	-88(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdi
	movq	-96(%rbp), %rdx                 ## 8-byte Reload
                                        ## kill: def $edx killed $edx killed $rdx
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	callq	_sja1105_dynamic_config_write
	movl	-44(%rbp), %r14d
	movl	-48(%rbp), %r15d                ## 4-byte Reload
	movl	%r12d, %edi
LBB0_6:
	movl	%r14d, %esi
	callq	_sja1105et_fdb_index
	movl	%eax, -76(%rbp)
	movq	_BLK_IDX_L2_LOOKUP@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	leaq	-80(%rbp), %rcx
	movq	%rbx, %rdi
	movl	%eax, %edx
	movl	$1, %r8d
	callq	_sja1105_dynamic_config_write
	testl	%eax, %eax
	js	LBB0_8
## %bb.7:
	leaq	-80(%rbp), %rdx
	movq	%rbx, %rdi
	movl	%r15d, %esi
	movl	$1, %ecx
	callq	_sja1105_static_fdb_change
LBB0_8:
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SJA1105ET_FDB_BIN_SIZE,4,2     ## @SJA1105ET_FDB_BIN_SIZE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Warning, FDB bin %d full while adding entry for %pM. Evicting entry %u.\n"

	.comm	_BLK_IDX_L2_LOOKUP,4,2          ## @BLK_IDX_L2_LOOKUP
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_sja1105et_fdb_add              ; -- Begin function sja1105et_fdb_add
	.p2align	2
_sja1105et_fdb_add:                     ; @sja1105et_fdb_add
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x24, x3
	mov	x22, x2
	mov	x19, x1
	stp	xzr, xzr, [sp, #8]
	str	wzr, [sp, #24]
	ldp	x23, x20, [x0]
	mov	w8, #-1
	str	w8, [sp, #4]
	mov	x0, x20
	mov	x1, x2
	mov	x2, x3
	bl	_sja1105et_fdb_hash
	mov	x21, x0
	add	x4, sp, #8
	add	x5, sp, #4
	mov	x0, x20
	mov	x1, x21
	mov	x2, x22
	mov	x3, x24
	bl	_sja1105et_is_fdb_entry_in_bin
	mov	x26, x0
	str	w0, [sp]
	tbnz	w0, #31, LBB0_3
; %bb.1:
	ldr	w22, [sp, #8]
	mov	x0, x19
	bl	_BIT
	tst	w0, w22
	b.eq	LBB0_5
; %bb.2:
	mov	w0, #0
	b	LBB0_9
LBB0_3:
	mov	x0, x21
	mov	x1, x26
	bl	_sja1105et_fdb_index
	mov	x25, x0
	mov	x0, x22
	bl	_ether_addr_to_u64
	str	w0, [sp, #20]
	mov	x0, x19
	bl	_BIT
	str	w0, [sp, #8]
	str	w24, [sp, #16]
	ldr	w26, [sp, #4]
	tbnz	w26, #31, LBB0_6
; %bb.4:
	str	w26, [sp]
	b	LBB0_7
LBB0_5:
	mov	x0, x19
	bl	_BIT
	ldr	w8, [sp, #8]
	orr	w8, w8, w0
	str	w8, [sp, #8]
	b	LBB0_7
LBB0_6:
	mov	x0, sp
	mov	w1, #4
	bl	_get_random_bytes
Lloh0:
	adrp	x8, _SJA1105ET_FDB_BIN_SIZE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SJA1105ET_FDB_BIN_SIZE@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	ldr	w9, [sp]
	sdiv	w10, w9, w8
	msub	w4, w10, w8, w9
	str	w4, [sp]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x23
	mov	x2, x21
	mov	x3, x22
	bl	_dev_warn
Lloh5:
	adrp	x8, _BLK_IDX_L2_LOOKUP@GOTPAGE
Lloh6:
	ldr	x8, [x8, _BLK_IDX_L2_LOOKUP@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	mov	x0, x20
	mov	x2, x25
	mov	x3, #0
	mov	w4, #0
	bl	_sja1105_dynamic_config_write
	ldr	w26, [sp]
LBB0_7:
	mov	x0, x21
	mov	x1, x26
	bl	_sja1105et_fdb_index
	mov	x2, x0
	str	w2, [sp, #12]
Lloh8:
	adrp	x8, _BLK_IDX_L2_LOOKUP@GOTPAGE
Lloh9:
	ldr	x8, [x8, _BLK_IDX_L2_LOOKUP@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	add	x3, sp, #8
	mov	x0, x20
                                        ; kill: def $w2 killed $w2 killed $x2
	mov	w4, #1
	bl	_sja1105_dynamic_config_write
	tbnz	w0, #31, LBB0_9
; %bb.8:
	add	x2, sp, #8
	mov	x0, x20
	mov	x1, x19
	mov	w3, #1
	bl	_sja1105_static_fdb_change
LBB0_9:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_SJA1105ET_FDB_BIN_SIZE,4,2     ; @SJA1105ET_FDB_BIN_SIZE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Warning, FDB bin %d full while adding entry for %pM. Evicting entry %u.\n"

	.comm	_BLK_IDX_L2_LOOKUP,4,2          ; @BLK_IDX_L2_LOOKUP
.subsections_via_symbols
