	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function encode_headers
_encode_headers:                        ## @encode_headers
	.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	%rsi, %r15
	movq	%rdi, %r14
	movq	24(%rdi), %rsi
	movq	32(%rdi), %rbx
	movq	(%rbx), %rdi
	callq	_AV_WB32
	movq	(%rbx), %rdi
	addq	$16, %rdi
	movq	16(%r14), %rsi
	callq	_AV_WB32
	movl	8(%rbx), %eax
	movq	(%rbx), %rcx
	movl	%eax, 32(%rcx)
	movl	12(%rbx), %eax
	movl	%eax, 36(%rcx)
	movq	$0, 40(%rcx)
	movl	16(%rbx), %eax
	movl	%eax, 48(%rcx)
	leaq	20(%rbx), %r12
	movl	$73, %edi
	movl	$72, %esi
	movl	$68, %edx
	movl	$82, %ecx
	callq	_MKTAG
	movq	(%rbx), %rdx
	movq	%r12, -48(%rbp)                 ## 8-byte Spill
	movq	%r12, %rdi
	movl	%eax, %esi
	movl	$13, %ecx
	callq	_png_write_chunk
	movq	(%rbx), %rdi
	movq	24(%rbx), %rsi
	testq	%rsi, %rsi
	je	LBB0_2
## %bb.1:
	leaq	24(%rbx), %r13
	callq	_AV_WB32
	movl	$1, %r12d
	jmp	LBB0_3
LBB0_2:
	movq	8(%r14), %rsi
	callq	_AV_WB32
	xorl	%r12d, %r12d
	movq	%r14, %r13
LBB0_3:
	movq	(%rbx), %rdi
	addq	$16, %rdi
	movq	(%r13), %rsi
	callq	_AV_WB32
	movq	(%rbx), %rax
	movl	%r12d, 32(%rax)
	movl	$112, %edi
	movl	$72, %esi
	movl	$89, %edx
	movl	$115, %ecx
	callq	_MKTAG
	movq	(%rbx), %rdx
	movq	-48(%rbp), %r12                 ## 8-byte Reload
	movq	%r12, %rdi
	movl	%eax, %esi
	movl	$9, %ecx
	callq	_png_write_chunk
	movq	_AV_FRAME_DATA_STEREO3D@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_av_frame_get_side_data
	testq	%rax, %rax
	je	LBB0_8
## %bb.4:
	movq	(%rax), %rax
	movl	(%rax), %ecx
	cmpl	$129, %ecx
	je	LBB0_8
## %bb.5:
	cmpl	$128, %ecx
	jne	LBB0_7
## %bb.6:
	movq	_AV_STEREO3D_FLAG_INVERT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	xorl	%edx, %edx
	andl	4(%rax), %ecx
	sete	%dl
	movq	(%rbx), %rax
	movl	%edx, (%rax)
	movl	$115, %edi
	movl	$84, %esi
	movl	$69, %edx
	movl	$82, %ecx
	callq	_MKTAG
	movq	(%rbx), %rdx
	movq	%r12, %rdi
	movl	%eax, %esi
	movl	$1, %ecx
	callq	_png_write_chunk
	jmp	LBB0_8
LBB0_7:
	movq	_AV_LOG_WARNING@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
	movq	%r14, %rdi
	callq	_av_log
LBB0_8:
	movq	(%r15), %rdi
	movq	_AVCOL_PRI_BT709@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rdi
	jne	LBB0_11
## %bb.9:
	movq	8(%r15), %rax
	movq	_AVCOL_TRC_IEC61966_2_1@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_11
## %bb.10:
	movq	(%rbx), %rax
	movl	$1, (%rax)
	movl	$115, %edi
	movl	$82, %esi
	movl	$71, %edx
	movl	$66, %ecx
	callq	_MKTAG
	movq	(%rbx), %rdx
	movq	%r12, %rdi
	movl	%eax, %esi
	movl	$1, %ecx
	callq	_png_write_chunk
	movq	(%r15), %rdi
