	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sd_pkt_scan
_sd_pkt_scan:                           ## @sd_pkt_scan
	.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	%edx, %ebx
	movq	%rsi, %r14
	movq	%rdi, %r15
	movq	_D_STREAM@GOTPCREL(%rip), %r13
	movl	(%r13), %esi
	movq	_JEILINJ_MAX_TRANSFER@GOTPCREL(%rip), %r12
	movl	(%r12), %r8d
	leaq	L_.str(%rip), %rdx
	movl	%ebx, %ecx
	xorl	%eax, %eax
	callq	_gspca_dbg
	cmpl	%ebx, (%r12)
	jne	LBB0_1
## %bb.3:
	movq	(%r14), %rax
	movq	_FRAME_START@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_5
## %bb.4:
	movl	40(%r14), %ecx
	decl	%ecx
	movl	%ecx, (%r15)
	movl	(%r13), %esi
	leaq	L_.str.2(%rip), %rdx
	movq	%r15, %rdi
	xorl	%eax, %eax
	callq	_gspca_dbg
	movq	_FIRST_PACKET@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	8(%r15), %rdx
	movq	_JPEG_HDR_SZ@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r15, %rdi
	callq	_gspca_frame_add
	movq	_INTER_PACKET@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_FRAME_HEADER_LEN@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	leaq	(%r14,%rax,4), %rdx
	movl	(%r12), %ecx
	subl	%eax, %ecx
	movq	%r15, %rdi
	jmp	LBB0_10
LBB0_1:
	movq	_D_PACK@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.1(%rip), %rdx
	movq	%r15, %rdi
	xorl	%eax, %eax
	callq	_gspca_dbg
LBB0_2:
	movq	_DISCARD_PACKET@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%r15)
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	movl	(%r15), %ecx
	testl	%ecx, %ecx
	jle	LBB0_2
## %bb.6:
	movl	(%r13), %esi
	leaq	L_.str.3(%rip), %rdx
	movq	%r15, %rdi
	xorl	%eax, %eax
	callq	_gspca_dbg
	decl	(%r15)
	jne	LBB0_7
## %bb.8:
	movq	_LAST_PACKET@GOTPCREL(%rip), %rax
	jmp	LBB0_9
LBB0_7:
	movq	_INTER_PACKET@GOTPCREL(%rip), %rax
LBB0_9:
	movl	(%rax), %esi
	movl	(%r12), %ecx
	movq	%r15, %rdi
	movq	%r14, %rdx
LBB0_10:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_gspca_frame_add                ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_D_STREAM,4,2                   ## @D_STREAM
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Got %d bytes out of %d for Block 0\n"

	.comm	_JEILINJ_MAX_TRANSFER,4,2       ## @JEILINJ_MAX_TRANSFER
	.comm	_D_PACK,4,2                     ## @D_PACK
L_.str.1:                               ## @.str.1
	.asciz	"bad length\n"

	.comm	_FRAME_START,8,3                ## @FRAME_START
L_.str.2:                               ## @.str.2
	.asciz	"blocks_left = 0x%x\n"

	.comm	_FIRST_PACKET,4,2               ## @FIRST_PACKET
	.comm	_JPEG_HDR_SZ,4,2                ## @JPEG_HDR_SZ
	.comm	_INTER_PACKET,4,2               ## @INTER_PACKET
	.comm	_FRAME_HEADER_LEN,4,2           ## @FRAME_HEADER_LEN
L_.str.3:                               ## @.str.3
	.asciz	"%d blocks remaining for frame\n"

	.comm	_LAST_PACKET,4,2                ## @LAST_PACKET
	.comm	_DISCARD_PACKET,4,2             ## @DISCARD_PACKET
	.no_dead_strip	_sd_pkt_scan
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sd_pkt_scan
_sd_pkt_scan:                           ; @sd_pkt_scan
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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	x21, x2
	mov	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x23, _D_STREAM@GOTPAGE
Lloh1:
	ldr	x23, [x23, _D_STREAM@GOTPAGEOFF]
	ldr	w1, [x23]
Lloh2:
	adrp	x22, _JEILINJ_MAX_TRANSFER@GOTPAGE
Lloh3:
	ldr	x22, [x22, _JEILINJ_MAX_TRANSFER@GOTPAGEOFF]
	ldr	w8, [x22]
	stp	x21, x8, [sp]
Lloh4:
	adrp	x2, l_.str@PAGE
Lloh5:
	add	x2, x2, l_.str@PAGEOFF
	bl	_gspca_dbg
	ldr	w8, [x22]
	cmp	w8, w21
	b.ne	LBB0_3
; %bb.1:
	ldr	x8, [x20]
Lloh6:
	adrp	x9, _FRAME_START@GOTPAGE
