	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function grub_ext2_read_block
_grub_ext2_read_block:                  ## @grub_ext2_read_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	%esi, %r12d
	movq	%rdi, %r15
	movq	24(%rdi), %r13
	movq	%r13, %rdi
	callq	_EXT2_BLOCK_SIZE
	movl	%eax, %r14d
	movq	%r13, %rdi
	callq	_LOG2_EXT2_BLOCK_SIZE
	movl	%eax, %ebx
	movsbl	(%r15), %edi
	callq	_grub_le_to_cpu32
	movq	_EXT4_EXTENTS_FLAG@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_13
## %bb.1:
	movq	%r13, %rdi
	callq	_EXT2_BLOCK_SIZE
	movl	%eax, %edi
	callq	_grub_malloc
	movl	$-1, %r14d
	testq	%rax, %rax
	je	LBB0_26
## %bb.2:
	movq	8(%r15), %rdx
	movq	%r13, %rdi
	movq	%rax, %rsi
	movl	%r12d, %ecx
	movq	%rax, %r15
	callq	_grub_ext4_find_leaf
	testq	%rax, %rax
	je	LBB0_3
## %bb.4:
	movq	%rax, %rbx
	movq	%r15, -48(%rbp)                 ## 8-byte Spill
	movl	(%rax), %edi
	callq	_grub_le_to_cpu16
	testl	%eax, %eax
	jle	LBB0_12
## %bb.5:
	movq	%rbx, %r15
	addq	$4, %r15
	xorl	%r13d, %r13d
	movq	%r15, -56(%rbp)                 ## 8-byte Spill
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movsbl	(%r15), %edi
	callq	_grub_le_to_cpu32
	cmpl	%r12d, %eax
	jg	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=1
	incq	%r13
	movl	(%rbx), %edi
	callq	_grub_le_to_cpu16
	cltq
	addq	$12, %r15
	cmpq	%rax, %r13
	jl	LBB0_6
LBB0_8:
	testl	%r13d, %r13d
	movl	$-1, %r14d
	je	LBB0_12
## %bb.9:
	decl	%r13d
	movslq	%r13d, %rax
	leaq	(%rax,%rax,2), %r14
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	movsbl	(%rbx,%r14,4), %edi
	callq	_grub_le_to_cpu32
	subl	%eax, %r12d
	movl	8(%rbx,%r14,4), %edi
	callq	_grub_le_to_cpu16
	cmpl	%eax, %r12d
	jge	LBB0_10
## %bb.11:
	movl	4(%rbx,%r14,4), %edi
	callq	_grub_le_to_cpu16
	movsbl	1(%rbx,%r14,4), %edi
	callq	_grub_le_to_cpu32
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_grub_free
                                        ## implicit-def: $r14d
	jmp	LBB0_26
LBB0_13:
	movl	%ebx, -48(%rbp)                 ## 4-byte Spill
	movq	_INDIRECT_BLOCKS@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	cmpl	%r12d, %ebx
	jle	LBB0_14
## %bb.27:
	movq	8(%r15), %rax
	movslq	%r12d, %rcx
	movsbl	(%rax,%rcx), %edi
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_grub_le_to_cpu32               ## TAILCALL
LBB0_14:
	movl	%r14d, %ecx
	shrl	$2, %ecx
	addl	%ecx, %ebx
	cmpl	%r12d, %ebx
	jbe	LBB0_19
## %bb.15:
	movl	%r14d, %edi
	callq	_grub_malloc
	testq	%rax, %rax
	je	LBB0_16
## %bb.17:
	movq	%rax, %rbx
	movl	(%r13), %r13d
	movsbl	16(%r15), %edi
	callq	_grub_le_to_cpu32
	movl	-48(%rbp), %ecx                 ## 4-byte Reload
                                        ## kill: def $cl killed $cl killed $ecx
	shll	%cl, %eax
	movl	%r13d, %edi
	movl	%eax, %esi
	xorl	%edx, %edx
	movl	%r14d, %ecx
	movq	%rbx, %r8
	callq	_grub_disk_read
	testq	%rax, %rax
	jne	LBB0_16
