	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function nal_encode
_nal_encode:                            ## @nal_encode
	.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, %r13
	movl	%edx, %r14d
	movq	%rsi, %r12
	movq	%rdi, %rbx
	movq	8(%rdi), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	8(%rax), %rax
	movl	4(%rax), %esi
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	movl	8(%rax), %edi
	callq	_hb_video_buffer_init
	movq	%rax, %r15
	movq	%rax, -48(%rbp)
	movl	$0, (%rax)
	movq	_AV_NOPTS_VALUE@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 40(%r15)
	movl	20(%r12), %ecx
	movl	%ecx, 32(%r15)
	movq	%rax, 24(%r15)
	movl	16(%r12), %eax
	movl	%eax, 20(%r15)
	movq	(%rbx), %rcx
	cmpl	$0, (%rcx)
	jne	LBB0_3
## %bb.1:
	testl	%eax, %eax
	jns	LBB0_3
## %bb.2:
	negl	%eax
	movl	%eax, (%rcx)
LBB0_3:
	movl	(%r12), %eax
	addl	$-128, %eax
	cmpl	$4, %eax
	ja	LBB0_9
## %bb.4:
	leaq	LJTI0_0(%rip), %rcx
	movslq	(%rcx,%rax,4), %rax
	addq	%rcx, %rax
	jmpq	*%rax
LBB0_6:
	movq	_HB_FRAME_P@GOTPCREL(%rip), %rax
	jmp	LBB0_10
LBB0_5:
	movq	_HB_FRAME_IDR@GOTPCREL(%rip), %rax
	jmp	LBB0_10
LBB0_9:
	movq	_HB_FRAME_I@GOTPCREL(%rip), %rax
	jmp	LBB0_10
LBB0_8:
	movq	_HB_FRAME_BREF@GOTPCREL(%rip), %rax
	jmp	LBB0_10
LBB0_7:
	movq	_HB_FRAME_B@GOTPCREL(%rip), %rax
LBB0_10:
	movq	(%rax), %rax
	movq	%rax, 8(%r15)
	cmpq	$0, 8(%r12)
	je	LBB0_11
## %bb.12:
	movq	_HB_FLAG_FRAMETYPE_KEY@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 16(%r15)
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %edi
	movq	%r15, %rsi
	callq	_hb_chapter_dequeue
	movl	16(%r15), %eax
	jmp	LBB0_13
LBB0_11:
	xorl	%eax, %eax
LBB0_13:
	movq	_HB_FLAG_FRAMETYPE_REF@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	notl	%ecx
	andl	%eax, %ecx
	movl	%ecx, 16(%r15)
	testl	%r14d, %r14d
	jle	LBB0_25
## %bb.14:
	movq	-48(%rbp), %r15
	movl	%r14d, %eax
	shlq	$3, %rax
	leaq	(%rax,%rax,2), %r12
	xorl	%r14d, %r14d
	jmp	LBB0_15
	.p2align	4, 0x90
LBB0_22:                                ##   in Loop: Header=BB0_15 Depth=1
	movq	_HB_FLAG_FRAMETYPE_REF@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, 16(%r15)
LBB0_23:                                ##   in Loop: Header=BB0_15 Depth=1
	addl	%ebx, (%r15)
LBB0_24:                                ##   in Loop: Header=BB0_15 Depth=1
	addq	$24, %r14
	cmpq	%r14, %r12
	je	LBB0_25
LBB0_15:                                ## =>This Inner Loop Header: Depth=1
	movl	(%r13,%r14), %ebx
	movl	16(%r13,%r14), %esi
	movslq	(%r15), %rdi
	addq	48(%r15), %rdi
	movl	%ebx, %edx
	callq	_memcpy
	testl	%ebx, %ebx
	jle	LBB0_24
## %bb.16:                              ##   in Loop: Header=BB0_15 Depth=1
	movl	4(%r13,%r14), %eax
	cmpl	$137, %eax
	je	LBB0_18
## %bb.17:                              ##   in Loop: Header=BB0_15 Depth=1
	cmpl	$133, %eax
	jne	LBB0_19
LBB0_18:                                ##   in Loop: Header=BB0_15 Depth=1
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	cmpl	$0, (%rax)
	je	LBB0_24
LBB0_19:                                ##   in Loop: Header=BB0_15 Depth=1
	movq	8(%r13,%r14), %rax
	movq	_NAL_PRIORITY_DISPOSABLE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_23
## %bb.20:                              ##   in Loop: Header=BB0_15 Depth=1
	movq	8(%r15), %rax
	movq	_HB_FRAME_B@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_22
## %bb.21:                              ##   in Loop: Header=BB0_15 Depth=1
	movq	_HB_FRAME_BREF@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 8(%r15)
	jmp	LBB0_22
LBB0_25:
	movq	-48(%rbp), %rax
	cmpl	$0, (%rax)
	jg	LBB0_27
