	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function uvc_video_decode_bulk
_uvc_video_decode_bulk:                 ## @uvc_video_decode_bulk
	.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
	subq	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, -48(%rbp)
	movq	%rdx, -56(%rbp)
	movq	(%rdi), %r13
	movq	8(%rdi), %rbx
	movl	(%rbx), %r15d
	movl	(%r13), %eax
	testq	%r15, %r15
	je	LBB0_1
## %bb.3:
	movslq	%r15d, %rcx
	movq	8(%rbx), %r12
	addq	%rcx, 8(%r13)
	testl	%eax, %eax
	jne	LBB0_15
## %bb.4:
	cmpl	$0, 16(%r13)
	jne	LBB0_15
## %bb.5:
	movq	%rdi, -64(%rbp)                 ## 8-byte Spill
	movq	%rbx, -72(%rbp)                 ## 8-byte Spill
	movq	_EAGAIN@GOTPCREL(%rip), %r14
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r13, %rdi
	movq	%r12, %rdx
	movl	%r15d, %ecx
	callq	_uvc_video_decode_start
	movl	%eax, %ebx
	xorl	%eax, %eax
	subl	(%r14), %eax
	cmpl	%eax, %ebx
	jne	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=1
	movq	%r13, %rdi
	leaq	-48(%rbp), %rsi
	leaq	-56(%rbp), %rdx
	callq	_uvc_video_next_buffers
	xorl	%eax, %eax
	subl	(%r14), %eax
LBB0_8:                                 ##   in Loop: Header=BB0_6 Depth=1
	cmpl	%eax, %ebx
	jne	LBB0_10
## %bb.9:                               ##   in Loop: Header=BB0_6 Depth=1
	movq	-48(%rbp), %rsi
	jmp	LBB0_6
LBB0_1:
	testl	%eax, %eax
	je	LBB0_25
## %bb.2:
	movq	8(%rbx), %r12
	addq	%r15, 8(%r13)
	xorl	%r15d, %r15d
LBB0_15:
	cmpl	$0, 16(%r13)
	jne	LBB0_18
LBB0_16:
	testq	%rsi, %rsi
	je	LBB0_18
## %bb.17:
	movq	%r12, %rdx
	movl	%r15d, %ecx
	callq	_uvc_video_decode_data
LBB0_18:
	movl	(%rbx), %eax
	cmpl	4(%rbx), %eax
	jl	LBB0_20
## %bb.19:
	movq	8(%r13), %rax
	cmpq	24(%r13), %rax
	jl	LBB0_25
LBB0_20:
	cmpl	$0, 16(%r13)
	jne	LBB0_24
## %bb.21:
	movq	-48(%rbp), %rsi
	testq	%rsi, %rsi
	je	LBB0_24
## %bb.22:
	movl	32(%r13), %edx
	movq	8(%r13), %rcx
	movq	%r13, %rdi
	callq	_uvc_video_decode_end
	movq	-48(%rbp), %rax
	movq	(%rax), %rax
	movq	_UVC_BUF_STATE_READY@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_24
## %bb.23:
	leaq	-48(%rbp), %rsi
	leaq	-56(%rbp), %rdx
	movq	%r13, %rdi
	callq	_uvc_video_next_buffers
LBB0_24:
	movl	$0, (%r13)
	movl	$0, 16(%r13)
	movq	$0, 8(%r13)
LBB0_25:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_10:
	movq	-48(%rbp), %rsi
	testl	%ebx, %ebx
	js	LBB0_12
## %bb.11:
	testq	%rsi, %rsi
	je	LBB0_12
## %bb.13:
	movl	32(%r13), %edi
	movq	%r12, %rsi
	movl	%ebx, %edx
	callq	_memcpy
	movl	%ebx, (%r13)
	movq	-56(%rbp), %rsi
	movq	%r13, %rdi
	movq	%r12, %rdx
	movl	%ebx, %ecx
	callq	_uvc_video_decode_meta
	movl	%ebx, %eax
	leaq	(%r12,%rax,4), %r12
	subl	%ebx, %r15d
	movq	-48(%rbp), %rsi
	jmp	LBB0_14
LBB0_12:
	movl	$1, 16(%r13)
