	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mtd_get_squashfs_len           ## -- Begin function mtd_get_squashfs_len
	.p2align	4, 0x90
_mtd_get_squashfs_len:                  ## @mtd_get_squashfs_len
	.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	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r14
	movq	%rsi, %r15
	movq	%rdi, %rbx
	leaq	-32(%rbp), %rcx
	leaq	-40(%rbp), %r8
	movl	$8, %edx
	callq	_mtd_read
	testl	%eax, %eax
	jne	LBB0_2
## %bb.1:
	cmpq	$8, -32(%rbp)
	jne	LBB0_2
## %bb.3:
	movl	-36(%rbp), %edi
	callq	_le32_to_cpu
	movq	_SQUASHFS_MAGIC@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_4
## %bb.7:
	movl	-40(%rbp), %edi
	callq	_le64_to_cpu
	movq	%rax, -32(%rbp)
	testq	%rax, %rax
	je	LBB0_8
## %bb.9:
	addq	%rax, %r15
	cmpq	(%rbx), %r15
	jbe	LBB0_11
## %bb.10:
	movl	8(%rbx), %esi
	leaq	L_.str.3(%rip), %rdi
	jmp	LBB0_5
LBB0_2:
	movl	8(%rbx), %esi
	leaq	L_.str(%rip), %rdi
	callq	_pr_alert
	movq	_EIO@GOTPCREL(%rip), %rcx
	jmp	LBB0_6
LBB0_4:
	movl	8(%rbx), %esi
	leaq	L_.str.1(%rip), %rdi
LBB0_5:
	callq	_pr_alert
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	jmp	LBB0_6
LBB0_8:
	movl	8(%rbx), %esi
	leaq	L_.str.2(%rip), %rdi
	callq	_pr_alert
	movq	_ENODEV@GOTPCREL(%rip), %rcx
LBB0_6:
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_12:
	addq	$24, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_11:
	movq	%rax, (%r14)
	xorl	%eax, %eax
	jmp	LBB0_12
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"error occured while reading from \"%s\"\n"

	.comm	_EIO,4,2                        ## @EIO
	.comm	_SQUASHFS_MAGIC,8,3             ## @SQUASHFS_MAGIC
L_.str.1:                               ## @.str.1
	.asciz	"no squashfs found in \"%s\"\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
L_.str.2:                               ## @.str.2
	.asciz	"squashfs is empty in \"%s\"\n"

	.comm	_ENODEV,4,2                     ## @ENODEV
L_.str.3:                               ## @.str.3
	.asciz	"squashfs has invalid size in \"%s\"\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mtd_get_squashfs_len           ; -- Begin function mtd_get_squashfs_len
	.p2align	2
_mtd_get_squashfs_len:                  ; @mtd_get_squashfs_len
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x20, x2
	mov	x21, x1
	mov	x19, x0
	mov	x3, sp
	add	x4, sp, #8
	mov	w2, #8
	bl	_mtd_read
	cbnz	w0, LBB0_6
; %bb.1:
	ldr	x8, [sp]
	cmp	x8, #8
	b.ne	LBB0_6
; %bb.2:
	ldr	w0, [sp, #12]
	bl	_le32_to_cpu
Lloh0:
	adrp	x8, _SQUASHFS_MAGIC@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SQUASHFS_MAGIC@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_7
; %bb.3:
	ldr	w0, [sp, #8]
	bl	_le64_to_cpu
	str	x0, [sp]
	cbz	x0, LBB0_9
; %bb.4:
	mov	x8, x0
	ldr	x9, [x19]
	add	x10, x0, x21
	cmp	x10, x9
	b.ls	LBB0_12
; %bb.5:
	ldr	w1, [x19, #8]
Lloh3:
	adrp	x0, l_.str.3@PAGE
Lloh4:
	add	x0, x0, l_.str.3@PAGEOFF
	b	LBB0_8
LBB0_6:
	ldr	w1, [x19, #8]
Lloh5:
	adrp	x0, l_.str@PAGE
Lloh6:
	add	x0, x0, l_.str@PAGEOFF
	bl	_pr_alert
Lloh7:
	adrp	x8, _EIO@GOTPAGE
Lloh8:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
	b	LBB0_10
LBB0_7:
	ldr	w1, [x19, #8]
Lloh9:
	adrp	x0, l_.str.1@PAGE
Lloh10:
	add	x0, x0, l_.str.1@PAGEOFF
LBB0_8:
	bl	_pr_alert
Lloh11:
	adrp	x8, _EINVAL@GOTPAGE
Lloh12:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_10
LBB0_9:
	ldr	w1, [x19, #8]
Lloh13:
	adrp	x0, l_.str.2@PAGE
Lloh14:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_pr_alert
Lloh15:
	adrp	x8, _ENODEV@GOTPAGE
Lloh16:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
LBB0_10:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_11:
	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
	add	sp, sp, #64
	ret
LBB0_12:
	mov	w0, #0
	str	x8, [x20]
	b	LBB0_11
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpAdd	Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"error occured while reading from \"%s\"\n"

	.comm	_EIO,4,2                        ; @EIO
	.comm	_SQUASHFS_MAGIC,8,3             ; @SQUASHFS_MAGIC
l_.str.1:                               ; @.str.1
	.asciz	"no squashfs found in \"%s\"\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
l_.str.2:                               ; @.str.2
	.asciz	"squashfs is empty in \"%s\"\n"

	.comm	_ENODEV,4,2                     ; @ENODEV
l_.str.3:                               ; @.str.3
	.asciz	"squashfs has invalid size in \"%s\"\n"

.subsections_via_symbols
