	.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
	pushq	%rax
	.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	%r12d, %r12d
	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_optint
	movl	%eax, %r15d
	movq	_hookf@GOTPCREL(%rip), %rax
	movq	(%rax), %r12
	movq	%r13, %rdi
	movl	%r15d, %esi
	callq	_makemask
	movl	%eax, %r13d
LBB0_3:
	movq	%rbx, %rdi
	callq	_gethooktable
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_lua_pushlightuserdata
	movl	-44(%rbp), %esi
	incl	%esi
	movq	%rbx, %rdi
	callq	_lua_pushvalue
	movq	%rbx, %rdi
	movl	$-3, %esi
	callq	_lua_rawset
	movq	%rbx, %rdi
	movl	$1, %esi
	callq	_lua_pop
	movq	%r14, %rdi
	movq	%r12, %rsi
	movl	%r13d, %edx
	movl	%r15d, %ecx
	callq	_lua_sethook
	xorl	%eax, %eax
	addq	$8, %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
	.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_optint
	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:
	mov	x0, x19
	bl	_gethooktable
	mov	x0, x19
	mov	x1, x20
	bl	_lua_pushlightuserdata
	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, x19
	mov	w1, #1
	bl	_lua_pop
	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
	.cfi_endproc
                                        ; -- End function
	.comm	_LUA_TFUNCTION,4,2              ; @LUA_TFUNCTION
	.comm	_hookf,8,3                      ; @hookf
	.no_dead_strip	_db_sethook
.subsections_via_symbols
