	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function nfp_cpp_resource_find
_nfp_cpp_resource_find:                 ## @nfp_cpp_resource_find
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %rbx
	movq	%rdi, %r12
	movq	_NFP_RESOURCE_TBL_TARGET@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	xorl	%r14d, %r14d
	movl	$3, %esi
	xorl	%edx, %edx
	callq	_NFP_CPP_ID
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movl	20(%rbx), %edi
	movq	_NFP_RESOURCE_TBL_NAME@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_strcmp
	testl	%eax, %eax
	je	LBB0_1
## %bb.2:
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	movl	20(%rbx), %edi
	movq	_NFP_RESOURCE_ENTRY_NAME_SZ@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_crc32_posix
	movq	%rax, %rbx
	movq	_NFP_RESOURCE_TBL_ENTRIES@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	jle	LBB0_9
## %bb.3:
	xorl	%r13d, %r13d
	xorl	%r15d, %r15d
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movq	_NFP_RESOURCE_TBL_BASE@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	addl	%r13d, %r14d
	movq	%r12, %rdi
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	movl	%r14d, %edx
	leaq	-96(%rbp), %rcx
	movl	$40, %r8d
	callq	_nfp_cpp_read
	cmpl	$40, %eax
	jne	LBB0_6
## %bb.7:                               ##   in Loop: Header=BB0_5 Depth=1
	cmpq	%rbx, -64(%rbp)
	je	LBB0_8
## %bb.4:                               ##   in Loop: Header=BB0_5 Depth=1
	incl	%r15d
	addl	$40, %r13d
	movq	_NFP_RESOURCE_TBL_ENTRIES@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r15d
	jl	LBB0_5
LBB0_9:
	movq	_ENOENT@GOTPCREL(%rip), %rax
	jmp	LBB0_10
LBB0_1:
	leaq	L_.str(%rip), %rsi
	movq	%r12, %rdi
	callq	_nfp_err
	movq	_EOPNOTSUPP@GOTPCREL(%rip), %rax
	jmp	LBB0_11
LBB0_6:
	movq	_EIO@GOTPCREL(%rip), %rax
LBB0_10:
	xorl	%r14d, %r14d
LBB0_11:
	subl	(%rax), %r14d
