	.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, %r14d
	movq	%rsi, %rbx
	movq	%rdi, %r15
	xorl	%eax, %eax
	cmpq	$0, 8(%rdi)
	setne	%al
	leal	2040(,%rax,8), %r12d
	movl	%r12d, -44(%rbp)                ## 4-byte Spill
	jmp	LBB0_1
	.p2align	4, 0x90
LBB0_14:                                ##   in Loop: Header=BB0_1 Depth=1
	movq	_D_PACK@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_gspca_dbg
	movq	_DISCARD_PACKET@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, (%r15)
LBB0_15:                                ##   in Loop: Header=BB0_1 Depth=1
	movslq	%r13d, %rax
	leaq	(%rbx,%rax,4), %rbx
	subl	%r13d, %r14d
	jle	LBB0_16
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movl	%r14d, %edi
	movl	%r12d, %esi
	callq	_min
	movl	%eax, %r13d
	cmpl	$12, (%rbx)
	leaq	L_.str(%rip), %rdx
	jne	LBB0_14
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	leaq	L_.str(%rip), %rdx
	cmpl	$12, %r13d
	jl	LBB0_14
## %bb.3:                               ##   in Loop: Header=BB0_1 Depth=1
	movl	4(%rbx), %eax
	leaq	L_.str.1(%rip), %rdx
	movq	_UVC_STREAM_ERR@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	jne	LBB0_14
## %bb.4:                               ##   in Loop: Header=BB0_1 Depth=1
	leaq	L_.str.2(%rip), %rdx
	movq	_UVC_STREAM_PTS@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_14
## %bb.5:                               ##   in Loop: Header=BB0_1 Depth=1
	movl	20(%rbx), %ecx
	shll	$24, %ecx
	movl	12(%rbx), %r12d
	movl	16(%rbx), %edx
	shll	$16, %edx
	orl	%ecx, %edx
	shll	$8, %r12d
	orl	%edx, %r12d
	orl	8(%rbx), %r12d
	movq	_UVC_STREAM_FID@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	andl	%eax, %edx
	cmpl	(%r15), %r12d
	jne	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_1 Depth=1
	cmpl	4(%r15), %edx
	jne	LBB0_7
## %bb.10:                              ##   in Loop: Header=BB0_1 Depth=1
	movq	_UVC_STREAM_EOF@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_12
## %bb.11:                              ##   in Loop: Header=BB0_1 Depth=1
	movl	$0, (%r15)
	movq	_LAST_PACKET@GOTPCREL(%rip), %rax
	jmp	LBB0_13
LBB0_7:                                 ##   in Loop: Header=BB0_1 Depth=1
	movq	(%r15), %rax
	movq	_INTER_PACKET@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_9
## %bb.8:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	_LAST_PACKET@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	movq	%r15, %rdi
	movl	%edx, -48(%rbp)                 ## 4-byte Spill
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	callq	_gspca_frame_add
	movl	-48(%rbp), %edx                 ## 4-byte Reload
LBB0_9:                                 ##   in Loop: Header=BB0_1 Depth=1
	movl	%r12d, (%r15)
	movl	%edx, 4(%r15)
	movq	_FIRST_PACKET@GOTPCREL(%rip), %rax
LBB0_13:                                ##   in Loop: Header=BB0_1 Depth=1
	movq	(%rax), %rsi
	leaq	48(%rbx), %rdx
	leal	-12(%r13), %ecx
	movq	%r15, %rdi
	callq	_gspca_frame_add
	movl	-44(%rbp), %r12d                ## 4-byte Reload
	jmp	LBB0_15
LBB0_12:                                ##   in Loop: Header=BB0_1 Depth=1
	movq	_INTER_PACKET@GOTPCREL(%rip), %rax
	jmp	LBB0_13
LBB0_16:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_D_PACK,4,2                     ## @D_PACK
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"bad header\n"

	.comm	_UVC_STREAM_ERR,4,2             ## @UVC_STREAM_ERR