## %bb.26:
	leaq	-48(%rbp), %rdi
	callq	_hb_buffer_close
	movq	-48(%rbp), %rax
LBB0_27:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_6, LBB0_6-LJTI0_0
.set L0_0_set_5, LBB0_5-LJTI0_0
.set L0_0_set_9, LBB0_9-LJTI0_0
.set L0_0_set_8, LBB0_8-LJTI0_0
.set L0_0_set_7, LBB0_7-LJTI0_0
LJTI0_0:
	.long	L0_0_set_6
	.long	L0_0_set_5
	.long	L0_0_set_9
	.long	L0_0_set_8
	.long	L0_0_set_7
	.end_data_region
                                        ## -- End function
	.comm	_AV_NOPTS_VALUE,8,3             ## @AV_NOPTS_VALUE
	.comm	_HB_FRAME_IDR,8,3               ## @HB_FRAME_IDR
	.comm	_HB_FRAME_P,8,3                 ## @HB_FRAME_P
	.comm	_HB_FRAME_B,8,3                 ## @HB_FRAME_B
	.comm	_HB_FRAME_BREF,8,3              ## @HB_FRAME_BREF
	.comm	_HB_FRAME_I,8,3                 ## @HB_FRAME_I
	.comm	_HB_FLAG_FRAMETYPE_KEY,4,2      ## @HB_FLAG_FRAMETYPE_KEY
	.comm	_HB_FLAG_FRAMETYPE_REF,4,2      ## @HB_FLAG_FRAMETYPE_REF
	.comm	_NAL_PRIORITY_DISPOSABLE,8,3    ## @NAL_PRIORITY_DISPOSABLE
	.no_dead_strip	_nal_encode
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function nal_encode
_nal_encode:                            ; @nal_encode
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x3
	mov	x20, x2
	mov	x22, x1
	mov	x23, x0
	ldr	x25, [x0, #8]
	ldr	x24, [x25, #8]
	ldp	w1, w0, [x24, #4]
	bl	_hb_video_buffer_init
	mov	x21, x0
	str	x0, [sp, #8]
	str	wzr, [x0]
Lloh0:
	adrp	x8, _AV_NOPTS_VALUE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _AV_NOPTS_VALUE@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x8]
	str	x9, [x0, #40]
	ldp	w8, w10, [x22, #16]
	str	w10, [x0, #32]
	str	x9, [x0, #24]
	str	w8, [x0, #20]
	ldr	x9, [x23]
	ldr	w10, [x9]
	cbnz	w10, LBB0_3
; %bb.1:
	tbz	w8, #31, LBB0_3
; %bb.2:
	neg	w8, w8
	str	w8, [x9]
LBB0_3:
	ldr	w8, [x22]
	sub	w8, w8, #128
	cmp	w8, #4
	b.hi	LBB0_7
; %bb.4:
Lloh3:
	adrp	x9, lJTI0_0@PAGE
Lloh4:
	add	x9, x9, lJTI0_0@PAGEOFF
	adr	x10, LBB0_5
	ldrb	w11, [x9, x8]
	add	x10, x10, x11, lsl #2
	br	x10
LBB0_5:
Lloh5:
	adrp	x8, _HB_FRAME_P@GOTPAGE
Lloh6:
	ldr	x8, [x8, _HB_FRAME_P@GOTPAGEOFF]
	b	LBB0_10
LBB0_6:
Lloh7:
	adrp	x8, _HB_FRAME_IDR@GOTPAGE
Lloh8:
	ldr	x8, [x8, _HB_FRAME_IDR@GOTPAGEOFF]
	b	LBB0_10
LBB0_7:
Lloh9:
	adrp	x8, _HB_FRAME_I@GOTPAGE
Lloh10:
	ldr	x8, [x8, _HB_FRAME_I@GOTPAGEOFF]
	b	LBB0_10
LBB0_8:
Lloh11:
	adrp	x8, _HB_FRAME_BREF@GOTPAGE
Lloh12:
	ldr	x8, [x8, _HB_FRAME_BREF@GOTPAGEOFF]
	b	LBB0_10
LBB0_9:
Lloh13:
	adrp	x8, _HB_FRAME_B@GOTPAGE
Lloh14:
	ldr	x8, [x8, _HB_FRAME_B@GOTPAGEOFF]
LBB0_10:
	ldr	x8, [x8]
	str	x8, [x21, #8]
	ldr	x8, [x22, #8]
	cbz	x8, LBB0_12
; %bb.11:
Lloh15:
	adrp	x8, _HB_FLAG_FRAMETYPE_KEY@GOTPAGE
Lloh16:
	ldr	x8, [x8, _HB_FLAG_FRAMETYPE_KEY@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	str	w8, [x21, #16]
	ldr	w0, [x25]
	mov	x1, x21
	bl	_hb_chapter_dequeue
	ldr	w8, [x21, #16]
LBB0_12:
Lloh18:
	adrp	x22, _HB_FLAG_FRAMETYPE_REF@GOTPAGE
Lloh19:
	ldr	x22, [x22, _HB_FLAG_FRAMETYPE_REF@GOTPAGEOFF]
	ldr	w9, [x22]
	bic	w8, w8, w9
	str	w8, [x21, #16]
	cmp	w20, #1
	b.lt	LBB0_24
; %bb.13:
	ldr	x21, [sp, #8]
	mov	w20, w20
	add	x23, x19, #8
Lloh20:
	adrp	x25, _NAL_PRIORITY_DISPOSABLE@GOTPAGE
Lloh21:
	ldr	x25, [x25, _NAL_PRIORITY_DISPOSABLE@GOTPAGEOFF]
Lloh22:
	adrp	x26, _HB_FRAME_B@GOTPAGE
Lloh23:
	ldr	x26, [x26, _HB_FRAME_B@GOTPAGEOFF]
Lloh24:
	adrp	x27, _HB_FRAME_BREF@GOTPAGE
Lloh25:
	ldr	x27, [x27, _HB_FRAME_BREF@GOTPAGEOFF]
	b	LBB0_17
LBB0_14:                                ;   in Loop: Header=BB0_17 Depth=1
	ldr	w8, [x22]
	ldr	w9, [x21, #16]
	orr	w8, w9, w8
	str	w8, [x21, #16]
LBB0_15:                                ;   in Loop: Header=BB0_17 Depth=1
	ldr	w8, [x21]
	add	w8, w8, w19
	str	w8, [x21]
LBB0_16:                                ;   in Loop: Header=BB0_17 Depth=1
	add	x23, x23, #24
	subs	x20, x20, #1
	b.eq	LBB0_24
LBB0_17:                                ; =>This Inner Loop Header: Depth=1
	ldur	w19, [x23, #-8]
	ldr	x8, [x21, #48]
	ldrsw	x9, [x21]
	add	x0, x8, x9
	ldr	w1, [x23, #8]
	mov	x2, x19
	bl	_memcpy
	cmp	w19, #1
	b.lt	LBB0_16
; %bb.18:                               ;   in Loop: Header=BB0_17 Depth=1
	ldur	w8, [x23, #-4]
	cmp	w8, #137
	b.eq	LBB0_20
; %bb.19:                               ;   in Loop: Header=BB0_17 Depth=1
	cmp	w8, #133
	b.ne	LBB0_21
LBB0_20:                                ;   in Loop: Header=BB0_17 Depth=1
	ldr	w8, [x24]
	cbz	w8, LBB0_16
LBB0_21:                                ;   in Loop: Header=BB0_17 Depth=1
	ldr	x8, [x23]
	ldr	x9, [x25]
	cmp	x8, x9
	b.eq	LBB0_15
; %bb.22:                               ;   in Loop: Header=BB0_17 Depth=1
	ldr	x8, [x21, #8]
	ldr	x9, [x26]
	cmp	x8, x9
	b.ne	LBB0_14
; %bb.23:                               ;   in Loop: Header=BB0_17 Depth=1
	ldr	x8, [x27]
	str	x8, [x21, #8]
	b	LBB0_14
LBB0_24:
	ldr	x0, [sp, #8]
	ldr	w8, [x0]
	cmp	w8, #0
	b.gt	LBB0_26
; %bb.25:
	add	x0, sp, #8
	bl	_hb_buffer_close
	ldr	x0, [sp, #8]
LBB0_26:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh24, Lloh25
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh20, Lloh21
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_5-LBB0_5)>>2
	.byte	(LBB0_6-LBB0_5)>>2
	.byte	(LBB0_7-LBB0_5)>>2
	.byte	(LBB0_8-LBB0_5)>>2
	.byte	(LBB0_9-LBB0_5)>>2
                                        ; -- End function
	.comm	_AV_NOPTS_VALUE,8,3             ; @AV_NOPTS_VALUE
	.comm	_HB_FRAME_IDR,8,3               ; @HB_FRAME_IDR
	.comm	_HB_FRAME_P,8,3                 ; @HB_FRAME_P
	.comm	_HB_FRAME_B,8,3                 ; @HB_FRAME_B
	.comm	_HB_FRAME_BREF,8,3              ; @HB_FRAME_BREF
	.comm	_HB_FRAME_I,8,3                 ; @HB_FRAME_I
	.comm	_HB_FLAG_FRAMETYPE_KEY,4,2      ; @HB_FLAG_FRAMETYPE_KEY
	.comm	_HB_FLAG_FRAMETYPE_REF,4,2      ; @HB_FLAG_FRAMETYPE_REF
	.comm	_NAL_PRIORITY_DISPOSABLE,8,3    ; @NAL_PRIORITY_DISPOSABLE
	.no_dead_strip	_nal_encode
.subsections_via_symbols