## %bb.18:
	movq	_INDIRECT_BLOCKS@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	movslq	%r12d, %rcx
	subq	%rax, %rcx
	movsbl	(%rbx,%rcx), %edi
LBB0_24:
	callq	_grub_le_to_cpu32
	movl	%eax, %r14d
	movq	%rbx, %rdi
	callq	_grub_free
	jmp	LBB0_26
LBB0_12:
	movq	_GRUB_ERR_BAD_FS@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.1(%rip), %rsi
	callq	_grub_error
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_grub_free
	jmp	LBB0_26
LBB0_3:
	movq	_GRUB_ERR_BAD_FS@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	callq	_grub_error
	movq	%r15, %rdi
	callq	_grub_free
	jmp	LBB0_26
LBB0_19:
	leal	1(%rcx), %eax
	imull	%ebx, %eax
	cmpl	%r12d, %eax
	jle	LBB0_25
## %bb.20:
	movq	%rcx, -72(%rbp)                 ## 8-byte Spill
	movl	%r14d, -56(%rbp)                ## 4-byte Spill
	movl	%r14d, %edi
	callq	_grub_malloc
	testq	%rax, %rax
	je	LBB0_16
## %bb.21:
	movq	%rax, %r14
	movl	(%r13), %eax
	movl	%eax, -60(%rbp)                 ## 4-byte Spill
	movsbl	17(%r15), %edi
	callq	_grub_le_to_cpu32
	movl	-48(%rbp), %r15d                ## 4-byte Reload
	movl	%r15d, %ecx
	shll	%cl, %eax
	movl	-60(%rbp), %edi                 ## 4-byte Reload
	movl	%eax, %esi
	xorl	%edx, %edx
	movl	-56(%rbp), %ecx                 ## 4-byte Reload
	movq	%r14, %r8
	callq	_grub_disk_read
	testq	%rax, %rax
	jne	LBB0_16
## %bb.22:
	subl	%ebx, %r12d
	movq	%r14, %rbx
	movl	(%r13), %r14d
	movl	%r12d, %eax
	xorl	%edx, %edx
	divl	-72(%rbp)                       ## 4-byte Folded Reload
	movl	%edx, %r12d
                                        ## kill: def $eax killed $eax def $rax
	movsbl	(%rbx,%rax), %edi
	callq	_grub_le_to_cpu32
	movl	%r15d, %ecx
	shll	%cl, %eax
	movl	%r14d, %edi
	movl	%eax, %esi
	xorl	%edx, %edx
	movl	-56(%rbp), %ecx                 ## 4-byte Reload
	movq	%rbx, %r8
	callq	_grub_disk_read
	testq	%rax, %rax
	je	LBB0_23
LBB0_16:
	movq	_grub_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	jmp	LBB0_26
LBB0_10:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_grub_free
	xorl	%r14d, %r14d
	jmp	LBB0_26
LBB0_25:
	movq	_GRUB_ERR_NOT_IMPLEMENTED_YET@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.2(%rip), %rsi
	callq	_grub_error
	movl	$-1, %r14d
LBB0_26:
	movl	%r14d, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_23:
	movl	%r12d, %eax
	movsbl	(%rbx,%rax), %edi
	jmp	LBB0_24
	.cfi_endproc
                                        ## -- End function
	.comm	_EXT4_EXTENTS_FLAG,4,2          ## @EXT4_EXTENTS_FLAG
	.comm	_GRUB_ERR_BAD_FS,4,2            ## @GRUB_ERR_BAD_FS
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"invalid extent"

L_.str.1:                               ## @.str.1
	.asciz	"something wrong with extent"

	.comm	_INDIRECT_BLOCKS,4,2            ## @INDIRECT_BLOCKS
	.comm	_grub_errno,4,2                 ## @grub_errno
	.comm	_GRUB_ERR_NOT_IMPLEMENTED_YET,4,2 ## @GRUB_ERR_NOT_IMPLEMENTED_YET
