	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function g_read
_g_read:                                ## @g_read
	.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
	movl	%edx, %ebx
	movq	%rsi, %r15
	movq	%rdi, %r12
	callq	_lua_gettop
	movl	%eax, %r13d
	movq	%r15, %rdi
	callq	_clearerr
	movl	%r13d, %eax
	decl	%eax
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	je	LBB0_1
## %bb.2:
	movslq	%eax, %rsi
	movq	_LUA_MINSTACK@GOTPCREL(%rip), %rax
	addq	(%rax), %rsi
	leaq	L_.str(%rip), %rdx
	movq	%r12, %rdi
	callq	_luaL_checkstack
	addl	$-2, %r13d
                                        ## kill: def $ebx killed $ebx killed $rbx
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r12, %rdi
	movl	%ebx, %esi
	callq	_lua_type
	movq	_LUA_TNUMBER@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_6
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	%r12, %rdi
	movl	%ebx, %esi
	callq	_luaL_checkinteger
	testl	%eax, %eax
	je	LBB0_5
## %bb.14:                              ##   in Loop: Header=BB0_3 Depth=1
	movslq	%eax, %rdx
	movq	%r12, %rdi
	movq	%r15, %rsi
	callq	_read_chars
	jmp	LBB0_15
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_3 Depth=1
	movq	%r12, %rdi
	movl	%ebx, %esi
	callq	_luaL_checkstring
	xorl	%ecx, %ecx
	cmpb	$42, (%rax)
	sete	%cl
	movsbl	(%rax,%rcx), %eax
	addl	$-76, %eax
	cmpl	$34, %eax
	ja	LBB0_13
## %bb.7:                               ##   in Loop: Header=BB0_3 Depth=1
	leaq	LJTI0_0(%rip), %rcx
	movslq	(%rcx,%rax,4), %rax
	addq	%rcx, %rax
	jmpq	*%rax
LBB0_11:                                ##   in Loop: Header=BB0_3 Depth=1
	movq	%r12, %rdi
	movq	%r15, %rsi
	xorl	%edx, %edx
	callq	_read_line
	jmp	LBB0_15
LBB0_5:                                 ##   in Loop: Header=BB0_3 Depth=1
	movq	%r12, %rdi
	movq	%r15, %rsi
	callq	_test_eof
	jmp	LBB0_15
LBB0_12:                                ##   in Loop: Header=BB0_3 Depth=1
	movq	%r12, %rdi
	movq	%r15, %rsi
	callq	_read_all
	movl	$1, %r14d
	jmp	LBB0_16
LBB0_9:                                 ##   in Loop: Header=BB0_3 Depth=1
	movq	%r12, %rdi
	movq	%r15, %rsi
	movl	$1, %edx
	callq	_read_line
	jmp	LBB0_15
LBB0_8:                                 ##   in Loop: Header=BB0_3 Depth=1
	movq	%r12, %rdi
	movq	%r15, %rsi
	callq	_read_number
	.p2align	4, 0x90
LBB0_15:                                ##   in Loop: Header=BB0_3 Depth=1
	movl	%eax, %r14d
LBB0_16:                                ##   in Loop: Header=BB0_3 Depth=1
	incl	%ebx
	addl	$-1, %r13d
	jae	LBB0_18
## %bb.17:                              ##   in Loop: Header=BB0_3 Depth=1
	testl	%r14d, %r14d
	jne	LBB0_3
	jmp	LBB0_18
LBB0_1:
	movq	%r12, %rdi
	movq	%r15, %rsi
	movl	$1, %edx
	callq	_read_line
	movl	%eax, %r14d
	incl	%ebx
LBB0_18:
	movq	%r15, %rdi
	callq	_ferror
	testq	%rax, %rax
	je	LBB0_19
## %bb.22:
	movq	%r12, %rdi
	xorl	%esi, %esi
	xorl	%edx, %edx
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_luaL_fileresult                ## TAILCALL
LBB0_19:
	testl	%r14d, %r14d
	jne	LBB0_21
## %bb.20:
	movq	%r12, %rdi
	movl	$1, %esi
	callq	_lua_pop
	movq	%r12, %rdi
	callq	_lua_pushnil
