	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_grub_disk_open                 ## -- Begin function grub_disk_open
	.p2align	4, 0x90
_grub_disk_open:                        ## @grub_disk_open
	.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
	movq	%rdi, %rbx
	leaq	L_.str(%rip), %rdi
	leaq	L_.str.1(%rip), %rsi
	movq	%rbx, %rdx
	callq	_grub_dprintf
	movl	$24, %edi
	callq	_grub_zalloc
	testq	%rax, %rax
	je	LBB0_18
## %bb.1:
	movq	%rax, %r15
	movq	%rbx, %rdi
	callq	_grub_strdup
	movl	%eax, 20(%r15)
	testl	%eax, %eax
	je	LBB0_16
## %bb.2:
	movq	%rbx, %rdi
	callq	_find_part_sep
	movq	%rax, %r12
	movq	%rbx, %r14
	testq	%rax, %rax
	je	LBB0_5
## %bb.3:
	movq	%r12, %r13
	subq	%rbx, %r13
	leal	1(%r13), %edi
	callq	_grub_malloc
	testq	%rax, %rax
	je	LBB0_16
## %bb.4:
	movq	%rax, %r14
	movq	%rax, %rdi
	movq	%rbx, %rsi
	movl	%r13d, %edx
	callq	_grub_memcpy
	movslq	%r13d, %rax
	movb	$0, (%r14,%rax)
LBB0_5:
	movq	%r12, -48(%rbp)                 ## 8-byte Spill
	movq	_grub_disk_dev_list@GOTPCREL(%rip), %rax
	movq	(%rax), %r12
	testq	%r12, %r12
	movq	%r14, -56(%rbp)                 ## 8-byte Spill
	je	LBB0_10
## %bb.6:
	movq	_GRUB_ERR_NONE@GOTPCREL(%rip), %r13
	movq	_grub_errno@GOTPCREL(%rip), %r14
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movq	%r15, %rsi
	callq	*(%r12)
	movq	(%r13), %rcx
	cmpq	%rcx, %rax
	je	LBB0_20
## %bb.8:                               ##   in Loop: Header=BB0_7 Depth=1
	movq	(%r14), %rdi
	movq	_GRUB_ERR_UNKNOWN_DEVICE@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rdi
	jne	LBB0_13
## %bb.9:                               ##   in Loop: Header=BB0_7 Depth=1
	movq	%rcx, (%r14)
	movq	8(%r12), %r12
	testq	%r12, %r12
	jne	LBB0_7
	jmp	LBB0_11
LBB0_10:
	movq	_GRUB_ERR_UNKNOWN_DEVICE@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
LBB0_11:
	leaq	L_.str.2(%rip), %rsi
LBB0_12:
	callq	_grub_error
LBB0_13:
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	testq	%rdi, %rdi
	je	LBB0_16
## %bb.14:
	cmpq	%rbx, %rdi
	je	LBB0_16
## %bb.15:
	callq	_grub_free
LBB0_16:
	movq	_grub_errno@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_GRUB_ERR_NONE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_19
## %bb.17:
	xorl	%eax, %eax
	callq	_grub_error_push
	leaq	L_.str(%rip), %rdi
	leaq	L_.str.5(%rip), %rsi
	movq	%rbx, %rdx
	callq	_grub_dprintf
	xorl	%eax, %eax
	callq	_grub_error_pop
	movq	%r15, %rdi
	callq	_grub_disk_close
LBB0_18:
	xorl	%r15d, %r15d
LBB0_19:
	movq	%r15, %rax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_20:
	cmpq	$0, -48(%rbp)                   ## 8-byte Folded Reload
	je	LBB0_24
## %bb.21:
	cmpl	$0, 16(%r15)
	je	LBB0_28
## %bb.22:
	movq	%r12, 8(%r15)
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	incq	%rsi
	movq	%r15, %rdi
	callq	_grub_partition_probe
	movl	%eax, (%r15)
	testl	%eax, %eax
	jne	LBB0_25
## %bb.23:
	movq	_GRUB_ERR_UNKNOWN_DEVICE@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	leaq	L_.str.4(%rip), %rsi
	jmp	LBB0_12
LBB0_24:
	movq	%r12, 8(%r15)
LBB0_25:
	xorl	%eax, %eax
	callq	_grub_get_time_ms
	movq	%rax, %r12
	movq	_grub_last_time@GOTPCREL(%rip), %r14
	movq	_GRUB_CACHE_TIMEOUT@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	imulq	$1000, %rax, %rax               ## imm = 0x3E8
	addq	(%r14), %rax
	cmpq	%rax, %r12
	jle	LBB0_27
