	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function fetch_frame
_fetch_frame:                           ## @fetch_frame
	.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, %r13
	movq	_CPIA_COMMAND_GrabFrame@GOTPCREL(%rip), %r14
	movq	_CPIA_COMPRESSION_NONE@GOTPCREL(%rip), %r15
	xorl	%r12d, %r12d
	jmp	LBB0_1
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_1 Depth=1
	movl	(%r14), %esi
	movl	64(%r13), %ecx
	movq	%r13, %rdi
	xorl	%edx, %edx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	_do_command
	testq	%rax, %rax
	je	LBB0_8
LBB0_28:                                ##   in Loop: Header=BB0_1 Depth=1
	incl	%r12d
	cmpl	$3, %r12d
	je	LBB0_29
LBB0_1:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_11 Depth 2
	testl	%r12d, %r12d
	je	LBB0_3
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	leaq	L_.str(%rip), %rdi
	movl	%r12d, %esi
	callq	_DBG
LBB0_3:                                 ##   in Loop: Header=BB0_1 Depth=1
	cmpq	$0, 104(%r13)
	je	LBB0_28
## %bb.4:                               ##   in Loop: Header=BB0_1 Depth=1
	cmpl	$0, (%r13)
	je	LBB0_7
## %bb.5:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	(%r15), %rdx
	cmpq	%rdx, 32(%r13)
	je	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	_CPIA_COMMAND_SetCompression@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_NO_DECIMATION@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r13, %rdi
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	_do_command
	movq	_CPIA_COMMAND_DiscardFrame@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	_do_command
	jmp	LBB0_7
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_1 Depth=1
	movq	104(%r13), %rax
	cmpq	$0, 8(%rax)
	je	LBB0_17
## %bb.9:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	_CPIA_COMMAND_GetCameraStatus@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	_do_command
	movq	56(%r13), %rax
	movq	_STREAM_READY@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_17
## %bb.10:                              ##   in Loop: Header=BB0_1 Depth=1
	movl	$-1, %ebx
	.p2align	4, 0x90
LBB0_11:                                ##   Parent Loop BB0_1 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	incl	%ebx
	movq	_READY_TIMEOUT@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %ebx
	jge	LBB0_28
## %bb.12:                              ##   in Loop: Header=BB0_11 Depth=2
	movq	_STREAM_PAUSED@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_14
## %bb.13:                              ##   in Loop: Header=BB0_11 Depth=2
	movq	%r13, %rdi
	callq	_clear_stall
	testl	%eax, %eax
	je	LBB0_29
LBB0_14:                                ##   in Loop: Header=BB0_11 Depth=2
	xorl	%eax, %eax
	callq	_cond_resched
	movl	$10, %edi
	callq	_msleep_interruptible
	movq	_current@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_signal_pending
	testq	%rax, %rax
	jne	LBB0_15
## %bb.16:                              ##   in Loop: Header=BB0_11 Depth=2
	movq	_CPIA_COMMAND_GetCameraStatus@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	_do_command
	movq	56(%r13), %rax
	movq	_STREAM_READY@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_11
LBB0_17:                                ##   in Loop: Header=BB0_1 Depth=1
	xorl	%eax, %eax
	callq	_cond_resched
	movq	_jiffies@GOTPCREL(%rip), %r15
	movq	(%r15), %rbx
	movq	104(%r13), %rax
	movl	96(%r13), %esi
	movl	100(%r13), %edi
	xorl	%edx, %edx
	callq	*(%rax)
	movl	%eax, %r14d
	testl	%eax, %eax
	jle	LBB0_18
## %bb.19:                              ##   in Loop: Header=BB0_1 Depth=1
	movq	_HZ@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	imull	%r14d, %eax
	leal	1023(%rax), %ecx
	testl	%eax, %eax
	cmovnsl	%eax, %ecx
	sarl	$10, %ecx
	movslq	%ecx, %rax
	movq	(%r15), %rsi
	subq	%rbx, %rsi
	je	LBB0_23
## %bb.20:                              ##   in Loop: Header=BB0_1 Depth=1
	movq	%rax, %rdx
	orq	%rsi, %rdx
	shrq	$32, %rdx
	je	LBB0_21