LBB0_14:
	movq	-72(%rbp), %rbx                 ## 8-byte Reload
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	cmpl	$0, 16(%r13)
	je	LBB0_16
	jmp	LBB0_18
	.cfi_endproc
                                        ## -- End function
	.comm	_EAGAIN,4,2                     ## @EAGAIN
	.comm	_UVC_BUF_STATE_READY,8,3        ## @UVC_BUF_STATE_READY
	.no_dead_strip	_uvc_video_decode_bulk
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function uvc_video_decode_bulk
_uvc_video_decode_bulk:                 ; @uvc_video_decode_bulk
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x20, x0
	stp	x2, x1, [sp]
	ldp	x19, x24, [x0]
	ldr	w21, [x24]
	ldr	w8, [x19]
	cbz	w21, LBB0_8
; %bb.1:
	mov	x9, x21
	sxtw	x9, w9
	ldr	x22, [x24, #8]
	ldr	x10, [x19, #8]
	add	x9, x10, x9
	str	x9, [x19, #8]
	cbnz	w8, LBB0_10
; %bb.2:
	ldr	w8, [x19, #16]
	cbnz	w8, LBB0_10
; %bb.3:
Lloh0:
	adrp	x25, _EAGAIN@GOTPAGE
Lloh1:
	ldr	x25, [x25, _EAGAIN@GOTPAGEOFF]
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	mov	x2, x22
	mov	x3, x21
	bl	_uvc_video_decode_start
	mov	x23, x0
	ldr	w8, [x25]
	cmn	w0, w8
	b.ne	LBB0_6
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	add	x1, sp, #8
	mov	x2, sp
	mov	x0, x19
	bl	_uvc_video_next_buffers
	ldr	w8, [x25]
LBB0_6:                                 ;   in Loop: Header=BB0_4 Depth=1
	neg	w8, w8
	cmp	w23, w8
	b.ne	LBB0_19
; %bb.7:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x1, [sp, #8]
	b	LBB0_4
LBB0_8:
	cbz	w8, LBB0_18
; %bb.9:
	ldr	x22, [x24, #8]
	ldr	x8, [x19, #8]
	add	x8, x8, x21
	str	x8, [x19, #8]
	mov	w21, #0
LBB0_10:
	ldr	w8, [x19, #16]
	cmp	w8, #0
	ccmp	x1, #0, #4, eq
	b.eq	LBB0_12
; %bb.11:
	mov	x0, x20
	mov	x2, x22
	mov	x3, x21
	bl	_uvc_video_decode_data
LBB0_12:
	ldp	w8, w9, [x24]
	cmp	w8, w9
	b.lt	LBB0_14
; %bb.13:
	ldr	x8, [x19, #8]
	ldr	x9, [x19, #24]
	cmp	x8, x9
	b.lt	LBB0_18
LBB0_14:
	ldr	w8, [x19, #16]
	ldr	x1, [sp, #8]
	cmp	w8, #0
	ccmp	x1, #0, #4, eq
	b.eq	LBB0_17
; %bb.15:
	ldr	w2, [x19, #32]
	ldr	x3, [x19, #8]
	mov	x0, x19
	bl	_uvc_video_decode_end
	ldr	x8, [sp, #8]
	ldr	x8, [x8]
Lloh2:
	adrp	x9, _UVC_BUF_STATE_READY@GOTPAGE
Lloh3:
	ldr	x9, [x9, _UVC_BUF_STATE_READY@GOTPAGEOFF]
Lloh4:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_17
; %bb.16:
	add	x1, sp, #8
	mov	x2, sp
	mov	x0, x19
	bl	_uvc_video_next_buffers
LBB0_17:
	str	wzr, [x19]
	str	wzr, [x19, #16]
	str	xzr, [x19, #8]
LBB0_18:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
LBB0_19:
	ldr	x1, [sp, #8]
	tbnz	w23, #31, LBB0_22
; %bb.20:
	cbz	x1, LBB0_22
; %bb.21:
	ldr	w0, [x19, #32]
	mov	x1, x22
	mov	x2, x23
	bl	_memcpy
	str	w23, [x19]
	ldr	x1, [sp]
	mov	x0, x19
	mov	x2, x22
	mov	x3, x23
	bl	_uvc_video_decode_meta
	add	x22, x22, w23, uxtw #2
	sub	w21, w21, w23
	ldr	x1, [sp, #8]
	b	LBB0_10
LBB0_22:
	mov	w8, #1
	str	w8, [x19, #16]
	b	LBB0_10
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_EAGAIN,4,2                     ; @EAGAIN
	.comm	_UVC_BUF_STATE_READY,8,3        ; @UVC_BUF_STATE_READY
	.no_dead_strip	_uvc_video_decode_bulk
.subsections_via_symbols