## %bb.26:
	xorl	%eax, %eax
	callq	_grub_disk_cache_invalidate_all
LBB0_27:
	movq	%r12, (%r14)
	jmp	LBB0_13
LBB0_28:
	movq	_GRUB_ERR_BAD_DEVICE@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	leaq	L_.str.3(%rip), %rsi
	jmp	LBB0_12
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"disk"

L_.str.1:                               ## @.str.1
	.asciz	"Opening `%s'...\n"

	.comm	_grub_disk_dev_list,8,3         ## @grub_disk_dev_list
	.comm	_GRUB_ERR_NONE,8,3              ## @GRUB_ERR_NONE
	.comm	_grub_errno,8,3                 ## @grub_errno
	.comm	_GRUB_ERR_UNKNOWN_DEVICE,8,3    ## @GRUB_ERR_UNKNOWN_DEVICE
L_.str.2:                               ## @.str.2
	.asciz	"no such disk"

	.comm	_GRUB_ERR_BAD_DEVICE,8,3        ## @GRUB_ERR_BAD_DEVICE
L_.str.3:                               ## @.str.3
	.asciz	"no partition on this disk"

L_.str.4:                               ## @.str.4
	.asciz	"no such partition"

	.comm	_grub_last_time,8,3             ## @grub_last_time
	.comm	_GRUB_CACHE_TIMEOUT,4,2         ## @GRUB_CACHE_TIMEOUT
L_.str.5:                               ## @.str.5
	.asciz	"Opening `%s' failed.\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_grub_disk_open                 ; -- Begin function grub_disk_open
	.p2align	2
_grub_disk_open:                        ; @grub_disk_open
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x19, x0
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
Lloh2:
	adrp	x1, l_.str.1@PAGE
Lloh3:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x2, x19
	bl	_grub_dprintf
	mov	w0, #24
	bl	_grub_zalloc
	mov	x20, x0
	cbz	x0, LBB0_18
; %bb.1:
	mov	x0, x19
	bl	_grub_strdup
	str	w0, [x20, #20]
	cbz	w0, LBB0_16
; %bb.2:
	mov	x0, x19
	bl	_find_part_sep
	mov	x22, x0
	mov	x21, x19
	cbz	x0, LBB0_5
; %bb.3:
	sub	x23, x22, x19
	add	w0, w23, #1
	bl	_grub_malloc
	cbz	x0, LBB0_16
; %bb.4:
	mov	x21, x0
	mov	x1, x19
	mov	x2, x23
	bl	_grub_memcpy
	strb	wzr, [x21, w23, sxtw]
LBB0_5:
Lloh4:
	adrp	x8, _grub_disk_dev_list@GOTPAGE
Lloh5:
	ldr	x8, [x8, _grub_disk_dev_list@GOTPAGEOFF]
Lloh6:
	ldr	x24, [x8]
	cbz	x24, LBB0_10
; %bb.6:
Lloh7:
	adrp	x25, _GRUB_ERR_NONE@GOTPAGE
Lloh8:
	ldr	x25, [x25, _GRUB_ERR_NONE@GOTPAGEOFF]
Lloh9:
	adrp	x26, _grub_errno@GOTPAGE
Lloh10:
	ldr	x26, [x26, _grub_errno@GOTPAGEOFF]
Lloh11:
	adrp	x23, _GRUB_ERR_UNKNOWN_DEVICE@GOTPAGE
Lloh12:
	ldr	x23, [x23, _GRUB_ERR_UNKNOWN_DEVICE@GOTPAGEOFF]
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x24]
	mov	x0, x21
	mov	x1, x20
	blr	x8
	ldr	x8, [x25]
	cmp	x0, x8
	b.eq	LBB0_19
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	ldr	x0, [x26]
	ldr	x9, [x23]
	cmp	x0, x9
	b.ne	LBB0_13
