	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_fillbuf                        ## -- Begin function fillbuf
	.p2align	4, 0x90
_fillbuf:                               ## @fillbuf
	.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, %rbx
	movq	_INS@GOTPCREL(%rip), %r14
	movslq	(%r14), %rax
	leal	7(%rax), %ecx
	testl	%eax, %eax
	cmovnsl	%eax, %ecx
	sarl	$3, %ecx
	movslq	%ecx, %rcx
	addq	(%rdi), %rcx
	addq	24(%rdi), %rax
	cmpq	%rax, %rcx
	jbe	LBB0_2
## %bb.1:
	movq	_FATAL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	callq	_error
LBB0_2:
	movq	8(%rbx), %rdi
	testq	%rdi, %rdi
	js	LBB0_4
## %bb.3:
	movq	(%rbx), %rsi
	movl	(%r14), %eax
	leal	7(%rax), %edx
	testl	%eax, %eax
	cmovnsl	%eax, %edx
	sarl	$3, %edx
	callq	_read
	testl	%eax, %eax
	jg	LBB0_5
LBB0_4:
	xorl	%eax, %eax
LBB0_5:
	movq	16(%rbx), %rdx
	movzbl	(%rdx), %edi
	movq	_EOB@GOTPCREL(%rip), %rsi
	movl	(%rsi), %ecx
	cmpl	%ecx, %edi
	jne	LBB0_7
## %bb.6:
	movq	_EOFC@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, (%rdx)
	movl	(%rsi), %ecx
LBB0_7:
	movq	(%rbx), %rsi
	movl	%eax, %edi
	leaq	(%rsi,%rdi,4), %rdx
	movq	%rdx, (%rbx)
	movd	%ecx, %xmm0
	pshufd	$0, %xmm0, %xmm0                ## xmm0 = xmm0[0,0,0,0]
	movdqu	%xmm0, (%rsi,%rdi,4)
	xorl	%ecx, %ecx
	testl	%eax, %eax
	jne	LBB0_9
## %bb.8:
	movq	_EOFC@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 12(%rdx)
	movl	%eax, 8(%rdx)
	movl	%eax, 4(%rdx)
	movl	%eax, (%rdx)
	movq	_EOF@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
LBB0_9:
	movl	%ecx, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_INS,4,2                        ## @INS
	.comm	_FATAL,4,2                      ## @FATAL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Input buffer overflow"

	.comm	_EOB,4,2                        ## @EOB
	.comm	_EOFC,8,3                       ## @EOFC
	.comm	_EOF,4,2                        ## @EOF
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_fillbuf                        ; -- Begin function fillbuf
	.p2align	2
_fillbuf:                               ; @fillbuf
	.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	x19, x0
Lloh0:
	adrp	x20, _INS@GOTPAGE
Lloh1:
	ldr	x20, [x20, _INS@GOTPAGEOFF]
	ldrsw	x8, [x20]
	add	w9, w8, #7
	cmp	w8, #0
	csel	w9, w9, w8, lt
	asr	w9, w9, #3
	ldr	x10, [x0]
	add	x9, x10, w9, sxtw
	ldr	x10, [x0, #24]
	add	x8, x10, x8
	cmp	x9, x8
	b.ls	LBB0_2
; %bb.1:
Lloh2:
	adrp	x8, _FATAL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _FATAL@GOTPAGEOFF]
Lloh4:
	ldr	w0, [x8]
Lloh5:
	adrp	x1, l_.str@PAGE
Lloh6:
	add	x1, x1, l_.str@PAGEOFF
	bl	_error
LBB0_2:
	ldr	x0, [x19, #8]
	tbnz	x0, #63, LBB0_4
; %bb.3:
	ldr	x1, [x19]
	ldr	w8, [x20]
	add	w9, w8, #7
	cmp	w8, #0
	csel	w8, w9, w8, lt
	asr	w2, w8, #3
	bl	_read
	cmp	w0, #0
	b.gt	LBB0_5
LBB0_4:
	mov	w0, #0
LBB0_5:
	ldr	x8, [x19, #16]
	ldrb	w11, [x8]
Lloh7:
	adrp	x10, _EOB@GOTPAGE
Lloh8:
	ldr	x10, [x10, _EOB@GOTPAGEOFF]
	ldr	w9, [x10]
	cmp	w11, w9
	b.ne	LBB0_7
; %bb.6:
Lloh9:
	adrp	x9, _EOFC@GOTPAGE
Lloh10:
	ldr	x9, [x9, _EOFC@GOTPAGEOFF]
Lloh11:
	ldr	x9, [x9]
	str	w9, [x8]
	ldr	w9, [x10]
LBB0_7:
	ldr	x8, [x19]
	add	x8, x8, w0, uxtw #2
	str	x8, [x19]
	dup.4s	v0, w9
	str	q0, [x8]
	cbz	w0, LBB0_9
; %bb.8:
	mov	w0, #0
	b	LBB0_10
LBB0_9:
Lloh12:
	adrp	x9, _EOFC@GOTPAGE
Lloh13:
	ldr	x9, [x9, _EOFC@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x9]
	stp	w9, w9, [x8, #8]
	stp	w9, w9, [x8]
Lloh15:
	adrp	x8, _EOF@GOTPAGE
Lloh16:
	ldr	x8, [x8, _EOF@GOTPAGEOFF]
Lloh17:
	ldr	w0, [x8]
LBB0_10:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_INS,4,2                        ; @INS
	.comm	_FATAL,4,2                      ; @FATAL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Input buffer overflow"

	.comm	_EOB,4,2                        ; @EOB
	.comm	_EOFC,8,3                       ; @EOFC
	.comm	_EOF,4,2                        ; @EOF
.subsections_via_symbols
