	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function makeContextCurrentOSMesa
_makeContextCurrentOSMesa:              ## @makeContextCurrentOSMesa
	.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
	testq	%rdi, %rdi
	je	LBB0_7
## %bb.1:
	leaq	-16(%rbp), %rsi
	leaq	-12(%rbp), %rdx
	movq	%rbx, %rdi
	callq	__glfwPlatformGetFramebufferSize
	movq	8(%rbx), %rsi
	testq	%rsi, %rsi
	je	LBB0_4
## %bb.2:
	movl	-16(%rbp), %ecx
	cmpl	(%rbx), %ecx
	jne	LBB0_4
## %bb.3:
	movl	-12(%rbp), %r8d
	cmpl	4(%rbx), %r8d
	je	LBB0_5
LBB0_4:
	movq	%rsi, %rdi
	callq	_free
	movslq	-16(%rbp), %rax
	movslq	-12(%rbp), %rsi
	imulq	%rax, %rsi
	movl	$4, %edi
	callq	_calloc
	movq	%rax, %rsi
	movq	%rax, 8(%rbx)
	movl	-16(%rbp), %ecx
	movl	%ecx, (%rbx)
	movl	-12(%rbp), %r8d
	movl	%r8d, 4(%rbx)
LBB0_5:
	movl	16(%rbx), %edi
	movq	_GL_UNSIGNED_BYTE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_OSMesaMakeCurrent
	testl	%eax, %eax
	je	LBB0_6
LBB0_7:
	movq	__glfw@GOTPCREL(%rip), %rdi
	movq	%rbx, %rsi
	callq	__glfwPlatformSetTls
	jmp	LBB0_8
LBB0_6:
	movq	_GLFW_PLATFORM_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	callq	__glfwInputError
LBB0_8:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GL_UNSIGNED_BYTE,4,2           ## @GL_UNSIGNED_BYTE
	.comm	_GLFW_PLATFORM_ERROR,4,2        ## @GLFW_PLATFORM_ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"OSMesa: Failed to make context current"

	.comm	__glfw,4,2                      ## @_glfw
	.no_dead_strip	_makeContextCurrentOSMesa
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function makeContextCurrentOSMesa
_makeContextCurrentOSMesa:              ; @makeContextCurrentOSMesa
	.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
	cbz	x0, LBB0_6
; %bb.1:
	add	x1, sp, #12
	add	x2, sp, #8
	mov	x0, x19
	bl	__glfwPlatformGetFramebufferSize
	ldr	x1, [x19, #8]
	cbz	x1, LBB0_4
; %bb.2:
	ldr	w3, [sp, #12]
	ldr	w8, [x19]
	cmp	w3, w8
	b.ne	LBB0_4
; %bb.3:
	ldr	w4, [sp, #8]
	ldr	w8, [x19, #4]
	cmp	w4, w8
	b.eq	LBB0_5
LBB0_4:
	mov	x0, x1
	bl	_free
	ldpsw	x9, x8, [sp, #8]
	mul	x1, x9, x8
	mov	w0, #4
	bl	_calloc
	mov	x1, x0
	str	x0, [x19, #8]
	ldp	w4, w3, [sp, #8]
	stp	w3, w4, [x19]
LBB0_5:
	ldr	w0, [x19, #16]
Lloh0:
	adrp	x8, _GL_UNSIGNED_BYTE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GL_UNSIGNED_BYTE@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
	bl	_OSMesaMakeCurrent
	cbz	w0, LBB0_7
LBB0_6:
Lloh3:
	adrp	x0, __glfw@GOTPAGE
Lloh4:
	ldr	x0, [x0, __glfw@GOTPAGEOFF]
	mov	x1, x19
	bl	__glfwPlatformSetTls
	b	LBB0_8
LBB0_7:
Lloh5:
	adrp	x8, _GLFW_PLATFORM_ERROR@GOTPAGE
Lloh6:
	ldr	x8, [x8, _GLFW_PLATFORM_ERROR@GOTPAGEOFF]
Lloh7:
	ldr	w0, [x8]
Lloh8:
	adrp	x1, l_.str@PAGE
Lloh9:
	add	x1, x1, l_.str@PAGEOFF
	bl	__glfwInputError
LBB0_8:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_GL_UNSIGNED_BYTE,4,2           ; @GL_UNSIGNED_BYTE
	.comm	_GLFW_PLATFORM_ERROR,4,2        ; @GLFW_PLATFORM_ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"OSMesa: Failed to make context current"

	.comm	__glfw,4,2                      ; @_glfw
	.no_dead_strip	_makeContextCurrentOSMesa
.subsections_via_symbols
