	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_stack_set_tos                  ## -- Begin function stack_set_tos
	.p2align	4, 0x90
_stack_set_tos:                         ## @stack_set_tos
	.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	%rsi, %r14
	movq	%rdi, %rbx
	movslq	(%rdi), %rdi
	cmpq	$-1, %rdi
	je	LBB0_5
## %bb.1:
	shlq	$3, %rdi
	addq	8(%rbx), %rdi
	callq	_stack_free_value
	movq	8(%rbx), %rax
	movslq	(%rbx), %rcx
	movq	(%r14), %rdx
	movq	%rdx, (%rax,%rcx,8)
	movq	(%r14), %rdi
	testq	%rdi, %rdi
	je	LBB0_2
## %bb.3:
	callq	_array_dup
	movslq	(%rbx), %rcx
	jmp	LBB0_4
LBB0_5:
	movq	%rbx, %rdi
	movq	%r14, %rsi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_stack_push                     ## TAILCALL
LBB0_2:
	xorl	%eax, %eax
LBB0_4:
	movq	8(%rbx), %rdx
	movq	%rax, (%rdx,%rcx,8)
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_stack_set_tos                  ; -- Begin function stack_set_tos
	.p2align	2
_stack_set_tos:                         ; @stack_set_tos
	.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	x20, x1
	mov	x19, x0
	ldrsw	x8, [x0]
	cmn	w8, #1
	b.eq	LBB0_4
; %bb.1:
	ldr	x9, [x19, #8]
	add	x0, x9, x8, lsl #3
	bl	_stack_free_value
	ldr	x9, [x19, #8]
	ldrsw	x8, [x19]
	ldr	x10, [x20]
	str	x10, [x9, x8, lsl #3]
	ldr	x0, [x20]
	cbz	x0, LBB0_3
; %bb.2:
	bl	_array_dup
	ldrsw	x8, [x19]
LBB0_3:
	ldr	x9, [x19, #8]
	str	x0, [x9, x8, lsl #3]
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_4:
	mov	x0, x19
	mov	x1, x20
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_stack_push
	.cfi_endproc
                                        ; -- End function
.subsections_via_symbols
