	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function db_sethook
_db_sethook:                            ## @db_sethook
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	leaq	-44(%rbp), %rsi
	callq	_getthread
	movq	%rax, %r14
	movl	-44(%rbp), %esi
	incl	%esi
	movq	%rbx, %rdi
	callq	_lua_isnoneornil
	movl	-44(%rbp), %esi
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	incl	%esi
	movq	%rbx, %rdi
	callq	_lua_settop
	xorl	%eax, %eax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	xorl	%r15d, %r15d
	xorl	%r13d, %r13d
	jmp	LBB0_3
LBB0_2:
	addl	$2, %esi
	movq	%rbx, %rdi
	callq	_luaL_checkstring
	movq	%rax, %r13
	movl	-44(%rbp), %esi
	incl	%esi
	movq	_LUA_TFUNCTION@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	callq	_luaL_checktype
	movl	-44(%rbp), %esi
	addl	$3, %esi
	movq	%rbx, %rdi
	xorl	%edx, %edx
	callq	_luaL_optinteger
	movq	%rax, %r15
	movq	_hookf@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	%r13, %rdi
	movl	%r15d, %esi
	callq	_makemask
	movl	%eax, %r13d
LBB0_3:
	movq	_LUA_REGISTRYINDEX@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	movq	_HOOKKEY@GOTPCREL(%rip), %rdx
	movq	%rbx, %rdi
	callq	_lua_rawgetp
	movq	_LUA_TNIL@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_5
## %bb.4:
	movq	%rbx, %rdi
	xorl	%esi, %esi
	movl	$2, %edx
	callq	_lua_createtable
	movq	%rbx, %rdi
	movl	$-1, %esi
	callq	_lua_pushvalue
	movl	(%r12), %esi
	movq	_HOOKKEY@GOTPCREL(%rip), %rdx
	movq	%rbx, %rdi
	callq	_lua_rawsetp
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rdi
	callq	_lua_pushstring
	leaq	L_.str.1(%rip), %rdx
	movq	%rbx, %rdi
	movl	$-2, %esi
	callq	_lua_setfield
	movq	%rbx, %rdi
	movl	$-1, %esi
	callq	_lua_pushvalue
	movq	%rbx, %rdi
	movl	$-2, %esi
	callq	_lua_setmetatable
LBB0_5:
	movq	%rbx, %rdi
	movq	%r14, %rsi
	movl	$1, %edx
	callq	_checkstack
	movq	%r14, %rdi
	callq	_lua_pushthread
	movq	%r14, %rdi
	movq	%rbx, %rsi
	movl	$1, %edx
	callq	_lua_xmove
	movl	-44(%rbp), %esi
	incl	%esi
	movq	%rbx, %rdi
	callq	_lua_pushvalue
	movq	%rbx, %rdi
	movl	$-3, %esi
	callq	_lua_rawset
	movq	%r14, %rdi
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	movl	%r13d, %edx
	movl	%r15d, %ecx
	callq	_lua_sethook
	xorl	%eax, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_LUA_TFUNCTION,4,2              ## @LUA_TFUNCTION
	.comm	_hookf,8,3                      ## @hookf
	.comm	_LUA_REGISTRYINDEX,4,2          ## @LUA_REGISTRYINDEX
	.comm	_HOOKKEY,4,2                    ## @HOOKKEY
	.comm	_LUA_TNIL,8,3                   ## @LUA_TNIL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"k"

