	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rpng2_x_cleanup
_rpng2_x_cleanup:                       ## @rpng2_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	_bg_image@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_3
## %bb.1:
	movq	_bg_data@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rdi
	testq	%rdi, %rdi
	je	LBB0_3
## %bb.2:
	callq	_free
	movq	$0, (%rbx)
LBB0_3:
	movq	_rpng2_info@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rdi
	testq	%rdi, %rdi
	je	LBB0_5
## %bb.4:
	callq	_free
	movq	$0, (%rbx)
LBB0_5:
	movq	8(%rbx), %rdi
	testq	%rdi, %rdi
	je	LBB0_7
## %bb.6:
	callq	_free
	movq	$0, 8(%rbx)
LBB0_7:
	movq	_ximage@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rdi
	testq	%rdi, %rdi
	je	LBB0_11
## %bb.8:
	movq	(%rdi), %rax
	testq	%rax, %rax
	je	LBB0_10
## %bb.9:
	movq	%rax, %rdi
	callq	_free
	movq	(%rbx), %rax
	movq	$0, (%rax)
	movq	(%rbx), %rdi
LBB0_10:
	callq	_XDestroyImage
	movq	$0, (%rbx)
LBB0_11:
	movq	_have_gc@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_13
## %bb.12:
	movq	_display@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_gc@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_XFreeGC
LBB0_13:
	movq	_have_window@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_15
## %bb.14:
	movq	_display@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_window@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_XDestroyWindow
LBB0_15:
	movq	_have_colormap@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_17
## %bb.16:
	movq	_display@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_colormap@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_XFreeColormap
LBB0_17:
	movq	_have_nondefault_visual@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_18
## %bb.19:
	movq	_visual_list@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	jmp	_XFree                          ## TAILCALL
LBB0_18:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_bg_image,8,3                   ## @bg_image
	.comm	_bg_data,8,3                    ## @bg_data
	.comm	_rpng2_info,16,3                ## @rpng2_info
	.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	_rpng2_x_cleanup
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rpng2_x_cleanup
_rpng2_x_cleanup:                       ; @rpng2_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	x8, _bg_image@GOTPAGE
Lloh1:
	ldr	x8, [x8, _bg_image@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
Lloh3:
	adrp	x19, _bg_data@GOTPAGE
Lloh4:
	ldr	x19, [x19, _bg_data@GOTPAGEOFF]
	ldr	x0, [x19]
	cmp	x8, #0
	ccmp	x0, #0, #4, ne
	b.eq	LBB0_2
; %bb.1:
	bl	_free
	str	xzr, [x19]
LBB0_2:
Lloh5:
	adrp	x19, _rpng2_info@GOTPAGE
Lloh6:
	ldr	x19, [x19, _rpng2_info@GOTPAGEOFF]
	ldr	x0, [x19]
	cbz	x0, LBB0_4
; %bb.3:
	bl	_free
	str	xzr, [x19]
LBB0_4:
	ldr	x0, [x19, #8]
	cbz	x0, LBB0_6
; %bb.5:
	bl	_free
	str	xzr, [x19, #8]
LBB0_6:
Lloh7:
	adrp	x19, _ximage@GOTPAGE
Lloh8:
	ldr	x19, [x19, _ximage@GOTPAGEOFF]
	ldr	x0, [x19]
	cbz	x0, LBB0_10
; %bb.7:
	ldr	x8, [x0]
	cbz	x8, LBB0_9
; %bb.8:
	mov	x0, x8
	bl	_free
	ldr	x8, [x19]
	str	xzr, [x8]
	ldr	x0, [x19]
LBB0_9:
	bl	_XDestroyImage
	str	xzr, [x19]
LBB0_10:
Lloh9:
	adrp	x8, _have_gc@GOTPAGE
Lloh10:
	ldr	x8, [x8, _have_gc@GOTPAGEOFF]
Lloh11:
	ldr	x8, [x8]
Lloh12:
	adrp	x19, _display@GOTPAGE
Lloh13:
	ldr	x19, [x19, _display@GOTPAGEOFF]
	cbz	x8, LBB0_12
; %bb.11:
	ldr	w0, [x19]
Lloh14:
	adrp	x8, _gc@GOTPAGE
Lloh15:
	ldr	x8, [x8, _gc@GOTPAGEOFF]
Lloh16:
	ldr	w1, [x8]
	bl	_XFreeGC
LBB0_12:
Lloh17:
	adrp	x8, _have_window@GOTPAGE
Lloh18:
	ldr	x8, [x8, _have_window@GOTPAGEOFF]
Lloh19:
	ldr	x8, [x8]
	cbz	x8, LBB0_14
; %bb.13:
	ldr	w0, [x19]
Lloh20:
	adrp	x8, _window@GOTPAGE
Lloh21:
	ldr	x8, [x8, _window@GOTPAGEOFF]
Lloh22:
	ldr	w1, [x8]
	bl	_XDestroyWindow
LBB0_14:
Lloh23:
	adrp	x8, _have_colormap@GOTPAGE
Lloh24:
	ldr	x8, [x8, _have_colormap@GOTPAGEOFF]
Lloh25:
	ldr	x8, [x8]
	cbz	x8, LBB0_16
; %bb.15:
	ldr	w0, [x19]
Lloh26:
	adrp	x8, _colormap@GOTPAGE
Lloh27:
	ldr	x8, [x8, _colormap@GOTPAGEOFF]
Lloh28:
	ldr	w1, [x8]
	bl	_XFreeColormap
LBB0_16:
Lloh29:
	adrp	x8, _have_nondefault_visual@GOTPAGE
Lloh30:
	ldr	x8, [x8, _have_nondefault_visual@GOTPAGEOFF]
Lloh31:
	ldr	x8, [x8]
	cbz	x8, LBB0_18
; %bb.17:
Lloh32:
	adrp	x8, _visual_list@GOTPAGE
Lloh33:
	ldr	x8, [x8, _visual_list@GOTPAGEOFF]
Lloh34:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_XFree
LBB0_18:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.cfi_endproc
                                        ; -- End function
	.comm	_bg_image,8,3                   ; @bg_image
	.comm	_bg_data,8,3                    ; @bg_data
	.comm	_rpng2_info,16,3                ; @rpng2_info
	.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	_rpng2_x_cleanup
.subsections_via_symbols
