	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hva_open_encoder
_hva_open_encoder:                      ## @hva_open_encoder
	.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
	movl	%edx, %r12d
	movl	%esi, %r13d
	movq	%rdi, %rbx
	movl	%esi, -44(%rbp)
	movl	%edx, -48(%rbp)
	callq	_ctx_to_hdev
	movq	%rax, %r14
	movq	%rbx, %rdi
	callq	_ctx_to_dev
	movq	%rax, %r15
	movq	%rbx, %rdi
	movl	%r12d, %esi
	movl	%r13d, %edx
	callq	_hva_find_encoder
	movl	(%rbx), %edx
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %r13
	leaq	L_.str.1(%rip), %rsi
	xorl	%r12d, %r12d
	leaq	-48(%rbp), %rcx
	leaq	-44(%rbp), %r8
	movq	%r15, %rdi
	xorl	%eax, %eax
	callq	_dev_dbg
	movl	(%rbx), %edi
	movl	(%r14), %ecx
	leaq	L_.str.2(%rip), %rdx
	movl	$4, %esi
	leaq	-44(%rbp), %r8
	callq	_snprintf
	movq	%rbx, %rdi
	callq	*(%r13)
	movl	(%rbx), %edx
	testl	%eax, %eax
	je	LBB0_4
## %bb.3:
	movl	%eax, %r14d
	leaq	L_.str.3(%rip), %rsi
	movq	%r15, %rdi
	movl	%eax, %ecx
	xorl	%eax, %eax
	callq	_dev_err
	movl	%r14d, %r12d
	jmp	LBB0_5
LBB0_1:
	leaq	L_.str(%rip), %rsi
	xorl	%r12d, %r12d
	leaq	-48(%rbp), %rcx
	leaq	-44(%rbp), %r8
	movq	%r15, %rdi
	xorl	%eax, %eax
	callq	_dev_err
	movq	_EINVAL@GOTPCREL(%rip), %rax
	subl	(%rax), %r12d
	jmp	LBB0_5
LBB0_4:
	movslq	8(%r13), %rcx
	leaq	L_.str.4(%rip), %rsi
	movq	%r15, %rdi
	xorl	%eax, %eax
	callq	_dev_dbg
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	%r13, (%rax)
LBB0_5:
	movl	%r12d, %eax
	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 no encoder found matching %4.4s => %4.4s\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
L_.str.1:                               ## @.str.1
	.asciz	"%s one encoder matching %4.4s => %4.4s\n"

L_.str.2:                               ## @.str.2
	.asciz	"[%3d:%4.4s]"

L_.str.3:                               ## @.str.3
	.asciz	"%s failed to open encoder instance (%d)\n"

L_.str.4:                               ## @.str.4
	.asciz	"%s %s encoder opened\n"

	.no_dead_strip	_hva_open_encoder
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function hva_open_encoder
_hva_open_encoder:                      ; @hva_open_encoder
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	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
	mov	x19, x3
	mov	x22, x2
	mov	x24, x1
	mov	x21, x0
	stp	w2, w1, [sp, #24]
	bl	_ctx_to_hdev
	mov	x23, x0
	mov	x0, x21
	bl	_ctx_to_dev
	mov	x20, x0
	mov	x0, x21
	mov	x1, x22
	mov	x2, x24
	bl	_hva_find_encoder
	ldr	w2, [x21]
	cbz	x0, LBB0_3
; %bb.1:
	mov	x22, x0
	add	x8, sp, #28
	str	x8, [sp]
Lloh0:
	adrp	x1, l_.str.1@PAGE
Lloh1:
	add	x1, x1, l_.str.1@PAGEOFF
	add	x3, sp, #24
	mov	x0, x20
	bl	_dev_dbg
	ldr	w0, [x21]
	ldr	w3, [x23]
Lloh2:
	adrp	x2, l_.str.2@PAGE
Lloh3:
	add	x2, x2, l_.str.2@PAGEOFF
	add	x4, sp, #28
	mov	w1, #4
	bl	_snprintf
	ldr	x8, [x22]
	mov	x0, x21
	blr	x8
	mov	x23, x0
	ldr	w2, [x21]
	cbz	w0, LBB0_4
; %bb.2:
	str	x23, [sp]
Lloh4:
	adrp	x1, l_.str.3@PAGE
Lloh5:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x20
	bl	_dev_err
	b	LBB0_5
LBB0_3:
	add	x8, sp, #28
	add	x9, sp, #24
	stp	x9, x8, [sp]
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	bl	_dev_err
Lloh8:
	adrp	x8, _EINVAL@GOTPAGE
Lloh9:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	neg	w23, w8
	b	LBB0_5
LBB0_4:
	ldrsw	x3, [x22, #8]
Lloh11:
	adrp	x1, l_.str.4@PAGE
Lloh12:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	x0, x20
	bl	_dev_dbg
	str	x22, [x19]
LBB0_5:
	mov	x0, x23
	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
	add	sp, sp, #96
	ret
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s no encoder found matching %4.4s => %4.4s\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
l_.str.1:                               ; @.str.1
	.asciz	"%s one encoder matching %4.4s => %4.4s\n"

l_.str.2:                               ; @.str.2
	.asciz	"[%3d:%4.4s]"

l_.str.3:                               ; @.str.3
	.asciz	"%s failed to open encoder instance (%d)\n"

l_.str.4:                               ; @.str.4
	.asciz	"%s %s encoder opened\n"

	.no_dead_strip	_hva_open_encoder
.subsections_via_symbols
