	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function konicawc_process_isoc
_konicawc_process_isoc:                 ## @konicawc_process_isoc
	.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	%rsi, %r13
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	movq	24(%rdi), %r12
	movl	(%r12), %r15d
	movl	4(%r12), %ebx
	xorl	%edi, %edi
	testq	%rsi, %rsi
	setne	%dil
	callq	_assert
	leaq	L_.str(%rip), %rsi
	movl	$5, %edi
	movl	%r15d, %edx
	movq	%rbx, -64(%rbp)                 ## 8-byte Spill
	movl	%ebx, %ecx
	xorl	%eax, %eax
	callq	_DEBUG
	movl	24(%r13), %edx
	leaq	L_.str.1(%rip), %rsi
	movl	$3, %edi
	xorl	%eax, %eax
	callq	_DEBUG
	movl	24(%r13), %eax
	movq	_ScanState_Scanning@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_11
## %bb.1:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	leaq	8(%rax), %r14
	movq	%r14, %rdi
	callq	_RingQueue_GetLength
	leaq	L_.str.2(%rip), %rsi
	xorl	%ebx, %ebx
	movl	$3, %edi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_DEBUG
	movq	%r14, %rdi
	callq	_RingQueue_GetLength
	cmpl	$4, %eax
	jge	LBB0_2
	jmp	LBB0_11
	.p2align	4, 0x90
LBB0_20:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	%r14, %rdi
	movl	$1, %esi
	callq	_RING_QUEUE_DEQUEUE_BYTES
	incl	%ebx
	movq	%r14, %rdi
	callq	_RingQueue_GetLength
	cmpl	$3, %eax
	jle	LBB0_10
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_RING_QUEUE_PEEK
	testl	%eax, %eax
	jne	LBB0_20
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%r14, %rdi
	movl	$1, %esi
	callq	_RING_QUEUE_PEEK
	cmpl	$255, %eax
	jne	LBB0_20
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%r14, %rdi
	movl	$2, %esi
	callq	_RING_QUEUE_PEEK
	testl	%eax, %eax
	jne	LBB0_20
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%r14, %rdi
	movl	$3, %esi
	callq	_RING_QUEUE_PEEK
	cmpl	$127, %eax
	jg	LBB0_20
## %bb.6:
	movq	%r14, %rdi
	movl	$3, %esi
	callq	_RING_QUEUE_PEEK
	movl	%eax, %r8d
	movl	8(%r12), %ecx
	testl	%ecx, %ecx
	js	LBB0_9
## %bb.7:
	movl	%r8d, %edx
	subl	%ecx, %edx
	andl	$127, %edx
	decl	%edx
	je	LBB0_9
## %bb.8:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	16(%rax), %rdi
	leaq	L_.str.3(%rip), %rsi
	movl	%r8d, -44(%rbp)                 ## 4-byte Spill
	movl	-44(%rbp), %r8d                 ## 4-byte Reload
	callq	_dev_info
	movl	-44(%rbp), %r8d                 ## 4-byte Reload
LBB0_9:
	movl	%r8d, 8(%r12)
	movl	$0, (%r13)
	movq	_ScanState_Lines@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 24(%r13)
	movq	%r14, %rdi
	movl	$4, %esi
	callq	_RING_QUEUE_DEQUEUE_BYTES
	testl	%ebx, %ebx
	je	LBB0_11
LBB0_10:
	leaq	L_.str.4(%rip), %rsi
	movl	$2, %edi
	movl	%ebx, %edx
	xorl	%eax, %eax
	callq	_DEBUG
LBB0_11:
	movl	24(%r13), %eax
	movq	_ScanState_Scanning@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	je	LBB0_19
## %bb.12:
	movl	(%r13), %eax
	cmpl	%r15d, %eax
	jge	LBB0_17
## %bb.13:
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	movslq	%ecx, %r14
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	leaq	8(%rax), %rbx
	leal	(%rcx,%rcx,4), %eax
	leal	(%rcx,%rcx,4), %ecx
	addl	$3, %ecx
	testl	%eax, %eax
	cmovnsl	%eax, %ecx
	sarl	$2, %ecx
	movslq	%ecx, %r12
	.p2align	4, 0x90
LBB0_14:                                ## =>This Inner Loop Header: Depth=1
	movq	%rbx, %rdi
	callq	_RingQueue_GetLength
	cmpl	$383, %eax                      ## imm = 0x17F
	jle	LBB0_15
