	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r14d
	movq	%rsi, %rbx
	movq	%rdi, %r15
	movq	(%rdi), %rcx
	movq	_BRIDGE_TP6810@GOTPCREL(%rip), %rdx
	movl	(%rsi), %eax
	cmpq	(%rdx), %rcx
	jne	LBB0_22
## %bb.1:
	testl	%eax, %eax
	je	LBB0_7
## %bb.2:
	cmpl	$90, %eax
	je	LBB0_8
## %bb.3:
	cmpl	$170, %eax
	je	LBB0_7
## %bb.4:
	cmpl	$193, %eax
	jl	LBB0_8
## %bb.5:
	movq	_D_FRAM@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
	movq	%r15, %rdi
	callq	_gspca_dbg
	jmp	LBB0_6
LBB0_22:
	cmpl	$204, %eax
	je	LBB0_31
## %bb.23:
	cmpl	$170, %eax
	je	LBB0_6
## %bb.24:
	cmpl	$85, %eax
	jne	LBB0_7
## %bb.25:
	movq	_LAST_PACKET@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	movq	%rbx, %rdx
	xorl	%ecx, %ecx
	callq	_gspca_frame_add
	cmpl	$8, %r14d
	jl	LBB0_6
## %bb.26:
	cmpl	$255, 4(%rbx)
	jne	LBB0_6
## %bb.27:
	cmpl	$216, 8(%rbx)
	jne	LBB0_6
## %bb.28:
	cmpl	$255, 12(%rbx)
	jne	LBB0_6
## %bb.29:
	cmpl	$254, 16(%rbx)
	jne	LBB0_6
## %bb.30:
	movl	28(%rbx), %esi
	jmp	LBB0_13
LBB0_8:
	cmpl	$2, %r14d
	jle	LBB0_6
## %bb.9:
	leaq	4(%rbx), %rdx
	cmpl	$255, (%rdx)
	jne	LBB0_16
## %bb.10:
	cmpl	$216, 8(%rbx)
	jne	LBB0_16
## %bb.11:
	cmpl	$7, %r14d
	jbe	LBB0_6
## %bb.12:
	movl	28(%rbx), %esi
	andl	$15, %esi
LBB0_13:
	cmpl	8(%r15), %esi
	je	LBB0_15
## %bb.14:
	movq	%r15, %rdi
	callq	_set_dqt
