	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function decode_iccp_chunk
_decode_iccp_chunk:                     ## @decode_iccp_chunk
	.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	$680, %rsp                      ## imm = 0x2A8
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r14
	movl	%esi, %r15d
	movq	%rdi, %r13
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r13, %rdi
	callq	_bytestream2_get_byte
	leaq	1(%rbx), %rcx
	movq	%rax, -704(%rbp,%rbx,8)
	testq	%rax, %rax
	je	LBB0_3
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	cmpq	$80, %rbx
	movq	%rcx, %rbx
	jb	LBB0_1
LBB0_3:
	leal	-1(%rcx), %eax
	cmpl	$80, %eax
	jb	LBB0_5
## %bb.4:
	movl	8(%r13), %edi
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
	jmp	LBB0_7
LBB0_5:
	subl	%ecx, %r15d
	movl	%r15d, %edi
	xorl	%esi, %esi
	callq	_FFMAX
	movl	%eax, %r15d
	movq	%r13, %rdi
	callq	_bytestream2_get_byte
	testq	%rax, %rax
	je	LBB0_10
## %bb.6:
	movl	8(%r13), %edi
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.1(%rip), %rdx
LBB0_7:
	callq	_av_log
	movq	_AVERROR_INVALIDDATA@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
LBB0_8:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_17
## %bb.9:
	movl	%r12d, %eax
	addq	$680, %rsp                      ## imm = 0x2A8
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_10:
	decl	%r15d
	movl	%r15d, %edi
	xorl	%esi, %esi
	callq	_FFMAX
	movl	%eax, %r15d
	movq	(%r13), %rsi
	movslq	%eax, %rdx
	addq	%rsi, %rdx
	leaq	-712(%rbp), %rdi
	callq	_decode_zbuf
	testl	%eax, %eax
	js	LBB0_15
## %bb.11:
	leaq	-712(%rbp), %rdi
	leaq	-720(%rbp), %rsi
	callq	_av_bprint_finalize
	testl	%eax, %eax
	js	LBB0_15
## %bb.12:
	movq	_AV_FRAME_DATA_ICC_PROFILE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	-712(%rbp), %edx
	movq	%r14, %rdi
	callq	_av_frame_new_side_data
	testq	%rax, %rax
	je	LBB0_16
## %bb.13:
	movq	%rax, %r14
	movq	%rax, %rdi
	addq	$4, %rdi
	leaq	L_.str.2(%rip), %rsi
	leaq	-704(%rbp), %rdx
	xorl	%r12d, %r12d
	xorl	%ecx, %ecx
	callq	_av_dict_set
	movl	(%r14), %edi
	movq	-720(%rbp), %rsi
	movl	-712(%rbp), %edx
	callq	_memcpy
	movq	-720(%rbp), %rdi
	callq	_av_free
	addl	$4, %r15d
	movq	%r13, %rdi
	movl	%r15d, %esi
	callq	_bytestream2_skip
	jmp	LBB0_8
LBB0_15:
	movl	%eax, %r12d
	jmp	LBB0_8
LBB0_16:
	movq	-720(%rbp), %rdi
	callq	_av_free
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_AVERROR
	movl	%eax, %r12d
	jmp	LBB0_8
LBB0_17:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_AV_LOG_ERROR,4,2               ## @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"iCCP with invalid name!\n"

	.comm	_AVERROR_INVALIDDATA,4,2        ## @AVERROR_INVALIDDATA
L_.str.1:                               ## @.str.1
	.asciz	"iCCP with invalid compression!\n"

	.comm	_AV_FRAME_DATA_ICC_PROFILE,4,2  ## @AV_FRAME_DATA_ICC_PROFILE
	.comm	_ENOMEM,4,2                     ## @ENOMEM
