	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function parse_presentation_segment
_parse_presentation_segment:            ## @parse_presentation_segment
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%ecx, %r13d
	movl	%edx, -60(%rbp)                 ## 4-byte Spill
	movq	%rdi, %r14
	movq	%rsi, -56(%rbp)                 ## 8-byte Spill
	movq	%rsi, -48(%rbp)
	movq	16(%rdi), %r12
	leaq	-48(%rbp), %rbx
	movq	%rbx, %rdi
	callq	_bytestream_get_be16
	movq	%rax, %r15
	movq	%rbx, %rdi
	callq	_bytestream_get_be16
	movq	%rax, %rbx
	movl	%r13d, 24(%r12)
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	movl	%r15d, %edx
	movl	%ebx, %ecx
	callq	_ff_dlog
	movq	%r14, %rdi
	movl	%r15d, %esi
	movl	%ebx, %edx
	callq	_ff_set_dimensions
	testl	%eax, %eax
	js	LBB0_17
## %bb.1:
	addq	$4, -48(%rbp)
	leaq	-48(%rbp), %rbx
	movq	%rbx, %rdi
	callq	_bytestream_get_be16
	movq	%rax, 16(%r12)
	movq	%rbx, %rdi
	callq	_bytestream_get_byte
	cmpl	$64, %eax
	jb	LBB0_3
## %bb.2:
	movq	%r14, %rdi
	callq	_flush_cache
LBB0_3:
	addq	$4, -48(%rbp)
	leaq	-48(%rbp), %rbx
	movq	%rbx, %rdi
	callq	_bytestream_get_byte
	movl	%eax, (%r12)
	movq	%rbx, %rdi
	callq	_bytestream_get_byte
	movl	%eax, 4(%r12)
	movq	_MAX_OBJECT_REFS@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jle	LBB0_6
## %bb.4:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	leaq	L_.str.1(%rip), %rdx
	movq	%r14, %rdi
	movl	%eax, %ecx
	xorl	%eax, %eax
	callq	_av_log
	movl	$2, 4(%r12)
	movq	_AV_EF_EXPLODE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%r14)
	jne	LBB0_5
	jmp	LBB0_7
LBB0_6:
	testl	%eax, %eax
	jle	LBB0_16
LBB0_7:
	movslq	-60(%rbp), %rax                 ## 4-byte Folded Reload
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	leaq	(%rcx,%rax,4), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	leaq	-48(%rbp), %rbx
	xorl	%r15d, %r15d
	xorl	%r13d, %r13d
	jmp	LBB0_8
	.p2align	4, 0x90
LBB0_14:                                ##   in Loop: Header=BB0_8 Depth=1
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rdx
	movl	(%rdx), %esi
	movl	%eax, (%rsp)
	movq	%r14, %rdi
	leaq	L_.str.4(%rip), %rdx
	xorl	%eax, %eax
	callq	_av_log
	movq	8(%r12), %rax
	movq	$0, 8(%rax,%r15)
	movq	_AV_EF_EXPLODE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%r14)
	jne	LBB0_5
LBB0_15:                                ##   in Loop: Header=BB0_8 Depth=1
	incq	%r13
	movslq	4(%r12), %rax
	addq	$56, %r15
	cmpq	%rax, %r13
	jge	LBB0_16
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	subq	-48(%rbp), %rax
	cmpq	$31, %rax
	jle	LBB0_9
## %bb.10:                              ##   in Loop: Header=BB0_8 Depth=1
	movq	%rbx, %rdi
	callq	_bytestream_get_be16
	movq	8(%r12), %rcx
	movq	%rax, 48(%rcx,%r15)
	movq	%rbx, %rdi
	callq	_bytestream_get_byte
	movq	8(%r12), %rcx
	movl	%eax, (%rcx,%r15)
	movq	%rbx, %rdi
	callq	_bytestream_get_byte
	movq	8(%r12), %rcx
	movl	%eax, 4(%rcx,%r15)
	movq	%rbx, %rdi
	callq	_bytestream_get_be16
	movq	8(%r12), %rcx
	movl	%eax, 8(%rcx,%r15)
	movq	%rbx, %rdi
	callq	_bytestream_get_be16
	movq	8(%r12), %rcx
	movl	%eax, 12(%rcx,%r15)
	testb	$-128, 4(%rcx,%r15)
	je	LBB0_12
## %bb.11:                              ##   in Loop: Header=BB0_8 Depth=1
	movq	%rbx, %rdi
	callq	_bytestream_get_be16
	movq	8(%r12), %rcx
	movq	%rax, 40(%rcx,%r15)
	movq	%rbx, %rdi
	callq	_bytestream_get_be16
	movq	8(%r12), %rcx
	movq	%rax, 32(%rcx,%r15)
	movq	%rbx, %rdi
	callq	_bytestream_get_be16
	movq	8(%r12), %rcx
	movq	%rax, 24(%rcx,%r15)
	movq	%rbx, %rdi
	callq	_bytestream_get_be16
	movq	8(%r12), %rcx
	movq	%rax, 16(%rcx,%r15)
	movl	12(%rcx,%r15), %eax
