	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function grub_ext2_mount
_grub_ext2_mount:                       ## @grub_ext2_mount
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edi, %r14d
	movl	$48, %edi
	callq	_grub_malloc
	testq	%rax, %rax
	je	LBB0_11
## %bb.1:
	movq	%rax, %rbx
	leaq	36(%rax), %r15
	movl	%r14d, %edi
	movl	$2, %esi
	xorl	%edx, %edx
	movl	$4, %ecx
	movq	%r15, %r8
	callq	_grub_disk_read
	movq	_grub_errno@GOTPCREL(%rip), %r12
	cmpq	$0, (%r12)
	jne	LBB0_8
## %bb.2:
	movl	40(%rbx), %edi
	callq	_grub_le_to_cpu16
	movq	_EXT2_MAGIC@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_3
## %bb.5:
	movl	(%r15), %edi
	callq	_grub_le_to_cpu32
	movq	_EXT2_DRIVER_SUPPORTED_INCOMPAT@GOTPCREL(%rip), %rcx
	movq	_EXT2_DRIVER_IGNORED_INCOMPAT@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	orl	(%rcx), %edx
	notl	%edx
	testl	%edx, %eax
	je	LBB0_7
## %bb.6:
	leaq	L_.str.1(%rip), %rsi
	jmp	LBB0_4
LBB0_3:
	leaq	L_.str(%rip), %rsi
LBB0_4:
	movq	_GRUB_ERR_BAD_FS@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_grub_error
LBB0_8:
	movq	(%r12), %rax
	movq	_GRUB_ERR_OUT_OF_RANGE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_10
## %bb.9:
	movq	_GRUB_ERR_BAD_FS@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	callq	_grub_error
LBB0_10:
	movq	%rbx, %rdi
	callq	_grub_free
LBB0_11:
	xorl	%ebx, %ebx
LBB0_12:
	movq	%rbx, %rax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	movl	%r14d, 32(%rbx)
	movq	%rbx, 24(%rbx)
	movabsq	$4294967298, %rax               ## imm = 0x100000002
	movq	%rax, 8(%rbx)
	movq	%rbx, %rdx
	addq	$16, %rdx
	movq	%rdx, (%rbx)
	movq	%rbx, %rdi
	movl	$2, %esi
	callq	_grub_ext2_read_inode
	cmpq	$0, (%r12)
	jne	LBB0_8
	jmp	LBB0_12
	.cfi_endproc
                                        ## -- End function
	.comm	_grub_errno,8,3                 ## @grub_errno
	.comm	_EXT2_MAGIC,8,3                 ## @EXT2_MAGIC
	.comm	_GRUB_ERR_BAD_FS,4,2            ## @GRUB_ERR_BAD_FS
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"not an ext2 filesystem"

	.comm	_EXT2_DRIVER_SUPPORTED_INCOMPAT,4,2 ## @EXT2_DRIVER_SUPPORTED_INCOMPAT
	.comm	_EXT2_DRIVER_IGNORED_INCOMPAT,4,2 ## @EXT2_DRIVER_IGNORED_INCOMPAT
L_.str.1:                               ## @.str.1
	.asciz	"filesystem has unsupported incompatible features"

	.comm	_GRUB_ERR_OUT_OF_RANGE,8,3      ## @GRUB_ERR_OUT_OF_RANGE
	.no_dead_strip	_grub_ext2_mount
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ; -- Begin function grub_ext2_mount
lCPI0_0:
	.long	2                               ; 0x2
	.long	1                               ; 0x1
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	2
_grub_ext2_mount:                       ; @grub_ext2_mount
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x20, x0
	mov	w0, #48
	bl	_grub_malloc
	mov	x19, x0
	cbz	x0, LBB0_10
; %bb.1:
	add	x21, x19, #36
	mov	x0, x20
	mov	w1, #2
	mov	w2, #0
	mov	w3, #4
	mov	x4, x21
	bl	_grub_disk_read
Lloh0:
	adrp	x22, _grub_errno@GOTPAGE
Lloh1:
	ldr	x22, [x22, _grub_errno@GOTPAGEOFF]
	ldr	x8, [x22]
	cbnz	x8, LBB0_7
