	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_png_write_iCCP                 ## -- Begin function png_write_iCCP
	.p2align	4, 0x90
_png_write_iCCP:                        ## @png_write_iCCP
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%r8d, %r14d
	movq	%rcx, %r15
	movl	%edx, %r13d
	movq	%rsi, %rbx
	movl	%edi, %r12d
	leaq	L_.str(%rip), %rsi
	movl	$1, %edi
	callq	_png_debug
	xorps	%xmm0, %xmm0
	movaps	%xmm0, -96(%rbp)
	movaps	%xmm0, -80(%rbp)
	movq	$0, -64(%rbp)
	testq	%rbx, %rbx
	je	LBB0_2
## %bb.1:
	leaq	-56(%rbp), %rdx
	movl	%r12d, %edi
	movq	%rbx, %rsi
	callq	_png_check_keyword
	testl	%eax, %eax
	je	LBB0_2
## %bb.4:
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movq	_PNG_COMPRESSION_TYPE_BASE@GOTPCREL(%rip), %rax
	cmpl	%r13d, (%rax)
	movq	%rax, %r13
	je	LBB0_6
## %bb.5:
	leaq	L_.str.2(%rip), %rsi
	movl	%r12d, %edi
	callq	_png_warning
LBB0_6:
	xorl	%ebx, %ebx
	testq	%r15, %r15
	cmovel	%ebx, %r14d
	cmpl	$4, %r14d
	jl	LBB0_8
## %bb.7:
	movl	(%r15), %eax
	movl	4(%r15), %ecx
	shll	$24, %eax
	shll	$16, %ecx
	orl	%eax, %ecx
	movl	8(%r15), %ebx
	shll	$8, %ebx
	orl	%ecx, %ebx
	orl	12(%r15), %ebx
LBB0_8:
	cmpl	%ebx, %r14d
	jge	LBB0_10
## %bb.9:
	leaq	L_.str.3(%rip), %rsi
	jmp	LBB0_3
LBB0_2:
	leaq	L_.str.1(%rip), %rsi
LBB0_3:
	movl	%r12d, %edi
	callq	_png_warning
LBB0_18:
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_10:
	jle	LBB0_12
## %bb.11:
	leaq	L_.str.4(%rip), %rsi
	movl	%r12d, %edi
	callq	_png_warning
	movl	%ebx, %r14d
LBB0_12:
	testl	%r14d, %r14d
	je	LBB0_13
## %bb.14:
	movl	(%r13), %ecx
	leaq	-96(%rbp), %r8
	movl	%r12d, %edi
	movq	%r15, %rsi
	movl	%r14d, %edx
	callq	_png_text_compress
	jmp	LBB0_15
LBB0_13:
	xorl	%eax, %eax
LBB0_15:
	movl	-44(%rbp), %ebx                 ## 4-byte Reload
	movq	_png_iCCP@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movslq	%ebx, %r15
	movslq	%eax, %r14
	leaq	(%r15,%r14), %rdx
	addq	$2, %rdx
	movl	%r12d, %edi
	callq	_png_write_chunk_start
	movq	-56(%rbp), %rsi
	movl	$0, 4(%rsi,%r15,4)
	addl	$2, %ebx
	movl	%r12d, %edi
	movl	%ebx, %edx
	callq	_png_write_chunk_data
	testl	%r14d, %r14d
	je	LBB0_17
## %bb.16:
	leaq	-96(%rbp), %rsi
	movl	%r12d, %edi
	callq	_png_write_compressed_data_out
LBB0_17:
	movl	%r12d, %edi
	callq	_png_write_chunk_end
	movq	-56(%rbp), %rsi
	movl	%r12d, %edi
	callq	_png_free
	jmp	LBB0_18
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"in png_write_iCCP\n"

L_.str.1:                               ## @.str.1
	.asciz	"Empty keyword in iCCP chunk"

	.comm	_PNG_COMPRESSION_TYPE_BASE,4,2  ## @PNG_COMPRESSION_TYPE_BASE
L_.str.2:                               ## @.str.2
	.asciz	"Unknown compression type in iCCP chunk"

L_.str.3:                               ## @.str.3
	.asciz	"Embedded profile length too large in iCCP chunk"

L_.str.4:                               ## @.str.4
	.asciz	"Truncating profile to actual length in iCCP chunk"

	.comm	_png_iCCP,4,2                   ## @png_iCCP
	.comm	_PNG_iCCP,4,2                   ## @PNG_iCCP
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_png_write_iCCP                 ; -- Begin function png_write_iCCP
	.p2align	2
