	.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
	movl	%esi, %r14d
	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.4:
	movq	_PNG_HAVE_IDAT@GOTPCREL(%rip), %rcx
	movq	_PNG_HAVE_PLTE@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	orl	(%rcx), %edx
	testl	%eax, %edx
	je	LBB0_2
## %bb.5:
	movq	%rbx, %rdi
	movl	%r15d, %esi
	callq	_png_crc_finish
	leaq	L_.str.2(%rip), %rsi
	jmp	LBB0_6
LBB0_1:
	leaq	L_.str.1(%rip), %rsi
	movq	%rbx, %rdi
	callq	_png_chunk_error
LBB0_2:
	cmpl	$1, %r15d
	jne	LBB0_3
## %bb.7:
	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_12
## %bb.8:
	movl	4(%rbx), %eax
	movq	_PNG_COLORSPACE_INVALID@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%eax, %ecx
	jne	LBB0_12
## %bb.9:
	movq	_PNG_COLORSPACE_HAVE_INTENT@GOTPCREL(%rip), %rdx
	testl	%eax, (%rdx)
	je	LBB0_11
## %bb.10:
	orl	%eax, %ecx
	movl	%ecx, 4(%rbx)
	movq	%rbx, %rdi
	movl	%r14d, %esi
	callq	_png_colorspace_sync
	leaq	L_.str.4(%rip), %rsi
	movq	%rbx, %rdi
	callq	_png_chunk_benign_error
	jmp	LBB0_12
LBB0_3:
	movq	%rbx, %rdi
	movl	%r15d, %esi
	callq	_png_crc_finish
	leaq	L_.str.3(%rip), %rsi
LBB0_6:
	movq	%rbx, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_png_chunk_benign_error         ## TAILCALL
LBB0_11:
	leaq	4(%rbx), %rsi
	movl	-28(%rbp), %edx
	movq	%rbx, %rdi
	callq	_png_colorspace_set_sRGB
	movq	%rbx, %rdi
	movl	%r14d, %esi
	callq	_png_colorspace_sync
LBB0_12:
	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"

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

	.comm	_PNG_HAVE_IDAT,4,2              ## @PNG_HAVE_IDAT
	.comm	_PNG_HAVE_PLTE,4,2              ## @PNG_HAVE_PLTE
L_.str.2:                               ## @.str.2
	.asciz	"out of place"

L_.str.3:                               ## @.str.3
	.asciz	"invalid"

	.comm	_PNG_COLORSPACE_INVALID,4,2     ## @PNG_COLORSPACE_INVALID
	.comm	_PNG_COLORSPACE_HAVE_INTENT,4,2 ## @PNG_COLORSPACE_HAVE_INTENT
L_.str.4:                               ## @.str.4
	.asciz	"too many profiles"

.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]
Lloh8:
	adrp	x10, _PNG_HAVE_PLTE@GOTPAGE
Lloh9:
	ldr	x10, [x10, _PNG_HAVE_PLTE@GOTPAGEOFF]
Lloh10:
	ldr	w10, [x10]
	orr	w9, w10, w9
	tst	w9, w8
	b.eq	LBB0_4
; %bb.2:
	mov	x0, x19
	mov	x1, x21
	bl	_png_crc_finish
Lloh11:
	adrp	x1, l_.str.2@PAGE
Lloh12:
	add	x1, x1, l_.str.2@PAGEOFF
	b	LBB0_10
LBB0_3:
Lloh13:
	adrp	x1, l_.str.1@PAGE
Lloh14:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_png_chunk_error
LBB0_4:
	cmp	w21, #1
	b.ne	LBB0_9
; %bb.5:
	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_12
; %bb.6:
	mov	x1, x19
	ldr	w8, [x1, #4]!
Lloh15:
	adrp	x9, _PNG_COLORSPACE_INVALID@GOTPAGE
Lloh16:
	ldr	x9, [x9, _PNG_COLORSPACE_INVALID@GOTPAGEOFF]
Lloh17:
	ldr	w9, [x9]
	tst	w9, w8
	b.ne	LBB0_12
; %bb.7:
Lloh18:
	adrp	x10, _PNG_COLORSPACE_HAVE_INTENT@GOTPAGE
Lloh19:
	ldr	x10, [x10, _PNG_COLORSPACE_HAVE_INTENT@GOTPAGEOFF]
Lloh20:
	ldr	w10, [x10]
	tst	w10, w8
	b.eq	LBB0_11
; %bb.8:
	orr	w8, w9, w8
	str	w8, [x19, #4]
	mov	x0, x19
	mov	x1, x20
	bl	_png_colorspace_sync
Lloh21:
	adrp	x1, l_.str.4@PAGE
Lloh22:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	x0, x19
	bl	_png_chunk_benign_error
	b	LBB0_12
LBB0_9:
	mov	x0, x19
	mov	x1, x21
	bl	_png_crc_finish
Lloh23:
	adrp	x1, l_.str.3@PAGE
Lloh24:
	add	x1, x1, l_.str.3@PAGEOFF
LBB0_10:
	mov	x0, x19
	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_chunk_benign_error
LBB0_11:
	ldr	w2, [sp, #12]
	mov	x0, x19
	bl	_png_colorspace_set_sRGB
	mov	x0, x19
	mov	x1, x20
	bl	_png_colorspace_sync
LBB0_12:
	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	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpAdd	Lloh23, Lloh24
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"in png_handle_sRGB"

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

	.comm	_PNG_HAVE_IDAT,4,2              ; @PNG_HAVE_IDAT
	.comm	_PNG_HAVE_PLTE,4,2              ; @PNG_HAVE_PLTE
l_.str.2:                               ; @.str.2
	.asciz	"out of place"

l_.str.3:                               ; @.str.3
	.asciz	"invalid"

	.comm	_PNG_COLORSPACE_INVALID,4,2     ; @PNG_COLORSPACE_INVALID
	.comm	_PNG_COLORSPACE_HAVE_INTENT,4,2 ; @PNG_COLORSPACE_HAVE_INTENT
l_.str.4:                               ; @.str.4
	.asciz	"too many profiles"

.subsections_via_symbols
