	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function readline
_readline:                              ## @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	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %rdx
	movq	_line@GOTPCREL(%rip), %r14
	movq	(%r14), %rdi
	movl	$1024, %esi                     ## imm = 0x400
	callq	_fgets
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	(%r14), %rax
	xorl	%edx, %edx
	movabsq	$34359739393, %rsi              ## imm = 0x800000401
	movq	%rax, %rcx
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_3 Depth=1
	incq	%rcx
	decq	%rdx
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movzbl	(%rcx), %edi
	cmpq	$35, %rdi
	ja	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	btq	%rdi, %rsi
	jae	LBB0_5
## %bb.6:
	cmpq	%rax, %rcx
	jbe	LBB0_7
## %bb.8:
	addq	%rcx, %rdx
	jmp	LBB0_9
	.p2align	4, 0x90
LBB0_11:                                ##   in Loop: Header=BB0_9 Depth=1
	decq	%rcx
	cmpq	%rax, %rcx
	jbe	LBB0_12
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	movzbl	-1(%rcx), %ebx
	cmpb	$32, %bl
	je	LBB0_11
## %bb.10:                              ##   in Loop: Header=BB0_9 Depth=1
	cmpb	$9, %bl
	je	LBB0_11
	jmp	LBB0_13
LBB0_1:
	xorl	%ebx, %ebx
	jmp	LBB0_16
LBB0_7:
	subq	%rdx, %rax
	jmp	LBB0_14
LBB0_12:
	movq	%rdx, %rcx
LBB0_13:
	movq	%rcx, %rax
LBB0_14:
	movb	$0, (%rcx)
	movq	(%r14), %rcx
	movq	_linep@GOTPCREL(%rip), %rdx
	movq	%rcx, (%rdx)
	movq	_linno@GOTPCREL(%rip), %rdx
	incl	(%rdx)
	subq	%rcx, %rax
	movq	_BUFLEN@GOTPCREL(%rip), %rcx
	movslq	(%rcx), %rcx
	movl	$1, %ebx
	cmpq	%rcx, %rax
	jle	LBB0_16
## %bb.15:
	leaq	L_.str(%rip), %rdi
	callq	_error
LBB0_16:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_line,8,3                       ## @line
	.comm	_linep,8,3                      ## @linep
	.comm	_linno,4,2                      ## @linno
	.comm	_BUFLEN,4,2                     ## @BUFLEN
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Line too long"

	.no_dead_strip	_readline
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function readline
_readline:                              ; @readline
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x2, x0
Lloh0:
	adrp	x19, _line@GOTPAGE
Lloh1:
	ldr	x19, [x19, _line@GOTPAGEOFF]
	ldr	x0, [x19]
	mov	w1, #1024
	bl	_fgets
	cbz	x0, LBB0_12
; %bb.1:
	mov	x10, #0
	ldr	x8, [x19]
	mov	w9, #1
	mov	x11, #1025
	movk	x11, #8, lsl #32
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldrb	w12, [x8, x10]
	cmp	w12, #35
	lsl	x12, x9, x12
	and	x12, x12, x11
	ccmp	x12, #0, #4, ls
	b.ne	LBB0_4
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	add	x10, x10, #1
	b	LBB0_2
LBB0_4:
	add	x9, x8, x10
	cmp	x9, x8
	b.ls	LBB0_9
; %bb.5:
	sub	x10, x9, x10
	mov	x11, x9
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	ldrb	w12, [x11, #-1]!
	cmp	w12, #32
	ccmp	w12, #9, #4, ne
	b.ne	LBB0_9
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	mov	x9, x11
	cmp	x11, x8
	b.hi	LBB0_6
; %bb.8:
	mov	x9, x10
LBB0_9:
	strb	wzr, [x9]
Lloh2:
	adrp	x8, _linep@GOTPAGE
Lloh3:
	ldr	x8, [x8, _linep@GOTPAGEOFF]
	ldr	x10, [x19]
Lloh4:
	str	x10, [x8]
Lloh5:
	adrp	x8, _linno@GOTPAGE
Lloh6:
	ldr	x8, [x8, _linno@GOTPAGEOFF]
	ldr	w11, [x8]
	add	w11, w11, #1
	str	w11, [x8]
Lloh7:
	adrp	x8, _BUFLEN@GOTPAGE
Lloh8:
	ldr	x8, [x8, _BUFLEN@GOTPAGEOFF]
Lloh9:
	ldrsw	x8, [x8]
	sub	x9, x9, x10
	cmp	x9, x8
	b.le	LBB0_11
; %bb.10:
Lloh10:
	adrp	x0, l_.str@PAGE
Lloh11:
	add	x0, x0, l_.str@PAGEOFF
	bl	_error
LBB0_11:
	mov	w0, #1
LBB0_12:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotStr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_line,8,3                       ; @line
	.comm	_linep,8,3                      ; @linep
	.comm	_linno,4,2                      ; @linno
	.comm	_BUFLEN,4,2                     ; @BUFLEN
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Line too long"

	.no_dead_strip	_readline
.subsections_via_symbols
