	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_CreateContext                  ## -- Begin function CreateContext
	.p2align	4, 0x90
_CreateContext:                         ## @CreateContext
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_GLX_RGBA@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -60(%rbp)
	movq	_GLX_DOUBLEBUFFER@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -56(%rbp)
	movq	_None@GOTPCREL(%rip), %r12
	movl	(%r12), %eax
	movl	%eax, -52(%rbp)
	movq	_GL_TRUE@GOTPCREL(%rip), %r15
	testq	%rdi, %rdi
	je	LBB0_8
## %bb.1:
	movq	%rdi, %rbx
	movq	_display@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_XOpenDisplay
	movq	%rax, 16(%rbx)
	testq	%rax, %rax
	je	LBB0_8
## %bb.2:
	leaq	-68(%rbp), %rsi
	leaq	-64(%rbp), %rdx
	movq	%rax, %rdi
	callq	_glXQueryExtension
	testl	%eax, %eax
	je	LBB0_8
## %bb.3:
	movq	16(%rbx), %r14
	movq	%r14, %rdi
	callq	_DefaultScreen
	leaq	-60(%rbp), %rdx
	movq	%r14, %rdi
	movl	%eax, %esi
	callq	_glXChooseVisual
	movq	%rax, 24(%rbx)
	testq	%rax, %rax
	je	LBB0_8
## %bb.4:
	movq	16(%rbx), %rdi
	movl	(%r12), %edx
	movq	_True@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movq	%rax, %rsi
	callq	_glXCreateContext
	movq	%rax, (%rbx)
	testq	%rax, %rax
	je	LBB0_8
## %bb.5:
	movq	16(%rbx), %r14
	movq	24(%rbx), %rax
	movl	8(%rax), %esi
	movq	%r14, %rdi
	callq	_RootWindow
	movq	24(%rbx), %rcx
	movl	(%rcx), %edx
	movq	_AllocNone@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movq	%r14, %rdi
	movl	%eax, %esi
	callq	_XCreateColormap
	movl	%eax, 32(%rbx)
	movq	$0, -80(%rbp)
	movl	%eax, -88(%rbp)
	movq	16(%rbx), %r14
	movq	24(%rbx), %rax
	movl	8(%rax), %esi
	movq	%r14, %rdi
	callq	_RootWindow
	movq	24(%rbx), %rcx
	movl	(%rcx), %r10d
	movl	4(%rcx), %r11d
	movq	_InputOutput@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r15d
	movq	_CWBorderPixel@GOTPCREL(%rip), %rcx
	movq	_CWColormap@GOTPCREL(%rip), %rdx
	movl	(%rdx), %r12d
	orl	(%rcx), %r12d
	leaq	-88(%rbp), %r13
	movq	%r14, %rdi
	movl	%eax, %esi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	movl	$1, %r8d
	movl	$1, %r9d
	pushq	%r13
	pushq	%r12
	pushq	%r10
	pushq	%r15
	pushq	%r11
	pushq	$0
	callq	_XCreateWindow
	addq	$48, %rsp
	movl	%eax, 8(%rbx)
	movq	(%rbx), %rdx
	movq	16(%rbx), %rdi
	movl	%eax, %esi
	callq	_glXMakeCurrent
	testl	%eax, %eax
	jne	LBB0_6
## %bb.7:
	movq	_GL_TRUE@GOTPCREL(%rip), %r15
	jmp	LBB0_8
LBB0_6:
	movq	_GL_FALSE@GOTPCREL(%rip), %r15
LBB0_8:
	movl	(%r15), %eax
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-48(%rbp), %rcx
	jne	LBB0_10
## %bb.9:
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_10:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_GLX_RGBA,4,2                   ## @GLX_RGBA
	.comm	_GLX_DOUBLEBUFFER,4,2           ## @GLX_DOUBLEBUFFER
	.comm	_None,4,2                       ## @None
	.comm	_GL_TRUE,4,2                    ## @GL_TRUE
	.comm	_display,4,2                    ## @display
	.comm	_True,4,2                       ## @True
	.comm	_AllocNone,4,2                  ## @AllocNone
	.comm	_InputOutput,4,2                ## @InputOutput
	.comm	_CWBorderPixel,4,2              ## @CWBorderPixel
	.comm	_CWColormap,4,2                 ## @CWColormap
	.comm	_GL_FALSE,4,2                   ## @GL_FALSE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_CreateContext                  ; -- Begin function CreateContext
	.p2align	2
