	.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, %rdx
	movq	%rdi, %r14
	movq	_BULK_SIZE@GOTPCREL(%rip), %rax
	cmpl	%ebx, (%rax)
	jne	LBB0_3
## %bb.1:
	cmpq	$0, (%r14)
	jne	LBB0_5
## %bb.2:
	movq	_FIRST_PACKET@GOTPCREL(%rip), %rax
	jmp	LBB0_6
LBB0_3:
	testl	%ebx, %ebx
	je	LBB0_7
## %bb.4:
	movq	_DISCARD_PACKET@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%r15d, %r15d
	movq	%r14, %rdi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	callq	_gspca_frame_add
	movq	_D_FRAM@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	(%r14), %rcx
	leaq	L_.str.1(%rip), %rdx
	movq	%r14, %rdi
	movq	%rcx, %r8
	movl	%ebx, %r9d
	jmp	LBB0_8
LBB0_5:
	movq	_INTER_PACKET@GOTPCREL(%rip), %rax
LBB0_6:
	movl	(%rax), %esi
	movq	%r14, %rdi
	movl	%ebx, %ecx
	callq	_gspca_frame_add
	movslq	%ebx, %r15
	addq	(%r14), %r15
	jmp	LBB0_9
LBB0_7:
	movq	_LAST_PACKET@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%r15d, %r15d
	movq	%r14, %rdi
	xorl	%ecx, %ecx
	callq	_gspca_frame_add
	movq	_D_FRAM@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	(%r14), %rcx
	leaq	L_.str(%rip), %rdx
	movq	%r14, %rdi
	movq	%rcx, %r8
	xorl	%r9d, %r9d
LBB0_8:
	callq	_gspca_dbg
LBB0_9:
	movq	%r15, (%r14)
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_BULK_SIZE,4,2                  ## @BULK_SIZE
	.comm	_LAST_PACKET,4,2                ## @LAST_PACKET
	.comm	_D_FRAM,4,2                     ## @D_FRAM
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"finish frame sz %u/%u w/ len %u\n\n"

	.comm	_DISCARD_PACKET,4,2             ## @DISCARD_PACKET
L_.str.1:                               ## @.str.1
	.asciz	"abort frame sz %u/%u w/ len %u\n\n"

	.comm	_FIRST_PACKET,4,2               ## @FIRST_PACKET
	.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	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x20, x2
	mov	x2, x1
	mov	x19, x0
Lloh0:
	adrp	x8, _BULK_SIZE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _BULK_SIZE@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, w20
	b.ne	LBB0_2
; %bb.1:
Lloh3:
	adrp	x8, _FIRST_PACKET@GOTPAGE
Lloh4:
	ldr	x8, [x8, _FIRST_PACKET@GOTPAGEOFF]
	ldr	x9, [x19]
Lloh5:
	adrp	x10, _INTER_PACKET@GOTPAGE
Lloh6:
	ldr	x10, [x10, _INTER_PACKET@GOTPAGEOFF]
	cmp	x9, #0
	csel	x8, x8, x10, eq
	ldr	w1, [x8]
	mov	x0, x19
	mov	x3, x20
	bl	_gspca_frame_add
	ldr	x8, [x19]
	add	x8, x8, w20, sxtw
	b	LBB0_6
LBB0_2:
	cbz	w20, LBB0_4
; %bb.3:
Lloh7:
	adrp	x8, _DISCARD_PACKET@GOTPAGE
Lloh8:
	ldr	x8, [x8, _DISCARD_PACKET@GOTPAGEOFF]
Lloh9:
	ldr	w1, [x8]
	mov	x0, x19
	mov	x2, #0
	mov	w3, #0
	bl	_gspca_frame_add
Lloh10:
	adrp	x8, _D_FRAM@GOTPAGE
Lloh11:
	ldr	x8, [x8, _D_FRAM@GOTPAGEOFF]
Lloh12:
	ldr	w1, [x8]
	ldr	x3, [x19]
Lloh13:
	adrp	x2, l_.str.1@PAGE
Lloh14:
	add	x2, x2, l_.str.1@PAGEOFF
	mov	x0, x19
	mov	x4, x3
	mov	x5, x20
	b	LBB0_5
LBB0_4:
Lloh15:
	adrp	x8, _LAST_PACKET@GOTPAGE
Lloh16:
	ldr	x8, [x8, _LAST_PACKET@GOTPAGEOFF]
Lloh17:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w3, #0
	bl	_gspca_frame_add
Lloh18:
	adrp	x8, _D_FRAM@GOTPAGE
Lloh19:
	ldr	x8, [x8, _D_FRAM@GOTPAGEOFF]
Lloh20:
	ldr	w1, [x8]
	ldr	x3, [x19]
Lloh21:
	adrp	x2, l_.str@PAGE
Lloh22:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x19
	mov	x4, x3
	mov	w5, #0
LBB0_5:
	bl	_gspca_dbg
	mov	x8, #0
LBB0_6:
	str	x8, [x19]
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_BULK_SIZE,4,2                  ; @BULK_SIZE
	.comm	_LAST_PACKET,4,2                ; @LAST_PACKET
	.comm	_D_FRAM,4,2                     ; @D_FRAM
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"finish frame sz %u/%u w/ len %u\n\n"

	.comm	_DISCARD_PACKET,4,2             ; @DISCARD_PACKET
l_.str.1:                               ; @.str.1
	.asciz	"abort frame sz %u/%u w/ len %u\n\n"

	.comm	_FIRST_PACKET,4,2               ; @FIRST_PACKET
	.comm	_INTER_PACKET,4,2               ; @INTER_PACKET
	.no_dead_strip	_sd_pkt_scan
.subsections_via_symbols
