	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function get_buffer
_get_buffer:                            ## @get_buffer
	.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
	movq	%rsi, %r14
	movl	(%rdi), %r12d
	movq	_STDIN_CHUNK_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
	leal	1(%r13), %edi
	callq	_smalloc
	movq	%rax, %r15
	movb	$0, (%rax)
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movslq	%ebx, %rax
	leaq	(%r15,%rax), %rsi
	movl	%r13d, %edx
	subl	%eax, %edx
	movl	%r12d, %edi
	callq	_read
	testl	%eax, %eax
	je	LBB0_5
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	cmpl	$-1, %eax
	je	LBB0_3
## %bb.6:                               ##   in Loop: Header=BB0_1 Depth=1
	addl	%eax, %ebx
	cmpl	%r13d, %ebx
	jne	LBB0_1
## %bb.7:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	_STDIN_CHUNK_SIZE@GOTPCREL(%rip), %rax
	addl	(%rax), %r13d
	movq	%r15, %rdi
	movl	%r13d, %esi
	callq	_srealloc
	movq	%rax, %r15
	jmp	LBB0_1
LBB0_3:
	movq	_errno@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	movq	_EAGAIN@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rdi
	jne	LBB0_4
## %bb.8:
	cmpb	$0, (%r15)
	jne	LBB0_10
## %bb.9:
	movq	%r15, %rdi
	callq	_FREE
	movl	$-1, %ebx
	jmp	LBB0_10
LBB0_5:
	leaq	L_.str.1(%rip), %rdi
	xorl	%eax, %eax
	callq	_ELOG
	movq	%r15, %rdi
	callq	_FREE
	movl	$-1, %ebx
	xorl	%r15d, %r15d
LBB0_10:
	movl	%ebx, (%r14)
	movq	%r15, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	callq	_strerror
	leaq	L_.str(%rip), %rdi
	movl	%eax, %esi
	xorl	%eax, %eax
	callq	_ELOG
	movq	%r15, %rdi
	callq	_FREE
	movq	_EXIT_FAILURE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_exit
	.cfi_endproc
                                        ## -- End function
	.comm	_STDIN_CHUNK_SIZE,4,2           ## @STDIN_CHUNK_SIZE
	.comm	_errno,8,3                      ## @errno
	.comm	_EAGAIN,8,3                     ## @EAGAIN
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"read() failed!: %s\n"

	.comm	_EXIT_FAILURE,4,2               ## @EXIT_FAILURE
L_.str.1:                               ## @.str.1
	.asciz	"stdin: received EOF\n"

	.no_dead_strip	_get_buffer
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function get_buffer
_get_buffer:                            ; @get_buffer
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.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
	mov	x19, x1
	ldr	w21, [x0]
Lloh0:
	adrp	x24, _STDIN_CHUNK_SIZE@GOTPAGE
Lloh1:
	ldr	x24, [x24, _STDIN_CHUNK_SIZE@GOTPAGEOFF]
	ldr	w22, [x24]
	add	w0, w22, #1
	bl	_smalloc
	mov	x20, x0
	mov	w23, #0
	strb	wzr, [x0]
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	add	x1, x20, w23, sxtw
	sub	w2, w22, w23
	mov	x0, x21
	bl	_read
	cbz	w0, LBB0_8
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	cmn	w0, #1
	b.eq	LBB0_5
; %bb.3:                                ;   in Loop: Header=BB0_1 Depth=1
	add	w23, w0, w23
	cmp	w23, w22
	b.ne	LBB0_1
; %bb.4:                                ;   in Loop: Header=BB0_1 Depth=1
	ldr	w8, [x24]
	add	w22, w8, w22
	mov	x0, x20
	mov	x1, x22
	bl	_srealloc
	mov	x20, x0
	b	LBB0_1
LBB0_5:
Lloh2:
	adrp	x8, _errno@GOTPAGE
Lloh3:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh4:
	ldr	x0, [x8]
Lloh5:
	adrp	x8, _EAGAIN@GOTPAGE
Lloh6:
	ldr	x8, [x8, _EAGAIN@GOTPAGEOFF]
Lloh7:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_11
; %bb.6:
	ldrb	w8, [x20]
	cbnz	w8, LBB0_10
; %bb.7:
	mov	x0, x20
	bl	_FREE
	b	LBB0_9
LBB0_8:
Lloh8:
	adrp	x0, l_.str.1@PAGE
Lloh9:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_ELOG
	mov	x0, x20
	bl	_FREE
	mov	x20, #0
LBB0_9:
	mov	w23, #-1
LBB0_10:
	str	w23, [x19]
	mov	x0, x20
	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
	add	sp, sp, #80
	ret
LBB0_11:
	bl	_strerror
                                        ; kill: def $w0 killed $w0 def $x0
	str	x0, [sp]
Lloh10:
	adrp	x0, l_.str@PAGE
Lloh11:
	add	x0, x0, l_.str@PAGEOFF
	bl	_ELOG
	mov	x0, x20
	bl	_FREE
Lloh12:
	adrp	x8, _EXIT_FAILURE@GOTPAGE
Lloh13:
	ldr	x8, [x8, _EXIT_FAILURE@GOTPAGEOFF]
Lloh14:
	ldr	w0, [x8]
	bl	_exit
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpAdd	Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_STDIN_CHUNK_SIZE,4,2           ; @STDIN_CHUNK_SIZE
	.comm	_errno,8,3                      ; @errno
	.comm	_EAGAIN,8,3                     ; @EAGAIN
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"read() failed!: %s\n"

	.comm	_EXIT_FAILURE,4,2               ; @EXIT_FAILURE
l_.str.1:                               ; @.str.1
	.asciz	"stdin: received EOF\n"

	.no_dead_strip	_get_buffer
.subsections_via_symbols
