	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function read_data
_read_data:                             ## @read_data
	.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	%rsi, %r14
	movq	%rdi, %rbx
	leaq	L_.str(%rip), %rsi
	callq	_strcmp
	testq	%rax, %rax
	je	LBB0_1
## %bb.6:
	movq	_O_RDONLY@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_open
	movl	%eax, %r15d
	cmpl	$-1, %eax
	jne	LBB0_2
## %bb.7:
	xorl	%r12d, %r12d
	jmp	LBB0_14
LBB0_1:
	movq	_STDIN_FILENO@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
LBB0_2:
	movl	$1048576, %ebx                  ## imm = 0x100000
	movl	$1048576, %edi                  ## imm = 0x100000
	callq	_malloc
	movq	%rax, (%r14)
	xorl	%r12d, %r12d
	testq	%rax, %rax
	je	LBB0_14
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	%rbx, %rcx
	subq	%r12, %rcx
	movq	(%r14), %rax
	cmpq	$1048575, %rcx                  ## imm = 0xFFFFF
	ja	LBB0_9
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	addq	%rbx, %rbx
	movq	%rax, %rdi
	movq	%rbx, %rsi
	callq	_realloc
	testq	%rax, %rax
	je	LBB0_5
## %bb.8:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	%rax, (%r14)
LBB0_9:                                 ##   in Loop: Header=BB0_3 Depth=1
	addq	%r12, %rax
	movl	%r15d, %edi
	movq	%rax, %rsi
	movl	$1048576, %edx                  ## imm = 0x100000
	callq	_read
	testl	%eax, %eax
	je	LBB0_12
## %bb.10:                              ##   in Loop: Header=BB0_3 Depth=1
	cmpl	$-1, %eax
	je	LBB0_5
## %bb.11:                              ##   in Loop: Header=BB0_3 Depth=1
	cltq
	addq	%rax, %r12
	jmp	LBB0_3
LBB0_5:
	movq	(%r14), %rdi
	callq	_free
	movq	$0, (%r14)
	xorl	%r12d, %r12d
	jmp	LBB0_14
LBB0_12:
	movq	_STDIN_FILENO@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r15d
	je	LBB0_14
## %bb.13:
	movl	%r15d, %edi
	callq	_close
LBB0_14:
	movq	%r12, %rax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"-"

	.comm	_STDIN_FILENO,4,2               ## @STDIN_FILENO
	.comm	_O_RDONLY,4,2                   ## @O_RDONLY
	.no_dead_strip	_read_data
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function read_data
_read_data:                             ; @read_data
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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, x1
	mov	x20, x0
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	bl	_strcmp
	cbz	x0, LBB0_3
; %bb.1:
Lloh2:
	adrp	x8, _O_RDONLY@GOTPAGE
Lloh3:
	ldr	x8, [x8, _O_RDONLY@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_open
	mov	x21, x0
	cmn	w0, #1
	b.ne	LBB0_4
; %bb.2:
	mov	x20, #0
	b	LBB0_15
LBB0_3:
Lloh5:
	adrp	x8, _STDIN_FILENO@GOTPAGE
Lloh6:
	ldr	x8, [x8, _STDIN_FILENO@GOTPAGEOFF]
Lloh7:
	ldr	w21, [x8]
LBB0_4:
	mov	w0, #1048576
	bl	_malloc
	str	x0, [x19]
	mov	x20, #0
	cbz	x0, LBB0_15
; %bb.5:
	mov	w22, #1048576
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	sub	x8, x22, x20
	ldr	x0, [x19]
	lsr	x8, x8, #20
	cbnz	x8, LBB0_9
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	lsl	x22, x22, #1
	mov	x1, x22
	bl	_realloc
	cbz	x0, LBB0_12
; %bb.8:                                ;   in Loop: Header=BB0_6 Depth=1
	str	x0, [x19]
LBB0_9:                                 ;   in Loop: Header=BB0_6 Depth=1
	add	x1, x0, x20
	mov	x0, x21
	mov	w2, #1048576
	bl	_read
	cbz	w0, LBB0_13
; %bb.10:                               ;   in Loop: Header=BB0_6 Depth=1
	cmn	w0, #1
	b.eq	LBB0_12
; %bb.11:                               ;   in Loop: Header=BB0_6 Depth=1
	add	x20, x20, w0, sxtw
	b	LBB0_6
LBB0_12:
	ldr	x0, [x19]
	bl	_free
	mov	x20, #0
	str	xzr, [x19]
	b	LBB0_15
LBB0_13:
Lloh8:
	adrp	x8, _STDIN_FILENO@GOTPAGE
Lloh9:
	ldr	x8, [x8, _STDIN_FILENO@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	cmp	w21, w8
	b.eq	LBB0_15
; %bb.14:
	mov	x0, x21
	bl	_close
LBB0_15:
	mov	x0, x20
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"-"

	.comm	_STDIN_FILENO,4,2               ; @STDIN_FILENO
	.comm	_O_RDONLY,4,2                   ; @O_RDONLY
	.no_dead_strip	_read_data
.subsections_via_symbols