Lloh7:
	ldr	x9, [x9, _FRAME_START@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_5
; %bb.2:
	ldr	w8, [x20, #40]
	sub	w8, w8, #1
	str	w8, [x19]
	ldr	w1, [x23]
	str	x8, [sp]
Lloh9:
	adrp	x2, l_.str.2@PAGE
Lloh10:
	add	x2, x2, l_.str.2@PAGEOFF
	mov	x0, x19
	bl	_gspca_dbg
Lloh11:
	adrp	x8, _FIRST_PACKET@GOTPAGE
Lloh12:
	ldr	x8, [x8, _FIRST_PACKET@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
	ldr	x2, [x19, #8]
Lloh14:
	adrp	x8, _JPEG_HDR_SZ@GOTPAGE
Lloh15:
	ldr	x8, [x8, _JPEG_HDR_SZ@GOTPAGEOFF]
Lloh16:
	ldr	w3, [x8]
	mov	x0, x19
	bl	_gspca_frame_add
Lloh17:
	adrp	x8, _INTER_PACKET@GOTPAGE
Lloh18:
	ldr	x8, [x8, _INTER_PACKET@GOTPAGEOFF]
Lloh19:
	ldr	w1, [x8]
Lloh20:
	adrp	x8, _FRAME_HEADER_LEN@GOTPAGE
Lloh21:
	ldr	x8, [x8, _FRAME_HEADER_LEN@GOTPAGEOFF]
Lloh22:
	ldrsw	x8, [x8]
	add	x2, x20, x8, lsl #2
	ldr	w9, [x22]
	sub	w3, w9, w8
	mov	x0, x19
	b	LBB0_7
LBB0_3:
Lloh23:
	adrp	x8, _D_PACK@GOTPAGE
Lloh24:
	ldr	x8, [x8, _D_PACK@GOTPAGEOFF]
Lloh25:
	ldr	w1, [x8]
Lloh26:
	adrp	x2, l_.str.1@PAGE
Lloh27:
	add	x2, x2, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_gspca_dbg
LBB0_4:
Lloh28:
	adrp	x8, _DISCARD_PACKET@GOTPAGE
Lloh29:
	ldr	x8, [x8, _DISCARD_PACKET@GOTPAGEOFF]
Lloh30:
	ldr	w8, [x8]
	str	w8, [x19]
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
LBB0_5:
	ldr	w8, [x19]
	cmp	w8, #1
	b.lt	LBB0_4
; %bb.6:
	ldr	w1, [x23]
	str	x8, [sp]
Lloh31:
	adrp	x2, l_.str.3@PAGE
Lloh32:
	add	x2, x2, l_.str.3@PAGEOFF
	mov	x0, x19
	bl	_gspca_dbg
	ldr	w8, [x19]
	subs	w8, w8, #1
	str	w8, [x19]
Lloh33:
	adrp	x8, _LAST_PACKET@GOTPAGE
Lloh34:
	ldr	x8, [x8, _LAST_PACKET@GOTPAGEOFF]
Lloh35:
	adrp	x9, _INTER_PACKET@GOTPAGE
Lloh36:
	ldr	x9, [x9, _INTER_PACKET@GOTPAGEOFF]
	csel	x8, x8, x9, eq
	ldr	w1, [x8]
	ldr	w3, [x22]
	mov	x0, x19
	mov	x2, x20
LBB0_7:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	b	_gspca_frame_add
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGot	Lloh35, Lloh36
	.loh AdrpLdrGot	Lloh33, Lloh34
	.loh AdrpAdd	Lloh31, Lloh32
	.cfi_endproc
                                        ; -- End function
	.comm	_D_STREAM,4,2                   ; @D_STREAM
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Got %d bytes out of %d for Block 0\n"

	.comm	_JEILINJ_MAX_TRANSFER,4,2       ; @JEILINJ_MAX_TRANSFER
	.comm	_D_PACK,4,2                     ; @D_PACK
l_.str.1:                               ; @.str.1
	.asciz	"bad length\n"

	.comm	_FRAME_START,8,3                ; @FRAME_START
l_.str.2:                               ; @.str.2
	.asciz	"blocks_left = 0x%x\n"

	.comm	_FIRST_PACKET,4,2               ; @FIRST_PACKET
	.comm	_JPEG_HDR_SZ,4,2                ; @JPEG_HDR_SZ
	.comm	_INTER_PACKET,4,2               ; @INTER_PACKET
	.comm	_FRAME_HEADER_LEN,4,2           ; @FRAME_HEADER_LEN
l_.str.3:                               ; @.str.3
	.asciz	"%d blocks remaining for frame\n"

	.comm	_LAST_PACKET,4,2                ; @LAST_PACKET
	.comm	_DISCARD_PACKET,4,2             ; @DISCARD_PACKET
	.no_dead_strip	_sd_pkt_scan
.subsections_via_symbols
