	.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
	movq	%rsi, %r14
	movq	%rdi, %rbx
	movq	_INTER_PACKET@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	cmpq	$0, 8(%rdi)
	je	LBB0_2
## %bb.1:
	movq	$0, 8(%rbx)
	movl	(%rbx), %ecx
	movl	%ecx, %eax
	shrl	$31, %eax
	addl	%ecx, %eax
	sarl	%eax
	movl	%eax, (%rbx)
	movq	_FIRST_PACKET@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	jmp	LBB0_3
LBB0_2:
	movl	(%rbx), %eax
	movl	%r15d, %esi
	testl	%eax, %eax
	je	LBB0_6
LBB0_3:
	decl	%eax
	movl	%eax, (%rbx)
	jne	LBB0_5
## %bb.4:
	movq	_LAST_PACKET@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
LBB0_5:
	leaq	8(%r14), %rdx
	movl	4(%rbx), %ecx
	movq	%rbx, %rdi
	callq	_gspca_frame_add
	movslq	4(%rbx), %rcx
	leaq	(%r14,%rcx,4), %rdx
	addq	$20, %rdx
	movq	%rbx, %rdi
	movl	%r15d, %esi
                                        ## kill: def $ecx killed $ecx killed $rcx
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_gspca_frame_add                ## TAILCALL
LBB0_6:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_INTER_PACKET,4,2               ## @INTER_PACKET
	.comm	_FIRST_PACKET,4,2               ## @FIRST_PACKET
	.comm	_LAST_PACKET,4,2                ## @LAST_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, x1
	mov	x19, x0
Lloh0:
	adrp	x8, _INTER_PACKET@GOTPAGE
Lloh1:
	ldr	x8, [x8, _INTER_PACKET@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	ldr	x9, [x0, #8]
	cbz	x9, LBB0_2
; %bb.1:
	str	xzr, [x19, #8]
	ldr	w9, [x19]
	cmp	w9, #0
	cinc	w9, w9, lt
	asr	w9, w9, #1
	str	w9, [x19]
Lloh3:
	adrp	x10, _FIRST_PACKET@GOTPAGE
Lloh4:
	ldr	x10, [x10, _FIRST_PACKET@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x10]
	b	LBB0_4
LBB0_2:
	ldr	w9, [x19]
	cbz	w9, LBB0_5
; %bb.3:
	mov	x1, x8
LBB0_4:
	subs	w9, w9, #1
	str	w9, [x19]
Lloh6:
	adrp	x9, _LAST_PACKET@GOTPAGE
Lloh7:
	ldr	x9, [x9, _LAST_PACKET@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	csel	w21, w9, w8, eq
	add	x2, x20, #8
	ldr	w3, [x19, #4]
	mov	x0, x19
	bl	_gspca_frame_add
	ldrsw	x3, [x19, #4]
	add	x8, x20, x3, lsl #2
	add	x2, x8, #20
	mov	x0, x19
	mov	x1, x21
                                        ; kill: def $w3 killed $w3 killed $x3
	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_5:
	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	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_INTER_PACKET,4,2               ; @INTER_PACKET
	.comm	_FIRST_PACKET,4,2               ; @FIRST_PACKET
	.comm	_LAST_PACKET,4,2                ; @LAST_PACKET
	.no_dead_strip	_sd_pkt_scan
.subsections_via_symbols
