	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_nfp_app_alloc                  ## -- Begin function nfp_app_alloc
	.p2align	4, 0x90
_nfp_app_alloc:                         ## @nfp_app_alloc
	.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
	movl	%esi, %ebx
	movq	%rdi, %r14
	movq	_apps@GOTPCREL(%rip), %r15
	movq	(%r15), %rdi
	callq	_ARRAY_SIZE
	cmpl	%ebx, %eax
	jbe	LBB0_2
## %bb.1:
	movq	(%r15), %rax
	movl	%ebx, %r12d
	movq	(%rax,%r12,8), %rax
	testq	%rax, %rax
	je	LBB0_2
## %bb.3:
	cmpl	$0, 16(%rax)
	je	LBB0_4
## %bb.5:
	xorl	%edi, %edi
	cmpl	$0, 12(%rax)
	sete	%dil
	jmp	LBB0_6
LBB0_2:
	movl	4(%r14), %edi
	leaq	L_.str(%rip), %rsi
	movl	%ebx, %edx
	callq	_nfp_err
	jmp	LBB0_7
LBB0_4:
	movl	$1, %edi
LBB0_6:
	callq	_WARN_ON
	testq	%rax, %rax
	jne	LBB0_7
## %bb.9:
	movq	(%r15), %rax
	movq	(%rax,%r12,8), %rax
	xorl	%edi, %edi
	cmpl	$0, 8(%rax)
	jne	LBB0_11
## %bb.10:
	xorl	%edi, %edi
	cmpq	$0, (%rax)
	setne	%dil
LBB0_11:
	callq	_WARN_ON
	testq	%rax, %rax
	je	LBB0_12
LBB0_7:
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_8:
	xorl	%edi, %edi
	subl	(%rax), %edi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ERR_PTR                        ## TAILCALL
LBB0_12:
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$24, %edi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_13
## %bb.14:
	movq	%r14, 16(%rax)
	movl	4(%r14), %ecx
	movl	%ecx, 12(%rax)
	movl	(%r14), %ecx
	movl	%ecx, 8(%rax)
	movq	(%r15), %rcx
	movq	(%rcx,%r12,8), %rcx
	movq	%rcx, (%rax)
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_13:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	jmp	LBB0_8
	.cfi_endproc
                                        ## -- End function
	.comm	_apps,8,3                       ## @apps
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"unknown FW app ID 0x%02hhx, driver too old or support for FW not built in\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_nfp_app_alloc                  ; -- Begin function nfp_app_alloc
	.p2align	2
_nfp_app_alloc:                         ; @nfp_app_alloc
	.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, x1
	mov	x19, x0
Lloh0:
	adrp	x21, _apps@GOTPAGE
Lloh1:
	ldr	x21, [x21, _apps@GOTPAGEOFF]
	ldr	x0, [x21]
	bl	_ARRAY_SIZE
	cmp	w0, w20
	b.ls	LBB0_4
; %bb.1:
	ldr	x8, [x21]
	ldr	x8, [x8, w20, uxtw #3]
	cbz	x8, LBB0_4
; %bb.2:
	ldr	w9, [x8, #16]
	cbz	w9, LBB0_7
; %bb.3:
	ldr	w8, [x8, #12]
	cmp	w8, #0
	cset	w0, eq
	bl	_WARN_ON
	cbnz	x0, LBB0_5
	b	LBB0_8
LBB0_4:
	ldr	w0, [x19, #4]
Lloh2:
	adrp	x1, l_.str@PAGE
Lloh3:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x20
	bl	_nfp_err
LBB0_5:
Lloh4:
	adrp	x8, _EINVAL@GOTPAGE
Lloh5:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_6:
	ldr	w8, [x8]
	neg	w0, w8
	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
	b	_ERR_PTR
LBB0_7:
	mov	w0, #1
	bl	_WARN_ON
	cbnz	x0, LBB0_5
LBB0_8:
	mov	w20, w20
	ldr	x8, [x21]
	ldr	x8, [x8, x20, lsl #3]
	ldr	w9, [x8, #8]
	cbz	w9, LBB0_10
; %bb.9:
	mov	w0, #0
	bl	_WARN_ON
	cbnz	x0, LBB0_5
	b	LBB0_11
LBB0_10:
	ldr	x8, [x8]
	cmp	x8, #0
	cset	w0, ne
	bl	_WARN_ON
	cbnz	x0, LBB0_5
LBB0_11:
Lloh6:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	mov	w0, #24
	bl	_kzalloc
	cbz	x0, LBB0_13
; %bb.12:
	str	x19, [x0, #16]
	ldr	d0, [x19]
	str	d0, [x0, #8]
	ldr	x8, [x21]
	ldr	x8, [x8, x20, lsl #3]
	str	x8, [x0]
	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
LBB0_13:
Lloh9:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
	b	LBB0_6
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_apps,8,3                       ; @apps
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"unknown FW app ID 0x%02hhx, driver too old or support for FW not built in\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
.subsections_via_symbols
