	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function isight_decode
_isight_decode:                         ## @isight_decode
	.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
	xorl	%r14d, %r14d
	testq	%rsi, %rsi
	je	LBB0_15
## %bb.1:
	movl	%ecx, %r15d
	movq	%rdx, %r12
	movq	%rsi, %rbx
	cmpl	$14, %ecx
	jb	LBB0_5
## %bb.2:
	leaq	8(%r12), %rdi
	leaq	_isight_decode.hdr(%rip), %rsi
	movl	$12, %edx
	callq	_memcmp
	testq	%rax, %rax
	je	LBB0_7
## %bb.3:
	cmpl	$15, %r15d
	jb	LBB0_5
## %bb.4:
	leaq	12(%r12), %rdi
	leaq	_isight_decode.hdr(%rip), %rsi
	movl	$12, %edx
	callq	_memcmp
	testq	%rax, %rax
	je	LBB0_7
LBB0_5:
	movq	(%rbx), %rax
	movq	_UVC_BUF_STATE_ACTIVE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_6
## %bb.11:
	movl	16(%rbx), %r13d
	movq	8(%rbx), %r14
	subl	%r14d, %r13d
	shlq	$2, %r14
	addq	24(%rbx), %r14
	movl	%r15d, %edi
	movl	%r13d, %esi
	callq	_min
	movq	%r12, %rsi
	movl	%eax, %r12d
	movq	%r14, %rdi
	movl	%eax, %edx
	callq	_memcpy
	movl	%r12d, %eax
	addq	8(%rbx), %rax
	movq	%rax, 8(%rbx)
	cmpl	%r15d, %r13d
	jb	LBB0_13
## %bb.12:
	movl	16(%rbx), %ecx
	cmpq	%rcx, %rax
	jne	LBB0_14
LBB0_13:
	movq	_UVC_TRACE_FRAME@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.2(%rip), %rsi
	callq	_uvc_trace
	movq	_UVC_BUF_STATE_DONE@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, (%rbx)
LBB0_14:
	xorl	%r14d, %r14d
	jmp	LBB0_15
LBB0_6:
	movq	_UVC_TRACE_FRAME@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.1(%rip), %rsi
	callq	_uvc_trace
	jmp	LBB0_15
LBB0_7:
	movq	_UVC_TRACE_FRAME@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	callq	_uvc_trace
	movq	_UVC_BUF_STATE_ACTIVE@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	%rax, (%rbx)
	je	LBB0_9
## %bb.8:
	movq	%rax, (%rbx)
LBB0_9:
	cmpq	$0, 8(%rbx)
	je	LBB0_15
## %bb.10:
	movq	_UVC_BUF_STATE_DONE@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, (%rbx)
	movq	_EAGAIN@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
LBB0_15:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__const
	.p2align	4                               ## @isight_decode.hdr
_isight_decode.hdr:
	.long	17                              ## 0x11
	.long	34                              ## 0x22
	.long	51                              ## 0x33
	.long	68                              ## 0x44
	.long	222                             ## 0xde
	.long	173                             ## 0xad
	.long	190                             ## 0xbe
	.long	239                             ## 0xef
	.long	222                             ## 0xde
	.long	173                             ## 0xad
	.long	250                             ## 0xfa
	.long	206                             ## 0xce

	.comm	_UVC_TRACE_FRAME,4,2            ## @UVC_TRACE_FRAME
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"iSight header found\n"

	.comm	_UVC_BUF_STATE_ACTIVE,8,3       ## @UVC_BUF_STATE_ACTIVE
L_.str.1:                               ## @.str.1
	.asciz	"Dropping packet (out of sync).\n"

	.comm	_UVC_BUF_STATE_DONE,8,3         ## @UVC_BUF_STATE_DONE
	.comm	_EAGAIN,4,2                     ## @EAGAIN
L_.str.2:                               ## @.str.2
	.asciz	"Frame complete (overflow).\n"

	.no_dead_strip	_isight_decode
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function isight_decode
_isight_decode:                         ; @isight_decode
	.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
	cbz	x1, LBB0_10
; %bb.1:
	mov	x20, x3
	mov	x21, x2
	mov	x19, x1
	cmp	w3, #14
	b.lo	LBB0_5
; %bb.2:
	add	x0, x21, #8
Lloh0:
	adrp	x1, _isight_decode.hdr@PAGE
Lloh1:
	add	x1, x1, _isight_decode.hdr@PAGEOFF
	mov	w2, #12
	bl	_memcmp
	cbz	x0, LBB0_12
; %bb.3:
	cmp	w20, #15
	b.lo	LBB0_5
; %bb.4:
	add	x0, x21, #12
Lloh2:
	adrp	x1, _isight_decode.hdr@PAGE
Lloh3:
	add	x1, x1, _isight_decode.hdr@PAGEOFF
	mov	w2, #12
	bl	_memcmp
	cbz	x0, LBB0_12
