	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function niu_get_tcamkey_from_ip4fs
_niu_get_tcamkey_from_ip4fs:            ## @niu_get_tcamkey_from_ip4fs
	.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
	movl	%ecx, %r14d
	movl	%edx, %r13d
	movq	%rsi, -64(%rbp)                 ## 8-byte Spill
	movq	%rdi, %r15
	movq	$0, -56(%rbp)
	movl	52(%rdi), %edi
	callq	_be32_to_cpu
	movl	%eax, %ebx
	movl	84(%r15), %edi
	callq	_be32_to_cpu
	movl	%eax, %r12d
	movl	48(%r15), %edi
	callq	_be32_to_cpu
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movl	80(%r15), %edi
	callq	_be32_to_cpu
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	movq	_TCAM_V4KEY0_CLASS_CODE_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shll	%cl, %r14d
	movq	(%rdi), %rsi
	movl	%r14d, (%rsi)
	movq	_TCAM_V4KEY0_CLASS_CODE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movq	8(%rdi), %rdx
	movl	%ecx, (%rdx)
	movq	_TCAM_V4KEY1_L2RDCNUM_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shll	%cl, %r13d
	movl	%r13d, 4(%rsi)
	movq	_TCAM_V4KEY1_L2RDCNUM@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, 4(%rdx)
	movq	_TCAM_V4KEY3_SADDR_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shll	%cl, %ebx
	orl	-44(%rbp), %ebx                 ## 4-byte Folded Reload
	movl	%ebx, 12(%rsi)
	shll	%cl, %r12d
	orl	%eax, %r12d
	movl	%r12d, 12(%rdx)
	movl	40(%r15), %eax
	movq	_TCAM_V4KEY2_TOS_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shll	%cl, %eax
	orl	%eax, 8(%rsi)
	movl	72(%r15), %eax
	shll	%cl, %eax
	orl	%eax, 8(%rdx)
	movl	(%r15), %eax
	leal	-128(%rax), %ecx
	cmpl	$3, %ecx
	jb	LBB0_4
## %bb.1:
	movq	%rdi, %r12
	leal	-132(%rax), %ecx
	cmpl	$2, %ecx
	jae	LBB0_2
## %bb.10:
	movl	24(%r15), %edi
	callq	_be32_to_cpu
	movl	%eax, %ebx
	movl	60(%r15), %edi
	callq	_be32_to_cpu
	movq	(%r12), %rcx
	orl	%ebx, 8(%rcx)
	movq	8(%r12), %rcx
	movl	8(%rcx), %r14d
	addq	$8, %rcx
	jmp	LBB0_5
LBB0_4:
	movq	%rdi, %r13
	movl	36(%r15), %edi
	callq	_be16_to_cpu
	movl	%eax, %ebx
	movl	68(%r15), %edi
	callq	_be16_to_cpu
	movl	%eax, %r14d
	movl	32(%r15), %edi
	callq	_be16_to_cpu
	movl	%eax, %r12d
	movl	64(%r15), %edi
	callq	_be16_to_cpu
	shll	$16, %ebx
	orl	%r12d, %ebx
	movq	(%r13), %rcx
	orl	%ebx, 8(%rcx)
	shll	$16, %r14d
	orl	%eax, %r14d
	movq	8(%r13), %rcx
	movl	8(%rcx), %eax
	addq	$8, %rcx
	movq	%r13, %r12
LBB0_5:
	orl	%r14d, %eax
	movl	%eax, (%rcx)
	movl	(%r15), %edi
	leaq	-56(%rbp), %rsi
	callq	_niu_ethflow_to_l3proto
LBB0_6:
	movq	(%r12), %rdx
	leaq	-56(%rbp), %rbx
LBB0_7:
	movq	(%rbx), %rax
	movq	_TCAM_V4KEY2_PROTO_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	movl	%eax, %esi
	shll	%cl, %esi
	orl	%esi, 8(%rdx)
	testq	%rax, %rax
	je	LBB0_9
## %bb.8:
	movq	_TCAM_V4KEY2_PROTO@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	8(%r12), %rcx
	orl	%eax, 8(%rcx)
LBB0_9:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_2:
	cmpl	$131, %eax
	jne	LBB0_6
