	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function nfp_mip_try_read
_nfp_mip_try_read:                      ## @nfp_mip_try_read
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rcx, %rbx
	movq	%rdi, %r14
	movl	$16, %r8d
	callq	_nfp_cpp_read
	cmpl	$16, %eax
	jne	LBB0_1
## %bb.2:
	movq	(%rbx), %rdi
	movq	_NFP_MIP_SIGNATURE@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rdi
	jne	LBB0_3
## %bb.4:
	movq	8(%rbx), %rdi
	movq	_NFP_MIP_VERSION@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	cmpq	(%rcx), %rdi
	je	LBB0_8
## %bb.5:
	callq	_le32_to_cpu
	leaq	L_.str.2(%rip), %rsi
	jmp	LBB0_6
LBB0_1:
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	movl	%eax, %edx
	movl	$16, %ecx
	callq	_nfp_err
	movq	_EIO@GOTPCREL(%rip), %rcx
	jmp	LBB0_7
LBB0_3:
	callq	_le32_to_cpu
	leaq	L_.str.1(%rip), %rsi
LBB0_6:
	movq	%r14, %rdi
	movl	%eax, %edx
	callq	_nfp_warn
	movq	_EINVAL@GOTPCREL(%rip), %rcx
LBB0_7:
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_8:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to read MIP data (%d, %zu)\n"

	.comm	_EIO,4,2                        ## @EIO
	.comm	_NFP_MIP_SIGNATURE,8,3          ## @NFP_MIP_SIGNATURE
L_.str.1:                               ## @.str.1
	.asciz	"Incorrect MIP signature (0x%08x)\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_NFP_MIP_VERSION,8,3            ## @NFP_MIP_VERSION
L_.str.2:                               ## @.str.2
	.asciz	"Unsupported MIP version (%d)\n"

	.no_dead_strip	_nfp_mip_try_read
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function nfp_mip_try_read
_nfp_mip_try_read:                      ; @nfp_mip_try_read
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x20, x3
	mov	x19, x0
	mov	w4, #16
	bl	_nfp_cpp_read
	cmp	w0, #16
	b.ne	LBB0_4
; %bb.1:
	ldr	x0, [x20]
Lloh0:
	adrp	x8, _NFP_MIP_SIGNATURE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _NFP_MIP_SIGNATURE@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_5
; %bb.2:
	ldr	x0, [x20, #8]
Lloh3:
	adrp	x8, _NFP_MIP_VERSION@GOTPAGE
Lloh4:
	ldr	x8, [x8, _NFP_MIP_VERSION@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_6
; %bb.3:
	mov	w0, #0
	b	LBB0_9
LBB0_4:
	mov	x2, x0
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	mov	w3, #16
	bl	_nfp_err
Lloh8:
	adrp	x8, _EIO@GOTPAGE
Lloh9:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
	b	LBB0_8
LBB0_5:
	bl	_le32_to_cpu
	mov	x2, x0
Lloh10:
	adrp	x1, l_.str.1@PAGE
Lloh11:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_7
LBB0_6:
	bl	_le32_to_cpu
	mov	x2, x0
Lloh12:
	adrp	x1, l_.str.2@PAGE
Lloh13:
	add	x1, x1, l_.str.2@PAGEOFF
LBB0_7:
	mov	x0, x19
	bl	_nfp_warn
Lloh14:
	adrp	x8, _EINVAL@GOTPAGE
Lloh15:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_8:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_9:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to read MIP data (%d, %zu)\n"

	.comm	_EIO,4,2                        ; @EIO
	.comm	_NFP_MIP_SIGNATURE,8,3          ; @NFP_MIP_SIGNATURE
l_.str.1:                               ; @.str.1
	.asciz	"Incorrect MIP signature (0x%08x)\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_NFP_MIP_VERSION,8,3            ; @NFP_MIP_VERSION
l_.str.2:                               ; @.str.2
	.asciz	"Unsupported MIP version (%d)\n"

	.no_dead_strip	_nfp_mip_try_read
.subsections_via_symbols