L_.str.1:                               ## @.str.1
	.asciz	"__mode"

	.no_dead_strip	_db_sethook
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function db_sethook
_db_sethook:                            ; @db_sethook
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x19, x0
	add	x1, sp, #12
	bl	_getthread
	mov	x20, x0
	ldr	w8, [sp, #12]
	add	w1, w8, #1
	mov	x0, x19
	bl	_lua_isnoneornil
	ldr	w8, [sp, #12]
	cbz	x0, LBB0_2
; %bb.1:
	add	w1, w8, #1
	mov	x0, x19
	bl	_lua_settop
	mov	x22, #0
	mov	w21, #0
	mov	w23, #0
	b	LBB0_3
LBB0_2:
	add	w1, w8, #2
	mov	x0, x19
	bl	_luaL_checkstring
	mov	x23, x0
	ldr	w8, [sp, #12]
	add	w1, w8, #1
Lloh0:
	adrp	x8, _LUA_TFUNCTION@GOTPAGE
Lloh1:
	ldr	x8, [x8, _LUA_TFUNCTION@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_luaL_checktype
	ldr	w8, [sp, #12]
	add	w1, w8, #3
	mov	x0, x19
	mov	w2, #0
	bl	_luaL_optinteger
	mov	x21, x0
Lloh3:
	adrp	x8, _hookf@GOTPAGE
Lloh4:
	ldr	x8, [x8, _hookf@GOTPAGEOFF]
Lloh5:
	ldr	x22, [x8]
	mov	x0, x23
	mov	x1, x21
	bl	_makemask
	mov	x23, x0
LBB0_3:
Lloh6:
	adrp	x24, _LUA_REGISTRYINDEX@GOTPAGE
Lloh7:
	ldr	x24, [x24, _LUA_REGISTRYINDEX@GOTPAGEOFF]
	ldr	w1, [x24]
Lloh8:
	adrp	x2, _HOOKKEY@GOTPAGE
Lloh9:
	ldr	x2, [x2, _HOOKKEY@GOTPAGEOFF]
	mov	x0, x19
	bl	_lua_rawgetp
Lloh10:
	adrp	x8, _LUA_TNIL@GOTPAGE
Lloh11:
	ldr	x8, [x8, _LUA_TNIL@GOTPAGEOFF]
Lloh12:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_5
; %bb.4:
	mov	x0, x19
	mov	w1, #0
	mov	w2, #2
	bl	_lua_createtable
	mov	x0, x19
	mov	w1, #-1
	bl	_lua_pushvalue
	ldr	w1, [x24]
Lloh13:
	adrp	x2, _HOOKKEY@GOTPAGE
Lloh14:
	ldr	x2, [x2, _HOOKKEY@GOTPAGEOFF]
	mov	x0, x19
	bl	_lua_rawsetp
Lloh15:
	adrp	x1, l_.str@PAGE
Lloh16:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_lua_pushstring
Lloh17:
	adrp	x2, l_.str.1@PAGE
Lloh18:
	add	x2, x2, l_.str.1@PAGEOFF
	mov	x0, x19
	mov	w1, #-2
	bl	_lua_setfield
	mov	x0, x19
	mov	w1, #-1
	bl	_lua_pushvalue
	mov	x0, x19
	mov	w1, #-2
	bl	_lua_setmetatable
LBB0_5:
	mov	x0, x19
	mov	x1, x20
	mov	w2, #1
	bl	_checkstack
	mov	x0, x20
	bl	_lua_pushthread
	mov	x0, x20
	mov	x1, x19
	mov	w2, #1
	bl	_lua_xmove
	ldr	w8, [sp, #12]
	add	w1, w8, #1
	mov	x0, x19
	bl	_lua_pushvalue
	mov	x0, x19
	mov	w1, #-3
	bl	_lua_rawset
	mov	x0, x20
	mov	x1, x22
	mov	x2, x23
	mov	x3, x21
	bl	_lua_sethook
	mov	w0, #0
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_LUA_TFUNCTION,4,2              ; @LUA_TFUNCTION
	.comm	_hookf,8,3                      ; @hookf
	.comm	_LUA_REGISTRYINDEX,4,2          ; @LUA_REGISTRYINDEX
	.comm	_HOOKKEY,4,2                    ; @HOOKKEY
	.comm	_LUA_TNIL,8,3                   ; @LUA_TNIL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"k"

l_.str.1:                               ; @.str.1
	.asciz	"__mode"

	.no_dead_strip	_db_sethook
.subsections_via_symbols
