	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %ebx
	movq	%rsi, %r15
	movq	%rdi, %r14
	movl	(%rdi), %eax
	cmpl	$128, %eax
	je	LBB0_6
## %bb.1:
	cmpl	$129, %eax
	jne	LBB0_7
## %bb.2:
	cmpl	$64, %ebx
	jl	LBB0_11
## %bb.3:
	leal	-64(%rbx), %eax
	cmpl	$255, (%r15,%rax,4)
	jne	LBB0_11
## %bb.4:
	addl	$-63, %ebx
	cmpl	$217, (%r15,%rbx,4)
	jne	LBB0_11
## %bb.5:
	movq	%r14, %rdi
	movl	$128, %esi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_gspca_frame_add                ## TAILCALL
LBB0_6:
	movq	_FIRST_PACKET@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	(%r14), %rdx
	movq	_JPEG_HDR_SZ@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r14, %rdi
	callq	_gspca_frame_add
LBB0_7:
	movq	_INTER_PACKET@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	movq	%r15, %rdx
	movl	%ebx, %ecx
	callq	_gspca_frame_add
	movq	8(%r14), %rbx
	testq	%rbx, %rbx
	je	LBB0_11
## %bb.8:
	movslq	16(%r14), %r15
	cmpl	$255, -256(%rbx,%r15,4)
	jne	LBB0_11
## %bb.9:
	cmpl	$217, -252(%rbx,%r15,4)
	jne	LBB0_11
## %bb.10:
	leal	-62(%r15), %eax
	movl	%eax, 16(%r14)
	movq	%r14, %rdi
	movl	$128, %esi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	callq	_gspca_frame_add
	cmpq	$0, 8(%r14)
	js	LBB0_11
## %bb.12:
	addq	$16, %r14
	movd	-124(%rbx,%r15,4), %xmm0        ## xmm0 = mem[0],zero,zero,zero
	pinsrd	$1, -140(%rbx,%r15,4), %xmm0
	pinsrd	$2, -156(%rbx,%r15,4), %xmm0
	pinsrd	$3, -108(%rbx,%r15,4), %xmm0
	pslld	$8, %xmm0
	movd	-120(%rbx,%r15,4), %xmm1        ## xmm1 = mem[0],zero,zero,zero
	pinsrd	$1, -136(%rbx,%r15,4), %xmm1
	pinsrd	$2, -152(%rbx,%r15,4), %xmm1
	pinsrd	$3, -104(%rbx,%r15,4), %xmm1
	por	%xmm0, %xmm1
	psrad	$6, %xmm1
	movl	-132(%rbx,%r15,4), %eax
	shll	$8, %eax
	orl	-128(%rbx,%r15,4), %eax
	sarl	$4, %eax
	pshufd	$238, %xmm1, %xmm0              ## xmm0 = xmm1[2,3,2,3]
	paddd	%xmm1, %xmm0
	pshufd	$85, %xmm0, %xmm1               ## xmm1 = xmm0[1,1,1,1]
	paddd	%xmm0, %xmm1
	movd	%xmm1, %esi
	addl	%eax, %esi
	sarl	$4, %esi
	movq	%r14, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_atomic_set                     ## TAILCALL
LBB0_11:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.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	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	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
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	mov	x20, x2
	mov	x21, x1
	mov	x19, x0
	ldr	w8, [x0]
	cmp	w8, #128
	b.eq	LBB0_6
; %bb.1:
	cmp	w8, #129
	b.ne	LBB0_7
; %bb.2:
	subs	w8, w20, #64
	b.lt	LBB0_12
; %bb.3:
	ldr	w8, [x21, w8, uxtw #2]
	cmp	w8, #255
	b.ne	LBB0_12
; %bb.4:
	sub	w8, w20, #63
	ldr	w8, [x21, w8, uxtw #2]
	cmp	w8, #217
	b.ne	LBB0_12
; %bb.5:
	mov	x0, x19
	mov	w1, #128
	mov	x2, #0
	mov	w3, #0
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_gspca_frame_add
LBB0_6:
Lloh0:
	adrp	x8, _FIRST_PACKET@GOTPAGE
Lloh1:
	ldr	x8, [x8, _FIRST_PACKET@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	ldr	x2, [x19]
Lloh3:
	adrp	x8, _JPEG_HDR_SZ@GOTPAGE
Lloh4:
	ldr	x8, [x8, _JPEG_HDR_SZ@GOTPAGEOFF]
Lloh5:
	ldr	w3, [x8]
	mov	x0, x19
	bl	_gspca_frame_add
LBB0_7:
Lloh6:
	adrp	x8, _INTER_PACKET@GOTPAGE
Lloh7:
	ldr	x8, [x8, _INTER_PACKET@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	mov	x0, x19
	mov	x2, x21
	mov	x3, x20
	bl	_gspca_frame_add
	ldr	x21, [x19, #8]
	cbz	x21, LBB0_12
; %bb.8:
	mov	x20, x19
	ldr	w22, [x20, #16]!
	sub	w8, w22, #64
	ldr	w8, [x21, w8, sxtw #2]
	cmp	w8, #255
	b.ne	LBB0_12
; %bb.9:
	sub	w8, w22, #63
	ldr	w8, [x21, w8, sxtw #2]
	cmp	w8, #217
	b.ne	LBB0_12
; %bb.10:
	sub	w8, w22, #62
	str	w8, [x19, #16]
	mov	x0, x19
	mov	w1, #128
	mov	x2, #0
	mov	w3, #0
	bl	_gspca_frame_add
	ldr	x8, [x19, #8]
	tbnz	x8, #63, LBB0_12
; %bb.11:
	sub	w8, w22, #35
	ldr	w8, [x21, w8, sxtw #2]
	sub	w9, w22, #34
	ldr	w9, [x21, w9, sxtw #2]
	orr	w8, w9, w8, lsl #8
	sub	w9, w22, #31
	ldr	w9, [x21, w9, sxtw #2]
	sub	w10, w22, #30
	ldr	w10, [x21, w10, sxtw #2]
	orr	w9, w10, w9, lsl #8
	asr	w9, w9, #6
	add	w8, w9, w8, asr #6
	sub	w9, w22, #39
	ldr	w9, [x21, w9, sxtw #2]
	sub	w10, w22, #38
	ldr	w10, [x21, w10, sxtw #2]
	orr	w9, w10, w9, lsl #8
	add	w8, w8, w9, asr #6
	sub	w9, w22, #27
	ldr	w9, [x21, w9, sxtw #2]
	sub	w10, w22, #26
	ldr	w10, [x21, w10, sxtw #2]
	orr	w9, w10, w9, lsl #8
	sub	w10, w22, #33
	ldr	w10, [x21, w10, sxtw #2]
	sub	w11, w22, #32
	ldr	w11, [x21, w11, sxtw #2]
	add	w8, w8, w9, asr #6
	orr	w9, w11, w10, lsl #8
	add	w8, w8, w9, asr #4
	asr	w1, w8, #4
	mov	x0, x20
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_atomic_set
LBB0_12:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.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
