	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function btrfs_read_extent_reg
_btrfs_read_extent_reg:                 ## @btrfs_read_extent_reg
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r12
	movq	(%rsi), %rdx
	movq	%rdx, %rax
	subq	%r12, %rax
	jge	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rdi
	movq	%r12, %rsi
	xorl	%eax, %eax
	callq	_ERR
	jmp	LBB0_17
LBB0_2:
	movq	%r8, %r14
	movq	%rcx, %r13
	movq	%rsi, %rbx
	cmpq	%rcx, %rax
	cmovlq	%rax, %r13
	movq	8(%rsi), %rdi
	testq	%rdi, %rdi
	jne	LBB0_5
## %bb.3:
	cmpq	$0, 16(%rbx)
	je	LBB0_4
LBB0_5:
	callq	_logical_physical
	movq	%rax, %r15
	movq	_INVALID_ADDRESS@GOTPCREL(%rip), %rax
	cmpq	(%rax), %r15
	jne	LBB0_7
## %bb.6:
	movq	8(%rbx), %rsi
	leaq	L_.str.1(%rip), %rdi
	xorl	%eax, %eax
	callq	_ERR
	jmp	LBB0_17
LBB0_7:
	movq	24(%rbx), %rax
	movq	_BTRFS_COMPRESS_NONE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_16
## %bb.8:
	addq	%r12, %r15
	addq	32(%rbx), %r15
	movq	_SECTOR_SIZE@GOTPCREL(%rip), %rbx
	movslq	(%rbx), %rdi
	leaq	-1(%rdi), %rax
	testq	%rax, %r15
	je	LBB0_14
## %bb.9:
	movq	_TAG_BTRFS_FILE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
                                        ## kill: def $edi killed $edi killed $rdi
	callq	_FrLdrTempAlloc
	movq	%rax, %r12
	movl	(%rbx), %esi
	movq	%r15, %rdi
	callq	_ALIGN_DOWN_BY
	movslq	(%rbx), %rdx
	movq	%rax, %rdi
	movq	%r12, %rsi
	callq	_disk_read
	testl	%eax, %eax
	je	LBB0_10
## %bb.11:
	movl	(%rbx), %edx
	leal	-1(%rdx), %eax
	movl	%r15d, %ecx
	andl	%eax, %ecx
	subl	%ecx, %edx
	movslq	%edx, %rax
	movslq	%ecx, %rbx
	movq	%r12, %rsi
	cmpq	%rax, %r13
	jle	LBB0_12
## %bb.13:
	addq	%rbx, %rsi
	movq	%r14, %rdi
                                        ## kill: def $edx killed $edx killed $rdx
	callq	_memcpy
	movq	_TAG_BTRFS_FILE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_FrLdrTempFree
	movq	_SECTOR_SIZE@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	subq	%rbx, %r15
	addq	%rax, %r15
	addq	%rax, %r14
	subq	%rbx, %r14
	addq	%r13, %rbx
	subq	%rax, %rbx
	movq	%r15, %rdi
	movq	%r14, %rsi
	movq	%rbx, %rdx
	jmp	LBB0_15
LBB0_16:
	leaq	L_.str.2(%rip), %rdi
	xorl	%eax, %eax
	callq	_ERR
LBB0_17:
	movq	_READ_ERROR@GOTPCREL(%rip), %rax
	movq	(%rax), %r13
LBB0_18:
	movq	%r13, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	movq	%r14, %rdi
	movq	%r13, %rsi
	callq	_RtlZeroMemory
	jmp	LBB0_18
LBB0_14:
	movq	%r15, %rdi
	movq	%r14, %rsi
	movq	%r13, %rdx
LBB0_15:
	callq	_disk_read
	testl	%eax, %eax
	jne	LBB0_18
	jmp	LBB0_17
LBB0_10:
	movq	_TAG_BTRFS_FILE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_FrLdrTempFree
	jmp	LBB0_17
LBB0_12:
	addq	%rbx, %rsi
	movq	%r14, %rdi
	movl	%r13d, %edx
	callq	_memcpy
	movq	_TAG_BTRFS_FILE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_FrLdrTempFree
	jmp	LBB0_18
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Tried to read offset (%llu) beyond extent length (%lu)\n"

	.comm	_READ_ERROR,8,3                 ## @READ_ERROR
	.comm	_INVALID_ADDRESS,8,3            ## @INVALID_ADDRESS
L_.str.1:                               ## @.str.1
	.asciz	"Unable to convert logical address to physical: %llu\n"

	.comm	_BTRFS_COMPRESS_NONE,8,3        ## @BTRFS_COMPRESS_NONE
	.comm	_SECTOR_SIZE,4,2                ## @SECTOR_SIZE
	.comm	_TAG_BTRFS_FILE,4,2             ## @TAG_BTRFS_FILE
L_.str.2:                               ## @.str.2
	.asciz	"No compression supported right now\n"

	.no_dead_strip	_btrfs_read_extent_reg
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function btrfs_read_extent_reg
_btrfs_read_extent_reg:                 ; @btrfs_read_extent_reg
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	mov	x21, x2
	ldr	x8, [x1]
	subs	x9, x8, x2
	b.ge	LBB0_2
; %bb.1:
	stp	x21, x8, [sp]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	b	LBB0_12
