	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function lua_chassis_log
_lua_chassis_log:                       ## @lua_chassis_log
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	leaq	L_.str.3(%rip), %rdx
	leaq	_lua_chassis_log.log_names(%rip), %rcx
	movl	$1, %esi
	callq	_luaL_checkoption
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	leaq	L_.str.6(%rip), %rdx
	movq	%r15, %rdi
	movl	$2, %esi
	callq	_luaL_optstring
	movq	%rax, %r12
	leaq	-88(%rbp), %rdx
	movq	%r15, %rdi
	movl	$1, %esi
	callq	_lua_getstack
	testl	%eax, %eax
	je	LBB0_1
## %bb.2:
	leaq	L_.str.8(%rip), %rsi
	leaq	-88(%rbp), %rdx
	movq	%r15, %rdi
	callq	_lua_getinfo
	testl	%eax, %eax
	movq	%r12, -56(%rbp)                 ## 8-byte Spill
	je	LBB0_3
## %bb.6:
	movl	$1, %ebx
	movl	$-1, -44(%rbp)                  ## 4-byte Folded Spill
	leaq	L_.str.7(%rip), %rax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	leaq	-88(%rbp), %r14
	.p2align	4, 0x90
LBB0_12:                                ## =>This Inner Loop Header: Depth=1
	movl	-88(%rbp), %r13d
	cmpl	$1, %ebx
	jne	LBB0_14
## %bb.13:                              ##   in Loop: Header=BB0_12 Depth=1
	movq	-72(%rbp), %rax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	movl	%r13d, -44(%rbp)                ## 4-byte Spill
LBB0_14:                                ##   in Loop: Header=BB0_12 Depth=1
	movq	-80(%rbp), %r12
	cmpl	$9, %ebx
	ja	LBB0_4
## %bb.15:                              ##   in Loop: Header=BB0_12 Depth=1
	testq	%r12, %r12
	je	LBB0_4
## %bb.16:                              ##   in Loop: Header=BB0_12 Depth=1
	movzbl	(%r12), %eax
	cmpb	$47, %al
	je	LBB0_9
## %bb.17:                              ##   in Loop: Header=BB0_12 Depth=1
	cmpb	$64, %al
	je	LBB0_9
## %bb.7:                               ##   in Loop: Header=BB0_12 Depth=1
	incl	%ebx
	movq	%r15, %rdi
	movl	%ebx, %esi
	movq	%r14, %rdx
	callq	_lua_getstack
	testl	%eax, %eax
	je	LBB0_8
## %bb.11:                              ##   in Loop: Header=BB0_12 Depth=1
	movq	%r15, %rdi
	leaq	L_.str.8(%rip), %rsi
	movq	%r14, %rdx
	callq	_lua_getinfo
	testl	%eax, %eax
	jne	LBB0_12
LBB0_4:
	testq	%r12, %r12
	je	LBB0_5
LBB0_8:
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movb	(%r12), %al
LBB0_9:
	xorl	%r14d, %r14d
	cmpb	$64, %al
	sete	%r14b
	addq	%r12, %r14
	movq	_LUA_REGISTRYINDEX@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_CHASSIS_LUA_REGISTRY_KEY@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rdi
	callq	_lua_getfield
	movq	%r15, %rdi
	movl	$-1, %esi
	callq	_lua_topointer
	movq	%rax, %r12
	movq	%r15, %rdi
	movl	$1, %esi
	callq	_lua_pop
	testq	%r12, %r12
	je	LBB0_10
## %bb.18:
	movq	(%r12), %rsi
	testq	%rsi, %rsi
	movl	-48(%rbp), %r15d                ## 4-byte Reload
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
	je	LBB0_21
## %bb.19:
	movq	%r14, %rdi
	callq	_g_str_has_prefix
	testq	%rax, %rax
	je	LBB0_21
## %bb.20:
	movq	(%r12), %rdi
	callq	_strlen
	cltq
	leaq	(%r14,%rax), %rcx
	movb	(%r14,%rax), %al
	movq	_G_DIR_SEPARATOR@GOTPCREL(%rip), %rdx
	xorl	%r14d, %r14d
	cmpb	(%rdx), %al
	sete	%r14b
	addq	%rcx, %r14
LBB0_21:
	movq	-56(%rbp), %r12                 ## 8-byte Reload
	jmp	LBB0_22
LBB0_1:
	leaq	L_.str.7(%rip), %rbx
	movl	$-1, %r8d
	xorl	%r14d, %r14d
	movl	$-1, %r13d
	movl	-48(%rbp), %r15d                ## 4-byte Reload
	jmp	LBB0_23
LBB0_3:
	movl	$-1, %r13d
	leaq	L_.str.7(%rip), %rax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	xorl	%r12d, %r12d
	movl	$-1, -44(%rbp)                  ## 4-byte Folded Spill
	testq	%r12, %r12
	jne	LBB0_8
LBB0_5:
	xorl	%r14d, %r14d
	movl	-44(%rbp), %r8d                 ## 4-byte Reload
	movq	-56(%rbp), %r12                 ## 8-byte Reload
	movl	-48(%rbp), %r15d                ## 4-byte Reload
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
	jmp	LBB0_23
