	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function nfp_abm_red_replace
_nfp_abm_red_replace:                   ## @nfp_abm_red_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_RED@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	16(%r15), %r8d
	movl	20(%r15), %ecx
	leaq	-32(%rbp), %rax
	movq	%rax, (%rsp)
	movl	$1, %r9d
	callq	_nfp_abm_qdisc_replace
	movl	%eax, %ebx
	testl	%eax, %eax
	js	LBB0_11
## %bb.1:
	cmpq	$0, 8(%r15)
	je	LBB0_5
## %bb.2:
	movq	-32(%rbp), %rdi
	xorl	%esi, %esi
	callq	_nfp_abm_qdisc_child_valid
	movq	-32(%rbp), %rcx
	movq	32(%rcx), %rcx
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	movq	(%rcx), %rax
	decl	(%rax)
LBB0_4:
	movq	$0, (%rcx)
	jmp	LBB0_7
LBB0_5:
	testl	%ebx, %ebx
	jne	LBB0_7
## %bb.6:
	movq	_NFP_QDISC_UNTRACKED@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	-32(%rbp), %rcx
	movq	32(%rcx), %rcx
	movq	%rax, (%rcx)
LBB0_7:
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_nfp_abm_red_check_params
	movq	-32(%rbp), %rcx
	movq	%rax, 24(%rcx)
	testq	%rax, %rax
	je	LBB0_9
## %bb.8:
	movl	$1, 8(%rcx)
	movl	4(%r15), %eax
	movq	16(%rcx), %rdx
	movl	%eax, 4(%rdx)
	movl	(%r15), %eax
	movl	%eax, (%rdx)
LBB0_9:
	xorl	%ebx, %ebx
	cmpl	$1, (%rcx)
	jne	LBB0_11
## %bb.10:
	movq	%r14, %rdi
	callq	_nfp_abm_qdisc_offload_update
LBB0_11:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_NFP_QDISC_RED,4,2              ## @NFP_QDISC_RED
	.comm	_NFP_QDISC_UNTRACKED,8,3        ## @NFP_QDISC_UNTRACKED
	.no_dead_strip	_nfp_abm_red_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_red_replace
_nfp_abm_red_replace:                   ; @nfp_abm_red_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_RED@GOTPAGE
Lloh1:
	ldr	x8, [x8, _NFP_QDISC_RED@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
	ldp	w4, w3, [x20, #16]
	add	x6, sp, #8
	mov	w5, #1
	bl	_nfp_abm_qdisc_replace
	tbnz	w0, #31, LBB0_12
; %bb.1:
	ldr	x8, [x20, #8]
	cbz	x8, LBB0_5
; %bb.2:
	ldr	x0, [sp, #8]
	mov	w1, #0
	bl	_nfp_abm_qdisc_child_valid
	ldr	x8, [sp, #8]
	ldr	x8, [x8, #32]
	cbz	x0, LBB0_4
; %bb.3:
	ldr	x9, [x8]
	ldr	w10, [x9]
	sub	w10, w10, #1
	str	w10, [x9]
LBB0_4:
	str	xzr, [x8]
	b	LBB0_7
LBB0_5:
	cbnz	w0, LBB0_7
; %bb.6:
Lloh3:
	adrp	x8, _NFP_QDISC_UNTRACKED@GOTPAGE
Lloh4:
	ldr	x8, [x8, _NFP_QDISC_UNTRACKED@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	ldr	x9, [sp, #8]
	ldr	x9, [x9, #32]
	str	x8, [x9]
LBB0_7:
	mov	x0, x19
	mov	x1, x20
	bl	_nfp_abm_red_check_params
	ldr	x8, [sp, #8]
	str	x0, [x8, #24]
	cbz	x0, LBB0_9
; %bb.8:
	mov	w9, #1
	str	w9, [x8, #8]
	ldr	x9, [x8, #16]
	ldr	d0, [x20]
	str	d0, [x9]
LBB0_9:
	ldr	w8, [x8]
	cmp	w8, #1
	b.ne	LBB0_11
; %bb.10:
	mov	x0, x19
	bl	_nfp_abm_qdisc_offload_update
LBB0_11:
	mov	w0, #0
LBB0_12:
	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
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_NFP_QDISC_RED,4,2              ; @NFP_QDISC_RED
	.comm	_NFP_QDISC_UNTRACKED,8,3        ; @NFP_QDISC_UNTRACKED
	.no_dead_strip	_nfp_abm_red_replace
.subsections_via_symbols
