	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function niu_get_ethtool_tcam_entry
_niu_get_ethtool_tcam_entry:            ## @niu_get_ethtool_tcam_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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %rbx
	movq	%rdi, %r15
	movq	8(%rdi), %r14
	movq	16(%rsi), %rsi
	callq	_tcam_get_index
	movq	8(%r14), %rcx
	movq	%rax, %r12
	shlq	$4, %r12
	cmpl	$0, 12(%rcx,%r12)
	je	LBB0_1
## %bb.2:
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	leaq	8(%rbx), %r13
	movq	%rcx, -48(%rbp)                 ## 8-byte Spill
	leaq	(%rcx,%r12), %rax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	movq	(%rax), %rax
	movq	_TCAM_V4KEY0_CLASS_CODE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	andl	(%rax), %edi
	movq	_TCAM_V4KEY0_CLASS_CODE_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	sarl	%cl, %edi
	movq	%r13, %rsi
	callq	_niu_class_to_ethflow
	movl	%eax, %ebx
	testl	%eax, %eax
	js	LBB0_3
## %bb.4:
	movl	(%r13), %eax
	leal	-137(%rax), %ecx
	cmpl	$1, %ecx
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	ja	LBB0_10
## %bb.5:
	movq	(%rdi), %rcx
	movslq	8(%rcx), %rdx
	movq	_TCAM_V4KEY2_PROTO@GOTPCREL(%rip), %rcx
	andq	(%rcx), %rdx
	movq	_TCAM_V4KEY2_PROTO_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	sarq	%cl, %rdx
	movq	_IPPROTO_ESP@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rdx
	jne	LBB0_10
## %bb.6:
	cmpl	$138, %eax
	jne	LBB0_9
## %bb.7:
	movl	$136, (%r13)
	jmp	LBB0_8
LBB0_1:
	movl	(%r15), %edi
	movl	(%r14), %edx
	movq	16(%rbx), %rcx
	leaq	L_.str(%rip), %rsi
	xorl	%ebx, %ebx
	movq	%rax, %r8
	xorl	%eax, %eax
	callq	_netdev_info
	movq	_EINVAL@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
	jmp	LBB0_17
LBB0_10:
	addl	$-129, %eax
	cmpl	$9, %eax
	ja	LBB0_12
## %bb.11:
	movl	$693, %ecx                      ## imm = 0x2B5
	btl	%eax, %ecx
	jae	LBB0_12
LBB0_8:
	movq	%r13, %rsi
	callq	_niu_get_ip4fs_from_tcam_key
LBB0_13:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movl	8(%rax,%r12), %eax
	movq	_TCAM_ASSOCDATA_DISC@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_15
## %bb.14:
	movl	%ebx, %r14d
	movq	_RX_CLS_FLOW_DISC@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	jmp	LBB0_16
LBB0_3:
	movl	(%r15), %edi
	movl	(%r14), %edx
	leaq	L_.str.1(%rip), %rsi
	xorl	%eax, %eax
	callq	_netdev_info
	jmp	LBB0_17
LBB0_15:
	movl	%ebx, %r14d
	movq	_TCAM_ASSOCDATA_OFFSET@GOTPCREL(%rip), %rcx
	andl	(%rcx), %eax
	movq	_TCAM_ASSOCDATA_OFFSET_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	sarl	%cl, %eax
LBB0_16:
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	movl	%eax, 12(%rbx)
	movq	%r15, %rdi
	callq	_tcam_get_size
	movl	%eax, (%rbx)
	movl	%r14d, %ebx
LBB0_17:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_9:
	movl	$135, (%r13)
LBB0_12:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, %ebx
	negl	%ebx
	testl	%eax, %eax
	jg	LBB0_17
	jmp	LBB0_13
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"niu%d: entry [%d] invalid for idx[%d]\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_TCAM_V4KEY0_CLASS_CODE,4,2     ## @TCAM_V4KEY0_CLASS_CODE
	.comm	_TCAM_V4KEY0_CLASS_CODE_SHIFT,4,2 ## @TCAM_V4KEY0_CLASS_CODE_SHIFT