## %bb.3:
	leaq	8(%r15), %rbx
	movl	16(%r15), %edi
	callq	_be32_to_cpu
	movl	%eax, %r14d
	movl	56(%r15), %edi
	callq	_be32_to_cpu
	movq	(%r12), %rdx
	orl	%r14d, 8(%rdx)
	movq	8(%r12), %rcx
	orl	%eax, 8(%rcx)
	jmp	LBB0_7
	.cfi_endproc
                                        ## -- End function
	.comm	_TCAM_V4KEY0_CLASS_CODE_SHIFT,4,2 ## @TCAM_V4KEY0_CLASS_CODE_SHIFT
	.comm	_TCAM_V4KEY0_CLASS_CODE,4,2     ## @TCAM_V4KEY0_CLASS_CODE
	.comm	_TCAM_V4KEY1_L2RDCNUM_SHIFT,4,2 ## @TCAM_V4KEY1_L2RDCNUM_SHIFT
	.comm	_TCAM_V4KEY1_L2RDCNUM,4,2       ## @TCAM_V4KEY1_L2RDCNUM
	.comm	_TCAM_V4KEY3_SADDR_SHIFT,4,2    ## @TCAM_V4KEY3_SADDR_SHIFT
	.comm	_TCAM_V4KEY2_TOS_SHIFT,4,2      ## @TCAM_V4KEY2_TOS_SHIFT
	.comm	_TCAM_V4KEY2_PROTO_SHIFT,4,2    ## @TCAM_V4KEY2_PROTO_SHIFT
	.comm	_TCAM_V4KEY2_PROTO,4,2          ## @TCAM_V4KEY2_PROTO
	.no_dead_strip	_niu_get_tcamkey_from_ip4fs
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function niu_get_tcamkey_from_ip4fs
_niu_get_tcamkey_from_ip4fs:            ; @niu_get_tcamkey_from_ip4fs
	.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	x21, x3
	mov	x22, x2
	mov	x19, x1
	mov	x20, x0
	str	xzr, [sp, #8]
	ldr	w0, [x0, #52]
	bl	_be32_to_cpu
	mov	x23, x0
	ldr	w0, [x20, #84]
	bl	_be32_to_cpu
	mov	x24, x0
	ldr	w0, [x20, #48]
	bl	_be32_to_cpu
	mov	x25, x0
	ldr	w0, [x20, #80]
	bl	_be32_to_cpu
Lloh0:
	adrp	x8, _TCAM_V4KEY0_CLASS_CODE_SHIFT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _TCAM_V4KEY0_CLASS_CODE_SHIFT@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	lsl	w8, w21, w8
	ldp	x9, x10, [x19]
	str	w8, [x9]
Lloh3:
	adrp	x8, _TCAM_V4KEY0_CLASS_CODE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _TCAM_V4KEY0_CLASS_CODE@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	str	w8, [x10]
Lloh6:
	adrp	x8, _TCAM_V4KEY1_L2RDCNUM_SHIFT@GOTPAGE
Lloh7:
	ldr	x8, [x8, _TCAM_V4KEY1_L2RDCNUM_SHIFT@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	lsl	w8, w22, w8
	str	w8, [x9, #4]
Lloh9:
	adrp	x8, _TCAM_V4KEY1_L2RDCNUM@GOTPAGE
Lloh10:
	ldr	x8, [x8, _TCAM_V4KEY1_L2RDCNUM@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
Lloh12:
	adrp	x11, _TCAM_V4KEY3_SADDR_SHIFT@GOTPAGE
Lloh13:
	ldr	x11, [x11, _TCAM_V4KEY3_SADDR_SHIFT@GOTPAGEOFF]
	str	w8, [x10, #4]
Lloh14:
	ldr	w8, [x11]
	lsl	w11, w23, w8
	orr	w11, w11, w25
	str	w11, [x9, #12]
	lsl	w8, w24, w8
	orr	w8, w8, w0
	str	w8, [x10, #12]
	ldr	w8, [x20, #40]
Lloh15:
	adrp	x11, _TCAM_V4KEY2_TOS_SHIFT@GOTPAGE
Lloh16:
	ldr	x11, [x11, _TCAM_V4KEY2_TOS_SHIFT@GOTPAGEOFF]
Lloh17:
	ldr	w11, [x11]
	lsl	w8, w8, w11
	ldr	w12, [x9, #8]
	orr	w8, w12, w8
	str	w8, [x9, #8]
	ldr	w8, [x20, #72]
	lsl	w8, w8, w11
	ldr	w9, [x10, #8]
	orr	w8, w8, w9
	str	w8, [x10, #8]
	ldr	w8, [x20]
	sub	w9, w8, #128
	cmp	w9, #3
	b.lo	LBB0_3
; %bb.1:
	sub	w9, w8, #132
	cmp	w9, #2
	b.hs	LBB0_9
; %bb.2:
	ldr	w0, [x20, #24]
	bl	_be32_to_cpu
	mov	x21, x0
	ldr	w0, [x20, #60]
	bl	_be32_to_cpu
	ldp	x9, x8, [x19]
	ldr	w10, [x9, #8]
	orr	w10, w10, w21
	str	w10, [x9, #8]
	ldr	w9, [x8, #8]!
	b	LBB0_4
LBB0_3:
	ldr	w0, [x20, #36]
	bl	_be16_to_cpu
	mov	x21, x0
	ldr	w0, [x20, #68]
	bl	_be16_to_cpu
	mov	x22, x0
	ldr	w0, [x20, #32]
	bl	_be16_to_cpu
	mov	x23, x0
	ldr	w0, [x20, #64]
	bl	_be16_to_cpu
	orr	w9, w23, w21, lsl #16
	ldp	x10, x8, [x19]
	ldr	w11, [x10, #8]
	orr	w9, w9, w11
	str	w9, [x10, #8]
	orr	w9, w0, w22, lsl #16
	ldr	w0, [x8, #8]!
LBB0_4:
	orr	w9, w9, w0
	str	w9, [x8]
	ldr	w0, [x20]
	add	x1, sp, #8
	bl	_niu_ethflow_to_l3proto
LBB0_5:
	ldr	x8, [x19]
	add	x22, sp, #8
LBB0_6:
Lloh18:
	adrp	x9, _TCAM_V4KEY2_PROTO_SHIFT@GOTPAGE
Lloh19:
	ldr	x9, [x9, _TCAM_V4KEY2_PROTO_SHIFT@GOTPAGEOFF]
	ldr	x10, [x22]
Lloh20:
	ldr	w9, [x9]
	lsl	w9, w10, w9
	ldr	w11, [x8, #8]
	orr	w9, w11, w9
	str	w9, [x8, #8]
	cbz	x10, LBB0_8
; %bb.7:
Lloh21:
	adrp	x8, _TCAM_V4KEY2_PROTO@GOTPAGE
Lloh22:
	ldr	x8, [x8, _TCAM_V4KEY2_PROTO@GOTPAGEOFF]
Lloh23:
	ldr	w8, [x8]
	ldr	x9, [x19, #8]
	ldr	w10, [x9, #8]
	orr	w8, w10, w8
	str	w8, [x9, #8]
LBB0_8:
	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_9:
	cmp	w8, #131
	b.ne	LBB0_5
; %bb.10:
	add	x22, x20, #8
	ldr	w0, [x20, #16]
	bl	_be32_to_cpu
	mov	x21, x0
	ldr	w0, [x20, #56]
	bl	_be32_to_cpu
	ldp	x8, x9, [x19]
	ldr	w10, [x8, #8]
	orr	w10, w10, w21
	str	w10, [x8, #8]
	ldr	w10, [x9, #8]
	orr	w10, w10, w0
	str	w10, [x9, #8]
	b	LBB0_6
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.comm	_TCAM_V4KEY0_CLASS_CODE_SHIFT,4,2 ; @TCAM_V4KEY0_CLASS_CODE_SHIFT
	.comm	_TCAM_V4KEY0_CLASS_CODE,4,2     ; @TCAM_V4KEY0_CLASS_CODE
	.comm	_TCAM_V4KEY1_L2RDCNUM_SHIFT,4,2 ; @TCAM_V4KEY1_L2RDCNUM_SHIFT
	.comm	_TCAM_V4KEY1_L2RDCNUM,4,2       ; @TCAM_V4KEY1_L2RDCNUM
	.comm	_TCAM_V4KEY3_SADDR_SHIFT,4,2    ; @TCAM_V4KEY3_SADDR_SHIFT
	.comm	_TCAM_V4KEY2_TOS_SHIFT,4,2      ; @TCAM_V4KEY2_TOS_SHIFT
	.comm	_TCAM_V4KEY2_PROTO_SHIFT,4,2    ; @TCAM_V4KEY2_PROTO_SHIFT
	.comm	_TCAM_V4KEY2_PROTO,4,2          ; @TCAM_V4KEY2_PROTO
	.no_dead_strip	_niu_get_tcamkey_from_ip4fs
.subsections_via_symbols
