	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sh_eth_tsu_add_entry
_sh_eth_tsu_add_entry:                  ## @sh_eth_tsu_add_entry
	.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
	movq	%rsi, %r13
	movq	%rdi, %r15
	callq	_netdev_priv
	movq	%rax, %rbx
	movq	_TSU_ADRH0@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_sh_eth_tsu_get_offset
	movq	%rax, %r14
	movq	(%rbx), %rcx
	xorl	%eax, %eax
	cmpl	$0, (%rcx)
	je	LBB0_7
## %bb.1:
	movq	%r15, %rdi
	movq	%r13, %rsi
	callq	_sh_eth_tsu_find_entry
	movl	%eax, %r12d
	testl	%eax, %eax
	js	LBB0_2
LBB0_6:
	movq	%r15, %rdi
	movl	%r12d, %esi
	callq	_sh_eth_tsu_enable_cam_entry_post
	xorl	%eax, %eax
LBB0_7:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_2:
	movq	%r15, %rdi
	callq	_sh_eth_tsu_find_empty
	testl	%eax, %eax
	js	LBB0_3
## %bb.4:
	movl	%eax, %r12d
	leal	(,%r12,8), %eax
	cltq
	addq	%rax, %r14
	movq	%r15, %rdi
	movq	%r14, %rsi
	movq	%r13, %rdx
	callq	_sh_eth_tsu_write_entry
	testl	%eax, %eax
	js	LBB0_7
## %bb.5:
	movq	_TSU_TEN@GOTPCREL(%rip), %r14
	movl	(%r14), %esi
	movq	%rbx, %rdi
	callq	_sh_eth_tsu_read
	movl	$-2147483648, %esi              ## imm = 0x80000000
	movl	%r12d, %ecx
	shrl	%cl, %esi
	orl	%eax, %esi
	movl	(%r14), %edx
	movq	%rbx, %rdi
	callq	_sh_eth_tsu_write
	jmp	LBB0_6
LBB0_3:
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_7
	.cfi_endproc
                                        ## -- End function
	.comm	_TSU_ADRH0,4,2                  ## @TSU_ADRH0
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_TSU_TEN,4,2                    ## @TSU_TEN
	.no_dead_strip	_sh_eth_tsu_add_entry
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sh_eth_tsu_add_entry
_sh_eth_tsu_add_entry:                  ; @sh_eth_tsu_add_entry
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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	x22, x1
	mov	x19, x0
	bl	_netdev_priv
	mov	x20, x0
Lloh0:
	adrp	x8, _TSU_ADRH0@GOTPAGE
Lloh1:
	ldr	x8, [x8, _TSU_ADRH0@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	_sh_eth_tsu_get_offset
	ldr	x8, [x20]
	ldr	w8, [x8]
	cbz	w8, LBB0_3
; %bb.1:
	mov	x23, x0
	mov	x0, x19
	mov	x1, x22
	bl	_sh_eth_tsu_find_entry
	mov	x21, x0
	tbnz	w0, #31, LBB0_5
LBB0_2:
	mov	x0, x19
	mov	x1, x21
	bl	_sh_eth_tsu_enable_cam_entry_post
LBB0_3:
	mov	w0, #0
LBB0_4:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_5:
	mov	x0, x19
	bl	_sh_eth_tsu_find_empty
	tbnz	w0, #31, LBB0_8
; %bb.6:
	mov	x21, x0
	lsl	w8, w0, #3
	add	x1, x23, w8, sxtw
	mov	x0, x19
	mov	x2, x22
	bl	_sh_eth_tsu_write_entry
	tbnz	w0, #31, LBB0_4
; %bb.7:
Lloh3:
	adrp	x22, _TSU_TEN@GOTPAGE
Lloh4:
	ldr	x22, [x22, _TSU_TEN@GOTPAGEOFF]
	ldr	w1, [x22]
	mov	x0, x20
	bl	_sh_eth_tsu_read
	mov	w8, #-2147483648
	lsr	w8, w8, w21
	orr	w1, w0, w8
	ldr	w2, [x22]
	mov	x0, x20
	bl	_sh_eth_tsu_write
	b	LBB0_2
LBB0_8:
Lloh5:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_TSU_ADRH0,4,2                  ; @TSU_ADRH0
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_TSU_TEN,4,2                    ; @TSU_TEN
	.no_dead_strip	_sh_eth_tsu_add_entry
.subsections_via_symbols
