	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_grub_disk_read_ex              ## -- Begin function grub_disk_read_ex
	.p2align	4, 0x90
_grub_disk_read_ex:                     ## @grub_disk_read_ex
	.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
	movq	%r8, %r15
	movl	%ecx, %ebx
	movq	%rdi, %r12
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	%rsi, -64(%rbp)
	movl	%edx, -68(%rbp)
	testl	%r9d, %r9d
	je	LBB0_1
## %bb.3:
	leaq	-64(%rbp), %rsi
	leaq	-68(%rbp), %rdx
	movq	%r12, %rdi
	movl	%ebx, %ecx
	callq	_grub_disk_adjust_range
	movq	_GRUB_ERR_NONE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_25
## %bb.4:
	movl	%ebx, -52(%rbp)                 ## 4-byte Spill
	testl	%ebx, %ebx
	je	LBB0_25
## %bb.5:
	movl	-68(%rbp), %r14d
	movq	_GRUB_DISK_SECTOR_SIZE@GOTPCREL(%rip), %rbx
	jmp	LBB0_6
LBB0_22:                                ##   in Loop: Header=BB0_6 Depth=1
	movslq	%ebx, %rax
	addq	%rax, -64(%rbp)
LBB0_23:                                ##   in Loop: Header=BB0_6 Depth=1
	movl	-52(%rbp), %ebx                 ## 4-byte Reload
LBB0_24:                                ##   in Loop: Header=BB0_6 Depth=1
	movslq	%r13d, %rax
	leaq	(%r15,%rax), %rcx
	testq	%r15, %r15
	cmovneq	%rcx, %r15
	xorl	%r14d, %r14d
	subl	%eax, %ebx
	movl	%ebx, -52(%rbp)                 ## 4-byte Spill
	movq	-80(%rbp), %rsp                 ## 8-byte Reload
	movq	_GRUB_DISK_SECTOR_SIZE@GOTPCREL(%rip), %rbx
	je	LBB0_25
LBB0_6:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_20 Depth 2
	movq	%rsp, -80(%rbp)                 ## 8-byte Spill
	movl	(%rbx), %eax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %rcx
	movl	(%rbx), %r13d
	testl	%r14d, %r14d
	movl	-52(%rbp), %ebx                 ## 4-byte Reload
	jne	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=1
	cmpl	%r13d, %ebx
	jl	LBB0_8
## %bb.14:                              ##   in Loop: Header=BB0_6 Depth=1
	movq	_GRUB_DISK_SECTOR_BITS@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	sarl	%cl, %ebx
	testq	%r15, %r15
	je	LBB0_16
## %bb.15:                              ##   in Loop: Header=BB0_6 Depth=1
	movq	16(%r12), %rax
	movq	-64(%rbp), %rsi
	movq	%r12, %rdi
	movl	%ebx, %edx
	movq	%r15, %rcx
	callq	*(%rax)
	movq	_GRUB_ERR_NONE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_21
LBB0_16:                                ##   in Loop: Header=BB0_6 Depth=1
	negl	%r13d
	andl	-52(%rbp), %r13d                ## 4-byte Folded Reload
	movq	8(%r12), %r8
	testq	%r8, %r8
	je	LBB0_22
## %bb.17:                              ##   in Loop: Header=BB0_6 Depth=1
	testl	%ebx, %ebx
	je	LBB0_23
## %bb.18:                              ##   in Loop: Header=BB0_6 Depth=1
	movq	-64(%rbp), %rdi
	leaq	1(%rdi), %rax
	movq	%rax, -64(%rbp)
	movq	_GRUB_DISK_SECTOR_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	(%r12), %ecx
	xorl	%esi, %esi
	callq	*%r8
	decl	%ebx
	je	LBB0_23
## %bb.19:                              ##   in Loop: Header=BB0_6 Depth=1
	movq	_GRUB_DISK_SECTOR_SIZE@GOTPCREL(%rip), %r14
	.p2align	4, 0x90
LBB0_20:                                ##   Parent Loop BB0_6 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	8(%r12), %rax
	movq	-64(%rbp), %rdi
	leaq	1(%rdi), %rcx
	movq	%rcx, -64(%rbp)
	movl	(%r14), %edx
	movl	(%r12), %ecx
	xorl	%esi, %esi
	callq	*%rax
	decl	%ebx
	jne	LBB0_20
	jmp	LBB0_23
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_6 Depth=1
	subl	%r14d, %r13d
	cmpl	%ebx, %r13d
	cmovgel	%ebx, %r13d
	testq	%r15, %r15
	je	LBB0_11
