	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function grub_ext4_find_leaf
_grub_ext4_find_leaf:                   ## @grub_ext4_find_leaf
	.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
	movl	%ecx, %r12d
	movq	%rdx, %rbx
	movq	%rsi, %r14
	movq	%rdi, %r15
	movl	12(%rdx), %edi
	callq	_grub_le_to_cpu16
	movq	_EXT4_EXT_MAGIC@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_10
## %bb.1:
	leaq	16(%rbx), %r13
	leaq	16(%r14), %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	%r14, -64(%rbp)                 ## 8-byte Spill
	movq	%r15, -56(%rbp)                 ## 8-byte Spill
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_5 Depth 2
	cmpq	$0, (%rbx)
	je	LBB0_11
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	8(%rbx), %edi
	callq	_grub_le_to_cpu16
	testl	%eax, %eax
	jle	LBB0_10
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	leaq	8(%r13), %r14
	xorl	%r15d, %r15d
	.p2align	4, 0x90
LBB0_5:                                 ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	(%r14), %edi
	callq	_grub_le_to_cpu32
	cmpl	%r12d, %eax
	jg	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=2
	incq	%r15
	movl	8(%rbx), %edi
	callq	_grub_le_to_cpu16
	cltq
	addq	$12, %r14
	cmpq	%rax, %r15
	jl	LBB0_5
LBB0_7:                                 ##   in Loop: Header=BB0_2 Depth=1
	testl	%r15d, %r15d
	je	LBB0_10
## %bb.8:                               ##   in Loop: Header=BB0_2 Depth=1
	decl	%r15d
	movslq	%r15d, %rax
	leaq	(%rax,%rax,2), %rbx
	movl	4(%r13,%rbx,4), %edi
	callq	_grub_le_to_cpu16
	movl	(%r13,%rbx,4), %edi
	callq	_grub_le_to_cpu32
	movq	-56(%rbp), %r15                 ## 8-byte Reload
	movl	(%r15), %ebx
	movq	%r15, %rdi
	callq	_LOG2_EXT2_BLOCK_SIZE
	movq	%r15, %rdi
	callq	_EXT2_BLOCK_SIZE
	movl	%ebx, %edi
	xorl	%edx, %edx
	movl	%eax, %ecx
	movq	-64(%rbp), %r14                 ## 8-byte Reload
	movq	%r14, %r8
	callq	_grub_disk_read
	testq	%rax, %rax
	jne	LBB0_10
## %bb.9:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	12(%r14), %edi
	callq	_grub_le_to_cpu16
	movq	-48(%rbp), %r13                 ## 8-byte Reload
	movq	%r14, %rbx
	movq	_EXT4_EXT_MAGIC@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	je	LBB0_2
LBB0_10:
	xorl	%ebx, %ebx
LBB0_11:
	movq	%rbx, %rax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EXT4_EXT_MAGIC,4,2             ## @EXT4_EXT_MAGIC
	.no_dead_strip	_grub_ext4_find_leaf
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function grub_ext4_find_leaf
_grub_ext4_find_leaf:                   ; @grub_ext4_find_leaf
	.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, x3
	mov	x22, x2
	mov	x20, x1
	mov	x21, x0
	ldr	w0, [x2, #12]
	bl	_grub_le_to_cpu16
Lloh0:
	adrp	x23, _EXT4_EXT_MAGIC@GOTPAGE
Lloh1:
	ldr	x23, [x23, _EXT4_EXT_MAGIC@GOTPAGEOFF]
	ldr	w8, [x23]
	cmp	w0, w8
	b.ne	LBB0_10
; %bb.1:
	add	x26, x22, #16
	add	x24, x20, #16
	mov	w25, #12
LBB0_2:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_5 Depth 2
	ldr	x8, [x22]
	cbz	x8, LBB0_11
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	w0, [x22, #8]
	bl	_grub_le_to_cpu16
	cmp	w0, #1
	b.lt	LBB0_10
; %bb.4:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	x27, #0
	add	x28, x26, #8
LBB0_5:                                 ;   Parent Loop BB0_2 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	w0, [x28]
	bl	_grub_le_to_cpu32
	cmp	w0, w19
	b.gt	LBB0_7
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=2
	add	x27, x27, #1
	ldr	w0, [x22, #8]
	bl	_grub_le_to_cpu16
	add	x28, x28, #12
	cmp	x27, w0, sxtw
	b.lt	LBB0_5
LBB0_7:                                 ;   in Loop: Header=BB0_2 Depth=1
	cbz	w27, LBB0_10
; %bb.8:                                ;   in Loop: Header=BB0_2 Depth=1
	sub	w8, w27, #1
	smaddl	x22, w8, w25, x26
	ldr	w0, [x22, #4]
	bl	_grub_le_to_cpu16
	ldr	w0, [x22]
	bl	_grub_le_to_cpu32
	ldr	w22, [x21]
	mov	x0, x21
	bl	_LOG2_EXT2_BLOCK_SIZE
	mov	x0, x21
	bl	_EXT2_BLOCK_SIZE
	mov	x3, x0
	mov	x0, x22
	mov	w2, #0
	mov	x4, x20
	bl	_grub_disk_read
	cbnz	x0, LBB0_10
; %bb.9:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	w0, [x20, #12]
	bl	_grub_le_to_cpu16
	ldr	w8, [x23]
	mov	x26, x24
	mov	x22, x20
	cmp	w0, w8
	b.eq	LBB0_2
LBB0_10:
	mov	x22, #0
LBB0_11:
	mov	x0, x22
	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
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_EXT4_EXT_MAGIC,4,2             ; @EXT4_EXT_MAGIC
	.no_dead_strip	_grub_ext4_find_leaf
.subsections_via_symbols
