	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function nfp_abm_gred_replace
_nfp_abm_gred_replace:                  ## @nfp_abm_gred_replace
	.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	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r15
	movq	%rsi, %r14
	movq	_NFP_QDISC_GRED@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	16(%r15), %r8d
	movl	20(%r15), %ecx
	leaq	-32(%rbp), %rax
	movq	%rax, (%rsp)
	xorl	%r9d, %r9d
	callq	_nfp_abm_qdisc_replace
	testl	%eax, %eax
	js	LBB0_1
## %bb.2:
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_nfp_abm_gred_check_params
	movq	-32(%rbp), %r8
	movq	%rax, 24(%r8)
	testq	%rax, %rax
	je	LBB0_14
## %bb.3:
	movl	(%r15), %r9d
	movl	%r9d, 8(%r8)
	testq	%r9, %r9
	je	LBB0_14
## %bb.4:
	movq	8(%r15), %rdx
	movq	16(%r8), %rsi
	cmpl	$4, %r9d
	jae	LBB0_6
## %bb.5:
	xorl	%edi, %edi
	jmp	LBB0_13
LBB0_1:
	movl	%eax, %ebx
	jmp	LBB0_16
LBB0_6:
	movl	%r9d, %edi
	andl	$-4, %edi
	leaq	-4(%rdi), %rcx
	movq	%rcx, %rbx
	shrq	$2, %rbx
	incq	%rbx
	movl	%ebx, %eax
	andl	$3, %eax
	cmpq	$12, %rcx
	jae	LBB0_8
## %bb.7:
	xorl	%ecx, %ecx
	jmp	LBB0_10
LBB0_8:
	andq	$-4, %rbx
	xorl	%ecx, %ecx
	.p2align	4, 0x90
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	movups	(%rdx,%rcx,8), %xmm0
	movups	16(%rdx,%rcx,8), %xmm1
	movups	%xmm0, (%rsi,%rcx,8)
	movups	%xmm1, 16(%rsi,%rcx,8)
	movups	32(%rdx,%rcx,8), %xmm0
	movups	48(%rdx,%rcx,8), %xmm1
	movups	%xmm0, 32(%rsi,%rcx,8)
	movups	%xmm1, 48(%rsi,%rcx,8)
	movups	64(%rdx,%rcx,8), %xmm0
	movups	80(%rdx,%rcx,8), %xmm1
	movups	%xmm0, 64(%rsi,%rcx,8)
	movups	%xmm1, 80(%rsi,%rcx,8)
	movups	96(%rdx,%rcx,8), %xmm0
	movups	112(%rdx,%rcx,8), %xmm1
	movups	%xmm0, 96(%rsi,%rcx,8)
	movups	%xmm1, 112(%rsi,%rcx,8)
	addq	$16, %rcx
	addq	$-4, %rbx
	jne	LBB0_9
LBB0_10:
	testq	%rax, %rax
	je	LBB0_12
	.p2align	4, 0x90
LBB0_11:                                ## =>This Inner Loop Header: Depth=1
	leaq	(,%rcx,8), %rbx
	orq	$16, %rbx
	movups	(%rdx,%rcx,8), %xmm0
	movups	(%rdx,%rbx), %xmm1
	movups	%xmm0, (%rsi,%rcx,8)
	movups	%xmm1, (%rsi,%rbx)
	addq	$4, %rcx
	decq	%rax
	jne	LBB0_11
LBB0_12:
	cmpq	%r9, %rdi
	je	LBB0_14
	.p2align	4, 0x90
LBB0_13:                                ## =>This Inner Loop Header: Depth=1
	movl	4(%rdx,%rdi,8), %eax
	movl	%eax, 4(%rsi,%rdi,8)
	movl	(%rdx,%rdi,8), %eax
	movl	%eax, (%rsi,%rdi,8)
	incq	%rdi
	cmpq	%rdi, %r9
	jne	LBB0_13
LBB0_14:
	xorl	%ebx, %ebx
	cmpq	$0, (%r8)
	je	LBB0_16
## %bb.15:
	movq	%r14, %rdi
	callq	_nfp_abm_qdisc_offload_update
LBB0_16:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_NFP_QDISC_GRED,4,2             ## @NFP_QDISC_GRED
	.no_dead_strip	_nfp_abm_gred_replace
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function nfp_abm_gred_replace
_nfp_abm_gred_replace:                  ; @nfp_abm_gred_replace
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.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
	mov	x20, x2
	mov	x19, x1
Lloh0:
	adrp	x8, _NFP_QDISC_GRED@GOTPAGE
Lloh1:
	ldr	x8, [x8, _NFP_QDISC_GRED@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
	ldp	w4, w3, [x20, #16]
	add	x6, sp, #8
	mov	w5, #0
	bl	_nfp_abm_qdisc_replace
	tbnz	w0, #31, LBB0_13
; %bb.1:
	mov	x0, x19
	mov	x1, x20
	bl	_nfp_abm_gred_check_params
	ldr	x8, [sp, #8]
	str	x0, [x8, #24]
	cbz	x0, LBB0_10
; %bb.2:
	ldr	w9, [x20]
	str	w9, [x8, #8]
	cbz	w9, LBB0_10
; %bb.3:
	ldr	x11, [x20, #8]
	ldr	x10, [x8, #16]
	cmp	w9, #8
	b.hs	LBB0_5
; %bb.4:
	mov	x12, #0
	b	LBB0_8
LBB0_5:
	and	x12, x9, #0xfffffff8
	add	x13, x11, #32
	add	x14, x10, #32
	mov	x15, x12
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	ldp	q1, q0, [x13, #-32]
	ldp	q3, q2, [x13], #64
	stp	q1, q0, [x14, #-32]
	stp	q3, q2, [x14], #64
	subs	x15, x15, #8
	b.ne	LBB0_6
; %bb.7:
	cmp	x12, x9
	b.eq	LBB0_10
LBB0_8:
	lsl	x13, x12, #3
	add	x11, x11, x13
	add	x10, x10, x13
	sub	x9, x9, x12
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	ldr	d0, [x11], #8
	str	d0, [x10], #8
	subs	x9, x9, #1
	b.ne	LBB0_9
LBB0_10:
	ldr	x8, [x8]
	cbz	x8, LBB0_12
; %bb.11:
	mov	x0, x19
	bl	_nfp_abm_qdisc_offload_update
LBB0_12:
	mov	w0, #0
LBB0_13:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_NFP_QDISC_GRED,4,2             ; @NFP_QDISC_GRED
	.no_dead_strip	_nfp_abm_gred_replace
.subsections_via_symbols