## %bb.9:                               ##   in Loop: Header=BB0_6 Depth=1
	movq	16(%r12), %rax
	movq	-64(%rbp), %rsi
	movq	%r12, %rdi
	movl	$1, %edx
	movq	%rcx, %rbx
	callq	*(%rax)
	movq	_GRUB_ERR_NONE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_21
## %bb.10:                              ##   in Loop: Header=BB0_6 Depth=1
	movl	%r14d, %eax
	addq	%rax, %rbx
	movq	%r15, %rdi
	movq	%rbx, %rsi
	movl	%r13d, %edx
	callq	_grub_memcpy
	movl	-52(%rbp), %ebx                 ## 4-byte Reload
LBB0_11:                                ##   in Loop: Header=BB0_6 Depth=1
	movq	8(%r12), %rax
	testq	%rax, %rax
	je	LBB0_13
## %bb.12:                              ##   in Loop: Header=BB0_6 Depth=1
	movq	-64(%rbp), %rdi
	movl	(%r12), %ecx
	movl	%r14d, %esi
	movl	%r13d, %edx
	callq	*%rax
LBB0_13:                                ##   in Loop: Header=BB0_6 Depth=1
	incq	-64(%rbp)
	jmp	LBB0_24
LBB0_1:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_27
## %bb.2:
	movq	%r12, %rdi
	movl	%ebx, %ecx
	movq	%r15, %r8
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_grub_disk_read                 ## TAILCALL
LBB0_21:
	movq	-80(%rbp), %rsp                 ## 8-byte Reload
LBB0_25:
	movq	_grub_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-48(%rbp), %rcx
	jne	LBB0_27
## %bb.26:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_27:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_GRUB_ERR_NONE,8,3              ## @GRUB_ERR_NONE
	.comm	_grub_errno,4,2                 ## @grub_errno
	.comm	_GRUB_DISK_SECTOR_SIZE,4,2      ## @GRUB_DISK_SECTOR_SIZE
	.comm	_GRUB_DISK_SECTOR_BITS,4,2      ## @GRUB_DISK_SECTOR_BITS
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_grub_disk_read_ex              ; -- Begin function grub_disk_read_ex
	.p2align	2
