	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function gxf_write_mpeg_auxiliary
_gxf_write_mpeg_auxiliary:              ## @gxf_write_mpeg_auxiliary
	.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
	subq	$1040, %rsp                     ## imm = 0x410
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -40(%rbp)
	movq	8(%rsi), %rbx
	movl	(%rbx), %ecx
	testl	%ecx, %ecx
	je	LBB0_8
## %bb.1:
	movl	8(%rbx), %edi
	movl	%edi, %eax
	cltd
	idivl	%ecx
	movl	%eax, %ecx
	cmpl	$1, %edx
	sbbl	$-1, %ecx
	movl	%ecx, 4(%rbx)
	testl	%edi, %edi
	je	LBB0_4
## %bb.2:
	movl	16(%rbx), %eax
	cltd
	idivl	%edi
	movl	%eax, 12(%rbx)
	testl	%edx, %edx
	je	LBB0_4
## %bb.3:
	incl	%eax
	movl	%eax, 12(%rbx)
LBB0_4:
	cmpl	$10, %ecx
	jl	LBB0_6
## %bb.5:
	movl	$9, 4(%rbx)
LBB0_6:
	cmpl	$10, 12(%rbx)
	jl	LBB0_8
## %bb.7:
	movl	$9, 12(%rbx)
LBB0_8:
	movq	(%rsi), %rdx
	movl	(%rdx), %eax
	movl	$7, %r10d
	cmpl	$608, %eax                      ## imm = 0x260
	je	LBB0_13
## %bb.9:
	cmpl	$512, %eax                      ## imm = 0x200
	je	LBB0_13
## %bb.10:
	cmpl	$480, %eax                      ## imm = 0x1E0
	jne	LBB0_12
## %bb.11:
	movl	$20, %r10d
	jmp	LBB0_13
LBB0_12:
	movl	$23, %r10d
LBB0_13:
	cvtsi2ssq	16(%rdx), %xmm0
	movl	4(%rbx), %ecx
	movq	8(%rdx), %rdx
	movq	_AV_PIX_FMT_YUV422P@GOTPCREL(%rip), %rsi
	xorl	%r9d, %r9d
	cmpq	(%rsi), %rdx
	sete	%r9b
	incl	%r9d
	xorl	%r11d, %r11d
	cmpl	$1, 20(%rbx)
	movl	12(%rbx), %r8d
	sete	%r11b
	leal	15(%rax), %edx
	addl	$30, %eax
	testl	%edx, %edx
	cmovnsl	%edx, %eax
	sarl	$4, %eax
	subq	$8, %rsp
	leaq	L_.str(%rip), %rdx
	leaq	-1072(%rbp), %r14
	movq	%r14, %rdi
	movl	$1024, %esi                     ## imm = 0x400
	pushq	%rax
	pushq	%r10
	pushq	%r11
	callq	_snprintf
	addq	$32, %rsp
	movl	%eax, %ebx
	xorl	%edi, %edi
	cmpl	$1024, %eax                     ## imm = 0x400
	setb	%dil
	callq	_av_assert0
	movq	_TRACK_MPG_AUX@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_avio_w8
	leal	1(%rbx), %r12d
	movq	%r15, %rdi
	movl	%r12d, %esi
	callq	_avio_w8
	movq	%r15, %rdi
	movq	%r14, %rsi
	movl	%r12d, %edx
	callq	_avio_write
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-40(%rbp), %rax
	jne	LBB0_15
