	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function get_coc
_get_coc:                               ## @get_coc
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r14
	movq	%rsi, %r15
	movq	%rdi, %rbx
	leaq	4(%rdi), %r12
	movq	%r12, %rdi
	callq	_bytestream2_get_bytes_left
	cmpl	$1, %eax
	jg	LBB0_3
## %bb.1:
	movl	8(%rbx), %edi
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
	xorl	%eax, %eax
	callq	_av_log
	jmp	LBB0_2
LBB0_3:
	movq	%r12, %rdi
	callq	_bytestream2_get_byteu
	movl	(%rbx), %r8d
	cmpl	%eax, %r8d
	jle	LBB0_4
## %bb.5:
	movslq	%eax, %r13
	leaq	(%r15,%r13,8), %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	%r12, %rdi
	callq	_bytestream2_get_byteu
	movq	%rax, (%r15,%r13,8)
	movq	%rbx, %rdi
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	callq	_get_cox
	testl	%eax, %eax
	js	LBB0_7
## %bb.6:
	movq	_HAD_COC@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, (%r14,%r13,4)
	xorl	%eax, %eax
	jmp	LBB0_7
LBB0_4:
	movl	8(%rbx), %edi
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	leaq	L_.str.1(%rip), %rdx
	movl	%eax, %ecx
	xorl	%eax, %eax
	callq	_av_log
LBB0_2:
	movq	_AVERROR_INVALIDDATA@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_7:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_AV_LOG_ERROR,4,2               ## @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Insufficient space for COC\n"

	.comm	_AVERROR_INVALIDDATA,4,2        ## @AVERROR_INVALIDDATA
L_.str.1:                               ## @.str.1
	.asciz	"Invalid compno %d. There are %d components in the image.\n"

	.comm	_HAD_COC,4,2                    ## @HAD_COC
	.no_dead_strip	_get_coc
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function get_coc
_get_coc:                               ; @get_coc
	.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	x19, x2
	mov	x23, x1
	mov	x20, x0
	add	x22, x0, #4
	mov	x0, x22
	bl	_bytestream2_get_bytes_left
	cmp	w0, #1
	b.gt	LBB0_2
; %bb.1:
	ldr	w0, [x20, #8]
Lloh0:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh1:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
Lloh3:
	adrp	x2, l_.str@PAGE
Lloh4:
	add	x2, x2, l_.str@PAGEOFF
	b	LBB0_6
LBB0_2:
	mov	x0, x22
	bl	_bytestream2_get_byteu
	mov	x21, x0
	ldr	w8, [x20]
	cmp	w8, w21
	b.le	LBB0_5
; %bb.3:
	lsl	x8, x21, #32
	add	x23, x23, x8, asr #29
	mov	x0, x22
	bl	_bytestream2_get_byteu
	str	x0, [x23]
	mov	x0, x20
	mov	x1, x23
	bl	_get_cox
	tbnz	w0, #31, LBB0_7
; %bb.4:
	mov	w0, #0
	sxtw	x8, w21
Lloh5:
	adrp	x9, _HAD_COC@GOTPAGE
Lloh6:
	ldr	x9, [x9, _HAD_COC@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
	lsl	x8, x8, #2
	ldr	w10, [x19, x8]
	orr	w9, w10, w9
	str	w9, [x19, x8]
	b	LBB0_7
LBB0_5:
	ldr	w0, [x20, #8]
Lloh8:
	adrp	x9, _AV_LOG_ERROR@GOTPAGE
Lloh9:
	ldr	x9, [x9, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x9]
                                        ; kill: def $w21 killed $w21 killed $x21 def $x21
	stp	x21, x8, [sp]
Lloh11:
	adrp	x2, l_.str.1@PAGE
Lloh12:
	add	x2, x2, l_.str.1@PAGEOFF
LBB0_6:
	bl	_av_log
Lloh13:
	adrp	x8, _AVERROR_INVALIDDATA@GOTPAGE
Lloh14:
	ldr	x8, [x8, _AVERROR_INVALIDDATA@GOTPAGEOFF]
Lloh15:
	ldr	w0, [x8]
LBB0_7:
	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 AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_AV_LOG_ERROR,4,2               ; @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Insufficient space for COC\n"

	.comm	_AVERROR_INVALIDDATA,4,2        ; @AVERROR_INVALIDDATA
l_.str.1:                               ; @.str.1
	.asciz	"Invalid compno %d. There are %d components in the image.\n"

	.comm	_HAD_COC,4,2                    ; @HAD_COC
	.no_dead_strip	_get_coc
.subsections_via_symbols
