	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_png_handle_sRGB                ## -- Begin function png_handle_sRGB
	.p2align	4, 0x90
_png_handle_sRGB:                       ## @png_handle_sRGB
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r15d
	movq	%rsi, %r14
	movq	%rdi, %rbx
	leaq	L_.str(%rip), %rsi
	movl	$1, %edi
	callq	_png_debug
	movl	(%rbx), %eax
	movq	_PNG_HAVE_IHDR@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_1
## %bb.2:
	movq	_PNG_HAVE_IDAT@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_5
## %bb.3:
	leaq	L_.str.2(%rip), %rsi
	jmp	LBB0_4
LBB0_1:
	leaq	L_.str.1(%rip), %rsi
	movq	%rbx, %rdi
	callq	_png_error
	jmp	LBB0_7
LBB0_5:
	movq	_PNG_HAVE_PLTE@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_7
## %bb.6:
	leaq	L_.str.3(%rip), %rsi
	movq	%rbx, %rdi
	callq	_png_warning
LBB0_7:
	testq	%r14, %r14
	je	LBB0_10
## %bb.8:
	movq	_PNG_INFO_sRGB@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%r14)
	je	LBB0_10
## %bb.9:
	leaq	L_.str.4(%rip), %rsi
	jmp	LBB0_4
LBB0_10:
	cmpl	$1, %r15d
	jne	LBB0_11
## %bb.12:
	leaq	-28(%rbp), %rsi
	movq	%rbx, %rdi
	movl	$1, %edx
	callq	_png_crc_read
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_png_crc_finish
	testq	%rax, %rax
	jne	LBB0_16
## %bb.13:
	movl	-28(%rbp), %edx
	movq	_PNG_sRGB_INTENT_LAST@GOTPCREL(%rip), %rax
	cmpl	(%rax), %edx
	jge	LBB0_14
## %bb.15:
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_png_set_sRGB_gAMA_and_cHRM
	jmp	LBB0_16
LBB0_11:
	leaq	L_.str.5(%rip), %rsi
LBB0_4:
	movq	%rbx, %rdi
	callq	_png_warning
	movq	%rbx, %rdi
	movl	%r15d, %esi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_png_crc_finish                 ## TAILCALL
LBB0_14:
	leaq	L_.str.6(%rip), %rsi
	movq	%rbx, %rdi
	callq	_png_warning
LBB0_16:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"in png_handle_sRGB\n"

	.comm	_PNG_HAVE_IHDR,4,2              ## @PNG_HAVE_IHDR
L_.str.1:                               ## @.str.1
	.asciz	"Missing IHDR before sRGB"

	.comm	_PNG_HAVE_IDAT,4,2              ## @PNG_HAVE_IDAT
L_.str.2:                               ## @.str.2
	.asciz	"Invalid sRGB after IDAT"

	.comm	_PNG_HAVE_PLTE,4,2              ## @PNG_HAVE_PLTE
L_.str.3:                               ## @.str.3
	.asciz	"Out of place sRGB chunk"

	.comm	_PNG_INFO_sRGB,4,2              ## @PNG_INFO_sRGB
L_.str.4:                               ## @.str.4
	.asciz	"Duplicate sRGB chunk"

L_.str.5:                               ## @.str.5
	.asciz	"Incorrect sRGB chunk length"

	.comm	_PNG_sRGB_INTENT_LAST,4,2       ## @PNG_sRGB_INTENT_LAST
L_.str.6:                               ## @.str.6
	.asciz	"Unknown sRGB intent"

	.comm	_PNG_INFO_cHRM,4,2              ## @PNG_INFO_cHRM
	.comm	_PNG_INFO_gAMA,4,2              ## @PNG_INFO_gAMA
	.comm	_stderr,4,2                     ## @stderr
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_png_handle_sRGB                ; -- Begin function png_handle_sRGB
	.p2align	2
_png_handle_sRGB:                       ; @png_handle_sRGB
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x21, 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
	ldr	w8, [x19]
Lloh2:
	adrp	x9, _PNG_HAVE_IHDR@GOTPAGE
Lloh3:
	ldr	x9, [x9, _PNG_HAVE_IHDR@GOTPAGEOFF]
Lloh4:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_3
; %bb.1:
Lloh5:
	adrp	x9, _PNG_HAVE_IDAT@GOTPAGE
