	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mchip_get_picture
_mchip_get_picture:                     ## @mchip_get_picture
	.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
	movl	%esi, %r14d
	movq	%rdi, %r15
	movq	_MCHIP_HIC_MODE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_MCHIP_HIC_MODE_STILL_OUT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_mchip_set
	movq	_MCHIP_HIC_CMD@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edi
	movq	_MCHIP_HIC_CMD_START@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_mchip_set
	movl	(%rbx), %edi
	xorl	%esi, %esi
	callq	_mchip_delay
	movl	$100, %ebx
	movq	_MCHIP_HIC_STATUS@GOTPCREL(%rip), %r12
	movq	_MCHIP_HIC_STATUS_IDLE@GOTPCREL(%rip), %r13
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r12), %edi
	movl	(%r13), %esi
	callq	_mchip_delay
	testq	%rax, %rax
	jne	LBB0_3
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	movl	$1, %edi
	callq	_msleep
	decl	%ebx
	jne	LBB0_1
LBB0_3:
	xorl	%eax, %eax
	callq	_mchip_get_frame
	movq	_MCHIP_MM_FIR_RDY@GOTPCREL(%rip), %rbx
	testl	%eax, (%rbx)
	jne	LBB0_8
## %bb.4:
	xorl	%eax, %eax
	callq	_mchip_free_frame
	xorl	%eax, %eax
	callq	_mchip_get_frame
	testl	%eax, (%rbx)
	jne	LBB0_8
## %bb.5:
	xorl	%eax, %eax
	callq	_mchip_free_frame
	xorl	%eax, %eax
	callq	_mchip_get_frame
	testl	%eax, (%rbx)
	jne	LBB0_8
## %bb.6:
	xorl	%eax, %eax
	callq	_mchip_free_frame
	xorl	%eax, %eax
	callq	_mchip_get_frame
	testl	%eax, (%rbx)
	je	LBB0_7
LBB0_8:
	movl	%eax, %edi
	movq	%r15, %rsi
	movl	%r14d, %edx
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_mchip_cont_read_frame          ## TAILCALL
LBB0_7:
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_mchip_free_frame               ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_MCHIP_HIC_MODE,4,2             ## @MCHIP_HIC_MODE
	.comm	_MCHIP_HIC_MODE_STILL_OUT,4,2   ## @MCHIP_HIC_MODE_STILL_OUT
	.comm	_MCHIP_HIC_CMD,4,2              ## @MCHIP_HIC_CMD
	.comm	_MCHIP_HIC_CMD_START,4,2        ## @MCHIP_HIC_CMD_START
	.comm	_MCHIP_HIC_STATUS,4,2           ## @MCHIP_HIC_STATUS
	.comm	_MCHIP_HIC_STATUS_IDLE,4,2      ## @MCHIP_HIC_STATUS_IDLE
	.comm	_MCHIP_MM_FIR_RDY,4,2           ## @MCHIP_MM_FIR_RDY
	.no_dead_strip	_mchip_get_picture
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mchip_get_picture
_mchip_get_picture:                     ; @mchip_get_picture
	.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
	mov	x19, x1
	mov	x20, x0
Lloh0:
	adrp	x8, _MCHIP_HIC_MODE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MCHIP_HIC_MODE@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
Lloh3:
	adrp	x8, _MCHIP_HIC_MODE_STILL_OUT@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MCHIP_HIC_MODE_STILL_OUT@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	bl	_mchip_set
Lloh6:
	adrp	x21, _MCHIP_HIC_CMD@GOTPAGE
Lloh7:
	ldr	x21, [x21, _MCHIP_HIC_CMD@GOTPAGEOFF]
	ldr	w0, [x21]
Lloh8:
	adrp	x8, _MCHIP_HIC_CMD_START@GOTPAGE
Lloh9:
	ldr	x8, [x8, _MCHIP_HIC_CMD_START@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	bl	_mchip_set
	ldr	w0, [x21]
	mov	w1, #0
	bl	_mchip_delay
	mov	w21, #100
Lloh11:
	adrp	x22, _MCHIP_HIC_STATUS@GOTPAGE
Lloh12:
	ldr	x22, [x22, _MCHIP_HIC_STATUS@GOTPAGEOFF]
Lloh13:
	adrp	x23, _MCHIP_HIC_STATUS_IDLE@GOTPAGE
Lloh14:
	ldr	x23, [x23, _MCHIP_HIC_STATUS_IDLE@GOTPAGEOFF]
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x22]
	ldr	w1, [x23]
	bl	_mchip_delay
	cbnz	x0, LBB0_3
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	mov	w0, #1
	bl	_msleep
	subs	w21, w21, #1
	b.ne	LBB0_1
LBB0_3:
	bl	_mchip_get_frame
Lloh15:
	adrp	x21, _MCHIP_MM_FIR_RDY@GOTPAGE
Lloh16:
	ldr	x21, [x21, _MCHIP_MM_FIR_RDY@GOTPAGEOFF]
	ldr	w8, [x21]
	tst	w8, w0
	b.ne	LBB0_7
; %bb.4:
	bl	_mchip_free_frame
	bl	_mchip_get_frame
	ldr	w8, [x21]
	tst	w8, w0
	b.ne	LBB0_7
; %bb.5:
	bl	_mchip_free_frame
	bl	_mchip_get_frame
	ldr	w8, [x21]
	tst	w8, w0
	b.ne	LBB0_7
; %bb.6:
	bl	_mchip_free_frame
	bl	_mchip_get_frame
	ldr	w8, [x21]
	tst	w8, w0
	b.eq	LBB0_8
LBB0_7:
	mov	x1, x20
	mov	x2, x19
	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
	b	_mchip_cont_read_frame
LBB0_8:
	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
	b	_mchip_free_frame
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_MCHIP_HIC_MODE,4,2             ; @MCHIP_HIC_MODE
	.comm	_MCHIP_HIC_MODE_STILL_OUT,4,2   ; @MCHIP_HIC_MODE_STILL_OUT
	.comm	_MCHIP_HIC_CMD,4,2              ; @MCHIP_HIC_CMD
	.comm	_MCHIP_HIC_CMD_START,4,2        ; @MCHIP_HIC_CMD_START
	.comm	_MCHIP_HIC_STATUS,4,2           ; @MCHIP_HIC_STATUS
	.comm	_MCHIP_HIC_STATUS_IDLE,4,2      ; @MCHIP_HIC_STATUS_IDLE
	.comm	_MCHIP_MM_FIR_RDY,4,2           ; @MCHIP_MM_FIR_RDY
	.no_dead_strip	_mchip_get_picture
.subsections_via_symbols
