	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rpng_x_cleanup
_rpng_x_cleanup:                        ## @rpng_x_cleanup
	.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	_image_data@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rdi
	testq	%rdi, %rdi
	je	LBB0_2
## %bb.1:
	callq	_free
	movq	$0, (%rbx)
LBB0_2:
	movq	_ximage@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rdi
	testq	%rdi, %rdi
	je	LBB0_6
## %bb.3:
	movq	(%rdi), %rax
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	movq	%rax, %rdi
	callq	_free
	movq	(%rbx), %rax
	movq	$0, (%rax)
	movq	(%rbx), %rdi
LBB0_5:
	callq	_XDestroyImage
	movq	$0, (%rbx)
LBB0_6:
	movq	_have_gc@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_8
## %bb.7:
	movq	_display@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_gc@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_XFreeGC
LBB0_8:
	movq	_have_window@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_10
## %bb.9:
	movq	_display@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_window@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_XDestroyWindow
LBB0_10:
	movq	_have_colormap@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_12
## %bb.11:
	movq	_display@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_colormap@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_XFreeColormap
LBB0_12:
	movq	_have_nondefault_visual@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_13
## %bb.14:
	movq	_visual_list@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	jmp	_XFree                          ## TAILCALL
LBB0_13:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_image_data,8,3                 ## @image_data
	.comm	_ximage,8,3                     ## @ximage
	.comm	_have_gc,8,3                    ## @have_gc
	.comm	_display,4,2                    ## @display
	.comm	_gc,4,2                         ## @gc
	.comm	_have_window,8,3                ## @have_window
	.comm	_window,4,2                     ## @window
	.comm	_have_colormap,8,3              ## @have_colormap
	.comm	_colormap,4,2                   ## @colormap
	.comm	_have_nondefault_visual,8,3     ## @have_nondefault_visual
	.comm	_visual_list,4,2                ## @visual_list
	.no_dead_strip	_rpng_x_cleanup
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rpng_x_cleanup
_rpng_x_cleanup:                        ; @rpng_x_cleanup
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
Lloh0:
	adrp	x19, _image_data@GOTPAGE
Lloh1:
	ldr	x19, [x19, _image_data@GOTPAGEOFF]
	ldr	x0, [x19]
	cbz	x0, LBB0_2
; %bb.1:
	bl	_free
	str	xzr, [x19]
LBB0_2:
Lloh2:
	adrp	x19, _ximage@GOTPAGE
Lloh3:
	ldr	x19, [x19, _ximage@GOTPAGEOFF]
	ldr	x0, [x19]
	cbz	x0, LBB0_6
; %bb.3:
	ldr	x8, [x0]
	cbz	x8, LBB0_5
; %bb.4:
	mov	x0, x8
	bl	_free
	ldr	x8, [x19]
	str	xzr, [x8]
	ldr	x0, [x19]
LBB0_5:
	bl	_XDestroyImage
	str	xzr, [x19]
LBB0_6:
Lloh4:
	adrp	x8, _have_gc@GOTPAGE
Lloh5:
	ldr	x8, [x8, _have_gc@GOTPAGEOFF]
Lloh6:
	ldr	x8, [x8]
Lloh7:
	adrp	x19, _display@GOTPAGE
Lloh8:
	ldr	x19, [x19, _display@GOTPAGEOFF]
	cbz	x8, LBB0_8
; %bb.7:
	ldr	w0, [x19]
Lloh9:
	adrp	x8, _gc@GOTPAGE
Lloh10:
	ldr	x8, [x8, _gc@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	bl	_XFreeGC
LBB0_8:
Lloh12:
	adrp	x8, _have_window@GOTPAGE
Lloh13:
	ldr	x8, [x8, _have_window@GOTPAGEOFF]
Lloh14:
	ldr	x8, [x8]
	cbz	x8, LBB0_10
; %bb.9:
	ldr	w0, [x19]
Lloh15:
	adrp	x8, _window@GOTPAGE
Lloh16:
	ldr	x8, [x8, _window@GOTPAGEOFF]
Lloh17:
	ldr	w1, [x8]
	bl	_XDestroyWindow
LBB0_10:
Lloh18:
	adrp	x8, _have_colormap@GOTPAGE
Lloh19:
	ldr	x8, [x8, _have_colormap@GOTPAGEOFF]
Lloh20:
	ldr	x8, [x8]
	cbz	x8, LBB0_12
; %bb.11:
	ldr	w0, [x19]
Lloh21:
	adrp	x8, _colormap@GOTPAGE
Lloh22:
	ldr	x8, [x8, _colormap@GOTPAGEOFF]
Lloh23:
	ldr	w1, [x8]
	bl	_XFreeColormap
LBB0_12:
Lloh24:
	adrp	x8, _have_nondefault_visual@GOTPAGE
Lloh25:
	ldr	x8, [x8, _have_nondefault_visual@GOTPAGEOFF]
Lloh26:
	ldr	x8, [x8]
	cbz	x8, LBB0_14
; %bb.13:
Lloh27:
	adrp	x8, _visual_list@GOTPAGE
Lloh28:
	ldr	x8, [x8, _visual_list@GOTPAGEOFF]
Lloh29:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_XFree
LBB0_14:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.cfi_endproc
                                        ; -- End function
	.comm	_image_data,8,3                 ; @image_data
	.comm	_ximage,8,3                     ; @ximage
	.comm	_have_gc,8,3                    ; @have_gc
	.comm	_display,4,2                    ; @display
	.comm	_gc,4,2                         ; @gc
	.comm	_have_window,8,3                ; @have_window
	.comm	_window,4,2                     ; @window
	.comm	_have_colormap,8,3              ; @have_colormap
	.comm	_colormap,4,2                   ; @colormap
	.comm	_have_nondefault_visual,8,3     ; @have_nondefault_visual
	.comm	_visual_list,4,2                ; @visual_list
	.no_dead_strip	_rpng_x_cleanup
.subsections_via_symbols