LBB0_21:
	subl	-48(%rbp), %ebx                 ## 4-byte Folded Reload
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_13:
	leaq	L_.str.1(%rip), %rdx
	movq	%r12, %rdi
	movl	%ebx, %esi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_luaL_argerror                  ## TAILCALL
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_11, LBB0_11-LJTI0_0
.set L0_0_set_13, LBB0_13-LJTI0_0
.set L0_0_set_12, LBB0_12-LJTI0_0
.set L0_0_set_9, LBB0_9-LJTI0_0
.set L0_0_set_8, LBB0_8-LJTI0_0
LJTI0_0:
	.long	L0_0_set_11
	.long	L0_0_set_13
	.long	L0_0_set_13
	.long	L0_0_set_13
	.long	L0_0_set_13
	.long	L0_0_set_13
	.long	L0_0_set_13
	.long	L0_0_set_13
	.long	L0_0_set_13
	.long	L0_0_set_13
	.long	L0_0_set_13
	.long	L0_0_set_13
	.long	L0_0_set_13
	.long	L0_0_set_13
	.long	L0_0_set_13
	.long	L0_0_set_13
	.long	L0_0_set_13
	.long	L0_0_set_13
	.long	L0_0_set_13
	.long	L0_0_set_13
	.long	L0_0_set_13
	.long	L0_0_set_12
	.long	L0_0_set_13
	.long	L0_0_set_13
	.long	L0_0_set_13
	.long	L0_0_set_13
	.long	L0_0_set_13
	.long	L0_0_set_13
	.long	L0_0_set_13
	.long	L0_0_set_13
	.long	L0_0_set_13
	.long	L0_0_set_13
	.long	L0_0_set_9
	.long	L0_0_set_13
	.long	L0_0_set_8
	.end_data_region
                                        ## -- End function
	.comm	_LUA_MINSTACK,8,3               ## @LUA_MINSTACK
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"too many arguments"

	.comm	_LUA_TNUMBER,8,3                ## @LUA_TNUMBER
L_.str.1:                               ## @.str.1
	.asciz	"invalid format"

	.no_dead_strip	_g_read
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function g_read
_g_read:                                ; @g_read
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x19, x2
	mov	x21, x1
	mov	x20, x0
	bl	_lua_gettop
	mov	x22, x0
	sub	w23, w0, #1
	mov	x0, x21
	bl	_clearerr
	cbz	w23, LBB0_15
; %bb.1:
Lloh0:
	adrp	x8, _LUA_MINSTACK@GOTPAGE