LBB0_12:                                ##   in Loop: Header=BB0_8 Depth=1
	movl	8(%rcx,%r15), %edx
	movq	%r14, %rdi
	leaq	L_.str.3(%rip), %rsi
	movl	%eax, %ecx
	callq	_ff_dlog
	movq	8(%r12), %rax
	movl	8(%rax,%r15), %ecx
	movl	12(%rax,%r15), %r8d
	movl	4(%r14), %r9d
	movl	8(%r14), %eax
	cmpl	%r9d, %ecx
	jg	LBB0_14
## %bb.13:                              ##   in Loop: Header=BB0_8 Depth=1
	cmpl	%eax, %r8d
	jle	LBB0_15
	jmp	LBB0_14
LBB0_16:
	xorl	%eax, %eax
	jmp	LBB0_17
LBB0_9:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.2(%rip), %rdx
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_av_log
	movl	%r13d, 4(%r12)
LBB0_5:
	movq	_AVERROR_INVALIDDATA@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_17:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Video Dimensions %dx%d\n"

	.comm	_MAX_OBJECT_REFS,4,2            ## @MAX_OBJECT_REFS
	.comm	_AV_LOG_ERROR,4,2               ## @AV_LOG_ERROR
L_.str.1:                               ## @.str.1
	.asciz	"Invalid number of presentation objects %d\n"

	.comm	_AV_EF_EXPLODE,4,2              ## @AV_EF_EXPLODE
	.comm	_AVERROR_INVALIDDATA,4,2        ## @AVERROR_INVALIDDATA
L_.str.2:                               ## @.str.2
	.asciz	"Insufficent space for object\n"

L_.str.3:                               ## @.str.3
	.asciz	"Subtitle Placement x=%d, y=%d\n"

