	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function m5mols_fw_start
_m5mols_fw_start:                       ## @m5mols_fw_start
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	callq	_to_m5mols
	movq	%rax, %r14
	leaq	4(%rax), %rdi
	xorl	%esi, %esi
	callq	_atomic_set
	movq	_FLASH_CAM_START@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	movq	_REG_IN_FLASH_MODE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_M5MOLS_I2C_RDY_WAIT_FL@GOTPCREL(%rip), %rax
	movl	$255, %ecx
	orl	(%rax), %ecx
	movq	%rbx, %rdi
	movl	$-1, %r8d
	callq	_m5mols_busy_wait
	testl	%eax, %eax
	jne	LBB0_3
## %bb.1:
	movl	(%r15), %esi
	movq	_REG_START_ARM_BOOT@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	callq	_m5mols_write
	testl	%eax, %eax
	je	LBB0_2
LBB0_3:
	testl	%eax, %eax
	js	LBB0_7
LBB0_4:
	movl	$1, (%r14)
	movq	%rbx, %rdi
	callq	_m5mols_get_version
	testl	%eax, %eax
	jne	LBB0_7
## %bb.5:
	movq	_m5mols_sensor_power@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_m5mols_update_fw
	testl	%eax, %eax
	jne	LBB0_7
## %bb.6:
	movq	_m5mols_debug@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rcx
	movl	$1, %edi
	movq	%rbx, %rdx
	callq	_v4l2_dbg
	movq	_PARM_INTERFACE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_REG_INTERFACE_MIPI@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	callq	_m5mols_write
	testl	%eax, %eax
	jne	LBB0_7
## %bb.8:
	movq	_REG_INT_AF@GOTPCREL(%rip), %rax
	movq	_REG_INT_CAPTURE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	orl	(%rax), %esi
	movq	%rbx, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_m5mols_enable_interrupt        ## TAILCALL
LBB0_2:
	movq	_REG_INT_MODE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	movl	$2000, %edx                     ## imm = 0x7D0
	callq	_m5mols_wait_interrupt
	testl	%eax, %eax
	jns	LBB0_4
LBB0_7:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_FLASH_CAM_START,4,2            ## @FLASH_CAM_START
	.comm	_REG_IN_FLASH_MODE,4,2          ## @REG_IN_FLASH_MODE
	.comm	_M5MOLS_I2C_RDY_WAIT_FL,4,2     ## @M5MOLS_I2C_RDY_WAIT_FL
	.comm	_REG_START_ARM_BOOT,4,2         ## @REG_START_ARM_BOOT
	.comm	_REG_INT_MODE,4,2               ## @REG_INT_MODE
	.comm	_m5mols_sensor_power,4,2        ## @m5mols_sensor_power
	.comm	_m5mols_debug,4,2               ## @m5mols_debug
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Success ARM Booting\n"

	.comm	_PARM_INTERFACE,4,2             ## @PARM_INTERFACE
	.comm	_REG_INTERFACE_MIPI,4,2         ## @REG_INTERFACE_MIPI
	.comm	_REG_INT_AF,4,2                 ## @REG_INT_AF
	.comm	_REG_INT_CAPTURE,4,2            ## @REG_INT_CAPTURE
	.no_dead_strip	_m5mols_fw_start
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function m5mols_fw_start
_m5mols_fw_start:                       ; @m5mols_fw_start
	.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, x0
	bl	_to_m5mols
	mov	x20, x0
	add	x0, x0, #4
	mov	w1, #0
	bl	_atomic_set
Lloh0:
	adrp	x21, _FLASH_CAM_START@GOTPAGE
Lloh1:
	ldr	x21, [x21, _FLASH_CAM_START@GOTPAGEOFF]
Lloh2:
	adrp	x8, _REG_IN_FLASH_MODE@GOTPAGE
Lloh3:
	ldr	x8, [x8, _REG_IN_FLASH_MODE@GOTPAGEOFF]
	ldr	w1, [x21]
Lloh4:
	ldr	w2, [x8]
Lloh5:
	adrp	x8, _M5MOLS_I2C_RDY_WAIT_FL@GOTPAGE