LBB0_12:
	movl	%r14d, %eax
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	movq	_NFP_RESOURCE_TBL_TARGET@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	movl	%r14d, %edx
	movq	%rbx, %rcx
	callq	_nfp_cpp_mutex_alloc
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	movl	%eax, 16(%rbx)
	movl	-68(%rbp), %edi
	movl	-96(%rbp), %esi
	movl	-72(%rbp), %edx
	callq	_NFP_CPP_ID
	movq	%rax, 8(%rbx)
	movl	-80(%rbp), %eax
	shll	$8, %eax
	movl	%eax, (%rbx)
	movl	-88(%rbp), %eax
	shll	$8, %eax
	movl	%eax, 4(%rbx)
	xorl	%r14d, %r14d
	jmp	LBB0_12
	.cfi_endproc
                                        ## -- End function
	.comm	_NFP_RESOURCE_TBL_TARGET,4,2    ## @NFP_RESOURCE_TBL_TARGET
	.comm	_NFP_RESOURCE_TBL_NAME,4,2      ## @NFP_RESOURCE_TBL_NAME
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Grabbing device lock not supported\n"

	.comm	_EOPNOTSUPP,4,2                 ## @EOPNOTSUPP
	.comm	_NFP_RESOURCE_ENTRY_NAME_SZ,4,2 ## @NFP_RESOURCE_ENTRY_NAME_SZ
	.comm	_NFP_RESOURCE_TBL_ENTRIES,4,2   ## @NFP_RESOURCE_TBL_ENTRIES
	.comm	_NFP_RESOURCE_TBL_BASE,4,2      ## @NFP_RESOURCE_TBL_BASE
	.comm	_EIO,4,2                        ## @EIO
	.comm	_ENOENT,4,2                     ## @ENOENT
	.no_dead_strip	_nfp_cpp_resource_find
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function nfp_cpp_resource_find
_nfp_cpp_resource_find:                 ; @nfp_cpp_resource_find
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #144
	.cfi_def_cfa_offset 144
	stp	x28, x27, [sp, #48]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #64]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #80]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #96]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #112]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #128]            ; 16-byte Folded Spill
	add	x29, sp, #128
	.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	x19, x1
	mov	x20, x0
Lloh0:
	adrp	x23, _NFP_RESOURCE_TBL_TARGET@GOTPAGE
Lloh1:
	ldr	x23, [x23, _NFP_RESOURCE_TBL_TARGET@GOTPAGEOFF]
	ldr	w0, [x23]
	mov	w1, #3
	mov	w2, #0
	bl	_NFP_CPP_ID
	mov	x21, x0
	ldr	w0, [x19, #20]
Lloh2:
	adrp	x8, _NFP_RESOURCE_TBL_NAME@GOTPAGE
Lloh3:
	ldr	x8, [x8, _NFP_RESOURCE_TBL_NAME@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	bl	_strcmp
	cbz	w0, LBB0_7
; %bb.1:
	ldr	w0, [x19, #20]
Lloh5:
	adrp	x8, _NFP_RESOURCE_ENTRY_NAME_SZ@GOTPAGE
Lloh6:
	ldr	x8, [x8, _NFP_RESOURCE_ENTRY_NAME_SZ@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	bl	_crc32_posix
Lloh8:
	adrp	x24, _NFP_RESOURCE_TBL_ENTRIES@GOTPAGE
Lloh9:
	ldr	x24, [x24, _NFP_RESOURCE_TBL_ENTRIES@GOTPAGEOFF]
	ldr	w8, [x24]
	cmp	w8, #1
	b.lt	LBB0_6
; %bb.2:
	mov	x22, x0
	mov	w25, #0
	mov	w26, #0
Lloh10:
	adrp	x27, _NFP_RESOURCE_TBL_BASE@GOTPAGE
Lloh11:
	ldr	x27, [x27, _NFP_RESOURCE_TBL_BASE@GOTPAGEOFF]
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w28, [x27]
	add	w2, w25, w28
	add	x3, sp, #8
	mov	x0, x20
	mov	x1, x21
	mov	w4, #40
	bl	_nfp_cpp_read
	cmp	w0, #40
	b.ne	LBB0_8
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x8, [sp, #40]
	cmp	x8, x22
	b.eq	LBB0_11
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	add	w26, w26, #1
	ldr	w8, [x24]
	add	w25, w25, #40
	cmp	w26, w8
	b.lt	LBB0_3
LBB0_6:
Lloh12:
	adrp	x8, _ENOENT@GOTPAGE
Lloh13:
	ldr	x8, [x8, _ENOENT@GOTPAGEOFF]
	b	LBB0_9
LBB0_7:
Lloh14:
	adrp	x1, l_.str@PAGE
Lloh15:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	bl	_nfp_err
Lloh16:
	adrp	x8, _EOPNOTSUPP@GOTPAGE
Lloh17:
	ldr	x8, [x8, _EOPNOTSUPP@GOTPAGEOFF]
	b	LBB0_9
LBB0_8:
Lloh18:
	adrp	x8, _EIO@GOTPAGE
Lloh19:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
LBB0_9:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_10:
	ldp	x29, x30, [sp, #128]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #112]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #96]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #80]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #64]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #144
	ret
LBB0_11:
	ldr	w1, [x23]
	add	w2, w25, w28
	mov	x0, x20
	mov	x3, x22
	bl	_nfp_cpp_mutex_alloc
	str	w0, [x19, #16]
	ldp	w2, w0, [sp, #32]
	ldr	w1, [sp, #8]
	bl	_NFP_CPP_ID
	mov	x8, x0
	mov	w0, #0
	str	x8, [x19, #8]
	ldur	q0, [sp, #16]
	xtn.2s	v0, v0
	shl.2s	v0, v0, #8
	rev64.2s	v0, v0
	str	d0, [x19]
	b	LBB0_10
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_NFP_RESOURCE_TBL_TARGET,4,2    ; @NFP_RESOURCE_TBL_TARGET
	.comm	_NFP_RESOURCE_TBL_NAME,4,2      ; @NFP_RESOURCE_TBL_NAME
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Grabbing device lock not supported\n"

	.comm	_EOPNOTSUPP,4,2                 ; @EOPNOTSUPP
	.comm	_NFP_RESOURCE_ENTRY_NAME_SZ,4,2 ; @NFP_RESOURCE_ENTRY_NAME_SZ
	.comm	_NFP_RESOURCE_TBL_ENTRIES,4,2   ; @NFP_RESOURCE_TBL_ENTRIES
	.comm	_NFP_RESOURCE_TBL_BASE,4,2      ; @NFP_RESOURCE_TBL_BASE
	.comm	_EIO,4,2                        ; @EIO
	.comm	_ENOENT,4,2                     ; @ENOENT
	.no_dead_strip	_nfp_cpp_resource_find
.subsections_via_symbols
