	.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
	cmpl	$1, %r13d
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	jne	LBB0_2
## %bb.1:
	movq	%r12, %rdi
	movq	%r15, %rsi
	callq	_read_line
	movl	%eax, %r14d
	incl	%ebx
	jmp	LBB0_20
LBB0_2:
	leal	19(%r13), %esi
	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	%r12, %rdi
	movl	%ebx, %esi
	cmpl	$3, %eax
	jne	LBB0_6
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	callq	_lua_tointeger
	testl	%eax, %eax
	je	LBB0_5
## %bb.16:                              ##   in Loop: Header=BB0_3 Depth=1
	movslq	%eax, %rdx
	movq	%r12, %rdi
	movq	%r15, %rsi
	callq	_read_chars
	jmp	LBB0_17
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_3 Depth=1
	callq	_lua_tostring
	movq	%rax, %r14
	testq	%rax, %rax
	je	LBB0_7
## %bb.8:                               ##   in Loop: Header=BB0_3 Depth=1
	cmpb	$42, (%r14)
	sete	%al
	jmp	LBB0_9
LBB0_5:                                 ##   in Loop: Header=BB0_3 Depth=1
	movq	%r12, %rdi
	movq	%r15, %rsi
	callq	_test_eof
	jmp	LBB0_17
LBB0_7:                                 ##   in Loop: Header=BB0_3 Depth=1
	xorl	%eax, %eax
LBB0_9:                                 ##   in Loop: Header=BB0_3 Depth=1
	movzbl	%al, %esi
	movq	%r12, %rdi
	movl	%ebx, %edx
	leaq	L_.str.1(%rip), %rcx
	callq	_luaL_argcheck
	movsbl	1(%r14), %eax
	cmpl	$97, %eax
	je	LBB0_14
## %bb.10:                              ##   in Loop: Header=BB0_3 Depth=1
	cmpl	$108, %eax
	je	LBB0_13
## %bb.11:                              ##   in Loop: Header=BB0_3 Depth=1
	cmpl	$110, %eax
	jne	LBB0_15
## %bb.12:                              ##   in Loop: Header=BB0_3 Depth=1
	movq	%r12, %rdi
	movq	%r15, %rsi
	callq	_read_number
	jmp	LBB0_17
LBB0_14:                                ##   in Loop: Header=BB0_3 Depth=1
	movq	%r12, %rdi
	movq	%r15, %rsi
	movq	$-1, %rdx
	callq	_read_chars
	movl	$1, %r14d
	jmp	LBB0_18
LBB0_13:                                ##   in Loop: Header=BB0_3 Depth=1
	movq	%r12, %rdi
	movq	%r15, %rsi
	callq	_read_line
	.p2align	4, 0x90
LBB0_17:                                ##   in Loop: Header=BB0_3 Depth=1
	movl	%eax, %r14d
LBB0_18:                                ##   in Loop: Header=BB0_3 Depth=1
	incl	%ebx
	addl	$-1, %r13d
	jae	LBB0_20
## %bb.19:                              ##   in Loop: Header=BB0_3 Depth=1
	testl	%r14d, %r14d
	jne	LBB0_3
LBB0_20:
	movq	%r15, %rdi
	callq	_ferror
	testq	%rax, %rax
	je	LBB0_21
## %bb.24:
	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	_pushresult                     ## TAILCALL
LBB0_21:
	testl	%r14d, %r14d
	jne	LBB0_23
## %bb.22:
	movq	%r12, %rdi
	movl	$1, %esi
	callq	_lua_pop
	movq	%r12, %rdi
	callq	_lua_pushnil
LBB0_23:
	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_15:
	leaq	L_.str.2(%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
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"too many arguments"

L_.str.1:                               ## @.str.1
	.asciz	"invalid option"

L_.str.2:                               ## @.str.2
	.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
	mov	x0, x21
	bl	_clearerr
	cmp	w22, #1
	b.ne	LBB0_2
; %bb.1:
	mov	x0, x20
	mov	x1, x21
	bl	_read_line
	mov	x24, x0
	add	w22, w19, #1
	b	LBB0_19
LBB0_2:
	add	w1, w22, #19
Lloh0:
	adrp	x2, l_.str@PAGE
Lloh1:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x20
	bl	_luaL_checkstack
	sub	w25, w22, #2
Lloh2:
	adrp	x23, l_.str.1@PAGE
Lloh3:
	add	x23, x23, l_.str.1@PAGEOFF
	mov	x22, x19
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x20
	mov	x1, x22
	bl	_lua_type
	cmp	w0, #3
	b.ne	LBB0_6
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, x20
	mov	x1, x22
	bl	_lua_tointeger
                                        ; kill: def $w0 killed $w0 def $x0
	cbz	w0, LBB0_8
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	sxtw	x2, w0
	mov	x0, x20
	mov	x1, x21
	bl	_read_chars
	b	LBB0_16
LBB0_6:                                 ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, x20
	mov	x1, x22
	bl	_lua_tostring
	mov	x24, x0
	cbz	x0, LBB0_9
; %bb.7:                                ;   in Loop: Header=BB0_3 Depth=1
	ldrb	w8, [x24]
	cmp	w8, #42
	cset	w1, eq
	b	LBB0_10
LBB0_8:                                 ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, x20
	mov	x1, x21
	bl	_test_eof
	b	LBB0_16
LBB0_9:                                 ;   in Loop: Header=BB0_3 Depth=1
	mov	w1, #0
LBB0_10:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, x20
	mov	x2, x22
	mov	x3, x23
	bl	_luaL_argcheck
	ldrsb	w8, [x24, #1]
	cmp	w8, #97
	b.eq	LBB0_14
; %bb.11:                               ;   in Loop: Header=BB0_3 Depth=1
	cmp	w8, #108
	b.eq	LBB0_15
; %bb.12:                               ;   in Loop: Header=BB0_3 Depth=1
	cmp	w8, #110
	b.ne	LBB0_24
; %bb.13:                               ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, x20
	mov	x1, x21
	bl	_read_number
	b	LBB0_16
LBB0_14:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, x20
	mov	x1, x21
	mov	x2, #-1
	bl	_read_chars
	mov	w24, #1
	b	LBB0_17
LBB0_15:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, x20
	mov	x1, x21
	bl	_read_line
LBB0_16:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x24, x0
LBB0_17:                                ;   in Loop: Header=BB0_3 Depth=1
	add	w22, w22, #1
	subs	w25, w25, #1
	b.lo	LBB0_19
; %bb.18:                               ;   in Loop: Header=BB0_3 Depth=1
	cbnz	w24, LBB0_3
LBB0_19:
	mov	x0, x21
	bl	_ferror
	cbz	x0, LBB0_21
; %bb.20:
	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	_pushresult
LBB0_21:
	cbnz	w24, LBB0_23
; %bb.22:
	mov	x0, x20
	mov	w1, #1
	bl	_lua_pop
	mov	x0, x20
	bl	_lua_pushnil
LBB0_23:
	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_24:
Lloh4:
	adrp	x2, l_.str.2@PAGE
Lloh5:
	add	x2, x2, l_.str.2@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	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"too many arguments"

l_.str.1:                               ; @.str.1
	.asciz	"invalid option"

l_.str.2:                               ; @.str.2
	.asciz	"invalid format"

	.no_dead_strip	_g_read
.subsections_via_symbols
