	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal4,4byte_literals
	.p2align	2                               ## -- Begin function glfwSetGamma
LCPI0_0:
	.long	0x3f800000                      ## float 1
LCPI0_1:
	.long	0x477fff00                      ## float 65535
LCPI0_2:
	.long	0x3f000000                      ## float 0.5
LCPI0_3:
	.long	0x00000000                      ## float 0
	.section	__TEXT,__text,regular,pure_instructions
	.globl	_glfwSetGamma
	.p2align	4, 0x90
_glfwSetGamma:                          ## @glfwSetGamma
	.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	%r13
	pushq	%r12
	pushq	%rbx
	subq	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movss	%xmm0, -44(%rbp)                ## 4-byte Spill
	movq	%rdi, %r14
	xorl	%edi, %edi
	testq	%r14, %r14
	setne	%dil
	callq	_assert
	xorps	%xmm1, %xmm1
	xorl	%edi, %edi
	movss	-44(%rbp), %xmm0                ## 4-byte Reload
                                        ## xmm0 = mem[0],zero,zero,zero
	ucomiss	%xmm1, %xmm0
	seta	%dil
	callq	_assert
	movq	_FLT_MAX@GOTPCREL(%rip), %rbx
	movss	(%rbx), %xmm0                   ## xmm0 = mem[0],zero,zero,zero
	xorl	%edi, %edi
	ucomiss	-44(%rbp), %xmm0                ## 4-byte Folded Reload
	setae	%dil
	callq	_assert
	xorl	%eax, %eax
	callq	__GLFW_REQUIRE_INIT
	movss	-44(%rbp), %xmm0                ## 4-byte Reload
                                        ## xmm0 = mem[0],zero,zero,zero
	ucomiss	LCPI0_3(%rip), %xmm0
	jbe	LBB0_9
## %bb.1:
	ucomiss	(%rbx), %xmm0
	ja	LBB0_9
## %bb.2:
	movq	%r14, %rdi
	callq	_glfwGetGammaRamp
	testq	%rax, %rax
	je	LBB0_8
## %bb.3:
	movq	%rax, %r12
	movl	(%rax), %ebx
	movl	%ebx, %edi
	movl	$2, %esi
	callq	_calloc
	movq	%rax, %r15
	testl	%ebx, %ebx
	je	LBB0_4
## %bb.5:
	movss	LCPI0_0(%rip), %xmm0            ## xmm0 = mem[0],zero,zero,zero
	divss	-44(%rbp), %xmm0                ## 4-byte Folded Reload
	movss	%xmm0, -44(%rbp)                ## 4-byte Spill
	xorl	%r13d, %r13d
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movl	%r13d, %eax
	xorps	%xmm0, %xmm0
	cvtsi2ss	%rax, %xmm0
	decl	%ebx
	xorps	%xmm1, %xmm1
	cvtsi2ss	%rbx, %xmm1
	divss	%xmm1, %xmm0
	movss	-44(%rbp), %xmm1                ## 4-byte Reload
                                        ## xmm1 = mem[0],zero,zero,zero
	callq	_powf
	movss	LCPI0_1(%rip), %xmm1            ## xmm1 = mem[0],zero,zero,zero
	mulss	%xmm1, %xmm0
	addss	LCPI0_2(%rip), %xmm0
	callq	__glfw_fminf
	cvttss2si	%xmm0, %eax
	movw	%ax, (%r15,%r13,2)
	incq	%r13
	movl	(%r12), %ebx
	cmpq	%rbx, %r13
	jb	LBB0_6
	jmp	LBB0_7
LBB0_9:
	movq	_GLFW_INVALID_VALUE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	__glfwInputError                ## TAILCALL
LBB0_4:
	xorl	%ebx, %ebx
LBB0_7:
	movq	%r15, -72(%rbp)
	movq	%r15, -64(%rbp)
	movq	%r15, -56(%rbp)
	movl	%ebx, -80(%rbp)
	leaq	-80(%rbp), %rsi
	movq	%r14, %rdi
	callq	_glfwSetGammaRamp
	movq	%r15, %rdi
	callq	_free
LBB0_8:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_FLT_MAX,4,2                    ## @FLT_MAX
	.comm	_GLFW_INVALID_VALUE,4,2         ## @GLFW_INVALID_VALUE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Invalid gamma value %f"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_glfwSetGamma                   ; -- Begin function glfwSetGamma
	.p2align	2
_glfwSetGamma:                          ; @glfwSetGamma
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	d9, d8, [sp, #32]               ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset b8, -72
	.cfi_offset b9, -80
	fmov	s8, s0
	mov	x19, x0
	cmp	x0, #0
	cset	w0, ne
	bl	_assert
	fcmp	s8, #0.0
	cset	w0, gt
	bl	_assert
Lloh0:
	adrp	x20, _FLT_MAX@GOTPAGE
Lloh1:
	ldr	x20, [x20, _FLT_MAX@GOTPAGEOFF]
	ldr	s0, [x20]
	fcmp	s0, s8
	cset	w0, ge
	bl	_assert
	bl	__GLFW_REQUIRE_INIT
	fcmp	s8, #0.0
	ldr	s0, [x20]
	fccmp	s0, s8, #8, gt
	b.pl	LBB0_2
; %bb.1:
Lloh2:
	adrp	x8, _GLFW_INVALID_VALUE@GOTPAGE
Lloh3:
	ldr	x8, [x8, _GLFW_INVALID_VALUE@GOTPAGEOFF]
Lloh4:
	ldr	w0, [x8]
Lloh5:
	adrp	x1, l_.str@PAGE
Lloh6:
	add	x1, x1, l_.str@PAGEOFF
	fmov	s0, s8
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	d9, d8, [sp, #32]               ; 16-byte Folded Reload
	add	sp, sp, #112
	b	__glfwInputError
LBB0_2:
	mov	x0, x19
	bl	_glfwGetGammaRamp
	cbz	x0, LBB0_7
; %bb.3:
	mov	x21, x0
	ldr	w22, [x0]
	mov	x0, x22
	mov	w1, #2
	bl	_calloc
	mov	x20, x0
	cbz	w22, LBB0_6
; %bb.4:
	mov	x23, #0
	fmov	s0, #1.00000000
	mov	w24, #65280
	movk	w24, #18303, lsl #16
	fmov	s9, #0.50000000
	fdiv	s8, s0, s8
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ucvtf	s0, w23
	sub	w8, w22, #1
	ucvtf	s1, w8
	fdiv	s0, s0, s1
	fmov	s1, s8
	bl	_powf
	fmov	s1, w24
	fmadd	s0, s0, s1, s9
	bl	__glfw_fminf
	fcvtzs	w8, s0
	strh	w8, [x20, x23, lsl #1]
	add	x23, x23, #1
	ldr	w22, [x21]
	cmp	x23, x22
	b.lo	LBB0_5
LBB0_6:
	stp	x20, x20, [sp, #8]
	str	x20, [sp, #24]
	str	w22, [sp]
	mov	x1, sp
	mov	x0, x19
	bl	_glfwSetGammaRamp
	mov	x0, x20
	bl	_free
LBB0_7:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	d9, d8, [sp, #32]               ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_FLT_MAX,4,2                    ; @FLT_MAX
	.comm	_GLFW_INVALID_VALUE,4,2         ; @GLFW_INVALID_VALUE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Invalid gamma value %f"

.subsections_via_symbols
