	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_PLATFORM_Exit                  ## -- Begin function PLATFORM_Exit
	.p2align	4, 0x90
_PLATFORM_Exit:                         ## @PLATFORM_Exit
	.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
	movl	%edi, %ebx
	xorl	%eax, %eax
	callq	_Log_flushlog
	testl	%ebx, %ebx
	je	LBB0_2
## %bb.1:
	xorl	%eax, %eax
	callq	_autorepeat_restore
	xorl	%eax, %eax
	callq	_MONITOR_Run
	movl	%eax, %ebx
	xorl	%eax, %eax
	callq	_autorepeat_off
	testl	%ebx, %ebx
	jne	LBB0_10
	jmp	LBB0_4
LBB0_2:
	movq	_FALSE@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	testl	%ebx, %ebx
	jne	LBB0_10
LBB0_4:
	movq	_image_data@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	testq	%rdi, %rdi
	je	LBB0_6
## %bb.5:
	callq	_free
LBB0_6:
	movq	_display@GOTPCREL(%rip), %r14
	movq	(%r14), %rdi
	testq	%rdi, %rdi
	je	LBB0_10
## %bb.7:
	movq	_True@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_XSync
	movq	_private_cmap@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_9
## %bb.8:
	movq	(%r14), %rdi
	movq	_cmap@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_XFreeColormap
LBB0_9:
	movq	(%r14), %rdi
	movq	_pixmap@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_XFreePixmap
	movq	(%r14), %rdi
	movq	_window@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	callq	_XUnmapWindow
	movq	(%r14), %rdi
	movl	(%r15), %esi
	callq	_XDestroyWindow
	xorl	%eax, %eax
	callq	_autorepeat_restore
	movq	(%r14), %rdi
	callq	_XCloseDisplay
LBB0_10:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_FALSE,4,2                      ## @FALSE
	.comm	_image_data,8,3                 ## @image_data
	.comm	_display,8,3                    ## @display
	.comm	_True,4,2                       ## @True
	.comm	_private_cmap,8,3               ## @private_cmap
	.comm	_cmap,4,2                       ## @cmap
	.comm	_pixmap,4,2                     ## @pixmap
	.comm	_window,4,2                     ## @window
	.comm	_image,8,3                      ## @image
	.comm	_js0,4,2                        ## @js0
	.comm	_js1,4,2                        ## @js1
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_PLATFORM_Exit                  ; -- Begin function PLATFORM_Exit
	.p2align	2
_PLATFORM_Exit:                         ; @PLATFORM_Exit
	.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
	bl	_Log_flushlog
	cbz	w19, LBB0_2
; %bb.1:
	bl	_autorepeat_restore
	bl	_MONITOR_Run
	mov	x19, x0
	bl	_autorepeat_off
	cbnz	w19, LBB0_9
	b	LBB0_3
LBB0_2:
Lloh0:
	adrp	x8, _FALSE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _FALSE@GOTPAGEOFF]
Lloh2:
	ldr	w19, [x8]
	cbnz	w19, LBB0_9
LBB0_3:
Lloh3:
	adrp	x8, _image_data@GOTPAGE
Lloh4:
	ldr	x8, [x8, _image_data@GOTPAGEOFF]
Lloh5:
	ldr	x0, [x8]
	cbz	x0, LBB0_5
; %bb.4:
	bl	_free
LBB0_5:
Lloh6:
	adrp	x20, _display@GOTPAGE
Lloh7:
	ldr	x20, [x20, _display@GOTPAGEOFF]
	ldr	x0, [x20]
	cbz	x0, LBB0_9
; %bb.6:
Lloh8:
	adrp	x8, _True@GOTPAGE
Lloh9:
	ldr	x8, [x8, _True@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	bl	_XSync
Lloh11:
	adrp	x8, _private_cmap@GOTPAGE
Lloh12:
	ldr	x8, [x8, _private_cmap@GOTPAGEOFF]
Lloh13:
	ldr	x8, [x8]
	cbz	x8, LBB0_8
; %bb.7:
	ldr	x0, [x20]
Lloh14:
	adrp	x8, _cmap@GOTPAGE
Lloh15:
	ldr	x8, [x8, _cmap@GOTPAGEOFF]
Lloh16:
	ldr	w1, [x8]
	bl	_XFreeColormap
LBB0_8:
	ldr	x0, [x20]
Lloh17:
	adrp	x8, _pixmap@GOTPAGE
Lloh18:
	ldr	x8, [x8, _pixmap@GOTPAGEOFF]
Lloh19:
	ldr	w1, [x8]
	bl	_XFreePixmap
	ldr	x0, [x20]
Lloh20:
	adrp	x21, _window@GOTPAGE
Lloh21:
	ldr	x21, [x21, _window@GOTPAGEOFF]
	ldr	w1, [x21]
	bl	_XUnmapWindow
	ldr	x0, [x20]
	ldr	w1, [x21]
	bl	_XDestroyWindow
	bl	_autorepeat_restore
	ldr	x0, [x20]
	bl	_XCloseDisplay
LBB0_9:
	mov	x0, x19
	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
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_FALSE,4,2                      ; @FALSE
	.comm	_image_data,8,3                 ; @image_data
	.comm	_display,8,3                    ; @display
	.comm	_True,4,2                       ; @True
	.comm	_private_cmap,8,3               ; @private_cmap
	.comm	_cmap,4,2                       ; @cmap
	.comm	_pixmap,4,2                     ; @pixmap
	.comm	_window,4,2                     ; @window
	.comm	_image,8,3                      ; @image
	.comm	_js0,4,2                        ; @js0
	.comm	_js1,4,2                        ; @js1
.subsections_via_symbols
