	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function io_readline
_io_readline:                           ## @io_readline
	.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, %r15
	movl	$1, %edi
	callq	_lua_upvalueindex
	movq	%r15, %rdi
	movl	%eax, %esi
	callq	_lua_touserdata
	movq	(%rax), %rbx
	testq	%rbx, %rbx
	jne	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rsi
	movq	%r15, %rdi
	xorl	%eax, %eax
	callq	_luaL_error
LBB0_2:
	movq	%r15, %rdi
	movq	%rbx, %rsi
	callq	_read_line
	movl	%eax, %r12d
	movq	%rbx, %rdi
	callq	_ferror
	testq	%rax, %rax
	je	LBB0_3
## %bb.7:
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_strerror
	leaq	L_.str.1(%rip), %rsi
	movq	%r15, %rdi
	movl	%eax, %edx
	xorl	%eax, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_luaL_error                     ## TAILCALL
LBB0_3:
	movl	$1, %r14d
	testl	%r12d, %r12d
	jne	LBB0_6
## %bb.4:
	movl	$2, %edi
	callq	_lua_upvalueindex
	movq	%r15, %rdi
	movl	%eax, %esi
	callq	_lua_toboolean
	xorl	%r14d, %r14d
	testq	%rax, %rax
	je	LBB0_6
## %bb.5:
	movq	%r15, %rdi
	xorl	%esi, %esi
	callq	_lua_settop
	movl	$1, %edi
	callq	_lua_upvalueindex
	movq	%r15, %rdi
	movl	%eax, %esi
	callq	_lua_pushvalue
	movq	%r15, %rdi
	callq	_aux_close
LBB0_6:
	movl	%r14d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"file is already closed"

L_.str.1:                               ## @.str.1
	.asciz	"%s"

	.comm	_errno,4,2                      ## @errno
	.no_dead_strip	_io_readline
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function io_readline
_io_readline:                           ; @io_readline
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	w0, #1
	bl	_lua_upvalueindex
	mov	x1, x0
	mov	x0, x19
	bl	_lua_touserdata
	ldr	x20, [x0]
	cbnz	x20, LBB0_2
; %bb.1:
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_luaL_error
LBB0_2:
	mov	x0, x19
	mov	x1, x20
	bl	_read_line
	mov	x21, x0
	mov	x0, x20
	bl	_ferror
	cbz	x0, LBB0_4
; %bb.3:
Lloh2:
	adrp	x8, _errno@GOTPAGE
Lloh3:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh4:
	ldr	w0, [x8]
	bl	_strerror
                                        ; kill: def $w0 killed $w0 def $x0
	str	x0, [sp]
Lloh5:
	adrp	x1, l_.str.1@PAGE
Lloh6:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_luaL_error
	b	LBB0_8
LBB0_4:
	cbz	w21, LBB0_6
; %bb.5:
	mov	w0, #1
	b	LBB0_8
LBB0_6:
	mov	w0, #2
	bl	_lua_upvalueindex
	mov	x1, x0
	mov	x0, x19
	bl	_lua_toboolean
	cbz	x0, LBB0_8
; %bb.7:
	mov	x0, x19
	mov	w1, #0
	bl	_lua_settop
	mov	w0, #1
	bl	_lua_upvalueindex
	mov	x1, x0
	mov	x0, x19
	bl	_lua_pushvalue
	mov	x0, x19
	bl	_aux_close
	mov	w0, #0
LBB0_8:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"file is already closed"

l_.str.1:                               ; @.str.1
	.asciz	"%s"

	.comm	_errno,4,2                      ; @errno
	.no_dead_strip	_io_readline
.subsections_via_symbols
