	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function stv680_do_ioctl
_stv680_do_ioctl:                       ## @stv680_do_ioctl
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r14
	movl	%esi, %ebx
	movq	(%rdi), %rdi
	callq	_video_get_drvdata
	cmpl	$0, 44(%rax)
	je	LBB0_4
## %bb.1:
	addl	$-128, %ebx
	cmpl	$19, %ebx
	ja	LBB0_8
## %bb.2:
	movq	%rax, %r15
	xorl	%r12d, %r12d
	leaq	LJTI0_0(%rip), %rax
	movslq	(%rax,%rbx,4), %rcx
	addq	%rax, %rcx
	jmpq	*%rcx
LBB0_3:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_5
LBB0_4:
	movq	_EIO@GOTPCREL(%rip), %rax
LBB0_5:
	xorl	%r12d, %r12d
LBB0_6:
	subq	(%rax), %r12
LBB0_7:
	movq	%r12, %rax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	movq	_ENOIOCTLCMD@GOTPCREL(%rip), %rax
	jmp	LBB0_5
LBB0_9:
	movl	(%r14), %esi
	testl	%esi, %esi
	js	LBB0_36
## %bb.10:
	movq	_STV680_NUMFRAMES@GOTPCREL(%rip), %rax
	cmpl	(%rax), %esi
	jge	LBB0_36
## %bb.11:
	movq	%r15, %rdi
	callq	_stv680_newframe
	movq	_FRAME_UNUSED@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movq	24(%r15), %rdx
	movslq	(%r14), %rsi
	movl	%ecx, (%rdx,%rsi,4)
	movslq	%eax, %r12
	jmp	LBB0_7
LBB0_12:
	cmpl	$0, 12(%r14)
	jne	LBB0_3
## %bb.13:
	cmpl	$0, 8(%r14)
	jne	LBB0_3
## %bb.14:
	movl	4(%r14), %esi
	cmpl	36(%r15), %esi
	je	LBB0_15
## %bb.44:
	movl	(%r14), %edx
	movq	%r15, %rdi
	callq	_stv680_set_size
	testl	%eax, %eax
	je	LBB0_15
## %bb.45:
	leaq	L_.str.1(%rip), %rsi
	jmp	LBB0_42
LBB0_16:
	movq	%r15, %rdi
	movq	%r14, %rsi
	callq	_stv680_set_pict
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%r12d, %r12d
	subq	(%rcx), %r12
	xorl	%ecx, %ecx
	testl	%eax, %eax
	cmoveq	%rcx, %r12
	jmp	LBB0_7
LBB0_17:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ecx, %ecx
	xorl	%r12d, %r12d
	subq	(%rax), %r12
	cmpl	$0, (%r14)
	cmoveq	%rcx, %r12
	jmp	LBB0_7
LBB0_18:
	movl	(%r14), %edx
	movq	_STV_VIDEO_PALETTE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	cmpl	%ecx, %edx
	jne	LBB0_37
## %bb.19:
	movslq	4(%r14), %rax
	movq	_STV680_NUMFRAMES@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jge	LBB0_41
## %bb.20:
	movq	24(%r15), %rcx
	movl	(%rcx,%rax,4), %edx
	movq	_FRAME_ERROR@GOTPCREL(%rip), %rsi
	cmpl	(%rsi), %edx
	je	LBB0_43
## %bb.21:
	movq	_FRAME_GRABBING@GOTPCREL(%rip), %rsi
	cmpl	(%rsi), %edx
	je	LBB0_43
## %bb.22:
	movl	12(%r14), %esi
	cmpl	%esi, 36(%r15)
	je	LBB0_48
## %bb.23:
	movl	8(%r14), %edx
	movq	%r15, %rdi
	callq	_stv680_set_size
	testl	%eax, %eax
	je	LBB0_47
## %bb.24:
	leaq	L_.str.6(%rip), %rsi
	jmp	LBB0_42
LBB0_25:
	xorps	%xmm0, %xmm0
	movups	%xmm0, 8(%r14)
	movl	$0, 24(%r14)
	movl	36(%r15), %eax
	movl	%eax, 4(%r14)
	movl	40(%r15), %eax
	movl	%eax, (%r14)
	xorl	%r12d, %r12d
	jmp	LBB0_7
