	.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, %r12d
	movq	%rdi, %r14
	leaq	4(%rsi), %rdx
	cmpl	$255, (%rsi)
	jne	LBB0_3
## %bb.1:
	cmpl	$1, (%rdx)
	jne	LBB0_9
## %bb.2:
	movq	%rsi, %r15
	movq	_LAST_PACKET@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	_sd_pkt_scan.ffd9(%rip), %rdx
	movq	%r14, %rdi
	movl	$2, %ecx
	callq	_gspca_frame_add
	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
	movq	_SPCA500_OFFSET_DATA@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	leaq	(%r15,%rax,4), %rdx
	subl	%eax, %r12d
	jmp	LBB0_4
LBB0_3:
	decl	%r12d
LBB0_4:
	xorl	%eax, %eax
	movq	_INTER_PACKET@GOTPCREL(%rip), %r15
	jmp	LBB0_5
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_5 Depth=1
	incl	%eax
	cmpl	%r12d, %eax
	jge	LBB0_8
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movslq	%eax, %rbx
	cmpl	$255, (%rdx,%rbx,4)
	jne	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	leaq	(%rdx,%rbx,4), %r13
	movl	(%r15), %esi
	leal	1(%rbx), %ecx
	movq	%r14, %rdi
	callq	_gspca_frame_add
	subl	%ebx, %r12d
	movl	$0, (%r13)
	xorl	%eax, %eax
	movq	%r13, %rdx
	jmp	LBB0_7
LBB0_8:
	movl	(%r15), %esi
	movq	%r14, %rdi
	movl	%r12d, %ecx
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_gspca_frame_add                ## TAILCALL
LBB0_9:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__DATA,__data
	.p2align	2                               ## @sd_pkt_scan.ffd9
_sd_pkt_scan.ffd9:
	.long	255                             ## 0xff
	.long	217                             ## 0xd9

	.comm	_LAST_PACKET,4,2                ## @LAST_PACKET
	.comm	_FIRST_PACKET,4,2               ## @FIRST_PACKET
	.comm	_JPEG_HDR_SZ,4,2                ## @JPEG_HDR_SZ
	.comm	_SPCA500_OFFSET_DATA,8,3        ## @SPCA500_OFFSET_DATA
	.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	x20, x2
	mov	x19, x0
	mov	x2, x1
	ldr	w8, [x2], #4
	cmp	w8, #255
	b.ne	LBB0_3
; %bb.1:
	ldr	w8, [x2]
	cmp	w8, #1
	b.ne	LBB0_9
; %bb.2:
	mov	x21, x1
Lloh0:
	adrp	x8, _LAST_PACKET@GOTPAGE
Lloh1:
	ldr	x8, [x8, _LAST_PACKET@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
Lloh3:
	adrp	x2, _sd_pkt_scan.ffd9@PAGE
Lloh4:
	add	x2, x2, _sd_pkt_scan.ffd9@PAGEOFF
	mov	x0, x19
	mov	w3, #2
	bl	_gspca_frame_add
Lloh5:
	adrp	x8, _FIRST_PACKET@GOTPAGE
Lloh6:
	ldr	x8, [x8, _FIRST_PACKET@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	ldr	x2, [x19]
Lloh8:
	adrp	x8, _JPEG_HDR_SZ@GOTPAGE
Lloh9:
	ldr	x8, [x8, _JPEG_HDR_SZ@GOTPAGEOFF]
Lloh10:
	ldr	w3, [x8]
	mov	x0, x19
	bl	_gspca_frame_add
Lloh11:
	adrp	x8, _SPCA500_OFFSET_DATA@GOTPAGE
Lloh12:
	ldr	x8, [x8, _SPCA500_OFFSET_DATA@GOTPAGEOFF]
Lloh13:
	ldr	x8, [x8]
	add	x2, x21, x8, lsl #2
	sub	w20, w20, w8
	b	LBB0_4
LBB0_3:
	sub	w20, w20, #1
LBB0_4:
	mov	w22, #0
Lloh14:
	adrp	x21, _INTER_PACKET@GOTPAGE
Lloh15:
	ldr	x21, [x21, _INTER_PACKET@GOTPAGEOFF]
	b	LBB0_6
LBB0_5:                                 ;   in Loop: Header=BB0_6 Depth=1
	add	w22, w22, #1
	cmp	w22, w20
	b.ge	LBB0_8
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	add	x23, x2, w22, sxtw #2
	ldr	w8, [x23]
	cmp	w8, #255
	b.ne	LBB0_5
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	w1, [x21]
	add	w3, w22, #1
	mov	x0, x19
	bl	_gspca_frame_add
	sub	w20, w20, w22
	str	wzr, [x23]
	mov	x2, x23
	mov	w22, #0
	b	LBB0_5
LBB0_8:
	ldr	w1, [x21]
	mov	x0, x19
	mov	x3, x20
	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
LBB0_9:
	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
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.section	__DATA,__data
	.p2align	2                               ; @sd_pkt_scan.ffd9
_sd_pkt_scan.ffd9:
	.long	255                             ; 0xff
	.long	217                             ; 0xd9

	.comm	_LAST_PACKET,4,2                ; @LAST_PACKET
	.comm	_FIRST_PACKET,4,2               ; @FIRST_PACKET
	.comm	_JPEG_HDR_SZ,4,2                ; @JPEG_HDR_SZ
	.comm	_SPCA500_OFFSET_DATA,8,3        ; @SPCA500_OFFSET_DATA
	.comm	_INTER_PACKET,4,2               ; @INTER_PACKET
	.no_dead_strip	_sd_pkt_scan
.subsections_via_symbols