## %bb.16:                              ##   in Loop: Header=BB0_14 Depth=1
	movslq	(%r13), %rsi
	shlq	$8, %rsi
	addq	16(%r13), %rsi
	movq	%rbx, %rdi
	movl	$256, %edx                      ## imm = 0x100
	callq	_RingQueue_Dequeue
	movq	16(%r13), %rax
	addq	%r14, %rax
	movslq	(%r13), %rsi
	shlq	$6, %rsi
	addq	%rax, %rsi
	movq	%rbx, %rdi
	movl	$64, %edx
	callq	_RingQueue_Dequeue
	movq	16(%r13), %rax
	addq	%r12, %rax
	movslq	(%r13), %rsi
	shlq	$6, %rsi
	addq	%rax, %rsi
	movq	%rbx, %rdi
	movl	$64, %edx
	callq	_RingQueue_Dequeue
	addl	$384, 4(%r13)                   ## imm = 0x180
	movl	(%r13), %eax
	incl	%eax
	movl	%eax, (%r13)
	cmpl	%r15d, %eax
	jl	LBB0_14
LBB0_17:
	cmpl	%r15d, %eax
	jne	LBB0_19
LBB0_18:
	leaq	L_.str.5(%rip), %rsi
	movl	$5, %edi
	xorl	%eax, %eax
	callq	_DEBUG
	movq	_FrameState_Done_Hold@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 8(%r13)
	movl	$0, (%r13)
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	$-1, (%rax)
	incl	4(%rax)
LBB0_19:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_15:
	movl	(%r13), %eax
	cmpl	%r15d, %eax
	je	LBB0_18
	jmp	LBB0_19
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"maxline = %d yplanesz = %d"

L_.str.1:                               ## @.str.1
	.asciz	"Frame state = %d"

	.comm	_ScanState_Scanning,4,2         ## @ScanState_Scanning
L_.str.2:                               ## @.str.2
	.asciz	"Searching for marker, queue len = %d"

L_.str.3:                               ## @.str.3
	.asciz	"Dropped %d frames (%d -> %d)\n"

	.comm	_ScanState_Lines,4,2            ## @ScanState_Lines
L_.str.4:                               ## @.str.4
	.asciz	"dropped %d bytes looking for new frame"

