	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function luaB_tostring
_luaB_tostring:                         ## @luaB_tostring
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %rbx
	movl	$1, %esi
	callq	_luaL_checkany
	leaq	L_.str(%rip), %rdx
	movq	%rbx, %rdi
	movl	$1, %esi
	callq	_luaL_callmeta
	testq	%rax, %rax
	je	LBB0_1
LBB0_8:
	movl	$1, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_1:
	movq	%rbx, %rdi
	movl	$1, %esi
	callq	_lua_type
                                        ## kill: def $eax killed $eax def $rax
	addl	$-128, %eax
	cmpl	$3, %eax
	ja	LBB0_7
## %bb.2:
	leaq	LJTI0_0(%rip), %rcx
	movslq	(%rcx,%rax,4), %rax
	addq	%rcx, %rax
	jmpq	*%rax
LBB0_4:
	movq	%rbx, %rdi
	movl	$1, %esi
	callq	_lua_pushvalue
	jmp	LBB0_8
LBB0_7:
	movq	%rbx, %rdi
	movl	$1, %esi
	callq	_luaL_typename
	movl	%eax, %r14d
	movq	%rbx, %rdi
	movl	$1, %esi
	callq	_lua_topointer
	leaq	L_.str.4(%rip), %rsi
	movq	%rbx, %rdi
	movl	%r14d, %edx
	movl	%eax, %ecx
	callq	_lua_pushfstring
	jmp	LBB0_8
LBB0_3:
	movq	%rbx, %rdi
	movl	$1, %esi
	callq	_lua_tostring
	movq	%rbx, %rdi
	movq	%rax, %rsi
	callq	_lua_pushstring
	jmp	LBB0_8
LBB0_6:
	leaq	L_.str.3(%rip), %rsi
	movq	%rbx, %rdi
	callq	_lua_pushliteral
	jmp	LBB0_8
LBB0_5:
	movq	%rbx, %rdi
	movl	$1, %esi
	callq	_lua_toboolean
	testl	%eax, %eax
	leaq	L_.str.2(%rip), %rax
	leaq	L_.str.1(%rip), %rsi
	cmoveq	%rax, %rsi
	movq	%rbx, %rdi
	callq	_lua_pushstring
	jmp	LBB0_8
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_4, LBB0_4-LJTI0_0
.set L0_0_set_3, LBB0_3-LJTI0_0
.set L0_0_set_6, LBB0_6-LJTI0_0
.set L0_0_set_5, LBB0_5-LJTI0_0
LJTI0_0:
	.long	L0_0_set_4
	.long	L0_0_set_3
	.long	L0_0_set_6
	.long	L0_0_set_5
	.end_data_region
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"__tostring"

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

L_.str.2:                               ## @.str.2
	.asciz	"false"

L_.str.3:                               ## @.str.3
	.asciz	"nil"

L_.str.4:                               ## @.str.4
	.asciz	"%s: %p"

	.no_dead_strip	_luaB_tostring
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function luaB_tostring
_luaB_tostring:                         ; @luaB_tostring
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	mov	w1, #1
	bl	_luaL_checkany
Lloh0:
	adrp	x2, l_.str@PAGE
Lloh1:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x19
	mov	w1, #1
	bl	_luaL_callmeta
	cbz	x0, LBB0_2
LBB0_1:
	mov	w0, #1
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_2:
	mov	x0, x19
	mov	w1, #1
	bl	_lua_type
	sub	w8, w0, #128
	cmp	w8, #3
	b.hi	LBB0_5
; %bb.3:
Lloh2:
	adrp	x9, lJTI0_0@PAGE
Lloh3:
	add	x9, x9, lJTI0_0@PAGEOFF
	adr	x10, LBB0_4
	ldrb	w11, [x9, x8]
	add	x10, x10, x11, lsl #2
	br	x10
LBB0_4:
	mov	x0, x19
	mov	w1, #1
	bl	_lua_pushvalue
	b	LBB0_1
LBB0_5:
	mov	x0, x19
	mov	w1, #1
	bl	_luaL_typename
	mov	x20, x0
	mov	x0, x19
	mov	w1, #1
	bl	_lua_topointer
	mov	x3, x0
Lloh4:
	adrp	x1, l_.str.4@PAGE
Lloh5:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	x0, x19
	mov	x2, x20
	bl	_lua_pushfstring
	b	LBB0_1
LBB0_6:
	mov	x0, x19
	mov	w1, #1
	bl	_lua_tostring
	mov	x1, x0
	b	LBB0_9
LBB0_7:
Lloh6:
	adrp	x1, l_.str.3@PAGE
Lloh7:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x19
	bl	_lua_pushliteral
	b	LBB0_1
LBB0_8:
	mov	x0, x19
	mov	w1, #1
	bl	_lua_toboolean
Lloh8:
	adrp	x8, l_.str.1@PAGE
Lloh9:
	add	x8, x8, l_.str.1@PAGEOFF
Lloh10:
	adrp	x9, l_.str.2@PAGE
Lloh11:
	add	x9, x9, l_.str.2@PAGEOFF
	cmp	w0, #0
	csel	x1, x9, x8, eq
LBB0_9:
	mov	x0, x19
	bl	_lua_pushstring
	b	LBB0_1
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh8, Lloh9
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_4-LBB0_4)>>2
	.byte	(LBB0_6-LBB0_4)>>2
	.byte	(LBB0_7-LBB0_4)>>2
	.byte	(LBB0_8-LBB0_4)>>2
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"__tostring"

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

l_.str.2:                               ; @.str.2
	.asciz	"false"

l_.str.3:                               ; @.str.3
	.asciz	"nil"

l_.str.4:                               ; @.str.4
	.asciz	"%s: %p"

	.no_dead_strip	_luaB_tostring
.subsections_via_symbols