L_.str.4:                               ## @.str.4
	.asciz	"Subtitle out of video bounds. x = %d, y = %d, video width = %d, video height = %d.\n"

	.no_dead_strip	_parse_presentation_segment
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function parse_presentation_segment
_parse_presentation_segment:            ; @parse_presentation_segment
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #144
	.cfi_def_cfa_offset 144
	stp	x28, x27, [sp, #48]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #64]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #80]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #96]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #112]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #128]            ; 16-byte Folded Spill
	add	x29, sp, #128
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x22, x3
	mov	x20, x2
	mov	x21, x1
	mov	x19, x0
	str	x1, [sp, #40]
	ldr	x25, [x0, #16]
	add	x0, sp, #40
	bl	_bytestream_get_be16
	mov	x23, x0
	add	x0, sp, #40
	bl	_bytestream_get_be16
	mov	x24, x0
	str	w22, [x25, #24]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	mov	x2, x23
	mov	x3, x24
	bl	_ff_dlog
	mov	x0, x19
	mov	x1, x23
	mov	x2, x24
	bl	_ff_set_dimensions
	tbnz	w0, #31, LBB0_16
; %bb.1:
	ldr	x8, [sp, #40]
	add	x8, x8, #4
	str	x8, [sp, #40]
	add	x0, sp, #40
	bl	_bytestream_get_be16
	str	x0, [x25, #16]
	add	x0, sp, #40
	bl	_bytestream_get_byte
	cmp	w0, #64
	b.lo	LBB0_3
; %bb.2:
	mov	x0, x19
	bl	_flush_cache
LBB0_3:
	ldr	x8, [sp, #40]
	add	x8, x8, #4
	str	x8, [sp, #40]
	add	x0, sp, #40
	bl	_bytestream_get_byte
	str	w0, [x25]
	add	x0, sp, #40
	bl	_bytestream_get_byte
                                        ; kill: def $w0 killed $w0 def $x0
	str	w0, [x25, #4]
Lloh2:
	adrp	x8, _MAX_OBJECT_REFS@GOTPAGE
Lloh3:
	ldr	x8, [x8, _MAX_OBJECT_REFS@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
Lloh5:
	adrp	x22, _AV_LOG_ERROR@GOTPAGE
Lloh6:
	ldr	x22, [x22, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh7:
	adrp	x23, _AV_EF_EXPLODE@GOTPAGE
Lloh8:
	ldr	x23, [x23, _AV_EF_EXPLODE@GOTPAGEOFF]
	cmp	w0, w8
	b.le	LBB0_5
; %bb.4:
	ldr	w1, [x22]
	str	x0, [sp]
Lloh9:
	adrp	x2, l_.str.1@PAGE
Lloh10:
	add	x2, x2, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_av_log
	mov	w8, #2
	str	w8, [x25, #4]
	ldr	w8, [x19]
	ldr	w9, [x23]
	tst	w9, w8
	b.ne	LBB0_15
	b	LBB0_6
LBB0_5:
	cmp	w0, #1
	b.lt	LBB0_13
LBB0_6:
	mov	x24, #0
	add	x26, x21, w20, sxtw #2
	mov	w27, #48
Lloh11:
	adrp	x20, l_.str.3@PAGE
Lloh12:
	add	x20, x20, l_.str.3@PAGEOFF
Lloh13:
	adrp	x21, l_.str.4@PAGE
Lloh14:
	add	x21, x21, l_.str.4@PAGEOFF
	b	LBB0_8
LBB0_7:                                 ;   in Loop: Header=BB0_8 Depth=1
	add	x24, x24, #1
	ldrsw	x8, [x25, #4]
	add	x27, x27, #56
	cmp	x24, x8
	b.ge	LBB0_13
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [sp, #40]
	sub	x8, x26, x8
	cmp	x8, #31
	b.le	LBB0_14
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=1
	add	x0, sp, #40
	bl	_bytestream_get_be16
	ldr	x8, [x25, #8]
	str	x0, [x8, x27]
	add	x0, sp, #40
	bl	_bytestream_get_byte
	ldr	x8, [x25, #8]
	add	x8, x8, x27
	stur	w0, [x8, #-48]
	add	x0, sp, #40
	bl	_bytestream_get_byte
	ldr	x8, [x25, #8]
	add	x8, x8, x27
	stur	w0, [x8, #-44]
	add	x0, sp, #40
	bl	_bytestream_get_be16
	ldr	x8, [x25, #8]
	add	x8, x8, x27
	stur	w0, [x8, #-40]
	add	x0, sp, #40
	bl	_bytestream_get_be16
	mov	x3, x0
	ldr	x8, [x25, #8]
	add	x9, x8, x27
	stur	w3, [x9, #-36]
	ldurb	w9, [x9, #-44]
	tbz	w9, #7, LBB0_11
; %bb.10:                               ;   in Loop: Header=BB0_8 Depth=1
	add	x0, sp, #40
	bl	_bytestream_get_be16
	ldr	x8, [x25, #8]
	add	x8, x8, x27
	stur	x0, [x8, #-8]
	add	x0, sp, #40
	bl	_bytestream_get_be16
	ldr	x8, [x25, #8]
	add	x8, x8, x27
	stur	x0, [x8, #-16]
	add	x0, sp, #40
	bl	_bytestream_get_be16
	ldr	x8, [x25, #8]
	add	x8, x8, x27
	stur	x0, [x8, #-24]
	add	x0, sp, #40
	bl	_bytestream_get_be16
	ldr	x8, [x25, #8]
	add	x9, x8, x27
	stur	x0, [x9, #-32]
	ldur	w3, [x9, #-36]
LBB0_11:                                ;   in Loop: Header=BB0_8 Depth=1
	add	x8, x8, x27
	ldur	w2, [x8, #-40]
	mov	x0, x19
	mov	x1, x20
                                        ; kill: def $w3 killed $w3 killed $x3
	bl	_ff_dlog
	ldr	x8, [x25, #8]
	add	x9, x8, x27
	ldp	w8, w9, [x9, #-40]
	ldp	w10, w11, [x19, #4]
	cmp	w8, w10
	ccmp	w9, w11, #0, le
	b.le	LBB0_7
; %bb.12:                               ;   in Loop: Header=BB0_8 Depth=1
	ldr	w1, [x22]
	stp	x10, x11, [sp, #16]
	stp	x8, x9, [sp]
	mov	x0, x19
	mov	x2, x21
	bl	_av_log
	ldr	x8, [x25, #8]
	add	x8, x8, x27
	stur	xzr, [x8, #-40]
	ldr	w8, [x19]
	ldr	w9, [x23]
	tst	w9, w8
	b.eq	LBB0_7
	b	LBB0_15
LBB0_13:
	mov	w0, #0
	b	LBB0_16
LBB0_14:
	ldr	w1, [x22]
Lloh15:
	adrp	x2, l_.str.2@PAGE
Lloh16:
	add	x2, x2, l_.str.2@PAGEOFF
	mov	x0, x19
	bl	_av_log
	str	w24, [x25, #4]
LBB0_15:
Lloh17:
	adrp	x8, _AVERROR_INVALIDDATA@GOTPAGE
Lloh18:
	ldr	x8, [x8, _AVERROR_INVALIDDATA@GOTPAGEOFF]
Lloh19:
	ldr	w0, [x8]
LBB0_16:
	ldp	x29, x30, [sp, #128]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #112]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #96]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #80]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #64]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #144
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Video Dimensions %dx%d\n"

	.comm	_MAX_OBJECT_REFS,4,2            ; @MAX_OBJECT_REFS
	.comm	_AV_LOG_ERROR,4,2               ; @AV_LOG_ERROR
l_.str.1:                               ; @.str.1
	.asciz	"Invalid number of presentation objects %d\n"

	.comm	_AV_EF_EXPLODE,4,2              ; @AV_EF_EXPLODE
	.comm	_AVERROR_INVALIDDATA,4,2        ; @AVERROR_INVALIDDATA
l_.str.2:                               ; @.str.2
	.asciz	"Insufficent space for object\n"

l_.str.3:                               ; @.str.3
	.asciz	"Subtitle Placement x=%d, y=%d\n"

l_.str.4:                               ; @.str.4
	.asciz	"Subtitle out of video bounds. x = %d, y = %d, video width = %d, video height = %d.\n"

	.no_dead_strip	_parse_presentation_segment
.subsections_via_symbols
