	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function read_line
_read_line:                             ## @read_line
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r14d
	movq	%rsi, %r12
	movq	%rdi, %rbx
	leaq	-44(%rbp), %rsi
	callq	_luaL_buffinit
	movq	_EOF@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	je	LBB0_15
## %bb.1:
	movl	%r14d, -48(%rbp)                ## 4-byte Spill
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	xorl	%ebx, %ebx
	leaq	-44(%rbp), %r15
	movq	_LUAL_BUFFERSIZE@GOTPCREL(%rip), %r13
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_4 Depth 2
	movq	%r15, %rdi
	callq	_luaL_prepbuffer
	movq	%rax, %r15
	movq	%r12, %rdi
	callq	_l_lockfile
	cmpl	$0, (%r13)
	movl	$0, %r14d
	jle	LBB0_7
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	xorl	%r14d, %r14d
	.p2align	4, 0x90
LBB0_4:                                 ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	%r12, %rdi
	callq	_l_getc
	movl	%eax, %ebx
	cmpl	$10, %eax
	je	LBB0_7
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=2
	movq	_EOF@GOTPCREL(%rip), %rax
	cmpl	(%rax), %ebx
	je	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_4 Depth=2
	movb	%bl, (%r15,%r14)
	incq	%r14
	movslq	(%r13), %rax
	cmpq	%rax, %r14
	jl	LBB0_4
LBB0_7:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	%r12, %rdi
	callq	_l_unlockfile
	leaq	-44(%rbp), %r15
	movq	%r15, %rdi
	movl	%r14d, %esi
	callq	_luaL_addsize
	cmpl	$10, %ebx
	je	LBB0_9
## %bb.8:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	_EOF@GOTPCREL(%rip), %rax
	cmpl	(%rax), %ebx
	jne	LBB0_2
LBB0_9:
	cmpl	$0, -48(%rbp)                   ## 4-byte Folded Reload
	jne	LBB0_12
## %bb.10:
	cmpl	$10, %ebx
	jne	LBB0_12
## %bb.11:
	leaq	-44(%rbp), %rbx
	movq	%rbx, %rdi
	movl	$10, %esi
	callq	_luaL_addchar
	movq	%rbx, %rdi
	callq	_luaL_pushresult
	movl	$1, %eax
	jmp	LBB0_14
LBB0_15:
	leaq	-44(%rbp), %rdi
	callq	_luaL_pushresult
	jmp	LBB0_13
LBB0_12:
	leaq	-44(%rbp), %rdi
	callq	_luaL_pushresult
	movl	$1, %eax
	cmpl	$10, %ebx
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	je	LBB0_14
LBB0_13:
	movq	%rbx, %rdi
	movl	$-1, %esi
	callq	_lua_rawlen
	movq	%rax, %rcx
	xorl	%eax, %eax
	testq	%rcx, %rcx
	setg	%al
LBB0_14:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EOF,4,2                        ## @EOF
	.comm	_LUAL_BUFFERSIZE,4,2            ## @LUAL_BUFFERSIZE
	.no_dead_strip	_read_line
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function read_line
_read_line:                             ; @read_line
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x20, x2
	mov	x21, x1
	mov	x19, x0
	add	x1, sp, #12
	bl	_luaL_buffinit
Lloh0:
	adrp	x25, _EOF@GOTPAGE
Lloh1:
	ldr	x25, [x25, _EOF@GOTPAGEOFF]
	ldr	w8, [x25]
	cbz	w8, LBB0_14
; %bb.1:
	mov	w22, #0
Lloh2:
	adrp	x26, _LUAL_BUFFERSIZE@GOTPAGE
Lloh3:
	ldr	x26, [x26, _LUAL_BUFFERSIZE@GOTPAGEOFF]
LBB0_2:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_4 Depth 2
	add	x0, sp, #12
	bl	_luaL_prepbuffer
	mov	x23, x0
	mov	x0, x21
	bl	_l_lockfile
	ldr	w8, [x26]
	cmp	w8, #1
	b.lt	LBB0_7
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	x27, #0
LBB0_4:                                 ;   Parent Loop BB0_2 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	mov	x0, x21
	bl	_l_getc
	mov	x22, x0
	cmp	w0, #10
	b.eq	LBB0_8
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=2
	ldr	w8, [x25]
	cmp	w22, w8
	b.eq	LBB0_8
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=2
	add	x24, x27, #1
	strb	w22, [x23, x27]
	ldrsw	x8, [x26]
	mov	x27, x24
	cmp	x24, x8
	b.lt	LBB0_4
	b	LBB0_9
LBB0_7:                                 ;   in Loop: Header=BB0_2 Depth=1
	mov	w24, #0
	b	LBB0_9
LBB0_8:                                 ;   in Loop: Header=BB0_2 Depth=1
	mov	x24, x27
LBB0_9:                                 ;   in Loop: Header=BB0_2 Depth=1
	mov	x0, x21
	bl	_l_unlockfile
	add	x0, sp, #12
	mov	x1, x24
	bl	_luaL_addsize
	cmp	w22, #10
	b.eq	LBB0_11
; %bb.10:                               ;   in Loop: Header=BB0_2 Depth=1
	ldr	w8, [x25]
	cmp	w22, w8
	b.ne	LBB0_2
LBB0_11:
	cbnz	w20, LBB0_15
; %bb.12:
	cmp	w22, #10
	b.ne	LBB0_15
; %bb.13:
	add	x0, sp, #12
	mov	w1, #10
	bl	_luaL_addchar
	add	x0, sp, #12
	bl	_luaL_pushresult
	mov	w0, #1
	b	LBB0_18
LBB0_14:
	add	x0, sp, #12
	bl	_luaL_pushresult
	b	LBB0_17
LBB0_15:
	add	x0, sp, #12
	bl	_luaL_pushresult
	cmp	w22, #10
	b.ne	LBB0_17
; %bb.16:
	mov	w0, #1
	b	LBB0_18
LBB0_17:
	mov	x0, x19
	mov	w1, #-1
	bl	_lua_rawlen
	cmp	x0, #0
	cset	w0, gt
LBB0_18:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.comm	_EOF,4,2                        ; @EOF
	.comm	_LUAL_BUFFERSIZE,4,2            ; @LUAL_BUFFERSIZE
	.no_dead_strip	_read_line
.subsections_via_symbols