LBB0_5:
	ldr	x8, [x19]
Lloh4:
	adrp	x9, _UVC_BUF_STATE_ACTIVE@GOTPAGE
Lloh5:
	ldr	x9, [x9, _UVC_BUF_STATE_ACTIVE@GOTPAGEOFF]
Lloh6:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_9
; %bb.6:
	ldr	w8, [x19, #16]
	ldr	x9, [x19, #8]
	sub	w22, w8, w9
	ldr	x8, [x19, #24]
	add	x23, x8, x9, lsl #2
	mov	x0, x20
	mov	x1, x22
	bl	_min
	mov	x24, x0
	mov	x0, x23
	mov	x1, x21
	mov	x2, x24
	bl	_memcpy
	ldr	x8, [x19, #8]
	add	x8, x8, w24, uxtw
	str	x8, [x19, #8]
	cmp	w22, w20
	b.lo	LBB0_8
; %bb.7:
	ldr	w9, [x19, #16]
	cmp	x8, x9
	b.ne	LBB0_10
LBB0_8:
Lloh7:
	adrp	x8, _UVC_TRACE_FRAME@GOTPAGE
Lloh8:
	ldr	x8, [x8, _UVC_TRACE_FRAME@GOTPAGEOFF]
Lloh9:
	ldr	w0, [x8]
Lloh10:
	adrp	x1, l_.str.2@PAGE
Lloh11:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_uvc_trace
	mov	w0, #0
Lloh12:
	adrp	x8, _UVC_BUF_STATE_DONE@GOTPAGE
Lloh13:
	ldr	x8, [x8, _UVC_BUF_STATE_DONE@GOTPAGEOFF]
Lloh14:
	ldr	x8, [x8]
	str	x8, [x19]
	b	LBB0_11
LBB0_9:
Lloh15:
	adrp	x8, _UVC_TRACE_FRAME@GOTPAGE
Lloh16:
	ldr	x8, [x8, _UVC_TRACE_FRAME@GOTPAGEOFF]
Lloh17:
	ldr	w0, [x8]
Lloh18:
	adrp	x1, l_.str.1@PAGE
Lloh19:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_uvc_trace
LBB0_10:
	mov	w0, #0
LBB0_11:
	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_12:
Lloh20:
	adrp	x8, _UVC_TRACE_FRAME@GOTPAGE
Lloh21:
	ldr	x8, [x8, _UVC_TRACE_FRAME@GOTPAGEOFF]
Lloh22:
	ldr	w0, [x8]
Lloh23:
	adrp	x1, l_.str@PAGE
Lloh24:
	add	x1, x1, l_.str@PAGEOFF
	bl	_uvc_trace
	ldr	x9, [x19]
Lloh25:
	adrp	x8, _UVC_BUF_STATE_ACTIVE@GOTPAGE
Lloh26:
	ldr	x8, [x8, _UVC_BUF_STATE_ACTIVE@GOTPAGEOFF]
Lloh27:
	ldr	x8, [x8]
	cmp	x9, x8
	b.eq	LBB0_14
; %bb.13:
	str	x8, [x19]
LBB0_14:
	ldr	x8, [x19, #8]
	cbz	x8, LBB0_10
; %bb.15:
Lloh28:
	adrp	x8, _UVC_BUF_STATE_DONE@GOTPAGE
Lloh29:
	ldr	x8, [x8, _UVC_BUF_STATE_DONE@GOTPAGEOFF]
Lloh30:
	ldr	x8, [x8]
	str	x8, [x19]
Lloh31:
	adrp	x8, _EAGAIN@GOTPAGE
Lloh32:
	ldr	x8, [x8, _EAGAIN@GOTPAGEOFF]
Lloh33:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_11
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__const
	.p2align	2                               ; @isight_decode.hdr
_isight_decode.hdr:
	.long	17                              ; 0x11
	.long	34                              ; 0x22
	.long	51                              ; 0x33
	.long	68                              ; 0x44
	.long	222                             ; 0xde
	.long	173                             ; 0xad
	.long	190                             ; 0xbe
	.long	239                             ; 0xef
	.long	222                             ; 0xde
	.long	173                             ; 0xad
	.long	250                             ; 0xfa
	.long	206                             ; 0xce

	.comm	_UVC_TRACE_FRAME,4,2            ; @UVC_TRACE_FRAME
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"iSight header found\n"

	.comm	_UVC_BUF_STATE_ACTIVE,8,3       ; @UVC_BUF_STATE_ACTIVE
l_.str.1:                               ; @.str.1
	.asciz	"Dropping packet (out of sync).\n"

	.comm	_UVC_BUF_STATE_DONE,8,3         ; @UVC_BUF_STATE_DONE
	.comm	_EAGAIN,4,2                     ; @EAGAIN
l_.str.2:                               ; @.str.2
	.asciz	"Frame complete (overflow).\n"

	.no_dead_strip	_isight_decode
.subsections_via_symbols
