	.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, %ebx
	movq	%rsi, %r15
	movq	%rdi, %r14
	cmpl	$255, (%rsi)
	jne	LBB0_3
## %bb.1:
	cmpl	$216, 4(%r15)
	jne	LBB0_3
## %bb.2:
	movq	_D_PACK@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
	movq	%r14, %rdi
	movl	%ebx, %ecx
	callq	_gspca_dbg
	movq	_LAST_PACKET@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	callq	_gspca_frame_add
	movq	8(%r14), %rax
	leaq	(%r15,%rax,4), %rdx
	subl	%eax, %ebx
	movq	_FIRST_PACKET@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	movl	%ebx, %ecx
	jmp	LBB0_4
LBB0_3:
	movq	(%r14), %rax
	movq	_BRIDGE_VC0321@GOTPCREL(%rip), %rdx
	movq	%rax, %rcx
	shrq	$32, %rcx
	subl	%eax, %ecx
	cmpl	%ebx, %ecx
	cmovgel	%ebx, %ecx
	cmpq	(%rdx), %rax
	cmovnel	%ebx, %ecx
	movq	_INTER_PACKET@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	movq	%r15, %rdx
                                        ## kill: def $ecx killed $ecx killed $rcx
LBB0_4:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_gspca_frame_add                ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_D_PACK,4,2                     ## @D_PACK
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"vc032x header packet found len %d\n"

	.comm	_LAST_PACKET,4,2                ## @LAST_PACKET
	.comm	_FIRST_PACKET,4,2               ## @FIRST_PACKET
	.comm	_BRIDGE_VC0321,8,3              ## @BRIDGE_VC0321
	.comm	_INTER_PACKET,4,2               ## @INTER_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	x20, x2
	mov	x21, x1
	mov	x19, x0
	ldr	w8, [x1]
	cmp	w8, #255
	b.ne	LBB0_3
; %bb.1:
	ldr	w8, [x21, #4]
	cmp	w8, #216
	b.ne	LBB0_3
; %bb.2:
Lloh0:
	adrp	x8, _D_PACK@GOTPAGE
Lloh1:
	ldr	x8, [x8, _D_PACK@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
Lloh3:
	adrp	x2, l_.str@PAGE
Lloh4:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x19
	mov	x3, x20
	bl	_gspca_dbg
Lloh5:
	adrp	x8, _LAST_PACKET@GOTPAGE
Lloh6:
	ldr	x8, [x8, _LAST_PACKET@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	mov	x0, x19
	mov	x2, #0
	mov	w3, #0
	bl	_gspca_frame_add
	ldr	x8, [x19, #8]
	add	x2, x21, x8, lsl #2
Lloh8:
	adrp	x9, _FIRST_PACKET@GOTPAGE
Lloh9:
	ldr	x9, [x9, _FIRST_PACKET@GOTPAGEOFF]
	sub	w3, w20, w8
Lloh10:
	ldr	w1, [x9]
	mov	x0, x19
	b	LBB0_4
LBB0_3:
	ldr	x8, [x19]
Lloh11:
	adrp	x9, _BRIDGE_VC0321@GOTPAGE
Lloh12:
	ldr	x9, [x9, _BRIDGE_VC0321@GOTPAGEOFF]
Lloh13:
	ldr	x9, [x9]
	lsr	x10, x8, #32
	sub	w10, w10, w8
	cmp	w10, w20
	csel	w10, w10, w20, lt
	cmp	x8, x9
Lloh14:
	adrp	x8, _INTER_PACKET@GOTPAGE
Lloh15:
	ldr	x8, [x8, _INTER_PACKET@GOTPAGEOFF]
	csel	w3, w10, w20, eq
Lloh16:
	ldr	w1, [x8]
	mov	x0, x19
	mov	x2, x21
LBB0_4:
	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	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_D_PACK,4,2                     ; @D_PACK
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"vc032x header packet found len %d\n"

	.comm	_LAST_PACKET,4,2                ; @LAST_PACKET
	.comm	_FIRST_PACKET,4,2               ; @FIRST_PACKET
	.comm	_BRIDGE_VC0321,8,3              ; @BRIDGE_VC0321
	.comm	_INTER_PACKET,4,2               ; @INTER_PACKET
	.no_dead_strip	_sd_pkt_scan
.subsections_via_symbols
