	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_GLimp_SetGamma                 ## -- Begin function GLimp_SetGamma
	.p2align	4, 0x90
_GLimp_SetGamma:                        ## @GLimp_SetGamma
	.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
	subq	$3088, %rsp                     ## imm = 0xC10
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -24(%rbp)
	movq	_glConfig@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	je	LBB0_30
## %bb.1:
	movq	_r_ignorehwgamma@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	$0, (%rax)
	jg	LBB0_30
## %bb.2:
	xorl	%eax, %eax
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	pmovzxbd	(%rdi,%rax), %xmm0              ## xmm0 = mem[0],zero,zero,zero,mem[1],zero,zero,zero,mem[2],zero,zero,zero,mem[3],zero,zero,zero
	movdqa	%xmm0, %xmm1
	pslld	$8, %xmm1
	por	%xmm0, %xmm1
	movdqa	%xmm1, -3104(%rbp,%rax,4)
	pmovzxbd	(%rsi,%rax), %xmm0              ## xmm0 = mem[0],zero,zero,zero,mem[1],zero,zero,zero,mem[2],zero,zero,zero,mem[3],zero,zero,zero
	movdqa	%xmm0, %xmm1
	pslld	$8, %xmm1
	por	%xmm0, %xmm1
	movdqa	%xmm1, -2080(%rbp,%rax,4)
	pmovzxbd	(%rdx,%rax), %xmm0              ## xmm0 = mem[0],zero,zero,zero,mem[1],zero,zero,zero,mem[2],zero,zero,zero,mem[3],zero,zero,zero
	movdqa	%xmm0, %xmm1
	pslld	$8, %xmm1
	por	%xmm0, %xmm1
	movdqa	%xmm1, -1056(%rbp,%rax,4)
	addq	$4, %rax
	cmpq	$256, %rax                      ## imm = 0x100
	jne	LBB0_3
## %bb.4:
	movl	-3104(%rbp), %ecx
	xorl	%eax, %eax
	jmp	LBB0_5
	.p2align	4, 0x90
LBB0_11:                                ##   in Loop: Header=BB0_5 Depth=1
	addq	$3, %rax
	cmpq	$255, %rax
	je	LBB0_12
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movl	-3100(%rbp,%rax,4), %edx
	cmpl	%ecx, %edx
	jge	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	movl	%ecx, -3100(%rbp,%rax,4)
	movl	%ecx, %edx
LBB0_7:                                 ##   in Loop: Header=BB0_5 Depth=1
	movl	-3096(%rbp,%rax,4), %esi
	cmpl	%edx, %esi
	jge	LBB0_9
## %bb.8:                               ##   in Loop: Header=BB0_5 Depth=1
	movl	%edx, -3096(%rbp,%rax,4)
	movl	%edx, %esi
LBB0_9:                                 ##   in Loop: Header=BB0_5 Depth=1
	movl	-3092(%rbp,%rax,4), %ecx
	cmpl	%esi, %ecx
	jge	LBB0_11
## %bb.10:                              ##   in Loop: Header=BB0_5 Depth=1
	movl	%esi, -3092(%rbp,%rax,4)
	movl	%esi, %ecx
	jmp	LBB0_11
LBB0_12:
	leaq	-2080(%rbp), %rdx
	movl	-2080(%rbp), %ecx
	xorl	%eax, %eax
	jmp	LBB0_13
	.p2align	4, 0x90
LBB0_19:                                ##   in Loop: Header=BB0_13 Depth=1
	addq	$3, %rax
	cmpq	$255, %rax
	je	LBB0_20
LBB0_13:                                ## =>This Inner Loop Header: Depth=1
	movl	-2076(%rbp,%rax,4), %esi
	cmpl	%ecx, %esi
	jge	LBB0_15
## %bb.14:                              ##   in Loop: Header=BB0_13 Depth=1
	movl	%ecx, -2076(%rbp,%rax,4)
	movl	%ecx, %esi
LBB0_15:                                ##   in Loop: Header=BB0_13 Depth=1
	movl	-2072(%rbp,%rax,4), %edi
	cmpl	%esi, %edi
	jge	LBB0_17
## %bb.16:                              ##   in Loop: Header=BB0_13 Depth=1
	movl	%esi, -2072(%rbp,%rax,4)
	movl	%esi, %edi
LBB0_17:                                ##   in Loop: Header=BB0_13 Depth=1
	movl	-2068(%rbp,%rax,4), %ecx
	cmpl	%edi, %ecx
	jge	LBB0_19