LBB0_10:
	movq	-56(%rbp), %r12                 ## 8-byte Reload
	movl	-48(%rbp), %r15d                ## 4-byte Reload
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
LBB0_22:
	movl	-44(%rbp), %r8d                 ## 4-byte Reload
LBB0_23:
	movq	_G_LOG_DOMAIN@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movslq	%r15d, %rax
	leaq	_lua_chassis_log.log_levels(%rip), %rcx
	movl	(%rcx,%rax,4), %esi
	testq	%r14, %r14
	cmovneq	%r14, %rbx
	cmovnel	%r13d, %r8d
	leaq	L_.str.9(%rip), %rdx
	movq	%rbx, %rcx
	movq	%r12, %r9
	callq	_g_log
	xorl	%eax, %eax
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__DATA,__const
	.p2align	4                               ## @lua_chassis_log.log_names
_lua_chassis_log.log_names:
	.quad	L_.str
	.quad	L_.str.1
	.quad	L_.str.2
	.quad	L_.str.3
	.quad	L_.str.4
	.quad	L_.str.5
	.quad	0

	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"error"

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

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

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

L_.str.4:                               ## @.str.4
	.asciz	"info"

L_.str.5:                               ## @.str.5
	.asciz	"debug"

	.section	__TEXT,__const
	.p2align	4                               ## @lua_chassis_log.log_levels
_lua_chassis_log.log_levels:
	.long	131                             ## 0x83
	.long	133                             ## 0x85
	.long	128                             ## 0x80
	.long	129                             ## 0x81
	.long	130                             ## 0x82
	.long	132                             ## 0x84

	.section	__TEXT,__cstring,cstring_literals
L_.str.6:                               ## @.str.6
	.asciz	"nil"

L_.str.7:                               ## @.str.7
	.asciz	"unknown"

L_.str.8:                               ## @.str.8
	.asciz	"Sl"

	.comm	_LUA_REGISTRYINDEX,4,2          ## @LUA_REGISTRYINDEX
	.comm	_CHASSIS_LUA_REGISTRY_KEY,4,2   ## @CHASSIS_LUA_REGISTRY_KEY
	.comm	_G_DIR_SEPARATOR,1,0            ## @G_DIR_SEPARATOR
	.comm	_G_LOG_DOMAIN,4,2               ## @G_LOG_DOMAIN
L_.str.9:                               ## @.str.9
	.asciz	"(%s:%d) %s"

	.no_dead_strip	_lua_chassis_log
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function lua_chassis_log
_lua_chassis_log:                       ; @lua_chassis_log
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x21, x0
Lloh0:
	adrp	x2, l_.str.3@PAGE
Lloh1:
	add	x2, x2, l_.str.3@PAGEOFF
Lloh2:
	adrp	x3, _lua_chassis_log.log_names@PAGE
Lloh3:
	add	x3, x3, _lua_chassis_log.log_names@PAGEOFF
	mov	w1, #1
	bl	_luaL_checkoption
	mov	x20, x0
Lloh4:
	adrp	x2, l_.str.6@PAGE
Lloh5:
	add	x2, x2, l_.str.6@PAGEOFF
	mov	x0, x21
	mov	w1, #2
	bl	_luaL_optstring
	mov	x19, x0
	add	x2, sp, #8
	mov	x0, x21
	mov	w1, #1
	bl	_lua_getstack
	cbz	w0, LBB0_15
; %bb.1:
Lloh6:
	adrp	x1, l_.str.8@PAGE
Lloh7:
	add	x1, x1, l_.str.8@PAGEOFF
	add	x2, sp, #8
	mov	x0, x21
	bl	_lua_getinfo
	cbz	w0, LBB0_16
; %bb.2:
	mov	w22, #1
	mov	w24, #-1
Lloh8:
	adrp	x25, l_.str.7@PAGE
Lloh9:
	add	x25, x25, l_.str.7@PAGEOFF
Lloh10:
	adrp	x23, l_.str.8@PAGE