_CreateContext:                         ; @CreateContext
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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
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, _GLX_RGBA@GOTPAGE
Lloh4:
	ldr	x8, [x8, _GLX_RGBA@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
Lloh6:
	adrp	x9, _GLX_DOUBLEBUFFER@GOTPAGE
Lloh7:
	ldr	x9, [x9, _GLX_DOUBLEBUFFER@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	stp	w8, w9, [x29, #-52]
Lloh9:
	adrp	x21, _None@GOTPAGE
Lloh10:
	ldr	x21, [x21, _None@GOTPAGEOFF]
	ldr	w8, [x21]
	stur	w8, [x29, #-44]
	cbz	x0, LBB0_6
; %bb.1:
	mov	x19, x0
Lloh11:
	adrp	x8, _display@GOTPAGE
Lloh12:
	ldr	x8, [x8, _display@GOTPAGEOFF]
Lloh13:
	ldr	w0, [x8]
	bl	_XOpenDisplay
	str	x0, [x19, #16]
	cbz	x0, LBB0_6
; %bb.2:
	add	x1, sp, #56
	add	x2, sp, #52
	bl	_glXQueryExtension
	cbz	w0, LBB0_6
; %bb.3:
	ldr	x20, [x19, #16]
	mov	x0, x20
	bl	_DefaultScreen
	mov	x1, x0
	sub	x2, x29, #52
	mov	x0, x20
	bl	_glXChooseVisual
	str	x0, [x19, #24]
	cbz	x0, LBB0_6
; %bb.4:
	mov	x1, x0
	ldr	x0, [x19, #16]
	ldr	w2, [x21]
Lloh14:
	adrp	x8, _True@GOTPAGE
Lloh15:
	ldr	x8, [x8, _True@GOTPAGEOFF]
Lloh16:
	ldr	w3, [x8]
	bl	_glXCreateContext
	str	x0, [x19]
Lloh17:
	adrp	x21, _GL_TRUE@GOTPAGE
Lloh18:
	ldr	x21, [x21, _GL_TRUE@GOTPAGEOFF]
	cbz	x0, LBB0_7
; %bb.5:
	ldp	x20, x8, [x19, #16]
	ldr	w1, [x8, #8]
	mov	x0, x20
	bl	_RootWindow
	mov	x1, x0
	ldr	x8, [x19, #24]
	ldr	w2, [x8]
Lloh19:
	adrp	x8, _AllocNone@GOTPAGE
Lloh20:
	ldr	x8, [x8, _AllocNone@GOTPAGEOFF]
Lloh21:
	ldr	w3, [x8]
	mov	x0, x20
	bl	_XCreateColormap
	str	w0, [x19, #32]
	str	xzr, [sp, #40]
	str	w0, [sp, #32]
	ldp	x20, x8, [x19, #16]
	ldr	w1, [x8, #8]
	mov	x0, x20
	bl	_RootWindow
	mov	x1, x0
	ldr	x8, [x19, #24]
Lloh22:
	adrp	x9, _InputOutput@GOTPAGE
Lloh23:
	ldr	x9, [x9, _InputOutput@GOTPAGEOFF]
Lloh24:
	ldr	w9, [x9]
Lloh25:
	adrp	x10, _CWBorderPixel@GOTPAGE
Lloh26:
	ldr	x10, [x10, _CWBorderPixel@GOTPAGEOFF]
	ldp	w8, w7, [x8]
Lloh27:
	ldr	w10, [x10]
Lloh28:
	adrp	x11, _CWColormap@GOTPAGE
Lloh29:
	ldr	x11, [x11, _CWColormap@GOTPAGEOFF]
Lloh30:
	ldr	w11, [x11]
	orr	w10, w11, w10
	add	x11, sp, #32
	str	x11, [sp, #16]
	stp	w8, w10, [sp, #4]
	str	w9, [sp]
	mov	x0, x20
	mov	w2, #0
	mov	w3, #0
	mov	w4, #1
	mov	w5, #1
	mov	w6, #0
	bl	_XCreateWindow
	mov	x1, x0
	str	w0, [x19, #8]
	ldr	x0, [x19, #16]
	ldr	x2, [x19]
	bl	_glXMakeCurrent
Lloh31:
	adrp	x8, _GL_FALSE@GOTPAGE
Lloh32:
	ldr	x8, [x8, _GL_FALSE@GOTPAGEOFF]
	cmp	w0, #0
	csel	x21, x21, x8, eq
	b	LBB0_7
LBB0_6:
Lloh33:
	adrp	x21, _GL_TRUE@GOTPAGE
Lloh34:
	ldr	x21, [x21, _GL_TRUE@GOTPAGEOFF]
LBB0_7:
	ldr	w0, [x21]
	ldur	x8, [x29, #-40]
Lloh35:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh36:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh37:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_9
; %bb.8:
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
LBB0_9:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.cfi_endproc
                                        ; -- End function
	.comm	_GLX_RGBA,4,2                   ; @GLX_RGBA
	.comm	_GLX_DOUBLEBUFFER,4,2           ; @GLX_DOUBLEBUFFER
	.comm	_None,4,2                       ; @None
	.comm	_GL_TRUE,4,2                    ; @GL_TRUE
	.comm	_display,4,2                    ; @display
	.comm	_True,4,2                       ; @True
	.comm	_AllocNone,4,2                  ; @AllocNone
	.comm	_InputOutput,4,2                ; @InputOutput
	.comm	_CWBorderPixel,4,2              ; @CWBorderPixel
	.comm	_CWColormap,4,2                 ; @CWColormap
	.comm	_GL_FALSE,4,2                   ; @GL_FALSE
.subsections_via_symbols
