	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ibmcam_model4_128x96_parse_lines
_ibmcam_model4_128x96_parse_lines:      ## @ibmcam_model4_128x96_parse_lines
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r15
	movq	%rsi, %r13
	movq	%rdi, %rbx
	movl	4(%rsi), %edi
	callq	_VIDEOSIZE_X
	movl	(%r13), %edx
	cmpl	$95, %edx
	jl	LBB0_3
## %bb.1:
	movq	_scan_NextFrame@GOTPCREL(%rip), %r15
	cmpl	$3, (%rbx)
	jl	LBB0_16
## %bb.2:
	movq	8(%rbx), %rdi
	leaq	L_.str(%rip), %rsi
	jmp	LBB0_15
LBB0_3:
	movl	%eax, %r14d
	movq	%r15, -64(%rbp)                 ## 8-byte Spill
	movq	_V4L_BYTES_PER_PIXEL@GOTPCREL(%rip), %rax
	movslq	(%rax), %r12
	movl	$1, %edi
	callq	_assert
	leaq	16(%rbx), %r15
	movq	%r15, %rdi
	callq	_RingQueue_GetLength
	cmpl	$640, %eax                      ## imm = 0x280
	jae	LBB0_5
## %bb.4:
	movq	_scan_Out@GOTPCREL(%rip), %r15
	jmp	LBB0_16
LBB0_5:
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	movslq	%r14d, %rax
	imulq	%rax, %r12
	movq	%r12, -56(%rbp)                 ## 8-byte Spill
	leaq	_ibmcam_model4_128x96_parse_lines.lineBuffer(%rip), %r12
	movq	%r15, %rdi
	movq	%r12, %rsi
	movl	$640, %edx                      ## imm = 0x280
	callq	_RingQueue_Dequeue
	movl	4(%r13), %edi
	callq	_VIDEOSIZE_X
	testl	%eax, %eax
	jle	LBB0_11
## %bb.6:
	xorl	%ebx, %ebx
	movq	_flags@GOTPCREL(%rip), %r15
	movq	_FLAGS_MONOCHROME@GOTPCREL(%rip), %r14
	jmp	LBB0_7
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_7 Depth=1
	movl	(%r13), %edx
	movq	%r13, %rdi
	movl	%ebx, %esi
	callq	_RGB24_PUTPIXEL
	incq	%rbx
	movl	4(%r13), %edi
	callq	_VIDEOSIZE_X
	cltq
	cmpq	%rax, %rbx
	jge	LBB0_11
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movl	$0, %ecx
	movl	$0, %r8d
	movl	$0, %r9d
	cmpq	$127, %rbx
	ja	LBB0_10
## %bb.8:                               ##   in Loop: Header=BB0_7 Depth=1
	movzbl	(%r12,%rbx,2), %r8d
	movzbl	1(%r12,%rbx,2), %ecx
	movzbl	320(%r12,%rbx,2), %r9d
	movl	(%r14), %eax
	testl	%eax, (%r15)
	je	LBB0_10
## %bb.9:                               ##   in Loop: Header=BB0_7 Depth=1
	addl	%r8d, %ecx
	addl	%r9d, %ecx
	imull	$43691, %ecx, %ecx              ## imm = 0xAAAB
	shrl	$17, %ecx
	movl	%ecx, %r8d
	movl	%ecx, %r9d
	jmp	LBB0_10
LBB0_11:
	movq	_Deinterlace_None@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 8(%r13)
	movl	(%r13), %ebx
	incl	%ebx
	movl	%ebx, (%r13)
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	addq	%rcx, (%rax)
	movl	4(%r13), %edi
	callq	_VIDEOSIZE_Y
	cmpl	%eax, %ebx
	jge	LBB0_13
## %bb.12:
	movq	_scan_Continue@GOTPCREL(%rip), %r15
	jmp	LBB0_16
LBB0_13:
	movq	_scan_NextFrame@GOTPCREL(%rip), %r15
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	cmpl	$3, (%rax)
	jl	LBB0_16
## %bb.14:
	movq	8(%rax), %r14
	movl	4(%r13), %edi
	callq	_VIDEOSIZE_Y
	leaq	L_.str.1(%rip), %rsi
	movq	%r14, %rdi
	movl	%eax, %edx
LBB0_15:
	callq	_dev_info
LBB0_16:
	movl	(%r15), %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
.zerofill __DATA,__bss,_ibmcam_model4_128x96_parse_lines.lineBuffer,640,4 ## @ibmcam_model4_128x96_parse_lines.lineBuffer
	.comm	_V4L_BYTES_PER_PIXEL,4,2        ## @V4L_BYTES_PER_PIXEL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Reached line %d. (frame is done)\n"

	.comm	_scan_NextFrame,4,2             ## @scan_NextFrame
	.comm	_scan_Out,4,2                   ## @scan_Out
	.comm	_flags,4,2                      ## @flags
	.comm	_FLAGS_MONOCHROME,4,2           ## @FLAGS_MONOCHROME
	.comm	_Deinterlace_None,4,2           ## @Deinterlace_None