LBB0_15:
	movq	_FIRST_PACKET@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	16(%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
	addq	$32, %rbx
	addl	$-8, %r14d
	jmp	LBB0_35
LBB0_31:
	cmpl	$3, %r14d
	jl	LBB0_6
## %bb.32:
	cmpl	$255, 4(%rbx)
	jne	LBB0_34
## %bb.33:
	cmpl	$216, 8(%rbx)
	jne	LBB0_34
LBB0_6:
	movq	_DISCARD_PACKET@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, (%r15)
LBB0_7:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_16:
	leal	-1(%r14), %ecx
	leal	-3(%r14), %eax
	cmpl	$255, (%rdx,%rax,4)
	jne	LBB0_21
## %bb.17:
	addl	$-2, %r14d
	cmpl	$217, (%rdx,%r14,4)
	jne	LBB0_21
## %bb.18:
	movq	_LAST_PACKET@GOTPCREL(%rip), %rax
	jmp	LBB0_19
LBB0_21:
	movq	_INTER_PACKET@GOTPCREL(%rip), %rax
LBB0_19:
	movl	(%rax), %esi
	movq	%r15, %rdi
	jmp	LBB0_20
LBB0_34:
	addq	$4, %rbx
	movq	_INTER_PACKET@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	decl	%r14d
LBB0_35:
	movq	%r15, %rdi
	movq	%rbx, %rdx
	movl	%r14d, %ecx
LBB0_20:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_gspca_frame_add                ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_BRIDGE_TP6810,8,3              ## @BRIDGE_TP6810
	.comm	_D_FRAM,4,2                     ## @D_FRAM
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"bad frame\n"

	.comm	_DISCARD_PACKET,8,3             ## @DISCARD_PACKET
	.comm	_FIRST_PACKET,4,2               ## @FIRST_PACKET
	.comm	_JPEG_HDR_SZ,4,2                ## @JPEG_HDR_SZ
	.comm	_INTER_PACKET,4,2               ## @INTER_PACKET
	.comm	_LAST_PACKET,4,2                ## @LAST_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:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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	x21, x2
	mov	x20, x1
	mov	x19, x0
	ldr	x9, [x0]
Lloh0:
	adrp	x8, _BRIDGE_TP6810@GOTPAGE
Lloh1:
	ldr	x8, [x8, _BRIDGE_TP6810@GOTPAGEOFF]
Lloh2:
	ldr	x10, [x8]
	ldr	w8, [x1]
	cmp	x9, x10
	b.ne	LBB0_6
; %bb.1:
	cbz	w8, LBB0_28
; %bb.2:
	cmp	w8, #90
	b.eq	LBB0_17
; %bb.3:
	cmp	w8, #170
	b.eq	LBB0_28
; %bb.4:
	cmp	w8, #193
	b.lt	LBB0_17
; %bb.5:
Lloh3:
	adrp	x8, _D_FRAM@GOTPAGE
Lloh4:
	ldr	x8, [x8, _D_FRAM@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
Lloh6:
	adrp	x2, l_.str@PAGE
Lloh7:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x19
	bl	_gspca_dbg
	b	LBB0_27
LBB0_6:
	cmp	w8, #204
	b.eq	LBB0_24
; %bb.7:
	cmp	w8, #170
	b.eq	LBB0_27
; %bb.8:
	cmp	w8, #85
	b.ne	LBB0_28
; %bb.9:
Lloh8:
	adrp	x8, _LAST_PACKET@GOTPAGE
Lloh9:
	ldr	x8, [x8, _LAST_PACKET@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	mov	x0, x19
	mov	x2, x20
	mov	w3, #0
	bl	_gspca_frame_add
	subs	w21, w21, #8
	b.lt	LBB0_27
; %bb.10:
	ldr	w8, [x20, #4]
	cmp	w8, #255
	b.ne	LBB0_27
; %bb.11:
	ldr	w8, [x20, #8]
	cmp	w8, #216
	b.ne	LBB0_27
; %bb.12:
	ldr	w8, [x20, #12]
	cmp	w8, #255
	b.ne	LBB0_27
; %bb.13:
	ldr	w8, [x20, #16]
	cmp	w8, #254
	b.ne	LBB0_27
; %bb.14:
	ldr	w1, [x20, #28]
	ldr	w8, [x19, #8]
	cmp	w1, w8
	b.eq	LBB0_16
; %bb.15:
	mov	x0, x19
	bl	_set_dqt
LBB0_16:
Lloh11:
	adrp	x8, _FIRST_PACKET@GOTPAGE
Lloh12:
	ldr	x8, [x8, _FIRST_PACKET@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
	ldr	x2, [x19, #16]
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]
	add	x2, x20, #32
	mov	x0, x19
	mov	x3, x21
	b	LBB0_36
LBB0_17:
	subs	w8, w21, #2
	b.le	LBB0_27
; %bb.18:
	add	x2, x20, #4
	ldr	w9, [x2]
	cmp	w9, #255
	b.ne	LBB0_29
; %bb.19:
	ldr	w9, [x20, #8]
	cmp	w9, #216
	b.ne	LBB0_29
; %bb.20:
	cmp	w21, #7
	b.ls	LBB0_27
; %bb.21:
	ldr	w8, [x20, #28]
	and	w1, w8, #0xf
	ldr	w8, [x19, #8]
	cmp	w1, w8
	b.eq	LBB0_23
; %bb.22:
	mov	x0, x19
	bl	_set_dqt
LBB0_23:
Lloh20:
	adrp	x8, _FIRST_PACKET@GOTPAGE
Lloh21:
	ldr	x8, [x8, _FIRST_PACKET@GOTPAGEOFF]
Lloh22:
	ldr	w1, [x8]
	ldr	x2, [x19, #16]
Lloh23:
	adrp	x8, _JPEG_HDR_SZ@GOTPAGE
Lloh24:
	ldr	x8, [x8, _JPEG_HDR_SZ@GOTPAGEOFF]
Lloh25:
	ldr	w3, [x8]
	mov	x0, x19
	bl	_gspca_frame_add
Lloh26:
	adrp	x8, _INTER_PACKET@GOTPAGE
Lloh27:
	ldr	x8, [x8, _INTER_PACKET@GOTPAGEOFF]
Lloh28:
	ldr	w1, [x8]
	add	x2, x20, #32
	sub	w3, w21, #8
	b	LBB0_35
LBB0_24:
	cmp	w21, #3
	b.lt	LBB0_27
; %bb.25:
	mov	x2, x20
	ldr	w8, [x2, #4]!
	cmp	w8, #255
	b.ne	LBB0_34
; %bb.26:
	ldr	w8, [x20, #8]
	cmp	w8, #216
	b.ne	LBB0_34
LBB0_27:
Lloh29:
	adrp	x8, _DISCARD_PACKET@GOTPAGE
Lloh30:
	ldr	x8, [x8, _DISCARD_PACKET@GOTPAGEOFF]
Lloh31:
	ldr	x8, [x8]
	str	x8, [x19]
LBB0_28:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_29:
	sub	w3, w21, #1
	sub	w9, w21, #3
	ldr	w9, [x2, w9, uxtw #2]
	cmp	w9, #255
	b.ne	LBB0_32
; %bb.30:
	ldr	w8, [x2, w8, uxtw #2]
	cmp	w8, #217
	b.ne	LBB0_32
; %bb.31:
Lloh32:
	adrp	x8, _LAST_PACKET@GOTPAGE
Lloh33:
	ldr	x8, [x8, _LAST_PACKET@GOTPAGEOFF]
	b	LBB0_33
LBB0_32:
Lloh34:
	adrp	x8, _INTER_PACKET@GOTPAGE
Lloh35:
	ldr	x8, [x8, _INTER_PACKET@GOTPAGEOFF]
LBB0_33:
	ldr	w1, [x8]
	b	LBB0_35
LBB0_34:
Lloh36:
	adrp	x8, _INTER_PACKET@GOTPAGE
Lloh37:
	ldr	x8, [x8, _INTER_PACKET@GOTPAGEOFF]
Lloh38:
	ldr	w1, [x8]
	sub	w3, w21, #1
LBB0_35:
	mov	x0, x19
LBB0_36:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_gspca_frame_add
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGot	Lloh32, Lloh33
	.loh AdrpLdrGot	Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.cfi_endproc
                                        ; -- End function
	.comm	_BRIDGE_TP6810,8,3              ; @BRIDGE_TP6810
	.comm	_D_FRAM,4,2                     ; @D_FRAM
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"bad frame\n"

	.comm	_DISCARD_PACKET,8,3             ; @DISCARD_PACKET
	.comm	_FIRST_PACKET,4,2               ; @FIRST_PACKET
	.comm	_JPEG_HDR_SZ,4,2                ; @JPEG_HDR_SZ
	.comm	_INTER_PACKET,4,2               ; @INTER_PACKET
	.comm	_LAST_PACKET,4,2                ; @LAST_PACKET
	.no_dead_strip	_sd_pkt_scan
.subsections_via_symbols
