	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_METAFILE_Free                  ## -- Begin function METAFILE_Free
	.p2align	4, 0x90
_METAFILE_Free:                         ## @METAFILE_Free
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %r14
	movl	36(%rdi), %edi
	callq	_heap_free
	movl	32(%r14), %edi
	callq	_CloseEnhMetaFile
	movl	%eax, %edi
	callq	_DeleteEnhMetaFile
	cmpl	$0, 28(%r14)
	je	LBB0_1
## %bb.2:
	cmpq	$0, 16(%r14)
	je	LBB0_4
LBB0_3:
	leaq	L_.str(%rip), %rdi
	callq	_WARN
	movq	16(%r14), %rax
	movq	$0, 8(%rax)
	movq	_TRUE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, (%rax)
LBB0_4:
	movq	8(%r14), %rdi
	testq	%rdi, %rdi
	je	LBB0_6
## %bb.5:
	callq	_IStream_Release
LBB0_6:
	movl	(%r14), %edi
	callq	_ARRAY_SIZE
	testl	%eax, %eax
	je	LBB0_9
## %bb.7:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r14, %rdi
	movl	%ebx, %esi
	callq	_metafile_free_object_table_entry
	incl	%ebx
	movl	(%r14), %edi
	callq	_ARRAY_SIZE
	cmpl	%eax, %ebx
	jb	LBB0_8
LBB0_9:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_1:
	movl	24(%r14), %edi
	callq	_DeleteEnhMetaFile
	cmpq	$0, 16(%r14)
	jne	LBB0_3
	jmp	LBB0_4
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"metafile closed while recording\n"

	.comm	_TRUE,4,2                       ## @TRUE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_METAFILE_Free                  ; -- Begin function METAFILE_Free
	.p2align	2
_METAFILE_Free:                         ; @METAFILE_Free
	.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
	mov	x19, x0
	ldr	w0, [x0, #36]
	bl	_heap_free
	ldr	w0, [x19, #32]
	bl	_CloseEnhMetaFile
	bl	_DeleteEnhMetaFile
	ldr	w8, [x19, #28]
	cbz	w8, LBB0_9
; %bb.1:
	ldr	x8, [x19, #16]
	cbz	x8, LBB0_3
LBB0_2:
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_WARN
	ldr	x8, [x19, #16]
	str	xzr, [x8, #8]
Lloh2:
	adrp	x9, _TRUE@GOTPAGE
Lloh3:
	ldr	x9, [x9, _TRUE@GOTPAGEOFF]
Lloh4:
	ldr	w9, [x9]
	str	w9, [x8]
LBB0_3:
	ldr	x0, [x19, #8]
	cbz	x0, LBB0_5
; %bb.4:
	bl	_IStream_Release
LBB0_5:
	ldr	w0, [x19]
	bl	_ARRAY_SIZE
	cbz	w0, LBB0_8
; %bb.6:
	mov	w20, #0
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	mov	x1, x20
	bl	_metafile_free_object_table_entry
	add	w20, w20, #1
	ldr	w0, [x19]
	bl	_ARRAY_SIZE
	cmp	w20, w0
	b.lo	LBB0_7
LBB0_8:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_9:
	ldr	w0, [x19, #24]
	bl	_DeleteEnhMetaFile
	ldr	x8, [x19, #16]
	cbnz	x8, LBB0_2
	b	LBB0_3
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"metafile closed while recording\n"

	.comm	_TRUE,4,2                       ; @TRUE
.subsections_via_symbols
