	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function grub_nilfs2_mount
_grub_nilfs2_mount:                     ## @grub_nilfs2_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	%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	%edi, %r14d
	movl	$56, %edi
	callq	_grub_malloc
	testq	%rax, %rax
	je	LBB0_7
## %bb.1:
	movq	%rax, %r13
	leaq	48(%rax), %rbx
	movl	%r14d, %edi
	movl	$2, %esi
	xorl	%edx, %edx
	movl	$4, %ecx
	movq	%rbx, %r8
	callq	_grub_disk_read
	movq	_grub_errno@GOTPCREL(%rip), %r15
	movq	(%r15), %rax
	testq	%rax, %rax
	je	LBB0_2
LBB0_4:
	movq	_GRUB_ERR_OUT_OF_RANGE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_6
## %bb.5:
	movq	_GRUB_ERR_BAD_FS@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	callq	_grub_error
LBB0_6:
	movq	%r13, %rdi
	callq	_grub_free
LBB0_7:
	xorl	%r13d, %r13d
LBB0_12:
	movq	%r13, %rax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_2:
	movq	%rbx, %rdi
	callq	_grub_nilfs2_valid_sb
	testl	%eax, %eax
	je	LBB0_3
## %bb.8:
	movq	%r13, %rdi
	callq	_LOG2_NILFS2_BLOCK_SIZE
	movl	%eax, %ebx
	movl	52(%r13), %edi
	callq	_grub_le_to_cpu64
	movl	%eax, %r12d
	movl	%eax, %esi
	movl	%ebx, %ecx
	shll	%cl, %esi
	leaq	-56(%rbp), %r8
	movl	%r14d, %edi
	xorl	%edx, %edx
	movl	$8, %ecx
	callq	_grub_disk_read
	movq	(%r15), %rax
	testq	%rax, %rax
	jne	LBB0_4
## %bb.9:
	movl	-56(%rbp), %edi
	callq	_grub_le_to_cpu32
                                        ## kill: def $eax killed $eax def $rax
	leal	(%r12,%rax), %esi
	decl	%esi
	movl	%ebx, %ecx
	shll	%cl, %esi
	leaq	40(%r13), %r8
	movl	%r14d, %edi
	xorl	%edx, %edx
	movl	$4, %ecx
	callq	_grub_disk_read
	movq	(%r15), %rax
	testq	%rax, %rax
	jne	LBB0_4
## %bb.10:
	movl	%r14d, 36(%r13)
	leaq	-48(%rbp), %rsi
	movq	%r13, %rdi
	callq	_grub_nilfs2_read_last_checkpoint
	movq	(%r15), %rax
	testq	%rax, %rax
	jne	LBB0_4
## %bb.11:
	leaq	32(%r13), %rdi
	leaq	-48(%rbp), %rsi
	movl	$4, %edx
	callq	_grub_memcpy
	movq	%r13, 24(%r13)
	movabsq	$4294967298, %rax               ## imm = 0x100000002
	movq	%rax, 8(%r13)
	movq	%r13, %rdx
	addq	$16, %rdx
	movq	%rdx, (%r13)
	movq	%r13, %rdi
	movl	$2, %esi
	callq	_grub_nilfs2_read_inode
	jmp	LBB0_12
LBB0_3:
	movq	_GRUB_ERR_BAD_FS@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	callq	_grub_error
	movq	(%r15), %rax
	jmp	LBB0_4
	.cfi_endproc
                                        ## -- End function
	.comm	_grub_errno,8,3                 ## @grub_errno
	.comm	_GRUB_ERR_BAD_FS,4,2            ## @GRUB_ERR_BAD_FS
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"not a nilfs2 filesystem"

	.comm	_GRUB_ERR_OUT_OF_RANGE,8,3      ## @GRUB_ERR_OUT_OF_RANGE
	.no_dead_strip	_grub_nilfs2_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_nilfs2_mount
lCPI0_0:
	.long	2                               ; 0x2
	.long	1                               ; 0x1
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	2
_grub_nilfs2_mount:                     ; @grub_nilfs2_mount
	.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, x0
	mov	w0, #56
	bl	_grub_malloc
	mov	x19, x0
	cbz	x0, LBB0_5
; %bb.1:
	add	x21, x19, #48
	mov	x0, x20
	mov	w1, #2
	mov	w2, #0
	mov	w3, #4
	mov	x4, x21
	bl	_grub_disk_read
Lloh0:
	adrp	x23, _grub_errno@GOTPAGE
Lloh1:
	ldr	x23, [x23, _grub_errno@GOTPAGEOFF]
	ldr	x8, [x23]
	cbz	x8, LBB0_6
LBB0_2:
Lloh2:
	adrp	x9, _GRUB_ERR_OUT_OF_RANGE@GOTPAGE
Lloh3:
	ldr	x9, [x9, _GRUB_ERR_OUT_OF_RANGE@GOTPAGEOFF]
Lloh4:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_4
; %bb.3:
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@PAGE
Lloh9:
	add	x1, x1, l_.str@PAGEOFF
	bl	_grub_error
LBB0_4:
	mov	x0, x19
	bl	_grub_free
	mov	x19, #0
LBB0_5:
	mov	x0, x19
	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
LBB0_6:
	mov	x0, x21
	bl	_grub_nilfs2_valid_sb
	cbz	w0, LBB0_11
; %bb.7:
	mov	x0, x19
	bl	_LOG2_NILFS2_BLOCK_SIZE
	mov	x21, x0
	ldr	w0, [x19, #52]
	bl	_grub_le_to_cpu64
	mov	x22, x0
	lsl	w1, w0, w21
	add	x4, sp, #8
	mov	x0, x20
	mov	w2, #0
	mov	w3, #8
	bl	_grub_disk_read
	ldr	x8, [x23]
	cbnz	x8, LBB0_2
; %bb.8:
	ldr	w0, [sp, #8]
	bl	_grub_le_to_cpu32
	add	w8, w22, w0
	sub	w8, w8, #1
	lsl	w1, w8, w21
	add	x4, x19, #40
	mov	x0, x20
	mov	w2, #0
	mov	w3, #4
	bl	_grub_disk_read
	ldr	x8, [x23]
	cbnz	x8, LBB0_2
; %bb.9:
	str	w20, [x19, #36]
	mov	x1, sp
	mov	x0, x19
	bl	_grub_nilfs2_read_last_checkpoint
	ldr	x8, [x23]
	cbnz	x8, LBB0_2
; %bb.10:
	add	x0, x19, #32
	mov	x1, sp
	mov	w2, #4
	bl	_grub_memcpy
	str	x19, [x19, #24]
Lloh10:
	adrp	x8, lCPI0_0@PAGE
Lloh11:
	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_nilfs2_read_inode
	b	LBB0_5
LBB0_11:
Lloh12:
	adrp	x8, _GRUB_ERR_BAD_FS@GOTPAGE
Lloh13:
	ldr	x8, [x8, _GRUB_ERR_BAD_FS@GOTPAGEOFF]
Lloh14:
	ldr	w0, [x8]
Lloh15:
	adrp	x1, l_.str@PAGE
Lloh16:
	add	x1, x1, l_.str@PAGEOFF
	bl	_grub_error
	ldr	x8, [x23]
	b	LBB0_2
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdr	Lloh10, Lloh11
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_grub_errno,8,3                 ; @grub_errno
	.comm	_GRUB_ERR_BAD_FS,4,2            ; @GRUB_ERR_BAD_FS
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"not a nilfs2 filesystem"

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