_png_write_iCCP:                        ; @png_write_iCCP
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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	x22, x4
	mov	x21, x3
	mov	x23, x2
	mov	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	w0, #1
	bl	_png_debug
	movi.2d	v0, #0000000000000000
	stp	q0, q0, [sp]
	str	xzr, [sp, #32]
	cbz	x20, LBB0_8
; %bb.1:
	add	x2, sp, #40
	mov	x0, x19
	mov	x1, x20
	bl	_png_check_keyword
	cbz	w0, LBB0_8
; %bb.2:
	mov	x20, x0
Lloh2:
	adrp	x24, _PNG_COMPRESSION_TYPE_BASE@GOTPAGE
Lloh3:
	ldr	x24, [x24, _PNG_COMPRESSION_TYPE_BASE@GOTPAGEOFF]
	ldr	w8, [x24]
	cmp	w8, w23
	b.eq	LBB0_4
; %bb.3:
Lloh4:
	adrp	x1, l_.str.2@PAGE
Lloh5:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x19
	bl	_png_warning
LBB0_4:
	mov	w23, #0
	cmp	x21, #0
	csel	w2, wzr, w22, eq
	cmp	w2, #4
	b.lt	LBB0_6
; %bb.5:
	ldp	w8, w9, [x21]
	lsl	w9, w9, #16
	orr	w8, w9, w8, lsl #24
	ldp	w9, w10, [x21, #8]
	orr	w8, w8, w9, lsl #8
	orr	w23, w8, w10
LBB0_6:
	cmp	w2, w23
	b.ge	LBB0_11
; %bb.7:
Lloh6:
	adrp	x1, l_.str.3@PAGE
Lloh7:
	add	x1, x1, l_.str.3@PAGEOFF
	b	LBB0_9
LBB0_8:
Lloh8:
	adrp	x1, l_.str.1@PAGE
Lloh9:
	add	x1, x1, l_.str.1@PAGEOFF
LBB0_9:
	mov	x0, x19
	bl	_png_warning
LBB0_10:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_11:
	b.le	LBB0_13
; %bb.12:
Lloh10:
	adrp	x1, l_.str.4@PAGE
Lloh11:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	x0, x19
	bl	_png_warning
	mov	x2, x23
LBB0_13:
	cbz	w2, LBB0_15
; %bb.14:
	ldr	w3, [x24]
	mov	x4, sp
	mov	x0, x19
	mov	x1, x21
	bl	_png_text_compress
	mov	x21, x0
	b	LBB0_16
LBB0_15:
	mov	w21, #0
LBB0_16:
Lloh12:
	adrp	x8, _png_iCCP@GOTPAGE
Lloh13:
	ldr	x8, [x8, _png_iCCP@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
	sxtw	x8, w20
	add	x8, x8, w21, sxtw
	add	x2, x8, #2
	mov	x0, x19
	bl	_png_write_chunk_start
	ldr	x1, [sp, #40]
	add	w8, w20, #1
	str	wzr, [x1, w8, sxtw #2]
	add	w2, w20, #2
	mov	x0, x19
	bl	_png_write_chunk_data
	cbz	w21, LBB0_18
; %bb.17:
	mov	x1, sp
	mov	x0, x19
	bl	_png_write_compressed_data_out
LBB0_18:
	mov	x0, x19
	bl	_png_write_chunk_end
	ldr	x1, [sp, #40]
	mov	x0, x19
	bl	_png_free
	b	LBB0_10
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"in png_write_iCCP\n"

l_.str.1:                               ; @.str.1
	.asciz	"Empty keyword in iCCP chunk"

	.comm	_PNG_COMPRESSION_TYPE_BASE,4,2  ; @PNG_COMPRESSION_TYPE_BASE
l_.str.2:                               ; @.str.2
	.asciz	"Unknown compression type in iCCP chunk"

l_.str.3:                               ; @.str.3
	.asciz	"Embedded profile length too large in iCCP chunk"

l_.str.4:                               ; @.str.4
	.asciz	"Truncating profile to actual length in iCCP chunk"

	.comm	_png_iCCP,4,2                   ; @png_iCCP
	.comm	_PNG_iCCP,4,2                   ; @PNG_iCCP
.subsections_via_symbols
