	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	__glfwPlatformSetGammaRamp      ## -- Begin function _glfwPlatformSetGammaRamp
	.p2align	4, 0x90
__glfwPlatformSetGammaRamp:             ## @_glfwPlatformSetGammaRamp
	.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
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %rbx
	movq	__glfw@GOTPCREL(%rip), %r12
	cmpq	$0, 24(%r12)
	je	LBB0_6
## %bb.1:
	cmpl	$0, 16(%r12)
	jne	LBB0_6
## %bb.2:
	movq	%rdi, %r14
	movl	4(%r12), %edi
	movl	(%r14), %esi
	callq	_XRRGetCrtcGammaSize
	cmpl	(%rbx), %eax
	jne	LBB0_3
## %bb.5:
	movl	%eax, %edi
	callq	_XRRAllocGamma
	movq	%rax, %r15
	movl	8(%rax), %edi
	movq	24(%rbx), %rsi
	movl	(%rbx), %edx
	addl	%edx, %edx
	callq	_memcpy
	movl	4(%r15), %edi
	movq	16(%rbx), %rsi
	movl	(%rbx), %edx
	addl	%edx, %edx
	callq	_memcpy
	movl	(%r15), %edi
	movq	8(%rbx), %rsi
	movl	(%rbx), %edx
	addl	%edx, %edx
	callq	_memcpy
	movl	4(%r12), %edi
	movl	(%r14), %esi
	movq	%r15, %rdx
	callq	_XRRSetCrtcGamma
	movq	%r15, %rdi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_XRRFreeGamma                   ## TAILCALL
LBB0_6:
	cmpq	$0, 8(%r12)
	je	LBB0_7
## %bb.8:
	movl	(%r12), %esi
	movl	4(%r12), %edi
	movl	(%rbx), %edx
	movq	24(%rbx), %rcx
	movq	16(%rbx), %r8
	movq	8(%rbx), %r9
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_XF86VidModeSetGammaRamp        ## TAILCALL
LBB0_3:
	movq	_GLFW_PLATFORM_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	jmp	LBB0_4
LBB0_7:
	movq	_GLFW_PLATFORM_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.1(%rip), %rsi
LBB0_4:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	__glfwInputError                ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	__glfw,32,3                     ## @_glfw
	.comm	_GLFW_PLATFORM_ERROR,4,2        ## @GLFW_PLATFORM_ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"X11: Gamma ramp size must match current ramp size"

L_.str.1:                               ## @.str.1
	.asciz	"X11: Gamma ramp access not supported by server"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	__glfwPlatformSetGammaRamp      ; -- Begin function _glfwPlatformSetGammaRamp
	.p2align	2
__glfwPlatformSetGammaRamp:             ; @_glfwPlatformSetGammaRamp
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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	x19, x1
Lloh0:
	adrp	x22, __glfw@GOTPAGE
Lloh1:
	ldr	x22, [x22, __glfw@GOTPAGEOFF]
	ldr	x8, [x22, #24]
	ldr	w9, [x22, #16]
	cmp	x8, #0
	ccmp	w9, #0, #0, ne
	b.eq	LBB0_3
; %bb.1:
	ldr	x8, [x22, #8]
	cbz	x8, LBB0_6
; %bb.2:
	ldp	w1, w0, [x22]
	ldr	w2, [x19]
	ldp	x4, x3, [x19, #16]
	ldr	x5, [x19, #8]
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_XF86VidModeSetGammaRamp
LBB0_3:
	mov	x20, x0
	ldr	w0, [x22, #4]
	ldr	w1, [x20]
	bl	_XRRGetCrtcGammaSize
	ldr	w8, [x19]
	cmp	w0, w8
	b.ne	LBB0_5
; %bb.4:
	bl	_XRRAllocGamma
	mov	x21, x0
	ldr	w0, [x0, #8]
	ldr	x1, [x19, #24]
	ldr	w8, [x19]
	lsl	w2, w8, #1
	bl	_memcpy
	ldr	w0, [x21, #4]
	ldr	x1, [x19, #16]
	ldr	w8, [x19]
	lsl	w2, w8, #1
	bl	_memcpy
	ldr	w0, [x21]
	ldr	x1, [x19, #8]
	ldr	w8, [x19]
	lsl	w2, w8, #1
	bl	_memcpy
	ldr	w0, [x22, #4]
	ldr	w1, [x20]
	mov	x2, x21
	bl	_XRRSetCrtcGamma
	mov	x0, x21
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_XRRFreeGamma
LBB0_5:
Lloh2:
	adrp	x8, _GLFW_PLATFORM_ERROR@GOTPAGE
Lloh3:
	ldr	x8, [x8, _GLFW_PLATFORM_ERROR@GOTPAGEOFF]
Lloh4:
	ldr	w0, [x8]
Lloh5:
	adrp	x1, l_.str@PAGE
Lloh6:
	add	x1, x1, l_.str@PAGEOFF
	b	LBB0_7
LBB0_6:
Lloh7:
	adrp	x8, _GLFW_PLATFORM_ERROR@GOTPAGE
Lloh8:
	ldr	x8, [x8, _GLFW_PLATFORM_ERROR@GOTPAGEOFF]
Lloh9:
	ldr	w0, [x8]
Lloh10:
	adrp	x1, l_.str.1@PAGE
Lloh11:
	add	x1, x1, l_.str.1@PAGEOFF
LBB0_7:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	__glfwInputError
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	__glfw,32,3                     ; @_glfw
	.comm	_GLFW_PLATFORM_ERROR,4,2        ; @GLFW_PLATFORM_ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"X11: Gamma ramp size must match current ramp size"

l_.str.1:                               ; @.str.1
	.asciz	"X11: Gamma ramp access not supported by server"

.subsections_via_symbols
