	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function lua_ucl_to_format
_lua_ucl_to_format:                     ## @lua_ucl_to_format
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r12
	movq	_UCL_EMIT_JSON@GOTPCREL(%rip), %rbx
	movl	(%rbx), %r14d
	callq	_lua_gettop
	cmpl	$2, %eax
	jl	LBB0_18
## %bb.1:
	movq	%r12, %rdi
	movl	$2, %esi
	callq	_lua_type
	movq	_LUA_TNUMBER@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_5
## %bb.2:
	movq	%r12, %rdi
	movl	$2, %esi
	callq	_lua_tonumber
	testl	%eax, %eax
	js	LBB0_4
## %bb.3:
	movl	%eax, %r14d
	movq	_UCL_EMIT_YAML@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r14d
	jl	LBB0_18
	jmp	LBB0_4
LBB0_5:
	movq	%r12, %rdi
	movl	$2, %esi
	callq	_lua_type
	movq	_LUA_TSTRING@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_18
## %bb.6:
	movq	%r12, %rdi
	movl	$2, %esi
	callq	_lua_tostring
	movq	%rax, %r15
	leaq	L_.str(%rip), %rsi
	movq	%rax, %rdi
	callq	_strcasecmp
	testq	%rax, %rax
	je	LBB0_7
## %bb.8:
	leaq	L_.str.1(%rip), %rsi
	movq	%r15, %rdi
	callq	_strcasecmp
	testq	%rax, %rax
	je	LBB0_9
## %bb.10:
	leaq	L_.str.2(%rip), %rsi
	movq	%r15, %rdi
	callq	_strcasecmp
	testq	%rax, %rax
	je	LBB0_11
## %bb.12:
	leaq	L_.str.3(%rip), %rsi
	movq	%r15, %rdi
	callq	_strcasecmp
	testq	%rax, %rax
	je	LBB0_14
## %bb.13:
	leaq	L_.str.4(%rip), %rsi
	movq	%r15, %rdi
	callq	_strcasecmp
	testq	%rax, %rax
	je	LBB0_14
## %bb.15:
	leaq	L_.str.5(%rip), %rsi
	movq	%r15, %rdi
	callq	_strcasecmp
	testq	%rax, %rax
	jne	LBB0_18
## %bb.16:
	movq	_UCL_EMIT_MSGPACK@GOTPCREL(%rip), %rax
	jmp	LBB0_17
LBB0_7:
	movl	(%rbx), %r14d
	jmp	LBB0_18
LBB0_9:
	movq	_UCL_EMIT_JSON_COMPACT@GOTPCREL(%rip), %rax
	jmp	LBB0_17
LBB0_11:
	movq	_UCL_EMIT_YAML@GOTPCREL(%rip), %rax
	jmp	LBB0_17
LBB0_14:
	movq	_UCL_EMIT_CONFIG@GOTPCREL(%rip), %rax
LBB0_17:
	movl	(%rax), %r14d
LBB0_18:
	movq	%r12, %rdi
	movl	$1, %esi
	callq	_ucl_object_lua_import
	testq	%rax, %rax
	je	LBB0_4
## %bb.19:
	movq	%rax, %rbx
	movq	%r12, %rdi
	movq	%rax, %rsi
	movl	%r14d, %edx
	callq	_lua_ucl_to_string
	movq	%rbx, %rdi
	callq	_ucl_object_unref
	jmp	LBB0_20
LBB0_4:
	movq	%r12, %rdi
	callq	_lua_pushnil
LBB0_20:
	movl	$1, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_UCL_EMIT_JSON,4,2              ## @UCL_EMIT_JSON
	.comm	_LUA_TNUMBER,8,3                ## @LUA_TNUMBER
	.comm	_UCL_EMIT_YAML,4,2              ## @UCL_EMIT_YAML
	.comm	_LUA_TSTRING,8,3                ## @LUA_TSTRING
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"json"

L_.str.1:                               ## @.str.1
	.asciz	"json-compact"

	.comm	_UCL_EMIT_JSON_COMPACT,4,2      ## @UCL_EMIT_JSON_COMPACT
L_.str.2:                               ## @.str.2
	.asciz	"yaml"

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

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

	.comm	_UCL_EMIT_CONFIG,4,2            ## @UCL_EMIT_CONFIG
L_.str.5:                               ## @.str.5
	.asciz	"msgpack"

	.comm	_UCL_EMIT_MSGPACK,4,2           ## @UCL_EMIT_MSGPACK
	.no_dead_strip	_lua_ucl_to_format
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function lua_ucl_to_format
_lua_ucl_to_format:                     ; @lua_ucl_to_format
	.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	x19, x0
Lloh0:
	adrp	x22, _UCL_EMIT_JSON@GOTPAGE
Lloh1:
	ldr	x22, [x22, _UCL_EMIT_JSON@GOTPAGEOFF]
	ldr	w20, [x22]
	bl	_lua_gettop
	cmp	w0, #2
	b.lt	LBB0_16
; %bb.1:
	mov	x0, x19
	mov	w1, #2
	bl	_lua_type
Lloh2:
	adrp	x8, _LUA_TNUMBER@GOTPAGE
