	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sm_check_block
_sm_check_block:                        ## @sm_check_block
	.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	%r13
	pushq	%r12
	pushq	%rbx
	subq	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, -68(%rbp)                 ## 4-byte Spill
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movaps	L___const.sm_check_block.lbas(%rip), %xmm0
	movaps	%xmm0, -64(%rbp)
	cmpl	$0, (%rdi)
	jle	LBB0_1
## %bb.2:
	movl	%esi, %r15d
	movq	%rdi, %r13
	xorl	%r14d, %r14d
	leaq	-72(%rbp), %r12
	xorl	%ebx, %ebx
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_3 Depth=1
	movq	_SM_SECTOR_SIZE@GOTPCREL(%rip), %rax
	addl	(%rax), %ebx
	cmpl	(%r13), %ebx
	jge	LBB0_9
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r13, %rdi
	movl	%r15d, %esi
	movl	-68(%rbp), %edx                 ## 4-byte Reload
	movl	%ebx, %ecx
	xorl	%r8d, %r8d
	movq	%r12, %r9
	callq	_sm_read_sector
	testq	%rax, %rax
	jne	LBB0_4
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	%r12, %rdi
	callq	_sm_read_lba
	movslq	%r14d, %rcx
	cmpl	%eax, -64(%rbp,%rcx,4)
	je	LBB0_8
## %bb.6:                               ##   in Loop: Header=BB0_3 Depth=1
	leal	1(%rcx), %r14d
	movl	%eax, -60(%rbp,%rcx,4)
	cmpl	$3, %r14d
	jne	LBB0_8
## %bb.7:
	movq	_EIO@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_11
LBB0_1:
	xorl	%ebx, %ebx
	jmp	LBB0_11
LBB0_4:
	movl	$-2, %ebx
	jmp	LBB0_11
LBB0_9:
	xorl	%ebx, %ebx
	cmpl	$2, %r14d
	jne	LBB0_11
## %bb.10:
	movl	$1, %ebx
	movq	%r13, %rdi
	movl	%r15d, %esi
	movl	-68(%rbp), %edx                 ## 4-byte Reload
	movl	$1, %ecx
	callq	_sm_erase_block
LBB0_11:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_13
## %bb.12:
	movl	%ebx, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_13:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ## @__const.sm_check_block.lbas
L___const.sm_check_block.lbas:
	.long	4294967293                      ## 0xfffffffd
	.long	0                               ## 0x0
	.long	0                               ## 0x0
	.long	0                               ## 0x0

	.comm	_EIO,4,2                        ## @EIO
	.comm	_SM_SECTOR_SIZE,8,3             ## @SM_SECTOR_SIZE
	.no_dead_strip	_sm_check_block
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sm_check_block
_sm_check_block:                        ; @sm_check_block
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #40]
Lloh3:
	adrp	x8, l___const.sm_check_block.lbas@PAGE
Lloh4:
	add	x8, x8, l___const.sm_check_block.lbas@PAGEOFF
Lloh5:
	ldr	q0, [x8]
	str	q0, [sp, #16]
	ldr	w8, [x0]
	cmp	w8, #1
	b.lt	LBB0_10
; %bb.1:
	mov	x19, x2
	mov	x20, x1
	mov	x21, x0
	mov	w24, #0
	mov	w22, #0
	add	x23, sp, #16
Lloh6:
	adrp	x25, _SM_SECTOR_SIZE@GOTPAGE
Lloh7:
	ldr	x25, [x25, _SM_SECTOR_SIZE@GOTPAGEOFF]
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	ldr	w8, [x25]
	ldr	w9, [x21]
	add	w22, w22, w8
	cmp	w22, w9
	b.ge	LBB0_8
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	add	x5, sp, #8
	mov	x0, x21
	mov	x1, x20
	mov	x2, x19
	mov	x3, x22
	mov	x4, #0
	bl	_sm_read_sector
	cbnz	x0, LBB0_7
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	add	x0, sp, #8
	bl	_sm_read_lba
	ldr	w8, [x23, w24, sxtw #2]
	cmp	w8, w0
	b.eq	LBB0_2
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	sxtw	x8, w24
	add	x8, x8, #1
	str	w0, [x23, x8, lsl #2]
	mov	x24, x8
	cmp	w8, #3
	b.ne	LBB0_2
; %bb.6:
Lloh8:
	adrp	x8, _EIO@GOTPAGE
Lloh9:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	neg	w22, w8
	b	LBB0_11
LBB0_7:
	mov	w22, #-2
	b	LBB0_11
LBB0_8:
	cmp	w24, #2
	b.ne	LBB0_10
; %bb.9:
	mov	w22, #1
	mov	x0, x21
	mov	x1, x20
	mov	x2, x19
	mov	w3, #1
	bl	_sm_erase_block
	b	LBB0_11
LBB0_10:
	mov	w22, #0
LBB0_11:
	ldr	x8, [sp, #40]
Lloh11:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh12:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh13:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_13
; %bb.12:
	mov	x0, x22
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
LBB0_13:
	bl	___stack_chk_fail
	.loh AdrpAddLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__literal16,16byte_literals
	.p2align	2                               ; @__const.sm_check_block.lbas
l___const.sm_check_block.lbas:
	.long	4294967293                      ; 0xfffffffd
	.long	0                               ; 0x0
	.long	0                               ; 0x0
	.long	0                               ; 0x0

	.comm	_EIO,4,2                        ; @EIO
	.comm	_SM_SECTOR_SIZE,8,3             ; @SM_SECTOR_SIZE
	.no_dead_strip	_sm_check_block
.subsections_via_symbols