LBB0_11:
	movq	(%rbx), %rsi
	callq	_png_get_chrm
	testq	%rax, %rax
	je	LBB0_13
## %bb.12:
	movl	$99, %edi
	movl	$72, %esi
	movl	$82, %edx
	movl	$77, %ecx
	callq	_MKTAG
	movq	(%rbx), %rdx
	movq	%r12, %rdi
	movl	%eax, %esi
	movl	$32, %ecx
	callq	_png_write_chunk
LBB0_13:
	movq	8(%r15), %rdi
	movq	(%rbx), %rsi
	callq	_png_get_gama
	testq	%rax, %rax
	je	LBB0_15
## %bb.14:
	movl	$103, %edi
	movl	$65, %esi
	movl	$77, %edx
	movl	$65, %ecx
	callq	_MKTAG
	movq	(%rbx), %rdx
	movq	%r12, %rdi
	movl	%eax, %esi
	movl	$4, %ecx
	callq	_png_write_chunk
LBB0_15:
	movslq	12(%rbx), %rax
	movq	_PNG_COLOR_TYPE_PALETTE@GOTPCREL(%rip), %rcx
	cmpq	%rax, (%rcx)
	jne	LBB0_20
## %bb.16:
	movq	16(%r15), %rax
	movq	8(%rax), %r13
	movq	(%rbx), %rax
	movq	%rax, -64(%rbp)
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	movq	(%rbx), %r14
	xorl	%r12d, %r12d
	leaq	-64(%rbp), %r15
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_17:                                ## =>This Inner Loop Header: Depth=1
	movl	(%r13,%r12,4), %esi
	movl	%esi, %eax
	shrl	$24, %eax
	cmpl	$255, %eax
	movl	$1, %ecx
	cmovnel	%ecx, %ebx
	movl	%eax, 3072(%r14,%r12,4)
	movq	%r15, %rdi
	callq	_bytestream_put_be24
	incq	%r12
	cmpq	$256, %r12                      ## imm = 0x100
	jne	LBB0_17
## %bb.18:
	movl	$80, %edi
	movl	$76, %esi
	movl	$84, %edx
	movl	$69, %ecx
	callq	_MKTAG
	movq	-56(%rbp), %r14                 ## 8-byte Reload
	movq	(%r14), %rdx
	movq	-48(%rbp), %r15                 ## 8-byte Reload
	movq	%r15, %rdi
	movl	%eax, %esi
	movl	$768, %ecx                      ## imm = 0x300
	callq	_png_write_chunk
	testl	%ebx, %ebx
	je	LBB0_20
## %bb.19:
	movl	$116, %edi
	movl	$82, %esi
	movl	$78, %edx
	movl	$83, %ecx
	callq	_MKTAG
	movl	$3072, %edx                     ## imm = 0xC00
	addq	(%r14), %rdx
	movq	%r15, %rdi
	movl	%eax, %esi
	movl	$256, %ecx                      ## imm = 0x100
	callq	_png_write_chunk
