	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ov511_pkt_scan
_ov511_pkt_scan:                        ## @ov511_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, %r15
	movq	%rdi, %r14
	movdqu	(%rsi), %xmm0
	movdqu	16(%rsi), %xmm1
	por	%xmm0, %xmm1
	ptest	%xmm1, %xmm1
	jne	LBB0_10
## %bb.1:
	movl	32(%r15), %esi
	testb	$8, %sil
	je	LBB0_10
## %bb.2:
	shrl	$2, %esi
	andl	$1, %esi
	movq	%r14, %rdi
	callq	_ov51x_handle_button
	testb	$-128, 32(%r15)
	jne	LBB0_3
## %bb.9:
	movq	_FIRST_PACKET@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	movq	%r15, %rdx
	xorl	%ecx, %ecx
	callq	_gspca_frame_add
	movq	$0, (%r14)
LBB0_10:
	decl	%ebx
	movq	_INTER_PACKET@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	movq	%r15, %rdx
	movl	%ebx, %ecx
LBB0_8:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_gspca_frame_add                ## TAILCALL
LBB0_3:
	movl	36(%r15), %ecx
	movl	40(%r15), %eax
	leal	8(,%rcx,8), %edx
	movl	4(%r14), %r8d
	cmpl	%r8d, %edx
	jne	LBB0_4
## %bb.6:
	leal	8(,%rax,8), %ecx
	movl	8(%r14), %r9d
	cmpl	%r9d, %ecx
	jne	LBB0_5
## %bb.7:
	movq	_LAST_PACKET@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	movq	%r15, %rdx
	movl	$11, %ecx
	jmp	LBB0_8
LBB0_4:
	movl	8(%r14), %r9d
	leal	8(,%rax,8), %ecx
LBB0_5:
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	callq	_gspca_err
	movq	_DISCARD_PACKET@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%r14)
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Invalid frame size, got: %dx%d, requested: %dx%d\n"

	.comm	_DISCARD_PACKET,4,2             ## @DISCARD_PACKET
	.comm	_LAST_PACKET,4,2                ## @LAST_PACKET
	.comm	_FIRST_PACKET,4,2               ## @FIRST_PACKET
	.comm	_INTER_PACKET,4,2               ## @INTER_PACKET
	.no_dead_strip	_ov511_pkt_scan
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ov511_pkt_scan
_ov511_pkt_scan:                        ; @ov511_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	x21, x2
	mov	x20, x1
	mov	x19, x0
	ldp	q1, q0, [x1]
	orr.16b	v0, v1, v0
	ext.16b	v1, v0, v0, #8
	orr.8b	v0, v0, v1
	mov.s	w8, v0[1]
	fmov	w9, s0
	orr	w8, w9, w8
	cbnz	w8, LBB0_4
; %bb.1:
	ldr	w8, [x20, #32]
	tbz	w8, #3, LBB0_4
; %bb.2:
	ubfx	w1, w8, #2, #1
	mov	x0, x19
	bl	_ov51x_handle_button
	ldrb	w8, [x20, #32]
	tbnz	w8, #7, LBB0_6
; %bb.3:
Lloh0:
	adrp	x8, _FIRST_PACKET@GOTPAGE
Lloh1:
	ldr	x8, [x8, _FIRST_PACKET@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x19
	mov	x2, x20
	mov	w3, #0
	bl	_gspca_frame_add
	str	xzr, [x19]
LBB0_4:
Lloh3:
	adrp	x8, _INTER_PACKET@GOTPAGE
Lloh4:
	ldr	x8, [x8, _INTER_PACKET@GOTPAGEOFF]
	sub	w3, w21, #1
Lloh5:
	ldr	w1, [x8]
	mov	x0, x19
	mov	x2, x20
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
	b	_gspca_frame_add
LBB0_6:
	ldp	w9, w8, [x20, #36]
	lsl	w9, w9, #3
	add	w2, w9, #8
	ldr	w4, [x19, #4]
	cmp	w2, w4
	b.ne	LBB0_9
; %bb.7:
	lsl	w8, w8, #3
	add	w3, w8, #8
	ldr	w5, [x19, #8]
	cmp	w3, w5
	b.ne	LBB0_10
; %bb.8:
Lloh6:
	adrp	x8, _LAST_PACKET@GOTPAGE
Lloh7:
	ldr	x8, [x8, _LAST_PACKET@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	mov	x0, x19
	mov	x2, x20
	mov	w3, #11
	b	LBB0_5
LBB0_9:
	ldr	w5, [x19, #8]
	lsl	w8, w8, #3
	add	w3, w8, #8
LBB0_10:
Lloh9:
	adrp	x1, l_.str@PAGE
Lloh10:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_gspca_err
Lloh11:
	adrp	x8, _DISCARD_PACKET@GOTPAGE
Lloh12:
	ldr	x8, [x8, _DISCARD_PACKET@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	str	w8, [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
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Invalid frame size, got: %dx%d, requested: %dx%d\n"

	.comm	_DISCARD_PACKET,4,2             ; @DISCARD_PACKET
	.comm	_LAST_PACKET,4,2                ; @LAST_PACKET
	.comm	_FIRST_PACKET,4,2               ; @FIRST_PACKET
	.comm	_INTER_PACKET,4,2               ; @INTER_PACKET
	.no_dead_strip	_ov511_pkt_scan
.subsections_via_symbols
