	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function insert_iCCP
_insert_iCCP:                           ## @insert_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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, %r12
	movl	%esi, %r14d
	movl	%edi, %r15d
	movq	$0, -48(%rbp)
	movl	%edx, %edi
	movl	$2, %esi
	callq	_check_param_count
	movq	8(%r12), %rdx
	movl	(%rdx), %eax
	leal	-48(%rax), %ecx
	cmpl	$10, %ecx
	jae	LBB0_1
## %bb.4:
	leaq	-48(%rbp), %rsi
	movq	%rdx, %rdi
	callq	_load_fake
	testl	%eax, %eax
	jle	LBB0_5
## %bb.7:
	movl	%eax, %ebx
	andl	$-4, %ebx
	movq	-48(%rbp), %rdi
	movl	%ebx, %esi
	callq	_png_save_uint_32
LBB0_8:
	testb	$3, %bl
	je	LBB0_12
## %bb.9:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	8(%r12), %rdx
	leaq	L_.str.4(%rip), %rsi
	xorl	%eax, %eax
	callq	_fprintf
	movslq	%ebx, %r13
	leaq	(,%r13,8), %rdi
	addq	-48(%rbp), %rdi
	shll	$3, %ebx
	notl	%ebx
	andl	$24, %ebx
	addl	$8, %ebx
	movq	%rbx, %rsi
	callq	___bzero
	leaq	1(%r13), %rbx
	testb	$3, %bl
	je	LBB0_12
## %bb.10:
	leaq	2(%r13), %rbx
	testb	$3, %bl
	je	LBB0_12
## %bb.11:
	leaq	3(%r13), %rax
	addq	$4, %r13
	testb	$3, %al
	cmoveq	%rax, %r13
	movq	%r13, %rbx
LBB0_12:
	movq	-48(%rbp), %rdi
	testq	%rdi, %rdi
	je	LBB0_16
## %bb.13:
	cmpl	$4, %ebx
	jl	LBB0_16
## %bb.14:
	callq	_png_get_uint_32
	cmpl	%ebx, %eax
	je	LBB0_16
## %bb.15:
	movl	%eax, %r13d
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	8(%r12), %rdx
	leaq	L_.str.5(%rip), %rsi
	xorl	%eax, %eax
	callq	_fprintf
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	%ebx, %edx
	movslq	%r13d, %rcx
	leaq	L_.str.6(%rip), %rsi
	xorl	%eax, %eax
	callq	_fprintf
	movq	-48(%rbp), %rdi
	movl	%ebx, %esi
	callq	_png_save_uint_32
LBB0_16:
	movq	-48(%rbp), %r8
	testq	%r8, %r8
	je	LBB0_19
## %bb.17:
	cmpl	$4, %ebx
	jl	LBB0_19
## %bb.18:
	movq	(%r12), %rdx
	movq	_PNG_COMPRESSION_TYPE_BASE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movl	%r15d, %edi
	movl	%r14d, %esi
	movl	%ebx, %r9d
	callq	_png_set_iCCP
	movq	-48(%rbp), %r8
LBB0_19:
	testq	%r8, %r8
	je	LBB0_21
## %bb.20:
	movq	%r8, %rdi
	callq	_free
LBB0_21:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	cmpl	$60, %eax
	jne	LBB0_6
## %bb.2:
	addq	$4, %rdx
	leaq	-48(%rbp), %rsi
	movq	%rdx, %rdi
	callq	_load_file
	movl	%eax, %ebx
	cmpl	$-3, %eax
	jb	LBB0_8
## %bb.3:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	8(%r12), %rdx
	addq	$4, %rdx
	movslq	%ebx, %rcx
	leaq	L_.str(%rip), %rsi
	xorl	%eax, %eax
	callq	_fprintf
	movl	$1, %edi
	callq	_exit
LBB0_5:
	movq	8(%r12), %rdx
LBB0_6:
	movq	_stderr@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edi
	leaq	L_.str.2(%rip), %rsi
	xorl	%eax, %eax
	callq	_fprintf
	movl	(%rbx), %edi
	leaq	L_.str.3(%rip), %rsi
	xorl	%eax, %eax
	callq	_fprintf
	movl	$1, %edi
	callq	_exit
	.cfi_endproc
                                        ## -- End function
	.comm	_stderr,4,2                     ## @stderr
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s: file too long (%lu) for an ICC profile\n"

L_.str.2:                               ## @.str.2
	.asciz	"--insert iCCP \"%s\": unrecognized\n"

L_.str.3:                               ## @.str.3
	.asciz	"  use '<' to read a file: \"<filename\"\n"

L_.str.4:                               ## @.str.4
	.asciz	"makepng: --insert iCCP %s: profile length made a multiple of 4\n"

L_.str.5:                               ## @.str.5
	.asciz	"--insert iCCP %s: profile length field wrong:\n"

