	.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	%rbx
	subq	$1560, %rsp                     ## imm = 0x618
	.cfi_offset %rbx, -24
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -16(%rbp)
	movq	_glConfig@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	je	LBB0_57
## %bb.1:
	movq	_r_ignorehwgamma@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	$0, (%rax)
	jne	LBB0_57
## %bb.2:
	movq	_glw_state@GOTPCREL(%rip), %rbx
	cmpl	$0, (%rbx)
	je	LBB0_57
## %bb.3:
	xorl	%eax, %eax
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	pmovzxbw	(%rdi,%rax), %xmm0              ## xmm0 = mem[0],zero,mem[1],zero,mem[2],zero,mem[3],zero,mem[4],zero,mem[5],zero,mem[6],zero,mem[7],zero
	movdqa	%xmm0, %xmm1
	psllw	$8, %xmm1
	por	%xmm0, %xmm1
	movdqa	%xmm1, -1552(%rbp,%rax,2)
	pmovzxbw	(%rsi,%rax), %xmm0              ## xmm0 = mem[0],zero,mem[1],zero,mem[2],zero,mem[3],zero,mem[4],zero,mem[5],zero,mem[6],zero,mem[7],zero
	movdqa	%xmm0, %xmm1
	psllw	$8, %xmm1
	por	%xmm0, %xmm1
	movdqa	%xmm1, -1040(%rbp,%rax,2)
	pmovzxbw	(%rdx,%rax), %xmm0              ## xmm0 = mem[0],zero,mem[1],zero,mem[2],zero,mem[3],zero,mem[4],zero,mem[5],zero,mem[6],zero,mem[7],zero
	movdqa	%xmm0, %xmm1
	psllw	$8, %xmm1
	por	%xmm0, %xmm1
	movdqa	%xmm1, -528(%rbp,%rax,2)
	addq	$8, %rax
	cmpq	$256, %rax                      ## imm = 0x100
	jne	LBB0_4
## %bb.5:
	movl	$16, -1568(%rbp)
	leaq	-1568(%rbp), %rdi
	callq	_GetVersionEx
	cmpl	$5, -1564(%rbp)
	jne	LBB0_31
## %bb.6:
	movq	-1560(%rbp), %rax
	movq	_VER_PLATFORM_WIN32_NT@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_31
## %bb.7:
	leaq	L_.str(%rip), %rdi
	callq	_Com_DPrintf
	leaq	-1550(%rbp), %rax
	movl	$32768, %ecx                    ## imm = 0x8000
	jmp	LBB0_8
	.p2align	4, 0x90
LBB0_12:                                ##   in Loop: Header=BB0_8 Depth=1
	addq	$4, %rax
	addq	$512, %rcx                      ## imm = 0x200
	cmpq	$65536, %rcx                    ## imm = 0x10000
	je	LBB0_13
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	movzwl	-2(%rax), %edx
	cmpq	%rdx, %rcx
	jae	LBB0_10
## %bb.9:                               ##   in Loop: Header=BB0_8 Depth=1
	movw	%cx, -2(%rax)
LBB0_10:                                ##   in Loop: Header=BB0_8 Depth=1
	movzwl	(%rax), %edx
	leaq	256(%rcx), %rsi
	cmpq	%rdx, %rsi
	jae	LBB0_12
## %bb.11:                              ##   in Loop: Header=BB0_8 Depth=1
	leal	256(%rcx), %edx
	movw	%dx, (%rax)
	jmp	LBB0_12
LBB0_31:
	leaq	L_.str.1(%rip), %rdi
	callq	_Com_DPrintf
LBB0_32:
	movzwl	-1552(%rbp), %ecx
	xorl	%eax, %eax
	jmp	LBB0_33
	.p2align	4, 0x90
LBB0_39:                                ##   in Loop: Header=BB0_33 Depth=1
	addq	$3, %rax
	cmpq	$255, %rax
	je	LBB0_40
LBB0_33:                                ## =>This Inner Loop Header: Depth=1
	movzwl	-1550(%rbp,%rax,2), %edx
	cmpw	%cx, %dx
	jae	LBB0_35
## %bb.34:                              ##   in Loop: Header=BB0_33 Depth=1
	movw	%cx, -1550(%rbp,%rax,2)
	movl	%ecx, %edx
LBB0_35:                                ##   in Loop: Header=BB0_33 Depth=1
	movzwl	-1548(%rbp,%rax,2), %esi
	cmpw	%dx, %si
	jae	LBB0_37
