	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ff_h261_encode_picture_header  ## -- Begin function ff_h261_encode_picture_header
	.p2align	4, 0x90
_ff_h261_encode_picture_header:         ## @ff_h261_encode_picture_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, %r14
	leaq	24(%rdi), %rbx
	movq	%rbx, %rdi
	callq	_avpriv_align_put_bits
	movq	%rbx, %rdi
	callq	_put_bits_ptr
	movl	%eax, 48(%r14)
	movq	%rbx, %rdi
	movl	$20, %esi
	movl	$16, %edx
	callq	_put_bits
	movq	(%r14), %rax
	movq	40(%r14), %rcx
	imulq	(%rcx), %rax
	imulq	$30000, %rax, %rax              ## imm = 0x7530
	imulq	$1001, 8(%rcx), %rcx            ## imm = 0x3E9
	movq	%rax, %rdx
	orq	%rcx, %rdx
	shrq	$32, %rdx
	je	LBB0_1
## %bb.2:
	cqto
	idivq	%rcx
	jmp	LBB0_3
LBB0_1:
                                        ## kill: def $eax killed $eax killed $rax
	xorl	%edx, %edx
	divl	%ecx
                                        ## kill: def $eax killed $eax def $rax
LBB0_3:
	movq	%rbx, %rdi
	movl	$5, %esi
	movl	%eax, %edx
	callq	_put_sbits
	xorl	%r12d, %r12d
	movq	%rbx, %rdi
	movl	$1, %esi
	xorl	%edx, %edx
	callq	_put_bits
	movq	%rbx, %rdi
	movl	$1, %esi
	xorl	%edx, %edx
	callq	_put_bits
	movq	8(%r14), %rax
	movq	_AV_PICTURE_TYPE_I@GOTPCREL(%rip), %rcx
	xorl	%edx, %edx
	cmpq	(%rcx), %rax
	sete	%dl
	movq	%rbx, %rdi
	movl	$1, %esi
	callq	_put_bits
	movl	28(%r14), %esi
	movl	32(%r14), %edi
	callq	_ff_h261_get_picture_format
	movl	%eax, %r15d
	movq	%rbx, %rdi
	movl	$1, %esi
	movl	%eax, %edx
	callq	_put_bits
	movq	%rbx, %rdi
	movl	$1, %esi
	movl	$1, %edx
	callq	_put_bits
	movq	%rbx, %rdi
	movl	$1, %esi
	movl	$1, %edx
	callq	_put_bits
	movq	%rbx, %rdi
	movl	$1, %esi
	xorl	%edx, %edx
	callq	_put_bits
	cmpl	$1, %r15d
	sbbl	%r12d, %r12d
	movl	%r12d, (%r14)
	movq	$0, 16(%r14)
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_AV_PICTURE_TYPE_I,8,3          ## @AV_PICTURE_TYPE_I
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ff_h261_encode_picture_header  ; -- Begin function ff_h261_encode_picture_header
	.p2align	2
_ff_h261_encode_picture_header:         ; @ff_h261_encode_picture_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
	add	x20, x0, #24
	mov	x0, x20
	bl	_avpriv_align_put_bits
	mov	x0, x20
	bl	_put_bits_ptr
	str	w0, [x19, #48]
	mov	x0, x20
	mov	w1, #20
	mov	w2, #16
	bl	_put_bits
	ldr	x8, [x19]
	ldr	x9, [x19, #40]
	ldp	x10, x9, [x9]
	mul	x8, x8, x10
	mov	w10, #30000
	mul	x8, x8, x10
	mov	w10, #1001
	mul	x9, x9, x10
	sdiv	x2, x8, x9
	mov	x0, x20
	mov	w1, #5
                                        ; kill: def $w2 killed $w2 killed $x2
	bl	_put_sbits
	mov	x0, x20
	mov	w1, #1
	mov	w2, #0
	bl	_put_bits
	mov	x0, x20
	mov	w1, #1
	mov	w2, #0
	bl	_put_bits
	ldr	x8, [x19, #8]
Lloh0:
	adrp	x9, _AV_PICTURE_TYPE_I@GOTPAGE
Lloh1:
	ldr	x9, [x9, _AV_PICTURE_TYPE_I@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	cset	w2, eq
	mov	x0, x20
	mov	w1, #1
	bl	_put_bits
	ldp	w1, w0, [x19, #28]
	bl	_ff_h261_get_picture_format
	mov	x21, x0
	mov	x0, x20
	mov	w1, #1
	mov	x2, x21
	bl	_put_bits
	mov	x0, x20
	mov	w1, #1
	mov	w2, #1
	bl	_put_bits
	mov	x0, x20
	mov	w1, #1
	mov	w2, #1
	bl	_put_bits
	mov	x0, x20
	mov	w1, #1
	mov	w2, #0
	bl	_put_bits
	cmp	w21, #0
	csetm	w8, eq
	str	w8, [x19]
	str	xzr, [x19, #16]
	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
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_AV_PICTURE_TYPE_I,8,3          ; @AV_PICTURE_TYPE_I
.subsections_via_symbols
