	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tplink_check_rootfs_magic
_tplink_check_rootfs_magic:             ## @tplink_check_rootfs_magic
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	subq	$16, %rsp
	leaq	-16(%rbp), %rcx
	leaq	-4(%rbp), %r8
	movl	$4, %edx
	callq	_mtd_read
	testl	%eax, %eax
	jne	LBB0_7
## %bb.1:
	cmpq	$4, -16(%rbp)
	jne	LBB0_2
## %bb.3:
	movl	-4(%rbp), %edi
	callq	_le32_to_cpu
	movq	%rax, %rcx
	movq	_SQUASHFS_MAGIC@GOTPCREL(%rip), %rdx
	xorl	%eax, %eax
	cmpq	(%rdx), %rcx
	je	LBB0_7
## %bb.4:
	cmpl	$428154883, -4(%rbp)            ## imm = 0x19852003
	je	LBB0_7
## %bb.5:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	jmp	LBB0_6
LBB0_2:
	movq	_EIO@GOTPCREL(%rip), %rcx
LBB0_6:
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_7:
	addq	$16, %rsp
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EIO,4,2                        ## @EIO
	.comm	_SQUASHFS_MAGIC,8,3             ## @SQUASHFS_MAGIC
	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_tplink_check_rootfs_magic
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tplink_check_rootfs_magic
_tplink_check_rootfs_magic:             ; @tplink_check_rootfs_magic
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #32
	.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
	mov	x3, sp
	sub	x4, x29, #4
	mov	w2, #4
	bl	_mtd_read
	cbnz	w0, LBB0_7
; %bb.1:
	ldr	x8, [sp]
	cmp	x8, #4
	b.ne	LBB0_4
; %bb.2:
	ldur	w0, [x29, #-4]
	bl	_le32_to_cpu
Lloh0:
	adrp	x8, _SQUASHFS_MAGIC@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SQUASHFS_MAGIC@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	ldur	w9, [x29, #-4]
	cmp	x0, x8
	mov	w8, #8195
	movk	w8, #6533, lsl #16
	ccmp	w9, w8, #4, ne
	b.ne	LBB0_5
; %bb.3:
	mov	w0, #0
	b	LBB0_7
LBB0_4:
Lloh3:
	adrp	x8, _EIO@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
	b	LBB0_6
LBB0_5:
Lloh5:
	adrp	x8, _EINVAL@GOTPAGE
Lloh6:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_6:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_7:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #32
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_EIO,4,2                        ; @EIO
	.comm	_SQUASHFS_MAGIC,8,3             ; @SQUASHFS_MAGIC
	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_tplink_check_rootfs_magic
.subsections_via_symbols
