	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tremove
_tremove:                               ## @tremove
	.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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r12
	movl	$1, %esi
	callq	_aux_getn
	movl	%eax, %r14d
	movq	%r12, %rdi
	movl	$2, %esi
	movl	%eax, %edx
	callq	_luaL_optint
	xorl	%r15d, %r15d
	testl	%eax, %eax
	jle	LBB0_5
## %bb.1:
	movl	%eax, %r13d
	cmpl	%r14d, %eax
	jg	LBB0_5
## %bb.2:
	leal	-1(%r14), %edx
	movl	$1, %r15d
	movq	%r12, %rdi
	movl	$1, %esi
	callq	_luaL_setn
	movq	%r12, %rdi
	movl	$1, %esi
	movl	%r13d, %edx
	callq	_lua_rawgeti
	cmpl	%r14d, %r13d
	jge	LBB0_4
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	leal	1(%r13), %ebx
	movq	%r12, %rdi
	movl	$1, %esi
	movl	%ebx, %edx
	callq	_lua_rawgeti
	movq	%r12, %rdi
	movl	$1, %esi
	movl	%r13d, %edx
	callq	_lua_rawseti
	movl	%ebx, %r13d
	cmpl	%ebx, %r14d
	jne	LBB0_3
LBB0_4:
	movq	%r12, %rdi
	callq	_lua_pushnil
	movq	%r12, %rdi
	movl	$1, %esi
	movl	%r14d, %edx
	callq	_lua_rawseti
LBB0_5:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_tremove
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tremove
_tremove:                               ; @tremove
	.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	x19, x0
	mov	w1, #1
	bl	_aux_getn
	mov	x20, x0
	mov	x0, x19
	mov	w1, #2
	mov	x2, x20
	bl	_luaL_optint
	cmp	w0, #1
	ccmp	w0, w20, #0, ge
	b.le	LBB0_2
; %bb.1:
	mov	w21, #0
	b	LBB0_5
LBB0_2:
	mov	x21, x0
	sub	w2, w20, #1
	mov	x0, x19
	mov	w1, #1
	bl	_luaL_setn
	mov	x0, x19
	mov	w1, #1
	mov	x2, x21
	bl	_lua_rawgeti
	cmp	w21, w20
	b.ge	LBB0_4
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	add	w22, w21, #1
	mov	x0, x19
	mov	w1, #1
	mov	x2, x22
	bl	_lua_rawgeti
	mov	x0, x19
	mov	w1, #1
	mov	x2, x21
	bl	_lua_rawseti
	mov	x21, x22
	cmp	w20, w22
	b.ne	LBB0_3
LBB0_4:
	mov	x0, x19
	bl	_lua_pushnil
	mov	w21, #1
	mov	x0, x19
	mov	w1, #1
	mov	x2, x20
	bl	_lua_rawseti
LBB0_5:
	mov	x0, x21
	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
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_tremove
.subsections_via_symbols
