	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function grub_hfsplus_read_block
_grub_hfsplus_read_block:               ## @grub_hfsplus_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, %r14d
	movq	%rdi, %rbx
	movl	%esi, -48(%rbp)
	movq	16(%rdi), %rdi
	movl	$0, -44(%rbp)
	leaq	-48(%rbp), %rsi
	callq	_grub_hfsplus_find_block
	movl	%eax, %r15d
	xorl	%edi, %edi
	callq	_grub_free
	movq	$0, -56(%rbp)
	cmpl	$-1, %r15d
	je	LBB0_1
LBB0_8:
	movq	8(%rbx), %rcx
	movl	(%rcx), %eax
	movl	4(%rcx), %ecx
	movq	_GRUB_DISK_SECTOR_BITS@GOTPCREL(%rip), %rdx
	subl	(%rdx), %ecx
                                        ## kill: def $cl killed $cl killed $ecx
	sarl	%cl, %eax
	addl	%r15d, %eax
	jmp	LBB0_9
LBB0_1:
	leaq	-56(%rbp), %r12
	leaq	-44(%rbp), %r13
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%rbx), %rax
	movq	_GRUB_HFSPLUS_FILEID_OVERFLOW@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_3
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%rax, -72(%rbp)
	movl	%r14d, %eax
	subl	-48(%rbp), %eax
	movl	%eax, -64(%rbp)
	movq	8(%rbx), %rdi
	addq	$8, %rdi
	movq	_grub_hfsplus_cmp_extkey@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	-72(%rbp), %rsi
	movq	%r12, %rcx
	movq	%r13, %r8
	callq	_grub_hfsplus_btree_search
	testq	%rax, %rax
	jne	LBB0_5
## %bb.7:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	8(%rbx), %rdi
	addq	$8, %rdi
	movq	-56(%rbp), %rsi
	movl	-44(%rbp), %edx
	callq	_grub_hfsplus_btree_recptr
	leaq	4(%rax), %rdi
	movl	$0, -44(%rbp)
	leaq	-48(%rbp), %rsi
	callq	_grub_hfsplus_find_block
	movl	%eax, %r15d
	movq	-56(%rbp), %rdi
	callq	_grub_free
	movq	$0, -56(%rbp)
	cmpl	$-1, %r15d
	je	LBB0_2
	jmp	LBB0_8
LBB0_3:
	movq	_GRUB_ERR_READ_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	xorl	%eax, %eax
	callq	_grub_error
	jmp	LBB0_6
LBB0_5:
	movq	_GRUB_ERR_READ_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	(%rbx), %rdx
	leaq	L_.str.1(%rip), %rsi
	movl	%r14d, %ecx
	xorl	%eax, %eax
	callq	_grub_error
LBB0_6:
	movq	-56(%rbp), %rdi
	callq	_grub_free
	movl	$-1, %eax
LBB0_9:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GRUB_DISK_SECTOR_BITS,4,2      ## @GRUB_DISK_SECTOR_BITS
	.comm	_GRUB_HFSPLUS_FILEID_OVERFLOW,8,3 ## @GRUB_HFSPLUS_FILEID_OVERFLOW
	.comm	_GRUB_ERR_READ_ERROR,4,2        ## @GRUB_ERR_READ_ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"extra extents found in an extend overflow file"

	.comm	_grub_hfsplus_cmp_extkey,4,2    ## @grub_hfsplus_cmp_extkey
L_.str.1:                               ## @.str.1
	.asciz	"no block found for the file id 0x%x and the block offset 0x%x"

	.no_dead_strip	_grub_hfsplus_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_hfsplus_read_block