; %bb.9:                                ;   in Loop: Header=BB0_7 Depth=1
	str	x8, [x26]
	ldr	x24, [x24, #8]
	cbnz	x24, LBB0_7
	b	LBB0_11
LBB0_10:
Lloh13:
	adrp	x8, _GRUB_ERR_UNKNOWN_DEVICE@GOTPAGE
Lloh14:
	ldr	x8, [x8, _GRUB_ERR_UNKNOWN_DEVICE@GOTPAGEOFF]
Lloh15:
	ldr	x0, [x8]
LBB0_11:
Lloh16:
	adrp	x1, l_.str.2@PAGE
Lloh17:
	add	x1, x1, l_.str.2@PAGEOFF
LBB0_12:
	bl	_grub_error
LBB0_13:
	cbz	x21, LBB0_16
LBB0_14:
	cmp	x21, x19
	b.eq	LBB0_16
; %bb.15:
	mov	x0, x21
	bl	_grub_free
LBB0_16:
Lloh18:
	adrp	x8, _grub_errno@GOTPAGE
Lloh19:
	ldr	x8, [x8, _grub_errno@GOTPAGEOFF]
Lloh20:
	ldr	x8, [x8]
Lloh21:
	adrp	x9, _GRUB_ERR_NONE@GOTPAGE
Lloh22:
	ldr	x9, [x9, _GRUB_ERR_NONE@GOTPAGEOFF]
Lloh23:
	ldr	x9, [x9]
	cmp	x8, x9
	b.eq	LBB0_18
; %bb.17:
	bl	_grub_error_push
Lloh24:
	adrp	x0, l_.str@PAGE
Lloh25:
	add	x0, x0, l_.str@PAGEOFF
Lloh26:
	adrp	x1, l_.str.5@PAGE
Lloh27:
	add	x1, x1, l_.str.5@PAGEOFF
	mov	x2, x19
	bl	_grub_dprintf
	bl	_grub_error_pop
	mov	x0, x20
	bl	_grub_disk_close
	mov	x20, #0
LBB0_18:
	mov	x0, x20
	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
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_19:
	cbz	x22, LBB0_23
; %bb.20:
	ldr	w8, [x20, #16]
	cbz	w8, LBB0_27
; %bb.21:
	str	x24, [x20, #8]
	add	x1, x22, #1
	mov	x0, x20
	bl	_grub_partition_probe
	str	w0, [x20]
	cbnz	w0, LBB0_24
; %bb.22:
	ldr	x0, [x23]
Lloh28:
	adrp	x1, l_.str.4@PAGE
Lloh29:
	add	x1, x1, l_.str.4@PAGEOFF
	b	LBB0_12
LBB0_23:
	str	x24, [x20, #8]
LBB0_24:
	bl	_grub_get_time_ms
	mov	x22, x0
Lloh30:
	adrp	x23, _grub_last_time@GOTPAGE
Lloh31:
	ldr	x23, [x23, _grub_last_time@GOTPAGEOFF]
	ldr	x8, [x23]
Lloh32:
	adrp	x9, _GRUB_CACHE_TIMEOUT@GOTPAGE
Lloh33:
	ldr	x9, [x9, _GRUB_CACHE_TIMEOUT@GOTPAGEOFF]
Lloh34:
	ldrsw	x9, [x9]
	mov	w10, #1000
	madd	x8, x9, x10, x8
	cmp	x0, x8
	b.le	LBB0_26
; %bb.25:
	bl	_grub_disk_cache_invalidate_all
LBB0_26:
	str	x22, [x23]
	cbnz	x21, LBB0_14
	b	LBB0_16
LBB0_27:
Lloh35:
	adrp	x8, _GRUB_ERR_BAD_DEVICE@GOTPAGE
Lloh36:
	ldr	x8, [x8, _GRUB_ERR_BAD_DEVICE@GOTPAGEOFF]
Lloh37:
	ldr	x0, [x8]
Lloh38:
	adrp	x1, l_.str.3@PAGE
Lloh39:
	add	x1, x1, l_.str.3@PAGEOFF
	b	LBB0_12
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpAdd	Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGot	Lloh30, Lloh31
	.loh AdrpAdd	Lloh38, Lloh39
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"disk"

l_.str.1:                               ; @.str.1
	.asciz	"Opening `%s'...\n"

	.comm	_grub_disk_dev_list,8,3         ; @grub_disk_dev_list
	.comm	_GRUB_ERR_NONE,8,3              ; @GRUB_ERR_NONE
	.comm	_grub_errno,8,3                 ; @grub_errno
	.comm	_GRUB_ERR_UNKNOWN_DEVICE,8,3    ; @GRUB_ERR_UNKNOWN_DEVICE
l_.str.2:                               ; @.str.2
	.asciz	"no such disk"

	.comm	_GRUB_ERR_BAD_DEVICE,8,3        ; @GRUB_ERR_BAD_DEVICE
l_.str.3:                               ; @.str.3
	.asciz	"no partition on this disk"

l_.str.4:                               ; @.str.4
	.asciz	"no such partition"

	.comm	_grub_last_time,8,3             ; @grub_last_time
	.comm	_GRUB_CACHE_TIMEOUT,4,2         ; @GRUB_CACHE_TIMEOUT
l_.str.5:                               ; @.str.5
	.asciz	"Opening `%s' failed.\n"

.subsections_via_symbols