L_.str.1:                               ## @.str.1
	.asciz	"All requested lines (%ld.) done.\n"

	.comm	_scan_Continue,4,2              ## @scan_Continue
	.no_dead_strip	_ibmcam_model4_128x96_parse_lines
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ibmcam_model4_128x96_parse_lines
_ibmcam_model4_128x96_parse_lines:      ; @ibmcam_model4_128x96_parse_lines
	.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	x21, x2
	mov	x20, x1
	mov	x19, x0
	ldr	w0, [x1, #4]
	bl	_VIDEOSIZE_X
	ldr	w2, [x20]
	cmp	w2, #95
	b.lt	LBB0_3
; %bb.1:
	ldr	w8, [x19]
	cmp	w8, #3
	b.lt	LBB0_16
; %bb.2:
	ldr	x0, [x19, #8]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	b	LBB0_15
LBB0_3:
	mov	x22, x0
Lloh2:
	adrp	x8, _V4L_BYTES_PER_PIXEL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _V4L_BYTES_PER_PIXEL@GOTPAGEOFF]
Lloh4:
	ldrsw	x24, [x8]
	mov	w0, #1
	bl	_assert
	add	x23, x19, #16
	mov	x0, x23
	bl	_RingQueue_GetLength
	cmp	w0, #640
	b.hs	LBB0_5
; %bb.4:
Lloh5:
	adrp	x8, _scan_Out@GOTPAGE
Lloh6:
	ldr	x8, [x8, _scan_Out@GOTPAGEOFF]
	b	LBB0_17
LBB0_5:
	sxtw	x8, w22
	mul	x24, x24, x8
Lloh7:
	adrp	x1, _ibmcam_model4_128x96_parse_lines.lineBuffer@PAGE
Lloh8:
	add	x1, x1, _ibmcam_model4_128x96_parse_lines.lineBuffer@PAGEOFF
	mov	x0, x23
	mov	w2, #640
	bl	_RingQueue_Dequeue
	ldr	w0, [x20, #4]
	bl	_VIDEOSIZE_X
	cmp	w0, #1
	b.lt	LBB0_11
; %bb.6:
	mov	x22, #0
Lloh9:
	adrp	x23, _flags@GOTPAGE
Lloh10:
	ldr	x23, [x23, _flags@GOTPAGEOFF]
Lloh11:
	adrp	x25, _FLAGS_MONOCHROME@GOTPAGE
Lloh12:
	ldr	x25, [x25, _FLAGS_MONOCHROME@GOTPAGEOFF]
	mov	w26, #43691
Lloh13:
	adrp	x27, _ibmcam_model4_128x96_parse_lines.lineBuffer@PAGE
Lloh14:
	add	x27, x27, _ibmcam_model4_128x96_parse_lines.lineBuffer@PAGEOFF
	b	LBB0_9
LBB0_7:                                 ;   in Loop: Header=BB0_9 Depth=1
	ldrb	w8, [x27]
	ldrb	w9, [x27, #1]
	ldrb	w10, [x27, #320]
	ldr	w11, [x23]
	ldr	w12, [x25]
	tst	w12, w11
	add	w11, w9, w8
	add	w11, w11, w10
	mul	w11, w11, w26
	lsr	w11, w11, #17
	csel	w3, w9, w11, eq
	csel	w4, w8, w11, eq
	csel	w5, w10, w11, eq
LBB0_8:                                 ;   in Loop: Header=BB0_9 Depth=1
	ldr	w2, [x20]
	mov	x0, x20
	mov	x1, x22
	bl	_RGB24_PUTPIXEL
	add	x22, x22, #1
	ldr	w0, [x20, #4]
	bl	_VIDEOSIZE_X
	add	x27, x27, #2
	cmp	x22, w0, sxtw
	b.ge	LBB0_11
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	cmp	x22, #127
	b.ls	LBB0_7
; %bb.10:                               ;   in Loop: Header=BB0_9 Depth=1
	mov	w3, #0
	mov	w4, #0
	mov	w5, #0
	b	LBB0_8
LBB0_11:
Lloh15:
	adrp	x8, _Deinterlace_None@GOTPAGE
Lloh16:
	ldr	x8, [x8, _Deinterlace_None@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	str	w8, [x20, #8]
	ldp	w8, w0, [x20]
	add	w22, w8, #1
	str	w22, [x20]
	ldr	x8, [x21]
	add	x8, x8, x24
	str	x8, [x21]
	bl	_VIDEOSIZE_Y
	cmp	w22, w0
	b.ge	LBB0_13
; %bb.12:
Lloh18:
	adrp	x8, _scan_Continue@GOTPAGE
Lloh19:
	ldr	x8, [x8, _scan_Continue@GOTPAGEOFF]
	b	LBB0_17
LBB0_13:
	ldr	w8, [x19]
	cmp	w8, #3
	b.lt	LBB0_16
; %bb.14:
	ldr	x19, [x19, #8]
	ldr	w0, [x20, #4]
	bl	_VIDEOSIZE_Y
	mov	x2, x0
Lloh20:
	adrp	x1, l_.str.1@PAGE
Lloh21:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
LBB0_15:
	bl	_dev_info
LBB0_16:
Lloh22:
	adrp	x8, _scan_NextFrame@GOTPAGE
Lloh23:
	ldr	x8, [x8, _scan_NextFrame@GOTPAGEOFF]
LBB0_17:
	ldr	w0, [x8]
	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
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
.zerofill __DATA,__bss,_ibmcam_model4_128x96_parse_lines.lineBuffer,640,0 ; @ibmcam_model4_128x96_parse_lines.lineBuffer
	.comm	_V4L_BYTES_PER_PIXEL,4,2        ; @V4L_BYTES_PER_PIXEL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Reached line %d. (frame is done)\n"

	.comm	_scan_NextFrame,4,2             ; @scan_NextFrame
	.comm	_scan_Out,4,2                   ; @scan_Out
	.comm	_flags,4,2                      ; @flags
	.comm	_FLAGS_MONOCHROME,4,2           ; @FLAGS_MONOCHROME
	.comm	_Deinterlace_None,4,2           ; @Deinterlace_None
l_.str.1:                               ; @.str.1
	.asciz	"All requested lines (%ld.) done.\n"

	.comm	_scan_Continue,4,2              ; @scan_Continue
	.no_dead_strip	_ibmcam_model4_128x96_parse_lines
.subsections_via_symbols