Lloh3:
	ldr	x8, [x8, _LUA_TNUMBER@GOTPAGEOFF]
Lloh4:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_4
; %bb.2:
	mov	x0, x19
	mov	w1, #2
	bl	_lua_tonumber
	tbnz	w0, #31, LBB0_18
; %bb.3:
	mov	x20, x0
Lloh5:
	adrp	x8, _UCL_EMIT_YAML@GOTPAGE
Lloh6:
	ldr	x8, [x8, _UCL_EMIT_YAML@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	cmp	w0, w8
	b.lt	LBB0_16
	b	LBB0_18
LBB0_4:
	mov	x0, x19
	mov	w1, #2
	bl	_lua_type
Lloh8:
	adrp	x8, _LUA_TSTRING@GOTPAGE
Lloh9:
	ldr	x8, [x8, _LUA_TSTRING@GOTPAGEOFF]
Lloh10:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_16
; %bb.5:
	mov	x0, x19
	mov	w1, #2
	bl	_lua_tostring
	mov	x21, x0
Lloh11:
	adrp	x1, l_.str@PAGE
Lloh12:
	add	x1, x1, l_.str@PAGEOFF
	bl	_strcasecmp
	cbz	x0, LBB0_11
; %bb.6:
Lloh13:
	adrp	x1, l_.str.1@PAGE
Lloh14:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x21
	bl	_strcasecmp
	cbz	x0, LBB0_12
; %bb.7:
Lloh15:
	adrp	x1, l_.str.2@PAGE
Lloh16:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x21
	bl	_strcasecmp
	cbz	x0, LBB0_13
; %bb.8:
Lloh17:
	adrp	x1, l_.str.3@PAGE
Lloh18:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x21
	bl	_strcasecmp
	cbz	x0, LBB0_14
; %bb.9:
Lloh19:
	adrp	x1, l_.str.4@PAGE
Lloh20:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	x0, x21
	bl	_strcasecmp
	cbz	x0, LBB0_14
; %bb.10:
Lloh21:
	adrp	x1, l_.str.5@PAGE
Lloh22:
	add	x1, x1, l_.str.5@PAGEOFF
	mov	x0, x21
	bl	_strcasecmp
Lloh23:
	adrp	x8, _UCL_EMIT_MSGPACK@GOTPAGE
Lloh24:
	ldr	x8, [x8, _UCL_EMIT_MSGPACK@GOTPAGEOFF]
Lloh25:
	ldr	w8, [x8]
	cmp	x0, #0
	csel	w20, w8, w20, eq
	b	LBB0_16
LBB0_11:
	ldr	w20, [x22]
	b	LBB0_16
LBB0_12:
Lloh26:
	adrp	x8, _UCL_EMIT_JSON_COMPACT@GOTPAGE
Lloh27:
	ldr	x8, [x8, _UCL_EMIT_JSON_COMPACT@GOTPAGEOFF]
	b	LBB0_15
LBB0_13:
Lloh28:
	adrp	x8, _UCL_EMIT_YAML@GOTPAGE
Lloh29:
	ldr	x8, [x8, _UCL_EMIT_YAML@GOTPAGEOFF]
	b	LBB0_15
LBB0_14:
Lloh30:
	adrp	x8, _UCL_EMIT_CONFIG@GOTPAGE
Lloh31:
	ldr	x8, [x8, _UCL_EMIT_CONFIG@GOTPAGEOFF]
LBB0_15:
	ldr	w20, [x8]
LBB0_16:
	mov	x0, x19
	mov	w1, #1
	bl	_ucl_object_lua_import
	cbz	x0, LBB0_18
; %bb.17:
	mov	x21, x0
	mov	x0, x19
	mov	x1, x21
	mov	x2, x20
	bl	_lua_ucl_to_string
	mov	x0, x21
	bl	_ucl_object_unref
	b	LBB0_19
LBB0_18:
	mov	x0, x19
	bl	_lua_pushnil
LBB0_19:
	mov	w0, #1
	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
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh26, Lloh27
	.loh AdrpLdrGot	Lloh28, Lloh29
	.loh AdrpLdrGot	Lloh30, Lloh31
	.cfi_endproc
                                        ; -- End function
	.comm	_UCL_EMIT_JSON,4,2              ; @UCL_EMIT_JSON
	.comm	_LUA_TNUMBER,8,3                ; @LUA_TNUMBER
	.comm	_UCL_EMIT_YAML,4,2              ; @UCL_EMIT_YAML
	.comm	_LUA_TSTRING,8,3                ; @LUA_TSTRING
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"json"

l_.str.1:                               ; @.str.1
	.asciz	"json-compact"

	.comm	_UCL_EMIT_JSON_COMPACT,4,2      ; @UCL_EMIT_JSON_COMPACT
l_.str.2:                               ; @.str.2
	.asciz	"yaml"

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

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

	.comm	_UCL_EMIT_CONFIG,4,2            ; @UCL_EMIT_CONFIG
l_.str.5:                               ; @.str.5
	.asciz	"msgpack"

	.comm	_UCL_EMIT_MSGPACK,4,2           ; @UCL_EMIT_MSGPACK
	.no_dead_strip	_lua_ucl_to_format
.subsections_via_symbols