LBB0_26:
	movq	%r15, %rdi
	movq	%r14, %rsi
	callq	_stv680_get_pict
	xorl	%r12d, %r12d
	jmp	LBB0_7
LBB0_27:
	xorl	%r12d, %r12d
	movq	%r14, %rdi
	xorl	%esi, %esi
	movl	$16, %edx
	callq	_memset
	movq	_STV680_NUMFRAMES@GOTPCREL(%rip), %rax
	movl	16(%r15), %ecx
	imull	(%rax), %ecx
	movl	%ecx, (%r14)
	movl	(%rax), %ecx
	movl	%ecx, 4(%r14)
	testl	%ecx, %ecx
	jle	LBB0_7
## %bb.28:
	movq	8(%r14), %rcx
	movl	$0, (%rcx)
	cmpl	$2, (%rax)
	jl	LBB0_15
## %bb.29:
	movl	$1, %edx
	xorl	%r12d, %r12d
	.p2align	4, 0x90
LBB0_30:                                ## =>This Inner Loop Header: Depth=1
	movl	16(%r15), %esi
	imull	%edx, %esi
	movl	%esi, (%rcx,%rdx,4)
	incq	%rdx
	movslq	(%rax), %rsi
	cmpq	%rsi, %rdx
	jl	LBB0_30
	jmp	LBB0_7
LBB0_31:
	xorl	%r12d, %r12d
	movq	%r14, %rdi
	xorl	%esi, %esi
	movl	$16, %edx
	callq	_memset
	jmp	LBB0_7
LBB0_32:
	cmpl	$0, (%r14)
	jne	LBB0_3
## %bb.33:
	movq	$0, 12(%r14)
	movq	_VIDEO_TYPE_CAMERA@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 8(%r14)
	movl	4(%r14), %edi
	leaq	L_.str(%rip), %rsi
	callq	_strcpy
	xorl	%r12d, %r12d
	jmp	LBB0_7
LBB0_34:
	movl	28(%r14), %edi
	movq	(%r15), %rsi
	callq	_strcpy
	movq	_VID_TYPE_CAPTURE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 24(%r14)
	movl	$1, (%r14)
	movl	$0, 20(%r14)
	movl	8(%r15), %eax
	movl	%eax, 4(%r14)
	movl	12(%r15), %ecx
	movl	%ecx, 8(%r14)
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%eax, %edx
	sarl	%edx
	movl	%edx, 12(%r14)
	movl	%ecx, %eax
	shrl	$31, %eax
	addl	%ecx, %eax
	sarl	%eax
	movl	%eax, 16(%r14)
	xorl	%r12d, %r12d
	jmp	LBB0_7
LBB0_35:
	leaq	L_.str.8(%rip), %rsi
	jmp	LBB0_42
LBB0_36:
	leaq	L_.str.7(%rip), %rsi
	jmp	LBB0_42
LBB0_37:
	leaq	L_.str.2(%rip), %rsi
	movl	$2, %edi
	xorl	%eax, %eax
	callq	_PDEBUG
	cmpl	$3, (%r14)
	jne	LBB0_3
## %bb.38:
	movq	_swapRGB_on@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	jne	LBB0_3
## %bb.39:
	leaq	L_.str.3(%rip), %rsi
	movl	$2, %edi
	xorl	%eax, %eax
	callq	_PDEBUG
	movq	_swapRGB@GOTPCREL(%rip), %rax
	movl	$1, (%rax)
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_5
LBB0_41:
	leaq	L_.str.4(%rip), %rsi
LBB0_42:
	xorl	%r12d, %r12d
	movl	$2, %edi
	xorl	%eax, %eax
	callq	_PDEBUG
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_6
LBB0_43:
	leaq	L_.str.5(%rip), %rsi
	xorl	%r12d, %r12d
	movl	$2, %edi
	xorl	%eax, %eax
	callq	_PDEBUG
	movq	_EBUSY@GOTPCREL(%rip), %rax
	jmp	LBB0_6