L_.str.6:                               ## @.str.6
	.asciz	"  actual %lu, recorded value %lu (corrected)\n"

	.comm	_PNG_COMPRESSION_TYPE_BASE,4,2  ## @PNG_COMPRESSION_TYPE_BASE
	.no_dead_strip	_insert_iCCP
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function insert_iCCP
_insert_iCCP:                           ; @insert_iCCP
	.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
	mov	x19, x3
	mov	x20, x1
	mov	x21, x0
	str	xzr, [sp, #24]
	mov	x0, x2
	mov	w1, #2
	bl	_check_param_count
	ldr	x0, [x19, #8]
	ldr	w8, [x0]
	sub	w9, w8, #48
	cmp	w9, #10
	b.hs	LBB0_15
; %bb.1:
	add	x1, sp, #24
	bl	_load_fake
	cmp	w0, #0
	b.le	LBB0_18
; %bb.2:
	and	w22, w0, #0xfffffffc
	ldr	x0, [sp, #24]
	mov	x1, x22
	bl	_png_save_uint_32
LBB0_3:
	ands	w23, w22, #0x3
	b.eq	LBB0_5
; %bb.4:
Lloh0:
	adrp	x8, _stderr@GOTPAGE
Lloh1:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	ldr	x8, [x19, #8]
	str	x8, [sp]
Lloh3:
	adrp	x1, l_.str.4@PAGE
Lloh4:
	add	x1, x1, l_.str.4@PAGEOFF
	bl	_fprintf
	ldr	x8, [sp, #24]
	add	x0, x8, w22, sxtw #3
	eor	w23, w23, #0x3
	lsl	w8, w23, #3
	add	w1, w8, #8
	bl	_bzero
	add	w8, w22, w23
	add	w22, w8, #1
LBB0_5:
	ldr	x0, [sp, #24]
	cbz	x0, LBB0_9
; %bb.6:
	cmp	w22, #4
	b.lt	LBB0_9
; %bb.7:
	bl	_png_get_uint_32
	cmp	w0, w22
	b.eq	LBB0_9
; %bb.8:
	mov	x23, x0
Lloh5:
	adrp	x24, _stderr@GOTPAGE
Lloh6:
	ldr	x24, [x24, _stderr@GOTPAGEOFF]
	ldr	w0, [x24]
	ldr	x8, [x19, #8]
	str	x8, [sp]
Lloh7:
	adrp	x1, l_.str.5@PAGE
Lloh8:
	add	x1, x1, l_.str.5@PAGEOFF
	bl	_fprintf
	ldr	w0, [x24]
	sxtw	x8, w23
	mov	w9, w22
	stp	x9, x8, [sp]
Lloh9:
	adrp	x1, l_.str.6@PAGE
Lloh10:
	add	x1, x1, l_.str.6@PAGEOFF
	bl	_fprintf
	ldr	x0, [sp, #24]
	mov	x1, x22
	bl	_png_save_uint_32
LBB0_9:
	ldr	x4, [sp, #24]
	cbz	x4, LBB0_12
; %bb.10:
	cmp	w22, #4
	b.lt	LBB0_12
; %bb.11:
	ldr	x2, [x19]
Lloh11:
	adrp	x8, _PNG_COMPRESSION_TYPE_BASE@GOTPAGE
Lloh12:
	ldr	x8, [x8, _PNG_COMPRESSION_TYPE_BASE@GOTPAGEOFF]
Lloh13:
	ldr	w3, [x8]
	mov	x0, x21
	mov	x1, x20
	mov	x5, x22
	bl	_png_set_iCCP
	ldr	x4, [sp, #24]
LBB0_12:
	cbz	x4, LBB0_14
; %bb.13:
	mov	x0, x4
	bl	_free
LBB0_14:
	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_15:
	cmp	w8, #60
	b.ne	LBB0_19
; %bb.16:
	add	x0, x0, #4
	add	x1, sp, #24
	bl	_load_file
	mov	x22, x0
	cmn	w0, #3
	b.lo	LBB0_3
; %bb.17:
Lloh14:
	adrp	x8, _stderr@GOTPAGE
Lloh15:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh16:
	ldr	w0, [x8]
	ldr	x8, [x19, #8]
	add	x8, x8, #4
	sxtw	x9, w22
	stp	x8, x9, [sp]
Lloh17:
	adrp	x1, l_.str@PAGE
Lloh18:
	add	x1, x1, l_.str@PAGEOFF
	b	LBB0_20
LBB0_18:
	ldr	x0, [x19, #8]
LBB0_19:
Lloh19:
	adrp	x19, _stderr@GOTPAGE
Lloh20:
	ldr	x19, [x19, _stderr@GOTPAGEOFF]
	ldr	w8, [x19]
	str	x0, [sp]
Lloh21:
	adrp	x1, l_.str.2@PAGE
Lloh22:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x8
	bl	_fprintf
	ldr	w0, [x19]
Lloh23:
	adrp	x1, l_.str.3@PAGE
Lloh24:
	add	x1, x1, l_.str.3@PAGEOFF
LBB0_20:
	bl	_fprintf
	mov	w0, #1
	bl	_exit
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_stderr,4,2                     ; @stderr
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s: file too long (%lu) for an ICC profile\n"

l_.str.2:                               ; @.str.2
	.asciz	"--insert iCCP \"%s\": unrecognized\n"

l_.str.3:                               ; @.str.3
	.asciz	"  use '<' to read a file: \"<filename\"\n"

l_.str.4:                               ; @.str.4
	.asciz	"makepng: --insert iCCP %s: profile length made a multiple of 4\n"

l_.str.5:                               ; @.str.5
	.asciz	"--insert iCCP %s: profile length field wrong:\n"

l_.str.6:                               ; @.str.6
	.asciz	"  actual %lu, recorded value %lu (corrected)\n"

	.comm	_PNG_COMPRESSION_TYPE_BASE,4,2  ; @PNG_COMPRESSION_TYPE_BASE
	.no_dead_strip	_insert_iCCP
.subsections_via_symbols