## %bb.18:                              ##   in Loop: Header=BB0_13 Depth=1
	movl	%edi, -2068(%rbp,%rax,4)
	movl	%edi, %ecx
	jmp	LBB0_19
LBB0_20:
	leaq	-1056(%rbp), %rcx
	movl	-1056(%rbp), %ebx
	xorl	%eax, %eax
	jmp	LBB0_21
	.p2align	4, 0x90
LBB0_27:                                ##   in Loop: Header=BB0_21 Depth=1
	addq	$3, %rax
	cmpq	$255, %rax
	je	LBB0_28
LBB0_21:                                ## =>This Inner Loop Header: Depth=1
	movl	-1052(%rbp,%rax,4), %edi
	cmpl	%ebx, %edi
	jge	LBB0_23
## %bb.22:                              ##   in Loop: Header=BB0_21 Depth=1
	movl	%ebx, -1052(%rbp,%rax,4)
	movl	%ebx, %edi
LBB0_23:                                ##   in Loop: Header=BB0_21 Depth=1
	movl	-1048(%rbp,%rax,4), %esi
	cmpl	%edi, %esi
	jge	LBB0_25
## %bb.24:                              ##   in Loop: Header=BB0_21 Depth=1
	movl	%edi, -1048(%rbp,%rax,4)
	movl	%edi, %esi
LBB0_25:                                ##   in Loop: Header=BB0_21 Depth=1
	movl	-1044(%rbp,%rax,4), %ebx
	cmpl	%esi, %ebx
	jge	LBB0_27
## %bb.26:                              ##   in Loop: Header=BB0_21 Depth=1
	movl	%esi, -1044(%rbp,%rax,4)
	movl	%esi, %ebx
	jmp	LBB0_27
LBB0_28:
	movq	_SDL_window@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	-3104(%rbp), %rsi
	callq	_SDL_SetWindowGammaRamp
	testq	%rax, %rax
	jns	LBB0_30
## %bb.29:
	movq	_ri@GOTPCREL(%rip), %rax
	movq	(%rax), %r14
	movq	_PRINT_DEVELOPER@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	xorl	%eax, %eax
	callq	_SDL_GetError
	leaq	L_.str(%rip), %rsi
	movl	%ebx, %edi
	movl	%eax, %edx
	callq	*%r14
LBB0_30:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-24(%rbp), %rax
	jne	LBB0_32
## %bb.31:
	addq	$3088, %rsp                     ## imm = 0xC10
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_32:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_glConfig,4,2                   ## @glConfig
	.comm	_r_ignorehwgamma,8,3            ## @r_ignorehwgamma
	.comm	_SDL_window,4,2                 ## @SDL_window
	.comm	_ri,8,3                         ## @ri
	.comm	_PRINT_DEVELOPER,4,2            ## @PRINT_DEVELOPER
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"SDL_SetWindowGammaRamp() failed: %s\n"

	.comm	_VER_PLATFORM_WIN32_NT,8,3      ## @VER_PLATFORM_WIN32_NT
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ; -- Begin function GLimp_SetGamma
lCPI0_0:
	.byte	0                               ; 0x0
	.byte	255                             ; 0xff
	.byte	255                             ; 0xff
	.byte	255                             ; 0xff
	.byte	1                               ; 0x1
	.byte	255                             ; 0xff
	.byte	255                             ; 0xff
	.byte	255                             ; 0xff
	.byte	2                               ; 0x2
	.byte	255                             ; 0xff
	.byte	255                             ; 0xff
	.byte	255                             ; 0xff
	.byte	3                               ; 0x3
	.byte	255                             ; 0xff
	.byte	255                             ; 0xff
	.byte	255                             ; 0xff
lCPI0_1:
	.byte	4                               ; 0x4
	.byte	255                             ; 0xff
	.byte	255                             ; 0xff
	.byte	255                             ; 0xff
	.byte	5                               ; 0x5
	.byte	255                             ; 0xff
	.byte	255                             ; 0xff
	.byte	255                             ; 0xff
	.byte	6                               ; 0x6
	.byte	255                             ; 0xff
	.byte	255                             ; 0xff
	.byte	255                             ; 0xff
	.byte	7                               ; 0x7
	.byte	255                             ; 0xff
	.byte	255                             ; 0xff
	.byte	255                             ; 0xff