## %bb.36:                              ##   in Loop: Header=BB0_33 Depth=1
	movw	%dx, -1548(%rbp,%rax,2)
	movl	%edx, %esi
LBB0_37:                                ##   in Loop: Header=BB0_33 Depth=1
	movzwl	-1546(%rbp,%rax,2), %ecx
	cmpw	%si, %cx
	jae	LBB0_39
## %bb.38:                              ##   in Loop: Header=BB0_33 Depth=1
	movw	%si, -1546(%rbp,%rax,2)
	movl	%esi, %ecx
	jmp	LBB0_39
LBB0_40:
	movzwl	-1040(%rbp), %ecx
	xorl	%eax, %eax
	jmp	LBB0_41
	.p2align	4, 0x90
LBB0_47:                                ##   in Loop: Header=BB0_41 Depth=1
	addq	$3, %rax
	cmpq	$255, %rax
	je	LBB0_48
LBB0_41:                                ## =>This Inner Loop Header: Depth=1
	movzwl	-1038(%rbp,%rax,2), %edx
	cmpw	%cx, %dx
	jae	LBB0_43
## %bb.42:                              ##   in Loop: Header=BB0_41 Depth=1
	movw	%cx, -1038(%rbp,%rax,2)
	movl	%ecx, %edx
LBB0_43:                                ##   in Loop: Header=BB0_41 Depth=1
	movzwl	-1036(%rbp,%rax,2), %esi
	cmpw	%dx, %si
	jae	LBB0_45
## %bb.44:                              ##   in Loop: Header=BB0_41 Depth=1
	movw	%dx, -1036(%rbp,%rax,2)
	movl	%edx, %esi
LBB0_45:                                ##   in Loop: Header=BB0_41 Depth=1
	movzwl	-1034(%rbp,%rax,2), %ecx
	cmpw	%si, %cx
	jae	LBB0_47
## %bb.46:                              ##   in Loop: Header=BB0_41 Depth=1
	movw	%si, -1034(%rbp,%rax,2)
	movl	%esi, %ecx
	jmp	LBB0_47
LBB0_48:
	movzwl	-528(%rbp), %ecx
	xorl	%eax, %eax
	jmp	LBB0_49
	.p2align	4, 0x90
LBB0_55:                                ##   in Loop: Header=BB0_49 Depth=1
	addq	$3, %rax
	cmpq	$255, %rax
	je	LBB0_56
LBB0_49:                                ## =>This Inner Loop Header: Depth=1
	movzwl	-526(%rbp,%rax,2), %edx
	cmpw	%cx, %dx
	jae	LBB0_51
## %bb.50:                              ##   in Loop: Header=BB0_49 Depth=1
	movw	%cx, -526(%rbp,%rax,2)
	movl	%ecx, %edx
LBB0_51:                                ##   in Loop: Header=BB0_49 Depth=1
	movzwl	-524(%rbp,%rax,2), %esi
	cmpw	%dx, %si
	jae	LBB0_53
## %bb.52:                              ##   in Loop: Header=BB0_49 Depth=1
	movw	%dx, -524(%rbp,%rax,2)
	movl	%edx, %esi
LBB0_53:                                ##   in Loop: Header=BB0_49 Depth=1
	movzwl	-522(%rbp,%rax,2), %ecx
	cmpw	%si, %cx
	jae	LBB0_55
## %bb.54:                              ##   in Loop: Header=BB0_49 Depth=1
	movw	%si, -522(%rbp,%rax,2)
	movl	%esi, %ecx
	jmp	LBB0_55
LBB0_56:
	movl	(%rbx), %edi
	leaq	-1552(%rbp), %rsi
	callq	_qwglSetDeviceGammaRamp3DFX
LBB0_57:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-16(%rbp), %rax
	jne	LBB0_59
## %bb.58:
	addq	$1560, %rsp                     ## imm = 0x618
	popq	%rbx
	popq	%rbp
	retq
LBB0_13:
	movzwl	-1298(%rbp), %eax
	cmpl	$65025, %eax                    ## imm = 0xFE01
	jb	LBB0_15
## %bb.14:
	movw	$-512, -1298(%rbp)              ## imm = 0xFE00
LBB0_15:
	leaq	-1038(%rbp), %rax
	movl	$33024, %ecx                    ## imm = 0x8100
	jmp	LBB0_16
	.p2align	4, 0x90
