	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cyapa_firmware
_cyapa_firmware:                        ## @cyapa_firmware
	.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
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %rbx
	movq	%rdi, %r15
	movq	8(%rdi), %r14
	leaq	-40(%rbp), %rdi
	movq	%r14, %rdx
	callq	_request_firmware
	testl	%eax, %eax
	je	LBB0_2
## %bb.1:
	movl	%eax, %r12d
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	movq	%rbx, %rdx
	movl	%eax, %ecx
	xorl	%eax, %eax
	callq	_dev_err
	jmp	LBB0_16
LBB0_2:
	movq	(%r15), %rax
	movq	-40(%rbp), %rsi
	movq	%r15, %rdi
	callq	*(%rax)
	testl	%eax, %eax
	je	LBB0_4
## %bb.3:
	movl	%eax, %r12d
	leaq	L_.str.1(%rip), %rsi
	movq	%r14, %rdi
	movq	%rbx, %rdx
	xorl	%eax, %eax
	callq	_dev_err
	jmp	LBB0_15
LBB0_4:
	movq	%r14, %rdi
	callq	_pm_runtime_get_sync
	movq	%r15, %rdi
	callq	_cyapa_enable_irq_for_cmd
	movq	(%r15), %rax
	movq	%r15, %rdi
	callq	*8(%rax)
	testl	%eax, %eax
	je	LBB0_6
## %bb.5:
	movl	%eax, %r12d
	leaq	L_.str.2(%rip), %rsi
	jmp	LBB0_13
LBB0_6:
	movq	(%r15), %rax
	movq	%r15, %rdi
	callq	*16(%rax)
	testl	%eax, %eax
	je	LBB0_8
## %bb.7:
	movl	%eax, %r12d
	leaq	L_.str.3(%rip), %rsi
	jmp	LBB0_13
LBB0_8:
	movq	(%r15), %rax
	movq	-40(%rbp), %rsi
	movq	%r15, %rdi
	callq	*24(%rax)
	testl	%eax, %eax
	je	LBB0_10
## %bb.9:
	movl	%eax, %r12d
	leaq	L_.str.4(%rip), %rsi
	jmp	LBB0_13
LBB0_10:
	movq	(%r15), %rax
	movq	-40(%rbp), %rsi
	movq	%r15, %rdi
	callq	*32(%rax)
	testl	%eax, %eax
	je	LBB0_11
## %bb.12:
	movl	%eax, %r12d
	leaq	L_.str.5(%rip), %rsi
LBB0_13:
	movq	%r14, %rdi
	movl	%r12d, %edx
	xorl	%eax, %eax
	callq	_dev_err
LBB0_14:
	movq	%r15, %rdi
	callq	_cyapa_disable_irq_for_cmd
	movq	%r14, %rdi
	callq	_pm_runtime_put_noidle
LBB0_15:
	movq	-40(%rbp), %rdi
	callq	_release_firmware
LBB0_16:
	movl	%r12d, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_11:
	xorl	%r12d, %r12d
	jmp	LBB0_14
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Could not load firmware from %s: %d\n"

L_.str.1:                               ## @.str.1
	.asciz	"Invalid CYAPA firmware image: %s\n"

L_.str.2:                               ## @.str.2
	.asciz	"bl_enter failed, %d\n"

L_.str.3:                               ## @.str.3
	.asciz	"bl_activate failed, %d\n"

L_.str.4:                               ## @.str.4
	.asciz	"bl_initiate failed, %d\n"

L_.str.5:                               ## @.str.5
	.asciz	"update_fw failed, %d\n"

	.no_dead_strip	_cyapa_firmware
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cyapa_firmware
_cyapa_firmware:                        ; @cyapa_firmware
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	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
	mov	x22, x1
	mov	x20, x0
	ldr	x19, [x0, #8]
	add	x0, sp, #24
	mov	x2, x19
	bl	_request_firmware
	cbz	w0, LBB0_2
; %bb.1:
	mov	x21, x0
	stp	x22, x21, [sp]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_dev_err
	b	LBB0_15
LBB0_2:
	ldr	x8, [x20]
	ldr	x8, [x8]
	ldr	x1, [sp, #24]
	mov	x0, x20
	blr	x8
	cbz	w0, LBB0_4
; %bb.3:
	mov	x21, x0
	str	x22, [sp]
Lloh2:
	adrp	x1, l_.str.1@PAGE
Lloh3:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_dev_err
	b	LBB0_14
LBB0_4:
	mov	x0, x19
	bl	_pm_runtime_get_sync
	mov	x0, x20
	bl	_cyapa_enable_irq_for_cmd
	ldr	x8, [x20]
	ldr	x8, [x8, #8]
	mov	x0, x20
	blr	x8
	cbz	w0, LBB0_6
; %bb.5:
	mov	x21, x0
	str	x21, [sp]
Lloh4:
	adrp	x1, l_.str.2@PAGE
Lloh5:
	add	x1, x1, l_.str.2@PAGEOFF
	b	LBB0_12
LBB0_6:
	ldr	x8, [x20]
	ldr	x8, [x8, #16]
	mov	x0, x20
	blr	x8
	cbz	w0, LBB0_8
; %bb.7:
	mov	x21, x0
	str	x21, [sp]
Lloh6:
	adrp	x1, l_.str.3@PAGE
Lloh7:
	add	x1, x1, l_.str.3@PAGEOFF
	b	LBB0_12
LBB0_8:
	ldr	x8, [x20]
	ldr	x8, [x8, #24]
	ldr	x1, [sp, #24]
	mov	x0, x20
	blr	x8
	cbz	w0, LBB0_10
; %bb.9:
	mov	x21, x0
	str	x21, [sp]
Lloh8:
	adrp	x1, l_.str.4@PAGE
Lloh9:
	add	x1, x1, l_.str.4@PAGEOFF
	b	LBB0_12
LBB0_10:
	ldr	x8, [x20]
	ldr	x8, [x8, #32]
	ldr	x1, [sp, #24]
	mov	x0, x20
	blr	x8
	mov	x21, x0
	cbz	w0, LBB0_13
; %bb.11:
	str	x21, [sp]
Lloh10:
	adrp	x1, l_.str.5@PAGE
Lloh11:
	add	x1, x1, l_.str.5@PAGEOFF
LBB0_12:
	mov	x0, x19
	bl	_dev_err
                                        ; kill: def $w21 killed $w21 killed $x21 def $x21
LBB0_13:
	mov	x0, x20
	bl	_cyapa_disable_irq_for_cmd
	mov	x0, x19
	bl	_pm_runtime_put_noidle
LBB0_14:
	ldr	x0, [sp, #24]
	bl	_release_firmware
LBB0_15:
	mov	x0, x21
	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
	add	sp, sp, #80
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Could not load firmware from %s: %d\n"

l_.str.1:                               ; @.str.1
	.asciz	"Invalid CYAPA firmware image: %s\n"

l_.str.2:                               ; @.str.2
	.asciz	"bl_enter failed, %d\n"

l_.str.3:                               ; @.str.3
	.asciz	"bl_activate failed, %d\n"

l_.str.4:                               ; @.str.4
	.asciz	"bl_initiate failed, %d\n"

l_.str.5:                               ; @.str.5
	.asciz	"update_fw failed, %d\n"

	.no_dead_strip	_cyapa_firmware
.subsections_via_symbols