L_.str.2:                               ## @.str.2
	.asciz	"ext2fs doesn't support triple indirect blocks"

	.no_dead_strip	_grub_ext2_read_block
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function grub_ext2_read_block
_grub_ext2_read_block:                  ; @grub_ext2_read_block
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x1
	mov	x23, x0
	ldr	x21, [x0, #24]
	mov	x0, x21
	bl	_EXT2_BLOCK_SIZE
	mov	x20, x0
	mov	x0, x21
	bl	_LOG2_EXT2_BLOCK_SIZE
	mov	x22, x0
	ldrsb	w0, [x23]
	bl	_grub_le_to_cpu32
Lloh0:
	adrp	x8, _EXT4_EXTENTS_FLAG@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EXT4_EXTENTS_FLAG@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	tst	w8, w0
	b.eq	LBB0_10
; %bb.1:
	mov	x0, x21
	bl	_EXT2_BLOCK_SIZE
	bl	_grub_malloc
	cbz	x0, LBB0_20
; %bb.2:
	mov	x20, x0
	ldr	x2, [x23, #8]
	mov	x0, x21
	mov	x1, x20
	mov	x3, x19
	bl	_grub_ext4_find_leaf
	cbz	x0, LBB0_18
; %bb.3:
	mov	x21, x0
	mov	x22, x0
	ldr	w0, [x22], #4
	bl	_grub_le_to_cpu16
	cmp	w0, #1
	b.lt	LBB0_17
; %bb.4:
	mov	x23, #0
	mov	x24, x22
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldrsb	w0, [x24]
	bl	_grub_le_to_cpu32
	cmp	w0, w19
	b.gt	LBB0_7
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	add	x23, x23, #1
	ldr	w0, [x21]
	bl	_grub_le_to_cpu16
	add	x24, x24, #12
	cmp	x23, w0, sxtw
	b.lt	LBB0_5
LBB0_7:
	cbz	w23, LBB0_17
; %bb.8:
	sub	w21, w23, #1
	mov	w8, #12
	smaddl	x23, w21, w8, x22
	ldrsb	w0, [x23]
	bl	_grub_le_to_cpu32
	sub	w19, w19, w0
	ldr	w0, [x23, #8]
	bl	_grub_le_to_cpu16
	cmp	w19, w0
	b.ge	LBB0_27
; %bb.9:
	sxtw	x8, w21
	mov	w9, #12
	madd	x19, x8, x9, x22
	ldr	w0, [x19, #4]
	bl	_grub_le_to_cpu16
	ldrsb	w0, [x19, #1]
	bl	_grub_le_to_cpu32
	mov	x0, x20
	bl	_grub_free
                                        ; implicit-def: $w0
	b	LBB0_21
LBB0_10:
Lloh3:
	adrp	x25, _INDIRECT_BLOCKS@GOTPAGE
Lloh4:
	ldr	x25, [x25, _INDIRECT_BLOCKS@GOTPAGEOFF]
	ldr	w8, [x25]
	cmp	w8, w19
	b.le	LBB0_12
; %bb.11:
	ldr	x8, [x23, #8]
	ldrsb	w0, [x8, w19, sxtw]
	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
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	b	_grub_le_to_cpu32
LBB0_12:
	lsr	w26, w20, #2
	add	w27, w8, w26
	cmp	w27, w19
	b.ls	LBB0_22
; %bb.13:
	mov	x0, x20
	bl	_grub_malloc
	cbz	x0, LBB0_26
; %bb.14:
	mov	x24, x0
	ldr	w21, [x21]
	ldrsb	w0, [x23, #16]
	bl	_grub_le_to_cpu32
	lsl	w1, w0, w22
	mov	x0, x21
	mov	w2, #0
	mov	x3, x20
	mov	x4, x24
	bl	_grub_disk_read
	cbnz	x0, LBB0_26
; %bb.15:
	ldrsw	x8, [x25]
	sxtw	x9, w19
	sub	x8, x9, x8
	ldrsb	w0, [x24, x8]
LBB0_16:
	bl	_grub_le_to_cpu32
	mov	x19, x0
	mov	x0, x24
	bl	_grub_free
	mov	x0, x19
	b	LBB0_21
LBB0_17:
Lloh5:
	adrp	x8, _GRUB_ERR_BAD_FS@GOTPAGE
Lloh6:
	ldr	x8, [x8, _GRUB_ERR_BAD_FS@GOTPAGEOFF]
Lloh7:
	ldr	w0, [x8]
Lloh8:
	adrp	x1, l_.str.1@PAGE
Lloh9:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_19
LBB0_18:
Lloh10:
	adrp	x8, _GRUB_ERR_BAD_FS@GOTPAGE
Lloh11:
	ldr	x8, [x8, _GRUB_ERR_BAD_FS@GOTPAGEOFF]
Lloh12:
	ldr	w0, [x8]
Lloh13:
	adrp	x1, l_.str@PAGE
Lloh14:
	add	x1, x1, l_.str@PAGEOFF
LBB0_19:
	bl	_grub_error
	mov	x0, x20
	bl	_grub_free
LBB0_20:
	mov	w0, #-1
LBB0_21:
	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
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
LBB0_22:
	madd	w8, w27, w26, w27
	cmp	w8, w19
	b.le	LBB0_28
; %bb.23:
	mov	x0, x20
	bl	_grub_malloc
	cbz	x0, LBB0_26
; %bb.24:
	mov	x24, x0
	ldr	w25, [x21]
	ldrsb	w0, [x23, #17]
	bl	_grub_le_to_cpu32
	lsl	w1, w0, w22
	mov	x0, x25
	mov	w2, #0
	mov	x3, x20
	mov	x4, x24
	bl	_grub_disk_read
	cbnz	x0, LBB0_26
; %bb.25:
	sub	w23, w19, w27
	ldr	w19, [x21]
	udiv	w21, w23, w26
	ldrsb	w0, [x24, w21, uxtw]
	bl	_grub_le_to_cpu32
	lsl	w1, w0, w22
	mov	x0, x19
	mov	w2, #0
	mov	x3, x20
	mov	x4, x24
	bl	_grub_disk_read
	cbz	x0, LBB0_29
LBB0_26:
Lloh15:
	adrp	x8, _grub_errno@GOTPAGE
Lloh16:
	ldr	x8, [x8, _grub_errno@GOTPAGEOFF]
Lloh17:
	ldr	w0, [x8]
	b	LBB0_21
LBB0_27:
	mov	x0, x20
	bl	_grub_free
	mov	w0, #0
	b	LBB0_21
LBB0_28:
Lloh18:
	adrp	x8, _GRUB_ERR_NOT_IMPLEMENTED_YET@GOTPAGE
Lloh19:
	ldr	x8, [x8, _GRUB_ERR_NOT_IMPLEMENTED_YET@GOTPAGEOFF]
Lloh20:
	ldr	w0, [x8]
Lloh21:
	adrp	x1, l_.str.2@PAGE
Lloh22:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_grub_error
	b	LBB0_20
LBB0_29:
	msub	w8, w21, w26, w23
	ldrsb	w0, [x24, w8, uxtw]
	b	LBB0_16
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_EXT4_EXTENTS_FLAG,4,2          ; @EXT4_EXTENTS_FLAG
	.comm	_GRUB_ERR_BAD_FS,4,2            ; @GRUB_ERR_BAD_FS
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"invalid extent"

l_.str.1:                               ; @.str.1
	.asciz	"something wrong with extent"

	.comm	_INDIRECT_BLOCKS,4,2            ; @INDIRECT_BLOCKS
	.comm	_grub_errno,4,2                 ; @grub_errno
	.comm	_GRUB_ERR_NOT_IMPLEMENTED_YET,4,2 ; @GRUB_ERR_NOT_IMPLEMENTED_YET
l_.str.2:                               ; @.str.2
	.asciz	"ext2fs doesn't support triple indirect blocks"

	.no_dead_strip	_grub_ext2_read_block
.subsections_via_symbols
