	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ## -- Begin function convert_gamma_value
LCPI0_0:
	.quad	0x4060000000000000              ## double 128
LCPI0_1:
	.quad	0x3ff0000000000000              ## double 1
LCPI0_2:
	.quad	0x3fe0000000000000              ## double 0.5
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	4, 0x90
_convert_gamma_value:                   ## @convert_gamma_value
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	subq	$16, %rsp
	movq	_PNG_FP_1@GOTPCREL(%rip), %rax
	movsd	(%rax), %xmm1                   ## xmm1 = mem[0],zero
	movapd	%xmm0, %xmm2
	cmpltsd	LCPI0_0(%rip), %xmm2
	andpd	%xmm2, %xmm1
	movsd	LCPI0_1(%rip), %xmm3            ## xmm3 = mem[0],zero
	andnpd	%xmm3, %xmm2
	orpd	%xmm1, %xmm2
	xorpd	%xmm1, %xmm1
	cmpltsd	%xmm0, %xmm1
	andpd	%xmm1, %xmm2
	andnpd	%xmm3, %xmm1
	orpd	%xmm2, %xmm1
	mulsd	%xmm0, %xmm1
	addsd	LCPI0_2(%rip), %xmm1
	roundsd	$9, %xmm1, %xmm1
	movq	_PNG_FP_MAX@GOTPCREL(%rip), %rax
	ucomisd	(%rax), %xmm1
	ja	LBB0_2
## %bb.1:
	movq	_PNG_FP_MIN@GOTPCREL(%rip), %rax
	movsd	(%rax), %xmm0                   ## xmm0 = mem[0],zero
	ucomisd	%xmm1, %xmm0
	jbe	LBB0_3
LBB0_2:
	leaq	L_.str(%rip), %rsi
	movsd	%xmm1, -8(%rbp)                 ## 8-byte Spill
	callq	_png_fixed_error
	movsd	-8(%rbp), %xmm1                 ## 8-byte Reload
                                        ## xmm1 = mem[0],zero
LBB0_3:
	cvttsd2si	%xmm1, %eax
	addq	$16, %rsp
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PNG_FP_1,8,3                   ## @PNG_FP_1
	.comm	_PNG_FP_MAX,8,3                 ## @PNG_FP_MAX
	.comm	_PNG_FP_MIN,8,3                 ## @PNG_FP_MIN
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"gamma value"

	.no_dead_strip	_convert_gamma_value
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function convert_gamma_value
_convert_gamma_value:                   ; @convert_gamma_value
	.cfi_startproc
; %bb.0:
	stp	d9, d8, [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 b8, -24
	.cfi_offset b9, -32
	mov	x8, #4638707616191610880
	fmov	d1, x8
	fcmp	d0, d1
	movi	d1, #0000000000000000
	fccmp	d0, d1, #4, mi
Lloh0:
	adrp	x8, _PNG_FP_1@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PNG_FP_1@GOTPAGEOFF]
Lloh2:
	ldr	d1, [x8]
	fmov	d2, #1.00000000
	fcsel	d1, d1, d2, gt
	fmul	d0, d1, d0
	fmov	d1, #0.50000000
	fadd	d0, d0, d1
	frintm	d8, d0
Lloh3:
	adrp	x8, _PNG_FP_MAX@GOTPAGE
Lloh4:
	ldr	x8, [x8, _PNG_FP_MAX@GOTPAGEOFF]
Lloh5:
	ldr	d0, [x8]
Lloh6:
	adrp	x8, _PNG_FP_MIN@GOTPAGE
Lloh7:
	ldr	x8, [x8, _PNG_FP_MIN@GOTPAGEOFF]
Lloh8:
	ldr	d1, [x8]
	fcmp	d8, d0
	fccmp	d8, d1, #8, le
	b.pl	LBB0_2
; %bb.1:
Lloh9:
	adrp	x1, l_.str@PAGE
Lloh10:
	add	x1, x1, l_.str@PAGEOFF
	bl	_png_fixed_error
LBB0_2:
	fcvtzs	w0, d8
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	d9, d8, [sp], #32               ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_PNG_FP_1,8,3                   ; @PNG_FP_1
	.comm	_PNG_FP_MAX,8,3                 ; @PNG_FP_MAX
	.comm	_PNG_FP_MIN,8,3                 ; @PNG_FP_MIN
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"gamma value"

	.no_dead_strip	_convert_gamma_value
.subsections_via_symbols
