	.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, %r15d
	movq	%rdi, -48(%rbp)                 ## 8-byte Spill
	movl	(%rdi), %eax
	cmpl	$128, %eax
	je	LBB0_8
## %bb.1:
	cmpl	$130, %eax
	je	LBB0_21
## %bb.2:
	cmpl	$129, %eax
	jne	LBB0_17
## %bb.3:
	leaq	4(%rsi), %r14
	cmpl	$255, (%rsi)
	jne	LBB0_7
## %bb.4:
	cmpl	$1, (%r14)
	jne	LBB0_23
## %bb.5:
	movq	_SPCA533_OFFSET_DATA@GOTPCREL(%rip), %rax
	jmp	LBB0_6
LBB0_8:
	cmpl	$255, (%rsi)
	jne	LBB0_10
## %bb.9:
	movq	_SPCA536_OFFSET_DATA@GOTPCREL(%rip), %rax
	jmp	LBB0_6
LBB0_21:
	movl	(%rsi), %eax
	cmpl	$254, %eax
	jne	LBB0_19
## %bb.22:
	movq	_SPCA504_PCCAM600_OFFSET_DATA@GOTPCREL(%rip), %rax
	jmp	LBB0_6
LBB0_17:
	movl	(%rsi), %eax
	cmpl	$254, %eax
	je	LBB0_18
LBB0_19:
	cmpl	$255, %eax
	jne	LBB0_20
LBB0_23:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_20:
	addq	$4, %rsi
	decl	%r15d
	jmp	LBB0_11
LBB0_10:
	addq	$8, %rsi
	addl	$-2, %r15d
LBB0_11:
	movq	%rsi, %r14
	jmp	LBB0_12
LBB0_7:
	decl	%r15d
	jmp	LBB0_12
LBB0_18:
	movq	_SPCA50X_OFFSET_DATA@GOTPCREL(%rip), %rax
LBB0_6:
	movslq	(%rax), %rax
	leaq	(%rsi,%rax,4), %r14
	subl	%eax, %r15d
	movq	_LAST_PACKET@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	_sd_pkt_scan.ffd9(%rip), %rdx
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdi
	movl	$2, %ecx
	callq	_gspca_frame_add
	movq	_FIRST_PACKET@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	8(%rbx), %rdx
	movq	_JPEG_HDR_SZ@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%rbx, %rdi
	callq	_gspca_frame_add
LBB0_12:
	xorl	%eax, %eax
	movq	_INTER_PACKET@GOTPCREL(%rip), %r12
	jmp	LBB0_13
	.p2align	4, 0x90
LBB0_15:                                ##   in Loop: Header=BB0_13 Depth=1
	incl	%eax
	cmpl	%r15d, %eax
	jge	LBB0_16
LBB0_13:                                ## =>This Inner Loop Header: Depth=1
	movslq	%eax, %rbx
	cmpl	$255, (%r14,%rbx,4)
	jne	LBB0_15
## %bb.14:                              ##   in Loop: Header=BB0_13 Depth=1
	leaq	(%r14,%rbx,4), %r13
	movl	(%r12), %esi
	leal	1(%rbx), %ecx
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movq	%r14, %rdx
	callq	_gspca_frame_add
	subl	%ebx, %r15d
	movl	$0, (%r13)
	xorl	%eax, %eax
	movq	%r13, %r14
	jmp	LBB0_15
LBB0_16:
	movl	(%r12), %esi
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movq	%r14, %rdx
	movl	%r15d, %ecx
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_gspca_frame_add                ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.section	__DATA,__data
	.p2align	2                               ## @sd_pkt_scan.ffd9
_sd_pkt_scan.ffd9:
	.long	255                             ## 0xff
	.long	217                             ## 0xd9

	.comm	_SPCA533_OFFSET_DATA,4,2        ## @SPCA533_OFFSET_DATA
	.comm	_SPCA536_OFFSET_DATA,4,2        ## @SPCA536_OFFSET_DATA
	.comm	_SPCA50X_OFFSET_DATA,4,2        ## @SPCA50X_OFFSET_DATA
	.comm	_SPCA504_PCCAM600_OFFSET_DATA,4,2 ## @SPCA504_PCCAM600_OFFSET_DATA
	.comm	_LAST_PACKET,4,2                ## @LAST_PACKET
	.comm	_FIRST_PACKET,4,2               ## @FIRST_PACKET
	.comm	_JPEG_HDR_SZ,4,2                ## @JPEG_HDR_SZ
	.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	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x19, x0
	ldr	w8, [x0]
	cmp	w8, #128
	b.eq	LBB0_6
; %bb.1:
	cmp	w8, #130
	b.eq	LBB0_8
; %bb.2:
	cmp	w8, #129
	b.ne	LBB0_10
; %bb.3:
	mov	x20, x1
	ldr	w8, [x20], #4
	cmp	w8, #255
	b.ne	LBB0_15
; %bb.4:
	ldr	w8, [x20]
	cmp	w8, #1
	b.ne	LBB0_12
