	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hva_queue_setup
_hva_queue_setup:                       ## @hva_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, -48(%rbp)                 ## 8-byte Spill
	movq	%rdx, -56(%rbp)                 ## 8-byte Spill
	movq	%rsi, %r12
	movq	%rdi, %rbx
	callq	_vb2_get_drv_priv
	movq	%rax, %r13
	movq	%rax, %rdi
	callq	_ctx_to_dev
	movq	%rax, %r14
	movl	8(%r13), %r15d
	movq	(%rbx), %rdi
	callq	_to_type_str
	movl	(%r12), %r8d
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	movl	%r15d, %edx
	movl	%eax, %ecx
	callq	_dev_dbg
	movq	(%rbx), %rax
	movq	_V4L2_BUF_TYPE_VIDEO_OUTPUT@GOTPCREL(%rip), %rcx
	xorl	%edx, %edx
	cmpq	(%rcx), %rax
	sete	%dl
	movl	(%r13,%rdx,4), %ecx
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	cmpl	$0, (%rax)
	je	LBB0_2
## %bb.1:
	movq	_EINVAL@GOTPCREL(%rip), %rdx
	xorl	%esi, %esi
	xorl	%eax, %eax
	subl	(%rdx), %eax
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
	cmpl	%ecx, (%rdx)
	cmovael	%esi, %eax
	jmp	LBB0_3
LBB0_2:
	movl	$1, (%rax)
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movl	%ecx, (%rax)
	xorl	%eax, %eax
LBB0_3:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s %s queue setup: num_buffers %d\n"

	.comm	_V4L2_BUF_TYPE_VIDEO_OUTPUT,8,3 ## @V4L2_BUF_TYPE_VIDEO_OUTPUT
	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_hva_queue_setup
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function hva_queue_setup
_hva_queue_setup:                       ; @hva_queue_setup
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x19, x3
	mov	x20, x2
	mov	x21, x1
	mov	x22, x0
	bl	_vb2_get_drv_priv
	mov	x23, x0
	bl	_ctx_to_dev
	mov	x24, x0
	ldr	w25, [x23, #8]
	ldr	x0, [x22]
	bl	_to_type_str
	mov	x3, x0
	ldr	w4, [x21]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x24
	mov	x2, x25
	bl	_dev_dbg
	ldr	x8, [x22]
Lloh2:
	adrp	x9, _V4L2_BUF_TYPE_VIDEO_OUTPUT@GOTPAGE
Lloh3:
	ldr	x9, [x9, _V4L2_BUF_TYPE_VIDEO_OUTPUT@GOTPAGEOFF]
Lloh4:
	ldr	x9, [x9]
	cmp	x8, x9
	cset	w8, eq
	ldr	w8, [x23, w8, uxtw #2]
	ldr	w9, [x20]
	cbz	w9, LBB0_2
; %bb.1:
	ldr	w9, [x19]
Lloh5:
	adrp	x10, _EINVAL@GOTPAGE
Lloh6:
	ldr	x10, [x10, _EINVAL@GOTPAGEOFF]
Lloh7:
	ldr	w10, [x10]
	cmp	w9, w8
	csneg	w0, wzr, w10, hs
	b	LBB0_3
LBB0_2:
	mov	w0, #0
	mov	w9, #1
	str	w9, [x20]
	str	w8, [x19]
LBB0_3:
	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
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s %s queue setup: num_buffers %d\n"

	.comm	_V4L2_BUF_TYPE_VIDEO_OUTPUT,8,3 ; @V4L2_BUF_TYPE_VIDEO_OUTPUT
	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_hva_queue_setup
.subsections_via_symbols
