	.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
	cmpl	$12, %edx
	jge	LBB0_1
## %bb.11:
	popq	%rbp
	retq
LBB0_1:
	movl	%edx, %ecx
	movq	%rsi, %r8
	movslq	(%rdi), %rsi
	movq	(%r8), %rax
	movsbl	(%rax), %edx
	movb	1(%rax), %al
	cmpl	$82, %edx
	jne	LBB0_12
## %bb.2:
	cmpb	$66, %al
	jne	LBB0_12
## %bb.3:
	addl	$-16, %ecx
	movq	%rsi, %rax
	orq	$1, %rax
	movq	8(%r8), %rdx
	subq	$-128, %r8
	cmpq	%rax, %rdx
	jne	LBB0_6
## %bb.4:
	movq	_FIRST_PACKET@GOTPCREL(%rip), %rax
	jmp	LBB0_5
LBB0_12:
	movsbl	%al, %ecx
	leaq	L_.str(%rip), %rdi
                                        ## kill: def $esi killed $esi killed $rsi
	xorl	%eax, %eax
	popq	%rbp
	jmp	_pr_warn                        ## TAILCALL
LBB0_6:
	movq	%rsi, %rax
	orq	$2, %rax
	cmpq	%rax, %rdx
	jne	LBB0_8
## %bb.7:
	movq	_INTER_PACKET@GOTPCREL(%rip), %rax
	jmp	LBB0_5
LBB0_8:
	orq	$5, %rsi
	cmpq	%rsi, %rdx
	jne	LBB0_10
## %bb.9:
	movq	_LAST_PACKET@GOTPCREL(%rip), %rax
LBB0_5:
	movl	(%rax), %esi
	movq	%r8, %rdx
	popq	%rbp
	jmp	_gspca_frame_add                ## TAILCALL
LBB0_10:
	leaq	L_.str.1(%rip), %rdi
	xorl	%eax, %eax
	popq	%rbp
	jmp	_pr_warn                        ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"[Stream %02x] Invalid magic %02x%02x\n"

	.comm	_FIRST_PACKET,4,2               ## @FIRST_PACKET
	.comm	_INTER_PACKET,4,2               ## @INTER_PACKET
	.comm	_LAST_PACKET,4,2                ## @LAST_PACKET
L_.str.1:                               ## @.str.1
	.asciz	"Packet type not recognized...\n"

	.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, #48
	.cfi_def_cfa_offset 48
	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
	cmp	w2, #12
	b.lt	LBB0_6
; %bb.1:
	ldrsw	x9, [x0]
	ldr	x11, [x1]
	ldrsb	w10, [x11]
	ldrb	w11, [x11, #1]
	cmp	w10, #82
	b.ne	LBB0_5
; %bb.2:
	cmp	w11, #66
	b.ne	LBB0_5
; %bb.3:
	mov	x8, x2
	add	x2, x1, #128
	sub	w3, w8, #16
	orr	x10, x9, #0x1
	ldr	x8, [x1, #8]
	cmp	x8, x10
	b.ne	LBB0_7
; %bb.4:
Lloh0:
	adrp	x8, _FIRST_PACKET@GOTPAGE
Lloh1:
	ldr	x8, [x8, _FIRST_PACKET@GOTPAGEOFF]
	b	LBB0_11
LBB0_5:
	sxtb	w8, w11
	stp	x10, x8, [sp, #8]
                                        ; kill: def $w9 killed $w9 killed $x9 def $x9
	str	x9, [sp]
Lloh2:
	adrp	x0, l_.str@PAGE
Lloh3:
	add	x0, x0, l_.str@PAGEOFF
	bl	_pr_warn
LBB0_6:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
LBB0_7:
	orr	x10, x9, #0x2
	cmp	x8, x10
	b.ne	LBB0_9
; %bb.8:
Lloh4:
	adrp	x8, _INTER_PACKET@GOTPAGE
Lloh5:
	ldr	x8, [x8, _INTER_PACKET@GOTPAGEOFF]
	b	LBB0_11
LBB0_9:
	mov	w10, #5
	orr	x9, x9, x10
	cmp	x8, x9
	b.ne	LBB0_12
; %bb.10:
Lloh6:
	adrp	x8, _LAST_PACKET@GOTPAGE
Lloh7:
	ldr	x8, [x8, _LAST_PACKET@GOTPAGEOFF]
LBB0_11:
	ldr	w1, [x8]
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #48
	b	_gspca_frame_add
LBB0_12:
Lloh8:
	adrp	x0, l_.str.1@PAGE
Lloh9:
	add	x0, x0, l_.str.1@PAGEOFF
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #48
	b	_pr_warn
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"[Stream %02x] Invalid magic %02x%02x\n"

	.comm	_FIRST_PACKET,4,2               ; @FIRST_PACKET
	.comm	_INTER_PACKET,4,2               ; @INTER_PACKET
	.comm	_LAST_PACKET,4,2                ; @LAST_PACKET
l_.str.1:                               ; @.str.1
	.asciz	"Packet type not recognized...\n"

	.no_dead_strip	_sd_pkt_scan
.subsections_via_symbols