lCPI0_2:
	.byte	8                               ; 0x8
	.byte	255                             ; 0xff
	.byte	255                             ; 0xff
	.byte	255                             ; 0xff
	.byte	9                               ; 0x9
	.byte	255                             ; 0xff
	.byte	255                             ; 0xff
	.byte	255                             ; 0xff
	.byte	10                              ; 0xa
	.byte	255                             ; 0xff
	.byte	255                             ; 0xff
	.byte	255                             ; 0xff
	.byte	11                              ; 0xb
	.byte	255                             ; 0xff
	.byte	255                             ; 0xff
	.byte	255                             ; 0xff
lCPI0_3:
	.byte	12                              ; 0xc
	.byte	255                             ; 0xff
	.byte	255                             ; 0xff
	.byte	255                             ; 0xff
	.byte	13                              ; 0xd
	.byte	255                             ; 0xff
	.byte	255                             ; 0xff
	.byte	255                             ; 0xff
	.byte	14                              ; 0xe
	.byte	255                             ; 0xff
	.byte	255                             ; 0xff
	.byte	255                             ; 0xff
	.byte	15                              ; 0xf
	.byte	255                             ; 0xff
	.byte	255                             ; 0xff
	.byte	255                             ; 0xff
	.section	__TEXT,__text,regular,pure_instructions
	.globl	_GLimp_SetGamma
	.p2align	2
_GLimp_SetGamma:                        ; @GLimp_SetGamma
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [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 w27, -40
	.cfi_offset w28, -48
	sub	sp, sp, #3088
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-40]
Lloh3:
	adrp	x8, _glConfig@GOTPAGE
