	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function context_enter
_context_enter:                         ## @context_enter
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	72(%rdi), %rdx
	incq	%rdx
	leaq	L_.str(%rip), %rdi
	movq	%rbx, %rsi
	callq	_TRACE
	movq	72(%rbx), %rax
	leaq	1(%rax), %rcx
	movq	%rcx, 72(%rbx)
	testq	%rax, %rax
	jne	LBB0_10
## %bb.1:
	xorl	%eax, %eax
	callq	_context_get_current
	movq	%rax, %r15
	xorl	%eax, %eax
	callq	_wglGetCurrentContext
	testq	%rax, %rax
	je	LBB0_5
## %bb.2:
	movq	%rax, %r14
	testq	%r15, %r15
	je	LBB0_4
## %bb.3:
	cmpq	%r14, 64(%r15)
	je	LBB0_5
LBB0_4:
	xorl	%eax, %eax
	callq	_wglGetCurrentDC
	leaq	L_.str.1(%rip), %rdi
	movq	%r14, %rsi
	movq	%rax, %rdx
	callq	_TRACE
	movq	%r14, 56(%rbx)
	xorl	%eax, %eax
	callq	_wglGetCurrentDC
	movq	%rax, 48(%rbx)
LBB0_9:
	movl	$1, (%rbx)
	jmp	LBB0_10
LBB0_5:
	cmpl	$0, (%rbx)
	je	LBB0_6
LBB0_10:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	cmpq	$0, 40(%rbx)
	je	LBB0_8
## %bb.7:
	cmpq	$0, 32(%rbx)
	jne	LBB0_10
LBB0_8:
	movq	8(%rbx), %r14
	movq	24(%rbx), %rax
	movl	16(%rbx), %edi
	callq	*(%rax)
	cmpq	%rax, %r14
	jne	LBB0_9
	jmp	LBB0_10
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Entering context %p, level %u.\n"

L_.str.1:                               ## @.str.1
	.asciz	"Another GL context (%p on device context %p) is already current.\n"

	.no_dead_strip	_context_enter
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function context_enter
_context_enter:                         ; @context_enter
	.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, x0
	ldr	x8, [x0, #72]
	add	x2, x8, #1
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x19
	bl	_TRACE
	ldr	x8, [x19, #72]
	add	x9, x8, #1
	str	x9, [x19, #72]
	cbnz	x8, LBB0_7
; %bb.1:
	bl	_context_get_current
	mov	x21, x0
	bl	_wglGetCurrentContext
	cbz	x0, LBB0_6
; %bb.2:
	mov	x20, x0
	cbz	x21, LBB0_4
; %bb.3:
	ldr	x8, [x21, #64]
	cmp	x8, x20
	b.eq	LBB0_6
LBB0_4:
	bl	_wglGetCurrentDC
	mov	x2, x0
Lloh2:
	adrp	x0, l_.str.1@PAGE
Lloh3:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x1, x20
	bl	_TRACE
	str	x20, [x19, #56]
	bl	_wglGetCurrentDC
	str	x0, [x19, #48]
LBB0_5:
	mov	w8, #1
	str	w8, [x19]
	b	LBB0_7
LBB0_6:
	ldr	w8, [x19]
	cbz	w8, LBB0_8
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
	ret
LBB0_8:
	ldr	x8, [x19, #40]
	cbz	x8, LBB0_10
; %bb.9:
	ldr	x8, [x19, #32]
	cbnz	x8, LBB0_7
LBB0_10:
	ldr	x20, [x19, #8]
	ldr	x8, [x19, #24]
	ldr	x8, [x8]
	ldr	w0, [x19, #16]
	blr	x8
	cmp	x20, x0
	b.ne	LBB0_5
	b	LBB0_7
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Entering context %p, level %u.\n"

l_.str.1:                               ; @.str.1
	.asciz	"Another GL context (%p on device context %p) is already current.\n"

	.no_dead_strip	_context_enter
.subsections_via_symbols
