	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function fw_file_store
_fw_file_store:                         ## @fw_file_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, %r13
	movq	%rdx, %r12
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	callq	_dev_get_drvdata
	movq	%rax, %r15
	movq	_IQS5XX_FW_FILE_LEN@GOTPCREL(%rip), %rax
	movslq	(%rax), %r14
	leal	1(%r14), %eax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %rbx
	testq	%r13, %r13
	je	LBB0_1
## %bb.3:
	movq	%r15, -64(%rbp)                 ## 8-byte Spill
	cmpb	$10, -1(%r12,%r13)
	leaq	-1(%r13), %r15
	cmovneq	%r13, %r15
	cmpq	%r14, %r15
	jbe	LBB0_5
## %bb.4:
	movq	_ENAMETOOLONG@GOTPCREL(%rip), %rax
	jmp	LBB0_2
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_2:
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_10
LBB0_5:
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movq	8(%rax), %r14
	movl	(%rax), %eax
	movl	%eax, -52(%rbp)                 ## 4-byte Spill
	movq	%rbx, %rdi
	movq	%r12, %rsi
	movq	%r15, %rdx
	callq	_memcpy
	movb	$0, (%rbx,%r15)
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_iqs5xx_fw_file_write
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_10
## %bb.6:
	cmpl	$0, -52(%rbp)                   ## 4-byte Folded Reload
	je	LBB0_7
LBB0_9:
	movl	%r13d, %ebx
	jmp	LBB0_10
LBB0_7:
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %edi
	callq	_input_register_device
	testl	%eax, %eax
	je	LBB0_9
## %bb.8:
	movl	%eax, %ebx
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	movl	%eax, %edx
	callq	_dev_err
LBB0_10:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_12
## %bb.11:
	movl	%ebx, %eax
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_12:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_IQS5XX_FW_FILE_LEN,4,2         ## @IQS5XX_FW_FILE_LEN
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_ENAMETOOLONG,4,2               ## @ENAMETOOLONG
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to register device: %d\n"

	.no_dead_strip	_fw_file_store
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function fw_file_store
_fw_file_store:                         ; @fw_file_store
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	sub	sp, sp, #16
	mov	x19, x3
	mov	x22, x2
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-72]
	bl	_dev_get_drvdata
	mov	x21, x0
	ldr	x20, [x0, #8]
	ldr	w25, [x0]
Lloh3:
	adrp	x8, _IQS5XX_FW_FILE_LEN@GOTPAGE
Lloh4:
	ldr	x8, [x8, _IQS5XX_FW_FILE_LEN@GOTPAGEOFF]
Lloh5:
	ldrsw	x12, [x8]
	add	w8, w12, #1
	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	x23, x9, x8
	mov	sp, x23
	cbz	x19, LBB0_3
; %bb.1:
	sub	x8, x19, #1
	ldrb	w9, [x22, x8]
	cmp	w9, #10
	csel	x24, x8, x19, eq
	cmp	x24, x12
	b.ls	LBB0_5
; %bb.2:
Lloh8:
	adrp	x8, _ENAMETOOLONG@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ENAMETOOLONG@GOTPAGEOFF]
	b	LBB0_4
LBB0_3:
Lloh10:
	adrp	x8, _EINVAL@GOTPAGE
Lloh11:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_4:
	ldr	w8, [x8]
	neg	w22, w8
	b	LBB0_10
LBB0_5:
	mov	x0, x23
	mov	x1, x22
	mov	x2, x24
	bl	_memcpy
	strb	wzr, [x23, x24]
	mov	x0, x20
	mov	x1, x23
	bl	_iqs5xx_fw_file_write
	mov	x22, x0
	cbnz	w0, LBB0_10
; %bb.6:
	cbz	w25, LBB0_8
LBB0_7:
	mov	x22, x19
	b	LBB0_10
LBB0_8:
	ldr	w0, [x21]
	bl	_input_register_device
	cbz	w0, LBB0_7
; %bb.9:
	mov	x22, x0
Lloh12:
	adrp	x1, l_.str@PAGE
Lloh13:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	mov	x2, x22
	bl	_dev_err
LBB0_10:
	ldur	x8, [x29, #-72]
Lloh14:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh15:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh16:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_12
; %bb.11:
	mov	x0, x22
	sub	sp, x29, #64
	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
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_12:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_IQS5XX_FW_FILE_LEN,4,2         ; @IQS5XX_FW_FILE_LEN
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_ENAMETOOLONG,4,2               ; @ENAMETOOLONG
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to register device: %d\n"

	.no_dead_strip	_fw_file_store
.subsections_via_symbols
