	.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
	cmpl	$3, %edx
	jl	LBB0_8
## %bb.1:
	movq	%rsi, %r15
	movq	%rdi, %r14
	cmpl	$2, (%rsi)
	jne	LBB0_7
## %bb.2:
	movl	%edx, %ebx
	movl	4(%r15), %ecx
	movl	%ecx, %eax
	andl	$1, %eax
	testb	$2, %cl
	jne	LBB0_9
## %bb.3:
	cmpl	(%r14), %eax
	jne	LBB0_7
## %bb.4:
	movq	(%r14), %rax
	movq	_LAST_PACKET@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_6
## %bb.5:
	movq	_FIRST_PACKET@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	movq	8(%r14), %rdx
	movq	_JPEG_HDR_SZ@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r14, %rdi
	callq	_gspca_frame_add
LBB0_6:
	addq	$8, %r15
	addl	$-2, %ebx
	movq	%r14, %rdi
	movq	%r15, %rsi
	movl	%ebx, %edx
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_add_packet                     ## TAILCALL
LBB0_7:
	movq	_DISCARD_PACKET@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, (%r14)
LBB0_8:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_9:
	xorl	$1, %eax
	movl	%eax, (%r14)
	addq	$8, %r15
	addl	$-2, %ebx
	movq	%r14, %rdi
	movq	%r15, %rsi
	movl	%ebx, %edx
	callq	_add_packet
	movq	_LAST_PACKET@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	leaq	_sd_pkt_scan.ffd9(%rip), %rdx
	movq	%r14, %rdi
	movl	$2, %ecx
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_gspca_frame_add                ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__const
	.p2align	2                               ## @sd_pkt_scan.ffd9
_sd_pkt_scan.ffd9:
	.long	255                             ## 0xff
	.long	217                             ## 0xd9

	.comm	_LAST_PACKET,8,3                ## @LAST_PACKET
	.comm	_FIRST_PACKET,8,3               ## @FIRST_PACKET
	.comm	_JPEG_HDR_SZ,4,2                ## @JPEG_HDR_SZ
	.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	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
	cmp	w2, #3
	b.lt	LBB0_8
; %bb.1:
	mov	x21, x1
	mov	x19, x0
	ldr	w8, [x1]
	cmp	w8, #2
	b.ne	LBB0_7
; %bb.2:
	mov	x20, x2
	ldr	w9, [x21, #4]
	and	w8, w9, #0x1
	tbnz	w9, #1, LBB0_9
; %bb.3:
	ldr	w9, [x19]
	cmp	w8, w9
	b.ne	LBB0_7
; %bb.4:
	ldr	x8, [x19]
Lloh0:
	adrp	x9, _LAST_PACKET@GOTPAGE
Lloh1:
	ldr	x9, [x9, _LAST_PACKET@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_6
; %bb.5:
Lloh3:
	adrp	x8, _FIRST_PACKET@GOTPAGE
Lloh4:
	ldr	x8, [x8, _FIRST_PACKET@GOTPAGEOFF]
Lloh5:
	ldr	x1, [x8]
	ldr	x2, [x19, #8]
Lloh6:
	adrp	x8, _JPEG_HDR_SZ@GOTPAGE
Lloh7:
	ldr	x8, [x8, _JPEG_HDR_SZ@GOTPAGEOFF]
Lloh8:
	ldr	w3, [x8]
	mov	x0, x19
	bl	_gspca_frame_add
LBB0_6:
	add	x1, x21, #8
	sub	w2, w20, #2
	mov	x0, x19
	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	_add_packet
LBB0_7:
Lloh9:
	adrp	x8, _DISCARD_PACKET@GOTPAGE
Lloh10:
	ldr	x8, [x8, _DISCARD_PACKET@GOTPAGEOFF]
Lloh11:
	ldr	x8, [x8]
	str	x8, [x19]
LBB0_8:
	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
LBB0_9:
	eor	w8, w8, #0x1
	str	w8, [x19]
	add	x1, x21, #8
	sub	w2, w20, #2
	mov	x0, x19
	bl	_add_packet
Lloh12:
	adrp	x8, _LAST_PACKET@GOTPAGE
Lloh13:
	ldr	x8, [x8, _LAST_PACKET@GOTPAGEOFF]
Lloh14:
	ldr	x1, [x8]
Lloh15:
	adrp	x2, _sd_pkt_scan.ffd9@PAGE
Lloh16:
	add	x2, x2, _sd_pkt_scan.ffd9@PAGEOFF
	mov	x0, x19
	mov	w3, #2
	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
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__const
	.p2align	2                               ; @sd_pkt_scan.ffd9
_sd_pkt_scan.ffd9:
	.long	255                             ; 0xff
	.long	217                             ; 0xd9

	.comm	_LAST_PACKET,8,3                ; @LAST_PACKET
	.comm	_FIRST_PACKET,8,3               ; @FIRST_PACKET
	.comm	_JPEG_HDR_SZ,4,2                ; @JPEG_HDR_SZ
	.comm	_DISCARD_PACKET,8,3             ; @DISCARD_PACKET
	.no_dead_strip	_sd_pkt_scan
.subsections_via_symbols
