	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function parse_object_segment
_parse_object_segment:                  ## @parse_object_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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, -48(%rbp)
	cmpl	$4, %edx
	jg	LBB0_2
LBB0_1:
	movq	_AVERROR_INVALIDDATA@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_22:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_2:
	movl	%edx, %r13d
	movq	%rdi, %r14
	movq	8(%rdi), %rbx
	leaq	-48(%rbp), %rdi
	callq	_bytestream_get_be16
	movq	%rax, %r12
	movl	%r12d, %edi
	movq	%rbx, %rsi
	callq	_find_object
	movq	%rax, %r15
	testq	%rax, %rax
	jne	LBB0_6
## %bb.3:
	movq	(%rbx), %rax
	movq	_MAX_EPOCH_OBJECTS@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jge	LBB0_4
## %bb.5:
	movq	8(%rbx), %rcx
	leaq	1(%rax), %rdx
	movq	%rdx, (%rbx)
	leaq	(%rax,%rax,4), %rax
	leaq	(%rcx,%rax,8), %r15
	movl	%r12d, (%rcx,%rax,8)
LBB0_6:
	addq	$4, -48(%rbp)
	leaq	-48(%rbp), %rdi
	callq	_bytestream_get_byte
	testb	$-128, %al
	jne	LBB0_9
## %bb.7:
	addl	$-4, %r13d
	cmpl	4(%r15), %r13d
	jg	LBB0_1
## %bb.8:
	movslq	8(%r15), %rdi
	addq	24(%r15), %rdi
	movq	-48(%rbp), %rsi
	movl	%r13d, %edx
	callq	_memcpy
	addl	%r13d, 8(%r15)
	subl	%r13d, 4(%r15)
LBB0_21:
	xorl	%eax, %eax
	jmp	LBB0_22
LBB0_9:
	cmpl	$11, %r13d
	jbe	LBB0_1
## %bb.10:
	addl	$-11, %r13d
	leaq	-48(%rbp), %rdi
	callq	_bytestream_get_be24
	movl	%eax, %r12d
	addl	$-4, %r12d
	movl	%r12d, %ebx
	subl	%r13d, %ebx
	jae	LBB0_13
## %bb.11:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.1(%rip), %rdx
	movq	%r14, %rdi
	movl	%r13d, %ecx
	movl	%r12d, %r8d
	jmp	LBB0_12
LBB0_4:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_av_log
	jmp	LBB0_1
LBB0_13:
	leaq	-48(%rbp), %rdi
	callq	_bytestream_get_be16
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	leaq	-48(%rbp), %rdi
	callq	_bytestream_get_be16
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	cmpl	%ecx, (%r14)
	jae	LBB0_14
LBB0_17:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rdx
	movl	(%rdx), %esi
	leaq	L_.str.2(%rip), %rdx
	movq	%r14, %rdi
                                        ## kill: def $ecx killed $ecx killed $rcx
	movl	%eax, %r8d
LBB0_12:
	xorl	%eax, %eax
	callq	_av_log
	jmp	LBB0_1
LBB0_14:
	testl	%eax, %eax
	je	LBB0_17
## %bb.15:
	cmpl	%eax, 4(%r14)
	jb	LBB0_17
## %bb.16:
	testl	%ecx, %ecx
	je	LBB0_17
## %bb.18:
	movl	%ecx, 12(%r15)
	movl	%eax, 16(%r15)
	leaq	24(%r15), %rdi
	leaq	32(%r15), %rsi
	movl	%r12d, %edx
	callq	_av_fast_padded_malloc
	movq	24(%r15), %rdi
	testq	%rdi, %rdi
	je	LBB0_19
## %bb.20:
	movq	-48(%rbp), %rsi
	movl	%r13d, %edx
	callq	_memcpy
	movl	%r13d, 8(%r15)
	movl	%ebx, 4(%r15)
	jmp	LBB0_21
LBB0_19:
	movq	$0, 4(%r15)
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_AVERROR
	jmp	LBB0_22
	.cfi_endproc
                                        ## -- End function
	.comm	_AVERROR_INVALIDDATA,4,2        ## @AVERROR_INVALIDDATA
	.comm	_MAX_EPOCH_OBJECTS,8,3          ## @MAX_EPOCH_OBJECTS
	.comm	_AV_LOG_ERROR,4,2               ## @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Too many objects in epoch\n"

L_.str.1:                               ## @.str.1
	.asciz	"Buffer dimension %d larger than the expected RLE data %d\n"