; %bb.2:
	ldr	w0, [x19, #40]
	bl	_grub_le_to_cpu16
Lloh2:
	adrp	x8, _EXT2_MAGIC@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EXT2_MAGIC@GOTPAGEOFF]
Lloh4:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_5
; %bb.3:
	ldr	w0, [x21]
	bl	_grub_le_to_cpu32
Lloh5:
	adrp	x8, _EXT2_DRIVER_SUPPORTED_INCOMPAT@GOTPAGE
Lloh6:
	ldr	x8, [x8, _EXT2_DRIVER_SUPPORTED_INCOMPAT@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
Lloh8:
	adrp	x9, _EXT2_DRIVER_IGNORED_INCOMPAT@GOTPAGE
Lloh9:
	ldr	x9, [x9, _EXT2_DRIVER_IGNORED_INCOMPAT@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
	orr	w8, w9, w8
	bics	wzr, w0, w8
	b.eq	LBB0_11
; %bb.4:
Lloh11:
	adrp	x1, l_.str.1@PAGE
Lloh12:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_6
LBB0_5:
Lloh13:
	adrp	x1, l_.str@PAGE
Lloh14:
	add	x1, x1, l_.str@PAGEOFF
LBB0_6:
Lloh15:
	adrp	x8, _GRUB_ERR_BAD_FS@GOTPAGE
Lloh16:
	ldr	x8, [x8, _GRUB_ERR_BAD_FS@GOTPAGEOFF]
Lloh17:
	ldr	w0, [x8]
	bl	_grub_error
LBB0_7:
	ldr	x8, [x22]
Lloh18:
	adrp	x9, _GRUB_ERR_OUT_OF_RANGE@GOTPAGE
Lloh19:
	ldr	x9, [x9, _GRUB_ERR_OUT_OF_RANGE@GOTPAGEOFF]
Lloh20:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_9
; %bb.8:
Lloh21:
	adrp	x8, _GRUB_ERR_BAD_FS@GOTPAGE
Lloh22:
	ldr	x8, [x8, _GRUB_ERR_BAD_FS@GOTPAGEOFF]
Lloh23:
	ldr	w0, [x8]
Lloh24:
	adrp	x1, l_.str@PAGE
Lloh25:
	add	x1, x1, l_.str@PAGEOFF
	bl	_grub_error
LBB0_9:
	mov	x0, x19
	bl	_grub_free
	mov	x19, #0
LBB0_10:
	mov	x0, x19
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_11:
	str	w20, [x19, #32]
	str	x19, [x19, #24]
Lloh26:
	adrp	x8, lCPI0_0@PAGE
Lloh27:
	ldr	d0, [x8, lCPI0_0@PAGEOFF]
	str	d0, [x19, #8]
	add	x2, x19, #16
	str	x2, [x19]
	mov	x0, x19
	mov	w1, #2
	bl	_grub_ext2_read_inode
	ldr	x8, [x22]
	cbnz	x8, LBB0_7
	b	LBB0_10
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdr	Lloh26, Lloh27
	.cfi_endproc
                                        ; -- End function
	.comm	_grub_errno,8,3                 ; @grub_errno
	.comm	_EXT2_MAGIC,8,3                 ; @EXT2_MAGIC
	.comm	_GRUB_ERR_BAD_FS,4,2            ; @GRUB_ERR_BAD_FS
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"not an ext2 filesystem"

	.comm	_EXT2_DRIVER_SUPPORTED_INCOMPAT,4,2 ; @EXT2_DRIVER_SUPPORTED_INCOMPAT
	.comm	_EXT2_DRIVER_IGNORED_INCOMPAT,4,2 ; @EXT2_DRIVER_IGNORED_INCOMPAT
l_.str.1:                               ; @.str.1
	.asciz	"filesystem has unsupported incompatible features"

	.comm	_GRUB_ERR_OUT_OF_RANGE,8,3      ; @GRUB_ERR_OUT_OF_RANGE
	.no_dead_strip	_grub_ext2_mount
.subsections_via_symbols