## %bb.22:                              ##   in Loop: Header=BB0_1 Depth=1
	xorl	%edx, %edx
	divq	%rsi
	jmp	LBB0_23
LBB0_18:                                ##   in Loop: Header=BB0_1 Depth=1
	leaq	L_.str.1(%rip), %rdi
	movl	%r14d, %esi
	callq	_DBG
	movq	_CPIA_COMMAND_GrabFrame@GOTPCREL(%rip), %r14
	movq	_CPIA_COMPRESSION_NONE@GOTPCREL(%rip), %r15
	jmp	LBB0_28
LBB0_21:                                ##   in Loop: Header=BB0_1 Depth=1
	movl	%ecx, %eax
	xorl	%edx, %edx
	divl	%esi
                                        ## kill: def $eax killed $eax def $rax
LBB0_23:                                ##   in Loop: Header=BB0_1 Depth=1
	movq	_CPIA_COMPRESSION_NONE@GOTPCREL(%rip), %r15
	movq	%rax, 8(%r13)
	movq	%r13, %rdi
	callq	_restart_flicker
	cmpl	$2, 48(%r13)
	jne	LBB0_25
## %bb.24:                              ##   in Loop: Header=BB0_1 Depth=1
	movq	%r13, %rdi
	callq	_monitor_exposure
LBB0_25:                                ##   in Loop: Header=BB0_1 Depth=1
	movq	%r13, %rdi
	callq	_dispatch_commands
	movq	_CPIA_COMMAND_GetColourBalance@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	_do_command
	movq	_CPIA_COMMAND_GetExposure@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	_do_command
	movq	_CPIA_COMMAND_ReadMCPorts@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	_do_command
	xorl	%eax, %eax
	callq	_cond_resched
	movq	%r13, %rdi
	movl	%r14d, %esi
	callq	_parse_picture
	movl	%eax, 16(%r13)
	testl	%eax, %eax
	jg	LBB0_31
## %bb.26:                              ##   in Loop: Header=BB0_1 Depth=1
	leaq	L_.str.2(%rip), %rdi
	movl	%eax, %esi
	callq	_DBG
	movq	32(%r13), %rax
	cmpq	(%r15), %rax
	movq	_CPIA_COMMAND_GrabFrame@GOTPCREL(%rip), %r14
	je	LBB0_28
## %bb.27:                              ##   in Loop: Header=BB0_1 Depth=1
	movl	$1, (%r13)
	movq	_CPIA_COMMAND_SetGrabMode@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_CPIA_GRAB_SINGLE@GOTPCREL(%rip), %rax
	movq	(%rax), %rdx
	movq	%r13, %rdi
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	_do_command
	movl	$70, %edi
	callq	_msleep_interruptible
	movq	_current@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_signal_pending
	testq	%rax, %rax
	je	LBB0_28
LBB0_15:
	movq	_EINTR@GOTPCREL(%rip), %rax
	jmp	LBB0_30
LBB0_29:
	movq	_EIO@GOTPCREL(%rip), %rax
LBB0_30:
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_37:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_31:
	movq	24(%r13), %rax
	movq	88(%r13), %rcx
	shlq	$4, %rax
	movq	(%rcx,%rax), %rdx
	movq	_FRAME_READY@GOTPCREL(%rip), %rsi
	cmpq	(%rsi), %rdx
	jne	LBB0_33
## %bb.32:
	movl	8(%rcx,%rax), %edi
	movl	80(%r13), %edx
	movl	84(%r13), %esi
	callq	_memcpy
	movq	_FRAME_DONE@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	24(%r13), %rcx
	movq	88(%r13), %rdx
	shlq	$4, %rcx
	movq	%rax, (%rdx,%rcx)
	jmp	LBB0_34
LBB0_33:
	movq	_FRAME_DONE@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 72(%r13)
LBB0_34:
	cmpl	$0, (%r13)
	je	LBB0_35
