	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	%rdi, %rbx
	cmpl	$514, (%rsi)                    ## imm = 0x202
	jne	LBB0_4
## %bb.1:
	movq	_LAST_PACKET@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	callq	_gspca_frame_add
	movq	$0, _sd_pkt_scan.nSkipped(%rip)
	movl	4(%rbx), %eax
	cmpl	$9, %eax
	ja	LBB0_3
## %bb.2:
	incl	%eax
	movl	%eax, 4(%rbx)
LBB0_3:
	movq	_FIRST_PACKET@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	jmp	LBB0_8
LBB0_4:
	movl	%edx, %ecx
	movq	%rsi, %rdx
	movslq	8(%rbx), %rax
	movslq	(%rbx), %rsi
	movq	(%rbx), %rdi
	movslq	(%rdi,%rax,4), %rax
	incq	%rax
	imulq	%rsi, %rax
	movq	_sd_pkt_scan.nSkipped(%rip), %rsi
	movslq	%ecx, %rdi
	addq	%rsi, %rdi
	addq	$-2, %rdi
	cmpq	%rax, %rdi
	jbe	LBB0_9
## %bb.5:
	addq	$8, %rdx
	addl	$-2, %ecx
	cmpq	%rax, %rsi
	jae	LBB0_7
## %bb.6:
	movq	%rax, %rdi
	subq	%rsi, %rdi
	leaq	(%rdx,%rdi,4), %rdx
	subl	%edi, %ecx
	incq	%rax
	movq	%rax, _sd_pkt_scan.nSkipped(%rip)
LBB0_7:
	movq	_INTER_PACKET@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
LBB0_8:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	jmp	_gspca_frame_add                ## TAILCALL
LBB0_9:
	movq	%rdi, _sd_pkt_scan.nSkipped(%rip)
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
.zerofill __DATA,__bss,_sd_pkt_scan.nSkipped,8,3 ## @sd_pkt_scan.nSkipped
	.comm	_LAST_PACKET,4,2                ## @LAST_PACKET
	.comm	_FIRST_PACKET,4,2               ## @FIRST_PACKET
	.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	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	ldr	w8, [x1]
	cmp	w8, #514
	b.ne	LBB0_4
; %bb.1:
Lloh0:
	adrp	x8, _LAST_PACKET@GOTPAGE
Lloh1:
	ldr	x8, [x8, _LAST_PACKET@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x19
	mov	x2, #0
	mov	w3, #0
	bl	_gspca_frame_add
	adrp	x8, _sd_pkt_scan.nSkipped@PAGE
	str	xzr, [x8, _sd_pkt_scan.nSkipped@PAGEOFF]
	ldr	w8, [x19, #4]
	cmp	w8, #9
	b.hi	LBB0_3
; %bb.2:
	add	w8, w8, #1
	str	w8, [x19, #4]
LBB0_3:
Lloh3:
	adrp	x8, _FIRST_PACKET@GOTPAGE
Lloh4:
	ldr	x8, [x8, _FIRST_PACKET@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	x0, x19
	mov	x2, #0
	mov	w3, #0
	b	LBB0_8
LBB0_4:
	ldrsw	x8, [x19, #8]
	ldrsw	x9, [x19]
	ldr	x10, [x19]
	ldrsw	x8, [x10, x8, lsl #2]
	madd	x9, x9, x8, x9
	sub	w3, w2, #2
	adrp	x8, _sd_pkt_scan.nSkipped@PAGE
	ldr	x10, [x8, _sd_pkt_scan.nSkipped@PAGEOFF]
	add	x11, x10, w3, sxtw
	cmp	x11, x9
	b.ls	LBB0_9
; %bb.5:
	add	x2, x1, #8
	cmp	x10, x9
	b.hs	LBB0_7
; %bb.6:
	sub	x10, x9, x10
	sub	w3, w3, w10
	add	x2, x2, x10, lsl #2
	add	x9, x9, #1
	str	x9, [x8, _sd_pkt_scan.nSkipped@PAGEOFF]
LBB0_7:
Lloh6:
	adrp	x8, _INTER_PACKET@GOTPAGE
Lloh7:
	ldr	x8, [x8, _INTER_PACKET@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	mov	x0, x19
LBB0_8:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_gspca_frame_add
LBB0_9:
	str	x11, [x8, _sd_pkt_scan.nSkipped@PAGEOFF]
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
.zerofill __DATA,__bss,_sd_pkt_scan.nSkipped,8,3 ; @sd_pkt_scan.nSkipped
	.comm	_LAST_PACKET,4,2                ; @LAST_PACKET
	.comm	_FIRST_PACKET,4,2               ; @FIRST_PACKET
	.comm	_INTER_PACKET,4,2               ; @INTER_PACKET
	.no_dead_strip	_sd_pkt_scan
.subsections_via_symbols
