	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function demo_cleanup
_demo_cleanup:                          ## @demo_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	%r15
	pushq	%r14
	pushq	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	cmpq	$0, (%rdi)
	je	LBB0_3
## %bb.1:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movl	48(%r15), %edi
	movq	144(%r15), %rax
	movl	(%rax,%rbx,4), %esi
	xorl	%edx, %edx
	callq	_vkDestroyFramebuffer
	incq	%rbx
	cmpq	(%r15), %rbx
	jb	LBB0_2
LBB0_3:
	movq	144(%r15), %rdi
	callq	_free
	movl	48(%r15), %edi
	movl	136(%r15), %esi
	xorl	%edx, %edx
	callq	_vkDestroyDescriptorPool
	cmpq	$0, 128(%r15)
	je	LBB0_5
## %bb.4:
	leaq	128(%r15), %rcx
	movl	48(%r15), %edi
	movl	112(%r15), %esi
	movl	$1, %edx
	callq	_vkFreeCommandBuffers
LBB0_5:
	movl	48(%r15), %edi
	movl	112(%r15), %esi
	leaq	120(%r15), %rcx
	movl	$1, %edx
	callq	_vkFreeCommandBuffers
	movl	48(%r15), %edi
	movl	112(%r15), %esi
	xorl	%edx, %edx
	callq	_vkDestroyCommandPool
	movl	48(%r15), %edi
	movl	108(%r15), %esi
	xorl	%edx, %edx
	callq	_vkDestroyPipeline
	movl	48(%r15), %edi
	movl	104(%r15), %esi
	xorl	%edx, %edx
	callq	_vkDestroyRenderPass
	movl	48(%r15), %edi
	movl	100(%r15), %esi
	xorl	%edx, %edx
	callq	_vkDestroyPipelineLayout
	movl	48(%r15), %edi
	movl	96(%r15), %esi
	xorl	%edx, %edx
	callq	_vkDestroyDescriptorSetLayout
	movl	48(%r15), %edi
	movl	92(%r15), %esi
	xorl	%edx, %edx
	callq	_vkDestroyBuffer
	movl	48(%r15), %edi
	movl	88(%r15), %esi
	xorl	%edx, %edx
	callq	_vkFreeMemory
	movq	_DEMO_TEXTURE_COUNT@GOTPCREL(%rip), %r14
	cmpq	$0, (%r14)
	je	LBB0_8
## %bb.6:
	xorl	%ebx, %ebx
	xorl	%r12d, %r12d
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movl	48(%r15), %edi
	movq	80(%r15), %rax
	movl	12(%rax,%rbx), %esi
	xorl	%edx, %edx
	callq	_vkDestroyImageView
	movl	48(%r15), %edi
	movq	80(%r15), %rax
	movl	8(%rax,%rbx), %esi
	xorl	%edx, %edx
	callq	_vkDestroyImage
	movl	48(%r15), %edi
	movq	80(%r15), %rax
	movl	4(%rax,%rbx), %esi
	xorl	%edx, %edx
	callq	_vkFreeMemory
	movl	48(%r15), %edi
	movq	80(%r15), %rax
	movl	(%rax,%rbx), %esi
	xorl	%edx, %edx
	callq	_vkDestroySampler
	incq	%r12
	addq	$16, %rbx
	cmpq	(%r14), %r12
	jb	LBB0_7
LBB0_8:
	cmpq	$0, (%r15)
	je	LBB0_11
## %bb.9:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_10:                                ## =>This Inner Loop Header: Depth=1
	movl	48(%r15), %edi
	movq	56(%r15), %rax
	movl	(%rax,%rbx,4), %esi
	xorl	%edx, %edx
	callq	_vkDestroyImageView
	incq	%rbx
	cmpq	(%r15), %rbx
	jb	LBB0_10
LBB0_11:
	movl	48(%r15), %edi
	movl	76(%r15), %esi
	xorl	%edx, %edx
	callq	_vkDestroyImageView
	movl	48(%r15), %edi
	movl	72(%r15), %esi
	xorl	%edx, %edx
	callq	_vkDestroyImage
	movl	48(%r15), %edi
	movl	68(%r15), %esi
	xorl	%edx, %edx
	callq	_vkFreeMemory
	movl	48(%r15), %edi
	movl	64(%r15), %esi
	xorl	%edx, %edx
	callq	_vkDestroySwapchainKHR
	movq	56(%r15), %rdi
	callq	_free
	movl	48(%r15), %edi
	xorl	%esi, %esi
	callq	_vkDestroyDevice
	cmpq	$0, 40(%r15)
	je	LBB0_13
## %bb.12:
	movl	24(%r15), %edi
	movl	32(%r15), %esi
	xorl	%edx, %edx
	callq	_vkDestroyDebugReportCallbackEXT
LBB0_13:
	movl	24(%r15), %edi
	movl	28(%r15), %esi
	xorl	%edx, %edx
	callq	_vkDestroySurfaceKHR
	movl	24(%r15), %edi
	xorl	%esi, %esi
	callq	_vkDestroyInstance
	movq	16(%r15), %rdi
	callq	_free
	movl	8(%r15), %edi
	callq	_glfwDestroyWindow
	xorl	%eax, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_glfwTerminate                  ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_DEMO_TEXTURE_COUNT,8,3         ## @DEMO_TEXTURE_COUNT
	.no_dead_strip	_demo_cleanup
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function demo_cleanup
_demo_cleanup:                          ; @demo_cleanup
	.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
	ldr	x8, [x0]
	cbz	x8, LBB0_3