L_.str.1:                               ## @.str.1
	.asciz	"niu%d: niu_class_to_ethflow failed\n"

	.comm	_TCAM_V4KEY2_PROTO,8,3          ## @TCAM_V4KEY2_PROTO
	.comm	_TCAM_V4KEY2_PROTO_SHIFT,8,3    ## @TCAM_V4KEY2_PROTO_SHIFT
	.comm	_IPPROTO_ESP,8,3                ## @IPPROTO_ESP
	.comm	_TCAM_ASSOCDATA_DISC,4,2        ## @TCAM_ASSOCDATA_DISC
	.comm	_RX_CLS_FLOW_DISC,4,2           ## @RX_CLS_FLOW_DISC
	.comm	_TCAM_ASSOCDATA_OFFSET,4,2      ## @TCAM_ASSOCDATA_OFFSET
	.comm	_TCAM_ASSOCDATA_OFFSET_SHIFT,4,2 ## @TCAM_ASSOCDATA_OFFSET_SHIFT
	.no_dead_strip	_niu_get_ethtool_tcam_entry
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function niu_get_ethtool_tcam_entry
_niu_get_ethtool_tcam_entry:            ; @niu_get_ethtool_tcam_entry
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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	x19, x1
	mov	x20, x0
	ldr	x26, [x0, #8]
	ldr	x1, [x1, #16]
	bl	_tcam_get_index
	mov	x22, x0
	ldr	x25, [x26, #8]
	add	x23, x25, x0, lsl #4
	ldr	w8, [x23, #12]
	cbz	w8, LBB0_6
; %bb.1:
	add	x24, x19, #8
	ldr	x8, [x23]
	ldr	w8, [x8]
Lloh0:
	adrp	x9, _TCAM_V4KEY0_CLASS_CODE@GOTPAGE
Lloh1:
	ldr	x9, [x9, _TCAM_V4KEY0_CLASS_CODE@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	and	w8, w9, w8
Lloh3:
	adrp	x9, _TCAM_V4KEY0_CLASS_CODE_SHIFT@GOTPAGE
Lloh4:
	ldr	x9, [x9, _TCAM_V4KEY0_CLASS_CODE_SHIFT@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	asr	w0, w8, w9
	mov	x1, x24
	bl	_niu_class_to_ethflow
	mov	x21, x0
	tbnz	w0, #31, LBB0_11
; %bb.2:
	ldr	w8, [x24]
	sub	w9, w8, #137
	cmp	w9, #1
	b.hi	LBB0_7
; %bb.3:
	ldr	x9, [x23]
	ldrsw	x9, [x9, #8]
Lloh6:
	adrp	x10, _TCAM_V4KEY2_PROTO@GOTPAGE
Lloh7:
	ldr	x10, [x10, _TCAM_V4KEY2_PROTO@GOTPAGEOFF]
Lloh8:
	ldr	x10, [x10]
	and	x9, x10, x9
Lloh9:
	adrp	x10, _TCAM_V4KEY2_PROTO_SHIFT@GOTPAGE
Lloh10:
	ldr	x10, [x10, _TCAM_V4KEY2_PROTO_SHIFT@GOTPAGEOFF]
Lloh11:
	ldr	x10, [x10]
	asr	x9, x9, x10
Lloh12:
	adrp	x10, _IPPROTO_ESP@GOTPAGE
Lloh13:
	ldr	x10, [x10, _IPPROTO_ESP@GOTPAGEOFF]
Lloh14:
	ldr	x10, [x10]
	cmp	x9, x10
	b.ne	LBB0_7
; %bb.4:
	cmp	w8, #138
	b.ne	LBB0_15
; %bb.5:
	mov	w8, #136
	str	w8, [x24]
	b	LBB0_8
LBB0_6:
	ldr	w0, [x20]
	ldr	w2, [x26]
	ldr	x8, [x19, #16]
	stp	x8, x22, [sp]
Lloh15:
	adrp	x1, l_.str@PAGE
Lloh16:
	add	x1, x1, l_.str@PAGEOFF
	bl	_netdev_info
Lloh17:
	adrp	x8, _EINVAL@GOTPAGE
Lloh18:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_14
LBB0_7:
	sub	w8, w8, #129
	cmp	w8, #9
	mov	w9, #1
	lsl	w8, w9, w8
	mov	w9, #693
	and	w8, w8, w9
	ccmp	w8, #0, #4, ls
	b.eq	LBB0_16
LBB0_8:
	mov	x0, x23
	mov	x1, x24
	bl	_niu_get_ip4fs_from_tcam_key
LBB0_9:
	add	x8, x25, x22, lsl #4
	ldr	w8, [x8, #8]
Lloh20:
	adrp	x9, _TCAM_ASSOCDATA_DISC@GOTPAGE
Lloh21:
	ldr	x9, [x9, _TCAM_ASSOCDATA_DISC@GOTPAGEOFF]
Lloh22:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_12
; %bb.10:
Lloh23:
	adrp	x8, _RX_CLS_FLOW_DISC@GOTPAGE
Lloh24:
	ldr	x8, [x8, _RX_CLS_FLOW_DISC@GOTPAGEOFF]
Lloh25:
	ldr	w8, [x8]
	b	LBB0_13
LBB0_11:
	ldr	w0, [x20]
	ldr	w2, [x26]
Lloh26:
	adrp	x1, l_.str.1@PAGE
Lloh27:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_netdev_info
	b	LBB0_14
LBB0_12:
Lloh28:
	adrp	x9, _TCAM_ASSOCDATA_OFFSET@GOTPAGE
Lloh29:
	ldr	x9, [x9, _TCAM_ASSOCDATA_OFFSET@GOTPAGEOFF]
Lloh30:
	ldr	w9, [x9]
	and	w8, w9, w8
Lloh31:
	adrp	x9, _TCAM_ASSOCDATA_OFFSET_SHIFT@GOTPAGE
Lloh32:
	ldr	x9, [x9, _TCAM_ASSOCDATA_OFFSET_SHIFT@GOTPAGEOFF]
Lloh33:
	ldr	w9, [x9]
	asr	w8, w8, w9
LBB0_13:
	str	w8, [x19, #12]
	mov	x0, x20
	bl	_tcam_get_size
	str	w0, [x19]
LBB0_14:
	mov	x0, x21
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
LBB0_15:
	mov	w8, #135
	str	w8, [x24]
LBB0_16:
Lloh34:
	adrp	x8, _EINVAL@GOTPAGE
Lloh35:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh36:
	ldr	w8, [x8]
	neg	w21, w8
	cmp	w8, #0
	b.gt	LBB0_14
	b	LBB0_9
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"niu%d: entry [%d] invalid for idx[%d]\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_TCAM_V4KEY0_CLASS_CODE,4,2     ; @TCAM_V4KEY0_CLASS_CODE
	.comm	_TCAM_V4KEY0_CLASS_CODE_SHIFT,4,2 ; @TCAM_V4KEY0_CLASS_CODE_SHIFT
l_.str.1:                               ; @.str.1
	.asciz	"niu%d: niu_class_to_ethflow failed\n"

	.comm	_TCAM_V4KEY2_PROTO,8,3          ; @TCAM_V4KEY2_PROTO
	.comm	_TCAM_V4KEY2_PROTO_SHIFT,8,3    ; @TCAM_V4KEY2_PROTO_SHIFT
	.comm	_IPPROTO_ESP,8,3                ; @IPPROTO_ESP
	.comm	_TCAM_ASSOCDATA_DISC,4,2        ; @TCAM_ASSOCDATA_DISC
	.comm	_RX_CLS_FLOW_DISC,4,2           ; @RX_CLS_FLOW_DISC
	.comm	_TCAM_ASSOCDATA_OFFSET,4,2      ; @TCAM_ASSOCDATA_OFFSET
	.comm	_TCAM_ASSOCDATA_OFFSET_SHIFT,4,2 ; @TCAM_ASSOCDATA_OFFSET_SHIFT
	.no_dead_strip	_niu_get_ethtool_tcam_entry
.subsections_via_symbols