Lloh11:
	add	x23, x23, l_.str.8@PAGEOFF
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w26, [sp, #8]
	ldp	x27, x8, [sp, #16]
	cmp	w22, #1
	csel	w24, w26, w24, eq
	csel	x25, x8, x25, eq
	cmp	w22, #9
	b.hi	LBB0_9
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	cbz	x27, LBB0_9
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	ldrb	w8, [x27]
	cmp	w8, #47
	b.eq	LBB0_11
; %bb.6:                                ;   in Loop: Header=BB0_3 Depth=1
	cmp	w8, #64
	b.eq	LBB0_11
; %bb.7:                                ;   in Loop: Header=BB0_3 Depth=1
	add	w22, w22, #1
	add	x2, sp, #8
	mov	x0, x21
	mov	x1, x22
	bl	_lua_getstack
	cbz	w0, LBB0_10
; %bb.8:                                ;   in Loop: Header=BB0_3 Depth=1
	add	x2, sp, #8
	mov	x0, x21
	mov	x1, x23
	bl	_lua_getinfo
	cbnz	w0, LBB0_3
LBB0_9:
	cbz	x27, LBB0_17
LBB0_10:
	ldrb	w8, [x27]
LBB0_11:
	cmp	w8, #64
	cinc	x22, x27, eq
Lloh12:
	adrp	x8, _LUA_REGISTRYINDEX@GOTPAGE
Lloh13:
	ldr	x8, [x8, _LUA_REGISTRYINDEX@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
Lloh15:
	adrp	x8, _CHASSIS_LUA_REGISTRY_KEY@GOTPAGE
Lloh16:
	ldr	x8, [x8, _CHASSIS_LUA_REGISTRY_KEY@GOTPAGEOFF]
Lloh17:
	ldr	w2, [x8]
	mov	x0, x21
	bl	_lua_getfield
	mov	x0, x21
	mov	w1, #-1
	bl	_lua_topointer
	mov	x23, x0
	mov	x0, x21
	mov	w1, #1
	bl	_lua_pop
	cbz	x23, LBB0_18
; %bb.12:
	ldr	x1, [x23]
	cbz	x1, LBB0_18
; %bb.13:
	mov	x0, x22
	bl	_g_str_has_prefix
	cbz	x0, LBB0_18
; %bb.14:
	ldr	x0, [x23]
	bl	_strlen
	add	x8, x22, w0, sxtw
	mov	x9, x8
	ldrb	w10, [x9], #1
Lloh18:
	adrp	x11, _G_DIR_SEPARATOR@GOTPAGE
Lloh19:
	ldr	x11, [x11, _G_DIR_SEPARATOR@GOTPAGEOFF]
	ldrb	w11, [x11]
	cmp	w10, w11
	csel	x22, x8, x9, ne
	b	LBB0_18
LBB0_15:
	mov	x22, #0
	mov	w24, #-1
	mov	w26, #-1
Lloh20:
	adrp	x25, l_.str.7@PAGE
Lloh21:
	add	x25, x25, l_.str.7@PAGEOFF
	b	LBB0_18
LBB0_16:
	mov	x27, #0
	mov	w26, #-1
	mov	w24, #-1
Lloh22:
	adrp	x25, l_.str.7@PAGE
Lloh23:
	add	x25, x25, l_.str.7@PAGEOFF
	cbnz	x27, LBB0_10
LBB0_17:
	mov	x22, #0
LBB0_18:
Lloh24:
	adrp	x8, _G_LOG_DOMAIN@GOTPAGE
Lloh25:
	ldr	x8, [x8, _G_LOG_DOMAIN@GOTPAGEOFF]
Lloh26:
	adrp	x9, _lua_chassis_log.log_levels@PAGE
Lloh27:
	add	x9, x9, _lua_chassis_log.log_levels@PAGEOFF
Lloh28:
	ldr	w0, [x8]
	ldr	w1, [x9, w20, sxtw #2]
	cmp	x22, #0
	csel	x3, x25, x22, eq
	csel	w4, w24, w26, eq
Lloh29:
	adrp	x2, l_.str.9@PAGE
Lloh30:
	add	x2, x2, l_.str.9@PAGEOFF
	mov	x5, x19
	bl	_g_log
	mov	w0, #0
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpAdd	Lloh29, Lloh30
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh28
	.cfi_endproc
                                        ; -- End function
	.section	__DATA,__const
	.p2align	3                               ; @lua_chassis_log.log_names
_lua_chassis_log.log_names:
	.quad	l_.str
	.quad	l_.str.1
	.quad	l_.str.2
	.quad	l_.str.3
	.quad	l_.str.4
	.quad	l_.str.5
	.quad	0

	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"error"

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

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

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

l_.str.4:                               ; @.str.4
	.asciz	"info"

l_.str.5:                               ; @.str.5
	.asciz	"debug"

	.section	__TEXT,__const
	.p2align	2                               ; @lua_chassis_log.log_levels
_lua_chassis_log.log_levels:
	.long	131                             ; 0x83
	.long	133                             ; 0x85
	.long	128                             ; 0x80
	.long	129                             ; 0x81
	.long	130                             ; 0x82
	.long	132                             ; 0x84

	.section	__TEXT,__cstring,cstring_literals
l_.str.6:                               ; @.str.6
	.asciz	"nil"

l_.str.7:                               ; @.str.7
	.asciz	"unknown"

l_.str.8:                               ; @.str.8
	.asciz	"Sl"

	.comm	_LUA_REGISTRYINDEX,4,2          ; @LUA_REGISTRYINDEX
	.comm	_CHASSIS_LUA_REGISTRY_KEY,4,2   ; @CHASSIS_LUA_REGISTRY_KEY
	.comm	_G_DIR_SEPARATOR,1,0            ; @G_DIR_SEPARATOR
	.comm	_G_LOG_DOMAIN,4,2               ; @G_LOG_DOMAIN
l_.str.9:                               ; @.str.9
	.asciz	"(%s:%d) %s"

	.no_dead_strip	_lua_chassis_log
.subsections_via_symbols