LBB0_47:
	movq	24(%r15), %rcx
	movslq	4(%r14), %rax
LBB0_48:
	movq	_FRAME_READY@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	movl	%edx, (%rcx,%rax,4)
	cmpl	$0, 32(%r15)
	je	LBB0_50
LBB0_15:
	xorl	%r12d, %r12d
	jmp	LBB0_7
LBB0_50:
	movq	%r15, %rdi
	callq	_stv680_start_stream
	xorl	%r12d, %r12d
	jmp	LBB0_7
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_9, LBB0_9-LJTI0_0
.set L0_0_set_12, LBB0_12-LJTI0_0
.set L0_0_set_3, LBB0_3-LJTI0_0
.set L0_0_set_16, LBB0_16-LJTI0_0
.set L0_0_set_17, LBB0_17-LJTI0_0
.set L0_0_set_18, LBB0_18-LJTI0_0
.set L0_0_set_7, LBB0_7-LJTI0_0
.set L0_0_set_25, LBB0_25-LJTI0_0
.set L0_0_set_26, LBB0_26-LJTI0_0
.set L0_0_set_27, LBB0_27-LJTI0_0
.set L0_0_set_31, LBB0_31-LJTI0_0
.set L0_0_set_32, LBB0_32-LJTI0_0
.set L0_0_set_34, LBB0_34-LJTI0_0
.set L0_0_set_35, LBB0_35-LJTI0_0
LJTI0_0:
	.long	L0_0_set_9
	.long	L0_0_set_12
	.long	L0_0_set_3
	.long	L0_0_set_16
	.long	L0_0_set_3
	.long	L0_0_set_3
	.long	L0_0_set_17
	.long	L0_0_set_3
	.long	L0_0_set_18
	.long	L0_0_set_7
	.long	L0_0_set_25
	.long	L0_0_set_3
	.long	L0_0_set_26
	.long	L0_0_set_27
	.long	L0_0_set_3
	.long	L0_0_set_31
	.long	L0_0_set_32
	.long	L0_0_set_34
	.long	L0_0_set_3
	.long	L0_0_set_35
	.end_data_region
                                        ## -- End function
	.comm	_EIO,8,3                        ## @EIO
	.comm	_VID_TYPE_CAPTURE,4,2           ## @VID_TYPE_CAPTURE
	.comm	_EINVAL,8,3                     ## @EINVAL
	.comm	_VIDEO_TYPE_CAMERA,4,2          ## @VIDEO_TYPE_CAMERA
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"STV Camera"

L_.str.1:                               ## @.str.1
	.asciz	"STV(e): failed (from user) set size in VIDIOCSWIN"

	.comm	_STV680_NUMFRAMES,4,2           ## @STV680_NUMFRAMES
	.comm	_STV_VIDEO_PALETTE,4,2          ## @STV_VIDEO_PALETTE
L_.str.2:                               ## @.str.2
	.asciz	"STV(i): VIDIOCMCAPTURE vm.format (%i) != VIDEO_PALETTE (%i)"

	.comm	_swapRGB_on,4,2                 ## @swapRGB_on
L_.str.3:                               ## @.str.3
	.asciz	"STV(i): VIDIOCMCAPTURE swapRGB is (auto) ON"

	.comm	_swapRGB,4,2                    ## @swapRGB
L_.str.4:                               ## @.str.4
	.asciz	"STV(e): VIDIOCMCAPTURE vm.frame > NUMFRAMES"

	.comm	_FRAME_ERROR,4,2                ## @FRAME_ERROR
	.comm	_FRAME_GRABBING,4,2             ## @FRAME_GRABBING
L_.str.5:                               ## @.str.5
	.asciz	"STV(e): VIDIOCMCAPTURE grabstate (%i) error"

	.comm	_EBUSY,8,3                      ## @EBUSY
L_.str.6:                               ## @.str.6
	.asciz	"STV(e): VIDIOCMCAPTURE set_size failed"

	.comm	_FRAME_READY,4,2                ## @FRAME_READY
