	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vdec_queue_setup
_vdec_queue_setup:                      ## @vdec_queue_setup
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, -56(%rbp)                 ## 8-byte Spill
	movq	%rdx, %rbx
	movq	%rsi, %r14
	movq	%rdi, %r15
	callq	_vb2_get_drv_priv
	movq	%rax, %r12
	cmpl	$0, (%rbx)
	je	LBB0_8
## %bb.1:
	movq	%r12, %rdi
	callq	_venus_helper_get_opb_size
	movl	%eax, %ecx
	movl	(%r15), %edx
	xorl	%eax, %eax
	cmpl	$129, %edx
	je	LBB0_6
## %bb.2:
	cmpl	$128, %edx
	jne	LBB0_17
## %bb.3:
	movl	(%rbx), %ecx
	movq	48(%r12), %rdx
	cmpl	(%rdx), %ecx
	jne	LBB0_5
## %bb.4:
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movl	(%rcx), %ecx
	cmpl	(%r12), %ecx
	jb	LBB0_5
	jmp	LBB0_17
LBB0_8:
	movq	%rax, %r13
	movq	%r12, %rdi
	callq	_vdec_session_init
	testl	%eax, %eax
	jne	LBB0_17
## %bb.9:
	leaq	-60(%rbp), %rsi
	leaq	-44(%rbp), %rdx
	movq	%r12, %rdi
	callq	_vdec_num_buffers
	testl	%eax, %eax
	jne	LBB0_17
## %bb.10:
	movl	(%r15), %eax
	cmpl	$129, %eax
	je	LBB0_13
## %bb.11:
	cmpl	$128, %eax
	jne	LBB0_5
## %bb.12:
	movq	48(%r12), %rax
	movl	(%rax), %ecx
	movl	%ecx, (%rbx)
	movl	4(%rax), %edi
	movl	40(%r12), %edx
	movl	44(%r12), %esi
	callq	_venus_helper_get_framesz
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	movl	%eax, (%rbx)
	movl	(%r12), %esi
	movl	%eax, %edi
	callq	_max
	movl	%eax, (%rbx)
	movl	%eax, (%r12)
	movl	(%r14), %edi
	movl	-60(%rbp), %esi
	callq	_max
	movl	%eax, (%r14)
	movl	%eax, 4(%r12)
	movl	-44(%rbp), %eax
	movl	%eax, 8(%r12)
	jmp	LBB0_16
LBB0_6:
	movl	(%rbx), %edx
	movq	32(%r12), %rsi
	cmpl	(%rsi), %edx
	jne	LBB0_5
## %bb.7:
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
	cmpl	%ecx, (%rdx)
	jae	LBB0_17
LBB0_5:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_17:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_13:
	movq	32(%r12), %rax
	movl	(%rax), %ecx
	movl	%ecx, (%rbx)
	movl	4(%rax), %edi
	movl	24(%r12), %edx
	movl	28(%r12), %esi
	callq	_venus_helper_get_framesz
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movl	%eax, (%rcx)
	movl	%eax, 12(%r12)
	movl	(%r14), %edi
	movl	-44(%rbp), %esi
	callq	_max
	movl	%eax, (%r14)
	movl	%eax, 8(%r12)
	addq	$16, %r13
	movq	%r13, %rdi
	callq	_mutex_lock
	movl	20(%r12), %eax
	movq	_VENUS_DEC_STATE_CAPTURE_SETUP@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_15
## %bb.14:
	movq	_VENUS_DEC_STATE_STOPPED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 20(%r12)
LBB0_15:
	movq	%r13, %rdi
	callq	_mutex_unlock
LBB0_16:
	xorl	%eax, %eax
	jmp	LBB0_17
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_VENUS_DEC_STATE_CAPTURE_SETUP,4,2 ## @VENUS_DEC_STATE_CAPTURE_SETUP
	.comm	_VENUS_DEC_STATE_STOPPED,4,2    ## @VENUS_DEC_STATE_STOPPED
	.no_dead_strip	_vdec_queue_setup
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function vdec_queue_setup
_vdec_queue_setup:                      ; @vdec_queue_setup
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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	x20, x3
	mov	x22, x2
	mov	x21, x1
	mov	x23, x0
	bl	_vb2_get_drv_priv
	mov	x19, x0
	ldr	w8, [x22]
	cbz	w8, LBB0_5