; %bb.5:
Lloh0:
	adrp	x8, _SPCA533_OFFSET_DATA@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SPCA533_OFFSET_DATA@GOTPAGEOFF]
	b	LBB0_17
LBB0_6:
	ldr	w8, [x1]
	cmp	w8, #255
	b.ne	LBB0_14
; %bb.7:
Lloh2:
	adrp	x8, _SPCA536_OFFSET_DATA@GOTPAGE
Lloh3:
	ldr	x8, [x8, _SPCA536_OFFSET_DATA@GOTPAGEOFF]
	b	LBB0_17
LBB0_8:
	ldr	w8, [x1]
	cmp	w8, #254
	b.ne	LBB0_11
; %bb.9:
Lloh4:
	adrp	x8, _SPCA504_PCCAM600_OFFSET_DATA@GOTPAGE
Lloh5:
	ldr	x8, [x8, _SPCA504_PCCAM600_OFFSET_DATA@GOTPAGEOFF]
	b	LBB0_17
LBB0_10:
	ldr	w8, [x1]
	cmp	w8, #254
	b.eq	LBB0_16
LBB0_11:
	cmp	w8, #255
	b.ne	LBB0_13
LBB0_12:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_13:
	add	x20, x1, #4
	sub	w21, w2, #1
	b	LBB0_18
LBB0_14:
	add	x20, x1, #8
	sub	w21, w2, #2
	b	LBB0_18
LBB0_15:
	sub	w21, w2, #1
	b	LBB0_18
LBB0_16:
Lloh6:
	adrp	x8, _SPCA50X_OFFSET_DATA@GOTPAGE
Lloh7:
	ldr	x8, [x8, _SPCA50X_OFFSET_DATA@GOTPAGEOFF]
LBB0_17:
	ldrsw	x8, [x8]
	add	x20, x1, x8, lsl #2
	sub	w21, w2, w8
Lloh8:
	adrp	x8, _LAST_PACKET@GOTPAGE
Lloh9:
	ldr	x8, [x8, _LAST_PACKET@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
Lloh11:
	adrp	x2, _sd_pkt_scan.ffd9@PAGE
Lloh12:
	add	x2, x2, _sd_pkt_scan.ffd9@PAGEOFF
	mov	x0, x19
	mov	w3, #2
	bl	_gspca_frame_add
Lloh13:
	adrp	x8, _FIRST_PACKET@GOTPAGE
Lloh14:
	ldr	x8, [x8, _FIRST_PACKET@GOTPAGEOFF]
Lloh15:
	ldr	w1, [x8]
	ldr	x2, [x19, #8]
Lloh16:
	adrp	x8, _JPEG_HDR_SZ@GOTPAGE
Lloh17:
	ldr	x8, [x8, _JPEG_HDR_SZ@GOTPAGEOFF]
Lloh18:
	ldr	w3, [x8]
	mov	x0, x19
	bl	_gspca_frame_add
LBB0_18:
	mov	w23, #0
Lloh19:
	adrp	x22, _INTER_PACKET@GOTPAGE
Lloh20:
	ldr	x22, [x22, _INTER_PACKET@GOTPAGEOFF]
	b	LBB0_20
LBB0_19:                                ;   in Loop: Header=BB0_20 Depth=1
	add	w23, w23, #1
	cmp	w23, w21
	b.ge	LBB0_22
LBB0_20:                                ; =>This Inner Loop Header: Depth=1
	add	x24, x20, w23, sxtw #2
	ldr	w8, [x24]
	cmp	w8, #255
	b.ne	LBB0_19
; %bb.21:                               ;   in Loop: Header=BB0_20 Depth=1
	ldr	w1, [x22]
	add	w3, w23, #1
	mov	x0, x19
	mov	x2, x20
	bl	_gspca_frame_add
	sub	w21, w21, w23
	str	wzr, [x24]
	mov	x20, x24
	mov	w23, #0
	b	LBB0_19
LBB0_22:
	ldr	w1, [x22]
	mov	x0, x19
	mov	x2, x20
	mov	x3, x21
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_gspca_frame_add
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.section	__DATA,__data
	.p2align	2                               ; @sd_pkt_scan.ffd9
_sd_pkt_scan.ffd9:
	.long	255                             ; 0xff
	.long	217                             ; 0xd9

	.comm	_SPCA533_OFFSET_DATA,4,2        ; @SPCA533_OFFSET_DATA
	.comm	_SPCA536_OFFSET_DATA,4,2        ; @SPCA536_OFFSET_DATA
	.comm	_SPCA50X_OFFSET_DATA,4,2        ; @SPCA50X_OFFSET_DATA
	.comm	_SPCA504_PCCAM600_OFFSET_DATA,4,2 ; @SPCA504_PCCAM600_OFFSET_DATA
	.comm	_LAST_PACKET,4,2                ; @LAST_PACKET
	.comm	_FIRST_PACKET,4,2               ; @FIRST_PACKET
	.comm	_JPEG_HDR_SZ,4,2                ; @JPEG_HDR_SZ
	.comm	_INTER_PACKET,4,2               ; @INTER_PACKET
	.no_dead_strip	_sd_pkt_scan
.subsections_via_symbols
