	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function grub_fbfs_mount
_grub_fbfs_mount:                       ## @grub_fbfs_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	$536, %rsp                      ## imm = 0x218
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edi, %r14d
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	xorl	%ebx, %ebx
	leaq	-560(%rbp), %r8
	xorl	%esi, %esi
	xorl	%edx, %edx
	movl	$512, %ecx                      ## imm = 0x200
	callq	_grub_disk_read
	testq	%rax, %rax
	je	LBB0_1
LBB0_15:
	movq	_GRUB_ERR_BAD_FS@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	callq	_grub_error
	xorl	%r13d, %r13d
LBB0_16:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_18
## %bb.17:
	movq	%r13, %rax
	addq	$536, %rsp                      ## imm = 0x218
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	movq	-560(%rbp), %rax
	movq	_FB_AR_MAGIC_LONG@GOTPCREL(%rip), %rcx
	movl	$1, %esi
	movl	$0, %edx
	movl	$0, %r12d
	cmpq	(%rcx), %rax
	jne	LBB0_2
LBB0_6:
	movq	-552(%rbp), %rax
	movq	_FB_VER_MAJOR@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_15
## %bb.7:
	movq	-544(%rbp), %rax
	movq	_FB_VER_MINOR@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_15
## %bb.8:
	movl	-536(%rbp), %r15d
	movl	%r15d, %eax
	shll	$9, %eax
	movq	%rax, -576(%rbp)                ## 8-byte Spill
	leal	16(%rax), %edi
	movl	%edx, -568(%rbp)                ## 4-byte Spill
	movl	%esi, %r13d
	callq	_grub_malloc
	testq	%rax, %rax
	je	LBB0_15
## %bb.9:
	movl	%r13d, %ecx
	movq	%rax, %r13
	movl	%r12d, %eax
	movq	(%r13), %r12
	movl	%eax, -564(%rbp)                ## 4-byte Spill
	subl	%eax, %ebx
	addl	%ecx, %ebx
	movl	%r14d, %edi
	movl	%ebx, %esi
	xorl	%edx, %edx
	movq	-576(%rbp), %rcx                ## 8-byte Reload
                                        ## kill: def $ecx killed $ecx killed $rcx
	movq	%r12, %r8
	callq	_grub_disk_read
	testq	%rax, %rax
	je	LBB0_10
## %bb.14:
	movq	%r13, %rdi
	callq	_grub_free
	jmp	LBB0_15
LBB0_2:
	movq	_FB_MAGIC_LONG@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_15
## %bb.3:
	cmpl	$43605, -552(%rbp)              ## imm = 0xAA55
	jne	LBB0_15
## %bb.4:
	movl	-548(%rbp), %r12d
	movl	-544(%rbp), %ebx
	incl	%ebx
	movl	%ebx, %esi
	subl	%r12d, %esi
	leaq	-560(%rbp), %r8
	movl	%r14d, %edi
	xorl	%edx, %edx
	movl	$512, %ecx                      ## imm = 0x200
	callq	_grub_disk_read
	testq	%rax, %rax
	jne	LBB0_15
## %bb.5:
	movl	%ebx, %esi
	movl	-560(%rbp), %ebx
	movl	-556(%rbp), %edx
	jmp	LBB0_6
LBB0_10:
	movl	-564(%rbp), %r14d               ## 4-byte Reload
	cmpl	$2, %r15d
	jl	LBB0_13
## %bb.11:
	leaq	512(%r12), %rbx
	addq	$510, %r12                      ## imm = 0x1FE
	decl	%r15d
	.p2align	4, 0x90
LBB0_12:                                ## =>This Inner Loop Header: Depth=1
	movq	%r12, %rdi
	movq	%rbx, %rsi
	movl	$510, %edx                      ## imm = 0x1FE
	callq	_grub_memcpy
	addq	$512, %rbx                      ## imm = 0x200
	addq	$510, %r12                      ## imm = 0x1FE
	decl	%r15d
	jne	LBB0_12
LBB0_13:
	movl	%r14d, 8(%r13)
	movl	-568(%rbp), %eax                ## 4-byte Reload
	movl	%eax, 12(%r13)
	jmp	LBB0_16