_grub_disk_read_ex:                     ; @grub_disk_read_ex
	.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, #32
	mov	x20, x4
	mov	x19, x3
	mov	x21, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-88]
	stur	x1, [x29, #-96]
	stur	w2, [x29, #-100]
	cbz	w5, LBB0_21
; %bb.1:
	sub	x1, x29, #96
	sub	x2, x29, #100
	mov	x0, x21
	mov	x3, x19
	bl	_grub_disk_adjust_range
Lloh3:
	adrp	x25, _GRUB_ERR_NONE@GOTPAGE
Lloh4:
	ldr	x25, [x25, _GRUB_ERR_NONE@GOTPAGEOFF]
	ldr	x8, [x25]
	cmp	x0, x8
	b.ne	LBB0_24
; %bb.2:
	cbz	w19, LBB0_24
; %bb.3:
	ldur	w23, [x29, #-100]
Lloh5:
	adrp	x26, _GRUB_DISK_SECTOR_SIZE@GOTPAGE
Lloh6:
	ldr	x26, [x26, _GRUB_DISK_SECTOR_SIZE@GOTPAGEOFF]
Lloh7:
	adrp	x27, _GRUB_DISK_SECTOR_BITS@GOTPAGE
Lloh8:
	ldr	x27, [x27, _GRUB_DISK_SECTOR_BITS@GOTPAGEOFF]
	b	LBB0_7
LBB0_4:                                 ;   in Loop: Header=BB0_7 Depth=1
	ldur	x8, [x29, #-96]
	add	x8, x8, w23, sxtw
LBB0_5:                                 ;   in Loop: Header=BB0_7 Depth=1
	stur	x8, [x29, #-96]
LBB0_6:                                 ;   in Loop: Header=BB0_7 Depth=1
	add	x8, x20, w22, sxtw
	cmp	x20, #0
	csel	x20, xzr, x8, eq
	subs	w19, w19, w22
	mov	sp, x28
	mov	w23, #0
	b.eq	LBB0_24
LBB0_7:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_13 Depth 2
	mov	x28, sp
	ldr	w8, [x26]
	mov	x9, x8
Lloh9:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh10:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x8, x8, #15
	and	x8, x8, #0x1fffffff0
	sub	x24, x9, x8
	mov	sp, x24
	ldr	w22, [x26]
	cbnz	w23, LBB0_15
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	cmp	w19, w22
	b.lt	LBB0_15
; %bb.9:                                ;   in Loop: Header=BB0_7 Depth=1
	ldr	w8, [x27]
	asr	w23, w19, w8
	cbz	x20, LBB0_11
; %bb.10:                               ;   in Loop: Header=BB0_7 Depth=1
	ldr	x8, [x21, #16]
	ldr	x8, [x8]
	ldur	x1, [x29, #-96]
	mov	x0, x21
	mov	x2, x23
	mov	x3, x20
	blr	x8
	ldr	x8, [x25]
	cmp	x0, x8
	b.ne	LBB0_23
LBB0_11:                                ;   in Loop: Header=BB0_7 Depth=1
	neg	w8, w22
	and	w22, w19, w8
	ldr	x8, [x21, #8]
	cbz	x8, LBB0_4
; %bb.12:                               ;   in Loop: Header=BB0_7 Depth=1
	cbz	w23, LBB0_6
LBB0_13:                                ;   Parent Loop BB0_7 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldur	x0, [x29, #-96]
	add	x9, x0, #1
	stur	x9, [x29, #-96]
	ldr	w2, [x26]
	ldr	w3, [x21]
	mov	w1, #0
	blr	x8
	subs	w23, w23, #1
	b.eq	LBB0_6
; %bb.14:                               ;   in Loop: Header=BB0_13 Depth=2
	ldr	x8, [x21, #8]
	b	LBB0_13
LBB0_15:                                ;   in Loop: Header=BB0_7 Depth=1
	sub	w8, w22, w23
	cmp	w8, w19
	csel	w22, w8, w19, lt
	cbz	x20, LBB0_18
; %bb.16:                               ;   in Loop: Header=BB0_7 Depth=1
	ldr	x8, [x21, #16]
	ldr	x8, [x8]
	ldur	x1, [x29, #-96]
	mov	x0, x21
	mov	w2, #1
	mov	x3, x24
	blr	x8
	ldr	x8, [x25]
	cmp	x0, x8
	b.ne	LBB0_23
; %bb.17:                               ;   in Loop: Header=BB0_7 Depth=1
	add	x1, x24, w23, uxtw
	mov	x0, x20
	mov	x2, x22
	bl	_grub_memcpy
LBB0_18:                                ;   in Loop: Header=BB0_7 Depth=1
	ldr	x8, [x21, #8]
	cbz	x8, LBB0_20
; %bb.19:                               ;   in Loop: Header=BB0_7 Depth=1
	ldur	x0, [x29, #-96]
	ldr	w3, [x21]
	mov	x1, x23
	mov	x2, x22
	blr	x8
LBB0_20:                                ;   in Loop: Header=BB0_7 Depth=1
	ldur	x8, [x29, #-96]
	add	x8, x8, #1
	b	LBB0_5
LBB0_21:
	ldur	x8, [x29, #-88]
Lloh11:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh12:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh13:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_26
; %bb.22:
	mov	x0, x21
	mov	x3, x19
	mov	x4, x20
	sub	sp, x29, #80
	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
	b	_grub_disk_read
LBB0_23:
	mov	sp, x28
LBB0_24:
Lloh14:
	adrp	x8, _grub_errno@GOTPAGE
Lloh15:
	ldr	x8, [x8, _grub_errno@GOTPAGEOFF]
Lloh16:
	ldr	w0, [x8]
	ldur	x8, [x29, #-88]
Lloh17:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh18:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh19:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_26
; %bb.25:
	sub	sp, x29, #80
	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_26:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_GRUB_ERR_NONE,8,3              ; @GRUB_ERR_NONE
	.comm	_grub_errno,4,2                 ; @grub_errno
	.comm	_GRUB_DISK_SECTOR_SIZE,4,2      ; @GRUB_DISK_SECTOR_SIZE
	.comm	_GRUB_DISK_SECTOR_BITS,4,2      ; @GRUB_DISK_SECTOR_BITS
.subsections_via_symbols
