	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_nfp_cpp_mutex_unlock           ## -- Begin function nfp_cpp_mutex_unlock
	.p2align	4, 0x90
_nfp_cpp_mutex_unlock:                  ## @nfp_cpp_mutex_unlock
	.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	%rdi, %rbx
	movl	32(%rdi), %edi
	xorl	%r15d, %r15d
	movl	$4, %esi
	xorl	%edx, %edx
	callq	_NFP_CPP_ID
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movl	32(%rbx), %edi
	movl	$3, %esi
	xorl	%edx, %edx
	callq	_NFP_CPP_ID
	movq	%rax, %r14
	movq	24(%rbx), %r12
	movq	%r12, %rdi
	callq	_nfp_cpp_interface
	movl	%eax, %r13d
	movl	(%rbx), %eax
	cmpl	$2, %eax
	jl	LBB0_2
## %bb.1:
	decl	%eax
	movl	%eax, (%rbx)
	jmp	LBB0_13
LBB0_2:
	movq	16(%rbx), %rdx
	movq	24(%rbx), %rdi
	addq	$4, %rdx
	leaq	-64(%rbp), %rcx
	movq	%r14, %rsi
	callq	_nfp_cpp_readl
	testl	%eax, %eax
	js	LBB0_8
## %bb.3:
	movq	-64(%rbp), %rax
	cmpq	8(%rbx), %rax
	jne	LBB0_9
## %bb.4:
	movq	16(%rbx), %rdx
	movq	24(%rbx), %rdi
	leaq	-56(%rbp), %rcx
	movq	%r14, %rsi
	callq	_nfp_cpp_readl
	testl	%eax, %eax
	js	LBB0_8
## %bb.5:
	movq	-56(%rbp), %r14
	movl	%r13d, %edi
	callq	_nfp_mutex_locked
	cmpq	%rax, %r14
	jne	LBB0_11
## %bb.6:
	movq	16(%rbx), %r14
	movl	%r13d, %edi
	callq	_nfp_mutex_unlocked
	movq	%r12, %rdi
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	movq	%r14, %rdx
	movl	%eax, %ecx
	callq	_nfp_cpp_writel
	testl	%eax, %eax
	js	LBB0_8
## %bb.7:
	movl	$0, (%rbx)
	xorl	%r15d, %r15d
	jmp	LBB0_13
LBB0_8:
	movl	%eax, %r15d
	jmp	LBB0_13
LBB0_9:
	movq	_EPERM@GOTPCREL(%rip), %rax
	jmp	LBB0_12
LBB0_11:
	movq	_EACCES@GOTPCREL(%rip), %rax
LBB0_12:
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
LBB0_13:
	movl	%r15d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EPERM,4,2                      ## @EPERM
	.comm	_EACCES,4,2                     ## @EACCES
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_nfp_cpp_mutex_unlock           ; -- Begin function nfp_cpp_mutex_unlock
	.p2align	2
_nfp_cpp_mutex_unlock:                  ; @nfp_cpp_mutex_unlock
	.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	x19, x0
	ldr	w0, [x0, #32]
	mov	w1, #4
	mov	w2, #0
	bl	_NFP_CPP_ID
	mov	x20, x0
	ldr	w0, [x19, #32]
	mov	w1, #3
	mov	w2, #0
	bl	_NFP_CPP_ID
	mov	x23, x0
	ldr	x21, [x19, #24]
	mov	x0, x21
	bl	_nfp_cpp_interface
	ldr	w8, [x19]
	cmp	w8, #2
	b.lt	LBB0_2
; %bb.1:
	mov	w0, #0
	sub	w8, w8, #1
	str	w8, [x19]
	b	LBB0_11
LBB0_2:
	mov	x22, x0
	ldp	x8, x0, [x19, #16]
	add	x2, x8, #4
	add	x3, sp, #8
	mov	x1, x23
	bl	_nfp_cpp_readl
	tbnz	w0, #31, LBB0_11
; %bb.3:
	ldr	x8, [sp, #8]
	ldr	x9, [x19, #8]
	cmp	x8, x9
	b.ne	LBB0_8
; %bb.4:
	ldp	x2, x0, [x19, #16]
	mov	x3, sp
	mov	x1, x23
	bl	_nfp_cpp_readl
	tbnz	w0, #31, LBB0_11
; %bb.5:
	ldr	x23, [sp]
	mov	x0, x22
	bl	_nfp_mutex_locked
	cmp	x23, x0
	b.ne	LBB0_9
; %bb.6:
	ldr	x23, [x19, #16]
	mov	x0, x22
	bl	_nfp_mutex_unlocked
	mov	x3, x0
	mov	x0, x21
	mov	x1, x20
	mov	x2, x23
	bl	_nfp_cpp_writel
	tbnz	w0, #31, LBB0_11
; %bb.7:
	mov	w0, #0
	str	wzr, [x19]
	b	LBB0_11
LBB0_8:
Lloh0:
	adrp	x8, _EPERM@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EPERM@GOTPAGEOFF]
	b	LBB0_10
LBB0_9:
Lloh2:
	adrp	x8, _EACCES@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EACCES@GOTPAGEOFF]
LBB0_10:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_11:
	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 AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.comm	_EPERM,4,2                      ; @EPERM
	.comm	_EACCES,4,2                     ; @EACCES
.subsections_via_symbols