LBB0_18:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_FB_AR_MAGIC_LONG,8,3           ## @FB_AR_MAGIC_LONG
	.comm	_FB_MAGIC_LONG,8,3              ## @FB_MAGIC_LONG
	.comm	_FB_VER_MAJOR,8,3               ## @FB_VER_MAJOR
	.comm	_FB_VER_MINOR,8,3               ## @FB_VER_MINOR
	.comm	_GRUB_ERR_BAD_FS,4,2            ## @GRUB_ERR_BAD_FS
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"not a fb filesystem"

	.no_dead_strip	_grub_fbfs_mount
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function grub_fbfs_mount
_grub_fbfs_mount:                       ; @grub_fbfs_mount
	.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
	sub	sp, sp, #528
	mov	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-88]
	add	x4, sp, #8
	mov	w1, #0
	mov	w2, #0
	mov	w3, #512
	bl	_grub_disk_read
	cbz	x0, LBB0_4
LBB0_1:
Lloh3:
	adrp	x8, _GRUB_ERR_BAD_FS@GOTPAGE
Lloh4:
	ldr	x8, [x8, _GRUB_ERR_BAD_FS@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	bl	_grub_error
	mov	x20, #0
LBB0_2:
	ldur	x8, [x29, #-88]
Lloh8:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh9:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh10:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_18
; %bb.3:
	mov	x0, x20
	add	sp, sp, #528
	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_4:
	ldr	x8, [sp, #8]
Lloh11:
	adrp	x9, _FB_AR_MAGIC_LONG@GOTPAGE
Lloh12:
	ldr	x9, [x9, _FB_AR_MAGIC_LONG@GOTPAGEOFF]
Lloh13:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_11
; %bb.5:
	mov	w25, #0
	mov	w23, #0
	mov	w22, #0
	mov	w24, #1
LBB0_6:
	ldr	x8, [sp, #16]
Lloh14:
	adrp	x9, _FB_VER_MAJOR@GOTPAGE
Lloh15:
	ldr	x9, [x9, _FB_VER_MAJOR@GOTPAGEOFF]
Lloh16:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_1
; %bb.7:
	ldr	x8, [sp, #24]
Lloh17:
	adrp	x9, _FB_VER_MINOR@GOTPAGE
Lloh18:
	ldr	x9, [x9, _FB_VER_MINOR@GOTPAGEOFF]
Lloh19:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_1
; %bb.8:
	ldr	w26, [sp, #32]
	mov	w0, #16
	bfi	w0, w26, #9, #23
	bl	_grub_malloc
	cbz	x0, LBB0_1
; %bb.9:
	mov	x20, x0
	lsl	w3, w26, #9
	ldr	x21, [x0]
	sub	w8, w25, w22
	add	w1, w8, w24
	mov	x0, x19
	mov	w2, #0
	mov	x4, x21
	bl	_grub_disk_read
	cbz	x0, LBB0_14
; %bb.10:
	mov	x0, x20
	bl	_grub_free
	b	LBB0_1
LBB0_11:
Lloh20:
	adrp	x9, _FB_MAGIC_LONG@GOTPAGE
Lloh21:
	ldr	x9, [x9, _FB_MAGIC_LONG@GOTPAGEOFF]
Lloh22:
	ldr	x9, [x9]
	ldr	w10, [sp, #16]
	cmp	x8, x9
	mov	w8, #43605
	ccmp	w10, w8, #0, eq
	b.ne	LBB0_1
; %bb.12:
	ldp	w22, w8, [sp, #20]
	add	w24, w8, #1
	sub	w1, w24, w22
	add	x4, sp, #8
	mov	x0, x19
	mov	w2, #0
	mov	w3, #512
	bl	_grub_disk_read
	cbnz	x0, LBB0_1
; %bb.13:
	ldp	w25, w23, [sp, #8]
	b	LBB0_6
LBB0_14:
	cmp	w26, #2
	b.lt	LBB0_17
; %bb.15:
	add	x19, x21, #512
	add	x21, x21, #510
	sub	w24, w26, #1
LBB0_16:                                ; =>This Inner Loop Header: Depth=1
	mov	x0, x21
	mov	x1, x19
	mov	w2, #510
	bl	_grub_memcpy
	add	x19, x19, #512
	add	x21, x21, #510
	subs	w24, w24, #1
	b.ne	LBB0_16
LBB0_17:
	stp	w22, w23, [x20, #8]
	b	LBB0_2
LBB0_18:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.comm	_FB_AR_MAGIC_LONG,8,3           ; @FB_AR_MAGIC_LONG
	.comm	_FB_MAGIC_LONG,8,3              ; @FB_MAGIC_LONG
	.comm	_FB_VER_MAJOR,8,3               ; @FB_VER_MAJOR
	.comm	_FB_VER_MINOR,8,3               ; @FB_VER_MINOR
	.comm	_GRUB_ERR_BAD_FS,4,2            ; @GRUB_ERR_BAD_FS
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"not a fb filesystem"

	.no_dead_strip	_grub_fbfs_mount
.subsections_via_symbols
