	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_encavcodecWork                 ## -- Begin function encavcodecWork
	.p2align	4, 0x90
_encavcodecWork:                        ## @encavcodecWork
	.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	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	(%rdi), %rax
	movq	(%rax), %rax
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	cmpq	$0, (%rax)
	je	LBB0_2
## %bb.3:
	movq	%rdx, %r14
	movq	%rdi, %rbx
	movq	(%rsi), %r15
	leaq	-36(%rbp), %rdi
	callq	_hb_buffer_list_clear
	movq	_HB_BUF_FLAG_EOF@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%r15)
	je	LBB0_5
## %bb.4:
	leaq	-36(%rbp), %r15
	movq	%rbx, %rdi
	movq	%r15, %rsi
	callq	_Flush
	xorl	%eax, %eax
	callq	_hb_buffer_eof_init
	movq	%r15, %rdi
	movl	%eax, %esi
	callq	_hb_buffer_list_append
	movq	%r15, %rdi
	callq	_hb_buffer_list_clear
	movq	%rax, (%r14)
	movq	_HB_WORK_DONE@GOTPCREL(%rip), %rax
	jmp	LBB0_6
LBB0_2:
	leaq	L_.str(%rip), %rdi
	callq	_hb_error
	movq	_HB_WORK_DONE@GOTPCREL(%rip), %rax
	jmp	LBB0_6
LBB0_5:
	leaq	-36(%rbp), %r12
	movq	%rbx, %rdi
	movq	%r15, %rsi
	movq	%r12, %rdx
	callq	_Encode
	movq	%r12, %rdi
	callq	_hb_buffer_list_clear
	movq	%rax, (%r14)
	movq	_HB_WORK_OK@GOTPCREL(%rip), %rax
LBB0_6:
	movl	(%rax), %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"encavcodec: codec context is uninitialized"

	.comm	_HB_WORK_DONE,4,2               ## @HB_WORK_DONE
	.comm	_HB_BUF_FLAG_EOF,4,2            ## @HB_BUF_FLAG_EOF
	.comm	_HB_WORK_OK,4,2                 ## @HB_WORK_OK
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_encavcodecWork                 ; -- Begin function encavcodecWork
	.p2align	2
_encavcodecWork:                        ; @encavcodecWork
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	ldr	x8, [x0]
	ldr	x8, [x8]
	cbz	x8, LBB0_4
; %bb.1:
	ldr	x8, [x8]
	cbz	x8, LBB0_4
; %bb.2:
	mov	x19, x2
	mov	x20, x0
	ldr	x21, [x1]
	add	x0, sp, #12
	bl	_hb_buffer_list_clear
	ldr	w8, [x21]
Lloh0:
	adrp	x9, _HB_BUF_FLAG_EOF@GOTPAGE
Lloh1:
	ldr	x9, [x9, _HB_BUF_FLAG_EOF@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_7
; %bb.3:
	add	x1, sp, #12
	mov	x0, x20
	bl	_Flush
	bl	_hb_buffer_eof_init
	mov	x1, x0
	add	x0, sp, #12
	bl	_hb_buffer_list_append
	add	x0, sp, #12
	bl	_hb_buffer_list_clear
	str	x0, [x19]
	b	LBB0_5
LBB0_4:
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	bl	_hb_error
LBB0_5:
Lloh5:
	adrp	x8, _HB_WORK_DONE@GOTPAGE
Lloh6:
	ldr	x8, [x8, _HB_WORK_DONE@GOTPAGEOFF]
LBB0_6:
	ldr	w0, [x8]
	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
	add	sp, sp, #64
	ret
LBB0_7:
	add	x2, sp, #12
	mov	x0, x20
	mov	x1, x21
	bl	_Encode
	add	x0, sp, #12
	bl	_hb_buffer_list_clear
	str	x0, [x19]
Lloh7:
	adrp	x8, _HB_WORK_OK@GOTPAGE
Lloh8:
	ldr	x8, [x8, _HB_WORK_OK@GOTPAGEOFF]
	b	LBB0_6
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"encavcodec: codec context is uninitialized"

	.comm	_HB_WORK_DONE,4,2               ; @HB_WORK_DONE
	.comm	_HB_BUF_FLAG_EOF,4,2            ; @HB_BUF_FLAG_EOF
	.comm	_HB_WORK_OK,4,2                 ; @HB_WORK_OK
.subsections_via_symbols