L_.str.5:                               ## @.str.5
	.asciz	"got whole frame"

	.comm	_FrameState_Done_Hold,4,2       ## @FrameState_Done_Hold
	.no_dead_strip	_konicawc_process_isoc
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ; -- Begin function konicawc_process_isoc
lCPI0_0:
	.long	1                               ; 0x1
	.long	384                             ; 0x180
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	2
_konicawc_process_isoc:                 ; @konicawc_process_isoc
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	d9, d8, [sp, #16]               ; 16-byte Folded Spill
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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
	.cfi_offset b8, -104
	.cfi_offset b9, -112
	mov	x20, x1
	mov	x19, x0
	ldr	x25, [x0, #24]
	ldp	w23, w24, [x25]
                                        ; kill: def $w24 killed $w24 def $x24
	sxtw	x24, w24
	cmp	x1, #0
	cset	w0, ne
	bl	_assert
	stp	x23, x24, [sp]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	w0, #5
	bl	_DEBUG
	ldr	w8, [x20, #24]
	str	x8, [sp]
Lloh2:
	adrp	x1, l_.str.1@PAGE
Lloh3:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	w0, #3
	bl	_DEBUG
	ldr	w8, [x20, #24]
Lloh4:
	adrp	x26, _ScanState_Scanning@GOTPAGE
Lloh5:
	ldr	x26, [x26, _ScanState_Scanning@GOTPAGEOFF]
	ldr	w9, [x26]
	cmp	w8, w9
	b.ne	LBB0_13
; %bb.1:
	add	x21, x19, #8
	mov	x0, x21
	bl	_RingQueue_GetLength
                                        ; kill: def $w0 killed $w0 def $x0
	str	x0, [sp]
Lloh6:
	adrp	x1, l_.str.2@PAGE
Lloh7:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	w0, #3
	bl	_DEBUG
	mov	x0, x21
	bl	_RingQueue_GetLength
	cmp	w0, #4
	b.lt	LBB0_13
; %bb.2:
	mov	w27, #0
	b	LBB0_4
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x21
	mov	w1, #1
	bl	_RING_QUEUE_DEQUEUE_BYTES
	add	w27, w27, #1
	mov	x0, x21
	bl	_RingQueue_GetLength
	cmp	w0, #3
	b.le	LBB0_12
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x21
	mov	w1, #0
	bl	_RING_QUEUE_PEEK
	cbnz	w0, LBB0_3
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x21
	mov	w1, #1
	bl	_RING_QUEUE_PEEK
	cmp	w0, #255
	b.ne	LBB0_3
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x21
	mov	w1, #2
	bl	_RING_QUEUE_PEEK
	cbnz	w0, LBB0_3
; %bb.7:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x21
	mov	w1, #3
	bl	_RING_QUEUE_PEEK
	cmp	w0, #127
	b.gt	LBB0_3
; %bb.8:
	mov	x0, x21
	mov	w1, #3
	bl	_RING_QUEUE_PEEK
	mov	x22, x0
	ldr	w3, [x25, #8]
	tbnz	w3, #31, LBB0_11
; %bb.9:
	sub	w8, w22, w3
	and	w8, w8, #0x7f
	subs	w2, w8, #1
	b.eq	LBB0_11
; %bb.10:
	ldr	x0, [x19, #16]
Lloh8:
	adrp	x1, l_.str.3@PAGE
Lloh9:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x4, x22
	bl	_dev_info
LBB0_11:
	str	w22, [x25, #8]
	str	wzr, [x20]
Lloh10:
	adrp	x8, _ScanState_Lines@GOTPAGE
Lloh11:
	ldr	x8, [x8, _ScanState_Lines@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	str	w8, [x20, #24]
	mov	x0, x21
	mov	w1, #4
	bl	_RING_QUEUE_DEQUEUE_BYTES
	cbz	w27, LBB0_13
LBB0_12:
	str	x27, [sp]
Lloh13:
	adrp	x1, l_.str.4@PAGE
Lloh14:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	w0, #2
	bl	_DEBUG
LBB0_13:
	ldr	w8, [x20, #24]
	ldr	w9, [x26]
	cmp	w8, w9
	b.eq	LBB0_21
; %bb.14:
	ldr	w8, [x20]
	cmp	w8, w23
	b.ge	LBB0_19
; %bb.15:
	add	x21, x19, #8
	add	w8, w24, w24, lsl #2
	add	w9, w8, #3
	cmp	w8, #0
	csel	w8, w9, w8, lt
	sbfx	x22, x8, #2, #30
Lloh15:
	adrp	x8, lCPI0_0@PAGE
Lloh16:
	ldr	d8, [x8, lCPI0_0@PAGEOFF]
LBB0_16:                                ; =>This Inner Loop Header: Depth=1
	mov	x0, x21
	bl	_RingQueue_GetLength
	cmp	w0, #383
	b.le	LBB0_22
; %bb.17:                               ;   in Loop: Header=BB0_16 Depth=1
	ldr	x8, [x20, #16]
	ldrsw	x9, [x20]
	add	x1, x8, x9, lsl #8
	mov	x0, x21
	mov	w2, #256
	bl	_RingQueue_Dequeue
	ldr	x8, [x20, #16]
	add	x8, x8, x24
	ldrsw	x9, [x20]
	add	x1, x8, x9, lsl #6
	mov	x0, x21
	mov	w2, #64
	bl	_RingQueue_Dequeue
	ldr	x8, [x20, #16]
	add	x8, x8, x22
	ldrsw	x9, [x20]
	add	x1, x8, x9, lsl #6
	mov	x0, x21
	mov	w2, #64
	bl	_RingQueue_Dequeue
	ldr	d0, [x20]
	add.2s	v0, v0, v8
	str	d0, [x20]
	fmov	w8, s0
	cmp	w8, w23
	b.lt	LBB0_16
; %bb.18:
	fmov	w8, s0
LBB0_19:
	cmp	w8, w23
	b.ne	LBB0_21
LBB0_20:
Lloh17:
	adrp	x1, l_.str.5@PAGE
Lloh18:
	add	x1, x1, l_.str.5@PAGEOFF
	mov	w0, #5
	bl	_DEBUG
Lloh19:
	adrp	x8, _FrameState_Done_Hold@GOTPAGE
Lloh20:
	ldr	x8, [x8, _FrameState_Done_Hold@GOTPAGEOFF]
Lloh21:
	ldr	w8, [x8]
	str	w8, [x20, #8]
	str	wzr, [x20]
	mov	w8, #-1
	ldr	w9, [x19, #4]
	add	w9, w9, #1
	stp	w8, w9, [x19]
LBB0_21:
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	ldp	d9, d8, [sp, #16]               ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
LBB0_22:
	ldr	w8, [x20]
	cmp	w8, w23
	b.eq	LBB0_20
	b	LBB0_21
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdr	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpAdd	Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"maxline = %d yplanesz = %d"

l_.str.1:                               ; @.str.1
	.asciz	"Frame state = %d"

	.comm	_ScanState_Scanning,4,2         ; @ScanState_Scanning
l_.str.2:                               ; @.str.2
	.asciz	"Searching for marker, queue len = %d"

l_.str.3:                               ; @.str.3
	.asciz	"Dropped %d frames (%d -> %d)\n"

	.comm	_ScanState_Lines,4,2            ; @ScanState_Lines
l_.str.4:                               ; @.str.4
	.asciz	"dropped %d bytes looking for new frame"

l_.str.5:                               ; @.str.5
	.asciz	"got whole frame"

	.comm	_FrameState_Done_Hold,4,2       ; @FrameState_Done_Hold
	.no_dead_strip	_konicawc_process_isoc
.subsections_via_symbols
