	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function nfp_dump_csr_range
_nfp_dump_csr_range:                    ## @nfp_dump_csr_range
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r14
	movq	%rsi, %r12
	movq	%rdi, -72(%rbp)                 ## 8-byte Spill
	movq	(%rdx), %rbx
	movq	%rsi, %rdi
	callq	_nfp_csr_spec_valid
	testl	%eax, %eax
	je	LBB0_13
## %bb.1:
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	movl	12(%r12), %edi
	callq	_be32_to_cpu
	movq	_BITS_PER_BYTE@GOTPCREL(%rip), %rcx
	cltd
	idivl	(%rcx)
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movl	$32, %edi
	callq	_ALIGN8
	movl	%eax, %ebx
	movl	4(%r12), %edi
	callq	_be32_to_cpu
	movl	%eax, %edi
	callq	_ALIGN8
                                        ## kill: def $eax killed $eax def $rax
	leal	(%rax,%rbx), %r15d
	movq	(%r14), %r13
	movl	16(%r12), %edi
	callq	_be32_to_cpu
	movl	%eax, %edi
	movl	%r15d, %esi
	movq	%r14, %rdx
	callq	_nfp_add_tlv
	testl	%eax, %eax
	jne	LBB0_12
## %bb.2:
	movq	%rbx, %r14
	movl	8(%r12), %eax
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movl	%eax, 28(%rcx)
	movq	(%r12), %rax
	movq	%rax, 20(%rcx)
	movl	12(%r12), %eax
	movl	%eax, 16(%rcx)
	movq	%r12, %rdi
	callq	_nfp_get_numeric_cpp_id
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	movl	8(%r12), %edi
	callq	_be32_to_cpu
	movl	%eax, %ebx
	movl	4(%r12), %edi
	callq	_be32_to_cpu
	testl	%eax, %eax
	jle	LBB0_11
## %bb.3:
	movl	%eax, %r15d
	addl	%ebx, %r15d
	movslq	%r14d, %rax
	shlq	$5, %rax
	addq	%rax, %r13
	movslq	-44(%rbp), %r14                 ## 4-byte Folded Reload
	movq	%r14, -64(%rbp)                 ## 8-byte Spill
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_4 Depth=1
	movl	%ebx, %esi
	movq	%r13, %rdx
	callq	_nfp_xpb_readl
	testl	%eax, %eax
	je	LBB0_10
	jmp	LBB0_9
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r12, %rdi
	callq	_is_xpb_read
	movq	-72(%rbp), %rcx                 ## 8-byte Reload
	movl	(%rcx), %edi
	testq	%rax, %rax
	jne	LBB0_5
## %bb.6:                               ##   in Loop: Header=BB0_4 Depth=1
	movl	-48(%rbp), %esi                 ## 4-byte Reload
	movl	%ebx, %edx
	movq	%r13, %rcx
	movq	%r12, %r14
	movl	%r15d, %r12d
	movl	-44(%rbp), %r15d                ## 4-byte Reload
	movl	%r15d, %r8d
	callq	_nfp_cpp_read
	cmpl	%r15d, %eax
	movl	%r12d, %r15d
	movq	%r14, %r12
	movq	-64(%rbp), %r14                 ## 8-byte Reload
	je	LBB0_10
## %bb.7:                               ##   in Loop: Header=BB0_4 Depth=1
	xorl	%eax, %eax
	movq	_EIO@GOTPCREL(%rip), %rcx
	subl	(%rcx), %eax
	testl	%eax, %eax
	jne	LBB0_9
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_4 Depth=1
	addl	%r14d, %ebx
	addq	%r14, %r13
	cmpl	%r15d, %ebx
	jl	LBB0_4
	jmp	LBB0_11
LBB0_13:
	addq	$16, %r12
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%esi, %esi
	subl	(%rax), %esi
	movq	%r12, %rdi
	movq	%r14, %rdx
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_nfp_dump_error_tlv             ## TAILCALL
LBB0_9:
	movl	%eax, %edi
	callq	_cpu_to_be32
	movq	-56(%rbp), %r14                 ## 8-byte Reload
	movq	%rax, 8(%r14)
	movl	%ebx, %edi
	callq	_cpu_to_be32
	movq	%rax, (%r14)