Lloh6:
	ldr	x9, [x9, _PNG_HAVE_IDAT@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_4
; %bb.2:
Lloh8:
	adrp	x1, l_.str.2@PAGE
Lloh9:
	add	x1, x1, l_.str.2@PAGEOFF
	b	LBB0_14
LBB0_3:
Lloh10:
	adrp	x1, l_.str.1@PAGE
Lloh11:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_png_error
	b	LBB0_6
LBB0_4:
Lloh12:
	adrp	x9, _PNG_HAVE_PLTE@GOTPAGE
Lloh13:
	ldr	x9, [x9, _PNG_HAVE_PLTE@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_6
; %bb.5:
Lloh15:
	adrp	x1, l_.str.3@PAGE
Lloh16:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x19
	bl	_png_warning
LBB0_6:
	cbz	x20, LBB0_9
; %bb.7:
	ldr	w8, [x20]
Lloh17:
	adrp	x9, _PNG_INFO_sRGB@GOTPAGE
Lloh18:
	ldr	x9, [x9, _PNG_INFO_sRGB@GOTPAGEOFF]
Lloh19:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_9
; %bb.8:
Lloh20:
	adrp	x1, l_.str.4@PAGE
Lloh21:
	add	x1, x1, l_.str.4@PAGEOFF
	b	LBB0_14
LBB0_9:
	cmp	w21, #1
	b.ne	LBB0_13
; %bb.10:
	add	x1, sp, #12
	mov	x0, x19
	mov	w2, #1
	bl	_png_crc_read
	mov	x0, x19
	mov	w1, #0
	bl	_png_crc_finish
	cbnz	x0, LBB0_16
; %bb.11:
	ldr	w2, [sp, #12]
Lloh22:
	adrp	x8, _PNG_sRGB_INTENT_LAST@GOTPAGE
Lloh23:
	ldr	x8, [x8, _PNG_sRGB_INTENT_LAST@GOTPAGEOFF]
Lloh24:
	ldr	w8, [x8]
	cmp	w2, w8
	b.ge	LBB0_15
; %bb.12:
	mov	x0, x19
	mov	x1, x20
	bl	_png_set_sRGB_gAMA_and_cHRM
	b	LBB0_16
LBB0_13:
Lloh25:
	adrp	x1, l_.str.5@PAGE
Lloh26:
	add	x1, x1, l_.str.5@PAGEOFF
LBB0_14:
	mov	x0, x19
	bl	_png_warning
	mov	x0, x19
	mov	x1, x21
	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
	add	sp, sp, #64
	b	_png_crc_finish
LBB0_15:
Lloh27:
	adrp	x1, l_.str.6@PAGE
Lloh28:
	add	x1, x1, l_.str.6@PAGEOFF
	mov	x0, x19
	bl	_png_warning
LBB0_16:
	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
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpAdd	Lloh27, Lloh28
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"in png_handle_sRGB\n"

	.comm	_PNG_HAVE_IHDR,4,2              ; @PNG_HAVE_IHDR
l_.str.1:                               ; @.str.1
	.asciz	"Missing IHDR before sRGB"

	.comm	_PNG_HAVE_IDAT,4,2              ; @PNG_HAVE_IDAT
l_.str.2:                               ; @.str.2
	.asciz	"Invalid sRGB after IDAT"

	.comm	_PNG_HAVE_PLTE,4,2              ; @PNG_HAVE_PLTE
l_.str.3:                               ; @.str.3
	.asciz	"Out of place sRGB chunk"

	.comm	_PNG_INFO_sRGB,4,2              ; @PNG_INFO_sRGB
l_.str.4:                               ; @.str.4
	.asciz	"Duplicate sRGB chunk"

l_.str.5:                               ; @.str.5
	.asciz	"Incorrect sRGB chunk length"

	.comm	_PNG_sRGB_INTENT_LAST,4,2       ; @PNG_sRGB_INTENT_LAST
l_.str.6:                               ; @.str.6
	.asciz	"Unknown sRGB intent"

	.comm	_PNG_INFO_cHRM,4,2              ; @PNG_INFO_cHRM
	.comm	_PNG_INFO_gAMA,4,2              ; @PNG_INFO_gAMA
	.comm	_stderr,4,2                     ; @stderr
.subsections_via_symbols
