	.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
	leaq	L_.str(%rip), %r13
	jmp	LBB0_1
	.p2align	4, 0x90
LBB0_15:                                ##   in Loop: Header=BB0_1 Depth=1
	movq	_D_PACK@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_PDEBUG
	movq	_DISCARD_PACKET@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, (%r15)
LBB0_16:                                ##   in Loop: Header=BB0_1 Depth=1
	movslq	%r12d, %rax
	leaq	(%rbx,%rax,4), %rbx
	subl	%r12d, %r14d
	jle	LBB0_17
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movl	%r14d, %edi
	movl	$2048, %esi                     ## imm = 0x800
	callq	_min
	movl	%eax, %r12d
	cmpl	$12, (%rbx)
	movq	%r13, %rsi
	jne	LBB0_15
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	%r13, %rsi
	cmpl	$12, %r12d
	jl	LBB0_15
## %bb.3:                               ##   in Loop: Header=BB0_1 Depth=1
	movl	4(%rbx), %eax
	leaq	L_.str.1(%rip), %rsi
	movq	_UVC_STREAM_ERR@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	jne	LBB0_15
## %bb.4:                               ##   in Loop: Header=BB0_1 Depth=1
	leaq	L_.str.2(%rip), %rsi
	movq	_UVC_STREAM_PTS@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_15
## %bb.5:                               ##   in Loop: Header=BB0_1 Depth=1
	movl	20(%rbx), %ecx
	shll	$24, %ecx
	movl	12(%rbx), %r13d
	movl	16(%rbx), %edx
	shll	$16, %edx
	orl	%ecx, %edx
	shll	$8, %r13d
	orl	%edx, %r13d
	orl	8(%rbx), %r13d
	xorl	%edx, %edx
	movq	_UVC_STREAM_FID@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	setne	%dl
	cmpl	(%r15), %r13d
	jne	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_1 Depth=1
	cmpl	%edx, 4(%r15)
	jne	LBB0_7
## %bb.10:                              ##   in Loop: Header=BB0_1 Depth=1
	movq	_UVC_STREAM_EOF@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_13
## %bb.11:                              ##   in Loop: Header=BB0_1 Depth=1
	movl	$0, (%r15)
	leal	-12(%r12), %ecx
	movl	8(%r15), %eax
	addl	%ecx, %eax
	movl	12(%r15), %edx
	imull	16(%r15), %edx
	addl	%edx, %edx
	leaq	L_.str.3(%rip), %rsi
	cmpl	%edx, %eax
	leaq	L_.str(%rip), %r13
	jne	LBB0_15
## %bb.12:                              ##   in Loop: Header=BB0_1 Depth=1
	movq	_LAST_PACKET@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	leaq	48(%rbx), %rdx
	movq	%r15, %rdi
	callq	_gspca_frame_add
	jmp	LBB0_16
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, -44(%rbp)                 ## 4-byte Spill
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	callq	_gspca_frame_add
	movl	-44(%rbp), %edx                 ## 4-byte Reload
LBB0_9:                                 ##   in Loop: Header=BB0_1 Depth=1
	movl	%r13d, (%r15)
	movl	%edx, 4(%r15)
	movq	_FIRST_PACKET@GOTPCREL(%rip), %rax
LBB0_14:                                ##   in Loop: Header=BB0_1 Depth=1
	movq	(%rax), %rsi
	leaq	48(%rbx), %rdx
	leal	-12(%r12), %ecx
	movq	%r15, %rdi
	callq	_gspca_frame_add
	leaq	L_.str(%rip), %r13
	jmp	LBB0_16
LBB0_13:                                ##   in Loop: Header=BB0_1 Depth=1
	movq	_INTER_PACKET@GOTPCREL(%rip), %rax
	jmp	LBB0_14
LBB0_17:
	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"

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

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

	.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
L_.str.3:                               ## @.str.3
	.asciz	"wrong sized frame"

	.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
Lloh0:
	adrp	x23, _D_PACK@GOTPAGE
Lloh1:
	ldr	x23, [x23, _D_PACK@GOTPAGEOFF]
Lloh2:
	adrp	x24, _DISCARD_PACKET@GOTPAGE
Lloh3:
	ldr	x24, [x24, _DISCARD_PACKET@GOTPAGEOFF]
Lloh4:
	adrp	x25, l_.str@PAGE
Lloh5:
	add	x25, x25, l_.str@PAGEOFF
Lloh6:
	adrp	x28, _UVC_STREAM_ERR@GOTPAGE
Lloh7:
	ldr	x28, [x28, _UVC_STREAM_ERR@GOTPAGEOFF]
