	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_encx264Work                    ## -- Begin function encx264Work
	.p2align	4, 0x90
_encx264Work:                           ## @encx264Work
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r14
	movq	%rdi, %rbx
	movq	(%rdi), %r12
	movq	(%rsi), %rcx
	movq	$0, (%rdx)
	movq	_HB_BUF_FLAG_EOF@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%rcx)
	je	LBB0_8
## %bb.1:
	movq	%rcx, -56(%rbp)                 ## 8-byte Spill
	movq	%rsi, -64(%rbp)                 ## 8-byte Spill
	movq	%r14, -72(%rbp)                 ## 8-byte Spill
	leaq	-44(%rbp), %rdi
	callq	_hb_buffer_list_clear
	movq	8(%r12), %rax
	movl	(%r12), %edi
	callq	*8(%rax)
	testq	%rax, %rax
	je	LBB0_7
## %bb.2:
	leaq	-80(%rbp), %r13
	leaq	-48(%rbp), %r14
	leaq	-84(%rbp), %r15
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_3 Depth=1
	movq	-80(%rbp), %rcx
	movq	%rbx, %rdi
	movq	%r15, %rsi
	callq	_nal_encode
	leaq	-44(%rbp), %rdi
	movq	%rax, %rsi
	callq	_hb_buffer_list_append
LBB0_6:                                 ##   in Loop: Header=BB0_3 Depth=1
	movq	8(%r12), %rax
	movl	(%r12), %edi
	callq	*8(%rax)
	testq	%rax, %rax
	je	LBB0_7
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%r12), %rax
	movl	(%r12), %edi
	movq	%r13, %rsi
	movq	%r14, %rdx
	xorl	%ecx, %ecx
	movq	%r15, %r8
	callq	*(%rax)
	movl	-48(%rbp), %edx
	testl	%edx, %edx
	je	LBB0_6
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	jns	LBB0_5
LBB0_7:
	leaq	-44(%rbp), %rbx
	movq	%rbx, %rdi
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	callq	_hb_buffer_list_append
	movq	%rbx, %rdi
	callq	_hb_buffer_list_clear
	movq	-72(%rbp), %rcx                 ## 8-byte Reload
	movq	%rax, (%rcx)
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movq	$0, (%rax)
	movq	_HB_WORK_DONE@GOTPCREL(%rip), %rax
	jmp	LBB0_9
LBB0_8:
	movq	%rbx, %rdi
	movq	%rcx, %rsi
	callq	_x264_encode
	movq	%rax, (%r14)
	movq	_HB_WORK_OK@GOTPCREL(%rip), %rax
LBB0_9:
	movl	(%rax), %eax
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_HB_BUF_FLAG_EOF,4,2            ## @HB_BUF_FLAG_EOF
	.comm	_HB_WORK_DONE,4,2               ## @HB_WORK_DONE
	.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	_encx264Work                    ; -- Begin function encx264Work
	.p2align	2
_encx264Work:                           ; @encx264Work
	.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, x2
	mov	x22, x0
	ldr	x23, [x0]
	ldr	x21, [x1]
	str	xzr, [x2]
	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.1:
	mov	x20, x1
	add	x0, sp, #12
	bl	_hb_buffer_list_clear
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x23, #8]
	ldr	x8, [x8, #8]
	ldr	w0, [x23]
	blr	x8
	cbz	x0, LBB0_6
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	x8, [x23, #8]
	ldr	x8, [x8]
	ldr	w0, [x23]
	add	x1, sp, #16
	add	x2, sp, #24
	add	x4, sp, #28
	mov	x3, #0
	blr	x8
	ldr	w2, [sp, #24]
	cbz	w2, LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_2 Depth=1
	tbnz	w2, #31, LBB0_6
; %bb.5:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	x3, [sp, #16]
	add	x1, sp, #28
	mov	x0, x22
	bl	_nal_encode
	mov	x1, x0
	add	x0, sp, #12
	bl	_hb_buffer_list_append
	b	LBB0_2
LBB0_6:
	add	x0, sp, #12
	mov	x1, x21
	bl	_hb_buffer_list_append
	add	x0, sp, #12
	bl	_hb_buffer_list_clear
	str	x0, [x19]
	str	xzr, [x20]
Lloh3:
	adrp	x8, _HB_WORK_DONE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _HB_WORK_DONE@GOTPAGEOFF]
	b	LBB0_8
LBB0_7:
	mov	x0, x22
	mov	x1, x21
	bl	_x264_encode
	str	x0, [x19]
Lloh5:
	adrp	x8, _HB_WORK_OK@GOTPAGE
Lloh6:
	ldr	x8, [x8, _HB_WORK_OK@GOTPAGEOFF]
LBB0_8:
	ldr	w0, [x8]
	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 AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_HB_BUF_FLAG_EOF,4,2            ; @HB_BUF_FLAG_EOF
	.comm	_HB_WORK_DONE,4,2               ; @HB_WORK_DONE
	.comm	_HB_WORK_OK,4,2                 ; @HB_WORK_OK
.subsections_via_symbols
