	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_png_colorspace_set_gamma       ## -- Begin function png_colorspace_set_gamma
	.p2align	4, 0x90
_png_colorspace_set_gamma:              ## @png_colorspace_set_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	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movl	%edx, %ebx
	movq	%rsi, %r14
	leal	-625000001(%rbx), %eax
	cmpl	$-624999986, %eax               ## imm = 0xDABF41CE
	ja	LBB0_1
## %bb.5:
	movq	_PNG_COLORSPACE_INVALID@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, (%r14)
	movq	_PNG_CHUNK_WRITE_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	L_.str(%rip), %rsi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_png_chunk_report               ## TAILCALL
LBB0_1:
	movq	_PNG_COLORSPACE_INVALID@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%r14)
	jne	LBB0_4
## %bb.2:
	movq	%r14, %rsi
	movl	%ebx, %edx
	movl	$1, %ecx
	callq	_png_colorspace_check_gamma
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	movl	%ebx, 4(%r14)
	movq	_PNG_COLORSPACE_HAVE_GAMMA@GOTPCREL(%rip), %rax
	movq	_PNG_COLORSPACE_FROM_gAMA@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	orl	%ecx, (%r14)
LBB0_4:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"gamma value out of range"

	.comm	_PNG_COLORSPACE_INVALID,4,2     ## @PNG_COLORSPACE_INVALID
	.comm	_PNG_COLORSPACE_HAVE_GAMMA,4,2  ## @PNG_COLORSPACE_HAVE_GAMMA
	.comm	_PNG_COLORSPACE_FROM_gAMA,4,2   ## @PNG_COLORSPACE_FROM_gAMA
	.comm	_PNG_CHUNK_WRITE_ERROR,4,2      ## @PNG_CHUNK_WRITE_ERROR
	.comm	_PNG_IS_READ_STRUCT,4,2         ## @PNG_IS_READ_STRUCT
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_png_colorspace_set_gamma       ; -- Begin function png_colorspace_set_gamma
	.p2align	2
_png_colorspace_set_gamma:              ; @png_colorspace_set_gamma
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x1
	mov	w8, #16831
	movk	w8, #55999, lsl #16
	add	w9, w8, #16
	add	w8, w2, w8
	cmp	w8, w9
	b.hs	LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _PNG_COLORSPACE_INVALID@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PNG_COLORSPACE_INVALID@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	ldr	w9, [x19]
	orr	w8, w9, w8
	str	w8, [x19]
Lloh3:
	adrp	x8, _PNG_CHUNK_WRITE_ERROR@GOTPAGE
Lloh4:
	ldr	x8, [x8, _PNG_CHUNK_WRITE_ERROR@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_png_chunk_report
LBB0_2:
	ldr	w8, [x19]
Lloh8:
	adrp	x9, _PNG_COLORSPACE_INVALID@GOTPAGE
Lloh9:
	ldr	x9, [x9, _PNG_COLORSPACE_INVALID@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
	tst	w9, w8
	b.ne	LBB0_5
; %bb.3:
	mov	x20, x2
	mov	x1, x19
	mov	w3, #1
	bl	_png_colorspace_check_gamma
	cbz	x0, LBB0_5
; %bb.4:
Lloh11:
	adrp	x8, _PNG_COLORSPACE_HAVE_GAMMA@GOTPAGE
Lloh12:
	ldr	x8, [x8, _PNG_COLORSPACE_HAVE_GAMMA@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
Lloh14:
	adrp	x9, _PNG_COLORSPACE_FROM_gAMA@GOTPAGE
Lloh15:
	ldr	x9, [x9, _PNG_COLORSPACE_FROM_gAMA@GOTPAGEOFF]
Lloh16:
	ldr	w9, [x9]
	orr	w8, w9, w8
	ldr	w9, [x19]
	orr	w8, w8, w9
	stp	w8, w20, [x19]
LBB0_5:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"gamma value out of range"

	.comm	_PNG_COLORSPACE_INVALID,4,2     ; @PNG_COLORSPACE_INVALID
	.comm	_PNG_COLORSPACE_HAVE_GAMMA,4,2  ; @PNG_COLORSPACE_HAVE_GAMMA
	.comm	_PNG_COLORSPACE_FROM_gAMA,4,2   ; @PNG_COLORSPACE_FROM_gAMA
	.comm	_PNG_CHUNK_WRITE_ERROR,4,2      ; @PNG_CHUNK_WRITE_ERROR
	.comm	_PNG_IS_READ_STRUCT,4,2         ; @PNG_IS_READ_STRUCT
.subsections_via_symbols
