	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function atomic
_atomic:                                ## @atomic
	.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, %r14
	callq	_G
	movq	%rax, %rbx
	movq	72(%rax), %r15
	xorl	%edi, %edi
	cmpq	$0, 40(%rax)
	jne	LBB0_2
## %bb.1:
	xorl	%edi, %edi
	cmpq	$0, 32(%rbx)
	sete	%dil
LBB0_2:
	callq	_lua_assert
	movl	64(%rbx), %edi
	callq	_iswhite
	xorl	%edi, %edi
	testl	%eax, %eax
	sete	%dil
	callq	_lua_assert
	movq	_GCSinsideatomic@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 60(%rbx)
	movq	$0, 8(%rbx)
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_markobject
	movq	%rbx, %rsi
	addq	$56, %rsi
	movq	%rbx, %rdi
	callq	_markvalue
	movq	%rbx, %rdi
	callq	_markmt
	movq	%rbx, %rdi
	callq	_remarkupvals
	movq	%rbx, %rdi
	callq	_propagateall
	movq	8(%rbx), %r14
	movq	%r15, 48(%rbx)
	movq	%rbx, %rdi
	callq	_propagateall
	movq	$0, 8(%rbx)
	movq	%rbx, %rdi
	callq	_convergeephemerons
	movq	32(%rbx), %rsi
	movq	%rbx, %rdi
	xorl	%edx, %edx
	callq	_clearvalues
	movq	24(%rbx), %rsi
	movq	%rbx, %rdi
	xorl	%edx, %edx
	callq	_clearvalues
	movq	24(%rbx), %r15
	movq	32(%rbx), %r12
	addq	8(%rbx), %r14
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_separatetobefnz
	movl	$1, (%rbx)
	movq	%rbx, %rdi
	callq	_markbeingfnz
	movq	%rbx, %rdi
	callq	_propagateall
	movq	$0, 8(%rbx)
	movq	%rbx, %rdi
	callq	_convergeephemerons
	movq	40(%rbx), %rsi
	movq	%rbx, %rdi
	xorl	%edx, %edx
	callq	_clearkeys
	movq	24(%rbx), %rsi
	movq	%rbx, %rdi
	xorl	%edx, %edx
	callq	_clearkeys
	movq	32(%rbx), %rsi
	movq	%rbx, %rdi
	movq	%r12, %rdx
	callq	_clearvalues
	movq	24(%rbx), %rsi
	movq	%rbx, %rdi
	movq	%r15, %rdx
	callq	_clearvalues
	movq	%rbx, %rdi
	callq	_luaS_clearcache
	movq	%rbx, %rdi
	callq	_otherwhite
	movl	%eax, %edi
	callq	_cast_byte
	movl	%eax, 16(%rbx)
	addq	8(%rbx), %r14
	movq	%r14, %rax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GCSinsideatomic,4,2            ## @GCSinsideatomic
	.no_dead_strip	_atomic
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function atomic
_atomic:                                ; @atomic
	.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	x20, x0
	bl	_G
	mov	x19, x0
	ldr	x21, [x0, #72]
	ldr	x8, [x0, #40]
	cbz	x8, LBB0_2
; %bb.1:
	mov	w0, #0
	b	LBB0_3
LBB0_2:
	ldr	x8, [x19, #32]
	cmp	x8, #0
	cset	w0, eq
LBB0_3:
	bl	_lua_assert
	ldr	w0, [x19, #64]
	bl	_iswhite
	cmp	w0, #0
	cset	w0, eq
	bl	_lua_assert
Lloh0:
	adrp	x8, _GCSinsideatomic@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GCSinsideatomic@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	str	w8, [x19, #60]
	str	xzr, [x19, #8]
	mov	x0, x19
	mov	x1, x20
	bl	_markobject
	add	x1, x19, #56
	mov	x0, x19
	bl	_markvalue
	mov	x0, x19
	bl	_markmt
	mov	x0, x19
	bl	_remarkupvals
	mov	x0, x19
	bl	_propagateall
	ldr	x22, [x19, #8]
	str	x21, [x19, #48]
	mov	x0, x19
	bl	_propagateall
	str	xzr, [x19, #8]
	mov	x0, x19
	bl	_convergeephemerons
	ldr	x1, [x19, #32]
	mov	x0, x19
	mov	x2, #0
	bl	_clearvalues
	ldr	x1, [x19, #24]
	mov	x0, x19
	mov	x2, #0
	bl	_clearvalues
	ldp	x21, x20, [x19, #24]
	ldr	x8, [x19, #8]
	add	x22, x8, x22
	mov	x0, x19
	mov	w1, #0
	bl	_separatetobefnz
	mov	w8, #1
	str	w8, [x19]
	mov	x0, x19
	bl	_markbeingfnz
	mov	x0, x19
	bl	_propagateall
	str	xzr, [x19, #8]
	mov	x0, x19
	bl	_convergeephemerons
	ldr	x1, [x19, #40]
	mov	x0, x19
	mov	x2, #0
	bl	_clearkeys
	ldr	x1, [x19, #24]
	mov	x0, x19
	mov	x2, #0
	bl	_clearkeys
	ldr	x1, [x19, #32]
	mov	x0, x19
	mov	x2, x20
	bl	_clearvalues
	ldr	x1, [x19, #24]
	mov	x0, x19
	mov	x2, x21
	bl	_clearvalues
	mov	x0, x19
	bl	_luaS_clearcache
	mov	x0, x19
	bl	_otherwhite
	bl	_cast_byte
	str	w0, [x19, #16]
	ldr	x8, [x19, #8]
	add	x0, x22, 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
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_GCSinsideatomic,4,2            ; @GCSinsideatomic
	.no_dead_strip	_atomic
.subsections_via_symbols