Lloh1:
	ldr	x8, [x8, _LUA_MINSTACK@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	add	x1, x8, w23, sxtw
Lloh3:
	adrp	x2, l_.str@PAGE
Lloh4:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x20
	bl	_luaL_checkstack
	sub	w24, w22, #2
Lloh5:
	adrp	x25, _LUA_TNUMBER@GOTPAGE
Lloh6:
	ldr	x25, [x25, _LUA_TNUMBER@GOTPAGEOFF]
	mov	x22, x19
Lloh7:
	adrp	x26, lJTI0_0@PAGE
Lloh8:
	add	x26, x26, lJTI0_0@PAGEOFF
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x20
	mov	x1, x22
	bl	_lua_type
	ldr	x8, [x25]
	cmp	x0, x8
	b.ne	LBB0_5
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	x0, x20
	mov	x1, x22
	bl	_luaL_checkinteger
                                        ; kill: def $w0 killed $w0 def $x0
	cbz	w0, LBB0_8
; %bb.4:                                ;   in Loop: Header=BB0_2 Depth=1
	sxtw	x2, w0
	mov	x0, x20
	mov	x1, x21
	bl	_read_chars
	b	LBB0_12
LBB0_5:                                 ;   in Loop: Header=BB0_2 Depth=1
	mov	x0, x20
	mov	x1, x22
	bl	_luaL_checkstring
	mov	x8, x0
	ldrb	w9, [x8], #1
	cmp	w9, #42
	csel	x8, x0, x8, ne
	ldrsb	w8, [x8]
	sub	w8, w8, #76
	cmp	w8, #34
	b.hi	LBB0_21
; %bb.6:                                ;   in Loop: Header=BB0_2 Depth=1
	adr	x9, LBB0_7
	ldrb	w10, [x26, x8]
	add	x9, x9, x10, lsl #2
	br	x9
LBB0_7:                                 ;   in Loop: Header=BB0_2 Depth=1
	mov	x0, x20
	mov	x1, x21
	mov	w2, #0
	bl	_read_line
	b	LBB0_12
LBB0_8:                                 ;   in Loop: Header=BB0_2 Depth=1
	mov	x0, x20
	mov	x1, x21
	bl	_test_eof
	b	LBB0_12
LBB0_9:                                 ;   in Loop: Header=BB0_2 Depth=1
	mov	x0, x20
	mov	x1, x21
	bl	_read_all
	mov	w23, #1
	b	LBB0_13
LBB0_10:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	x0, x20
	mov	x1, x21
	mov	w2, #1
	bl	_read_line
	b	LBB0_12
LBB0_11:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	x0, x20
	mov	x1, x21
	bl	_read_number
LBB0_12:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	x23, x0
LBB0_13:                                ;   in Loop: Header=BB0_2 Depth=1
	add	w22, w22, #1
	subs	w24, w24, #1
	b.lo	LBB0_16
; %bb.14:                               ;   in Loop: Header=BB0_2 Depth=1
	cbnz	w23, LBB0_2
	b	LBB0_16
LBB0_15:
	mov	x0, x20
	mov	x1, x21
	mov	w2, #1
	bl	_read_line
	mov	x23, x0
	add	w22, w19, #1
LBB0_16:
	mov	x0, x21
	bl	_ferror
	cbz	x0, LBB0_18
; %bb.17:
	mov	x0, x20
	mov	w1, #0
	mov	x2, #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
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	b	_luaL_fileresult
LBB0_18:
	cbnz	w23, LBB0_20
; %bb.19:
	mov	x0, x20
	mov	w1, #1
	bl	_lua_pop
	mov	x0, x20
	bl	_lua_pushnil
LBB0_20:
	sub	w0, w22, w19
	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
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_21:
Lloh9:
	adrp	x2, l_.str.1@PAGE
Lloh10:
	add	x2, x2, l_.str.1@PAGEOFF
	mov	x0, x20
	mov	x1, x22
	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
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	b	_luaL_argerror
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh9, Lloh10
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_7-LBB0_7)>>2
	.byte	(LBB0_21-LBB0_7)>>2
	.byte	(LBB0_21-LBB0_7)>>2
	.byte	(LBB0_21-LBB0_7)>>2
	.byte	(LBB0_21-LBB0_7)>>2
	.byte	(LBB0_21-LBB0_7)>>2
	.byte	(LBB0_21-LBB0_7)>>2
	.byte	(LBB0_21-LBB0_7)>>2
	.byte	(LBB0_21-LBB0_7)>>2
	.byte	(LBB0_21-LBB0_7)>>2
	.byte	(LBB0_21-LBB0_7)>>2
	.byte	(LBB0_21-LBB0_7)>>2
	.byte	(LBB0_21-LBB0_7)>>2
	.byte	(LBB0_21-LBB0_7)>>2
	.byte	(LBB0_21-LBB0_7)>>2
	.byte	(LBB0_21-LBB0_7)>>2
	.byte	(LBB0_21-LBB0_7)>>2
	.byte	(LBB0_21-LBB0_7)>>2
	.byte	(LBB0_21-LBB0_7)>>2
	.byte	(LBB0_21-LBB0_7)>>2
	.byte	(LBB0_21-LBB0_7)>>2
	.byte	(LBB0_9-LBB0_7)>>2
	.byte	(LBB0_21-LBB0_7)>>2
	.byte	(LBB0_21-LBB0_7)>>2
	.byte	(LBB0_21-LBB0_7)>>2
	.byte	(LBB0_21-LBB0_7)>>2
	.byte	(LBB0_21-LBB0_7)>>2
	.byte	(LBB0_21-LBB0_7)>>2
	.byte	(LBB0_21-LBB0_7)>>2
	.byte	(LBB0_21-LBB0_7)>>2
	.byte	(LBB0_21-LBB0_7)>>2
	.byte	(LBB0_21-LBB0_7)>>2
	.byte	(LBB0_10-LBB0_7)>>2
	.byte	(LBB0_21-LBB0_7)>>2
	.byte	(LBB0_11-LBB0_7)>>2
                                        ; -- End function
	.comm	_LUA_MINSTACK,8,3               ; @LUA_MINSTACK
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"too many arguments"

	.comm	_LUA_TNUMBER,8,3                ; @LUA_TNUMBER
l_.str.1:                               ; @.str.1
	.asciz	"invalid format"

	.no_dead_strip	_g_read
.subsections_via_symbols
