	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function traversethread
_traversethread:                        ## @traversethread
	.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	24(%rsi), %rbx
	testq	%rbx, %rbx
	je	LBB0_1
## %bb.2:
	movq	%rsi, %r15
	movq	%rdi, %r14
	movq	(%rdi), %rax
	movq	_GCSinsideatomic@GOTPCREL(%rip), %r12
	movl	$1, %edi
	cmpq	(%r12), %rax
	je	LBB0_5
## %bb.3:
	cmpq	$0, 16(%r15)
	je	LBB0_5
## %bb.4:
	movq	%r15, %rdi
	callq	_isintwups
	xorl	%edi, %edi
	testq	%rax, %rax
	setne	%dil
LBB0_5:
	callq	_lua_assert
	cmpq	32(%r15), %rbx
	jae	LBB0_8
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_markvalue
	addq	$4, %rbx
	cmpq	32(%r15), %rbx
	jb	LBB0_6
LBB0_8:
	movq	(%r14), %rax
	cmpq	(%r12), %rax
	jne	LBB0_15
## %bb.9:
	movslq	(%r15), %r12
	shlq	$2, %r12
	addq	24(%r15), %r12
	cmpq	%r12, %rbx
	jae	LBB0_12
	.p2align	4, 0x90
LBB0_10:                                ## =>This Inner Loop Header: Depth=1
	movq	%rbx, %rdi
	callq	_setnilvalue
	addq	$4, %rbx
	cmpq	%r12, %rbx
	jb	LBB0_10
LBB0_12:
	movq	%r15, %rdi
	callq	_isintwups
	testq	%rax, %rax
	jne	LBB0_17
## %bb.13:
	cmpq	$0, 16(%r15)
	je	LBB0_17
## %bb.14:
	movq	16(%r14), %rax
	movq	%rax, 8(%r15)
	movq	%r15, 16(%r14)
	jmp	LBB0_17
LBB0_1:
	movl	$1, %eax
	jmp	LBB0_18
LBB0_15:
	movq	8(%r14), %rax
	movq	_KGC_EMERGENCY@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_17
## %bb.16:
	movq	%r15, %rdi
	callq	_luaD_shrinkstack
LBB0_17:
	movl	4(%r15), %eax
	addl	(%r15), %eax
	leal	40(,%rax,4), %eax
LBB0_18:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GCSinsideatomic,8,3            ## @GCSinsideatomic
	.comm	_KGC_EMERGENCY,8,3              ## @KGC_EMERGENCY
	.no_dead_strip	_traversethread
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function traversethread
_traversethread:                        ; @traversethread
	.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
	ldr	x21, [x1, #24]
	cbz	x21, LBB0_3
; %bb.1:
	mov	x19, x1
	mov	x20, x0
	ldr	x8, [x0]
Lloh0:
	adrp	x22, _GCSinsideatomic@GOTPAGE
Lloh1:
	ldr	x22, [x22, _GCSinsideatomic@GOTPAGEOFF]
	ldr	x9, [x22]
	cmp	x8, x9
	b.ne	LBB0_4
; %bb.2:
	mov	w0, #1
	bl	_lua_assert
	b	LBB0_8
LBB0_3:
	mov	w0, #1
	b	LBB0_18
LBB0_4:
	ldr	x8, [x19, #16]
	cbz	x8, LBB0_6
; %bb.5:
	mov	x0, x19
	bl	_isintwups
	cmp	x0, #0
	cset	w0, ne
	bl	_lua_assert
	b	LBB0_8
LBB0_6:
	mov	w0, #1
	bl	_lua_assert
	b	LBB0_8
LBB0_7:                                 ;   in Loop: Header=BB0_8 Depth=1
	mov	x0, x20
	mov	x1, x21
	bl	_markvalue
	add	x21, x21, #4
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #32]
	cmp	x21, x8
	b.lo	LBB0_7
; %bb.9:
	ldr	x8, [x20]
	ldr	x9, [x22]
	cmp	x8, x9
	b.ne	LBB0_15
; %bb.10:
	ldr	x8, [x19, #24]
	ldrsw	x9, [x19]
	add	x22, x8, x9, lsl #2
	cmp	x21, x22
	b.hs	LBB0_12
LBB0_11:                                ; =>This Inner Loop Header: Depth=1
	mov	x0, x21
	bl	_setnilvalue
	add	x21, x21, #4
	cmp	x21, x22
	b.lo	LBB0_11
LBB0_12:
	mov	x0, x19
	bl	_isintwups
	cbnz	x0, LBB0_17
; %bb.13:
	ldr	x8, [x19, #16]
	cbz	x8, LBB0_17
; %bb.14:
	ldr	x8, [x20, #16]
	str	x8, [x19, #8]
	str	x19, [x20, #16]
	b	LBB0_17
LBB0_15:
	ldr	x8, [x20, #8]
Lloh2:
	adrp	x9, _KGC_EMERGENCY@GOTPAGE
Lloh3:
	ldr	x9, [x9, _KGC_EMERGENCY@GOTPAGEOFF]
Lloh4:
	ldr	x9, [x9]
	cmp	x8, x9
	b.eq	LBB0_17
; %bb.16:
	mov	x0, x19
	bl	_luaD_shrinkstack
LBB0_17:
	ldp	w8, w9, [x19]
	add	w8, w9, w8
	lsl	w8, w8, #2
	add	w0, w8, #40
LBB0_18:
	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 AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_GCSinsideatomic,8,3            ; @GCSinsideatomic
	.comm	_KGC_EMERGENCY,8,3              ; @KGC_EMERGENCY
	.no_dead_strip	_traversethread
.subsections_via_symbols