L_.str.1:                               ## @.str.1
	.asciz	"payload error\n"

	.comm	_UVC_STREAM_PTS,4,2             ## @UVC_STREAM_PTS
L_.str.2:                               ## @.str.2
	.asciz	"PTS not present\n"

	.comm	_UVC_STREAM_FID,4,2             ## @UVC_STREAM_FID
	.comm	_INTER_PACKET,8,3               ## @INTER_PACKET
	.comm	_LAST_PACKET,8,3                ## @LAST_PACKET
	.comm	_FIRST_PACKET,8,3               ## @FIRST_PACKET
	.comm	_UVC_STREAM_EOF,4,2             ## @UVC_STREAM_EOF
	.comm	_DISCARD_PACKET,8,3             ## @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:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x2
	mov	x20, x1
	mov	x21, x0
	ldr	x8, [x0, #8]
	cmp	x8, #0
	mov	w8, #2048
	mov	w9, #2040
	csel	w22, w9, w8, eq
Lloh0:
	adrp	x24, l_.str@PAGE
Lloh1:
	add	x24, x24, l_.str@PAGEOFF
Lloh2:
	adrp	x25, _D_PACK@GOTPAGE
Lloh3:
	ldr	x25, [x25, _D_PACK@GOTPAGEOFF]
Lloh4:
	adrp	x26, _DISCARD_PACKET@GOTPAGE
Lloh5:
	ldr	x26, [x26, _DISCARD_PACKET@GOTPAGEOFF]
Lloh6:
	adrp	x27, _UVC_STREAM_ERR@GOTPAGE
Lloh7:
	ldr	x27, [x27, _UVC_STREAM_ERR@GOTPAGEOFF]
Lloh8:
	adrp	x28, l_.str.1@PAGE
Lloh9:
	add	x28, x28, l_.str.1@PAGEOFF
	b	LBB0_4
LBB0_1:                                 ;   in Loop: Header=BB0_4 Depth=1
Lloh10:
	adrp	x2, l_.str.2@PAGE
Lloh11:
	add	x2, x2, l_.str.2@PAGEOFF
LBB0_2:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	w1, [x25]
	mov	x0, x21
	bl	_gspca_dbg
	ldr	x8, [x26]
	str	x8, [x21]
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	sub	w19, w19, w23
	add	x20, x20, w23, sxtw #2
	cmp	w19, #0
	b.le	LBB0_17
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	mov	x1, x22
	bl	_min
	mov	x23, x0
	ldr	w8, [x20]
	cmp	w8, #12
	ccmp	w0, #12, #8, eq
	mov	x2, x24
	b.lt	LBB0_2
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	w8, [x20, #4]
	ldr	w9, [x27]
	mov	x2, x28
	tst	w9, w8
	b.ne	LBB0_2
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
Lloh12:
	adrp	x9, _UVC_STREAM_PTS@GOTPAGE
Lloh13:
	ldr	x9, [x9, _UVC_STREAM_PTS@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_1
; %bb.7:                                ;   in Loop: Header=BB0_4 Depth=1
	ldp	w10, w9, [x20, #16]
	lsl	w10, w10, #16
	orr	w9, w10, w9, lsl #24
	ldp	w11, w10, [x20, #8]
	orr	w9, w9, w10, lsl #8
	orr	w27, w9, w11
Lloh15:
	adrp	x9, _UVC_STREAM_FID@GOTPAGE
Lloh16:
	ldr	x9, [x9, _UVC_STREAM_FID@GOTPAGEOFF]
Lloh17:
	ldr	w9, [x9]
	and	w28, w9, w8
	ldr	w9, [x21]
	cmp	w27, w9
	b.ne	LBB0_11
; %bb.8:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	w9, [x21, #4]
	cmp	w28, w9
	b.ne	LBB0_11
; %bb.9:                                ;   in Loop: Header=BB0_4 Depth=1
Lloh18:
	adrp	x9, _UVC_STREAM_EOF@GOTPAGE
Lloh19:
	ldr	x9, [x9, _UVC_STREAM_EOF@GOTPAGEOFF]
Lloh20:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_14
; %bb.10:                               ;   in Loop: Header=BB0_4 Depth=1
	str	wzr, [x21]
Lloh21:
	adrp	x8, _LAST_PACKET@GOTPAGE
Lloh22:
	ldr	x8, [x8, _LAST_PACKET@GOTPAGEOFF]
	b	LBB0_15
LBB0_11:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x8, [x21]
Lloh23:
	adrp	x9, _INTER_PACKET@GOTPAGE
Lloh24:
	ldr	x9, [x9, _INTER_PACKET@GOTPAGEOFF]
Lloh25:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_13
; %bb.12:                               ;   in Loop: Header=BB0_4 Depth=1
Lloh26:
	adrp	x8, _LAST_PACKET@GOTPAGE
Lloh27:
	ldr	x8, [x8, _LAST_PACKET@GOTPAGEOFF]
Lloh28:
	ldr	x1, [x8]
	mov	x0, x21
	mov	x2, #0
	mov	w3, #0
	bl	_gspca_frame_add
LBB0_13:                                ;   in Loop: Header=BB0_4 Depth=1
	stp	w27, w28, [x21]
	add	x2, x20, #48
	sub	w3, w23, #12
Lloh29:
	adrp	x8, _FIRST_PACKET@GOTPAGE
Lloh30:
	ldr	x8, [x8, _FIRST_PACKET@GOTPAGEOFF]
Lloh31:
	ldr	x1, [x8]
	b	LBB0_16
LBB0_14:                                ;   in Loop: Header=BB0_4 Depth=1
Lloh32:
	adrp	x8, _INTER_PACKET@GOTPAGE
Lloh33:
	ldr	x8, [x8, _INTER_PACKET@GOTPAGEOFF]
LBB0_15:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x1, [x8]
	add	x2, x20, #48
	sub	w3, w23, #12
LBB0_16:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x21
	bl	_gspca_frame_add
Lloh34:
	adrp	x27, _UVC_STREAM_ERR@GOTPAGE
Lloh35:
	ldr	x27, [x27, _UVC_STREAM_ERR@GOTPAGEOFF]
Lloh36:
	adrp	x28, l_.str.1@PAGE
Lloh37:
	add	x28, x28, l_.str.1@PAGEOFF
	b	LBB0_3
LBB0_17:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGot	Lloh32, Lloh33
	.loh AdrpAdd	Lloh36, Lloh37
	.loh AdrpLdrGot	Lloh34, Lloh35
	.cfi_endproc
                                        ; -- End function
	.comm	_D_PACK,4,2                     ; @D_PACK
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"bad header\n"

	.comm	_UVC_STREAM_ERR,4,2             ; @UVC_STREAM_ERR
l_.str.1:                               ; @.str.1
	.asciz	"payload error\n"

	.comm	_UVC_STREAM_PTS,4,2             ; @UVC_STREAM_PTS
l_.str.2:                               ; @.str.2
	.asciz	"PTS not present\n"

	.comm	_UVC_STREAM_FID,4,2             ; @UVC_STREAM_FID
	.comm	_INTER_PACKET,8,3               ; @INTER_PACKET
	.comm	_LAST_PACKET,8,3                ; @LAST_PACKET
	.comm	_FIRST_PACKET,8,3               ; @FIRST_PACKET
	.comm	_UVC_STREAM_EOF,4,2             ; @UVC_STREAM_EOF
	.comm	_DISCARD_PACKET,8,3             ; @DISCARD_PACKET
	.no_dead_strip	_sd_pkt_scan
.subsections_via_symbols
