	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	___nfp_nsp_identify             ## -- Begin function __nfp_nsp_identify
	.p2align	4, 0x90
___nfp_nsp_identify:                    ## @__nfp_nsp_identify
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	callq	_nfp_nsp_get_abi_ver_minor
	cmpl	$15, %eax
	jl	LBB0_1
## %bb.2:
	movq	_GFP_KERNEL@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	movl	$36, %edi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_1
## %bb.3:
	movq	%rax, %r14
	movq	%rbx, %rdi
	movq	%rax, %rsi
	movl	$36, %edx
	callq	_nfp_nsp_read_identify
	testl	%eax, %eax
	js	LBB0_7
## %bb.4:
	movl	(%r12), %esi
	movl	$56, %edi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_8
## %bb.5:
	movq	%rax, %rbx
	movq	(%rax), %rdi
	movl	32(%r14), %esi
	movl	$8, %edx
	callq	_memcpy
	movq	(%rbx), %rax
	movb	$0, 7(%rax)
	movups	16(%r14), %xmm0
	movups	%xmm0, 40(%rbx)
	movl	12(%r14), %edi
	callq	_le16_to_cpu
	movq	%rax, 32(%rbx)
	movl	8(%r14), %edi
	callq	_le16_to_cpu
	movq	%rax, 24(%rbx)
	movl	4(%r14), %edi
	callq	_le16_to_cpu
	movq	%rax, 16(%rbx)
	movl	(%r14), %edi
	callq	_le64_to_cpu
	movl	%eax, 8(%rbx)
	jmp	LBB0_9
LBB0_1:
	xorl	%ebx, %ebx
	jmp	LBB0_10
LBB0_7:
	movl	%eax, %r15d
	movq	%rbx, %rdi
	callq	_nfp_nsp_cpp
	leaq	L_.str(%rip), %rsi
	movl	%eax, %edi
	movl	%r15d, %edx
	callq	_nfp_err
LBB0_8:
	xorl	%ebx, %ebx
LBB0_9:
	movq	%r14, %rdi
	callq	_kfree
LBB0_10:
	movq	%rbx, %rax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"reading bsp version failed %d\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	___nfp_nsp_identify             ; -- Begin function __nfp_nsp_identify
	.p2align	2
___nfp_nsp_identify:                    ; @__nfp_nsp_identify
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	mov	x20, x0
	bl	_nfp_nsp_get_abi_ver_minor
	cmp	w0, #15
	b.lt	LBB0_5
; %bb.1:
Lloh0:
	adrp	x22, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x22, [x22, _GFP_KERNEL@GOTPAGEOFF]
	ldr	w1, [x22]
	mov	w0, #36
	bl	_kzalloc
	cbz	x0, LBB0_5
; %bb.2:
	mov	x19, x0
	mov	x0, x20
	mov	x1, x19
	mov	w2, #36
	bl	_nfp_nsp_read_identify
	tbnz	w0, #31, LBB0_6
; %bb.3:
	ldr	w1, [x22]
	mov	w0, #56
	bl	_kzalloc
	mov	x20, x0
	cbz	x0, LBB0_7
; %bb.4:
	ldr	x0, [x20]
	ldr	w1, [x19, #32]
	mov	w2, #8
	bl	_memcpy
	ldr	x8, [x20]
	strb	wzr, [x8, #7]
	ldr	q0, [x19, #16]
	stur	q0, [x20, #40]
	ldr	w0, [x19, #12]
	bl	_le16_to_cpu
	str	x0, [x20, #32]
	ldr	w0, [x19, #8]
	bl	_le16_to_cpu
	str	x0, [x20, #24]
	ldr	w0, [x19, #4]
	bl	_le16_to_cpu
	str	x0, [x20, #16]
	ldr	w0, [x19]
	bl	_le64_to_cpu
	str	w0, [x20, #8]
	b	LBB0_7
LBB0_5:
	mov	x20, #0
	b	LBB0_8
LBB0_6:
	mov	x21, x0
	mov	x0, x20
	bl	_nfp_nsp_cpp
Lloh2:
	adrp	x1, l_.str@PAGE
Lloh3:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x21
	bl	_nfp_err
	mov	x20, #0
LBB0_7:
	mov	x0, x19
	bl	_kfree
LBB0_8:
	mov	x0, x20
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"reading bsp version failed %d\n"

.subsections_via_symbols