Lloh6:
	ldr	x8, [x8, _M5MOLS_I2C_RDY_WAIT_FL@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	orr	w3, w8, #0xff
	mov	x0, x19
	mov	w4, #-1
	bl	_m5mols_busy_wait
	cbnz	w0, LBB0_2
; %bb.1:
	ldr	w1, [x21]
Lloh8:
	adrp	x8, _REG_START_ARM_BOOT@GOTPAGE
Lloh9:
	ldr	x8, [x8, _REG_START_ARM_BOOT@GOTPAGEOFF]
Lloh10:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_m5mols_write
	cbz	w0, LBB0_7
LBB0_2:
	tbnz	w0, #31, LBB0_8
LBB0_3:
	mov	w8, #1
	str	w8, [x20]
	mov	x0, x19
	bl	_m5mols_get_version
	cbnz	w0, LBB0_8
; %bb.4:
Lloh11:
	adrp	x8, _m5mols_sensor_power@GOTPAGE
Lloh12:
	ldr	x8, [x8, _m5mols_sensor_power@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_m5mols_update_fw
	cbnz	w0, LBB0_8
; %bb.5:
Lloh14:
	adrp	x8, _m5mols_debug@GOTPAGE
Lloh15:
	ldr	x8, [x8, _m5mols_debug@GOTPAGEOFF]
Lloh16:
	ldr	w1, [x8]
Lloh17:
	adrp	x3, l_.str@PAGE
Lloh18:
	add	x3, x3, l_.str@PAGEOFF
	mov	w0, #1
	mov	x2, x19
	bl	_v4l2_dbg
Lloh19:
	adrp	x8, _PARM_INTERFACE@GOTPAGE
Lloh20:
	ldr	x8, [x8, _PARM_INTERFACE@GOTPAGEOFF]
Lloh21:
	ldr	w1, [x8]
Lloh22:
	adrp	x8, _REG_INTERFACE_MIPI@GOTPAGE
Lloh23:
	ldr	x8, [x8, _REG_INTERFACE_MIPI@GOTPAGEOFF]
Lloh24:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_m5mols_write
	cbnz	w0, LBB0_8
; %bb.6:
Lloh25:
	adrp	x8, _REG_INT_AF@GOTPAGE
Lloh26:
	ldr	x8, [x8, _REG_INT_AF@GOTPAGEOFF]
Lloh27:
	ldr	w8, [x8]
Lloh28:
	adrp	x9, _REG_INT_CAPTURE@GOTPAGE
Lloh29:
	ldr	x9, [x9, _REG_INT_CAPTURE@GOTPAGEOFF]
Lloh30:
	ldr	w9, [x9]
	orr	w1, w9, w8
	mov	x0, x19
	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	_m5mols_enable_interrupt
LBB0_7:
Lloh31:
	adrp	x8, _REG_INT_MODE@GOTPAGE
Lloh32:
	ldr	x8, [x8, _REG_INT_MODE@GOTPAGEOFF]
Lloh33:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #2000
	bl	_m5mols_wait_interrupt
	tbz	w0, #31, LBB0_3
LBB0_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
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.cfi_endproc
                                        ; -- End function
	.comm	_FLASH_CAM_START,4,2            ; @FLASH_CAM_START
	.comm	_REG_IN_FLASH_MODE,4,2          ; @REG_IN_FLASH_MODE
	.comm	_M5MOLS_I2C_RDY_WAIT_FL,4,2     ; @M5MOLS_I2C_RDY_WAIT_FL
	.comm	_REG_START_ARM_BOOT,4,2         ; @REG_START_ARM_BOOT
	.comm	_REG_INT_MODE,4,2               ; @REG_INT_MODE
	.comm	_m5mols_sensor_power,4,2        ; @m5mols_sensor_power
	.comm	_m5mols_debug,4,2               ; @m5mols_debug
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Success ARM Booting\n"

	.comm	_PARM_INTERFACE,4,2             ; @PARM_INTERFACE
	.comm	_REG_INTERFACE_MIPI,4,2         ; @REG_INTERFACE_MIPI
	.comm	_REG_INT_AF,4,2                 ; @REG_INT_AF
	.comm	_REG_INT_CAPTURE,4,2            ; @REG_INT_CAPTURE
	.no_dead_strip	_m5mols_fw_start
.subsections_via_symbols