L_.str.2:                               ## @.str.2
	.asciz	"Bitmap dimensions (%dx%d) invalid.\n"

	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.no_dead_strip	_parse_object_segment
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function parse_object_segment
_parse_object_segment:                  ; @parse_object_segment
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	str	x1, [sp, #24]
	subs	w21, w2, #4
	b.le	LBB0_14
; %bb.1:
	mov	x22, x2
	mov	x19, x0
	ldr	x23, [x0, #8]
	add	x0, sp, #24
	bl	_bytestream_get_be16
	mov	x24, x0
	mov	x1, x23
	bl	_find_object
	mov	x20, x0
	cbnz	x0, LBB0_4
; %bb.2:
	ldr	x8, [x23]
Lloh0:
	adrp	x9, _MAX_EPOCH_OBJECTS@GOTPAGE
Lloh1:
	ldr	x9, [x9, _MAX_EPOCH_OBJECTS@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ge	LBB0_10
; %bb.3:
	ldr	x9, [x23, #8]
	add	x10, x8, #1
	str	x10, [x23]
	mov	w10, #40
	madd	x20, x8, x10, x9
	str	w24, [x20]
LBB0_4:
	ldr	x8, [sp, #24]
	add	x8, x8, #4
	str	x8, [sp, #24]
	add	x0, sp, #24
	bl	_bytestream_get_byte
	tbnz	w0, #7, LBB0_7
; %bb.5:
	ldr	w8, [x20, #4]
	cmp	w21, w8
	b.gt	LBB0_14
; %bb.6:
	ldr	x8, [x20, #24]
	ldrsw	x9, [x20, #8]
	add	x0, x8, x9
	ldr	x1, [sp, #24]
	mov	x2, x21
	bl	_memcpy
	mov	w0, #0
	ldp	w9, w8, [x20, #4]
	add	w8, w8, w21
	sub	w9, w9, w21
	stp	w9, w8, [x20, #4]
	b	LBB0_15
LBB0_7:
	subs	w21, w22, #11
	b.ls	LBB0_14
; %bb.8:
	add	x0, sp, #24
	bl	_bytestream_get_be24
	sub	w22, w0, #4
	subs	w23, w22, w21
	b.hs	LBB0_11
; %bb.9:
Lloh3:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh4:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	stp	x21, x22, [sp]
Lloh6:
	adrp	x2, l_.str.1@PAGE
Lloh7:
	add	x2, x2, l_.str.1@PAGEOFF
	b	LBB0_13
LBB0_10:
Lloh8:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh9:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
Lloh11:
	adrp	x2, l_.str@PAGE
Lloh12:
	add	x2, x2, l_.str@PAGEOFF
	b	LBB0_13
LBB0_11:
	add	x0, sp, #24
	bl	_bytestream_get_be16
	mov	x24, x0
	add	x0, sp, #24
	bl	_bytestream_get_be16
                                        ; kill: def $w0 killed $w0 killed $x0 def $x0
	ldr	w8, [x19]
	cmp	w8, w24
	b.hs	LBB0_16
LBB0_12:
Lloh13:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh14:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh15:
	ldr	w1, [x8]
	stp	x24, x0, [sp]
Lloh16:
	adrp	x2, l_.str.2@PAGE
Lloh17:
	add	x2, x2, l_.str.2@PAGEOFF
LBB0_13:
	mov	x0, x19
	bl	_av_log
LBB0_14:
Lloh18:
	adrp	x8, _AVERROR_INVALIDDATA@GOTPAGE
Lloh19:
	ldr	x8, [x8, _AVERROR_INVALIDDATA@GOTPAGEOFF]
Lloh20:
	ldr	w0, [x8]
LBB0_15:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
LBB0_16:
	cbz	w0, LBB0_12
; %bb.17:
	ldr	w8, [x19, #4]
	cmp	w8, w0
	b.lo	LBB0_12
; %bb.18:
	cbz	w24, LBB0_12
; %bb.19:
	stp	w24, w0, [x20, #12]
	add	x0, x20, #24
	add	x1, x20, #32
	mov	x2, x22
	bl	_av_fast_padded_malloc
	ldr	x0, [x20, #24]
	cbz	x0, LBB0_21
; %bb.20:
	ldr	x1, [sp, #24]
	mov	x2, x21
	bl	_memcpy
	mov	w0, #0
	stp	w23, w21, [x20, #4]
	b	LBB0_15
LBB0_21:
	stp	wzr, wzr, [x20, #4]
Lloh21:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh22:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh23:
	ldr	w0, [x8]
	bl	_AVERROR
	b	LBB0_15
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.comm	_AVERROR_INVALIDDATA,4,2        ; @AVERROR_INVALIDDATA
	.comm	_MAX_EPOCH_OBJECTS,8,3          ; @MAX_EPOCH_OBJECTS
	.comm	_AV_LOG_ERROR,4,2               ; @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Too many objects in epoch\n"

l_.str.1:                               ; @.str.1
	.asciz	"Buffer dimension %d larger than the expected RLE data %d\n"

l_.str.2:                               ; @.str.2
	.asciz	"Bitmap dimensions (%dx%d) invalid.\n"

	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.no_dead_strip	_parse_object_segment
.subsections_via_symbols
