	.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, %r14
	movl	$2, %edi
	callq	_lua_upvalueindex
	movq	%r15, %rdi
	movl	%eax, %esi
	callq	_lua_tointeger
	movq	%rax, %r12
	movq	%r14, %rdi
	callq	_isclosed
	testq	%rax, %rax
	je	LBB0_1
## %bb.9:
	leaq	L_.str(%rip), %rsi
	movq	%r15, %rdi
	xorl	%eax, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_luaL_error                     ## TAILCALL
LBB0_1:
	movq	%r15, %rdi
	movl	$1, %esi
	callq	_lua_settop
	leaq	L_.str.1(%rip), %rdx
	movq	%r15, %rdi
	movl	%r12d, %esi
	callq	_luaL_checkstack
	testl	%r12d, %r12d
	jle	LBB0_4
## %bb.2:
	negl	%r12d
	movl	$4, %ebx
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movl	%ebx, %edi
	callq	_lua_upvalueindex
	movq	%r15, %rdi
	movl	%eax, %esi
	callq	_lua_pushvalue
	leal	(%r12,%rbx), %eax
	incl	%eax
	movl	%ebx, %ecx
	incl	%ecx
	movl	%ecx, %ebx
	cmpl	$4, %eax
	jne	LBB0_3
LBB0_4:
	movl	(%r14), %esi
	movq	%r15, %rdi
	movl	$2, %edx
	callq	_g_read
	movl	%eax, %r14d
	xorl	%edi, %edi
	testl	%eax, %eax
	setg	%dil
	callq	_lua_assert
	movl	%r14d, %esi
	negl	%esi
	movq	%r15, %rdi
	callq	_lua_toboolean
	testq	%rax, %rax
	je	LBB0_5
LBB0_8:
	movl	%r14d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	cmpl	$2, %r14d
	jl	LBB0_6
## %bb.10:
	movl	$1, %esi
	subl	%r14d, %esi
	movq	%r15, %rdi
	callq	_lua_tostring
	leaq	L_.str.2(%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_6:
	movl	$3, %edi
	callq	_lua_upvalueindex
	movq	%r15, %rdi
	movl	%eax, %esi
	callq	_lua_toboolean
	xorl	%r14d, %r14d
	testq	%rax, %rax
	je	LBB0_8
## %bb.7:
	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
	jmp	LBB0_8
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"file is already closed"

L_.str.1:                               ## @.str.1
	.asciz	"too many arguments"

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

	.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
	mov	x20, x0
	mov	w0, #2
	bl	_lua_upvalueindex
	mov	x1, x0
	mov	x0, x19
	bl	_lua_tointeger
	mov	x21, x0
	mov	x0, x20
	bl	_isclosed
	cbz	x0, LBB0_2
; %bb.1:
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	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
	b	_luaL_error
LBB0_2:
	mov	x0, x19
	mov	w1, #1
	bl	_lua_settop
Lloh2:
	adrp	x2, l_.str.1@PAGE
Lloh3:
	add	x2, x2, l_.str.1@PAGEOFF
	mov	x0, x19
	mov	x1, x21
	bl	_luaL_checkstack
	cmp	w21, #1
	b.lt	LBB0_5
; %bb.3:
	mov	w22, #0
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	add	w0, w22, #4
	bl	_lua_upvalueindex
	mov	x1, x0
	mov	x0, x19
	bl	_lua_pushvalue
	add	w22, w22, #1
	cmp	w21, w22
	b.ne	LBB0_4
LBB0_5:
	ldr	w1, [x20]
	mov	x0, x19
	mov	w2, #2
	bl	_g_read
	mov	x20, x0
	cmp	w0, #0
	cset	w0, gt
	bl	_lua_assert
	neg	w1, w20
	mov	x0, x19
	bl	_lua_toboolean
	cbnz	x0, LBB0_11
; %bb.6:
	cmp	w20, #2
	b.lt	LBB0_8
; %bb.7:
	mov	w8, #1
	sub	w1, w8, w20
	mov	x0, x19
	bl	_lua_tostring
                                        ; kill: def $w0 killed $w0 def $x0
	str	x0, [sp]
Lloh4:
	adrp	x1, l_.str.2@PAGE
Lloh5:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x19
	bl	_luaL_error
	b	LBB0_12
LBB0_8:
	mov	w0, #3
	bl	_lua_upvalueindex
	mov	x1, x0
	mov	x0, x19
	bl	_lua_toboolean
	cbz	x0, LBB0_10
; %bb.9:
	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
LBB0_10:
	mov	w20, #0
LBB0_11:
	mov	x0, x20
LBB0_12:
	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	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"file is already closed"

l_.str.1:                               ; @.str.1
	.asciz	"too many arguments"

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

	.no_dead_strip	_io_readline
.subsections_via_symbols
