	.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, %ebx
	movq	%rsi, %r12
	movq	%rdi, %r13
	callq	_find_sof
	movq	%rax, %r14
	movq	(%r13), %rax
	testq	%r14, %r14
	je	LBB0_1
## %bb.2:
	movq	_BRIDGE_103@GOTPCREL(%rip), %rcx
	xorl	%r15d, %r15d
	cmpq	(%rcx), %rax
	sete	%r15b
	movl	$4294967278, %ecx               ## imm = 0xFFFFFFEE
	movl	$-12, %edx
	cmovel	%ecx, %edx
	orl	$2, %r15d
	movq	%r14, %rcx
	subq	%r12, %rcx
	shrq	$2, %rcx
	subl	%ecx, %ebx
	addl	%ecx, %edx
	movl	%ebx, -44(%rbp)                 ## 4-byte Spill
	xorl	%ebx, %ebx
	testl	%edx, %edx
	cmovgl	%edx, %ebx
	jmp	LBB0_3
LBB0_1:
	movl	$0, -44(%rbp)                   ## 4-byte Folded Spill
	xorl	%r15d, %r15d
LBB0_3:
	movq	16(%r13), %rcx
	movq	_MODE_RAW@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	testl	%edx, (%rcx,%rax,8)
	je	LBB0_5
## %bb.4:
	movl	4(%rcx,%rax,8), %eax
	movl	8(%r13), %ecx
	movl	%eax, %edx
	subl	%ecx, %edx
	addl	%ebx, %ecx
	cmpl	%eax, %ecx
	cmovgl	%edx, %ebx
LBB0_5:
	movq	_INTER_PACKET@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	movq	%r12, %rdx
	movl	%ebx, %ecx
	callq	_gspca_frame_add
	testq	%r14, %r14
	je	LBB0_14
## %bb.6:
	movq	8(%r13), %rax
	movl	%r15d, %ecx
	movl	4(%rax,%rcx,4), %esi
	shll	$8, %esi
	addl	(%rax,%rcx,4), %esi
	je	LBB0_7
LBB0_9:
	movl	%esi, 16(%r13)
	jmp	LBB0_10
LBB0_14:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	cmpl	$0, 16(%r13)
	je	LBB0_9
## %bb.8:
	movabsq	$8589934592, %rax               ## imm = 0x200000000
	movq	%rax, 16(%r13)
	movl	$-1, %esi
LBB0_10:
	leaq	24(%r13), %rdi
	callq	_atomic_set
	movl	20(%r13), %eax
	testl	%eax, %eax
	je	LBB0_12
## %bb.11:
	decl	%eax
	movl	%eax, 20(%r13)
	jmp	LBB0_13
LBB0_12:
	movq	_LAST_PACKET@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	callq	_gspca_frame_add
LBB0_13:
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	movq	_FIRST_PACKET@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	movq	%r14, %rdx
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_gspca_frame_add                ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_BRIDGE_103,8,3                 ## @BRIDGE_103
	.comm	_MODE_RAW,4,2                   ## @MODE_RAW
	.comm	_INTER_PACKET,4,2               ## @INTER_PACKET
	.comm	_LAST_PACKET,4,2                ## @LAST_PACKET
	.comm	_FIRST_PACKET,4,2               ## @FIRST_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
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ; -- Begin function sd_pkt_scan
lCPI0_0:
	.long	0                               ; 0x0
	.long	2                               ; 0x2
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	2
_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	x23, x2
	mov	x22, x1
	mov	x19, x0
	bl	_find_sof
	mov	x20, x0
	ldr	x8, [x19]
	cbz	x0, LBB0_2
; %bb.1:
Lloh0:
	adrp	x9, _BRIDGE_103@GOTPAGE
Lloh1:
	ldr	x9, [x9, _BRIDGE_103@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	sub	x10, x20, x22
	lsr	x10, x10, #2
	sub	w21, w23, w10
	cmp	x8, x9
	mov	w9, #2
	cinc	w24, w9, eq
	mov	w9, #-18
	mov	w11, #-12
	csel	w9, w9, w11, eq
	add	w9, w9, w10
	cmp	w9, #0
	csel	w23, w9, wzr, gt
	b	LBB0_3
LBB0_2:
	mov	w21, #0
	mov	w24, #0
LBB0_3:
	ldr	x9, [x19, #16]
	lsl	x10, x8, #3
	ldr	w10, [x9, x10]
Lloh3:
	adrp	x11, _MODE_RAW@GOTPAGE
Lloh4:
	ldr	x11, [x11, _MODE_RAW@GOTPAGEOFF]
Lloh5:
	ldr	w11, [x11]
	tst	w11, w10
	b.eq	LBB0_5
; %bb.4:
	add	x8, x9, x8, lsl #3
	ldr	w8, [x8, #4]
	ldr	w9, [x19, #8]
	sub	w10, w8, w9
	add	w9, w9, w23
	cmp	w9, w8
	csel	w23, w10, w23, gt
LBB0_5:
Lloh6:
	adrp	x8, _INTER_PACKET@GOTPAGE
Lloh7:
	ldr	x8, [x8, _INTER_PACKET@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	mov	x0, x19
	mov	x2, x22
	mov	x3, x23
	bl	_gspca_frame_add
	cbz	x20, LBB0_8
; %bb.6:
	ldr	x8, [x19, #8]
	ldr	w9, [x8, w24, uxtw #2]
	add	w10, w24, #1
	ldr	w8, [x8, w10, uxtw #2]
	adds	w1, w9, w8, lsl #8
	b.eq	LBB0_9
LBB0_7:
	str	w1, [x19, #16]
	b	LBB0_11
LBB0_8:
	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
LBB0_9:
	ldr	w8, [x19, #16]
	cbz	w8, LBB0_7
; %bb.10:
Lloh9:
	adrp	x8, lCPI0_0@PAGE
Lloh10:
	ldr	d0, [x8, lCPI0_0@PAGEOFF]
	str	d0, [x19, #16]
	mov	w1, #-1
LBB0_11:
	add	x0, x19, #24
	bl	_atomic_set
	ldr	w8, [x19, #20]
	cbz	w8, LBB0_13
; %bb.12:
	sub	w8, w8, #1
	str	w8, [x19, #20]
	b	LBB0_14
LBB0_13:
Lloh11:
	adrp	x8, _LAST_PACKET@GOTPAGE
Lloh12:
	ldr	x8, [x8, _LAST_PACKET@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
	mov	x0, x19
	mov	x2, #0
	mov	w3, #0
	bl	_gspca_frame_add
LBB0_14:
Lloh14:
	adrp	x8, _FIRST_PACKET@GOTPAGE
Lloh15:
	ldr	x8, [x8, _FIRST_PACKET@GOTPAGEOFF]
Lloh16:
	ldr	w1, [x8]
	mov	x0, x19
	mov	x2, x20
	mov	x3, x21
	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
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdr	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_BRIDGE_103,8,3                 ; @BRIDGE_103
	.comm	_MODE_RAW,4,2                   ; @MODE_RAW
	.comm	_INTER_PACKET,4,2               ; @INTER_PACKET
	.comm	_LAST_PACKET,4,2                ; @LAST_PACKET
	.comm	_FIRST_PACKET,4,2               ; @FIRST_PACKET
	.no_dead_strip	_sd_pkt_scan
.subsections_via_symbols