## %bb.36:
	movl	$0, (%r13)
	movq	_CPIA_COMMAND_SetCompression@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	32(%r13), %rdx
	movl	40(%r13), %ecx
	xorl	%ebx, %ebx
	movq	%r13, %rdi
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	_do_command
	movq	_CPIA_COMMAND_SetGrabMode@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_CPIA_GRAB_CONTINUOUS@GOTPCREL(%rip), %rax
	movq	(%rax), %rdx
	movq	%r13, %rdi
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	_do_command
	jmp	LBB0_37
LBB0_35:
	xorl	%ebx, %ebx
	jmp	LBB0_37
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"retry=%d\n"

	.comm	_CPIA_COMPRESSION_NONE,8,3      ## @CPIA_COMPRESSION_NONE
	.comm	_CPIA_COMMAND_SetCompression,4,2 ## @CPIA_COMMAND_SetCompression
	.comm	_NO_DECIMATION,4,2              ## @NO_DECIMATION
	.comm	_CPIA_COMMAND_DiscardFrame,4,2  ## @CPIA_COMMAND_DiscardFrame
	.comm	_CPIA_COMMAND_GrabFrame,4,2     ## @CPIA_COMMAND_GrabFrame
	.comm	_CPIA_COMMAND_GetCameraStatus,4,2 ## @CPIA_COMMAND_GetCameraStatus
	.comm	_STREAM_READY,8,3               ## @STREAM_READY
	.comm	_READY_TIMEOUT,4,2              ## @READY_TIMEOUT
	.comm	_STREAM_PAUSED,8,3              ## @STREAM_PAUSED
	.comm	_EIO,4,2                        ## @EIO
	.comm	_current,4,2                    ## @current
	.comm	_EINTR,4,2                      ## @EINTR
	.comm	_jiffies,8,3                    ## @jiffies
L_.str.1:                               ## @.str.1
	.asciz	"streamRead failed: %d\n"

	.comm	_HZ,4,2                         ## @HZ
	.comm	_CPIA_COMMAND_GetColourBalance,4,2 ## @CPIA_COMMAND_GetColourBalance
	.comm	_CPIA_COMMAND_GetExposure,4,2   ## @CPIA_COMMAND_GetExposure
	.comm	_CPIA_COMMAND_ReadMCPorts,4,2   ## @CPIA_COMMAND_ReadMCPorts
L_.str.2:                               ## @.str.2
	.asciz	"parse_picture failed %d\n"

	.comm	_CPIA_COMMAND_SetGrabMode,4,2   ## @CPIA_COMMAND_SetGrabMode
	.comm	_CPIA_GRAB_SINGLE,8,3           ## @CPIA_GRAB_SINGLE
	.comm	_FRAME_READY,8,3                ## @FRAME_READY
	.comm	_FRAME_DONE,8,3                 ## @FRAME_DONE
	.comm	_CPIA_GRAB_CONTINUOUS,8,3       ## @CPIA_GRAB_CONTINUOUS
	.no_dead_strip	_fetch_frame
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function fetch_frame
_fetch_frame:                           ; @fetch_frame
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x0
	mov	w20, #0
Lloh0:
	adrp	x27, _CPIA_COMMAND_GrabFrame@GOTPAGE
Lloh1:
	ldr	x27, [x27, _CPIA_COMMAND_GrabFrame@GOTPAGEOFF]
Lloh2:
	adrp	x23, _jiffies@GOTPAGE
Lloh3:
	ldr	x23, [x23, _jiffies@GOTPAGEOFF]
Lloh4:
	adrp	x28, _CPIA_COMPRESSION_NONE@GOTPAGE
Lloh5:
	ldr	x28, [x28, _CPIA_COMPRESSION_NONE@GOTPAGEOFF]
Lloh6:
	adrp	x21, _current@GOTPAGE
Lloh7:
	ldr	x21, [x21, _current@GOTPAGEOFF]
Lloh8:
	adrp	x22, _CPIA_COMMAND_GetCameraStatus@GOTPAGE
Lloh9:
	ldr	x22, [x22, _CPIA_COMMAND_GetCameraStatus@GOTPAGEOFF]