Lloh8:
	adrp	x27, l_.str.1@PAGE
Lloh9:
	add	x27, x27, l_.str.1@PAGEOFF
	b	LBB0_4
LBB0_1:                                 ;   in Loop: Header=BB0_4 Depth=1
Lloh10:
	adrp	x1, l_.str.2@PAGE
Lloh11:
	add	x1, x1, l_.str.2@PAGEOFF
LBB0_2:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	w0, [x23]
	bl	_PDEBUG
	ldr	x8, [x24]
	str	x8, [x21]
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	sub	w19, w19, w22
	add	x20, x20, w22, sxtw #2
	cmp	w19, #0
	b.le	LBB0_17
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	mov	w1, #2048
	bl	_min
	mov	x22, x0
	ldr	w8, [x20]
	cmp	w8, #12
	ccmp	w0, #12, #8, eq
	mov	x1, x25
	b.lt	LBB0_2
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	w8, [x20, #4]
	ldr	w9, [x28]
	mov	x1, x27
	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]
	tst	w9, w8
	cset	w26, ne
	ldr	w9, [x21]
	cmp	w27, w9
	b.ne	LBB0_12
; %bb.8:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	w9, [x21, #4]
	cmp	w9, w26
	b.ne	LBB0_12
; %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_16
; %bb.10:                               ;   in Loop: Header=BB0_4 Depth=1
	str	wzr, [x21]
	sub	w3, w22, #12
	ldp	w8, w9, [x21, #8]
	add	w8, w3, w8
	ldr	w10, [x21, #16]
	mul	w9, w9, w10
	cmp	w8, w9, lsl #1
Lloh21:
	adrp	x1, l_.str.3@PAGE
Lloh22:
	add	x1, x1, l_.str.3@PAGEOFF
Lloh23:
	adrp	x27, l_.str.1@PAGE
Lloh24:
	add	x27, x27, l_.str.1@PAGEOFF
	b.ne	LBB0_2
; %bb.11:                               ;   in Loop: Header=BB0_4 Depth=1
Lloh25:
	adrp	x8, _LAST_PACKET@GOTPAGE
Lloh26:
	ldr	x8, [x8, _LAST_PACKET@GOTPAGEOFF]
Lloh27:
	ldr	x1, [x8]
	add	x2, x20, #48
	mov	x0, x21
	bl	_gspca_frame_add
	b	LBB0_3
LBB0_12:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x8, [x21]
Lloh28:
	adrp	x9, _INTER_PACKET@GOTPAGE
Lloh29:
	ldr	x9, [x9, _INTER_PACKET@GOTPAGEOFF]
Lloh30:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_14
; %bb.13:                               ;   in Loop: Header=BB0_4 Depth=1
Lloh31:
	adrp	x8, _LAST_PACKET@GOTPAGE
Lloh32:
	ldr	x8, [x8, _LAST_PACKET@GOTPAGEOFF]
Lloh33:
	ldr	x1, [x8]
	mov	x0, x21
	mov	x2, #0
	mov	w3, #0
	bl	_gspca_frame_add
LBB0_14:                                ;   in Loop: Header=BB0_4 Depth=1
	stp	w27, w26, [x21]
	add	x2, x20, #48
	sub	w3, w22, #12
Lloh34:
	adrp	x8, _FIRST_PACKET@GOTPAGE
Lloh35:
	ldr	x8, [x8, _FIRST_PACKET@GOTPAGEOFF]
Lloh36:
	ldr	x1, [x8]
LBB0_15:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x21
	bl	_gspca_frame_add
Lloh37:
	adrp	x27, l_.str.1@PAGE
Lloh38:
	add	x27, x27, l_.str.1@PAGEOFF
	b	LBB0_3
LBB0_16:                                ;   in Loop: Header=BB0_4 Depth=1
Lloh39:
	adrp	x8, _INTER_PACKET@GOTPAGE
Lloh40:
	ldr	x8, [x8, _INTER_PACKET@GOTPAGEOFF]
Lloh41:
	ldr	x1, [x8]
	add	x2, x20, #48
	sub	w3, w22, #12
	b	LBB0_15
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 AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpAdd	Lloh37, Lloh38
	.loh AdrpLdrGotLdr	Lloh39, Lloh40, Lloh41
	.cfi_endproc
                                        ; -- End function
	.comm	_D_PACK,4,2                     ; @D_PACK
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"bad header"

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

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

	.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
l_.str.3:                               ; @.str.3
	.asciz	"wrong sized frame"

	.comm	_DISCARD_PACKET,8,3             ; @DISCARD_PACKET
	.no_dead_strip	_sd_pkt_scan
.subsections_via_symbols