; %bb.1:
	mov	x20, #0
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x19, #48]
	ldr	x8, [x19, #144]
	ldr	w1, [x8, x20, lsl #2]
	mov	x2, #0
	bl	_vkDestroyFramebuffer
	add	x20, x20, #1
	ldr	x8, [x19]
	cmp	x20, x8
	b.lo	LBB0_2
LBB0_3:
	ldr	x0, [x19, #144]
	bl	_free
	ldr	w0, [x19, #48]
	ldr	w1, [x19, #136]
	mov	x2, #0
	bl	_vkDestroyDescriptorPool
	mov	x3, x19
	ldr	x8, [x3, #128]!
	cbz	x8, LBB0_5
; %bb.4:
	ldr	w0, [x19, #48]
	ldr	w1, [x19, #112]
	mov	w2, #1
	bl	_vkFreeCommandBuffers
LBB0_5:
	ldr	w0, [x19, #48]
	ldr	w1, [x19, #112]
	add	x3, x19, #120
	mov	w2, #1
	bl	_vkFreeCommandBuffers
	ldr	w0, [x19, #48]
	ldr	w1, [x19, #112]
	mov	x2, #0
	bl	_vkDestroyCommandPool
	ldr	w0, [x19, #48]
	ldr	w1, [x19, #108]
	mov	x2, #0
	bl	_vkDestroyPipeline
	ldr	w0, [x19, #48]
	ldr	w1, [x19, #104]
	mov	x2, #0
	bl	_vkDestroyRenderPass
	ldr	w0, [x19, #48]
	ldr	w1, [x19, #100]
	mov	x2, #0
	bl	_vkDestroyPipelineLayout
	ldr	w0, [x19, #48]
	ldr	w1, [x19, #96]
	mov	x2, #0
	bl	_vkDestroyDescriptorSetLayout
	ldr	w0, [x19, #48]
	ldr	w1, [x19, #92]
	mov	x2, #0
	bl	_vkDestroyBuffer
	ldr	w0, [x19, #48]
	ldr	w1, [x19, #88]
	mov	x2, #0
	bl	_vkFreeMemory
Lloh0:
	adrp	x20, _DEMO_TEXTURE_COUNT@GOTPAGE
Lloh1:
	ldr	x20, [x20, _DEMO_TEXTURE_COUNT@GOTPAGEOFF]
	ldr	x8, [x20]
	cbz	x8, LBB0_8
; %bb.6:
	mov	x21, #0
	mov	x22, #0
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x19, #48]
	ldr	x8, [x19, #80]
	add	x8, x8, x21
	ldr	w1, [x8, #12]
	mov	x2, #0
	bl	_vkDestroyImageView
	ldr	w0, [x19, #48]
	ldr	x8, [x19, #80]
	add	x8, x8, x21
	ldr	w1, [x8, #8]
	mov	x2, #0
	bl	_vkDestroyImage
	ldr	w0, [x19, #48]
	ldr	x8, [x19, #80]
	add	x8, x8, x21
	ldr	w1, [x8, #4]
	mov	x2, #0
	bl	_vkFreeMemory
	ldr	w0, [x19, #48]
	ldr	x8, [x19, #80]
	ldr	w1, [x8, x21]
	mov	x2, #0
	bl	_vkDestroySampler
	add	x22, x22, #1
	ldr	x8, [x20]
	add	x21, x21, #16
	cmp	x22, x8
	b.lo	LBB0_7
LBB0_8:
	ldr	x8, [x19]
	cbz	x8, LBB0_11
; %bb.9:
	mov	x20, #0
LBB0_10:                                ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x19, #48]
	ldr	x8, [x19, #56]
	ldr	w1, [x8, x20, lsl #2]
	mov	x2, #0
	bl	_vkDestroyImageView
	add	x20, x20, #1
	ldr	x8, [x19]
	cmp	x20, x8
	b.lo	LBB0_10
LBB0_11:
	ldr	w0, [x19, #48]
	ldr	w1, [x19, #76]
	mov	x2, #0
	bl	_vkDestroyImageView
	ldr	w0, [x19, #48]
	ldr	w1, [x19, #72]
	mov	x2, #0
	bl	_vkDestroyImage
	ldr	w0, [x19, #48]
	ldr	w1, [x19, #68]
	mov	x2, #0
	bl	_vkFreeMemory
	ldr	w0, [x19, #48]
	ldr	w1, [x19, #64]
	mov	x2, #0
	bl	_vkDestroySwapchainKHR
	ldr	x0, [x19, #56]
	bl	_free
	ldr	w0, [x19, #48]
	mov	x1, #0
	bl	_vkDestroyDevice
	ldr	x8, [x19, #40]
	cbz	x8, LBB0_13
; %bb.12:
	ldr	w0, [x19, #24]
	ldr	w1, [x19, #32]
	mov	x2, #0
	bl	_vkDestroyDebugReportCallbackEXT
LBB0_13:
	ldp	w0, w1, [x19, #24]
	mov	x2, #0
	bl	_vkDestroySurfaceKHR
	ldr	w0, [x19, #24]
	mov	x1, #0
	bl	_vkDestroyInstance
	ldr	x0, [x19, #16]
	bl	_free
	ldr	w0, [x19, #8]
	bl	_glfwDestroyWindow
	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
	b	_glfwTerminate
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_DEMO_TEXTURE_COUNT,8,3         ; @DEMO_TEXTURE_COUNT
	.no_dead_strip	_demo_cleanup
.subsections_via_symbols
