	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_luaC_checkfinalizer            ## -- Begin function luaC_checkfinalizer
	.p2align	4, 0x90
_luaC_checkfinalizer:                   ## @luaC_checkfinalizer
	.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	%rdx, %r12
	movq	%rsi, %rbx
	movq	%rdi, %r15
	callq	_G
	movq	%rax, %r14
	movq	%rbx, %rdi
	callq	_tofinalize
	testq	%rax, %rax
	je	LBB0_1
LBB0_8:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	movq	_TM_GC@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	movq	%r12, %rsi
	callq	_gfasttm
	testq	%rax, %rax
	je	LBB0_8
## %bb.2:
	movq	%r14, %rdi
	callq	_issweepphase
	testq	%rax, %rax
	je	LBB0_5
## %bb.3:
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_makewhite
	movq	16(%r14), %rsi
	leaq	8(%rbx), %rax
	cmpq	%rax, %rsi
	jne	LBB0_5
## %bb.4:
	movq	%r15, %rdi
	callq	_sweeptolive
	movq	%rax, 16(%r14)
LBB0_5:
	movq	%r14, %rcx
	addq	$8, %rcx
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movq	%rcx, %rax
	movq	(%rcx), %rdx
	leaq	8(%rdx), %rcx
	cmpq	%rbx, %rdx
	jne	LBB0_6
## %bb.7:
	movq	8(%rbx), %rcx
	movq	%rcx, (%rax)
	movq	(%r14), %rax
	movq	%rax, 8(%rbx)
	movq	%rbx, (%r14)
	movl	(%rbx), %edi
	movq	_FINALIZEDBIT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_l_setbit                       ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_TM_GC,4,2                      ## @TM_GC
	.comm	_FINALIZEDBIT,4,2               ## @FINALIZEDBIT
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_luaC_checkfinalizer            ; -- Begin function luaC_checkfinalizer
	.p2align	2
_luaC_checkfinalizer:                   ; @luaC_checkfinalizer
	.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	x22, x2
	mov	x19, x1
	mov	x21, x0
	bl	_G
	mov	x20, x0
	mov	x0, x19
	bl	_tofinalize
	cbz	x0, LBB0_2
LBB0_1:
	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
LBB0_2:
Lloh0:
	adrp	x8, _TM_GC@GOTPAGE
Lloh1:
	ldr	x8, [x8, _TM_GC@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
	mov	x0, x20
	mov	x1, x22
	bl	_gfasttm
	cbz	x0, LBB0_1
; %bb.3:
	mov	x0, x20
	bl	_issweepphase
	cbz	x0, LBB0_6
; %bb.4:
	mov	x0, x20
	mov	x1, x19
	bl	_makewhite
	ldr	x1, [x20, #16]
	add	x8, x19, #8
	cmp	x1, x8
	b.ne	LBB0_6
; %bb.5:
	mov	x0, x21
	bl	_sweeptolive
	str	x0, [x20, #16]
LBB0_6:
	add	x9, x20, #8
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	mov	x8, x9
	ldr	x10, [x9]
	add	x9, x10, #8
	cmp	x10, x19
	b.ne	LBB0_7
; %bb.8:
	ldr	x9, [x19, #8]
	str	x9, [x8]
	ldr	x8, [x20]
	str	x8, [x19, #8]
	str	x19, [x20]
	ldr	w0, [x19]
Lloh3:
	adrp	x8, _FINALIZEDBIT@GOTPAGE
Lloh4:
	ldr	x8, [x8, _FINALIZEDBIT@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	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	_l_setbit
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_TM_GC,4,2                      ; @TM_GC
	.comm	_FINALIZEDBIT,4,2               ; @FINALIZEDBIT
.subsections_via_symbols
