	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function typeerror
_typeerror:                             ## @typeerror
	.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	%rdx, %r15
	movl	%esi, %r14d
	movq	%rdi, %rbx
	leaq	L_.str(%rip), %rdx
	callq	_luaL_getmetafield
	movq	_LUA_TSTRING@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_2
## %bb.1:
	movq	%rbx, %rdi
	movl	$-1, %esi
	callq	_lua_tostring
	jmp	LBB0_5
LBB0_2:
	movq	%rbx, %rdi
	movl	%r14d, %esi
	callq	_lua_type
	movq	_LUA_TLIGHTUSERDATA@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_4
## %bb.3:
	leaq	L_.str.1(%rip), %rcx
	jmp	LBB0_6
LBB0_4:
	movq	%rbx, %rdi
	movl	%r14d, %esi
	callq	_luaL_typename
LBB0_5:
	movq	%rax, %rcx
LBB0_6:
	leaq	L_.str.2(%rip), %rsi
	movq	%rbx, %rdi
	movq	%r15, %rdx
	callq	_lua_pushfstring
	movq	%rbx, %rdi
	movl	%r14d, %esi
	movq	%rax, %rdx
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_luaL_argerror                  ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"__name"

	.comm	_LUA_TSTRING,8,3                ## @LUA_TSTRING
	.comm	_LUA_TLIGHTUSERDATA,8,3         ## @LUA_TLIGHTUSERDATA
L_.str.1:                               ## @.str.1
	.asciz	"light userdata"

L_.str.2:                               ## @.str.2
	.asciz	"%s expected, got %s"

	.no_dead_strip	_typeerror
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function typeerror
_typeerror:                             ; @typeerror
	.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	x21, x2
	mov	x19, x1
	mov	x20, x0
Lloh0:
	adrp	x2, l_.str@PAGE
Lloh1:
	add	x2, x2, l_.str@PAGEOFF
	bl	_luaL_getmetafield
Lloh2:
	adrp	x8, _LUA_TSTRING@GOTPAGE
Lloh3:
	ldr	x8, [x8, _LUA_TSTRING@GOTPAGEOFF]
Lloh4:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_2
; %bb.1:
	mov	x0, x20
	mov	w1, #-1
	bl	_lua_tostring
	b	LBB0_5
LBB0_2:
	mov	x0, x20
	mov	x1, x19
	bl	_lua_type
Lloh5:
	adrp	x8, _LUA_TLIGHTUSERDATA@GOTPAGE
Lloh6:
	ldr	x8, [x8, _LUA_TLIGHTUSERDATA@GOTPAGEOFF]
Lloh7:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_4
; %bb.3:
Lloh8:
	adrp	x3, l_.str.1@PAGE
Lloh9:
	add	x3, x3, l_.str.1@PAGEOFF
	b	LBB0_6
LBB0_4:
	mov	x0, x20
	mov	x1, x19
	bl	_luaL_typename
LBB0_5:
	mov	x3, x0
LBB0_6:
Lloh10:
	adrp	x1, l_.str.2@PAGE
Lloh11:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x20
	mov	x2, x21
	bl	_lua_pushfstring
	mov	x2, x0
	mov	x0, x20
	mov	x1, 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_argerror
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"__name"

	.comm	_LUA_TSTRING,8,3                ; @LUA_TSTRING
	.comm	_LUA_TLIGHTUSERDATA,8,3         ; @LUA_TLIGHTUSERDATA
l_.str.1:                               ; @.str.1
	.asciz	"light userdata"

l_.str.2:                               ; @.str.2
	.asciz	"%s expected, got %s"

	.no_dead_strip	_typeerror
.subsections_via_symbols
