	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_SetOpenGLPalette               ## -- Begin function SetOpenGLPalette
	.p2align	4, 0x90
_SetOpenGLPalette:                      ## @SetOpenGLPalette
	.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
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %rbx
	movq	_HiBuffer@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	je	LBB0_1
## %bb.2:
	movq	%rbx, %rdi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_SetPaletteBlitToHigh           ## TAILCALL
LBB0_1:
	movq	_GL_TEXTURE_2D@GOTPCREL(%rip), %r14
	movl	(%r14), %edi
	movq	_textures@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	(%rax), %esi
	callq	_p_glBindTexture
	movl	(%r14), %edi
	movq	_GL_RGB@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_GL_RGBA@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	_GL_UNSIGNED_BYTE@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movl	$256, %edx                      ## imm = 0x100
	movq	%rbx, %r9
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_p_glColorTableEXT              ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_HiBuffer,4,2                   ## @HiBuffer
	.comm	_GL_TEXTURE_2D,4,2              ## @GL_TEXTURE_2D
	.comm	_textures,8,3                   ## @textures
	.comm	_GL_RGB,4,2                     ## @GL_RGB
	.comm	_GL_RGBA,4,2                    ## @GL_RGBA
	.comm	_GL_UNSIGNED_BYTE,4,2           ## @GL_UNSIGNED_BYTE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_SetOpenGLPalette               ; -- Begin function SetOpenGLPalette
	.p2align	2
_SetOpenGLPalette:                      ; @SetOpenGLPalette
	.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
	mov	x19, x0
Lloh0:
	adrp	x8, _HiBuffer@GOTPAGE
Lloh1:
	ldr	x8, [x8, _HiBuffer@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cbz	w8, LBB0_2
; %bb.1:
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_SetPaletteBlitToHigh
LBB0_2:
Lloh3:
	adrp	x20, _GL_TEXTURE_2D@GOTPAGE
Lloh4:
	ldr	x20, [x20, _GL_TEXTURE_2D@GOTPAGEOFF]
	ldr	w0, [x20]
Lloh5:
	adrp	x8, _textures@GOTPAGE
Lloh6:
	ldr	x8, [x8, _textures@GOTPAGEOFF]
Lloh7:
	ldr	x8, [x8]
	ldr	w1, [x8]
	bl	_p_glBindTexture
	ldr	w0, [x20]
Lloh8:
	adrp	x8, _GL_RGB@GOTPAGE
Lloh9:
	ldr	x8, [x8, _GL_RGB@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
Lloh11:
	adrp	x8, _GL_RGBA@GOTPAGE
Lloh12:
	ldr	x8, [x8, _GL_RGBA@GOTPAGEOFF]
Lloh13:
	ldr	w3, [x8]
Lloh14:
	adrp	x8, _GL_UNSIGNED_BYTE@GOTPAGE
Lloh15:
	ldr	x8, [x8, _GL_UNSIGNED_BYTE@GOTPAGEOFF]
Lloh16:
	ldr	w4, [x8]
	mov	w2, #256
	mov	x5, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_p_glColorTableEXT
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_HiBuffer,4,2                   ; @HiBuffer
	.comm	_GL_TEXTURE_2D,4,2              ; @GL_TEXTURE_2D
	.comm	_textures,8,3                   ; @textures
	.comm	_GL_RGB,4,2                     ; @GL_RGB
	.comm	_GL_RGBA,4,2                    ; @GL_RGBA
	.comm	_GL_UNSIGNED_BYTE,4,2           ; @GL_UNSIGNED_BYTE
.subsections_via_symbols