LBB0_20:                                ##   in Loop: Header=BB0_16 Depth=1
	addq	$4, %rax
	addq	$512, %rcx                      ## imm = 0x200
	cmpq	$65792, %rcx                    ## imm = 0x10100
	je	LBB0_21
LBB0_16:                                ## =>This Inner Loop Header: Depth=1
	movzwl	-2(%rax), %edx
	leaq	-256(%rcx), %rsi
	cmpq	%rdx, %rsi
	jae	LBB0_18
## %bb.17:                              ##   in Loop: Header=BB0_16 Depth=1
	leal	-256(%rcx), %edx
	movw	%dx, -2(%rax)
LBB0_18:                                ##   in Loop: Header=BB0_16 Depth=1
	movzwl	(%rax), %edx
	cmpq	%rdx, %rcx
	jae	LBB0_20
## %bb.19:                              ##   in Loop: Header=BB0_16 Depth=1
	movw	%cx, (%rax)
	jmp	LBB0_20
LBB0_21:
	movzwl	-786(%rbp), %eax
	cmpl	$65025, %eax                    ## imm = 0xFE01
	jb	LBB0_23
## %bb.22:
	movw	$-512, -786(%rbp)               ## imm = 0xFE00
LBB0_23:
	leaq	-526(%rbp), %rax
	movl	$33024, %ecx                    ## imm = 0x8100
	jmp	LBB0_24
	.p2align	4, 0x90
LBB0_28:                                ##   in Loop: Header=BB0_24 Depth=1
	addq	$4, %rax
	addq	$512, %rcx                      ## imm = 0x200
	cmpq	$65792, %rcx                    ## imm = 0x10100
	je	LBB0_29
LBB0_24:                                ## =>This Inner Loop Header: Depth=1
	movzwl	-2(%rax), %edx
	leaq	-256(%rcx), %rsi
	cmpq	%rdx, %rsi
	jae	LBB0_26
## %bb.25:                              ##   in Loop: Header=BB0_24 Depth=1
	leal	-256(%rcx), %edx
	movw	%dx, -2(%rax)
LBB0_26:                                ##   in Loop: Header=BB0_24 Depth=1
	movzwl	(%rax), %edx
	cmpq	%rdx, %rcx
	jae	LBB0_28
## %bb.27:                              ##   in Loop: Header=BB0_24 Depth=1
	movw	%cx, (%rax)
	jmp	LBB0_28
LBB0_29:
	movzwl	-274(%rbp), %eax
	cmpl	$65025, %eax                    ## imm = 0xFE01
	jb	LBB0_32
## %bb.30:
	movw	$-512, -274(%rbp)               ## imm = 0xFE00
	jmp	LBB0_32
LBB0_59:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_glConfig,4,2                   ## @glConfig
	.comm	_r_ignorehwgamma,8,3            ## @r_ignorehwgamma
	.comm	_glw_state,4,2                  ## @glw_state
	.comm	_VER_PLATFORM_WIN32_NT,8,3      ## @VER_PLATFORM_WIN32_NT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"performing W2K gamma clamp.\n"

L_.str.1:                               ## @.str.1
	.asciz	"skipping W2K gamma clamp.\n"

.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:
	.quad	2                               ; 0x2
	.quad	3                               ; 0x3
lCPI0_1:
	.quad	0                               ; 0x0
	.quad	1                               ; 0x1
	.section	__TEXT,__text,regular,pure_instructions
	.globl	_GLimp_SetGamma
	.p2align	2
_GLimp_SetGamma:                        ; @GLimp_SetGamma
	.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
	sub	sp, sp, #1568
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-24]
Lloh3:
	adrp	x8, _glConfig@GOTPAGE
