	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_graphics_uninitialise          ## -- Begin function graphics_uninitialise
	.p2align	4, 0x90
_graphics_uninitialise:                 ## @graphics_uninitialise
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_inited@GOTPCREL(%rip), %r14
	movq	(%r14), %rdi
	callq	_vcos_assert
	xorl	%eax, %eax
	callq	_gx_priv_font_term
	movq	_GRAPHICS_RESOURCE_HANDLE_TYPE_MAX@GOTPCREL(%rip), %r15
	movl	(%r15), %eax
	testl	%eax, %eax
	jle	LBB0_5
## %bb.1:
	xorl	%ebx, %ebx
	movq	_gx_contexts@GOTPCREL(%rip), %r12
	movq	_display@GOTPCREL(%rip), %r13
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_4:                                 ##   in Loop: Header=BB0_2 Depth=1
	incq	%rbx
	movslq	%eax, %rcx
	cmpq	%rcx, %rbx
	jge	LBB0_5
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r12), %rcx
	movq	(%rcx,%rbx,8), %rsi
	testq	%rsi, %rsi
	je	LBB0_4
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	(%r13), %edi
	callq	_eglDestroyContext
	movl	(%r15), %eax
	jmp	LBB0_4
LBB0_5:
	movq	_display@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_eglTerminate
	xorl	%eax, %eax
	callq	_gx_priv_destroy
	movq	_gx_log_cat@GOTPCREL(%rip), %rdi
	callq	_vcos_log_unregister
	movq	$0, (%r14)
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_inited,8,3                     ## @inited
	.comm	_GRAPHICS_RESOURCE_HANDLE_TYPE_MAX,4,2 ## @GRAPHICS_RESOURCE_HANDLE_TYPE_MAX
	.comm	_gx_contexts,8,3                ## @gx_contexts
	.comm	_display,4,2                    ## @display
	.comm	_gx_log_cat,4,2                 ## @gx_log_cat
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_graphics_uninitialise          ; -- Begin function graphics_uninitialise
	.p2align	2
_graphics_uninitialise:                 ; @graphics_uninitialise
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
Lloh0:
	adrp	x19, _inited@GOTPAGE
Lloh1:
	ldr	x19, [x19, _inited@GOTPAGEOFF]
	ldr	x0, [x19]
	bl	_vcos_assert
	bl	_gx_priv_font_term
Lloh2:
	adrp	x20, _GRAPHICS_RESOURCE_HANDLE_TYPE_MAX@GOTPAGE
Lloh3:
	ldr	x20, [x20, _GRAPHICS_RESOURCE_HANDLE_TYPE_MAX@GOTPAGEOFF]
	ldr	w8, [x20]
Lloh4:
	adrp	x21, _display@GOTPAGE
Lloh5:
	ldr	x21, [x21, _display@GOTPAGEOFF]
	cmp	w8, #1
	b.lt	LBB0_5
; %bb.1:
	mov	x22, #0
Lloh6:
	adrp	x23, _gx_contexts@GOTPAGE
Lloh7:
	ldr	x23, [x23, _gx_contexts@GOTPAGEOFF]
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	x22, x22, #1
	cmp	x22, w8, sxtw
	b.ge	LBB0_5
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x9, [x23]
	ldr	x1, [x9, x22, lsl #3]
	cbz	x1, LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	w0, [x21]
	bl	_eglDestroyContext
	ldr	w8, [x20]
	b	LBB0_2
LBB0_5:
	ldr	w0, [x21]
	bl	_eglTerminate
	bl	_gx_priv_destroy
Lloh8:
	adrp	x0, _gx_log_cat@GOTPAGE
Lloh9:
	ldr	x0, [x0, _gx_log_cat@GOTPAGEOFF]
	bl	_vcos_log_unregister
	str	xzr, [x19]
	mov	w0, #0
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_inited,8,3                     ; @inited
	.comm	_GRAPHICS_RESOURCE_HANDLE_TYPE_MAX,4,2 ; @GRAPHICS_RESOURCE_HANDLE_TYPE_MAX
	.comm	_gx_contexts,8,3                ; @gx_contexts
	.comm	_display,4,2                    ; @display
	.comm	_gx_log_cat,4,2                 ; @gx_log_cat
.subsections_via_symbols
