	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_nfp_nsp_hwinfo_lookup_optional ## -- Begin function nfp_nsp_hwinfo_lookup_optional
	.p2align	4, 0x90
_nfp_nsp_hwinfo_lookup_optional:        ## @nfp_nsp_hwinfo_lookup_optional
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, %r12
	movl	%edx, %ebx
	movq	%rsi, %r15
	movq	%rdi, %r14
	movq	%rcx, %rdi
	movl	%edx, %esi
	callq	_strnlen
	cmpl	%ebx, %eax
	jne	LBB0_2
## %bb.1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
LBB0_9:
	subl	(%rax), %ebx
	jmp	LBB0_10
LBB0_2:
	movq	%r14, %rdi
	callq	_nfp_nsp_has_hwinfo_lookup
	testl	%eax, %eax
	je	LBB0_3
## %bb.4:
	movq	_u32@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_NFP_HWINFO_LOOKUP_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	%ebx, %esi
	callq	_min_t
	movl	%eax, %r13d
	movq	%r14, %rdi
	movq	%r15, %rsi
	movl	%eax, %edx
	movl	$1, %ecx
	callq	___nfp_nsp_hwinfo_lookup
	testl	%eax, %eax
	je	LBB0_7
## %bb.5:
	movl	%eax, %ebx
	movq	_ENOENT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	addl	%ebx, %eax
	jne	LBB0_6
LBB0_3:
	movq	%r15, %rdi
	movq	%r12, %rsi
	callq	_strcpy
	xorl	%ebx, %ebx
	jmp	LBB0_10
LBB0_7:
	movq	%r15, %rdi
	movl	%r13d, %esi
	callq	_strnlen
	xorl	%ebx, %ebx
	cmpl	%r13d, %eax
	jne	LBB0_10
## %bb.8:
	movl	(%r14), %edi
	leaq	L_.str.1(%rip), %rsi
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_nfp_err
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_9
LBB0_6:
	movl	(%r14), %edi
	leaq	L_.str(%rip), %rsi
	movl	%ebx, %edx
	xorl	%eax, %eax
	callq	_nfp_err
LBB0_10:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_u32,4,2                        ## @u32
	.comm	_NFP_HWINFO_LOOKUP_SIZE,4,2     ## @NFP_HWINFO_LOOKUP_SIZE
	.comm	_ENOENT,4,2                     ## @ENOENT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"NSP HWinfo lookup failed: %d\n"

L_.str.1:                               ## @.str.1
	.asciz	"NSP HWinfo value not NULL-terminated\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_nfp_nsp_hwinfo_lookup_optional ; -- Begin function nfp_nsp_hwinfo_lookup_optional
	.p2align	2
_nfp_nsp_hwinfo_lookup_optional:        ; @nfp_nsp_hwinfo_lookup_optional
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x20, x3
	mov	x22, x2
	mov	x21, x1
	mov	x19, x0
	mov	x0, x3
	mov	x1, x2
	bl	_strnlen
	cmp	w0, w22
	b.ne	LBB0_2
LBB0_1:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w22, w8
	b	LBB0_10
LBB0_2:
	mov	x0, x19
	bl	_nfp_nsp_has_hwinfo_lookup
	cbz	w0, LBB0_5
; %bb.3:
Lloh3:
	adrp	x8, _u32@GOTPAGE
Lloh4:
	ldr	x8, [x8, _u32@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
Lloh6:
	adrp	x8, _NFP_HWINFO_LOOKUP_SIZE@GOTPAGE
Lloh7:
	ldr	x8, [x8, _NFP_HWINFO_LOOKUP_SIZE@GOTPAGEOFF]
Lloh8:
	ldr	w2, [x8]
	mov	x1, x22
	bl	_min_t
	mov	x23, x0
	mov	x0, x19
	mov	x1, x21
	mov	x2, x23
	mov	w3, #1
	bl	___nfp_nsp_hwinfo_lookup
	cbz	w0, LBB0_7
; %bb.4:
	mov	x22, x0
Lloh9:
	adrp	x8, _ENOENT@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ENOENT@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	cmn	w0, w8
	b.ne	LBB0_9
LBB0_5:
	mov	x0, x21
	mov	x1, x20
	bl	_strcpy
LBB0_6:
	mov	w22, #0
	b	LBB0_10
LBB0_7:
	mov	x0, x21
	mov	x1, x23
	bl	_strnlen
	cmp	w0, w23
	b.ne	LBB0_6
; %bb.8:
	ldr	w0, [x19]
Lloh12:
	adrp	x1, l_.str.1@PAGE
Lloh13:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_nfp_err
	b	LBB0_1
LBB0_9:
	ldr	w0, [x19]
	str	x22, [sp]
Lloh14:
	adrp	x1, l_.str@PAGE
Lloh15:
	add	x1, x1, l_.str@PAGEOFF
	bl	_nfp_err
LBB0_10:
	mov	x0, x22
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_u32,4,2                        ; @u32
	.comm	_NFP_HWINFO_LOOKUP_SIZE,4,2     ; @NFP_HWINFO_LOOKUP_SIZE
	.comm	_ENOENT,4,2                     ; @ENOENT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"NSP HWinfo lookup failed: %d\n"

l_.str.1:                               ; @.str.1
	.asciz	"NSP HWinfo value not NULL-terminated\n"

.subsections_via_symbols
