	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function callrethooks
_callrethooks:                          ## @callrethooks
	.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, %rbx
	callq	_savestack
	movl	%eax, %r14d
	movq	_LUA_HOOKRET@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	movl	$-1, %edx
	callq	_luaD_callhook
	movq	8(%rbx), %rdi
	callq	_f_isLua
	testq	%rax, %rax
	je	LBB0_5
## %bb.1:
	movq	_LUA_MASKRET@GOTPCREL(%rip), %r15
	movl	(%r15), %eax
	testl	%eax, (%rbx)
	je	LBB0_5
## %bb.2:
	movq	_LUA_HOOKTAILRET@GOTPCREL(%rip), %r12
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%rbx), %rax
	subl	$1, (%rax)
	jb	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movl	(%r12), %esi
	movq	%rbx, %rdi
	movl	$-1, %edx
	callq	_luaD_callhook
	movl	(%r15), %eax
	testl	%eax, (%rbx)
	jne	LBB0_3
LBB0_5:
	movq	%rbx, %rdi
	movl	%r14d, %esi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_restorestack                   ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_LUA_HOOKRET,4,2                ## @LUA_HOOKRET
	.comm	_LUA_MASKRET,4,2                ## @LUA_MASKRET
	.comm	_LUA_HOOKTAILRET,4,2            ## @LUA_HOOKTAILRET
	.no_dead_strip	_callrethooks
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function callrethooks
_callrethooks:                          ; @callrethooks
	.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
	bl	_savestack
	mov	x20, x0
Lloh0:
	adrp	x8, _LUA_HOOKRET@GOTPAGE
Lloh1:
	ldr	x8, [x8, _LUA_HOOKRET@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #-1
	bl	_luaD_callhook
	ldr	x0, [x19, #8]
	bl	_f_isLua
	cbz	x0, LBB0_5
; %bb.1:
	ldr	w8, [x19]
Lloh3:
	adrp	x21, _LUA_MASKRET@GOTPAGE
Lloh4:
	ldr	x21, [x21, _LUA_MASKRET@GOTPAGEOFF]
	ldr	w9, [x21]
	tst	w9, w8
	b.eq	LBB0_5
; %bb.2:
Lloh5:
	adrp	x22, _LUA_HOOKTAILRET@GOTPAGE
Lloh6:
	ldr	x22, [x22, _LUA_HOOKTAILRET@GOTPAGEOFF]
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #8]
	ldr	w9, [x8]
	sub	w10, w9, #1
	str	w10, [x8]
	cbz	w9, LBB0_5
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	w1, [x22]
	mov	x0, x19
	mov	w2, #-1
	bl	_luaD_callhook
	ldr	w8, [x19]
	ldr	w9, [x21]
	tst	w9, w8
	b.ne	LBB0_3
LBB0_5:
	mov	x0, x19
	mov	x1, x20
	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	_restorestack
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_LUA_HOOKRET,4,2                ; @LUA_HOOKRET
	.comm	_LUA_MASKRET,4,2                ; @LUA_MASKRET
	.comm	_LUA_HOOKTAILRET,4,2            ; @LUA_HOOKTAILRET
	.no_dead_strip	_callrethooks
.subsections_via_symbols