Lloh4:
	ldr	x8, [x8, _glConfig@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	cbz	w8, LBB0_18
; %bb.1:
Lloh6:
	adrp	x8, _r_ignorehwgamma@GOTPAGE
Lloh7:
	ldr	x8, [x8, _r_ignorehwgamma@GOTPAGEOFF]
Lloh8:
	ldr	x8, [x8]
	ldr	x8, [x8]
	cmp	x8, #0
	b.gt	LBB0_18
; %bb.2:
	mov	x8, #0
	add	x9, sp, #8
Lloh9:
	adrp	x10, lCPI0_0@PAGE
Lloh10:
	ldr	q0, [x10, lCPI0_0@PAGEOFF]
Lloh11:
	adrp	x10, lCPI0_1@PAGE
Lloh12:
	ldr	q1, [x10, lCPI0_1@PAGEOFF]
Lloh13:
	adrp	x10, lCPI0_2@PAGE
Lloh14:
	ldr	q2, [x10, lCPI0_2@PAGEOFF]
Lloh15:
	adrp	x10, lCPI0_3@PAGE
Lloh16:
	ldr	q3, [x10, lCPI0_3@PAGEOFF]
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	q4, [x0, x8]
	tbl.16b	v5, { v4 }, v0
	tbl.16b	v6, { v4 }, v1
	tbl.16b	v7, { v4 }, v2
	tbl.16b	v4, { v4 }, v3
	shl.4s	v16, v4, #8
	shl.4s	v17, v7, #8
	shl.4s	v18, v6, #8
	shl.4s	v19, v5, #8
	orr.16b	v5, v19, v5
	orr.16b	v6, v18, v6
	orr.16b	v7, v17, v7
	orr.16b	v4, v16, v4
	stp	q7, q4, [x9, #32]
	stp	q5, q6, [x9]
	ldr	q4, [x1, x8]
	tbl.16b	v5, { v4 }, v0
	tbl.16b	v6, { v4 }, v1
	tbl.16b	v7, { v4 }, v2
	tbl.16b	v4, { v4 }, v3
	shl.4s	v16, v4, #8
	shl.4s	v17, v7, #8
	shl.4s	v18, v6, #8
	shl.4s	v19, v5, #8
	orr.16b	v5, v19, v5
	orr.16b	v6, v18, v6
	orr.16b	v7, v17, v7
	orr.16b	v4, v16, v4
	str	q4, [x9, #1072]
	str	q7, [x9, #1056]
	str	q6, [x9, #1040]
	str	q5, [x9, #1024]
	ldr	q4, [x2, x8]
	tbl.16b	v5, { v4 }, v0
	tbl.16b	v6, { v4 }, v1
	tbl.16b	v7, { v4 }, v2
	tbl.16b	v4, { v4 }, v3
	shl.4s	v16, v4, #8
	shl.4s	v17, v7, #8
	shl.4s	v18, v6, #8
	shl.4s	v19, v5, #8
	orr.16b	v5, v19, v5
	orr.16b	v6, v18, v6
	orr.16b	v7, v17, v7
	orr.16b	v4, v16, v4
	str	q4, [x9, #2096]
	str	q7, [x9, #2080]
	str	q6, [x9, #2064]
	str	q5, [x9, #2048]
	add	x8, x8, #16
	add	x9, x9, #64
	cmp	x8, #256
	b.ne	LBB0_3
; %bb.4:
	ldr	w10, [sp, #8]
	mov	w8, #4
	add	x9, sp, #8
	b	LBB0_6
LBB0_5:                                 ;   in Loop: Header=BB0_6 Depth=1
	add	x8, x8, #4
	mov	x10, x11
	cmp	x8, #1024
	b.eq	LBB0_8
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w11, [x9, x8]
	cmp	w11, w10
	b.ge	LBB0_5
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	str	w10, [x9, x8]
	mov	x11, x10
	b	LBB0_5
LBB0_8:
	mov	x8, #0
	add	x9, sp, #8
	add	x2, x9, #1024
	ldr	w10, [sp, #1032]
	add	x9, x9, #1028
	b	LBB0_10
LBB0_9:                                 ;   in Loop: Header=BB0_10 Depth=1
	add	x8, x8, #4
	mov	x10, x11
	cmp	x8, #1020
	b.eq	LBB0_12
LBB0_10:                                ; =>This Inner Loop Header: Depth=1
	ldr	w11, [x9, x8]
	cmp	w11, w10
	b.ge	LBB0_9
; %bb.11:                               ;   in Loop: Header=BB0_10 Depth=1
	str	w10, [x9, x8]
	mov	x11, x10
	b	LBB0_9
LBB0_12:
	mov	x8, #0
	add	x9, sp, #8
	add	x3, x9, #2048
	ldr	w10, [sp, #2056]
	add	x9, x9, #2052
	b	LBB0_14
LBB0_13:                                ;   in Loop: Header=BB0_14 Depth=1
	add	x8, x8, #4
	mov	x10, x11
	cmp	x8, #1020
	b.eq	LBB0_16
LBB0_14:                                ; =>This Inner Loop Header: Depth=1
	ldr	w11, [x9, x8]
	cmp	w11, w10
	b.ge	LBB0_13
; %bb.15:                               ;   in Loop: Header=BB0_14 Depth=1
	str	w10, [x9, x8]
	mov	x11, x10
	b	LBB0_13
LBB0_16:
Lloh17:
	adrp	x8, _SDL_window@GOTPAGE
Lloh18:
	ldr	x8, [x8, _SDL_window@GOTPAGEOFF]
Lloh19:
	ldr	w0, [x8]
	add	x1, sp, #8
	bl	_SDL_SetWindowGammaRamp
	tbz	x0, #63, LBB0_18
; %bb.17:
Lloh20:
	adrp	x8, _ri@GOTPAGE
Lloh21:
	ldr	x8, [x8, _ri@GOTPAGEOFF]
Lloh22:
	ldr	x20, [x8]
Lloh23:
	adrp	x8, _PRINT_DEVELOPER@GOTPAGE
Lloh24:
	ldr	x8, [x8, _PRINT_DEVELOPER@GOTPAGEOFF]
Lloh25:
	ldr	w19, [x8]
	bl	_SDL_GetError
	mov	x2, x0
Lloh26:
	adrp	x1, l_.str@PAGE
Lloh27:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	blr	x20
LBB0_18:
	ldur	x8, [x29, #-40]
Lloh28:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh29:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh30:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_20
; %bb.19:
	add	sp, sp, #3088
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_20:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdr	Lloh15, Lloh16
	.loh AdrpAdrp	Lloh13, Lloh15
	.loh AdrpLdr	Lloh13, Lloh14
	.loh AdrpAdrp	Lloh11, Lloh13
	.loh AdrpLdr	Lloh11, Lloh12
	.loh AdrpAdrp	Lloh9, Lloh11
	.loh AdrpLdr	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.cfi_endproc
                                        ; -- End function
	.comm	_glConfig,4,2                   ; @glConfig
	.comm	_r_ignorehwgamma,8,3            ; @r_ignorehwgamma
	.comm	_SDL_window,4,2                 ; @SDL_window
	.comm	_ri,8,3                         ; @ri
	.comm	_PRINT_DEVELOPER,4,2            ; @PRINT_DEVELOPER
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"SDL_SetWindowGammaRamp() failed: %s\n"

	.comm	_VER_PLATFORM_WIN32_NT,8,3      ; @VER_PLATFORM_WIN32_NT
.subsections_via_symbols
