	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function s5c73m3_fw_update_from
_s5c73m3_fw_update_from:                ## @s5c73m3_fw_update_from
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r12
	movq	_COMM_FW_UPDATE_NOT_READY@GOTPCREL(%rip), %r15
	movl	(%r15), %r13d
	movl	%r13d, -44(%rbp)
	leaq	L_.str(%rip), %rsi
	callq	_v4l2_warn
	movl	$499, %ebx                      ## imm = 0x1F3
	leaq	-44(%rbp), %r14
	cmpl	(%r15), %r13d
	jne	LBB0_3
	.p2align	4, 0x90
LBB0_2:
	movq	_COMM_FW_UPDATE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	xorl	%edx, %edx
	callq	_s5c73m3_isp_command
	testl	%eax, %eax
	js	LBB0_12
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r12, %rdi
	movl	$612614, %esi                   ## imm = 0x95906
	movq	%r14, %rdx
	callq	_s5c73m3_read
	testl	%eax, %eax
	js	LBB0_12
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movl	-44(%rbp), %eax
	cmpl	$128, %eax
	je	LBB0_7
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	cmpl	$129, %eax
	je	LBB0_6
## %bb.8:                               ##   in Loop: Header=BB0_3 Depth=1
	movl	$20, %edi
	callq	_msleep
	subl	$1, %ebx
	jb	LBB0_10
## %bb.9:                               ##   in Loop: Header=BB0_3 Depth=1
	movl	-44(%rbp), %r13d
	cmpl	(%r15), %r13d
	je	LBB0_2
	jmp	LBB0_3
LBB0_7:
	leaq	L_.str.2(%rip), %rsi
	movq	%r12, %rdi
	callq	_v4l2_warn
	xorl	%eax, %eax
	jmp	LBB0_12
LBB0_6:
	leaq	L_.str.1(%rip), %rsi
	movq	%r12, %rdi
	callq	_v4l2_warn
	movq	_EIO@GOTPCREL(%rip), %rcx
	jmp	LBB0_11
LBB0_10:
	leaq	L_.str.3(%rip), %rsi
	movq	%r12, %rdi
	callq	_v4l2_warn
	movq	_ETIMEDOUT@GOTPCREL(%rip), %rcx
LBB0_11:
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_12:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_COMM_FW_UPDATE_NOT_READY,4,2   ## @COMM_FW_UPDATE_NOT_READY
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Updating F-ROM firmware.\n"

	.comm	_COMM_FW_UPDATE,4,2             ## @COMM_FW_UPDATE
L_.str.1:                               ## @.str.1
	.asciz	"Updating F-ROM firmware failed.\n"

	.comm	_EIO,4,2                        ## @EIO
L_.str.2:                               ## @.str.2
	.asciz	"Updating F-ROM firmware finished.\n"

L_.str.3:                               ## @.str.3
	.asciz	"Updating F-ROM firmware timed-out.\n"

	.comm	_ETIMEDOUT,4,2                  ## @ETIMEDOUT
	.no_dead_strip	_s5c73m3_fw_update_from
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function s5c73m3_fw_update_from
_s5c73m3_fw_update_from:                ; @s5c73m3_fw_update_from
	.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
Lloh0:
	adrp	x20, _COMM_FW_UPDATE_NOT_READY@GOTPAGE
Lloh1:
	ldr	x20, [x20, _COMM_FW_UPDATE_NOT_READY@GOTPAGEOFF]
	ldr	w23, [x20]
	str	w23, [sp, #12]
Lloh2:
	adrp	x1, l_.str@PAGE
Lloh3:
	add	x1, x1, l_.str@PAGEOFF
	bl	_v4l2_warn
	mov	w21, #499
Lloh4:
	adrp	x22, _COMM_FW_UPDATE@GOTPAGE
Lloh5:
	ldr	x22, [x22, _COMM_FW_UPDATE@GOTPAGEOFF]
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w8, [x20]
	cmp	w23, w8
	b.ne	LBB0_3
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	ldr	w1, [x22]
	mov	x0, x19
	mov	w2, #0
	bl	_s5c73m3_isp_command
	tbnz	w0, #31, LBB0_12
LBB0_3:                                 ;   in Loop: Header=BB0_1 Depth=1
	add	x2, sp, #12
	mov	x0, x19
	mov	w1, #22790
	movk	w1, #9, lsl #16
	bl	_s5c73m3_read
	tbnz	w0, #31, LBB0_12
; %bb.4:                                ;   in Loop: Header=BB0_1 Depth=1
	ldr	w8, [sp, #12]
	cmp	w8, #128
	b.eq	LBB0_8
; %bb.5:                                ;   in Loop: Header=BB0_1 Depth=1
	cmp	w8, #129
	b.eq	LBB0_9
; %bb.6:                                ;   in Loop: Header=BB0_1 Depth=1
	mov	w0, #20
	bl	_msleep
	cbz	w21, LBB0_10
; %bb.7:                                ;   in Loop: Header=BB0_1 Depth=1
	ldr	w23, [sp, #12]
	sub	w21, w21, #1
	b	LBB0_1
LBB0_8:
Lloh6:
	adrp	x1, l_.str.2@PAGE
Lloh7:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x19
	bl	_v4l2_warn
	mov	w0, #0
	b	LBB0_12
LBB0_9:
Lloh8:
	adrp	x1, l_.str.1@PAGE
Lloh9:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_v4l2_warn
Lloh10:
	adrp	x8, _EIO@GOTPAGE
Lloh11:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
	b	LBB0_11
LBB0_10:
Lloh12:
	adrp	x1, l_.str.3@PAGE
Lloh13:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x19
	bl	_v4l2_warn
Lloh14:
	adrp	x8, _ETIMEDOUT@GOTPAGE
Lloh15:
	ldr	x8, [x8, _ETIMEDOUT@GOTPAGEOFF]
LBB0_11:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_12:
	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	Lloh4, Lloh5
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpAdd	Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_COMM_FW_UPDATE_NOT_READY,4,2   ; @COMM_FW_UPDATE_NOT_READY
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Updating F-ROM firmware.\n"

	.comm	_COMM_FW_UPDATE,4,2             ; @COMM_FW_UPDATE
l_.str.1:                               ; @.str.1
	.asciz	"Updating F-ROM firmware failed.\n"

	.comm	_EIO,4,2                        ; @EIO
l_.str.2:                               ; @.str.2
	.asciz	"Updating F-ROM firmware finished.\n"

l_.str.3:                               ; @.str.3
	.asciz	"Updating F-ROM firmware timed-out.\n"

	.comm	_ETIMEDOUT,4,2                  ; @ETIMEDOUT
	.no_dead_strip	_s5c73m3_fw_update_from
.subsections_via_symbols
