	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mpeg4_encode_gop_header
_mpeg4_encode_gop_header:               ## @mpeg4_encode_gop_header
	.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
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	movl	$16, %esi
	xorl	%edx, %edx
	callq	_put_bits
	movq	_GOP_STARTCODE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rdi
	movl	$16, %esi
	callq	_put_bits
	movq	24(%r15), %rax
	movq	32(%r15), %rcx
	movq	(%rcx), %rcx
	movl	(%rcx), %ebx
	movq	8(%rax), %rax
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	(%rax), %rax
	movl	(%rax), %esi
	movl	%ebx, %edi
	callq	_FFMIN
	movl	%eax, %ebx
LBB0_2:
	movq	8(%r15), %rax
	imull	4(%rax), %ebx
	movl	8(%rax), %esi
	movl	%ebx, %edi
	callq	_FFUDIV
	movq	%rax, 16(%r15)
	movq	8(%r15), %rax
	movl	8(%rax), %esi
	movl	%ebx, %edi
	callq	_FFUDIV
	movq	%rax, %rbx
	movl	%ebx, %edi
	movl	$60, %esi
	callq	_FFUDIV
	movq	%rax, %r12
	movl	%ebx, %edi
	movl	$60, %esi
	callq	_FFUMOD
	movl	%eax, %r14d
	movl	%r12d, %edi
	movl	$60, %esi
	callq	_FFUDIV
	movq	%rax, %rbx
	movl	%r12d, %edi
	movl	$60, %esi
	callq	_FFUMOD
	movl	%eax, %r12d
	movl	%ebx, %edi
	movl	$24, %esi
	callq	_FFUMOD
	movq	%r15, %rdi
	movl	$5, %esi
	movl	%eax, %edx
	callq	_put_bits
	movq	%r15, %rdi
	movl	$6, %esi
	movl	%r12d, %edx
	callq	_put_bits
	movq	%r15, %rdi
	movl	$1, %esi
	movl	$1, %edx
	callq	_put_bits
	movq	%r15, %rdi
	movl	$6, %esi
	movl	%r14d, %edx
	callq	_put_bits
	movq	8(%r15), %rax
	movq	_AV_CODEC_FLAG_CLOSED_GOP@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	xorl	%edx, %edx
	andl	(%rax), %ecx
	setne	%dl
	movq	%r15, %rdi
	movl	$1, %esi
	callq	_put_bits
	movq	%r15, %rdi
	movl	$1, %esi
	xorl	%edx, %edx
	callq	_put_bits
	movq	%r15, %rdi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ff_mpeg4_stuffing              ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_GOP_STARTCODE,4,2              ## @GOP_STARTCODE
	.comm	_AV_CODEC_FLAG_CLOSED_GOP,4,2   ## @AV_CODEC_FLAG_CLOSED_GOP
	.no_dead_strip	_mpeg4_encode_gop_header
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mpeg4_encode_gop_header
_mpeg4_encode_gop_header:               ; @mpeg4_encode_gop_header
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x19, x0
	mov	w1, #16
	mov	w2, #0
	bl	_put_bits
Lloh0:
	adrp	x8, _GOP_STARTCODE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GOP_STARTCODE@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
	mov	x0, x19
	mov	w1, #16
	bl	_put_bits
	ldp	x9, x8, [x19, #24]
	ldr	x8, [x8]
	ldr	w0, [x8]
	ldr	x8, [x9, #8]
	cbz	x8, LBB0_2
; %bb.1:
	ldr	x8, [x8]
	ldr	w1, [x8]
	bl	_FFMIN
LBB0_2:
	ldr	x8, [x19, #8]
	ldp	w9, w1, [x8, #4]
	mul	w20, w9, w0
	mov	x0, x20
	bl	_FFUDIV
	str	x0, [x19, #16]
	ldr	x8, [x19, #8]
	ldr	w1, [x8, #8]
	mov	x0, x20
	bl	_FFUDIV
	mov	x20, x0
	mov	w1, #60
	bl	_FFUDIV
	mov	x21, x0
	mov	x0, x20
	mov	w1, #60
	bl	_FFUMOD
	mov	x20, x0
	mov	x0, x21
	mov	w1, #60
	bl	_FFUDIV
	mov	x22, x0
	mov	x0, x21
	mov	w1, #60
	bl	_FFUMOD
	mov	x21, x0
	mov	x0, x22
	mov	w1, #24
	bl	_FFUMOD
	mov	x2, x0
	mov	x0, x19
	mov	w1, #5
	bl	_put_bits
	mov	x0, x19
	mov	w1, #6
	mov	x2, x21
	bl	_put_bits
	mov	x0, x19
	mov	w1, #1
	mov	w2, #1
	bl	_put_bits
	mov	x0, x19
	mov	w1, #6
	mov	x2, x20
	bl	_put_bits
	ldr	x8, [x19, #8]
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _AV_CODEC_FLAG_CLOSED_GOP@GOTPAGE
Lloh4:
	ldr	x9, [x9, _AV_CODEC_FLAG_CLOSED_GOP@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	tst	w9, w8
	cset	w2, ne
	mov	x0, x19
	mov	w1, #1
	bl	_put_bits
	mov	x0, x19
	mov	w1, #1
	mov	w2, #0
	bl	_put_bits
	mov	x0, x19
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_ff_mpeg4_stuffing
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_GOP_STARTCODE,4,2              ; @GOP_STARTCODE
	.comm	_AV_CODEC_FLAG_CLOSED_GOP,4,2   ; @AV_CODEC_FLAG_CLOSED_GOP
	.no_dead_strip	_mpeg4_encode_gop_header
.subsections_via_symbols