_grub_hfsplus_read_block:               ; @grub_hfsplus_read_block
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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, x1
	mov	x19, x0
	str	w1, [sp, #52]
	ldr	x0, [x0, #16]
	str	wzr, [sp, #28]
	add	x1, sp, #52
	bl	_grub_hfsplus_find_block
	mov	x21, x0
	mov	x0, #0
	bl	_grub_free
	str	xzr, [sp, #56]
	cmn	w21, #1
	b.eq	LBB0_2
LBB0_1:
	ldr	x8, [x19, #8]
	ldp	w9, w8, [x8]
Lloh0:
	adrp	x10, _GRUB_DISK_SECTOR_BITS@GOTPAGE
Lloh1:
	ldr	x10, [x10, _GRUB_DISK_SECTOR_BITS@GOTPAGEOFF]
Lloh2:
	ldr	w10, [x10]
	sub	w8, w8, w10
	asr	w8, w9, w8
	add	w0, w8, w21
	b	LBB0_9
LBB0_2:
Lloh3:
	adrp	x22, _GRUB_HFSPLUS_FILEID_OVERFLOW@GOTPAGE
Lloh4:
	ldr	x22, [x22, _GRUB_HFSPLUS_FILEID_OVERFLOW@GOTPAGEOFF]
Lloh5:
	adrp	x23, _grub_hfsplus_cmp_extkey@GOTPAGE
Lloh6:
	ldr	x23, [x23, _grub_hfsplus_cmp_extkey@GOTPAGEOFF]
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19]
	ldr	x9, [x22]
	cmp	x8, x9
	b.eq	LBB0_6
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	str	x8, [sp, #32]
	ldr	w8, [sp, #52]
	sub	w8, w20, w8
	str	w8, [sp, #40]
	ldr	x8, [x19, #8]
	add	x0, x8, #8
	ldr	w2, [x23]
	add	x1, sp, #32
	add	x3, sp, #56
	add	x4, sp, #28
	bl	_grub_hfsplus_btree_search
	cbnz	x0, LBB0_7
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x8, [x19, #8]
	add	x0, x8, #8
	ldr	x1, [sp, #56]
	ldr	w2, [sp, #28]
	bl	_grub_hfsplus_btree_recptr
	add	x0, x0, #4
	str	wzr, [sp, #28]
	add	x1, sp, #52
	bl	_grub_hfsplus_find_block
	mov	x21, x0
	ldr	x0, [sp, #56]
	bl	_grub_free
	str	xzr, [sp, #56]
	cmn	w21, #1
	b.eq	LBB0_3
	b	LBB0_1
LBB0_6:
Lloh7:
	adrp	x8, _GRUB_ERR_READ_ERROR@GOTPAGE
Lloh8:
	ldr	x8, [x8, _GRUB_ERR_READ_ERROR@GOTPAGEOFF]
Lloh9:
	ldr	w0, [x8]
Lloh10:
	adrp	x1, l_.str@PAGE
Lloh11:
	add	x1, x1, l_.str@PAGEOFF
	b	LBB0_8
LBB0_7:
Lloh12:
	adrp	x8, _GRUB_ERR_READ_ERROR@GOTPAGE
Lloh13:
	ldr	x8, [x8, _GRUB_ERR_READ_ERROR@GOTPAGEOFF]
Lloh14:
	ldr	w0, [x8]
	ldr	x8, [x19]
	stp	x8, x20, [sp]
Lloh15:
	adrp	x1, l_.str.1@PAGE
Lloh16:
	add	x1, x1, l_.str.1@PAGEOFF
LBB0_8:
	bl	_grub_error
	ldr	x0, [sp, #56]
	bl	_grub_free
	mov	w0, #-1
LBB0_9:
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_GRUB_DISK_SECTOR_BITS,4,2      ; @GRUB_DISK_SECTOR_BITS
	.comm	_GRUB_HFSPLUS_FILEID_OVERFLOW,8,3 ; @GRUB_HFSPLUS_FILEID_OVERFLOW
	.comm	_GRUB_ERR_READ_ERROR,4,2        ; @GRUB_ERR_READ_ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"extra extents found in an extend overflow file"

	.comm	_grub_hfsplus_cmp_extkey,4,2    ; @grub_hfsplus_cmp_extkey
l_.str.1:                               ; @.str.1
	.asciz	"no block found for the file id 0x%x and the block offset 0x%x"

	.no_dead_strip	_grub_hfsplus_read_block
.subsections_via_symbols
