	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_grub_file_read                 ## -- Begin function grub_file_read
	.p2align	4, 0x90
_grub_file_read:                        ## @grub_file_read
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	8(%rdi), %rax
	subq	(%rdi), %rax
	jge	LBB0_2
## %bb.1:
	movq	_GRUB_ERR_OUT_OF_RANGE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	callq	_grub_error
	movl	$-1, %eax
	jmp	LBB0_9
LBB0_2:
	movq	%rdi, %rbx
	testl	%edx, %edx
	je	LBB0_4
## %bb.3:
	movslq	%edx, %rcx
	cmpq	%rcx, %rax
	jge	LBB0_5
LBB0_4:
	movl	%eax, %edx
LBB0_5:
	movl	%edx, %ecx
	shrl	$31, %ecx
                                        ## kill: def $cl killed $cl killed $ecx
	sarl	%cl, %edx
	testl	%edx, %edx
	je	LBB0_6
## %bb.7:
	movq	16(%rbx), %rax
	movq	%rbx, %rdi
	callq	*(%rax)
	testl	%eax, %eax
	jle	LBB0_9
## %bb.8:
	movl	%eax, %ecx
	addq	%rcx, (%rbx)
	jmp	LBB0_9
LBB0_6:
	xorl	%eax, %eax
LBB0_9:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GRUB_ERR_OUT_OF_RANGE,4,2      ## @GRUB_ERR_OUT_OF_RANGE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"attempt to read past the end of file"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_grub_file_read                 ; -- Begin function grub_file_read
	.p2align	2
_grub_file_read:                        ; @grub_file_read
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	ldp	x8, x9, [x0]
	subs	x8, x9, x8
	b.ge	LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _GRUB_ERR_OUT_OF_RANGE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GRUB_ERR_OUT_OF_RANGE@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	bl	_grub_error
	mov	w0, #-1
	b	LBB0_9
LBB0_2:
	mov	x19, x0
	cbz	w2, LBB0_4
; %bb.3:
	cmp	x8, w2, sxtw
	b.ge	LBB0_5
LBB0_4:
	mov	x2, x8
LBB0_5:
	lsr	w8, w2, #31
	asr	w2, w2, w8
	cbz	w2, LBB0_8
; %bb.6:
	ldr	x8, [x19, #16]
	ldr	x8, [x8]
	mov	x0, x19
	blr	x8
	cmp	w0, #1
	b.lt	LBB0_9
; %bb.7:
	ldr	x8, [x19]
	add	x8, x8, w0, uxtw
	str	x8, [x19]
	b	LBB0_9
LBB0_8:
	mov	w0, #0
LBB0_9:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_GRUB_ERR_OUT_OF_RANGE,4,2      ; @GRUB_ERR_OUT_OF_RANGE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"attempt to read past the end of file"

.subsections_via_symbols