LBB0_11:
	xorl	%eax, %eax
LBB0_12:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_BITS_PER_BYTE,4,2              ## @BITS_PER_BYTE
	.comm	_EIO,4,2                        ## @EIO
	.no_dead_strip	_nfp_dump_csr_range
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function nfp_dump_csr_range
_nfp_dump_csr_range:                    ; @nfp_dump_csr_range
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x21, x2
	mov	x19, x1
	mov	x20, x0
	ldr	x25, [x2]
	mov	x0, x1
	bl	_nfp_csr_spec_valid
	cbz	w0, LBB0_10
; %bb.1:
	ldr	w0, [x19, #12]
	bl	_be32_to_cpu
	mov	x23, x0
Lloh0:
	adrp	x8, _BITS_PER_BYTE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _BITS_PER_BYTE@GOTPAGEOFF]
Lloh2:
	ldr	w26, [x8]
	mov	w0, #32
	bl	_ALIGN8
	mov	x24, x0
	ldr	w0, [x19, #4]
	bl	_be32_to_cpu
	bl	_ALIGN8
	add	w22, w0, w24
	ldr	x27, [x21]
	ldr	w0, [x19, #16]
	bl	_be32_to_cpu
	mov	x1, x22
	mov	x2, x21
	bl	_nfp_add_tlv
	cbnz	w0, LBB0_12
; %bb.2:
	ldr	x8, [x19]
	ldr	w9, [x19, #8]
	str	w9, [x25, #28]
	stur	x8, [x25, #20]
	ldr	w8, [x19, #12]
	str	w8, [x25, #16]
	mov	x0, x19
	bl	_nfp_get_numeric_cpp_id
	mov	x22, x0
	ldr	w0, [x19, #8]
	bl	_be32_to_cpu
	mov	x21, x0
	ldr	w0, [x19, #4]
	bl	_be32_to_cpu
	cmp	w0, #1
	b.lt	LBB0_9
; %bb.3:
	sdiv	w23, w23, w26
	add	w26, w0, w21
	sxtw	x8, w24
	add	x24, x27, x8, lsl #5
	sxtw	x27, w23
Lloh3:
	adrp	x28, _EIO@GOTPAGE
Lloh4:
	ldr	x28, [x28, _EIO@GOTPAGEOFF]
	b	LBB0_5
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	mov	x1, x21
	mov	x2, x24
	bl	_nfp_xpb_readl
	cbz	w0, LBB0_8
	b	LBB0_11
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	bl	_is_xpb_read
	mov	x8, x0
	ldr	w0, [x20]
	cbnz	x8, LBB0_4
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	x1, x22
	mov	x2, x21
	mov	x3, x24
	mov	x4, x23
	bl	_nfp_cpp_read
	cmp	w0, w23
	b.eq	LBB0_8
; %bb.7:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	w8, [x28]
	neg	w0, w8
	cbnz	w0, LBB0_11
LBB0_8:                                 ;   in Loop: Header=BB0_5 Depth=1
	add	x24, x24, x27
	add	w21, w21, w23
	cmp	w21, w26
	b.lt	LBB0_5
LBB0_9:
	mov	w0, #0
	b	LBB0_12
LBB0_10:
Lloh5:
	adrp	x8, _EINVAL@GOTPAGE
Lloh6:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	add	x0, x19, #16
Lloh7:
	ldr	w8, [x8]
	neg	w1, w8
	mov	x2, 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
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	b	_nfp_dump_error_tlv
LBB0_11:
	bl	_cpu_to_be32
	str	x0, [x25, #8]
	mov	x0, x21
	bl	_cpu_to_be32
	mov	x8, x0
	mov	w0, #0
	str	x8, [x25]
LBB0_12:
	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
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_BITS_PER_BYTE,4,2              ; @BITS_PER_BYTE
	.comm	_EIO,4,2                        ; @EIO
	.no_dead_strip	_nfp_dump_csr_range
.subsections_via_symbols
