	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function accumcap
_accumcap:                              ## @accumcap
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	8(%rdi), %r14
	movl	(%rdi), %edi
	leal	1(%rdi), %eax
	movl	%eax, (%rbx)
                                        ## kill: def $edi killed $edi killed $rdi
	callq	_isfullcap
	testq	%rax, %rax
	jne	LBB0_7
## %bb.1:
	movl	(%rbx), %edi
	callq	_isclosecap
	testq	%rax, %rax
	jne	LBB0_7
## %bb.2:
	movq	%rbx, %rdi
	callq	_pushcapture
	cmpl	$1, %eax
	jne	LBB0_7
## %bb.3:
	movl	(%rbx), %edi
	callq	_isclosecap
	testq	%rax, %rax
	jne	LBB0_10
## %bb.4:
	movq	_Cfunction@GOTPCREL(%rip), %r15
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%rbx), %edi
	callq	_captype
	cmpq	(%r15), %rax
	jne	LBB0_6
## %bb.9:                               ##   in Loop: Header=BB0_5 Depth=1
	movq	%rbx, %rdi
	callq	_pushluaval
	movq	%r14, %rdi
	movl	$-2, %esi
	callq	_lua_insert
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_pushallcaptures
                                        ## kill: def $eax killed $eax def $rax
	leal	1(%rax), %esi
	movq	%r14, %rdi
	movl	$1, %edx
	callq	_lua_call
	movl	(%rbx), %edi
	callq	_isclosecap
	testq	%rax, %rax
	je	LBB0_5
LBB0_10:
	incl	(%rbx)
	movl	$1, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	leaq	L_.str(%rip), %rsi
LBB0_8:
	movq	%r14, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_luaL_error                     ## TAILCALL
LBB0_6:
	leaq	L_.str.1(%rip), %rsi
	jmp	LBB0_8
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"no initial value for accumulator capture"

	.comm	_Cfunction,8,3                  ## @Cfunction
L_.str.1:                               ## @.str.1
	.asciz	"invalid (non function) capture to accumulate"

	.no_dead_strip	_accumcap
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function accumcap
_accumcap:                              ; @accumcap
	.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
	ldr	x19, [x0, #8]
	ldr	w0, [x0]
	add	w8, w0, #1
	str	w8, [x20]
	bl	_isfullcap
	cbnz	x0, LBB0_8
; %bb.1:
	ldr	w0, [x20]
	bl	_isclosecap
	cbnz	x0, LBB0_8
; %bb.2:
	mov	x0, x20
	bl	_pushcapture
	cmp	w0, #1
	b.ne	LBB0_8
; %bb.3:
	ldr	w0, [x20]
	bl	_isclosecap
	cbnz	x0, LBB0_7
; %bb.4:
Lloh0:
	adrp	x21, _Cfunction@GOTPAGE
Lloh1:
	ldr	x21, [x21, _Cfunction@GOTPAGEOFF]
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x20]
	bl	_captype
	ldr	x8, [x21]
	cmp	x0, x8
	b.ne	LBB0_10
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	x0, x20
	bl	_pushluaval
	mov	x0, x19
	mov	w1, #-2
	bl	_lua_insert
	mov	x0, x20
	mov	w1, #0
	bl	_pushallcaptures
	add	w1, w0, #1
	mov	x0, x19
	mov	w2, #1
	bl	_lua_call
	ldr	w0, [x20]
	bl	_isclosecap
	cbz	x0, LBB0_5
LBB0_7:
	ldr	w8, [x20]
	add	w8, w8, #1
	str	w8, [x20]
	mov	w0, #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_8:
Lloh2:
	adrp	x1, l_.str@PAGE
Lloh3:
	add	x1, x1, l_.str@PAGEOFF
LBB0_9:
	mov	x0, x19
	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	_luaL_error
LBB0_10:
Lloh4:
	adrp	x1, l_.str.1@PAGE
Lloh5:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_9
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"no initial value for accumulator capture"

	.comm	_Cfunction,8,3                  ; @Cfunction
l_.str.1:                               ; @.str.1
	.asciz	"invalid (non function) capture to accumulate"

	.no_dead_strip	_accumcap
.subsections_via_symbols