LBB0_2:
	mov	x20, x4
	mov	x22, x1
	cmp	x9, x3
	csel	x19, x9, x3, lt
	ldr	x0, [x1, #8]
	cbnz	x0, LBB0_4
; %bb.3:
	ldr	x8, [x22, #16]
	cbz	x8, LBB0_15
LBB0_4:
	bl	_logical_physical
Lloh2:
	adrp	x8, _INVALID_ADDRESS@GOTPAGE
Lloh3:
	ldr	x8, [x8, _INVALID_ADDRESS@GOTPAGEOFF]
Lloh4:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_6
; %bb.5:
	ldr	x8, [x22, #8]
	str	x8, [sp]
Lloh5:
	adrp	x0, l_.str.1@PAGE
Lloh6:
	add	x0, x0, l_.str.1@PAGEOFF
	b	LBB0_12
LBB0_6:
	ldr	x8, [x22, #24]
Lloh7:
	adrp	x9, _BTRFS_COMPRESS_NONE@GOTPAGE
Lloh8:
	ldr	x9, [x9, _BTRFS_COMPRESS_NONE@GOTPAGEOFF]
Lloh9:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_11
; %bb.7:
	ldr	x8, [x22, #32]
	add	x9, x0, x21
	add	x21, x9, x8
Lloh10:
	adrp	x23, _SECTOR_SIZE@GOTPAGE
Lloh11:
	ldr	x23, [x23, _SECTOR_SIZE@GOTPAGEOFF]
	ldrsw	x0, [x23]
	sub	x8, x0, #1
	tst	x21, x8
	b.eq	LBB0_16
; %bb.8:
Lloh12:
	adrp	x24, _TAG_BTRFS_FILE@GOTPAGE
Lloh13:
	ldr	x24, [x24, _TAG_BTRFS_FILE@GOTPAGEOFF]
	ldr	w1, [x24]
                                        ; kill: def $w0 killed $w0 killed $x0
	bl	_FrLdrTempAlloc
	mov	x22, x0
	ldr	w1, [x23]
	mov	x0, x21
	bl	_ALIGN_DOWN_BY
	ldrsw	x2, [x23]
	mov	x1, x22
	bl	_disk_read
	cbz	w0, LBB0_17
; %bb.9:
	ldr	w8, [x23]
	sub	w9, w8, #1
	and	w9, w9, w21
	sub	w2, w8, w9
	sxtw	x25, w9
	cmp	x19, w2, sxtw
	b.le	LBB0_18
; %bb.10:
	add	x1, x22, x25
	mov	x0, x20
	bl	_memcpy
	ldr	w1, [x24]
	mov	x0, x22
	bl	_FrLdrTempFree
	ldrsw	x8, [x23]
	sub	x9, x21, x25
	add	x0, x9, x8
	add	x9, x20, x8
	sub	x1, x9, x25
	add	x9, x19, x25
	sub	x2, x9, x8
	bl	_disk_read
Lloh14:
	adrp	x8, _READ_ERROR@GOTPAGE
Lloh15:
	ldr	x8, [x8, _READ_ERROR@GOTPAGEOFF]
Lloh16:
	ldr	x8, [x8]
	cmp	w0, #0
	csel	x19, x8, x19, eq
	b	LBB0_14
LBB0_11:
Lloh17:
	adrp	x0, l_.str.2@PAGE
Lloh18:
	add	x0, x0, l_.str.2@PAGEOFF
LBB0_12:
	bl	_ERR
LBB0_13:
Lloh19:
	adrp	x8, _READ_ERROR@GOTPAGE
Lloh20:
	ldr	x8, [x8, _READ_ERROR@GOTPAGEOFF]
Lloh21:
	ldr	x19, [x8]
LBB0_14:
	mov	x0, x19
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
LBB0_15:
	mov	x0, x20
	mov	x1, x19
	bl	_RtlZeroMemory
	b	LBB0_14
LBB0_16:
	mov	x0, x21
	mov	x1, x20
	mov	x2, x19
	bl	_disk_read
	cbnz	w0, LBB0_14
	b	LBB0_13
LBB0_17:
	ldr	w1, [x24]
	mov	x0, x22
	bl	_FrLdrTempFree
	b	LBB0_13
LBB0_18:
	add	x1, x22, x25
	mov	x0, x20
	mov	x2, x19
	bl	_memcpy
	ldr	w1, [x24]
	mov	x0, x22
	bl	_FrLdrTempFree
	b	LBB0_14
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Tried to read offset (%llu) beyond extent length (%lu)\n"

	.comm	_READ_ERROR,8,3                 ; @READ_ERROR
	.comm	_INVALID_ADDRESS,8,3            ; @INVALID_ADDRESS
l_.str.1:                               ; @.str.1
	.asciz	"Unable to convert logical address to physical: %llu\n"

	.comm	_BTRFS_COMPRESS_NONE,8,3        ; @BTRFS_COMPRESS_NONE
	.comm	_SECTOR_SIZE,4,2                ; @SECTOR_SIZE
	.comm	_TAG_BTRFS_FILE,4,2             ; @TAG_BTRFS_FILE
l_.str.2:                               ; @.str.2
	.asciz	"No compression supported right now\n"

	.no_dead_strip	_btrfs_read_extent_reg
.subsections_via_symbols
