	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function lp55xx_firmware_loaded
_lp55xx_firmware_loaded:                ## @lp55xx_firmware_loaded
	.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	%rsi, %rbx
	testq	%rdi, %rdi
	je	LBB0_4
## %bb.1:
	movq	%rdi, %r15
	movl	(%rbx), %r12d
	leaq	16(%rbx), %r14
	movq	%r14, %rdi
	callq	_mutex_lock
	movq	_LP55XX_ENGINE_LOAD@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	32(%rbx), %rcx
	decl	%r12d
	movl	%eax, (%rcx,%r12,4)
	movq	%r15, 8(%rbx)
	movq	24(%rbx), %rax
	movq	(%rax), %rax
	testq	%rax, %rax
	je	LBB0_3
## %bb.2:
	movq	%rbx, %rdi
	callq	*%rax
LBB0_3:
	movq	%r14, %rdi
	callq	_mutex_unlock
	movq	8(%rbx), %rdi
	callq	_release_firmware
	movq	$0, 8(%rbx)
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	movq	40(%rbx), %rdi
	leaq	L_.str(%rip), %rsi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_dev_err                        ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"firmware request failed\n"

	.comm	_LP55XX_ENGINE_LOAD,4,2         ## @LP55XX_ENGINE_LOAD
	.no_dead_strip	_lp55xx_firmware_loaded
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function lp55xx_firmware_loaded
_lp55xx_firmware_loaded:                ; @lp55xx_firmware_loaded
	.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	x19, x1
	cbz	x0, LBB0_4
; %bb.1:
	mov	x21, x0
	ldr	w22, [x19]
	add	x20, x19, #16
	mov	x0, x20
	bl	_mutex_lock
Lloh0:
	adrp	x8, _LP55XX_ENGINE_LOAD@GOTPAGE
Lloh1:
	ldr	x8, [x8, _LP55XX_ENGINE_LOAD@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	sub	w9, w22, #1
	ldp	x11, x10, [x19, #24]
	str	w8, [x10, w9, uxtw #2]
	str	x21, [x19, #8]
	ldr	x8, [x11]
	cbz	x8, LBB0_3
; %bb.2:
	mov	x0, x19
	blr	x8
LBB0_3:
	mov	x0, x20
	bl	_mutex_unlock
	ldr	x0, [x19, #8]
	bl	_release_firmware
	str	xzr, [x19, #8]
	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_4:
	ldr	x0, [x19, #40]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	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	_dev_err
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"firmware request failed\n"

	.comm	_LP55XX_ENGINE_LOAD,4,2         ; @LP55XX_ENGINE_LOAD
	.no_dead_strip	_lp55xx_firmware_loaded
.subsections_via_symbols