Lloh4:
	ldr	x8, [x8, _glConfig@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	cbz	w8, LBB0_30
; %bb.1:
Lloh6:
	adrp	x8, _r_ignorehwgamma@GOTPAGE
Lloh7:
	ldr	x8, [x8, _r_ignorehwgamma@GOTPAGEOFF]
Lloh8:
	ldr	x8, [x8]
	ldr	x8, [x8]
Lloh9:
	adrp	x19, _glw_state@GOTPAGE
Lloh10:
	ldr	x19, [x19, _glw_state@GOTPAGEOFF]
	ldr	w9, [x19]
	cmp	x8, #0
	ccmp	w9, #0, #4, eq
	b.eq	LBB0_30
; %bb.2:
	mov	x8, #0
	add	x9, sp, #24
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	d0, [x0, x8]
	ushll.8h	v1, v0, #0
	shll.8h	v0, v0, #8
	orr.16b	v0, v0, v1
	str	q0, [x9]
	ldr	d0, [x1, x8]
	ushll.8h	v1, v0, #0
	shll.8h	v0, v0, #8
	orr.16b	v0, v0, v1
	str	q0, [x9, #512]
	ldr	d0, [x2, x8]
	ushll.8h	v1, v0, #0
	shll.8h	v0, v0, #8
	orr.16b	v0, v0, v1
	str	q0, [x9, #1024]
	add	x8, x8, #8
	add	x9, x9, #16
	cmp	x8, #256
	b.ne	LBB0_3
; %bb.4:
	mov	w8, #16
	str	w8, [sp, #8]
	add	x0, sp, #8
	bl	_GetVersionEx
	ldr	w8, [sp, #12]
	cmp	w8, #5
	b.ne	LBB0_16
; %bb.5:
	ldr	x8, [sp, #16]
Lloh11:
	adrp	x9, _VER_PLATFORM_WIN32_NT@GOTPAGE
Lloh12:
	ldr	x9, [x9, _VER_PLATFORM_WIN32_NT@GOTPAGEOFF]
Lloh13:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_16
; %bb.6:
Lloh14:
	adrp	x0, l_.str@PAGE
Lloh15:
	add	x0, x0, l_.str@PAGEOFF
	bl	_Com_DPrintf
	mov	x10, #0
	adrp	x8, lCPI0_0@PAGE
	ldr	q0, [x8, lCPI0_0@PAGEOFF]
	adrp	x9, lCPI0_1@PAGE
	ldr	q1, [x9, lCPI0_1@PAGEOFF]
	add	x11, sp, #24
	mov	w12, #32768
	dup.2d	v2, x12
	mov	w12, #33024
	mov	w13, #33280
	mov	w14, #33536
	mov	w15, #4
	dup.2d	v3, x15
	b	LBB0_8
LBB0_7:                                 ;   in Loop: Header=BB0_8 Depth=1
	add	x10, x10, #4
	add.2d	v0, v0, v3
	add.2d	v1, v1, v3
	add	x11, x11, #8
	cmp	x10, #128
	b.eq	LBB0_32
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	ldr	d4, [x11]
	shl.2d	v5, v1, #8
	add.2d	v5, v5, v2
	ushll.4s	v4, v4, #0
	ushll.2d	v6, v4, #0
	cmhi.2d	v5, v6, v5
	xtn.2s	v5, v5
	xtn.4h	v6, v5
	umov.h	w15, v6[0]
	tbz	w15, #0, LBB0_10
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=1
	lsl	w15, w10, #8
	eor	w15, w15, #0x8000
	strh	w15, [x11]
LBB0_10:                                ;   in Loop: Header=BB0_8 Depth=1
	xtn.4h	v5, v5
	umov.h	w15, v5[1]
	tbz	w15, #0, LBB0_12
; %bb.11:                               ;   in Loop: Header=BB0_8 Depth=1
	eor	w15, w12, w10, lsl #8
	strh	w15, [x11, #2]
LBB0_12:                                ;   in Loop: Header=BB0_8 Depth=1
	shl.2d	v5, v0, #8
	add.2d	v5, v5, v2
	ushll2.2d	v4, v4, #0
	cmhi.2d	v4, v4, v5
	xtn2.4s	v5, v4
	xtn.4h	v5, v5
	umov.h	w15, v5[2]
	tbz	w15, #0, LBB0_14
; %bb.13:                               ;   in Loop: Header=BB0_8 Depth=1
	eor	w15, w13, w10, lsl #8
	strh	w15, [x11, #4]
LBB0_14:                                ;   in Loop: Header=BB0_8 Depth=1
	xtn2.4s	v4, v4
	xtn.4h	v4, v4
	umov.h	w15, v4[3]
	tbz	w15, #0, LBB0_7
; %bb.15:                               ;   in Loop: Header=BB0_8 Depth=1
	eor	w15, w14, w10, lsl #8
	strh	w15, [x11, #6]
	b	LBB0_7
LBB0_16:
Lloh16:
	adrp	x0, l_.str.1@PAGE
Lloh17:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_Com_DPrintf
LBB0_17:
	ldrh	w10, [sp, #24]
	mov	w8, #2
	add	x9, sp, #24
	b	LBB0_19
LBB0_18:                                ;   in Loop: Header=BB0_19 Depth=1
	add	x8, x8, #2
	mov	x10, x11
	cmp	x8, #512
	b.eq	LBB0_21
LBB0_19:                                ; =>This Inner Loop Header: Depth=1
	ldrh	w11, [x9, x8]
	cmp	w11, w10
	b.hs	LBB0_18
; %bb.20:                               ;   in Loop: Header=BB0_19 Depth=1
	strh	w10, [x9, x8]
	mov	x11, x10
	b	LBB0_18
LBB0_21:
	mov	x8, #0
	ldrh	w10, [sp, #536]
	add	x9, sp, #24
	add	x9, x9, #514
	b	LBB0_23
LBB0_22:                                ;   in Loop: Header=BB0_23 Depth=1
	add	x8, x8, #2
	mov	x10, x11
	cmp	x8, #510
	b.eq	LBB0_25
LBB0_23:                                ; =>This Inner Loop Header: Depth=1
	ldrh	w11, [x9, x8]
	cmp	w11, w10
	b.hs	LBB0_22
; %bb.24:                               ;   in Loop: Header=BB0_23 Depth=1
	strh	w10, [x9, x8]
	mov	x11, x10
	b	LBB0_22
LBB0_25:
	mov	x8, #0
	ldrh	w10, [sp, #1048]
	add	x9, sp, #24
	add	x9, x9, #1026
	b	LBB0_27
LBB0_26:                                ;   in Loop: Header=BB0_27 Depth=1
	add	x8, x8, #2
	mov	x10, x11
	cmp	x8, #510
	b.eq	LBB0_29
LBB0_27:                                ; =>This Inner Loop Header: Depth=1
	ldrh	w11, [x9, x8]
	cmp	w11, w10
	b.hs	LBB0_26
; %bb.28:                               ;   in Loop: Header=BB0_27 Depth=1
	strh	w10, [x9, x8]
	mov	x11, x10
	b	LBB0_26
LBB0_29:
	ldr	w0, [x19]
	add	x1, sp, #24
	bl	_qwglSetDeviceGammaRamp3DFX
LBB0_30:
	ldur	x8, [x29, #-24]
Lloh18:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh19:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh20:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_58
; %bb.31:
	add	sp, sp, #1568
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_32:
	ldrh	w10, [sp, #278]
	mov	w11, #65025
	cmp	w10, w11
	b.lo	LBB0_34
; %bb.33:
	mov	w10, #65024
	strh	w10, [sp, #278]
LBB0_34:
	mov	x10, #0
	add	x11, sp, #24
	add	x11, x11, #512
	ldr	q0, [x8, lCPI0_0@PAGEOFF]
	ldr	q1, [x9, lCPI0_1@PAGEOFF]
	mov	w12, #32768
	dup.2d	v2, x12
	mov	w12, #33024
	mov	w13, #33280
	mov	w14, #33536
	mov	w15, #4
	dup.2d	v3, x15
	b	LBB0_36
LBB0_35:                                ;   in Loop: Header=BB0_36 Depth=1
	add	x10, x10, #4
	add.2d	v0, v0, v3
	add.2d	v1, v1, v3
	add	x11, x11, #8
	cmp	x10, #128
	b.eq	LBB0_44
LBB0_36:                                ; =>This Inner Loop Header: Depth=1
	ldr	d4, [x11]
	shl.2d	v5, v1, #8
	add.2d	v5, v5, v2
	ushll.4s	v4, v4, #0
	ushll.2d	v6, v4, #0
	cmhi.2d	v5, v6, v5
	xtn.2s	v5, v5
	xtn.4h	v6, v5
	umov.h	w15, v6[0]
	tbz	w15, #0, LBB0_38
; %bb.37:                               ;   in Loop: Header=BB0_36 Depth=1
	lsl	w15, w10, #8
	eor	w15, w15, #0x8000
	strh	w15, [x11]
LBB0_38:                                ;   in Loop: Header=BB0_36 Depth=1
	xtn.4h	v5, v5
	umov.h	w15, v5[1]
	tbz	w15, #0, LBB0_40
; %bb.39:                               ;   in Loop: Header=BB0_36 Depth=1
	eor	w15, w12, w10, lsl #8
	strh	w15, [x11, #2]
LBB0_40:                                ;   in Loop: Header=BB0_36 Depth=1
	shl.2d	v5, v0, #8
	add.2d	v5, v5, v2
	ushll2.2d	v4, v4, #0
	cmhi.2d	v4, v4, v5
	xtn2.4s	v5, v4
	xtn.4h	v5, v5
	umov.h	w15, v5[2]
	tbz	w15, #0, LBB0_42
; %bb.41:                               ;   in Loop: Header=BB0_36 Depth=1
	eor	w15, w13, w10, lsl #8
	strh	w15, [x11, #4]
LBB0_42:                                ;   in Loop: Header=BB0_36 Depth=1
	xtn2.4s	v4, v4
	xtn.4h	v4, v4
	umov.h	w15, v4[3]
	tbz	w15, #0, LBB0_35
; %bb.43:                               ;   in Loop: Header=BB0_36 Depth=1
	eor	w15, w14, w10, lsl #8
	strh	w15, [x11, #6]
	b	LBB0_35
LBB0_44:
	ldrh	w10, [sp, #790]
	mov	w11, #65025
	cmp	w10, w11
	b.lo	LBB0_46
; %bb.45:
	mov	w10, #65024
	strh	w10, [sp, #790]
LBB0_46:
	mov	x10, #0
	add	x11, sp, #24
	add	x11, x11, #1024
	ldr	q0, [x8, lCPI0_0@PAGEOFF]
	ldr	q1, [x9, lCPI0_1@PAGEOFF]
	mov	w8, #32768
	dup.2d	v2, x8
	mov	w8, #33024
	mov	w9, #33280
	mov	w12, #33536
	mov	w13, #4
	dup.2d	v3, x13
	b	LBB0_48
LBB0_47:                                ;   in Loop: Header=BB0_48 Depth=1
	add	x10, x10, #4
	add.2d	v0, v0, v3
	add.2d	v1, v1, v3
	add	x11, x11, #8
	cmp	x10, #128
	b.eq	LBB0_56
LBB0_48:                                ; =>This Inner Loop Header: Depth=1
	ldr	d4, [x11]
	shl.2d	v5, v1, #8
	add.2d	v5, v5, v2
	ushll.4s	v4, v4, #0
	ushll.2d	v6, v4, #0
	cmhi.2d	v5, v6, v5
	xtn.2s	v5, v5
	xtn.4h	v6, v5
	umov.h	w13, v6[0]
	tbz	w13, #0, LBB0_50
; %bb.49:                               ;   in Loop: Header=BB0_48 Depth=1
	lsl	w13, w10, #8
	eor	w13, w13, #0x8000
	strh	w13, [x11]
LBB0_50:                                ;   in Loop: Header=BB0_48 Depth=1
	xtn.4h	v5, v5
	umov.h	w13, v5[1]
	tbz	w13, #0, LBB0_52
; %bb.51:                               ;   in Loop: Header=BB0_48 Depth=1
	eor	w13, w8, w10, lsl #8
	strh	w13, [x11, #2]
LBB0_52:                                ;   in Loop: Header=BB0_48 Depth=1
	shl.2d	v5, v0, #8
	add.2d	v5, v5, v2
	ushll2.2d	v4, v4, #0
	cmhi.2d	v4, v4, v5
	xtn2.4s	v5, v4
	xtn.4h	v5, v5
	umov.h	w13, v5[2]
	tbz	w13, #0, LBB0_54
; %bb.53:                               ;   in Loop: Header=BB0_48 Depth=1
	eor	w13, w9, w10, lsl #8
	strh	w13, [x11, #4]
LBB0_54:                                ;   in Loop: Header=BB0_48 Depth=1
	xtn2.4s	v4, v4
	xtn.4h	v4, v4
	umov.h	w13, v4[3]
	tbz	w13, #0, LBB0_47
; %bb.55:                               ;   in Loop: Header=BB0_48 Depth=1
	eor	w13, w12, w10, lsl #8
	strh	w13, [x11, #6]
	b	LBB0_47
LBB0_56:
	ldrh	w8, [sp, #1302]
	mov	w9, #65025
	cmp	w8, w9
	b.lo	LBB0_17
; %bb.57:
	mov	w8, #65024
	strh	w8, [sp, #1302]
	b	LBB0_17
LBB0_58:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_glConfig,4,2                   ; @glConfig
	.comm	_r_ignorehwgamma,8,3            ; @r_ignorehwgamma
	.comm	_glw_state,4,2                  ; @glw_state
	.comm	_VER_PLATFORM_WIN32_NT,8,3      ; @VER_PLATFORM_WIN32_NT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"performing W2K gamma clamp.\n"

l_.str.1:                               ; @.str.1
	.asciz	"skipping W2K gamma clamp.\n"

.subsections_via_symbols
