	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rmi_driver_update_fw_store
_rmi_driver_update_fw_store:            ## @rmi_driver_update_fw_store
	.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, %r15
	movq	%rdx, %r13
	movq	%rdi, %r14
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	callq	_dev_get_drvdata
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	movq	_NAME_MAX@GOTPCREL(%rip), %rax
	movslq	(%rax), %rbx
	movl	%ebx, %eax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r12
	testq	%r15, %r15
	je	LBB0_2
## %bb.1:
	cmpq	%r15, %rbx
	jbe	LBB0_2
## %bb.3:
	movb	-1(%r13,%r15), %al
	cmpb	$10, %al
	je	LBB0_5
## %bb.4:
	movq	%r15, %rbx
	testb	%al, %al
	jne	LBB0_6
LBB0_5:
	leaq	-1(%r15), %rbx
LBB0_6:
	movq	%r12, %rdi
	movq	%r13, %rsi
	movq	%rbx, %rdx
	callq	_strncpy
	movb	$0, (%r12,%rbx)
	leaq	-56(%rbp), %rdi
	movq	%r12, %rsi
	movq	%r14, %rdx
	callq	_request_firmware
	testl	%eax, %eax
	jne	LBB0_8
## %bb.7:
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	movq	%r12, %rdx
	callq	_dev_info
	movq	-56(%rbp), %rsi
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	callq	_rmi_firmware_update
	movl	%eax, %ebx
	movq	-56(%rbp), %rdi
	callq	_release_firmware
	testl	%ebx, %ebx
	cmovnel	%ebx, %r15d
	movl	%r15d, %eax
	jmp	LBB0_8
LBB0_2:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_8:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-48(%rbp), %rcx
	jne	LBB0_10
## %bb.9:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_10:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_NAME_MAX,4,2                   ## @NAME_MAX
	.comm	_EINVAL,4,2                     ## @EINVAL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Flashing %s\n"

	.no_dead_strip	_rmi_driver_update_fw_store
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rmi_driver_update_fw_store
_rmi_driver_update_fw_store:            ; @rmi_driver_update_fw_store
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	sub	sp, sp, #16
	mov	x19, x3
	mov	x23, x2
	mov	x20, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-56]
	bl	_dev_get_drvdata
	mov	x21, x0
Lloh3:
	adrp	x8, _NAME_MAX@GOTPAGE
Lloh4:
	ldr	x8, [x8, _NAME_MAX@GOTPAGEOFF]
Lloh5:
	ldrsw	x12, [x8]
	and	x8, x12, #0xffffffff
	mov	x9, x8
Lloh6:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh7:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x8, x8, #15
	and	x8, x8, #0x1fffffff0
	sub	x22, x9, x8
	mov	sp, x22
	cbz	x19, LBB0_4
; %bb.1:
	cmp	x12, x19
	b.ls	LBB0_4
; %bb.2:
	sub	x8, x19, #1
	ldrb	w9, [x23, x8]
	cmp	w9, #10
	ccmp	w9, #0, #4, ne
	csel	x24, x19, x8, ne
	mov	x0, x22
	mov	x1, x23
	mov	x2, x24
	bl	_strncpy
	strb	wzr, [x22, x24]
	sub	x0, x29, #64
	mov	x1, x22
	mov	x2, x20
	bl	_request_firmware
	cbnz	w0, LBB0_5
; %bb.3:
Lloh8:
	adrp	x1, l_.str@PAGE
Lloh9:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	mov	x2, x22
	bl	_dev_info
	ldur	x1, [x29, #-64]
	mov	x0, x21
	bl	_rmi_firmware_update
	mov	x20, x0
	ldur	x0, [x29, #-64]
	bl	_release_firmware
	cmp	w20, #0
	csel	w0, w19, w20, eq
	b	LBB0_5
LBB0_4:
Lloh10:
	adrp	x8, _EINVAL@GOTPAGE
Lloh11:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_5:
	ldur	x8, [x29, #-56]
Lloh13:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh14:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh15:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_7
; %bb.6:
	sub	sp, x29, #48
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_7:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_NAME_MAX,4,2                   ; @NAME_MAX
	.comm	_EINVAL,4,2                     ; @EINVAL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Flashing %s\n"

	.no_dead_strip	_rmi_driver_update_fw_store
.subsections_via_symbols