## %bb.14:
	addl	$3, %ebx
	movl	%ebx, %eax
	addq	$1040, %rsp                     ## imm = 0x410
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_15:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Ver 1\nBr %.6f\nIpg 1\nPpi %d\nBpiop %d\nPix 0\nCf %d\nCg %d\nSl %d\nnl16 %d\nVi 1\nf1 1\n"

	.comm	_AV_PIX_FMT_YUV422P,8,3         ## @AV_PIX_FMT_YUV422P
	.comm	_TRACK_MPG_AUX,4,2              ## @TRACK_MPG_AUX
	.no_dead_strip	_gxf_write_mpeg_auxiliary
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function gxf_write_mpeg_auxiliary
_gxf_write_mpeg_auxiliary:              ; @gxf_write_mpeg_auxiliary
	.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
	sub	sp, sp, #1040
	mov	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-40]
	ldr	x8, [x1, #8]
	ldr	w9, [x8]
	cbz	w9, LBB0_8
; %bb.1:
	ldr	w10, [x8, #8]
	sdiv	w11, w10, w9
	msub	w9, w11, w9, w10
	cmp	w9, #0
	cinc	w9, w11, ne
	str	w9, [x8, #4]
	cbz	w10, LBB0_4
; %bb.2:
	ldr	w12, [x8, #16]
	sdiv	w11, w12, w10
	str	w11, [x8, #12]
	msub	w10, w11, w10, w12
	cbz	w10, LBB0_4
; %bb.3:
	add	w10, w11, #1
	str	w10, [x8, #12]
LBB0_4:
	cmp	w9, #10
	b.lt	LBB0_6
; %bb.5:
	mov	w9, #9
	str	w9, [x8, #4]
LBB0_6:
	ldr	w9, [x8, #12]
	cmp	w9, #10
	b.lt	LBB0_8
; %bb.7:
	mov	w9, #9
	str	w9, [x8, #12]
LBB0_8:
	ldr	x9, [x1]
	ldr	w10, [x9]
	mov	w11, #7
	mov	w12, #23
	mov	w13, #20
	cmp	w10, #480
	csel	w12, w12, w13, ne
	cmp	w10, #512
	csel	w12, w11, w12, eq
	cmp	w10, #608
	csel	w7, w11, w12, eq
	ldp	x9, x11, [x9, #8]
	scvtf	s0, x11
	ldr	w3, [x8, #4]
	ldr	w4, [x8, #12]
Lloh3:
	adrp	x11, _AV_PIX_FMT_YUV422P@GOTPAGE
Lloh4:
	ldr	x11, [x11, _AV_PIX_FMT_YUV422P@GOTPAGEOFF]
Lloh5:
	ldr	x11, [x11]
	cmp	x9, x11
	mov	w9, #1
	cinc	w5, w9, eq
	ldr	w8, [x8, #20]
	cmp	w8, #1
	cset	w6, eq
	add	w8, w10, #15
	add	w9, w10, #30
	cmp	w8, #0
	csel	w8, w9, w8, lt
	asr	w8, w8, #4
	str	w8, [sp]
Lloh6:
	adrp	x2, l_.str@PAGE
Lloh7:
	add	x2, x2, l_.str@PAGEOFF
	add	x0, sp, #8
	mov	w1, #1024
	bl	_snprintf
	mov	x20, x0
	cmp	w0, #1024
	cset	w0, lo
	bl	_av_assert0
Lloh8:
	adrp	x8, _TRACK_MPG_AUX@GOTPAGE
Lloh9:
	ldr	x8, [x8, _TRACK_MPG_AUX@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_avio_w8
	add	w21, w20, #1
	mov	x0, x19
	mov	x1, x21
	bl	_avio_w8
	add	x1, sp, #8
	mov	x0, x19
	mov	x2, x21
	bl	_avio_write
	ldur	x8, [x29, #-40]
Lloh11:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh12:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh13:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_10
; %bb.9:
	add	w0, w20, #3
	add	sp, sp, #1040
	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
LBB0_10:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Ver 1\nBr %.6f\nIpg 1\nPpi %d\nBpiop %d\nPix 0\nCf %d\nCg %d\nSl %d\nnl16 %d\nVi 1\nf1 1\n"

	.comm	_AV_PIX_FMT_YUV422P,8,3         ; @AV_PIX_FMT_YUV422P
	.comm	_TRACK_MPG_AUX,4,2              ; @TRACK_MPG_AUX
	.no_dead_strip	_gxf_write_mpeg_auxiliary
.subsections_via_symbols