Lloh10:
	adrp	x26, _STREAM_READY@GOTPAGE
Lloh11:
	ldr	x26, [x26, _STREAM_READY@GOTPAGEOFF]
Lloh12:
	adrp	x25, _READY_TIMEOUT@GOTPAGE
Lloh13:
	ldr	x25, [x25, _READY_TIMEOUT@GOTPAGEOFF]
	b	LBB0_3
LBB0_1:                                 ;   in Loop: Header=BB0_3 Depth=1
	ldr	w1, [x27]
	ldr	w3, [x19, #64]
	mov	x0, x19
	mov	x2, #0
	mov	w4, #0
	mov	w5, #0
	bl	_do_command
	cbz	x0, LBB0_9
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	w20, w20, #1
	cmp	w20, #3
	b.eq	LBB0_24
LBB0_3:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_12 Depth 2
	cbz	w20, LBB0_5
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
Lloh14:
	adrp	x0, l_.str@PAGE
Lloh15:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x20
	bl	_DBG
LBB0_5:                                 ;   in Loop: Header=BB0_3 Depth=1
	ldr	x8, [x19, #104]
	cbz	x8, LBB0_2
; %bb.6:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	w8, [x19]
	cbz	w8, LBB0_1
; %bb.7:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x8, [x19, #32]
	ldr	x2, [x28]
	cmp	x8, x2
	b.eq	LBB0_1
; %bb.8:                                ;   in Loop: Header=BB0_3 Depth=1
Lloh16:
	adrp	x8, _CPIA_COMMAND_SetCompression@GOTPAGE
Lloh17:
	ldr	x8, [x8, _CPIA_COMMAND_SetCompression@GOTPAGEOFF]
Lloh18:
	ldr	w1, [x8]
Lloh19:
	adrp	x8, _NO_DECIMATION@GOTPAGE
Lloh20:
	ldr	x8, [x8, _NO_DECIMATION@GOTPAGEOFF]
Lloh21:
	ldr	w3, [x8]
	mov	x0, x19
	mov	w4, #0
	mov	w5, #0
	bl	_do_command
Lloh22:
	adrp	x8, _CPIA_COMMAND_DiscardFrame@GOTPAGE
Lloh23:
	ldr	x8, [x8, _CPIA_COMMAND_DiscardFrame@GOTPAGEOFF]
Lloh24:
	ldr	w1, [x8]
	mov	x0, x19
	mov	x2, #0
	mov	w3, #0
	mov	w4, #0
	mov	w5, #0
	bl	_do_command
	b	LBB0_1
LBB0_9:                                 ;   in Loop: Header=BB0_3 Depth=1
	ldr	x8, [x19, #104]
	ldr	x8, [x8, #8]
	cbz	x8, LBB0_17
; %bb.10:                               ;   in Loop: Header=BB0_3 Depth=1
	ldr	w1, [x22]
	mov	x0, x19
	mov	x2, #0
	mov	w3, #0
	mov	w4, #0
	mov	w5, #0
	bl	_do_command
	ldr	x8, [x19, #56]
	ldr	x9, [x26]
	cmp	x8, x9
	b.eq	LBB0_17
; %bb.11:                               ;   in Loop: Header=BB0_3 Depth=1
	mov	w24, #-1
LBB0_12:                                ;   Parent Loop BB0_3 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	w9, [x25]
	add	w24, w24, #1
	cmp	w24, w9
	b.ge	LBB0_2
; %bb.13:                               ;   in Loop: Header=BB0_12 Depth=2
Lloh25:
	adrp	x9, _STREAM_PAUSED@GOTPAGE
Lloh26:
	ldr	x9, [x9, _STREAM_PAUSED@GOTPAGEOFF]
Lloh27:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_15
; %bb.14:                               ;   in Loop: Header=BB0_12 Depth=2
	mov	x0, x19
	bl	_clear_stall
	cbz	w0, LBB0_24
LBB0_15:                                ;   in Loop: Header=BB0_12 Depth=2
	bl	_cond_resched
	mov	w0, #10
	bl	_msleep_interruptible
	ldr	w0, [x21]
	bl	_signal_pending
	cbnz	x0, LBB0_25
; %bb.16:                               ;   in Loop: Header=BB0_12 Depth=2
	ldr	w1, [x22]
	mov	x0, x19
	mov	x2, #0
	mov	w3, #0
	mov	w4, #0
	mov	w5, #0
	bl	_do_command
	ldr	x8, [x19, #56]
	ldr	x9, [x26]
	cmp	x8, x9
	b.ne	LBB0_12
LBB0_17:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x25, x28
	mov	x28, x27
	bl	_cond_resched
	ldr	x27, [x23]
	ldr	x8, [x19, #104]
	ldr	x8, [x8]
	ldp	w1, w0, [x19, #96]
	mov	w2, #0
	blr	x8
	mov	x24, x0
	cmp	w0, #0
	b.le	LBB0_23
; %bb.18:                               ;   in Loop: Header=BB0_3 Depth=1
	mov	x26, x22
	mov	x22, x21
Lloh28:
	adrp	x8, _HZ@GOTPAGE
Lloh29:
	ldr	x8, [x8, _HZ@GOTPAGEOFF]
Lloh30:
	ldr	w8, [x8]
	mul	w8, w8, w24
	add	w9, w8, #1023
	cmp	w8, #0
	csel	w8, w9, w8, lt
	sbfx	x8, x8, #10, #22
	mov	x21, x23
	ldr	x9, [x23]
	subs	x9, x9, x27
	udiv	x9, x8, x9
	csel	x8, x8, x9, eq
	str	x8, [x19, #8]
	mov	x0, x19
	bl	_restart_flicker
	ldr	w8, [x19, #48]
	cmp	w8, #2
	b.ne	LBB0_20
; %bb.19:                               ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, x19
	bl	_monitor_exposure
LBB0_20:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, x19
	bl	_dispatch_commands
Lloh31:
	adrp	x8, _CPIA_COMMAND_GetColourBalance@GOTPAGE
Lloh32:
	ldr	x8, [x8, _CPIA_COMMAND_GetColourBalance@GOTPAGEOFF]
Lloh33:
	ldr	w1, [x8]
	mov	x0, x19
	mov	x2, #0
	mov	w3, #0
	mov	w4, #0
	mov	w5, #0
	bl	_do_command
Lloh34:
	adrp	x8, _CPIA_COMMAND_GetExposure@GOTPAGE
Lloh35:
	ldr	x8, [x8, _CPIA_COMMAND_GetExposure@GOTPAGEOFF]
Lloh36:
	ldr	w1, [x8]
	mov	x0, x19
	mov	x2, #0
	mov	w3, #0
	mov	w4, #0
	mov	w5, #0
	bl	_do_command
Lloh37:
	adrp	x8, _CPIA_COMMAND_ReadMCPorts@GOTPAGE
Lloh38:
	ldr	x8, [x8, _CPIA_COMMAND_ReadMCPorts@GOTPAGEOFF]
Lloh39:
	ldr	w1, [x8]
	mov	x0, x19
	mov	x2, #0
	mov	w3, #0
	mov	w4, #0
	mov	w5, #0
	bl	_do_command
	bl	_cond_resched
	mov	x0, x19
	mov	x1, x24
	bl	_parse_picture
	str	w0, [x19, #16]
	cmp	w0, #0
	b.gt	LBB0_28
; %bb.21:                               ;   in Loop: Header=BB0_3 Depth=1
	mov	x1, x0
	mov	x27, x28
Lloh40:
	adrp	x0, l_.str.2@PAGE
Lloh41:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_DBG
	ldr	x8, [x19, #32]
	mov	x28, x25
	ldr	x9, [x25]
	cmp	x8, x9
	mov	x23, x21
	mov	x21, x22
	mov	x22, x26
Lloh42:
	adrp	x26, _STREAM_READY@GOTPAGE
Lloh43:
	ldr	x26, [x26, _STREAM_READY@GOTPAGEOFF]
Lloh44:
	adrp	x25, _READY_TIMEOUT@GOTPAGE
Lloh45:
	ldr	x25, [x25, _READY_TIMEOUT@GOTPAGEOFF]
	b.eq	LBB0_2
; %bb.22:                               ;   in Loop: Header=BB0_3 Depth=1
	mov	w8, #1
	str	w8, [x19]
Lloh46:
	adrp	x8, _CPIA_COMMAND_SetGrabMode@GOTPAGE
Lloh47:
	ldr	x8, [x8, _CPIA_COMMAND_SetGrabMode@GOTPAGEOFF]
Lloh48:
	ldr	w1, [x8]
Lloh49:
	adrp	x8, _CPIA_GRAB_SINGLE@GOTPAGE
Lloh50:
	ldr	x8, [x8, _CPIA_GRAB_SINGLE@GOTPAGEOFF]
Lloh51:
	ldr	x2, [x8]
	mov	x0, x19
	mov	w3, #0
	mov	w4, #0
	mov	w5, #0
	bl	_do_command
	mov	w0, #70
	bl	_msleep_interruptible
	ldr	w0, [x21]
	bl	_signal_pending
	cbz	x0, LBB0_2
	b	LBB0_25
LBB0_23:                                ;   in Loop: Header=BB0_3 Depth=1
Lloh52:
	adrp	x0, l_.str.1@PAGE
Lloh53:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x1, x24
	bl	_DBG
	mov	x27, x28
	mov	x28, x25
Lloh54:
	adrp	x25, _READY_TIMEOUT@GOTPAGE
Lloh55:
	ldr	x25, [x25, _READY_TIMEOUT@GOTPAGEOFF]
	b	LBB0_2
LBB0_24:
Lloh56:
	adrp	x8, _EIO@GOTPAGE
Lloh57:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
	b	LBB0_26
LBB0_25:
Lloh58:
	adrp	x8, _EINTR@GOTPAGE
Lloh59:
	ldr	x8, [x8, _EINTR@GOTPAGEOFF]
LBB0_26:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_27:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
LBB0_28:
	ldr	x8, [x19, #88]
	ldr	x9, [x19, #24]
	lsl	x10, x9, #4
	ldr	x10, [x8, x10]
Lloh60:
	adrp	x11, _FRAME_READY@GOTPAGE
Lloh61:
	ldr	x11, [x11, _FRAME_READY@GOTPAGEOFF]
Lloh62:
	ldr	x11, [x11]
	cmp	x10, x11
	b.ne	LBB0_30
; %bb.29:
	add	x8, x8, x9, lsl #4
	ldr	w0, [x8, #8]
	ldp	w2, w1, [x19, #80]
	bl	_memcpy
Lloh63:
	adrp	x8, _FRAME_DONE@GOTPAGE
Lloh64:
	ldr	x8, [x8, _FRAME_DONE@GOTPAGEOFF]
Lloh65:
	ldr	x8, [x8]
	ldr	x9, [x19, #88]
	ldr	x10, [x19, #24]
	lsl	x10, x10, #4
	str	x8, [x9, x10]
	b	LBB0_31
LBB0_30:
Lloh66:
	adrp	x8, _FRAME_DONE@GOTPAGE
Lloh67:
	ldr	x8, [x8, _FRAME_DONE@GOTPAGEOFF]
Lloh68:
	ldr	x8, [x8]
	str	x8, [x19, #72]
LBB0_31:
	ldr	w8, [x19]
	cbz	w8, LBB0_33
; %bb.32:
	str	wzr, [x19]
Lloh69:
	adrp	x8, _CPIA_COMMAND_SetCompression@GOTPAGE
Lloh70:
	ldr	x8, [x8, _CPIA_COMMAND_SetCompression@GOTPAGEOFF]
Lloh71:
	ldr	w1, [x8]
	ldr	x2, [x19, #32]
	ldr	w3, [x19, #40]
	mov	x0, x19
	mov	w4, #0
	mov	w5, #0
	bl	_do_command
Lloh72:
	adrp	x8, _CPIA_COMMAND_SetGrabMode@GOTPAGE
Lloh73:
	ldr	x8, [x8, _CPIA_COMMAND_SetGrabMode@GOTPAGEOFF]
Lloh74:
	ldr	w1, [x8]
Lloh75:
	adrp	x8, _CPIA_GRAB_CONTINUOUS@GOTPAGE
Lloh76:
	ldr	x8, [x8, _CPIA_GRAB_CONTINUOUS@GOTPAGEOFF]
Lloh77:
	ldr	x2, [x8]
	mov	x0, x19
	mov	w3, #0
	mov	w4, #0
	mov	w5, #0
	bl	_do_command
LBB0_33:
	mov	w0, #0
	b	LBB0_27
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh39
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGot	Lloh44, Lloh45
	.loh AdrpLdrGot	Lloh42, Lloh43
	.loh AdrpAdd	Lloh40, Lloh41
	.loh AdrpLdrGotLdr	Lloh49, Lloh50, Lloh51
	.loh AdrpLdrGotLdr	Lloh46, Lloh47, Lloh48
	.loh AdrpLdrGot	Lloh54, Lloh55
	.loh AdrpAdd	Lloh52, Lloh53
	.loh AdrpLdrGot	Lloh56, Lloh57
	.loh AdrpLdrGot	Lloh58, Lloh59
	.loh AdrpLdrGotLdr	Lloh60, Lloh61, Lloh62
	.loh AdrpLdrGotLdr	Lloh63, Lloh64, Lloh65
	.loh AdrpLdrGotLdr	Lloh66, Lloh67, Lloh68
	.loh AdrpLdrGotLdr	Lloh75, Lloh76, Lloh77
	.loh AdrpLdrGotLdr	Lloh72, Lloh73, Lloh74
	.loh AdrpLdrGotLdr	Lloh69, Lloh70, Lloh71
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"retry=%d\n"

	.comm	_CPIA_COMPRESSION_NONE,8,3      ; @CPIA_COMPRESSION_NONE
	.comm	_CPIA_COMMAND_SetCompression,4,2 ; @CPIA_COMMAND_SetCompression
	.comm	_NO_DECIMATION,4,2              ; @NO_DECIMATION
	.comm	_CPIA_COMMAND_DiscardFrame,4,2  ; @CPIA_COMMAND_DiscardFrame
	.comm	_CPIA_COMMAND_GrabFrame,4,2     ; @CPIA_COMMAND_GrabFrame
	.comm	_CPIA_COMMAND_GetCameraStatus,4,2 ; @CPIA_COMMAND_GetCameraStatus
	.comm	_STREAM_READY,8,3               ; @STREAM_READY
	.comm	_READY_TIMEOUT,4,2              ; @READY_TIMEOUT
	.comm	_STREAM_PAUSED,8,3              ; @STREAM_PAUSED
	.comm	_EIO,4,2                        ; @EIO
	.comm	_current,4,2                    ; @current
	.comm	_EINTR,4,2                      ; @EINTR
	.comm	_jiffies,8,3                    ; @jiffies
l_.str.1:                               ; @.str.1
	.asciz	"streamRead failed: %d\n"

	.comm	_HZ,4,2                         ; @HZ
	.comm	_CPIA_COMMAND_GetColourBalance,4,2 ; @CPIA_COMMAND_GetColourBalance
	.comm	_CPIA_COMMAND_GetExposure,4,2   ; @CPIA_COMMAND_GetExposure
	.comm	_CPIA_COMMAND_ReadMCPorts,4,2   ; @CPIA_COMMAND_ReadMCPorts
l_.str.2:                               ; @.str.2
	.asciz	"parse_picture failed %d\n"

	.comm	_CPIA_COMMAND_SetGrabMode,4,2   ; @CPIA_COMMAND_SetGrabMode
	.comm	_CPIA_GRAB_SINGLE,8,3           ; @CPIA_GRAB_SINGLE
	.comm	_FRAME_READY,8,3                ; @FRAME_READY
	.comm	_FRAME_DONE,8,3                 ; @FRAME_DONE
	.comm	_CPIA_GRAB_CONTINUOUS,8,3       ; @CPIA_GRAB_CONTINUOUS
	.no_dead_strip	_fetch_frame
.subsections_via_symbols
