	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function write_slice_end
_write_slice_end:                       ## @write_slice_end
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %r14
	movq	_CONFIG_MPEG4_ENCODER@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_5
## %bb.1:
	movq	(%r14), %rax
	movq	_AV_CODEC_ID_MPEG4@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_5
## %bb.2:
	cmpq	$0, 24(%r14)
	je	LBB0_4
## %bb.3:
	movq	%r14, %rdi
	callq	_ff_mpeg4_merge_partitions
LBB0_4:
	leaq	40(%r14), %rdi
	callq	_ff_mpeg4_stuffing
	jmp	LBB0_8
LBB0_5:
	movq	_CONFIG_MJPEG_ENCODER@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_8
## %bb.6:
	movq	8(%r14), %rax
	movq	_FMT_MJPEG@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_8
## %bb.7:
	movq	%r14, %rdi
	callq	_ff_mjpeg_encode_stuffing
LBB0_8:
	leaq	40(%r14), %rbx
	movq	%rbx, %rdi
	callq	_avpriv_align_put_bits
	movq	%rbx, %rdi
	callq	_flush_put_bits
	movq	32(%r14), %rax
	movq	_AV_CODEC_FLAG_PASS1@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, (%rax)
	je	LBB0_11
## %bb.9:
	cmpq	$0, 24(%r14)
	jne	LBB0_11
## %bb.10:
	movq	%r14, %rdi
	callq	_get_bits_diff
	addl	%eax, 16(%r14)
LBB0_11:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_CONFIG_MPEG4_ENCODER,8,3       ## @CONFIG_MPEG4_ENCODER
	.comm	_AV_CODEC_ID_MPEG4,8,3          ## @AV_CODEC_ID_MPEG4
	.comm	_CONFIG_MJPEG_ENCODER,8,3       ## @CONFIG_MJPEG_ENCODER
	.comm	_FMT_MJPEG,8,3                  ## @FMT_MJPEG
	.comm	_AV_CODEC_FLAG_PASS1,4,2        ## @AV_CODEC_FLAG_PASS1
	.no_dead_strip	_write_slice_end
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function write_slice_end
_write_slice_end:                       ; @write_slice_end
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
Lloh0:
	adrp	x8, _CONFIG_MPEG4_ENCODER@GOTPAGE
Lloh1:
	ldr	x8, [x8, _CONFIG_MPEG4_ENCODER@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cbz	x8, LBB0_5
; %bb.1:
	ldr	x8, [x19]
Lloh3:
	adrp	x9, _AV_CODEC_ID_MPEG4@GOTPAGE
Lloh4:
	ldr	x9, [x9, _AV_CODEC_ID_MPEG4@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_5
; %bb.2:
	ldr	x8, [x19, #24]
	cbz	x8, LBB0_4
; %bb.3:
	mov	x0, x19
	bl	_ff_mpeg4_merge_partitions
LBB0_4:
	add	x0, x19, #40
	bl	_ff_mpeg4_stuffing
	b	LBB0_8
LBB0_5:
Lloh6:
	adrp	x8, _CONFIG_MJPEG_ENCODER@GOTPAGE
Lloh7:
	ldr	x8, [x8, _CONFIG_MJPEG_ENCODER@GOTPAGEOFF]
Lloh8:
	ldr	x8, [x8]
	cbz	x8, LBB0_8
; %bb.6:
	ldr	x8, [x19, #8]
Lloh9:
	adrp	x9, _FMT_MJPEG@GOTPAGE
Lloh10:
	ldr	x9, [x9, _FMT_MJPEG@GOTPAGEOFF]
Lloh11:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_8
; %bb.7:
	mov	x0, x19
	bl	_ff_mjpeg_encode_stuffing
LBB0_8:
	add	x20, x19, #40
	mov	x0, x20
	bl	_avpriv_align_put_bits
	mov	x0, x20
	bl	_flush_put_bits
	ldr	x8, [x19, #32]
	ldr	w8, [x8]
Lloh12:
	adrp	x9, _AV_CODEC_FLAG_PASS1@GOTPAGE
Lloh13:
	ldr	x9, [x9, _AV_CODEC_FLAG_PASS1@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_11
; %bb.9:
	ldr	x8, [x19, #24]
	cbnz	x8, LBB0_11
; %bb.10:
	mov	x0, x19
	bl	_get_bits_diff
	ldr	w8, [x19, #16]
	add	w8, w8, w0
	str	w8, [x19, #16]
LBB0_11:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_CONFIG_MPEG4_ENCODER,8,3       ; @CONFIG_MPEG4_ENCODER
	.comm	_AV_CODEC_ID_MPEG4,8,3          ; @AV_CODEC_ID_MPEG4
	.comm	_CONFIG_MJPEG_ENCODER,8,3       ; @CONFIG_MJPEG_ENCODER
	.comm	_FMT_MJPEG,8,3                  ; @FMT_MJPEG
	.comm	_AV_CODEC_FLAG_PASS1,4,2        ; @AV_CODEC_FLAG_PASS1
	.no_dead_strip	_write_slice_end
.subsections_via_symbols