L_.str.7:                               ## @.str.7
	.asciz	"STV(e): Bad frame # in VIDIOCSYNC"

	.comm	_FRAME_UNUSED,4,2               ## @FRAME_UNUSED
L_.str.8:                               ## @.str.8
	.asciz	"STV(e): VIDIOCCAPTURE failed"

	.comm	_ENOIOCTLCMD,8,3                ## @ENOIOCTLCMD
	.no_dead_strip	_stv680_do_ioctl
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function stv680_do_ioctl
_stv680_do_ioctl:                       ; @stv680_do_ioctl
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x19, x2
	mov	x21, x1
	ldr	x0, [x0]
	bl	_video_get_drvdata
	ldr	w8, [x0, #44]
	cbz	w8, LBB0_6
; %bb.1:
	sub	w8, w21, #128
	cmp	w8, #19
	b.hi	LBB0_7
; %bb.2:
	mov	x20, x0
	mov	x0, #0
Lloh0:
	adrp	x9, lJTI0_0@PAGE
Lloh1:
	add	x9, x9, lJTI0_0@PAGEOFF
	adr	x10, LBB0_3
	ldrb	w11, [x9, x8]
	add	x10, x10, x11, lsl #2
	br	x10
LBB0_3:
	ldr	w1, [x19]
	tbnz	w1, #31, LBB0_30
; %bb.4:
Lloh2:
	adrp	x8, _STV680_NUMFRAMES@GOTPAGE
Lloh3:
	ldr	x8, [x8, _STV680_NUMFRAMES@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	cmp	w1, w8
	b.ge	LBB0_30
; %bb.5:
	mov	x0, x20
	bl	_stv680_newframe
                                        ; kill: def $w0 killed $w0 def $x0
Lloh5:
	adrp	x8, _FRAME_UNUSED@GOTPAGE
Lloh6:
	ldr	x8, [x8, _FRAME_UNUSED@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	ldr	x9, [x20, #24]
	ldrsw	x10, [x19]
	str	w8, [x9, x10, lsl #2]
	sxtw	x0, w0
	b	LBB0_38
LBB0_6:
Lloh8:
	adrp	x8, _EIO@GOTPAGE
Lloh9:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
	b	LBB0_37
LBB0_7:
Lloh10:
	adrp	x8, _ENOIOCTLCMD@GOTPAGE
Lloh11:
	ldr	x8, [x8, _ENOIOCTLCMD@GOTPAGEOFF]
	b	LBB0_37
LBB0_8:
	ldr	w8, [x19, #12]
	cbnz	w8, LBB0_36
; %bb.9:
	ldr	w8, [x19, #8]
	cbnz	w8, LBB0_36
; %bb.10:
	ldr	w1, [x19, #4]
	ldr	w8, [x20, #36]
	cmp	w1, w8
	b.eq	LBB0_44
; %bb.11:
	ldr	w2, [x19]
	mov	x0, x20
	bl	_stv680_set_size
	cbz	w0, LBB0_44
; %bb.12:
Lloh12:
	adrp	x1, l_.str.1@PAGE
Lloh13:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_35
LBB0_13:
	mov	x0, x20
	mov	x1, x19
	bl	_stv680_set_pict
Lloh14:
	adrp	x8, _EINVAL@GOTPAGE
Lloh15:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh16:
	ldr	x8, [x8]
	cmp	w0, #0
	csneg	x0, xzr, x8, eq
	b	LBB0_38
LBB0_14:
	ldr	w8, [x19]
Lloh17:
	adrp	x9, _EINVAL@GOTPAGE
Lloh18:
	ldr	x9, [x9, _EINVAL@GOTPAGEOFF]
Lloh19:
	ldr	x9, [x9]
	cmp	w8, #0
	csneg	x0, xzr, x9, eq
	b	LBB0_38
LBB0_15:
	ldr	w8, [x19]
Lloh20:
	adrp	x9, _STV_VIDEO_PALETTE@GOTPAGE
Lloh21:
	ldr	x9, [x9, _STV_VIDEO_PALETTE@GOTPAGEOFF]
Lloh22:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ne	LBB0_31
; %bb.16:
	ldrsw	x8, [x19, #4]
Lloh23:
	adrp	x9, _STV680_NUMFRAMES@GOTPAGE
Lloh24:
	ldr	x9, [x9, _STV680_NUMFRAMES@GOTPAGEOFF]
Lloh25:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ge	LBB0_34
; %bb.17:
	ldr	x9, [x20, #24]
	ldr	w10, [x9, x8, lsl #2]
Lloh26:
	adrp	x11, _FRAME_ERROR@GOTPAGE
Lloh27:
	ldr	x11, [x11, _FRAME_ERROR@GOTPAGEOFF]
Lloh28:
	ldr	w11, [x11]
Lloh29:
	adrp	x12, _FRAME_GRABBING@GOTPAGE
Lloh30:
	ldr	x12, [x12, _FRAME_GRABBING@GOTPAGEOFF]
Lloh31:
	ldr	w12, [x12]
	cmp	w10, w11
	ccmp	w10, w12, #4, ne
	b.ne	LBB0_39
; %bb.18:
	str	x10, [sp]
Lloh32:
	adrp	x1, l_.str.5@PAGE
Lloh33:
	add	x1, x1, l_.str.5@PAGEOFF
	mov	w0, #2
	bl	_PDEBUG
Lloh34:
	adrp	x8, _EBUSY@GOTPAGE
Lloh35:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
	b	LBB0_37
LBB0_19:
	mov	x0, #0
	stp	xzr, xzr, [x19, #8]
	str	wzr, [x19, #24]
	ldur	d0, [x20, #36]
	rev64.2s	v0, v0
	str	d0, [x19]
	b	LBB0_38
LBB0_20:
	mov	x0, x20
	mov	x1, x19
	bl	_stv680_get_pict
	mov	x0, #0
	b	LBB0_38
LBB0_21:
	mov	x0, x19
	mov	w1, #0
	mov	w2, #16
	bl	_memset
Lloh36:
	adrp	x8, _STV680_NUMFRAMES@GOTPAGE
Lloh37:
	ldr	x8, [x8, _STV680_NUMFRAMES@GOTPAGEOFF]
	ldr	w9, [x8]
	ldr	w10, [x20, #16]
	mul	w9, w10, w9
	str	w9, [x19]
	ldr	w9, [x8]
	str	w9, [x19, #4]
	cmp	w9, #1
	b.lt	LBB0_44
; %bb.22:
	ldr	x9, [x19, #8]
	str	wzr, [x9]
	ldr	w10, [x8]
	cmp	w10, #2
	b.lt	LBB0_44
; %bb.23:
	mov	w10, #1
LBB0_24:                                ; =>This Inner Loop Header: Depth=1
	mov	x0, #0
	ldr	w11, [x20, #16]
	mul	w11, w11, w10
	str	w11, [x9, x10, lsl #2]
	add	x10, x10, #1
	ldrsw	x11, [x8]
	cmp	x10, x11
	b.lt	LBB0_24
	b	LBB0_38
LBB0_25:
	mov	x0, x19
	mov	w1, #0
	mov	w2, #16
	bl	_memset
	mov	x0, #0
	b	LBB0_38
LBB0_26:
	ldr	w8, [x19]
	cbnz	w8, LBB0_36
; %bb.27:
	str	wzr, [x19, #16]
Lloh38:
	adrp	x8, _VIDEO_TYPE_CAMERA@GOTPAGE
Lloh39:
	ldr	x8, [x8, _VIDEO_TYPE_CAMERA@GOTPAGEOFF]
Lloh40:
	ldr	w8, [x8]
	stp	w8, wzr, [x19, #8]
	ldr	w0, [x19, #4]
Lloh41:
	adrp	x1, l_.str@PAGE
Lloh42:
	add	x1, x1, l_.str@PAGEOFF
	bl	_strcpy
	mov	x0, #0
	b	LBB0_38
LBB0_28:
	ldr	w0, [x19, #28]
	ldr	x1, [x20]
	bl	_strcpy
	mov	x0, #0
Lloh43:
	adrp	x8, _VID_TYPE_CAPTURE@GOTPAGE
Lloh44:
	ldr	x8, [x8, _VID_TYPE_CAPTURE@GOTPAGEOFF]
Lloh45:
	ldr	w8, [x8]
	str	w8, [x19, #24]
	mov	w8, #1
	ldp	w9, w10, [x20, #8]
	stp	w8, w9, [x19]
	cmp	w9, #0
	cinc	w8, w9, lt
	asr	w8, w8, #1
	stp	w10, w8, [x19, #8]
	cmp	w10, #0
	cinc	w8, w10, lt
	asr	w8, w8, #1
	stp	w8, wzr, [x19, #16]
	b	LBB0_38
LBB0_29:
Lloh46:
	adrp	x1, l_.str.8@PAGE
Lloh47:
	add	x1, x1, l_.str.8@PAGEOFF
	b	LBB0_35
LBB0_30:
Lloh48:
	adrp	x1, l_.str.7@PAGE
Lloh49:
	add	x1, x1, l_.str.7@PAGEOFF
	b	LBB0_35
LBB0_31:
	stp	x8, x9, [sp]
Lloh50:
	adrp	x1, l_.str.2@PAGE
Lloh51:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	w0, #2
	bl	_PDEBUG
	ldr	w8, [x19]
	cmp	w8, #3
	b.ne	LBB0_36
; %bb.32:
Lloh52:
	adrp	x8, _swapRGB_on@GOTPAGE
Lloh53:
	ldr	x8, [x8, _swapRGB_on@GOTPAGEOFF]
Lloh54:
	ldr	w8, [x8]
	cbnz	w8, LBB0_36
; %bb.33:
Lloh55:
	adrp	x1, l_.str.3@PAGE
Lloh56:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	w0, #2
	bl	_PDEBUG
Lloh57:
	adrp	x8, _swapRGB@GOTPAGE
Lloh58:
	ldr	x8, [x8, _swapRGB@GOTPAGEOFF]
	mov	w9, #1
Lloh59:
	str	w9, [x8]
	b	LBB0_36
LBB0_34:
Lloh60:
	adrp	x1, l_.str.4@PAGE
Lloh61:
	add	x1, x1, l_.str.4@PAGEOFF
LBB0_35:
	mov	w0, #2
	bl	_PDEBUG
LBB0_36:
Lloh62:
	adrp	x8, _EINVAL@GOTPAGE
Lloh63:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_37:
	ldr	x8, [x8]
	neg	x0, x8
LBB0_38:
	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
	add	sp, sp, #64
	ret
LBB0_39:
	ldr	w10, [x20, #36]
	ldr	w1, [x19, #12]
	cmp	w10, w1
	b.eq	LBB0_43
; %bb.40:
	ldr	w2, [x19, #8]
	mov	x0, x20
	bl	_stv680_set_size
	cbz	w0, LBB0_42
; %bb.41:
Lloh64:
	adrp	x1, l_.str.6@PAGE
Lloh65:
	add	x1, x1, l_.str.6@PAGEOFF
	b	LBB0_35
LBB0_42:
	ldr	x9, [x20, #24]
	ldrsw	x8, [x19, #4]
LBB0_43:
Lloh66:
	adrp	x10, _FRAME_READY@GOTPAGE
Lloh67:
	ldr	x10, [x10, _FRAME_READY@GOTPAGEOFF]
Lloh68:
	ldr	w10, [x10]
	str	w10, [x9, x8, lsl #2]
	ldr	w8, [x20, #32]
	cbz	w8, LBB0_45
LBB0_44:
	mov	x0, #0
	b	LBB0_38
LBB0_45:
	mov	x0, x20
	bl	_stv680_start_stream
	mov	x0, #0
	b	LBB0_38
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGot	Lloh34, Lloh35
	.loh AdrpAdd	Lloh32, Lloh33
	.loh AdrpLdrGot	Lloh36, Lloh37
	.loh AdrpAdd	Lloh41, Lloh42
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.loh AdrpLdrGotLdr	Lloh43, Lloh44, Lloh45
	.loh AdrpAdd	Lloh46, Lloh47
	.loh AdrpAdd	Lloh48, Lloh49
	.loh AdrpAdd	Lloh50, Lloh51
	.loh AdrpLdrGotLdr	Lloh52, Lloh53, Lloh54
	.loh AdrpLdrGotStr	Lloh57, Lloh58, Lloh59
	.loh AdrpAdd	Lloh55, Lloh56
	.loh AdrpAdd	Lloh60, Lloh61
	.loh AdrpLdrGot	Lloh62, Lloh63
	.loh AdrpAdd	Lloh64, Lloh65
	.loh AdrpLdrGotLdr	Lloh66, Lloh67, Lloh68
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_3-LBB0_3)>>2
	.byte	(LBB0_8-LBB0_3)>>2
	.byte	(LBB0_36-LBB0_3)>>2
	.byte	(LBB0_13-LBB0_3)>>2
	.byte	(LBB0_36-LBB0_3)>>2
	.byte	(LBB0_36-LBB0_3)>>2
	.byte	(LBB0_14-LBB0_3)>>2
	.byte	(LBB0_36-LBB0_3)>>2
	.byte	(LBB0_15-LBB0_3)>>2
	.byte	(LBB0_38-LBB0_3)>>2
	.byte	(LBB0_19-LBB0_3)>>2
	.byte	(LBB0_36-LBB0_3)>>2
	.byte	(LBB0_20-LBB0_3)>>2
	.byte	(LBB0_21-LBB0_3)>>2
	.byte	(LBB0_36-LBB0_3)>>2
	.byte	(LBB0_25-LBB0_3)>>2
	.byte	(LBB0_26-LBB0_3)>>2
	.byte	(LBB0_28-LBB0_3)>>2
	.byte	(LBB0_36-LBB0_3)>>2
	.byte	(LBB0_29-LBB0_3)>>2
                                        ; -- End function
	.comm	_EIO,8,3                        ; @EIO
	.comm	_VID_TYPE_CAPTURE,4,2           ; @VID_TYPE_CAPTURE
	.comm	_EINVAL,8,3                     ; @EINVAL
	.comm	_VIDEO_TYPE_CAMERA,4,2          ; @VIDEO_TYPE_CAMERA
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"STV Camera"

l_.str.1:                               ; @.str.1
	.asciz	"STV(e): failed (from user) set size in VIDIOCSWIN"

	.comm	_STV680_NUMFRAMES,4,2           ; @STV680_NUMFRAMES
	.comm	_STV_VIDEO_PALETTE,4,2          ; @STV_VIDEO_PALETTE
l_.str.2:                               ; @.str.2
	.asciz	"STV(i): VIDIOCMCAPTURE vm.format (%i) != VIDEO_PALETTE (%i)"

	.comm	_swapRGB_on,4,2                 ; @swapRGB_on
l_.str.3:                               ; @.str.3
	.asciz	"STV(i): VIDIOCMCAPTURE swapRGB is (auto) ON"

	.comm	_swapRGB,4,2                    ; @swapRGB
l_.str.4:                               ; @.str.4
	.asciz	"STV(e): VIDIOCMCAPTURE vm.frame > NUMFRAMES"

	.comm	_FRAME_ERROR,4,2                ; @FRAME_ERROR
	.comm	_FRAME_GRABBING,4,2             ; @FRAME_GRABBING
l_.str.5:                               ; @.str.5
	.asciz	"STV(e): VIDIOCMCAPTURE grabstate (%i) error"

	.comm	_EBUSY,8,3                      ; @EBUSY
l_.str.6:                               ; @.str.6
	.asciz	"STV(e): VIDIOCMCAPTURE set_size failed"

	.comm	_FRAME_READY,4,2                ; @FRAME_READY
l_.str.7:                               ; @.str.7
	.asciz	"STV(e): Bad frame # in VIDIOCSYNC"

	.comm	_FRAME_UNUSED,4,2               ; @FRAME_UNUSED
l_.str.8:                               ; @.str.8
	.asciz	"STV(e): VIDIOCCAPTURE failed"

	.comm	_ENOIOCTLCMD,8,3                ; @ENOIOCTLCMD
	.no_dead_strip	_stv680_do_ioctl
.subsections_via_symbols
