	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_context_release                ## -- Begin function context_release
	.p2align	4, 0x90
_context_release:                       ## @context_release
	.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
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	%rdi, %rbx
	movl	36(%rdi), %edx
	leaq	L_.str(%rip), %rdi
	movq	%rbx, %rsi
	xorl	%eax, %eax
	callq	_TRACE
	movq	_d3d@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_WARN_ON
	testq	%rax, %rax
	je	LBB0_6
## %bb.1:
	cmpl	$0, 36(%rbx)
	je	LBB0_2
## %bb.3:
	xorl	%eax, %eax
	callq	_context_get_current
	cmpq	%rbx, %rax
	je	LBB0_6
## %bb.4:
	leaq	L_.str.2(%rip), %rdi
	jmp	LBB0_5
LBB0_2:
	leaq	L_.str.1(%rip), %rdi
LBB0_5:
	movq	%rbx, %rsi
	callq	_WARN
LBB0_6:
	decl	36(%rbx)
	je	LBB0_7
LBB0_12:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
LBB0_7:
	movq	%rbx, %rdi
	callq	_context_restore_pixel_format
	testq	%rax, %rax
	je	LBB0_9
## %bb.8:
	movl	$1, (%rbx)
LBB0_9:
	movq	24(%rbx), %rsi
	testq	%rsi, %rsi
	je	LBB0_11
## %bb.10:
	movq	16(%rbx), %rdx
	leaq	L_.str.3(%rip), %rdi
	xorl	%eax, %eax
	callq	_TRACE
	movl	32(%rbx), %edi
	movq	16(%rbx), %rsi
	movq	24(%rbx), %rdx
	callq	_context_restore_gl_context
	xorps	%xmm0, %xmm0
	movups	%xmm0, 16(%rbx)
LBB0_11:
	cmpq	$0, 8(%rbx)
	je	LBB0_12
## %bb.13:
	leaq	L_.str.4(%rip), %rdi
	movq	%rbx, %rsi
	xorl	%eax, %eax
	callq	_TRACE
	movl	4(%rbx), %edi
	movq	%rbx, %rsi
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	jmp	_context_destroy                ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Releasing context %p, level %u.\n"

	.comm	_d3d,4,2                        ## @d3d
L_.str.1:                               ## @.str.1
	.asciz	"Context %p is not active.\n"

L_.str.2:                               ## @.str.2
	.asciz	"Context %p is not the current context.\n"

L_.str.3:                               ## @.str.3
	.asciz	"Restoring GL context %p on device context %p.\n"

L_.str.4:                               ## @.str.4
	.asciz	"Destroying context %p.\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_context_release                ; -- Begin function context_release
	.p2align	2
_context_release:                       ; @context_release
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.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
	mov	x19, x0
	ldr	w8, [x0, #36]
	str	x8, [sp]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x19
	bl	_TRACE
Lloh2:
	adrp	x8, _d3d@GOTPAGE
Lloh3:
	ldr	x8, [x8, _d3d@GOTPAGEOFF]
Lloh4:
	ldr	w0, [x8]
	bl	_WARN_ON
	cbz	x0, LBB0_6
; %bb.1:
	ldr	w8, [x19, #36]
	cbz	w8, LBB0_4
; %bb.2:
	bl	_context_get_current
	cmp	x0, x19
	b.eq	LBB0_6
; %bb.3:
Lloh5:
	adrp	x0, l_.str.2@PAGE
Lloh6:
	add	x0, x0, l_.str.2@PAGEOFF
	b	LBB0_5
LBB0_4:
Lloh7:
	adrp	x0, l_.str.1@PAGE
Lloh8:
	add	x0, x0, l_.str.1@PAGEOFF
LBB0_5:
	mov	x1, x19
	bl	_WARN
LBB0_6:
	ldr	w8, [x19, #36]
	subs	w8, w8, #1
	str	w8, [x19, #36]
	b.eq	LBB0_8
LBB0_7:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
LBB0_8:
	mov	x0, x19
	bl	_context_restore_pixel_format
	cbz	x0, LBB0_10
; %bb.9:
	mov	w8, #1
	str	w8, [x19]
LBB0_10:
	ldr	x1, [x19, #24]
	cbz	x1, LBB0_12
; %bb.11:
	ldr	x8, [x19, #16]
	str	x8, [sp]
Lloh9:
	adrp	x0, l_.str.3@PAGE
Lloh10:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_TRACE
	ldr	w0, [x19, #32]
	ldp	x1, x2, [x19, #16]
	bl	_context_restore_gl_context
	stp	xzr, xzr, [x19, #16]
LBB0_12:
	ldr	x8, [x19, #8]
	cbz	x8, LBB0_7
; %bb.13:
Lloh11:
	adrp	x0, l_.str.4@PAGE
Lloh12:
	add	x0, x0, l_.str.4@PAGEOFF
	mov	x1, x19
	bl	_TRACE
	ldr	w0, [x19, #4]
	mov	x1, x19
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	b	_context_destroy
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Releasing context %p, level %u.\n"

	.comm	_d3d,4,2                        ; @d3d
l_.str.1:                               ; @.str.1
	.asciz	"Context %p is not active.\n"

l_.str.2:                               ; @.str.2
	.asciz	"Context %p is not the current context.\n"

l_.str.3:                               ; @.str.3
	.asciz	"Restoring GL context %p on device context %p.\n"

l_.str.4:                               ; @.str.4
	.asciz	"Destroying context %p.\n"

.subsections_via_symbols
