	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function png_colorspace_check_gamma
_png_colorspace_check_gamma:            ## @png_colorspace_check_gamma
	.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	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_PNG_COLORSPACE_HAVE_GAMMA@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movb	$1, %r12b
	testl	%eax, (%rsi)
	je	LBB0_7
## %bb.1:
	movl	%ecx, %r15d
	movl	%edx, %ecx
	movq	%rsi, %rbx
	movl	%edi, %r14d
	movl	4(%rsi), %esi
	movq	_PNG_FP_1@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	-36(%rbp), %rdi
	callq	_png_muldiv
	testq	%rax, %rax
	je	LBB0_3
## %bb.2:
	movl	-36(%rbp), %edi
	callq	_png_gamma_significant
	testq	%rax, %rax
	je	LBB0_7
LBB0_3:
	cmpl	$2, %r15d
	sete	%r12b
	je	LBB0_5
## %bb.4:
	movq	_PNG_COLORSPACE_FROM_sRGB@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	(%rbx), %eax
	jne	LBB0_5
## %bb.6:
	movq	_PNG_CHUNK_WARNING@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	L_.str.1(%rip), %rsi
	movl	%r14d, %edi
	callq	_png_chunk_report
	cmpl	$1, %r15d
	sete	%r12b
	jmp	LBB0_7
LBB0_5:
	movq	_PNG_CHUNK_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	L_.str(%rip), %rsi
	movl	%r14d, %edi
	callq	_png_chunk_report
LBB0_7:
	movzbl	%r12b, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PNG_COLORSPACE_HAVE_GAMMA,4,2  ## @PNG_COLORSPACE_HAVE_GAMMA
	.comm	_PNG_FP_1,4,2                   ## @PNG_FP_1
	.comm	_PNG_COLORSPACE_FROM_sRGB,4,2   ## @PNG_COLORSPACE_FROM_sRGB
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"gamma value does not match sRGB"

	.comm	_PNG_CHUNK_ERROR,4,2            ## @PNG_CHUNK_ERROR
L_.str.1:                               ## @.str.1
	.asciz	"gamma value does not match libpng estimate"

	.comm	_PNG_CHUNK_WARNING,4,2          ## @PNG_CHUNK_WARNING
	.no_dead_strip	_png_colorspace_check_gamma
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function png_colorspace_check_gamma
_png_colorspace_check_gamma:            ; @png_colorspace_check_gamma
	.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
	ldr	w8, [x1]
Lloh0:
	adrp	x9, _PNG_COLORSPACE_HAVE_GAMMA@GOTPAGE
Lloh1:
	ldr	x9, [x9, _PNG_COLORSPACE_HAVE_GAMMA@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_6
; %bb.1:
	mov	x19, x3
	mov	x3, x2
	mov	x21, x1
	mov	x20, x0
	ldr	w1, [x1, #4]
Lloh3:
	adrp	x8, _PNG_FP_1@GOTPAGE
Lloh4:
	ldr	x8, [x8, _PNG_FP_1@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
	add	x0, sp, #12
	bl	_png_muldiv
	cbz	x0, LBB0_3
; %bb.2:
	ldr	w0, [sp, #12]
	bl	_png_gamma_significant
	cbz	x0, LBB0_6
LBB0_3:
	cmp	w19, #2
	cset	w22, eq
	b.eq	LBB0_7
; %bb.4:
	ldr	w8, [x21]
Lloh6:
	adrp	x9, _PNG_COLORSPACE_FROM_sRGB@GOTPAGE
Lloh7:
	ldr	x9, [x9, _PNG_COLORSPACE_FROM_sRGB@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	and	w8, w9, w8
	cbnz	w8, LBB0_7
; %bb.5:
Lloh9:
	adrp	x8, _PNG_CHUNK_WARNING@GOTPAGE
Lloh10:
	ldr	x8, [x8, _PNG_CHUNK_WARNING@GOTPAGEOFF]
Lloh11:
	ldr	w2, [x8]
Lloh12:
	adrp	x1, l_.str.1@PAGE
Lloh13:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x20
	bl	_png_chunk_report
	cmp	w19, #1
	cset	w22, eq
	b	LBB0_8
LBB0_6:
	mov	w22, #1
	b	LBB0_8
LBB0_7:
Lloh14:
	adrp	x8, _PNG_CHUNK_ERROR@GOTPAGE
Lloh15:
	ldr	x8, [x8, _PNG_CHUNK_ERROR@GOTPAGEOFF]
Lloh16:
	ldr	w2, [x8]
Lloh17:
	adrp	x1, l_.str@PAGE
Lloh18:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	bl	_png_chunk_report
LBB0_8:
	mov	x0, x22
	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	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_PNG_COLORSPACE_HAVE_GAMMA,4,2  ; @PNG_COLORSPACE_HAVE_GAMMA
	.comm	_PNG_FP_1,4,2                   ; @PNG_FP_1
	.comm	_PNG_COLORSPACE_FROM_sRGB,4,2   ; @PNG_COLORSPACE_FROM_sRGB
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"gamma value does not match sRGB"

	.comm	_PNG_CHUNK_ERROR,4,2            ; @PNG_CHUNK_ERROR
l_.str.1:                               ; @.str.1
	.asciz	"gamma value does not match libpng estimate"

	.comm	_PNG_CHUNK_WARNING,4,2          ; @PNG_CHUNK_WARNING
	.no_dead_strip	_png_colorspace_check_gamma
.subsections_via_symbols