L_.str.2:                               ## @.str.2
	.asciz	"name"

	.no_dead_strip	_decode_iccp_chunk
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function decode_iccp_chunk
_decode_iccp_chunk:                     ; @decode_iccp_chunk
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	sub	sp, sp, #688
	mov	x20, x2
	mov	x21, x1
	mov	x19, x0
	mov	x22, #0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-56]
	add	x23, sp, #24
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	bl	_bytestream2_get_byte
	add	x8, x22, #1
	str	x0, [x23, x22, lsl #3]
	cbz	x0, LBB0_3
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	cmp	x22, #80
	mov	x22, x8
	b.lo	LBB0_1
LBB0_3:
	sub	w9, w8, #1
	cmp	w9, #80
	b.lo	LBB0_5
; %bb.4:
	ldr	w0, [x19, #8]
Lloh3:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh4:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
Lloh6:
	adrp	x2, l_.str@PAGE
Lloh7:
	add	x2, x2, l_.str@PAGEOFF
	b	LBB0_7
LBB0_5:
	sub	w0, w21, w8
	mov	w1, #0
	bl	_FFMAX
	mov	x21, x0
	mov	x0, x19
	bl	_bytestream2_get_byte
	cbz	x0, LBB0_10
; %bb.6:
	ldr	w0, [x19, #8]
Lloh8:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh9:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
Lloh11:
	adrp	x2, l_.str.1@PAGE
Lloh12:
	add	x2, x2, l_.str.1@PAGEOFF
LBB0_7:
	bl	_av_log
Lloh13:
	adrp	x8, _AVERROR_INVALIDDATA@GOTPAGE
Lloh14:
	ldr	x8, [x8, _AVERROR_INVALIDDATA@GOTPAGEOFF]
Lloh15:
	ldr	w0, [x8]
LBB0_8:
	ldur	x8, [x29, #-56]
Lloh16:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh17:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh18:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_15
; %bb.9:
	add	sp, sp, #688
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_10:
	sub	w0, w21, #1
	mov	w1, #0
	bl	_FFMAX
	mov	x21, x0
	ldr	x1, [x19]
	add	x2, x1, w0, sxtw
	add	x0, sp, #8
	bl	_decode_zbuf
	tbnz	w0, #31, LBB0_8
; %bb.11:
	add	x0, sp, #8
	add	x1, sp, #16
	bl	_av_bprint_finalize
	tbnz	w0, #31, LBB0_8
; %bb.12:
Lloh19:
	adrp	x8, _AV_FRAME_DATA_ICC_PROFILE@GOTPAGE
Lloh20:
	ldr	x8, [x8, _AV_FRAME_DATA_ICC_PROFILE@GOTPAGEOFF]
Lloh21:
	ldr	w1, [x8]
	ldr	w2, [sp, #8]
	mov	x0, x20
	bl	_av_frame_new_side_data
	cbz	x0, LBB0_14
; %bb.13:
	mov	x20, x0
	add	x0, x0, #4
Lloh22:
	adrp	x1, l_.str.2@PAGE
Lloh23:
	add	x1, x1, l_.str.2@PAGEOFF
	add	x2, sp, #24
	mov	w3, #0
	bl	_av_dict_set
	ldr	w0, [x20]
	ldr	x1, [sp, #16]
	ldr	w2, [sp, #8]
	bl	_memcpy
	ldr	x0, [sp, #16]
	bl	_av_free
	add	w1, w21, #4
	mov	x0, x19
	bl	_bytestream2_skip
	mov	w0, #0
	b	LBB0_8
LBB0_14:
	ldr	x0, [sp, #16]
	bl	_av_free
Lloh24:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh25:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh26:
	ldr	w0, [x8]
	bl	_AVERROR
	b	LBB0_8
LBB0_15:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.cfi_endproc
                                        ; -- End function
	.comm	_AV_LOG_ERROR,4,2               ; @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"iCCP with invalid name!\n"

	.comm	_AVERROR_INVALIDDATA,4,2        ; @AVERROR_INVALIDDATA
l_.str.1:                               ; @.str.1
	.asciz	"iCCP with invalid compression!\n"

	.comm	_AV_FRAME_DATA_ICC_PROFILE,4,2  ; @AV_FRAME_DATA_ICC_PROFILE
	.comm	_ENOMEM,4,2                     ; @ENOMEM
l_.str.2:                               ; @.str.2
	.asciz	"name"

	.no_dead_strip	_decode_iccp_chunk
.subsections_via_symbols