LBB0_20:
	xorl	%eax, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_AV_FRAME_DATA_STEREO3D,4,2     ## @AV_FRAME_DATA_STEREO3D
	.comm	_AV_STEREO3D_FLAG_INVERT,4,2    ## @AV_STEREO3D_FLAG_INVERT
	.comm	_AV_LOG_WARNING,4,2             ## @AV_LOG_WARNING
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Only side-by-side stereo3d flag can be defined within sTER chunk\n"

	.comm	_AVCOL_PRI_BT709,8,3            ## @AVCOL_PRI_BT709
	.comm	_AVCOL_TRC_IEC61966_2_1,8,3     ## @AVCOL_TRC_IEC61966_2_1
	.comm	_PNG_COLOR_TYPE_PALETTE,8,3     ## @PNG_COLOR_TYPE_PALETTE
	.no_dead_strip	_encode_headers
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function encode_headers
_encode_headers:                        ; @encode_headers
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x20, x1
	mov	x21, x0
	ldp	x1, x22, [x0, #24]
	ldr	x0, [x22]
	bl	_AV_WB32
	ldr	x8, [x22]
	add	x0, x8, #16
	ldr	x1, [x21, #16]
	bl	_AV_WB32
	ldr	w8, [x22, #8]
	ldr	x9, [x22]
	str	w8, [x9, #32]
	ldr	w8, [x22, #12]
	str	w8, [x9, #36]
	str	xzr, [x9, #40]
	ldr	w8, [x22, #16]
	str	w8, [x9, #48]
	add	x19, x22, #20
	mov	w0, #73
	mov	w1, #72
	mov	w2, #68
	mov	w3, #82
	bl	_MKTAG
	mov	x1, x0
	ldr	x2, [x22]
	mov	x0, x19
	mov	w3, #13
	bl	_png_write_chunk
	mov	x23, x22
	ldr	x1, [x23, #24]!
	ldr	x0, [x22]
	cbz	x1, LBB0_2
; %bb.1:
	bl	_AV_WB32
	mov	w24, #1
	b	LBB0_3
LBB0_2:
	ldr	x1, [x21, #8]
	bl	_AV_WB32
	mov	w24, #0
	mov	x23, x21
LBB0_3:
	ldr	x8, [x22]
	add	x0, x8, #16
	ldr	x1, [x23]
	bl	_AV_WB32
	ldr	x8, [x22]
	str	w24, [x8, #32]
	mov	w0, #112
	mov	w1, #72
	mov	w2, #89
	mov	w3, #115
	bl	_MKTAG
	mov	x1, x0
	ldr	x2, [x22]
	mov	x0, x19
	mov	w3, #9
	bl	_png_write_chunk
Lloh0:
	adrp	x8, _AV_FRAME_DATA_STEREO3D@GOTPAGE
Lloh1:
	ldr	x8, [x8, _AV_FRAME_DATA_STEREO3D@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_av_frame_get_side_data
	cbz	x0, LBB0_8
; %bb.4:
	ldr	x8, [x0]
	ldr	w9, [x8]
	cmp	w9, #129
	b.eq	LBB0_8
; %bb.5:
	cmp	w9, #128
	b.ne	LBB0_7
; %bb.6:
Lloh3:
	adrp	x9, _AV_STEREO3D_FLAG_INVERT@GOTPAGE
Lloh4:
	ldr	x9, [x9, _AV_STEREO3D_FLAG_INVERT@GOTPAGEOFF]
	ldr	w8, [x8, #4]
Lloh5:
	ldr	w9, [x9]
	tst	w9, w8
	cset	w8, eq
	ldr	x9, [x22]
	str	w8, [x9]
	mov	w0, #115
	mov	w1, #84
	mov	w2, #69
	mov	w3, #82
	bl	_MKTAG
	mov	x1, x0
	ldr	x2, [x22]
	mov	x0, x19
	mov	w3, #1
	bl	_png_write_chunk
	b	LBB0_8
LBB0_7:
Lloh6:
	adrp	x8, _AV_LOG_WARNING@GOTPAGE
Lloh7:
	ldr	x8, [x8, _AV_LOG_WARNING@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
Lloh9:
	adrp	x2, l_.str@PAGE
Lloh10:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x21
	bl	_av_log
LBB0_8:
	ldr	x0, [x20]
Lloh11:
	adrp	x8, _AVCOL_PRI_BT709@GOTPAGE
Lloh12:
	ldr	x8, [x8, _AVCOL_PRI_BT709@GOTPAGEOFF]
Lloh13:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_11
; %bb.9:
	ldr	x8, [x20, #8]
Lloh14:
	adrp	x9, _AVCOL_TRC_IEC61966_2_1@GOTPAGE
Lloh15:
	ldr	x9, [x9, _AVCOL_TRC_IEC61966_2_1@GOTPAGEOFF]
Lloh16:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_11
; %bb.10:
	ldr	x8, [x22]
	mov	w9, #1
	str	w9, [x8]
	mov	w0, #115
	mov	w1, #82
	mov	w2, #71
	mov	w3, #66
	bl	_MKTAG
	mov	x1, x0
	ldr	x2, [x22]
	mov	x0, x19
	mov	w3, #1
	bl	_png_write_chunk
	ldr	x0, [x20]
LBB0_11:
	ldr	x1, [x22]
	bl	_png_get_chrm
	cbz	x0, LBB0_13
; %bb.12:
	mov	w0, #99
	mov	w1, #72
	mov	w2, #82
	mov	w3, #77
	bl	_MKTAG
	mov	x1, x0
	ldr	x2, [x22]
	mov	x0, x19
	mov	w3, #32
	bl	_png_write_chunk
LBB0_13:
	ldr	x0, [x20, #8]
	ldr	x1, [x22]
	bl	_png_get_gama
	cbz	x0, LBB0_15
; %bb.14:
	mov	w0, #103
	mov	w1, #65
	mov	w2, #77
	mov	w3, #65
	bl	_MKTAG
	mov	x1, x0
	ldr	x2, [x22]
	mov	x0, x19
	mov	w3, #4
	bl	_png_write_chunk
LBB0_15:
	ldrsw	x8, [x22, #12]
Lloh17:
	adrp	x9, _PNG_COLOR_TYPE_PALETTE@GOTPAGE
Lloh18:
	ldr	x9, [x9, _PNG_COLOR_TYPE_PALETTE@GOTPAGEOFF]
Lloh19:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_20
; %bb.16:
	mov	x23, #0
	mov	w21, #0
	ldr	x8, [x20, #16]
	ldr	x20, [x8, #8]
	ldr	x8, [x22]
	str	x8, [sp, #8]
	ldr	x8, [x22]
	add	x24, x8, #3072
LBB0_17:                                ; =>This Inner Loop Header: Depth=1
	ldr	w1, [x20, x23]
	lsr	w8, w1, #24
	cmp	w8, #255
	csinc	w21, w21, wzr, eq
	str	w8, [x24, x23]
	add	x0, sp, #8
	bl	_bytestream_put_be24
	add	x23, x23, #4
	cmp	x23, #1024
	b.ne	LBB0_17
; %bb.18:
	mov	w0, #80
	mov	w1, #76
	mov	w2, #84
	mov	w3, #69
	bl	_MKTAG
	mov	x1, x0
	ldr	x2, [x22]
	mov	x0, x19
	mov	w3, #768
	bl	_png_write_chunk
	cbz	w21, LBB0_20
; %bb.19:
	mov	w0, #116
	mov	w1, #82
	mov	w2, #78
	mov	w3, #83
	bl	_MKTAG
	mov	x1, x0
	ldr	x8, [x22]
	add	x2, x8, #3072
	mov	x0, x19
	mov	w3, #256
	bl	_png_write_chunk
LBB0_20:
	mov	w0, #0
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_AV_FRAME_DATA_STEREO3D,4,2     ; @AV_FRAME_DATA_STEREO3D
	.comm	_AV_STEREO3D_FLAG_INVERT,4,2    ; @AV_STEREO3D_FLAG_INVERT
	.comm	_AV_LOG_WARNING,4,2             ; @AV_LOG_WARNING
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Only side-by-side stereo3d flag can be defined within sTER chunk\n"

	.comm	_AVCOL_PRI_BT709,8,3            ; @AVCOL_PRI_BT709
	.comm	_AVCOL_TRC_IEC61966_2_1,8,3     ; @AVCOL_TRC_IEC61966_2_1
	.comm	_PNG_COLOR_TYPE_PALETTE,8,3     ; @PNG_COLOR_TYPE_PALETTE
	.no_dead_strip	_encode_headers
.subsections_via_symbols
