	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_read_rootfs                    ## -- Begin function read_rootfs
	.p2align	4, 0x90
_read_rootfs:                           ## @read_rootfs
	.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, %rax
	movq	%rdi, %rbx
	movq	_ROOTFS_SIZE@GOTPCREL(%rip), %r12
	cmpl	$0, (%r12)
	jle	LBB0_3
## %bb.1:
	movq	_ROOTFS_START@GOTPCREL(%rip), %rcx
	movslq	(%rcx), %rdx
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movb	$-1, (%rbx,%rdx)
	incq	%rdx
	movslq	(%rcx), %rsi
	movslq	(%r12), %rdi
	addq	%rsi, %rdi
	cmpq	%rdi, %rdx
	jl	LBB0_2
LBB0_3:
	leaq	L_.str(%rip), %rsi
	movq	%rax, %rdi
	callq	_fopen
	testq	%rax, %rax
	je	LBB0_4
## %bb.6:
	movq	%rax, %r14
	movq	_SEEK_END@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_fseek
	movq	%r14, %rdi
	callq	_ftell
	cmpl	(%r12), %eax
	jg	LBB0_7
## %bb.9:
	movl	%eax, %r15d
	movq	%r14, %rdi
	callq	_rewind
	movq	_ROOTFS_START@GOTPCREL(%rip), %rax
	movslq	(%rax), %rdi
	addq	%rbx, %rdi
	movl	$1, %esi
	movl	%r15d, %edx
	movq	%r14, %rcx
	callq	_fread
	cmpl	%r15d, %eax
	jne	LBB0_10
## %bb.11:
	movq	%r14, %rdi
	callq	_fclose
	movq	%rbx, %rax
LBB0_5:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	callq	_read_rootfs.cold.1
	xorl	%eax, %eax
	jmp	LBB0_5
LBB0_7:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_app_name@GOTPCREL(%rip), %rax
	movq	(%rax), %rdx
	leaq	L_.str.1(%rip), %rsi
	jmp	LBB0_8
LBB0_10:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_app_name@GOTPCREL(%rip), %rax
	movq	(%rax), %rdx
	leaq	L_.str.2(%rip), %rsi
LBB0_8:
	callq	_fprintf
	movq	%r14, %rdi
	callq	_fclose
	movl	$-1, %edi
	callq	_exit
	.cfi_endproc
                                        ## -- End function
	.p2align	4, 0x90                         ## -- Begin function read_rootfs.cold.1
_read_rootfs.cold.1:                    ## @read_rootfs.cold.1
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	movq	_app_name@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	callq	_perror
	pushq	$-1
	popq	%rdi
	callq	_exit
	.cfi_endproc
                                        ## -- End function
	.comm	_ROOTFS_START,4,2               ## @ROOTFS_START
	.comm	_ROOTFS_SIZE,4,2                ## @ROOTFS_SIZE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"rb"

	.comm	_app_name,8,3                   ## @app_name
	.comm	_SEEK_END,4,2                   ## @SEEK_END
	.comm	_stderr,4,2                     ## @stderr
L_.str.1:                               ## @.str.1
	.asciz	"%s: rootfs image file is too big\n"

L_.str.2:                               ## @.str.2
	.asciz	"%s: can't read rootfs image file\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_read_rootfs                    ; -- Begin function read_rootfs
	.p2align	2
_read_rootfs:                           ; @read_rootfs
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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	x8, x1
	mov	x19, x0
Lloh0:
	adrp	x23, _ROOTFS_SIZE@GOTPAGE
Lloh1:
	ldr	x23, [x23, _ROOTFS_SIZE@GOTPAGEOFF]
	ldr	w9, [x23]
Lloh2:
	adrp	x22, _ROOTFS_START@GOTPAGE
Lloh3:
	ldr	x22, [x22, _ROOTFS_START@GOTPAGEOFF]
	cmp	w9, #1
	b.lt	LBB0_3
; %bb.1:
	ldrsw	x9, [x22]
	mov	w10, #255
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	strb	w10, [x19, x9]
	add	x9, x9, #1
	ldrsw	x11, [x22]
	ldrsw	x12, [x23]
	add	x11, x12, x11
	cmp	x9, x11
	b.lt	LBB0_2
LBB0_3:
Lloh4:
	adrp	x1, l_.str@PAGE
Lloh5:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x8
	bl	_fopen
	cbz	x0, LBB0_7
; %bb.4:
	mov	x20, x0
Lloh6:
	adrp	x8, _SEEK_END@GOTPAGE
Lloh7:
	ldr	x8, [x8, _SEEK_END@GOTPAGEOFF]
Lloh8:
	ldr	w2, [x8]
	mov	w1, #0
	bl	_fseek
	mov	x0, x20
	bl	_ftell
	ldr	w8, [x23]
	cmp	w0, w8
	b.gt	LBB0_8
; %bb.5:
	mov	x21, x0
	mov	x0, x20
	bl	_rewind
	ldrsw	x8, [x22]
	add	x0, x19, x8
	mov	w1, #1
	mov	x2, x21
	mov	x3, x20
	bl	_fread
	cmp	w0, w21
	b.ne	LBB0_9
; %bb.6:
	mov	x0, x20
	bl	_fclose
	mov	x0, x19
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_7:
	bl	_read_rootfs.cold.1
LBB0_8:
Lloh9:
	adrp	x8, _stderr@GOTPAGE
Lloh10:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh11:
	ldr	w0, [x8]
Lloh12:
	adrp	x8, _app_name@GOTPAGE
Lloh13:
	ldr	x8, [x8, _app_name@GOTPAGEOFF]
Lloh14:
	ldr	x2, [x8]
Lloh15:
	adrp	x1, l_.str.1@PAGE
Lloh16:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_10
LBB0_9:
Lloh17:
	adrp	x8, _stderr@GOTPAGE
Lloh18:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh19:
	ldr	w0, [x8]
Lloh20:
	adrp	x8, _app_name@GOTPAGE
Lloh21:
	ldr	x8, [x8, _app_name@GOTPAGEOFF]
Lloh22:
	ldr	x2, [x8]
Lloh23:
	adrp	x1, l_.str.2@PAGE
Lloh24:
	add	x1, x1, l_.str.2@PAGEOFF
LBB0_10:
	bl	_fprintf
	mov	x0, x20
	bl	_fclose
	mov	w0, #-1
	bl	_exit
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.p2align	2                               ; -- Begin function read_rootfs.cold.1
_read_rootfs.cold.1:                    ; @read_rootfs.cold.1
	.cfi_startproc
; %bb.0:
	stp	x29, x30, [sp, #-16]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 16
	mov	x29, sp
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
Lloh25:
	adrp	x8, _app_name@GOTPAGE
Lloh26:
	ldr	x8, [x8, _app_name@GOTPAGEOFF]
Lloh27:
	ldr	x0, [x8]
	bl	_perror
	mov	w0, #-1
	bl	_exit
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.cfi_endproc
                                        ; -- End function
	.comm	_ROOTFS_START,4,2               ; @ROOTFS_START
	.comm	_ROOTFS_SIZE,4,2                ; @ROOTFS_SIZE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"rb"

	.comm	_app_name,8,3                   ; @app_name
	.comm	_SEEK_END,4,2                   ; @SEEK_END
	.comm	_stderr,4,2                     ; @stderr
l_.str.1:                               ; @.str.1
	.asciz	"%s: rootfs image file is too big\n"

l_.str.2:                               ; @.str.2
	.asciz	"%s: can't read rootfs image file\n"

.subsections_via_symbols
