	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sm_read
_sm_read:                               ## @sm_read
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r14
	movq	(%rdi), %r13
	shlq	$9, %rsi
	leaq	-52(%rbp), %rdx
	leaq	-48(%rbp), %rcx
	leaq	-44(%rbp), %r8
	movq	%r13, %rdi
	callq	_sm_break_offset
	leaq	8(%r13), %r15
	movq	%r15, %rdi
	callq	_mutex_lock
	movl	-52(%rbp), %esi
	movq	%r13, %rdi
	callq	_sm_get_zone
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	%rbx, %rdi
	callq	_PTR_ERR
	movl	%eax, %r12d
LBB0_11:
	movq	%r15, %rdi
	callq	_mutex_unlock
	movl	%r12d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_2:
	movl	(%r13), %eax
	movb	$1, %sil
	cmpl	-52(%rbp), %eax
	jne	LBB0_5
## %bb.3:
	movl	4(%r13), %eax
	cmpl	-48(%rbp), %eax
	jne	LBB0_5
## %bb.4:
	movl	-44(%rbp), %edx
	movq	%r13, %rdi
	movq	%r14, %rsi
	callq	_sm_cache_get
	xorl	%esi, %esi
	movl	$0, %r12d
	testl	%eax, %eax
	je	LBB0_11
LBB0_5:
	movq	(%rbx), %rax
	movslq	-48(%rbp), %rcx
	movl	(%rax,%rcx,4), %edx
	movl	%edx, -48(%rbp)
	cmpl	$-1, %edx
	je	LBB0_6
## %bb.7:
	movl	%esi, %ebx
	movl	-52(%rbp), %esi
	movl	-44(%rbp), %ecx
	xorl	%r12d, %r12d
	movq	%r13, %rdi
	movq	%r14, %r8
	xorl	%r9d, %r9d
	callq	_sm_read_sector
	testq	%rax, %rax
	je	LBB0_9
## %bb.8:
	movq	_EIO@GOTPCREL(%rip), %rax
	subl	(%rax), %r12d
	jmp	LBB0_11
LBB0_6:
	movq	_SM_SECTOR_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	movl	$255, %esi
	callq	_memset
	xorl	%r12d, %r12d
	jmp	LBB0_11
LBB0_9:
	testb	%bl, %bl
	jne	LBB0_11
## %bb.10:
	movl	-44(%rbp), %edx
	movq	%r13, %rdi
	movq	%r14, %rsi
	callq	_sm_cache_put
	jmp	LBB0_11
	.cfi_endproc
                                        ## -- End function
	.comm	_SM_SECTOR_SIZE,4,2             ## @SM_SECTOR_SIZE
	.comm	_EIO,4,2                        ## @EIO
	.no_dead_strip	_sm_read
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sm_read
_sm_read:                               ; @sm_read
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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	x20, x2
	ldr	x21, [x0]
	lsl	x1, x1, #9
	add	x2, sp, #12
	add	x3, sp, #8
	add	x4, sp, #4
	mov	x0, x21
	bl	_sm_break_offset
	add	x19, x21, #8
	mov	x0, x19
	bl	_mutex_lock
	ldr	w1, [sp, #12]
	mov	x0, x21
	bl	_sm_get_zone
	mov	x22, x0
	bl	_IS_ERR
	cbz	x0, LBB0_2
; %bb.1:
	mov	x0, x22
	bl	_PTR_ERR
	mov	x20, x0
	b	LBB0_13
LBB0_2:
	ldr	w8, [x21]
	ldr	w9, [sp, #12]
	cmp	w8, w9
	b.ne	LBB0_5
; %bb.3:
	ldr	w8, [x21, #4]
	ldr	w9, [sp, #8]
	cmp	w8, w9
	b.ne	LBB0_5
; %bb.4:
	ldr	w2, [sp, #4]
	mov	x0, x21
	mov	x1, x20
	bl	_sm_cache_get
	mov	w23, #0
	cbnz	w0, LBB0_6
	b	LBB0_12
LBB0_5:
	mov	w23, #1
LBB0_6:
	ldr	x8, [x22]
	ldrsw	x9, [sp, #8]
	ldr	w2, [x8, x9, lsl #2]
	str	w2, [sp, #8]
	cmn	w2, #1
	b.eq	LBB0_9
; %bb.7:
	ldr	w1, [sp, #12]
	ldr	w3, [sp, #4]
	mov	x0, x21
	mov	x4, x20
	mov	x5, #0
	bl	_sm_read_sector
	cbz	x0, LBB0_10
; %bb.8:
Lloh0:
	adrp	x8, _EIO@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w20, w8
	b	LBB0_13
LBB0_9:
Lloh3:
	adrp	x8, _SM_SECTOR_SIZE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _SM_SECTOR_SIZE@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
	mov	x0, x20
	mov	w1, #255
	bl	_memset
	b	LBB0_12
LBB0_10:
	tbnz	w23, #0, LBB0_12
; %bb.11:
	ldr	w2, [sp, #4]
	mov	x0, x21
	mov	x1, x20
	bl	_sm_cache_put
LBB0_12:
	mov	w20, #0
LBB0_13:
	mov	x0, x19
	bl	_mutex_unlock
	mov	x0, x20
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_SM_SECTOR_SIZE,4,2             ; @SM_SECTOR_SIZE
	.comm	_EIO,4,2                        ; @EIO
	.no_dead_strip	_sm_read
.subsections_via_symbols