; %bb.1:
	mov	x0, x19
	bl	_venus_helper_get_opb_size
	ldr	w8, [x23]
	cmp	w8, #129
	b.eq	LBB0_10
; %bb.2:
	cmp	w8, #128
	b.ne	LBB0_16
; %bb.3:
	ldr	w8, [x22]
	ldr	x9, [x19, #48]
	ldr	w9, [x9]
	cmp	w8, w9
	b.ne	LBB0_12
; %bb.4:
	ldr	w8, [x20]
	ldr	w9, [x19]
	cmp	w8, w9
	b.lo	LBB0_12
	b	LBB0_16
LBB0_5:
	mov	x0, x19
	bl	_vdec_session_init
	cbnz	w0, LBB0_17
; %bb.6:
	add	x1, sp, #12
	add	x2, sp, #8
	mov	x0, x19
	bl	_vdec_num_buffers
	cbnz	w0, LBB0_17
; %bb.7:
	ldr	w8, [x23]
	cmp	w8, #129
	b.eq	LBB0_13
; %bb.8:
	cmp	w8, #128
	b.ne	LBB0_12
; %bb.9:
	ldr	x8, [x19, #48]
	ldr	w9, [x8]
	str	w9, [x22]
	ldr	w0, [x8, #4]
	ldp	w2, w1, [x19, #40]
	bl	_venus_helper_get_framesz
	str	w0, [x20]
	ldr	w1, [x19]
	bl	_max
	str	w0, [x20]
	str	w0, [x19]
	ldr	w0, [x21]
	ldr	w1, [sp, #12]
	bl	_max
	mov	x8, x0
	mov	w0, #0
	str	w8, [x21]
	ldr	w9, [sp, #8]
	stp	w8, w9, [x19, #4]
	b	LBB0_17
LBB0_10:
	ldr	w8, [x22]
	ldr	x9, [x19, #32]
	ldr	w9, [x9]
	cmp	w8, w9
	b.ne	LBB0_12
; %bb.11:
	ldr	w8, [x20]
	cmp	w8, w0
	b.hs	LBB0_16
LBB0_12:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_17
LBB0_13:
	ldr	x8, [x19, #32]
	ldr	w9, [x8]
	str	w9, [x22]
	ldr	w0, [x8, #4]
	ldp	w2, w1, [x19, #24]
	bl	_venus_helper_get_framesz
	str	w0, [x20]
	str	w0, [x19, #12]
	ldr	w0, [x21]
	ldr	w1, [sp, #8]
	bl	_max
	str	w0, [x21]
	str	w0, [x19, #8]
	add	x20, x19, #16
	mov	x0, x20
	bl	_mutex_lock
	ldr	w8, [x19, #20]
Lloh3:
	adrp	x9, _VENUS_DEC_STATE_CAPTURE_SETUP@GOTPAGE
Lloh4:
	ldr	x9, [x9, _VENUS_DEC_STATE_CAPTURE_SETUP@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ne	LBB0_15
; %bb.14:
Lloh6:
	adrp	x8, _VENUS_DEC_STATE_STOPPED@GOTPAGE
Lloh7:
	ldr	x8, [x8, _VENUS_DEC_STATE_STOPPED@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	str	w8, [x19, #20]
LBB0_15:
	mov	x0, x20
	bl	_mutex_unlock
LBB0_16:
	mov	w0, #0
LBB0_17:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_VENUS_DEC_STATE_CAPTURE_SETUP,4,2 ; @VENUS_DEC_STATE_CAPTURE_SETUP
	.comm	_VENUS_DEC_STATE_STOPPED,4,2    ; @VENUS_DEC_STATE_STOPPED
	.no_dead_strip	_vdec_queue_setup
.subsections_via_symbols
