	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_nfp_cpp_mutex_alloc            ## -- Begin function nfp_cpp_mutex_alloc
	.p2align	4, 0x90
_nfp_cpp_mutex_alloc:                   ## @nfp_cpp_mutex_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	%r13
	pushq	%r12
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, %r14
	movq	%rdx, %r15
	movq	%rdi, %r12
	movl	%esi, -44(%rbp)
	xorl	%ebx, %ebx
	movl	%esi, %edi
	movl	$3, %esi
	xorl	%edx, %edx
	callq	_NFP_CPP_ID
	movq	%rax, %r13
	movq	%r12, %rdi
	callq	_nfp_cpp_interface
	leaq	-44(%rbp), %rsi
	movl	%eax, %edi
	movq	%r15, %rdx
	callq	_nfp_cpp_mutex_validate
	testl	%eax, %eax
	je	LBB0_1
LBB0_6:
	movq	%rbx, %rax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	leaq	4(%r15), %rdx
	leaq	-56(%rbp), %rcx
	movq	%r12, %rdi
	movq	%r13, %rsi
	callq	_nfp_cpp_readl
	xorl	%ebx, %ebx
	testl	%eax, %eax
	js	LBB0_6
## %bb.2:
	cmpq	%r14, -56(%rbp)
	jne	LBB0_6
## %bb.3:
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$40, %edi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_4
## %bb.5:
	movq	%rax, %rbx
	movq	%r12, 32(%rax)
	movl	-44(%rbp), %eax
	movl	%eax, (%rbx)
	movq	%r15, 8(%rbx)
	movq	%r14, 24(%rbx)
	movq	$0, 16(%rbx)
	jmp	LBB0_6
LBB0_4:
	xorl	%ebx, %ebx
	jmp	LBB0_6
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_nfp_cpp_mutex_alloc            ; -- Begin function nfp_cpp_mutex_alloc
	.p2align	2
_nfp_cpp_mutex_alloc:                   ; @nfp_cpp_mutex_alloc
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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	x19, x3
	mov	x20, x2
	mov	x21, x0
	str	w1, [sp, #12]
	mov	x0, x1
	mov	w1, #3
	mov	w2, #0
	bl	_NFP_CPP_ID
	mov	x22, x0
	mov	x0, x21
	bl	_nfp_cpp_interface
	add	x1, sp, #12
	mov	x2, x20
	bl	_nfp_cpp_mutex_validate
	cbz	w0, LBB0_3
; %bb.1:
	mov	x0, #0
LBB0_2:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
LBB0_3:
	add	x2, x20, #4
	mov	x3, sp
	mov	x0, x21
	mov	x1, x22
	bl	_nfp_cpp_readl
	mov	x8, x0
	mov	x0, #0
	tbnz	w8, #31, LBB0_2
; %bb.4:
	ldr	x8, [sp]
	cmp	x8, x19
	b.ne	LBB0_2
; %bb.5:
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	w0, #40
	bl	_kzalloc
	cbz	x0, LBB0_2
; %bb.6:
	ldr	w8, [sp, #12]
	str	w8, [x0]
	stp	x19, x21, [x0, #24]
	stp	x20, xzr, [x0, #8]
	b	LBB0_2
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
.subsections_via_symbols
